NWN2

NWN2 specific content.

Technical / Building ACR Compatible Items

All items should be priced according to 3.5 edition canon (Player's Hand Book, Dungeon Master's Guide, etc), and to the ALFA specific exceptions set forth by ALFA Standards. DO NOT MAKE ITEMS WORTH LESS THAN 1 GP YET! Our currency system for silver and copper pieces is not yet ready, and we may not know how it will work until we have the client in our hands.

Premise: An item should be identifiable from it's tag/resref.

<prefix>_it_<type>_<description>_<ID>

<prefix> is either "abr" (minus the quotes) for default ALFA items, or a three digit code of the server.

<type> is a three-letter abbreviation describing the slot occupied by the item.

<description> is the number of fields necessary to describe any additional properties on the item.

<ID> is an optional two-digit number used to distinguish items with identical properties. Leave the <ID> off of tags - it goes on resrefs only.

Item tags should NEVER be longer than 28 characters. The game allows 32, so don't use them all.

Scripting: For information on how to script items, go here.

Examples: A standard longsword would be, Tag: abr_it_wpn_longsword ResRef: abr_it_wpn_longword_01

TYPE

Ammunition amm Armor arm (includes shields) Boots boo Cloaks clk Gloves glv Helmets hlm Weapons wpn

DESCRIPTIONS

Materials

  • Abyssal Bloodiron ay
  • Adamantine ad
  • Alchemical Silver sa
  • Arandur aa
  • Astral Driftmetal as
  • Aurorum au
  • Bluewood bw
  • Cold Iron ci
  • Copper co
  • Darksteel dk
  • Darkwood (Zalantar) za
  • Dlarun dl
  • Dragonbone db
  • Dragonfang df
  • Dragonhide dh
  • Dragonscale ds
  • Duskwood du
  • Fever Iron fr
  • Fiendbone fb
  • Frystalline fy
  • Gold go
  • Hide hi
  • Hizagkuur hz
  • Laminated Steel ls
  • Living Metal lm
  • Mithral mi
  • Obsidian ob
  • Pandemonic Silver ps
  • Platinum pt
  • Serren se
  • Silver sv
  • Solarian Truesteel tr
  • Sondarr so
  • Suzailian Chainweave ch
  • Weirwood ww
  • Ysgardian Heartwire ys

Quality

  • Arcane Spell Failure -10% asf1
  • Drowcraft dc
  • Masterwork mw
  • Plus one e1
  • Poor po
  • Armour Class +1 ac1
  • Bonus Spell, Level 0 sb0
  • Bonus Spell, Levels 0, 1, 2 sb012
  • Damage Resistance 1 dr1
  • Damage Resistance 5/magic dr5m
  • Damage Resistance Fire 5 drf5
  • Feat: Alertness fale
  • Feat: Ambidexterity famb
  • Feat: Combat Casting fcca
  • Feat: Darkvision fdar
  • Feat: Dodge fdod
  • Feat: Extra Turning fext
  • Feat: Mobility fmob
  • Feat: Spell Focus (One) fsf1
  • Feat: Spell Penetration fpen
  • Feat: Two Weapon Fighting ftwf
  • Feat: Weapon Finesse fwfi
  • Spell Immunity, Level 0 si0
  • Spell Resistance 12 sr12
  • Freedom of Movement fom
  • Immunity: Death Magic ide
  • Immunity: Disease idi
  • Immunity: Drain idr
  • Immunity: Fear ife
  • Immunity: Gas iga
  • Immunity: Magic Missle imm
  • Immunity: Paralysis ipa
  • Immunity: Poison ipo
  • Save, Acid +1 sac1
  • Save, Cold +1 sco1
  • Save, Death +1 sde1
  • Save, Disease +1 sds1
  • Save, Fear +1 sfe1
  • Save, Fire +1 sfi1
  • Save, Fort +1 sfo1
  • Save, Mind +1 smi1
  • Save, Negative +1 sne1
  • Save, Poison +1 spo1
  • Save, Reflex +1 sre1
  • Save, Sonic +1 sso1
  • Save, Universal +1 sa1
  • Save, Will +1 swi1
  • Hide +1 hi1
  • Damage, Acid +1 da1
  • Damage, Bludgeoning +1 db1
  • Damage, Cold +1 dc1
  • Damage, Divine +1 dd1
  • Damage, Fire +1 df1
  • Damage, Magic +1 dm1
  • Damage, Negative +1 dn1
  • Damage, Piercing +1 dp1
  • Damage, Slashing +1 ds1
  • Damage, Sonic +1 do1
  • Feat: Cleave fcle
  • Feat: Disarm fdis
  • Feat: Improved Critical ficr
  • Feat: Point Blank Shot fpbs
  • Feat: Rapid Shot frap
  • Feat: Weapon Specialisation fwsp
  • Keen ke
  • Massive Criticals +1 mc1
  • Mighty +1 m1
  • Sure Striking sst
  • Vampiric +1 dv1
  • Wounding +1 dw1

CLASSIFICATION This is added in the toolset with a string seperated by the '|' character for each category. The HDMs of every server are free to make their own rules as too where items should be placed, but be aware the DM client cannot see more than one step "deep" into the category tree.

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 &amp; 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.

 

DM Bonus XP

DM Bonus XP

Bonus XP operates outside of the context of criteria-based Quest XP. It takes the form of a small one-off rewards of 10 XP, and can be triggered by anything from a particularly clever idea, to a perfect piece of role-play representing a PC’s personality, to anything that significantly adds to the general enjoyment of the other players – and DMs. Bonus awards should be made sparingly, but often enough to provide general encouragement for players. Bonus awards are made via the ALFA XP Bonus Cookie Widget.

CombatXP

Combat XP

Combat XP is calculated from the CR of defeated creatures, adjusted by the relative strength of the combatants (the ‘Danger Factor’) and is handled entirely by the ACR. For information purposes, the calculation is as follows:

 
  • XP = ( 20 * ( CR ^ 0.6 ) ) * DF

The ‘Danger Factor’ calculation is:

 
Danger Factor
(ECL – CR) DF
lower than -3 0.1
-3 0.33
-2 0.5
-1 0.67
0 1
1 1.5
2 2
3 2.5
4 3
greater than 4 3.5

This table is presented for informational purposes only, as the awarding of combat XP is handled mechanically by the platform.

DM Quest XP

DM Quest XP

DM Quest XP awards take two main factors into account:

  • the challenge faced by the PCs; and,
  • the success of the PCs in overcoming that challenge.

The same quest can present a significantly different challenge to differently constituted parties. Cleric-heavy parties will find defeating undead a lot easier than others, while Rogue-heavy parties are a lot less susceptible to ambush and a lot more capable of overcoming trap-laden dungeons. PCs should not be over-rewarded for overcoming challenges that are inherently easy for them; but nor should they be penalized for facing challenges that they are necessarily unprepared for. PCs should also not be unduly penalized for being effective: if a particular tactic surprises a DM and neutralizes a significant part of the challenge that the players are facing, it may be appropriate to reduce the ‘Challenge’ element – but increase the ‘Success’ element for the overall quest. Effectively, when one or another element is significantly increased or decreased, it is appropriate to increase or decrease the level of the award by a single band.

Awards are made for fixed amounts, by selecting the correct option on the ALFA XP Wand.

  • Easy (20 XP / RL hour):
    the PCs should be able to overcome the challenge without any difficulty;
    the PCs should be able to overcome the challenge using only their key strengths;
    there is no significant chance of death or other plot-related failure;
    significant outlay of resources is not required;
    the PCs should be able to proceed directly on to another immediately.
     
  • Normal (40 XP / RL hour):
    the PCs should be able to overcome the challenge without significant difficulty;
    the PCs should be able to overcome the challenge using their key strengths;
    there is no significant chance of death or other plot-related failure;
    significant outlay of resources is not required;
    the PCs should be able to proceed directly on to another quest with minimal recovery.
     
  • Serious (60 XP / RL hour):
     
    the PCs should have some difficulty in overcoming the challenge;
    the PCs should have to prepare and plan properly to overcome the challenge;
    the PCs will be required to use skills and abilities other than their key strengths in order to succeed;
    there is a chance of death, or other significant plot-related failure;
    some outlay of resources is required, including temporary items;
    some recovery and restocking will be necessary before the PCs can proceed further.
     
  • Exceptional (80 XP / RL hour):
    failure is a realistic possibility;
    the PCs will have to prepare and plan thoroughly in order to overcome the challenge;
    the PCs will be required to use skills and abilities that are the opposite of their key strengths in order to succeed;
    death or other significant plot-related failure is a realistic possibility;
    significant outlay of resources is required, including temporary items;
    a significant period of recovery and restocking will be necessary before the PCs can proceed further.

Example: Our party spend several IG days planning their raid on an orc camp, including making some specific tactical purchases – a Wand of Sleep and a half-dozen Antidote Potions – to exploit the weakness of the orc barbarians and counter one of their strengths (poisoned weapons). Our party is a traditional Fighter/Fighter/Cleric/Wizard/Rogue combination, but in order to make their approach to the orc camp undetected, they are required to be as stealthy as possible – not a key strength for the fighters and clerics and available only for the wizard by magical means. Their plan works and they successfully raid the camp, their stealthy approach and Wand of Sleep allowing them to neutralise the outlying guards before they can sound the alarm. They free a human slave, although they have to use several Antidote Potions, various healing abilities and potions, and several charges on the Wand of Sleep. Our party has successfully overcome a significant challenge by good use of their abilities and good planning. This quest would be properly assessed as ‘Serious’.

Example: Situation as above, but our party consists of three Fighters and two Clerics and their approach is to buff and slaughter. They fail to neutralise the outlying guards and the camp is alerted to their presence. They narrowly succeed in winning the ensuing mass melee and freeing the human slave. Although the final result may be similar, their approach has been significantly less successful than our first example, so it could be properly assessed as ‘Normal’.

Example: Situation as above, but this time our party consists of three Rogues and two Rangers, and their approach is to use stealth. They carefully reconnoitre the orc camp and are able to sneak in, assassinate the orc leader and liberate the slave, whose escape they facilitate with a series of Potions of Invisibility. While they may have arguably been the most successful of the three parties, they have not been significantly challenged: they have made use of a single set of abilities, key to their classes, that the orcs have been unable to counter. Again, this quest could be properly assessed as of ‘Normal’ difficulty.

Syndicate content