Changes

Jump to navigation Jump to search

Modding

2,045 bytes removed, 11 months ago
Update mod structure section for 2.4
{{version|2.3.34}}
'''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]].
==Mod structure==
Mods are located in Getting the structure set up correct when creating a mod is quintessential for it to run properly.  ===Mod folder:location===
{| class="wikitable"
| Mac OS ||<code>~/Documents/Paradox Interactive/Stellaris/mod</code>
|}
which must contain:
* Mods from the Steam Workshop will be placed in <code>...mod file\SteamLibrary\SteamApps\workshop\content\281990</code>, to tell the launcher what to do with the mod-foldersorted by their Workshop ID.<br>* Mods from Paradox Mods will be placed in the mod folder or zip containing the mod data. The mod data must have the same [[#Game structure|file and folder structure]] location, named as if it was along with stellaris.exe in the game directory<code>PDX_*MOD_ID*</code>.
(Subscribed ===File and downloaded mods from folder structure===This is the steam workshop are in required structure inside the main mod folder.* <code>modname.../Paradox Interactivemod</code> - Includes the information used by the Stellarislauncher* <code>modname</workshop/content/281990code> - Folder where all the modified files are placed, in the same [[#Game structure|file and folder structure]] as the game folder** Mod contents** </code> or descriptor.mod</code>- Required for the [[Patch_2.4|new launcher]] added in patch 2.4.\SteamLibrary\SteamApps\workshop\content\281990** <code>thumbnail.jpg</code>)- Must be named thumbnail, both JPEG and 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. Additionally, the path has to be relative to the <code>.../Paradox Interactive/Stellaris</code> folder; absolute path to another directory will not work.
For example, a new text file called ''test1.mod'' can be created in the <code>.../Paradox Interactive/Stellaris/mod</code> folder, alongside a new 'test1' folder.
name="Test1"'''modname.mod structure'''<br> path="This also applies to <code>descriptor.mod</test1" tags={ "Economy" } picture="test1.jpg" supported_version="1.0code>.3"
In the {| class="wikitable"!Name!Required!Description!Example|-| name| '''Yes'''| Name of your mod| name="My Stellaris Mod"|-| path| '''Yes'test1'' | Defines which folder, is the mod's folder. It is relative to ''test1.mod..\Documents\Paradox Interactive\Stellaris\'' file folder.| path="mod/MyStellarisMod"|-| dependencies| No| Specifies if the mod should be copied loaded after another mod. Very useful for submods or compatibility patches| dependencies={ "My Other Stellaris Mod" "Not My Stellaris Mod" }|-| picture| No| Specifies the mod thumbnail used on [[Steam Workshop]]. Supports both JPEG and PNG files.| picture="thumbnail.jpg"|-| tags| No| List of tags for [[Steam Workshop]]. Warning: don't forget quotes for tags that contain spaces.| tags={ "Tag1" "Tag 2" }|-| supported_version| Recommended| Specifies what game version the mod supports, the last number can be renamed replaced with the * (asterisk) symbol to ''descriptortell 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.mod''Ignore it.| remote_file_id="1234567890"|}
It is important that your thumbnail image is in the ".jpg" format, otherwise Steam gives an error during upload. Note also that it must be within your mod's directory (as specified by "path"), and you don't need to prefix the "picture" path with the "path".
Game files can now be replaced using the same structure as the game directory. Here, a ''common'' folder was created, with a ''traits'' subfolder that contains the ''00_species_traitsExample modname.txt'' from the game folder. The structure now looks like the followingmod file ''C:\Users\Jason\Documents\Paradox Interactive\Stellaris\mod''<br> test1.mod name="Somemod" test1 (dir) test1.jpg descriptor. path="mod common (dir) traits (dir) 00_species_traits.txt A new trait with various bonuses called ''trait_super'' can be added. It has a high cost so the AI does not use it, but the user could load it using the console commands. (Using ''is_ai = no'' also seems to do the trick) /somemod" trait_super dependencies= { cost = 1000"othermod" modifier = { tile_resource_food_mult = 10 tile_resource_energy_mult = 10 tile_resource_minerals_mult = 10 }"another mod"
}
 
In addition, downloaded mods will use content in zip files. Their '.mod' files will contain lines defining the 'remote_file_id' and 'archive'.
Here is an example:
 
name="999 Core Planets - All your planets are belong to you"
archive="workshop/content/281990/678893824/999cores.zip"
tags={
"BalanceGraphics" "GameplayEconomy" "UtilitiesOverhaul"
}
picture="thumbnail.jpg" remote_file_id="6788938241234567890" supported_version="12.04.0*"
This directory ===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 based off used by the workshop frontpage.<br>Both JPEG and PNG are supported, and after 2.4, the image file must be named '''thumbnail'''# Make sure the Stellaris directory launcher is closed, so that it doesn't revert your changes# Open up <code>modname.mod</code> and <code>descriptor.mod</code> files# Make sure <code>picture="thumbnail.jpg"</code> exists, if not, add it# Add your image file in your documents mod folder, for instance this zip file is:# Start up the launcher and update your mod# Thumbnail should now show up at the [[Steam Workshop]] mod page
C:\Users\<Username>\Documents\Paradox Interactive\Stellaris\workshop\content\281990\678893824\999cores.zip Here is an example of how to make a ''.You can always update the thumbnail at any time by updating the mod file'' for a Sub Mod (Mod for a Mod)  name="Fight For Universe: Infinite Legacy - No Maintenance" path="mod/ffu_ilno" dependencies={ "Fight For Universe: Infinite Legacy" } replace_path="Fight For Universe: Infinite Legacy" tags={ "Balance" "Overhaul" "Graphics" "Gameplay" } picture="NoMaintenance.png" remote_file_id="911971558" supported_version="1.5.1"
==Adding Steam Thumbnails==
The Steam Workshop allows you to add small images ("thumbnails") next to your mod and are the first thing people see when browsing the Workshop. Although these are optional and not required, they add some flavor and make mods very recognizable. It is best to add thumbnails to your mods as the final step before uploading it to the Steam Workshop.
Procedure:
* '''Adding Thumbnail'''
** Make sure the Stellaris launcher is closed, otherwise it'll revert any changes made to .MOD file on "Fetch Mod" or "Upload Mod".
** Open .MOD file of your mod located in <code>.../Stellaris/mod/[Mod Name]</code> using Notepad++ or likewise.
** Insert line <code>picture="thumbnail.jpg"</code> beneath the tags line, with the appropriate name of your image. '''''IT MUST READ "THUMBNAIL"'''''.
** Save the modified .MOD file.
** Place your image within your mod folder, <code>.../Stellaris/mod/[Mod Name]</code>.
** Double check whether the image name and the name you identified in <code>picture="thumbnail.jpg"</code> are exactly the same.
** Close Notepad++.
** Start Stellaris Launcher
** Via "Manage Mods" tab, select your mod and click '''Fetch'''
** You receive a message that no mod was found on the Steam Workshop, which makes sense as your mod hasn't not been uploaded yet.
** Click on '''Upload Mod'''
** You receive a message that the Mod Upload was successful!
** Check in your Workshop whether the thumbnail was correctly uploaded.
* '''Updating Thumbnail'''
** Make sure the Stellaris launcher is closed, otherwise it'll revert any changes made to .MOD file on "Fetch Mod" or "Upload Mod".
** Open .MOD file of your mod located in <code>.../Stellaris/mod/[Mod Name]</code> using Notepad++ or likewise.
** Save the modified .MOD file.
** Place your new image in your mod folder, in <code>.../Stellaris/mod/[Mod Name]</code>. Leave the old image within the mod.
*** Nothing happens to the old image when uploading a new mod version but it is good practice to have a back-up if it fails.
** Double check whether the image name and the name you identified in <code>picture="thumbnail.jpg"</code> are exactly the same.
** Close Notepad++.
** Start Stellaris Launcher
** Via "Manage Mods" tab, select your mod and click '''Fetch'''
** You receive a message the mod was found on the Steam Workshop. If not, you probably made a typo within the .MOD file, so check the file again and save!
** Click on '''Upload Mod'''
** You receive a message that the Mod Upload was successful!
** Check in your Workshop whether the new thumbnail was correctly uploaded.
==Game data==
Autopatrol
37
edits

Navigation menu