fivem icon indicating copy to clipboard operation
fivem copied to clipboard

Bug/Request: Loading non-binary (xml) .ymt files within the RedM client's app data

Open BadassBaboon opened this issue 3 years ago • 10 comments

In regards to this thread - loading any xml formatted .ymt file causes a crash during the execution of the INIT_SESSION function, in this example I've used a custom FOV mod but from more testings this issue happens with every .ymt file, such as audio.ymt, systemsettings.ymt, vfxlightninginfo.ymt just to name a few.

ymt (xml) file used for this test Dump Game log Citizen FX log

BadassBaboon avatar Nov 15 '22 21:11 BadassBaboon

You cant just export ymt from openiv and use it. All unk_members should be replaced by hash names or hash collisions. Also other hashes should be replaced too

Ktos93 avatar Nov 15 '22 22:11 Ktos93

You cant just export ymt from openiv and use it. All unk_members should be replaced by hash names or hash collisions. Also other hashes should be replaced too

I've tried using CodeX too, it exports with the hashes and no UNK, yet it also doesn't work and crashes the exact way.

Here is an example of cameras.ymt exported from update_4.rpf

OpenIV export CodeX export

I understand some sort of hacky way is needed to load .ymt files the way LML does but I can't seem to find a solution, unless if something is wrong with the files I attached in this message.

BadassBaboon avatar Nov 15 '22 23:11 BadassBaboon

In codex exported xml all case sensitive collisions which are values need to be replaced, parameters collisions names are fine <Name>iDHXDCA_0xE448733E</Name> <Name>lowercase_colisson_here</Name>

Ktos93 avatar Nov 16 '22 00:11 Ktos93

How would I go on about figuring what the actual value for those are?

BadassBaboon avatar Nov 16 '22 00:11 BadassBaboon

Well, since the actual values can't be found or unhashed at the moment, loading CodeX .xml files would be really nice to have in RedM.

BadassBaboon avatar Nov 17 '22 19:11 BadassBaboon

You don't need the actual values and it's not as simple as just supporting CodeX XML output, it doesn't work like that. You just need collisions. If the hash matches, there's effectively no difference.

t3chman avatar Nov 17 '22 22:11 t3chman

RedM already support non-binary .ymt files, in fact this feature was here for years. @Ktos93's conclusions sounds kinda questionable, as RAGE parser structs are case sensitive and you don't need to lowercase anything.

Disquse avatar Nov 17 '22 22:11 Disquse

Tested a lot of times tag values need to be lowercase. Tag names can be case sensitive but not value. Easy check create aby ymap with one object try set object name as lowercase collisions and case sensitive collisions. Only lowercase will spawn object. Same is for every string value. Why? because there is no diference when you put name like p_door32x or P_DOOR_32X both will spawn

Ktos93 avatar Nov 18 '22 09:11 Ktos93

Interesting, yeah this makes sense now. I guess this must be fixed in CodeX then.

Disquse avatar Nov 18 '22 11:11 Disquse

Hello, I have recently come across this working on my own stuff, a couple of things:

1.) Thank you very much to @Ktos93 for the info here + comments in discord, very useful

2.) This bug can be closed. Codex handles this issue by allowing you to default to lowercase collisions. (The global setting affects all files exported)

Image

The reason you have to use lowercase is because RDR2 is going to lowercase the text before passing to joaat. This breaks your collision. (it now hashes to something other than your target)

joelsemar avatar Sep 29 '25 02:09 joelsemar