Note that this mod does nothing on its own. It loads in the background and waits for *.configcompat.json files from other mods.
These *.configcompat.json files are a format I designed for mapping old part, slot, and variable names to their new names. Renames can be chained (A -> B -> C). A special section called "partSubSlots" also lets a renamed slot holding a given part fill another slot with a named part, which covers configs saved before that slot existed.
This does not modify any existing vehicle configs/.pc files. Everything happens at runtime whenever a vehicle loads, whether it's a level spawn, a new spawn, or an in-place replace. A toast then recommends resaving the config, and once you do, it keeps the updated names.
Put the files in vehicles/<vehicle>/ to apply them to one vehicle, or in vehicles/common/ to apply them to all vehicles, which can include subfolders, just like JBeam.
The format:
I designed this around my Hopper Leaf Springs mod. If this mod is approved, its next update will include these *.configcompat.json files and replace the "isAuxiliary compat part" jbeam parts I've been using to help old configs migrate.Code:{ "parts": { "bumper_v1": "bumper_v2", "bumper_v2": "bumper_v3" }, "slots": { "bumper_slot_v1": "bumper_slot_v2" }, "vars": { "$tune_v1": "$tune_v2", "$mode_v1": "$mode_v2" }, "partSubSlots": { "bumper_slot_v2": { "bumper_v3": { "bumper_light_slot": "bumper_light_v2" } } } }
The reason I'm making this Lua-based mod is because my JBeam-based backwards compatibility can't cover slot renames. So I hope to use this for my other mods at some point.
For the ultimate old config backwards compatibility!
FOR MODDERS You can use this on anything you like, but don't add this mod as a file with a mod; add it as a link to this mod where they can subscribe to it.
Experimental Config backward compatibility system 1.0.0
Keeps old .pc configs working after part, slot, and variable renames (Does nothing on its own)