You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's two Win32 API calls to SetCurrentDirectory() (one sets the directory to data directory in the game's root folder and the other resets the directory back to the game root) likely done by the game itself when the car/ped group (or time cycle) .dat functions are called
This dance causes Modloader's path translator to use the wrong current directory when generating the file paths (which leads to broken paths outside of the game's normal path); this behavior is noticeable in an extra islands mod where the game crashes once you approach the new islands (that's because the custom ped*.dat/car*.dat/timec*.dat files are being loaded at that time and they couldn't be found)
Also the mod mentioned above puts the car*.dat/ped*.dat/timec*.dat files inside of the main game's data directory because of that bug (which isn't ideal because it pollutes the game's main files a bit)
I can think of two solutions for this:
Patching the game's relevant functions to remove the SetCurrentDirectory() dance and use a game root-relative path (this shouldn't be too bad because the mod only supports very specific GTA SA versions)
Adding a special path workaround for data current directories (this might be too hacky though)
The text was updated successfully, but these errors were encountered:
TheComputerGuy96
changed the title
[GTA SA] Custom group .dat files support is broken
[GTA SA] Certain .dat files support is broken
Dec 31, 2024
There's two Win32 API calls to
SetCurrentDirectory()
(one sets the directory to data directory in the game's root folder and the other resets the directory back to the game root) likely done by the game itself when the car/ped group (or time cycle) .dat functions are calledThis dance causes Modloader's path translator to use the wrong current directory when generating the file paths (which leads to broken paths outside of the game's normal path); this behavior is noticeable in an extra islands mod where the game crashes once you approach the new islands (that's because the custom ped*.dat/car*.dat/timec*.dat files are being loaded at that time and they couldn't be found)
Also the mod mentioned above puts the car*.dat/ped*.dat/timec*.dat files inside of the main game's
data
directory because of that bug (which isn't ideal because it pollutes the game's main files a bit)I can think of two solutions for this:
SetCurrentDirectory()
dance and use a game root-relative path (this shouldn't be too bad because the mod only supports very specific GTA SA versions)data
current directories (this might be too hacky though)The text was updated successfully, but these errors were encountered: