Modding: Basics

From Surviving the Aftermath Wiki
Jump to navigation Jump to search


For basic installation you need to download Unity editor (needs to be version 2019.4.18f1) from Unity Website. Also install "Addressables" from Window -> Package Manager.

Download the mod tool project from Github and use the Unity editor to open the project.

There is an example building provided called Fish Factory and it can be tested ingame by picking Mod/Build Mod from top menu. After building, you can launch the game, enter the Mod menu and activate the mod. After this it will show up in-game, in the food building section.

To mod game Events, check out the instructions at Modding: Events.

Basic Mod Setup[edit]

After the project is open in Unity, remove the example content by removing the Fish Factory folder, then create a new Folder in the root of the Assets folder. This will be where the main content for the mod should be added in.

Inside your mod folder, right click and pick Create -> Aftermath -> Mod.

In this asset you can set the name, version and icon for your mod.

Adding content for Mod[edit]

There are multiple types of content you can add into your mod. For now we support adding scripts written with Javascript, new Buildings, new Events and new Localization strings.

To add scripting create a .script file inside your mod folder and insert your javascript into the file. The code will be executed on load time when the mod is active.

To add a new building, right click in the Asset section and select Create->Mod->Building, this will create a BuildingTemplate asset, where the correct settings should be defined for the building. Functionality for the building can be added through Building Properties, which are added from the Create->Aftermath->Data->BuildingProperties menu.

To add an event, create a .event file inside your mod folder and insert event XML into the file as described in the Event Modding section.

To add localization strings, create a .loc file inside your mod folder and add new localization strings in cvs format.

Other assets supported by Unity, such as textures, models etc. can be freely added into the mods folder and linked through the created assets into the game.

Building your Mod[edit]

To build and test your mod ingame, pick Mod->Build Mod from the main toolbar at the top. After building the game suggest either continuing editing the mod or launching the game. In the game you can find the mod in the Mods menu.

Uploading your Mod[edit]

After completing the mod package, it can be uploaded into Paradox Mod service through website: Paradox Mods

Uploading a mod requires a Paradox account to be created.