Simulator namespace

Namespaces

namespace AI
namespace Cell
Cell stage functionality.
namespace ScenarioInputStrategy
namespace SerializationTypes
namespace SpaceInputStrategy
namespace SubSystem
namespace WASDInputStrategy

Classes

struct Attribute
class cAbductToolStrategy
class cAbilityState
struct cAbilityUIMap
class cAnimalCargoInfo
class cAnimalSpeciesManager
class cArtilleryProjectile
class cArtilleryWeaponStrategy
class cBadgeManager
class cBaseDisplayStrategy
class cBehaviorAgent
class cBehaviorBase
class cBehaviorEntry
class cBehaviorList
class cBuilding
Base class for all buildings in Simulator game modes.
class cBuildingCityHall
struct cBuildingData
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 cCityData
struct cCityPartner
class cCityTerritory
class cCityWalls
struct cCivData
class cCivilization
struct cCollectableItemID
class cCollectableItems
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.
struct cCommodityNodeData
class cCommunity
The following attributes are saved:
struct cCommunityLayout
Also used by Tribe, related with city layout.
class cConversation
class cCreatureAbility
class cCreatureAnimal
class cCreatureBase
The base class for all creatures in the Simulator.
class cCreatureCitizen
class cCreatureDisplayStrategy
class cCreatureGameData
class cCreatureItem
class cCropCirclesToolStrategy
class cCulturalProjectile
class cCulturalTarget
class cCultureSet
Contains the IDs of all the creation types of a specific "culture" or civilization/empire.
class cDeepSpaceProjectile
class cDeepSpaceProjectileToolStrategy
class cDefaultAoEArea
class cDefaultAoETool
class cDefaultBeamProjectile
class cDefaultBeamTool
class cDefaultProjectileWeapon
class cDefaultToolProjectile
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 cFlakProjectile
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 cGamePersistenceManager
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 cICBM
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 cLayoutSlot
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 cMovableDestructibleOrnament
class cNest
class cNPCStore
struct CnvAction
struct CnvAnimation
struct CnvAnimationVariation
struct CnvDialog
struct CnvDialogResponse
struct CnvEventLog
struct CnvText
struct CnvUnknown
class cObjectInstanceInventoryItem
template<typename T>
class cObjectPool
class cObjectPool_
Stores a pool of objects whose memory can be reused efficiently, without need for heap allocations.
struct cObjectPoolClass
Base class for all objects that are used inside a cObjectPool.
class CombatantKilledMessage
Called when a cCombatant is killed.
class ConversationResource
class cOrnament
Used, among other things, for adventure objects (except pickable ones)
struct cOrnamentData
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).
class cPlanetaryArtifact
struct cPlanetClue
class cPlanetGfx
class cPlanetModel
struct cPlanetObjectData
class cPlanetRecord
Keeps all the information related to a planet.
class cPlantCargoInfo
class cPlantSpeciesManager
class cPlayer
class cPlayerInventory
class cProjectile
class cRaidEvent
The kind of mission for raid events.
class cRaidPlunderEvent
The kind of mission for pirate raid events.
class cRallyCallToolStrategy
class CreatureGamePartUnlocking
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 cShipBackgroundData
class cSimPlanetHighLOD
class cSimTicker
class cSimulatorPlayerUFO
class cSimulatorSpaceGame
class cSimulatorSystem
class cSimulatorUniverse
Universe Event Simulator.
class cSolarHitSphere
class cSolarSystem
Holds visual information about a solar system in the solar system view, or when inside a planet.
class cSpaceDefenseMissile
class cSpaceGfx
class cSpaceInventory
class cSpaceInventoryItem
Represents an item of the space player inventory. This include space tools and cargo.
class cSpaceNames
Class to generate names (for creatures, planets, etc.), for example: auto name = SpaceNames.GenerateRandomName(Simulator::SpaceNamesType::kPlanet);
class cSpacePlayerWarData
class cSpaceToolData
class cSpaceTradeRouteManager
class cSpaceTrading
Singleton class for everything related to space stage trading, such as obtaining tradable items or generating NPC stores.
class cSpatialObject
A 3D model in the Simulator.
class cSpatialObjectView
class cSpear
class cSpeciesManager
class cSpeciesProfile
class cStar
struct cStarClue
class cStarManager
This class controls most stuff related with the galaxy, stars, planets and empires.
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 cToolObject
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.
struct cTribeData
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 cTurret
class cTurretDefenseMissileWeapon
class cTurretFlakWeapon
class cUIEventLog
This class manages event logs in Simulator game modes.
class cVehicle
struct cVehicleData
class cVisiblePlanet
struct cWallData
class EnterEditorMessage
class EnterModeMessage
struct GameLoadParameters
class GameNounStatusChangedMessage
class GoalCard
class ICityMusic
class IGameDataView
class IMessageParameters
class IScenarioEditHistoryEntry
A generic entry of undo/redo history in the adventure editor.
class ISerializerReadStream
class ISerializerStream
class ISerializerWriteStream
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
struct PlanetID
32 bits field that uniquely identifies a planet in the galaxy.
class PlayerEmpireAlliedMessage
Called when the player empire makes a new alliance.
class PlayerEmpireLostAllianceMessage
Called when the player empire loses an alliance.
class PlayerPlanetData
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 SpaceRareFoundMessage
Sent when a rare item is found (even if it had already been found before) in Space Stage.
class Sporepedia
struct StarID
32 bits field used to uniquely identify a star within the galaxy.
struct StarRequestFilter
struct tCultureTargetInfo
struct tDeferredEvent
template<class T>
class tGameDataVectorT
struct tGrobShockData
class ToolOnHitMessage
Called when a space tool hits a target. Called by cToolStrategy::OnHit.
struct tPlayerDeathData
struct UnkHashtableItem
struct UnkMissionManagerStruct
class UnknownCreatureClass
class UnknownManagerSuperclass
class UnkRefCounted
class XmlSerializer

Enums

enum class CollectableItemStatusFlags: uint8_t { Unlocked = 1 }
enum CreatureFlags { kCreatureFlagIsAlpha = 0x1, kCreatureFlagIsHungry = 0x100, kCreatureFlagIsPlayerAvatar = 0x200 }
enum class DamageType { Bribe = 4, Healing = 10, BlackCloud = 11, _543F8E29 = 12, Nuclear = 13, EMP = 14, IField = 15, Diplomatic = 16 }
enum EmpireFlags { kEmpireFlagNeedsEmpireLines = 0x10 }
enum class CreaturePersonality { None = 0, EpicPredator = 1, Migrator = 2, Decorator = 3, Monkey = 4, Stalker = 5, Guard = 6, Pet = 7, WaterPredator = 8, Carcass = 9, Unk10 = 10, Scenario = 11 }
enum MissionFlags { kMissionFlagIsEvent = 1, kMissionFlagHideStarName = 2, kMissionFlagHidePlanetName = 4, kMissionFlagIsTutorial = 8, kMissionFlagCannotAbort = 0x10, kMissionFlagTimerStartsOnFirstEntry = 0x20, kMissionFlagIsAdventure = 0x80 }
enum PlanetFlags { kPlanetFlagHasRings = 0x2, kPlanetFlagIsMoon = 0x4, kPlanetFlagRedOrbit = 0x1000, kPlanetFlagBlueOrbit = 0x2000 }
enum StarFlags { kStarFlagIsOwned = 0x10, kStarFlagHasRare = 0x1000 }
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 SpaceContext: int { None = -1, Planet = 0, SolarSystem = 1, Galaxy = 2 }
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, Unset = 6 }
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 MoonPerihelionType: int { DifferenceWithParent = 0, Parent = 1, SumWithParent = 2, RelativeToParent = 3 }
Used by function cPlanetRecord::GetPerihelion()
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 ScenarioPlayModeState: int { EditorStart = 0, OpeningCinematic = 1, MissionStart = 2, Active = 3, Completed = 5, Failed = 6 }
The different states in which an adventure can be while being played (beginning, active, completed, failed etc).
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 class BadgeManagerEvent: int { ReqPlanetsColonized = 0, ReqAlliancesFormed = 1, ReqStarsExplored = 2, ReqPlanetsTerraformed = 3, ReqEmpiresMet = 4, ReqWarsStarted = 5, Unk6 = 6, ReqFetchMissionsComplete = 7, ReqEradicateMissionsComplete = 8, ReqEcoDisasterMissionsComplete = 9, ReqFoodWebsComplete = 0xA, ReqRaresCollected = 0xB, ReqBadgePointsEarned = 0xC, ReqTradesComplete = 0xD, ReqMissionsComplete = 0xE, ReqGrobDefeated = 0xF, ReqGrobAllied = 0x10, Flight101Complete = 0x11, FriendsDefended = 0x12, CivsPromoted = 0x13, CreaturesPromoted = 0x14, Sightseer = 0x15, FlightsMade = 0x16, AestheticTools = 0x17, StorybooksVisited = 0x18, TradeRoutes = 0x19, SystemsPurchased = 0x1A, PlanetsConquered = 0x1B, ToolsPurchased = 0x1C, Joker = 0x1D, ReqArchetypeSwitches = 0x1E }
Used by cBadgeManager, ounts how many events of a certain kind have happened, used to know when to give a badge.
enum class SpaceNamesType: uint32_t { kPlanet = 0x07E1310A, kBuilding = 0x03DEE114, kVehicle = 0xBA1FD5AC, kBlackHole = 0xDEB2D943, kTribe = 0x055EA490, kCreature = 0x51AA76BB, kCity = 0x58F4C251, kStar = 0x7CAB064C }
Types of names that can be generated with cSpaceNames.
enum class SpaceGfxObjectType: int { Planet = 0, Moon = 1, GasGiant = 2, Star = 3 }
enum class PlanetTemperatureType: int { Normal = 1, VeryCold = 2, Cold = 3, VeryHot = 4, Hot = 5 }
enum class SolarSystemOrbitTemperature { Hot = 0, Normal = 1, Cold = 2 }
enum class UfoType { Player = 0, UberTurret = 1, Raider = 2, Unk3 = 3, Bomber = 4, Unk5 = 5, Defender = 6, Unk7 = 7, Unk8 = 8, Unk9 = 9, Unk10 = 10, Unk11 = 10 }
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, kMsgGalaxyGenerateStarG = 0x35B2B15, kMsgGalaxyGenerateStarO = 0x36998AE, kMsgGalaxyGenerateStarM = 0x3757942, kMsgGalaxyGenerateBlackHole = 0x36AD255, kMsgGalaxyGenerateProtoPlanetary = 0x36AD784, kMsgGalaxyGenerateGalacticCore = 0x3D1DEBA, kMsgGalaxyGenerateBinaryOO = 0x3DFF99F, kMsgGalaxyGenerateBinaryOM = 0x3DFF9A9, kMsgGalaxyGenerateBinaryOG = 0x3DFF9B1, kMsgGalaxyGenerateBinaryGG = 0x3DFF9BA, kMsgGalaxyGenerateBinaryGM = 0x3DFF9C1, kMsgGalaxyGenerateBinaryMM = 0x3DFF9C6, kMsgSpaceRareFound = 0xF46092D4, kMsgSpaceRareDiscovered = 0x6779F04, kMsgStarOwnershipChanged = 0x55BD8F7 }
enum class TimeManagerPause { CinematicAll = 0x600C4AE, Cinematic = 0x4BF38A5, Tutorial = 0x64BEB65, Editor_ = 0x4BF38A6, CommScreen = 0x4D02E35, AdventureDialog = 0x7E9E4B7, UserToggle = 0x4BF38A8, Gameplay = 0x4BF38A7, UIToggle = 0x4BF38A4, ModalDialog = 0x4BF38A9 }

Typedefs

using cCollectableItemsRowVector = eastl::fixed_vector<cCollectableItemID, 4>
using cCollectableItemsRowID = uint64_t
using NodeType = eastl::map<cCollectableItemsRowID, cCollectableItemsRowVector>::node_type
using UnkHastable = eastl::sp_fixed_hash_map<Simulator::cCollectableItemID, UnkHashtableItem, 4>
using UnkHashMap = eastl::sp_fixed_hash_map<int, UnkHastable, 8>
using CreatureEffectPool = eastl::sp_fixed_hash_map<uint32_t, IVisualEffectPtr, 4>
using cObjectPoolIndex = int
Identifies objects within a cObjectPool.
using TimeStamp = int[9]
using NounCreateFunction = cGameData*(*)()
using ReadFunction_t = bool(*)(ISerializerReadStream*, void*)
The type of function used to read binary attribute data.
using WriteFunction_t = bool(*)(ISerializerWriteStream*, void*)
The type of function used to write binary attribute data.
using ReadTextFunction_t = void(*)(const eastl::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*)
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 = eastl::map<uint32_t, cEmpirePtr>

Functions

auto ScheduleTask(const App::VoidFunction_T& function, float scheduleTime) -> SimScheduledTaskListenerPtr
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) -> SimScheduledTaskListenerPtr
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) -> SimScheduledTaskListenerPtr
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) -> SimScheduledTaskListenerPtr
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(SimScheduledTaskListenerPtr& taskListener) -> bool
auto Addresses(cAbductToolStrategy) -> namespace
ASSERT_SIZE(cAbilityUIMap, 0xD8)
auto Addresses(cAbilityUIMap) -> namespace
ASSERT_SIZE(cAnimalCargoInfo, 0x80)
ASSERT_SIZE(cArtilleryProjectile, 0x538)
auto Addresses(cArtilleryProjectile) -> namespace
auto Addresses(cArtilleryWeaponStrategy) -> namespace
ASSERT_SIZE(cBadgeManager, 0xC0)
auto Addresses(cBadgeManager) -> namespace
ASSERT_SIZE(cBaseDisplayStrategy, 0x38)
ASSERT_SIZE(cBehaviorAgent, 0x68)
ASSERT_SIZE(cBehaviorBase, 0x74)
ASSERT_SIZE(cBehaviorEntry, 0x20)
ASSERT_SIZE(cBehaviorList, 0x18)
ASSERT_SIZE(cBuilding, 0x340)
ASSERT_SIZE(cBuildingCityHall, 0x378)
ASSERT_SIZE(cBuildingEntertainment, 0x340)
ASSERT_SIZE(cBuildingHouse, 0x340)
ASSERT_SIZE(cBuildingIndustry, 0x340)
ASSERT_SIZE(cBuildingScenario, 0x3C8)
ASSERT_SIZE(cCelestialBody, 0xCC)
auto Addresses(cCelestialBody) -> namespace
ASSERT_SIZE(cCityPartner, 0xC)
ASSERT_SIZE(tCultureTargetInfo, 0x80)
ASSERT_SIZE(tDeferredEvent, 0x20)
ASSERT_SIZE(cCity, 0x818)
auto Addresses(cCity) -> namespace
ASSERT_SIZE(cCityTerritory, 0x114)
ASSERT_SIZE(cCityWalls, 0x358)
ASSERT_SIZE(cCivilization, 0x4D8)
ASSERT_SIZE(cCollectableItemsRowVector, 56)
auto GetCollectableItemsRowID(uint32_t categoryID, int pageIndex, int row) -> cCollectableItemsRowID
ASSERT_SIZE(UnkHashtableItem, 8)
ASSERT_SIZE(UnkHastable, 0xDC)
ASSERT_SIZE(UnkHashMap, 0x888)
ASSERT_SIZE(cCollectableItems, 0x6DAC)
auto Addresses(cCollectableItems) -> namespace
auto Addresses(CreatureGamePartUnlocking) -> namespace
auto GetCreatureGameUnlockCategoriesCount() -> eastl::fixed_vector<eastl::pair<uint32_t, int>, 16>&
ASSERT_SIZE(cCombatant, 0xC8)
ASSERT_SIZE(cCombatSimulator, 0x40)
auto Addresses(cCombatSimulator) -> namespace
ASSERT_SIZE(cCommEvent, 0xA0)
ASSERT_SIZE(cCommodityNode, 0x290)
ASSERT_SIZE(cCommunity, 0x120)
ASSERT_SIZE(cLayoutSlot, 0x18)
auto Addresses(cLayoutSlot) -> namespace
ASSERT_SIZE(cCommunityLayout, 0x64)
auto Addresses(cCommunityLayout) -> namespace
ASSERT_SIZE(cConversation, 0x80)
ASSERT_SIZE(cCreatureAbility, 0x13C)
auto Addresses(cCreatureAbility) -> namespace
ASSERT_SIZE(cCreatureAnimal, 0x16A0)
auto Addresses(cCreatureAnimal) -> namespace
ASSERT_SIZE(CreatureEffectPool, 0xA0)
ASSERT_SIZE(cAbilityState, 0x10)
ASSERT_SIZE(UnknownCreatureClass, 0x4A0)
ASSERT_SIZE(cCreatureBase, 0xFC0)
auto Addresses(cCreatureBase) -> namespace
ASSERT_SIZE(cCreatureCitizen, 0x1038)
ASSERT_SIZE(cCreatureDisplayStrategy, 0x320)
ASSERT_SIZE(cCreatureGameData, 0x50)
auto Addresses(cCreatureGameData) -> namespace
auto Addresses(cCropCirclesToolStrategy) -> namespace
ASSERT_SIZE(cCulturalProjectile, 0x588)
auto Addresses(cCulturalProjectile) -> namespace
ASSERT_SIZE(cCulturalTarget, 0x218)
ASSERT_SIZE(cCultureSet, 0x1C)
auto Addresses(cCultureSet) -> namespace
ASSERT_SIZE(cDeepSpaceProjectile, 0x5F0)
auto Addresses(cDeepSpaceProjectileToolStrategy) -> namespace
ASSERT_SIZE(cDefaultAoEArea, 0x170)
auto Addresses(cDefaultAoETool) -> namespace
ASSERT_SIZE(cDefaultBeamProjectile, 0x1F8)
auto Addresses(cDefaultBeamTool) -> namespace
auto Addresses(cDefaultProjectileWeapon) -> namespace
ASSERT_SIZE(cDefaultToolProjectile, 0x5F0)
auto LaunchDefaultToolProjectile(cSpaceToolData* tool, cDefaultToolProjectile* projectile, const Math::Vector3& origin, const Math::Vector3& target) -> void
Launches a projectile using the configuration of the specified tool.
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
ASSERT_SIZE(cEmpire, 0x158)
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
ASSERT_SIZE(cFlakProjectile, 0x520)
auto Addresses(cFlakProjectile) -> namespace
ASSERT_SIZE(cGameBundleContainer, 0x24)
ASSERT_SIZE(cGameData, 0x34)
auto Addresses(cGameData) -> namespace
ASSERT_SIZE(cGameDataUFO, 0x818)
auto Addresses(cGameDataUFO) -> namespace
auto CreateUFO(UfoType type, cEmpire* empire) -> cGameDataUFO*
Creates a new UFO instance of the given type and assigned to the specified empire.
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)
ASSERT_SIZE(cGonzagoTimer, 0x20)
auto Addresses(cGonzagoTimer) -> namespace
ASSERT_SIZE(cHerd, 0x220)
auto Addresses(cHerd) -> namespace
ASSERT_SIZE(cHitSphere, 0x250)
ASSERT_SIZE(cICBM, 0x524)
ASSERT_SIZE(cIdentityColorable, 0x30)
auto Addresses(cIdentityColorable) -> namespace
ASSERT_SIZE(cInteractableObject, 0x130)
ASSERT_SIZE(cInteractiveOrnament, 0x260)
ASSERT_SIZE(cInterCityRoad, 0x140)
ASSERT_SIZE(cLocomotiveObject, 0x4D0)
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(cMovableDestructibleOrnament, 0x638)
ASSERT_SIZE(cNest, 0x130)
ASSERT_SIZE(cObjectInstanceInventoryItem, 0x80)
ASSERT_SIZE(cObjectPool_, 0x1C)
auto Addresses(cObjectPool_) -> namespace
ASSERT_SIZE(ConversationResource, 0x80)
ASSERT_SIZE(cOrnament, 0x238)
auto Addresses(cPlaceColonyToolStrategy) -> namespace
auto Addresses(cPlaceObjectToolStrategy) -> namespace
ASSERT_SIZE(cPlanet, 0x1C8)
auto Addresses(cPlanet) -> namespace
ASSERT_SIZE(cPlanetaryArtifact, 0x668)
auto Addresses(cPlanetaryArtifact) -> namespace
ASSERT_SIZE(cWallData, 0x4)
ASSERT_SIZE(cOrnamentData, 0x34)
ASSERT_SIZE(cBuildingData, 0x38)
ASSERT_SIZE(cCityData, 0xC4)
ASSERT_SIZE(cVehicleData, 0x14)
ASSERT_SIZE(cCivData, 0x50)
auto Addresses(cCivData) -> namespace
ASSERT_SIZE(cTribeData, 0x18)
ASSERT_SIZE(cCommodityNodeData, 0x8)
ASSERT_SIZE(cPlanetObjectData, 0x2C)
ASSERT_SIZE(cPlanetRecord, 0x1B0)
auto Addresses(cPlanetRecord) -> namespace
ASSERT_SIZE(cPlantCargoInfo, 0xA4)
ASSERT_SIZE(cSpacePlayerWarData, 0x40)
ASSERT_SIZE(PlayerPlanetData, 0xB0)
ASSERT_SIZE(cPlayer, 0x12D8)
ASSERT_SIZE(cPlayerInventory, 0x98)
auto Addresses(cPlayerInventory) -> namespace
ASSERT_SIZE(cProjectile, 0x14)
ASSERT_SIZE(cRaidEvent, 0x250)
ASSERT_SIZE(cRaidPlunderEvent, 0x228)
auto Addresses(cRallyCallToolStrategy) -> namespace
auto Addresses(cRepairAOEToolStrategy) -> namespace
auto Addresses(cRepairToolStrategy) -> namespace
ASSERT_SIZE(cResourceProjectile, 0x558)
auto Addresses(cResourceProjectile) -> namespace
auto Addresses(cScanToolStrategy) -> namespace
ASSERT_SIZE(cScenarioAct, 0x534)
ASSERT_SIZE(cScenarioAsset, 0x20)
ASSERT_SIZE(cScenarioClass, 0x27E0)
auto Addresses(cScenarioClass) -> namespace
ASSERT_SIZE(cScenarioClassAct, 0x4E0)
ASSERT_SIZE(cScenarioData, 0x1FC)
auto Addresses(cScenarioData) -> namespace
ASSERT_SIZE(cScenarioDialog, 0x44)
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(cScenarioGoal, 0x188)
ASSERT_SIZE(cScenarioMarker, 0x234)
ASSERT_SIZE(cScenarioMarkerAct, 0x34)
ASSERT_SIZE(cScenarioPlayModeGoal, 0x1AC)
ASSERT_SIZE(cScenarioPlaySummary, 0x48)
ASSERT_SIZE(cScenarioPlayMode, 0x108)
auto Addresses(cScenarioPlayMode) -> namespace
ASSERT_SIZE(cScenarioPosseMember, 0x38)
ASSERT_SIZE(cScenarioPowerup, 0x3C)
auto Addresses(cScenarioPowerup) -> namespace
ASSERT_SIZE(cScenarioResource, 0x2CB0)
auto Addresses(cScenarioResource) -> namespace
auto Addresses(cScenarioSimulator) -> namespace
ASSERT_SIZE(cScenarioString, 0x3C)
ASSERT_SIZE(cScenarioTerraformMode, 0x1CC)
auto Addresses(cScenarioTerraformMode) -> namespace
ASSERT_SIZE(cShipBackgroundData, 0x20)
ASSERT_SIZE(cSimPlanetHighLOD, 0x1E8)
auto Addresses(cSimPlanetHighLOD) -> namespace
ASSERT_SIZE(cSimulatorPlayerUFO, 0xE0)
auto GetPlayerUFO() -> cGameDataUFO*
auto Addresses(cSimulatorPlayerUFO) -> namespace
ASSERT_SIZE(cSimulatorSpaceGame, 0xF0)
auto Addresses(cSimulatorSpaceGame) -> namespace
ASSERT_SIZE(tGrobShockData, 0x28)
ASSERT_SIZE(cSimulatorUniverse, 0x1B8)
auto Addresses(cSimulatorUniverse) -> namespace
ASSERT_SIZE(cSolarHitSphere, 0x250)
ASSERT_SIZE(cSolarSystem, 0x54)
auto Addresses(cSolarSystem) -> namespace
ASSERT_SIZE(cSpaceDefenseMissile, 0x610)
auto Addresses(cSpaceDefenseMissile) -> namespace
ASSERT_SIZE(cSpaceInventory, 0x4C)
ASSERT_SIZE(cSpaceInventoryItem, 0x7C)
auto Addresses(cSpaceInventoryItem) -> namespace
ASSERT_SIZE(cSpaceNames, 0x40C)
auto Addresses(cSpaceNames) -> namespace
ASSERT_SIZE(cSpaceToolData, 0x2A0)
auto Addresses(cSpaceToolData) -> namespace
ASSERT_SIZE(cSpatialObject, 0xD4)
ASSERT_SIZE(cSpatialObjectView, 0x34)
ASSERT_SIZE(cSpear, 0x540)
auto Addresses(cSpeciesProfile) -> namespace
ASSERT_SIZE(cStar, 0x50)
auto Addresses(cStar) -> namespace
ASSERT_SIZE(cStarRecord, 0xB0)
auto Addresses(cStarRecord) -> namespace
ASSERT_SIZE(cTimeOfDay, 0x28)
auto Addresses(cTimeOfDay) -> namespace
ASSERT_SIZE(cToolObject, 0x658)
ASSERT_SIZE(cToolStrategy, 0xC)
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)
ASSERT_SIZE(cTurret, 0x6D0)
auto Addresses(cTurretDefenseMissileWeapon) -> namespace
auto Addresses(cTurretFlakWeapon) -> namespace
ASSERT_SIZE(cVehicle, 0xD98)
auto Addresses(cVehicle) -> namespace
ASSERT_SIZE(cVisiblePlanet, 0x10C)
ASSERT_SIZE(cPlanetGfx, 0x68)
ASSERT_SIZE(GoalCard, 0x98)
ASSERT_SIZE(IGameDataView, 0xC)
auto RegisterNounType(uint32_t nounID, uint32_t typeID, const char* name) -> void
ASSERT_SIZE(Attribute, 0x3C)
ASSERT_SIZE(ClassSerializer, 0xA14)
auto Addresses(ClassSerializer) -> namespace
auto Addresses(XmlSerializer) -> namespace
auto GetBinarySystemStarTypes(StarType binaryType, StarType& star1, StarType& star2) -> void
Used to obtain the individual star types of each of the two stars in a binary system.
auto GetBinarySystemBaseRadius(StarType binaryType) -> float
Returns the radius that is used as a base for calculating planet orbits in a binary-star system.
auto GetSolarStarTemperature(StarType starType) -> float
Returns the solar temperature for a given star type.
auto GetSolarStarMass(StarType starType) -> float
Returns the stellar mass for a given star type, in solar mass units (1.0 is the mass of the Sun, 2.0 is twice as massive as the Sun, etc).
auto GetSolarStarRadius(StarType starType) -> float
Returns the radius for a given star type.
auto GetSolarStarRotationRate(StarType starType) -> float
Returns the rotation rate for a given star type, only used for individual stars.
auto GetSolarStarOrbitRadius(StarType starType, SolarSystemOrbitTemperature orbitTemperature) -> float
Returns the distance from the center of the solar system for cold, normal and hot orbits.
auto GetPlanetTemperatureType(float temperatureScore) -> PlanetTemperatureType
Returns the type of temperature (very cold, cold, normal, hot, very hot) of a planet.
auto IsBinaryStar(StarType starType) -> bool
Returns true if the given star type is a binary star, false otherwise.
auto IsNotStarOrBinaryStar(StarType starType) -> bool
Returns true if the given star is not a single star or binary star system, false otherwise.
auto GetPrecalculatedSolarStarRadius() -> float*
ASSERT_SIZE(StarID, 4)
ASSERT_SIZE(PlanetID, 4)
auto Addresses(cAnimalSpeciesManager) -> namespace
auto Addresses(cCommManager) -> namespace
ASSERT_SIZE(cRelationshipManager, 0x100)
auto Addresses(cRelationshipManager) -> namespace
ASSERT_SIZE(cSavedGameHeader, 0x68)
ASSERT_SIZE(cStrategy, 0x1C)
ASSERT_SIZE(cGameBehaviorManager, 0xA4)
auto Addresses(cGameBehaviorManager) -> namespace
ASSERT_SIZE(cGameInputManager, 0x114)
auto Addresses(cGameInputManager) -> namespace
ASSERT_SIZE(cGameModeManager, 0x9C)
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.
auto GetPlayer() -> cPlayer*
ASSERT_SIZE(GameLoadParameters, 0xB4)
ASSERT_SIZE(cGamePersistenceManager, 0x4C)
auto Addresses(cGamePersistenceManager) -> namespace
ASSERT_SIZE(cGameTimeManager, 0x80)
auto Addresses(cGameTimeManager) -> namespace
ASSERT_SIZE(cGameViewManager, 0x1A8)
auto GetLightingWorld() -> Graphics::ILightingWorld*
auto Addresses(cGameViewManager) -> namespace
auto Addresses(cPlanetModel) -> namespace
ASSERT_SIZE(cPlantSpeciesManager, 0x3C)
auto Addresses(cPlantSpeciesManager) -> namespace
ASSERT_SIZE(cSimTicker, 0x44)
ASSERT_SIZE(cSimulatorSystem, 0x70)
auto InitializeWithoutPlanet() -> void
Initializes certain Simulator systems so that most things can be used without being in a star or planet.
auto Addresses(cSimulatorSystem) -> namespace
ASSERT_SIZE(cSpaceGfx, 0x140)
auto Addresses(cSpaceGfx) -> 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
ASSERT_SIZE(cNPCStore, 0xC0)
ASSERT_SIZE(cSpaceTrading, 0xF8)
auto Addresses(cSpaceTrading) -> namespace
ASSERT_SIZE(cTradeRouteData, 0x28)
ASSERT_SIZE(cSpaceTradeRouteManager, 0x24)
ASSERT_SIZE(cStarManager, 0x22C)
auto Addresses(cStarManager) -> namespace
auto Addresses(cSpaceTradeRouteManager) -> namespace
auto GetRecordGridIndex(unsigned int gridX, unsigned int gridY) -> unsigned int
auto SpaceTeleportTo(cStarRecord* star) -> void
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().
ASSERT_SIZE(cTerraformingManager, 0x94)
auto Addresses(cTerraformingManager) -> namespace
ASSERT_SIZE(cToolManager, 0x29C)
auto Addresses(cToolManager) -> namespace
ASSERT_SIZE(cFeedbackEvent, 0x94)
ASSERT_SIZE(cUIEventLog, 0x70)
auto Addresses(cUIEventLog) -> namespace

Variables

constexpr int MAX_LAYOUT_SLOTS
constexpr cCollectableItemID COLLECTABLE_ITEM_NULL_ID

Enum documentation

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::MoonPerihelionType: int

Used by function cPlanetRecord::GetPerihelion()

Enumerators
DifferenceWithParent

The returned value is the parent perihelion minus the moon perihelion.

Parent

The returned value is the parent perihelion.

SumWithParent

The returned value is the parent perihelion plus the moon perihelion.

RelativeToParent

The returned value is the moon perihelion within its orbit, so relative to the parent planet.

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, GroupIDs::SpaceTrading_) 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::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::ScenarioPlayModeState: int

The different states in which an adventure can be while being played (beginning, active, completed, failed etc).

Used by Simulator::cScenarioPlayMode.

Enumerators
EditorStart

When beginning adventure from the editor, it will skip the opening cinematic to immediately begin the adventure.

OpeningCinematic

When the opening cinematic is running.

MissionStart

When loading the adventure from quick play or (presumably) space stage. Opening cinematic will run.

Active

The adventure is currently active.

Completed

When the adventure is completed successfully, the victory cinematic will play and Spore points will be rewarded (if eligible).

If applicable, the player captain will act joyful and perhaps dance in the results screen as Spore points are rewarded to them.

Failed

If the adventure wasn't successfully cleared, the failure or death cinematic will play, depending on the type of failure.

Spore points will not be rewarded, and if applicable, the player captain will appear sad in the results screen.

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 class Simulator::BadgeManagerEvent: int

Used by cBadgeManager, ounts how many events of a certain kind have happened, used to know when to give a badge.

enum class Simulator::SpaceNamesType: uint32_t

Types of names that can be generated with cSpaceNames.

enum class Simulator::PlanetTemperatureType: int

Enumerators
Normal

Temperature score is between 0.4 and 0.6.

VeryCold

Temperature score is lower than 0.1.

Cold

Temperature score is between 0.1 and 0.4.

VeryHot

Temperature score is higher than 0.85.

Hot

Temperature score is between 0.6 and 0.85.

enum class Simulator::SolarSystemOrbitTemperature

Enumerators
Hot

Hot orbit, close to the sun.

Normal

Normal orbit, neither too close nor too far to the sun.

Cold

Cold orbit, far from the sun.

enum class Simulator::UfoType

Enumerators
Player

UberTurret

Raider

Unk3

Bomber

Unk5

Only has weapon 'abduct'.

Defender

Unk7

Unk8

Unk9

Unk10

Unk11

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.

kMsgGalaxyGenerateStarG

Message emitted by the galaxy generation effect to create stars of StarType::StarG (yellow) type.

kMsgGalaxyGenerateStarO

Message emitted by the galaxy generation effect to create stars of StarType::StarO (blue) type.

kMsgGalaxyGenerateStarM

Message emitted by the galaxy generation effect to create stars of StarType::StarM (red) type.

kMsgGalaxyGenerateBlackHole

Message emitted by the galaxy generation effect to create black holes (StarType::BlackHole).

kMsgGalaxyGenerateProtoPlanetary

Message emitted by the galaxy generation effect to create proto-planteray disks (StarType::ProtoPlanetary).

kMsgGalaxyGenerateGalacticCore

Message emitted by the galaxy generation effect to create galactic cores (StarType::GalacticCore).

kMsgGalaxyGenerateBinaryOO

Message emitted by the galaxy generation effect to create binary O-O (blue-blue) star systems (StarType::BinaryOO).

kMsgGalaxyGenerateBinaryOM

Message emitted by the galaxy generation effect to create binary O-M (blue-red) star systems (StarType::BinaryOM).

kMsgGalaxyGenerateBinaryOG

Message emitted by the galaxy generation effect to create binary O-G (blue-yellow) star systems (StarType::BinaryOG).

kMsgGalaxyGenerateBinaryGG

Message emitted by the galaxy generation effect to create binary G-G (yellow-yellow) star systems (StarType::BinaryGG).

kMsgGalaxyGenerateBinaryGM

Message emitted by the galaxy generation effect to create binary G-M (yellow-red) star systems (StarType::BinaryGM).

kMsgGalaxyGenerateBinaryMM

Message emitted by the galaxy generation effect to create binary M-M (red-red) star systems (StarType::BinaryMM).

kMsgSpaceRareFound

Simulator::SpaceRareFoundMessage ; sent when a rare item is found (even if it had already been found before) in Space Stage.

kMsgSpaceRareDiscovered

Sent when a rare item is discovered (i.e. it had not been found before) in Space Stage. The parameter is a uint32_t* to the rare instance ID.

kMsgStarOwnershipChanged

Sent when the ownership of some star changes. No parameters.

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 eastl::sp_fixed_hash_map<int, UnkHastable, 8> Simulator::UnkHashMap

typedef eastl::sp_fixed_hash_map<uint32_t, IVisualEffectPtr, 4> Simulator::CreatureEffectPool

typedef int Simulator::cObjectPoolIndex

Identifies objects within a cObjectPool.

typedef bool(*Simulator::ReadFunction_t)(ISerializerReadStream*, 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)(ISerializerWriteStream*, 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 eastl::string&, void*)

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

The parameters are the text eastl::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::UnknownFunction2_t)(void*, const char*, int)

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

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.

Function documentation

SimScheduledTaskListenerPtr 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>
SimScheduledTaskListenerPtr 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.

SimScheduledTaskListenerPtr 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>
SimScheduledTaskListenerPtr 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.

eastl::fixed_vector<eastl::pair<uint32_t, int>, 16>& Simulator::GetCreatureGameUnlockCategoriesCount()

void Simulator::LaunchDefaultToolProjectile(cSpaceToolData* tool, cDefaultToolProjectile* projectile, const Math::Vector3& origin, const Math::Vector3& target)

Launches a projectile using the configuration of the specified tool.

Parameters
tool Tool used to configure the projectile trajectory, damage, effect, etc
projectile Projectile object
origin Starting point of the projectile
target Target point of the projectile

Example code to shoot 50 meters in front of your UFO:

auto playerPosition = SimulatorPlayerUFO.GetUFO()->GetPosition();
auto target = playerPosition + 50 * SimulatorPlayerUFO.GetUFO()->GetDirection();
cSpaceToolDataPtr tool;
if (ToolManager.LoadTool({ id("AllyMissile1"), TypeIDs::prop, GroupIDs::SpaceTools }, tool)) 
{
    auto projectile = simulator_new<Simulator::cDefaultToolProjectile>();
    Simulator::LaunchDefaultToolProjectile(tool.get, projectile, playerPosition, target);
}

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.

cGameDataUFO* Simulator::CreateUFO(UfoType type, cEmpire* empire)

Creates a new UFO instance of the given type and assigned to the specified empire.

Parameters
type
empire

It will call cGameDataUFO::Initialize(), which sets up the necessary tools and AI.

void Simulator::GetBinarySystemStarTypes(StarType binaryType, StarType& star1, StarType& star2)

Used to obtain the individual star types of each of the two stars in a binary system.

Parameters
binaryType Type of the system, which should be a binary system.
star1 out Type of the first star.
star2 out Type of the second star.

float Simulator::GetBinarySystemBaseRadius(StarType binaryType)

Returns the radius that is used as a base for calculating planet orbits in a binary-star system.

It calculates it by predicting how the two stars should orbit around one another, depending on their mass and radius calculated using GetSolarStarRadius() and GetSolarStarMass()

float Simulator::GetSolarStarTemperature(StarType starType)

Returns the solar temperature for a given star type.

Parameters
starType
  • For star types that are not stars (e.g. black holes, planetary disks, etc) it returns 1.
  • For binary systems, it is the sum of the temperature of each of the stars.
  • For red, yellow and blue stars, it returns the solarStarTemperature property of their property list.

float Simulator::GetSolarStarMass(StarType starType)

Returns the stellar mass for a given star type, in solar mass units (1.0 is the mass of the Sun, 2.0 is twice as massive as the Sun, etc).

Parameters
starType
  • For the galactic core, it returns 300.
  • For black holes and proto-planteray disks, it returns 100.
  • For binary systems, it is the sum of the stellar mass of each of the stars.
  • For red, yellow and blue stars, it returns the solarStarMass property of their property list.

float Simulator::GetSolarStarRadius(StarType starType)

Returns the radius for a given star type.

Parameters
starType
  • For black holes and the galactic core, it returns 100.
  • For proto-planteray disks, it returns 1.
  • For binary systems, it is the sum of the radius of each of the stars.
  • For red, yellow and blue stars, it returns the solarStarRadius property of their property list.

float Simulator::GetSolarStarRotationRate(StarType starType)

Returns the rotation rate for a given star type, only used for individual stars.

The returned value is an angle in radius, probably the angular change per second. For red, yellow and blue stars it returns the solarStarRotationRate property of their property list (converted to radians, the property is in degrees), for all the rest it returns 0.1

float Simulator::GetSolarStarOrbitRadius(StarType starType, SolarSystemOrbitTemperature orbitTemperature)

Returns the distance from the center of the solar system for cold, normal and hot orbits.

Parameters
starType
orbitTemperature

First, a base radius is calculated, using GetBinarySystemBaseRadius() and GetSolarStarRadius().

  • Hot orbits are baseRadius + 15
  • Normal orbits are baseRadius * 85
  • Cold orbits are baseRadius * 195

PlanetTemperatureType Simulator::GetPlanetTemperatureType(float temperatureScore)

Returns the type of temperature (very cold, cold, normal, hot, very hot) of a planet.

Parameters
temperatureScore The temperature score of the planet, from 0.0 (cold) to 1.0 (hot).

bool Simulator::IsBinaryStar(StarType starType)

Returns true if the given star type is a binary star, false otherwise.

Parameters
starType

bool Simulator::IsNotStarOrBinaryStar(StarType starType)

Returns true if the given star is not a single star or binary star system, false otherwise.

Parameters
starType

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.

Variable documentation