Class NwArea
An environment/game level.
public sealed class NwArea : NwObject, IEquatable<NwObject>
- Inheritance
-
NwArea
- Implements
- Inherited Members
- Extension Methods
Properties
- AmbientDayTrack
Sets the daytime ambient track for this area.
See "ambientsound.2da" for track numbers.
- AmbientDayVolume
Sets the daytime ambient track volume for this area.
- AmbientNightTrack
Sets the night ambient track for this area.
See "ambientsound.2da" for track numbers.
- AmbientNightVolume
Sets the night ambient track volume for this area.
- AreaFlags
Gets or sets area terrain metadata flags.
- DayNightMode
Gets or sets the day/night mode to use for this area.
- FogClipDistance
Gets or sets the fog clip distance in the area.
- IsAboveGround
Gets or sets whether this area is considered above ground and not under ground.
- IsBattleMusicPlaying
Gets a value indicating whether battle music is currently playing in the area.
- IsExterior
Gets or sets whether this area is considered an as exterior, and not an interior.
- IsInterior
Gets or sets whether this area is considered an as interior, and not an exterior.
- IsMusicPlaying
Gets a value indicating whether ambient music is currently playing in the area.
- IsNatural
Gets or sets whether this area is considered natural and non-urban.
- IsUnderGround
Gets or sets whether this area is considered under ground and not above ground.
- IsUrban
Gets or sets whether this area is considered urban and not natural.
- IsValid
Gets a value indicating whether this is a valid object.
- LastEntered
Gets the last object that entered this area.
- LastLeft
Gets the last object that left this area.
- LightningChance
Gets or sets the percentage value (0-100) that lightning may occur.
- ListenModifier
Gets or sets the listen modifier for this area.
- LoadScreen
Gets or sets the load screen for this area.
- MoonAmbientColor
Gets or sets the area ambient color during night time.
- MoonDiffuseColor
Gets or sets the area diffuse color during night time.
- MoonFogAmount
Gets or sets the fog density during night time.
- MoonFogColor
Gets or sets the area fog color during night time.
- MoonShadows
Gets or sets whether shadows are cast during night time.
- MusicBackgroundDayTrack
Gets or sets the daytime background track index for this area.
See "Resources > Sounds and Music > Music" in the toolset for track numbers.
- MusicBackgroundNightTrack
Gets or sets the nighttime background track index for this area.
Refer to Resources > Sounds and Music > Music in the toolset for track numbers.
- MusicBattleTrack
Gets or sets the combat track index for this area.
Refer to Resources > Sounds and Music > Music in the toolset for track numbers.
- Objects
Gets all Objects currently in this area.
- PVPSetting
Gets or sets the PvP setting for this area.
- PlayerCount
Gets the number of players in this area.
- RainChance
Gets or sets the percentage value (0-100) that rain may occur.
- RestingAllowed
Gets or sets whether resting is allowed in this area.
- ShadowOpacity
Gets or sets the shadow opacity for this area (0-100).
- Size
Gets the size of this area.
The number of tiles that the area is wide/high.
- SkyBox
Gets or sets the current skybox for this area.
- SnowChance
Gets or sets the percentage value (0-100) that snow may occur.
- SpotModifier
Gets or sets the spot modifier for this area.
- SunAmbientColor
Gets or sets the area ambient color during day time.
- SunDiffuseColor
Gets or sets the area diffuse color during day time.
- SunFogAmount
Gets or sets the fog density during day time.
- SunFogColor
Gets or sets the area fog color during day time.
- SunShadows
Gets or sets whether shadows are cast during day time.
- TileInfo
Gets an array containing all tile data/structures for the area.
- Tileset
Gets the tileset (.set) resource name used for this area.
- Weather
Gets or sets the current weather conditions for this area.
- WindPower
Gets or sets the wind power for this area.
Set to 0, 1 or 2.
Methods
- Clone()
Creates a copy of this area, including everything inside of it (except players).
- Create(string, string, string)
Creates a new area from the specified resource reference.
- Deserialize(byte[], byte[], string, string)
Creates an area from the specified serialized area data.
- Deserialize(string, byte[], byte[], string, string)
Creates an area from the specified serialized area data.
- Destroy()
Destroys this area and anything within it.
- FindObjectsOfTypeInArea<T>()
Locates all objects of the specified type.
- GetAreaLightColor(AreaLightColor)
Gets a light color in this area.
- GetAreaLightDirection(AreaLightDirection)
Gets the light direction for the specified light type.
- GetLocalizedName(PlayerLanguage, Gender)
Gets the localized string for this area in the specified language.
- GetTileInfo(int, int)
Gets the tile info at the specified position in the area.
- GetTileInfoByIndex(int)
Gets the specified tile info by its index.
- PeekUUID()
Attempts to get the UUID of this object, if assigned.
- PlayAmbient()
Begins playback of ambient sounds in this area.
- PlayBackgroundMusic()
Begins playback of background music in this area.
- PlayBattleMusic()
Begins playback of battle music for this area.
- RecomputeStaticLighting()
Notifies all clients in this area to recompute static lighting.
This can be used to update the lighting after changing any tile lights or if placeables with lights have been added/deleted.
- ReloadAreaBorder()
Notifies all clients in this area to reload the inaccesible border tiles.
This can be used to update the edge tiles after changing a tile with SetTile().
- ReloadAreaGrass()
Notifies all clients in this area to recalculate grass.
This can be used to update the grass of an area after changing a tile with SetTile() that will have or used to have grass.
- RemoveAreaGrassOverride(SurfaceMaterialTableEntry)
Remove a grass override from this area that was set with SetAreaGrassOverride(SurfaceMaterialTableEntry, string, float, float, Color, Color).
- SetAreaDefaultGrassDisabled(bool)
Set if the default grass of this area should be disabled.
- SetAreaGrassOverride(SurfaceMaterialTableEntry, string, float, float, Color, Color)
Sets a grass override for a specific material in this area.
- SetAreaLightColor(AreaLightColor, int, TimeSpan)
Sets a light color in this area.
- SetAreaLightDirection(AreaLightDirection, Vector3, TimeSpan)
Sets the light direction for the specified light type.
- SetAreaTileBorderDisabled(bool)
Set to true to disable the inaccessible tile border in this area. Requires clients to reload the area to take effect.
- SetAreaWind(Vector3, float, float, float)
Sets the detailed wind data for this area.
- SetFogAmount(FogType, int)
Sets the fog amount for this area, at the specified time of day.
- SetFogColor(FogType, FogColor, TimeSpan)
Sets the fog color for this area, at the specified time of day.
- SetLocalizedName(string, PlayerLanguage, Gender)
Sets the localized string for this area in the specified language.
- SetTiles(List<TileData>, SettleFlags, string)
Bulk change a set of tiles in this area.
- StopAmbient()
Stops playback of any ambient sounds in this area.
- StopBackgroundMusic()
Stops playback of any running background music in this area.
- StopBattleMusic()
Stops playback of any running battle music in this area.
Events
- OnEnter
Called when a new NwGameObject has entered the NwArea.
- OnExit
Called when an NwGameObject leaves the NwArea.
- OnHeartbeat
Called at a regular interval (approx. 6 seconds).