NWN2

NWN2 specific content.

New combat XP rebalancing for ALFA's NWN2 Core Scripts

With this last update, the combat XP calculations got a much needed revision, which should help encourage in-character teamwork when engaging in combat on-server.  The new scripted XP system includes the following changes:

  • Equal XP division among nearby party members.  (No more meta-worries about  higher level PCs getting a lion's share of the XP from an encounter.  The amount you see is the amount everyone in your group is receiving.
  • Sliding scale for bonus XP based on party size.  (As your party gets larger, individual shares from a given encounter decrease, but not dramatically.  A solo PC may expect to earn at most about 10% more XP than if he or she was partied up with another PC.  So, while some risk-reward relationship is retained, there is no longer a large disproportionate XP reward for soloing combat.

These changes should hopefully improve the player experience on ALFA003: The Silver Marches, as well as on the Beta servers as they approach LIVE status.  As always, any bugs discovered in the new content may be reported to me via PM or IRC, or to HDM Curmudgeon.

Enjoy, and stay tuned for information on the "Storm of Zehir" 2nd expansion pack for NWN2, out later this week.

Downloads

Since the 1.23 update, all Player side downloads are done via the NWN2 Auto-Downloader.  Simply log into your server and NWN2 will automatically download all the haks and pwc files for you.

Builders

If you are wishing to build for ALFA, please read this page:

Technical / Rewarding Experience

So, if you're going to be writing your own scripts that reward XP, there are a few functions in acr_xp_i that should be all that you need:
 

//! Award XP to oPC for completing a static quest of some sort.
void ACR_AwardStaticQuestXP(object oPC, string sPlotID, int nQuestXP);

//! Awards XP to the party which oPCParty is a member of, for killing oKill.
void ACR_AwardCombatXP(object oPCParty, object oKill);

//! Awards XP to a PC for overcoming a specific challenge which could have
//! lethal consequences.
void ACR_AwardLethalChallengeXP(object oPC, float fCR);

//! Awards XP to a PC for overcoming a specific challenge.
void ACR_AwardNonlethalChallengeXP(object oPC, float fCR);



The comment lines should cover most of what they do, but one that's enticingly hanging out in the open is this fellow:
 

//! Gives nXpAmount to oCreature.
//! This function, and none other, must be used whenever XP is directly given to
//! a PC. Any other function may not work reliably, if at all.
//! NOTE: LOGGING WILL NEED TO BE HANDLED BY THE CALLING APPLICATION
void ACR_GiveXPToPC(object oPC, int nXpAmount);


So, firstly, the original author's line wherein caps lock is cruise control for cool covers why this one is dangerous. Particulrly-advanced coders, with familiarity with our database and such, shouldn't be afraid to use this, but should approach knowing that they'll be responsible for their own logs, and that Hialmar might make them upgrade the parser to provide results to less-technically-inclined people who may need to review them in the course of their work (knowing how to write SQL queries is not prerequisite for the PA position or for any PA staff positions, and we're in very big trouble as a community if it ever becomes one)

So, running down the others-- first example, we've reached a point in a conversation where we're providing a simple quest reward; we're not tracking this in a journal-- we didn't update any "quest states". This guy just has a standing thing in his conversation, like a gang rivalry-- the Jets will pay if you rough up any of the Sharks. They might even sing you a song:
 

void main()
{
    ACR_AwardStaticQuestXP(GetPCSpeaker(), "BeatUpTheJets", 20);
}



Second example-- you've killed something that tried to kill you back. The ACR will be trying to catch all of these itself, and any creature killed by conventional combat should be so handled-- but if you have any special unique circumstances wherein a creature is being killed as part of a legitimate challenge, but the instrument of death wasn't in the core mechanics (systems that manage sea combat would be the standard example of this) you'd probably be looking at...
 

void KillCreatureWithOddTool(object oKiller, object oKilled)
{
   if(!GetIsPC(oKilled)) // let's make sure no one exploits this for CvC, hmm?
   {
      ACR_AwardCombatXP(oKiller, oKilled);
      ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oKilled);
   }
}



Third and fourth examples would be used in similar fashion-- and would be catch-alls for things that give XP but don't fit into any other possible category in the ACR. They award XP as if you killed a creature of fCR, with the difference being in how they're logged (lethal challenge or nonlethal challenge)-- so this can be used for things that highbies shouldn't get much reward for: that DC 20 trap is hair raising for a level 1, but a level 15? Deserves 1 xp, if any.
 

void main()
{
   ACR_AwardLethalChallengeXP(GetLastUsedBy(), 2.0f);
}

 

Technical / ACR Data Persistence

Data persistence API

The following functions are available for use in scripts to store persistent data (available across server resets). Be sure to delete any data that is no longer needed or to set expiration on data that you know will only be relevant for a fixed duration. This will help keep the size of the database down and minimize latency on queries (that can lag the game).

Note: NWNx4 must be installed and configured properly? on the host server for these functions to work.

This function executes an SQL statement. - sSQL: The SQL string to execute - Returns: Nothing void ACR_SQLQuery(string sSQL)

This function retrieves the next row of the result set returned by the most recent query. Call this before using ACR_SQLGetData(). - mode: Selects a result set in a multi set result
Leave the parameter empty to advance to the next row in the resultset.
Pass "NEXT" as parameter to fetch the first row of the next resultset. - Returns: SQL_SUCCESS if there is a row, SQL_ERROR if there are no more rows. int ACR_SQLFetch(string mode = " ")

This function retrieves the data in a specific column within the current row of the result set. - nCol: The index of the column to retrieve (max column size 65K) in the result row - Returns: The data in column nCol string ACR_SQLGetData(int nCol = 0)

This function returns the number of rows that were affected by the last INSERT, UPDATE, or DELETE operation. - Returns: Number of rows affected int ACR_SQLGetAffectedRows()

This function handles special characters (like ') for database storage. Problems can arise with SQL commands if variables or values have single or double quotes in their names. This function encodes these quotes so the underlying database can safely store them. - sString: The string to encode string ACR_SQLEncodeSpecialChars(string sString)

This function stores a persistent string. - oObject: The object for which the data is being stored - sVarName: The unique variable name - sValue: The value to record Optional parameters: - iExpiration: The number of days the persistent variable should be kept in database (default: 0=forever) void ACR_SetPersistentString(object oObject, string sVarName, string sValue, int iExpiration = 0)

This function stores a persistent integer. - oObject: The object for which the data is being stored - sVarName: The unique variable name - iValue: The value to record Optional parameters: - iExpiration: The number of days the persistent variable should be kept in database (default: 0=forever) void ACR_SetPersistentInt(object oObject, string sVarName, int iValue, int iExpiration = 0)

This function stores a persistent float. - oObject: The object for which the data is being stored - sVarName: The unique variable name - fValue: The value to record Optional parameters: - iExpiration: The number of days the persistent variable should be kept in database (default: 0=forever) void ACR_SetPersistentFloat(object oObject, string sVarName, float fValue, int iExpiration = 0)

This function stores a persistent location. - oObject: The object for which the data is being stored - sVarName: The unique variable name - lValue: The value to record Optional parameters: - iExpiration: The number of days the persistent variable should be kept in database (default: 0=forever) void ACR_SetPersistentLocation(object oObject, string sVarName, location lValue, int iExpiration = 0)

This function stores a persistent vector. - oObject: The object for which the data is being stored - sVarName: The unique variable name - vValue: The value to record Optional parameters: - iExpiration: The number of days the persistent variable should be kept in database (default: 0=forever) void ACR_SetPersistentVector(object oObject, string sVarName, vector vValue, int iExpiration = 0)

This function stores a persistent object. - oObject: The object for which the data is being stored - sVarName: The unique variable name - oItem: The object to record Optional parameters: - iExpiration: The number of days the persistent variable should be kept in database (default: 0=forever) void ACR_SetPersistentObject(object oObject, string sVarName, object oItem, int iExpiration = 0)

This function retrieves a persistent string. - oObject: The object for which the data is being retrieved - sVarName: The unique variable name - Returns: '' on error string ACR_GetPersistentString(object oObject, string sVarName)

This function retrieves a persistent int. - oObject: The object for which the data is being retrieved - sVarName: The unique variable name - Returns: 0 on error int ACR_GetPersistentInt(object oObject, string sVarName)

This function retrieves a persistent float. - oObject: The object for which the data is being retrieved - sVarName: The unique variable name - Returns: 0 on error float ACR_GetPersistentFloat(object oObject, string sVarName)

This function retrieves a persistent location. - oObject: The object for which the data is being retrieved - sVarName: The unique variable name - Returns: 0 on error location ACR_GetPersistentLocation(object oObject, string sVarname)

This function retrieves a persistent vector. - oObject: The object for which the data is being retrieved - sVarName: The unique variable name - Returns: 0 on error vector ACR_GetPersistentVector(object oObject, string sVarName)

This function retrieves a persistent object. - oObject: The object for which the data is being retrieved - sVarName: The unique variable name - Returns: 0 on error object ACR_GetPersistentObject(object oObject, string sVarName)

This function deletes a persistent record. - oObject: The object for which the data is being deleted - sVarName: The unique variable name void ACR_DeletePersistentVariable(object oObject, string sVarName)

This function converts a location to a string. - lLocation: The location to convert - Returns: A string equivalent string ACR_LocationToString(location lLocation)

This function converts a string to a location. - sLocation: The string to convert - Returns: A location location ACR_StringToLocation(string sLocation)

This function converts a vector to a string. - vVector: The vector to convert - Returns: A string equivalent string ACR_VectorToString(vector vVector)

This function converts a string to a vector. - sVector: The string to convert - Returns: A vector vector ACR_StringToVector(string sVector)

This function retrieves the CD Key of the player - always use this with exit events in place of the normal NWScript function (it returns null). - oPC: player whose CD Key to retrieve - Returns: oPC's CD Key string ACR_GetPCPublicCDKey(object oPC)

This function retrieves the database ID of the character (useful for direct queries using ACR_SQLQuery()). - oPC: player whose character ID to retrieve - Returns: oPC's character ID int ACR_GetCharacterID(object oPC)

 

Auxiliary database connections

There is support for creating "auxiliary" database connections (to other MySQL servers), though this support is not recommended for most usage.  Use the standard data persistence API instead in nearly all cases.

Auxiliary database connection documentation page.

Technical / Defining Rest Areas & Healing Bonuses

 

 

Resting

Resting will only be permitted in specific rest areas. Rest areas are defined with special triggers for both interiors and exteriors, the boundaries of which can extend to the limits of an entire area, if so desired. How small or how large a rest area will be is entirely up to each builder. There are no superficial limits.  Please Note: The Area Property "No Resting Allowed" must be set to False. If No Resting Allowed = True, a Rest Area Trigger will not function.

Rest Area Configuration Options (Local Variables) Each rest area trigger should have the following options defined.

ACR_REST_ZONE: This integer value represents one of two possible states:

 1 - Indoor rest zone
 2 - Outdoor rest zone

ACR_REST_BONUS: This integer value represents a heal bonus as a percentage of Hit Dice (x% * Hit Dice) that resting players will heal on a successful rest. This healing is in addition to normal rates gained from resting as well as any bonuses earned from medicinal items.

ACR_REST_DISEASE: This floating point value represents a disease that is spread at the specified rest zone along with its DC to save. The format of this variable is X.YY, where X is an integer value representing the disease ID (found in nwscript.nss) and YY is the two digit difficulty class of the disease for saving throw purposes.

NOTE: Disease IDs begin at 0, so in the absence of any disease at the rest zone, be sure that ACR_REST_DISEASE_CHANCE is 0 (delete the variable entirely or set the value to 0).

ACR_REST_DISEASE_CHANCE: This integer value represents the percentage chance that the disease at the rest zone will be contracted. The default is 0, which means no chance for contraction exists.

 

Healing

To create medicinal items that apply a straight healing bonus on successful rest, create an item with the tag abr_it_mi_medicine. This will invoke a script of the same name, which applies the healing properties of the item on the next rest cycle.

Healing Configuration Options (Local Variables) Each medicinal item should have the following options defined.

ACR_REST_HEAL_BONUS: This integer value represents a straight heal bonus in hit points that resting players will heal on a successful rest. This is typically reserved for items who's properties work in tandem with resting.

 

Technical / ALFA Spawn System

The following is a complete list of features in the ACR2's spawn system.

Waypoints Just like NESS and other spawn systems, the ACR's spawn system uses waypoints as spawn points. These waypoints have a great deal of options on them, in the form of local variables which the builder can change to suit his needs. You'll find a base, blank template for a spawn waypoint in [add when we know what the NWN2 palette looks like]. For a guide on how to configure a normal spawn quickly, please see the quickstart guide?. (For information on what local variables are, and how to use them, go here: Using Local Variables in the NWN2 Toolset)

All of the parameters listed below are present on the template spawn point. The undertstanding of them is not required to produce a functioning spawn point. The template spawn point works if its local string variable ACR_SPAWN_RESNAME_1 is given a valid creature Resource Name. The default template spawn point is always active, always spawns what you tell it to, and will not respawn when its children are killed.

Array Parameters In computer lingo, an "array" is simply a list of some sort of data of the same type. The spawn system uses arrays to list the "resource names" of creatures or objects you want to spawn, and the scripts you may wish to attach to these creatures. Since the spawn system depends on local variables for configuration, the arrays are lists of local variables. For example, ACR_SPAWN_RESNAME_ is a local string which lists the resrefs of the creatures spawned. So ACR_SPAWN_RESNAME_1 would be the name of the local variable for the first resref, ACR_SPAWN_RESNAME_2 the second, ACR_SPAWN_RESNAME_3 the third, and so on. Never skip a entry in an array. If you do, the spawn system will think the array has stopped at the missing entry. Also, always start at 1, not 0.

Current Paramters ACR_SPAWN_TYPE (Local integer) This indicates the type of object which is being spawned. The default is 0, for a creature, but other types are available, as listed below:

  • Creatures: 0
  • Placables: 1
  • Items: 2
  • Store: 3
  • Waypoint: 4
  • Triggers: 5
  • Encounters: 6
  • Lights: 7

ACR_SPAWN_RESNAME_ (Local string array) This array lists Resource Names of objects which are always spawned by the spawn point. If the spawn point is activated, all the Resource Names in this array will be spawned. Resource Names listed more than once are spawned more than once. ex, leading to 2 badgers and a chicken each time: ACR_SPAWN_RESNAME_1 = "c_badger" ACR_SPAWN_RESNAME_2 = "c_badger" ACR_SPAWN_RESNAME_3 = "c_chicken"

ACR_SPAWN_RANDOM_RESNAME_ (Local string array) This array lists Resource Names of objects which are chosen at random to be spawned. The number of chosen Resource Names depends on the ACR_SPAWN_RESNAMES_MIN/MAX settings, see below. This array can have no more than 31 entries. Each time the spawns are chosen randomly from this list, ex, leading to 67% chicken and 33% badger: ACR_SPAWN_RANDOM_RESNAME_1 = "c_badger" ACR_SPAWN_RANDOM_RESNAME_2 = "c_chicken" ACR_SPAWN_RANDOM_RESNAME_3 = "c_chicken"

ACR_SPAWN_RESNAMES_MIN (Local integer) ACR_SPAWN_RESNAMES_MAX (Local integer) These are the maximum and minimum numbers of Resource Names spawned from the ACR_SPAWN_RANDOM_RESNAME_ array. The actual number spawned is determined randomly between these values. They can range between 0 and 31. To keep this value from being random, set both the min and max equal. Each one will be an independent pull from the RANDOM_RESNAME array described above, so if these are >1, you may end up with multiples of Resource Names from the RANDOM_RESNAME array: best to leave uniques like bosses to their own waypoint, or use the ACR_SPAWN_RESNAME_# option above for them.

ACR_SPAWN_RESPAWN_COUNT (Local integer) This local integer defines the number of times a spawn point will spawn, if all its children have been killed. The default is 1, which indicates a "single-life" spawn. Mod reset or scripts can bring the spawn back, and normal despawning due to time or inactivity will not permanently deactivate the spawn point, only death of all of it's spawned "children". Note that this relies on the spawned objects having the correct acf_ondeath() scripts in their OnDeath events. A setting of "-1" will lead to an infinitely respawning waypoint, which will always repopulate after being "cleared out". Similarly, setting this value to "5", would mean the spawn point would have to be killed off 5 separate times to deactivate "for good". Note that currently a mod reset still sets this counter back to it's original state, though we may tie this into persistent variables once they become available to us again.

ACR_RESPAWN_DELAY_MIN (Local float) ACR_RESPAWN_DELAY_MAX (Local float) This is the random period of time a spawn spends "recharging" after its children have all been killed (see above). This value is in game hours, and is chosen randomly between the mininum and maximum. To keep this value from being random, set both the min and max equal. In practical terms, the respawn will happen at the next spawn pseudoheartbest after the timer expires, so the "accuracy" of the respawn delay will be somewhat dependent on the refresh rate of the system. Also note that setting respawn delay to "0.0" means the respawn will still be delayed until the next pseudoheartbeat, so respawns are never instantaneous (though if a spawn is killed just before a heartbeat, it may appear so).

ACR_SPAWN_CHANCE (Local float) This value, from 0 to 100, represents the chance a spawn has of spawning. This chance is computed once every game day. The % chance applies per day for the waypoint collectively, so it is an all-or-nothing situation.

ACR_SPAWN_RANDOM_RADIUS (Local float) This, if nonzero, specifies a maximum distance from the chosen spawn point location at which the spawn child may appear, in a random direction. This is calculated separately (distance and direction) for each spawned child, so for a multiple spawn, you can imagine it to describe the tightness of the "scatter" of the spawned children around the spawn point target. A small value will give a closely-spaced group, while a large one will give the illusion of entirely separate spawns, even though they are all children of the same waypoint.

ACR_SPAWN_RANDOM_RANGE (Local float) This, if nonzero, specifies a range (in a random direction) from the actual location of the waypoint to the target/centerpoint of the spawning- 0.0 will always center the spawn right on top of the waypoint, while an arbitrarily large value could place the spawn anywhere in the area. Note that when spawning a single child, this parameter is functionally equivalent to ACR_SPAWN_RANDOM_RADIUS, but when used with multiple children, it can place a mob of creatures, placeables, or items in a less predictable position, either in a closely knit group, or a broad spread.

ACR_SPAWN_IN_VFX (Local int) This integer indicates the visual effect number of a visual effect which is played on every object this spawn point spawns. It is commonly used to represent teleporting or summoned monsters.

ACR_SPAWN_VFX (Local int) This integer indicates the visual effect number of a visual effect which is played on the spawn point itself as it activates. It is commonly used to represent groups of teleporting or summoned monsters.

ACR_SPAWN_IN_SFX (Local string) This is the sound effect file which is played on each object spawned at this spawn point. (not yet tested, but should work)

ACR_SPAWN_SFX (Local string) This is the sound effect file which is played on the spawn point itself as it activates. (not yet tested, but should work)

ACR_SPAWN_ANIMATION (Local string) This is the animation performed by all creatures spawned from this spawn point, as they spawn. (not yet tested, but should work)

ACR_SPAWN_IN_HOUR (Local int) ACR_SPAWN_OUT_HOUR (Local int) This is the hour of the day the spawn starts to spawn in and spawns out at. If the current hour is between these values, the spawn can be active. If the two values are equal (such as zero, the default), the hour of the day has no effect on whether or not the spawn activates. Valid values are between 0 and 23. This also works for "circular" cases, such as Night-only spaws, ex here for spawning in at 18:00, and spawning back out every 06:00: ACR_SPAWN_IN_HOUR = "18" ACR_SPAWN_OUT_HOUR = "6"

ACR_SPAWN_IN_DAY (Local int) ACR_SPAWN_OUT_DAY (Local int) This is the day of the month (28 days in the Fearunian month) in which the spawn will spawn in and spawn out. These should also work in a circular fashion similar to the hours above, though that behaviour has not been stringently tested.

ACR_SPAWN_IN_MONTH (Local int) ACR_SPAWN_OUT_MONTH (Local int) This is the month of the year (12 months in the Faerunian year) the spawn starts to spawn in and spawns out at. If the current month is between these values, the spawn can be active. If the two values are equal (such as zero, the default), the month of the year has no effect on whether or not the spawn activates. Valid values are between 1 and 12.

ACR_SPAWN_IN_PC_SIGHT (Local int) If nonzero, the spawn will spawn with a PC in sight of it. This is disabled to keep spawns from suddenly appearing in front of a PC in an OOC fashion. (not tested, should work)

ACR_SPAWN_ONLY_WHEN_NO_PC_IN_AREA (Local int) If nonzero, this spawn will not respawn or activate at all if a PC is already in the area when it tries to do so. This is used to prevent creatures from re-appearing where they were after a PC just killed them, or something similar. (not tested, should work)

ACR_SPAWN_WITH_ANIMATION (Local int) If nonzero, this setting makes the spawn appear with its default spawn-in animation. This is usually a "fly-down" effect for most creatures, and a "climb down" effect for spiders. (not tested, should work)

ACR_SPAWN_IS_DISABLED (Local int) If nonzero, this spawn is disabled and will not spawn unless enabled by some other script or DM tool.

ACR_SPAWN_RANDOM_FACING (Local int) If nonzero, the spawn's facing is random, instead of facing the direction of the spawn waypoint.

ACR_SPAWN_IN_STEALTH (Local int) If nonzero, the spawn spawns in stealth mode.

ACR_SPAWN_IN_DETECT (Local int) If nonzero, the spawn spawns in detect mode.

ACR_SPAWN_BUFFED (Local int) If nonzero, spawned creatures spawn with all hour per level (or longer) buffs cast on itself in a semi-intelligent fashion (evil creatures cast protection from good, multiple magic vestimates or magic weapons are distributed over different items, etc). (not tested, should work)

Custom Script Parameters The spawn system allows custom scripts to be run when a spawn activates, for scripters to use how they wish. In order to use the functions listed here, be sure and include the spawn system's source file with the line: #include "acr_spawn_i" at the top of your script.

ACR_SPAWN_IN_SCRIPT_ (Local string array) This array defines custom scripts which are run on each object spawned by the spawn point. Each script is executed on each spawned object once, with OBJECT_SELF pointing to the spawned object. These scripts can have any name.

ACR_SPAWN_SCRIPT_ (Local string array) This array defines custom scripts which are run on the spawn point after it activates and spawns children. Each script is executed once, with OBJECT_SELF pointing to the spawn waypoint itself. If you wish to spawn additional objects from this script, use the function ACR_SpawnObject(). These scripts can have any name.

ACR_SPAWN_IS_ACTIVE_SCRIPT (Local string) This variable defines a single custom which is run whenever the spawn system looks at the spawn point and tries to decide whether or not to spawn it. It allows custom logic to be used to decide whether or not the point should spawn, overriding the spawn point's normal behavior. In this script, OBJECT_SELF points to the spawn waypoint itself. If you wish the point to spawn, call ACR_ForceSpawn(). If you wish to keep it from spawning, call ACR_DisallowSpawn(). If you don't call either of these functions, the spawn point behaves as it normally would. If for some reason you call both, ACR_ForceSpawn() takes precedence and the spawn activates. (not yet tested)

System Configuration In addition to the options of each spawn point, there are a few settings which you can use to globally configure ALFA's spawn system. These are constants located in the script acf_spawn_i. Like all ACF files (click here for an explaination), it is never updated in an ACR update. So any settings here will always be preserved, though server staff may be asked to add options to this file in the future as the ACR evolves.

_SPAWN_AREA_DESPAWN_DELAY This is the delay between when an area becomes empty of PCs, and when the spawn system despawns its children within it. Larger values here may lead to increased CPU usage as more creatures stay spawned at once.

_SPAWN_REFRESH_DELAY This is the "heartbeat" of the spawn system. Larger values here reduce CPU usage, but make the spawn system react slower.

_SPAWN_PRESPAWN_SEAMLESS This controls whether the spawn system will take cues from PCs entering seamless ATs in adjacent areas. If active, it should ensure all spawns are in place before the PC actually ATs. It may be disabled to keep memory use down, as it may lead to areas being population without PCs actually entering them (if the PC backs out of the AT trigger instead of continuing)

_SPAWN_PRESPAWN_PREDICTION This controls whether the spawn system will take into account the predicted arrival point of an ATing PC, when deciding whether to spawn a group intended to be out of sight.

Planned Parameters These parameters do not currently function, but are included for builders to use as an interface until they are completed. Builders should count on them functioning the way they are recorded here when ALFA2 goes live. So, you can go ahead and build spawns with these parameters.

ACR_SPAWN_IN_WAYPOINT (Local string) ACR_SPAWN_OUT_WAYPOINT (Local string) These strings represent tags of waypoints where the creature spawns in at, and despawns at. Once spawned, the creature will move towards the spawn point's location. For example, a peasant could spawn at his house door at 8:00 in the morning, move to the location of the spawn point in a field of oats, then despawn at a tavern door at 17:00. All waypoints must be in the same area as the spawn point. If more than one waypoint with the same tag is placed, the closest one to the spawn point is used.

ACR_SPAWN_WHEN_PC_NEARS (Local float) This parameter keeps the spawn point from activating unless a PC nears it within a certain range. Distances are in meters.

ACR_MIN_SPAWN_DURATION (Local float) ACR_MAX_SPAWN_DURATION (Local float) A random value is chosen between these two values to determine how long a spawn remains spawned in game hours. After this time is up, the spawn despawns noramally, and can respawn again when the respawn delay is up (see below). To keep this value from being random, set both the min and max equal. If you want the spawn to remain spawned indefinitely, just leave these set to zero. After this counter is up, the spawn will despawn itself, and it will try to respawn itself as soon as its respawn delay counter is up (see below).

ACR_SPAWN_RANDOM_POSITION_BORDER (Local int) If nonzero, this setting prevents any spawn from spawning in within visible range of the map edge. This is used to prevent PCs from ATing into monsters, who prompty eat them before the player can react.

Tenative Paramters These are parameters we hope to have working in NWN2, but we aren't entirely sure if we will be able to.

ACR_SPAWN_FACTION (Local string) This parameter sets the spawned object's faction. If the name of the faction is invalid, it does nothing.

Disabled until future NWN2 updates: Until some of the base functions in NWN2 are fixed by Obsidian patches, we won't be able to dynamically rename spawns on the fly.

ACR_SPAWN_NAME_PREFIX (Local string) This is the string added to the beginning of the spawned object's name. Spaces are not included, so be sure to add one if you need it. For example, setting this to "Black Lance " (without quotes) would cause all creatures spawned from the point to take that prefix, ie "Black Lance Orc" would be spawned.

ACR_SPAWN_NAME_SUFFIX (Local string) This is the string added to the end of the spawned object's name. Spaces are not included, so be sure to add one if you need it. For example, setting this to " Archer" (without quotes) would cause all creatures spawned from the point to take that prefix, ie "Orc Archer" would be spawned.

ACR_SPAWN_NAME_FIRST (Local string) This string, if set, completely replaces the first name of the spawn. If for some reason you have prefixes and suffixes set as well, they will also be included.

ACR_SPAWN_NAME_LAST (Local string) This string, if set, completely replaces the last name of the spawn. If for some reason you have prefixes and suffixes set as well, they will also be included.

ACR_SPAWN_RANDOM_NAME (Local integer) If nonzero, this setting will assign a randomly-generated name to each spawned creature, based on the creature's gender and racial type.

ACR_SPAWN_WEATHER_CLEAR (Local int) ACR_SPAWN_WEATHER_RAIN_WEAK (Local int) ACR_SPAWN_WEATHER_RAIN_LIGHT (Local int) ACR_SPAWN_WEATHER_RAIN_MEDIUM (Local int) ACR_SPAWN_WEATHER_RAIN_HEAVY (Local int) ACR_SPAWN_WEATHER_RAIN_STORMY (Local int) ACR_SPAWN_WEATHER_SNOWN_WEAK (Local int) ACR_SPAWN_WEATHER_SNOW_LIGHT (Local int) ACR_SPAWN_WEATHER_SNOW_MEDIUM (Local int) ACR_SPAWN_WEATHER_SNOW_HEAVY (Local int) ACR_SPAWN_WEATHER_SNOW_STORMY (Local int) ACR_SPAWN_WEATHER_LIGHTNING_WEAK (Local int) ACR_SPAWN_WEATHER_LIGHTNING_LIGHT (Local int) ACR_SPAWN_WEATHER_LIGHTNING_MEDIUM (Local int) ACR_SPAWN_WEATHER_LIGHTNING_HEAVY (Local int) ACR_SPAWN_WEATHER_LIGHTNING_STORMY (Local int) If set to 1, each of these integers allow the spawn to spawn in under the indicated conditions. If set to 0, the spawn does not spawn under those weather conditions. Disabled until we have a working weather system.

ACR_SPAWN_IN_COLD_DAMAGING_WEATHER (Local int) ACR_SPAWN_IN_HEAT_DAMAGING_WEATHER (Local int) If nonzero, this spawn will activate in dangerous weather which causes heat or cold damage. Disabled until we have a working weather system.

 

Syndicate content