Releases: nwn-dotnet/Anvil
Releases · nwn-dotnet/Anvil
Release 8193.34.7
Package Updates
- NWNX 6a552d9 -> 3227d60
Fixed
- Fixed an edge case issue that caused some servers to enter an infinite crash loop when shutting down.
- Fixed
NWNX_CORE_SHUTDOWN_SCRIPTthrowing a NRE during shutdown.
Release 8193.34.6
Added
- Added
Colorequality membersEqualsand operators==!= NwGameTables: AddedExpTableNwGameTables: AddedSkillItemCostTable
Package Updates
- Paket.Core 7.0.2 -> 7.1.4
- NWNX d15bc22 -> 6a552d9
Fixed
- Fixed an issue that prevented .NET 6 plugins from being loaded with Paket.
Release 8193.34.5
Added
NwCreature.Encounter: Gets the encounter that spawned the creature.
Release 8193.34.4
Fixed
- Fixed an issue where API services would not be constructed in the expected order.
Release 8193.34.3
Added
StrRef.ToParsedString(): Gets the string associated with a StrRef and parses any tokens (e.g. <CUSTOM0>)StrTokenCustom: New structure for resolving/setting custom token values.NwGameTables: Added new 2da tablesBodyBagTableLightColorTablePlaceableSoundTablePlaceableTableProgrammedEffectTableVisualEffectTable
NwArea: AddedGetTileInfo()- Added
InjectionService&ServiceBindingtests. NwPlaceable.Appearance: Gets or sets the appearance for the placeable.ModuleLoadTracker: Added core service for tracking module load progress as debug log messages.- If a module fails to load due to an error with an area, the area is logged as an error instead.
NwPlayer: Added player name override methods.PlayerNameOverrideServicecontains configuration options.
NwCreature: AddedGetFeatRemainingUsesGetFeatTotalUsesSetFeatRemainingUses- Added
OnMapPinAddPin,OnMapPinChangePin,OnMapPinDestroyPinevents. NwCreature: Added damage level override functions (ClearDamageLevelOverride,GetDamageLevelOverride,SetDamageLevelOverride)NwCreature: AddedDamageLevelproperty.NwGameTables: AddedDamageLevelTable
Package Updates
- NWNX c51d233 -> d15bc22
- NWN.Core 8193.34.2 -> 8193.34.3
- LightInject 6.4.0 -> 6.4.1
- NLog 4.7.13 -> 4.7.15
- Paket.Core 6.2.1 -> 7.0.2
Changed
- Rewrote core services and initialisation logic for easier extensibility, and reduced coupling with AnvilCore.
- All core services now implement
ICoreService, an interface containing specific event functions that are called at specific times in the server lifecycle. - Core services are executed in the order defined by
ServiceBindingOptions. - The CoreService composition root is defined in
AnvilServiceManager. - AnvilCore is now "dumber", and simply passes signals to
AnvilServiceManagerandVirtualMachineFunctionHandler. AnvilServiceManagermerges service initialization inAnvilCore, with the container/composition root setup fromIContainerFactory
- All core services now implement
OnPlayerDeath.Killernow tries toGetLastDamagerwhenGetLastHostileActoris invalid.
Deprecated
NwGameObject.CreatureAppearanceType. UseNwCreature.Appearanceinstead.- APIs using int-based StrRef parameters have been deprecated. Please use the StrRef overloads:
NwGameObject.PlaySoundByStrRef()NwPlayer.ClearTlkOverride()NwPlayer.SetTlkOverride()NwBaseItem.BaseItemStatsTextNwBaseItem.DescriptionNwBaseItem.NameNwClass.DescriptionNwClass.NameNwClass.NameLowerNwClass.NamePluralNwFeat.DescriptionNwFeat.NameNwSkill.DescriptionNwSkill.NameNwSpell.AltMessageNwSpell.DescriptionNwSpell.NameOnELCValidationFailure.StrRef
Fixed
- Fixed a stack overflow when injecting the
InjectionServiceas a property dependency. - Unload is now triggered on all plugins before waiting for the assemblies to be unloaded. This fixes some edge cases where assemblies would not unload.
Release 8193.34.2
Added
- Added net6.0 target framework. Since multiple frameworks are now being targeted, there is a small change to the binary output paths.
- When building locally, binaries are now located in
NWN.Anvil/bin/Release/<framework>. Release binaries on github will now have a folder for each framework.
- When building locally, binaries are now located in
NwColor: AddedFromRGBA,ToRGBAToUnsignedRGBAmethods.ToStringis now more explicit.- Added various tests for
Colorconversion. - Added
ResourceManagertests. NwArea: Added various properties for environment visual options and metadata.NwArea: AddedCreateEnvironmentPreset,ApplyEnvironmentPresetfor saving and loading preset visual options.NwWaypoint.Create: Added overload without template parameter for creating a general waypoint.PlayOptions: Added PlayerPartyControl option.StrRef: Added value structure for string references (StrRefs). The associated talk table string can be resolved by invokingToString.NwGameTables: Contains static members for commonly used 2das (internally cached byCTwoDimArrays).- Implemented
AppearanceTable&EnvironmentPresetTable
- Implemented
- Implemented new
TwoDimArray,TwoDimArrayEntryandITwoDimArrayEntryAPIs.- Supports general usage through
TwoDimArray, and a genericTwoDimArray<T>type for specifying a custom row format. See the docs for more info.
- Supports general usage through
ResourceManager: AddedDeleteTempResourceandGetResourceText.ResourceManager: Added string overload forWriteTempResource.LocalVariableStruct: Added local variable type for serializing any C# type to JSON.PersistentVariableStruct: Added persistent variable type for serializing any C# type to JSON.- Added
OnTriggerEnterevent.
Package Updates
- NWNX: 790a54b -> c51d233
- NWN.Core: 8193.34.1 -> 8193.34.2
- NWN.Native: 8193.34.2 -> 8193.34.3
Changed
- Change test assertion pattern to use NUnit constraints: https://docs.nunit.org/artcles/nunit/writing-tests/assertions/assertion-models/constraint.html
- Code samples are now built as a separate plugin project, and included in CI analysis.
- Improved path validation for
Delete/WriteTempResource. It should no-longer be possible to navigate outside of the resource folder.
Deprecated
NwServer.ReloadRules(). UseNwRuleset.ReloadRules()instead.NwColor.ToInt(). UseNwColor.ToRGBA()instead.ITwoDimArray/TwoDimArrayFactory: The 2da APIs have been superseded by a simpler API. See theITwoDimArrayEntryexample for more info.NwArea.GetFogAmount: UseSunFogAmountandMoonFogAmountinstead.NwArea.GetFogColor: UseSunFogColorandMoonFogColorinstead.
Removed
- NuiColor was removed and functionality replaced with the standard
Colorclass. The intention is to remove confusion and conversion issues when interacting with both types.
Fixed
- Fixed a NRE when using visibility properties.
- Fixed a NRE when using
PersistentVariableEnum.
Release 8193.34.1
Added
- NwPlayer:
IsConnectedboolean added. Should be checked when enumeratingNwModule.Players - NwPlayer: Added
DMPossessCreatureandUnpossessCreaturefor controlling player creature. - NwPlayer:
ForceExaminenow supports creatures, placeables, items and doors. - Implemented
NWN.Anvil.TestRunnerfor running automated tests. - NwPlayer: Added
Get/SetPersonalVisibilityOverridemethods for customizing object visibility per player. - NwGameObject: Added
VisibilityOverrideproperty for customizing object visibility globally. - Creature Events: Added
OnCreatureCheckProficienciesevent. - Added
Local/Campaign/PersistentVariableEnum<T>object variable type for user enum types. The underlying type must be an integer. - NwGameObject: Added
Clonemethod for cloning non-creature and item objects. - NwDoor: Added
Createmethod for creating doors from ResRefs. - NwEncounter: Added
Createmethod for creating encounters from ResRefs. - NwSound: Added
Createmethod for creating sound objects from ResRefs. - NwTrigger: Added
Createmethod for creating triggers from ResRefs. - NWN.Anvil.TestRunner: Added generator for generating ResRef constants from the standard creator palette.
Package Updates
- NWN.Core: 8193.34.0 -> 8193.34.1
Changed
NwCreature.WalkRateCapandNwCreature.AlwaysWalkproperties are no-longer persistent. Additionally, the services and functions are not hooked until the associated property is used for the first time.NwObject.ObjectIdis now public.
Fixed
AnvilCore.Reload()now uses the scheduler service to schedule the reload. This should fix some edge cases where async methods would hold a reference preventing unload.- Fixed an issue where the
SchedulerServicewould throw an exception if the server was shutdown/reloaded during a schedule callback. - Fixed a rare crash when subscribed to effect events.
Release 8193.34.0
Added
NwBaseItem: Added various properties.NwSpell: Added various properties.NwClass: Added various properties.- Added support for
NuiList&NuiListTemplateCell. Effect.DurationType: Added setter.- Added assembly attribute
PluginInfofor defining optional dependencies. PluginManager: Added check for missing types from optional plugins.
Package Updates
- (Docker) NWNX: 16b2c88 -> 790a54b
- NWN.Core: 8193.33.4 -> 8193.34.0
- NWN.Native: 8193.33.4 -> 8193.34.2
Changed
- Services implementing
IInitializableare now executed in deterministic order based on the service binding order defined inServiceBindingOptions. - Updated APIs to use ruleset classes
Effect.SkillDecrease(NwSkill,int)Effect.SkillIncrease(NwSkill,int)Effect.SpellItemProperty.DecreaseSkill(NwSkill,int)ItemProperty.SkillBonus(NwSkill,int)Talent.FeatTalent.SkillTalent.SpellNwSkill.ToTalent(this NwSkill)NwSkill.ToTalent(this NwSpell)NwSkill.ToTalent(this NwFeat)CreatureEvents.OnSpellCastAt.SpellCreatureEvents.OnSpellCastAt.Signal(NwObject,NwCreature,NwSpell,bool)DoorEvents.OnSpellCastAt.SpellDoorEvents.OnSpellCastAt.Signal(NwObject,NwDoor,NwSpell,bool)ModuleEvents.OnPlayerGuiEvent.FeatSelectionModuleEvents.OnPlayerGuiEvent.SkillSelectionPlaceableEvents.OnSpellCastAt.SpellPlaceableEvents.OnSpellCastAt.Signal(NwObject,NwPlaceable,NwSpell,bool)OnDisarmWeapon.FeatOnUseFeat.FeatOnUseSkill.SkillOnSpellAction.FeatOnSpellAction.SpellOnSpellBroadcast.FeatOnSpellBroadcast.SpellOnSpellCast.SpellOnSpellInterrupt.FeatOnSpellInterrupt.SpellOnSpellSlotMemorize.SpellSpellEvents.OnSpellCast.SpellSpellEvents.OnSpellCast.SpellCastClassCreatureClassInfo.ClassCreatureClassInfo.AddKnownSpell(NwSpell,byte)CreatureClassInfo.ClearMemorizedKnownSpells(NwSpell)CreatureClassInfo.GetKnownSpells(byte)CreatureClassInfo.RemoveKnownSpell(byte,NwSpell)CreatureLevelInfo.ClassCreatureLevelInfo.FeatsCreatureLevelInfo.GetSkillRank(NwSkill)CreatureLevelInfo.SetSkillRank(NwSkill,sbyte)CreatureTypeFilter.Class(NwClass)CreatureTypeFilter.DoesNotHaveSpellEffect(NwSpell)CreatureTypeFilter.HasSpellEffect(NwSpell)MemorizedSpellSlot.SpellNwCreature.ClassesNwCreature.FeatsNwCreature.ActionCastFakeSpellAt(NwSpell,Location,ProjectilePathType)NwCreature.ActionCastFakeSpellAt(NwSpell,NwGameObject,ProjectilePathType)NwCreature.ActionUseFeat(NwFeat,NwGameObject)NwCreature.ActionUseSkill(NwSkill,NwGameObject,SubSkill,NwItem)NwCreature.AddFeat(NwFeat)NwCreature.AddFeat(NwFeat,int)NwCreature.DecrementRemainingFeatUses(NwFeat,int)NwCreature.DoSkillCheck(NwSkill,int)NwCreature.GetClassDomains(NwClass)NwCreature.GetClassInfo(NwClass)NwCreature.GetFeatGainLevel(NwFeat)NwCreature.GetSkillRank(NwSkill,bool)NwCreature.GetSpecialization(NwClass)NwCreature.HasFeatEffect(NwFeat)NwCreature.HasFeatPrepared(NwFeat)NwCreature.HasSkill(NwSkill)NwCreature.HasSpellEffect(NwSpell)NwCreature.HasSpellUse(NwSpell)NwCreature.IncrementRemainingFeatUses(NwFeat,int)NwCreature.KnowsFeat(NwFeat)NwCreature.LevelUpHenchman(NwClass,PackageType,bool)NwCreature.MeetsFeatRequirements(NwFeat)NwCreature.RemoveFeat(NwFeat)NwCreature.SetSkillRank(NwSkill)NwGameObject.ActionCastSpellAt(NwSpell,NwGameObject,MetaMagic,bool,int,ProjectilePathType,bool)NwGameObject.ActionCastSpellAt(NwSpell,Location,MetaMagic,bool,int,ProjectilePathType,bool)SpecialAbility(NwSpell,byte,bool)SpecialAbility.SpellOnELCSkillValidationFailure.SkillOnELCSkillValidationFailure.FeatOnELCSkillValidationFailure.SpellWeaponService.Add***Feat(NwBaseItem,NwFeat)
Deprecated
CursorTargetService.EnterTargetMode- Use NwPlayer.EnterTargetMode/NwPlayer.TryEnterTargetMode instead.
Removed
Effect.AreaOfEffect(int,string,string,string)AttributeExtensionsStandardFactionExtensionsCreatureTypeFilter.RacialTypeInventory.CheckFit(BaseItemType)NwCreature.RacialTypeNwCreature.ChangeToStandardFactionNwItem.BaseItemTypeNwItem.CanStackNwItem.IsStackableNwPlayer.NuiSetGroupLayout(int,string,NuiGroup)NwPlayer.NuiSetGroupLayout(int,string,NuiWindow)NwFaction(int)Anvil.Services.NwDateTimeLoopTimeServiceServiceBindingOptions.MissingPluginDependenciesServiceBindingOptions.Order
Release 8193.33.5
Added
- NwModule: Added
LimboGameObjectsproperty to list all GameObjects currently stored in limbo. - NwModule: Added
MoveObjectToLimbomethod to remove a GameObject from an area and store it in limbo. - NwCreature: Added
AlwaysWalkandWalkRateCapfor restricting creature & player movement. - Added
OnCheckEffectImmunityevent for bypassing effect immunity checks. - Added
OnEffectApplyandOnEffectRemoveevents. - Added ruleset APIs:
NwRuleset,NwBaseItem,NwClass,NwFeat,NwRaceNwSkillandNwSpell
Changed
- Migrated LoopTimeService properties to static class
Anvil.API.Time. - Exposed
ScheduledTaskto Scheduler Service. - Services implementing
IUpdateableare now executed in deterministic order based on the service binding order defined inServiceBindingOptions.
Deprecated
LoopTimeService- useAnvil.API.Timeinstead.- Moved
NwDateTimeandNwTimeSpantoAnvil.APInamespace. - Duplicated APIs
NwItem.CanStack/NwItem.IsStackable. UseNwBaseItem.IsStackableinstead.
Release 8193.33.4
Package Updates
- (Docker) Update NWNX to 16b2c88.
Changed
- Startup log now includes the git revision of the current running server binary.
- Server revision is now printed to stdout if startup fails.