Tutorial: Navy system - SonicTHI/SaveOurShip2Experimental GitHub Wiki
The navy system allows modders to add factions with their own pawns, ships and colors to SOS2.
Required knowledge: SOS2 ship building (if you want to modify or create custom ships), basic RW mod creation
Required tools (Optional): SOS2CK
- (Optional) Use the CK to either make new ships from scratch or use existing ships.
- Either create a new fleet def (3) or make a patch for an existing one (4).
- Navy template, replace { } and add shipdefs (navy examples):
<NavyDef ParentName="SpaceNavy">
<defName>{your navy defname}</defName>
<label>{your navy ingame name}</label>
<factionDefs>
<li>{faction that will use this navy, example: Pirate}</li>
</factionDefs>
<bountyHunts>{true/false - will this navy ambush the player if they have a bounty}</bountyHunts>
<crewDef>{PawnKindDef that overrides blue crew - optional}</crewDef>
<marineDef>{PawnKindDef that overrides yellow crew - optional}</marineDef>
<marineHeavyDef>{PawnKindDef that overrides red crew - optional}</marineHeavyDef>
<colorPrimary>{main hull colordef - optional, example: Structure_Black}</colorPrimary>
<colorSecondary>{corner colordef - optional, example: Structure_Red}</colorSecondary>
<colorLighting>{lighting color in hex - optional, example: #ff0000}</colorLighting>
<spaceShipDefs>
<li>shipdef1</li>
<li>shipdef2</li>
<li>shipdef...</li>
</spaceShipDefs>
</NavyDef>
- Navy patch template, replace { } and add shipdefs (patch examples):
<?xml version="1.0" encoding="utf-8" ?>
<Patch>
<Operation Class="PatchOperationAdd">
<xpath>Defs/NavyDef[defName="{navydef_that_you_want_to_add_to}"]/spaceShipDefs</xpath>
<value>
<li>shipdef1</li>
<li>shipdef2</li>
<li>shipdef...</li>
</value>
</Operation>
</Patch>
- Add the files and any custom ship(s) to your mod.
- Enjoy.