Factions

Here you define the Factions (groups that characters belong to and how they are associated). Other systems in plyGame will use these when needed. The non-player character AI, for example, would use the Factions system to determine if the character can attack another.

Definition

Variables

Below the Basic Definition you will see a grid of variables, assuming you defined any. The variables in this grid should be read as, for the selected Faction the variable in the row of the named labeled Faction has this value towards that Faction.

In the the screenshot the Villagers Faction (selected) has 0 Reputation towards Player, 100 Reputation towards Villagers and 5 Reputation towards the Monsters Faction. You can define various kinds of variables to use here and they can be accessed and manipulated via Blocks.

Faction Manager

Click on the ‘gear’ icon to open the editor panel where you can setup the faction manager, define faction variables and set the relation between factions.

Here you can set whether the Faction Variables should persist. The Edit Events button is used to open the plyBlox editor where you can add Faction specific Events to respond to. The Edit Variables button opens the Faction Manager’s plyBlox in the Inspector so that you can edit the Blox’ Local Variables, it has nothing to do with the Faction Variables, which are defined in the factions editor.

Faction Variables

To define variables, click on the ‘gear’ icon in the factions toolbar. In the pane that comes up you will see a place where you can enter a name for the new variable, select its type and then press the (+) button to add it.

The value of the variables can be persisted (saved/ restored) by the LoadSave System if you set the option in the Faction Manager settings. Keep in mind that the Game Object, Unity Object and System Object types can not be saved so any changes you make to them at runtime will be lost when a game session is loaded/ restored (so they will be initialed with whatever was set during design/ edit time).

Relationship

Pressing the ‘gear’ icon in the Factions toolbar will open the relationship editor where you can change the Status of Factions towards each other. You click on the green/ blue/ red buttons to change the relationship.

The relationship is indicated by the coloured circle. It indicates the relationship of the Factions in A (row) towards the Factions in B (column) .

In the example image the Player is Friendly towards Villagers, as indicated by the Green icon in the Player row (A) and Villager column (B). The Villagers on the other hand is Neutral towards the Player Faction as indicated by the Blue icon in the VIllager row (A) and Player column (B).

Note that the relation order is not updated when you move Factions in the factions list so you will have to check the relations after moving factions up or down in the list of defined factions.

--eof--