Jump to navigation Jump to search


170 bytes added, 8 months ago
Fixed grammar and usage, some formatting
*'''Create a mod for your modifications''': use a [[#Mod_structure|personal mod]] even for small changes, and never directly modify directly 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 onto 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 as well 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 [[#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 follows that pattern.
*'''Use a proper merge tool''' (like [ 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 [ Git] and a collaborative forge like [ 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 a # character, to remember your reasons for writing tricky stuff.
==Mod management==
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 as <code>PDX_*MOD_ID*</code>.
===File and folder structure===
Getting the structure set up correct correctly when creating a mod is quintessential essential 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 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.<br>
Note that folder and file names are case sensitive on Mac OS X and Linux.
| <code>name</code>
| '''Yes'''
| Name of your mod.
| <code>name="My Stellaris Mod"</code>
| <code>path</code>
| '''Yes'''
| Defines which folder is the mod's folder. It is relative to ''...\Documents\Paradox Interactive\Stellaris\'' folder.
| <code>path="mod/MyStellarisMod"</code>
| <code>dependencies</code>
| 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.
| <code>picture<code>
| No
| Specifies the mod thumbnail used on [[Steam Workshop]]. Must be a PNG file.
| <code>picture="thumbnail.png"<code>
| <code>tags</code>
| No
| List of tags for [[Steam Workshop]]. Warning: don't forget quotes for tags that contain spaces.
| <code>supported_version</code>
| Recommended
| 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.
| <code>supported_version="2.4.1"</code>
| <code>remote_file_id</code>
| No
| Property added by the launcher that includes the Steam Workshop ID. Ignore it.
| <code>remote_file_id="1234567890"</code>
===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 × 512pxat 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>
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 you when completed, it's done or if something erroneous happenedan error occurred.
|10||colspan="2"|Navigate to the mod service of choice and locate your mod;<br>'''Steam Workshop''', visit the [ Workshop] page, and locate the "Files you've posted" button by hovering over "Your Files" on the right<br>'''Paradox Mods''', visit the [ Mods] page, login, and click "My uploaded mods" in the dropdown menu that appears when hovering over your name
==Game data==
* [[Console commands]], useful for debugging mods.
* [[Defines]], which allow allows you to influence some hardcoded vanilla behaviors
* [[Scopes]], [[Conditions]], and [[Commands]] used for scripting
* [[Modifiers]], used to influence calculations made by the game
==Game structure==
Below is a list of game files and folders, with associated listed alongside the modding guidefor each.
==== Stellaris/common/ ====
| graphical_culture
| Controls the lightning lighting used for ships, which differs between graphical cultures.
| [[Species modding|Species]]
| precursor_civilizations
| Precursor civilisation civilization weightings
| [[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 element with a similar identifier element into another file will duplicate that element for the game. But in other cases, the version that comes first (First inIn, only Only Served; FIOS)/last (Last inIn, only Only Served; LIOS) will be used instead. <ref></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 arbitrary changes between versions.
| N/A
| {{small|''[none]''}}
| Neither entries entry used
| Precursor Civilizations

Navigation menu