Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Diamond Casino Heist
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

      1. Frontier Pursuits
      2. Find Lobbies & Outlaws
      3. Help & Support
    3. Crews

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA 6

      1. St Andrews Cathedral
    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    3. Gangs

    1. Announcements

    2. Support

    3. Suggestions

Neodymium

[WIP|V] MetaTool (ymt, ymap, ytyp)

Recommended Posts

_MK_

Any news regarding an In-game tool ?

Share this post


Link to post
Share on other sites
Dilapidated

@Neodymium

Could you possibly add support for REL files as well? Currently these files cannot be read and is holding the community back in the audio department.

 

Here you go if you want to take a look: Grand Theft Auto V\x64\audio\audio_rel.rpf\config\

Hopefully adding support is possible.

 

Thanks for all the work you've done! Looking forward to an update on this :)

  • Like 1

Share this post


Link to post
Share on other sites
tadd

Ymap children name their parent in the CMapData section but can anyone tell me how to find a ymaps child without having to scan all ymaps first to index the parents? Is there a parent child index somewhere? The manifest.ymfs don't seem to mention it, only texture and ymap to ytyp relations and stuff.

 

Is there no way to find a child ymap from its parent?

 

And yes @aboves request would be awesome neo, we need .rel files and .dat stuff would be great 😄

Edited by tadd
  • Like 1

Share this post


Link to post
Share on other sites
tadd

Sorry for the double post...

 

Turns out gta5_cache .dat files (and other .dat files) may hold the key 😛

 

Binary searching them for ymap hashes shows some name ordering in there that looks like it could be a heiracy of some kind 😄

Edited by tadd

Share this post


Link to post
Share on other sites
Neodymium

I have added a beta version that supports converting pso files to xml for many but not all pso files. Converting back is not possible but for some files it works to simply replace the ymt file by the xml output without converting it back. I was really not motivated to improve the tool in the last weeks so I simply release what I did so far. I dont know how useful it is but at least you can see whats inside the pso files if you are interested :)

 

 

Any news regarding an In-game tool ?

I have not planned anything like this.

 

 

@Neodymium

Could you possibly add support for REL files as well? Currently these files cannot be read and is holding the community back in the audio department.

 

Here you go if you want to take a look: Grand Theft Auto V\x64\audio\audio_rel.rpf\config\

Hopefully adding support is possible.

 

Thanks for all the work you've done! Looking forward to an update on this :)

I never look at rel files yet. And at the moment I don't plan to develop another tool.

  • Like 3

Share this post


Link to post
Share on other sites
Jax765

Using the latest version with a decrypted version of popgroups. There's a few hashed lines, which I'm 99.9% certain are referring to mp versions of groups, because they have the exact same vehicles as the previous entry (e.g. veh_rich_mp). However, when putting those hashes into the openiv hash generator, they don't match up.

 

hash_collision_12641112631

 

That should be veh_rich_mp, which is used in popcycle and shows up nowhere else in popgroups, but when I enter it into openiv's hash generator, I get this:

 

3705405835

Share this post


Link to post
Share on other sites
Neodymium

 

Using the latest version with a decrypted version of popgroups. There's a few hashed lines, which I'm 99.9% certain are referring to mp versions of groups, because they have the exact same vehicles as the previous entry (e.g. veh_rich_mp). However, when putting those hashes into the openiv hash generator, they don't match up.

 

hash_collision_12641112631

 

That should be veh_rich_mp, which is used in popcycle and shows up nowhere else in popgroups, but when I enter it into openiv's hash generator, I get this:

 

3705405835

 

You're right that the hashes match. You must compare Hash("hash_collision_12641112631") with Hash("veh_rich_mp").

  • Like 1

Share this post


Link to post
Share on other sites
Jax765

I'm confused. So what would I put into the hash generator to get hash_collision_12641112631?

Share this post


Link to post
Share on other sites
Neodymium

I'm confused. So what would I put into the hash generator to get hash_collision_12641112631?

You never want to do this. The "hash_collision_xxx" are replacements for the strings that are unknown. They have the same jenkins hash as the real string, but are not the real string (this is called a hash collision, for the game they are both the same). I use them because this is the only way to generate a valid xml file without knowing all the strings. So if you think you found the real string you can put the "hash_collision_xxx" in your hash generator and do the same for your string. If they both lead to the same hash you found the correct string and you can replace the hash_collision_xxx by your string in the xml file. You can do this because you checked that both have the same hash, and therefore it makes no difference for the game.

  • Like 1

Share this post


Link to post
Share on other sites
Jax765

 

I'm confused. So what would I put into the hash generator to get hash_collision_12641112631?

You never want to do this. The "hash_collision_xxx" are replacements for the strings that are unknown. They have the same jenkins hash as the real string, but are not the real string (this is called a hash collision, for the game they are both the same). I use them because this is the only way to generate a valid xml file without knowing all the strings. So if you think you found the real string you can put the "hash_collision_xxx" in your hash generator and do the same for your string. If they both lead to the same hash you found the correct string and you can replace the hash_collision_xxx by your string in the xml file. You can do this because you checked that both have the same hash, and therefore it makes no difference for the game.

 

Ohhh, that's how it works. Thanks for the explanation.

Edited by Jax765

Share this post


Link to post
Share on other sites
Jax765

Pedpersonality.ymt crashes the game when decrypted, even with no changes made to it.

Share this post


Link to post
Share on other sites
_CP_

Because it has to be saved as PSO again, but current build of MetaTool doesn't support it.

Share this post


Link to post
Share on other sites
NTAuthority

The tool source code on GitHub seems to not be updated with the latest changes from the public binary release (such as the hash collision generator).

 

I'm hoping I didn't miss this GTA focus window of yours so one wouldn't have to reimplement this code. :/

  • Like 3

Share this post


Link to post
Share on other sites
NTAuthority

Also, whoever mentioned gta5_cache above - this is not relevant, the game scans all .#map files on startup, the cache merely contains whatever it would find during this scan to speed up startup.

Share this post


Link to post
Share on other sites
tadd

Twas me who mentioned the cache 😄 we had a funny feeling the game might scan them but wasn't sure. Thanks for the confirmation though.

 

Just seemed weird that the maps had parent data (in CMapData and the parentIndex) but not child data... I guess it caches the info though on start up as you said.

Edited by tadd

Share this post


Link to post
Share on other sites
EncryptedReality

New discovery:

 

<hash_D3C717FC> which i think stands for "Collision Bounds" in YTYP, maybe it's not how Rockstar calls it exactly but it does assign a collision bone name used in YDR for cols.

Edited by GTARandom
  • Like 1

Share this post


Link to post
Share on other sites
EncryptedReality

My discoveries:

<hash_FC1FB6FB> is drawableDictionary

<hash_6C8F1715> is lodLevel in YMAP

<hash_31AF439F> is imapName in _manifest, same story for that

<hash_D3C717FC> unknown what this one is called but it is used for the ydr bone name and is vital to change in order for embedded prop collisions to work. Found in YTYP

 

<hash_6C8F1715>enum_hash_7D934F41</hash_6C8F1715> in YMAP is used for reflections on objects


Some people were saying that they couldn't get car parking to work, well here is a sample of a WORKING placement:

<Item>      <position x="7520.0" y="-7351.31" z="3.63" />      <hash_2BD275D1 value="-5.999998" />      <hash_3A6112D6 value="-0.001723765" />      <hash_076F0293 value="2.999999" /> <carModel>banshee</carModel>      <flags value="1633" />      <hash_55378BF6 value="-1" />      <hash_4ACB771E value="-1" />      <hash_701D41C1 value="-1" />      <hash_66782E77 value="-1" />      <hash_36523B47 />      <livery value="-1" />    </Item>

Make sure you use this flag 1633!

 

CP and dexyfex discoveries:

assetType in ytyp for LOD0 is enum_hash_07C0CB71
for LOD1 is enum_hash_5E2F6A14
enum_hash_81046901 which was found later is also generating reflections
hash_CA974BCD is childLodDist
hash_A687AC89 is numChildren
hash_9CA32637 is scaleXY
hash_10FB7C42 is scaleZ
Edited by GTARandom
  • Like 3

Share this post


Link to post
Share on other sites
warmsweater

how might i use the work done here to try and decrypt the path node (.ynd) files?

Share this post


Link to post
Share on other sites
Neodymium

The tool source code on GitHub seems to not be updated with the latest changes from the public binary release (such as the hash collision generator).

 

I'm hoping I didn't miss this GTA focus window of yours so one wouldn't have to reimplement this code. :/

Sorry for the late answer. There is more code I have never pushed to github (including data structures of most resources of GTA4) because it's a mess and needs refactoring, but I will probably clean it up a bit sooner or later and release it.

 

how might i use the work done here to try and decrypt the path node (.ynd) files?

The meta toolkit cannot decode ynd files. But the gta-toolkit library from github can read/write ynd files, but the fields are all unknown. The file structure does not look very difficult, so if you have some c# knowledge and have an idea what the files contain it should not be so hard to write a tool to export/import them.

Share this post


Link to post
Share on other sites
GTA BELGIUM

Hey guys, i have a problem. I'm wasting my time right now, i'm having so much trouble to fix it. Been working on it for the last 5 days, non-stop. I need someones help.

I have been working for a long time to convert soccer stadiums into GTA games. I had lots of fun with it back in the days with GTA IV, and i released Mestalla (Valencia) Soccer stadium mod. Soccer stadiums are my passion.

Now, i have been trying to place my first stadium into GTA V: Stade Velodrome in Marseille, by adding it as a dlc, just like for examlpe @GTARandom did with his awesome Vice City convert.
PROBLEM: collisions are loading (.ybn) but models are not spawning? If i try to spawn them with menyoo, they only appear if i'm really far away. If i try to spawn with simple native trainer i get this: "Couldn't load collision, returning".

So i did all i have to do i think: Made my own .ytyp and .ymap, linked them in _manifest.ymf. I even made an edit in gta5.meta (common.rpf) to add 'permanent ityp', but I'm not sure if this is necessary??

In my dlc.rpf, there is a folder x64 and two XML files: content.xml and setup2.xml. I put my custom dlc line inside the dlclist.xml in update.rpf.

I include images of all my files in the spoiler tag, so you guys can check if i made any mistakes.

In the screenshots included are:

 

- om_velodrome.ytyp (velodrome_metadata.rpf)

- om_velodrome01.ymap (velodrome_metadata.rpf)

- _manifest.ymf (velodrome_metadata.rpf)

- gta5.meta (common.rpf)

- setup2.xml (dlc.rpf)

- content.xml (dlc.rpf)

- screenshot on my openiv file structure- screenshot inside velodrome.rpf archive

 

 

YTYP
D2Hxr09.jpg

 

 

 

YMAP
Ok03tq9.jpg

MANIFEST.YMF
W19qZJK.jpg
GTA5.META
1UCAy3m.jpg


SETUP2.XML
QW4fDn0.jpg
bZRAuYY.jpg

 

CONTENT.XML

XZdCvmS.jpg

OPENIV
Ae25AJu.jpg

VELODROME.RPF
4F705wt.jpg



I must be missing something? Has it something to do with my flags inside the ytyp/ymap? I really tried a lot of different flags...


Also, here are some pics on the stadium so you can see what i'm talking about:


si2wLUI.jpg



uuvR9Rj.jpg




MchmXqA.jpg




F3gABAY.jpg




NTytdwC.jpg

 

 

Can someone please help? You will get credit for the help :)

Edited by GTA BELGIUM

Share this post


Link to post
Share on other sites
IgorX

Seems like you have outdated files with hashes and it may cause issues to draw the models if you edit them by OpenIV. Also it has some troubles with custom files generated by third-part software

Try to make ymap/ytyp template from original file with openiv's hashes.

  • Like 1

Share this post


Link to post
Share on other sites
nkjellman

 

The tool source code on GitHub seems to not be updated with the latest changes from the public binary release (such as the hash collision generator).

 

I'm hoping I didn't miss this GTA focus window of yours so one wouldn't have to reimplement this code. :/

Sorry for the late answer. There is more code I have never pushed to github (including data structures of most resources of GTA4) because it's a mess and needs refactoring, but I will probably clean it up a bit sooner or later and release it.

 

how might i use the work done here to try and decrypt the path node (.ynd) files?

The meta toolkit cannot decode ynd files. But the gta-toolkit library from github can read/write ynd files, but the fields are all unknown. The file structure does not look very difficult, so if you have some c# knowledge and have an idea what the files contain it should not be so hard to write a tool to export/import them.

 

Out of curiosity, using this tool, do you know how I can change how a ymap is enabled?

 

I would like to be able to determine what makes a ymap not load by default. For example, North Yankton does not load by default. I would like to know how to change whether or not a ymap requires a script to call the native to load IPL's.

Share this post


Link to post
Share on other sites
EncryptedReality

 

 

The tool source code on GitHub seems to not be updated with the latest changes from the public binary release (such as the hash collision generator).

 

I'm hoping I didn't miss this GTA focus window of yours so one wouldn't have to reimplement this code. :/

Sorry for the late answer. There is more code I have never pushed to github (including data structures of most resources of GTA4) because it's a mess and needs refactoring, but I will probably clean it up a bit sooner or later and release it.

 

how might i use the work done here to try and decrypt the path node (.ynd) files?

The meta toolkit cannot decode ynd files. But the gta-toolkit library from github can read/write ynd files, but the fields are all unknown. The file structure does not look very difficult, so if you have some c# knowledge and have an idea what the files contain it should not be so hard to write a tool to export/import them.

 

Out of curiosity, using this tool, do you know how I can change how a ymap is enabled?

 

I would like to be able to determine what makes a ymap not load by default. For example, North Yankton does not load by default. I would like to know how to change whether or not a ymap requires a script to call the native to load IPL's.

 

 

I believe that is done by file type:

<fileType>RPF_FILE_PRE_INSTALL</fileType>

Once your map has that type it should load along with North Yankton... note that if by any chance it is not this, i am nearly 100% certain it is done in script.

Share this post


Link to post
Share on other sites
nkjellman

 

 

 

The tool source code on GitHub seems to not be updated with the latest changes from the public binary release (such as the hash collision generator).

 

I'm hoping I didn't miss this GTA focus window of yours so one wouldn't have to reimplement this code. :/

Sorry for the late answer. There is more code I have never pushed to github (including data structures of most resources of GTA4) because it's a mess and needs refactoring, but I will probably clean it up a bit sooner or later and release it.

 

how might i use the work done here to try and decrypt the path node (.ynd) files?

The meta toolkit cannot decode ynd files. But the gta-toolkit library from github can read/write ynd files, but the fields are all unknown. The file structure does not look very difficult, so if you have some c# knowledge and have an idea what the files contain it should not be so hard to write a tool to export/import them.

 

Out of curiosity, using this tool, do you know how I can change how a ymap is enabled?

 

I would like to be able to determine what makes a ymap not load by default. For example, North Yankton does not load by default. I would like to know how to change whether or not a ymap requires a script to call the native to load IPL's.

 

 

I believe that is done by file type:

<fileType>RPF_FILE_PRE_INSTALL</fileType>

Once your map has that type it should load along with North Yankton... note that if by any chance it is not this, i am nearly 100% certain it is done in script.

 

Hmm. Load along with North Yankton? Do you mean load like North Yankton?

 

Ether way thank you. I will look into this.

 

Edit: I don't think that is it. I looked in the Heists dlc.rpf and the aircraft carrier/yacht files are not loaded in this manner, yet they are not enabled by default.

Edited by nkjellman

Share this post


Link to post
Share on other sites
EncryptedReality

 

 

 

 

The tool source code on GitHub seems to not be updated with the latest changes from the public binary release (such as the hash collision generator).

 

I'm hoping I didn't miss this GTA focus window of yours so one wouldn't have to reimplement this code. :/

Sorry for the late answer. There is more code I have never pushed to github (including data structures of most resources of GTA4) because it's a mess and needs refactoring, but I will probably clean it up a bit sooner or later and release it.

 

how might i use the work done here to try and decrypt the path node (.ynd) files?

The meta toolkit cannot decode ynd files. But the gta-toolkit library from github can read/write ynd files, but the fields are all unknown. The file structure does not look very difficult, so if you have some c# knowledge and have an idea what the files contain it should not be so hard to write a tool to export/import them.

 

Out of curiosity, using this tool, do you know how I can change how a ymap is enabled?

 

I would like to be able to determine what makes a ymap not load by default. For example, North Yankton does not load by default. I would like to know how to change whether or not a ymap requires a script to call the native to load IPL's.

 

 

I believe that is done by file type:

<fileType>RPF_FILE_PRE_INSTALL</fileType>

Once your map has that type it should load along with North Yankton... note that if by any chance it is not this, i am nearly 100% certain it is done in script.

 

Hmm. Load along with North Yankton? Do you mean load like North Yankton?

 

Ether way thank you. I will look into this.

 

Edit: I don't think that is it. I looked in the Heists dlc.rpf and the aircraft carrier/yacht files are not loaded in this manner, yet they are not enabled by default.

 

 

Script then

Share this post


Link to post
Share on other sites
nkjellman

 

 

 

 

 

The tool source code on GitHub seems to not be updated with the latest changes from the public binary release (such as the hash collision generator).

 

I'm hoping I didn't miss this GTA focus window of yours so one wouldn't have to reimplement this code. :/

Sorry for the late answer. There is more code I have never pushed to github (including data structures of most resources of GTA4) because it's a mess and needs refactoring, but I will probably clean it up a bit sooner or later and release it.

 

how might i use the work done here to try and decrypt the path node (.ynd) files?

The meta toolkit cannot decode ynd files. But the gta-toolkit library from github can read/write ynd files, but the fields are all unknown. The file structure does not look very difficult, so if you have some c# knowledge and have an idea what the files contain it should not be so hard to write a tool to export/import them.

 

Out of curiosity, using this tool, do you know how I can change how a ymap is enabled?

 

I would like to be able to determine what makes a ymap not load by default. For example, North Yankton does not load by default. I would like to know how to change whether or not a ymap requires a script to call the native to load IPL's.

 

 

I believe that is done by file type:

<fileType>RPF_FILE_PRE_INSTALL</fileType>

Once your map has that type it should load along with North Yankton... note that if by any chance it is not this, i am nearly 100% certain it is done in script.

 

Hmm. Load along with North Yankton? Do you mean load like North Yankton?

 

Ether way thank you. I will look into this.

 

Edit: I don't think that is it. I looked in the Heists dlc.rpf and the aircraft carrier/yacht files are not loaded in this manner, yet they are not enabled by default.

 

 

Script then

 

Nope. I just found it for the most part. I got hyrule now to not be loaded on startup, and it needs to be loaded via script.

 

At the top of the ymap file there is a value called <flags value>. I believe that the values go something like this, biased on file names.

*0: This seems to be for maps that are constantly loaded on load.

*1: This seems to be for maps that are not loaded on startup. They need to be requested via script.

*2: This seems to be for lods that load on startup.

*3: This seems to be for map lods that are not loaded on startup. They need to be requested via script.

 

Just below that, there is another value called <contentFlags value>. I am not entirely clear on what these do, but I'll report some consistent attributes that I have noticed. Some tend to be independent of the flags value.

*73: This seems to be for interiors.

*18: This seems to be for lods.

*2: This seems to be for lods on maps that aren't loaded on startup.

*577, 513: These seem to be on ymaps labled critical.

*65, 1: I have seen this flag on maps that aren't loaded on startup.

 

 

NOTE: When I speak of maps that are loaded on startup, I am talking about ones that can be loaded/unloaded with the IPL native. I haven't seen any consistency regarding interiors that need to be enabled by using the cords. However, I think these flags need more testing. I think they control exactly how and when the map loads, whether it be controled by scripts, or even by where the player is. They should also help us optimize our maps. I think the contentFlags value is more for optimization purposes, and the flags value is for determining if a ymap is loaded on startup, via script, and if it is a lod. But regarding the one that illudes me more, contentFlags probably does control things like draw distance, and can be different for objects shared across the map. I noticed that the values are different on roads. If you fly around in the Spooner camera in Menyoo, the regular/lod model loading/unloading is still baised on the players position, so you can see how far things are loading. I have noticed that the roads seem to go much farther than the regular models. I also noticed that interiors do not load very far away. You could have the exterior map loaded in full detail a block away, but the interior ymaps are not loaded.

 

Edit: Okay so I got the Hyrule map to start unloaded, but the collisions are still there. I don't want them present when the map is unloaded. If someone could explain to me how collisions are loaded and placed, it would be helpful.

 

Edit: Fixed the collision issue. Had to reference them in the mainifest.ymf in the Map Data field.

Edited by nkjellman

Share this post


Link to post
Share on other sites
2019Redifiv/2020Modifiv

I am primarily a lurker here, but I discovered something which might be helpful.

 

In short, after I convert an ymt pso into an ymt and proceed to edit it, I simply chose to extract the original untampered .ymt pso/rsc onto my desktop.

Then I rename the edited .ymt pso to just .ymt. Finally I just chose to "save as" the edited file to the desktop, overwriting the original .ymt pso in the process.

 

I have tested with a couple .ymt psos and the changes were successful and did not crash the game.

 

Maybe it's nothing and you all already knew how to do this, or maybe someone will benefit from this information.

 

Who knows :)

Share this post


Link to post
Share on other sites
Claude_Lib

You mean that you discovered that the game can process the decompiled meta files just fine? I mean, this was known for quite a long time.

  • Like 1

Share this post


Link to post
Share on other sites
MrGTAmodsgerman

WTF? THIS CAN'T BE REAL! DUDE PLEASE NO! PLEASE STAND UP! We need you! We can't without you! Why?

NOOOOOOOOOOOO! Please nooo :(

 

gta_20130724113511-pc-games_b2article_ar

 

We can't stand this terror attack on modders if anybody wants to give up! :panic::cry::cry::cry::cry::die::dontgetit::sui:

 

R.I.P Neodyminum

  • Like 1

Share this post


Link to post
Share on other sites
Mr.Arrow

Source? At least make a proper link.

Edited by Mr.Arrow

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.