Simulator namespace

Namespaces

namespace Cell
namespace ScenarioInputStrategy
namespace SerializationTypes
namespace SpaceInputStrategy
namespace SubSystem
namespace WASDInputStrategy

Classes

struct Attribute
class cAbductToolStrategy
class cAbilityState
class cAnimalCargoInfo
class cAnimalSpeciesManager
class cArtilleryWeaponStrategy
class cBadgeManager
class cBehaviorAgent
class cBehaviorBase
class cBehaviorEntry
class cBehaviorList
class cBuilding
Base class for all buildings in Simulator game modes.
class cBuildingCityHall
class cBuildingEntertainment
class cBuildingHouse
class cBuildingIndustry
class cBuildingScenario
class cCelestialBody
Represents celestial bodies in a solar system (except planets), that is, the star and the comets.
class cCity
struct cCityPartner
class cCityTerritory
class cCityWalls
class cCivilization
class cCombatant
Any object that has hit points and can combat other units.
class cCombatSimulator
class cCommEvent
class cCommManager
class cCommodityNode
Represents a spice geyser in civilization stage, maybe it is also used elsewhere.
class cCommunity
The following attributes are saved:
class cConversation
class cCreatureAbility
class cCreatureAnimal
class cCreatureBase
The base class for all creatures in the Simulator.
class cCreatureCitizen
class cCreatureItem
class cCropCirclesToolStrategy
class cCultureSet
Contains the IDs of all the creation types of a specific "culture" or civilization/empire.
class cDeepSpaceProjectileToolStrategy
class cDefaultAoEArea
class cDefaultAoETool
class cDefaultBeamProjectile
class cDefaultBeamTool
class cDefaultProjectileWeapon
class cDragInputProjectileToolStrategy
class cDropCargoToolStrategy
class cEgg
Default model is 0x00000000!0xA76CD528, default mMaterialType is 5.
class cEllipticalOrbit
Settings of the orbit of a planet or celestial body in a solar system.
class cEmpire
An empire in Space Stage.
struct cEmptyBubble
class cEnergyRepairToolStrategy
class cFeedbackEvent
class cGameBehaviorManager
class cGameBundleContainer
class cGameData
Base class for most Simulator objects.
class cGameDataUFO
class cGameInputManager
class cGameModeManager
class cGameNounManager
The class that manages game objects, known in Spore code as 'nouns'.
class cGamePlant
class cGameplayMarker
class cGameTerrainCursor
class cGameTimeManager
This class controls game time speed and pauses.
class cGameViewManager
class cGenesisDeviceToolStrategy
class cGetOutOfUFOToolStrategy
class cGlobalMindEraseToolStrategy
class cGonzagoSimulator
class cGonzagoTimer
A class for measuring time inside Simulator modes.
class cHerd
class cHitSphere
class cIdentityColorable
A Simulator class inherited by all those classes that can have an identity color, such as empires, tribes, etc.
class cInteractableObject
class cInteractiveOrnament
Static objects in a planet that the player can interact with, such as pickable objects, skeletons in creature stage,...
class cInterCityRoad
struct cLaneInfo
struct ClassSerializer
struct cLocomotionRequest
class cLocomotiveObject
class cLocomotiveObject_superclass
class cMindEraseToolStrategy
class cMission
Base class for all missions, this class cannot be instantiated.
class cMissionManager
This class manages all the missions of a player in space stage.
class cNest
struct CnvAction
struct CnvAnimation
struct CnvAnimationVariation
struct CnvDialog
struct CnvDialogResponse
struct CnvEventLog
struct CnvText
struct CnvUnknown
class cObjectInstanceInventoryItem
class CombatantKilledMessage
Called when a cCombatant is killed.
class ConversationResource
class cOrnament
Used, among other things, for adventure objects (except pickable ones)
class cPlaceableStructure
A structure that can be placed into a community slot, like buildings, turrets, ornaments and tribe tools.
class cPlaceColonyToolStrategy
class cPlaceObjectToolStrategy
class cPlanet
Visual representation of a planet (or asteroids).
struct cPlanetClue
class cPlanetModel
class cPlanetRecord
Keeps all the information related to a planet.
class cPlantCargoInfo
class cPlantSpeciesManager
class cPlayerInventory
class cProjectile
class cRallyCallToolStrategy
class CreatureEffectPool
class cRelationshipData
class cRelationshipManager
Handles relationships between political entities.
class cRepairAOEToolStrategy
class cRepairToolStrategy
class cResourceProjectile
Projectile used in civilization stage to capture spice geysers. Might be used for other things too.
class cSavedGameHeader
class cScanToolStrategy
class cScenarioAct
class cScenarioAsset
class cScenarioClass
class cScenarioClassAct
class cScenarioData
class cScenarioDataEconomy
class cScenarioDataHistoryEntry
Undo/redo history entry for scenario data actions (anything related with objects, creatures, etc), that is, changes to the cScenarioResource.
class cScenarioDialog
class cScenarioEditHistory
Class that manages the undo/redo history of the adventure editor.
class cScenarioGoal
class cScenarioMarker
class cScenarioMarkerAct
class cScenarioPlayMode
class cScenarioPlayModeGoal
struct cScenarioPlaySummary
class cScenarioPosseMember
class cScenarioPowerup
class cScenarioResource
class cScenarioSimulator
class cScenarioString
class cScenarioTerraformEconomy
class cScenarioTerraformHistoryEntry
Undo/redo history entry for terraform (or planet color, etc) actions.
class cScenarioTerraformMode
class cSimPlanetHighLOD
class cSimPlanetLowLOD
class cSimTicker
class cSimulatorPlayerUFO
class cSimulatorSpaceGame
class cSimulatorSystem
class cSolarHitSphere
class cSolarSystem
Holds visual information about a solar system in the solar system view, or when inside a planet.
class cSpaceInventory
class cSpaceInventoryItem
Represents an item of the space player inventory. This include space tools and cargo.
class cSpaceToolData
class cSpaceTradeRouteManager
class cSpatialObject
A 3D model in the Simulator.
class cSpeciesManager
class cSpeciesProfile
class cStar
struct cStarClue
class cStarManager
class cStarRecord
Keeps all the information related to a star and all the elements in its solar system.
class cStrategy
class cTerraformingManager
class cTimeOfDay
Class used to manage day duration and current time of day in planets.
class cToggleToolStrategy
class cToolManager
class cToolStrategy
class cTotemPole
The totem pole of a tribe. Default model is TribalTools!0x93256BA, default mMaterialType is 2.
class cTradeRouteData
class cTribe
A tribe from the tribe stage.
struct cTribeArchetype
Represents a type of tribe, with its configuration stored in folder TribeArchetypes.
class cTribeFoodMat
The food mat of a tribe. Default model is TribalTools!trg_sacrifice_altar1, default mMaterialType is 2.
class cTribeHut
struct cTribePlan
class cTribePlanner
struct cTribePlanProperties
Read from a .prop file in folder TribePlans
class cTribeTool
class cTurretDefenseMissileWeapon
class cTurretFlakWeapon
class cUIEventLog
This class manages event logs in Simulator game modes.
class cVehicle
class cVisiblePlanet
class EnterEditorMessage
class EnterModeMessage
class GameNounStatusChangedMessage
class GoalCard
class ICityMusic
class IMessageParameters
class IProjectile
class IScenarioEditHistoryEntry
A generic entry of undo/redo history in the adventure editor.
class ISerializerStream
class ISimulatorSerializable
class ISimulatorSerializableRefCounted
class ISimulatorStrategy
class ISimulatorUIGraphic
struct MissionManagerTimerEntry
class MissionUpdateMessage
Called every update of a mission, only if the mission is ongoing.
class NounCreateMap
class PlayerEmpireAlliedMessage
Called when the player empire makes a new alliance.
class PlayerEmpireLostAllianceMessage
Called when the player empire loses an alliance.
class ScenarioCreatureHealedMessage
Called when a creature is healed (either by natural heal rate, or using a medkit) in Scenario mode.
class ScheduledTaskListener
A message listener that, listening to Update messages, executes the given task after a certain time has passed and (optionally) repetaing it periodically.
class SpacePlayerData
class Sporepedia
struct StarRequestFilter
template<class T>
class tGameDataVectorT
class ToolOnHitMessage
Called when a space tool hits a target. Called by cToolStrategy::OnHit.
struct UnkCityClass
struct UnkMissionManagerStruct
class UnknownCreatureClass
class UnknownManagerSuperclass
class UnkRefCounted
class XmlSerializer

Enums

enum EmpireFlags { kEmpireFlagNeedsEmpireLines = 0x10 }
enum MissionFlags { kMissionFlagIsEvent = 1, kMissionFlagHideStarName = 2, kMissionFlagHidePlanetName = 4, kMissionFlagIsTutorial = 8, kMissionFlagCannotAbort = 0x10, kMissionFlagTimerStartsOnFirstEntry = 0x20, kMissionFlagIsAdventure = 0x80 }
enum GameNounIDs { kGameData = 0x17F243B, kCheatObject = 0x2A37E35, kMissionFetch = 0x2AFD284, kMissionHappinessEvent = 0x4F3BDE9, kMissionMakeAlly = 0x4F77499, kRaidPlunderEvent = 0x397BFF3, kRaidEvent = 0x3960C0E, kMissionColonize = 0x2BA2A0E, kMissionEradicate = 0x2F99994, kMissionExplore = 0x32A12F1, kMissionWar = 0x330FC49, kMissionScan = 0x347092D, kMissionTerraform = 0x35988F4, kMissionTrade = 0x2ADEDFF, kMissionTradeRoute = 0x447092D, kMissionMultiDelivery = 0x35ED8F6, kMissionBiosphere = 0x437444B, kGenericPressureEvent = 0x317AFCC, kMissionMultiStep = 0x4222283, kMissionBalance = 0x347092E, kMissionFindAliens = 0x347092F, kMissionFlight101 = 0x4222284, kMissionUseTool = 0x2ADEDEE, kMissionStory201 = 0x4222285, kMissionChangeArchetype = 0x4622285, kMissionTrackBadge = 0x4633285, kMissionAdventure = 0x46332A5, kPlayer = 0x2C21781, kMilitaryAttackCityOrder = 0x2E9AE6C, kCulturalConvertCityOrder = 0x3DF2CC5, kGameTerrainCursor = 0x18C40BC, kBuildingCityHall = 0x18EA1EB, kBuildingIndustry = 0x18EA2CC, kBuildingHouse = 0x18EB106, kBuildingEntertainment = 0x1A56ABA, kBuildingScenario = 0x70703B3, kTurret = 0x436F342, kCelestialBody = 0x38CFB6B, kGameBundle = 0x18C431C, kCulturalTarget = 0x3D5C325, kCity = 0x18C43E8, kGameBundleGroundContainer = 0x1906183, kVehicle = 0x18C6DE8, kVehicleGroupOrder = 0x2E98AB7, kCityWalls = 0x18C7C97, kCityTerritory = 0x244FB08, kPlaceholderColonyEditorCursorAttachment = 0x2C5C93A, kPlanetaryArtifact = 0x2DD8C42, kToolObject = 0x4E3FAB5, kCivilization = 0x18C816A, kCreatureAnimal = 0x18EB45E, kCreatureCitizen = 0x18EB4B7, kObstacle = 0x3ED8573, kGamePlant = 0x18C84A9, kFruit = 0x2C9CC91, kFruitGroup = 0x2E96892, kNest = 0x52AA6122, kHerd = 0x1BE418E, kEgg = 0x2A034CD, kInteractiveOrnament = 0x3A2511E, kGameplayMarker = 0x36BE27E, kOrnament = 0x18C88E4, kAnimalTrap = 0x61494BE, kTotemPole = 0x55CF865, kTribeFoodMat = 0x629BAFE, kRock = 0x2A8FB3F, kCommodityNode = 0x403DF5C, kMovableDestructibleOrnament = 0x283DDB1, kSolarHitSphere = 0x32F9778, kHitSphere = 0x2E72CAE, kInterCityRoad = 0x2B8A4E7, kTribe = 0x18C6D19, kTribeTool = 0x18C8F0C, kSpear = 0x24270C9, kArtilleryProjectile = 0x18C9380, kFlakProjectile = 0x240E3BF, kDefaultToolProjectile = 0x24270C5, kDeepSpaceProjectile = 0x24270C7, kSpaceDefenseMissile = 0x244D3C8, kDefaultBeamProjectile = 0x24630D7, kDefaultAoEArea = 0x4167186, kCulturalProjectile = 0x4F76F0D, kResourceProjectile = 0x5776A2C, kICBM = 0x49CEC61, kSoundLoopObject = 0x18EB641, kRotationRing = 0x2EE8CE8, kRotationBall = 0x7292112, kMorphHandle = 0x7A30A12, kTargetMorphHandle = 0x76F6E64, kArrowMorphHandle = 0x771AD6F, kSimpleRotationRing = 0x7A81829, kSimpleRotationBall = 0x7ABDD91, kPlanet = 0x3275728, kVisiblePlanet = 0x44462A6, kStar = 0x355C93A, kSolarSystem = 0x38CF94C, kSimPlanetLowLOD = 0x3572E72, kEmpire = 0x18EB9D2, kSpaceInventory = 0x21FFA3F, kPlayerInventory = 0x2265FDC, kGameDataUFO = 0x18EBADC, kTribeHut = 0x1E4DAAE, kTribePlanner = 0x3098AF98, kCreatureSpeciesMission = 0x1406A572, kCreatureTutorialMission = 0x34066DBA, kTribeToTribeMission = 0x5436411A, kFindMission = 0x14D9597F, kNanoDrone = 0x6EF0F11, kPlaceableSound = 0x74E0069, kPlaceableEffect = 0x7B38BA7 }
All the noun IDs used to identify Simulator game data classes in the game files.
enum class TechLevel: int { None = 0, Creature = 1, Tribe = 2, City = 3, Civilization = 4, Empire = 5 }
Technology level of a planet.
enum class PlanetType: int { None = -1, AsteroidBelt = 0, GasGiant = 1, T0 = 2, T1 = 3, T2 = 4, T3 = 5 }
Type of a planet, used in Simulator::cPlanetRecord.
enum class StarType: int { None = 0, GalacticCore = 1, BlackHole = 2, ProtoPlanetary = 3, StarG = 4, StarO = 5, StarM = 6, BinaryOO = 7, BinaryOM = 8, BinaryOG = 9, BinaryGG = 10, BinaryGM = 11, BinaryMM = 12 }
The type of a star in a galaxy (which includes black holes, binary stars, proto-planetary disks, and the galactic core), used in Simulator::cStarRecord.
enum class cCelestialBodyType: int { None = -1, Star = 0, Comet = 2 }
Used by Simulator::cCelestialBody.
enum class cCommEventType: int { None = -1, Space = 0, Civ = 1 }
Used by Simulator::cCommEvent.
enum Archetypes { kArchetypeWarrior = 0, kArchetypeTrader = 1, kArchetypeScientist = 2, kArchetypeShaman = 3, kArchetypeBard = 4, kArchetypeZealot = 5, kArchetypeDiplomat = 6, kArchetypeEcologist = 7, kArchetypeGrob = 8, kArchetypePlayerWarrior = 9, kArchetypePlayerTrader = 10, kArchetypePlayerScientist = 11, kArchetypePlayerShaman = 12, kArchetypePlayerBard = 13, kArchetypePlayerZealot = 14, kArchetypePlayerDiplomat = 15, kArchetypePlayerEcologist = 16, kArchetypePlayerWanderer = 17, kArchetypePlayerKnight = 18 }
Used by Simulator::cEmpire.
enum EmpireTrait { kEmpireTraitNone = 0, kEmpireTraitStingy = 1, kEmpireTraitGenerous = 2, kEmpireTraitAccidentProne = 3 }
Used by Simulator::cEmpire.
enum OrnamentType { kOrnamentFlower = 1, kOrnamentBone = 2, kOrnamentStick = 3 }
Used by Simulator::cInteractableObject.
enum class MissionState: int { Unaccepted = 0, Finished = 1, Accepted = 2, Active = 3, Completed = 5, Failed = 6, Aborted = 7, Rejected = 8, StepCompleted = 9 }
The different states in which a mission can be (accepted, rejected, failed, etc).
enum class LandmarkStarType: int { Here = 0, Star = 1, Wormhole = 2, BigStar = 3, RedStar = 4, ProtoPlanetaryStar = 5, GalacticCore = 6 }
Types of star landmarks to be searched in some missions. Used by Simulator::cStarClue.
enum class LandmarkPlanetType: int { AsteroidBelt = 0, GasGiant = 1, T0 = 2, T1 = 3, T2 = 4, T3 = 5 }
Types of planet landmarks to be searched in some missions. Used by Simulator::cPlanetClue.
enum class PlanetRepresentationMode: int { Nothing = 0, VisiblePlanetAndHitSphere = 1, OnlyVisiblePlanet = 2, OnlyHitSphere = 3 }
Used by Simulator::cPlanet.
enum class SpaceInventoryItemType { Plant = 0, NonSentientAnimal = 1, Tool = 2, CargoSlot = 3, TradingObject = 4, MultiDeliveryObject = 5, Sentient = 6, Unk7 = 7, ObjectInstance = 8 }
Used by Simulator::cSpaceInventoryItem.
enum SpaceToolHit { kHitCombatant = 0, kHitGround = 1, kHitWater = 2, kHitAir = 3 }
Different kinds of surfaces where a tool can hit, usde by Simulator::cSpaceToolData.
enum SpaceToolTarget { kTargetAnimal = 1, kTargetA13ABC9F = 2, kTargetUFO = 4, kTargetVehicle = 8, kTargetTurret = 0x10, kTargetCity = 0x20, kTargetBuilding = 0x40, kTargetWorld = 0x80, kTargetAir = 0x100, kTargetA6663355 = 0x200 }
Different kinds of targets that a tool can shoot at, usde by Simulator::cSpaceToolData.
enum class TribePlanType: int { Raid = 1, Gift = 2, Hunt = 3, Gather = 4, Fish = 5, Mate = 6, CheatMember = 7, BuyTools = 8, Idle = 9, StealFood = 10 }
Different types of actions that a tribe can carry, used by Simulator::cTribePlanner.
enum RelationshipEvents { kRelationshipEventCompliment = 0x0526E4E5, kRelationshipEventTrade = 0x0526E4EE, kRelationshipEventGift = 0x0526E4F2, kRelationshipEventBuyCityOver = 0x0526E4F5, kRelationshipEventJoinedAlliance = 0x0526E4F8, kRelationshipEventBribeNode = 0x0526E4FB, kRelationshipEventInsult = 0x0526E4FE, kRelationshipEventHostility = 0x0526E501, kRelationshipEventReligion = 0x0526E504, kRelationshipEventBuyCityUnder = 0x0526E50A, kRelationshipEventDemandRejected = 0x0526E50E, kRelationshipEventDeclaredWar = 0x0526E512, kRelationshipEventUsedNuclearWeapon = 0x05776D99, kRelationshipEventBrokeDeal = 0x05ADB0AA, kRelationshipEventFoughtEnemy = 0x05DA8036, kRelationshipEventSpaceMissionComplete = 0x0526E519, kRelationshipEventSpaceMissionFailed = 0x0526E51C, kRelationshipEventSpaceMissionRejected = 0x0526E51D, kRelationshipEventSpaceMissionAborted = 0x0526E51E, kRelationshipEventSpaceGiveGift = 0x0526E51F, kRelationshipEventSpaceBreakAlliance = 0x0526E521, kRelationshipEventSpaceCreateAlliance = 0x0526E524, kRelationshipEventSpaceTradeComplete = 0x0526E527, kRelationshipEventSpaceTradeDeclined = 0x0526E52A, kRelationshipEventSpaceCityPanicked = 0x0526E52D, kRelationshipEventSpaceTerraformWorsened = 0x0526E531, kRelationshipEventSpaceTerraformImproved = 0x0526E535, kRelationshipEventSpaceTerraformExtinction = 0x0526E537, kRelationshipEventSpaceDestroyBuilding = 0x0526E53C, kRelationshipEventSpaceDestroyAllyUFO = 0x0526E542, kRelationshipEventSpaceBadToolUse = 0x0526E545, kRelationshipEventSpaceGoodToolUse = 0x0526E56A, kRelationshipEventSpaceFloodCity = 0x0526E5CF, kRelationshipEventSpaceAbductCitizen = 0x0526E5D4, kRelationshipEventSpaceStealCommodity = 0x0526E5D8, kRelationshipEventSpaceCheatGood = 0x0526E5DC, kRelationshipEventSpaceCheatBad = 0x0526E5F3, kRelationshipEventSpaceNewEmpireAndCTMGOwner = 0x0526E5F4, kRelationshipEventSpaceUpliftedCiv = 0x055165F5, kRelationshipEventSpaceBadSystemPurchaseOffer = 0x05590199, kRelationshipEventSpaceGoodSystemPurchaseOffer = 0x055901B3, kRelationshipEventSpaceBeNice = 0x0577909A, kRelationshipEventSpaceBeNasty = 0x0577909B, kRelationshipEventSpacePushedTooFar = 0x057B4514, kRelationshipEventSpaceCapturedASystem = 0x057B9100, kRelationshipEventSpaceWasAtWar = 0x057E4FE3, kRelationshipEventSpaceEmbassyBonus = 0x0580E23B, kRelationshipEventSpaceDestroyUFO = 0x0591F833, kRelationshipEventSpaceWitholdTribute = 0x0594AFFF, kRelationshipEventSpaceAcceptGift = 0x0594B017, kRelationshipEventSpaceMissionStarted = 0x05B6CE81, kRelationshipEventSpaceCommunicatedNice = 0x05B6CF09, kRelationshipEventSpacePersonalityNice = 0x05B6FCC9, kRelationshipEventSpacePersonalityMean = 0x05B6FCD4, kRelationshipEventSpaceAvoidedContact = 0x05B942D0, kRelationshipEventSpaceCommunicatedMean = 0x05F62736, kRelationshipEventSpaceStartedWar = 0x05F8A1AD, kRelationshipEventSpaceArchetypeNice = 0x05FF85B2, kRelationshipEventSpaceArchetypeMean = 0x05FF85B3, kRelationshipEventSpaceArchetypeMods = 0x05FF85B4, kRelationshipEventSpaceSuperPower = 0x0601DF2A, kRelationshipEventSpaceTradeRouteSpice = 0x0667AF08, kRelationshipEventSpaceAlliedWithGrob = 0x068B2938, kRelationshipEventSpaceCommittedAtrocity = 0x068B2971, kRelationshipEventTribeAttack = 0x0530CF00, kRelationshipEventTribeKill = 0x0530CF01, kRelationshipEventTribeRaid = 0x0530CF02, kRelationshipEventTribeStealBaby = 0x0530CF03, kRelationshipEventTribeAttackToolOrHut = 0x0530CF04, kRelationshipEventTribeDestroyTool = 0x0530CF05, kRelationshipEventTribeGift = 0x0530CF06, kRelationshipEventTribeSocial = 0x0530CF07, kRelationshipEventTribeRecruit = 0x0530CF08, kRelationshipEventTribeConvert = 0x0530CF09, kRelationshipEventTribeCheatGood = 0x0530CF0A, kRelationshipEventTribeCheatBad = 0x0530CF0B, kRelationshipEventTribeSocialPower = 0x54EAB4B3 }
Properties of relationships between communities (tribes, civilizations, empires)
enum class ScenarioGenre: uint32_t { ScenarioUnset = 0x20790816, ScenarioPlanet = 0x24720859, ScenarioGenreTemplate = 0x27818FE6, ScenarioGenreAttack = 0x287ADCDC, ScenarioGenreDefend = 0xC34C5E14, ScenarioGenreSocialize = 0xFB734CD1, ScenarioGenreExplore = 0x37FD4E0D, ScenarioGenreQuest = 0xC422519E, ScenarioGenreStory = 0xB4707F8F, ScenarioGenreCollect = 0x25A6EA6E, ScenarioGenrePuzzle = 0xE27DDAD4 }
Possible genres of an adventure, used by Simulator::cScenarioModeData.
enum class ScenarioPowerupType: int { MedKit = 1, EnergyKit = 2, SpeedBoost = 3, DamageBoost = 4, ArmorBoost = 5, Mine = 6, JumpPad = 7, Teleporter = 8, Spawner = 9, Bomb = 10, Gate = 11, KeyCard = 12, Grenade = 13, Destructible = 15 }
enum class ScenarioObjectType: uint32_t { ScenarioUndefined = 0x867A9EE9, ScenarioBuilding = 0xB10E526F, ScenarioCreature = 0xE34E8A60, ScenarioVehicle = 0x5B3D1D0D, ScenarioUfo = 0xD37C1045, ScenarioFixedObject = 0x6031C03A, ScenarioFixedObjectEffect = 0x7998CE71, ScenarioFixedObjectGameplay = 0xCF56099A, ScenarioFixedObjectAudio = 0xE137FF08, ScenarioFixedObjectCommodityNode = 0xC7FDCB1E }
enum class ScenarioGfxOverrideType: int { Invisible = 0, Normal = 1, Disguised = 2 }
enum class ScenarioGoalType: int { None = 0, MoveTo = 1, TalkTo = 2, Kill = 3, Befriend = 4, AllyWith = 5, Bring = 6, Collect = 7, Hold = 8, Give = 9, Block = 10, Defend = 11 }
enum class CreatureMotive: int { None = 0, Default = 1, LowHunger = 2, CriticalHealthAndHunger = 3, LowHealth = 4, CriticalHealth = 5 }
Possible motive (health & hunger) states for a creature; what is considered "low" and "critical" depends on the MotiveTuning settings.
enum class InteractableObjectType: int { None = 0, Flower = 1, Bone = 2, Stick = 3, Fruit = 4, Rock = 5, Unk6 = 6, FixedScenarioObject = 7 }
Possible types of interactable objects, used by cInteractableObject.
enum SimulatorMessages { kMsgEnterEditor = 0x53850BAE, kMsgSwitchGameMode = 0x0212D3E7, kMsgSaveGame = 0x1CD20F0, kMsgGameNounStatusChanged = 0x1A0219E, kMsgMissionUpdate = 0x38CF2FD, kMsgCombatantKilled = 0x1622184, kMsgPlayerEmpireAllied = 0x4445D43, kMsgPlayerEmpireLostAlliance = 0x4445D44, kMsgSculptOrColorToolHit = 0xF46092DB, kMsgToolOnHit = 0x56690BB, kMsgScenarioCreatureHealed = 0x7C789F8, kMsgScenarioUndo = 0xC9D86390, kMsgScenarioRedo = 0xC9D86391 }
enum class TimeManagerPause { CinematicAll = 0x600C4AE, Cinematic = 0x4BF38A5, Tutorial = 0x64BEB65, Editor = 0x4BF38A6, CommScreen = 0x4D02E35, AdventureDialog = 0x7E9E4B7, UserToggle = 0x4BF38A8, Gameplay = 0x4BF38A7, UIToggle = 0x4BF38A4, ModalDialog = 0x4BF38A9 }
enum SpaceContext { kSpaceContextNone = -1, kSpaceContextPlanet = 0, kSpaceContextSolarSystem = 1, kSpaceContextGalaxy = 2 }

Typedefs

using TimeStamp = int[9]
using NounCreateFunction = cGameData*(*)()
using ReadFunction_t = bool(*)(ISerializerStream*, void*)
The type of function used to read binary attribute data.
using WriteFunction_t = bool(*)(ISerializerStream*, void*)
The type of function used to write binary attribute data.
using ReadTextFunction_t = void(*)(const string&, void*)
The type of function used to read attribute data, which is expressed in text.
using WriteTextFunction_t = void(*)(char*, void*)
The type of function used to write attribute data, which is expressed in text.
using UnknownFunction_t = bool(*)()
using UnknownFunction2_t = bool(*)(void*, const char*, int)
using OffsetFunction_t = void*(*)(Attribute*)
using StarID = uint32_t
using PlanetID = uint32_t
template<class T>
using ContainerCreateCallback_t = tGameDataVectorT<T>*(*)()
Creates the vector game data container.
template<class T>
using ContainerClearCallback_t = void(*)(tGameDataVectorT<T>*pVector)
Clears the content of the vector.
template<class T>
using ContainerAddCallback_t = void(*)(tGameDataVectorT<T>*pVector, cGameData*pObject)
This method must add the game data object into the vector.
using ContainerFilterCallback_t = bool(*)(cGameData*pObject, uint32_t gameNounID)
Used to decide which game objects go to the vector and which do not.
using EmpiresMap = map<uint32_t, intrusive_ptr<cEmpire>>

Functions

auto ScheduleTask(const App::VoidFunction_T& function, float scheduleTime) -> intrusive_ptr<ScheduledTaskListener>
Executes a function after a certain time (measured in seconds) has passed from ths call.
template<class T>
auto ScheduleTask(T* object, App::VoidMethod_T<T> method, float scheduleTime) -> intrusive_ptr<ScheduledTaskListener>
Executes a class method after a certain time (measured in seconds) has passed from ths call.
auto ScheduleRepeatedTask(const App::VoidFunction_T& function, float scheduleTime, float repeatRate) -> intrusive_ptr<ScheduledTaskListener>
Executes a function after a certain time (measured in seconds) has passed from this call, and then keeps repeating it after a certain period (defined by the repeatRate parameter) parameter.
template<class T>
auto ScheduleRepeatedTask(T* object, App::VoidMethod_T<T> method, float scheduleTime, float repeatRate) -> intrusive_ptr<ScheduledTaskListener>
Executes a function after a certain time (measured in seconds) has passed from this call, and then keeps repeating it after a certain period (defined by the repeatRate parameter) parameter.
auto RemoveScheduledTask(intrusive_ptr<ScheduledTaskListener>& taskListener) -> bool
auto Addresses(cAbductToolStrategy) -> namespace
ASSERT_SIZE(cAnimalCargoInfo, 0x80)
auto Addresses(cArtilleryWeaponStrategy) -> namespace
ASSERT_SIZE(cBadgeManager, 0xC0)
ASSERT_SIZE(cBehaviorList, 0x18)
ASSERT_SIZE(cBuildingCityHall, 0x378)
ASSERT_SIZE(cBuildingEntertainment, 0x340)
ASSERT_SIZE(cBuildingHouse, 0x340)
ASSERT_SIZE(cBuildingIndustry, 0x340)
ASSERT_SIZE(cBuildingScenario, 0x3C8)
ASSERT_SIZE(cCityPartner, 0xC)
ASSERT_SIZE(cCity, 0x818)
ASSERT_SIZE(UnkCityClass, 0x64)
auto Addresses(cCity) -> namespace
ASSERT_SIZE(cCivilization, 0x4D8)
ASSERT_SIZE(cCombatSimulator, 0x40)
auto Addresses(cCombatSimulator) -> namespace
ASSERT_SIZE(cCommEvent, 0xA0)
ASSERT_SIZE(cCommodityNode, 0x290)
auto Addresses(cCreatureAbility) -> namespace
auto Addresses(cCreatureAnimal) -> namespace
auto Addresses(cCreatureBase) -> namespace
ASSERT_SIZE(cCreatureCitizen, 0x1038)
auto Addresses(cCropCirclesToolStrategy) -> namespace
auto Addresses(cDeepSpaceProjectileToolStrategy) -> namespace
auto Addresses(cDefaultAoETool) -> namespace
auto Addresses(cDefaultBeamTool) -> namespace
auto Addresses(cDefaultProjectileWeapon) -> namespace
auto Addresses(cDragInputProjectileToolStrategy) -> namespace
auto Addresses(cDropCargoToolStrategy) -> namespace
ASSERT_SIZE(cEgg, 0x228)
auto Addresses(Cell) -> namespace
ASSERT_SIZE(cEllipticalOrbit::OrbitCache, 0x44)
ASSERT_SIZE(cEllipticalOrbit, 0x68)
auto Addresses(cEllipticalOrbit) -> namespace
auto GetArchetypeRelationshipsID(int archetype, int difficulty) -> uint32_t
Returns the instance ID of the property file that contains the relationship properties used by a certain archetype in a certain difficulty (such as "spg_bard_easy", "spg_warrior_medium", etc)
auto Addresses(cEmpire) -> namespace
auto Addresses(cEnergyRepairToolStrategy) -> namespace
auto Addresses(cGameData) -> namespace
auto Addresses(cGameDataUFO) -> namespace
ASSERT_SIZE(cGamePlant, 0x680)
ASSERT_SIZE(cGameplayMarker, 0x1C8)
auto Addresses(cGameTerrainCursor) -> namespace
auto Addresses(cGenesisDeviceToolStrategy) -> namespace
auto Addresses(cGetOutOfUFOToolStrategy) -> namespace
auto Addresses(cGlobalMindEraseToolStrategy) -> namespace
ASSERT_SIZE(cGonzagoSimulator, 0x10)
auto Addresses(cGonzagoTimer) -> namespace
ASSERT_SIZE(cHerd, 0x220)
auto Addresses(cHerd) -> namespace
ASSERT_SIZE(cHitSphere, 0x250)
ASSERT_SIZE(cInterCityRoad, 0x140)
auto Addresses(cMindEraseToolStrategy) -> namespace
ASSERT_SIZE(cMission, 0x1F0)
auto Addresses(cMission) -> namespace
ASSERT_SIZE(UnkMissionManagerStruct, 0x38)
ASSERT_SIZE(cMissionManager, 0x144)
auto Addresses(cMissionManager) -> namespace
ASSERT_SIZE(cNest, 0x130)
ASSERT_SIZE(cObjectInstanceInventoryItem, 0x80)
ASSERT_SIZE(ConversationResource, 0x80)
auto Addresses(cPlaceColonyToolStrategy) -> namespace
auto Addresses(cPlaceObjectToolStrategy) -> namespace
auto Addresses(cPlanet) -> namespace
ASSERT_SIZE(cPlantCargoInfo, 0xA4)
auto Addresses(cPlayerInventory) -> namespace
auto Addresses(cRallyCallToolStrategy) -> namespace
auto Addresses(cRepairAOEToolStrategy) -> namespace
auto Addresses(cRepairToolStrategy) -> namespace
ASSERT_SIZE(cResourceProjectile, 0x558)
auto Addresses(cScanToolStrategy) -> namespace
auto Addresses(cScenarioClass) -> namespace
ASSERT_SIZE(cScenarioData, 0x1FC)
auto Addresses(cScenarioData) -> namespace
ASSERT_SIZE(cScenarioDataEconomy, 0x30)
ASSERT_SIZE(cScenarioTerraformEconomy, 0xC)
ASSERT_SIZE(cScenarioTerraformHistoryEntry, 0x40)
ASSERT_SIZE(cScenarioDataHistoryEntry, 0x18)
ASSERT_SIZE(cScenarioEditHistory, 0x28)
auto Addresses(cScenarioEditHistory) -> namespace
ASSERT_SIZE(cScenarioPlayModeGoal, 0x1AC)
ASSERT_SIZE(cScenarioPlaySummary, 0x48)
ASSERT_SIZE(cScenarioPlayMode, 0x108)
auto Addresses(cScenarioPlayMode) -> namespace
auto Addresses(cScenarioPowerup) -> namespace
auto Addresses(cScenarioResource) -> namespace
auto Addresses(cScenarioSimulator) -> namespace
ASSERT_SIZE(cScenarioTerraformMode, 0x1CC)
auto Addresses(cScenarioTerraformMode) -> namespace
ASSERT_SIZE(cSimPlanetHighLOD, 0x1E8)
auto Addresses(cSimPlanetHighLOD) -> namespace
auto GetPlayerUFO() -> cGameDataUFO*
auto Addresses(cSimulatorPlayerUFO) -> namespace
auto Addresses(cSimulatorSpaceGame) -> namespace
ASSERT_SIZE(cSolarHitSphere, 0x250)
auto Addresses(cSolarSystem) -> namespace
ASSERT_SIZE(cSpaceInventoryItem, 0x7C)
auto Addresses(cSpaceInventoryItem) -> namespace
auto Addresses(cSpaceToolData) -> namespace
auto Addresses(cStar) -> namespace
auto Addresses(cStarRecord) -> namespace
ASSERT_SIZE(cTimeOfDay, 0x28)
auto Addresses(cTimeOfDay) -> namespace
auto Addresses(cToolStrategy) -> namespace
ASSERT_SIZE(cTotemPole, 0x14C)
ASSERT_SIZE(cTribe, 0x19E0)
ASSERT_SIZE(cTribeArchetype, 0xB8)
auto Addresses(cTribeArchetype) -> namespace
ASSERT_SIZE(cTribeFoodMat, 0x110)
ASSERT_SIZE(cTribeHut, 0x260)
ASSERT_SIZE(cTribePlanProperties, 0x44)
ASSERT_SIZE(cTribePlan, 0x58)
ASSERT_SIZE(cTribePlanner, 0x7C)
ASSERT_SIZE(cTribeTool, 0x250)
auto Addresses(cTurretDefenseMissileWeapon) -> namespace
auto Addresses(cTurretFlakWeapon) -> namespace
auto Addresses(cVehicle) -> namespace
void RegisterNounType(uint32_t nounID, uint32_t typeID, const char* name)
ASSERT_SIZE(Attribute, 0x3C)
ASSERT_SIZE(ClassSerializer, 0xA14)
auto Addresses(ClassSerializer) -> namespace
auto Addresses(XmlSerializer) -> namespace
auto GetSectorIndex(StarID star) -> size_t
Returns the index of the sector where this star is stored.
auto GetStarIndex(StarID star) -> size_t
Returns the index of the star within its star sector.
auto GetStarKey(PlanetID planet) -> StarID
Returns the key that uniquely identifies the star where the given planet is.
auto GetPlanetIndex(PlanetID planet) -> size_t
Returns the index of the planet within its star system.
auto Addresses(cAnimalSpeciesManager) -> namespace
auto Addresses(cCommManager) -> namespace
auto Addresses(cRelationshipManager) -> namespace
ASSERT_SIZE(cSavedGameHeader, 0x68)
ASSERT_SIZE(cGameBehaviorManager, 0xA4)
auto Addresses(cGameBehaviorManager) -> namespace
auto Addresses(cGameInputManager) -> namespace
auto GetGameModeID() -> uint32_t
Returns the ID of the current game mode. You can compare it to the values in the GameModeIDs enum.
auto IsCellGame() -> bool
Returns true if the game is currently in the cell stage.
auto IsCreatureGame() -> bool
Returns true if the game is currently in the creature stage.
auto IsTribeGame() -> bool
Returns true if the game is currently in the tribe stage.
auto IsCivGame() -> bool
Returns true if the game is currently in the civilization stage.
auto IsSpaceGame() -> bool
Returns true if the game is currently in the tribe stage.
auto IsGameEditMode() -> bool
Returns true if the game is currently in the "game edit" mode, which is the level editor.
auto IsScenarioMode() -> bool
Returns true if the game is currently in adventure mode.
auto IsLoadingGameMode() -> bool
Returns true if the game is currently loading a stage.
auto Addresses(cGameModeManager) -> namespace
ASSERT_SIZE(cGameNounManager, 0x11C)
auto Addresses(cGameNounManager) -> namespace
template<class T>
auto GetData(uint32_t nounID) -> tGameDataVectorT<T>&
Gets all the game data objects that use the given game noun ID.
template<class T>
auto GetData() -> tGameDataVectorT<T>&
Gets all the game data objects that are of the specified type.
template<class T>
auto GetDataByCast() -> tGameDataVectorT<T>&
Gets all the game data objects that can be casted to the specified type.
ASSERT_SIZE(cGameTimeManager, 0x80)
auto Addresses(cGameTimeManager) -> namespace
auto GetLightingWorld() -> Graphics::ILightingWorld*
auto Addresses(cGameViewManager) -> namespace
auto Addresses(cPlanetModel) -> namespace
ASSERT_SIZE(cPlantSpeciesManager, 0x3C)
auto Addresses(cPlantSpeciesManager) -> namespace
ASSERT_SIZE(cSimTicker, 0x44)
void InitializeWithoutPlanet()
Initializes certain Simulator systems so that most things can be used without being in a star or planet.
auto Addresses(cSimulatorSystem) -> namespace
auto GetActiveStar() -> cStar*
auto GetActiveStarRecord() -> cStarRecord*
auto GetActivePlanet() -> cPlanet*
auto GetActivePlanetRecord() -> cPlanetRecord*
auto GetPlayerEmpire() -> cEmpire*
auto GetPlayerEmpireID() -> uint32_t
auto GetCurrentContext() -> SpaceContext
auto Addresses(SpacePlayerData) -> namespace
auto Addresses(cStarManager) -> namespace
auto Addresses(cSpaceTradeRouteManager) -> namespace
void SpaceTeleportTo(cStarRecord* star)
Teleports the player spaceship into the given star record.
auto GalaxyCoordinatesTo3D(float parsecDistance, float angle, Vector3& dst) -> Vector3&
Converts the parsec distance and angle into the 3D coordinates used in the galaxy map and in functions like cStarManager::FindClosestStar().
auto Addresses(cTerraformingManager) -> namespace
auto Addresses(cToolManager) -> namespace
ASSERT_SIZE(cFeedbackEvent, 0x94)
ASSERT_SIZE(cUIEventLog, 0x70)
auto Addresses(cUIEventLog) -> namespace
ASSERT_SIZE(UnknownCreatureClass, 0x4A0)

Enum documentation

enum Simulator::EmpireFlags

enum Simulator::MissionFlags

enum Simulator::GameNounIDs

All the noun IDs used to identify Simulator game data classes in the game files.

These IDs can be passed to the cGameNounManager to create instances of these classes, even if the class itself isn't in the SDK yet.

enum class Simulator::TechLevel: int

Technology level of a planet.

enum class Simulator::PlanetType: int

Type of a planet, used in Simulator::cPlanetRecord.

enum class Simulator::StarType: int

The type of a star in a galaxy (which includes black holes, binary stars, proto-planetary disks, and the galactic core), used in Simulator::cStarRecord.

Enumerators
None

GalacticCore

The galactic core.

BlackHole

Black holes.

ProtoPlanetary

Proto-planetary disks.

StarG

Yellow stars.

StarO

Blue stars.

StarM

Red stars.

BinaryOO

Binary O-O (blue-blue) star system.

BinaryOM

Binary O-M (blue-red) star system.

BinaryOG

Binary O-G (blue-yellow) star system.

BinaryGG

Binary G-G (yellow-yellow) star system.

BinaryGM

Binary G-M (yellow-red) star system.

BinaryMM

Binary M-M (red-red) star system.

enum class Simulator::cCelestialBodyType: int

Used by Simulator::cCelestialBody.

Enumerators
None

Star

Comet

Uses effect 0x3D6F8D8

enum class Simulator::cCommEventType: int

Used by Simulator::cCommEvent.

enum class Simulator::MissionState: int

The different states in which a mission can be (accepted, rejected, failed, etc).

Used by Simulator::cMission.

Enumerators
Unaccepted

When the mission hasn't been accepted yet, and player is in the initial conversation.

Finished

The mission has been finished (not necessarily completed). After this, the mission is destroyed.

Accepted

The player just accepted the mission, but it hasn't started yet.

It calls cMission::OnMissionAccept() and immediately transitions to MissionState::Active

Active

The mission is currently active. While the mission is in this state, it receives calls to Update()

Completed

The player has successfully completed the mission.

It calls cMission::OnMissionCompleted() and immediately transitions to MissionState::Finished, or to MissionState::StepCompleted if this is a sub-mission of a bigger mission.

Failed

The player has failed the mission.

It calls cMission::OnMissionFailed() and immediately transitions to MissionState::Finished

Aborted

The mission has been aborted.

It calls cMission::OnMissionAbort() and immediately transitions to MissionState::Finished

Rejected

The mission has been rejected.

It calls cMission::OnMissionReject() and immediately transitions to MissionState::Finished

StepCompleted

When this mission is only a step of a bigger mission, and the step gets completed.

enum class Simulator::LandmarkStarType: int

Types of star landmarks to be searched in some missions. Used by Simulator::cStarClue.

enum class Simulator::LandmarkPlanetType: int

Types of planet landmarks to be searched in some missions. Used by Simulator::cPlanetClue.

enum class Simulator::PlanetRepresentationMode: int

Used by Simulator::cPlanet.

Enumerators
Nothing

mpVisiblePlanet is set to invisible, mpSolarHitSphere is disabled

VisiblePlanetAndHitSphere

mpVisiblePlanet is set to visible, mpSolarHitSphere is enabled

OnlyVisiblePlanet

mpVisiblePlanet is set to visible, mpSolarHitSphere is disabled

OnlyHitSphere

mpVisiblePlanet is set to invisible, mpSolarHitSphere is enabled

enum class Simulator::SpaceInventoryItemType

Used by Simulator::cSpaceInventoryItem.

Enumerators
Plant

Plants.

NonSentientAnimal

Non-sentient animals.

Tool

Space tools in spacetools~ (0x30608F0B) group.

CargoSlot

TradingObject

Objects in spacetrading~ (0x34D97FA) group.

MultiDeliveryObject

Objects in multiDelivery_mision_objects~ (0x037D494E) group.

Sentient

Sentient animals (citizens)

Unk7

ObjectInstance

cObjectInstanceInventoryItem

enum Simulator::SpaceToolHit

Different kinds of surfaces where a tool can hit, usde by Simulator::cSpaceToolData.

enum Simulator::SpaceToolTarget

Different kinds of targets that a tool can shoot at, usde by Simulator::cSpaceToolData.

enum class Simulator::TribePlanType: int

Different types of actions that a tribe can carry, used by Simulator::cTribePlanner.

Enumerators
Raid

In tribe archetype, property RaidPlans

Gift

In tribe archetype, property GiftPlans

Hunt

In tribe archetype, property HuntPlans

Gather

In tribe archetype, property GatherPlans

Fish

In tribe archetype, property FishPlans

Mate

In tribe archetype, property MatePlans

CheatMember

In tribe archetype, property CheatMemberPlans

BuyTools

In tribe archetype, property BuyToolsPlans

Idle

In tribe archetype, property IdlePlans

StealFood

In tribe archetype, property StealFoodPlans

enum Simulator::RelationshipEvents

Properties of relationships between communities (tribes, civilizations, empires)

enum class Simulator::ScenarioGenre: uint32_t

Possible genres of an adventure, used by Simulator::cScenarioModeData.

enum class Simulator::ScenarioPowerupType: int

enum class Simulator::ScenarioObjectType: uint32_t

enum class Simulator::ScenarioGfxOverrideType: int

Enumerators
Invisible

No override.

Normal

Use the default model, no override.

Disguised

Use a custom asset specified by the player.

enum class Simulator::ScenarioGoalType: int

enum class Simulator::CreatureMotive: int

Possible motive (health & hunger) states for a creature; what is considered "low" and "critical" depends on the MotiveTuning settings.

enum class Simulator::InteractableObjectType: int

Possible types of interactable objects, used by cInteractableObject.

enum Simulator::SimulatorMessages

Enumerators
kMsgEnterEditor

Simulator::EnterEditorMessage; Enters the correct editor modifying the specified creation.

kMsgSwitchGameMode

kMsgSaveGame

Saves the game, pausing the game and showing a dialog on success. Use with message data 1 (as in, an integer).

kMsgGameNounStatusChanged

Simulator::GameNounStatusChangedMessage.

kMsgMissionUpdate

Simulator::MissionUpdateMessage; every update of a mission, only if the mission is ongoing.

kMsgCombatantKilled

Simulator::CombatantKilledMessage; called when a combatant is killed.

kMsgPlayerEmpireAllied

Simulator::PlayerEmpireAlliedMessage; called when the player empire makes a new alliance.

kMsgPlayerEmpireLostAlliance

Simulator::PlayerEmpireLostAllianceMessage; called when the player empire loses an alliance.

kMsgSculptOrColorToolHit

Called when a spaceship uses an sculpting or coloring tool and it hits the planet. No parameters.

kMsgToolOnHit

Simulator::ToolOnHitMessage; called when a space tool hits a target.

kMsgScenarioCreatureHealed

Simulator::ScenarioCreatureHealedMessage; called when a creature is healed (either by natural heal rate, or using a medkit) in Scenario mode.

kMsgScenarioUndo

No data, called when pressing the undo button in the scenario editor.

kMsgScenarioRedo

No data, called when pressing the redo button in the scenario editor.

enum class Simulator::TimeManagerPause

Enumerators
CinematicAll

Pauses game and effects, not audio.

Cinematic

Pauses game, not effects nor audio.

Tutorial

Pauses game, not effects nor audio.

Editor

Pauses game, not effects nor audio.

CommScreen

Pauses game and effects, not audio.

AdventureDialog

Pauses game, not effects nor audio.

UserToggle

Pauses game, effects and audio.

Gameplay

Pauses game and effects, not audio.

UIToggle

Pauses game and effects, not audio.

ModalDialog

Pauses game and effects, not audio.

Typedef documentation

typedef intSimulator::TimeStamp[9]

typedef bool(*Simulator::ReadFunction_t)(ISerializerStream*, void*)

The type of function used to read binary attribute data.

The parameters are the data serializer and the address of memory where the data must be read.

typedef bool(*Simulator::WriteFunction_t)(ISerializerStream*, void*)

The type of function used to write binary attribute data.

The parameters are the data serializer and the address of memory where the data is.

typedef void(*Simulator::ReadTextFunction_t)(const string&, void*)

The type of function used to read attribute data, which is expressed in text.

The parameters are the text string and the address of memory where the data must be read.

typedef void(*Simulator::WriteTextFunction_t)(char*, void*)

The type of function used to write attribute data, which is expressed in text.

The parameters are the destination text buffer and the address of memory where the data is.

typedef bool(*Simulator::UnknownFunction_t)()

typedef bool(*Simulator::UnknownFunction2_t)(void*, const char*, int)

typedef void*(*Simulator::OffsetFunction_t)(Attribute*)

typedef uint32_t Simulator::StarID

typedef uint32_t Simulator::PlanetID

template<class T>
using Simulator::ContainerCreateCallback_t = tGameDataVectorT<T>*(*)()

Creates the vector game data container.

template<class T>
using Simulator::ContainerClearCallback_t = void(*)(tGameDataVectorT<T>*pVector)

Clears the content of the vector.

template<class T>
using Simulator::ContainerAddCallback_t = void(*)(tGameDataVectorT<T>*pVector, cGameData*pObject)

This method must add the game data object into the vector.

Only the objects that have passed the filter function are used in this callback.

using Simulator::ContainerFilterCallback_t = bool(*)(cGameData*pObject, uint32_t gameNounID)

Used to decide which game objects go to the vector and which do not.

It receives the object to evaluate and the game noun ID passed to the GetData function.

typedef map<uint32_t, intrusive_ptr<cEmpire>> Simulator::EmpiresMap

Function documentation

intrusive_ptr<ScheduledTaskListener> Simulator::ScheduleTask(const App::VoidFunction_T& function, float scheduleTime)

Executes a function after a certain time (measured in seconds) has passed from ths call.

Parameters
function A void function with no parameters, that will be executed every frame.
scheduleTime The time that has to pass, in seconds, since the task is scheduled for it to be executed.

The function is executed only once, and the time starts counting since this ScheduleTask method has been called.

The method returns the object that holds the scheduled task. If you want to remove the task before it is called, you can do it by calling Simulator::RemoveScheduledTask(...) with the returned object as parameter.

Internally, this is implemented by adding a message listener that listens to the kMsgAppUpdate message. Every frame uses a cGonzagoTimer object to compare the elapsed time since this task as scheduled. The listener is removed once the task has finished executing.

template<class T>
intrusive_ptr<ScheduledTaskListener> Simulator::ScheduleTask(T* object, App::VoidMethod_T<T> method, float scheduleTime)

Executes a class method after a certain time (measured in seconds) has passed from ths call.

Parameters
object The object to which the method will be called.
method A void method with no parameters, that will be executed every frame.
scheduleTime The time that has to pass, in seconds, since the task is scheduled for it to be executed.

The method is executed only once, and the time starts counting since this ScheduleTask method has been called.

The method returns the object that holds the scheduled task. If you want to remove the task before it is called, you can do it by calling Simulator::RemoveScheduledTask(...) with the returned object as parameter.

Internally, this is implemented by adding a message listener that listens to the kMsgAppUpdate message. Every frame uses a cGonzagoTimer object to compare the elapsed time since this task as scheduled. The listener is removed once the task has finished executing.

intrusive_ptr<ScheduledTaskListener> Simulator::ScheduleRepeatedTask(const App::VoidFunction_T& function, float scheduleTime, float repeatRate)

Executes a function after a certain time (measured in seconds) has passed from this call, and then keeps repeating it after a certain period (defined by the repeatRate parameter) parameter.

Parameters
function A void function with no parameters, that will be executed every frame.
scheduleTime The time that has to pass, in seconds, since the task is scheduled for it to be executed.
repeatRate How many seconds have to pass between every execution of the task.

The function is executed only once, and the time starts counting since this ScheduleTask method has been called.

The method returns the object that holds the scheduled task. If you want to remove the task so it does not execute anymore, you can do it by calling Simulator::RemoveScheduledTask(...) with the returned object as parameter.

Internally, this is implemented by adding a message listener that listens to the kMsgAppUpdate message. Every frame uses a cGonzagoTimer object to compare the elapsed time since this task as scheduled. The listener is removed once the task has finished executing.

template<class T>
intrusive_ptr<ScheduledTaskListener> Simulator::ScheduleRepeatedTask(T* object, App::VoidMethod_T<T> method, float scheduleTime, float repeatRate)

Executes a function after a certain time (measured in seconds) has passed from this call, and then keeps repeating it after a certain period (defined by the repeatRate parameter) parameter.

Parameters
object The object to which the method will be called.
method A void method with no parameters, that will be executed every frame.
scheduleTime The time that has to pass, in seconds, since the task is scheduled for it to be executed.
repeatRate How many seconds have to pass between every execution of the task.

The function is executed only once, and the time starts counting since this ScheduleTask method has been called.

The method returns the object that holds the scheduled task. If you want to remove the task so it does not execute anymore, you can do it by calling Simulator::RemoveScheduledTask(...) with the returned object as parameter.

Internally, this is implemented by adding a message listener that listens to the kMsgAppUpdate message. Every frame uses a cGonzagoTimer object to compare the elapsed time since this task as scheduled. The listener is removed once the task has finished executing.

bool Simulator::RemoveScheduledTask(intrusive_ptr<ScheduledTaskListener>& taskListener)

Simulator::ASSERT_SIZE(cCity, 0x818)

namespace Simulator::Addresses(cCity)

Simulator::ASSERT_SIZE(cEgg, 0x228)

namespace Simulator::Addresses(Cell)

uint32_t Simulator::GetArchetypeRelationshipsID(int archetype, int difficulty)

Returns the instance ID of the property file that contains the relationship properties used by a certain archetype in a certain difficulty (such as "spg_bard_easy", "spg_warrior_medium", etc)

Parameters
archetype The archetype, in the "kArchetype..." enum.
difficulty The current difficulty, in the "kDifficulty..." enum.

namespace Simulator::Addresses(cEmpire)

namespace Simulator::Addresses(cGameData)

Simulator::ASSERT_SIZE(cHerd, 0x220)

namespace Simulator::Addresses(cHerd)

Simulator::ASSERT_SIZE(cMission, 0x1F0)

namespace Simulator::Addresses(cMission)

Simulator::ASSERT_SIZE(cNest, 0x130)

namespace Simulator::Addresses(cPlanet)

namespace Simulator::Addresses(cStar)

namespace Simulator::Addresses(cStarRecord)

namespace Simulator::Addresses(cTimeOfDay)

Simulator::ASSERT_SIZE(cTribe, 0x19E0)

namespace Simulator::Addresses(cVehicle)

void Simulator::RegisterNounType(uint32_t nounID, uint32_t typeID, const char* name)

size_t Simulator::GetSectorIndex(StarID star)

Returns the index of the sector where this star is stored.

Parameters
star The key that uniquely identifies the star.

size_t Simulator::GetStarIndex(StarID star)

Returns the index of the star within its star sector.

Parameters
star The key that uniquely identifies the star.

StarID Simulator::GetStarKey(PlanetID planet)

Returns the key that uniquely identifies the star where the given planet is.

Parameters
planet The key that uniquely identifies the planet.

size_t Simulator::GetPlanetIndex(PlanetID planet)

Returns the index of the planet within its star system.

Parameters
planet The key that uniquely identifies the planet.

uint32_t Simulator::GetGameModeID()

Returns the ID of the current game mode. You can compare it to the values in the GameModeIDs enum.

bool Simulator::IsCellGame()

Returns true if the game is currently in the cell stage.

bool Simulator::IsCreatureGame()

Returns true if the game is currently in the creature stage.

bool Simulator::IsTribeGame()

Returns true if the game is currently in the tribe stage.

bool Simulator::IsCivGame()

Returns true if the game is currently in the civilization stage.

bool Simulator::IsSpaceGame()

Returns true if the game is currently in the tribe stage.

bool Simulator::IsGameEditMode()

Returns true if the game is currently in the "game edit" mode, which is the level editor.

bool Simulator::IsScenarioMode()

Returns true if the game is currently in adventure mode.

bool Simulator::IsLoadingGameMode()

Returns true if the game is currently loading a stage.

template<class T>
tGameDataVectorT<T>& Simulator::GetData(uint32_t nounID)

Gets all the game data objects that use the given game noun ID.

All the found objects will be casted to the specified type.

template<class T>
tGameDataVectorT<T>& Simulator::GetData()

Gets all the game data objects that are of the specified type.

Only classes that define a NOUN_ID can be used here. All the found objects will be casted to the specified type.

template<class T>
tGameDataVectorT<T>& Simulator::GetDataByCast()

Gets all the game data objects that can be casted to the specified type.

You can use this with base classes that aren't nouns to use all the objects of subclasses; for example you can use it with cCombatant or cCreatureBase. Only classes that define a TYPE can be used here. All the found objects will be casted to the specified type.

void Simulator::InitializeWithoutPlanet()

Initializes certain Simulator systems so that most things can be used without being in a star or planet.

This method does:

  • Uses the StarManager temporary star with a temporary planet on it, and sets those as the current star/planet in SpacePlayerData.
  • Calls the PrepareSimulator() method in GameViewManager so that the simulator objects are displayed on the screen.

void Simulator::SpaceTeleportTo(cStarRecord* star)

Teleports the player spaceship into the given star record.

Parameters
star The star record the player will be teleported to.

Only works if the player is in the galaxy view.

Vector3& Simulator::GalaxyCoordinatesTo3D(float parsecDistance, float angle, Vector3& dst)

Converts the parsec distance and angle into the 3D coordinates used in the galaxy map and in functions like cStarManager::FindClosestStar().

Parameters
parsecDistance The distance from the galaxy center, in parsecs.
angle The angle, in degrees.
dst A 3D vector where the coordinates will be written.

The Z coordinate will be 0.