-
Notifications
You must be signed in to change notification settings - Fork 0
Mod Structure and Mod Loading
In most cases the mod structure is automatically generated but a deep dive into this may be helpful in understanding how the game loads a mod.
There are three main Folders the game looks at when looking for mods:
- Project folder: Stored in the PersistentDataPath (see Footnotes for paths). The ModLoader will only look for mods but not load them.
- Local mod folder: Also stored in the PersistentDataPath. The ModLoader will look and load any mod located here - these mods will always be favored over subscribed mods, if you edit your mod locally and have an old version on the Workshop which you subscribed to it'll load the newer local version and ignore the subscribed version.
- Workshop mod folder: This is located inside the Steam folder and is used for any subscribed item. The ModLoader will load any mods here if the folder can be found (Steam logged in and online or if offline the game will try to find it at the usual path).
This is a more technical approach to how mods are build up - for a guide on what each mod item does please see <TODO: mod items page link>.
A mod is basically just one file - at least the definition of a mod is one file. The "modinfos.json" file stores all required information to know what a mod is, where to find additional resources and what items exist "inside" the mod.
Any mod may have as many mod items as required - there's no limit. A mod item in this sense is just a piece of information inside the Mod that specifies how the item is build up (for a custom floor it contains the path to the texture of the floor so the ModLoader knows where to find it). Some of these items can be defined by only the item itself and don't require any further data but in most cases additional data is required and loaded when necessary.
In case additional data is required the mod editor for the respective item will create a sub folder in the mod's folder named depending on what item is currently edited (e.g. a 3d Model is saved in the Model folder).
Note: You can always edit these things yourself - the modinfos.json is a simple file which can be opened by any text editor, paths are always relative and sub folders automatically applied. However, using the mod editor is highly encouraged, it'll automatically do all the stuff for you!
PersistentDataPath:
- Windows: "%userprofile%\AppData\LocalLow\LVGameDev LLC\SimCasino"
- MacOS: "~/Library/Logs/LVGameDev LLC/SimCasino/"
- Linux: Either "$XDG_CONFIG_HOME/unity3d" or "$HOME/.config/unity3d" - please note that Linux is not officially supported but appears to work fine with Proton, modding is not affected - it works the same on all platforms :)
Besides these paths you can generally also open the load game dialog and use the "Open Saves Folder" button - the saves folder is stored in the PersistentDataPath so going up by one will land you at the right place.
sidebar