Simulator::cGameData class

Base class for most Simulator objects.

All cGameData objects have a political ID that uniquely identifies the object, and is often used to reference it in other classes.

Base classes

class ISimulatorSerializable
class DefaultRefCounted
The default implementation of a reference counted class.

Derived classes

class cBuilding
Base class for all buildings in Simulator game modes.
class cCelestialBody
Represents celestial bodies in a solar system (except planets), that is, the star and the comets.
class cCityTerritory
class cCityWalls
class cCivilization
class cCommodityNode
Represents a spice geyser in civilization stage, maybe it is also used elsewhere.
class cCommunity
The following attributes are saved:
class cCreatureBase
The base class for all creatures in the Simulator.
class cDefaultAoEArea
class cDefaultBeamProjectile
class cEgg
Default model is 0x00000000!0xA76CD528, default mMaterialType is 5.
class cGameDataUFO
class cGamePlant
class cGameplayMarker
class cGameTerrainCursor
class cHerd
class cInteractableObject
class cInterCityRoad
class cMission
Base class for all missions, this class cannot be instantiated.
class cNest
class cOrnament
Used, among other things, for adventure objects (except pickable ones)
class cPlanet
Visual representation of a planet (or asteroids).
class cResourceProjectile
Projectile used in civilization stage to capture spice geysers. Might be used for other things too.
class cSpaceInventory
class cStar
class cTotemPole
The totem pole of a tribe. Default model is TribalTools!0x93256BA, default mMaterialType is 2.
class cTribeFoodMat
The food mat of a tribe. Default model is TribalTools!trg_sacrifice_altar1, default mMaterialType is 2.
class cTribeHut
class cTribeTool
class cVehicle
class cVisiblePlanet

Public static variables

static const uint32_t TYPE
static const uint32_t NOUN_ID

Constructors, destructors, conversion operators

~cGameData() virtual

Public functions

auto AddRef() -> int override
auto Release() -> int override
auto Cast(uint32_t type) const -> void* override
auto Write(ISerializerStream* stream) -> bool pure virtual
auto Read(ISerializerStream* stream) -> bool override
auto ISimulatorSerializable_func18h() -> bool override
auto WriteToXML(XmlSerializer*) -> bool override
auto SetDefinitionID(int, int, int) -> bool virtual
arg0->field_4 is definition ID, field_C is prop, field_0 is noun ID
void SetGameDataOwner(cGameData* pOwner) virtual
auto IsDestroyed() -> bool virtual
auto GetGameDataOwner() -> cGameData* virtual
void SetGameDataOwner2(cGameData* pOwner) virtual
auto GetCastID() const -> uint32_t pure virtual
Returns the TYPE field of the class, that is used for object casting.
auto cGameData_func3Ch(int) -> bool virtual
auto cGameData_func40h() -> bool virtual
void RemoveOwner() virtual
void SetPoliticalID(uint32_t id) virtual
auto GetPoliticalID() -> uint32_t virtual
auto WriteAsText(int) -> int virtual
auto GetScenarioClass() -> cScenarioClass*
Returns the scenario class for this game data, if any; if scenario data is not available (for example, player is not in an adventure), the game will crash.

Public variables

IGameDataView* mpView
cScenarioMarker* mpScenarioMarker
int mScenarioClassIndex
bool field_20
bool mbIsDestroyed
uint32_t mID
uint32_t mDefinitionID
cGameDataPtr mpGameDataOwner
uint32_t mPoliticalID

Function documentation

cScenarioClass* Simulator::cGameData::GetScenarioClass()

Returns the scenario class for this game data, if any; if scenario data is not available (for example, player is not in an adventure), the game will crash.

Returns The scenario class for this object.

The scenario class is the object that holds all the adventure-related data of this object.