Releases: nwn-dotnet/Anvil
Releases · nwn-dotnet/Anvil
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 tablesBodyBagTable
LightColorTable
PlaceableSoundTable
PlaceableTable
ProgrammedEffectTable
VisualEffectTable
NwArea
: AddedGetTileInfo()
- Added
InjectionService
&ServiceBinding
tests. 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.PlayerNameOverrideService
contains configuration options.
NwCreature
: AddedGetFeatRemainingUses
GetFeatTotalUses
SetFeatRemainingUses
- Added
OnMapPinAddPin
,OnMapPinChangePin
,OnMapPinDestroyPin
events. NwCreature
: Added damage level override functions (ClearDamageLevelOverride
,GetDamageLevelOverride
,SetDamageLevelOverride
)NwCreature
: AddedDamageLevel
property.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
AnvilServiceManager
andVirtualMachineFunctionHandler
. AnvilServiceManager
merges service initialization inAnvilCore
, with the container/composition root setup fromIContainerFactory
- All core services now implement
OnPlayerDeath.Killer
now tries toGetLastDamager
whenGetLastHostileActor
is invalid.
Deprecated
NwGameObject.CreatureAppearanceType
. UseNwCreature.Appearance
instead.- APIs using int-based StrRef parameters have been deprecated. Please use the StrRef overloads:
NwGameObject.PlaySoundByStrRef()
NwPlayer.ClearTlkOverride()
NwPlayer.SetTlkOverride()
NwBaseItem.BaseItemStatsText
NwBaseItem.Description
NwBaseItem.Name
NwClass.Description
NwClass.Name
NwClass.NameLower
NwClass.NamePlural
NwFeat.Description
NwFeat.Name
NwSkill.Description
NwSkill.Name
NwSpell.AltMessage
NwSpell.Description
NwSpell.Name
OnELCValidationFailure.StrRef
Fixed
- Fixed a stack overflow when injecting the
InjectionService
as 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
,ToRGBA
ToUnsignedRGBA
methods.ToString
is now more explicit.- Added various tests for
Color
conversion. - Added
ResourceManager
tests. NwArea
: Added various properties for environment visual options and metadata.NwArea
: AddedCreateEnvironmentPreset
,ApplyEnvironmentPreset
for 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
,TwoDimArrayEntry
andITwoDimArrayEntry
APIs.- 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
: AddedDeleteTempResource
andGetResourceText
.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
OnTriggerEnter
event.
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 theITwoDimArrayEntry
example for more info.NwArea.GetFogAmount
: UseSunFogAmount
andMoonFogAmount
instead.NwArea.GetFogColor
: UseSunFogColor
andMoonFogColor
instead.
Removed
- NuiColor was removed and functionality replaced with the standard
Color
class. 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:
IsConnected
boolean added. Should be checked when enumeratingNwModule.Players
- NwPlayer: Added
DMPossessCreature
andUnpossessCreature
for controlling player creature. - NwPlayer:
ForceExamine
now supports creatures, placeables, items and doors. - Implemented
NWN.Anvil.TestRunner
for running automated tests. - NwPlayer: Added
Get/SetPersonalVisibilityOverride
methods for customizing object visibility per player. - NwGameObject: Added
VisibilityOverride
property for customizing object visibility globally. - Creature Events: Added
OnCreatureCheckProficiencies
event. - Added
Local/Campaign/PersistentVariableEnum<T>
object variable type for user enum types. The underlying type must be an integer. - NwGameObject: Added
Clone
method for cloning non-creature and item objects. - NwDoor: Added
Create
method for creating doors from ResRefs. - NwEncounter: Added
Create
method for creating encounters from ResRefs. - NwSound: Added
Create
method for creating sound objects from ResRefs. - NwTrigger: Added
Create
method 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.WalkRateCap
andNwCreature.AlwaysWalk
properties are no-longer persistent. Additionally, the services and functions are not hooked until the associated property is used for the first time.NwObject.ObjectId
is 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
SchedulerService
would 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
PluginInfo
for 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
IInitializable
are 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.Spell
ItemProperty.DecreaseSkill(NwSkill,int)
ItemProperty.SkillBonus(NwSkill,int)
Talent.Feat
Talent.Skill
Talent.Spell
NwSkill.ToTalent(this NwSkill)
NwSkill.ToTalent(this NwSpell)
NwSkill.ToTalent(this NwFeat)
CreatureEvents.OnSpellCastAt.Spell
CreatureEvents.OnSpellCastAt.Signal(NwObject,NwCreature,NwSpell,bool)
DoorEvents.OnSpellCastAt.Spell
DoorEvents.OnSpellCastAt.Signal(NwObject,NwDoor,NwSpell,bool)
ModuleEvents.OnPlayerGuiEvent.FeatSelection
ModuleEvents.OnPlayerGuiEvent.SkillSelection
PlaceableEvents.OnSpellCastAt.Spell
PlaceableEvents.OnSpellCastAt.Signal(NwObject,NwPlaceable,NwSpell,bool)
OnDisarmWeapon.Feat
OnUseFeat.Feat
OnUseSkill.Skill
OnSpellAction.Feat
OnSpellAction.Spell
OnSpellBroadcast.Feat
OnSpellBroadcast.Spell
OnSpellCast.Spell
OnSpellInterrupt.Feat
OnSpellInterrupt.Spell
OnSpellSlotMemorize.Spell
SpellEvents.OnSpellCast.Spell
SpellEvents.OnSpellCast.SpellCastClass
CreatureClassInfo.Class
CreatureClassInfo.AddKnownSpell(NwSpell,byte)
CreatureClassInfo.ClearMemorizedKnownSpells(NwSpell)
CreatureClassInfo.GetKnownSpells(byte)
CreatureClassInfo.RemoveKnownSpell(byte,NwSpell)
CreatureLevelInfo.Class
CreatureLevelInfo.Feats
CreatureLevelInfo.GetSkillRank(NwSkill)
CreatureLevelInfo.SetSkillRank(NwSkill,sbyte)
CreatureTypeFilter.Class(NwClass)
CreatureTypeFilter.DoesNotHaveSpellEffect(NwSpell)
CreatureTypeFilter.HasSpellEffect(NwSpell)
MemorizedSpellSlot.Spell
NwCreature.Classes
NwCreature.Feats
NwCreature.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.Spell
OnELCSkillValidationFailure.Skill
OnELCSkillValidationFailure.Feat
OnELCSkillValidationFailure.Spell
WeaponService.Add***Feat(NwBaseItem,NwFeat)
Deprecated
CursorTargetService.EnterTargetMode
- Use NwPlayer.EnterTargetMode/NwPlayer.TryEnterTargetMode instead.
Removed
Effect.AreaOfEffect(int,string,string,string)
AttributeExtensions
StandardFactionExtensions
CreatureTypeFilter.RacialType
Inventory.CheckFit(BaseItemType)
NwCreature.RacialType
NwCreature.ChangeToStandardFaction
NwItem.BaseItemType
NwItem.CanStack
NwItem.IsStackable
NwPlayer.NuiSetGroupLayout(int,string,NuiGroup)
NwPlayer.NuiSetGroupLayout(int,string,NuiWindow)
NwFaction(int)
Anvil.Services.NwDateTime
LoopTimeService
ServiceBindingOptions.MissingPluginDependencies
ServiceBindingOptions.Order
Release 8193.33.5
Added
- NwModule: Added
LimboGameObjects
property to list all GameObjects currently stored in limbo. - NwModule: Added
MoveObjectToLimbo
method to remove a GameObject from an area and store it in limbo. - NwCreature: Added
AlwaysWalk
andWalkRateCap
for restricting creature & player movement. - Added
OnCheckEffectImmunity
event for bypassing effect immunity checks. - Added
OnEffectApply
andOnEffectRemove
events. - Added ruleset APIs:
NwRuleset
,NwBaseItem
,NwClass
,NwFeat
,NwRace
NwSkill
andNwSpell
Changed
- Migrated LoopTimeService properties to static class
Anvil.API.Time
. - Exposed
ScheduledTask
to Scheduler Service. - Services implementing
IUpdateable
are now executed in deterministic order based on the service binding order defined inServiceBindingOptions
.
Deprecated
LoopTimeService
- useAnvil.API.Time
instead.- Moved
NwDateTime
andNwTimeSpan
toAnvil.API
namespace. - Duplicated APIs
NwItem.CanStack
/NwItem.IsStackable
. UseNwBaseItem.IsStackable
instead.
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.
Release 8193.33.3
Added
- Implemented
PaketPluginSource
for installing and running NuGet-based plugins. - Implemented support for custom plugin sources with the
IPluginSource
interface. - Implemented
PluginStorageService
- a unified API for storing plugin data and configurations. - Added
ANVIL_HOME
environment variable. This variable defines the root path where Anvil config files, plugins and plugin data are read from. - Added additional properties to
NwEncounter
. - Added IsStackable to 'NwItem'
Package Updates
- NWN.Core -> 8193.33.4
- NWN.Native -> 8193.33.4
Removed
- BREAKING CHANGE - Removed
ANVIL_NLOG_CONFIG
environment variable. The config path is now fixed to{ANVIL_HOME}/nlog.config
- BREAKING CHANGE - Removed
ANVIL_PLUGIN_PATH
environment variable. The plugin load path is now fixed to{ANVIL_HOME}/Plugins
Fixed
- Fixed a server crash when preventing player connections in the
OnClientConnect
event. - Fixed
OnClientConnect.CDKey
returning a type name instead of the client's public CD key.
Release 8193.33.2
Added
- ResourceManager: Implemented GffResource API.
- [Inject]: Property-based dependencies can now be flagged as "Optional". Optional dependencies do not throw exceptions if the service could not be loaded from a missing plugin assembly.
Changed
[ServiceBindingOptions]
- TheBindingPriority
property defines the initialization order of a service. (Higher priority = initialized first).- When injecting a dependency of an interface/base class and multiple candidates are available, the service with the highest
BindingPriority
will be injected. NwCreature.Age
can now be set.
Deprecated
[ServiceBindingOptions]
-Order
has been deprecated and replaced with theBindingPriority
property.[ServiceBindingOptions]
-MissingPluginDependencies
has been deprecated as functionality is covered by theBindingPriority
dependency resolve behaviour.AttributeExtensions
- moved toReflectionExtensions
.NwPlayer.NuiSetGroupLayout
- moved toNuiGroup.SetLayout
.
Fixed
- Properties injected into service classes with plugin dependency requirements will no-longer throw an exception when the assembly is missing.
- Fixed NuiGroup.SetLayout creating nested layout elements instead of updating the existing element (
NwPlayer.NuiSetGroupLayout
still has the old behaviour.)
Release 8193.33.1
Changed
- Update to NWN.Core 8193.33.1
Fixed
- Fixed an issue when retrieving bind values for certain class/structures (NuiRect, NuiVector, etc.) would return the default value.
- Fixed an incorrect API/object mapping for NuiDrawList.