Hireable Factions - Vanilla-Expanded/VanillaExpandedFramework GitHub Wiki
With the hireable factions system, you can specify factions that the player can hire in exchange for silver, so they'll come to your map for a time and help the colony with work and/or combat. These are accessed by the player through the comms console.
The system is handled through a Def, HireableFactionDef:
[Unsaved] private Color? cachedColor;
public Color color;
public string commTag;
[Unsaved] public string editBuffer;
public List<PawnKindDef> pawnKinds;
public FactionDef referencedFaction;
public string texPath;
[Unsaved] private Texture2D texture;
You need to make a Def in an xml file. For example, here are two of the hireable factions in VFE Pirates:
<VEF.Planet.HireableFactionDef>
<defName>Pirate</defName>
<label>pirates</label>
<description>A loose confederation of pirate gangs who've agreed to mostly fight outsiders instead of fighting each other.\n\nPirates don't sow, they don't build, and they rarely trade. Driven by a blood-and-honor culture that values personal strength and ruthlessness, they enrich themselves by raiding and robbing their more productive neighbors.\n\nTheir technology level depends mostly on who they've managed to steal from recently. Mostly they carry gunpowder weapons, though some prefer to stab victims at close range.</description>
<texPath>World/WorldObjects/Expanding/PirateOutpost</texPath>
<color>(1, 0.74, 0.83)</color>
<pawnKinds>
<li>Drifter</li>
<li>Pirate</li>
<li>Mercenary_Gunner</li>
</pawnKinds>
<commTag>pirates</commTag>
<referencedFaction>Pirate</referencedFaction>
</VEF.Planet.HireableFactionDef>
<VEF.Planet.HireableFactionDef>
<defName>VFEP_Junkers</defName>
<label>junkers</label>
<description>A loose confederation of pirate gangs who've agreed to mostly fight outsiders instead of fighting each other.
Pirates don't sow, they don't build, and they rarely trade. Driven by a blood-and-honor culture that values personal strength and ruthlessness, they enrich themselves by raiding and robbing their more productive neighbors.
Junkers utilise warcasket technology and seal themselves in metal tombs in which they raid, steal, plunder and inevitably die. They rarely use melee weapons and prefer to keep at distance to the enemy to fully utilise the powerful warcasket weaponry.</description>
<texPath>UI/FactionIcons/JunkersOutpost</texPath>
<color>(0.74, 0.33, 0.33)</color>
<pawnKinds>
<li>VFEP_Footsoldier</li>
<li>VFEP_Veteran</li>
<li>VFEP_HeavyWeaponsPlatform</li>
</pawnKinds>
<commTag>pirates</commTag>
<referencedFaction>VFEP_Junkers</referencedFaction>
</VEF.Planet.HireableFactionDef>