Documentation of the faction.xml faction definitions.
faction.xml stores information about the in-game's factions. Factions are used to determine which AI ships are hostile toward one another and to the player. Presence is also faction-bound.
The following XML snippet demonstrates all the tags that make up faction.xml.
<faction name="Collective"> <static /> <invisible /> <display>Small Harmless Animals</display> <logo>collective</logo> <player>-100</player> <colour>silver</colour> <spawn>collective</spawn> <equip>collective</equip> <standing>collective</standing> <allies /> <enemies> <enemy>Empire</enemy> <enemy>Pirate</enemy> </enemies> </faction>
If this tag exists, the faction's reputation is static. This means that the faction will never change its opinion of the player, unless a script or mission forces it to.
If this tag exists, the faction will not show up in the player's faction list.
If this tag exists, ships belonging to this faction will appear as belonging to the faction specified. This is useful for making AI ships behave in particular ways (for example, make ships attack other ships from the same faction).
The logo used for this faction. Logos are taken from gfx/logo. The value of this tag should NOT include the file extension.
This is the reputation of the player with this faction at the beginning of the game. The value must be between -100 and 100, and 0 is neutral.
This is the faction's colour. This colour is used on the galaxy map to indicate which systems are occupied by which factions. Colours are defined in src/colour.c.
This is the name of the spawn script for this faction. Only factions with presence need spawn scripts. Spawn scripts are located in dat/faction/spawn.
This is the name of the equip script for this faction. Ships for this faction will be equipped according to the specified equip script. Equip scripts are located in dat/faction/equip.
This is the name of the standing script for this faction. The standing script governs various aspects of the player's standing with the faction. Standing scripts are located in dat/faction/standing.
This is a list of factions that this faction considers its allies. Allies will help each other in battle. factions will increase their opinion of the player if one of their allies does, and vice versa. Note that the game assumes that if one faction is allied with another, the opposite is also true.
This is a list of factions that this faction considers its enemies. Enemies will attack each other. Factions will increase their opinion of the player if the player destroys ships belonging to their enemies. Note that the game assumes that if one faction is hostile to another, the opposite is also true.