Skip to content
This repository was archived by the owner on Jun 22, 2024. It is now read-only.

Tutorial: Navy system

Taelyn edited this page Mar 17, 2024 · 1 revision

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

  1. (Optional) Use the CK to either make new ships from scratch or use existing ships.
  2. Either create a new fleet def (3) or make a patch for an existing one (4).
  3. Navy template, replace { } and add shipdefs (navy examples):
<SpaceNavyDef ParentName="SpaceNavy">
	<defName>{your navy defname}</defName>
	<label>{your navy ingame name}</label>
	<factionDefs>
		<li>{faction that will use this navy}</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 color - optional, example RGBA(0.196, 0.196, 0.196, 1.000)}</colorPrimary>
	<colorSecondary>{corner color - optional, example RGBA(0.196, 0.196, 0.196, 1.000)}</colorSecondary>
	<enemyShipDefs>
		<li>shipdef1</li>
		<li>shipdef2</li>
		<li>shipdef...</li>
	</enemyShipDefs>
</SpaceNavyDef>
  1. Navy patch template, replace { } and add shipdefs (patch examples):
<?xml version="1.0" encoding="utf-8" ?>
<Patch>
	<Operation Class="PatchOperationAdd">
		<xpath>Defs/SpaceNavyDef[defName="{spacenavydef_that_you_want_to_add_to}"]/enemyShipDefs</xpath>
		<value>
			<li>shipdef1</li>
			<li>shipdef2</li>
			<li>shipdef...</li>
		</value>
	</Operation>
</Patch>
  1. Add the files and any custom ship(s) to your mod.
  2. Enjoy.

Clone this wiki locally