Modding: Basics

From Surviving the Aftermath Wiki
Jump to navigation Jump to search

Installation[edit | edit source]

These instructions are not for installing already built mods. To get mods in-game, download/subscribe to the mods via Paradox or Steam websites and then go to Adding Mods To The Game for the steps to get the mods into your game.

This is a guide for installing the tools for creating mods. You need to download Unity editor (needs to be version 2020.3.14f1). For first time modders without Unity installed, you need the Unity Installer If you already have the Unity Hub from other modding projects, get the above-mentioned Unity Editor.

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

There is an example building provided called Fish Factory and it can be tested in-game 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 | edit source]

After the project is open in Unity, remove the example content by removing the Fish Factory folder (or simply rename it, if you want to keep the files within - for example, the .loc file), 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 | edit source]

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 | edit source]

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 | edit source]

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.

Adding Mods To The Game[edit | edit source]

Go to \Documents\Paradox Interactive\Surviving the Aftermath\ and create a Mods folder.

Copy + Paste the downloaded .mod file(s) from your Downloads folder (or where you downloaded it to) into this Mods folder.

You can rename the mod file to better reflect the file contents if you want, just keep the .mod file extension. If you cannot see the file extension, put a tick in the Filename extension checkbox in the Show/Hide panel, under the View menu.

Start the Launcher. Do not enable Mod in Launcher by clicking Mods. see Current Limitations below for explanation. Instead, click on the "Play" button and then in the game load screen, click MODS menu. Click the mod you wish to use, by placing a tick in the checkbox. Then click BACK.

Current limitations Mods cannot be enabled from the Launcher screen or by using the Subscribe button (nothing happens) on the Paradox Mod page website. As shown in the image below, even with the mods enabled in the Launcher screen, once you go to the Select Mods screen in the game, none of the mods are available. The screen is just blank. As with most other games, you can only have one play-through per loading of the game, meaning you need to Quit the game totally to the Windows Desktop in order to load another Save or to enable another mod. Loading another Save or starting a second NEW game without Quitting to Desktop has always resulted in the game hanging on me and I had to Ctrl+Alt+Del the process or close window from the Taskbar (another reason why I run in Windowed mode while creating mods and testing in-game).

Cannot use a newly downloaded mod in a pre-existing SAVE game. Must always start a NEW game.