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 26 of 27 « First ... 1519222324252627 Last »
Results 501 to 520 of 524
  1. View Forum Posts #501 Reply With Quote
    Sword Master
    Join Date
    Aug 2009
    Location
    Hessen
    Posts
    860
     
    Cryp18Struct is offline
    You can adjust the function AllowSaving():
    Code:
    /* Function to be filled by you!
     * Decides whether saving should be allowed right now or not.
     */
    
    
    func int AllowSaving() {
    	/* prevent saving if dialogue is active:*/
    	if(!infoManager_hasFinished()){
    		return false;
    	};
    	
    	/* Default: Saving is allowed */
    	return TRUE;
    };
    I dont see why this would be necessary, Gothic does not allow you to save the game during a dialogue right? The menu option is greyed out if you force the menu to appear.

  2. View Forum Posts #502 Reply With Quote
    Abenteurer
    Join Date
    Aug 2018
    Posts
    84
     
    N1kX is online now
    Quote Originally Posted by Cryp18Struct View Post
    You can adjust the function AllowSaving():
    Code:
    /* Function to be filled by you!
     * Decides whether saving should be allowed right now or not.
     */
    
    
    func int AllowSaving() {
        /* prevent saving if dialogue is active:*/
        if(!infoManager_hasFinished()){
            return false;
        };
        
        /* Default: Saving is allowed */
        return TRUE;
    };
    I dont see why this would be necessary, Gothic does not allow you to save the game during a dialogue right? The menu option is greyed out if you force the menu to appear.
    Thanks you, a kind person.
    So it turns out that many players in Gothic 1 or 2 include fast quicksaves and make them when the game (engine) cannot correctly save it. For example, preserving fast preservation during a dialogue, the camera breaks down, it is rarely possible to correct the preservation.
    Last edited by N1kX; 26.06.2019 at 15:58.

  3. View Forum Posts #503 Reply With Quote
    now also in your universe  Milky-Way's Avatar
    Join Date
    Jun 2007
    Posts
    13,387
     
    Milky-Way is offline
    not sure whether it's the reason, but your previously posted code had a return statement right before you call your EnforceSavingPolicy function. The function will therefore never be called.

  4. View Forum Posts #504 Reply With Quote
    Abenteurer
    Join Date
    Aug 2018
    Posts
    84
     
    N1kX is online now
    Quote Originally Posted by Milky-Way View Post
    not sure whether it's the reason, but your previously posted code had a return statement right before you call your EnforceSavingPolicy function. The function will therefore never be called.
    return does not play a special role here, I tried higher and lower. Thanks Cryp18Struct, I did not understand just a comment in the script, so I set foot. Now it works as it should, during the dialogue can no longer be saved or quicksaves.

  5. View Forum Posts #505 Reply With Quote
    Sword Master
    Join Date
    Aug 2009
    Location
    Hessen
    Posts
    860
     
    Cryp18Struct is offline
    Milky-Way meant this part:
    Code:
    if(other.aivar[AIV_INVINCIBLE] == TRUE)
    {
        return;
        EnforceSavingPolicy();
    };
    This is something that does not make sense in general.
    return; causes the Function to stop executing the following code, in this case EnforceSavingPolicy() will NEVER be called.
    This is sometimes called "dead code" and you could delete the line
    Code:
    EnforceSavingPolicy();
    without causing behaviour at runtime to change.

  6. View Forum Posts #506 Reply With Quote
    Abenteurer
    Join Date
    Aug 2018
    Posts
    84
     
    N1kX is online now
    I tried to make a choice of a new conclusion on the screen or an old one. In MENU_OPT_EXT added a new item MENUITEM_EXT_LOG
    Code:
    instance MENUITEM_EXT_LOG(C_MENU_ITEM_DEF)
    {
        backpic = MENU_ITEM_BACK_PIC;
        text[0] = "Вывод на экран";
        text[1] = "Новая система вывода на экран";
        posx = 700;
        posy = 1750;
        dimx = 4600;
        dimy = 750;
        onselaction[0] = SEL_ACTION_UNDEF;
        flags = flags | IT_EFFECTS_NEXT;
    };
    
    
    instance MENUITEM_EXT_LOG_CHOICE(C_MENU_ITEM_DEF)
    {
        backpic = MENU_CHOICE_BACK_PIC;
        type = MENU_ITEM_CHOICEBOX;
        text[0] = "выкл.|вкл.";
        fontname = MENU_FONT_SMALL;
        posx = 5400;
        posy = 1750 + MENU_CHOICE_YPLUS;
        dimx = MENU_SLIDER_DX;
        dimy = MENU_CHOICE_DY;
        onchgsetoption = "LOG_ENTRY";
        onchgsetoptionsection = "MOD_PREDO";
        flags = flags & ~IT_SELECTABLE;
        flags = flags | IT_TXT_CENTER;
    };
    everything seems to be in order. In gothic.ini new item appears. Next made a script file to read the value


    Spoiler:(zum lesen bitte Text markieren)
    Code:
    //функция, чтобы считывать значения из выбранного пункта из меню
    func int logentry_func()
    {
        //новая переменная
        var string newlogentry;
        //считываем эту переменную из меню
        newlogentry = mem_getgothopt("MOD_PREDO", "LOG_ENTRY");
        //дальше необходимо проверить выбранное значение и произнести необходимые настройки, 
        //если выбрано выкл, то будет старая система вывода, в другом случае новая
        if(hlp_strcmp(newlogentry, "0") && (!hlp_strcmp(newlogentry, "1")))
        {
            newlogentrys = FALSE;
            oldlogentrys = TRUE;
            return 1;
        }
        else if(hlp_strcmp(newlogentry, "1") && (!hlp_strcmp(newlogentry, "0")))
        {
            newlogentrys = TRUE;
            oldlogentrys = FALSE;
            return 1;
        };
        return 0;
    };


    Added new variables to Story_Globals.d
    In startup.d added call this function
    Code:
    func void startup_global()
    {
        Game_InitGerman();
        logentry_func();
    };
    
    
    func void init_global()
    {
        LeGo_Init(LeGo_All & ~LeGo_BloodSplats);
        Game_InitGerman();
        B_CheckNpcType();
        logentry_func();
    };
    Corrected to check with Xardas place where the first entry in the diary.
    Code:
    func void DIA_Xardas_TODO_Info()
    {
        AI_Output(other,self,"DIA_Xardas_TODO_15_00");    //Что мы можем сделать?
        AI_Output(self,other,"DIA_Xardas_TODO_14_01");    //На этот раз самим нам не справиться. Только сила Инноса может помочь нам в борьбе против этих драконов.
        AI_Output(self,other,"DIA_Xardas_TODO_14_02");    //В городе Хоринис, что неподалеку отсюда, остановился отряд паладинов.
        AI_Output(self,other,"DIA_Xardas_TODO_14_03");    //Они обладают сильным артефактом, который может помочь нам победить этих драконов.
        AI_Output(self,other,"DIA_Xardas_TODO_14_04");    //Они называют его 'Глаз Инноса'. Ты должен завладеть этим артефактом.
        AI_Output(self,other,"DIA_Xardas_TODO_14_05");    //Расскажи паладинам о надвигающейся угрозе. Ты ДОЛЖЕН убедить их предводителя поддержать нас!
        AI_Output(self,other,"DIA_Addon_Xardas_Add_14_07");    //А после этого ты должен найти артефакт Белиара.
        AI_Output(self,other,"DIA_Addon_Xardas_Add_14_08");    //Это противоположность Глаза Инноса. Он не должен попасть в руки Зла.
        if(newlogentrys == TRUE)
        {
            Log_CreateTopic(TOPIC_INNOSEYE,LOG_MISSION);
            b_logstatus_new(TOPIC_INNOSEYE,LOG_Running);
            B_LogEntry_new(TOPIC_INNOSEYE,"В городе Хоринис расположился отряд паладинов. Они обладают сильным артефактом: Глазом Инноса. Его сила должна помочь нам избавиться от драконов. Я должен убедить паладинов, что нам нужно объединить наши усилия.");
        };
        if(oldlogentrys == TRUE)
        {
            Log_CreateTopic(TOPIC_INNOSEYE,LOG_MISSION);
            Log_SetTopicStatus(TOPIC_INNOSEYE,LOG_Running);
            B_LogEntry(TOPIC_INNOSEYE,"В городе Хоринис расположился отряд паладинов. Они обладают сильным артефактом: Глазом Инноса. Его сила должна помочь нам избавиться от драконов. Я должен убедить паладинов, что нам нужно объединить наши усилия.");
        };
    };
    To my regret, there is a crash during the game launch process.
    Gothic.rpt
    I found out that the problem is somewhere in the function call, maybe something is missing in startup.d
    And as you can see, this switch is available at any time, and not for the whole game.
    I don't know yet where to go.
    Spoiler:(zum lesen bitte Text markieren)
    //=====================================================//======================UNHANDLED EXCEPTION======================
    //======================UNHANDLED EXCEPTION======================
    Gothic2.exe caused a EXCEPTION_ACCESS_VIOLATION in module Gothic2.exe at 0023:00791B68, zCParser:oStack()+520 byte(s), P:\dev\g2addon\release\ZenGin\_ulf\zParser.cpp, line 1369+12 byte(s)
    EAX=00005700 EBX=00000000 ECX=00AB4118 EDX=7ED60270 ESI=00AB4118
    EDI=7FA650DC EBP=00AB40C0 ESP=0135F64C EIP=00791B68 FLG=00210202
    CS=0023 DS=002B SS=002B ES=002B FS=0053 GS=002B
    //===================== INFOS =========================
    Gothic II - 2.6 (fix), Parser Version: 50
    User: N1kX, CPUType: 586, Mem: 0 MB total, 0 MB free
    //====================== CALLSTACK ========================
    0023:00791B68 (0x00000236 0x00AB4108 0x00000000 0x00AB40C0) Gothic2.exe, zCParser:oStack()+520 byte(s), P:\dev\g2addon\release\ZenGin\_ulf\zParser.cpp, line 1369+12 byte(s)
    0023:00792504 (0x00000236 0x00AB4108 0x00000000 0x00AB40C0) Gothic2.exe, zCParser:oStack()+2980 byte(s), P:\dev\g2addon\release\ZenGin\_ulf\zParser.cpp, line 1415
    0023:00792504 (0x00000374 0x00AB4108 0x00000000 0x00AB40C0) Gothic2.exe, zCParser:oStack()+2980 byte(s), P:\dev\g2addon\release\ZenGin\_ulf\zParser.cpp, line 1415
    0023:00792504 (0x000006CF 0x00AB4108 0x00000000 0x00AB40C0) Gothic2.exe, zCParser:oStack()+2980 byte(s), P:\dev\g2addon\release\ZenGin\_ulf\zParser.cpp, line 1415
    0023:00792504 (0x000008EE 0x00AB4108 0x00000000 0x00AB40C0) Gothic2.exe, zCParser:oStack()+2980 byte(s), P:\dev\g2addon\release\ZenGin\_ulf\zParser.cpp, line 1415
    0023:00792504 (0x00000969 0x00AB4108 0x00000000 0x00AB40C0) Gothic2.exe, zCParser:oStack()+2980 byte(s), P:\dev\g2addon\release\ZenGin\_ulf\zParser.cpp, line 1415
    0023:00792504 (0x00006334 0x7F770ECC 0x00AB4118 0x00AB40C0) Gothic2.exe, zCParser:oStack()+2980 byte(s), P:\dev\g2addon\release\ZenGin\_ulf\zParser.cpp, line 1415
    0023:00792504 (0x0002F95B 0x0000DF0D 0x0082E6F0 0x0EBF59C0) Gothic2.exe, zCParser:oStack()+2980 byte(s), P:\dev\g2addon\release\ZenGin\_ulf\zParser.cpp, line 1415
    0023:00792CBF (0x00AB40C0 0x0000DF0D 0x0135FA9C 0x0135FAA0) Gothic2.exe, zCParser::CallFunc()+719 byte(s), P:\dev\g2addon\release\ZenGin\_ulf\zParser.cpp, line 1551
    0023:006C1DDB (0x0135FBD4 0x0EBF59C0 0x0135FBD0 0x0135FB00) Gothic2.exe, oCGame::CallScriptStartup()+363 byte(s), P:\dev\g2addon\release\Gothic\_ulf\oGame.cpp, line 860
    0023:006C9FD9 (0x0135FA9C 0x0135FB6C 0xFFFFFFFE 0x0135FB6C) Gothic2.exe, oCGame::LoadWorldStartup()+969 byte(s), P:\dev\g2addon\release\Gothic\_ulf\oGame.cpp, line 3149
    0023:006C92DE (0xFFFFFFFE 0x0135FB00 0x00890895 0x0135FCA0) Gothic2.exe, oCGame::LoadWorld()+558 byte(s), P:\dev\g2addon\release\Gothic\_ulf\oGame.cpp, line 2902
    0023:006C6696 (0xFFFFFFFE 0x0135FBD0 0x0082E6F0 0x00000000) Gothic2.exe, oCGame::LoadGame()+246 byte(s), P:\dev\g2addon\release\Gothic\_ulf\oGame.cpp, line 2147
    0023:00429BF9 (0x00000000 0x00400000 0x00293D5F 0x0135FEC4) Gothic2.exe, CGameManager::Menu()+2345 byte(s), P:\dev\g2addon\release\Gothic\_bert\oGameManager.cpp, line 1474
    0023:00425C35 (0x0082F0EC 0x00000006 0x01E61DA8 0x0EBF59C0) Gothic2.exe, CGameManager::Run()+1029 byte(s), P:\dev\g2addon\release\Gothic\_bert\oGameManager.cpp, line 713
    0023:0078188B (0x0000002C 0x0A7566B1 0x00000554 0x00000000) Gothic2.exe, MainProg()+75 byte(s), P:\dev\g2addon\release\Gothic\_ulf\Phoenix.cpp, line 111
    0023:00503270 (0x00400000 0x00000000 0x00293D5F 0x00000001) Gothic2.exe, HandledWinMain()+928 byte(s), P:\dev\g2addon\release\ZenGin\_carsten\zWin32.cpp, line 1169
    0023:00502DFD (0x0135FEC8 0x00000000 0x00293D5F 0x00000001) Gothic2.exe, WinMain()+141 byte(s), P:\dev\g2addon\release\ZenGin\_carsten\zWin32.cpp, line 1054+17 byte(s)
    0023:007D43F8 (0x00000004 0x0000FFFF 0x000000B8 0x00000000) Gothic2.exe, WinMainCRTStartup()+224 byte(s)
    //=====================================================


    //===================== MODULES =======================


    Module list: names, addresses, sizes, time stamps and file times:
    E:\Games\Gothic 2\System\Gothic2.exe, loaded at 0x00400000 - 9038140 bytes - 3f966d87 - file date is 12/17/2011 00:00:36
    E:\Games\Gothic 2\System\BugslayerUtil.dll, loaded at 0x03000000 - 32827 bytes - 37f8d416 - file date is 1/22/2003 03:30:00
    C:\WINDOWS\SYSTEM32\D3DIM700.dll, loaded at 0x059e0000 - 887808 bytes - 54503b1d - file date is 11/21/2014 00:36:34
    E:\Games\Gothic 2\System\SHW32.DLL, loaded at 0x0a930000 - 124656 bytes - 39983012 - file date is 1/22/2003 03:30:00
    C:\Program Files (x86)\NVIDIA Corporation\CoProcManager\detoured.dll, loaded at 0x0f000000 - 13088 bytes - 45b12bea - file date is 8/21/2013 12:47:46
    E:\Games\Gothic 2\System\mss32.dll, loaded at 0x21100000 - 370688 bytes - 3e767330 - file date is 3/17/2003 19:15:30
    E:\Games\Gothic 2\System\binkw32.dll, loaded at 0x30000000 - 375808 bytes - 3e9e0f4d - file date is 4/16/2003 22:19:58
    C:\WINDOWS\system32\nvd3dum.dll, loaded at 0x5e020000 - 12946848 bytes - 52144288 - file date is 8/21/2013 12:47:46
    C:\WINDOWS\system32\igdumdim32.dll, loaded at 0x5ec80000 - 11387392 bytes - 52379dd7 - file date is 10/1/2013 12:02:32
    E:\Games\Gothic 2\System\vdfs32g.dll, loaded at 0x601a0000 - 586752 bytes - 58850410 - file date is 1/23/2017 03:12:28
    C:\WINDOWS\SYSTEM32\nvumdshim.dll, loaded at 0x606c0000 - 1222824 bytes - 521441f0 - file date is 8/21/2013 12:47:46
    E:\Games\Gothic 2\System\msdbi.dll, loaded at 0x63420000 - 102672 bytes - 37715ac8 - file date is 1/22/2003 03:30:00
    C:\WINDOWS\SYSTEM32\HID.DLL, loaded at 0x6e500000 - 26624 bytes - 54503d63 - file date is 11/21/2014 00:36:28
    C:\WINDOWS\SYSTEM32\AVRT.dll, loaded at 0x6e550000 - 31496 bytes - 54503d85 - file date is 11/21/2014 00:38:00
    C:\WINDOWS\System32\DSOUND.dll, loaded at 0x6e600000 - 517120 bytes - 54504746 - file date is 11/21/2014 00:36:44
    C:\WINDOWS\System32\MSACM32.dll, loaded at 0x6e690000 - 89816 bytes - 54503d51 - file date is 11/21/2014 00:36:44
    C:\WINDOWS\SYSTEM32\igdusc32.dll, loaded at 0x6f430000 - 3523072 bytes - 52379bbd - file date is 10/1/2013 12:02:32
    C:\WINDOWS\SYSTEM32\wdmaud.drv, loaded at 0x6f930000 - 197120 bytes - 54503a7d - file date is 11/21/2014 00:36:44
    C:\WINDOWS\SYSTEM32\DDRAW.dll, loaded at 0x6ff50000 - 544256 bytes - 54503a5b - file date is 11/21/2014 00:36:34
    C:\WINDOWS\System32\dmstyle.dll, loaded at 0x704b0000 - 122368 bytes - 54504815 - file date is 11/21/2014 00:36:38
    C:\WINDOWS\System32\dmsynth.dll, loaded at 0x704e0000 - 109568 bytes - 545047fc - file date is 11/21/2014 00:36:38
    C:\WINDOWS\SYSTEM32\midimap.dll, loaded at 0x70b90000 - 18944 bytes - 545049be - file date is 11/21/2014 00:36:44
    C:\WINDOWS\SYSTEM32\msacm32.drv, loaded at 0x70bf0000 - 23040 bytes - 545048d7 - file date is 11/21/2014 00:36:44
    C:\WINDOWS\System32\dmband.dll, loaded at 0x70c80000 - 34304 bytes - 54504823 - file date is 11/21/2014 00:36:38
    C:\WINDOWS\System32\dmcompos.dll, loaded at 0x70c90000 - 75776 bytes - 54504815 - file date is 11/21/2014 00:36:38
    C:\WINDOWS\System32\dmime.dll, loaded at 0x70cc0000 - 207360 bytes - 545047b6 - file date is 11/21/2014 00:36:38
    C:\WINDOWS\System32\ksuser.dll, loaded at 0x70dc0000 - 19096 bytes - 54503c49 - file date is 11/21/2014 00:36:44
    E:\Games\Gothic 2\System\imagehl2.dll, loaded at 0x71460000 - 85264 bytes - 35da03d4 - file date is 1/22/2003 03:30:00
    C:\WINDOWS\System32\dmusic.dll, loaded at 0x71840000 - 111104 bytes - 54504753 - file date is 11/21/2014 00:36:38
    C:\WINDOWS\System32\dmloader.dll, loaded at 0x71860000 - 41472 bytes - 5450482c - file date is 11/21/2014 00:36:38
    C:\WINDOWS\SYSTEM32\DCIMAN32.dll, loaded at 0x718b0000 - 11776 bytes - 54504a1f - file date is 11/21/2014 00:36:38
    C:\WINDOWS\SYSTEM32\DINPUT.dll, loaded at 0x718c0000 - 136192 bytes - 545048f9 - file date is 11/21/2014 00:38:02
    C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9600.19291_none_a9f5e0cb013211a1\COMCTL32.dll, loaded at 0x71b00000 - 2106368 bytes - 5c5c7ad5 - file date is 2/7/2019 23:37:20
    C:\WINDOWS\SYSTEM32\WSOCK32.dll, loaded at 0x72a40000 - 16384 bytes - 54504a16 - file date is 11/21/2014 00:37:38
    C:\WINDOWS\system32\apphelp.dll, loaded at 0x72b20000 - 642560 bytes - 54504a2b - file date is 11/21/2014 00:37:32
    C:\WINDOWS\SYSTEM32\powrprof.dll, loaded at 0x741c0000 - 255136 bytes - 54503d36 - file date is 11/21/2014 00:37:30
    C:\WINDOWS\SYSTEM32\AUDIOSES.DLL, loaded at 0x74200000 - 370424 bytes - 54503a96 - file date is 11/21/2014 00:36:46
    C:\WINDOWS\SYSTEM32\MMDevAPI.DLL, loaded at 0x74260000 - 331048 bytes - 54503afb - file date is 11/21/2014 00:36:44
    C:\WINDOWS\SYSTEM32\dwmapi.dll, loaded at 0x742c0000 - 102728 bytes - 54503bae - file date is 11/21/2014 00:36:38
    C:\WINDOWS\system32\uxtheme.dll, loaded at 0x742e0000 - 949760 bytes - 59dce019 - file date is 10/10/2017 19:58:40
    C:\Program Files (x86)\NVIDIA Corporation\CoProcManager\nvdxgiwrap.dll, loaded at 0x743d0000 - 226296 bytes - 52144292 - file date is 8/21/2013 12:47:46
    C:\Program Files (x86)\NVIDIA Corporation\CoProcManager\nvd3d9wrap.dll, loaded at 0x74410000 - 322592 bytes - 52144294 - file date is 8/21/2013 12:47:46
    C:\WINDOWS\SYSTEM32\WINMMBASE.dll, loaded at 0x74470000 - 134280 bytes - 54503b8a - file date is 11/21/2014 00:36:44
    C:\WINDOWS\SYSTEM32\WINMM.dll, loaded at 0x744a0000 - 136840 bytes - 54503b0a - file date is 11/21/2014 00:36:44
    C:\WINDOWS\SYSTEM32\DEVOBJ.dll, loaded at 0x74ac0000 - 127552 bytes - 54503cd9 - file date is 11/21/2014 00:37:46
    C:\WINDOWS\SYSTEM32\kernel.appcore.dll, loaded at 0x74b40000 - 29920 bytes - 54503d1a - file date is 11/21/2014 00:37:32
    C:\WINDOWS\SYSTEM32\nvinit.dll, loaded at 0x74d30000 - 141336 bytes - 52144206 - file date is 8/21/2013 12:47:46
    C:\WINDOWS\SYSTEM32\VERSION.dll, loaded at 0x75040000 - 26304 bytes - 54504a11 - file date is 11/21/2014 00:37:42
    C:\WINDOWS\SYSTEM32\bcryptPrimitives.dll, loaded at 0x75050000 - 341384 bytes - 5a4b0740 - file date is 1/2/2018 11:03:26
    C:\WINDOWS\SYSTEM32\CRYPTBASE.dll, loaded at 0x750b0000 - 30984 bytes - 54504a6b - file date is 11/21/2014 00:37:36
    C:\WINDOWS\SYSTEM32\WINTRUST.dll, loaded at 0x75120000 - 245320 bytes - 57f4004f - file date is 10/5/2016 09:15:14
    C:\WINDOWS\SYSTEM32\CRYPT32.dll, loaded at 0x75160000 - 1612504 bytes - 58de61ec - file date is 4/1/2017 02:59:40
    C:\WINDOWS\SYSTEM32\PSAPI.DLL, loaded at 0x75310000 - 16504 bytes - 54503d92 - file date is 11/21/2014 00:37:32
    C:\WINDOWS\SYSTEM32\RPCRT4.dll, loaded at 0x75320000 - 747520 bytes - 5c5b1ef3 - file date is 2/6/2019 22:52:58
    C:\WINDOWS\SYSTEM32\combase.dll, loaded at 0x753e0000 - 1563376 bytes - 5c0b3de9 - file date is 12/8/2018 10:32:24
    C:\WINDOWS\system32\IMM32.DLL, loaded at 0x75560000 - 141312 bytes - 54504a14 - file date is 11/21/2014 00:36:38
    C:\WINDOWS\SYSTEM32\GDI32.dll, loaded at 0x75590000 - 1085440 bytes - 5be70664 - file date is 11/10/2018 21:25:14
    C:\WINDOWS\SYSTEM32\cfgmgr32.dll, loaded at 0x756a0000 - 241168 bytes - 54503d7a - file date is 11/21/2014 00:37:46
    C:\WINDOWS\SYSTEM32\WS2_32.dll, loaded at 0x756e0000 - 320720 bytes - 5736488a - file date is 5/15/2016 01:01:28
    C:\WINDOWS\SYSTEM32\SHLWAPI.dll, loaded at 0x757c0000 - 278352 bytes - 5450381c - file date is 11/21/2014 00:37:42
    C:\WINDOWS\SYSTEM32\clbcatq.dll, loaded at 0x75820000 - 569128 bytes - 54503883 - file date is 11/21/2014 00:37:34
    C:\WINDOWS\SYSTEM32\ole32.dll, loaded at 0x758b0000 - 1214920 bytes - 5bc0f900 - file date is 10/16/2018 08:02:50
    C:\WINDOWS\SYSTEM32\OLEAUT32.dll, loaded at 0x76e20000 - 614040 bytes - 5c5df4b6 - file date is 2/9/2019 04:07:24
    C:\WINDOWS\SYSTEM32\USER32.dll, loaded at 0x76ec0000 - 1376768 bytes - 58235bee - file date is 11/9/2016 22:25:06
    C:\WINDOWS\SYSTEM32\ADVAPI32.dll, loaded at 0x77020000 - 507176 bytes - 5a4b1132 - file date is 1/2/2018 10:48:50
    C:\WINDOWS\SYSTEM32\SETUPAPI.dll, loaded at 0x770a0000 - 1782912 bytes - 5450383a - file date is 11/21/2014 00:37:32
    C:\WINDOWS\SYSTEM32\SspiCli.dll, loaded at 0x77260000 - 104960 bytes - 57b8dfd7 - file date is 8/21/2016 03:55:20
    C:\WINDOWS\SYSTEM32\sechost.dll, loaded at 0x77290000 - 257216 bytes - 550b921b - file date is 3/24/2015 02:45:06
    C:\WINDOWS\SYSTEM32\MSCTF.dll, loaded at 0x77380000 - 1124384 bytes - 59b40b3e - file date is 9/14/2017 06:14:24
    C:\WINDOWS\SYSTEM32\KERNELBASE.dll, loaded at 0x774a0000 - 862720 bytes - 5c5e0041 - file date is 2/9/2019 03:18:46
    C:\WINDOWS\SYSTEM32\NSI.dll, loaded at 0x77580000 - 20120 bytes - 54504af3 - file date is 11/21/2014 00:36:26
    C:\WINDOWS\SYSTEM32\MSASN1.dll, loaded at 0x775f0000 - 51608 bytes - 54503d97 - file date is 11/21/2014 00:37:46
    C:\WINDOWS\SYSTEM32\KERNEL32.DLL, loaded at 0x77600000 - 1040384 bytes - 5c5b2705 - file date is 2/6/2019 23:27:20
    C:\WINDOWS\SYSTEM32\msvcrt.dll, loaded at 0x77740000 - 800008 bytes - 54504b2e - file date is 11/21/2014 00:37:58
    C:\WINDOWS\SYSTEM32\ntdll.dll, loaded at 0x778e0000 - 1502000 bytes - 5a4b127e - file date is 1/2/2018 10:58:08
    //=====================================================

  7. View Forum Posts #507 Reply With Quote
    Sword Master
    Join Date
    Aug 2009
    Location
    Hessen
    Posts
    860
     
    Cryp18Struct is offline
    mem_getgothopt is an ikarus function. You need to initialize Ikarus before using it(call MEM_InitAll).

  8. View Forum Posts #508 Reply With Quote
    Abenteurer
    Join Date
    Aug 2018
    Posts
    84
     
    N1kX is online now
    Quote Originally Posted by Cryp18Struct View Post
    mem_getgothopt is an ikarus function. You need to initialize Ikarus before using it(call MEM_InitAll).
    Thank you very much. Added function call mem_initall and it all worked
    Code:
    func void startup_global()
    {
    	Game_InitGerman();
    	mem_initall();
    	logentry_func();
    };
    Before that, I understood for a long time why the written function fails, then it does.

  9. View Forum Posts #509 Reply With Quote
    Abenteurer
    Join Date
    Aug 2018
    Posts
    84
     
    N1kX is online now
    I noticed that if you compile scripts using Gothic Sourcer, there will be an error
    Error: The array index goes out of bounds:MEMINT_GetBuf_8K_Sub[0]
    Code:
    func int MEMINT_GetBuf_8K_Sub() {    var int buf[2048];
        return buf;
    };
    Compilation through Spacer goes without errors, but I feel that there are pitfalls in this.
    Sorry for the double message.

  10. View Forum Posts #510 Reply With Quote
    Sword Master
    Join Date
    Aug 2009
    Location
    Hessen
    Posts
    860
     
    Cryp18Struct is offline
    Gothic Sourcer tries to force you to write daedalus code in a certain way, which means it has problems compiling ikarus because ikarus depends on some weird stuff that the gothic compiler allows you to do.
    (see this post https://forum.worldofplayers.de/foru...1#post20381484
    and Sektenspinner response for examples/explanation).

    Simply compile using the original game(starting the game with compile scripts), that way it works.

  11. View Forum Posts #511 Reply With Quote
    Abenteurer
    Join Date
    Aug 2018
    Posts
    84
     
    N1kX is online now
    I compile and so through the game, it's just easier to catch errors in simple scripts through the GS, sometimes zSpy shows such heresy, but thanks anyway.

  12. View Forum Posts #512 Reply With Quote
    Dea
    Join Date
    Jul 2007
    Posts
    10,202
     
    Lehona is offline
    In this particular case the code is mostly right: The given code reserves 8K memory and returns a pointer to it. The GothicSourcerer doesn't like that, because you can't actually use an array of this size in the conventional way, e.g.

    Code:
    var int arr[2048];
    print(IntToString(arr[1234]));
    will not do what you expect (instead of accessing arr[1234] it will iirc access arr[210], because indices are truncated to 1 byte, i.e. 0-255). So while the code in Ikarus is correct, it's impossible to use it correctly (without relying on some trickery).

  13. View Forum Posts #513 Reply With Quote
    Abenteurer blood4ng3l's Avatar
    Join Date
    Sep 2009
    Location
    Berlin
    Posts
    50
     
    blood4ng3l is offline

    IntToString Bug Feature or User error?

    Heyho,

    I had a little "fun" with basic String concatenation and the Lego String Builder until I realized, that once more than one IntToString(value) / SBi(value) are part of one assignment / SB_ToString().

    Only the last value of the different values of multiple IntToString(value) / SBi(value) commands gets inserted into the String at the multiple positions of the IntToString(value) / SBi(value) calls.

    [Bild: G1vhzFL.png]

    Is this a known Bug or as intended?

    If I assign each String part with one IntTostring each a separate string variable and then concat them obviously it works flawlessly with the expected values.

    Greetz

    blood4ng3l

  14. View Forum Posts #514 Reply With Quote
    Dea
    Join Date
    Jul 2007
    Posts
    10,202
     
    Lehona is offline
    The picture is confusing me more than it helps I think, but as I understand it, that's a basic limitation of Daedalus. You will have to "dereference" (save into a variable) the result of i2s, otherwise they will override each other. I don't think this can be fixed (reasonably).

    It could also be a bug with csx, but in that case I think you would get very different output (and I'm pretty sure I tested those functions ).

  15. View Forum Posts #515 Reply With Quote
    Abenteurer blood4ng3l's Avatar
    Join Date
    Sep 2009
    Location
    Berlin
    Posts
    50
     
    blood4ng3l is offline
    To make it a bit more clear what I discovered as a bug

    The following code will produce a zSpy print of: " 1: 2 2: 2 "

    Code:
    MEM_Info(cs4("1: ",i2s(1)," 2: ",i2s(2) ) );

    Otherwise as i previously posted the multiple use of Stringbuilder's SBi seem to work as expected, some other stuff made it appear otherwise

    Cause I need such information rather often, i wrote this:

    Code:
    const int preserve_current_StringBuilder = 0;
    
    func void B4DI_Info2(var string param1_description, var int param1_value, var string param2_description, var int param2_value) {
    	if(SB_Get()) {
    		preserve_current_StringBuilder = SB_Get();
    	};
    	var int sbuilder; sbuilder=SB_New();
    	SB_Use(sbuilder);
    	SB(param1_description); 
    	SBi(param1_value); 
    	SB(param2_description); 
    	SBi(param2_value);
    	var string s; s = SB_ToString();
    	MEM_Info(s);
    	SB_Destroy();
    	if(preserve_current_StringBuilder) {
    		SB_Use(preserve_current_StringBuilder);
    		preserve_current_StringBuilder = 0;
    	};
    };

    Maybe this should be rather on the Lego Thread?

    EDIT: so dumb .... sb as a variable name was not that smart, that interfered with SB() function ^^
    EDIT2: Prototype function replaced with working function.
    EDIT3: actual workaround function of the bug

    Greetz
    Last edited by blood4ng3l; 09.09.2019 at 01:45.

  16. View Forum Posts #516 Reply With Quote
    Abenteurer blood4ng3l's Avatar
    Join Date
    Sep 2009
    Location
    Berlin
    Posts
    50
     
    blood4ng3l is offline

    STR_ToIntf, powf, MEM_GothOptSlider Functions

    Heyho everyone,

    Just wanted to share some script developments, which I needed to get along with the Menu sliders, but could not find.

    Feel free to integrate into Ikarus if they are suitable enough, powf is rather basic and not tested heavily so make suggestions if you see potential errors.

    Spoiler:(zum lesen bitte Text markieren)

    Code:
    //for now only integer exponents
    func int powf(var int basef, var int exponent ) {
    	if( lef(basef,FLOATNULL) && gef(basef,FLOATNULL)  && exponent == 0) {
    		MEM_Warn("pow: basef can not be ZERO when exponent is also ZERO");
    		return FLOATNULL;
    	};
    	if(exponent == 0) {return FLOATEINS;};
    	var int result; result = basef;
    	var int power; power = 1;
    	while(power < abs(exponent));
    		result = mulf(result,basef);
    		power += 1;
    	end;
    	if(exponent < 0) {
    		result = divf( FLOATEINS, result );
    	};
    
    	return result;
    
    };
    
    func int pow(var int base, var int exponent) {
    	return roundf(powf(mkf(base), exponent));
    };
    
    func int STR_ToIntf( var string intFString ) {
    	var int resultf;
    	var int preDecimalf;
    	if( STR_Len(intFString) > 1 && STR_IndexOf(intFString, decimalPoint) >= 1 ) {
    		
    		preDecimalf = mkf( STR_ToInt( STR_Split( intFString, decimalPoint, 0 ) ) );
    		var string decimalS; decimalS = STR_Split(intFString, decimalPoint, 1);
    		var int decimalLenght; decimalLenght = STR_Len(decimalS);
    		var int decimalf; decimalf = fracf( STR_ToInt(decimalS), pow( 10, decimalLenght ) );
    
    		resultf = addf(preDecimalf, decimalf);		
    	} else {
    		preDecimalf = mkf( STR_ToInt( STR_Split( intFString, decimalPoint, 0 ) ) );
    		resultf = preDecimalf;
    	};
    
    	return resultf;
    
    };
    
    func int MEM_GetGothOptSliderf(var string sectionname, var string optionname, var int actualValueRange ) {
    	var int optionValuef; optionValuef = STR_ToIntf( MEM_GetGothOpt(sectionname, optionname) );
    	var int resultf; resultf = mulf( mkf(actualValueRange), optionValuef);
    	
    	return resultf;
    };
    
    func int MEM_GetGothOptSlider(var string sectionname, var string optionname, var int actualValueRange ) {
    		return roundf( MEM_GetGothOptSliderf( sectionname, optionname, actualValueRange) );
    };


    Have a great one =)

    greetz blood4ng3l
    Last edited by blood4ng3l; 14.10.2019 at 13:15.

  17. View Forum Posts #517 Reply With Quote
    Ranger
    Join Date
    Feb 2013
    Posts
    162
     
    pawbuj is offline
    Hi everyone!

    Is there any chance to check&print string name(L or R) while using a picklock?

    F.e. after every proper lockpick move we have displayed on the screen L or R.. Now we have only info ("Good move").

  18. View Forum Posts #518 Reply With Quote
    Local Hero Mark56's Avatar
    Join Date
    Sep 2010
    Posts
    244
     
    Mark56 is offline
    Simplest solution would be to check the Key pressed

  19. View Forum Posts #519 Reply With Quote
    Ranger
    Join Date
    Feb 2017
    Posts
    147
     
    F a w k e s is offline

    G1 Picklock action

    Quote Originally Posted by pawbuj View Post
    Hi everyone!

    Is there any chance to check&print string name(L or R) while using a picklock?

    F.e. after every proper lockpick move we have displayed on the screen L or R.. Now we have only info ("Good move").
    Hi pawbuj,
    Seems like you can hook this function to get current character - L or R.
    (tested with G1 only)
    Code:
    //00682990  .text     Debug data           ?PickLock@oCMobLockable@@MAEHPAVoCNpc@@D@Z
    const int oCMobLockable__PickLock_G1 = 6826384;
    
    //0x00724800 protected: virtual int __thiscall oCMobLockable::PickLock(class oCNpc *,char)
    const int oCMobLockable__PickLock_G2 = 7489536;
    
    FUNC VOID _HOOK_MOBCONTAINER_PICKLOCK ()
    {
        var int c;
        c = MEM_ReadInt (ESP + 8);
        
        if (c == 76) {
            //L
        } else
        if (c == 82) {
            //R
        };
    };
    Hook it with:
    Code:
    if (MEMINT_SwitchG1G2 (1, 0))
    {
        HookEngine (oCMobLockable__PickLock_G1, 13, "_HOOK_MOBCONTAINER_PICKLOCK");
    } else
    {
        HookEngine (oCMobLockable__PickLock_G2, 6, "_HOOK_MOBCONTAINER_PICKLOCK");
    };
    Played around with this and you can add new feature helping you to 'remember' what was successful combination
    [Video]
    Last edited by F a w k e s; 25.11.2019 at 23:15.

  20. View Forum Posts #520 Reply With Quote
    Ranger
    Join Date
    Feb 2013
    Posts
    162
     
    pawbuj is offline

    Thumbs up

    Many thanx - This is what I was looking for!

Page 26 of 27 « First ... 1519222324252627 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