Difference between revisions of "Modding"

From Stellaris Wiki
Jump to navigation Jump to search
m (Tools & utilities: Link to Species Creator)
(Common folder: +FIOS for Solar System Initializers!?)
(34 intermediate revisions by 12 users not shown)
Line 7: Line 7:
 
This guide is intended to lower the entry barriers to the world of Stellaris modding. However, there is still a learning curve to it, and it cannot replace the need to read some working vanilla code, and do lots of trial and error experimentation!
 
This guide is intended to lower the entry barriers to the world of Stellaris modding. However, there is still a learning curve to it, and it cannot replace the need to read some working vanilla code, and do lots of trial and error experimentation!
  
 +
<div style="float: right;" class="mw-collapsible">{{ModdingNavbox}}</div>
 
__TOC__
 
__TOC__
  
{{Template:ModdingNavbox}}
+
== Guidelines ==
  
==Guidelines==
+
*'''Create a mod for your modifications''': use a [[#Mod structure|personal mod]] even for small changes, and never directly modify the game files in the Steam Stellaris folder, as they may be overwritten without warning.
 
+
*'''Use a good text editor''' (recommended: [https://code.visualstudio.com/ Visual Studio Code]) to edit files and search into multiple files. A good text editor can also format the displayed text so that braces can be collapsed if complete, and complete/incomplete pairs are highlighted.
*'''Create a mod for your modifications''': use a [[#Mod_structure|personal mod]] even for small changes, and never directly modify the game files in the Steam Stellaris folder, as they may be overwritten without warning.
 
*'''Use a good text editor''' (recommended: [https://code.visualstudio.com Visual Studio Code]) to edit files and search into multiple files. A good text editor can also format the displayed text so that braces can be collapsed if complete, and complete/incomplete pairs are highlighted.
 
 
*'''Use the Error.log file to get execution errors''': The log folder can be found right next to the mod folder. Good Editors usually have the ability to track changes to files from outside the program and prompt for a reload, thus showing you errors with one glance at the file. Note that some modifications need a game to be loaded or even the option to be used on screen/in the back-end before their code will run.
 
*'''Use the Error.log file to get execution errors''': The log folder can be found right next to the mod folder. Good Editors usually have the ability to track changes to files from outside the program and prompt for a reload, thus showing you errors with one glance at the file. Note that some modifications need a game to be loaded or even the option to be used on screen/in the back-end before their code will run.
*'''Use CWTools for advanced validation and auto-complete''': CWTools is a syntax validator for Stellaris modding, developed as an extension for Visual Studio Code and also available for Sublime. Read the [https://forum.paradoxplaza.com/forum/index.php?threads/tool-cwtools-a-mod-validating-extension-for-vs-code.1066033/ forum post] by the developer for more info.
+
*'''Use CWTools for advanced validation and auto-complete''': CWTools is a syntax validator for Stellaris modding, developed as an extension for Visual Studio Code and also available for Sublime. Read the [https://forum.paradoxplaza.com/forum/index.php?threads/tool-cwtools-a-mod-validating-extension-for-vs-code.1066033/ forum post] by the developer for more info.
 
*'''Minimize overwrites of vanilla files''', unless that is your main goal or somehow necessary (on_action triggers). Adding separate files and use [[#Game structure|loading from folders]] whenever possible, to improve mod compatibility and maintenance. Your files can have any name, all files in the folder will be loaded by the game. So choose a prefix no one else will ever use like the name of your mod. Even DLC follows that pattern.
 
*'''Minimize overwrites of vanilla files''', unless that is your main goal or somehow necessary (on_action triggers). Adding separate files and use [[#Game structure|loading from folders]] whenever possible, to improve mod compatibility and maintenance. Your files can have any name, all files in the folder will be loaded by the game. So choose a prefix no one else will ever use like the name of your mod. Even DLC follows that pattern.
 
*'''Use a proper merge tool''' (like [http://winmerge.org/ WinMerge], or the Visual Studio Code Extension [https://marketplace.visualstudio.com/items?itemName=L13RARY.l13-diff L13 Diff] ), to [[Merging guide|merge between folders]], and update modified vanilla files to a new vanilla patch.
 
*'''Use a proper merge tool''' (like [http://winmerge.org/ WinMerge], or the Visual Studio Code Extension [https://marketplace.visualstudio.com/items?itemName=L13RARY.l13-diff L13 Diff] ), to [[Merging guide|merge between folders]], and update modified vanilla files to a new vanilla patch.
 
*'''Backup your work''' to avoid losing everything. Consider using a source control system like [https://git-scm.com/ Git] and a collaborative forge like [https://github.com/ GitHub] to manage team collaboration.
 
*'''Backup your work''' to avoid losing everything. Consider using a source control system like [https://git-scm.com/ Git] and a collaborative forge like [https://github.com/ GitHub] to manage team collaboration.
*'''Use UTF-8 encoding''' for text files.
+
*'''Use UTF-8 encoding''' for text and .mod files.
*'''Use UTF-8 with BOM''' for localization, name list, and .mod files.
+
*'''Use UTF-8 with BOM''' for localization and name list files.
 
*'''Indent properly''' and, again, use a good text editor, to easily spot unclosed curly braces. Vanilla uses 1 tab for indentation rather than spaces.
 
*'''Indent properly''' and, again, use a good text editor, to easily spot unclosed curly braces. Vanilla uses 1 tab for indentation rather than spaces.
 
*'''Use comments''' starting with a # character, to remember your reasons for writing tricky stuff.
 
*'''Use comments''' starting with a # character, to remember your reasons for writing tricky stuff.
  
==Mod management==
+
== Mod management ==
 +
 
 
The first steps of modding is getting to know where the mods are located, how they're structured and what to do when uploading your first mod!
 
The first steps of modding is getting to know where the mods are located, how they're structured and what to do when uploading your first mod!
  
===Mod folder location===
+
=== Mod folder location ===
 +
 
 
{| class="wikitable"
 
{| class="wikitable"
| '''OS''' || '''Path'''
+
! OS !! Path
 
|-
 
|-
 
| Linux || <code>~/.local/share/Paradox Interactive/Stellaris/mod</code>
 
| Linux || <code>~/.local/share/Paradox Interactive/Stellaris/mod</code>
 
|-
 
|-
| Windows || <code>C:\Users\<Username>\Documents\Paradox Interactive\Stellaris\mod</code>
+
| Windows || <code>\Documents\Paradox Interactive\Stellaris\mod</code>
 
|-
 
|-
 
| Mac OS ||<code>~/Documents/Paradox Interactive/Stellaris/mod</code>
 
| Mac OS ||<code>~/Documents/Paradox Interactive/Stellaris/mod</code>
 
|}
 
|}
  
Mods from the Steam Workshop will be placed in <code>...\SteamLibrary\SteamApps\workshop\content\281990</code>, sorted by their Workshop ID.<br>
+
Mods from the Steam Workshop will be placed in <code>\SteamLibrary\SteamApps\workshop\content\281990</code>, sorted by their Workshop ID.<br>
 
Mods from Paradox Mods will be placed in the mod folder location, named <code>PDX_*MOD_ID*</code>.
 
Mods from Paradox Mods will be placed in the mod folder location, named <code>PDX_*MOD_ID*</code>.
  
===File and folder structure===
+
=== File and folder structure ===
 +
 
 
Getting the structure set up correctly when creating a mod is essential for it to run properly.
 
Getting the structure set up correctly when creating a mod is essential for it to run properly.
  
 
This is the required structure inside the main mod folder:
 
This is the required structure inside the main mod folder:
* <code>modname.mod</code> - Includes the information used by the Stellaris launcher
+
* <code>modname.mod</code> Includes the information used by the Stellaris launcher
* <code>modname</code> - Folder where all the modified files are placed, in the same [[#Game structure|file and folder structure]] as the game folder
+
* <code>modname</code> Folder where all the modified files are placed, in the same [[#Game structure|file and folder structure]] as the game folder
 
** Mod contents
 
** Mod contents
** <code>descriptor.mod</code> - Required for the [[Patch_2.4|new launcher]] added in patch 2.4
+
** <code>descriptor.mod</code> Required for the [[Patch 2.4|new launcher]] added in patch 2.4. Ignored in the old launcher.
** <code>thumbnail.png</code> - Must be named thumbnail, only PNG files supported
+
** <code>image.ext</code> – PNG and JPEG files are supported. With the new 2.4 launcher, must be a PNG named <code>thumbnail.png</code>
  
 
<code>modname.mod</code> and <code>descriptor.mod</code> both contain the mod information that the launcher uses when displaying the mod and uploading it.<br>
 
<code>modname.mod</code> and <code>descriptor.mod</code> both contain the mod information that the launcher uses when displaying the mod and uploading it.<br>
These files are best kept identical to prevent any missing data, though the <code>path="XXX"</code> is not needed in descriptor.mod.<br>
+
The 2.4 launcher prefers <code>descriptor.mod</code> and will modify <code>modname.mod</code> to match the information in <code>descriptor.mod</code>, however if the file is not found, it'll use the information in <code>modname.mod</code>. The pre-2.4 launcher ignores it.<br>
 +
The <code>path="XXX"</code> is not needed in descriptor.mod.<br>
 
Note that folder and file names are case sensitive on Mac OS X and Linux.
 
Note that folder and file names are case sensitive on Mac OS X and Linux.
 
  
 
'''modname.mod structure'''<br>
 
'''modname.mod structure'''<br>
Line 73: Line 75:
 
| <code>path</code>
 
| <code>path</code>
 
| modname.mod: '''Yes'''<br>descriptor.mod: '''No''' (Ignored)
 
| modname.mod: '''Yes'''<br>descriptor.mod: '''No''' (Ignored)
| Defines which folder is the mod's folder. It is relative to ''...\Documents\Paradox Interactive\Stellaris\'' folder.
+
| Defines which folder is the mod's folder. It is relative to ''\Documents\Paradox Interactive\Stellaris\'' folder.
 
| <code>path="mod/MyStellarisMod"</code>
 
| <code>path="mod/MyStellarisMod"</code>
 
|-
 
|-
Line 79: Line 81:
 
| No
 
| No
 
| Specifies if the mod should be loaded after the listed mod(s), if they exist.<br>Very useful for submods or compatibility patches to make sure they overrule certain mods.
 
| Specifies if the mod should be loaded after the listed mod(s), if they exist.<br>Very useful for submods or compatibility patches to make sure they overrule certain mods.
| <pre>dependencies={
+
|
 +
<pre>
 +
dependencies={
 
"My Other Stellaris Mod"
 
"My Other Stellaris Mod"
 
"Not My Stellaris Mod"
 
"Not My Stellaris Mod"
}</pre>
+
}
 +
</pre>
 
|-
 
|-
 
| <code>picture<code>
 
| <code>picture<code>
Line 91: Line 96:
 
| <code>tags</code>
 
| <code>tags</code>
 
| No
 
| No
| List of tags for [[Steam Workshop]]. Warning: don't forget quotes for tags that contain spaces.
+
| List of tags for [[Steam Workshop]]. Using tags besides the predefined ones may prevent uploading on Paradox Mods.<br>Warning: don't forget quotes for tags that contain spaces.
| <pre>tags={
+
|  
 +
<pre>
 +
tags={
 
"Tag1"
 
"Tag1"
 
"Tag2"
 
"Tag2"
}</pre>
+
}
 +
</pre>
 
|-
 
|-
 
| <code>supported_version</code>
 
| <code>supported_version</code>
Line 107: Line 115:
 
| <code>remote_file_id="1234567890"</code>
 
| <code>remote_file_id="1234567890"</code>
 
|}
 
|}
The data structure is similar to the proprietary Valve Data Format<ref>VDF is a ad-hoc file format designed by Valve to support storage of hierarchical data, which is also used by [https://developer.valvesoftware.com/wiki/SDK_Installation Steam]. Open VDF parser: https://github.com/rossengeorgiev/vdf-parser/, [https://github.com/shravan2x/Gameloop.Vdf for .NET]</ref>
+
The data structure is similar to the proprietary Valve Data Format.<ref>VDF is a ad-hoc file format designed by Valve to support storage of hierarchical data, which is also used by [https://developer.valvesoftware.com/wiki/SDK_Installation Steam]. Open VDF parser: https://github.com/rossengeorgiev/vdf-parser/, [https://github.com/shravan2x/Gameloop.Vdf for .NET]</ref>
  
'''Example modname.mod file:'''<br>
+
'''Example modname.mod file'''
<pre>name="Somemod"
+
<pre>
 +
name="Somemod"
 
path="mod/somemod"
 
path="mod/somemod"
 
dependencies={
 
dependencies={
Line 123: Line 132:
 
picture="thumbnail.png"
 
picture="thumbnail.png"
 
remote_file_id="1234567890"
 
remote_file_id="1234567890"
supported_version="2.4.*"</pre>
+
supported_version="2.4.*"
 +
</pre>
 +
 
 +
=== Adding a thumbnail ===
  
===Adding a thumbnail===
 
 
The Steam Workshop allows for a preview thumbnail picture that'll be displayed when searching for mods and as a preview picture if you haven't uploaded any, otherwise it'll be placed to the right of the preview pictures.<br>
 
The Steam Workshop allows for a preview thumbnail picture that'll be displayed when searching for mods and as a preview picture if you haven't uploaded any, otherwise it'll be placed to the right of the preview pictures.<br>
 
It's recommended to make the thumbnail 512px × 512px at minimum, which is used by the workshop frontpage.<br>
 
It's recommended to make the thumbnail 512px × 512px at minimum, which is used by the workshop frontpage.<br>
Additionally, the thumbnail file should be under '''1 MB''' in size, otherwise, it will not be uploaded.<br>
+
Additionally, the thumbnail file should be under '''1&nbsp;MB''' in size, otherwise, it will not be uploaded.<br>
Both JPEG and PNG are supported, and after 2.4, the image file must be named '''thumbnail'''.
+
Both JPEG and PNG are supported, and after 2.4, the image file must be named '''thumbnail''' and be of type PNG.
 
# Make sure the Stellaris launcher is closed, so that it doesn't revert your changes
 
# Make sure the Stellaris launcher is closed, so that it doesn't revert your changes
 
# Open up <code>modname.mod</code> and <code>descriptor.mod</code> files
 
# Open up <code>modname.mod</code> and <code>descriptor.mod</code> files
# Make sure <code>picture="thumbnail.jpg"</code> exists, if not, add it
+
# Make sure <code>picture="thumbnail.png"</code> exists, if not, add it
 
# Add your image file in your mod folder
 
# Add your image file in your mod folder
 
# Start up the launcher and update your mod
 
# Start up the launcher and update your mod
Line 139: Line 150:
 
You can always update the thumbnail at any time by updating the mod.
 
You can always update the thumbnail at any time by updating the mod.
  
===Creating a mod===
+
=== Creating a mod ===
 +
 
 
You can use the game launcher to set up a the mod structure for you by following these simple steps according to your launcher of choice:
 
You can use the game launcher to set up a the mod structure for you by following these simple steps according to your launcher of choice:
 
{| style="text-align:center;" class="wikitable"
 
{| style="text-align:center;" class="wikitable"
Line 156: Line 168:
 
|5||colspan="2"| Insert the relevant information and click '''Create Mod''' at the bottom
 
|5||colspan="2"| Insert the relevant information and click '''Create Mod''' at the bottom
 
|-
 
|-
|6||colspan="2"| Navigate to the [[#Mod_folder_location|mod folder]] and locate your mod folder
+
|6||colspan="2"| Navigate to the [[#Mod folder location|mod folder]] and locate your mod folder
 
|-
 
|-
 
|7||colspan="2"| Start modding!
 
|7||colspan="2"| Start modding!
 
|}
 
|}
  
===Uploading and updating a mod===
+
=== Uploading and updating a mod ===
 +
 
 
Uploading and updating a mod follows the the same procedure, depending on your launcher of choice:
 
Uploading and updating a mod follows the the same procedure, depending on your launcher of choice:
 
{| style="text-align:center;" class="wikitable"
 
{| style="text-align:center;" class="wikitable"
Line 188: Line 201:
 
|10||colspan="2"|Navigate to the mod service of choice and locate your mod;<br>'''Steam Workshop''', visit the [https://steamcommunity.com/app/281990/workshop/ Workshop] page, and locate the "Files you've posted" button by hovering over "Your Files" on the right<br>'''Paradox Mods''', visit the [https://mods.paradoxplaza.com/ Mods] page, login, and click "My uploaded mods" in the dropdown menu that appears when hovering over your name
 
|10||colspan="2"|Navigate to the mod service of choice and locate your mod;<br>'''Steam Workshop''', visit the [https://steamcommunity.com/app/281990/workshop/ Workshop] page, and locate the "Files you've posted" button by hovering over "Your Files" on the right<br>'''Paradox Mods''', visit the [https://mods.paradoxplaza.com/ Mods] page, login, and click "My uploaded mods" in the dropdown menu that appears when hovering over your name
 
|-
 
|-
|+ style="caption-side:bottom;|* - The inserted description will replace the current one used on the mod page!
+
|+ style="caption-side:bottom; font-size:small;"|* - The inserted description will replace the current one used on the mod page!
 
|}
 
|}
  
==Game data==
+
== Game data ==
 +
 
 
* [[Console commands]], useful for debugging mods.
 
* [[Console commands]], useful for debugging mods.
 
* [[Defines]], which allows you to influence some hardcoded vanilla behaviors
 
* [[Defines]], which allows you to influence some hardcoded vanilla behaviors
Line 199: Line 213:
 
* [[Map]], used for pre-generated galaxy maps
 
* [[Map]], used for pre-generated galaxy maps
  
==Game structure==
+
== Game structure ==
  
 
Below is a list of game files and folders, listed alongside the modding guide for each.
 
Below is a list of game files and folders, listed alongside the modding guide for each.
  
 
==== Stellaris/common/ ====
 
==== Stellaris/common/ ====
{| class = "wikitable"
+
 
 +
{| class="wikitable"
 
!Folder/File
 
!Folder/File
 
!Summary
 
!Summary
 
!Guides
 
!Guides
 
|-
 
|-
| agendas  
+
| agendas
 
| Agendas are given to leader-candidates in Oligarchic government-forms
 
| Agendas are given to leader-candidates in Oligarchic government-forms
 
| [[Agenda modding|Agendas]]
 
| [[Agenda modding|Agendas]]
 +
|-
 +
| ai_budget
 +
| Determine how AI should handle resources.
 +
| [[AI modding|AI]]
 
|-
 
|-
 
| ambient_objects
 
| ambient_objects
 
| References used by code to spawn ambient objects
 
| References used by code to spawn ambient objects
 
| [[Model modding|Models]]
 
| [[Model modding|Models]]
 +
|-
 +
| archaeological_site_types
 +
| Definitions for Archaeological Sites to be discovered and delved by Science Ships.
 +
| [[Ancestral Relics modding|Ancestral Relics]]
 
|-
 
|-
 
| anomalies
 
| anomalies
Line 225: Line 248:
 
| [[Army modding|Armies]]
 
| [[Army modding|Armies]]
 
|-
 
|-
| army_attachments
+
| <del>army_attachments</del> ''(Deprecated)''
| Definitions for attachments that can be added to armies
+
|
| [[Army modding|Armies]]
+
|
 +
|-
 +
| artifact_actions
 +
| Definitions for Artifact Actions.
 +
| [[Ancestral Relics modding|Ancestral Relics]]
 +
|-
 +
| ascension_perks
 +
| Definitions for Ascension Perks.
 +
| [[Tradition modding|Traditions]]
 
|-
 
|-
 
| attitudes
 
| attitudes
Line 233: Line 264:
 
| [[AI modding|AI]]
 
| [[AI modding|AI]]
 
|-
 
|-
| buildable_pops
+
| bombardment_stances
| Definitions for buildable pops. i.e. Robots
+
| Definitions of bombardment stances.
| [[Pops modding|Pops]]
+
| [[Bombardment Stance modding|Bombardment Stances]]
 +
|-
 +
| <del>buildable_pops</del> ''(Deprecated)''
 +
|
 +
|
 
|-
 
|-
 
| buildings
 
| buildings
 
| Setup for buildings constructable on planets, and those given through events
 
| Setup for buildings constructable on planets, and those given through events
 
| [[Building modding|Buildings]]
 
| [[Building modding|Buildings]]
 +
|-
 +
| button_effects
 +
| Definitions for button effects.
 +
| [[Graphics modding|Graphics]]
 +
|-
 +
| bypass
 +
| Definitions for bypasses (gateway, worm hole and l-gate)
 +
| [[Bypass modding|Bypasses]]
 +
|-
 +
| casus_belli
 +
| Definitions for casus belli.
 +
| [[War modding|Wars]]
 +
|-
 +
| colony_automation
 +
| Definitions for colony autobuild types.
 +
| [[Colony Automation modding|Colony Automations]]
 +
|-
 +
| colony_automation_exceptions
 +
| Definitions for colony autobuild types.
 +
| [[Colony Automation modding|Colony Automations]]
 
|-
 
|-
 
| colors
 
| colors
Line 245: Line 300:
 
| [[Country modding|Countries]]
 
| [[Country modding|Countries]]
 
|-
 
|-
| component_flags
+
| <del>component_flags</del> ''(Deprecated)''
| List of flags used by the AI for selecting components
+
|
| [[Ship modding|Ships]]
+
|
 
|-
 
|-
 
| component_sets
 
| component_sets
 
| List of the sets of components used by ships
 
| List of the sets of components used by ships
 +
| [[Ship modding|Ships]]
 +
|-
 +
| component_slot_templates
 +
| Slot templates to be used with ship sections.
 
| [[Ship modding|Ships]]
 
| [[Ship modding|Ships]]
 
|-
 
|-
Line 265: Line 324:
 
| [[Country modding|Countries]]
 
| [[Country modding|Countries]]
 
|-
 
|-
| defines  
+
| decisions
| Basic game behaviors and settings  
+
| Definitions for planetary decisions.
|[[Defines]]
+
| [[Decision modding|Decisions]]
 +
|-
 +
| defines
 +
| Basic game behaviors and settings
 +
| [[Defines]]
 +
|-
 +
| deposit_categories
 +
| Deposit categories relevant to deposit generation.
 +
| [[Planet Generation modding|Planet Generation]]
 
|-
 
|-
 
| deposits
 
| deposits
| Setup for the deposits of resources found on planets
+
| Setup for the deposits of resources found on planets as well as blockers spawned on habitable planets.
| [[Planet modding|Planets]]
+
| [[Planet Generation modding|Planet Generation]]
 
|-
 
|-
 
| diplo_phrases
 
| diplo_phrases
 
| Setup for the logic behind the diplomatic phrases used between countries.
 
| Setup for the logic behind the diplomatic phrases used between countries.
 
| [[AI modding|AI]]
 
| [[AI modding|AI]]
 +
|-
 +
| diplomacy_economy
 +
| Economy units based on diplomacy. Diplomatic upkeeps like influence upkeep of Federations are defined here.
 +
| [[Diplomacy modding|Diplomacy]]
 
|-
 
|-
 
| diplomatic_actions
 
| diplomatic_actions
 
| Setup for the rules for diplomatic actions.
 
| Setup for the rules for diplomatic actions.
| [[Gameplay modding|Gameplay]]
+
| [[Diplomacy modding|Diplomacy]]
 +
|-
 +
| districts
 +
| Definitions for districts.
 +
| [[Building modding|Buildings]]
 +
|-
 +
| economic_categories
 +
| Definitions for economic categories.
 +
| [[Economy modding|Economy]]
 +
|-
 +
| economic_plans
 +
| Definitions for AI economy plans.
 +
| [[AI modding|AI]]
 
|-
 
|-
 
| edicts
 
| edicts
| Setup for the edicts used by planets and countries.
+
| Setup for the edicts used by countries.
 
| [[Edicts modding|Edicts]]
 
| [[Edicts modding|Edicts]]
 
|-
 
|-
Line 296: Line 379:
 
| Sets up the countries and system initializer used for fallen empires
 
| Sets up the countries and system initializer used for fallen empires
 
| [[System modding|Systems]]
 
| [[System modding|Systems]]
 +
|-
 +
| federation_law_categories
 +
| Definitions for federation law categories.
 +
| [[Diplomacy modding|Diplomacy]]
 +
|-
 +
| federation_laws
 +
| Definitions for federation laws.
 +
| [[Diplomacy modding|Diplomacy]]
 +
|-
 +
| federation_perks
 +
| Definitions for federation perks.
 +
| [[Diplomacy modding|Diplomacy]]
 +
|-
 +
| federation_types
 +
| Definitions for federation types.
 +
| [[Diplomacy modding|Diplomacy]]
 +
|-
 +
| galactic_focuses
 +
| Definitions for galactic focuses relevant to the Galactic Community.
 +
| [[Diplomacy modding|Diplomacy]]
 
|-
 
|-
 
| game_rules
 
| game_rules
Line 312: Line 415:
 
| Controls the lighting used for ships, which differs between graphical cultures.
 
| Controls the lighting used for ships, which differs between graphical cultures.
 
| [[Species modding|Species]]
 
| [[Species modding|Species]]
 +
|-
 +
| lawsuits
 +
| Unused.
 +
|
 +
|-
 +
| leader_classes
 +
| Definitions for leader classes.
 +
| [[Leader modding|Leaders]]
 
|-
 
|-
 
| mandates
 
| mandates
 
| Controls the mandates used by factions
 
| Controls the mandates used by factions
 
| [[Mandate modding|Mandates]]
 
| [[Mandate modding|Mandates]]
 +
|-
 +
| map_modes
 +
| Definitions for map modes to be used in the galaxy view.
 +
| [[Map Mode modding|Map Modes]]
 +
|-
 +
| megastructures
 +
| Definations for megastructures.
 +
| [[Megastructure modding|Megastructures]]
 
|-
 
|-
 
| name_lists
 
| name_lists
 
| Sets up the names used for each species.
 
| Sets up the names used for each species.
 
| [[Species modding|Species]]
 
| [[Species modding|Species]]
 +
|-
 +
| notification_modifiers
 +
| A variation of static modifiers. They have no modifiers and can only be added to empires.
 +
| [[Modifiers#Static Modifiers|Static Modifiers]]
 
|-
 
|-
 
| observation_station_missions
 
| observation_station_missions
Line 343: Line 466:
 
| planet_modifiers
 
| planet_modifiers
 
| Spawn chances planet modifiers (f.e. lush, hazardous weather, etc.).
 
| Spawn chances planet modifiers (f.e. lush, hazardous weather, etc.).
| [[Planet modding|Planets]]
+
| [[Planet Generation modding|Planet Generation]]
 
|-
 
|-
 
| policies
 
| policies
 
| AI Policy grabbing (What order they take policies in)
 
| AI Policy grabbing (What order they take policies in)
 
| [[Policies modding|Policies]]
 
| [[Policies modding|Policies]]
 +
|-
 +
| pop_categories
 +
| Definitions for pop categories (social strata).
 +
| [[Pop Job modding|Pop Jobs]]
 
|-
 
|-
 
| pop_faction_types
 
| pop_faction_types
| Population faction types and personalities
+
| Population faction types and personalities
| [[Pops modding|Pops]]
+
| [[Pop Faction modding|Pop Factions]]
 +
|-
 +
| pop_jobs
 +
| Definitions for pop jobs.
 +
| [[Pop Job modding|Pop Jobs]]
 
|-
 
|-
 
| precursor_civilizations
 
| precursor_civilizations
Line 360: Line 491:
 
| Lists of random names for Empires
 
| Lists of random names for Empires
 
| [[Gameplay modding|Gameplay]]
 
| [[Gameplay modding|Gameplay]]
 +
|-
 +
| relics
 +
| Definitions for Relics.
 +
| [[Ancestral Relics modding|Ancestral Relics]]
 +
|-
 +
| resolution_categories
 +
| Definitions for resolution categories relevant to the Galactic Community.
 +
| [[Diplomacy modding|Diplomacy]]
 +
|-
 +
| resolutions
 +
| Definitions for resolutions relevant to the Galactic Community.
 +
| [[Diplomacy modding|Diplomacy]]
 
|-
 
|-
 
| scripted_effects
 
| scripted_effects
| Events that give buffs or de-buffs (effects).
+
| Pre-defined blocks of [[Effects]] to be called elsewhere.
| [[Gameplay modding|Gameplay]]
+
| [[Dynamic modding|Dynamic]]
 +
|-
 +
| scripted_loc
 +
| Pre-defined methods to provide text based on the scoped object's attributes.
 +
| [[Dynamic modding|Dynamic]]
 
|-
 
|-
 
| scripted_triggers
 
| scripted_triggers
| Scripted events and how they trigger.
+
| Pre-defined blocks of [[Conditions]] to be called elsewhere.
| [[Gameplay modding|Gameplay]]
+
| [[Dynamic modding|Dynamic]]
 +
|-
 +
| scripted_variables
 +
| Pre-defined "@" variables to be called from other game files.
 +
| [[Dynamic modding|Dynamic]]
 
|-
 
|-
 
| section_templates
 
| section_templates
| Different Ship AI and how it acts.
+
| Container of components that consist actual ships.
 
| [[Ship modding|Ship]]
 
| [[Ship modding|Ship]]
 +
|-
 +
| sector_focuses
 +
| Types of sectors and how they act.
 +
| [[Colony Automation modding|Colony Automations]]
 
|-
 
|-
 
| sector_types
 
| sector_types
 
| Types of sectors and how they act.
 
| Types of sectors and how they act.
| [[Gameplay modding|Gameplay]]
+
| [[Colony Automation modding|Colony Automations]]
 
|-
 
|-
 
| ship_behaviours
 
| ship_behaviours
Line 389: Line 544:
 
| [[System modding|Systems]]
 
| [[System modding|Systems]]
 
|-
 
|-
| spaceport_modules
+
| <del>spaceport_modules</del> ''(Deprecated)''
|  
+
|
| [[Planet modding|Planets]]
+
|
 
|-
 
|-
 
| special_projects
 
| special_projects
 
|
 
|
 
| [[Special Project modding|Special Projects]]
 
| [[Special Project modding|Special Projects]]
 +
|-
 +
| species_archetypes
 +
| Definitions for species archetypes to give some shared attributes to species classes.
 +
| [[Species modding|Species]]
 
|-
 
|-
 
| species_classes
 
| species_classes
|
+
| Definitions for species classes that are sets of species portraits.
 +
| [[Species modding|Species]]
 +
|-
 +
| species_names
 +
| Definitions for species random names.
 +
| [[Species modding|Species]]
 +
|-
 +
| species_rights
 +
| Definitions for species rights.
 
| [[Species modding|Species]]
 
| [[Species modding|Species]]
|-  
+
|-
 
| star_classes
 
| star_classes
 
| Types of solar systems (NOT individual stars themselves!)
 
| Types of solar systems (NOT individual stars themselves!)
 
| [[System modding|Systems]]
 
| [[System modding|Systems]]
 +
|-
 +
| starbase_buildings
 +
| Definitions for starbase buildings that each starbase can only have one of each of them.
 +
| [[Starbase modding|Starbases]]
 +
|-
 +
| starbase_levels
 +
| Definitions for starbase levels.
 +
| [[Starbase modding|Starbases]]
 +
|-
 +
| starbase_modules
 +
| Definitions for starbase modules.
 +
| [[Starbase modding|Starbases]]
 +
|-
 +
| starbase_types
 +
| Definitions for starbase types. To players, no effects, flavor only. To the AI, a starbase auto-build guide.
 +
| [[Starbase modding|Starbases]]
 
|-
 
|-
 
| start_screen_messages
 
| start_screen_messages
|
+
| Messages that should be shown to the player at the start of the game.
 
| [[Gameplay modding|Gameplay]]
 
| [[Gameplay modding|Gameplay]]
 
|-
 
|-
 
| static_modifiers
 
| static_modifiers
|
+
| Blocks of [[Modifiers]] to be added to objects.
| [[Gameplay modding|Gameplay]]
+
| [[Modifiers#Static Modifiers|Static Modifiers]]
 
|-
 
|-
 
| strategic_resources
 
| strategic_resources
|
+
| Definitions for resources, not just strategic resources.
| [[Planet modding|Planet]]
+
| [[Economy modding|Economy]]
 
|-
 
|-
 
| subjects
 
| subjects
|
+
| Definitions for subject types.
| [[Gameplay modding|Gameplay]]
+
| [[Diplomacy modding|Diplomacy]]
 +
|-
 +
| system_types
 +
| Definitions for system types. No effects, flavor only.
 +
| [[Starbase modding|Starbases]]
 
|-
 
|-
 
| technology
 
| technology
|  
+
| Definitions for technologies.
 
| [[Technology modding|Technology]]
 
| [[Technology modding|Technology]]
 
|-
 
|-
| terraform  
+
| terraform
 +
| Definitions for terraform methods.
 +
| [[Planet modding|Planets]]
 +
|-
 +
| trade_conversions
 +
| Definitions for trade value conversions.
 +
| [[Economy modding|Economy]]
 +
|-
 +
| <del>tile_blockers</del> ''(Deprecated)''
 
|
 
|
| [[Planet modding|Planets]]
 
|-
 
| tile_blockers
 
 
|
 
|
| [[Planet modding|Planets]]
+
|-
 +
| tradition_categories
 +
| Definitions for tradition groups.
 +
| [[Tradition modding|Traditions]]
 +
|-
 +
| traditions
 +
| Definitions for traditions.
 +
| [[Tradition modding|Traditions]]
 
|-
 
|-
 
| traits
 
| traits
|
+
| Definitions for species traits and leader traits.
 
| [[Traits modding|Traits]]
 
| [[Traits modding|Traits]]
 
|-
 
|-
| triggered_modifiers
+
| <del>triggered_modifiers</del> ''(Deprecated)''
 +
|
 
|
 
|
| [[Gameplay modding|Gameplay]]
 
 
|-
 
|-
| war_demand_counters
+
| <del>war_demand_counters</del> ''(Deprecated)''
 +
|
 
|
 
|
| [[War modding|Wars]]
 
 
|-
 
|-
| war_demand_types
+
| <del>war_demand_types</del> ''(Deprecated)''
 
|
 
|
 +
|
 +
|-
 +
| war_goals
 +
| Definitions for war goals.
 
| [[War modding|Wars]]
 
| [[War modding|Wars]]
 
|-
 
|-
 
| achievements.txt
 
| achievements.txt
 +
| Definitions for achievements. Modding this file doesn't make sense, since achievements are disabled for any "common" changing/expanding mods anyway.
 
|
 
|
| None
 
 
|-
 
|-
 
| alerts.txt
 
| alerts.txt
 
|
 
|
| [[Gameplay modding|Gameplay]]
+
| [[Message modding|Messages]]
 
|-
 
|-
 
| message_types.txt
 
| message_types.txt
 
|
 
|
| [[Gameplay modding|Gameplay]]
+
| [[Message modding|Messages]]
 
|-
 
|-
 
|}
 
|}
  
 
==== Stellaris/events/ ====
 
==== Stellaris/events/ ====
{| class = "wikitable"
+
 
 +
{| class="wikitable"
 
!Folder/File
 
!Folder/File
 
!Summary
 
!Summary
Line 473: Line 677:
 
| [[Event modding|Events]]
 
| [[Event modding|Events]]
 
|}
 
|}
 +
 
==== Stellaris/flags/ ====
 
==== Stellaris/flags/ ====
{| class = "wikitable"
+
 
 +
{| class="wikitable"
 
!Folder/File
 
!Folder/File
 
!Summary
 
!Summary
Line 487: Line 693:
 
| [[Flag modding|Flags]]
 
| [[Flag modding|Flags]]
 
|}
 
|}
 +
 
==== Stellaris/fonts/ ====
 
==== Stellaris/fonts/ ====
{| class = "wikitable"
+
 
 +
{| class="wikitable"
 
!File
 
!File
 
!Summary
 
!Summary
Line 497: Line 705:
 
| [[Font modding|Fonts]]
 
| [[Font modding|Fonts]]
 
|}
 
|}
 +
 
==== Stellaris/gfx/ ====
 
==== Stellaris/gfx/ ====
{| class = "wikitable"
+
 
 +
{| class="wikitable"
 
!Folder/File
 
!Folder/File
 
!Summary
 
!Summary
Line 670: Line 880:
  
 
==== Stellaris/interface/ ====
 
==== Stellaris/interface/ ====
{| class = "wikitable"
+
 
 +
{| class="wikitable"
 
!Folder
 
!Folder
 
!Summary
 
!Summary
Line 685: Line 896:
  
 
==== Stellaris/localisation/ ====
 
==== Stellaris/localisation/ ====
{| class = "wikitable"
+
 
 +
{| class="wikitable"
 
!File
 
!File
 
!Summary
 
!Summary
 
!Guides
 
!Guides
 +
|-
 +
| *l_simp_chinese.yml
 +
| Contains Chinese localisation
 +
| [[Localisation modding|Localisation]]
 
|-
 
|-
 
| *l_english.yml
 
| *l_english.yml
Line 720: Line 936:
  
 
==== Stellaris/map/ ====
 
==== Stellaris/map/ ====
{| class = "wikitable"
+
 
 +
{| class="wikitable"
 
!Folder/File
 
!Folder/File
 
!Summary
 
!Summary
Line 735: Line 952:
  
 
==== Stellaris/music/ ====
 
==== Stellaris/music/ ====
{| class = "wikitable"
+
 
 +
{| class="wikitable"
 
!Folder/File
 
!Folder/File
 
!Summary
 
!Summary
Line 749: Line 967:
 
|-
 
|-
 
| songs.txt
 
| songs.txt
|  
+
|
 
| [[Music modding|Music]]
 
| [[Music modding|Music]]
 
|}
 
|}
  
 
==== Stellaris/prescripted_countries/ ====
 
==== Stellaris/prescripted_countries/ ====
{| class = "wikitable"
+
 
 +
{| class="wikitable"
 
!Folder/File
 
!Folder/File
 
!Summary
 
!Summary
Line 769: Line 988:
  
 
==== Stellaris/sound/ ====
 
==== Stellaris/sound/ ====
{| class = "wikitable"
+
 
 +
{| class="wikitable"
 
!Folder/File
 
!Folder/File
 
!Summary
 
!Summary
Line 783: Line 1,003:
 
|}
 
|}
  
==Overwriting Specific Elements==
+
== Overwriting Specific Elements ==
  
Occasionally, it is possible to overwrite a specific game element without needing to replace the entire vanilla file. In some cases adding a element with a similar identifier into another file will duplicate that element for the game. But in other cases, the version that comes first (First In, Only Served; FIOS)/last (Last In, Only Served; LIOS) will be used instead. <ref>https://forum.paradoxplaza.com/forum/index.php?threads/object-types-that-can-be-replaced-in-separate-files.990537/</ref>. The order in which files are processed is based on ASCIIbetical order of the filenames. If the names are the same, they'll be processed based on the reverse-ASCIIbetical order of the mod display name, with vanilla always being first (if it's at the ''top'' of the mod list, it'll be loaded ''last''). Note that if there are multiple mods with the same display name, only the one whose mod file comes first, will be used.
+
Occasionally, it is possible to overwrite a specific game element without needing to replace the entire vanilla file. In some cases adding an element with a similar identifier into another file will duplicate that element for the game. But in other cases, the version that comes first (First In, Only Served; FIOS)/last (Last In, Only Served; LIOS) will be used instead.<ref>https://forum.paradoxplaza.com/forum/index.php?threads/object-types-that-can-be-replaced-in-separate-files.990537/</ref> The order in which files are processed is based on ASCIIbetical order of the filenames. If the names are the same, they'll be processed based on the reverse-ASCIIbetical order of the mod display name, with vanilla always being first (if it's at the ''top'' of the mod list, it'll be loaded ''last''). Note that if there are multiple mods with the same display name, only the one whose mod file comes first, will be used.
  
 
Note that this feature is not documented and thus might be subject to arbitrary changes between versions.
 
Note that this feature is not documented and thus might be subject to arbitrary changes between versions.
  
{{SVersion|2.2}}
+
{{SVersion|2.5}}
===Common Folder===
+
 
 +
=== Common folder ===
 +
 
 
{{box wrapper}}
 
{{box wrapper}}
{| class ="mw-collapsible wikitable" style="float: left; margin-left: 10px;"
+
{| class="mw-collapsible wikitable" style="float: left; margin-left: 10px;"
|+ A-N (Agendas -<br/>Notification Modifiers)
+
|+ A-N (Agendas – Notification<br>Modifiers)
 
|-
 
|-
 
! File Type
 
! File Type
! Overwrite<br/>Type
+
! Overwrite<br>Type
 
! Error Log
 
! Error Log
 
! Notes
 
! Notes
Line 803: Line 1,025:
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| AI Budget
 
| AI Budget
|  
+
|
|  
+
|
|  
+
|
 
|-
 
|-
 
| Ambient Objects
 
| Ambient Objects
|  
+
|
|  
+
|
|  
+
|
 
|-
 
|-
 
| Anomalies
 
| Anomalies
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Armies
 
| Armies
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 +
|-
 +
| Artifact Actions
 +
| LIOS
 +
| Object key already exists
 +
|
 
|-
 
|-
 
| Ascension Perks
 
| Ascension Perks
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Asteroid Belts
 
| Asteroid Belts
|  
+
|
|  
+
|
|  
+
|
 
|-
 
|-
 
| Attitudes
 
| Attitudes
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Bombardment Stances
 
| Bombardment Stances
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Buildings
 
| Buildings
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
| Breaks auto-<br>generated modifiers
 
|-
 
|-
 
| Button Effects
 
| Button Effects
|  
+
|
|  
+
|
|  
+
|
 
|-
 
|-
 
| Bypass
 
| Bypass
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Casus Belli
 
| Casus Belli
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Colony Types
 
| Colony Types
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Colors
 
| Colors
|  
+
|
|  
+
|
|  
+
|
 
|-
 
|-
 
| Component Sets
 
| Component Sets
 
| FIOS
 
| FIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Component Tags
 
| Component Tags
|  
+
|
|  
+
|
|  
+
|
 
|-
 
|-
 
| Component Templates
 
| Component Templates
 
| FIOS
 
| FIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Country Customization
 
| Country Customization
|  
+
|
|  
+
|
|  
+
|
 
|-
 
|-
 
| Country Types
 
| Country Types
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Decisions
 
| Decisions
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
| Defines
+
| style="height: 90px" | Defines
 
| LIOS
 
| LIOS
 
| {{small|''[none]''}}
 
| {{small|''[none]''}}
| The block the define is<br/>in must be included as well.<br/>E.g: ''NGameplay = {<br/>POLICY_YEARS = 10 }''
+
| The block the define is<br>in must be included as well.<br>E.g: ''NGameplay = {<br>POLICY_YEARS = 10 }''
 
|-
 
|-
 
| Deposit Categories
 
| Deposit Categories
|  
+
|
|  
+
|
|  
+
|
 
|-
 
|-
 
| Deposits
 
| Deposits
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Diplomatic Phrases
 
| Diplomatic Phrases
|  
+
|
|  
+
|
|  
+
|
 
|-
 
|-
 
| Diplomatic Economy
 
| Diplomatic Economy
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Diplomatic Actions
 
| Diplomatic Actions
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
| style="height: 43px" | Districts
+
| style="height: 45px" | Districts
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
| Breaks max<br/>districts modifier
+
| Breaks auto-<br>generated modifiers
 
|-
 
|-
 
| Economic Categories
 
| Economic Categories
|  
+
|
|  
+
|
|  
+
|
 
|-
 
|-
 
| Edicts
 
| Edicts
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
| style="height: 43px" | Ethics
+
| style="height: 45px" | Ethics
 
| LIOS
 
| LIOS
 
| {{small|''[none]''}}
 
| {{small|''[none]''}}
| Might break "selected<br/>ethic" graphic
+
| Might break "selected<br>ethic" graphic
 
|-
 
|-
 
| Event Chains
 
| Event Chains
 
| FIOS
 
| FIOS
 
| {{small|''[none]''}}
 
| {{small|''[none]''}}
|  
+
|
 
|-
 
|-
 
| Fallen Empires
 
| Fallen Empires
|  
+
|
|  
+
|
|  
+
|
 
|-
 
|-
 
| Game Rules
 
| Game Rules
 
| LIOS
 
| LIOS
 
| {{small|''[none]''}}
 
| {{small|''[none]''}}
|  
+
|
 
|-
 
|-
 
| Global Ship Designs
 
| Global Ship Designs
|  
+
| FIOS
|  
+
| A ship design already exists
|  
+
|
 
|-
 
|-
 
| Governments
 
| Governments
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| ├───Authorities
 
| ├───Authorities
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| └───Civics
 
| └───Civics
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Graphical Culture
 
| Graphical Culture
|  
+
|
|  
+
|
|  
+
|
 
|-
 
|-
 
| Leader Classes
 
| Leader Classes
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Mandates
 
| Mandates
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Map Modes
 
| Map Modes
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Megastructures
 
| Megastructures
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Name Lists
 
| Name Lists
|  
+
|
|  
+
|
|  
+
|
 
|-
 
|-
 
| Notification Modifiers
 
| Notification Modifiers
|  
+
|
|  
+
|
|  
+
|
 
|}
 
|}
{| class ="mw-collapsible wikitable" style="float: left; margin-left: 10px;"
+
{| class="mw-collapsible wikitable" style="float: left; margin-left: 10px;"
|+ O-Z (Observation Station<br/>Missions - War Goals)
+
|+ O-Z (Observation Station<br>Missions War Goals)
 
|-
 
|-
 
! File Type
 
! File Type
! Overwrite<br/>Type
+
! Overwrite<br>Type
 
! Error Log
 
! Error Log
 
! Notes
 
! Notes
 
|-
 
|-
 
| Observation Station Missions
 
| Observation Station Missions
|  
+
|
|  
+
|
|  
+
|
 
|-
 
|-
| On Actions
+
| style="height: 46px" | On Actions
 
| NO
 
| NO
 
| {{small|''[none]''}}
 
| {{small|''[none]''}}
| Cannot modify<br/>existing entries
+
| Cannot modify<br>existing entries
 
|-
 
|-
 
| Opinion Modifiers
 
| Opinion Modifiers
| LIOS
+
| DUPL/LIOS
 
| {{small|''[none]''}}
 
| {{small|''[none]''}}
|  
+
| <code>add_opinion_modifier</code> is LIOS
 
|-
 
|-
 
| Personalities
 
| Personalities
| LIOS†
+
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Planet Classes
 
| Planet Classes
 
| LIOS
 
| LIOS
 
| {{small|''[none]''}}
 
| {{small|''[none]''}}
|  
+
|
 
|-
 
|-
 
| Planet Modifiers
 
| Planet Modifiers
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Policies
 
| Policies
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Pop Categories
 
| Pop Categories
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Pop Faction Types
 
| Pop Faction Types
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
| Pop Jobs
+
| style="height: 46px" | Pop Jobs
| N/A
+
| LIOS [?]
 
| {{small|''[none]''}}
 
| {{small|''[none]''}}
| Neither entry used
+
| Breaks auto-<br>generated modifiers
 
|-
 
|-
 
| Precursor Civilizations
 
| Precursor Civilizations
|  
+
|
|  
+
|
|  
+
|
 
|-
 
|-
 
| Random Names
 
| Random Names
|  
+
|
|  
+
|
|  
+
|
 
|-
 
|-
 
| Scripted Effects
 
| Scripted Effects
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Scripted Localisation
 
| Scripted Localisation
|  
+
|
|  
+
|
|  
+
|
 
|-
 
|-
 
| Scripted Triggers
 
| Scripted Triggers
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Scripted Variables
 
| Scripted Variables
 
| FIOS
 
| FIOS
 
| Variable name taken
 
| Variable name taken
|  
+
|
 
|-
 
|-
 
| Section Templates
 
| Section Templates
 
| FIOS
 
| FIOS
 
| Duplicate section template found
 
| Duplicate section template found
|  
+
|
 
|-
 
|-
 
| Sector Focuses
 
| Sector Focuses
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Sector Types
 
| Sector Types
|  
+
|
|  
+
|
|  
+
|
 
|-
 
|-
 
| Ship Behaviors
 
| Ship Behaviors
 
| FIOS
 
| FIOS
 
| Behavior name already exists
 
| Behavior name already exists
|  
+
|
 
|-
 
|-
 
| Ship Sizes
 
| Ship Sizes
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Solar System Initializers
 
| Solar System Initializers
|  
+
| FIOS
 
| Initializer already exists
 
| Initializer already exists
|  
+
|
 
|-
 
|-
 
| Special Projects
 
| Special Projects
 
| FIOS
 
| FIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
| Species Archetypes
+
| style="height: 46px" | Species Archetypes
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
| Breaks bonus<br/>trait points modifier
+
| Breaks auto-<br>generated modifiers
 
|-
 
|-
 
| Species Classes
 
| Species Classes
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Species Names
 
| Species Names
|  
+
|
|  
+
|
|  
+
|
 
|-
 
|-
| Species Rights
+
| style="height: 46px" | Species Rights
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
| Effect tooltips are<br/>independent of the effects
+
| Effect tooltips are<br>independent of the effects
 
|-
 
|-
 
| Star Classes
 
| Star Classes
 
| FIOS
 
| FIOS
|  
+
|
|  
+
|
 
|-
 
|-
 
| Starbase Buildings
 
| Starbase Buildings
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Starbase Levels
 
| Starbase Levels
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Starbase Modules
 
| Starbase Modules
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Starbase Types
 
| Starbase Types
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
| Start Screen Messages
+
| style="height: 69px" | Start Screen Messages
|  
+
| FIOS
|  
+
| {{small|''[none]''}}
|  
+
| The first valid part for each<br>location will be used and the<br>rest discarded without issue.
 
|-
 
|-
 
| Static Modifiers
 
| Static Modifiers
 
| FIOS
 
| FIOS
 
| {{small|''[none]''}}
 
| {{small|''[none]''}}
|  
+
|
 
|-
 
|-
 
| Strategic Resources
 
| Strategic Resources
 
| FIOS
 
| FIOS
 
| {{small|''[none]''}}
 
| {{small|''[none]''}}
|  
+
|
 
|-
 
|-
 
| Subjects
 
| Subjects
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| System Types
 
| System Types
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
 
| Technology
 
| Technology
 
| LIOS
 
| LIOS
 
| Duplicate technology
 
| Duplicate technology
|  
+
|
 
|-
 
|-
 
| └───Tiers
 
| └───Tiers
 
| LIOS
 
| LIOS
|  
+
|
|  
+
|
 
|-
 
|-
 
| Terraform (Links)
 
| Terraform (Links)
 
| DUPL
 
| DUPL
 
| {{small|''[none]''}}
 
| {{small|''[none]''}}
|  
+
|
 
|-
 
|-
 
| Trade Conversions
 
| Trade Conversions
Line 1,241: Line 1,468:
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|-
 
|-
| Traditions
+
| style="height: 46px" | Traditions
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
Line 1,251: Line 1,478:
 
| DUPL
 
| DUPL
 
| {{small|''[none]''}}
 
| {{small|''[none]''}}
|  
+
|
 
|-
 
|-
 
| War Goals
 
| War Goals
 
| LIOS
 
| LIOS
 
| Object key already exists
 
| Object key already exists
|  
+
|
 
|}
 
|}
 
{{end box wrapper}}
 
{{end box wrapper}}
FIOS - First in, only served
+
FIOS First in, only served
  
LIOS - Last in, only served
+
LIOS Last in, only served
  
DUPL - Duplicates
+
DUPL Duplicates
  
 +
NO – Cannot individually overwrite
  
Please note that these have not been extensively tested.
+
Please note that not everything could be tested extensively.
  
====Localisation Folder====
+
=== Localisation folder ===
Localisation folder is not consistent.
 
  
Sometimes it's possible to overwrite by LIOS ''and'' FIOS, and other times neither work.
+
Localisation is likely LIOS
  
A more sure-fire way to overwrite localization is to add a "replace" folder inside "localisation\[language]" and add the parts your mod is trying to overwrite there.
+
A guide for overwriting localisation can be found [[Localisation modding#Overwriting Vanilla Text|here]].
 +
 
 +
=== Events folder ===
  
====Events Folder====
 
 
Events are treated as FIOS
 
Events are treated as FIOS
  
==Tools & utilities==
+
=== Interface folder ===
* [[Species Creator]] - Instantly generate an unique Species Class and Mod entry for a custom, static Species.
+
 
* [http://notepad-plus-plus.org/ Notepad++] - Powerful editor to change files.
+
Interface is likely LIOS
* [http://winmerge.org/ WinMerge] - Contrasts the difference between two text files. Useful for updating mods.
+
 
* [https://code.visualstudio.com/ VS Code] - Powerful, hackable, free open source editor from Microsoft.
+
== Tools & utilities ==
* [[Maya exporter]] - Clausewitz Maya Exporter to create your own 3D models.
+
 
* [https://github.com/a1studmuffin/SpaceshipGenerator/ Spaceship Generator] - A Blender script to procedurally generate 3D spaceships
+
* [http://notepad-plus-plus.org/ Notepad++] Powerful editor to change files.
* [https://forum.paradoxplaza.com/forum/index.php?threads/modding-tool-retalyx-stellaris-static-galaxy-generator-v0-9.951308/ Static Galaxy Generator] - A static galaxy generator and editor for your mods. ([https://steamcommunity.com/sharedfiles/filedetails/?id=699098812 How to use])
+
* [http://winmerge.org/ WinMerge] Contrasts the difference between two text files. Useful for updating mods.
* [[Steam Workshop]] - The place for where you can share your creations with other players.
+
* [https://code.visualstudio.com/ VS Code] Powerful, hackable, free open source editor from Microsoft.
* [https://www.sublimetext.com/ Sublime Text] - Powerful, moddable, hackable text editor. Install packages as your needs evolve.
+
* [[Maya exporter]] Clausewitz Maya Exporter to create your own 3D models.
 +
* [https://github.com/a1studmuffin/SpaceshipGenerator/ Spaceship Generator] A Blender script to procedurally generate 3D spaceships
 +
* [https://forum.paradoxplaza.com/forum/index.php?threads/modding-tool-retalyx-stellaris-static-galaxy-generator-v0-9.951308/ Static Galaxy Generator] A static galaxy generator and editor for your mods. ([https://steamcommunity.com/sharedfiles/filedetails/?id=699098812 How to use])
 +
* [[Steam Workshop]] The place for where you can share your creations with other players.
 +
* [https://www.sublimetext.com/ Sublime Text] Powerful, moddable, hackable text editor. Install packages as your needs evolve.
 
* [https://reddit.com/r/StellarisMods Stellaris Modding Subreddit]
 
* [https://reddit.com/r/StellarisMods Stellaris Modding Subreddit]
* [https://discord.gg/bHVez2C The Stellaris Modding Den] - the central modding discord for Stellaris.
+
* [https://discord.gg/bHVez2C The Stellaris Modding Den] the central modding discord for Stellaris.
 +
* [https://docs.google.com/document/d/17knnrF_RzaVFo_s66360m7rCypSH6yMTymA8B0jpTog/edit Paradox Graphics – A Comprehensive Guide] – In-depth documentation for preparing 3d models for Clausewitz engine games like Stellaris.
 +
 
 +
== Advanced tips ==
 +
 
 +
* For the bigger mods using a source control management tool (Git, …), it is handy to create a symbolic link between Stellaris mod folder and the working directory of the local repository, especially if the mod also has sub-mods. Note that you'll still need to copy the .mod file(s) manually, but they rarely change. Run the following command from the parent directory of main git folder, replacing:
 +
** <mod_path_name> by the value of <code>path</code> attribute from .mod file
 +
** <git_mod_folder> by the name of the sub-folder that contain mod data (folders common, decisions, events, etc…)
 +
mklink /J "%USERPROFILE%\Documents\Paradox Interactive\Stellaris\mod\<mod_path_name>" ".\<git_mod_folder>"
 +
 
 +
=== Testing Mods ===
 +
 
 +
Certain, more obscure console commands (that don't show up if you type 'help' in the console) are extremely useful in the process of testing a mod.
 +
* <code>observe</code> – switches you to Observer Mode. You will no longer play as any specific character – this will allow the game to run for a long period of time, uninterrupted. It also makes every invisible trait and secret religion visible.
 +
* <code>run</code> <filename.txt> – runs script in a txt file located in the in the Documents install directory. It will be executed from the player's scope. Useful for testing tricky scripts – you can just have the script open in a different window, run it, tweak the script, save it, and run it again – it will be recompiled every time.
 +
* <small><s><code>reloadevents</code> – reloads and recompiles every single event (may take a while depending on your hardware). Useful if you want to tweak an entire event or chain of events without rebooting the game every time.</s> not yet implemented</small>
 +
* <small><s><code>reloadloc</code> – reloads the entire localisation table. Useful if you spot a typo while testing your mod, or if you are trying to fit as much text in an event frame as possible.</s> not yet implemented</small>
 +
 
 +
More [[Console commands]] are available on the main page, and are very useful for more specific alterations like adding lovers or killing people.
 +
 
 +
== External links ==
  
==External links==
+
[https://forum.paradoxplaza.com/forum/index.php?threads/stellaris-dev-diary-31-modding-scripting-anomalies.923348/ Stellaris Dev Diary #31 Modding (Scripting Anomalies)]<br>[https://forum.paradoxplaza.com/forum/index.php?threads/stellaris-dev-diary-32-modding-art.924762/ Stellaris Dev Diary #32 Modding art]
[https://forum.paradoxplaza.com/forum/index.php?threads/stellaris-dev-diary-31-modding-scripting-anomalies.923348/ Stellaris Dev Diary #31 - Modding (Scripting Anomalies)]
 
<br />[https://forum.paradoxplaza.com/forum/index.php?threads/stellaris-dev-diary-32-modding-art.924762/ Stellaris Dev Diary #32 - Modding art]
 
  
==See also==
+
== See also ==
  
 
*[[Mods]]
 
*[[Mods]]
  
 
== References ==
 
== References ==
 +
<references />
  
<references />
 
  
{{Template:ModdingNavbox}}
+
{{ModdingNavbox}}
 
[[Category:Modding|#]]
 
[[Category:Modding|#]]

Revision as of 17:42, 4 July 2020

Version

Outliner top.png
Please help with verifying or updating older sections of this article. At least some were last verified for version 2.5.

This article is for the PC version of Stellaris only.

Modding, or creating mods, is the act of modifying the behavior of the base game (often referred to as vanilla), either for personal use, or to release publicly to other players, for instance via the Steam Workshop.

As with all Paradox games, Stellaris is moddable to a great extent. Motivations of modders may vary widely; better translation to native language, more events or decisions, better map, major overhaul, shameless cheating, etc.

This guide is intended to lower the entry barriers to the world of Stellaris modding. However, there is still a learning curve to it, and it cannot replace the need to read some working vanilla code, and do lots of trial and error experimentation!

Guidelines

  • Create a mod for your modifications: use a personal mod even for small changes, and never directly modify the game files in the Steam Stellaris folder, as they may be overwritten without warning.
  • Use a good text editor (recommended: Visual Studio Code) to edit files and search into multiple files. A good text editor can also format the displayed text so that braces can be collapsed if complete, and complete/incomplete pairs are highlighted.
  • Use the Error.log file to get execution errors: The log folder can be found right next to the mod folder. Good Editors usually have the ability to track changes to files from outside the program and prompt for a reload, thus showing you errors with one glance at the file. Note that some modifications need a game to be loaded or even the option to be used on screen/in the back-end before their code will run.
  • Use CWTools for advanced validation and auto-complete: CWTools is a syntax validator for Stellaris modding, developed as an extension for Visual Studio Code and also available for Sublime. Read the forum post by the developer for more info.
  • Minimize overwrites of vanilla files, unless that is your main goal or somehow necessary (on_action triggers). Adding separate files and use loading from folders whenever possible, to improve mod compatibility and maintenance. Your files can have any name, all files in the folder will be loaded by the game. So choose a prefix no one else will ever use like the name of your mod. Even DLC follows that pattern.
  • Use a proper merge tool (like WinMerge, or the Visual Studio Code Extension L13 Diff ), to merge between folders, and update modified vanilla files to a new vanilla patch.
  • Backup your work to avoid losing everything. Consider using a source control system like Git and a collaborative forge like GitHub to manage team collaboration.
  • Use UTF-8 encoding for text and .mod files.
  • Use UTF-8 with BOM for localization and name list files.
  • Indent properly and, again, use a good text editor, to easily spot unclosed curly braces. Vanilla uses 1 tab for indentation rather than spaces.
  • Use comments starting with a # character, to remember your reasons for writing tricky stuff.

Mod management

The first steps of modding is getting to know where the mods are located, how they're structured and what to do when uploading your first mod!

Mod folder location

OS Path
Linux ~/.local/share/Paradox Interactive/Stellaris/mod
Windows …\Documents\Paradox Interactive\Stellaris\mod
Mac OS ~/Documents/Paradox Interactive/Stellaris/mod

Mods from the Steam Workshop will be placed in …\SteamLibrary\SteamApps\workshop\content\281990, sorted by their Workshop ID.
Mods from Paradox Mods will be placed in the mod folder location, named PDX_*MOD_ID*.

File and folder structure

Getting the structure set up correctly when creating a mod is essential for it to run properly.

This is the required structure inside the main mod folder:

  • modname.mod – Includes the information used by the Stellaris launcher
  • modname – Folder where all the modified files are placed, in the same file and folder structure as the game folder
    • Mod contents
    • descriptor.mod – Required for the new launcher added in patch 2.4. Ignored in the old launcher.
    • image.ext – PNG and JPEG files are supported. With the new 2.4 launcher, must be a PNG named thumbnail.png

modname.mod and descriptor.mod both contain the mod information that the launcher uses when displaying the mod and uploading it.
The 2.4 launcher prefers descriptor.mod and will modify modname.mod to match the information in descriptor.mod, however if the file is not found, it'll use the information in modname.mod. The pre-2.4 launcher ignores it.
The path="XXX" is not needed in descriptor.mod.
Note that folder and file names are case sensitive on Mac OS X and Linux.

modname.mod structure
This also applies to descriptor.mod.

Name Required Description Example
name Yes Name of your mod. name="My Stellaris Mod"
path modname.mod: Yes
descriptor.mod: No (Ignored)
Defines which folder is the mod's folder. It is relative to …\Documents\Paradox Interactive\Stellaris\ folder. path="mod/MyStellarisMod"
dependencies No Specifies if the mod should be loaded after the listed mod(s), if they exist.
Very useful for submods or compatibility patches to make sure they overrule certain mods.
dependencies={
	"My Other Stellaris Mod"
	"Not My Stellaris Mod"
}
picture No Specifies the mod thumbnail used on Steam Workshop. With the new 2.4 launcher, this must be a PNG file named thumbnail.png. picture="thumbnail.png"
tags No List of tags for Steam Workshop. Using tags besides the predefined ones may prevent uploading on Paradox Mods.
Warning: don't forget quotes for tags that contain spaces.
tags={
	"Tag1"
	"Tag2"
}
supported_version Recommended Specifies what game version the mod supports.
The last number can be replaced with the asterisk (*) symbol to tell the launcher that mod supports any value, like 2.4.*.
Only the last number supports this.
supported_version="2.4.1"
remote_file_id No Property added by the launcher that includes the Steam Workshop ID. Ignore it. remote_file_id="1234567890"

The data structure is similar to the proprietary Valve Data Format.[1]

Example modname.mod file

name="Somemod"
path="mod/somemod"
dependencies={
	"othermod"
	"another mod"
}
tags={
	"Graphics"
	"Economy"
	"Overhaul"
}
picture="thumbnail.png"
remote_file_id="1234567890"
supported_version="2.4.*"

Adding a thumbnail

The Steam Workshop allows for a preview thumbnail picture that'll be displayed when searching for mods and as a preview picture if you haven't uploaded any, otherwise it'll be placed to the right of the preview pictures.
It's recommended to make the thumbnail 512px × 512px at minimum, which is used by the workshop frontpage.
Additionally, the thumbnail file should be under 1 MB in size, otherwise, it will not be uploaded.
Both JPEG and PNG are supported, and after 2.4, the image file must be named thumbnail and be of type PNG.

  1. Make sure the Stellaris launcher is closed, so that it doesn't revert your changes
  2. Open up modname.mod and descriptor.mod files
  3. Make sure picture="thumbnail.png" exists, if not, add it
  4. Add your image file in your mod folder
  5. Start up the launcher and update your mod
  6. Thumbnail should now show up at the Steam Workshop mod page

You can always update the thumbnail at any time by updating the mod.

Creating a mod

You can use the game launcher to set up a the mod structure for you by following these simple steps according to your launcher of choice:

# Launcher v1 (<=2.3.3) Launcher v2 (>=2.4.0)
1 Launch the game
2 Navigate to the mods tab
3 Click Mod Tools
4 Click Create Mod
5 Insert the relevant information and click Create Mod at the bottom
6 Navigate to the mod folder and locate your mod folder
7 Start modding!

Uploading and updating a mod

Uploading and updating a mod follows the the same procedure, depending on your launcher of choice:

# Launcher v1 (<=2.3.3) Launcher v2 (>=2.4.0)
1 Launch the game
2 Navigate to the mods tab
3 Click Mod Tools
4 Click Upload Mod Click Upload a Mod
5 Select your mod from the list
6 Click Fetch Info and wait for a response Select mod site
7 Insert description*
8 Click Upload Click Upload Mod
9 The launcher will now upload your changes and inform you when it's done or if an error occurred.
10 Navigate to the mod service of choice and locate your mod;
Steam Workshop, visit the Workshop page, and locate the "Files you've posted" button by hovering over "Your Files" on the right
Paradox Mods, visit the Mods page, login, and click "My uploaded mods" in the dropdown menu that appears when hovering over your name
* - The inserted description will replace the current one used on the mod page!

Game data

Game structure

Below is a list of game files and folders, listed alongside the modding guide for each.

Stellaris/common/

Folder/File Summary Guides
agendas Agendas are given to leader-candidates in Oligarchic government-forms Agendas
ai_budget Determine how AI should handle resources. AI
ambient_objects References used by code to spawn ambient objects Models
archaeological_site_types Definitions for Archaeological Sites to be discovered and delved by Science Ships. Ancestral Relics
anomalies Events that occur for research ships Anomalies
armies Definitions for army types Armies
army_attachments (Deprecated)
artifact_actions Definitions for Artifact Actions. Ancestral Relics
ascension_perks Definitions for Ascension Perks. Traditions
attitudes Definitions containing the restrictions for each attitude used by the AI AI
bombardment_stances Definitions of bombardment stances. Bombardment Stances
buildable_pops (Deprecated)
buildings Setup for buildings constructable on planets, and those given through events Buildings
button_effects Definitions for button effects. Graphics
bypass Definitions for bypasses (gateway, worm hole and l-gate) Bypasses
casus_belli Definitions for casus belli. Wars
colony_automation Definitions for colony autobuild types. Colony Automations
colony_automation_exceptions Definitions for colony autobuild types. Colony Automations
colors Color definitions used for the country color selection Countries
component_flags (Deprecated)
component_sets List of the sets of components used by ships Ships
component_slot_templates Slot templates to be used with ship sections. Ships
component_tags Used to group components together for common modifiers Ships
component_templates Attribute setup for each weapon and the templates used for ships Ships
country_types Rules for each country within the game. Countries
decisions Definitions for planetary decisions. Decisions
defines Basic game behaviors and settings Defines
deposit_categories Deposit categories relevant to deposit generation. Planet Generation
deposits Setup for the deposits of resources found on planets as well as blockers spawned on habitable planets. Planet Generation
diplo_phrases Setup for the logic behind the diplomatic phrases used between countries. AI
diplomacy_economy Economy units based on diplomacy. Diplomatic upkeeps like influence upkeep of Federations are defined here. Diplomacy
diplomatic_actions Setup for the rules for diplomatic actions. Diplomacy
districts Definitions for districts. Buildings
economic_categories Definitions for economic categories. Economy
economic_plans Definitions for AI economy plans. AI
edicts Setup for the edicts used by countries. Edicts
ethics Setup for ethics, controlling their modifiers and categories Ethics
event_chains Setup for the event chains used in the events folder Event chains
fallen_empires Sets up the countries and system initializer used for fallen empires Systems
federation_law_categories Definitions for federation law categories. Diplomacy
federation_laws Definitions for federation laws. Diplomacy
federation_perks Definitions for federation perks. Diplomacy
federation_types Definitions for federation types. Diplomacy
galactic_focuses Definitions for galactic focuses relevant to the Galactic Community. Diplomacy
game_rules Logic used for various game actions, i.e. can_enslave_pop. Logic here does not override hardcoded rules. Gameplay
global_ship_designs Designs used by the ship designer for each species Ships
governments Setup for the governments. Governments
graphical_culture Controls the lighting used for ships, which differs between graphical cultures. Species
lawsuits Unused.
leader_classes Definitions for leader classes. Leaders
mandates Controls the mandates used by factions Mandates
map_modes Definitions for map modes to be used in the galaxy view. Map Modes
megastructures Definations for megastructures. Megastructures
name_lists Sets up the names used for each species. Species
notification_modifiers A variation of static modifiers. They have no modifiers and can only be added to empires. Static Modifiers
observation_station_missions Actions that can be done with observation stations depending on ethic choices. Gameplay
on_actions Events and actions that happens when you move, or do anything. Events
opinion_modifiers Opinion of Empires on other Empires depending on Political status and Ethics. Opinion Modifiers
personalities Shows the personalities of Empires AI traits and of Fallen Empires and enables editing them. AI
planet_classes The setup for all the planets and stars in the game. Planets
planet_modifiers Spawn chances planet modifiers (f.e. lush, hazardous weather, etc.). Planet Generation
policies AI Policy grabbing (What order they take policies in) Policies
pop_categories Definitions for pop categories (social strata). Pop Jobs
pop_faction_types Population faction types and personalities Pop Factions
pop_jobs Definitions for pop jobs. Pop Jobs
precursor_civilizations Precursor civilization weightings Planets
random_names Lists of random names for Empires Gameplay
relics Definitions for Relics. Ancestral Relics
resolution_categories Definitions for resolution categories relevant to the Galactic Community. Diplomacy
resolutions Definitions for resolutions relevant to the Galactic Community. Diplomacy
scripted_effects Pre-defined blocks of Effects to be called elsewhere. Dynamic
scripted_loc Pre-defined methods to provide text based on the scoped object's attributes. Dynamic
scripted_triggers Pre-defined blocks of Conditions to be called elsewhere. Dynamic
scripted_variables Pre-defined "@" variables to be called from other game files. Dynamic
section_templates Container of components that consist actual ships. Ship
sector_focuses Types of sectors and how they act. Colony Automations
sector_types Types of sectors and how they act. Colony Automations
ship_behaviours Standard ship behaviours. Ship
ship_sizes Sizes of the Ships. Ship
solar_system_initializers Defines starting systems for players, AI, event systems, hostile systems, etc. Systems
spaceport_modules (Deprecated)
special_projects Special Projects
species_archetypes Definitions for species archetypes to give some shared attributes to species classes. Species
species_classes Definitions for species classes that are sets of species portraits. Species
species_names Definitions for species random names. Species
species_rights Definitions for species rights. Species
star_classes Types of solar systems (NOT individual stars themselves!) Systems
starbase_buildings Definitions for starbase buildings that each starbase can only have one of each of them. Starbases
starbase_levels Definitions for starbase levels. Starbases
starbase_modules Definitions for starbase modules. Starbases
starbase_types Definitions for starbase types. To players, no effects, flavor only. To the AI, a starbase auto-build guide. Starbases
start_screen_messages Messages that should be shown to the player at the start of the game. Gameplay
static_modifiers Blocks of Modifiers to be added to objects. Static Modifiers
strategic_resources Definitions for resources, not just strategic resources. Economy
subjects Definitions for subject types. Diplomacy
system_types Definitions for system types. No effects, flavor only. Starbases
technology Definitions for technologies. Technology
terraform Definitions for terraform methods. Planets
trade_conversions Definitions for trade value conversions. Economy
tile_blockers (Deprecated)
tradition_categories Definitions for tradition groups. Traditions
traditions Definitions for traditions. Traditions
traits Definitions for species traits and leader traits. Traits
triggered_modifiers (Deprecated)
war_demand_counters (Deprecated)
war_demand_types (Deprecated)
war_goals Definitions for war goals. Wars
achievements.txt Definitions for achievements. Modding this file doesn't make sense, since achievements are disabled for any "common" changing/expanding mods anyway.
alerts.txt Messages
message_types.txt Messages

Stellaris/events/

Folder/File Summary Guides
example_events.txt Contains the event code for a set of events. Events

Stellaris/flags/

Folder/File Summary Guides
*.dds A flag image file. Flags
colors.txt Sets up the allowed colors for flags and the randomizable combos. Flags

Stellaris/fonts/

File Summary Guides
fonts.asset Sets up the fonts used by the game. Fonts

Stellaris/gfx/

Folder/File Summary Guides
advisorwindow Sets up the 3D view for the advisor Graphics
arrows Contains the images used by various arrows ingame. Graphics
cursors Contains the cursor files/images used ingame. Graphics
event_pictures Contains the pictures used in events. Events
fonts Contains the font files used ingame. Fonts
FX Contains the FX shaders used ingame. Graphical Effect
interface/ Contains the images used for interfaces ingame. Graphics
interface/anomaly Contains the images used for the anomaly mechanic Graphics
interface/buttons Contains the images used for buttons Graphics
interface/diplomacy Contains the images used for the diplomacy interface. Graphics
interface/elections Contains the images used for the election interface. Graphics
interface/event_window Contains the images used for the event window. Graphics
interface/flags Contains the image masks used for flags. Graphics
interface/fleet_view Contains the images used for fleets. Graphics
interface/frontend Contains the images used for the frontend interface. Graphics
interface/government_mod_window Contains the images used for the government modification interface. Graphics
interface/icons Contains the icons used for everything in the game. Graphics
interface/main Contains the images used for generic actions. Graphics
interface/old Contains the images used from EU4 Graphics
interface/outliner Contains the images used for the outliner interface. Graphics
interface/planetview Contains the images used for the planet view interface. Graphics
interface/progressbars Contains the images used for progress bars ingame. Graphics
interface/ship_designer Contains the images used for the ship designer interface. Graphics
interface/situation_log Contains the images used for the situation log interface. Graphics
interface/sliders Contains the images used for sliders ingame. Graphics
interface/system Contains the images used for the system view interface. Graphics
interface/tech_view Contains the images used for the technology view interface. Graphics
interface/tiles Contains the images used for the tile view interface. Graphics
interface/topbar Contains the images used for the topbar interface. Graphics
interface/waroverview Contains the images used for the war view interface. Graphics
keyicons Contains the images used for button presses ingame. Graphics
lights Contains the logic used for the light effects ingame. Graphical Effect
loadingscreens Contains the images used for loadscreens. Graphics
models Contains the model .mesh files and images. Models
models/portraits Contains the portrait .mesh files and images. Portraits
particles Contains the logic and images used for particles. Graphics
pingmap Contains the logic used for pings. Graphics
portraits Contains the logic used for portrait images. Portraits
projectiles Contains the logic used for projectiles. Graphics
shipview Contains the logic used for ship view. Graphics
worldgfx Contains the logic and images used for world graphic effects. Graphics

Stellaris/interface/

Folder Summary Guides
*.gfx Controls the assignment of image to interface variable. Interfaces
*.gui Controls the visual logic of an interface. Interfaces

Stellaris/localisation/

File Summary Guides
*l_simp_chinese.yml Contains Chinese localisation Localisation
*l_english.yml Contains English localisation Localisation
*l_french.yml Contains French localisation Localisation
*l_german.yml Contains German localisation Localisation
*l_polish.yml Contains Polish localisation Localisation
*l_russian.yml Contains Russian localisation Localisation
*l_spanish.yml Contains Spanish localisation Localisation
*l_braz_por.yml Contains Brazilian/Portuguese localisation Localisation

Stellaris/map/

Folder/File Summary Guides
galaxy Contains the galaxy options. You cannot add new ones currently. Galaxies
setup_scenarios Controls the logic for different sizes of galaxies. Galaxies

Stellaris/music/

Folder/File Summary Guides
*.ogg A music file. Music
songs.asset Controls the assignment of music to a code name, and sets the volume of playback. Music
songs.txt Music

Stellaris/prescripted_countries/

Folder/File Summary Guides
*.txt Contains a pre-scripted setup for a country. Listed on the side ingame. Galaxies
setup_scenarios Controls the logic for different sizes of galaxies. Galaxies

Stellaris/sound/

Folder/File Summary Guides
*.asset Sets up sounds. Sound
*.wav A sound file. Sound

Overwriting Specific Elements

Occasionally, it is possible to overwrite a specific game element without needing to replace the entire vanilla file. In some cases adding an element with a similar identifier into another file will duplicate that element for the game. But in other cases, the version that comes first (First In, Only Served; FIOS)/last (Last In, Only Served; LIOS) will be used instead.[2] The order in which files are processed is based on ASCIIbetical order of the filenames. If the names are the same, they'll be processed based on the reverse-ASCIIbetical order of the mod display name, with vanilla always being first (if it's at the top of the mod list, it'll be loaded last). Note that if there are multiple mods with the same display name, only the one whose mod file comes first, will be used.

Note that this feature is not documented and thus might be subject to arbitrary changes between versions.

Common folder

A-N (Agendas – Notification
Modifiers)
File Type Overwrite
Type
Error Log Notes
Agendas LIOS Object key already exists
AI Budget
Ambient Objects
Anomalies LIOS Object key already exists
Armies LIOS Object key already exists
Artifact Actions LIOS Object key already exists
Ascension Perks LIOS Object key already exists
Asteroid Belts
Attitudes LIOS Object key already exists
Bombardment Stances LIOS Object key already exists
Buildings LIOS Object key already exists Breaks auto-
generated modifiers
Button Effects
Bypass LIOS Object key already exists
Casus Belli LIOS Object key already exists
Colony Types LIOS Object key already exists
Colors
Component Sets FIOS Object key already exists
Component Tags
Component Templates FIOS Object key already exists
Country Customization
Country Types LIOS Object key already exists
Decisions LIOS Object key already exists
Defines LIOS [none] The block the define is
in must be included as well.
E.g: NGameplay = {
POLICY_YEARS = 10 }
Deposit Categories
Deposits LIOS Object key already exists
Diplomatic Phrases
Diplomatic Economy LIOS Object key already exists
Diplomatic Actions LIOS Object key already exists
Districts LIOS Object key already exists Breaks auto-
generated modifiers
Economic Categories
Edicts LIOS Object key already exists
Ethics LIOS [none] Might break "selected
ethic" graphic
Event Chains FIOS [none]
Fallen Empires
Game Rules LIOS [none]
Global Ship Designs FIOS A ship design already exists
Governments LIOS Object key already exists
├───Authorities LIOS Object key already exists
└───Civics LIOS Object key already exists
Graphical Culture
Leader Classes LIOS Object key already exists
Mandates LIOS Object key already exists
Map Modes LIOS Object key already exists
Megastructures LIOS Object key already exists
Name Lists
Notification Modifiers
O-Z (Observation Station
Missions – War Goals)
File Type Overwrite
Type
Error Log Notes
Observation Station Missions
On Actions NO [none] Cannot modify
existing entries
Opinion Modifiers DUPL/LIOS [none] add_opinion_modifier is LIOS
Personalities LIOS Object key already exists
Planet Classes LIOS [none]
Planet Modifiers LIOS Object key already exists
Policies LIOS Object key already exists
Pop Categories LIOS Object key already exists
Pop Faction Types LIOS Object key already exists
Pop Jobs LIOS [?] [none] Breaks auto-
generated modifiers
Precursor Civilizations
Random Names
Scripted Effects LIOS Object key already exists
Scripted Localisation
Scripted Triggers LIOS Object key already exists
Scripted Variables FIOS Variable name taken
Section Templates FIOS Duplicate section template found
Sector Focuses LIOS Object key already exists
Sector Types
Ship Behaviors FIOS Behavior name already exists
Ship Sizes LIOS Object key already exists
Solar System Initializers FIOS Initializer already exists
Special Projects FIOS Object key already exists
Species Archetypes LIOS Object key already exists Breaks auto-
generated modifiers
Species Classes LIOS Object key already exists
Species Names
Species Rights LIOS Object key already exists Effect tooltips are
independent of the effects
Star Classes FIOS
Starbase Buildings LIOS Object key already exists
Starbase Levels LIOS Object key already exists
Starbase Modules LIOS Object key already exists
Starbase Types LIOS Object key already exists
Start Screen Messages FIOS [none] The first valid part for each
location will be used and the
rest discarded without issue.
Static Modifiers FIOS [none]
Strategic Resources FIOS [none]
Subjects LIOS Object key already exists
System Types LIOS Object key already exists
Technology LIOS Duplicate technology
└───Tiers LIOS
Terraform (Links) DUPL [none]
Trade Conversions LIOS Object key already exists Trade Policy
Tradition Categories LIOS Object key already exists
Traditions LIOS Object key already exists Effect tooltips are
independent of the effects
Traits DUPL [none]
War Goals LIOS Object key already exists

FIOS – First in, only served

LIOS – Last in, only served

DUPL – Duplicates

NO – Cannot individually overwrite

Please note that not everything could be tested extensively.

Localisation folder

Localisation is likely LIOS

A guide for overwriting localisation can be found here.

Events folder

Events are treated as FIOS

Interface folder

Interface is likely LIOS

Tools & utilities

Advanced tips

  • For the bigger mods using a source control management tool (Git, …), it is handy to create a symbolic link between Stellaris mod folder and the working directory of the local repository, especially if the mod also has sub-mods. Note that you'll still need to copy the .mod file(s) manually, but they rarely change. Run the following command from the parent directory of main git folder, replacing:
    • <mod_path_name> by the value of path attribute from .mod file
    • <git_mod_folder> by the name of the sub-folder that contain mod data (folders common, decisions, events, etc…)
mklink /J "%USERPROFILE%\Documents\Paradox Interactive\Stellaris\mod\<mod_path_name>" ".\<git_mod_folder>"

Testing Mods

Certain, more obscure console commands (that don't show up if you type 'help' in the console) are extremely useful in the process of testing a mod.

  • observe – switches you to Observer Mode. You will no longer play as any specific character – this will allow the game to run for a long period of time, uninterrupted. It also makes every invisible trait and secret religion visible.
  • run <filename.txt> – runs script in a txt file located in the in the Documents install directory. It will be executed from the player's scope. Useful for testing tricky scripts – you can just have the script open in a different window, run it, tweak the script, save it, and run it again – it will be recompiled every time.
  • reloadevents – reloads and recompiles every single event (may take a while depending on your hardware). Useful if you want to tweak an entire event or chain of events without rebooting the game every time. not yet implemented
  • reloadloc – reloads the entire localisation table. Useful if you spot a typo while testing your mod, or if you are trying to fit as much text in an event frame as possible. not yet implemented

More Console commands are available on the main page, and are very useful for more specific alterations like adding lovers or killing people.

External links

Stellaris Dev Diary #31 – Modding (Scripting Anomalies)
Stellaris Dev Diary #32 – Modding art

See also

References

  1. VDF is a ad-hoc file format designed by Valve to support storage of hierarchical data, which is also used by Steam. Open VDF parser: https://github.com/rossengeorgiev/vdf-parser/, for .NET
  2. https://forum.paradoxplaza.com/forum/index.php?threads/object-types-that-can-be-replaced-in-separate-files.990537/


Empire EmpireEthicsGovernments • Civics • OriginsMandatesAgendasTraditions • Ascension PerksEdictsPoliciesRelicsTechnologiesCustom Empires
Pops JobsFactions
Leaders LeadersLeader Traits
Species SpeciesSpecies Traits
Planets PlanetsPlanetary Feature • Orbital DepositBuildings • DistrictsPlanetary Decisions
Systems SystemsStarbasesMegastructuresBypassesMap
Fleets FleetsShips • Components
Land Warfare ArmiesBombardment Stance
Diplomacy Diplomacy • Federations • Galactic CommunityOpinion ModifiersCasus Belli • War Goals
Events EventsAnomaliesSpecial projectsArchaeological Sites
Gameplay GameplayDefinesResources • Economy
Dynamic modding EffectsConditionsScopesModifiersVariablesAI
Media/localisation Maya exporterGraphicsPortraitsFlagsEvent picturesInterfaceIconsMusicLocalisation
Other Console commandsSave-game editingSteam Workshop