Modders Guide: Difference between revisions

From Ashes of the Singularity - Official Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(72 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:<span style="position: absolute; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px);">{{FULLPAGENAME}}</span>}}
{{HeaderTemplate
|welcome=Modders Guide
}}
This page provides information for players looking to create mods for the game. We have separate guides for the [[Map Editor]] and [[Scenario Editor]]


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.
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.
Line 6: Line 11:
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.
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.


== The Map Editor ==
{{SectionTemplate
|h=h3
|title=Moddable Game Files
|content=
}}
Just 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.


(see [[Map_Editor|the full Map Editor article]] for more)
The game supports modding the directories modders would be most interested in. These are:
 
*'''GameCore'''- The home of the most critical files, definitions for all the games units, buildings, weapons, orbital abilities, etc. This directory isn't additive, you make changes by replacing the file you want to change with a new one. For example, if you want to modify the hit points on the Zeus your mod will need to include a new UnitTemplates.csv file with the hit point value for the Zeus changed.  
[[File:ModGuide 1.png|thumb|right|200px|Creating a new map]]To enable the [[Map_Editor|Map Editor]] 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 Map Editor button to the main menu of the game. From there you can decide if you want to modify an existing map, or create a new one. If you create a new one the menu to the right is presented.
 
For your first map I’d select a smaller map size. You probably assume that you will run out of space quickly on small maps, you would be wrong. Ashes small maps are what other games would call huge. The large ones are ridiculous and will take a lot of time to design. Practice on some small ones first.
 
[[File:ModGuide 2.png|thumb|left|600px|A new, blank map]]
 
&nbsp;
 
&nbsp;
 
&nbsp;
 
&nbsp;
 
&nbsp;
 
&nbsp;
 
&nbsp;
 
&nbsp;
 
&nbsp;
 
&nbsp;
 
&nbsp;
 
&nbsp;
 
&nbsp;
 
== Moddable Game Files (added in Escalation 2.2) ==
 
Just 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&nbsp;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:
 
*'''GameCore'''- The home of the most critical files, definitions for all the games units, buildings, weapons, orbital abilties, etc. This directory isn't additive, you make changes by replacing the file you want to change with a new one. For example, if you want to modify the hit poitns on the Zeus your mod will need to include a new UnitTemplates.csv file with the hit point value for the Zeus changed.  
*'''Maps'''- For adding new maps with the mod.  
*'''Maps'''- For adding new maps with the mod.  
*'''Scenario'''- For adding new scenarios with the&nbsp;mod. It is possible to modify existing scenarios with mods (by using the same name as that scenario file) but adding new scnearios with new names will be more common.  
*'''Scenario'''- For adding new scenarios with the mod. It is possible to modify existing scenarios with mods (by using the same name as that scenario file) but adding new scnearios with new names will be more common.  
*'''UI'''- So a modder can add new art refered to by the Scenario file.  
*'''UI'''- So a modder can add new art referred to by the Scenario file.  
*'''UIText'''- For adding or changing existing text. Files placed here are additive (they don't need to replace an existing file). If you want to change a text string from the base game just include that string in your new text file and it will overwrite it.  
*'''UIText'''- For adding or changing existing text. Files placed here are additive (they don't need to replace an existing file). If you want to change a text string from the base game just include that string in your new text file and it will overwrite it.  


Line 59: Line 30:


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:
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:
<blockquote>[AshesMod]<br/> Name=Balance Mod<br/> Author=Rob Brink<br/> Description=This is a Balance mod that also includes the Weehawken Scenario.<br/> Version=1.1.10</blockquote>  
<blockquote>[AshesMod]<br /> Name=Balance Mod<br /> Author=Rob Brink<br /> Description=This is a Balance mod that also includes the Weehawken Scenario.<br /> Version=1.1.10</blockquote>  
This is purely informational, its what is displayed by the mod on the mod screen.
This is purely informational, its what is displayed by the mod on the mod screen.


'''[[File:ModScreen.png|right|300px|ModScreen.png]]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.
'''[[File:ModScreen.png|right|300px|ModScreen.png]]'''


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. &nbsp;This can also be changed by editing the&nbsp;My Games/Ashes of the Singularity - Escalation/Mods.ini file.
'''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.


=== Notable Files for Modding ===
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.


The following files are simple to mod and can effect major changes to gameplay.


All files are found in the Ashes \Assets\ directory.
{{SectionTemplate
|h=h4
|title=Notable Files for Modding
|content=
}}
All 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)


*'''\GameCore\[[BuildingTemplates.csv|BuildingTemplates.csv]]''' - Controls build time, cost, armor, HP, and more for all buildings.  
The following files are the primary ones responsible for major gameplay changes:
*'''\GameCore\[[UnitTemplates.csv|UnitTemplates.csv]]''' - Controls build time, cost, armor, HP, and more for all units.  
* '''\GameCore\BuffTemplates.csv''' - Controls the value of Dreadnought buffs.
*'''\GameCore\ModuleTemplates\[[WeaponModuleTemplates.csv|WeaponModuleTemplates.csv]]''' - Controls rate of fire, range, targeting priority, damage, and everything else for all weapons.  
* '''\GameCore\[[BuildingTemplates.csv]]''' - Controls build time, cost, armor, HP, and more for all buildings.
* '''\GameCore\BuildingUpgrades.csv''' - Upgrade path for base defenses.
* '''\GameCore\DefaultPlayerAI.xml''' - Controls difficulty handicaps, personality types and armies built by the AI.
* '''\GameCore\Research.csv''' - Pricing of Quantum Upgrades.
* '''\GameCore\UnitPanel.csv''' - Controls the interface of build menus. 
* '''\GameCore\[[UnitTemplates.csv]]''' - Controls build time, cost, armor, HP, and more for all units.
* '''\GameCore\WeaponVisual.csv''' - Controls visual weapon alignment and other weapon cosmetics.
* '''\GameCore\ModuleTemplates\BuildingModules\''Sample.csv''''' - Controls which weapons and ConstructionModules structures have.
* '''\GameCore\ModuleTemplates\UnitModules\''Sample.csv''''' - Controls which weapons, ConstructionModule and SteeringModules units have.
* '''\GameCore\ModuleTemplates\ConstructionModuleTemplates.csv''' - Controls which ConstructionLists a ConstructionModule uses.
* '''\GameCore\ModuleTemplates\DroneBayModuleTemplates.csv''' - Controls which drones or other units are spawned by units such as Drone Hives.
* '''\GameCore\ModuleTemplates\ResourceModuleTemplates.csv''' - Controls the amount of resources and storage generated by structures and upgrades.
* '''\GameCore\ModuleTemplates\[[SteeringModuleTemplates.csv]]''' - Controls the movement behaviour of units when engaging the enemy such as desired attack range.
* '''\GameCore\ModuleTemplates\[[WeaponModuleTemplates.csv]]''' - Controls rate of fire, range, targeting priority, damage, and everything else for all weapons. Orbital Abilities and healing weapons are also included here.
* '''\GameCore\ModuleTemplates\ConstructionLists\''Sample.csv''''' - Controls what units and structures are build able in a ConstructionLists.
* '''\Formations\FlockerTemplates.csv''' - Controls movement profiles for units.
* '''\Physics\RigidBodyTemplates.csv''' - Controls physics for units, affecting things such as pathing.
* '''\UIText\BuildingText.csv''' - Holds text strings used for in-game display of building names and descriptions
* '''\UIText\UnitText.csv''' - Holds text strings used for in-game display of unit names and descriptions
* '''\UIText\ModuleText.csv''' - Holds text strings used for in-game display of weapon modules and Orbital Abilities
* '''\UIText\Text.csv''' - Holds text strings used for game UI and other miscellaneous things.  


=== [[File:ModGuide 7.png|right|300px|ModGuide 7.png]]File Mod Example ===


{{SectionTemplate
|h=h4
|title=File Mod Example
|content=
}}
There 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|UnitTemplates.csv]]'''.
There 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|UnitTemplates.csv]]'''.


[[File:ModGuide 8.png|thumb|right|200px|UnitTemplates.csv]]
[[File:ModGuide 8.png|thumb|right|200px|UnitTemplates.csv]]


In this screenshot I’ve opened [[UnitTemplates.csv|UnitTemplates.csv]] 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.
In this screenshot the file [[UnitTemplates.csv|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 we can see:


There are a lot of fields that can be modified. In this screenshot you can see:
*Max HPs  
*Max HPs  
*Max Energy  
*Max Energy  
Line 100: Line 98:
*Construction Time  
*Construction Time  


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_T1_Light is the Brute, 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.
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'''.
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'''.
Line 108: Line 106:
[[File:ModGuide 9.png|thumb|right|200px|UnitTemplates.csv, modded]]
[[File:ModGuide 9.png|thumb|right|200px|UnitTemplates.csv, modded]]


I’ve reduce the [[Metal|Metal]], [[Radioactives|Radioactives]], [[Logistics|Logistics]] and [[Construction_time|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.
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.
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.
Line 124: Line 122:
[[File:ModGuide 12.png|thumb|right|200px|Pewpewpew!]]
[[File:ModGuide 12.png|thumb|right|200px|Pewpewpew!]]


I had to adjust away from my typical [[Artemis|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 [[Apollo|Apollos]] to counter the AI’s strike fleets of [[Aircraft|aircraft]] that nearly cost me the game.
I had to adjust away from my typical [[Artemis|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 [[Apollo|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|dreadnoughts]] fighting their way up that hill, and the explosions, missile trails and laser blasts cut through and won 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.
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.
Line 136: Line 134:
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.
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 Mod ===


It is also possible to add a custom map to a Mod. &nbsp;The in-game map editor will always create a map in the default \Assets\Maps\<mapname> directory. &nbsp;To include that map in your mod, once created you'll need to move the entire map directory into your <ModName>\Maps directory. &nbsp;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.
{{SectionTemplate
|h=h4
|title=Adding a new Map to a Mod
|content=
}}
It 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.2) ===


The Ashes developers are working to expand Modding support, however there are a few significant limtations to the existing modification support.
{{SectionTemplate
|h=h4
|title=Current Limitations (Ashes 2.7)
|content=
}}
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.
The following files from the Ashes \Assets\ directory are currently NOT modifiable.
 
*'''\Audio\''': Contains the audio used for in game effects and voice overs.
*'''\Units\''': Contains the models and textures for all the units in the game.  
*'''\Units\''': Contains the models and textures for all the units in the game.  
*'''\Buildings\''': Contains the models and textures for all the buildings in the game.  
*'''\Buildings\''': Contains the models and textures for all the buildings in the game.  
*'''\Formation\[[FlockerTemplates.csv|FlockerTemplates.csv]]''': Controls the Max Acceleration, Max Velocity, and other movement related parameters.  
Several gameplay features are currently drawn from game code and not able to be modified via the csv files:
*'''\Physics\[[RigidBodyTemplates.csv|RigidBodyTemplates.csv]]''': Controls the physics collision dimensions and mass.
* '''Dreadnought Upgrades'''
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.
* '''Orbital Abilities'''
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
* '''Quantum Upgrades'''
Values for the Quantum Upgrades such as the cost and bonus can be modified, but changing the utility and availability is not configurable


=== Safe Mode ===


If your Ashes instalation with Mods gets into a state where the game fails to load. It is possible to still load the game via safe mode. &nbsp;Safe mode will not load any mods, but will still present the user interface for enabling and disabling mods. &nbsp;You can open the interface, disable the offending Mod, and restart Ashes in the normal mode.
{{SectionTemplate
|h=h4
|title=Safe Mode
|content=
}}
If 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.
To start safe mode, select the option from the launch menu in steam, or add "-safe" to the command line arguments.


== Scripting – Creating Scenarios ==
[[Scripting|Scripting]] allows you a huge amount of control over what exactly happens on the map you are creating. You can [[Restrict|restrict]] what [[Buildings|buildings]] and [[Units|units]] the players can use, set up [[Triggers|Triggers]] to lock or unlock them, spawn units or buildings for the players or their enemies. You can send units to attack specific targets and send [[Dialog|dialog]] popups to the player. Everything you need to make your own custom [[Scenarios|Scenarios]].


All of this is stored in XML, not code. So you don’t need any special programming tools or experience to use it. The best advice for seeing what is possible is to look through the \Assets\Campaign\ and \Scenario\ directories and see what the xml files are doing. Some examples are also included below.
{{SectionTemplate
|h=h3
|title=Creating New Units (Work-in-progress)
|content=
}}
With Escalation 2.4, modders are able to introduce their own custom units into the game as mods.


There are three main elements in Ashes scripting: [[Missions_(scripting)|missions]], [[Player_(scripting)|players]] and [[Triggers|triggers]]. Missions are the definition or the scenario. Players defines the players that are going to be used in the scenario. Triggers are where all the magic happens. Triggers have a lot of elements and options.
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.


Note that all triggers and arguments are case-sensitive.
Download the tools required to build a unit mod from here: http://downloads.ashesofthesingularity.com/AshesModdingTools.zip


=== Mission Definition ===
Download the "LittleBoy" sample mod from here: http://downloads.ashesofthesingularity.com/AshesSampleMod.zip


First, you set up all the menu-related items (what icons/art to use in the Ascendancy Wars screen, etc) and global settings like enabling/disabling creeps and hiding terrain, using a [[Missions_(scripting)|<Mission> tag]].


=== Player Definition ===
{{SectionTemplate
|h=h4
|title=The Anatomy of a Unit
|content=
}}
In 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:


To do much of anything, you'll need to define [[Player_(scripting)|players]] next. This is done with individual <Player> tags that enable or disable their AI, sets faction, team, and color, etc.
You'll likely refer to these players later in the script by number, where 0 is the first player defined, 1 is the next, and so on.
=== Triggers ===
[[Triggers|Triggers]] are what control anything you want to happen while the scenario is being played, from spawning starting base to calling waves of attacking enemies or giving players objectives. There are several types of triggers which activate off of different events.
=== Trigger Types ===
These are the types of triggers you can use in a script, and any specific arguments they support.
*'''[[Area_Trigger|Area]]''' - Fires when the human player moves a unit into the area.
*'''[[Build_Trigger|Build]]''' - Fires when a human player builds structures or units.
*'''[[Destruction_Trigger|Destruction]]''' - Fires when something specific dies.
*'''[[Difficulty_Trigger|Difficulty]]''' - Fires at the beginning of a scenario if the given difficulty was chosen
*'''[[NamedCreate_Trigger|NamedCreate]]''' - Fires when a specific unit or building is spawned via a script.
*'''[[Research_Trigger|Research]]''' - Fires when a player researches a Quantum Upgrade
*'''[[Timer_Trigger|Timer]]''' - Fires after a delay.
*'''[[Var_Trigger|Var]]''' - Fires if a variable meets given criteria
*'''[[ZoneCapture_Trigger|ZoneCapture]]''' - Fires when a region is captured.
&nbsp;
=== Commands ===
These are the [[Script_Commands|commands]] you can put within a trigger to create gameplay effects.
See the [[Script_Commands|main Commands entry]] for details.
*'''[[ActivateTrigger|ActivateTrigger]]''' - Activate another trigger (also can be used to activate the trigger it is called from, making a repeating trigger).
*'''[[AreaIndicator|AreaIndicator]]''' - This places a visible indicator on the map to help the player know where they should go to.
*'''[[AttackAttackMove|AttackAttackMove]]''' - Order an army to move to a specific area, engaging enemies along the way.
*'''[[AttackUnit|AttackUnit]]''' - Order an army to attack a specific script-spawned unit
*'''[[Camera|Camera]]''' - Move the player's view to a specific area.
*'''[[CaptureNearestNext|CaptureNearestNext]]''' - Order an army to capture the nearest neutral or enemy-controlled region
*'''[[CaptureNearest|CaptureNearest]]''' - Order an army to clear its order queue and capture the nearest neutral or enemy-controlled region (note: ordered unit will stop moving if region is captured before it gets there)
*'''[[ChangeAIDifficulty|ChangeAIDifficulty]]''' - Change an AI player's difficulty setting
*'''[[ChangeAIPersonality|ChangeAIPersonality]]''' - Change an AI player's personality
*'''[[DestroyBuilding|DestroyBuilding]]''' - Destroys a specific script-spawned building.
*'''[[DestroyUnit|DestroyUnit]]''' - Destroys a specific script-spawned unit.
*'''[[Dialog|Dialog]]''' - This creates a popup that can convey information or story to the player. Use with <Entry> tags.
*'''[[Entry|Entry]]''' - The actual text that will be displayed. Use only within <Dialog> tags.
*'''[[EndMission|EndMission]]''' - Use to force a win or loss of the scenario.
*'''[[GrantStuff|GrantStuff]]''' - Give a player free resources
*'''[[GrantTech|GrantTech]]''' - Give a player a free Quantum Upgrade
*'''[[HidePanel|HidePanel]]''' - Hide UI panels
*'''[[LetterBox|LetterBox]]''' - disable commands and go to a cinematic, letterbox view
*'''[[MoveUnit|MoveUnit]]''' - Move an army to a location without stopping to fight
*'''[[Objective|Objective]]''' - Use this to set objective notifications for the player (so they know what to do).
*'''[[Restrict|Restrict]]''' - To block the player from being able to access objects in the game.
*'''[[Reveal|Reveal]]''' - Reveal the fog of war over a location
*'''[[SpawnBuilding|SpawnBuilding]]''' - Places a building on the map.
*'''[[SpawnUnit|SpawnUnit]]''' - Places a unit on the map.
*'''[[Var_Command|Var]]''' - Set or modify a variable. Tip: Set any variable you want to use to 0 in the initial setup trigger to avoid unpredictable results. ''All values must be integers.''
== Position Coordinates ==
The UI for Ashes is defined in XML, it is as moddable as the rest of the game. But we just want to make one small change, we want the game to show us the [[Coordinates|coordinates]]. Fortunately there is already a field for that in the UI, it’s just marked hidden. You will find the following toward the end of '''[[AshesGameView.xml|AshesGameView.xml]]''':
[[File:ModGuide 28.png|center|Changing the XML to show locations]]
To have the coordinates be displayed in game, change this to Hidden=”0”. 0 typically means False and 1 means True so by setting it to 0 we are setting it to “Not Hidden”. You may also want to reduce the FontSize, 20 tends to be fairly large but that is up to you.
This will help you get the exact coordinates when you are playing with your map to figure out where you want to place resources, starting locations for player, where you want events or trigger or where you want to spawn new units.
== Trigger Examples ==
A single trigger can do any combination of the above options. It can popup some text, spawn some units, set an objective give the player some resources and unlock some new building options. It is up to you how you want to combine and use them. Let’s take a look at some examples.
=== Send an army to attack ===
[[File:ModGuide 29.png|frame|center|An attack trigger]]<br/> The above trigger is inactive, meaning it needs another trigger to call it before it will activate. Once it does it will spawn 16 units into an army and send them to attack the defined map position. This is a relatively simple trigger, but a common one. With this alone you can create scenarios that spawn waves to attack the player, grant reinforcements to the player or create surprise ambushes.
=== Reward the player for capturing an area ===
[[File:ModGuide 30.png|frame|center|A region capture trigger]]<br/> The above trigger occurs when the player captures the region at the specified position. Notice that the trigger starts inactive, so it would need to be enabled by an earlier trigger before it could occur.
This trigger does the following:
*Checks the Cap_C_Obj objective in the player’s objective list.
*It disables the Cap_B_Ind Area Indicator by setting it’s duration to 0.
*It pops up some dialog for the player.
*It enables the player’s ability to build Metal Extractors.
*It spawns a free Engineer for the player.
*It moves the camera to look at the captured region.
*It adds a new objective for the player (Mex_Built_Obj).
*It gives the player 500 Metal.
*It makes the Cap_C_Trigger trigger active.
This is a great example of the kind of combinations that can be done with the trigger system. This is a reward to the player for capturing the region. But it could as easily have triggered an escalation for the enemy forces.
&nbsp;
&nbsp;
== Creating New Units&nbsp;(Work-in-progress) ==
With Escalation 2.4, modders are&nbsp;able to introduce their own custom units into the game as mods.&nbsp;
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&nbsp;called the "Little Boy". The Little Boy&nbsp;<ref name="Little Boy">Little Boy - [https://en.wikipedia.org/wiki/Little_Boy https://en.wikipedia.org/wiki/Little_Boy]</ref>, named after the&nbsp;first atomic bomb deployed during World War II, is a Tier 3 unit that&nbsp;shoots nuclear warheads from its single turret.&nbsp;
&nbsp;
=== The Anatomy of a Unit ===
In order for a unit to appear in-game, a series of data (used to configure the visual aspect of the unit)&nbsp;and texture files must exist in the mod's folder structure. These files are:
*Unit.AssetGroup
*{AssetName}.MeshDesc
*{AssetName}.Palette
*{AssetName}_TimelineSet.xml
*{AssetName).FBX  
*{AssetName).FBX  
*Texture Files (these are .dds files in various different formats)  
*Textures (these are .dds files in various formats)  
**Ambient Occlusion  
**Ambient Occlusion  
**Diffuse  
**Diffuse  
Line 305: Line 202:
**Material Masks  
**Material Masks  
**Team Color Masks  
**Team Color Masks  
*{AssetName}.MeshDesc
*{AssetName}.Palette
*{AssetName}_TimelineSet.xml
*Unit.AssetGroup


<!--
{{SectionTemplate
|h=h5
|title=The AssetGroup File
|content=
}}


&nbsp;
{{SectionTemplate
 
|h=h5
=== The AssetGroup File ===
|title=The MeshDesc File
 
|content=
&nbsp;
}}
 
&nbsp;
 
&nbsp;
 
=== The MeshDesc File ===
 
&nbsp;
 
&nbsp;
 
&nbsp;
 
=== The Palette File ===
 
&nbsp;
 
&nbsp;
 
&nbsp;
 
=== The TimelineSet File ===
 
&nbsp;
 
&nbsp;


&nbsp;
{{SectionTemplate
|h=h5
|title=The Palette File
|content=
}}


=== The FBX File ===
{{SectionTemplate
|h=h5
|title=The TimelineSet File
|content=
}}
-->


&nbsp;
{{SectionTemplate
|h=h4
|title=Design Guidelines for the 3D Model
|content=
}}
*Unit of Measurement: Centimeters (as a point of reference, the Nemesis is 56.75 cm long)
*Ideal Triangle/Quad counts:
**T1 Units:
**T2 Units: 5,000 - 15,000 tris / 2,500 - 7,500 quads
**T3 Units: 40,000 - 60,000 tris / 20,000 - 30,000 quads
**T4 Units: 40,000 - 60,000 tris / 20,000 - 30,000 quads
**Buildings: 45,000 - 55,000 tris / 22,500 - 27,500 quads or less
*All models must be exported as a .FBX file with the triangulation option enabled. If the geometry is not triangulated, an error will be occur during the baking process.
*Each mesh should have its own UV sets.
*In general, every unique mesh should have it's own "palette" (which is represented as a record in an asset's .Palette file) and set of textures. Though, there are some cases where multiple meshes should share the same palette and texture files (i.e. a unit that has multiple guns that are identical).
*Each mesh is required to have a 2nd UV set. This 2nd UV set is used to map a faction specific overlay texture to the model. This overlay texture provides additional details to units (i.e hull patterns). More information about this 2nd UV set will be provided in later sections of this guide. Best practice is to have the 2nd UV set be a copy of the primary UV set. Whenever making changes to the UVs, be sure to reflect the changes in the 2nd UV set (this will likely involve deleting the existing 2nd UV set and recreating it as a copy of the 1st).
*Every model must have a top-level mesh called "Root". All other meshes (i.e. guns, turrets, arms, etc.) must be child meshes beneath this parent "Root" mesh.


&nbsp;


&nbsp;
{{SectionTemplate
|h=h4
|title=Texture Authoring Guidelines and Best Practices
|content=
}}
*Author your textures in 4K resolution (3840 x 2160) and scale them down from there when getting them into the game.
**It is advised to NOT use 4K textures for your units in-game as they will likely have a negative impact on the performace of the game due to the large amount of VRAM needed.
*Export your textures from whatever authoring software you are using (i.e. Maya, Substance Designer, etc.) in 3-channel (RGB, no alpha) .tif format.
**Ashes: Escalation expects all textures used in-game to be in .DDS format, but it is a good idea to maintain a "source" copy of your textures in .tif format as they're much easier to iterate on than .dds files. When you're ready to get your textures into the game, you should follow the process described in the following Required Textures and How to Convert Them To DDS Format section for how to generate the .dds version of your textures.
*The best size for your textures covering the main body portion of your new unit (most likely the "Root" mesh) is 2K.
**Of course, there is nothing to stop you from scaling textures down even further if they looks good enough in-game at a smaller size. But, 2K is a good starting point, and at the same time it is definitely a size you don't want to surpass.
*The textures for all the other parts of your unit that are small, like turrets, should be at least 1/2 the size of the main body textures. So, if your main body textures are 2K, your turrets should be no larger than 1K.
**If the turrets are small enough, it is a good idea to experiment with smaller sized textures, like 512 and 256.
*Be sure your textures are sized in increments of the power of 2 so that MIPs can be properly generated during the DDS conversion process.


&nbsp;
=== Required Textures and How to Convert Them To DDS Format ===


{{SectionTemplate
|h=h4
|title=Required Textures and How to Convert Them To DDS Format
|content=
}}
The following textures are required to be defined in the unit's Palette file, and must have the provided DDS format:
The following textures are required to be defined in the unit's Palette file, and must have the provided DDS format:
*Ambient Occlusion - BC4_UNORM ''(ex. Root_AO.dds in the LittleBoy mod)''  
*Ambient Occlusion - BC4_UNORM ''(ex. Root_AO.dds in the LittleBoy mod)''  
*Diffuse - BC7_UNORM&nbsp;''(ex. Root_Color.dds in the LittleBoy mod)''  
*Diffuse - BC7_UNORM ''(ex. Root_Color.dds in the LittleBoy mod)''  
*Curvature - BC5_UNORM ''(ex. Root_Curvature.dds in the LittleBoy mod)''  
*Curvature - BC5_UNORM ''(ex. Root_Curvature.dds in the LittleBoy mod)''  
*World Space Normals - R10G10B10A2_UNORM&nbsp;''(ex. Root_Normals.dds in the LittleBoy mod)''  
*World Space Normals - R10G10B10A2_UNORM ''(ex. Root_Normals.dds in the LittleBoy mod)''  
*Material Masks -&nbsp;BC4_UNORM&nbsp;''(ex. Root_Material_MaskArray.dds in the LittleBoy mod)''  
*Team Color Masks - BC4_UNORM ''(ex. Root_TeamColor_MaskArray.dds in the LittleBoy mod)''  
*Team Color Masks -&nbsp;BC4_UNORM&nbsp;''(ex. Root_TeamColor_MaskArray.dds in the LittleBoy mod)''  
*Material Masks - BC4_UNORM ''(ex. Root_Material_MaskArray.dds in the LittleBoy mod)''  
 
&nbsp;
 
As a best practice, it is&nbsp;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).&nbsp;
 
&nbsp;


==== The Material Masks Texture ====
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).


&nbsp;


&nbsp;
{{SectionTemplate
|h=h5
|title=The Team Color Masks Texture
|content=
}}
When 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:
*TC1 - The primary team color mask. Anywhere there is white in this mask, team color #1 will show up.
*TC2 - The secondary team color mask. Anywhere there is white in this mask, team color #2 will show up.
*TC3 - The trim team color mask. Anywhere there is white in this mask, team color #3 will show up.
*Decal - The decal mask. Anywhere that this mask is white, the Diffuse texture is used directly as the color. This mask is will appear on top of TC1, TC2 and TC3 and is the way you would include markings (or "decals") and any other area on your unit that should remain the same color, regardless of the team colors picked by the player.


==== 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):


&nbsp;
#(Lines 1-9) Run the texconv.exe tool against each set of TC1, TC2, TC3 and Decal mask files created for each of your palettes (reference the \Units\PHC\LittleBoy\LittleBoy.Palette file for which Palettes have been defined for the LittleBoy mod)
#(Lines 12 & 13) Run the oxtexturetool.exe tool against each set of converted TC1, TC2, TC3 and Decal files output by the texconv.exe tool. Note that the -o argument passed to the oxtexturetool command is the name of the output mask array file you want generated.


&nbsp;
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.


[provide Tools package that contains OxTextureTool, TexConv, EasyBake&nbsp;and some .bat script files]
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.


&nbsp;
<!-- [provide Tools package that contains OxTextureTool, TexConv, EasyBake and some .bat script files] -->


&nbsp;


=== Baking the Normals ===
{{SectionTemplate
|h=h5
|title=The Material Masks Texture
|content=
}}
PHC Unit Materials
*MM1 – Painted Metal
**This is meant to represent a painted surface.
**Most of a PHC unit uses this material. This material responds to the TeamColor_MaskArray texture as follows:
***Base color of Painted Metal is a constant mid-grey color (hard coded)
***TC1 – Team color 1, the primary team color. Anywhere this is white, teamcolor 1 will show up.
***TC2 – Team color 2, secondary team color. Anywhere this is white, teamcolor 2 will show up.
***TC3 – Team color 3, trim team color. Anywhere this is white, teamcolor 3 will show up.
***Decal – Decal mask, anywhere that this mask is white it uses the ColorMap directly as the diffuse color. This overrides all the other teamcolor masks.
***Unlike material masks, you won’t get overbright textures if these masks overlap, you’ll just get overlap like layers in Photoshop, in this order (top down):
****Decal
****TC3
****TC2
****TC1
****Base color
*Painted Metal is affected by the Curvature Map in that edges will be worn off to expose MM2 (Bare Metal).
*Painted Metal also uses the panel detail texture found in Assets/Material/PHC_Unit_Panels.dds that has the following channels:
**R – Panel dirt
**G – Panel edge-wear
**B - AO
**A – Overall color variation
***White means lighten the color
***50% Grey means do not change the color
***Black means darken the color
*MM2 – Bare Metal
**Dark silvery material.
**This material uses the Curvature map and panel-detail map to darken the metal in crevices and shine and brighten it on edges.
**This material does not respond to the Color map in any way.
*MM3 – Emissive
**Glowing parts of the model (running lights, etc.)
**The brightness of the emissive lights is set in the material. However, the material reacts to the Color map by multiplying it in. You can set up the color you want the emissive to be by coloring that area of the Color map. Generally those have been set up with a fade around the edges to make the glow look softer and mip-map more nicely with distance.
*MM4 – EngineEmissive
**Glowing parts of the hover pods/engines
**This works much the same way the MM3 Emissive material works, but it uses the color map slightly differently. It multiplies the Color map as a grey-scale value with the engine color for that team (set up with the team colors). You still get the effect of the edge fading like regular emissives, but not the color tinting.
**The overall brightness of the Engine Emissive material is scaled by the amount of “thrust” being applied to the object. Engines brighten when the unit is moving itself, darken when it’s not.
*Dust – This is not directly controlled by artists. A combination of factors determine where dust is applied, the dust overlays all other materials (except emissives).


&nbsp;


&nbsp;
{{SectionTemplate
|h=h5
|title=The FBX File
|content=
}}
The 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.


=== Baking the Asset into the Game ===
<!--
{{SectionTemplate
|h=h3
|title=Baking the Normals
|content=


&nbsp;
}}


&nbsp;
{{SectionTemplate
|h=h4
|title=Baking the Asset into the Game
|content=


=== Troubleshooting ===
}}
-->


&nbsp;
{{SectionTemplate
|h=h3
|title=Troubleshooting
|content=
}}
Fatal Error: Assert Fail: pMesh->GetPolygonSize(0) == Model::eNumIndiciesPerPoly File


&nbsp;
Models are required to have triangulated polygons.


=== When To Create Additional LODs ===
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:


&nbsp;
You will need to install the Visual C++ Redistributable for Visual Studio 2015: https://www.microsoft.com/en-US/download/details.aspx?id=48145


&nbsp;
<!--
{{SectionTemplate
|h=h3
|title=When To Create Additional LODs
|content=


&nbsp;
}}
-->


[[Category:Modding]]
[[Category:Modding]]
<references />

Latest revision as of 10:17, 5 October 2021

Modders Guide

This page provides information for players looking to create mods for the game. We have separate guides for the Map Editor and Scenario Editor

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 Files

Just 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:

  • GameCore- The home of the most critical files, definitions for all the games units, buildings, weapons, orbital abilities, etc. This directory isn't additive, you make changes by replacing the file you want to change with a new one. For example, if you want to modify the hit points on the Zeus your mod will need to include a new UnitTemplates.csv file with the hit point value for the Zeus changed.
  • Maps- For adding new maps with the mod.
  • Scenario- For adding new scenarios with the mod. It is possible to modify existing scenarios with mods (by using the same name as that scenario file) but adding new scnearios with new names will be more common.
  • UI- So a modder can add new art referred to by the Scenario file.
  • UIText- For adding or changing existing text. Files placed here are additive (they don't need to replace an existing file). If you want to change a text string from the base game just include that string in your new text file and it will overwrite it.

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.

RTENOTITLE

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:

[AshesMod]
Name=Balance Mod
Author=Rob Brink
Description=This is a Balance mod that also includes the Weehawken Scenario.
Version=1.1.10

This is purely informational, its what is displayed by the mod on the mod screen.

ModScreen.png
ModScreen.png

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 Modding

All 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:

  • \GameCore\BuffTemplates.csv - Controls the value of Dreadnought buffs.
  • \GameCore\BuildingTemplates.csv - Controls build time, cost, armor, HP, and more for all buildings.
  • \GameCore\BuildingUpgrades.csv - Upgrade path for base defenses.
  • \GameCore\DefaultPlayerAI.xml - Controls difficulty handicaps, personality types and armies built by the AI.
  • \GameCore\Research.csv - Pricing of Quantum Upgrades.
  • \GameCore\UnitPanel.csv - Controls the interface of build menus.
  • \GameCore\UnitTemplates.csv - Controls build time, cost, armor, HP, and more for all units.
  • \GameCore\WeaponVisual.csv - Controls visual weapon alignment and other weapon cosmetics.
  • \GameCore\ModuleTemplates\BuildingModules\Sample.csv - Controls which weapons and ConstructionModules structures have.
  • \GameCore\ModuleTemplates\UnitModules\Sample.csv - Controls which weapons, ConstructionModule and SteeringModules units have.
  • \GameCore\ModuleTemplates\ConstructionModuleTemplates.csv - Controls which ConstructionLists a ConstructionModule uses.
  • \GameCore\ModuleTemplates\DroneBayModuleTemplates.csv - Controls which drones or other units are spawned by units such as Drone Hives.
  • \GameCore\ModuleTemplates\ResourceModuleTemplates.csv - Controls the amount of resources and storage generated by structures and upgrades.
  • \GameCore\ModuleTemplates\SteeringModuleTemplates.csv - Controls the movement behaviour of units when engaging the enemy such as desired attack range.
  • \GameCore\ModuleTemplates\WeaponModuleTemplates.csv - Controls rate of fire, range, targeting priority, damage, and everything else for all weapons. Orbital Abilities and healing weapons are also included here.
  • \GameCore\ModuleTemplates\ConstructionLists\Sample.csv - Controls what units and structures are build able in a ConstructionLists.
  • \Formations\FlockerTemplates.csv - Controls movement profiles for units.
  • \Physics\RigidBodyTemplates.csv - Controls physics for units, affecting things such as pathing.
  • \UIText\BuildingText.csv - Holds text strings used for in-game display of building names and descriptions
  • \UIText\UnitText.csv - Holds text strings used for in-game display of unit names and descriptions
  • \UIText\ModuleText.csv - Holds text strings used for in-game display of weapon modules and Orbital Abilities
  • \UIText\Text.csv - Holds text strings used for game UI and other miscellaneous things.


File Mod Example

There 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.

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:

  • Max HPs
  • Max Energy
  • Energy Per Second
  • Armor
  • Heal Rate
  • Max Shields
  • Shield Regen Rate
  • Radar Radius
  • Cost Metal
  • Cost Data
  • Cost Energy
  • Cost Logistics
  • Construction Time

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:

UnitTemplates.csv, modded

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.

Swarms of frigates!

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.

Pew! Pew pew!

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.

Pewpewpew!

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:

A .csv file in Notepad++

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 Mod

It 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.

  • \Audio\: Contains the audio used for in game effects and voice overs.
  • \Units\: Contains the models and textures for all the units in the game.
  • \Buildings\: Contains the models and textures for all the buildings in the game.

Several gameplay features are currently drawn from game code and not able to be modified via the csv files:

  • Dreadnought Upgrades

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.

  • Orbital Abilities

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

  • Quantum Upgrades

Values for the Quantum Upgrades such as the cost and bonus can be modified, but changing the utility and availability is not configurable


Safe Mode

If 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 Unit

In 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:

  • {AssetName).FBX
  • Textures (these are .dds files in various formats)
    • Ambient Occlusion
    • Diffuse
    • Curvature
    • World Space Normals
    • Material Masks
    • Team Color Masks
  • {AssetName}.MeshDesc
  • {AssetName}.Palette
  • {AssetName}_TimelineSet.xml
  • Unit.AssetGroup


Design Guidelines for the 3D Model

  • Unit of Measurement: Centimeters (as a point of reference, the Nemesis is 56.75 cm long)
  • Ideal Triangle/Quad counts:
    • T1 Units:
    • T2 Units: 5,000 - 15,000 tris / 2,500 - 7,500 quads
    • T3 Units: 40,000 - 60,000 tris / 20,000 - 30,000 quads
    • T4 Units: 40,000 - 60,000 tris / 20,000 - 30,000 quads
    • Buildings: 45,000 - 55,000 tris / 22,500 - 27,500 quads or less
  • All models must be exported as a .FBX file with the triangulation option enabled. If the geometry is not triangulated, an error will be occur during the baking process.
  • Each mesh should have its own UV sets.
  • In general, every unique mesh should have it's own "palette" (which is represented as a record in an asset's .Palette file) and set of textures. Though, there are some cases where multiple meshes should share the same palette and texture files (i.e. a unit that has multiple guns that are identical).
  • Each mesh is required to have a 2nd UV set. This 2nd UV set is used to map a faction specific overlay texture to the model. This overlay texture provides additional details to units (i.e hull patterns). More information about this 2nd UV set will be provided in later sections of this guide. Best practice is to have the 2nd UV set be a copy of the primary UV set. Whenever making changes to the UVs, be sure to reflect the changes in the 2nd UV set (this will likely involve deleting the existing 2nd UV set and recreating it as a copy of the 1st).
  • Every model must have a top-level mesh called "Root". All other meshes (i.e. guns, turrets, arms, etc.) must be child meshes beneath this parent "Root" mesh.


Texture Authoring Guidelines and Best Practices

  • Author your textures in 4K resolution (3840 x 2160) and scale them down from there when getting them into the game.
    • It is advised to NOT use 4K textures for your units in-game as they will likely have a negative impact on the performace of the game due to the large amount of VRAM needed.
  • Export your textures from whatever authoring software you are using (i.e. Maya, Substance Designer, etc.) in 3-channel (RGB, no alpha) .tif format.
    • Ashes: Escalation expects all textures used in-game to be in .DDS format, but it is a good idea to maintain a "source" copy of your textures in .tif format as they're much easier to iterate on than .dds files. When you're ready to get your textures into the game, you should follow the process described in the following Required Textures and How to Convert Them To DDS Format section for how to generate the .dds version of your textures.
  • The best size for your textures covering the main body portion of your new unit (most likely the "Root" mesh) is 2K.
    • Of course, there is nothing to stop you from scaling textures down even further if they looks good enough in-game at a smaller size. But, 2K is a good starting point, and at the same time it is definitely a size you don't want to surpass.
  • The textures for all the other parts of your unit that are small, like turrets, should be at least 1/2 the size of the main body textures. So, if your main body textures are 2K, your turrets should be no larger than 1K.
    • If the turrets are small enough, it is a good idea to experiment with smaller sized textures, like 512 and 256.
  • Be sure your textures are sized in increments of the power of 2 so that MIPs can be properly generated during the DDS conversion process.


Required Textures and How to Convert Them To DDS Format

The following textures are required to be defined in the unit's Palette file, and must have the provided DDS format:

  • Ambient Occlusion - BC4_UNORM (ex. Root_AO.dds in the LittleBoy mod)
  • Diffuse - BC7_UNORM (ex. Root_Color.dds in the LittleBoy mod)
  • Curvature - BC5_UNORM (ex. Root_Curvature.dds in the LittleBoy mod)
  • World Space Normals - R10G10B10A2_UNORM (ex. Root_Normals.dds in the LittleBoy mod)
  • Team Color Masks - BC4_UNORM (ex. Root_TeamColor_MaskArray.dds in the LittleBoy mod)
  • Material Masks - BC4_UNORM (ex. Root_Material_MaskArray.dds in the LittleBoy mod)

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 Texture

When 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:

  • TC1 - The primary team color mask. Anywhere there is white in this mask, team color #1 will show up.
  • TC2 - The secondary team color mask. Anywhere there is white in this mask, team color #2 will show up.
  • TC3 - The trim team color mask. Anywhere there is white in this mask, team color #3 will show up.
  • Decal - The decal mask. Anywhere that this mask is white, the Diffuse texture is used directly as the color. This mask is will appear on top of TC1, TC2 and TC3 and is the way you would include markings (or "decals") and any other area on your unit that should remain the same color, regardless of the team colors picked by the player.

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):

  1. (Lines 1-9) Run the texconv.exe tool against each set of TC1, TC2, TC3 and Decal mask files created for each of your palettes (reference the \Units\PHC\LittleBoy\LittleBoy.Palette file for which Palettes have been defined for the LittleBoy mod)
  2. (Lines 12 & 13) Run the oxtexturetool.exe tool against each set of converted TC1, TC2, TC3 and Decal files output by the texconv.exe tool. Note that the -o argument passed to the oxtexturetool command is the name of the output mask array file you want generated.

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 Texture

PHC Unit Materials

  • MM1 – Painted Metal
    • This is meant to represent a painted surface.
    • Most of a PHC unit uses this material. This material responds to the TeamColor_MaskArray texture as follows:
      • Base color of Painted Metal is a constant mid-grey color (hard coded)
      • TC1 – Team color 1, the primary team color. Anywhere this is white, teamcolor 1 will show up.
      • TC2 – Team color 2, secondary team color. Anywhere this is white, teamcolor 2 will show up.
      • TC3 – Team color 3, trim team color. Anywhere this is white, teamcolor 3 will show up.
      • Decal – Decal mask, anywhere that this mask is white it uses the ColorMap directly as the diffuse color. This overrides all the other teamcolor masks.
      • Unlike material masks, you won’t get overbright textures if these masks overlap, you’ll just get overlap like layers in Photoshop, in this order (top down):
        • Decal
        • TC3
        • TC2
        • TC1
        • Base color
  • Painted Metal is affected by the Curvature Map in that edges will be worn off to expose MM2 (Bare Metal).
  • Painted Metal also uses the panel detail texture found in Assets/Material/PHC_Unit_Panels.dds that has the following channels:
    • R – Panel dirt
    • G – Panel edge-wear
    • B - AO
    • A – Overall color variation
      • White means lighten the color
      • 50% Grey means do not change the color
      • Black means darken the color
  • MM2 – Bare Metal
    • Dark silvery material.
    • This material uses the Curvature map and panel-detail map to darken the metal in crevices and shine and brighten it on edges.
    • This material does not respond to the Color map in any way.
  • MM3 – Emissive
    • Glowing parts of the model (running lights, etc.)
    • The brightness of the emissive lights is set in the material. However, the material reacts to the Color map by multiplying it in. You can set up the color you want the emissive to be by coloring that area of the Color map. Generally those have been set up with a fade around the edges to make the glow look softer and mip-map more nicely with distance.
  • MM4 – EngineEmissive
    • Glowing parts of the hover pods/engines
    • This works much the same way the MM3 Emissive material works, but it uses the color map slightly differently. It multiplies the Color map as a grey-scale value with the engine color for that team (set up with the team colors). You still get the effect of the edge fading like regular emissives, but not the color tinting.
    • The overall brightness of the Engine Emissive material is scaled by the amount of “thrust” being applied to the object. Engines brighten when the unit is moving itself, darken when it’s not.
  • Dust – This is not directly controlled by artists. A combination of factors determine where dust is applied, the dust overlays all other materials (except emissives).


The FBX File

The 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.


Troubleshooting

Fatal 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 />