Simulator::cScenarioPlayMode class

Base classes

class App::IUnmanagedMessageListener
Same as App::IMessageListener, but this one does not use ref-counting.
class DefaultRefCounted
The default implementation of a reference counted class.

Public static functions

static auto RemoveInvisibleClasses() -> void
Removes objects that are supposed to be invisible during the current act.
static auto ReadScenarioTuning() -> void

Public functions

auto Initialize() -> void
Called when starting the adventure in Play Mode.
auto SetCurrentAct(int actIndex, bool = false) -> void
Sets the current act index of the active adventure.
auto JumpToAct(int actIndex) -> void
Skips the adventure up to the given act index.
auto SetState(ScenarioPlayModeState state) -> void
Sets the active state of the adventure.
auto UpdateGoals() -> bool
Updates the current, active goals of the adventure.
auto Update(int deltaTime) -> void
Update function of the adventure.
auto CompleteAct() -> void
Completes the act, then moves the adventure into the next act. If in the last act, the adventure completes.
auto CheckGoalProgress() -> void
Called by Update(). Checks if the current goals are clearable or not.

Public variables

cScenarioPlaySummary mSummary
eastl::string16 mFailReason
eastl::vector<cScenarioPlayModeGoal> mCurrentGoals
Goals for the current act.
int field_78
App::MessageListenerData mMessageListenerData
ScenarioPlayModeState mCurrentPlayModeState
Current state of the adventure play mode.
int mCurrentEndCinematicState
Controls what state the ending cinematic of the adventure is in. Set to 0 when ending procedure begins, 1 when cinematic activates, and 2 after player leaves the cinematic sequence.
Clock mCinematicDelay
The clock activates when mCurrentEndCinematicState is set to 0. It counts up to around 2000 units (milliseconds), after which the ending cinematic activates and mCurrentEndCinematicState is set to 1.
int field_B0
int field_B4
int mCurrentActIndex
Index of the current act (0 is first act, 1 is second, etc)
long mTimeLimitMS
Time limit of the current act, in milliseconds (negative number if no time limit)
int mCurrentTimeMS
The playtime of the current adventure in milliseconds.
int mAdventurePoints
The amount of Spore points the captain is rewarded at the end of a successful adventure.
int field_C8
int field_CC
int field_D0
int mCurrentDialogBoxIndex
Index of the dialog box being displayed during talk-to goal cinematic (-1 is the initial fade-in + creature greeting animation, 0 is first dialog box, 1 is second etc.)
int field_D8
float mDistanceToClosestMoveToTarget
Used for move-to goals. Distance of the nearest target to the player.
Math::Vector3 mMoveToGoalLocation
Coordinates of the move-to goal target's location.
bool field_EC
Audio::AudioTrack mMusicTrack
uint32_t mCurrentMusicId
float mIntroFadeinTimer
The duration the captain fade-in effect is active during intro cutscene. Counts down to 0.
bool mIsIntroFadeinActive
Set to true when mIntroFadeinTimer begins counting. Set to false when mIntroBeamdownTimer is less than or equal to 0.
bool mIsAdventureActive
Initially set to false but set to true when adventure begins.
int field_100

Function documentation

void Simulator::cScenarioPlayMode::JumpToAct(int actIndex)

Skips the adventure up to the given act index.

Also works in reverse, i. e. going back to previous acts in the adventure. Using the same index as the current act will reset the adventure to the beginning of said act.

Variable documentation

ScenarioPlayModeState Simulator::cScenarioPlayMode::mCurrentPlayModeState

Current state of the adventure play mode.

0 is pre-init in editor play mode, 1 is intro, 2 seems to be pre-init in quick-play, 3 is gameplay, 5 is adventure completed and 6 is adventure failed (death or failed/invalid goals)

int Simulator::cScenarioPlayMode::mCurrentTimeMS

The playtime of the current adventure in milliseconds.

It pauses counting when the game is paused, and it records its count to display it at the results screen. If the adventure is shared, it will also be sent to the adventure's high scores in the Spore servers if the player is logged in.