Skip to content

Convert vehicles to new mod format on install #132

@paoloambrosio

Description

@paoloambrosio

Mods in the new mod format have in UserData\Mods\<ModName>:

  • <ModName>.xml

  • driveline.rg (optional)

  • vehiclelist.lst (optional)

  • If the mod does not contain UserData\Mods, we should generate in UserData\Mods\<ModName>

    • <ModName>.xml file (unless it's a track or is disabled in config).
    • Create a vehiclelist.lst with **\*.crd files.
    • Create a tracklist.lst with **\*.trd files.
    • Create a driveline.rg with extracted config
  • For bootfiles...

    • Iterate through all <ModName> directories in UserData\Mods
      • Collect config from aforementioned files only when there is no <ModName>.xml
    • Install and configure bootfiles if any config was collected

Tip

Mods that have no files should already be excluded from the state file, so we might not have to do anything fancy to skip installation (just avoid installing any file).

Important

The official docs specify that

"Each mod will require a unique name, ideally alphanumeric with no spaces. This name should be used for the directory name, the ModFile xml name, and the 'Name' field in the ModFile."

The example contains underscores (250GTO_Robi3381). In my tests, using the package name did not work, so let's assume that it must be alphanumeric with underscores.

Note

It would be interesting to save the mod state in the same directory, but a package can contain more than one mod in the new format (unless we always ways create a dir for the package, even when Userdata\Mods is in the archive).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions