Jump to navigation Jump to search
Fixed grammar and usage, some formatting
*'''Create a mod for your modifications''': use a [[#Mod_structure|personal mod]] even for small changes, and never modify
directly game files in 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
onto 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 available as well 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 follow that pattern.
*'''Use a proper merge tool''' (like [http://winmerge.org/ WinMerge]), 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.
*'''Use UTF-8 with BOM''' for localization, name list, and .mod 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 # character, to remember reasons for writing tricky stuff.
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
===File and folder structure===
Getting the structure set up
correct when creating a mod is quintessential for it to run properly.
This is the required structure inside the main mod folder:
** <code>thumbnail.png</code> - Must be named thumbnail, only PNG files supported
<code>modname.mod</code> and <code>descriptor.mod</code> both
contains 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.<br>
Note that folder and file names are case sensitive on Mac OS X and Linux.
| Name of your mod.
| name="My Stellaris Mod"
| Defines which folder is the mod's folder. It is relative to ''...\Documents\Paradox Interactive\Stellaris\'' folder.
| 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 the mod thumbnail used on [[Steam Workshop]]. Must be a PNG file.
| List of tags for [[Steam Workshop]]. Warning: don't forget quotes for tags that contain spaces.
| Specifies what game version the mod supports.<br>The last number can be replaced with the asterisk (*) symbol to tell the launcher that mod supports any value, like 2.4.*.<br>Only the last number supports this.
| Property added by the launcher that includes the Steam Workshop ID. Ignore it.
===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>
It's recommended to make the thumbnail
at minimum 512px × 512px, 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>
Both JPEG and PNG are supported, and after 2.4, the image file must be named '''thumbnail'''.
|8||Click '''Upload'''||Click '''Upload Mod'''
|9||colspan="2"|The launcher will now upload your changes and inform when
completed, or if something erroneous happened
|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
* [[Console commands]], useful for debugging mods.
* [[Defines]], which
allow to influence some hardcoded vanilla behaviors
* [[Scopes]], [[Conditions]], and [[Commands]] used for scripting
* [[Modifiers]], used to influence calculations made by the game
Below is a list of game files and folders,
with associated modding guide.
==== Stellaris/common/ ====
| Controls the
lightning used for ships, which differs between graphical cultures.
| [[Species modding|Species]]
| [[Planet modding|Planets]]
==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 similar identifier element 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
arbitrarily changes between versions.
| Precursor Civilizations