Module ...

Defines factions

Functions

_M:add (t) Adds a new faction Static method
_M:factionReaction (f1, f2) Returns the status of faction f1 toward f2
_M:get (id) Returns the faction definition
_M:setFactionReaction (f1, f2, reaction, mutual) Sets the status of faction f1 toward f2
_M:setInitialReaction (f1, f2, reaction, mutual) Sets the initial reaction Static method


Functions

_M:add (t)
Adds a new faction Static method

Parameters

  • t:
_M:factionReaction (f1, f2)
Returns the status of faction f1 toward f2

Parameters

  • f1: the source faction
  • f2: the target faction

Return value:

a numerical value representing the reaction, 0 is neutral, <0 is aggressive, >0 is friendly
_M:get (id)
Returns the faction definition

Parameters

  • id:
_M:setFactionReaction (f1, f2, reaction, mutual)
Sets the status of faction f1 toward f2

Parameters

  • f1: the source faction
  • f2: the target faction
  • reaction: a numerical value representing the reaction, 0 is neutral, <0 is aggressive, >0 is friendly
  • mutual: if true the same status will be set for f2 toward f1
_M:setInitialReaction (f1, f2, reaction, mutual)
Sets the initial reaction Static method

Parameters

  • f1:
  • f2:
  • reaction:
  • mutual:

Valid XHTML 1.0!