Skip to content

Releases: nwn-dotnet/Anvil

Release 8193.37.3

16 Nov 21:03

Choose a tag to compare

What's Changed

  • Add Additional GameObject cast checks by @jhett12321 in #842
  • Convert damager to NwGameObject instead of NwCreature by @Samuel-IH in #844
  • Add GetSpellLevelByClass replacement/overload to match base game function. by @jhett12321 in #845
  • Adding NwSpell to DamageEventData by @pyro7r34d in #846
  • Ignore unknown item event types instead of throwing exception. by @jhett12321 in #848
  • Update NWNX/NWN.Core/NWN.Native. by @jhett12321 in #849
  • Update GetFeatRemainingUses/GetFeatTotalUses to reflect NwScript API. by @jhett12321 in #847
  • Add additional verification for OpenSSL environment variable. by @jhett12321 in #850

New Contributors

Full Changelog: v8193.37.2...v8193.37.3

Release 8193.37.2

15 Jun 15:31

Choose a tag to compare

Changed

  • Improved invalid object detection in some edge cases.

Pull Requests

  • Check if resolved game object pointer matches object pointer. by @jhett12321 in #841

Full Changelog: v8193.37.1...v8193.37.2

Release 8193.37.1

06 May 16:53

Choose a tag to compare

Added

  • Events: Added OnItemDestroy event.
  • Events: Added OnItemDecrementStackSize event.
  • Events: Added OnCreatureAcquireItem event.
  • Events: Added OnTrapDisarm event.
  • Events: Added OnTrapEnter event.
  • Events: Added OnTrapExamine event.
  • Events: Added OnTrapFlag event.
  • Events: Added OnTrapRecover event.
  • Events: Added OnTrapSet event.
  • NwArea: Added GetLocalizedName method.
  • NwArea: Added SetLocalizedName method.
  • NwCreature: Added InitiativeRoll property getter/setter.
  • NwGameObject: Added GetLocalizedName method.
  • NwGameObject: Added SetLocalizedName method.
  • NwPlayer: Added PlayerPossessCreature method.
  • Added support for different [ScriptHandler] callback method signatures. The following signatures are now supported:
  void Handler();
  bool Handler();
  ScriptHandleResult Handler();
  void Handler(CallInfo callInfo);
  bool Handler(CallInfo callInfo);
  ScriptHandleResult Handler(CallInfo callInfo);

Package Updates

  • NWNX: 7fc892a -> 292a2c0
  • NWN.Core: 8193.37.2 -> 8193.37.3

Changed

  • Effect: Damage now supports optional damagePower parameter.
  • Events: OnUnacquireItem.Item is now nullable.

Fixed

  • Fixed some assertion failure messages from skipped events using CNWSMessage.
  • Fixed DMPossessCreature exception when player was a DM.
  • Fixed undefined behaviour when disposing function hooks/reloading anvil.

Pull Requests

Full Changelog: v8193.37.0...v8193.37.1

Release 8193.37.0

08 Mar 20:27

Choose a tag to compare

Added

  • Plugins: Added support to disable loading plugins on startup with new environment variable, ANVIL_PLUGINNAME_SKIP
  • Plugins: Implemented new API for loading/unloading isolated plugins at runtime.
    • To mark a plugin as "isolated", add the PluginInfo assembly attribute with Isolated = true.
    • To load the isolated plugin, call the PluginManager.LoadPlugin method.
    • To unload the isolated plugin, call the PluginManager.UnloadPlugin method.
  • PlayerDeviceProperty: Added new 8193.37 constants.
  • PlayerPlatform: Added new 8193.37 constants.
  • SavingThrowType: Added new 8193.37 constants.
  • SpellFailureType: Added new 8193.37 constants.
  • Effect: Added DamageIncrease overload with correct constants.
  • Effect: Added SummonCreature overload with NwCreature parameter instead of string ResRef.
  • ItemProperty: Added OnHitCastSpell overload with correct casterLevel parameter.
  • CreatureEvents.OnDamaged: Added GetDamageDealtByType method.
  • Events: Added OnPolymorphApply event.
  • Events: Added OnPolymorphRemove event.
  • OnSpellBroadcast: Added TargetObject, TargetPosition properties.
  • CreatureClassInfo: Added School property setter.
  • NwAreaOfEffect: Added SetRadius method.
  • NwCreature: Added AnimalCompanionName property setter.
  • NwCreature: Added AnimalCompanionType property setter.
  • NwCreature: Added FamiliarName property setter.
  • NwCreature: Added FamiliarType property setter.
  • NwCreature: Added ActionCloseDoor method.
  • NwCreature: Added ForceLevelUp method.
  • NwCreature: Added ActionOpenDoor method.
  • NwCreature: Added SpellResistanceCheck method.
  • NwCreature: Added SpellImmunityCheck method.
  • NwCreature: Added SpellAbsorptionLimitedCheck method.
  • NwCreature: Added SpellAbsorptionUnlimitedCheck method.
  • NwCreature: Added SummonAnimalCompanion method.
  • NwCreature: Added UnsummonAnimalCompanion method.
  • NwCreature: Added SummonFamiliar method.
  • NwCreature: Added UnsummonFamiliar method.
  • NwCreature: Added Unsummon method.
  • NwGameObject: Added IsDestroyable property.
  • NwGameObject: Added IsRaiseable property.
  • NwGameObject: Added IsSelectableWhenDead property.
  • NwItem: Added GetMinEquipLevelOverride, SetMinEquipLevelOverride, ClearMinEquipLevelOverride methods.
  • NwPlayer: Added Latency property.
  • NwPlayer: Added LatencyAverage property.
  • NwPlayer: Added CancelTargetMode method.
  • NwPlayer: Added UpdateCharacterSheet method.
  • NwPlaceable/NwTrigger: Added LockedBy property.
  • NwPlaceable/NwTrigger: Added UnlockedBy property.
  • NwRace: Added GetFavoredEnemyFeat method.
  • EnforceLegalCharacterService: Added failure event for too many ability score increases.

Package Updates

  • NWNX: 9865013 -> 7fc892a
  • NWN.Core: 8193.36.1 -> 8193.37.2
  • NWN.Native: 8193.36.2 -> 8193.37.3
  • NLog: 5.2.8 -> 5.4.0
  • System.Reflection.MetadataLoadContext: 8.0.1

Changed

  • Changed NWNX_DotNET interop to use NWNX.NET plugin.
  • Use NWNX.NET for encoding strings between UTF-16 and CP-1252.
  • Effect: Polymorph now supports optional unPolymorphVfx, spellAbilityModifier, spellAbilityCasterLevel parameters.
  • Effect: SpellFailure now supports an optional failureType parameter.
  • Effect/ItemProperty: Spell property is now correctly marked as nullable.
  • NwCreature: TouchAttackMelee method is no-longer async.
  • NwCreature: TouchAttackRanged method is no-longer async.
  • NwGameObject: EndConversation method is now awaitable.
  • NwGameObject: FaceToObject method is no-longer async.
  • NwGameObject: FaceToPoint method is no-longer async.
  • NwGameObject: SetFacing method is no-longer async.
  • NwModule: PlayerCount property is now an int.
  • NwObject: ClearActionQueue method is no-longer async.
  • ClassFeatListTypes: Renamed to match flags enum naming convention.

Deprecated

  • ItemProperty.OnHitCastSpell(IPCastSpell, IPSpellLevel) - use the ItemProperty.OnHitCastSpell(IPCastSpell, int) overload instead.
  • NwCreature.CheckResistSpell(NwGameObject) - use the NwCreature.SpellResistanceCheck method instead.
  • NwGameObject.SetIsDestroyable(bool,bool,bool) - use the IsDestroyable/IsRaiseable/IsSelectableWhenDead properties instead.

Fixed

  • ItemProperty: OnMonsterHitProperties now correctly uses the "special" parameter.
  • OnItemUnequip: Fixed a function hook issue.
  • SchedulerService: Fixed an issue where scheduling events immediately after reloading anvil would delay the event for the total uptime of the server.
  • NwCreature: BaseAttackBonus now returns the correct value if the value was not overriden with a custom value.
  • Paket: Fixed an issue where logs would be printed multiple times after reloading anvil.
  • NwCreature: Fixed an issue where setting AlwaysWalk to false would not correctly update the encumbrance state of the player.
  • HookService: Re-implemented as core service, and added new API to persist some function hooks after reloading anvil.
  • ObjectStorageService: Re-implemented as core service. Persistent variables should now persist after reloading anvil.
  • EnforceLegalCharacterService: Fixed an IndexOutOfRangeException for characters with too many ability score increases.

Pull Requests

New Contributors

Read more

Release 8193.36.1

17 Feb 17:02

Choose a tag to compare

Added

  • EffectType: Added new 8193.36 constants
  • GuiEventType: Added new 8193.36 constants
  • PlayerDeviceProperty: Added new 8193.36 constants
  • ResRefType: Added new 8193.36 constants and missing constants for 8193.35
  • Effect: Added EnemyAttackBonus method.
  • SQLQuery: Added Columns property.
  • SQLResult: Added overloads with column name parameters.
  • OnPlayerGuiEvent: Added missing documentation for EventObject event types.
  • NwArea: Added SetAreaTileBorderDisabled method.
  • NwArea: Added SetAreaGrassOverride method.
  • NwArea: Added RemoveAreaGrassOverride method.
  • NwArea: Added SetAreaDefaultGrassDisabled method.
  • NwGameObject: Added CasterLevel property. This replaces LastSpellCasterLevel from NwCreature.
  • NwCreature: Added SpellAbilities property for managing creature spell-like abilities.
  • NwPlayer: Added StartAudioStream method.
  • NwPlayer: Added StopAudioStream method.
  • NwPlayer: Added SetAudioStreamPaused method.
  • NwPlayer: Added SetAudioStreamVolume method.
  • NwPlayer: Added SeekAudioStream method.
  • CRulesKeyHash: New structure to support working with the new hash-based ruleset key labels.
  • RulesetKeys: New constants class with hashed keys for all known ruleset definitions.
  • NwGameTables: Added SurfaceMaterialTable.

Package Updates

  • NWNX: 51162c5 -> 9865013
  • NWN.Core: 8193.35.21 -> 8193.36.1
  • NWN.Native: 8193.35.9 -> 8193.36.2
  • NLog: 5.2.5 -> 5.2.8

Changed

  • Effect: DamageReduction now supports an optional rangedOnly parameter.
  • Effect: DamageResistance now supports an optional rangedOnly parameter.
  • Effect: EffectType will return the new types introduced in 8193.36.
  • NwDoor: Clone now uses the shared CloneInternal behaviour.
  • NwEncounter: Clone is now supported.
  • NwGameObject: ActionCastSpellAt now supports optional spellClass and spontaneousCast parameters.
  • NwPlayer: FloatingTextString now supports an optional chatWindow parameter.
  • NwPlayer: FloatingTextStrRef now supports an optional chatWindow parameter.
  • CampaignVariableObject: Tightened generic constraint to only allow NwGameObject instead of NwObject to match base game behaviour.

Deprecated

  • ItemProperty: LimitUseByClass(IPClass) - Use the LimitUseByClass(NwClass) overload instead.

Fixed

  • Fixed Possessor not correctly returning bags/containers.

Release 8193.35.3

20 Dec 21:53

Choose a tag to compare

Removed

  • Removed custom crash handler due to preventing dotnet from collecting a crash dump.

Release 8193.35.2

08 Dec 01:15

Choose a tag to compare

Added

  • Effect: Added AreaOfEffect overload with PersistentVfxTableEntry support.
  • Effect: Added Polymorph overload with PolymorphTableEntry support.
  • Location: Added TileInfo property.
  • Events: Added OnDispelMagicApply event.
  • NuiDrawList: Added NuiDrawListItemType.Line support.
  • NuiDrawList: Added support for item order and render options.
  • NuiDrawList: Added ImageRegion property.
  • NuiImage: Added ImageRegion property.
  • NuiImage: Added WordWrap property.
  • Nui: Added NuiToggles widget.
  • NuiElement: Added DisabledTooltip, Encouraged properties.
  • NuiWindow: Added AcceptsInput property.
  • CreatureLevelInfo: Added AbilityGained property.
  • NwArea: Added TileInfo property.
  • NwCreature: Added RemainingSkillPoints property.
  • NwCreature: Added BroadcastSkillRoll method.
  • NwCreature: Added CalculateAbilityModifierFromScore method.
  • NwCreature: Added GetArmorClassVersus method.
  • NwCreature: Added parameter to RemoveFeat to optionally remove the feat from the level stat list (for ELC).
  • NwItem: Extended AddItemProperty to support additional behaviours for managing existing item properties.
  • NwItem: Added CompareItem method.
  • NwItem: Added HasItemProperty method.
  • NwItem: Added RemoveItemProperties method.
  • NwModule: Added RefreshClientObjects method.
  • NwPlayer: Added RefreshClientObject method.
  • NwPlayer: Added RefreshPlayerClientObject method.
  • NwServer: Added DebugMode, DebugCombat, DebugSaveThrows, DebugHitDie, DebugMoveSpeed properties.
  • NwGameTables: Added PlaceableTypeTable
  • NwGameTables: Added PolymorphTable
  • NwGameTables: Added PortraitTable
  • NwGameTables: Added PersistentEffectTable
  • PluginManager: Added support for specifying additional plugin directories with a new environment variable, ADD_PLUGIN_PATHS
  • UnobservedTaskExceptionLogger: Added new service for logging and handling uncaught async Task exceptions.

Package Updates

  • NWNX: b419e42 -> 51162c5
  • NWN.Core: 8193.35.6 -> 8193.35.21
  • NWN.Native: 8193.34.6 -> 8193.35.9
  • NLog: 5.1.4 -> 5.2.5

Changed

  • Effect: Tag property is now correctly marked as nullable.
  • ItemProperty: Tag property is now correctly marked as nullable.
  • OnClientConnect: PlayerName, CDKey properties are no longer nullable.
  • CreatureLevelInfo: Feats property is now a mutable list.
  • EncounterListEntry: CreatureResRef is now correctly marked as nullable.
  • NwCreature: DialogResRef is now correctly marked as nullable.
  • NwCreature: TalentBest, TalentRandom now returns the correct talent class type.
  • NwDoor: DialogResRef is now correctly marked as nullable.
  • NwGameObject: PortraitId now uses the 2da PortraitTableEntry type.
  • NwPlaceable: DialogResRef is now correctly marked as nullable.
  • NwBaseItem: DefaultIcon is now correctly marked as nullable.
  • NwBaseItem: DefaultModel is now correctly marked as nullable.
  • NwClass: IconResRef, SpellTableColumn properties are now correctly marked as nullable.
  • NwClass: PreReqTable is now a nullable reference to a TwoDimArray wrapper of the associated class prereq table.
  • NwDomain: Icon is now correctly marked as nullable.
  • NwFeat: IconResRef is now correctly marked as nullable.
  • NwRace: DefaultCharacterDescription, Description, Name, PluralName properties are now correctly marked as nullable.
  • NwSkill: IconResRef is now correctly marked as nullable.
  • NwSpell: CastGroundVisual, CastHandVisual, CastHeadVisual, CastSound, ConjureGroundVisual, ConjureHandVisual, ConjureHeadVisual, ConjureSound, IconResRef, ImpactScript, ProjectileModel, ProjectileSound properties are now correctly marked as nullable.
  • NativeObjectExtensions: Moved to Anvil.Native to prevent missing method errors when using other extension overloads, and made public again.
  • ArrayWrapper: Added additional error checking.
  • EnforceLegalCharacterService: Added 8 multiclass support.
  • ServerLogRedirectorService: Don't log empty or null messages.
  • ScriptDispatchService: Remove redundant try/catch, optimization.
  • AnvilCore: Merged VirtualMachineFunctionHandler into AnvilCore.
  • AnvilCore: Use better performant unmanaged function pointers for handling low level events from NWNX.
  • AnvilCore: Implement custom crash handler with managed stacktrace.

Deprecated

  • IPRacialType - use NwRace instead.
  • HitEffect.SlayRace - use NwRace overload instead.
  • ItemProperty.ACBonusVsRace - use NwRace overload instead.
  • ItemProperty.AttackBonusVsRace - use NwRace overload instead.
  • ItemProperty.DamageBonusVsRace - use NwRace overload instead.
  • ItemProperty.EnhancementBonusVsRace - use NwRace overload instead.
  • ItemProperty.LimitUseByRace - use NwRace overload instead.
  • DamageData properties - use GetDamageByType, SetDamageByType instead.

Fixed

  • EventService: Built-in game events subscribed in anvil will now preserve the event script identifier when calling the original script.
  • ItemAppearance: Now correctly supports the extended appearance types added in 8193.35.
  • NwArea: GetTileInfo now correctly returns the correct tile when specifying a tile coordinate.
  • NwCreature: Fixed ActionUseFeat subFeat parameter not working.
  • EnforceLegalCharacterService: Fixed an erroneous calculation when calculating ability scores with a level stat bonus.
  • WeaponService: Fixed a rare server crash when calculating levels for a specific class.

Release 8193.35.1

25 May 19:38

Choose a tag to compare

Fixed

  • (Docker) Fixed an issue with libssl dependency.

Release 8193.35.0

24 May 19:55

Choose a tag to compare

Added

  • DamageType: Added CustomXX damage type constants
  • EffectSubType: Added Unyielding subtype.
  • EffectType: Added Pacify, BonusFeat, TimeStopImmunity, ForceWalk effects.
  • GuiEventType: Added RadialOpen
  • GuiPanel: Added Tile, Trigger, Creature, Item, Placeable, Door, Quickbar panels.
  • PlayerDeviceProperty: Added various graphics properties.
  • Effect: Added BonusFeat, ForceWalk, Pacified, TimeStopImmunity effect methods.
  • Effect: Added LinkId, IgnoreImmunity properties.
  • Location: Added TileId, TileRotation, TileHeight properties.
  • Location: Added SetTile, SetTileAnimationLoops methods.
  • SQLQuery: Added Reset method.
  • ModuleEvents.OnPlayerEquipItem: Added Slot property.
  • ModuleEvents.OnPlayerGuiEvent: Added Vector property.
  • ModuleEvents.OnPlayerUnequipItem: Added Slot property.
  • SpellEvents.OnSpellCast: Added IsSpontaneousCast, SpellLevel properties.
  • NwArea: Added ReloadAreaGrass, ReloadAreaBorder, SetTiles, GetAreaLightColor, SetAreaLightColor, GetAreaLightDirection, SetAreaLightDirection, SetFogColor methods.
  • NwCreature: Added ControllingPlayer setter.
  • NwCreature: Added ActionUseFeat, GetSpellUsesLeft, SetEffectIconFlashing methods
  • NwGameObject: Added Usable, VisibleDistance, VisualTransform, UiDiscoveryFlags properties.
  • NwGameObject: Added GetVisualTransform method with scope option.
  • NwGameObject: Added ReplaceObjectAnimation, ClearObjectAnimationOverride, SetTextBubbleOverride methods.
  • NwPlayer: Added CameraFlags, ClientVersionCommitSha1 properties.
  • NwPlayer: Added AttachCamera, SetCameraLimits, SetShaderUniform, SetSpellTargetingData methods.
  • VisualTransform: Added Clear method.
  • VisualTransformLerpSettings: Added BehaviorFlags, Repeats properties.
  • DevastatingCriticalData: Added Attacker property.

Package Updates

  • NWNX: d44d373 -> b419e42
  • NWN.Core: 8193.34.15 -> 8193.35.6
  • NWN.Native: 8193.34.5 -> 8193.35.6
  • LightInject: 6.6.3 -> 6.6.4
  • NLog: 5.1.3 -> 5.1.4

Changed

  • !! Anvil now targets .NET 7. You may need to update your plugin's target framework to successfully compile against Anvil.
  • !! HookService: NWNX and NWN.Native no-longer exposes a list of function addresses, and the address parameter has been removed from RequestHook. The RequestHook now expects a delegate with the NativeFunction attribute. See here for an example.
  • ItemAppearance: Update return values to support the extended part ranges introduced in 8193.35.
  • NwPlayer: ClientVersion now includes the revision value of the client version.
  • NwPlayer: EnterTargetMode now specifies a setting object that contains all new options added in 8193.35.

Removed

  • ItemAppearanceArmorModel: Removed deprecated class.
  • DoorEvents.OnDialogue: Removed deprecated class.
  • PlaceableEvents.OnDialogue: Removed deprecated class.
  • ItemAppearanceArmorModel: Removed deprecated class.
  • Effect: Removed deprecated EffectIcon overload.
  • ItemProperty: Removed deprecated PropertyType property.
  • CreatureEvents.OnConversation: Removed deprecated CurrentSpeaker property.
  • ModuleEvents.OnNuiEvent: Removed deprecated WindowToken property.
  • CreatureClassInfo: Removed deprecated AddKnownSpell, GetKnownSpellCountByLevel, GetKnownSpells, RemoveKnownSpell methods.
  • ItemAppearance: Removed deprecated ClearArmorPieceColor, GetArmorModel, GetArmorPieceColor, SetArmorModel, SetArmorPieceColor overloads.
  • NativeObjectInfoAttribute: Removed unused class.
  • NwArea: Removed deprecated GetFogAmount, GetFogColor methods.
  • NwGameObject: Removed deprecated CreatureAppearanceType property.
  • NwGameObject: Remove Destroy, PlaySoundByStrRef overloads.
  • NwPlayer: Remove ClearTlkOverride, CreateNuiWindow, NuiDestroy, NuiGetUserData, NuiGetWindowId, NuiSetUserData, SetTlkOverride methods.
  • Color: Removed ToInt method.

Fixed

  • (NWNX) Fixed an issue where nested VM scopes would cause an invalid stack and assertion error.

Release 8193.34.28

18 Apr 21:49

Choose a tag to compare

Fixed

  • NwCreature: Fixed an issue where GetAssociates would return an empty list for certain associate types.
  • VirtualMachine: Fix an issue where the context object would be incorrectly flagged as invalid.
  • Creature.OnDeath: Support Area/Module as the killer of the creature.
  • EventService: More reliable handling of game events.