Modders Guide
Ashes of the Singularity gives you access to a powerful strategy game engine to create your own scenarios, objects and worlds. The designers have had a lot of fun creating scenarios for the game, and you will have access to the same features they had to create your own. There is a lot to do in Ashes. But it was also built from the ground up to be mod friendly. Modders have access to the gameplay elements to change and tweak as they desire. This document will introduce some of what is possible, and we will make a map and a mod to take advantage of this. This is not always going to be a managed and curated editor with limited options. You can mod the game the same way the developers make changes to the game. Editors are nice because they typically keep you from doing “bad” things. But they also keep you from doing incredibly good things. An editor only allows you to do the things the developer set up for you to change. With direct access to the files you can do things the developer never expected. Sometimes that turns out horribly (okay, a lot of the time that turns out horribly), but sometimes it turns out brilliantly. We believe power trumps ease of use. Moddable Game FilesJust as with the Map Editor, to enable the game modifications add the “-modding” (without the quotes) to the Launch Options for the game (in Steam, right-click the game, go to Properties, click Set Launch Options in the General tab). That will add a Modifications button to the main menu of the game. You will not be able to play multiplayer if you are using Mods. The game supports modding the directories modders would be most interested in. These are:
To create a mod add a directory in your My Games/Ashes of the Singularity - Escalation/Mods/ directory with the name of the mod you would like to use. In the above example the name of the Mod is BalanceMod. There is an index.ashesmod file that is a text file that contains the details about the mod. When you start the game it will create a generic one for you but the format is as follows:
This is purely informational, its what is displayed by the mod on the mod screen. Note: Ashes can’t use a file if it is locked. If you have a file open with Excel and try to start Ashes, the game will likely crash. Close the file before starting Ashes. To use a mod go into the Modification screen from the main menu. You will see all of your Mods here and you can enable or disable them, and change the order they load in. This can also be changed by editing the My Games/Ashes of the Singularity - Escalation/Mods.ini file.
Notable Files for ModdingAll files for modding are found in the Steamapps\Common\Ashes\Assets\ directory. Any text editor can be used, but I'd recommend using a free program called CSVed as it'll make viewing and modifying values much easier. (If using CSVed enable "Use Start Row as Column Captions) The following files are the primary ones responsible for major gameplay changes:
File Mod ExampleThere are a lot of files, with a lot of fields that can be tweaked and changed. For this demo we are going to mess with my favorite file, UnitTemplates.csv. In this screenshot the file UnitTemplates.csv is opened with Excel, because it makes it easier for me to work with, but Excel isn’t required. Notepad could be used to modify the file. If you use Excel remember to save it as a csv file. There are a lot of fields that can be modified. In this screenshot you can see:
Some of these fields aren’t named the same as they are in game. Names change during the course of development, and we didn’t want to go back and change all these definitions to match each time they do. Because of that you may have to experiment a bit to see how things match. For example, PHC_Smarty is the Smarty System, and Cost Data is actually the Radioactive cost of the unit. You can check out the translation tables in ..\Ashes of the Singularity\Assets\UIText\ directory to see how raw assets relate to in game assets. Using this file alone, and just the things in this screenshot (there are many more fields in UnitTemplates.csv) we can dramatically alter the balance and design of the game. Let’s use the above to create a new game variant I call the Swarm Mod. I love the scale of Ashes, I love large battles. So this mod is going to make even larger battles possible and we are going to get into them fast. To do that I’m going to make the following changes: I’ve reduced the Metal, Radioactives, Logistics and Construction time costs by 90%. I’ve reduce the Logistics costs of T1 units to 0 (so you can have as many as you want). With these changes factories should produce 10 units in the time it took to produce 1 before. As long as you can keep feeding the (dramatically reduced) resource costs, units should come out of factories in an endless stream, like a tower defense game on steroids. There are a lot of ways to tweak this concept. I could have kept the Metal and Radioactive costs the same and then the player would be strongly incented to claim and upgrade regions to keep his factories fed. I could have just halved the costs rather than dropping them by 90%. I could have increased the resource gathering rates of upgraded metal and radioactive mines rather than lowering costs to incent players to invest in their regions. But for this we are going crazy. Everything gets very cheap. Massive armies can be built from the start of the game. Those poor creeps won’t know what hit them. And be prepared to be sieged by thousands of units. This is 5 minutes into the game. I only have 2 factories putting out an endless stream of Brutes. I make an army out of them and in the time it takes to do that there are a bunch more waiting to be added. So I find that it works just as well to set the rally point of the factory to where I want to attack, so that my river of death flows out to destroy it. The AI has adapted to the new lower costs and is meeting my endless streams with its own. Unlike me it has opted to go with some cheaply produced dreadnoughts. The game lasts for 45 minutes, and there is a battle waging between my endless armies and his at this chokepoint for nearly all of it. It isn’t until I win more minor battles on some of outskirt regions (to take the resources which even at 90% off still become critical) and I send a strike force around to take out his factories that I cause his production chain to falter and begin to break through. I had to adjust away from my typical Artemis (long range missile ships) to Nemesis (which are really good against enemy dreadnoughts) to be able to begin killing them faster than he could produce them. I also needed to invest heavily in anti-air Apollos to counter the AI’s strike fleets of aircraft that nearly cost me the game. Once the lines were broken I turned the biggest Ashes armada I had ever controlled against his Nexus. There were a lot of dreadnoughts fighting their way up that hill, and the explosions, missile trails and laser blasts cut through and won me the game. Overall it is amazing how much game play can change with these changes. If I were to do it again I might keep the reduced cost overall, but maybe just 50% off rather than 90%. I liked the larger armies, but it was a crazy experience more like fighting a fire than playing chess. If you decide to modify the csv files with a text editor (Notepad++ is my text editor of choice) you can do everything I was doing in Excel, it just isn’t formatted into columns to be easy to read. Instead it is raw text like the following: Modifying the files this way works, you just need to count the amount of fields, remembering that commas separate the fields (CSV stands for Comma Separated Values) to get to the right values.
Adding a new Map to a ModIt is also possible to add a custom map to a Mod. The in-game map editor will always create a map in the default \Assets\Maps\<mapname> directory. To include that map in your mod, once created you'll need to move the entire map directory into your <ModName>\Maps directory. Once the map is in the mod directory and the game is restarted, the Map Editor will be able to edit the map directly from the mod directory.
Current Limitations (Ashes 2.7)The Ashes developers are working to expand Modding support, however there are a few significant limitations to the existing modification support. The following files from the Ashes \Assets\ directory are currently NOT modifiable.
Several gameplay features are currently drawn from game code and not able to be modified via the csv files:
Values for Dreadnought upgrades such as the rate of regeneration or weapon damage can be modified, but changing the upgrades and their unlock sequence is not configurable.
Values for Quantum Upgrades such as the damage and cost can be modified via WeaponModules.csv, but changing the utility and availability is not configurable
Values for the Quantum Upgrades such as the cost and bonus can be modified, but changing the utility and availability is not configurable
Safe ModeIf your Ashes installation with Mods gets into a state where the game fails to load. It is possible to still load the game via safe mode. Safe mode will not load any mods, but will still present the user interface for enabling and disabling mods. You can open the interface, disable the offending Mod, and restart Ashes in the normal mode. To start safe mode, select the option from the launch menu in steam, or add "-safe" to the command line arguments.
Creating New Units (Work-in-progress)With Escalation 2.4, modders are able to introduce their own custom units into the game as mods. Adding a new unit to Ashes can be a complicated process, so to make it easier for modders to follow along with this guide, we have provided a sample mod of a custom unit called the "Little Boy". The Little Boy <ref name="Little Boy">Little Boy - https://en.wikipedia.org/wiki/Little_Boy</ref>, named after the first atomic bomb deployed during World War II, is a Tier 1 unit that shoots nuclear warheads from its single turret. Download the tools required to build a unit mod from here: http://downloads.ashesofthesingularity.com/AshesModdingTools.zip Download the "LittleBoy" sample mod from here: http://downloads.ashesofthesingularity.com/AshesSampleMod.zip
The Anatomy of a UnitIn order for a unit to appear in-game, a series of data (used to configure the visual aspect of the unit) and texture files must exist in the mod's folder structure. These files are:
Design Guidelines for the 3D Model
Texture Authoring Guidelines and Best Practices
Required Textures and How to Convert Them To DDS FormatThe following textures are required to be defined in the unit's Palette file, and must have the provided DDS format:
As a best practice, it is recommended that you export your textures from whatever graphics authoring tool you are using (i.e. Photoshop, Substance Designer, etc.) as .tif files WITHOUT the alpha channel. TIF files make a good medium for iterating on textures, as opposed to trying to make edits to the texture in DDS format (which can be difficult to do, depending on the format).
The Team Color Masks TextureWhen setting up a Skirmish or a multiplayer game, the player gets to select up to 3 colors to represent their team. It is the purpose of the Team Color Mask texture to control how those 3 colors are shown on the unit in-game. A combination of these 4 separate masks make up the Team Color Masks texture:
Using the OxTextureTool.exe tool, these 4 masks are combined into a single DDS file representing the TeamColorMasks texture. Within the package of files for the LittleBoy mode you will find the \SourceArt\maps\MakeTeamColorMask.bat script file. Open up this file to see the process for converting the TC1, TC2, TC3 and Decal mask files into the correct DDS format and then how to merge those 4 DDS files into a single "mask array" texture file. Here are the steps (you can follow allong in the MakeTeamColorMask.bat file):
It's important to note that the file names used in the \SourceArt\maps\MakeTeamColorMask.bat script file of the LittleBoy mod are specific to the LittleBoy unit, and that you may name these source files however you like. The Team Color Masks texture is set in the unit's Palette file via the "TeamColorMasks" column. Whatever you provide as the file name that the OxTextureTool.exe tool outputs (via the -o argument) must match what you provide for "TeamColorMasks" column in your unit's Palette file. What you provide for the "teamColorMasks" column in your unit's Palette file must be a path to the file, relative to the root mods directory.
The Material Masks TexturePHC Unit Materials
The FBX FileThe models for all buildings and units in Ashes: Escalation were authored in either Maya or 3dsMax. Of course, this does not mean that other tools like Blender or Modo can't be used. Be aware though that there are minor differences in the ways that each of these 3D modeling tools export FBX files and that their output can be inconsistent between what each tool outputs. This can have the effect of introducing flaws into your model when bringing them into the game.
TroubleshootingFatal Error: Assert Fail: pMesh->GetPolygonSize(0) == Model::eNumIndiciesPerPoly File Models are required to have triangulated polygons. When running the Texconv, OXTextureTool or EasyBake tools, if you are prompted with an error dialog saying MSVCP140D.dll or VCRUNTIME140D.dll or VCOMP140D.dll is missing: You will need to install the Visual C++ Redistributable for Visual Studio 2015: https://www.microsoft.com/en-US/download/details.aspx?id=48145 <references /> |