It is possible to mod the demo and closed alpha versions!
You can already add new enemies, animals, items, workshops and so on. To get started, have a look in the StreamingAssets folder. Everything in that folder is loaded when the game starts, so adding something in that folder makes it appear in the game.
Adding new objects Edit
In order to create a new object it is best to start with and copy an existing thing. E.g. if you want to make an ogre, you could copy the ObjectType/actors/Slime folder and rename everything to Ogre.When restarting the game, the ogre should show up in the game.
Editing the VOX files Edit
For editing voxel models I recommend MagicaVoxel 0.98.2 which you can download here. The newer versions do no longer support animations, so I recommend using this older version.
- Important: When making an animation, all frames need to have the same size setting, otherwise the game cannot import them correctly.
- The first frames of your voxel animation are the build frames, i.e. the different stages during construction. The frames after are the frames used for the animation when it is built or producing.
Editing the XML files Edit
You can edit the object’s properties by editing the xml-file in a text editor. The documentation for what each field does can be found in the ModdingAPI.html file in the StreamingAssets-folder. In general, adding Info-blocks adds a new kind of behaviour or property to an object. For example, adding a MiningInfo allows your colonists to harvest it.
Some general remarks:
- Boolean values can be specified as 0 (false) or 1 (true)
- String values can be given as a comma separated list
- Colors can be given via hex code, e.g. #8EE45C
- Factions can be Player, Neutral or Enemy
- NumRange is a range of ints, e.g. 5:8
- Recipes have the format Input=Output=Time, e.g. 2*Log=WoodenBoard=16
This is a first draft so things can be unclear or incomplete. If some information is missing, please contact me on Discord (https://discord.gg/dyzzGUp) and I’ll add it!
Creating localizations (translations) Edit
In order to create a new localization, do the following:
- 1) To get started, navigate to the game's directory. There should be a folder StreamingAssets/Mods/kubi.example.localization.
- 2) Make a copy of this folder and give it a new name, e.g. "yourname.language.localization".
- 3) Open the ModInfo.xml in the folder, enter the mod name and description and your name (if you like).
- 4) (Rename and) open the file in the localizations folder. Change the language (e.g. language=Français) and locales (e.g. locales=FR) and save the file.
- 5) When starting the game, the new language should be available in the settings.
- 6) Whenever you start the game with a new translation file, it will automatically create a list of the missing translation lines. This is both useful to get started and to keep the translation up-to-date when new strings get added. The file can be found in C:\Users\<username>\AppData\LocalLow\MirkoStudio\Kubifaktorium\Missing_<language>.txt on Windows or ~/.config/unity3d/MirkoStudio/Kubifaktorium/ on Linux.
- The general format of the localization file for each line is <key> = <value>, for example "UI.BuildTrain = Build train". The <key> must not be changed, the <value> is to be translated, so e.g. "UI.BuildTrain = Baue Zug".
- A line starting with "#" is ignored and can be used for comments
- The line "fallback=English" specifies which language to use when a certain string cannot be found. Usually English is a good choice as it is usually the most up-to-date but other languages can be chosen if they are closer to the target language.
- The game supports hyphenation for languages with long strings like German. To use it, use the "_" character to insert a soft hyphen at the spots where a word can be hyphenated. I recommend this for words longer than 12-15 characters. For example: "Recommen_dations" or "trans_portation.
- A string in the format "#<id>#" causes an icon to be inserted, e.g. "#sun#". Note that the id must not be translated, otherwise it will not be found and translated correctly.
- A string in the format "##<id>" creates a keyword. Keywords like "##daytime" will be translated to an underlined word "daytime". In addition, an explanation will be added underneath, usually in the tooltips. Again, the id must not be translated. However, the explanation text (the lines with keys like ##idle), should.
- Strings like "$1", "$2" etc are placeholders for numbers and other things which will be filled by the game. For example "Growth rate at daytime: $1%" will become "Growth rate at daytime: 75%" at runtime.
- If required for some reason, you can use <br> to create a line break. However I recommend not using it.
- Thank you for your help!! :) In order to prevent duplicate work, it might make sense to post in the Discord channel to maybe find someone to help out.
Creating map modifiers Edit
Map modifiers influence the procedural map generation process. You can use these to make custom spawn groups and add new terrain types. For more info on each, have a look at the ModdingAPI.html file.
- If you want to spawn something, e.g. an enemy camp, use CustomSpawnInfo*
- If you want to add a new terrain/biome, use TerrainInfo and ShaderInfo.
- If you want to alter an existing terrain, e.g. add more mountains, use TerrainModifierInfo.
- To set the map size, use MapSizeInfo.
- Use ModifierInfo to specify how your modifier can be used and how it is shown in the custom map setup screen.