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 (anonymous) { kStandardSpeed = 2 }

Public static variables

static const uint32_t TYPE

Public functions

auto PlayAnimation(uint32_t animationID, int toolIndex = 0xFFFFFFFF, bool disableBlendInTime = false) -> Anim::AnimIndex
auto PlayAnimationTo(uint32_t animationID, cSpatialObject* otherObject, int = 0xFFFFFFFF, int toolIndex = 0xFFFFFFFF) -> Anim::AnimIndex
void WalkTo(int speedState, const Vector3& dstPos, const Vector3& arg_8, float goalStopDistance = 1.0f, float acceptableStopDistance = 2.0f)
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::IEffect*
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::IEffect*
Creates an effect on the creature effect pool 1.
auto CreateAndStartEffectForPool1Renamed(uint32_t effectId, uint32_t poolId) -> Swarm::IEffect*
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::IEffect*
Creates and starts an effect on the creature effect pool 1.
auto CreateEffectForPool2Renamed(uint32_t effectId, uint32_t poolId) -> Swarm::IEffect*
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::IEffect*
auto StartOrStopEffectFromPool2(bool create, uint32_t effectId, uint32_t poolId) -> Swarm::IEffect*
auto GetEffectFromPools(uint32_t poolId) -> Swarm::IEffect*
Gets an active effect from one of the effect pools of the creature.
auto StopEffectFromPools(uint32_t poolId, int hardStop = 0) -> Swarm::IEffect*
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).
void CreateLocomotionStrategy() virtual
void OnJumpLand() virtual
Called when the creature touches land after jumping/hovering in the air.
void func5Ch() virtual
void Update(int deltaTime) virtual
Called every frame, parameter is the ellapsed time in milliseconds.
void func64h(float) virtual
void func68h(float) virtual
void func6Ch(int deltaTime) virtual
void func70h(float deltaTimeSeconds) virtual
void func74h(void*) virtual
auto GetBaseMaxHitPoints() -> float pure virtual
auto CalculateScale(bool isBaby) -> float virtual
void SetCreatureTarget(cCombatant* pTarget, bool, int intentionTowardsTarget) virtual
void UpdateHunger(float deltaTimeSeconds) virtual
void func8Ch() virtual
void func90h() virtual
void func94h(float) virtual
auto GetLastInteractionEffect() -> uint32_t virtual
void SetLastInteractionEffect(uint32_t effect) 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
void funcC4h() virtual
void funcC8h(bool) pure virtual
void funcCCh(bool) virtual
auto IsDefaultSpecies() -> bool virtual
auto funcD4h() -> int virtual
auto GetCurrentBrainLevel() -> int virtual
void SetCurrentBrainLevel(int level) virtual
auto GetIdentityColor() const -> const ColorRGB& virtual
void SetIdentityColor(const ColorRGB& color) virtual
auto AddRef() -> int pure virtual
auto Release() -> int pure virtual
auto Cast() const -> void* pure virtual

Public variables

bool mHasDamageBoost
float mDamageBoostAmount
bool mHasArmorBoost
float mArmorBoostAmount
cSpeciesProfile* mpSpeciesProfile
uint32_t mProfileSeq
ResourceKey mSpeciesKey
int mAge
string16 mCreatureName
int field_B48
int field_B4C
intrusive_ptr<cCreatureBase> mpWhoIsInteractingWithMe
AnimatedCreaturePtr mpAnimatedCreature
int mGeneralFlags
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
bitset<88> mInUseAbilityBits
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
fixed_vector<cAbilityState, 8> mAbilityStates
CreatureMotive mLastMotiveState
uint32_t mLastInteractionEffect
CreatureEffectPool mEffectPool1
CreatureEffectPool mEffectPool2
map<int, int> field_E08
vector<int> field_E24
bool field_E38
int field_E3C
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
uint32_t mCurrentAttackAnimId
float field_E94
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
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::IEffect* 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::IEffect* 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::IEffect* 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::IEffect* 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::IEffect* 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::IEffect* 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::IEffect* 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