Quantcast

Jump to content

» «
Photo

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

260 replies to this topic
_MK_
  • _MK_

    46EEK572

  • Members
  • Joined: 16 Jan 2014
  • None
  • Best Vehicle [Snap] 2016
    Best Scenery [Snap] 2015
    Best Filtered [Snap] 2015

#241

Posted 03 January 2017 - 11:12 AM

Any news regarding an In-game tool ?


Dilapidated
  • Dilapidated

    Snitch

  • Members
  • Joined: 13 Jul 2012
  • United-States

#242

Posted 14 January 2017 - 06:20 AM

@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 :)

  • MrGTAmodsgerman likes this

tadd
  • tadd

    Li'l G Loc

  • Members
  • Joined: 01 Oct 2013
  • None

#243

Posted 18 January 2017 - 08:20 PM Edited by tadd, 18 January 2017 - 08:22 PM.

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 😄
  • MrGTAmodsgerman likes this

tadd
  • tadd

    Li'l G Loc

  • Members
  • Joined: 01 Oct 2013
  • None

#244

Posted 19 January 2017 - 02:18 PM Edited by tadd, 19 January 2017 - 02:18 PM.

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 😄

Neodymium
  • Neodymium

    Crackhead

  • Members
  • Joined: 01 May 2015
  • None

#245

Posted 22 January 2017 - 08:12 PM

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.

  • Claude_Lib, MrGTAmodsgerman and WildBrick142 like this

Jax765
  • Jax765

    .

  • Members
  • Joined: 29 Jan 2010
  • None

#246

Posted 24 January 2017 - 01:53 AM

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

Neodymium
  • Neodymium

    Crackhead

  • Members
  • Joined: 01 May 2015
  • None

#247

Posted 24 January 2017 - 04:40 PM

 

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").

  • BlackScout likes this

Jax765
  • Jax765

    .

  • Members
  • Joined: 29 Jan 2010
  • None

#248

Posted 24 January 2017 - 07:11 PM

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


Neodymium
  • Neodymium

    Crackhead

  • Members
  • Joined: 01 May 2015
  • None

#249

Posted 24 January 2017 - 08:17 PM

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.

  • BlackScout likes this

Jax765
  • Jax765

    .

  • Members
  • Joined: 29 Jan 2010
  • None

#250

Posted 24 January 2017 - 08:21 PM Edited by Jax765, 24 January 2017 - 08:22 PM.

 

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.


Jax765
  • Jax765

    .

  • Members
  • Joined: 29 Jan 2010
  • None

#251

Posted 27 January 2017 - 12:01 PM

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


_CP_
  • _CP_

    Boss

  • Feroci
  • Joined: 27 Dec 2007
  • Poland
  • Most Helpful Modding 2016 [Runner-up]
    Best Vehicle 2016 [IVPack]
    Best Map 2013 "ViceCityStories PC Edition"

#252

Posted 27 January 2017 - 12:14 PM

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

NTAuthority
  • NTAuthority

    hell, no, tunnel, no

  • Feroci
  • Joined: 09 Sep 2008
  • European-Union
  • Best Script or Plugin 2016 [SkyGfx] [Contribution]
    Best Conversion 2014 [ViIV for GTANY]
    Most Knowledgeable [Tech] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Contribution Award [Mods]

#253

Posted 02 February 2017 - 07:43 PM

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. :/
  • Jestic, avail and BlackScout like this

NTAuthority
  • NTAuthority

    hell, no, tunnel, no

  • Feroci
  • Joined: 09 Sep 2008
  • European-Union
  • Best Script or Plugin 2016 [SkyGfx] [Contribution]
    Best Conversion 2014 [ViIV for GTANY]
    Most Knowledgeable [Tech] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Contribution Award [Mods]

#254

Posted 03 February 2017 - 02:02 AM

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.

tadd
  • tadd

    Li'l G Loc

  • Members
  • Joined: 01 Oct 2013
  • None

#255

Posted 05 February 2017 - 05:28 PM Edited by tadd, 05 February 2017 - 05:31 PM.

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.

GTARandom
  • GTARandom

    Rockin' this place since 2009

  • Feroci
  • Joined: 15 Jun 2009
  • Croatia
  • Best Conversion 2016 [GTA: Underground] [Contribution]
    Best Map 2011 [IVSA]
    Modding Milestone [IVSA/Ped Paths]

#256

Posted 05 March 2017 - 01:42 AM Edited by GTARandom, 12 March 2017 - 08:38 PM.

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.

  • MrGTAmodsgerman likes this

GTARandom
  • GTARandom

    Rockin' this place since 2009

  • Feroci
  • Joined: 15 Jun 2009
  • Croatia
  • Best Conversion 2016 [GTA: Underground] [Contribution]
    Best Map 2011 [IVSA]
    Modding Milestone [IVSA/Ped Paths]

#257

Posted 12 March 2017 - 08:37 PM Edited by GTARandom, 4 weeks ago.

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
  • MrGTAmodsgerman, BlackScout and Vlad2012 like this

warmsweater
  • warmsweater

    Player Hater

  • Members
  • Joined: 2 weeks ago
  • US-Virgin-Islands

#258

Posted A week ago

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


Neodymium
  • Neodymium

    Crackhead

  • Members
  • Joined: 01 May 2015
  • None

#259

Posted A week ago

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.


GTA BELGIUM
  • GTA BELGIUM

    Red Devil

  • Members
  • Joined: 20 Aug 2014
  • Belgium

#260

Posted A week ago Edited by GTA BELGIUM, A week ago.

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

Spoiler


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: 

Spoiler

 

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


IgorX
  • IgorX

    3D

  • Members
  • Joined: 20 Aug 2009
  • None
  • Best WIP Mod 2014 [Grand Theft Auto 3D]

#261

Posted A week ago

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.

  • GTA BELGIUM likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users