class
#include <Spore/Simulator/cCreatureBase.h>
cCreatureBase The base class for all creatures in the Simulator.
Contents
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 - 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::
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).
- void CreateLocomotionStrategy() virtual
- void OnJumpLand() virtual
- Called when the creature touches land after jumping/hovering in the air.
- void OnStartSwimming() virtual
- Called when the creature enters water deep enough to swim.
- 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
- eastl::string16 mCreatureName
- int field_B48
- int field_B4C
- cCreatureBasePtr 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
- 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 |