Simulator::cCreatureBase class

The base class for all creatures in the Simulator.

Base classes

class cGameData
Base class for most Simulator objects.
class cGameBundleContainer
class cBehaviorAgent
class cLocomotiveObject
class cBehaviorList
class cCombatant
Any object that has hit points and can combat other units.
class UnknownCreatureClass

Derived classes

class cCreatureAnimal
class cCreatureCitizen

Public types

enum SpeedType { kStandardSpeed = 2 }

Public static variables

static const uint32_t TYPE

Public functions

auto PlayAnimation(uint32_t animationID, int blockIndex = 0xFFFFFFFF, bool disableBlendInTime = false) -> Anim::AnimIndex
auto PlayAnimationTo(uint32_t animationID, cSpatialObject* otherObject, int = 0xFFFFFFFF, int blockIndex = 0xFFFFFFFF) -> Anim::AnimIndex
auto WalkTo(int speedState, const Vector3& dstPos, const Vector3& arg_8, float goalStopDistance = 1.0f, float acceptableStopDistance = 2.0f) -> void
auto GetAbilityIndexByType(int abilityType) -> int
Returns the index to the first ability of the craeture that has the specified ability type.
auto GetAnimalTarget() -> cCreatureAnimal*
Returns the target of this creature ONLY if it is a Simulator::cCreatureAnimal.
auto CreateEffectForPool1Renamed(uint32_t effectId, uint32_t poolId) -> Swarm::IVisualEffect*
Creates an effect on the creature effect pool 1, storing it with a different ID than the effect ID.
auto CreateEffectForPool1(uint32_t effectId) -> Swarm::IVisualEffect*
Creates an effect on the creature effect pool 1.
auto CreateAndStartEffectForPool1Renamed(uint32_t effectId, uint32_t poolId) -> Swarm::IVisualEffect*
Creates and starts an effect on the creature effect pool 1, storing it with a different ID than the effect ID.
auto CreateAndStartEffectForPool1(uint32_t effectId) -> Swarm::IVisualEffect*
Creates and starts an effect on the creature effect pool 1.
auto CreateEffectForPool2Renamed(uint32_t effectId, uint32_t poolId) -> Swarm::IVisualEffect*
Creates an effect on the creature effect pool 2, storing it with a different ID than the effect ID.
auto StartOrStopEffectFromPool1(bool create, uint32_t effectId, uint32_t poolId) -> Swarm::IVisualEffect*
auto StartOrStopEffectFromPool2(bool create, uint32_t effectId, uint32_t poolId) -> Swarm::IVisualEffect*
auto GetEffectFromPools(uint32_t poolId) -> Swarm::IVisualEffect*
Gets an active effect from one of the effect pools of the creature.
auto StopEffectFromPools(uint32_t poolId, int hardStop = 0) -> Swarm::IVisualEffect*
Stops an effect from one of the effect pools of the creature.
auto PlayVoice(const char* pName, int param2, int param3) -> int
Plays a voice file on the creature (only sound, creature does not animate accordingly).
auto CreateLocomotionStrategy() -> void virtual
auto OnJumpLand() -> void virtual
Called when the creature touches land after jumping/hovering in the air.
auto OnStartSwimming() -> void virtual
Called when the creature enters water deep enough to swim.
auto Update(int deltaTime) -> void virtual
Called every frame, parameter is the ellapsed time in milliseconds.
auto func64h(float) -> void virtual
auto func68h(float) -> void virtual
auto func6Ch(int deltaTime) -> void virtual
auto func70h(float deltaTimeSeconds) -> void virtual
auto func74h(void*) -> void virtual
auto func78h() -> void virtual
auto GetBaseMaxHitPoints() -> float pure virtual
auto CalculateScale(bool isBaby) -> float virtual
auto SetCreatureTarget(cCombatant* pTarget, bool, int intentionTowardsTarget) -> void virtual
auto UpdateHunger(float deltaTimeSeconds) -> void virtual
auto func8Ch() -> void virtual
auto func90h() -> void virtual
auto func94h(float) -> void virtual
auto GetLastInteractionEffect() -> uint32_t virtual
auto SetLastInteractionEffect(uint32_t effect) -> void virtual
auto ForgetUpdateInteractionEffect() -> bool virtual
auto UpdateMotiveState() -> CreatureMotive virtual
auto HasUpdateMotiveEffect() -> bool virtual
auto funcACh(bool) -> bool virtual
auto GetAbilitiesCount() -> int virtual
auto GetAbility(int index) -> cCreatureAbility* virtual
auto funcB8h(int, int, int) -> bool virtual
auto funcBCh() -> int virtual
auto funcC0h(cCreatureBase* pOtherCreature, float, float) -> bool virtual
auto funcC4h() -> void virtual
auto funcC8h(bool) -> void pure virtual
auto funcCCh(bool) -> void virtual
auto IsDefaultSpecies() -> bool virtual
auto funcD4h() -> int virtual
auto GetCurrentBrainLevel() -> int virtual
auto SetCurrentBrainLevel(int level) -> void virtual
auto GetIdentityColor() const -> const ColorRGB& virtual
auto SetIdentityColor(const ColorRGB& color) -> void virtual
auto AddRef() -> int pure virtual
auto Release() -> int pure virtual
auto Cast(uint32_t typeID) const -> void* pure virtual

Public variables

bool mHasDamageBoost
float mDamageBoostAmount
bool mHasArmorBoost
float mArmorBoostAmount
cSpeciesProfile* mpSpeciesProfile
uint32_t mProfileSeq
ResourceKey mSpeciesKey
int mAge
eastl::string16 mCreatureName
int field_B48
int field_B4C
cCreatureBasePtr mpWhoIsInteractingWithMe
AnimatedCreaturePtr mpAnimatedCreature
int mGeneralFlags
CreatureFlags.
bool field_B5C
bool mbTeleport
bool mbDead
bool mbHasBeenEaten
bool mbUpdateInteractionEffect
bool mbUpdateMotiveEffect
bool mbIsDiseased
bool field_B63
bool field_B64
bool mbColorIsIdentity
bool field_B66
bool mbCasted
bool field_B68
bool field_B69
Audio::AudioTrack field_B6C
int field_B70
int mIntentionTowardsTarget
float mNoAttackTimer
float field_B7C
float mCurrentLoudness
float mFoodValue
int mStrengthRating
cGonzagoTimer mHungerDelayTimer
bool field_BB0
bool mbStealthed
int field_BB4
float mHungerDelta
float mHunger
int field_BC0
int field_BC4
int field_BC8
int field_BCC
int field_BD0
int field_BD4
int field_BD8
int field_BDC
Vector3 field_BE0
eastl::bitset<88> mInUseAbilityBits
eastl::bitset<88> mRechargingAbilityBits
int field_C04
int field_C08
int field_C0C
uint64_t DEPRECATED_mInUseAbilityBits
uint64_t DEPRECATED_mRechargingAbilityBits
int field_C20
int field_C24
eastl::fixed_vector<cAbilityState, 8> mAbilityStates
CreatureMotive mLastMotiveState
uint32_t mLastInteractionEffect
CreatureEffectPool mEffectPool1
CreatureEffectPool mEffectPool2
eastl::map<int, int> field_E08
eastl::vector<int> field_E24
bool field_E38
int field_E3C
eastl::vector<cCreatureItem> mItemInventory
int field_E54
float mEnergy
For adventurer creatures, their current energy.
float mMaxEnergy
bool field_E60
bool field_E61
bool field_E62
bool field_E63
int field_E64
bool field_E68
int field_E6C
int mDefaultAttackAbilityIndex
Index to default attack ability, which is generally bite or its improvements (energy or poison blade)
int mDefaultSocializeAbilityIndex
Index to default socialize ability, which is generally vocalize or its improvements (inspiring or harmonious song)
bool field_E78
cCombatant* mpCombatantTarget
int mArchetype
void* field_E84
int field_E88
uint32_t mCurrentAttackIdx
Index of current attack ability.
uint32_t mCurrentAttackAnimId
float field_E94
eastl::vector<int> field_E98
int field_EAC
int field_EB0
int field_ED8
int field_EDC
int field_EE0
int field_EE4
int field_EE8
int field_EEC
int field_F0C
int field_F10
int field_F14
int field_F18
int field_F1C
char padding_F20
int field_F40
int field_F44
int field_F48
int field_F4C
int field_F50
char padding_F54
int field_F74
int field_F78
int field_F7C
int field_F80
eastl::list<int> field_F84
bool field_F90
int field_F94
int mSpeedState
int field_F9C
int field_FA0
int field_FA4
float field_FA8
float field_FAC
float field_FB0
float field_FB4
char padding_FB8

Function documentation

int Simulator::cCreatureBase::GetAbilityIndexByType(int abilityType)

Returns the index to the first ability of the craeture that has the specified ability type.

Parameters
abilityType
Returns Index to ability, or -1 if not found

Swarm::IVisualEffect* Simulator::cCreatureBase::CreateEffectForPool1Renamed(uint32_t effectId, uint32_t poolId)

Creates an effect on the creature effect pool 1, storing it with a different ID than the effect ID.

Parameters
effectId ID of the effect to create
poolId ID used to identify this new effect within the pool, must be used to access it in related methods.
Returns The created effect, or null if the effect id is not valid.

The effect will be returned in its default state, positioned in the creature, without having started.

Swarm::IVisualEffect* Simulator::cCreatureBase::CreateEffectForPool1(uint32_t effectId)

Creates an effect on the creature effect pool 1.

Parameters
effectId ID of the effect to create
Returns The created effect, or null if the effect id is not valid.

The effect will be returned in its default state, positioned in the creature, without having started.

Swarm::IVisualEffect* Simulator::cCreatureBase::CreateAndStartEffectForPool1Renamed(uint32_t effectId, uint32_t poolId)

Creates and starts an effect on the creature effect pool 1, storing it with a different ID than the effect ID.

Parameters
effectId ID of the effect to create
poolId ID used to identify this new effect within the pool, must be used to access it in related methods.
Returns The created effect, or null if the effect id is not valid.

The effect will be returned in its default state, positioned in the creature, but starting it with hardStart=0.

Swarm::IVisualEffect* Simulator::cCreatureBase::CreateAndStartEffectForPool1(uint32_t effectId)

Creates and starts an effect on the creature effect pool 1.

Parameters
effectId ID of the effect to create
Returns The created effect, or null if the effect id is not valid.

The effect will be returned in its default state, positioned in the creature, but starting it with hardStart=0.

Swarm::IVisualEffect* Simulator::cCreatureBase::CreateEffectForPool2Renamed(uint32_t effectId, uint32_t poolId)

Creates an effect on the creature effect pool 2, storing it with a different ID than the effect ID.

Parameters
effectId ID of the effect to create
poolId ID used to identify this new effect within the pool, must be used to access it in related methods.
Returns The created effect, or null if the effect id is not valid.

The effect will be returned in its default state, positioned in the creature, without having started.

Swarm::IVisualEffect* Simulator::cCreatureBase::GetEffectFromPools(uint32_t poolId)

Gets an active effect from one of the effect pools of the creature.

Parameters
poolId

The effect is referenced with the ID that was given at its creation, which usually is the effect ID.

Swarm::IVisualEffect* Simulator::cCreatureBase::StopEffectFromPools(uint32_t poolId, int hardStop = 0)

Stops an effect from one of the effect pools of the creature.

Parameters
poolId
hardStop

The effect is referenced with the ID that was given at its creation, which usually is the effect ID.

int Simulator::cCreatureBase::PlayVoice(const char* pName, int param2, int param3)

Plays a voice file on the creature (only sound, creature does not animate accordingly).

Parameters
pName
param2
param3

Example usage: PlayVoice("vcode_baby_born_cry", 2, 0)

void Simulator::cCreatureBase::Update(int deltaTime) virtual

Called every frame, parameter is the ellapsed time in milliseconds.

Parameters
deltaTime