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

A faction member is a GameObject that's a member of a faction. More...

Inheritance diagram for PixelCrushers.LoveHate.FactionMember:
Collaboration diagram for PixelCrushers.LoveHate.FactionMember:

Public Member Functions

bool FindResources ()
 
virtual void SwitchFaction (int newFactionID)
 Switches to a new faction.
 
virtual void ResetAll ()
 Resets PAD and memory.
 
void OnLOD (int level)
 
virtual void StartMemoryCleanup ()
 
virtual void StopMemoryCleanup ()
 
virtual void CleanMemory ()
 
virtual void ForgetDeed (Guid deedGuid)
 Removes a rumor from memory.
 
virtual void ForgetDeed (int actorFactionID, int targetFactionID, string deedTag)
 Removes a rumor from memory.
 
virtual bool KnowsAboutDeed (Guid deedGuid)
 Checks if this faction contains a memory of a deed identified by its deed GUID.
 
virtual bool KnowsAboutDeed (int actorFactionID, int targetFactionID, string deedTag)
 Checks if this faction contains a memory of a deed done by an actor to a target identified by a deed tag.
 
virtual bool FindOldRumor (Rumor newRumor, out Rumor oldRumor)
 Looks for an existing similar rumor in memory.
 
virtual void AddRumorToMemory (Rumor rumor)
 Adds a rumor to short-term and long-term memory.
 
virtual void AddRumorToMemory (Rumor rumor, List< Rumor > memory)
 Adds a rumor to a memory list.
 
virtual void ModifyPAD (float happinessChange, float pleasureChange, float arousalChange, float dominanceChange)
 
virtual void SetPersonalAffinity (int subjectFactionID, float affinity)
 Sets the personal affinity to a subject.
 
virtual void SetPersonalAffinity (string subjectFactionName, float affinity)
 Sets the personal affinity to a subject.
 
virtual void ModifyPersonalAffinity (int subjectFactionID, float affinityChange)
 Modifies (increments or decrements) the personal affinity to a subject.
 
virtual void ModifyPersonalAffinity (string subjectFactionName, float affinityChange)
 Modifies (increments or decrements) the personal affinity to a subject.
 
virtual bool FindPersonalAffinity (int subjectFactionID, out float affinity)
 Finds the personal affinity to a subject.
 
virtual bool FindAffinity (int subjectFactionID, out float affinity)
 Finds the affinity to a subject, either personal affinity or using parent faction affinities.
 
virtual float GetAffinity (int subjectFactionID)
 Gets the affinity to a subject, either personal affinity or using parent faction affinities.
 
virtual float GetAffinity (FactionMember subject)
 Gets the affinity to a subject, either personal affinity or using parent faction affinities.
 
virtual float GetAffinity (string subjectFactionName)
 Gets the affinity to a subject, either personal affinity or using parent faction affinities.
 
virtual void WitnessDeed (Deed deed, FactionMember actor, bool requiresSight, Dimension dimension=Dimension.Is3D)
 Witnesses a deed.
 
bool DefaultCanSee (FactionMember actor, Dimension dimension)
 
GameObject Raycast (Transform me, Transform other, LayerMask layerMask, Dimension dimension)
 Runs a raycast from the faction member to an actor to determine if vision is clear or blocked.
 
virtual void ShareRumors (FactionMember other)
 Shares rumors with a member of some faction.
 
void DefaultShareRumor (Rumor rumor, FactionMember other)
 Default method for sharing a rumor, which simply tells the recipient to evaluate it.
 
float DefaultGetTrustInSource (FactionMember source)
 Returns the trust [-100,+100] that the faction member has in rumors reported by a source.
 
float DefaultGetTraitAlignment (float[] traits)
 Returns a value [0,+1] that indicates how well the specifies traits align with the faction member's personality traits.
 
Rumor DefaultEvaluateRumor (Rumor rumor, FactionMember source)
 Evaluates a rumor and updates the faction's state.
 
virtual void ModifyPersonality (float[] traits, float multiplier)
 Modifies the faction's personality traits by the specified trait values and multiplier.
 
float DefaultGetPowerLevel ()
 The default power level function, which simply returns 1.
 
virtual string SerializeToString ()
 Serializes the faction member's data to a string.
 
virtual void DeserializeFromString (string s)
 Deserializes the faction member's data from a string.
 
void OnDrawGizmos ()
 Draw a Love/Hate faction member gizmo based on the faction's color.
 

Static Public Member Functions

static List< string > ZonePluginActivator ()
 For optional UtopiaWorx Zone Controller integration.
 
static List< string > ZonePluginActivatorMethods ()
 For optional UtopiaWorx Zone Controller integration.
 

Public Attributes

FactionManager factionManager
 A reference to the FactionManager that will manage the FactionDatabase containing the Faction that this member belongs to.
 
FactionDatabase factionDatabase
 An editor-time-only reference to the FactionDatabase, to be used only by the editor to provide a popup list for the user to set factionID.
 
int factionID = 0
 The faction this member belongs to.
 
Pad pad = new Pad()
 The current Pleasure-Arousal-Dominance model emotional state.
 
float impressionability = 0
 Specifies how easily the faction member's personality traits change based on the traits of deeds committed by friends.
 
float traitAlignmentImportance = 50
 Specifies how much trait alignment impacts rumor evaluation.
 
float arousalImportance = 50
 Specifies how much arousal impacts rumor evaluation.
 
float deedImpactThreshold = 5
 Only acknowledge deeds whose impact is above this threshold.
 
AnimationCurve acclimatizationCurve
 Specifies how quickly the impact of repeated deeds drops off.
 
AnimationCurve powerDifferenceCurve
 Specifies how much the difference in power levels affects the dominance experienced by aggressive actions.
 
int maxMemories = 50
 The max memories to store.
 
float shortTermMemoryDuration = 300
 The short term memory duration.
 
float longTermMemoryDuration = 3600
 The long term memory duration.
 
float memoryCleanupFrequency = 2
 The frequency in seconds at which to remove old memories.
 
bool sortMemories = false
 If true memories are sorted in ascending order of their subjective magnitude.
 
List< RumorshortTermMemory = new List<Rumor>()
 
List< RumorlongTermMemory = new List<Rumor>()
 
Transform eyes = null
 The transform to raycast from for perception checks.
 
LayerMask sightLayerMask = 1
 The sight layer mask used for perception checks.
 
bool sharePlayerAffinityWithRumors = true
 When sharing rumors with another, also share this faction member's affinity to the player.
 
bool debugEvalFunc = false
 Set true to log details about rumor evaluation.
 
CanSeeDelegate CanSee = null
 Assign this delegate to override the default perception check method, which does a simple raycast.
 
ShareRumorDelegate ShareRumor = null
 Assign this delegate to override the default rumor sharing method, which simply passes the rumor to EvaluateRumor.
 
EvaluateRumorDelegate EvaluateRumor = null
 Assign this delegate to override the default rumor evaluation function.
 
GetTrustInSourceDelegate GetTrustInSource = null
 Assign this delegate to override the default function that computes trust [-100,+100] in the source of a rumor.
 
GetTraitAlignmentDelegate GetTraitAlignment = null
 Assign this delegate to override the default function that computes how well a specified set of trait values aligns with the faction member's faction traits.
 
GetPowerLevelDelegate GetPowerLevel = null
 Assign this delegate to override the default power level check, which simply returns 1.
 
GetPowerLevelDelegate GetSelfPerceivedPowerLevel = null
 Assign this delegate to override the default self-perceived power level check, which simply returns 1.
 
ComputeDominanceDelegate ComputeDominance = null
 

Protected Member Functions

virtual void Awake ()
 
virtual void Start ()
 
virtual Faction GetMyFaction ()
 
FactionManager GetRuntimeFactionManager ()
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 
bool AffinityNotFound (out float affinity)
 
virtual bool IsDeedInNoRepeatDuration (Deed deed)
 Checks if a deed is within the no-repeat time frame, in which case it should be ignored.
 

Protected Attributes

bool m_started = false
 

Properties

Faction faction [get]
 Gets the faction.
 
string factionName [get]
 Gets the faction name.
 
FactionManager runtimeFactionManager [get]
 Gets the runtime faction manager.
 

Detailed Description

A faction member is a GameObject that's a member of a faction.

This script handles functionality tied to the member such as PAD emotional state, witnessing deeds, and sharing rumors.

Member Function Documentation

◆ AddRumorToMemory() [1/2]

virtual void PixelCrushers.LoveHate.FactionMember.AddRumorToMemory ( Rumor  rumor)
inlinevirtual

Adds a rumor to short-term and long-term memory.

This method is public to expose it to delegates that override the default rumor evaluation function.

Parameters
rumorRumor to add.

◆ AddRumorToMemory() [2/2]

virtual void PixelCrushers.LoveHate.FactionMember.AddRumorToMemory ( Rumor  rumor,
List< Rumor memory 
)
inlinevirtual

Adds a rumor to a memory list.

This method is public to expose it to delegates that override the default rumor evaluation function.

Parameters
rumorRumor to add.
memoryMemory list to add rumor to.

◆ AffinityNotFound()

bool PixelCrushers.LoveHate.FactionMember.AffinityNotFound ( out float  affinity)
inlineprotected

◆ Awake()

virtual void PixelCrushers.LoveHate.FactionMember.Awake ( )
inlineprotectedvirtual

◆ CleanMemory()

virtual void PixelCrushers.LoveHate.FactionMember.CleanMemory ( )
inlinevirtual

◆ DefaultCanSee()

bool PixelCrushers.LoveHate.FactionMember.DefaultCanSee ( FactionMember  actor,
Dimension  dimension 
)
inline

◆ DefaultEvaluateRumor()

Rumor PixelCrushers.LoveHate.FactionMember.DefaultEvaluateRumor ( Rumor  rumor,
FactionMember  source 
)
inline

Evaluates a rumor and updates the faction's state.

Returns
If this is a new type of deed, returns a new rumor if the impact is big enough to remember (otherwise null). If it's a repeat deed, returns the existing rumor.
Parameters
rumorRumor.
sourceSource.

◆ DefaultGetPowerLevel()

float PixelCrushers.LoveHate.FactionMember.DefaultGetPowerLevel ( )
inline

The default power level function, which simply returns 1.

Returns
The faction member's default power level.

◆ DefaultGetTraitAlignment()

float PixelCrushers.LoveHate.FactionMember.DefaultGetTraitAlignment ( float[]  traits)
inline

Returns a value [0,+1] that indicates how well the specifies traits align with the faction member's personality traits.

Parameters
traitsThe traits to compare against the faction member's personality traits.
Returns
A value in the range 0 (no alignment) to +1 (100% alignment) indicating how well the values align.

◆ DefaultGetTrustInSource()

float PixelCrushers.LoveHate.FactionMember.DefaultGetTrustInSource ( FactionMember  source)
inline

Returns the trust [-100,+100] that the faction member has in rumors reported by a source.

Parameters
sourceSource.
Returns
The faction member's affinity to the source, or 100 if the source is self.

◆ DefaultShareRumor()

void PixelCrushers.LoveHate.FactionMember.DefaultShareRumor ( Rumor  rumor,
FactionMember  other 
)
inline

Default method for sharing a rumor, which simply tells the recipient to evaluate it.

Parameters
rumorA rumor to share.
otherA member of a faction. Recipient who receives the shared rumor.

◆ DeserializeFromString()

virtual void PixelCrushers.LoveHate.FactionMember.DeserializeFromString ( string  s)
inlinevirtual

Deserializes the faction member's data from a string.

This string must have been generated by SerializeToString. This method replaces the faction member's current data with the serialized data in the strnig.

Parameters
sSeralized data.

◆ FindAffinity()

virtual bool PixelCrushers.LoveHate.FactionMember.FindAffinity ( int  subjectFactionID,
out float  affinity 
)
inlinevirtual

Finds the affinity to a subject, either personal affinity or using parent faction affinities.

Returns
true, if affinity was found, false otherwise.
Parameters
subjectFactionIDSubject faction ID.
affinityAffinity.

◆ FindOldRumor()

virtual bool PixelCrushers.LoveHate.FactionMember.FindOldRumor ( Rumor  newRumor,
out Rumor  oldRumor 
)
inlinevirtual

Looks for an existing similar rumor in memory.

Returns
true, if old rumor was found, false otherwise.
Parameters
newRumorNew rumor.
oldRumorOld rumor.

◆ FindPersonalAffinity()

virtual bool PixelCrushers.LoveHate.FactionMember.FindPersonalAffinity ( int  subjectFactionID,
out float  affinity 
)
inlinevirtual

Finds the personal affinity to a subject.

Returns
true, if personal affinity was found, false otherwise.
Parameters
subjectFactionIDSubject faction ID.
affinityAffinity.

◆ FindResources()

bool PixelCrushers.LoveHate.FactionMember.FindResources ( )
inline

◆ ForgetDeed() [1/2]

virtual void PixelCrushers.LoveHate.FactionMember.ForgetDeed ( Guid  deedGuid)
inlinevirtual

Removes a rumor from memory.

Parameters
deedGuidDeed GUID.

◆ ForgetDeed() [2/2]

virtual void PixelCrushers.LoveHate.FactionMember.ForgetDeed ( int  actorFactionID,
int  targetFactionID,
string  deedTag 
)
inlinevirtual

Removes a rumor from memory.

Parameters
actorFactionIDActor faction ID.
targetFactionIDTarget faction ID.
deedTagDeed tag.

◆ GetAffinity() [1/3]

virtual float PixelCrushers.LoveHate.FactionMember.GetAffinity ( FactionMember  subject)
inlinevirtual

Gets the affinity to a subject, either personal affinity or using parent faction affinities.

Returns
The affinity.
Parameters
subjectSubject.

◆ GetAffinity() [2/3]

virtual float PixelCrushers.LoveHate.FactionMember.GetAffinity ( int  subjectFactionID)
inlinevirtual

Gets the affinity to a subject, either personal affinity or using parent faction affinities.

Returns
The affinity.
Parameters
subjectFactionIDSubject faction ID.

◆ GetAffinity() [3/3]

virtual float PixelCrushers.LoveHate.FactionMember.GetAffinity ( string  subjectFactionName)
inlinevirtual

Gets the affinity to a subject, either personal affinity or using parent faction affinities.

Returns
The affinity.
Parameters
subjectFactionNameSubject faction name.

◆ GetMyFaction()

virtual Faction PixelCrushers.LoveHate.FactionMember.GetMyFaction ( )
inlineprotectedvirtual

◆ GetRuntimeFactionManager()

FactionManager PixelCrushers.LoveHate.FactionMember.GetRuntimeFactionManager ( )
inlineprotected

◆ IsDeedInNoRepeatDuration()

virtual bool PixelCrushers.LoveHate.FactionMember.IsDeedInNoRepeatDuration ( Deed  deed)
inlineprotectedvirtual

Checks if a deed is within the no-repeat time frame, in which case it should be ignored.

◆ KnowsAboutDeed() [1/2]

virtual bool PixelCrushers.LoveHate.FactionMember.KnowsAboutDeed ( Guid  deedGuid)
inlinevirtual

Checks if this faction contains a memory of a deed identified by its deed GUID.

Returns
true, if the faction member contains a memory of the deed, false otherwise.
Parameters
deedGuidDeed GUID.

◆ KnowsAboutDeed() [2/2]

virtual bool PixelCrushers.LoveHate.FactionMember.KnowsAboutDeed ( int  actorFactionID,
int  targetFactionID,
string  deedTag 
)
inlinevirtual

Checks if this faction contains a memory of a deed done by an actor to a target identified by a deed tag.

Returns
true, if the faction member contains a memory of the deed, false otherwise.
Parameters
actorFactionIDActor faction ID.
targetFactionIDTarget faction ID.
deedTagDeed tag.

◆ ModifyPAD()

virtual void PixelCrushers.LoveHate.FactionMember.ModifyPAD ( float  happinessChange,
float  pleasureChange,
float  arousalChange,
float  dominanceChange 
)
inlinevirtual

◆ ModifyPersonalAffinity() [1/2]

virtual void PixelCrushers.LoveHate.FactionMember.ModifyPersonalAffinity ( int  subjectFactionID,
float  affinityChange 
)
inlinevirtual

Modifies (increments or decrements) the personal affinity to a subject.

Parameters
subjectFactionIDSubject faction ID.
affinityChangeAffinity change.

◆ ModifyPersonalAffinity() [2/2]

virtual void PixelCrushers.LoveHate.FactionMember.ModifyPersonalAffinity ( string  subjectFactionName,
float  affinityChange 
)
inlinevirtual

Modifies (increments or decrements) the personal affinity to a subject.

Parameters
subjectFactionNameSubject faction name.
affinityChangeAffinity change.

◆ ModifyPersonality()

virtual void PixelCrushers.LoveHate.FactionMember.ModifyPersonality ( float[]  traits,
float  multiplier 
)
inlinevirtual

Modifies the faction's personality traits by the specified trait values and multiplier.

The DefaultEvaluateRumor method calls ModifyPersonality when the faction member is impressionable and witnesses a deed committed by an actor for which it has positive affinity.

Parameters
traits
multiplierMultiple the trait values by this. Typically less than 1 to scale the trait values down.

◆ OnDisable()

virtual void PixelCrushers.LoveHate.FactionMember.OnDisable ( )
inlineprotectedvirtual

◆ OnDrawGizmos()

void PixelCrushers.LoveHate.FactionMember.OnDrawGizmos ( )
inline

Draw a Love/Hate faction member gizmo based on the faction's color.

◆ OnEnable()

virtual void PixelCrushers.LoveHate.FactionMember.OnEnable ( )
inlineprotectedvirtual

◆ OnLOD()

void PixelCrushers.LoveHate.FactionMember.OnLOD ( int  level)
inline

◆ Raycast()

GameObject PixelCrushers.LoveHate.FactionMember.Raycast ( Transform  me,
Transform  other,
LayerMask  layerMask,
Dimension  dimension 
)
inline

Runs a raycast from the faction member to an actor to determine if vision is clear or blocked.

This method is public to expose it to delegates that might need it when overriding default functionality.

Parameters
meThis faction member's eyes transform.
otherThe transform of the actor we're trying to witness.
layerMaskThe raycast layermask.
dimensionThe dimension in which to run the raycast.
Returns

◆ ResetAll()

virtual void PixelCrushers.LoveHate.FactionMember.ResetAll ( )
inlinevirtual

Resets PAD and memory.

◆ SerializeToString()

virtual string PixelCrushers.LoveHate.FactionMember.SerializeToString ( )
inlinevirtual

Serializes the faction member's data to a string.

Returns
The string representing the faction member's data.

◆ SetPersonalAffinity() [1/2]

virtual void PixelCrushers.LoveHate.FactionMember.SetPersonalAffinity ( int  subjectFactionID,
float  affinity 
)
inlinevirtual

Sets the personal affinity to a subject.

Parameters
subjectFactionIDSubject faction ID.
affinityAffinity.

◆ SetPersonalAffinity() [2/2]

virtual void PixelCrushers.LoveHate.FactionMember.SetPersonalAffinity ( string  subjectFactionName,
float  affinity 
)
inlinevirtual

Sets the personal affinity to a subject.

Parameters
subjectFactionNameSubject faction name.
affinityAffinity.

◆ ShareRumors()

virtual void PixelCrushers.LoveHate.FactionMember.ShareRumors ( FactionMember  other)
inlinevirtual

Shares rumors with a member of some faction.

Also shares affinity to the player.

Parameters
otherA member of a faction. Recipient who receives this member's rumors.

◆ Start()

virtual void PixelCrushers.LoveHate.FactionMember.Start ( )
inlineprotectedvirtual

◆ StartMemoryCleanup()

virtual void PixelCrushers.LoveHate.FactionMember.StartMemoryCleanup ( )
inlinevirtual

◆ StopMemoryCleanup()

virtual void PixelCrushers.LoveHate.FactionMember.StopMemoryCleanup ( )
inlinevirtual

◆ SwitchFaction()

virtual void PixelCrushers.LoveHate.FactionMember.SwitchFaction ( int  newFactionID)
inlinevirtual

Switches to a new faction.

It may be more appropriate in many cases to add or delete a parent faction rather than changing the member's own faction.

Parameters
newFactionIDFaction ID of the member's new faction.

◆ WitnessDeed()

virtual void PixelCrushers.LoveHate.FactionMember.WitnessDeed ( Deed  deed,
FactionMember  actor,
bool  requiresSight,
Dimension  dimension = Dimension::Is3D 
)
inlinevirtual

Witnesses a deed.

Parameters
deedDeed.
actorActor who committed deed.
requiresSightIf true, must be able to see actor to witness deed.
dimensionSpecifies how to determine line of sight (2D or 3D).
minAffinityEffectEvaluating this deed will never cause faction's affinity to go below this value.
maxAffinityEffectEvaluating this deed will never cause faction's affinity to go below above value.
noRepeatDelayFaction members will ignore deeds that are repeated within this time frame.

◆ ZonePluginActivator()

static List< string > PixelCrushers.LoveHate.FactionMember.ZonePluginActivator ( )
inlinestatic

For optional UtopiaWorx Zone Controller integration.

Returns
The properties that Zone Controller can control.

◆ ZonePluginActivatorMethods()

static List< string > PixelCrushers.LoveHate.FactionMember.ZonePluginActivatorMethods ( )
inlinestatic

For optional UtopiaWorx Zone Controller integration.

Returns
The methods that Zone Controller can invoke.

Member Data Documentation

◆ acclimatizationCurve

AnimationCurve PixelCrushers.LoveHate.FactionMember.acclimatizationCurve
Initial value:
= new AnimationCurve(
new Keyframe[2] { new Keyframe(0, 1), new Keyframe(20, 0) })

Specifies how quickly the impact of repeated deeds drops off.

◆ arousalImportance

float PixelCrushers.LoveHate.FactionMember.arousalImportance = 50

Specifies how much arousal impacts rumor evaluation.

A value of 100 means it can double the impact if the faction member's arousal is at maximum.

◆ CanSee

CanSeeDelegate PixelCrushers.LoveHate.FactionMember.CanSee = null

Assign this delegate to override the default perception check method, which does a simple raycast.

◆ ComputeDominance

ComputeDominanceDelegate PixelCrushers.LoveHate.FactionMember.ComputeDominance = null

◆ debugEvalFunc

bool PixelCrushers.LoveHate.FactionMember.debugEvalFunc = false

Set true to log details about rumor evaluation.

◆ deedImpactThreshold

float PixelCrushers.LoveHate.FactionMember.deedImpactThreshold = 5

Only acknowledge deeds whose impact is above this threshold.

◆ EvaluateRumor

EvaluateRumorDelegate PixelCrushers.LoveHate.FactionMember.EvaluateRumor = null

Assign this delegate to override the default rumor evaluation function.

◆ eyes

Transform PixelCrushers.LoveHate.FactionMember.eyes = null

The transform to raycast from for perception checks.

If null this GameObject is used.

◆ factionDatabase

FactionDatabase PixelCrushers.LoveHate.FactionMember.factionDatabase

An editor-time-only reference to the FactionDatabase, to be used only by the editor to provide a popup list for the user to set factionID.

To access the FactionDatabase at runtime, go through factionManager.

◆ factionID

int PixelCrushers.LoveHate.FactionMember.factionID = 0

The faction this member belongs to.

◆ factionManager

FactionManager PixelCrushers.LoveHate.FactionMember.factionManager

A reference to the FactionManager that will manage the FactionDatabase containing the Faction that this member belongs to.

◆ GetPowerLevel

GetPowerLevelDelegate PixelCrushers.LoveHate.FactionMember.GetPowerLevel = null

Assign this delegate to override the default power level check, which simply returns 1.

◆ GetSelfPerceivedPowerLevel

GetPowerLevelDelegate PixelCrushers.LoveHate.FactionMember.GetSelfPerceivedPowerLevel = null

Assign this delegate to override the default self-perceived power level check, which simply returns 1.

This is a separate method from GetPowerLevel to allow factions to think they're stronger or weaker than they really are.

◆ GetTraitAlignment

GetTraitAlignmentDelegate PixelCrushers.LoveHate.FactionMember.GetTraitAlignment = null

Assign this delegate to override the default function that computes how well a specified set of trait values aligns with the faction member's faction traits.

◆ GetTrustInSource

GetTrustInSourceDelegate PixelCrushers.LoveHate.FactionMember.GetTrustInSource = null

Assign this delegate to override the default function that computes trust [-100,+100] in the source of a rumor.

The default returns the affinity to the source, or +100 if the source is self.

◆ impressionability

float PixelCrushers.LoveHate.FactionMember.impressionability = 0

Specifies how easily the faction member's personality traits change based on the traits of deeds committed by friends.

Zero means they don't change.

◆ longTermMemory

List<Rumor> PixelCrushers.LoveHate.FactionMember.longTermMemory = new List<Rumor>()

◆ longTermMemoryDuration

float PixelCrushers.LoveHate.FactionMember.longTermMemoryDuration = 3600

The long term memory duration.

Rumors are shared from long term memory.

◆ m_started

bool PixelCrushers.LoveHate.FactionMember.m_started = false
protected

◆ maxMemories

int PixelCrushers.LoveHate.FactionMember.maxMemories = 50

The max memories to store.

Older memories are dropped if over the limit.

◆ memoryCleanupFrequency

float PixelCrushers.LoveHate.FactionMember.memoryCleanupFrequency = 2

The frequency in seconds at which to remove old memories.

This frequency applies to level of detail (LOD) 0. Higher LOD values will decrease the frequency.

◆ pad

Pad PixelCrushers.LoveHate.FactionMember.pad = new Pad()

The current Pleasure-Arousal-Dominance model emotional state.

◆ powerDifferenceCurve

AnimationCurve PixelCrushers.LoveHate.FactionMember.powerDifferenceCurve
Initial value:
= new AnimationCurve(
new Keyframe[3] { new Keyframe(-10, 0), new Keyframe(1, 0.1f), new Keyframe(10, 1) })

Specifies how much the difference in power levels affects the dominance experienced by aggressive actions.

◆ sharePlayerAffinityWithRumors

bool PixelCrushers.LoveHate.FactionMember.sharePlayerAffinityWithRumors = true

When sharing rumors with another, also share this faction member's affinity to the player.

◆ ShareRumor

ShareRumorDelegate PixelCrushers.LoveHate.FactionMember.ShareRumor = null

Assign this delegate to override the default rumor sharing method, which simply passes the rumor to EvaluateRumor.

◆ shortTermMemory

List<Rumor> PixelCrushers.LoveHate.FactionMember.shortTermMemory = new List<Rumor>()

◆ shortTermMemoryDuration

float PixelCrushers.LoveHate.FactionMember.shortTermMemoryDuration = 300

The short term memory duration.

Short term memory affects the faction's PAD.

◆ sightLayerMask

LayerMask PixelCrushers.LoveHate.FactionMember.sightLayerMask = 1

The sight layer mask used for perception checks.

◆ sortMemories

bool PixelCrushers.LoveHate.FactionMember.sortMemories = false

If true memories are sorted in ascending order of their subjective magnitude.

◆ traitAlignmentImportance

float PixelCrushers.LoveHate.FactionMember.traitAlignmentImportance = 50

Specifies how much trait alignment impacts rumor evaluation.

A value of 100 means it can double the impact if the deed's traits align perfectly with the faction member's.

Property Documentation

◆ faction

Faction PixelCrushers.LoveHate.FactionMember.faction
get

Gets the faction.

The faction.

◆ factionName

string PixelCrushers.LoveHate.FactionMember.factionName
get

Gets the faction name.

◆ runtimeFactionManager

FactionManager PixelCrushers.LoveHate.FactionMember.runtimeFactionManager
get

Gets the runtime faction manager.

The runtime faction manager.


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