Virtual variables are variables that are used by the game internally and are exposed for use in fun. See here to learn more about variables in general. Unlike user defined variables virtual variables don't have to be read- and writeable at the same time. It's not defined what happens if you try to read a non readable virtual variable. If you try to set a non-writeable virtual variable nothing will happen.
Virtual variables (constants are written in CAPITAL LETTERS):
Show
roadAutoJoin
0 or 1
Determines whether placed road connects automatically to neighboring roads (game wide). You should set it back to it's original value after using it.
Show
winter
0, 1 or 2
Can be used to control winter (game wide).
0 = auto
1 = on
2 = off
Show
weatherTime
integer
Can be used to control weather. See here for more information.
Show
weatherFog
0 or 1
Can be used to enable (1) or disable fog (0).
Show
weatherLocked
0 or 1
Can be use to lock (1) or unlock (0) weather timer.
Show
WEATHER_NORMAL
integer constant 0
New cities will start with this weather time.
Show
WEATHER_SUNNY
integer constant 290373
This weather time will lead to sunny weather.
Show
WEATHER_RAIN
integer constant 849711
This weather time will lead to rainy weather.
Show
WEATHER_LIGHTNING
integer constant 622697
This weather time will lead to lightning.
Show
day
integer
Absolute day of the current date.
Show
cityRotation
0, 1, 2, 3
Rotation of the city. Default rotation is 0. Higher numbers mean 90 degree clock-wise rotation of the map.
Show
buildingCount
integer, only readable
Number of buildings in the city.
Show
roadCount
integer, only readable
Number of roads in the city.
Show
wireCount
integer, only readable
Number of wires in the city.
Show
pipeCount
integer, only readable
Number of pipes in the city.
Show
disaster
0 or 1
Is 1 if a disaster is currently active.
Show
music
0 or 1
Current setting for background music (on=1 or off=0).
Show
demand_XY
integer, only readable
Demand for res/com/ind for specific level.
Possible values for X: res, com, ind
Possible values for Y: 0, 1, 2
For example to read demand for level II commerical you would use variable demand_com1. demand_XY contains the offset that is given by demand_XY_offset.
Show
demand_XY_offset
integer
Modifyable offset for demand. For XY see explanation of demand_XY.
Show
gameSpeed
Sets the speed in your city.
0 - pause
1 - slow
2 - normal
3 - fast
4 - ultra fast
Show
gameMode
Returns a numerical representation of the current game mode
0 - sandbox
1 - easy
2 - medium
3 - hard
4 - free
Last edited by Bearbear76 on 06 Oct 2019, 08:37, edited 2 times in total.
but however isnt this would make people able to make a plugin themselves that do weather manipulation and game speed manipulation(ultra fast and slow speed)? as in the mobile platform it needs diamond (idk about permium versions such as desktop and iOS)