Virtual variables (constants are written in CAPITAL LETTERS):
Virtual Variables
Moderator: Plugin Moderators
- Lobby
- Developer
- Posts: 3713
- Joined: 26 Oct 2008, 12:34
- Plugins: Showcase Store
- Version: Beta
-
Platform
Virtual Variables
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):
Virtual variables (constants are written in CAPITAL LETTERS):
roadAutoJoin
winter
weatherTime
weatherFog
weatherLocked
WEATHER_NORMAL
WEATHER_SUNNY
WEATHER_RAIN
WEATHER_LIGHTNING
day
cityRotation
buildingCount
roadCount
wireCount
pipeCount
disaster
music
demand_XY
demand_XY_offset
gameSpeed
gameMode
Last edited by Bearbear76 on 06 Oct 2019, 10:37, edited 2 times in total.
- CommanderABab
- AB
- Posts: 11185
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Virtual Variables
Which ones of those are writeable?
- JustAnyone
- Developer
- Posts: 3534
- Joined: 23 Jul 2017, 12:45
- Location: Easter Island
- Plugins: Showcase Store
-
Platform
Re: Virtual Variables
Since version 471 a new variable was added called "gameSpeed"
It sets the speed in your city.
0 - pause
1 - slow
2 - normal
3 - fast
4 - ultra fast
It sets the speed in your city.
0 - pause
1 - slow
2 - normal
3 - fast
4 - ultra fast
Re: Virtual Variables
What is the name of virtual variable for setting music in the recent update 1.478?
Can anyone help elaborate?
Can anyone help elaborate?
Re: Virtual Variables
@Lobby
It may be too late to ask this,
but what does virtual variable involving "music" do in the game?
Also I don't mean to ask too much but how does a json code is used involving a virtual variable using music?
Thank you.
It may be too late to ask this,
but what does virtual variable involving "music" do in the game?
Also I don't mean to ask too much but how does a json code is used involving a virtual variable using music?
Thank you.
- Lobby
- Developer
- Posts: 3713
- Joined: 26 Oct 2008, 12:34
- Plugins: Showcase Store
- Version: Beta
-
Platform
Re: Virtual Variables
You can use the virtual variable "music" to get/set the current setting for music. E.g. if you want to turn background music off you could execute:
By the way in recent versions you could write instead:
It means exactly the same thing.
Code: Select all
"actions":[{"type":"set","id":"music","code":"0"}]
Code: Select all
"actions":["music=0"]
Re: Virtual Variables
Thank you Lobby for explaining.
I thought the music action is supposed to allow a plugin to pick a music from a library, but I guess I was wrong about that :/
Now I understand
I thought the music action is supposed to allow a plugin to pick a music from a library, but I guess I was wrong about that :/
Now I understand
Re: Virtual Variables
How do I enter when changing demand?