A program reads and writes the world's environment settings, the ones the game's environment dialog shows: the time of day, the sky's color, the fog, the water's height, the ambience.
Environment.<environment>.<property> // read
Environment.<environment>.<property> = value // write
in go: exec
on go {
let t = Environment.Sky.TimeOfDay
Environment.Sky.TimeOfDay = t + 1.0
Environment.Sky.SkyColor = Color(1.0, 0.5, 0.0)
Environment.Ambience.ReverbEffect = ReverbEffect.LongHallway
}
- Exec only. A read runs the Get Environment Property gate and a write the
Set Environment Property gate, so both sit on an exec chain: a read outside
a handler is
WS007. - Names. An environment is named as the dialog labels it, without spaces
(
Environment.Ground), and a property by its name in the game. The editor completes both afterEnvironment.. - Types. Each property has its own type, listed below, and a write must
fit it (
WS003). Colors read and write ascolor. - What the game does with a write. The game converts and clamps a written value as the environment dialog would, and leaves a setting the dialog has locked alone.
- Enum properties. A property backed by a game enum reads as an
int(the member's value) and takes either anintor a member of its enum when written. The members are listed at the end of this page. - Not every property is available. A property that holds an asset
reference, an array or a structure with no Wirescript type is listed with
the reason; reading or writing one is
WS003. - Errors. An environment or property that does not exist is
WS110, andEnvironment.Skywith no property is an error naming the properties it has. - Shadowing. A binding of the program's own named
Environmenthides the builtin.
The list below is generated from the game build the compiler was built
against (just doc-environment), so it changes with the game.
The game's Ambience environment.
| Property | Reads and writes as |
|---|---|
SelectedAmbienceType |
not available: an asset reference (class), which a property gate cannot carry yet |
AmbienceVolume |
float |
ReverbEffect |
int, or a ReverbEffect member |
The game's Ground environment (stored as GroundPlate).
| Property | Reads and writes as |
|---|---|
Variance |
float |
VarianceBrickSize |
float |
GroundColor |
color |
GroundAccentColor |
color |
IsVisible |
bool |
bUseStudTexture |
bool |
The game's Sky environment.
| Property | Reads and writes as |
|---|---|
TimeOfDay |
float |
AnimateTimeOfDay |
bool |
DayLength |
float |
NightLength |
float |
SunAngle |
float |
SunScale |
float |
SunHorizonScaleMultiplier |
float |
SunlightColor |
color |
SkyIntensity |
float |
SkyColor |
color |
MoonPhase |
float |
MoonScale |
float |
MoonlightIntensity |
float |
MoonlightColor |
color |
StarsIntensity |
float |
StarsColor |
color |
AuroraIntensity |
float |
CloudCoverage |
float |
Rain |
float |
Snow |
float |
Dust |
float |
Thunder |
float |
Wind |
float |
WindDirection |
float |
bCloseLightning |
bool |
RainVolume |
float |
CloseThunderVolume |
float |
DistantThunderVolume |
float |
WindVolume |
float |
ClearFogDensity |
float |
CloudyFogDensity |
float |
ClearFogHeightFalloff |
float |
CloudyFogHeightFalloff |
float |
FogColor |
color |
The game's Lighting environment (stored as Studio).
| Property | Reads and writes as |
|---|---|
Scenarios |
not available: an array, which a property gate cannot carry |
The game's Universe environment.
| Property | Reads and writes as |
|---|---|
UniverseRotation |
rotator |
UniverseLightColor |
color |
UniverseLightIntensity |
float |
UniverseAmbientColor |
color |
UniverseAmbientIntensity |
float |
UniverseGravityScale |
float |
bUniverseFloorEnabled |
bool |
NebulaTexture |
not available: an asset reference (object), which a property gate cannot carry yet |
NebulaColor |
color |
NebulaRedBlueSwap |
float |
NebulaSaturation |
float |
NebulaPower |
float |
NebulaBrightness |
float |
NearStarsTexture |
not available: an asset reference (object), which a property gate cannot carry yet |
NearStarsPower |
float |
NearStarsBrightness |
float |
FarStarsTexture |
not available: an asset reference (object), which a property gate cannot carry yet |
FarStarsPower |
float |
FarStarsBrightness |
float |
The game's Water environment.
| Property | Reads and writes as |
|---|---|
WaterHeight |
float |
WaterAbsorption |
vector |
WaterScattering |
vector |
WaterFogIntensity |
float |
WaterFogAmbientColor |
color |
WaterFogAmbientScale |
float |
WaterFogScatteringColor |
color |
WaterFogScatteringScale |
float |
Default (0), SmallRoom (1), LongHallway (2), ExteriorEcho (3)