Quickstart
After The Collapse is a fully moddable game. A very large part of the game is contained in our data, written in human readable JSON text files. Code for modifying game logic can by added via Lua.
Mod File Structure
Mods, when not acquired through the Steam Workshop, should be put in the {game path}\mods\your_new_mod sub-folder. Each mod goes in its own sub-folder. The game allows you to create a blank mod easily directly from the “Mods” menu on the main screen.
(image)
It will create the very basic structure for your mod:
MyMod
|-> config.json <- config file describing the mod, with name, description, version number. Required.
|-> main.lua <- Lua entry point if you want to alter the game's logic. Optional.
|-> files/ <- Folder containing data files you want to add or modify. Required.
|-> data/ <- contains game/data files to add or override (items, objects, npc, tech, etc.). Optional (add it manually).
|-> Content/ <- contains game/Content files to add or override (images, textures, sfx, music). Optional (add it manually).
Files placed in the files/ folder will be included in the game granted you respect the same folder structure we're using.
Adding or Editing Data
Granted you respect the format and the file structure, you can pretty much add or modify anything existing in the game. For example: if you wanted to override the properties of the lettuce seeds, you would have to create data/items/seeds/lettuce.json within the files/ folder. Your mod folder would then look like this:
MyMod
|-> config.json
|-> files/data/items/seeds/
|-> lettuce.json
We'd advise you to use files from the base game as examples, whether you plan to override existing items or not. Copy them, rename them if necessary, and alter them. Of course, it might take you a little while and some experimentation to figure out what each line in each file does, but we'll be happy to provide some explanation within the Discord guild or the Steam Community forums.
NOTE: Tile images must be the same size or the tile blender will crash. All of the tiles in the game are, by default, 64x64.
Adding or Editing Content
The game allows you to modify and add images, sprites, sound effects, and music tracks. Content can be overridden or added just like with data. There are a few guidelines to follow:
- Textures must be in PNG (recommended) or JP(E)G formats. (JP(E)G files are supported by the engine, but that's not something you should use unless you really know what you're doing)
- Sound files must be OGG, WMA, MP3 or WAV files (Sound files in files\Content\sfx\ will be processed as sound effects, sound files in any other folder will be imported as songs (this is relevant when importing media through the Lua API))
Any textures and/or sounds that are part of your mod must be built by the game's engine. This is automatically done at runtime and will convert your images and sounds in the required .xnb file format. The game will only build content without a matching .xnb, so delete the compiled file whenever you change something in your source.
Lua API
The version of the documentation relevant to your version of After the Collapse is available in mods/Help.pdf. The bleeding-edge documentation is available at modding.anarkisgaming.com.
Translations
Get started with translations here.