[TOOL][WIP] Mass renaming of files for use with gtautil to do addon clothes

Update 2021-05-12

After not having worked on anything FiveM related for a few months I am going to get back into it. One of the first things I want to do is finally complete this tool. Expect updates and fixes to becoming soon.

I came across this great tutorial while trying to get addon clothes for my server.

How ever when you want to turn the entirety of EUP Law & Order and EUP Serve & Rescue into the right file structure for gtautil to convert into an addon mod you would be manually renaming about 3800+ files.

So I created a tool to do all the copying and renaming quickly into the right sub folders, in about a minute or two.

Here is the git for the tool, I haven’t written any documentation for it yet. You will also need visual studio to run it.

If you look throughout the Form1.cs class there are path variables for different things.

Path Variables
Line 43: The folder where the clothes and such are stored (it will scan into the sub folders)

Line 252: Where the finished stuff needs to be coppied to, this directory must be generated with gtautil so that is has all the proper sub folders for male female, mprops and fprops.

Line 290: Same as 252

Line 500: Is a folder I made that has every single gta clothing model in it, this is to import some models for textures that didnt come with models

What do the buttons do:
Load Files: Loads all the ytd and ydd files in all sub-folders of the directory provided on line 43
Execute: Will start copying and renaming files to the output directory. Generate this directory with gtautil so that it has all the subfolders for male and female stuff.
Not Copied: This returns a list of all the files that were not copied during the execute phase, this is due to the models not being available for the textures. ie: the file you are loading is only a reskin of an existing gta model.
GTA Models: This loads a directory which I made that has every single clothes model file from gta. This cam down to copying every file out of gta using open iv, might upload that folder somewhere later.
Fix Models: This well get the list of all not copied textures and match them to vanilla gta models, then it will copy and rename the models and textures. This way you will have these textures with the original gta models.

What still needs to be done to the tool:

  1. Need to a file browsers so you can select your folders
  2. Need to write a proper manual
  3. Need to add support for all ped prop types

This is marked as a Work In Progress, feel free to try and use it now but you will need some C# knowledge to know what you are doing.

With regards to the todo list, I am open to pull requests (no idea how those work but ill ask a mate) for implementing the file browser and such as I was unable to get those working at the time. I am mostly busy developing on my server at the moment so don’t have a lot of time to polish this tool but will try and get around to it sometime this week.

I have uploaded the AllGtaModels files. Keep in mind these are R*'s models all just put in one convenient place so that my tool can reference them in case the clothing pack you have needs vanilla models.
AllGtaModels For use with clothing tool

6 Likes

The tool looks promising, compiled it and tried it out:

3 errors came up when doing the conversion:

  • Files aren’t recognized as DLC clothing and dropped into 1 folder (mp_m / mp_f)
  • Files are not moved, out of the 3500 clothes it has only moved 500 files, the rest is just not moved
  • GTA Models / Fix Models doesn’t do anything

Other then those errors, the tool looks promising and I hope you will be able to make it work properly

1 Like

Thanks for taking the time to try it out. Strange that its only copying about 500 files for you.
The GTA Models button will not do anything unless you have a directory with every clothing model from vanilla gta, you can make a folder like this yourself but it takes a few hours. I will try and upload mine later today.

In regards to:

Files aren’t recognized as DLC clothing and dropped into 1 folder (mp_m / mp_f)

The tool will not create dlc’s it fills just the mp_m and mp_f directories so that you can run them through gtautil to make a streaming resource for your server.

Sorry that it took so long, just wrapped up a uni project. I have uploaded the AllGtaModels files. Keep in mind these are R*'s models all just put in one convenient place so that my tool can reference them in case the clothing pack you have needs vanilla models.
AllGtaModels For use with clothing tool

Do you happen to know what the limit of items that can be streamed?

1 Like

I wish I found this before renaming 4000 files, but it will serve me in the future, thanks xD

thank you for this tool.

I got it to work until execute. After execute it gives me an error message that …\mp_f_freemode_01\components\mp_f\0.ydd" could not be found.

any advise?

cheers

1 Like

same here i dont know what to do

Nice idea, it will save a lot of time for addon clothes making.

Anyone get this working:?

I was looking for a package like this forever. Any chance to also have the ytd files somewhere for these clothes? Thanks.

Nice to see you’re working on it again! Cant wait for updates

Good to see you’re working on it again, here’s some ideas for the new version

  • Have a button to download the zip file with all the pieces up to Cayo Perico
  • Sorting the files on DLC level and putting them into the correct folders

Other then that, the design was already amazing

Hi, I’m having an issue 'Could not find a part of the path ‘E:\FiveM\FiveMDev\AddonClothes\Downloads\EUP clothes\Clothes’
I have followed the instructions regarding changing the path variables and am unsure of what could be causing the issue. Any help would be appreciated, thanks.

I am looking into making something similar, if there are any people interested let me know what functionality you would like it to have, it will be an exe so you do not need visual studio to run it.

how do i open the tool ?