/* Scenario: Safari mission 2 : Dinosaurs and Weather * ==================================== * Author : Alister Hatt */ /* 1 x TRex 6 x Raptor 10 x Galli 5 x Camar 5 x Albert 6 x Steg 5 x Cory 5 x Pachy 10 x Homal 10 x Dryo DNA --- Morrison Judith River Flaming Cliffs */ mission Safari2 { ;// mission info .info "budget" 500000 .info "objectives" 7 .info "savestate" "Safari2" ;// systems to activate/de-activate .systemactive "Economy" false .systemactive "Visitor Pool" false .systemactive "Corporate System" false .systemactive "Build Menu" false .systemactive "Enclosure Analyser" false .systemactive "Weather System" false .systemactive "Mail" false ;// Features to disable in the mission .featuredisable "SaveGame" .featuredisable "LoadGame" .featuredisable "Demolish" .featuredisable "Build" .featuredisable "Dinosaurs" .featuredisable "Manager" .featuredisable "Attractions" .featuredisable "Paths" .featuredisable "Amenities" .featuredisable "Security" .featuredisable "Environment" .featuredisable "PaleoFlora" .featuredisable "ModernFlora" .featuredisable "Flatten" .featuredisable "Mountain" .featuredisable "Lake" .featuredisable "GotoParkEntrance" .featuredisable "BuildParkEntrance" .featuredisable "AFossilHuntDialog" .featuredisable "ADNAInventoryDialog" .featuredisable "AFossilMarketDialog" .featuredisable "ADNAModificationDialog" .featuredisable "ADinoSummaryDialog" .featuredisable "AParkSafetyDialog" .featuredisable "AParkFinanceDialog" .featuredisable "AStructureSummaryDialog" .featuredisable "AEntertainmentSummaryDialog" .featuredisable "AParkGuestbookDialog" .featuredisable "AHeadOfficePerformanceDialog" .featuredisable "Order_SpeciesInfo" .featuredisable "Order_StructureSummary" .featuredisable "Order_Guestbook" .featuredisable "Order_Subdue" .featuredisable "Order_Retire" .featuredisable "Order_Vaccinate" .featuredisable "Order_LethalGene" .featuredisable "EmergencyOn" .featuredisable "GotoChopper" .featuredisable "AResearchDialog" .featuredisable "maintdep" .featuredisable "fountn" .featuredisable "bin" .featuredisable "bench" .featuredisable "road" .featuredisable "kiosk" .featuredisable "toilet" .featuredisable "picnic" .featuredisable "shop" .featuredisable "vent" .featuredisable "viewplat" .featuredisable "hventry" .featuredisable "bllnride" .featuredisable "safari" .featuredisable "welccntr" .featuredisable "huntplat" .featuredisable "rangerdp" .featuredisable "scamera" .featuredisable "abeacbld" .featuredisable "turret" .featuredisable "shelter" .featuredisable "hatchery" .featuredisable "carnfdsp" .featuredisable "herbfdsp" .featuredisable "lurebld" .featuredisable "wt1sct90" .featuredisable "wt2sct90" .featuredisable "wt3sct90" .fossilsenable "MorrisonA" .fossilsenable "FlamingCliffs" .fossilsenable "JudithRiverB" ;// mission parameters .misparam ;// objective parameters .objparam 1 .objparam 2 .objparam 3 .objparam 4 .objparam 5 .objparam 6 .objparam 7 ;// variable declarations (Example) .var iJeepsRemaining .var bDisplayedNoPhotosMessage .var iTemp .var iTemp2 .var iTip .var iObjNum .var iCompletedObjNum .var iGameState .var bShowNextObjective .var iStartingPhoto ; Enumerated weather types ; ----------------------------- ; 0 WEATHERTYPE_NORMAL, ; 1 WEATHERTYPE_LIGHTRAIN, ; 2 WEATHERTYPE_HEAVYRAIN, ; 3 WEATHERTYPE_TORNADO, ; 4 WEATHERTYPE_HEATWAVE, ; ----------------------------- ;; ************************* ;; INIT STATES ;; ************************* ;// --------------------------------------------------------------- state MissionInit { ; Jeeps for this mission iJeepsRemaining = 3 iTip = 2 iObjNum = 1 iGameState = 1 iStartingPhoto = 0 bDisplayedNoPhotosMessage = false bShowNextObjective = false ; Make sure all jeeps can resume when killed without needing visitors in the ride action SetAllSafariDepotsAutoSpawn() action VaccinateAllDinosaurs() action RemoveAllMailMessages() ; // Enable and start mission timer ;action EnableMissionTimer(true) ;action StartMissionTimer(1200) ; 20 minutues ; // Set mini-game flags action ClearAllMiniGameParams() action SetCurrentMiniGameParamList(0) ; This is param list AddMiniGameParam() will add Params to action AddMiniGameParam("SafariFlag", 161) ; Unlimited fuel + display jeeps Remaining + locked in jeep state action AddMiniGameParam("JeepNotThreat", true) ; Dinos not scared of jeep action AddMiniGameParam("IsScenario", true) action SetDefaultMiniGameParamList(0) action SetJeepsAvailable(iJeepsRemaining) action SetJeepsRemaining(iJeepsRemaining) ; Setup photo album action SetMaximumPhotos(20) ; Might be too many photos action ResetPhotoAlbum() ; Setup analyser action SetPhotoAnalyserParam("Weights", 0.1, 0.7, 0.1, 0.1) ; Terrain, dinos, trees, wildlife action SetPhotoAnalyserParam("Multiplier", 15.0) ; //Score multiplier action SetUnitTypeSelectable("rgrcopt", true) action SetUnitTypeSelectable("rangerdp", true) action SetUnitTypeSelectable("welccntr", true) ; Carnivore timer action StartTimer(6,30) action SetDinoTypeToIdle(4) action DisableDinoComatose() transition { direct goto PlayCamera1 } } ;// --------------------------------------------------------------- state PlayCamera1 { transition PlayTransition(3,false,1) { direct goto StartMission } } ;// --------------------------------------------------------------- state StartMission { transition ShowMissionIntro("facebuttonSattler") { direct goto DisplayObjectives } } ;// --------------------------------------------------------------- state DisplayObjectives { transition SetMessageLocale("Mission_Safari2_HeatInfo_H", "Mission_Safari2_HeatInfo_D", "facebuttonSattler") { action StartTimer(1, 2) goto StartGame } } ;// --------------------------------------------------------------- state StartGame { transition ;// StartMiniGame(1,1) ;// This is now performed by the PlayTransition call while the screen is black! { goto InitialWeatherWait } } ;// --------------------------------------------------------------- state InitialWeatherWait { transition HasTimerElapsed(1) { ; Add heatwave photo requirements action AddRequirement("PhotoOfDinosaur", "galli", 1) action AddRequirement("PhotoOfDinosaur", "dryo", 1) action AddRequirement("PhotoOfDinosaur", "steg", 1) action AddRequirement("PhotoOfDinosaur", "cerato", 1) action AddRequirement("PhotoOfDinosaur", "cory", 1) action AddRequirement("PhotoOfDinosaur", "homalo", 1) action AddRequirement("PhotoOfDinosaur", "raptor", 1) ; Switch to heatwave action StartTimer(3, 5) ; Reset jeep timer action StartTimer(4, 10) ; Hints switch timer action StartTimer(5, 2) ; Hints Refresh Timer action LockCurrentWeather(false) ; Lock rain in action SendWeather(4) ; Heatwave action LockCurrentWeather(true) ; Lock heat-wave in action StartTimer(2,0.1) goto NextObjectiveDelay } } ;; ************************* ;; MISSION STATES ;; ************************* ; ------------------- state MainLoop { ; // Mini-game unit destroyed transition IsMiniGameUnitDestroyed() { goto JeepDestroyed } ; // Player has returned to the safari depot with their photos transition HasSafariJeepReturned() { goto DecideMissionOutcome } transition GetPhotosAvailable() == 0 { goto NoPhotosLeft } ; Switch objective tips transition HasTimerElapsed(4) { action StartTimer(4, 10) goto SwitchTips } ; Update tips transition HasTimerElapsed(5) { action StartTimer(5, 4) goto UpdateTips } ; // Reset any dead jeeps back to their safari depot transition HasTimerElapsed(3) { action ResetDeadJeeps() action StartTimer(3, 5) goto MainLoop } ; // Sedate any carnivores so they don't kill each other (or other dinos) transition HasTimerElapsed(6) { action SetDinoTypeToIdle(4) action StartTimer(6,30) goto MainLoop } ; // Update dino objectives (for heat-wave) transition iGameState == 1 { goto CheckObjective_1 } ; // Update dino objectives (for rain) transition iGameState == 2 { goto CheckObjective_5 } } ;------------------------------ state NextObjectiveDelay { transition HasTimerElapsed(2) { goto DisplayNextObjective } } ;------------------------------ state DisplayNextObjective { transition iObjNum == 1 { goto ShowObjective_1 } transition iObjNum == 2 { goto ShowObjective_2 } transition iObjNum == 3 { goto ShowObjective_3 } transition iObjNum == 4 { goto ShowObjective_4 } transition iObjNum == 5 { goto ShowObjective_5 } transition iObjNum == 6 { goto ShowObjective_6 } transition iObjNum == 7 { goto ShowObjective_7 } } state CheckObjective_1 { transition GetObjectiveStatus(1) == true { goto CheckObjective_2 } transition HasCompletedRequirement("TakenPhotoOfDinosaur", "galli", 1) { action SetObjectiveStatus(1, true) iCompletedObjNum = 1 goto CompletedHeatObjective } transition { goto CheckObjective_2 } } state CheckObjective_2 { transition GetObjectiveStatus(2) == true { goto CheckObjective_3 } transition HasCompletedRequirement("TakenPhotoOfDinosaur", "dryo", 1) { action SetObjectiveStatus(2, true) iCompletedObjNum = 2 goto CompletedHeatObjective } transition { goto CheckObjective_3 } } state CheckObjective_3 { transition GetObjectiveStatus(3) == true { goto CheckObjective_4 } transition HasCompletedRequirement("TakenPhotoOfDinosaur", "steg", 1) { action SetObjectiveStatus(3, true) iCompletedObjNum = 3 goto CompletedHeatObjective } transition { goto CheckObjective_4 } } state CheckObjective_4 { transition GetObjectiveStatus(4) == true { goto HeatLoopBack } transition HasCompletedRequirement("TakenPhotoOfDinosaur", "cerato", 1) { action SetObjectiveStatus(4, true) iCompletedObjNum = 4 goto CompletedHeatObjective } transition { goto HeatLoopBack } } state HeatLoopBack { transition bShowNextObjective == true { action StartTimer(2,3) goto DetermineNextHeatObjective } transition { goto MainLoop } } state CompletedHeatObjective { transition iObjNum == iCompletedObjNum { bShowNextObjective = true goto CheckObjective_1 } transition { goto CheckObjective_1 } } state DetermineNextHeatObjective { bShowNextObjective = false transition GetObjectiveStatus(2) == false { iObjNum = 2 goto NextObjectiveDelay } transition GetObjectiveStatus(3) == false { iObjNum = 3 goto NextObjectiveDelay } transition GetObjectiveStatus(4) == false { iObjNum = 4 goto NextObjectiveDelay } transition { iObjNum = 5 action StartTimer(2,5) iStartingPhoto = GetPhotosUsed() goto DelayBeforeStormApproaching } } ;; ====================================================================== ;; ====================================================================== ;; ====================================================================== state CheckObjective_5 { transition GetObjectiveStatus(5) == true { goto CheckObjective_6 } transition HasCompletedRequirement("TakenPhotoOfDinosaur", "cory", 1, iStartingPhoto) { action SetObjectiveStatus(5, true) iCompletedObjNum = 5 goto CompletedRainObjective } transition { goto CheckObjective_6 } } state CheckObjective_6 { transition GetObjectiveStatus(6) == true { goto CheckObjective_7 } transition HasCompletedRequirement("TakenPhotoOfDinosaur", "homalo", 1, iStartingPhoto) { action SetObjectiveStatus(6, true) iCompletedObjNum = 6 goto CompletedRainObjective } transition { goto CheckObjective_7 } } state CheckObjective_7 { transition GetObjectiveStatus(7) == true { goto RainLoopBack } transition HasCompletedRequirement("TakenPhotoOfDinosaur", "raptor", 1, iStartingPhoto) { action SetObjectiveStatus(7, true) iCompletedObjNum = 7 goto CompletedRainObjective } transition { goto RainLoopBack } } state RainLoopBack { transition bShowNextObjective == true { action StartTimer(2,3) goto DetermineNextRainObjective } transition { goto MainLoop } } state CompletedRainObjective { transition iObjNum == iCompletedObjNum { bShowNextObjective = true goto CheckObjective_5 } transition { goto CheckObjective_5 } } state DetermineNextRainObjective { bShowNextObjective = false transition GetObjectiveStatus(6) == false { iObjNum = 6 goto NextObjectiveDelay } transition GetObjectiveStatus(7) == false { iObjNum = 7 goto NextObjectiveDelay } transition { goto DecideMissionOutcome } } state ShowObjective_1 { transition ShowObjectiveMessage(1) { goto MainLoop } } state ShowObjective_2 { transition ShowObjectiveMessage(2) { goto MainLoop } } state ShowObjective_3 { transition ShowObjectiveMessage(3) { goto MainLoop } } state ShowObjective_4 { transition ShowObjectiveMessage(4) { goto MainLoop } } state ShowObjective_5 { transition ShowObjectiveMessage(5) { goto MainLoop } } state ShowObjective_6 { transition ShowObjectiveMessage(6) { goto MainLoop } } state ShowObjective_7 { transition ShowObjectiveMessage(7) { goto MainLoop } } ;// --------------------------------------------------------------- state DelayBeforeStormApproaching { transition HasTimerElapsed(2) { iGameState = 2 goto StormApproaching } } ;// --------------------------------------------------------------- state StormApproaching { transition SetMessageLocale("Mission_Safari2_StartRain_H", "Mission_Safari2_StartRain_D", "facebuttonSattler") { action StartTimer(2,5) goto WaitForRain } } ;// --------------------------------------------------------------- state WaitForRain { transition HasTimerElapsed(2) { action LockCurrentWeather(false) ; Lock rain in action SendWeather(2) ; Rain action LockCurrentWeather(true) ; Lock rain in action StartTimer(2,3) goto DelayRainInfoState } } ;// --------------------------------------------------------------- state DelayRainInfoState { transition HasTimerElapsed(2) { goto RainInfoState } } ;// --------------------------------------------------------------- state RainInfoState { transition SetMessageLocale("Mission_Safari2_RainInfo_H", "Mission_Safari2_RainInfo_D", "facebuttonSattler") { action StartTimer(2, 3) goto NextObjectiveDelay } } ; // --------------------------------------------------------------- state DecideMissionOutcome { transition HasCompletedRequirement("MetAllPhotoRequirements") { action StartTimer(1,3) goto PreVictoryWait } transition iJeepsRemaining < 1 { goto MissionFailed_NoJeepsLeft } transition { goto MissionFailed } } ;// --------------------------------------------------------------- state PreVictoryWait { transition HasTimerElapsed(1) { goto MissionVictory } } ; // Victory message ; // --------------------------------------------------------------- state MissionVictory { transition ShowMissionVictory("facebuttonSattler") { action SetMissionWon() action UnlockMission("RgrAttk2") action SaveOptions() goto SaveOptions } } ;// --------------------------------------------------------------- state SaveOptions { transition NotCurrentGameState("AOptionsSaveState") { goto PostVictoryDisplayAlbum } } ;// --------------------------------------------------------------- state PostVictoryDisplayAlbum { transition ShowPhotoAlbumDialog() { goto MissionComplete } } ; // Failure message ;// --------------------------------------------------------------- state MissionFailed { transition ShowMissionFailure("facebuttonSattler") { goto WaitForClose } } ;// --------------------------------------------------------------- state MissionFailed_NoJeepsLeft { transition ShowMissionFailure("facebuttonHammond", "Mission_Safari1_NoJeepsLeft") { action ShowObjectives() goto WaitForClose } } ;// --------------------------------------------------------------- state WaitForClose { transition IsDisplayingHelpDialog() == false { goto PostVictoryDisplayAlbum } } ; // Will return to front end ;// --------------------------------------------------------------- final state MissionComplete { } ;;// ************************* ;;// DECISION STATES ;;// ************************* ;// --------------------------------------------------------------- state JeepDestroyed { transition { action SubImm(iJeepsRemaining, 1) action SetJeepsRemaining(iJeepsRemaining) goto HasJeepsLeft } } ;// --------------------------------------------------------------- state HasJeepsLeft { ; Take the user from the jeep transition iJeepsRemaining >= 1 { goto DisplayJeepsLeft } ; No jeeps left, end mission transition { goto DecideMissionOutcome } } ;// --------------------------------------------------------------- state WaitThenRestartMiniGame { transition HasTimerElapsed(1) { goto FadeOutNow } } ;// --------------------------------------------------------------- state FadeOutNow { transition FadeOutAndRespawnJeep() { goto MainLoop } } ;// --------------------------------------------------------------- state DisplayJeepsLeft { ; You have blah jeeps left, go and purchase another. transition SetMessageLocale("Mission_Safari1_JeepDestroyed_H", "Mission_Safari1_JeepsLeft", "facebuttonSattler") { action StartTimer(1,5) goto WaitThenRestartMiniGame } } ;// --------------------------------------------------------------- state NoPhotosLeft { transition { action StartTimer(1,2) goto WaitBeforeFail } } ;// --------------------------------------------------------------- state WaitBeforeFail { transition HasTimerElapsed(1) { goto MissionFailed } } ;;// ************************* ;;// TIPS ;;// ************************* ;// --------------------------------------------------------------- state UpdateTips { ; "x Points to go" transition iTip == 1 { iTemp = 100 iTemp2 = GetTotalPhotoScore() action SubVarFromVar(iTemp, iTemp2) action Clip(iTemp, 0, 100) action ShowMiniGameLocaleMessageHint("Hint_Safari_H1", true, iTemp) goto MainLoop } ; "x Jeeps remaining" transition iTip == 2 { action ShowMiniGameLocaleMessageHint("Hint_Safari_H2", true, iJeepsRemaining) goto MainLoop } ; "You can display extra dinosaur information" transition iTip == 3 { action ShowMiniGameLocaleMessageHint("Hint_Safari_H3", true) goto MainLoop } ; "Return to base at any time to end the mission" transition iTip == 4 { ; action ShowMiniGameLocaleMessageHint("Hint_Safari_H4", true) ; Skip this one iTip = 5 action ShowMiniGameLocaleMessageHint("Hint_Safari_H5", true) goto MainLoop } ; "Injuring dino's will reduce your score" transition iTip == 5 { iTip = 6 ;action ShowMiniGameLocaleMessageHint("Hint_Safari_H5", true) action ShowMiniGameLocaleMessageHint("Hint_Safari_H6", true) goto MainLoop } ; "Use the island map to locate more dinosaurs" transition iTip == 6 { action ShowMiniGameLocaleMessageHint("Hint_Safari_H6", true) goto MainLoop } ; "The surrounding environment can effect photo scores" transition iTip == 7 { action ShowMiniGameLocaleMessageHint("Hint_Safari_H7", true) goto MainLoop } transition iTip == 8 { action ShowMiniGameLocaleMessageHint("Hint_Safari_H15", true) goto MainLoop } ; Turn off hints transition iTip == 99 { action ShowMiniGameLocaleMessageHint("Hint_Safari_H4", true) goto MainLoop } } ;// --------------------------------------------------------------- state SwitchTips { action AddImm(iTip, 1) transition iTip > 8 { iTip = 2 goto UpdateTips } transition { goto UpdateTips } } } /* ;======================================================================= state ShowObjective_XXX { transition GetObjectiveStatus(XXX) == true { goto MainLoop } transition ShowObjectiveMessage(XXX) { goto MainLoop } } state CheckObjective_XXX { transition GetObjectiveStatus(XXX) == true { goto CheckObjective_XXX+1 } transition HasCompletedRequirement("TakenPhotoOfDinosaur", "XXX", 1) { action SetObjectiveStatus(XXX, true) goto ObjectiveComplete_XXX } transition { goto CheckObjective_XXX+1 } } state ObjectiveComplete_XXX { transition iObjNum == XXX { iObjNum = XXX+1 action StartTimer(2, 3) goto NextObjectiveDelay } transition { goto CheckObjective_XXX+1 } } ;======================================================================= */