Current game stage: 1
With the introduction of XPath and additional modding hooks in Alpha 17 experimental release, the mods folder structure has had some changes.
By default, the Mods folder does not exists. This can be created and called "Mods", at the root of your 7 Days to Die installation:
The default steam installation path:
C:\Program Files (x86)\Steam\steamapps\common\7 Days To Die\
The Mods Folder:
C:\Program Files (x86)\Steam\steamapps\common\7 Days To Die\Mods
The same folder structure can be deployed to a dedicated build. XML-based changes are pushed from the server to the client; However, item icons and asset bundles do not get pushed, and must be installed on the client to work.
Mod Folder Structure
Mods following the new modding hooks should contain the following structure. Some folders will not be necessary if they are not used in the mod.
SphereII_PG13/ /Config/ /Config/XUi/ /ItemIcons/ (A17 and earlier) /Resources/ /UIAtlases/ItemIconAtlas/ (A18+) /ModInfo.xml
- This would be the Mod's main folder, and referenced under Mods/Sphere_PG13
- This is where all the xpath-based XML files should be stored. Its folder structure must replicate the Data/Config folder.
- This is where your Unity3D asset bundles should be stored.
- A17 and earlier: this is where your custom item icons should be stored.
- A18 and later: this is where your custom item icons should be stored.
- Note: despite what the A18 release notes say, use this path and not /UIAtlases/ItemIcons/ (incorrect).
- This is the ModInfo.xml, that contains information about the mod. It's required, otherwise the game will not load the mod.
The Config folder is where the game will look for all the xpath-compatible XML files. These XML files must match their vanilla files in name and in folder. So if you are editing a XUI window, you will need to include the XUI folder as part of your Config folder.
Example XPath File
Here's an example xpath-compatible file, using the set command:
<configs> <!-- change the stripper's meshes with the nurses' skin --> <set xpath="/entity_classes/entity_class[@name='zombieStripper']/property[@name='Mesh']/@value">Zombies/zombieStandardNurseRagdoll</set> <set xpath="/entity_classes/entity_class[@name='zombieStripperFeral']/property[@name='Mesh']/@value">Zombies/zombieStandardNurseRagdoll</set> </configs>
The Resource folder is an optional folder where you can place your generated unity3d asset bundles. These asset bundles allow us to package up our own block textures, entities mesh, and other unity-related packages. The folder name "Resources" is used here as an example. The folder can be named anything, as long as the xpath-compatible XML points to it.
This folder is an optional folder where you can place your custom item icons.
The ModInfo.xml is required for the game to recognize the folder as a Mods folder.
Example of ModInfo.xml
<?xml version="1.0" encoding="UTF-8" ?> <xml> <ModInfo> <Name value="SphereII_PG13" /> <Description value="This modlet tries to make the game a bit more PG, by switching out the stripper model with a nurse." /> <Author value="sphereii" /> <Version value="1.0.0" /> </ModInfo> </xml>
Beginning in A18, Localization from the Mods folder is now supported.
In the Config folder, create a Localization.txt. This file must match case and spelling of the vanilla entries.
The localization files have a heading, like the vanilla version, as a comma delimited line. For mod localization support, you only need to specify the heading that you are adding. For example, if your mod only contains localization for English, you do not need to specify the other language in the heading line.
If your new localization key matches a vanilla value, or a value from a previously loaded mod, then that value will be updated, with the last mod loaded having the final effect.
The format of the file is this:
Key,English myKey,This is my English Key
Note: If you are only including non-English translation, such as French, and leave the English blank or out, then a user loading the Spanish version will get the localization key. This is because English is the fall back translation. If you specify an English, then the Spanish player will see the English localization.