Professional Documents
Culture Documents
Game Relations Notes
Game Relations Notes
-----------------------------------------------------------------------------
(1) Method 'set_relation' sets the personal_goodwill of the object to which the
method is applied to:
Example:
self.object:set_relation(game_object.friend, db.actor)
-----------------------------------------------------------------------------
(2) Method 'set_goodwill' works exactly the same way as 'set_relation' except that
you now set the numerical goodwill amount instead of relying on
'game_object.<relation>'. Consequently, the method can be used to alter
general_goodwill by maxima of -12000 (if the starting personal_goodwill is 9000)
and 12000 (if the starting personal_goodwill is -3000) instead of -10000 and 4000
as in the case of set_relation.
Example 1:
self.object:set_goodwill(-8000, db.actor)
Example 2:
self.object:set_goodwill(12000, db.actor)
-----------------------------------------------------------------------------
Example:
relation_registry.set_community_goodwill(self.object:character_community(),
db.actor:character_community(), 0)
Suppose that self.object's faction's community_goodwill to the player(*) is -380
and that self.object's general_goodwill is -1419. Then its community_goodwill and
general_goodwill will be 0 and -1039, respectively, after executing the function
above.
(*) The player's faction, technically, but since the player always has his own
faction (e.g. 'actor_csky' instead of 'csky') of which he is the only member, the
distinction is irrelevant here.
-----------------------------------------------------------------------------
Example 1:
db.actor:set_community_goodwill(self.object:character_community(), 1000)
db.actor:set_community_goodwill(self.object:character_community(), 2000)
Example 2:
db.actor:set_community_goodwill(self.object:character_community(), -8000)
-----------------------------------------------------------------------------
Example:
relation_registry.set_community_relation(self.object:character_community(),
db.actor:character_community(), -20000)