Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
WarhammerWorkshop
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Basic Principles Of Modding
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= How Does Modding Space Marine 2 Work? = When it comes to modding ''Space Marine 2'', no programming is required. A strong understanding of computer science principles will help, but getting started is straightforward even for complete beginners. This wiki is designed to make the process even easier to understand. Space Marine 2's modding system does not allow direct editing of the game's compiled code. Instead, it allows us to modify text-based configuration files that the game’s code references. While this may seem like a limitation, you would be surprised at how much can still be accomplished through text editing. = How Does Space Marine 2's File System Work? = Space Marine 2 uses a data format known as a '''PAK file''' to store all its assets, including models, textures, and audio. PAK files are compressed archives using the standard ZIP compression method. You can open Space Marine 2's PAK files using [https://www.win-rar.com/download.html WinRAR] or [https://www.7-zip.org/download.html 7-Zip]. == File Structure == [[File:SM2 Directory.png|thumb|403x403px|SM2 Directory]] Inside the Space Marine 2 directory, you will find three folders, two executable files, and one INI configuration file. - The '''EXE''' files launch the game. - The '''INI''' file contains settings related to the game executables. - The folders contain all the game data. The folder named '''EasyAntiCheat''' should be avoided. Tampering with anti-cheat files may cause serious issues. The folders modders are permitted to explore are '''client_pc''' and '''server_pc'''. These contain all client and server-side data for the game, much of which is described in this wiki. == Virtual File System == Space Marine 2 uses a '''Virtual File System (VFS)''' to manage asset loading. Mods override vanilla files using the VFS by supplying altered versions of the same files. Since Space Marine 2 does not use [[wikipedia:Delta_update|Delta Patching]], mods must replace the entire file rather than patching only parts of one. = PAK Files = Between '''client_pc''' and '''server_pc''', there are over 150 PAK files combined. These store nearly all game data, allowing wide flexibility in modding the game's appearance, sounds, and behavior. = Default PAKs = Space Marine 2 organizes core data into "Default PAKs": - Client-side assets are found in client default PAKs. - Server-side assets are found in server default PAKs. You can locate them at: - '''client_pc\root\paks\client\default''' - '''server_pc\root\paks\server\default''' == Default_Other.pak == ''default_other.pak'' is one of the most important PAK files. It contains: - Game parameters - Descriptions - Definitions - AI logic - Server scenarios These are stored as text files written in Property Section format. Both '''client_pc''' and '''server_pc''' have their own versions of ''default_other.pak''. If a file exists in both locations, '''the two copies must be identical''' to avoid crashes and desyncs. == Default_SSL.pak == This PAK contains the game's compiled scripts, written in Saber Interactive’s proprietary '''Saber Scripting Language (SSL)'''. Scripts are compiled into '''sslbin''' files. Editing SSL files is '''not supported''' and explicitly forbidden. Tampering with them can cause major game issues and is strongly discouraged. == Default_PCT PAKs == Files like ''default_pct_0.pak'' to ''default_pct_31.pak'' contain all game textures (PCT files). Texture editing is possible but more complex than text editing. == Default_TPL PAKs == Files like ''default_tpl_0.pak'' to ''default_tpl_8.pak'' store all 3D models. Model editing requires specialized knowledge and tools. == Default_TD.pak == This file defines material properties such as metal, dirt, and other surface behaviors. Material editing is considered an advanced topic. == Default_Sound PAKs == The game’s sound files are stored here. Navigating sound assets is challenging because files are numbered rather than named. A [https://docs.google.com/spreadsheets/d/1KH8KhYk-Q_PQdi0GG8zdc0JkM0NeX8xV-z1DXekPjJ4/edit?gid=0#gid=0 spreadsheet] of sound mappings was being developed but is currently outdated. = Cache Files = Each PAK file is paired with a Cache file of the same name. Cache files allow the game to quickly index and load asset data. Before Update 7.0 (April 2025), modders needed a tool called '''Pakcacher''' to manually rebuild Cache files. After Update 7.0, Saber enabled automatic cache handling, and manual intervention is no longer required. = Resource PAKs = Both client and server sides use a '''resources.pak''' to manage metadata about asset dependencies and the Resource Tree. Incorrect edits can severely break the game. For more details, see: [[Resource_System]]. = Local Folder = The '''Local''' folder is a special area inside ''client_pc\root'' designed for development and testing of mods. == What Files Can Go Into a Local Folder? == Any client-side, server-side, or resource file can be placed into the Local folder, provided the folder path structure matches the game’s originals. == How to Use the Local Folder == Treat the Local folder like an unpacked version of '''default_other.pak'''. File and folder structures must match the originals exactly. Files present in both '''client_pc''' and '''server_pc''' only need one copy in the Local folder. The Virtual File System will correctly map them. == Performance Issues == The Local folder loads more slowly than packed PAK files and may cause performance degradation. It is recommended for development and testing only, not for playing completed mods. = Mods Folder = The '''Mods''' folder is meant for distributing and loading finalized mods. == What Goes into the Mods Folder? == Only properly packed '''.pak''' files should be placed here. ZIP, RAR, and text files will either be ignored or cause loading failures. [[File:Mod Load order.png|thumb|Alphanumerical Load Order (Top to Bottom)]] == How Does Mod Load Order Work? == Mods are loaded in '''alphanumerical order'''. If two mods modify the same file: - The alphabetically first mod will take precedence. == Important Naming Advice == Always use '''lowercase letters''' when naming PAK files. Capitalization errors can lead to crashes or broken mods. = Creating a Modpak = [[File:Paking Mods Tutorial.gif|thumb|416x416px|Tutorial GIF: Click or tap to view animation.]] To create a Modpak: # Build and test your mod inside the '''Local''' folder. (See [[Basic Principles Of Modding#Local Folder|Local Folder]]) # Select all modified folders/files. # Right-click and choose "Add to Archive" via WinRAR. # Set: * Archive format: '''ZIP''' * Compression method: '''Store''' '''Important''': Using compression other than Store may cause the game to crash or hang. Ensure: - The file is named in all lowercase. - The file has a ''.pak'' extension. Place the resulting PAK into the Mods folder for use or distribution. = Local Server = When playing modded, Space Marine 2 uses a local server hosted by the player's machine. == How Do Mods Work on a Local Server? == Hosting a game with mods allows: - Players without the mod to experience some modded content. - However, mismatched or missing mods between players may cause issues. It is recommended that all players install the same mod set when playing together. For installation instructions, see [[How To Install Mods|How to Install Mods]]. <blockquote>This page is incomplete. The Tech Priest(s) responsible have exhausted their memory banks. Please contribute additional information if available.</blockquote>
Summary:
Please note that all contributions to WarhammerWorkshop may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
WarhammerWorkshop:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)