Files | |
file | nwnx_area.nss |
Classes | |
struct | NWNX_Area_TileInfo |
A tile info struct. More... | |
struct | NWNX_Area_AreaWind |
Area wind info struct. More... | |
Functions | |
int | NWNX_Area_GetNumberOfPlayersInArea (object area) |
Gets the number of players in area. More... | |
object | NWNX_Area_GetLastEntered (object area) |
Gets the creature that last entered area. More... | |
object | NWNX_Area_GetLastLeft (object area) |
Gets the creature that last left area. More... | |
int | NWNX_Area_GetPVPSetting (object area) |
Get the PVP setting of area. More... | |
void | NWNX_Area_SetPVPSetting (object area, int pvpSetting) |
Set the PVP setting of area. More... | |
int | NWNX_Area_GetAreaSpotModifier (object area) |
Get the spot modifier of area. More... | |
void | NWNX_Area_SetAreaSpotModifier (object area, int spotModifier) |
Set the spot modifier of area. More... | |
int | NWNX_Area_GetAreaListenModifier (object area) |
Get the listen modifer of area. More... | |
void | NWNX_Area_SetAreaListenModifier (object area, int listenModifier) |
Set the listen modifier of area. More... | |
int | NWNX_Area_GetNoRestingAllowed (object area) |
Checks the No Resting area flag. More... | |
void | NWNX_Area_SetNoRestingAllowed (object area, int bNoRestingAllowed) |
Set whether to disable resting in the area. More... | |
int | NWNX_Area_GetWindPower (object area) |
Get the wind power in area. More... | |
void | NWNX_Area_SetWindPower (object area, int windPower) |
Set the wind power in area. More... | |
int | NWNX_Area_GetWeatherChance (object area, int type) |
Get the weather chance of type in area. More... | |
void | NWNX_Area_SetWeatherChance (object area, int type, int chance) |
Set the weather chance of type in area. More... | |
float | NWNX_Area_GetFogClipDistance (object area) |
Get the fog clip distance in area. More... | |
void | NWNX_Area_SetFogClipDistance (object area, float distance) |
Set the fog clip distance in area. More... | |
int | NWNX_Area_GetShadowOpacity (object area) |
Get the shadow opacity of area. More... | |
void | NWNX_Area_SetShadowOpacity (object area, int shadowOpacity) |
Set the shadow opacity of area. More... | |
int | NWNX_Area_GetDayNightCycle (object area) |
Get the day/night cycle of area. More... | |
void | NWNX_Area_SetDayNightCycle (object area, int type) |
Set the day/night cycle of area. More... | |
int | NWNX_Area_GetSunMoonColors (object area, int type) |
Get the Sun/Moon Ambient/Diffuse colors of area. More... | |
void | NWNX_Area_SetSunMoonColors (object area, int type, int color) |
Set the Sun/Moon Ambient/Diffuse colors of area. More... | |
object | NWNX_Area_CreateTransition (object area, object target, float x, float y, float z, float size=2.0f, string tag="") |
Create and returns a transition (square shaped of specified size) at a location. More... | |
int | NWNX_Area_GetTileAnimationLoop (object oArea, float fTileX, float fTileY, int nAnimLoop) |
Get the state of a tile animation loop. More... | |
void | NWNX_Area_SetTileAnimationLoop (object oArea, float fTileX, float fTileY, int nAnimLoop, int bEnabled) |
Set the state of a tile animation loop. More... | |
string | NWNX_Area_GetTileModelResRef (object oArea, float fTileX, float fTileY) |
Get the name of the tile model from any location. More... | |
int | NWNX_Area_TestDirectLine (object oArea, float fStartX, float fStartY, float fEndX, float fEndY, float fPerSpace, float fHeight, int bIgnoreDoors=FALSE) |
Test to see if there's a direct, walkable line between two points in the area. More... | |
int | NWNX_Area_GetMusicIsPlaying (object oArea, int bBattleMusic=FALSE) |
Get if the area music is playing. More... | |
object | NWNX_Area_CreateGenericTrigger (object oArea, float fX, float fY, float fZ, string sTag="", float fSize=1.0f) |
Create and return a generic trigger (square shaped of specified size) at a location. More... | |
void | NWNX_Area_AddObjectToExclusionList (object oObject) |
Add oObject to the ExportGIT exclusion list, objects on this list won't be exported when NWNX_Area_ExportGIT() is called. More... | |
void | NWNX_Area_RemoveObjectFromExclusionList (object oObject) |
Remove oObject from the ExportGIT exclusion list. More... | |
int | NWNX_Area_ExportGIT (object oArea, string sFileName="", int bExportVarTable=TRUE, int bExportUUID=TRUE, int nObjectFilter=0, string sAlias="NWNX") |
Export the .git file of oArea to the UserDirectory/nwnx folder, or to the location of sAlias. More... | |
struct NWNX_Area_TileInfo | NWNX_Area_GetTileInfo (object oArea, float fTileX, float fTileY) |
Get the tile info of the tile at [fTileX, fTileY] in oArea. More... | |
int | NWNX_Area_ExportARE (object oArea, string sFileName, string sNewName="", string sNewTag="", string sAlias="NWNX") |
Export the .are file of oArea to the UserDirectory/nwnx folder, or to the location of sAlias. More... | |
int | NWNX_Area_GetAmbientSoundDay (object oArea) |
Get the ambient sound playing in an area during the day. More... | |
int | NWNX_Area_GetAmbientSoundNight (object oArea) |
Get the ambient sound playing in an area during the night. More... | |
int | NWNX_Area_GetAmbientSoundDayVolume (object oArea) |
Get the volume of the ambient sound playing in an area during the day. More... | |
int | NWNX_Area_GetAmbientSoundNightVolume (object oArea) |
Get the volume of the ambient sound playing in an area during the night. More... | |
object | NWNX_Area_CreateSoundObject (object oArea, vector vPosition, string sResRef) |
Create a sound object. More... | |
void | NWNX_Area_RotateArea (object oArea, int nRotation) |
Rotates an existing area, including all objects within (excluding PCs). More... | |
struct NWNX_Area_TileInfo | NWNX_Area_GetTileInfoByTileIndex (object oArea, int nIndex) |
Get the tile info of the tile at nIndex in the tile array. More... | |
int | NWNX_Area_GetPathExists (object oArea, vector vStartPosition, vector vEndPosition, int nMaxDepth) |
Check if there is a path between two positions in an area. More... | |
int | NWNX_Area_GetAreaFlags (object oArea) |
Get oArea's flags, interior/underground etc. More... | |
void | NWNX_Area_SetAreaFlags (object oArea, int nFlags) |
Set oArea's raw flags bitmask. More... | |
struct NWNX_Area_AreaWind | NWNX_Area_GetAreaWind (object oArea) |
Get oArea's detailed win data. More... | |
void | NWNX_Area_SetDefaultObjectUiDiscoveryMask (object oArea, int nObjectTypes, int nMask, int bForceUpdate=FALSE) |
Set the default discoverability mask for objects in an area. More... | |
int NWNX_Area_GetNumberOfPlayersInArea | ( | object | area | ) |
Gets the number of players in area.
area | The area object. |
Definition at line 354 of file nwnx_area.nss.
object NWNX_Area_GetLastEntered | ( | object | area | ) |
Gets the creature that last entered area.
area | The area object. |
Definition at line 364 of file nwnx_area.nss.
object NWNX_Area_GetLastLeft | ( | object | area | ) |
Gets the creature that last left area.
area | The area object. |
Definition at line 374 of file nwnx_area.nss.
int NWNX_Area_GetPVPSetting | ( | object | area | ) |
Get the PVP setting of area.
area | The area object. |
Definition at line 384 of file nwnx_area.nss.
void NWNX_Area_SetPVPSetting | ( | object | area, |
int | pvpSetting | ||
) |
Set the PVP setting of area.
area | The area object. |
pvpSetting | One of area_pvp the "PVP Settings". |
Definition at line 394 of file nwnx_area.nss.
int NWNX_Area_GetAreaSpotModifier | ( | object | area | ) |
Get the spot modifier of area.
area | The area object. |
Definition at line 403 of file nwnx_area.nss.
void NWNX_Area_SetAreaSpotModifier | ( | object | area, |
int | spotModifier | ||
) |
Set the spot modifier of area.
area | The area object. |
spotModifier | The modifier to the Spot skill for this area. |
Definition at line 413 of file nwnx_area.nss.
int NWNX_Area_GetAreaListenModifier | ( | object | area | ) |
Get the listen modifer of area.
area | The area object. |
Definition at line 422 of file nwnx_area.nss.
void NWNX_Area_SetAreaListenModifier | ( | object | area, |
int | listenModifier | ||
) |
Set the listen modifier of area.
area | The area object. |
listenModifier | The modifier to the Listen skill for this area. |
Definition at line 432 of file nwnx_area.nss.
int NWNX_Area_GetNoRestingAllowed | ( | object | area | ) |
Checks the No Resting area flag.
area | The area object. |
Definition at line 441 of file nwnx_area.nss.
void NWNX_Area_SetNoRestingAllowed | ( | object | area, |
int | bNoRestingAllowed | ||
) |
Set whether to disable resting in the area.
area | The area object. |
bNoRestingAllowed | TRUE to disable resting in the area. |
Definition at line 451 of file nwnx_area.nss.
int NWNX_Area_GetWindPower | ( | object | area | ) |
Get the wind power in area.
area | The area object. |
Definition at line 460 of file nwnx_area.nss.
void NWNX_Area_SetWindPower | ( | object | area, |
int | windPower | ||
) |
Set the wind power in area.
area | The area object. |
windPower | Set to 0, 1 or 2. |
Definition at line 470 of file nwnx_area.nss.
int NWNX_Area_GetWeatherChance | ( | object | area, |
int | type | ||
) |
Get the weather chance of type in area.
type | A Weather Setting. |
area | The area object. |
Definition at line 479 of file nwnx_area.nss.
void NWNX_Area_SetWeatherChance | ( | object | area, |
int | type, | ||
int | chance | ||
) |
Set the weather chance of type in area.
area | The area object. |
type | A Weather Setting. |
chance | The chance this weather event occurs. |
Definition at line 490 of file nwnx_area.nss.
float NWNX_Area_GetFogClipDistance | ( | object | area | ) |
Get the fog clip distance in area.
area | The area object. |
Definition at line 500 of file nwnx_area.nss.
void NWNX_Area_SetFogClipDistance | ( | object | area, |
float | distance | ||
) |
Set the fog clip distance in area.
area | The area object. |
distance | The new fog clip distance. |
Definition at line 510 of file nwnx_area.nss.
int NWNX_Area_GetShadowOpacity | ( | object | area | ) |
Get the shadow opacity of area.
area | The area object. |
Definition at line 519 of file nwnx_area.nss.
void NWNX_Area_SetShadowOpacity | ( | object | area, |
int | shadowOpacity | ||
) |
Set the shadow opacity of area.
area | The area object. |
shadowOpacity | The shadow opacity to set for the area (0-100). |
Definition at line 529 of file nwnx_area.nss.
int NWNX_Area_GetDayNightCycle | ( | object | area | ) |
Get the day/night cycle of area.
area | The area object. |
Definition at line 539 of file nwnx_area.nss.
void NWNX_Area_SetDayNightCycle | ( | object | area, |
int | type | ||
) |
Set the day/night cycle of area.
area | The area object. |
type | = A Day Night Cycle Setting. |
Definition at line 549 of file nwnx_area.nss.
int NWNX_Area_GetSunMoonColors | ( | object | area, |
int | type | ||
) |
Get the Sun/Moon Ambient/Diffuse colors of area.
area | The area object. |
type | = A Sun/Moon Color Setting. |
Definition at line 558 of file nwnx_area.nss.
void NWNX_Area_SetSunMoonColors | ( | object | area, |
int | type, | ||
int | color | ||
) |
Set the Sun/Moon Ambient/Diffuse colors of area.
area | The area object. |
type | = A Sun/Moon Color Setting. |
color | = A FOG_COLOR_*. |
Definition at line 569 of file nwnx_area.nss.
object NWNX_Area_CreateTransition | ( | object | area, |
object | target, | ||
float | x, | ||
float | y, | ||
float | z, | ||
float | size = 2.0f , |
||
string | tag = "" |
||
) |
Create and returns a transition (square shaped of specified size) at a location.
area | The area object. |
target | A door or waypoint object. |
x,y,z | The position to create the transition. |
size | The size of the square. |
tag | If specified, the returning object will have this tag. |
Definition at line 579 of file nwnx_area.nss.
int NWNX_Area_GetTileAnimationLoop | ( | object | oArea, |
float | fTileX, | ||
float | fTileY, | ||
int | nAnimLoop | ||
) |
Get the state of a tile animation loop.
oArea | The area object. |
fTileX,fTileY | The coordinates of the tile. |
nAnimLoop | The loop to check. (1-3) |
Definition at line 595 of file nwnx_area.nss.
void NWNX_Area_SetTileAnimationLoop | ( | object | oArea, |
float | fTileX, | ||
float | fTileY, | ||
int | nAnimLoop, | ||
int | bEnabled | ||
) |
Set the state of a tile animation loop.
oArea | The area object. |
fTileX,fTileY | The coordinates of the tile. |
nAnimLoop | The loop to set (1-3). |
bEnabled | TRUE or FALSE. |
Definition at line 609 of file nwnx_area.nss.
string NWNX_Area_GetTileModelResRef | ( | object | oArea, |
float | fTileX, | ||
float | fTileY | ||
) |
Get the name of the tile model from any location.
oArea | The area name. |
fTileX,fTileY | The coordinates of the tile. |
Definition at line 622 of file nwnx_area.nss.
int NWNX_Area_TestDirectLine | ( | object | oArea, |
float | fStartX, | ||
float | fStartY, | ||
float | fEndX, | ||
float | fEndY, | ||
float | fPerSpace, | ||
float | fHeight, | ||
int | bIgnoreDoors = FALSE |
||
) |
Test to see if there's a direct, walkable line between two points in the area.
oArea | The area object. |
fStartX,fStartY | The starting points. |
fEndX,fEndY | The ending points. |
fPerSpace | The personal space of a creature. Found in appearance.2da. |
fHeight | The height of a creature. Found in appearance.2da. |
bIgnoreDoors | Whether to ignore doors in the check. |
Definition at line 634 of file nwnx_area.nss.
int NWNX_Area_GetMusicIsPlaying | ( | object | oArea, |
int | bBattleMusic = FALSE |
||
) |
Get if the area music is playing.
oArea | The area object. |
bBattleMusic | Set to TRUE to get if the battle music is playing. |
Definition at line 652 of file nwnx_area.nss.
object NWNX_Area_CreateGenericTrigger | ( | object | oArea, |
float | fX, | ||
float | fY, | ||
float | fZ, | ||
string | sTag = "" , |
||
float | fSize = 1.0f |
||
) |
Create and return a generic trigger (square shaped of specified size) at a location.
oArea | The area object. |
fX,fY,fZ | The position to create the trigger. |
sTag | If specified, the returned trigger will have this tag. |
fSize | The size of the square. |
Definition at line 663 of file nwnx_area.nss.
void NWNX_Area_AddObjectToExclusionList | ( | object | oObject | ) |
Add oObject to the ExportGIT exclusion list, objects on this list won't be exported when NWNX_Area_ExportGIT() is called.
oObject | The object to add |
Definition at line 678 of file nwnx_area.nss.
void NWNX_Area_RemoveObjectFromExclusionList | ( | object | oObject | ) |
Remove oObject from the ExportGIT exclusion list.
oObject | The object to add |
Definition at line 686 of file nwnx_area.nss.
int NWNX_Area_ExportGIT | ( | object | oArea, |
string | sFileName = "" , |
||
int | bExportVarTable = TRUE , |
||
int | bExportUUID = TRUE , |
||
int | nObjectFilter = 0 , |
||
string | sAlias = "NWNX" |
||
) |
Export the .git file of oArea to the UserDirectory/nwnx folder, or to the location of sAlias.
oArea | The area to export the .git file of. |
sFileName | The filename, 16 characters or less and should be lowercase. If left blank the resref of oArea will be used. |
bExportVarTable | If TRUE, local variables set on oArea will be exported too. |
bExportUUID | If TRUE, the UUID of oArea will be exported, if it has one. |
nObjectFilter | One or more OBJECT_TYPE_* constants. These object will not be exported. For example OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR will not export creatures and doors. Use OBJECT_TYPE_ALL to filter all objects or 0 to export all objects. |
sAlias | The alias of the resource directory to add the .git file to. Default: UserDirectory/nwnx |
Definition at line 694 of file nwnx_area.nss.
struct NWNX_Area_TileInfo NWNX_Area_GetTileInfo | ( | object | oArea, |
float | fTileX, | ||
float | fTileY | ||
) |
Get the tile info of the tile at [fTileX, fTileY] in oArea.
oArea | The area name. |
fTileX,fTileY | The coordinates of the tile. |
Definition at line 709 of file nwnx_area.nss.
int NWNX_Area_ExportARE | ( | object | oArea, |
string | sFileName, | ||
string | sNewName = "" , |
||
string | sNewTag = "" , |
||
string | sAlias = "NWNX" |
||
) |
Export the .are file of oArea to the UserDirectory/nwnx folder, or to the location of sAlias.
oArea | The area to export the .are file of. |
sFileName | The filename, 16 characters or less and should be lowercase. This will also be the resref of the area. |
sNewName | Optional new name of the area. Leave blank to use the current name. |
sNewTag | Optional new tag of the area. Leave blank to use the current tag. |
sAlias | The alias of the resource directory to add the .are file to. Default: UserDirectory/nwnx |
Definition at line 729 of file nwnx_area.nss.
int NWNX_Area_GetAmbientSoundDay | ( | object | oArea | ) |
Get the ambient sound playing in an area during the day.
oArea | The area to get the sound of. |
Definition at line 743 of file nwnx_area.nss.
int NWNX_Area_GetAmbientSoundNight | ( | object | oArea | ) |
Get the ambient sound playing in an area during the night.
oArea | The area to get the sound of. |
Definition at line 753 of file nwnx_area.nss.
int NWNX_Area_GetAmbientSoundDayVolume | ( | object | oArea | ) |
Get the volume of the ambient sound playing in an area during the day.
oArea | The area to get the sound volume of. |
Definition at line 763 of file nwnx_area.nss.
int NWNX_Area_GetAmbientSoundNightVolume | ( | object | oArea | ) |
Get the volume of the ambient sound playing in an area during the night.
oArea | The area to get the sound volume of. |
Definition at line 773 of file nwnx_area.nss.
object NWNX_Area_CreateSoundObject | ( | object | oArea, |
vector | vPosition, | ||
string | sResRef | ||
) |
Create a sound object.
oArea | The area where to create the sound object. |
vPosition | The area position where to create the sound object. |
sResRef | The ResRef of the sound object. |
Definition at line 783 of file nwnx_area.nss.
void NWNX_Area_RotateArea | ( | object | oArea, |
int | nRotation | ||
) |
Rotates an existing area, including all objects within (excluding PCs).
oArea | The area to be rotated |
nRotation | How many 90 degrees clockwise to rotate (1-3). |
Definition at line 798 of file nwnx_area.nss.
struct NWNX_Area_TileInfo NWNX_Area_GetTileInfoByTileIndex | ( | object | oArea, |
int | nIndex | ||
) |
Get the tile info of the tile at nIndex in the tile array.
oArea | The area. |
nIndex | The index of the tile. |
Definition at line 808 of file nwnx_area.nss.
int NWNX_Area_GetPathExists | ( | object | oArea, |
vector | vStartPosition, | ||
vector | vEndPosition, | ||
int | nMaxDepth | ||
) |
Check if there is a path between two positions in an area.
oArea | The area. |
vStartPosition | The start position. |
vEndPosition | The end position. |
nMaxDepth | The max depth of the DFS tree. A good value is AreaWidth * AreaHeight. |
Definition at line 827 of file nwnx_area.nss.
int NWNX_Area_GetAreaFlags | ( | object | oArea | ) |
Get oArea's flags, interior/underground etc.
oArea | The area. |
Definition at line 842 of file nwnx_area.nss.
void NWNX_Area_SetAreaFlags | ( | object | oArea, |
int | nFlags | ||
) |
Set oArea's raw flags bitmask.
oArea | The area. |
nFlags | The flags. |
Definition at line 852 of file nwnx_area.nss.
struct NWNX_Area_AreaWind NWNX_Area_GetAreaWind | ( | object | oArea | ) |
Get oArea's detailed win data.
oArea | The area. |
Definition at line 861 of file nwnx_area.nss.
void NWNX_Area_SetDefaultObjectUiDiscoveryMask | ( | object | oArea, |
int | nObjectTypes, | ||
int | nMask, | ||
int | bForceUpdate = FALSE |
||
) |
Set the default discoverability mask for objects in an area.
oArea | The area or OBJECT_INVALID to set a global mask for all areas. Per area masks will override the global mask. |
nObjectTypes | A mask of OBJECT_TYPE_* constants or OBJECT_TYPE_ALL for all suitable object types. Currently only works on Creatures, Doors (Hilite only), Items and Useable Placeables. |
nMask | A mask of OBJECT_UI_DISCOVERY_* |
bForceUpdate | If TRUE, will update the discovery mask of ALL objects in the area or module(if oArea == OBJECT_INVALID), according to the current mask. Use with care. |
Definition at line 879 of file nwnx_area.nss.
const int NWNX_AREA_PVP_SETTING_NO_PVP = 0 |
Definition at line 12 of file nwnx_area.nss.
const int NWNX_AREA_PVP_SETTING_PARTY_PVP = 1 |
Definition at line 13 of file nwnx_area.nss.
const int NWNX_AREA_PVP_SETTING_FULL_PVP = 2 |
Definition at line 14 of file nwnx_area.nss.
const int NWNX_AREA_PVP_SETTING_SERVER_DEFAULT = 3 |
Definition at line 15 of file nwnx_area.nss.
const int NWNX_AREA_WEATHER_CHANCE_RAIN = 0 |
Definition at line 21 of file nwnx_area.nss.
const int NWNX_AREA_WEATHER_CHANCE_SNOW = 1 |
Definition at line 22 of file nwnx_area.nss.
const int NWNX_AREA_WEATHER_CHANCE_LIGHTNING = 2 |
Definition at line 23 of file nwnx_area.nss.
const int NWNX_AREA_DAYNIGHTCYCLE_CYCLE_DAY_NIGHT = 0 |
Definition at line 29 of file nwnx_area.nss.
const int NWNX_AREA_DAYNIGHTCYCLE_ALWAYS_BRIGHT = 1 |
Definition at line 30 of file nwnx_area.nss.
const int NWNX_AREA_DAYNIGHTCYCLE_ALWAYS_DARK = 2 |
Definition at line 31 of file nwnx_area.nss.
const int NWNX_AREA_COLOR_TYPE_MOON_AMBIENT = 0 |
Definition at line 37 of file nwnx_area.nss.
const int NWNX_AREA_COLOR_TYPE_MOON_DIFFUSE = 1 |
Definition at line 38 of file nwnx_area.nss.
const int NWNX_AREA_COLOR_TYPE_SUN_AMBIENT = 2 |
Definition at line 39 of file nwnx_area.nss.
const int NWNX_AREA_COLOR_TYPE_SUN_DIFFUSE = 3 |
Definition at line 40 of file nwnx_area.nss.