Posted by noop on Thu 14th Mar 19:10
download | new post | report as spam

  1. ################################################################
  2. # State script for game
  3. #
  4. # This basically defines the different parts of the game,
  5. # and what has to be turned on or off as we move between
  6. # those parts.
  7. #
  8. # Note: if you run with the -demo flag, you'll start up
  9. # with the Demo state. Otherwise, you can run with
  10. # -state:<stateName> to get a specific state.
  11. #
  12.  
  13.  
  14.  
  15. #################################################################################
  16. # Main
  17. #################################################################################
  18.  
  19. # default entry state.
  20. state Main -id 0
  21.    # description "Main"
  22. end
  23.  
  24.  
  25. # This state happens after the update-from-server
  26. # mode runs, prefer this to Main for GlassBox apps.
  27.  
  28. # Actually, leave this to code, so both GB and SC can work.
  29. #<
  30.     state PostUpdate -id 0x0a02a44e
  31.        # Jump straight to game.
  32.        # gotoState SimCity
  33.     end
  34. #>
  35.  
  36. state SimCity
  37.    mode SimCity
  38. end
  39.  
  40. state Launcher
  41.    entry
  42.       mode launch
  43.    exit
  44. end
  45.  
  46.  
  47. #################################################################################
  48. # Demo States
  49. #################################################################################
  50.  
  51. # Run game with -demo to get this.
  52.  
  53. state Demo
  54.     description "SimCity Demo"
  55.  
  56.     cheat "prop ecoNetShowActivity false"
  57.     cheat "prop ecoNetShowDeltaUploadLag false"
  58.     cheat "prop ecoNetShowBrokenBoxMessage false"
  59.     cheat "prop PerfWarningStartMode 2"
  60. end
  61.  
  62.  
  63.  
  64. #################################################################################
  65. # Preload
  66. #################################################################################
  67.  
  68. # Run game with -preload to get this.
  69. state Preload
  70.  
  71. end
  72.  
  73.  
  74.  
  75.  
  76. #################################################################################
  77. # Main game
  78. #################################################################################
  79.  
  80.  
  81.  
  82.  
  83.  
  84. ############################################################
  85. # Development
  86. #
  87.  
  88. state EffectsViewer
  89.    mode EffectsViewer
  90. end
  91.  
  92. state ModelViewer
  93.    mode ModelViewer
  94. end
  95.  
  96. state SniffTest
  97.    cheat "test Tests/SniffTest"
  98. end
  99.  
  100.  
  101.  
  102.  
  103.  
  104. ################################################################################
  105. # Docs
  106. ################################################################################
  107.  
  108. #<
  109.  
  110.    Basic definition of a state:
  111.  
  112.       state <name>
  113.          ...
  114.       end
  115.  
  116.    State commands:
  117.  
  118.       description <string>
  119.          Description of this state.
  120.  
  121.       entry
  122.          Commands after this will be run on entry to this state
  123.       exit
  124.          Commands after this will be run on exit from this state
  125.  
  126.  
  127.       gotoState <state>
  128.          Switch to the given state.
  129.  
  130.       mode
  131.          Switch to the given game mode. (See the 'mode -list' cheat for a list of
  132.          available modes.)
  133.  
  134.       cheat <command:string>
  135.          Run the given cheat. E.g., "cheat resource -load .vp6".
  136.  
  137.       message -id <uint32> [-data1|2|3|4 <uint32>] [-string <string>]
  138.          Send the given message
  139.  
  140.       effect <name:string>
  141.          Run the given effect by name.
  142.       killEffect <name:string>
  143.          Kill the given effect(s). Wildcards may be used.
  144.       effectFlag <flag:int> <value:bool>
  145.          Set the given effect app flag.
  146.  
  147.       boolProp  <name:string> <bool>
  148.       intProp   <name:string> <int>
  149.       floatProp <name:string> <float>
  150.          Set the indicated property.
  151.  
  152.       loadResource <name:string>
  153.       loadResource <type:uint32> <group:uint32> <instance:uint32>
  154.  
  155.       lighting <string>
  156.          Switch to given lighting state
  157.       camera <string>
  158.          Switch to given camera controller
  159.  
  160.  
  161.    Other Commands:
  162.  
  163.       transition <fromState:string> <toState:string>
  164.          [state commands ...]
  165.       end
  166.  
  167.          The given commands are only run when transitioning
  168.          from the first given state to the second.
  169.  
  170.  
  171.       chain <state:string>
  172.          Set the default next state to the given state, rather than
  173.          the default, which is the next state declared in the file.
  174.  
  175.       endChain
  176.          Mark the end of the set of state transitions.
  177.  
  178.  
  179.    Notes:
  180.  
  181.       See the state cheat for app-side state control.
  182.  
  183.       If the 'tabKeyControlsStates' property is set, the tab key will
  184.       advance to the next state, and shift-tab will pop back to the
  185.       previous state. This can be useful for demos.
  186.  
  187.       The order of states in this file defines a default state ordering,
  188.       for use with "state -next", SwitchToNextState(), or the tab key. See
  189.       the chain and endChain commands above to change this.
  190.  
  191. #>

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily
.
Syntax highlighting:

To highlight particular lines, prefix each line with @@
   Remember me