Patches
There are a various set of different versions of the game available. This explains the major differences and links to patch notes where possible and for the most modern patches post-1.69 the relevant script and engine changes.
The version identifier is also used for matching a module against a game edition for compatibility. For instance a NWN:EE 1.80 version of a module will be tagged in the module.ifo file under the "Mod_MinGameVer" string as 1.80, meaning you are unable to load this in a Diamond Edition version of the game at all.
With NWN:EE the versioning numbers got longer, information about this is available below. For NWN:EE specific functions you can find them categorised here.
Version Information
A written set of info on patch versions is available on nwn.wiki, which explains what "8166" or "1.80" means. Additionally patch notes will be copied there as a single searchable reference point.
1.69 - Diamond Edition
The last Bioware patch released 9th July 2004. The details of this and all the previous Bioware patches are available on the NWN Fandom Wiki Patch page.
1.70 - 1.73 Fan Patches
Shadooow created a set of Community Patches once Bioware had finished patching. These were numbered 1.70 - 1.72 (1.73 appears not to have come out so this version is essentially unused). This is still under development but contains no new scripting or engine functionality. You can find the vault page here.
1.74 - NWN:EE
The first versions of NWN:EE by Beamdog were beta versions before the game came out. We now step into using both a major ID and a development ID. Several development IDs are used throughout a major ID number. This means newer or older clients can connect to newer or older servers (eg; visual enhancements don't need a server to be updated, while a server running a script differently doesn't need the latest client). Major bumps are generally done for architecture reasons, or netcode reasons.
These are links to the various patches, any notable engine changes related to scripting, or script events/fixes, will be noted to the side.
- 1.74.8159 February 15th, 2018. Earliest beta from Beamdog. Some versions were released before this (outside of Steam) but for reference all those patch notes seem unavailable so adding here what was added:
- Added script commands:
- SetTag
- DestroyArea / CopyArea / CreateArea
- SetTransitionTarget
- GetAbilityPenaltyLimit / SetAbilityPenaltyLimit
- GetAbilityBonusLimit / SetAbilityBonusLimit
- GetDamageBonusLimit / SetDamageBonusLimit
- GetSavingThrowBonusLimit / SetSavingThrowBonusLimit
- GetSkillBonusLimit / SetSkillBonusLimit
- GetCreatureExploresMinimap / SetCreatureExploresMinimap
- GetTileExplored / SetTileExplored
- GetEffectCasterLevel
- GetEffectDuration / GetEffectDurationRemaining
- GetEffectTag / TagEffect
- GetFirstArea / GetNextArea
- GetGroundHeight
- GetHiddenWhenEquipped / SetHiddenWhenEquipped
- GetItemPropertyDuration / GetItemPropertyDurationRemaining
- GetItemPropertyTag / TagItemProperty
- Added script commands:
- 1.74.8160 February 23rd, 2018 - Toolset script compiler memory leak fix
- 1.74.8161 February 28th, 2018
- 1.74.8162 March 5th, 2018 - GetIsPlayerConnectionRelayed added
- 1.74.8163 March 7th, 2018
- 1.74.8164 March 16th, 2018 - GetEventScript, SetEventScript added
- 1.74.8165 March 22nd, 2018
- 1.74.8166 March 23rd, 2018
1.74.8166 was the release version of NWN:EE, which was released fully on March 27th 2018.
- 1.74.8167 April 10th, 2018
- 1.74.8168 April 17th, 2018 - Double quotes (") in a string can now be escaped in nwscript (\").
- 1.74.8169 April 27th, 2018 - GetObjectVisualTransform, SetObjectVisualTransform added
- 1.74.8170 May 4th, 2018 - SetMaterialShaderUniformInt, SetMaterialShaderUniformVec4, ResetMaterialShaderUniforms added
- 1.74.8171 May 11th, 2018 - fixed the following script events for player characters: OnSpellCastAt, OnMeleeAttacked, OnPerception, and OnCombatRoundEnd.
- 1.74.8172 May 18th, 2018
1.75
- 1.75.8174 May 25th, 2018 - fixed OnMeleeAttacked and OnDamaged not firing on creatures.
- 1.75.8175 May 30th, 2018 - fixed SetTransitionTarget did not always propagate changes to clients
- 1.75.8176 June 1st, 2018
- 1.75.8177 June 15th, 2018
- 1.75.8178 June 22nd, 2018
1.76
1.76 is a single release version
76.8179
- 1.76.8179 July 6th, 2018 RC
- 1.76.8179 July 11th, 2018 Release - Script Compiler: We now allow escaping backslashes (“\”).
1.77
This added NWSync to the game.
- 1.77.8180 September 20th, 2018 - Toolset: The compiler include limit has been bumped to 128.
- 1.77.8181 September 27th, 2018 - RC release
- 1.77.8181 October 2nd, 2018 - Stable 1.77 release
- 1.77.8182 October 20th, 2018 - NWsync experimental support
- 1.77.8183 October 24th, 2018
- 1.77.8184 November 2nd, 2018
- 1.77.8185 November 13th, 2018
1.78
This began the Android beta and feature parity.
- 1.78.8186 November 15th, 2018
- 1.78.8186 November 20th, 2018 - Stable 1.78 release. Fixes a bug in RetrieveCampaignObject
- 1.78.8187 December 21st, 2018
- 1.78.8188 August 6, 2019. Added ruleset.2da, plus other major 2da changes for classes/races. Fixes for SetPhenoType, SetName. New script functions introduced:
- 1.78.8189 August 14th, 2019 - The effect limit accessors now adhere to the configuration constraints. Values set through these will always override the user-configured values for the running module only.
- 1.78.8190 September 26th, 2019 - Fixed GetEffectSpellId so it returns -1 on invalid.
- 1.78.8191 October 1st, 2019
1.79
- 1.79.8192 October 10th, 2019 - Toolset upgraded to later C++ compiler. Has additional transform features, and tabs for multiple areas being open.
- 1.79.8193 December 2nd, 2019 - RC.
- 1.79.8193 December 3rd, 2019 - Stable release of 1.79 - The features below may have been in past versions - the patch notes on steam are not the best!
- New development features:
- Debug Menu (CTRL + SHIFT + F12)
- "development" folder that loads changes live in-game and is priority loaded above override folder, erf, hak and module files
- Aave added a script command to JIT-compile and run a chunk of NWScript.
- New script commands (Some available in previous development versions):
- Fixes:
- SetPhenoType: The constraint condition was too narrow in clamping the phenotype; this has been fixed.
- SetName() on areas now sends the configured language, instead of English.
- CopyObject now copies plot flag on creatures and items.
- Fixed StoreCampaignObject/RetrieveCampaignObject() not properly storing/retrieving the faction of a creature.
- A bug in the creature serialisation code (for StoreCampaignObject) has been addressed where it would erroneously embed transient object IDs for inventory items, resulting in issues when loading this creature again in a persistent world setting.
- Player characters stored/copied now end up in the Commoner faction (it used to be a the PC faction; with no valid party).
- Script calls that serialise/deserialise objects (StoreCampaignObject and CopyObject as of now) can now work with the following object types: Creatures, Items, Placeables, Waypoints, Stores, Doors, Triggers.
- (GetAbilityBonusLimit etc. related) The effect limit configuration keys have been uncapped. They used to be limited to [1, default]; they now are [0, 255]. Beware: You may run into strange behaviour if you exceed a total bonus/penalty of -128, 127 or 255 regardless of configuration; since some values are internally typed with 8 bits.
- Scripting: The effect limit accessors now adhere to the configuration constraints. Values set through these will always override the user-configured values for the running module only.
- New development features:
- 1.79.8193.1 December 6th, 2019 - Class Stat Gain: We fixed the NWScript function GetAbilityScore() not including glass stat gain abilities when calculating the return value.
- 1.79.8193.2 December 9th, 2019
- 1.79.8193.3 December 10th, 2019
- 1.79.8193.4 December 13th, 2019 - The script call ActivatePortal() has been fixed to no longer show “Cryptographic Handshake Error”. A small memory issue in RESREF handling was addressed, that could occasionally crash clients when transitioning via ActivatePortal().
- 1.79.8193.5 December 19th, 2019 - Fixed CopyObject not duplicating a item if the target inventory or location was not valid.
- 1.79.8193.6 January 13th, 2020 - Base Items can have non-hardcoded feats for each of the focus, specailization, etc. You can have some custom spellcasters - kind of. New scripting function SetTextureOverride.
- 1.79.8193.7 February 27th, 2020 - Fixed GetCasterLevel() on AOEs/SLAs erroneously invalid values. CopyObject() with a new tag specified no longer erroneously adds the object to the old tag lookup. ActivatePortal() now properly uses relays if needed. The script editor no longer freezes when trying to compile **/**.
- 1.79.8193.8 - GetSpecialization, GetDomain, PostString added. New pathfinder added.
1.80
- 1.80.8193.9 March 17th, 2020. Stable 1.80, fixes and features as per previous release.
- 1.80.8193.10 April 9th, 2020
- Added GetPlayerBuildVersionMajor and GetPlayerBuildVersionMinor
- Script errors are now logged to the server log.
- SetEventScript properly returns TRUE on success.
- SetEventScript no longer crashes when passing in invalid constants.
- GetCampaignVector now properly returns the Z value of stored vectors.
- ActivatePortal no longer erroneously shows character selection if a character is sent along.
- Script/effect timers no longer overflow when the duration is more than a day.
- PostString() strings are no longer hidden when the radial menu opens.
- BootPC() no longer crashes the server if called twice on the same player.
- Fixed a memleak in AssignCommand, DelayCommand, ActionDoCommand
- Access violation when compiling scripts with nested structs has been fixed.
- 1.80.8193.11 April 24th, 2020
- GetSpellSaveDC now uses the SpellcastingAbility column, instead of the PrimaryMod column.
- A pathfinding issue in ActionRandomWalk() was fixed, where calling the function sometimes did nothing.
- PostString() strings are now rendered in sort order.
- 1.80.8193.12 May 6th, 2020
- Fix script commands not properly accessing area UUIDs. #41
- DestroyArea() now behaves the same as DestroyObject(): Instead of destroying the area immediately, it schedules it for removal immediately after script exit. This fixes accessing freed memory when destroying an area from an area event.
- GetCasterLevel() now returns 0 for AOEs instead of crashing. #34
- 1.80.8193.13 - Stable and contains fixes/new things from above, still 1.80 (modules are backwards comaptible to 1.80.8193.9), but more feature complete.
1.81
- 1.81.8193.15 - Stable version of .14 which was just preview.
- Large number of functions, alterations and additions. Note older network-compatible versions may not see the effects of these client side in some cases (Eg; visual transforms).
- Added functions:
- GetIsPlayerDM
- GetScriptParam SetScriptParam
- SQLite functions
- EnterTargetingMode, GetTargetingModeSelectedObject, GetTargetingModeSelectedPosition, GetLastPlayerToSelectTarget
- GetItemPropertyUsesPerDayRemaining, SetItemPropertyUsesPerDayRemaining, ActionUseItemOnObject, ActionUseItemAtLocation
- SetObjectHiliteColor
- SetObjectMouseCursor
- ReplaceObjectTexture
- SetAreaWind
- EffectVisualEffect, EffectBeam new parameters for scale, translation and rotation
- StringToObject
- A number of script function and script VM engine fixes implemented
- Locals are now much faster - Maximum O(n) to find one among thousands, and usually much faster.
- weathertypes.2da, progfx.2da added - main effect is other existing script functions can now use more weather (SetWeather) and have better visual effects (EffectVisualEffect)
- 1.81.8193.16 - Hotfix for some issues with 1.81.8193.15. Only nwscript change was a slight update to StringToObject description.
- 1.81.8193.17 (beta) - Bugfixes and nwsync changes and a new function:
1.82
- 1.82.8193.20. Stable version of 1.81.8193.17, nothing new but bumped toolset version and bugfixes from the beta.
1.83
- 1.83.8193.21 (beta) and 1.83.8193.23 (final)
- Added functions:
- GetCurrentlyRunningEvent
- GetEffectInteger, GetEffectFloat, GetEffectString, GetEffectObject, GetEffectVector
- GetBaseItemFitsInInventory
- GetLocalCassowary, SetLocalCassowary, DeleteLocalCassowary, CassowaryReset, CassowaryConstrain, CassowarySuggestValue, CassowaryGetValue, CassowaryDebug.
- SetTlkOverride
- ItemPropertyCustom
- Altered functions:
- SetObjectVisualTransform for lerping
- Game: Fixed ResistSpell() when called from AOE spell scripts.
- Game: Don’t use weapon AB for ranged touch attacks anymore. (TouchAttackRanged and TouchAttackMelee).
- VM: Fixed crash when calling DestroyArea on a invalid object.
- VM: Stopped ExecuteScriptChunk from writing “!chunk.ndb” to override.
- VM: sqlite commands: Added missing newline in log output.
- VM: Fixed issue in string handling (also: VM: SubString()) that would have resulted in memory leaks or crashes.
- Added functions:
- Various fixed to pathfinding. Affects many movement functions, ActionMoveToObject fRange was also fixed
- We’ve revived the script debugger with several improvements:
- Added back script debugger binary into bin/win32/.
- Added configuration keys to UI.
- Fixed incorrect address parsing resulting in it not connecting. Also fixes setting debugger addresses other than localhost.
- Fixed heap overflow parsing NDB files resulting in crashes.
- Now renders all internal fields of CGameEffect.
- Now renders all internal state of CScriptEvent.
- Now renders cswysolver and sqlquery types instead of crashing in pitiful confusion.
- Will no longer attempt to launch from within nwmain, you now need to run the binary by hand. On the plus side, it should now work on Linux and Mac (via wine/wine32to64).
1.84
- 1.84.8193.29 (development only)
- Added functions:
- Altered functions:
- ActionMoveToObject fRange change reverted to fix some older modules (since default fRange is 2.0)
- GetCurrentlyRunningEvent now has param bInheritParent for cases such as Creature OnDeath/OnDamaged returning the wrong event ID otherwise.
- EndGame: We no longer show the Bioware credits for all modules; only the last module in each main campaign.
- EndGame: Fixed error/crash when calling EndGame(""). Now the game shows no movie instead, and just quits the main menu.
- Fixed functions:
- Fixed CopyObject not triggering the areas OnEnter (fixes HotU Beholder caves anti-magic restore)
- Fixed SetCampaignString(, “”) resulting in a SQL error. Now it deletes the variable from the database instead. It now also deletes entries when other types are “empty”.
- EffectAreaOfEffect: Fixed Area Of Effect sometimes not returning the expected objects due to local object positions in memory not updating correctly. #52
- CassowaryConstrain: Fixed a crash when calling AddConstraint with invalid math formula. #293
- CreateArea, CopyArea and DestroyArea:
- We had to change how Create/Copy/DestroyArea works. Most prominently:
- Areas you create via Create/Copy now have their own auto-generated resref in the nw_ namespace; they no longer have the same resref as the originating area/template. You cannot influence this. nw_ is also the same namespace that the toolset reserves for game-builtin content, so you shouldn’t be able to clobber into it. Instanced areas go into CURRENTGAME:, until they are saved into a .sav. (This also means you can CreateArea with the new template, if you really wanted, though why would you? You’d get the area as it looked like at original instantiation time)
- Areas are now saved to savegames correctly and savegames no longer corrupt when the area count changes.
- Savegames now also store a serialised image of the .are data.
- This means that CreateArea(“originalresref”) in savegames will now instance the area as saved in the savegame, NOT as designed in the toolset. This is because modules don’t actually load anymore after a savegame; the savegame replaces the original module.
- CopyArea now supports assigning a new tag and name directly on instantiation.
- This is a high-risk change, as it touches significant parts of the area load codepath. We’d appreciate thorough testing.
- We had to change how Create/Copy/DestroyArea works. Most prominently:
- SQLite:
- Config: New option to enable SQLite API tracing to the server log: Show all queries, or just show queries running longer than N msec.
- Core: Upgraded SQLite to version 3.36.0.
- SQLite: soundex() now available to scripting. https://sqlite.org/lang_corefunc.html#soundex
- SQLite: Math functions now available to scripting. https://sqlite.org/lang_mathfunc.html
1.85
- 1.85.8193.30 (development)
- Added functions:
- For OnPlayerTileAction event (also surfacemat.2da was updated):
- For OnPlayerGuiEvent event:
- SetGuiPanelDisabled
- Altered functions:
- PopUpGUIPanel - additional GUI_PANEL_* options added
- Bug fixes:
- Game: Fixed placeables not bumping creatures out of the way when being spawned into an area. #349
- Game/VM: Fixed Get*DurationRemaining returning the wrong value due to time overflow.
- Added functions:
- 1.85.8193.31 (further development)
- Added datatype:
- Added constants:
- GUIEVENT_* additions compared to last development version
- JSON_TYPE_*
- PLAYER_DEVICE_PROPERTY_*
- PLAYER_LANGUAGE_*
- PLAYER_DEVICE_PLATFORM_*
- RESTYPE_*
- EVENT_SCRIPT_MODULE_ON_NUI_EVENT
- Added functions:
- JsonParse, JsonDump, JsonGetType, JsonGetLength, JsonGetError
- JsonNull, JsonObject, JsonArray, JsonString, JsonInt, JsonFloat, JsonBool
- JsonGetString, JsonGetInt, JsonGetFloat,
- JsonObjectKeys, JsonObjectGet, JsonObjectSet, JsonObjectDel
- JsonArrayGet, JsonArraySet, JsonArrayInsert, JsonArrayDel
- ObjectToJson, JsonToObject
- JsonPointer, JsonPatch, JsonDiff, JsonMerge
- GetLocalJson, SetLocalJson, DeleteLocalJson
- SqlBindJson, SqlGetJson, SetCampaignJson, GetCampaignJson
- GetPlayerDeviceProperty, GetPlayerLanguage, GetPlayerDevicePlatform
- TemplateToJson
- ResManGetAliasFor, ResManFindPrefix
- NuiCreateFromResRef, NuiCreate
- NuiFindWindow, NuiDestroy
- NuiGetEventPayload, NuiGetEventPlayer, NuiGetEventWindow, NuiGetEventType, NuiGetEventElement, NuiGetEventArrayIndex
- NuiGetWindowId, NuiGetBind, NuiSetBind, NuiSetGroupLayout, NuiSetBindWatch
- NuiGetNthWindow, NuiGetNthBind
- NuiGetUserData, NuiSetUserData
- Added functionality:
- Script compiler now supports `\xFF` style escape sequences to put arbitrary bytes into a string literal. NB: \x00 will terminate the string, do not use.
- StoreCampaignObject/RetrieveCampaignObject, SqlBindObject, SqlGetObject, ObjectToJson, and JsonToObject and CopyObject now support an additional parameter; bSave/LoadObjectState; which handles local variables, effects, action queue and transition info (for doors and triggers).
- Bug fixes:
- Game: Fixed savegames causing creatures in areas re-triggering the OnAreaEnter event. This was causing HotU chapter 3 to malfunction after saving and loading.
- VM: Fixed crash in CreateArea() due to heap-use-after-free
- VM: Fixed a crash when SetTextureOverride/ReplaceObjectTexture was targeting a missing/invalid resource.
- VM: Fixed a memleak every time CopyObject, CreateObject or CreateArea was called.
- VM: Area serialisation: Do not save item state twice to GFF (this would needlessly duplicate temporary effects and local vars into savegames and serialised objects).
- 1.85.8193.32 Stable
- Renderer: Fixed SetTextureOverride() not working for custom content.
- Nui/Scriptable UI: Fixed combo() widget not decoding UTF8 correctly.
- ResMan: Fixed RESTYPE_JUI having the wrong ID, and added to nwscript.nss.
- nwscript.nss: Minor text/documentation updates.
1.86
- 1.86.8193.34
- Nui fixes:
- Nui: Fixed crash when calling NuiSetGroupLayout() with invalid data.
- Nui: Fixed scrollbar size for textedit.
- Nui: Text can now override border and scrollbars properties.
- Nui: Fixed draw_list scissoring breaking succeeding widget rendering.
- Nui: Fixed draw_list scissoring leaving a stale scissor on the GL stack for nested widgets.
- Nui: Fixed entries in a list view not scissoring draw_list correctly when scrolling out of view.
- Nui: list(): Fixed textedit() widget not working in lists.
- Nui: list(): Scrollbars now configurable.
- Nui: list(): Fix spacers not advancing row layout correctly.
- Nui: Never allow binds to update during construction. This fixes list() array binds degrading to scalar values, among other.
- Nui: textedit(): Fixed placeholder sometimes rendering on the succeeding widget instead.
- Nui: textedit(): Fixed range event triggering too often or with wrong values.
- Nui: Added demo code for spreadsheet UI.
- Nui: Fixed “list” widget not showing a vertical scrollbar in AUTO mode.
- New script commands:
- Nui fixes:
1.87
- There are large number of bug fixes and changes, client and server side, see notes for extensive reading.
- Various NUI updates which affect the NUI functions/JSON
- Various ruleset.2da additions
- Script Compiler:
- Now accepts string constants in case statements. See HashString() function in nwscript.nss.
- Increased max identifier count from 16384 to 65536.
- Increased max string constant size from 512 to 8192.
- Increased max include files from 128 to 512.
- New functions along with associated new constant groups:
- UnyieldingEffect()
- IgnoreEffectImmunity()
- SetShaderUniformFloat(), SetShaderUniformInt(), SetShaderUniformVec()
- SetSpellTargetingData(), SetEnterTargetingModeData()
- GetMemorizedSpellCountByLevel(), GetMemorizedSpellId(), GetMemorizedSpellReady()
- GetMemorizedSpellMetaMagic(), GetMemorizedSpellIsDomainSpell()
- SetMemorizedSpell(), SetMemorizedSpellReady(), ReadySpellLevel()
- ClearMemorizedSpell(), ClearMemorizedSpellBySpellId()
- GetKnownSpellCount(), GetKnownSpellId(), GetIsInKnownSpellList()
- GetSpellUsesLeft(), GetSpellLevelByClass()
- ReplaceObjectAnimation()
- SetObjectVisibleDistance(), GetObjectVisibleDistance()
- SetGameActivePause(), GetGamePauseState()
- SetGender()
- SetSoundset(), GetSoundset()
- SetCommandingPlayer()
- SetCameraLimits(), SetCameraFlags()
- RegExpMatch(), RegExpIterate(), RegExpReplace()
- ResManGetFileContents()
- CompileScript()
- AttachCamera()
- GetObjectUiDiscoveryMask(), SetObjectUiDiscoveryMask()
- SetObjectTextBubbleOverride()
- ClearObjectVisualTransform()
- GetLastGuiEventVector()
- GetAreaLightColor(), SetAreaLightColor()
- GetAreaLightDirection(), SetAreaLightDirection()
- AbortRunningScript()
- GetScriptBacktrace(), GetScriptRecursionLevel()
- SetJmp(), LongJmp(), GetIsValidJmp()
- GetScriptName(), GetScriptChunk()
- EffectPacified(), EffectBonusFeat(), EffectTimeStopImmunity(), EffectForceWalk()
- GetPlayerBuildVersionPostfix(), GetPlayerBuildVersionCommitSha1()
- GetEffectLinkId()
- GetFeatRemainingUses()
- GetTileID(), GetTileOrientation(), GetTileHeight()
- SetTile(), SetTileJson()
- SetTileAnimationLoops()
- ReloadAreaGrass(), ReloadAreaBorder()
- SetEffectIconFlashing()
- GetPCItemLastEquippedSlot(), GetPCItemLastUnequippedSlot()
- GetSpellCastSpontaneously(), GetLastSpellLevel(), GetSpellFeatId()
- SqlResetQuery()
- GetTickRate(), GetMicrosecondCounter()
- HashString()
- Updated functions:
- SetUseableFlag() now also works on Doors, Creatures and Items.
- GetItemAppearance() now works with per-part colors.
- GetFirstObjectInArea()/GetNextObjectInArea now has a nObjectFilter parameter.
- SetName() now works for player characters.
- SetObjectVisualTransform() can now target sub-models (e.g. HEAD, WING, TAIL, CLOAK).
- SetObjectVisualTransform() now has nRepeatsRemaining and nBehaviorFlags parameters.
- SetGuiPanelDisabled() now has an oTarget parameter.
- GetPlayerDeviceProperty() can now query most client config values.
- GetEffectInteger() now works on the complete range of integers for EffectDamage.
- ActionUseFeat() now allow subfeats to be used and locations to be targeted.
1.88
- Added:
- Added nwscript support for raw string literals: r".." and R"..", which can also span multiple lines.
- Added new GUI events: GUIEVENT_CHATLOG_PORTRAIT_CLICK and GUIEVENT_PLAYERLIST_PLAYER_TELL.
- New functions:
- SetEffectCreator(), SetEffectSpellId(), SetEffectCasterLevel()
- SqlGetColumnCount(), SqlGetColumnName()
- GetSpellAbilityCount(), GetSpellAbilitySpell(), GetSpellAbilityCasterLevel(), GetSpellAbilityReady(), SetSpellAbilityReady()
- JsonObjectSetInplace(), JsonObjectDelInplace(), JsonArraySetInplace(), JsonArrayInsertInplace(), JsonArrayDelInplace()
- SetAreaGrassOverride(), RemoveAreaGrassOverride(), SetAreaDefaultGrassDisabled()
- SetAge(), JsonToTemplate()
- GetAttacksPerRound(), EffectEnemyAttackBonus()
- SetAreaTileBorderDisabled(), GetAreaNoRestFlag(), SetAreaNoRestFlag()
- StartAudioStream(), StopAudioStream(), SetAudioStreamPaused(), SetAudioStreamVolume(), SeekAudioStream()
- Function changes
- GetHasFeat() now has bIgnoreUses parameter.
- SetObjectTextBubbleOverride() now works for items in inventories.
- ActionCastSpellAtObject(), ActionCastSpellAtLocation() now have nClass and bSpontaneousCast parameters.
- ResManGetFileContents() can now return binary data in base64 or hex encoding.
- TemplateToJson() and JsonToTemplate() now also support RESTYPEs: DLG, UTS, IFO, FAC, ITP, JRL, GUI, GFF.
- SqlPrepareQueryObject() temporary databases are now entirely in-memory (:memory:).
- FloatingTextStringOnCreature(), FloatingTextStrRefOnCreature() now have bChatWindow parameter.
- GetLastSpellCastClass() now returns the AOE creator's class in AOE scripts.
- EffectDamageResistance() and EffectDamageReduction() now have a bRangedOnly parameter.
- GetEffectType() now has a bAllTypes parameter.
- NuiCreate() and NuiCreateFromResRef() now have a sEventScript parameter.
- GetItemPossessor() now has a bReturnBags parameter.
- GetResRef() now works with encounter objects.
- EffectDispelMagicAll(), EffectDispelMagicBest() made consistent with new caster level calculations and will always utilize stored caster level of effects.
- Area of Effect objects now consistently store and retrieve their caster level (GetCasterLevel) and spell ID (GetSpellId).
- NUI:
- Added image_region property for image button widgets.
- Added window title text coloring.
- Added window size and edge constraints.
- Added support for binding array data in draw lists (except inside list views).
- Added support for _RECT type in draw lists.
- Added text and number transformation parameter support to binds (e.g. render a int as hex).
- Added support for custom fonts for whole windows, layout groups, and individual widgets.
- Compiler:
- For loops can now take non-integer expressions in the first and third part of a loop statement. (e.g. floating point values now work).
- Parser now understands floating point values such as 0f, .0 and .42f.
- const declarations can now contain any constant expression (such as arithmetic), including previously defined consts.
- Fixed structures passed using the ?: operator causing a bad compiler state.
- Fixes related to scripting:
- Fixed a server crash that could happen if a creature died during the EffectRunScript interval script.
- Fixed issue where EffectEntangle and other effects stopping movement sometimes left dexterity on 3.
- Fixed Effect Icons (EffectIcon) getting removed from the top bar if there are icons from permanent effects still in effect.
- Fixed a memory leak in the RandomName() nwscript function.
- Fixed ItemPropertyCustom() returning a valid itemproperty if a required parameter was -1.
- Fixed GetAreaLightDirection() causing scripting errors.
- Fixed GetAssociate() to honor the nAssociateIndex parameter for Dominated Associates.
- Fixed DecrementRemainingFeatUses() to work correctly on NPCs using feats with successors when they don't have the some of the intermediate feats.
- Fixed SetWeather() causing the weather effects to disappear if setting the type to the already current.
- Fixed EffectModifyAttacks() not recalculating total bonus attacks when being applied.
- Fixed LongJmp() incorrectly modifying some passed return values.
- Fixed SetCreatureBodyPart() erroneously modifying equipped armor.
- Fixed SetCreatureBodyPart() changes only being seen by a single client in multiplayer.
- Fixed SetCreatureBodyPart() failing to update some armor appearances if no skinmesh was used.
- Fixed SetMaterialShaderUniformVec4(), SetMaterialShaderUniformInt calls not propagating to head/wing/tail/cloak models.
- Fixed SetFacing() not sending updates to clients for changes of less than 20 degrees.
- Fixed SetCreatureAppearanceType() not updating all appearance related variables.
- Fixed CopyItem() not copying the hidden when equipped field.
- Fixed SetObjectUiDiscoveryMask() while holding TAB not taking effect until release.
- Fixed EffectDamageReduction() not always being checked on placeables and doors when other effects are applied.
- Fixed PCs not being searchable with GetObjectByTag() after relogging.
- Fixed sqlite database transaction rollback not working correctly in DelayCommands.
- Fixed the encounter object support in ObjectToJson(), CopyObject(), SqlBindObject(), StoreCampaignObject().
- Fixed effect links not being retained after relogging on a server.
- Fixed traps created by nwscript not being detectable until after a save/load cycle. (JsonToObject)
- Fixed a visual corruption when modifying armor that is hidden.
- Fixed ActionUseFeat() with an invalid target to queue a combat feat against the current target the creature is attacking.
- Fixed GetName() description in nwscript.nss.
- Fixed SetObjectUiDiscoveryMask() description in nwscript.nss.
- Fixed SetBaseAttackBonus() description in nwscript.nss to properly describe how it works on PCs.
- Scripting Performance improvements
- Optimized instruction decoding in the nwscript VM.
- Optimized instruction counting in the nwscript VM.
- Optimized how strings are pushed and popped on the nwscript VM stack.
- Optimized how string and json constants work in the nwscript VM.
- Added a second pass over the generated bytecode to meld some redundant instructions together.
- Where possible, expressions are now evaluated at compile time (instead of runtime).
1.89
- Game scripting specific:
- The new limit for NWScript instructions per script runtime is 1024k, up from 128k.
- The nwscript instruction limit configuration was removed. Please adjust all your scripts to check runtime with GetScriptInstructionsRemaining() if needed instead of advising people to just increase the value.
- NWScript debug widget now defaults to (monospace) font.
- Script compiler:
- scriptcomp: Added support for constant folding of unary operators -, ! and ~.
- scriptcomp: Added support for __FUNCTION__, __FILE__,__LINE__, __DATE__ and __TIME__.
- scriptcomp: The compiler now prints additional info on error messages.
- scriptcomp: Added support for hashed string literals, h"..." and H"...".
- scriptcomp: Optimized the common for loop construct for (i = 0; i < N; ++i).
- scriptcomp: Will optimize away dead branches when an if condition is a constant.
- New functions:
- Function changes:
- VM: EffectPolymorph() can now have a customised polymorph removal VFX and can set an ability modifier and caster level for the 3 polymorph spells cast from it.
- Polymorph: The save DC for the 3 polymorph spell-like abilities is now set to 10 + Innate Spell Level + Ability Modifier (the ability to use is set in EffectPolymorph or defaulting to the class who used the polymorph ability/spell, falling back to class slot 0 if necessary).
- Polymorph: The caster level of the 3 polymorph spell-like abilities is tied to the caster level of the polymorph effect by default, rather than being based on class slot 0 of the character.
- Polymorph: Clientside Levelups are disabled while polymorphed, and serverside now correctly validates against pre-polymorph racial type and statistics in case of legacy clients (although with certain custom content this fallback may still be buggy).
- Polymorph: bonus spell slots should no longer be lost or unreadied while polymorphed.
- Polymorph: Dying while polymorphed now properly applies pre-polymorphed item effects such as ability bonuses.
- Polymorph: Save games no longer re-apply temporary HP on each load of the game/re-entry into MP server.
- Polymorph: Save games now save out the state of the creatures pre-polymorph making valid BICs in save game files.
- Polymorph: Creature weapon proficiency is applied as a bonus feat effect not as an actual feat addition.
- Polymorph: Polymorph applied items are saved to the BIC consistently on logout/save game and reused when polymorph is applied on load/login rather than fresh items being applied.
- Polymorph: Loading a save game when polymorphed no longer causes extra OnPlayerEquipItem/OnPlayerUnequipItem events to fire (note: logging into an MP game still has odd events fire, excepting the OnPlayerUnEquip no longer fires for the players items when the polymorph effect loads, due to the order of BIC -> temporary user resource data).
- Polymorph: The effect is no longer is removed and reapplied on BIC export meaning linked effects do not end and events for item equips do not fire unnecessarily on saving the game or exporting player BIC.
- Polymorph: NATURALACBONUS is now actually a base natural AC change rather than a dodge AC effect, replacing NPCs base natural AC if present when polymorphed (PCs do not get any base natural AC so this is a slight buff).
- Polymorph: Fixed bonus spell slots being lost when using Shifter polymorph abilities.
- Fixed loading SoundSet column in polymorph.2da.
- VM: EnterTargetingMode() can now be cancelled.
- VM: Added SetIsDestroyable() oObject parameter to target a specific object.
- VM: Added oAttacker parameter to [[TouchAttackRanged][]().
- VM: Added oAttacker parameter to TouchAttackMelee().
- VM: Added oObject parameter to SetFacingPoint().
- VM: Added oObject parameter to SetFacing().
- VM: Added oFrom parameter to GetDistanceToObject().
- VM: Added oObject parameter to ClearAllActions().
- VM: Added parameter to EffectSpellFailure(), specifying the type of spell failure to use (allowing Arcane Spell Failure as an effect).
- VM: Added unique identifier for the source of EFFECT_TYPE_ABILITY_DECREASE (EffectAbilityDecrease) retrievable with GetEffectInteger(e, 2)
- VM: Added oObject parameter to GetLastOpenedBy().
- VM: Added oObject parameter to GetLastClosedBy().
- VM: Added oObject parameter to GetLastLocked().
- VM: Added oObject parameter to GetLastUnlocked().
- VM: Added oObject parameter to GetLastDisturbed().
- VM: Added oObject parameter to GetInventoryDisturbItem().
- VM: Added oObject parameter to GetInventoryDisturbType().
- VM: Added nSlotsToReady to ReadySpellLevel().
- VM: EffectSummonCreature() can now have arbitrary creatures added, and the unsummon VFX be changed or removed.
- VM: ActionOpenDoor() and ActionCloseDoor(): added bRun parameter.
- VM: GetSpellFeatId() and GetSpellCastSpontaneously() now work in Area of Effect scripts.
- VM: Added documentation to Object<>Json script functions to explain lack of ABI stability guarantees.
- EffectIcon: effecticons.2da can be used past line 255. Note: Older clients will simply not be sent icons past line 255.
- Sound object templates can now be serialized to json with TemplateToJson().
- Sound objects can now be serialized to json with ObjectToJson().
- Sound objects can now be created with JsonToObject() and will update the client.
- Sound objects can now be destroyed with DestroyObject().
- VM: EffectPolymorph() can now have a customised polymorph removal VFX and can set an ability modifier and caster level for the 3 polymorph spells cast from it.
- New constants:
- Added pre-existing SAVING_THROW_TYPE_PARALYSIS to nwscript.nss.
- Added missing platform MAC_ARM64 in nwscript.nss.
- Fixed:
- VM: Updated GetCasterLevel and GetSpellId nwscript descriptions to reflect updated functionality.
- Fixed SetShaderUniformVec()'s 4th float parameter clobbering the 3rd float parameter when saving as gff.
- VM: GetMetaMagicFeat, GetLastSpellCastClass, GetSpellCastSpontaneously and GetSpellFeatId are no longer set erroneously with bad data if the AOE was generated in a spell script when using an item.
- Fixed an ItemPropertyCustom() regression.
- Fixed GetDamageDealtByType() crashing the game when called on an invalid object.
- nw_inc_nui.nss now has toolset-compatible function comments and uses *Inplace json functions where appropriate.
- GetFirstInPersistentObject() now correctly errors when using any nPersistentZone value other than 0 on encounter objects.
- Fixed custom monster perception ranges (eg setting to "Long") are now saved and loaded properly, and correctly serialised with CopyObject/SqlBindObject
- Fixed ActionCastSpellAtObject and ActionCastSpellAtLocation() VM functions applying more metamagic then intended on Sorcerer-style casting classes when using METAMAGIC_ANY.
- Fixed EffectBeam being removed immediately when a creature dies.
- EffectSpellFailure is now defaults to being a magical subtype effect.
- EffectDamageImmunityIncrease / EffectDamageImmunityDecrease now correctly calculate the full immunity if applied when already at 100 / -100 immunity.
Preview Versions
Some new commands may be previewed in versions not for general release. These won't be documented here.