szapp / GothicFreeAim

Free aiming for the video game series Gothic
https://gfa.szapp.de
MIT License
36 stars 4 forks source link

Ship copy of SMK textures in 16 bit #214

Open szapp opened 3 weeks ago

szapp commented 3 weeks ago

The FreeAiming patch causes a freeze or crash in conjunction with the modification Gothic 1 Revised Edition version 1.6 and 1.9 on Linux in a manual installation using only Ninja, Union, and FreeAiming.

The freezing occurs latest when shooting the arrow, but sometimes also on aiming. Access Violations are scarce but this one may help:

======================================= UNHANDLED EXCEPTION OCCURED ======================================================
======================================= CRASH INFOS: =====================================================================
GOTHIC 1.08k_mod, Parser Version: 50
User:  ******,  CPUType: 586,  Mem: 0 MB total, 0 MB free
Camera: Pos(20409.7012/1527.31396/-16921.2363), At(0.821020186/0.0927366316/-0.563316762)
Startup Options:-game:revised_de.ini
=============================================== CALLSTACK : ==============================================================
0023:0051939D (0x040D0288 0x05D73100 0x22620D88 0x00000000) GothicMod.exe, zCPolygon::TransformProjectLight()+29 byte(s), D:\dev\gothic\current_work\ZenGin\_Dieter\zBSP.cpp, line 1167
0023:0059C33E (0x0137F82C 0x00000000 0x05B69508 0x0137F82C) GothicMod.exe, zCPolyStrip::Render()+1006 byte(s), D:\dev\gothic\current_work\ZenGin\_Dieter\zPolyStrip.cpp, line 306+7 byte(s)
0023:00591067 (0x0137F82C 0x0000005F 0x00000000 0x05B69508) GothicMod.exe, zCParticleFX::Render()+5047 byte(s), D:\dev\gothic\current_work\ZenGin\_Dieter\zParticle.cpp, line 1402+13 byte(s)
0023:005D6458 (0x00000000 0x00000003 0x043EDDA0 0x05E8FA10) GothicMod.exe, zCVob::Render()+968 byte(s), D:\dev\gothic\current_work\ZenGin\_Dieter\zVob.cpp, line 1484+10 byte(s)
0023:0051B2DC (0x043ABA90 0x043EDC08 0x00000000 0x05C88F78) GothicMod.exe, zCBspTree::RenderVobList()+2812 byte(s), D:\dev\gothic\current_work\ZenGin\_Dieter\zBSP.cpp, line 1742
0023:0051E132 (0x043ABA90 0x007DCAC4 0x0137FAC8 0x00000000) GothicMod.exe, zCBspTree::Render()+2290 byte(s), D:\dev\gothic\current_work\ZenGin\_Dieter\zBSP.cpp, line 2794
0023:005F3F9A (0x05C88F78 0x67768605 0x043ABA90 0x007DCAC4) GothicMod.exe, zCWorld::Render()+218 byte(s), D:\dev\gothic\current_work\ZenGin\_Dieter\zWorld.cpp, line 740
0023:0FB759E2 (0x0000FFFF 0x00000000 0x007D06E8 0x45455200) ZUNIONUTILS.DLL

VDFs present:

Gothic/data/anims.VDF
Gothic/data/fonts.VDF
Gothic/data/FreeAiming.vdf
Gothic/data/meshes.VDF
Gothic/data/sound.VDF
Gothic/data/sound_patch2.VDF
Gothic/data/speech.VDF
Gothic/data/speech_patch2.VDF
Gothic/data/textures.VDF
Gothic/data/textures_apostroph_patch_neu.VDF
Gothic/data/textures_bikini.vdf
Gothic/data/textures_choicebox_32pixel_modialpha.VDF
Gothic/data/textures_patch.VDF
Gothic/data/textures_Startscreen_ohne_Logo.VDF
Gothic/data/Union.vdf
Gothic/data/Union_Raw_Input.vdf
Gothic/data/worlds.VDF
cgloeckner commented 3 weeks ago

Seems like RE v1.9 overrides the free aiming mod with its own one (despite being disabled or not in the menu). Hence no testing is possible using v1.9.

szapp commented 3 weeks ago

It works when omitting Texture Pack By Artemiano Gothic I.vdf. My guess is, it offers a new version of the textures SMK_16BIT_A*.TGA that are not 16 bit, which causes an issue when used in a 16 bit context.

A long-term solution is too ship a copy of that texture with unique name to avoid conflict.

A short-term solution that proved to work is to overwrite these textures with their original Gothic 1 textures. This can be achieved with the attached VDF with a newer timestamp than the Artemiano-VDF:

texture_smk_16bit_fix.zip

szapp commented 3 weeks ago

Re-opening to implement the aforementioned long-term solution.