How to automatically (for a script) find which files are needed for a mod ? For instance a font or a driver model for a car ?

Hi there,

I am writing a script to generate a mod archive from a car folder. It's quite easy to create the good folder structure and zip the car folder inside. But the main advantage of doing it is to also archive other files needed by the car: fonts, driver models, ...

I don't know how to identify them automatically by reading the car mod files. But I know it's possible because you can see it through Content Manager. Does someone have any idea how it's done ? I have searched the name of the font inside the car files I didn't find anything.

More generally, I am interested in how I can find the files needed for a mod (track or car) which our not in the track or car folder.

I have already taken into account these files
For tracks :
- content/tracks/track_id/
- extension/config/tracks/track_id.ini
- extension/config/tracks/track_id.ini.blm
- I am not sure if I should also include extension/config/tracks/loaded/track_id.ini, what do you think ?
- anything else ? maybe backgrounds ?

For cars :
- content/tracks/car_id/
- extension/config/cars/car_id.ini
- fonts ?
- driver models ?


My script is written with the Python language and it works already for track mods. I would be happy to share it with the community. It's already on github (but I prefer to not give the address as it's still under development as you can see).

Thank you for your help
 
The files aren't necessarily available in cars, but fonts are requested in data/digital_instruments.ini and the driver in data/driver3d.ini.

Lines just look like
FONT=led_audi

[MODEL]
NAME=driver_no_HANS
 
The files aren't necessarily available in cars, but fonts are requested in data/digital_instruments.ini and the driver in data/driver3d.ini.

Lines just look like
FONT=led_audi

[MODEL]
NAME=driver_no_HANS
Thank you, it seems to be exactly what I need ! Yes I understant that they are not in the mod folder, that's why it's a mess when we install new mods. The goal of my script is precisely to do some clean up and create an archive that can be installed as a mod in Content Manager from any track / car and get the required depedencies if they exist. If you have an idea of any more dependencies I missed, don't hesitate to tell me.

The way I would do that is run `unzip -v` or equivalent on the mod's distribution file.

Then you know what specifically gets installed outside cars/.
If you still have the mod's distribution file, yes, but sometimes we have so much mods, it's hard to find it and sometimes we just need to do a clean archive so we can do some online races with friends quickly. This is what I want to do with this script: create a clean mod archive from an already installed car/track. We can also do some cleanup with this: create the mods archives from installed tracks/cars, remove tracks/cars that have been installed manually, and then activate them as mods in CM.

Thank you again.
 
I managed to get the fonts and drivers files, and also crew files (helmet, suit, brand, etc ...) by looking in the files "driver3d.ini" and also "ext_config.ini".

It works pretty well and I can not regenerate a full complete working 7zip mod from a car or track folder.

But for some mods (RSS mods, and also NFS Class A and B), they use some fonts and drivers from which I cannot find any references :
For example :
- the font "corvette_c4_zr1"
- the driver "rss2_2018"

Where is this referenced ? In Content Manager, if I click on "Rescan" it takes 1 second to rescan and find the cars which use it, but how is this done ?

Thanks
 

Latest News

Are you buying car setups?

  • Yes

  • No


Results are only viewable after voting.
Back
Top