Loading...
Searching...
No Matches
PixelCrushers.LoveHate.Deed Class Reference

A deed is an objective record of an act committed by an actor to a target. More...

Collaboration diagram for PixelCrushers.LoveHate.Deed:

Public Member Functions

void Assign (string tag, int actorFactionID, int targetFactionID, float impact, float aggression, float actorPowerLevel, float[] traits, PermittedEvaluators permittedEvaluators=PermittedEvaluators.Everyone, float minAffinityEffect=-100, float maxAffinityEffect=100, float noRepeatDuration=0)
 Assigns content to a deed object.
 

Static Public Member Functions

static Deed GetNew (string tag, int actorFactionID, int targetFactionID, float impact, float aggression, float actorPowerLevel, float[] traits, PermittedEvaluators permittedEvaluators=PermittedEvaluators.Everyone, float minAffinityEffect=-100, float maxAffinityEffect=100, float noRepeatDuration=0)
 Gets a new deed object from the pool.
 
static Deed GetNew (DeedTemplate deedTemplate, int actorFactionID, int targetFactionID, float actorPowerLevel, PermittedEvaluators permittedEvaluators=PermittedEvaluators.Everyone)
 Gets a new deed object from the pool.
 
static void Release (Deed deed)
 Releases a deed object back to the pool.
 

Public Attributes

Guid guid
 The GUID for this deed, used to determine if a faction has already heard about the deed when sharing rumors.
 
DeedCategory category
 Optional category this deed belongs to.
 
string tag
 The type of deed (e.g., "attack", "compliment").
 
int actorFactionID
 The actor faction that committed the deed.
 
int targetFactionID
 The target faction that the deed was done to.
 
float impact
 The impact of the deed, where -100 is the worst and +100 is the best.
 
float aggression
 How aggressive or submissive the deed is, where -100 is the most submissive and +100 is the most aggressive.
 
float actorPowerLevel
 The actor's power level.
 
float[] traits
 The traits associated with the deed.
 
PermittedEvaluators permittedEvaluators = PermittedEvaluators.Everyone
 Who is allowed to evaluate the deed when witnessed or shared as gossip.
 
float minAffinityEffect = -100
 Evaluating this deed will never cause faction's affinity to go below this value.
 
float maxAffinityEffect = -100
 Evaluating this deed will never cause faction's affinity to go below above value.
 
float noRepeatDuration = 0
 Faction members will ignore deeds that are repeated within this duration.
 
int refCount
 A deed object can have multiple references to it.
 

Static Public Attributes

static Pool< Deedpool = new Pool<Deed>()
 A static pool of objects, to prevent garbage collection stutter.
 

Detailed Description

A deed is an objective record of an act committed by an actor to a target.

Member Function Documentation

◆ Assign()

void PixelCrushers.LoveHate.Deed.Assign ( string  tag,
int  actorFactionID,
int  targetFactionID,
float  impact,
float  aggression,
float  actorPowerLevel,
float[]  traits,
PermittedEvaluators  permittedEvaluators = PermittedEvaluators::Everyone,
float  minAffinityEffect = -100,
float  maxAffinityEffect = 100,
float  noRepeatDuration = 0 
)
inline

Assigns content to a deed object.

Parameters
tagThe deed tag (e.g., "attack", "compliment").
actorFactionIDFaction ID of the actor that committed the deed.
targetFactionIDFaction ID of the target that the action was done to.
impactImpact to the target, where -100 is worst and +100 is best.
aggressionAggressiveness of the deed [-100,+100].
actorPowerLevelThe actor's power level.
traitsTraits associated with the action.
permittedEvaluatorsWho is allowed to evaluate the deed.

◆ GetNew() [1/2]

static Deed PixelCrushers.LoveHate.Deed.GetNew ( DeedTemplate  deedTemplate,
int  actorFactionID,
int  targetFactionID,
float  actorPowerLevel,
PermittedEvaluators  permittedEvaluators = PermittedEvaluators::Everyone 
)
inlinestatic

Gets a new deed object from the pool.

Returns
The new.
Parameters
deedTemplateDeed template (typically from DeedTemplateLibrary).
actorFactionIDActor faction ID.
targetFactionIDTarget faction ID.
actorPowerLevelActor power level.
permittedEvaluatorsWho is allowed to evaluate the deed.

◆ GetNew() [2/2]

static Deed PixelCrushers.LoveHate.Deed.GetNew ( string  tag,
int  actorFactionID,
int  targetFactionID,
float  impact,
float  aggression,
float  actorPowerLevel,
float[]  traits,
PermittedEvaluators  permittedEvaluators = PermittedEvaluators::Everyone,
float  minAffinityEffect = -100,
float  maxAffinityEffect = 100,
float  noRepeatDuration = 0 
)
inlinestatic

Gets a new deed object from the pool.

Returns
The new.
Parameters
tagTag.
actorFactionIDActor faction ID.
targetFactionIDTarget faction ID.
impactImpact.
aggressionAggression.
actorPowerLevelActor power level.
traitsTraits.
permittedEvaluatorsWho is allowed to evaluate the deed.

◆ Release()

static void PixelCrushers.LoveHate.Deed.Release ( Deed  deed)
inlinestatic

Releases a deed object back to the pool.

Parameters
deedDeed.

Member Data Documentation

◆ actorFactionID

int PixelCrushers.LoveHate.Deed.actorFactionID

The actor faction that committed the deed.

◆ actorPowerLevel

float PixelCrushers.LoveHate.Deed.actorPowerLevel

The actor's power level.

◆ aggression

float PixelCrushers.LoveHate.Deed.aggression

How aggressive or submissive the deed is, where -100 is the most submissive and +100 is the most aggressive.

◆ category

DeedCategory PixelCrushers.LoveHate.Deed.category

Optional category this deed belongs to.

◆ guid

Guid PixelCrushers.LoveHate.Deed.guid

The GUID for this deed, used to determine if a faction has already heard about the deed when sharing rumors.

◆ impact

float PixelCrushers.LoveHate.Deed.impact

The impact of the deed, where -100 is the worst and +100 is the best.

For example, killing a target in an awful way approaches -100, while saving a target's family approaches +100.

◆ maxAffinityEffect

float PixelCrushers.LoveHate.Deed.maxAffinityEffect = -100

Evaluating this deed will never cause faction's affinity to go below above value.

◆ minAffinityEffect

float PixelCrushers.LoveHate.Deed.minAffinityEffect = -100

Evaluating this deed will never cause faction's affinity to go below this value.

◆ noRepeatDuration

float PixelCrushers.LoveHate.Deed.noRepeatDuration = 0

Faction members will ignore deeds that are repeated within this duration.

◆ permittedEvaluators

PermittedEvaluators PixelCrushers.LoveHate.Deed.permittedEvaluators = PermittedEvaluators.Everyone

Who is allowed to evaluate the deed when witnessed or shared as gossip.

◆ pool

Pool<Deed> PixelCrushers.LoveHate.Deed.pool = new Pool<Deed>()
static

A static pool of objects, to prevent garbage collection stutter.

◆ refCount

int PixelCrushers.LoveHate.Deed.refCount

A deed object can have multiple references to it.

When there are no longer any references to a deed object, we can return it to the pool.

◆ tag

string PixelCrushers.LoveHate.Deed.tag

The type of deed (e.g., "attack", "compliment").

◆ targetFactionID

int PixelCrushers.LoveHate.Deed.targetFactionID

The target faction that the deed was done to.

◆ traits

float [] PixelCrushers.LoveHate.Deed.traits

The traits associated with the deed.


The documentation for this class was generated from the following file: