Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Welcome to the Factions wiki!
The Factions module introduces Factions which represent groups that characters can belong to. The members of a faction share certain characteristics which influence their interactions with each other and with members of other factions.
The rest of this page gives an overview of the concepts used to accomplish the above goal. The other two pages give detailed information on usage.
What are Factions?
Factions are a collection of policies and are referred to by the name of the faction.
What are Policies?
They are like components, plain key value pairs which are used to give behavior. The are several types of policies:
InternalPolicy- Involving only one faction eg (internal trade, solidarity, landOwned)
ExternalPolicy- Involving two factions. They are like Relationships between factions, Types of ExternalPolicies are:
OneWayPolicy- Where the order of factions matters. For example In diplomacy one Faction may have high influence on the other, but the other Faction doesn't have influence on the first one.
TwoWayPolicy- Order of the factions don't matter. For example a simple ExternalTradePolicy, Friendliness Policy etc
If you compare it to a graph, InternalPolicies are information stored in the nodes, OneWayPolicies are directed edges and TwoWayPolicies are undirected edges.
Parallels to the EntitySystem
- Just like how an Entity is nothing but a plain collection of components, a Faction is nothing but a plain collection of policies.
- Both components and policies are used to store simple objects that influence behavior. (Though components can store more complex objects). But policies can relate more than one faction, whereas a component belongs to only one entity.