Anvil
Anvil.API.NwArea Class Reference

An environment/game level. More...

+ Inheritance diagram for Anvil.API.NwArea:
+ Collaboration diagram for Anvil.API.NwArea:

Public Member Functions

void ApplyEnvironmentPreset (EnvironmentPreset preset)
 
NwAreaClone ()
 Creates a copy of this area, including everything inside of it (except players). More...
 
EnvironmentPreset CreateEnvironmentPreset ()
 
AreaDestroyResult Destroy ()
 Destroys this area and anything within it. More...
 
IEnumerable< T > FindObjectsOfTypeInArea< T > ()
 Locates all objects of the specified type. More...
 
int GetAreaLightColor (AreaLightColor colorType)
 Gets a light color in this area. More...
 
Vector3 GetAreaLightDirection (AreaLightDirection lightType)
 Gets the light direction for the specified light type. More...
 
TileInfo GetTileInfo (int tileX, int tileY)
 Gets the tile info at the specified position in the area. More...
 
TileInfo GetTileInfoByIndex (int index)
 Gets the specified tile info by its index. More...
 
override? Guid PeekUUID ()
 Attempts to get the UUID of this object, if assigned. More...
 
void PlayAmbient ()
 Begins playback of ambient sounds in this area. More...
 
void PlayBackgroundMusic ()
 Begins playback of background music in this area. More...
 
void PlayBattleMusic ()
 Begins playback of battle music for this area. More...
 
void 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. More...
 
void 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(). More...
 
void 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. More...
 
void RemoveAreaGrassOverride (SurfaceMaterialTableEntry material)
 Remove a grass override from this area that was set with SetAreaGrassOverride. More...
 
unsafe? byte[] SerializeARE (string? areaName=null, string? resRef=null)
 
byte?[] SerializeGIT (ObjectTypes objectFilter=ObjectTypes.All, ICollection< NwGameObject >? exclusionList=null, bool exportVarTable=true, bool exportUUID=true, string? resRef=null)
 
void SetAreaDefaultGrassDisabled (bool disabled)
 Set if the default grass of this area should be disabled. More...
 
void SetAreaGrassOverride (SurfaceMaterialTableEntry material, string texture, float density, float height, Color ambientColor, Color diffuseColor)
 Sets a grass override for a specific material in this area. More...
 
void SetAreaLightColor (AreaLightColor colorType, int color, TimeSpan fadeTime=default)
 Sets a light color in this area. More...
 
void SetAreaLightDirection (AreaLightDirection lightType, Vector3 direction, TimeSpan fadeTime=default)
 Sets the light direction for the specified light type. More...
 
void SetAreaTileBorderDisabled (bool disabled)
 Set to true to disable the inaccessible tile border in this area. Requires clients to reload the area to take effect. More...
 
void SetAreaWind (Vector3 direction, float magnitude, float yaw, float pitch)
 Sets the detailed wind data for this area. More...
 
void SetFogAmount (FogType fogType, int fogAmount)
 Sets the fog amount for this area, at the specified time of day. More...
 
void SetFogColor (FogType fogType, FogColor fogColor, TimeSpan fadeTime=default)
 Sets the fog color for this area, at the specified time of day. More...
 
void SetTiles (List< TileData > data, SettleFlags flags=SettleFlags.RecomputeLighting, string tileSet="")
 Bulk change a set of tiles in this area. More...
 
void StopAmbient ()
 Stops playback of any ambient sounds in this area. More...
 
void StopBackgroundMusic ()
 Stops playback of any running background music in this area. More...
 
void StopBattleMusic ()
 Stops playback of any running battle music in this area. More...
 
- Public Member Functions inherited from Anvil.API.NwObject
async Task AddActionToQueue (System.Action action)
 Inserts the function call aCommand into the Action Queue, ensuring the calling object will perform actions in a particular order. More...
 
async Task ClearActionQueue (bool clearCombatState=false)
 Clear all the object's actions. More...
 
void ClearEventSubscriptions ()
 Clears any event subscriptions associated with this object. More...
 
bool Equals (NwObject? other)
 
override bool Equals (object? obj)
 
void ForceRefreshUUID ()
 
string GetEventScript (EventScriptType eventType)
 Gets the script assigned to run for the specified object event. More...
 
override int GetHashCode ()
 
GetObjectVariable< T > (string name)
 Gets the specified object variable for this object. More...
 
bool IsEventLocked (EventScriptType eventType)
 Gets a value indicating whether the event script can be modified for the specified event. More...
 
Json SerializeToJson (bool saveObjectState)
 Serializes this game object to a json representation More...
 
void SetEventScript (EventScriptType eventType, string? script)
 Sets the script to be run on the specified object event. More...
 
async Task SpeakString (string message, TalkVolume talkVolume=TalkVolume.Talk, bool queueAsAction=false)
 Instructs this object to speak. More...
 
override string ToString ()
 The ID of this object as a string. Can be used in StringExtensions.ParseObject while the object is alive.
This cannot be used across server restarts. See UUID for a persistent unique identifier. More...
 
bool TryGetUUID (out Guid uid)
 Attempts to get the UUID for this object, assigning a new ID if it does not already exist.
More...
 
async Task WaitForObjectContext ()
 Notifies then awaits for this object to become the current active object for the purpose of implicitly assigned values (e.g. effect creators).
If the current active object is already this object, then the code runs immediately. Otherwise, it will be run with all other closures.
This is the async equivalent of AssignCommand in NWScript. More...
 

Static Public Member Functions

static ? NwArea Create (string resRef, string newTag="", string newName="")
 Creates a new area from the specified resource reference. More...
 
static ? NwArea Deserialize (byte[] serializedARE, byte[] serializedGIT, string newTag="", string newName="")
 
static ? NwArea Deserialize (string resRef, byte[] serializedARE, byte[] serializedGIT, string newTag="", string newName="")
 Creates an area from the specified serialized area data. More...
 
static implicit operator CNWSArea? (NwArea? area)
 
- Static Public Member Functions inherited from Anvil.API.NwObject
static IEnumerable< T > FindObjectsOfType< T > ()
 Locates all objects of the specified type. More...
 
static IEnumerable< NwObjectFindObjectsWithTag (params string[] tags)
 Locates all objects of that have the specified tag. More...
 
static IEnumerable< T > FindObjectsWithTag< T > (params string[] tags)
 Locates all objects of the specified type that have the specified tag. More...
 
static implicit operator uint (NwObject? gameObject)
 
static bool operator!= (NwObject? left, NwObject? right)
 
static bool operator== (NwObject? left, NwObject? right)
 

Properties

int AmbientDayTrack [set]
 Sets the daytime ambient track for this area.
See "ambientsound.2da" for track numbers. More...
 
int AmbientDayVolume [set]
 Sets the daytime ambient track volume for this area. More...
 
int AmbientNightTrack [set]
 Sets the night ambient track for this area.
See "ambientsound.2da" for track numbers. More...
 
int AmbientNightVolume [set]
 Sets the night ambient track volume for this area. More...
 
AreaFlags AreaFlags [get, set]
 Gets or sets area terrain metadata flags. More...
 
DayNightMode?? DayNightMode [get, set]
 Gets or sets the day/night mode to use for this area. More...
 
float FogClipDistance [get, set]
 Gets or sets the fog clip distance in the area. More...
 
bool IsAboveGround [get, set]
 Gets or sets whether this area is considered above ground and not under ground. More...
 
bool IsBattleMusicPlaying [get]
 Gets a value indicating whether battle music is currently playing in the area. More...
 
bool IsExterior [get, set]
 Gets or sets whether this area is considered an as exterior, and not an interior. More...
 
bool IsInterior [get, set]
 Gets or sets whether this area is considered an as interior, and not an exterior. More...
 
bool IsMusicPlaying [get]
 Gets a value indicating whether ambient music is currently playing in the area. More...
 
bool IsNatural [get, set]
 Gets or sets whether this area is considered natural and non-urban. More...
 
bool IsUnderGround [get, set]
 Gets or sets whether this area is considered under ground and not above ground. More...
 
bool IsUrban [get, set]
 Gets or sets whether this area is considered urban and not natural. More...
 
NwGameObjectLastEntered [get]
 Gets the last object that entered this area. More...
 
NwGameObjectLastLeft [get]
 Gets the last object that left this area. More...
 
int LightningChance [get, set]
 Gets or sets the percentage value (0-100) that lightning may occur. More...
 
int ListenModifier [get, set]
 Gets or sets the listen modifier for this area. More...
 
LoadScreenTableEntry LoadScreen [get, set]
 Gets or sets the load screen for this area. More...
 
Color MoonAmbientColor [get, set]
 Gets or sets the area ambient color during night time. More...
 
Color MoonDiffuseColor [get, set]
 Gets or sets the area diffuse color during night time. More...
 
int MoonFogAmount [get, set]
 Gets or sets the fog density during night time. More...
 
Color MoonFogColor [get, set]
 Gets or sets the area fog color during night time. More...
 
bool MoonShadows [get, set]
 Gets or sets whether shadows are cast during night time. More...
 
int MusicBackgroundDayTrack [get, set]
 Gets or sets the daytime background track index for this area.
See "Resources > Sounds and Music > Music" in the toolset for track numbers. More...
 
int MusicBackgroundNightTrack [get, set]
 Gets or sets the nighttime background track index for this area.
Refer to Resources > Sounds and Music > Music in the toolset for track numbers. More...
 
int MusicBattleTrack [get, set]
 Gets or sets the combat track index for this area.
Refer to Resources > Sounds and Music > Music in the toolset for track numbers. More...
 
IEnumerable< NwGameObjectObjects [get]
 Gets all Objects currently in this area. More...
 
Action< AreaEvents.OnEnterOnEnter
 
Action< AreaEvents.OnExitOnExit
 
Action< AreaEvents.OnHeartbeatOnHeartbeat
 
Action< AreaEvents.OnUserDefinedOnUserDefined
 
int PlayerCount [get]
 Gets the number of players in this area. More...
 
PVPSetting PVPSetting [get, set]
 Gets or sets the PvP setting for this area. More...
 
int RainChance [get, set]
 Gets or sets the percentage value (0-100) that rain may occur. More...
 
bool RestingAllowed [get, set]
 Gets or sets whether resting is allowed in this area. More...
 
byte ShadowOpacity [get, set]
 Gets or sets the shadow opacity for this area (0-100). More...
 
Vector2Int Size [get]
 Gets the size of this area.

Returns
The number of tiles that the area is wide/high.
More...
 
Skybox SkyBox [get, set]
 Gets or sets the current skybox for this area. More...
 
int SnowChance [get, set]
 Gets or sets the percentage value (0-100) that snow may occur. More...
 
int SpotModifier [get, set]
 Gets or sets the spot modifier for this area. More...
 
Color SunAmbientColor [get, set]
 Gets or sets the area ambient color during day time. More...
 
Color SunDiffuseColor [get, set]
 Gets or sets the area diffuse color during day time. More...
 
int SunFogAmount [get, set]
 Gets or sets the fog density during day time. More...
 
Color SunFogColor [get, set]
 Gets or sets the area fog color during day time. More...
 
bool SunShadows [get, set]
 Gets or sets whether shadows are cast during day time. More...
 
IReadOnlyList< TileInfoTileInfo [get]
 Gets an array containing all tile data/structures for the area. More...
 
string Tileset [get]
 Gets the tileset (.set) resource name used for this area. More...
 
WeatherType Weather [get, set]
 Gets or sets the current weather conditions for this area. More...
 
byte WindPower [get, set]
 Gets or sets the wind power for this area.
Set to 0, 1 or 2. More...
 
- Properties inherited from Anvil.API.NwObject
string Description [get, set]
 Gets or sets the description for this object. More...
 
static EventService EventService = null! [get]
 
bool HasUUID [get]
 Gets a value indicating whether this object has an assigned UUID. More...
 
bool IsValid [get]
 Gets a value indicating whether this is a valid object. More...
 
IEnumerable< ObjectVariableLocalVariables [get]
 Gets all local variables assigned on this object. More...
 
string Name [get, set]
 Gets or sets the name of this object. More...
 
static Lazy< ObjectVisibilityService > ObjectVisibilityService = null! [get]
 
string OriginalDescription [get]
 Gets the original description for this object as defined in the toolset. More...
 
static ResourceManager ResourceManager = null! [get]
 
string ResRef [get]
 Gets the resource reference used to create this object. More...
 
string Tag [get, set]
 Gets or sets the tag for this object. More...
 
Guid UUID [get]
 Gets the globally unique identifier for this object. More...
 
static VirtualMachine VirtualMachine = null! [get]
 

Additional Inherited Members

- Public Attributes inherited from Anvil.API.NwObject
readonly uint ObjectId
 The ID of this object instance. Not persistent, changes after every spawn of the object.
See UUID for a persistent unique ID for objects. More...
 
- Protected Member Functions inherited from Anvil.API.NwObject
 NwObject (ICGameObject gameObject)
 
void AssertObjectValid ()
 

Detailed Description

An environment/game level.

Member Function Documentation

◆ Clone()

NwArea? Anvil.API.NwArea.Clone ( )
inline

Creates a copy of this area, including everything inside of it (except players).

Returns
The new cloned area instance.

◆ Create()

static ? NwArea Anvil.API.NwArea.Create ( string  resRef,
string  newTag = "",
string  newName = "" 
)
inlinestatic

Creates a new area from the specified resource reference.

Parameters
resRefThe area resource to create this area from.
newTagA new tag for this area. Defaults to the tag set in the toolset.
newNameA new name for this area. Defaults to the name set in the toolset.
Returns
The created area.

◆ Deserialize()

static ? NwArea Anvil.API.NwArea.Deserialize ( string  resRef,
byte[]  serializedARE,
byte[]  serializedGIT,
string  newTag = "",
string  newName = "" 
)
inlinestatic

Creates an area from the specified serialized area data.

Parameters
resRefThe base resref name to use (e.g. area001). Overrides previous areas with the same resref (excl. development folder areas).
serializedAREThe serialized static area information (.are).
serializedGITThe serialized dynamic area information (.git).
newTagA new tag for this area. Defaults to the tag set in the toolset.
newNameA new name for this area. Defaults to the name set in the toolset.
Returns
The created area.

◆ Destroy()

AreaDestroyResult Anvil.API.NwArea.Destroy ( )
inline

Destroys this area and anything within it.

Returns
The result of this destroy action.

◆ FindObjectsOfTypeInArea< T >()

IEnumerable<T> Anvil.API.NwArea.FindObjectsOfTypeInArea< T > ( )
inline

Locates all objects of the specified type.

Template Parameters
TThe type of objects to search.
Returns
An enumeration containing all objects of the specified type.
Type Constraints
T :NwObject 

◆ GetAreaLightColor()

int Anvil.API.NwArea.GetAreaLightColor ( AreaLightColor  colorType)
inline

Gets a light color in this area.

Parameters
colorTypeThe color type to get.

◆ GetAreaLightDirection()

Vector3 Anvil.API.NwArea.GetAreaLightDirection ( AreaLightDirection  lightType)
inline

Gets the light direction for the specified light type.

Parameters
lightTypeThe type of light to get the direction from.
Returns
A Vector3 representing the light direction.

◆ GetTileInfo()

TileInfo Anvil.API.NwArea.GetTileInfo ( int  tileX,
int  tileY 
)
inline

Gets the tile info at the specified position in the area.

Parameters
tileXThe x coordinate of the tile to get info.
tileYThe y coordinate of the tile to get info.
Returns
A structure containing the associated tile info.
Exceptions
ArgumentOutOfRangeExceptionThrown if the tile coordinates are larger than the area size.

◆ GetTileInfoByIndex()

TileInfo Anvil.API.NwArea.GetTileInfoByIndex ( int  index)
inline

Gets the specified tile info by its index.

For example, a 3x3 area has the following tile indexes:
6 7 8
3 4 5
0 1 2

Parameters
indexThe tile index to query.
Returns
A structure containing the associated tile info.

◆ PeekUUID()

override? Guid Anvil.API.NwArea.PeekUUID ( )
inlinevirtual

Attempts to get the UUID of this object, if assigned.

Returns
The UUID if assigned, otherwise no value.

Implements Anvil.API.NwObject.

◆ PlayAmbient()

void Anvil.API.NwArea.PlayAmbient ( )
inline

Begins playback of ambient sounds in this area.

◆ PlayBackgroundMusic()

void Anvil.API.NwArea.PlayBackgroundMusic ( )
inline

Begins playback of background music in this area.

◆ PlayBattleMusic()

void Anvil.API.NwArea.PlayBattleMusic ( )
inline

Begins playback of battle music for this area.

◆ RecomputeStaticLighting()

void Anvil.API.NwArea.RecomputeStaticLighting ( )
inline

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()

void Anvil.API.NwArea.ReloadAreaBorder ( )
inline

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()

void Anvil.API.NwArea.ReloadAreaGrass ( )
inline

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()

void Anvil.API.NwArea.RemoveAreaGrassOverride ( SurfaceMaterialTableEntry  material)
inline

Remove a grass override from this area that was set with SetAreaGrassOverride.

Parameters
materialThe modified material to reset.

◆ SetAreaDefaultGrassDisabled()

void Anvil.API.NwArea.SetAreaDefaultGrassDisabled ( bool  disabled)
inline

Set if the default grass of this area should be disabled.

Parameters
disabledThe new disabled state.

◆ SetAreaGrassOverride()

void Anvil.API.NwArea.SetAreaGrassOverride ( SurfaceMaterialTableEntry  material,
string  texture,
float  density,
float  height,
Color  ambientColor,
Color  diffuseColor 
)
inline

Sets a grass override for a specific material in this area.

Parameters
materialThe material to override.
textureThe replacement grass texture
densityThe density of the grass.
heightThe height of the grass.
ambientColorThe ambient color of the grass. Alpha channel is ignored.
diffuseColorThe diffuse color of the grass. Alpha channel is ignored.

◆ SetAreaLightColor()

void Anvil.API.NwArea.SetAreaLightColor ( AreaLightColor  colorType,
int  color,
TimeSpan  fadeTime = default 
)
inline

Sets a light color in this area.

Parameters
colorTypeThe type of color to set.
colorThe new color to set.
fadeTimeThe time to fade the new color.

◆ SetAreaLightDirection()

void Anvil.API.NwArea.SetAreaLightDirection ( AreaLightDirection  lightType,
Vector3  direction,
TimeSpan  fadeTime = default 
)
inline

Sets the light direction for the specified light type.

Parameters
lightTypeThe type of light to get the direction from.
directionThe new direction for the light.
fadeTimeThe time to fade in the new light direction.
Returns
A Vector3 representing the light direction.

◆ SetAreaTileBorderDisabled()

void Anvil.API.NwArea.SetAreaTileBorderDisabled ( bool  disabled)
inline

Set to true to disable the inaccessible tile border in this area. Requires clients to reload the area to take effect.

Parameters
disabledTrue to disable tile borders, false to enable.

◆ SetAreaWind()

void Anvil.API.NwArea.SetAreaWind ( Vector3  direction,
float  magnitude,
float  yaw,
float  pitch 
)
inline

Sets the detailed wind data for this area.

The predefined values in the toolset are:
NONE: direction=(1.0, 1.0, 0.0), magnitude=0.0, yaw=0.0, pitch=0.0
LIGHT: direction=(1.0, 1.0, 0.0), magnitude=1.0, yaw=100.0, pitch=3.0
HEAVY: direction=(1.0, 1.0, 0.0), magnitude=2.0, yaw=150.0, pitch=5.0

Parameters
directionThe direction of the wind.
magnitudeThe magnitude/intensity of the wind.
yawThe yaw value of the wind.
pitchThe pitch value of the wind.

◆ SetFogAmount()

void Anvil.API.NwArea.SetFogAmount ( FogType  fogType,
int  fogAmount 
)
inline

Sets the fog amount for this area, at the specified time of day.

◆ SetFogColor()

void Anvil.API.NwArea.SetFogColor ( FogType  fogType,
FogColor  fogColor,
TimeSpan  fadeTime = default 
)
inline

Sets the fog color for this area, at the specified time of day.

◆ SetTiles()

void Anvil.API.NwArea.SetTiles ( List< TileData data,
SettleFlags  flags = SettleFlags.RecomputeLighting,
string  tileSet = "" 
)
inline

Bulk change a set of tiles in this area.

Parameters
dataThe updated tile data.
flagsFlags/behaviours to apply once the tiles have been set.
tileSetIf specified, also changes the area's tileset. Warning: only use this if you really know what you're doing, it's very easy to break things badly.

◆ StopAmbient()

void Anvil.API.NwArea.StopAmbient ( )
inline

Stops playback of any ambient sounds in this area.

◆ StopBackgroundMusic()

void Anvil.API.NwArea.StopBackgroundMusic ( )
inline

Stops playback of any running background music in this area.

◆ StopBattleMusic()

void Anvil.API.NwArea.StopBattleMusic ( )
inline

Stops playback of any running battle music in this area.

Property Documentation

◆ AmbientDayTrack

int Anvil.API.NwArea.AmbientDayTrack
set

Sets the daytime ambient track for this area.
See "ambientsound.2da" for track numbers.

◆ AmbientDayVolume

int Anvil.API.NwArea.AmbientDayVolume
set

Sets the daytime ambient track volume for this area.

◆ AmbientNightTrack

int Anvil.API.NwArea.AmbientNightTrack
set

Sets the night ambient track for this area.
See "ambientsound.2da" for track numbers.

◆ AmbientNightVolume

int Anvil.API.NwArea.AmbientNightVolume
set

Sets the night ambient track volume for this area.

◆ AreaFlags

AreaFlags Anvil.API.NwArea.AreaFlags
getset

Gets or sets area terrain metadata flags.

◆ DayNightMode

DayNightMode?? Anvil.API.NwArea.DayNightMode
getset

Gets or sets the day/night mode to use for this area.

◆ FogClipDistance

float Anvil.API.NwArea.FogClipDistance
getset

Gets or sets the fog clip distance in the area.

◆ IsAboveGround

bool Anvil.API.NwArea.IsAboveGround
getset

Gets or sets whether this area is considered above ground and not under ground.

◆ IsBattleMusicPlaying

bool Anvil.API.NwArea.IsBattleMusicPlaying
get

Gets a value indicating whether battle music is currently playing in the area.

◆ IsExterior

bool Anvil.API.NwArea.IsExterior
getset

Gets or sets whether this area is considered an as exterior, and not an interior.

◆ IsInterior

bool Anvil.API.NwArea.IsInterior
getset

Gets or sets whether this area is considered an as interior, and not an exterior.

Unlike the equivalent NwScript function NWScript.GetIsAreaInterior, this function will only return true if the API.AreaFlags.Interior flag is set.
An area that is simply underground is not considered an interior.

Use IsInterior || IsUnderGround together to replicate the existing function.

◆ IsMusicPlaying

bool Anvil.API.NwArea.IsMusicPlaying
get

Gets a value indicating whether ambient music is currently playing in the area.

◆ IsNatural

bool Anvil.API.NwArea.IsNatural
getset

Gets or sets whether this area is considered natural and non-urban.

◆ IsUnderGround

bool Anvil.API.NwArea.IsUnderGround
getset

Gets or sets whether this area is considered under ground and not above ground.

◆ IsUrban

bool Anvil.API.NwArea.IsUrban
getset

Gets or sets whether this area is considered urban and not natural.

◆ LastEntered

NwGameObject? Anvil.API.NwArea.LastEntered
get

Gets the last object that entered this area.

◆ LastLeft

NwGameObject? Anvil.API.NwArea.LastLeft
get

Gets the last object that left this area.

◆ LightningChance

int Anvil.API.NwArea.LightningChance
getset

Gets or sets the percentage value (0-100) that lightning may occur.

◆ ListenModifier

int Anvil.API.NwArea.ListenModifier
getset

Gets or sets the listen modifier for this area.

◆ LoadScreen

LoadScreenTableEntry Anvil.API.NwArea.LoadScreen
getset

Gets or sets the load screen for this area.

◆ MoonAmbientColor

Color Anvil.API.NwArea.MoonAmbientColor
getset

Gets or sets the area ambient color during night time.

◆ MoonDiffuseColor

Color Anvil.API.NwArea.MoonDiffuseColor
getset

Gets or sets the area diffuse color during night time.

◆ MoonFogAmount

int Anvil.API.NwArea.MoonFogAmount
getset

Gets or sets the fog density during night time.

◆ MoonFogColor

Color Anvil.API.NwArea.MoonFogColor
getset

Gets or sets the area fog color during night time.

◆ MoonShadows

bool Anvil.API.NwArea.MoonShadows
getset

Gets or sets whether shadows are cast during night time.

◆ MusicBackgroundDayTrack

int Anvil.API.NwArea.MusicBackgroundDayTrack
getset

Gets or sets the daytime background track index for this area.
See "Resources > Sounds and Music > Music" in the toolset for track numbers.

◆ MusicBackgroundNightTrack

int Anvil.API.NwArea.MusicBackgroundNightTrack
getset

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

int Anvil.API.NwArea.MusicBattleTrack
getset

Gets or sets the combat track index for this area.
Refer to Resources > Sounds and Music > Music in the toolset for track numbers.

◆ Objects

IEnumerable<NwGameObject> Anvil.API.NwArea.Objects
get

Gets all Objects currently in this area.

◆ PlayerCount

int Anvil.API.NwArea.PlayerCount
get

Gets the number of players in this area.

◆ PVPSetting

PVPSetting Anvil.API.NwArea.PVPSetting
getset

Gets or sets the PvP setting for this area.

◆ RainChance

int Anvil.API.NwArea.RainChance
getset

Gets or sets the percentage value (0-100) that rain may occur.

◆ RestingAllowed

bool Anvil.API.NwArea.RestingAllowed
getset

Gets or sets whether resting is allowed in this area.

◆ ShadowOpacity

byte Anvil.API.NwArea.ShadowOpacity
getset

Gets or sets the shadow opacity for this area (0-100).

◆ Size

Vector2Int Anvil.API.NwArea.Size
get

Gets the size of this area.

Returns
The number of tiles that the area is wide/high.

◆ SkyBox

Skybox Anvil.API.NwArea.SkyBox
getset

Gets or sets the current skybox for this area.

◆ SnowChance

int Anvil.API.NwArea.SnowChance
getset

Gets or sets the percentage value (0-100) that snow may occur.

◆ SpotModifier

int Anvil.API.NwArea.SpotModifier
getset

Gets or sets the spot modifier for this area.

◆ SunAmbientColor

Color Anvil.API.NwArea.SunAmbientColor
getset

Gets or sets the area ambient color during day time.

◆ SunDiffuseColor

Color Anvil.API.NwArea.SunDiffuseColor
getset

Gets or sets the area diffuse color during day time.

◆ SunFogAmount

int Anvil.API.NwArea.SunFogAmount
getset

Gets or sets the fog density during day time.

◆ SunFogColor

Color Anvil.API.NwArea.SunFogColor
getset

Gets or sets the area fog color during day time.

◆ SunShadows

bool Anvil.API.NwArea.SunShadows
getset

Gets or sets whether shadows are cast during day time.

◆ TileInfo

IReadOnlyList<TileInfo> Anvil.API.NwArea.TileInfo
get

Gets an array containing all tile data/structures for the area.

◆ Tileset

string Anvil.API.NwArea.Tileset
get

Gets the tileset (.set) resource name used for this area.

◆ Weather

WeatherType Anvil.API.NwArea.Weather
getset

Gets or sets the current weather conditions for this area.

◆ WindPower

byte Anvil.API.NwArea.WindPower
getset

Gets or sets the wind power for this area.
Set to 0, 1 or 2.


The documentation for this class was generated from the following files: