Loading...
Searching...
No Matches
PixelCrushers.LoveHate.ORKFrameworkSupport.OrkFactionMember Class Reference

This subclass of FactionMember integrates with ORK's faction system. More...

Inheritance diagram for PixelCrushers.LoveHate.ORKFrameworkSupport.OrkFactionMember:
Collaboration diagram for PixelCrushers.LoveHate.ORKFrameworkSupport.OrkFactionMember:

Classes

class  EventInteractions
 

Public Member Functions

void OnWitnessDeed (Rumor rumor)
 Raises the witness deed event.
 
void OnShareRumors (FactionMember other)
 Raises the share rumors event.
 
void OnEnterAura (AbstractAuraTrigger aura)
 
void OnGreet (FactionMember other)
 
void OnGossip (FactionMember other)
 
- Public Member Functions inherited from PixelCrushers.LoveHate.FactionMember
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.
 

Public Attributes

EventInteractions eventInteractions = new EventInteractions()
 The event interactions to start when Love/Hate events occur.
 
- Public Attributes inherited from PixelCrushers.LoveHate.FactionMember
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

override void Awake ()
 
- Protected Member Functions inherited from PixelCrushers.LoveHate.FactionMember
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.
 

Properties

Rumor lastRumor [get]
 Gets the last rumor witnessed.
 
FactionMember lastOtherFactionMember [get]
 Gets the last other faction member involved in a greeting, gossip, or rumors.
 
AbstractAuraTrigger lastAura [get]
 Gets the last aura entered.
 
- Properties inherited from PixelCrushers.LoveHate.FactionMember
Faction faction [get]
 Gets the faction.
 
string factionName [get]
 Gets the faction name.
 
FactionManager runtimeFactionManager [get]
 Gets the runtime faction manager.
 

Additional Inherited Members

- Static Public Member Functions inherited from PixelCrushers.LoveHate.FactionMember
static List< string > ZonePluginActivator ()
 For optional UtopiaWorx Zone Controller integration.
 
static List< string > ZonePluginActivatorMethods ()
 For optional UtopiaWorx Zone Controller integration.
 
- Protected Attributes inherited from PixelCrushers.LoveHate.FactionMember
bool m_started = false
 

Detailed Description

This subclass of FactionMember integrates with ORK's faction system.

In an ORK project, use it instead of FactionMember. It uses the faction member's combatant level for its power level, and starts ORK events when Love/Hate events occur.

Member Function Documentation

◆ Awake()

override void PixelCrushers.LoveHate.ORKFrameworkSupport.OrkFactionMember.Awake ( )
inlineprotectedvirtual

◆ OnEnterAura()

void PixelCrushers.LoveHate.ORKFrameworkSupport.OrkFactionMember.OnEnterAura ( AbstractAuraTrigger  aura)
inline

◆ OnGossip()

void PixelCrushers.LoveHate.ORKFrameworkSupport.OrkFactionMember.OnGossip ( FactionMember  other)
inline

◆ OnGreet()

void PixelCrushers.LoveHate.ORKFrameworkSupport.OrkFactionMember.OnGreet ( FactionMember  other)
inline

◆ OnShareRumors()

void PixelCrushers.LoveHate.ORKFrameworkSupport.OrkFactionMember.OnShareRumors ( FactionMember  other)
inline

Raises the share rumors event.

Parameters
otherThe other faction member that this faction member is sharing deeds with.

Implements PixelCrushers.LoveHate.IShareRumorsEventHandler.

◆ OnWitnessDeed()

void PixelCrushers.LoveHate.ORKFrameworkSupport.OrkFactionMember.OnWitnessDeed ( Rumor  rumor)
inline

Raises the witness deed event.

Parameters
rumorThe faction member's subjective evaluation of the deed, which may or may not be added to the faction member's memory based on its perceived importance to the faction member.

Implements PixelCrushers.LoveHate.IWitnessDeedEventHandler.

Member Data Documentation

◆ eventInteractions

EventInteractions PixelCrushers.LoveHate.ORKFrameworkSupport.OrkFactionMember.eventInteractions = new EventInteractions()

The event interactions to start when Love/Hate events occur.

Property Documentation

◆ lastAura

AbstractAuraTrigger PixelCrushers.LoveHate.ORKFrameworkSupport.OrkFactionMember.lastAura
get

Gets the last aura entered.

The last aura.

◆ lastOtherFactionMember

FactionMember PixelCrushers.LoveHate.ORKFrameworkSupport.OrkFactionMember.lastOtherFactionMember
get

Gets the last other faction member involved in a greeting, gossip, or rumors.

The last other faction member.

◆ lastRumor

Rumor PixelCrushers.LoveHate.ORKFrameworkSupport.OrkFactionMember.lastRumor
get

Gets the last rumor witnessed.

The last rumor.


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