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

 

Seite 12 von 21 « Erste ... 5891011121314151619 ... Letzte »
Ergebnis 221 bis 240 von 410
  1. Beiträge anzeigen #221
    Kämpfer Avatar von mobpapst
    Registriert seit
    Jun 2005
    Beiträge
    364
     
    mobpapst ist offline
    Alles klar und vielen Dank!

  2. Beiträge anzeigen #222
    Kämpfer Avatar von mobpapst
    Registriert seit
    Jun 2005
    Beiträge
    364
     
    mobpapst ist 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. Beiträge anzeigen #223
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.446
     
    Lehona ist 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. Beiträge anzeigen #224
    Kämpfer Avatar von mobpapst
    Registriert seit
    Jun 2005
    Beiträge
    364
     
    mobpapst ist offline
    Hat geklappt, danke. Aber es lang an etwas anderem.
    Geändert von mobpapst (19.05.2013 um 12:52 Uhr)

  5. Beiträge anzeigen #225
    Abenteurer Avatar von redleha
    Registriert seit
    Dec 2010
    Ort
    Новокуйбышевск, Россия
    Beiträge
    68
     
    redleha ist 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. Beiträge anzeigen #226
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.446
     
    Lehona ist 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. Homepage besuchen Beiträge anzeigen #227
    Exodus Avatar von Sektenspinner
    Registriert seit
    Jul 2004
    Ort
    Karlsruhe
    Beiträge
    7.827
     
    Sektenspinner ist offline
    Zitat Zitat von redleha Beitrag anzeigen
    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. Beiträge anzeigen #228
    Abenteurer Avatar von redleha
    Registriert seit
    Dec 2010
    Ort
    Новокуйбышевск, Россия
    Beiträge
    68
     
    redleha ist 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. Beiträge anzeigen #229
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.446
     
    Lehona ist offline
    Zitat Zitat von redleha Beitrag anzeigen
    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. Beiträge anzeigen #230
    Abenteurer Avatar von redleha
    Registriert seit
    Dec 2010
    Ort
    Новокуйбышевск, Россия
    Beiträge
    68
     
    redleha ist offline
    Thank you, Lehona! I expected this answer to my question. But hope springs eternal.

  11. Beiträge anzeigen #231
    Abenteurer Avatar von redleha
    Registriert seit
    Dec 2010
    Ort
    Новокуйбышевск, Россия
    Beiträge
    68
     
    redleha ist 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.
    Geändert von redleha (24.05.2013 um 10:16 Uhr)

  12. Beiträge anzeigen #232
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.446
     
    Lehona ist 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. Beiträge anzeigen #233
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.446
     
    Lehona ist 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).
    Geändert von Lehona (24.05.2013 um 16:11 Uhr)

  14. Beiträge anzeigen #234
    Abenteurer Avatar von redleha
    Registriert seit
    Dec 2010
    Ort
    Новокуйбышевск, Россия
    Beiträge
    68
     
    redleha ist 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.
    Geändert von redleha (27.05.2013 um 15:44 Uhr)

  15. Beiträge anzeigen #235
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.446
     
    Lehona ist 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. Beiträge anzeigen #236
    Moderator Avatar von ukur
    Registriert seit
    Jan 2009
    Ort
    Ukraine
    Beiträge
    281
     
    ukur ist 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. Beiträge anzeigen #237
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.446
     
    Lehona ist offline
    Thanks for your bug report, I will investigate tomorrow

  18. Beiträge anzeigen #238
    Abenteurer Avatar von redleha
    Registriert seit
    Dec 2010
    Ort
    Новокуйбышевск, Россия
    Beiträge
    68
     
    redleha ist 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. Beiträge anzeigen #239
    Dea
    Registriert seit
    Jul 2007
    Beiträge
    10.446
     
    Lehona ist 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. Beiträge anzeigen #240
    Abenteurer Avatar von redleha
    Registriert seit
    Dec 2010
    Ort
    Новокуйбышевск, Россия
    Beiträge
    68
     
    redleha ist 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.

Seite 12 von 21 « Erste ... 5891011121314151619 ... Letzte »

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
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