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 13 von 21 « Erste ... 269101112131415161720 ... Letzte »
Ergebnis 241 bis 260 von 410
  1. Beiträge anzeigen #241
    Lehrling Avatar von Isacz
    Registriert seit
    Nov 2010
    Beiträge
    33
     
    Isacz ist offline
    Kann es sein, dass das Wiki seit einiger Zeit nicht mehr erreichbar ist? Ich bekomme die letzten Tage immer die Meldung
    "Konnte nicht mit der Datenbank verbinden. Bitte versuche es später noch einmal."

    Ist eine neue Version von LeGo geplant? Und könnte man, der Übersicht zu liebe, die diversen Werke von Usern wie Umfis Pflanzenrespawn im Ep verlinken?

  2. Beiträge anzeigen #242
    Demigoddess
    Registriert seit
    Jul 2007
    Beiträge
    9.795
     
    Lehona ist offline
    Well then you know the answer to your first question

    To track back the symbolic name of a given parameter (ie you do not want the name of the parameter ("par1") but the variable it was filled with ("var1")), you have to change the compiled code, because once the "normal" code inside a function is executed, this information is gone. You could do it like this though:

    Code:
    func string _getVarName() {
    	MEM_PopInst();
    	MEM_PushInst(zPAR_TOK_PUSHINT);
    	var int ptr; ptr = MEM_PopInt() - zCParSymbol_content_offset;
    	var zCPar_Symbol symb; symb = _^(ptr);
    	return symb.name;
    };
    
    func string getVarName(var int par) {
    	MEM_Error("This function should have never been entered.");
    	return "";
    };
    
    func void initVarName() {
    	MEM_ReplaceFunc(getVarName, _getVarName);
    };
    @Isacz: Ja, wir versuchen gerade unsere Datenbank mit dem WoG zu hosten, dann sollte die Seite wieder vernünftig stabil sein.

    Edit: Verbessert.
    Geändert von Lehona (28.05.2013 um 20:29 Uhr)

  3. Homepage besuchen Beiträge anzeigen #243
    Exodus Avatar von Sektenspinner
    Registriert seit
    Jul 2004
    Ort
    Karlsruhe
    Beiträge
    7.827
     
    Sektenspinner ist offline
    @Lehona: If I am not mistaken, a Pointer to the value is pushed not a pointer to the symbol containing the value.
    Therefore your code is missing the subtraction of zCParSymbol_content_offset from ptr before following it.
    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

  4. Beiträge anzeigen #244
    Demigoddess
    Registriert seit
    Jul 2007
    Beiträge
    9.795
     
    Lehona ist offline
    Zitat Zitat von Sektenspinner Beitrag anzeigen
    @Lehona: If I am not mistaken, a Pointer to the value is pushed not a pointer to the symbol containing the value.
    Therefore your code is missing the subtraction of zCParSymbol_content_offset from ptr before following it.
    I'm sure you've had more experience dealing with that nasty stuff I was typing that from my mind to give an idea of what it's about.

  5. Beiträge anzeigen #245
    Abenteurer Avatar von redleha
    Registriert seit
    Dec 2010
    Ort
    Новокуйбышевск, Россия
    Beiträge
    68
     
    redleha ist offline
    That was the question. How to intercept keyboard input commands. I am aware of only two possibilities: either the "Marvin" console (F2), either in the player menu - invisible symbols (where input code "Marvin").
    The best way - through the console (F2). Let it swears that the input text is nonsense, but it will still run. The main thing - to get the string "[command] [parameters]"

    For a start - possible or not?
    P.S.
    In our mod "Dark Saga" we have own console (G2Ext) and own commands. I would like to have this or a similar mechanism, made in the gothic scripts.
    Geändert von redleha (29.05.2013 um 15:51 Uhr)

  6. Beiträge anzeigen #246
    Demigoddess
    Registriert seit
    Jul 2007
    Beiträge
    9.795
     
    Lehona ist offline
    Now that's an entirely different question. You can create your own console commands, although parsing them is a bitch (Sektenspinner wrote a some kind of lexer for it, it's still really inconvenient and there isn't much you can do about it). You can also create your own console, but if you only need it for testing purposes, it's a bit over the top. If you genuinely want the player to input text, go ask Bonne6, he implemented a way to give feedback for his mod ingame.

  7. Beiträge anzeigen #247
    Abenteurer Avatar von redleha
    Registriert seit
    Dec 2010
    Ort
    Новокуйбышевск, Россия
    Beiträge
    68
     
    redleha ist offline
    I hope I have not bored you with my questions.

    How to make a reinitialization of topics that appear at the beginning of the dialogue.
    In fact, you can break off and start a dialogue.
    If you create a condition for a line of dialogue to appear, for example, in one outer loop - this line will appear, but will not be displayed. (I tested this by pasting the code into ZS_Talk)
    Code:
    var int LeftShift;		LeftShift = MEM_KeyState(KEY_LEFTARROW);
    var int RightShift;	RightShift = MEM_KeyState(KEY_RIGHTARROW);
    	if((LeftShift == KEY_PRESSED) && !GLOBAL_DSG_KEY_DIALOG)
    	{
    		GLOBAL_DSG_KEY_DIALOG = TRUE; //this is condition. 
    		//At this moment the line is created, but not displayed.
    		//If I press Enter, the dialog will work.
    	};
    	if((RightShift == KEY_PRESSED) && GLOBAL_DSG_KEY_DIALOG)
    	{
    		GLOBAL_DSG_KEY_DIALOG = FALSE;
    		Print("RIGHTARROW");
    	};
    I've been thinking that I can just hit the right place. (CallByPtr?)
    Geändert von redleha (30.05.2013 um 15:44 Uhr)

  8. Beiträge anzeigen #248
    Demigoddess
    Registriert seit
    Jul 2007
    Beiträge
    9.795
     
    Lehona ist offline
    I'm not quite sure what you mean, maybe you should try explaining it in a different way.
    However, bear in mind that all AI_Output()s are called at the beginning of a dialogue. If you want to have a conditional output, the condition must be set when the player selects said dialogue.

  9. Homepage besuchen Beiträge anzeigen #249
    Exodus Avatar von Sektenspinner
    Registriert seit
    Jul 2004
    Ort
    Karlsruhe
    Beiträge
    7.827
     
    Sektenspinner ist offline
    I am also not sure what you mean.

    When starting the Dialogue Manager, the list of available C_INFOs is built according to the conditions of the C_INFOs.
    If the condition functions evaluate differently at the point when the Info is chosen by the player, unexpected behaviour may occur:
    If the player picks the i-th entry in the list of infos displayed to him, then its not necessarily the i-th info in that list that will be triggered, instead the list will be built anew (without displaying it) and the i-th info in that updated list will be triggered.

    Is that what you are talking about?
    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

  10. Beiträge anzeigen #250
    Abenteurer Avatar von redleha
    Registriert seit
    Dec 2010
    Ort
    Новокуйбышевск, Россия
    Beiträge
    68
     
    redleha ist offline
    Sektenspinner - Yes, that's what I mean.
    You are well understood my question. Also you have correctly described the problem.
    The condition for the topic Run outside (external program or cycle) -> list of objects С_INFO in dialog_manager reconstructed, but there was no visual rebuild. And if you now click on the topic "End", functionality is executed according to another topic, the rules of which have now done.

    I need to rebuild list C_INFOs.
    How I can do it without leaving the dialog manager (by the reaction of the button, as I've tried it)?

  11. Beiträge anzeigen #251
    Demigoddess
    Registriert seit
    Jul 2007
    Beiträge
    9.795
     
    Lehona ist offline
    Das LeGo-Wiki ist wieder zurück! Die Administration der WorldOfPlayers hat das Hosten des Wikis übernommen, in Zukunft sollten wir also alle von irgendwelchen Ausfällen verschont bleiben
    Besonderer Dank geht an Thoronador, der uns tatkräftig beim Umzug unterstützt hat

    Die neue URL ist http://lego.worldofplayers.de, allerdings wird die bisherige Adresse dorthin weiterleiten.

  12. Homepage besuchen Beiträge anzeigen #252
    Exodus Avatar von Sektenspinner
    Registriert seit
    Jul 2004
    Ort
    Karlsruhe
    Beiträge
    7.827
     
    Sektenspinner ist offline
    Zitat Zitat von redleha Beitrag anzeigen
    Sektenspinner - Yes, that's what I mean.
    You are well understood my question. Also you have correctly described the problem.
    The condition for the topic Run outside (external program or cycle) -> list of objects С_INFO in dialog_manager reconstructed, but there was no visual rebuild. And if you now click on the topic "End", functionality is executed according to another topic, the rules of which have now done.

    I need to rebuild list C_INFOs.
    How I can do it without leaving the dialog manager (by the reaction of the button, as I've tried it)?
    I don't know a way to do that (that does not mean that none exists).
    But wouldn't it be easier to make sure that your conditions evalute consistently (most of the time)?
    I can hardly think of situtions where it is unavoidable that conditions are violated that were met seconds before.
    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

  13. Beiträge anzeigen #253
    Abenteurer Avatar von redleha
    Registriert seit
    Dec 2010
    Ort
    Новокуйбышевск, Россия
    Beiträge
    68
     
    redleha ist offline
    It's okay. If not, then not.
    I just tried different ways. And looked in the direction of the class zCViewDialog(+Choice). Tried to hit on different memory addresses and parameters. I guess I just do not have the theoretical knowledge and practical knowledge that can be opened only with IDA.

  14. Beiträge anzeigen #254
    Demigoddess
    Registriert seit
    Jul 2007
    Beiträge
    9.795
     
    Lehona ist offline
    I assume that
    Code:
    .text:00661AA0                         protected: void __fastcall oCInformationManager::CollectInfos(void)
    or
    Code:
    .text:00660BB0                         public: void __fastcall oCInformationManager::Update(void)
    could prove useful (the former more than the latter). You'll have to experiment a bit, I'm not sure whether either of those will trigger an update of the choicebox.

    Edit: Do you have to experience to test those functions? If not I might give it a try when I've got free time on my hands... Which might not be in the near future.
    Geändert von Lehona (04.06.2013 um 20:53 Uhr)

  15. Beiträge anzeigen #255
    Abenteurer Avatar von redleha
    Registriert seit
    Dec 2010
    Ort
    Новокуйбышевск, Россия
    Beiträge
    68
     
    redleha ist offline
    I'll try to make fun of the script, but I do not think I will come of something sensible. If I can do it, unsubscribe here.

  16. Beiträge anzeigen #256
    Demigoddess
    Registriert seit
    Jul 2007
    Beiträge
    9.795
     
    Lehona ist offline
    Zitat Zitat von ukur Beitrag anzeigen
    Lehona
    With PermMem.d (Revision 61 from SVN) in my mod stop work buttons, do not respond to cursor. At previous revisions work normal.
    I couldn't reproduce this, just did a rough test with one button and the events (enter, leave, click), they all responded properly. If you can provide more informationen I might be able to find the problem. Can you make sure it's working with an older version of PermMem.d (can you access older revisions on the SVN? If not I can give you a link)?

  17. Beiträge anzeigen #257
    Moderator Avatar von ukur
    Registriert seit
    Jan 2009
    Ort
    Ukraine
    Beiträge
    233
     
    ukur ist offline
    Zitat Zitat von Lehona Beitrag anzeigen
    I couldn't reproduce this, just did a rough test with one button and the events (enter, leave, click), they all responded properly. If you can provide more informationen I might be able to find the problem. Can you make sure it's working with an older version of PermMem.d (can you access older revisions on the SVN? If not I can give you a link)?
    Yes, I can access to older revisions. When I replaced current 61 build PermMem.d and LeGo.d to 59 revision this files and recompile mod scripts, all working fine. If return PermMem.d and LeGo.d from 61 revision - buttons not respond.
    I tried to create a single button without additional scripts, tried to disconnect other possible additional mod scripts, as well as used in trigger script. Not yet working, some mysterious incompatibility

  18. Beiträge anzeigen #258
    Abenteurer Avatar von redleha
    Registriert seit
    Dec 2010
    Ort
    Новокуйбышевск, Россия
    Beiträge
    68
     
    redleha ist offline
    Zitat Zitat von Lehona Beitrag anzeigen
    I assume that
    Code:
    .text:00661AA0                         protected: void __fastcall oCInformationManager::CollectInfos(void)
    or
    Code:
    .text:00660BB0                         public: void __fastcall oCInformationManager::Update(void)
    could prove useful (the former more than the latter). You'll have to experiment a bit, I'm not sure whether either of those will trigger an update of the choicebox.

    Edit: Do you have to experience to test those functions? If not I might give it a try when I've got free time on my hands... Which might not be in the near future.
    BRAVO! You are a very very clever man!
    I solved my problem with your help. Post the code here:
    Code:
    func int ZS_Talk_Loop()
    {
    	MEM_InitGlobalInst();
    	const int null = 0;
    	const int oCInformationManager__CollectInfos = 6691488;//00661AA0: protected: void __fastcall oCInformationManager::CollectInfos(void)
    	
    	var int LeftArrow;	LeftArrow = MEM_KeyState(KEY_LEFTARROW);
    	var int RightArrow;	RightArrow = MEM_KeyState(KEY_RIGHTARROW);
    	
    	if((LeftArrow== KEY_PRESSED) && !GLOBAL_DSG_KEY_DIALOG)
    	{
    		GLOBAL_DSG_KEY_DIALOG = TRUE;
    		CALL__fastcall(MEM_InstToPtr(MEM_InformationMan),_@(null),6691488);
    	};
    	if((RightArrow== KEY_PRESSED) && GLOBAL_DSG_KEY_DIALOG)
    	{
    		GLOBAL_DSG_KEY_DIALOG = FALSE;
    		CALL__fastcall(MEM_InstToPtr(MEM_InformationMan),_@(null),6691488);
    	};
    [...]
    };
    But I just had to know what address to hit, and what type of function (this, std, fast).
    Geändert von redleha (05.06.2013 um 11:54 Uhr)

  19. Beiträge anzeigen #259
    Abenteurer Avatar von redleha
    Registriert seit
    Dec 2010
    Ort
    Новокуйбышевск, Россия
    Beiträge
    68
     
    redleha ist offline
    Today tried to make two functions, being based on it:
    Code:
    oCMobContainer:: Remove (oCItem *) 00725FF0 87 
    oCMobContainer:: Remove (oCItem *, int) 00726080 103
    I thought that the first function deletes 1 item, the second function - N (int) items.
    Has written this:

    Code:
    const int oCMOB_Container__RemoveItem = 7495664;	 //00725FF0
    const int oCMOB_Container__RemoveItems = 7495808;	//00726080
    func void Mob_RemoveItem (var int mobPtr, var C_ITEM instName)
    {
    	CALL_PtrParam (MEM_InstToPtr (instName));
    	CALL__thiscall (mobPtr, oCMOB_Container__RemoveItem);
    };
    func void Mob_RemoveItems (var int mobPtr, var C_ITEM instName, var int count)
    {
    	CALL_IntParam (count);
    	CALL_PtrParam (MEM_InstToPtr (instName));	
    	CALL__thiscall (mobPtr, oCMOB_Container__RemoveItems);
    };
    Called so:
    Code:
    func void player_hotkey_lame_heal ()
    {
    	var oCNpc her; her = Hlp_GetNpc (hero);
    	if (Hlp_Is_oCMobContainer (her.focus_vob))
    	{
    		Mob_RemoveItems(her.focus_vob,ItMi_Gold,1);
    		//or
    		//Mob_RemoveItem(her.focus_vob,ItMi_Gold);		
    	};
    };
    In a chest there are 100 coins and 150 arrows. In any of two cases all coins are deleted. Why?

  20. Homepage besuchen Beiträge anzeigen #260
    Exodus Avatar von Sektenspinner
    Registriert seit
    Jul 2004
    Ort
    Karlsruhe
    Beiträge
    7.827
     
    Sektenspinner ist offline
    I don't think it is that simple. oCMOB_Container::RemoveItem does not expect a pointer to any Gold coin but to the specific Gold coin in the cointainer you want to remove. I think you need to operate on oCMobContainer.containList.
    Also, calling RemoveItem does not destroy the item but expects you to use the item somewhere, for example as a vob in the world (in other words, your code leaks one item, therefore wasting memory).

    While all I am saying may illustrate how your code is problematic in general, it does not explain your symptoms. I have no idea why all of the coins would vanish.
    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

Seite 13 von 21 « Erste ... 269101112131415161720 ... 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