dexyfex / CodeWalker

https://www.gta5-mods.com/tools/codewalker-gtav-interactive-3d-map
471 stars 205 forks source link

FiveM generated cache files aren't supported #156

Open Ekinoxx0 opened 2 years ago

Ekinoxx0 commented 2 years ago

Hi,

This is a very low priority issue concerning CacheFile XML edition, as the use case for editing these files is quite rare (except for curiosity and research).

I was curious about editing cache files generated from FiveM and it seems like they are not currently supported. The code generating these cache files is here : https://github.com/citizenfx/fivem/blob/3750194d2d6bf04e5927d854eeb5fd8223b85262/code/components/gta-streaming-five/src/CacheLoader.cpp#L304

CodeWalker is failing to read XML out of them properly because TimeStamp.ToFileTimeUtc() is throwing ArgumentOutOfRangeException here : https://github.com/dexyfex/CodeWalker/blob/12750ff5957fd3ca94fae36b535abec774557305/CodeWalker.Core/GameFiles/FileTypes/CacheDatFile.cs#L410

I have included an example file to reproduce this error : fuckgta_cache_y.zip

This file cannot be read in XML format, but it works correctly on GTA5.

Thanks for your hard work 👍