Squad
Not enough ratings
Trick for modders: Reduce your mod size by half!
By Stepan Sidorovich
Squad mods often include cooked packages for both Windows and LinuxServer platforms. These packages are typically identical in size, yet a given computer (either a player's client or a Linux server) will only utilize one of them.

Why should players download files that are completely irrelevant to their system?

The optimal solution is to split your mod into two separate Steam Workshop items: one specifically for all players (the Windows version) and another exclusively for Linux servers. This ensures that players only download the necessary files, avoiding an unnecessary duplicate copy of mod content that their operating system won't use.

This guide does not violate server licensing rules, because mod will work for both Linux and Server. See the message link for details: https://discord.com/channels/101469020510773248/101469020510773248/1407806558867558530 (Offworld Hosting)
   
Award
Favorite
Favorited
Unfavorite
Theory
For a server to install a mod, the mod's folder must be placed in SquadGame/Plugins/Mods/. Clients, on the other hand, download mods directly from the Steam Workshop.

If you cook your mod, then remove the LinuxServer paks from the cooked version before uploading it to the Steam Workshop (making it Windows-only), and subsequently provide servers with a modified version (where Windows paks are removed, and Linux paks remain), both servers and players will only download half of the original mod size. Each will receive only the files compatible with their respective system.

In essence:
  • Main Steam Workshop Item: A Windows-only version, intended for all players.
  • GitHub or "Linux-version" Steam Workshop Item: A LinuxServer-only version, exclusively for Linux servers.

Implementation
  1. Create a Blank Mod: Start by creating an entirely empty mod. Name it similarly to your main mod, but with a "Linux" suffix (e.g., SquadAdminTools_Linux). This "dummy" mod serves solely as a container to successfully upload the Linux-specific version to the Steam Workshop. Do not cook this mod, nor add any content to it; it must remain absolutely empty.
  2. Cook Your Main Mod: Cook your primary mod (the one you've actively developed, e.g., SquadAdminTools).
  3. Locate Cooked Output: After cooking, navigate to your mod's folder within SquadEditor/Squad/ModSDK/ (e.g., SquadEditor/Squad/ModSDK/SquadAdminTools/).
  4. Duplicate the Folder: Duplicate this cooked mod folder, ensuring a copy exists in ModSDK/ under the name of your dummy mod. You will now have two identical content folders: ModName and ModName_Linux (e.g. SquadAdminTools and SquadAdminTools_Linux)
  5. Separate Platform Files: Now, access both folders at ModName/Cooked/ModName/Content/Paks/. Pay close attention here!
    • For your main mod (e.g., SquadAdminTools), delete the LinuxServer subfolder. It should only contain the Windows folder.
    • For your dummy mod (e.g., SquadAdminTools_Linux), delete the Windows subfolder. It should only contain the LinuxServer subfolder.
    You've now created two identical mods within SquadEditor/Squad/ModSDK/, one tailored for Windows and the other for Linux.
  6. Upload to Workshop: Open the Modding Hub. First, upload your main (Windows-only) mod. Then, upload your dummy (LinuxServer-only) mod. The Modding Hub simply sends the content of the ModName/Cooked/ folder to the Steam Workshop.
  7. Describe the Linux Mod: Create a clear title and description for your Linux-specific dummy mod. Emphasize that it's for Linux servers only and players do not need to download it.
Conclusion
By following these steps, you will have two versions available on Steam: a Windows-only version (your main mod) and a LinuxServer-only version (your dummy mod). Provide the Linux version to server administrators and remember to update both mods simultaneously when making changes!

Important: The dummy mod (for LinuxServer) must remain absolutely empty in its source project. It only serves as a vehicle to upload a specific cooked copy of your main mod to the Steam Workshop under a different item ID.
Bonus
In your cooked mod's folder (`SquadEditor/Squad/ModSDK/ModName/Cooked/ModName/`), you'll find a `Metadata` subfolder. Inside it is `DevelopmentAssetRegistry.bin`, which adds approximately 120 MB to your mod's size but serves no functional purpose for distributed mods. It's essentially useless.

Delete this file before uploading your mod to the Steam Workshop to further reduce its overall size!