Portal-Zone Gothic-Zone Gothic II-Zone Gothic 3-Zone Gothic 4-Zone Modifikationen-Zone Download-Zone Foren-Zone RPG-Zone Almanach-Zone Spirit of Gothic

 

Page 12 of 21 « First ... 5891011121314151619 ... Last »
Results 221 to 240 of 410
  1. View Forum Posts #221
    Kämpfer mobpapst's Avatar
    Join Date
    Jun 2005
    Posts
    364
     
    mobpapst is offline
    Alles klar und vielen Dank!

  2. View Forum Posts #222
    Kämpfer mobpapst's Avatar
    Join Date
    Jun 2005
    Posts
    364
     
    mobpapst is offline
    Ich habe eine weitere Frage zum Ausgeben eines PrintScreen_Ext. Da zur Zeit leider die Seite down ist habe ich mir in der Interface-Datei folgendes angesehen:

    Code:
    PrintScreen_Ext(var string txt, var int x, var int y, var string font, var int timeSec)
    Und dann daraus das gemacht:

    Code:
    Log_CreateTopic (TOPIC_WOOD_Task, LOG_MISSION);
    Log_SetTopicStatus(TOPIC_WOOD_Task, LOG_RUNNING);
    B_LogEntry TOPIC_WOOD_Task, "xxx.");
    PrintScreen_Ext(ConcatStrings("Quest angenommen:,	" TOPIC_WOOD_Task), -1, 2, FONT_ScreenSmall, 3000)
    Ich möchte damit erreichen, das mein Tagebucheintrag mittig plaziert wird. Beim reparsen bekomme ich aber Zeichensetzungsfehler. Ich hab noch xx-Dinge versucht, komme aber leider auf keine passende Lösung.

    Mfg

  3. View Forum Posts #223
    Dea
    Join Date
    Jul 2007
    Posts
    10,168
     
    Lehona is offline
    Das mit dem Wiki ist doof, der Gratis-Hoster unser DB taugt wohl nicht sonderlich viel Wir werden nach einer anderen Lösung suchen.


    PrintScreen_Ext() ist eigentlich nicht unbedingt zur Verwendung gedacht, es macht auch nichts anderes als PrintScreen()
    Gewöhn dir einfach mal an, immer die genaue Fehlermeldung zu posten (und stell sicher, dass sie sich auch genau darauf bezieht), so direkt sieht es erstmal korrekt aus.
    Edit: Oder auch nicht, du hast das Semikolon am Ende vergessen.

  4. View Forum Posts #224
    Kämpfer mobpapst's Avatar
    Join Date
    Jun 2005
    Posts
    364
     
    mobpapst is offline
    Hat geklappt, danke. Aber es lang an etwas anderem.
    Last edited by mobpapst; 19.05.2013 at 12:52.

  5. View Forum Posts #225
    Abenteurer redleha's Avatar
    Join Date
    Dec 2010
    Location
    Новокуйбышевск, Россия
    Posts
    68
     
    redleha is offline
    Maybe my question seems silly, but still ask.

    What instrument can overwrite the value of the constant (int, string, float)?
    I understand I first need to get the address by a symbolic name. And then rewrite using the MEM_WriteXXX. Could you show an example of a few lines, or specify where to look (maybe enough to look in Ikarus.d)?

    And another question. When I change the value of a constant (cost of item) with the package G2ext, the changes appear in your inventory when you save the game. Is it possible to directly produce this reinitialization after the constant changes?

    I hope I have correctly written thought.

  6. View Forum Posts #226
    Dea
    Join Date
    Jul 2007
    Posts
    10,168
     
    Lehona is offline
    Code:
    var zCPar_Symbol symb; symb = MEM_GetParserSymbol("SYMBNAME");
    symb.content = newValue;
    If it's a string, newValue must be of type zString*, ie a pointer to the string.
    If you want to change the address of an instance, you will have to change symb.offset.

  7. Visit Homepage View Forum Posts #227
    Exodus Sektenspinner's Avatar
    Join Date
    Jul 2004
    Location
    Karlsruhe
    Posts
    7,827
     
    Sektenspinner is offline
    Quote Originally Posted by redleha View Post
    What instrument can overwrite the value of the constant (int, string, float)?
    I'd suggest using _@, _@s and _@f to get the addresses of ints, strings and floats and use MEM_WriteInt and MEM_WriteString to change the values at these addresses.

    And another question. When I change the value of a constant (cost of item) with the package G2ext, the changes appear in your inventory when you save the game. Is it possible to directly produce this reinitialization after the constant changes?
    The easiest way I know of would be to destroy and recreate the items or to call the intialiser Funktion for each relevant item (MEM_CallByID(ITMI_MYITEM) after setting the Instance ITMI_MYITEM appropriately and consistently specifying the instance in assignments within the initialiser function (ITMI_MYITEM.name = "My Item"; instead of name = "My Item"

    In short, no, its not possible to have changes to constants affect the items that use these constants directly unless you take care of it manually.
    Für Spieler:
    Velaya # Velaya in English # Exodus Demo # Irrwichtel
    Tools für Modder:
    DiaDepp # DOPA-PARTER # zSlang
    Scripte für Modder:
    Ikarus Skriptpaket # Floats # Broadcasts

  8. View Forum Posts #228
    Abenteurer redleha's Avatar
    Join Date
    Dec 2010
    Location
    Новокуйбышевск, Россия
    Posts
    68
     
    redleha is offline
    Thank you, comrades.
    (I corrected the example of Lehona. It was a little bit wrong. )

    And another question. After changing the value of a constant effect lasts only until you restart the game. If you turn off and turn on the game, the value of constant returns. How to avoid this?
    Also I will be glad if you give an example or specify the search direction.

  9. View Forum Posts #229
    Dea
    Join Date
    Jul 2007
    Posts
    10,168
     
    Lehona is offline
    Quote Originally Posted by redleha View Post
    Thank you, comrades.
    (I corrected the example of Lehona. It was a little bit wrong. )

    And another question. After changing the value of a constant effect lasts only until you restart the game. If you turn off and turn on the game, the value of constant returns. How to avoid this?
    Also I will be glad if you give an example or specify the search direction.
    Woops, I forgot a _^()

    Constants are loaded from the .dat file and are not stored in the savegame, with pure scripts there's no way around that.

  10. View Forum Posts #230
    Abenteurer redleha's Avatar
    Join Date
    Dec 2010
    Location
    Новокуйбышевск, Россия
    Posts
    68
     
    redleha is offline
    Thank you, Lehona! I expected this answer to my question. But hope springs eternal.

  11. View Forum Posts #231
    Abenteurer redleha's Avatar
    Join Date
    Dec 2010
    Location
    Новокуйбышевск, Россия
    Posts
    68
     
    redleha is offline

    Trading

    Hello again. I ask this question.
    Is it possible to intercept the time of transfer of the goods from NPC to NPC during trading. The subject of trade, how much money for the product, the type of currency.
    That is, when we click "Ctrl" or the "left mouse button" when trading.
    For example:
    Code:
    function tradeItem(C_ITEM item)
    {
    var int x; x=item.value
    var int y; y= Hlp_GetInsanceID(${type_of_currency});
    CreateInvItems(hero, y, item.value * TRADE_VALUE_MULTIPLIER);
    };
    I think it is clear why these manipulations.
    The player will be able to sell expensive weapons - to arms dealer. The player will be able to sell more expensive animal trophies - to the hunter.
    Last edited by redleha; 24.05.2013 at 10:16.

  12. View Forum Posts #232
    Dea
    Join Date
    Jul 2007
    Posts
    10,168
     
    Lehona is offline
    This is definitely possible, but I'll have to analyse the assembly first. I'll try to dig something up (Found the correct address already, just gotta figure out how I can access the item + the NPC at this position)

  13. View Forum Posts #233
    Dea
    Join Date
    Jul 2007
    Posts
    10,168
     
    Lehona is offline
    Alas, I've found a way to get what you need.
    Code:
    func void onTradeLeft() {
    	value = MEM_ReadInt(ESP+20); // itm.value * multiplier
    	MEM_WriteInt(ESP+20, 123); // set new value
    	var oCItem itm; itm = _^(EBX); //Get the item
    	var oCNpc npc; npc = _^(MEM_InformationMan.npc); // Get the NPC
    };
    
    const int oCViewDialogTrade__OnTransferLeftX = 6863312; //0x68B9D0
    HookEngineF(oCViewDialogTrade__OnTransferLeftX, 6, onTradeLeft);
    This should only trigger when the hero sells something, buying is a completely different (well, similar, but different) thing.
    The code should be self-explaining to you, if you have questions how to use it, go ahead an ask

    Edit: The value seems to be capped at about 16k (I assume around 214 but didn't check it as I thought that wouldn't matter much to you).
    Last edited by Lehona; 24.05.2013 at 16:11.

  14. View Forum Posts #234
    Abenteurer redleha's Avatar
    Join Date
    Dec 2010
    Location
    Новокуйбышевск, Россия
    Posts
    68
     
    redleha is offline
    Thank you so much! I'll try. It's better to learn new things.

    PS Today I have manipulated the script by building the function that I wanted at a time when there was no Ikarus, no LeGo. But it could not be implemented.
    Last edited by redleha; 27.05.2013 at 15:44.

  15. View Forum Posts #235
    Dea
    Join Date
    Jul 2007
    Posts
    10,168
     
    Lehona is offline
    So is your script working or is it not? I can't quite figure out what it's supposed to do, because that symbTable stuff looks a bit shady to me
    Edit: And it's gone. Guess you don't need help.

  16. View Forum Posts #236
    Moderator ukur's Avatar
    Join Date
    Jan 2009
    Location
    Ukraine
    Posts
    267
     
    ukur is offline
    Lehona
    With PermMem.d (Revision 61 from SVN) in my mod stop work buttons, do not respond to cursor. At previous revisions work normal.

  17. View Forum Posts #237
    Dea
    Join Date
    Jul 2007
    Posts
    10,168
     
    Lehona is offline
    Thanks for your bug report, I will investigate tomorrow

  18. View Forum Posts #238
    Abenteurer redleha's Avatar
    Join Date
    Dec 2010
    Location
    Новокуйбышевск, Россия
    Posts
    68
     
    redleha is offline
    This question yet. How can I get the symbolic name (a variable, a constant)?
    And also, how to get a symbolic name in a function when the variable or constant is passed as a parameter.
    Example:
    Code:
    const string AAA = "BBB"; //symbolic name = "AAA". right?
    ???func string GetSymbolicName_()
    
    func string examp_1(var string x)
    {
        ???
        return symbolic_name;  //must be "AAA"
    };
    exapm_1(AAA) = "AAA";
    I kind of already know the work of memory, pointers, but sometimes difficult.

  19. View Forum Posts #239
    Dea
    Join Date
    Jul 2007
    Posts
    10,168
     
    Lehona is offline
    zCPar_Symbol has the attribute zCPar_Symbol.name, that is what you want.

    The problem with your second question is that after a parameter has been pushed by the caller (ie in foo(var1) var1 will be pushed onto the stack), the callee (ie the function that is called) will pop that value from the stack into its own parameter-variables, e.g. foo(var int par1), so when the function is entered, par1 will have the value of var1. To circumvent this, you have to manipulate the bytecode in the Gothic.dat (which is entirely possible by scripts, not even too hard).

    Do you have any experience with Daedalus Bytecode (zCParser.d is kind of all you need)? Don't wanna write a whole novel if you know most of the basics already anyway.

  20. View Forum Posts #240
    Abenteurer redleha's Avatar
    Join Date
    Dec 2010
    Location
    Новокуйбышевск, Россия
    Posts
    68
     
    redleha is offline
    I know about zCPar_Symbol.name .

    To circumvent this, you have to manipulate the bytecode in the Gothic.dat (which is entirely possible by scripts, not even too hard).

    Do you have any experience with Daedalus Bytecode (zCParser.d is kind of all you need)? Don't wanna write a whole novel if you know most of the basics already anyway.
    But in these phrases I do not understand what you mean.

    In Gothic script I'm working well (5 years experience). Programming is also not alien to me. I recently started working with Ikarus and LeGo. A ASM-like scripting a bit complicated for me to start understanding. So I gradually master.

Page 12 of 21 « First ... 5891011121314151619 ... Last »

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Impressum | Link Us | intern
World of Gothic © by World of Gothic Team
Gothic, Gothic 2 & Gothic 3 are © by Piranha Bytes & Egmont Interactive & JoWooD Productions AG, all rights reserved worldwide