Anvil
Anvil.API.NwPlayer Class Reference

A player client connected to the server. More...

+ Inheritance diagram for Anvil.API.NwPlayer:
+ Collaboration diagram for Anvil.API.NwPlayer:

Public Member Functions

async Task ActionExamine (NwGameObject target)
 Shows an examine dialog for the specified target. More...
 
async Task ActionStartConversation (NwGameObject converseWith, string dialogResRef="", bool isPrivate=false, bool playHello=true)
 Starts a conversation with another object, typically a creature. More...
 
int AddCustomJournalEntry (JournalEntry entryData, bool silentUpdate=false)
 Adds/updates a journal entry. More...
 
void AddHenchmen (NwCreature henchmen)
 Attaches the specified creature to the player as a henchmen. More...
 
void AddJournalQuestEntry (string categoryTag, int entryId, bool allPartyMembers=true, bool allowOverrideHigher=false)
 Adds an entry to the player's journal. More...
 
void AddLoopingVisualEffect (NwGameObject gameObject, VisualEffectTableEntry visualEffect)
 Adds the specified visual effect to an object, but only visible to this player. More...
 
void AddToParty (NwPlayer partyLeader)
 Adds the player to the specified party leader's party. More...
 
void ApplyInstantVisualEffectToObject (VfxType visualEffect, NwGameObject target)
 Plays the specified "instant" VFX (Com*, FNF*, IMP*) on the target for this player only. More...
 
void AttachCamera (NwGameObject target, bool findCleanView=false)
 Attaches this player's camera to the specified game object. The object must be in the same area, and within visible distance. More...
 
void BootPlayer (string reason="")
 Boots the player from the server. More...
 
void ClearLoopingVisualEffects (NwGameObject gameObject)
 Clears looping visual effects on the specified object visible only to this player. More...
 
void ClearObjectNameOverride (NwGameObject gameObject)
 Clears an override name for the specified object. More...
 
void ClearPlayerNameOverride (bool clearAll=false)
 Clears an overridden player character name. More...
 
void ClearPlayerNameOverride (NwPlayer observer)
 Clears an overridden player character name for a specific observer. More...
 
void ClearTextureOverride (string texName)
 Removes the override for the specified texture, reverting to the original texture. More...
 
async Task Delete (string kickMessage, bool preserveBackup=true)
 Immediately kicks the player and deletes their character file (.bic). More...
 
void DestroySQLDatabase ()
 Immediately destroys the database attached to this player, clearing out all data and schema.
This operation is immediate and irreversible, even when inside a transaction or running query.
Existing active/prepared sqlqueries will remain functional, but any references to stored data or schema members will be invalidated. More...
 
void DisplayFloatingTextStringOnCreature (NwCreature target, string text)
 
void DMPossessCreature (NwCreature creature, bool impersonate=false)
 If this player is a DM, causes them to possess the specified creature. More...
 
void EnterCutsceneMode (bool allowLeftClick=false)
 Enters "Cutscene" mode, disabling GUI and camera controls for the player and marking them as plot object (invulnerable).
See Effect.CutsceneGhost, and other Cutscene* effects for hiding and controlling the player creature during cutscene mode. More...
 
void EnterTargetMode (Action< ModuleEvents.OnPlayerTarget > handler, TargetModeSettings? settings=null)
 Triggers the player to enter cursor targeting mode, invoking the specified handler once the player selects something. More...
 
bool Equals (NwPlayer? other)
 
override bool Equals (object? obj)
 
void ExitCutsceneMode ()
 Exits "Cutscene" mode, restoring standard GUI and camera controls to the player, and restoring their plot flag. More...
 
void ExportCharacter ()
 Forces the player's character to saved and exported to its respective directory (LocalVault, ServerVault, etc). More...
 
void FadeFromBlack (float fadeSpeed)
 Fades the screen for a given player from black to regular screen. More...
 
void FadeToBlack (float fadeSpeed)
 Fades the screen for a given player from a regular screen to black. More...
 
void FloatingTextString (string message, bool broadcastToParty=true, bool chatWindow=true)
 Briefly displays a floating text message above the player's head. More...
 
void FloatingTextStrRef (int strRef, bool broadcastToParty=true, bool chatWindow=true)
 Briefly displays a floating text message above the player's head using the specified string reference. More...
 
void ForceAreaReload ()
 Forces this player to reload their current area. More...
 
void ForceExamine (NwGameObject target)
 Forces the player to examine the specified game object.
Works on NwCreature, NwPlaceable, NwItem and NwDoor.
Does nothing for other object types. More...
 
unsafe? byte[] GetAreaExplorationState (NwArea? area)
 Gets this player's area exploration state for the specified area. More...
 
GetCampaignVariable< T > (string campaign, string name)
 Gets the specified campaign variable for the player. More...
 
int GetDeviceProperty (PlayerDeviceProperty property)
 Gets the specified device property/capability as advertised by the client. More...
 
override int GetHashCode ()
 
JournalEntryGetJournalEntry (string questTag)
 Gets an existing journal entry with the specified quest tag. More...
 
List< VisualEffectTableEntry >? GetLoopingVisualEffects (NwGameObject gameObject)
 Gets a list of visual effects for the specified object visible only to this player. More...
 
string? GetObjectNameOverride (NwGameObject gameObject)
 Gets the current name override set for the specified object. More...
 
Dictionary< NwPlayer, PlayerNameOverrideGetOverridesForObserver (bool includeGlobal=false)
 Gets a list of all name overrides for the specified observer. More...
 
VisibilityMode GetPersonalVisibilityOverride (NwGameObject target)
 Gets the visiblity override for the specified object for this player. More...
 
PlayerNameOverrideGetPlayerNameOverride (NwPlayer? observer=null)
 Gets the current name override set for the specified player. More...
 
void GiveXp (int xPAmount)
 Gives the specified XP to the player, adjusted by any multiclass penalty. More...
 
void LockCameraDirection (bool isLocked=true)
 Locks the player's camera direction to its current direction, or unlocks the player's camera direction to enable it to move freely again. More...
 
void LockCameraDistance (bool isLocked=true)
 Locks the player's camera distance to its current distance setting, or unlocks the player's camera distance. More...
 
void LockCameraPitch (bool isLocked=true)
 Locks the player's camera pitch to its current pitch setting, or unlocks the player's camera pitch. More...
 
void NightToDay (TimeSpan delayTransitionTime=default)
 Changes the current Day/Night cycle for the player to daylight. More...
 
void OpenInventory ()
 Instructs the player to open their inventory. More...
 
void OpenInventory (NwCreature target)
 Opens the specified creatures inventory, and shows it to the player.
More...
 
void OpenInventory (NwPlaceable target)
 Forces the player to open the inventory of the specified placeable. More...
 
void PlaySound (string sound, NwGameObject? target=null)
 Plays the specified sound at the target in the current area for this player only. More...
 
void PopUpDeathPanel (bool respawnButton=true, bool waitForHelp=true, int helpStringRef=0, string helpString="")
 Displays a death panel that can turn off the "Respawn" or "Wait for Help" buttons.
The "Wait for Help" button is only enabled when the game is running in multiplayer mode.
By default if helpString isn't specified, the value used is "Choose an option below.<br/> Respawning will incur a penalty of 50 XP per level of your character and the loss of 10% of your gold."
(strref 66219 single player, 6600 for multiplayer).
More...
 
void PopUpGUIPanel (GUIPanel panel=GUIPanel.Death)
 Displays a GUI panel to a player. More...
 
void PostString (string message, int xPos, int yPos, ScreenAnchor anchor, float life, Color? start=null, Color? end=null, int id=0, string font="")
 Displays a message on the player's screen.
The message is always displayed on top of whatever is on the screen, including UI elements. More...
 
SQLQuery PrepareSQLQuery (string query)
 Sets up a SQL Query for this player.
This will NOT run the query; only make it available for parameter binding.
To run the query, you need to call SQLQuery.Execute even if you do not expect result data.
More...
 
unsafe void RefreshClientObject (NwGameObject gameObject)
 Causes this player to refresh the client object associated with the given game object. More...
 
void RefreshPlayerClientObject ()
 Causes this player to refresh the player client object associated with their current controlled creature. More...
 
void RemoveFromCurrentParty ()
 Removes the player from their current party. More...
 
async Task RestoreCameraFacing ()
 Restores the camera mode and facing to what they where when StoreCameraFacing was last called.
RestoreCameraFacing can only be used once, and must correspond to a previous call to StoreCameraFacing. More...
 
void SeekAudioStream (AudioStreamIdentifier streamIdentifier, float seekOffset)
 Seeks the audio stream with the specified identifier to a new position on the currently playing audio track. More...
 
void SendServerMessage (string message)
 
void SendServerMessage (string message, Color color)
 Sends a server message to the player. More...
 
void SendToServer (string ipAddress="", string password="", string waypointTag="", bool seamless=false)
 Sends the player to a new server, where the player's character will connect and log in. More...
 
byte?[] Serialize (bool stripPCFlags=false)
 
void SetAreaExplorationState (NwArea area, bool explored)
 Sets whether the player has explored an area. More...
 
unsafe void SetAreaExplorationState (NwArea area, byte[] newState)
 Sets this player's area exploration state for the specified area. More...
 
void SetAudioStreamPaused (AudioStreamIdentifier streamIdentifier, bool paused, TimeSpan fadeTime=default)
 Pauses/Unpauses the audio stream on the specified identifier. More...
 
void SetAudioStreamVolume (AudioStreamIdentifier streamIdentifier, float volume=1.0f, TimeSpan fadeTime=default)
 Changes the volume of the audio stream with the specified identifier. More...
 
async Task SetCameraFacing (float direction, float pitch=-1.0f, float distance=-1.0f, CameraTransitionType transitionType=CameraTransitionType.Snap)
 Changes the direction the player's camera is facing. More...
 
void SetCameraLimits (float minPitch=-1.0f, float maxPitch=-1.0f, float minDist=-1.0f, float maxDist=-1.0f)
 Sets camera limits that override any client configuration.
A value of -1 means to use the client limits. More...
 
void SetCutsceneMode (bool inCutscene=true, bool leftClickEnabled=false)
 Toggles the CutsceneMode state for the player. More...
 
void SetGuiPanelDisabled (GUIPanel panel, bool disabled, NwGameObject? targetObject=null)
 Disable a specific gui panel for this player.
Will close the GUI panel if it is currently open.
Will fire a GuiEventType.DisabledPanelAttemptOpen event for some panels if a player attempts to open them while disabled. More...
 
void SetObjectNameOverride (NwGameObject gameObject, string name)
 Sets an override name for a specific game object, as visible from this player.
Supports placeables, doors, items and creatures. More...
 
void SetPCReputation (bool like, NwPlayer target)
 Sets if the player should like, or unlike the specified player. More...
 
void SetPersonalVisibilityOverride (NwGameObject target, VisibilityMode visibilityMode)
 Sets the visiblity override for the specified object for this player. More...
 
void SetPlayerNameOverride (PlayerNameOverride nameOverride)
 Sets an override player character name and community name on the player list for all players. Is not persistent. More...
 
void SetPlayerNameOverride (PlayerNameOverride nameOverride, NwPlayer observer)
 Sets an override player character name and community name on the player list as observed by a specific player. Is not persistent. More...
 
void SetShaderUniform (ShaderUniform uniform, float value)
 Sets a global shader uniform for this player.
These uniforms are not used by the base game and are reserved for module-specific scripting.
You need to add custom shaders that will make use of them.
In multiplayer, these need to be reapplied when a player rejoins. More...
 
void SetShaderUniform (ShaderUniform uniform, int value)
 Sets a global shader uniform for this player.
These uniforms are not used by the base game and are reserved for module-specific scripting.
You need to add custom shaders that will make use of them.
In multiplayer, these need to be reapplied when a player rejoins. More...
 
void SetShaderUniform (ShaderUniform uniform, Vector4 value)
 Sets a global shader uniform for this player.
These uniforms are not used by the base game and are reserved for module-specific scripting.
You need to add custom shaders that will make use of them.
In multiplayer, these need to be reapplied when a player rejoins. More...
 
void SetSpellTargetingData (TargetingData data)
 Sets a spell targeting data override for this player. More...
 
void SetTextureOverride (string oldTexName, string newTexName)
 Makes ControlledCreature PC load a new texture instead of another. More...
 
void ShowVisualEffect (VfxType effectType, Vector3 position)
 Plays the specified VFX at the target position in the current area for this player only. More...
 
void StartAudioStream (AudioStreamIdentifier streamIdentifier, string resRef, bool looping=false, TimeSpan fadeTime=default, float seekOffset=-1f, float volume=1f)
 Assign one of the available audio streams to play a specific file. This mechanism can be used
to replace regular music playback, and synchronize it between clients. More...
 
void StopAudioStream (AudioStreamIdentifier streamIdentifier, TimeSpan fadeTime=default)
 Stops the audio stream playing on the specified identifier. More...
 
void StopFade ()
 Removes any current fading effects or black screen from the monitor of the player. More...
 
async Task StoreCameraFacing ()
 Stores (bookmarks) the camera's facing and position so it can be restored later with RestoreCameraFacing.
More...
 
bool TryCreateNuiWindow (NuiWindow window, out NuiWindowToken token, string windowId="")
 Create a NUI window for this player. More...
 
bool TryEnterTargetMode (Action< ModuleEvents.OnPlayerTarget > handler, TargetModeSettings? settings=null)
 Attempts to get this player to enter cursor targeting mode, invoking the specified handler once the player selects something.
If the player is already in targeting mode, the existing handler will not be cleared. More...
 
void UnlockAchievement (string achievementId, int lastValue=0, int currentValue=0, int maxValue=0)
 Unlock an achievement for the player who must be logged in. More...
 
void UnpossessCreature ()
 If this player is possessing a creature, instructs them to unpossess them. More...
 
void Vibrate (VibratorMotor motor, float strength, TimeSpan duration)
 Vibrates the player's device or controller. Does nothing if vibration is not supported. More...
 

Static Public Member Functions

static implicit operator CNWSPlayer? (NwPlayer? player)
 
static bool operator!= (NwPlayer? left, NwPlayer? right)
 
static bool operator== (NwPlayer? left, NwPlayer? right)
 

Properties

string BicFileName [get]
 Gets the name of the player's .bic file. More...
 
CameraFlag CameraFlags [set]
 Sets camera settings that override any client configuration settings. More...
 
float CameraHeight [set]
 Sets the camera height for this player. More...
 
string CDKey [get]
 Gets the public part of the CD key that the player used when logging in. More...
 
Version ClientVersion [get]
 Gets the player's client version (Major + Minor + Build). More...
 
string ClientVersionCommitSha1 [get]
 Gets the player's client version, as a Sha1 commit hash. More...
 
NwCreatureControlledCreature [get]
 Gets the creature this player is currently controlling.
This will return the player's current possessed creature (familiar, DM possession), otherwise their player character if they are currently not possessing a creature. More...
 
float CutsceneCameraMoveRate [get, set]
 Gets or sets the movement rate factor for the cutscene camera following ControlledCreature 'camera man'. More...
 
string IPAddress [get]
 Gets the connecting IP address for the player. More...
 
bool IsConnected [get]
 Gets if this player is connected and playing (true), or if this player is still on character selection or connecting (false). More...
 
bool IsConnectionRelayed [get]
 Gets a value indicating whether the player has connected to the server over a relay (instead of directly). More...
 
bool IsDM [get]
 Gets a value indicating whether the player is a Dungeon Master. More...
 
bool IsInCursorTargetMode [get]
 Gets if this player is in cursor targeting mode.
NOTE! Only works if the player entered target mode using TryEnterTargetMode. More...
 
bool IsInCutsceneMode [get]
 Gets a value indicating whether ControlledCreature creature is currently in "Cutscene" mode. More...
 
bool?? IsPlayerDM [get, set]
 Gets or sets whether the player has DM privileges gained through a player login (as opposed to the DM client). More...
 
bool IsValid [get]
 Gets a value indicating whether this NwPlayer object is valid.
Returns false after the player disconnects from the server. More...
 
PlayerLanguage Language [get]
 Gets the language configured by this player. More...
 
NwCreatureLoginCreature [get]
 Gets the original creature that this player logged in with. More...
 
Action< OnBarterEndOnBarterEnd
 
Action< OnBarterStartOnBarterStart
 
Action< OnClientDisconnectOnClientDisconnect
 
Action< ModuleEvents.OnClientEnterOnClientEnter
 
Action< ModuleEvents.OnClientLeaveOnClientLeave
 
Action< OnClientLevelUpBeginOnClientLevelUpBegin
 
Action< OnCombatStatusChangeOnCombatStatusChange
 
Action< ModuleEvents.OnCutsceneAbortOnCutsceneAbort
 
Action< OnDMAppearOnDMAppear
 
Action< OnDMChangeDifficultyOnDMChangeDifficulty
 
Action< OnDMDisableTrapOnDMDisableTrap
 
Action< OnDMDisappearOnDMDisappear
 
Action< OnDMDumpLocalsOnDMDumpLocals
 
Action< OnDMForceRestOnDMForceRest
 
Action< OnDMGetFactionReputationOnDMGetFactionReputation
 
Action< OnDMGetVariableOnDMGetVariable
 
Action< OnDMGiveAlignmentOnDMGiveAlignment
 
Action< OnDMGiveGoldOnDMGiveGold
 
Action< OnDMGiveItemOnDMGiveItem
 
Action< OnDMGiveLevelOnDMGiveLevel
 
Action< OnDMGiveXPOnDMGiveXP
 
Action< OnDMGoToOnDMGoTo
 
Action< OnDMHealOnDMHeal
 
Action< OnDMJumpAllPlayersToPointOnDMJumpAllPlayersToPoint
 
Action< OnDMJumpTargetToPointOnDMJumpTargetToPoint [get]
 
Action< OnDMJumpToPointOnDMJumpToPoint
 
Action< OnDMKillOnDMKill
 
Action< OnDMLimboOnDMLimbo
 
Action< OnDMPlayerDMLoginOnDMPlayerDMLogin
 
Action< OnDMPlayerDMLogoutOnDMPlayerDMLogout
 
Action< OnDMPossessOnDMPossess
 
Action< OnDMPossessFullPowerOnDMPossessFullPower
 
Action< OnDMSetDateOnDMSetDate
 
Action< OnDMSetFactionOnDMSetFaction
 
Action< OnDMSetFactionReputationOnDMSetFactionReputation
 
Action< OnDMSetStatOnDMSetStat
 
Action< OnDMSetTimeOnDMSetTime
 
Action< OnDMSetVariableOnDMSetVariable
 
Action< OnDMSpawnObjectOnDMSpawnObject
 
Action< OnDMSpawnTrapOnObjectOnDMSpawnTrapOnObject
 
Action< OnDMTakeItemOnDMTakeItem
 
Action< OnDMToggleAIOnDMToggleAI
 
Action< OnDMToggleImmortalOnDMToggleImmortal
 
Action< OnDMToggleInvulnerableOnDMToggleInvulnerable
 
Action< OnDMToggleLockOnDMToggleLock
 
Action< OnDMViewInventoryOnDMViewInventory
 
Action< OnExamineObjectOnExamineObject
 
Action< OnExamineTrapOnExamineTrap
 
Action< OnMapPinAddPinOnMapPinAddPin
 
Action< OnMapPinChangePinOnMapPinChangePin
 
Action< OnMapPinDestroyPinOnMapPinDestroyPin
 
Action< ModuleEvents.OnNuiEventOnNuiEvent
 
Action< OnPartyEventOnPartyEvent
 
Action< ModuleEvents.OnPlayerChatOnPlayerChat
 
Action< ModuleEvents.OnPlayerDeathOnPlayerDeath
 
Action< ModuleEvents.OnPlayerDyingOnPlayerDying
 
Action< ModuleEvents.OnPlayerEquipItemOnPlayerEquipItem
 
Action< ModuleEvents.OnPlayerGuiEventOnPlayerGuiEvent
 
Action< ModuleEvents.OnPlayerLevelUpOnPlayerLevelUp
 
Action< OnPlayerQuickChatOnPlayerQuickChat
 
Action< ModuleEvents.OnPlayerRespawnOnPlayerRespawn
 
Action< ModuleEvents.OnPlayerRestOnPlayerRest
 
Action< ModuleEvents.OnPlayerTargetOnPlayerTarget [get]
 
Action< ModuleEvents.OnPlayerTileActionOnPlayerTileAction
 
Action< ModuleEvents.OnPlayerUnequipItemOnPlayerUnequipItem
 
Action< OnServerCharacterSaveOnServerCharacterSave
 
Action< OnServerSendAreaOnServerSendArea
 
IEnumerable< NwPlayer >?? PartyMembers [get]
 Gets all players in this player's party (including themself).
Associates are not included. Use LoginCreature.Faction.GetMembers() for a list of all party members, including associate creatures. More...
 
PlayerPlatform Platform [get]
 Gets the platform this player is currently playing from. More...
 
uint PlayerId [get]
 Gets the unique numeric ID of this player. More...
 
string PlayerName [get]
 Gets the player's login name. More...
 
TimeSpan?? RestDurationOverride [get, set]
 Gets or sets a custom rest duration for this player.
Null indicates that no override is set. Assign null to use the default rest duration. More...
 
Location??? SpawnLocation [get, set]
 Gets or sets the location that this player will spawn at when logging in to the server. More...
 

Detailed Description

A player client connected to the server.

Member Function Documentation

◆ ActionExamine()

async Task Anvil.API.NwPlayer.ActionExamine ( NwGameObject  target)
inline

Shows an examine dialog for the specified target.

Parameters
targetThe target to examine.

◆ ActionStartConversation()

async Task Anvil.API.NwPlayer.ActionStartConversation ( NwGameObject  converseWith,
string  dialogResRef = "",
bool  isPrivate = false,
bool  playHello = true 
)
inline

Starts a conversation with another object, typically a creature.

Parameters
converseWithThe target object to converse with.
dialogResRefThe dialogue to start. If ControlledCreature is unset, the target's own dialogue file will be used.
isPrivateWhether ControlledCreature dialogue should be visible to all nearby players, or visible to the player only.
playHelloWhether the hello/greeting should be played once the dialogue starts.

◆ AddCustomJournalEntry()

int Anvil.API.NwPlayer.AddCustomJournalEntry ( JournalEntry  entryData,
bool  silentUpdate = false 
)
inline

Adds/updates a journal entry.

Parameters
entryDataThe new/updated journal entry.
silentUpdatefalse = Notify player via sound effects and feedback message, true = Suppress sound effects and feedback message
Returns
A positive number to indicate the new amount of journal entries on the player, -1 on an error.

◆ AddHenchmen()

void Anvil.API.NwPlayer.AddHenchmen ( NwCreature  henchmen)
inline

Attaches the specified creature to the player as a henchmen.

Parameters
henchmenThe henchmen to attach to the player.

◆ AddJournalQuestEntry()

void Anvil.API.NwPlayer.AddJournalQuestEntry ( string  categoryTag,
int  entryId,
bool  allPartyMembers = true,
bool  allowOverrideHigher = false 
)
inline

Adds an entry to the player's journal.

Parameters
categoryTagThe tag of the Journal category (case-sensitive).
entryIdThe ID of the Journal entry.
allPartyMembersIf true, ControlledCreature entry is added to all players in the player's party.
allowOverrideHigherIf true, disables the default restriction that requires journal entry numbers to increase.

◆ AddLoopingVisualEffect()

void Anvil.API.NwPlayer.AddLoopingVisualEffect ( NwGameObject  gameObject,
VisualEffectTableEntry  visualEffect 
)
inline

Adds the specified visual effect to an object, but only visible to this player.

Parameters
gameObjectThe game object to apply the effect to.
visualEffectThe visual effect to apply.

◆ AddToParty()

void Anvil.API.NwPlayer.AddToParty ( NwPlayer  partyLeader)
inline

Adds the player to the specified party leader's party.

Parameters
partyLeaderThe party leader of the party to join.

◆ ApplyInstantVisualEffectToObject()

void Anvil.API.NwPlayer.ApplyInstantVisualEffectToObject ( VfxType  visualEffect,
NwGameObject  target 
)
inline

Plays the specified "instant" VFX (Com*, FNF*, IMP*) on the target for this player only.

Parameters
visualEffectThe effect to play.
targetThe target object to play the effect upon.

◆ AttachCamera()

void Anvil.API.NwPlayer.AttachCamera ( NwGameObject  target,
bool  findCleanView = false 
)
inline

Attaches this player's camera to the specified game object. The object must be in the same area, and within visible distance.

Parameters
targetThe target object.
findCleanViewIf true, the client will attempt to find a camera position where the target is in view.

◆ BootPlayer()

void Anvil.API.NwPlayer.BootPlayer ( string  reason = "")
inline

Boots the player from the server.

Parameters
reasonAn optional message to show to the player.

◆ ClearLoopingVisualEffects()

void Anvil.API.NwPlayer.ClearLoopingVisualEffects ( NwGameObject  gameObject)
inline

Clears looping visual effects on the specified object visible only to this player.

Parameters
gameObjectThe object to clear visual effects form.

◆ ClearObjectNameOverride()

void Anvil.API.NwPlayer.ClearObjectNameOverride ( NwGameObject  gameObject)
inline

Clears an override name for the specified object.

Parameters
gameObjectThe object whose overriden name will be cleared.

◆ ClearPlayerNameOverride() [1/2]

void Anvil.API.NwPlayer.ClearPlayerNameOverride ( bool  clearAll = false)
inline

Clears an overridden player character name.

Parameters
clearAllIf true, both global and any personal overrides will be cleared for that target player.

◆ ClearPlayerNameOverride() [2/2]

void Anvil.API.NwPlayer.ClearPlayerNameOverride ( NwPlayer  observer)
inline

Clears an overridden player character name for a specific observer.

Parameters
observerThe observer whose overriden name of target is being cleared.

◆ ClearTextureOverride()

void Anvil.API.NwPlayer.ClearTextureOverride ( string  texName)
inline

Removes the override for the specified texture, reverting to the original texture.

Parameters
texNameThe name of the original texture.

◆ Delete()

async Task Anvil.API.NwPlayer.Delete ( string  kickMessage,
bool  preserveBackup = true 
)
inline

Immediately kicks the player and deletes their character file (.bic).

Parameters
kickMessageThe kick message to show to the player.
preserveBackupIf true, instead of being deleted it will be renamed to be hidden from the character list, but remain in the vault directory.

◆ DestroySQLDatabase()

void Anvil.API.NwPlayer.DestroySQLDatabase ( )
inline

Immediately destroys the database attached to this player, clearing out all data and schema.
This operation is immediate and irreversible, even when inside a transaction or running query.
Existing active/prepared sqlqueries will remain functional, but any references to stored data or schema members will be invalidated.

◆ DMPossessCreature()

void Anvil.API.NwPlayer.DMPossessCreature ( NwCreature  creature,
bool  impersonate = false 
)
inline

If this player is a DM, causes them to possess the specified creature.

Parameters
creature
impersonateTrue if the DM should retain their full powers during possession, false if they get the creature's powers.
Exceptions
InvalidOperationExceptionThrown if the player is not a DM, or the creature is already possessed by another player.

◆ EnterCutsceneMode()

void Anvil.API.NwPlayer.EnterCutsceneMode ( bool  allowLeftClick = false)
inline

Enters "Cutscene" mode, disabling GUI and camera controls for the player and marking them as plot object (invulnerable).
See Effect.CutsceneGhost, and other Cutscene* effects for hiding and controlling the player creature during cutscene mode.

Parameters
allowLeftClickIf true, allows the player to interact with the game world using the left mouse button only. Otherwise, prevents all interactions.

◆ EnterTargetMode()

void Anvil.API.NwPlayer.EnterTargetMode ( Action< ModuleEvents.OnPlayerTarget handler,
TargetModeSettings settings = null 
)
inline

Triggers the player to enter cursor targeting mode, invoking the specified handler once the player selects something.

Parameters
handlerThe lamda/method to invoke once this player selects something.
settingsDisplay and behaviour options for the target mode.

◆ ExitCutsceneMode()

void Anvil.API.NwPlayer.ExitCutsceneMode ( )
inline

Exits "Cutscene" mode, restoring standard GUI and camera controls to the player, and restoring their plot flag.

◆ ExportCharacter()

void Anvil.API.NwPlayer.ExportCharacter ( )
inline

Forces the player's character to saved and exported to its respective directory (LocalVault, ServerVault, etc).

◆ FadeFromBlack()

void Anvil.API.NwPlayer.FadeFromBlack ( float  fadeSpeed)
inline

Fades the screen for a given player from black to regular screen.

Parameters
fadeSpeedDetermines how fast the fade occurs.

◆ FadeToBlack()

void Anvil.API.NwPlayer.FadeToBlack ( float  fadeSpeed)
inline

Fades the screen for a given player from a regular screen to black.

Parameters
fadeSpeedDetermines how fast the fade occurs.

◆ FloatingTextString()

void Anvil.API.NwPlayer.FloatingTextString ( string  message,
bool  broadcastToParty = true,
bool  chatWindow = true 
)
inline

Briefly displays a floating text message above the player's head.

Parameters
messageThe message to display.
broadcastToPartyIf true, shows the floating message to all players in the same party.
chatWindowIf true, the floating text will be shown in the player's chat window.

◆ FloatingTextStrRef()

void Anvil.API.NwPlayer.FloatingTextStrRef ( int  strRef,
bool  broadcastToParty = true,
bool  chatWindow = true 
)
inline

Briefly displays a floating text message above the player's head using the specified string reference.

Parameters
strRefThe string ref index to use.
broadcastToPartyIf true, shows the floating message to all players in the same party.
chatWindowIf true, the floating text will be shown in the player's chat window.

◆ ForceAreaReload()

void Anvil.API.NwPlayer.ForceAreaReload ( )
inline

Forces this player to reload their current area.

◆ ForceExamine()

void Anvil.API.NwPlayer.ForceExamine ( NwGameObject  target)
inline

Forces the player to examine the specified game object.
Works on NwCreature, NwPlaceable, NwItem and NwDoor.
Does nothing for other object types.

Parameters
targetThe GameObject to examine.

◆ GetAreaExplorationState()

unsafe? byte [] Anvil.API.NwPlayer.GetAreaExplorationState ( NwArea area)
inline

Gets this player's area exploration state for the specified area.

Parameters
areaThe area to query.
Returns
A byte array representing the tiles explored for the area.

◆ GetCampaignVariable< T >()

T Anvil.API.NwPlayer.GetCampaignVariable< T > ( string  campaign,
string  name 
)
inline

Gets the specified campaign variable for the player.

Parameters
campaignThe name of the campaign.
nameThe variable name.
Template Parameters
TThe variable type.
Returns
A CampaignVariable instance for getting/setting the variable's value.
Type Constraints
T :CampaignVariable 
T :new() 

◆ GetDeviceProperty()

int Anvil.API.NwPlayer.GetDeviceProperty ( PlayerDeviceProperty  property)
inline

Gets the specified device property/capability as advertised by the client.

Parameters
propertyThe property to query.
Returns
The queried property value, or -1 if:
  • the property was never set by the client,
  • the actual value is -1,
  • the player is running a older build that does not advertise device properties,
  • the player has disabled sending device properties (Options/Game/Privacy).

◆ GetJournalEntry()

JournalEntry? Anvil.API.NwPlayer.GetJournalEntry ( string  questTag)
inline

Gets an existing journal entry with the specified quest tag.

Parameters
questTagThe quest tag you wish to get the journal entry for.
Returns
A JournalEntry structure containing the journal entry data, null if an entry with the specified tag cannot be found.

◆ GetLoopingVisualEffects()

List<VisualEffectTableEntry>? Anvil.API.NwPlayer.GetLoopingVisualEffects ( NwGameObject  gameObject)
inline

Gets a list of visual effects for the specified object visible only to this player.

Parameters
gameObjectThe game object containing the visual effects.

◆ GetObjectNameOverride()

string? Anvil.API.NwPlayer.GetObjectNameOverride ( NwGameObject  gameObject)
inline

Gets the current name override set for the specified object.

Parameters
gameObjectThe game object that has an override name.

◆ GetOverridesForObserver()

Dictionary<NwPlayer, PlayerNameOverride> Anvil.API.NwPlayer.GetOverridesForObserver ( bool  includeGlobal = false)
inline

Gets a list of all name overrides for the specified observer.

Parameters
includeGlobalTrue if global overrides should be included in the returned map.
Returns
A dictionary containing the name overrides for the specified observer.

◆ GetPersonalVisibilityOverride()

VisibilityMode Anvil.API.NwPlayer.GetPersonalVisibilityOverride ( NwGameObject  target)
inline

Gets the visiblity override for the specified object for this player.

◆ GetPlayerNameOverride()

PlayerNameOverride? Anvil.API.NwPlayer.GetPlayerNameOverride ( NwPlayer observer = null)
inline

Gets the current name override set for the specified player.

Parameters
observerThe specific observer.

◆ GiveXp()

void Anvil.API.NwPlayer.GiveXp ( int  xPAmount)
inline

Gives the specified XP to the player, adjusted by any multiclass penalty.

Parameters
xPAmountAmount of experience to give.

◆ LockCameraDirection()

void Anvil.API.NwPlayer.LockCameraDirection ( bool  isLocked = true)
inline

Locks the player's camera direction to its current direction, or unlocks the player's camera direction to enable it to move freely again.

◆ LockCameraDistance()

void Anvil.API.NwPlayer.LockCameraDistance ( bool  isLocked = true)
inline

Locks the player's camera distance to its current distance setting, or unlocks the player's camera distance.

◆ LockCameraPitch()

void Anvil.API.NwPlayer.LockCameraPitch ( bool  isLocked = true)
inline

Locks the player's camera pitch to its current pitch setting, or unlocks the player's camera pitch.

◆ NightToDay()

void Anvil.API.NwPlayer.NightToDay ( TimeSpan  delayTransitionTime = default)
inline

Changes the current Day/Night cycle for the player to daylight.

Parameters
delayTransitionTimeTime it takes for the daylight to fade in.

◆ OpenInventory() [1/3]

void Anvil.API.NwPlayer.OpenInventory ( )
inline

Instructs the player to open their inventory.

◆ OpenInventory() [2/3]

void Anvil.API.NwPlayer.OpenInventory ( NwCreature  target)
inline

Opens the specified creatures inventory, and shows it to the player.

DMs can see any player or creature's inventory. Players can only view their own inventory, or that of a henchmen.

Parameters
targetThe target creature's inventory to view.

◆ OpenInventory() [3/3]

void Anvil.API.NwPlayer.OpenInventory ( NwPlaceable  target)
inline

Forces the player to open the inventory of the specified placeable.

Parameters
targetThe placeable inventory to be viewed.

◆ PlaySound()

void Anvil.API.NwPlayer.PlaySound ( string  sound,
NwGameObject target = null 
)
inline

Plays the specified sound at the target in the current area for this player only.

Parameters
soundThe sound resref.
targetThe target object for the sound to originate. Defaults to the location of the player.

◆ PopUpDeathPanel()

void Anvil.API.NwPlayer.PopUpDeathPanel ( bool  respawnButton = true,
bool  waitForHelp = true,
int  helpStringRef = 0,
string  helpString = "" 
)
inline

Displays a death panel that can turn off the "Respawn" or "Wait for Help" buttons.
The "Wait for Help" button is only enabled when the game is running in multiplayer mode.
By default if helpString isn't specified, the value used is "Choose an option below.<br/> Respawning will incur a penalty of 50 XP per level of your character and the loss of 10% of your gold."
(strref 66219 single player, 6600 for multiplayer).

Parameters
respawnButtonIf true the "Respawn" button will be enabled.
waitForHelpIf true the "Wait For Help" button will be enabled.
helpStringRefString reference to display for hel.
helpStringString to display for help which appears in the top of the panel.

◆ PopUpGUIPanel()

void Anvil.API.NwPlayer.PopUpGUIPanel ( GUIPanel  panel = GUIPanel.Death)
inline

Displays a GUI panel to a player.

Parameters
panelThe panel type to display.

◆ PostString()

void Anvil.API.NwPlayer.PostString ( string  message,
int  xPos,
int  yPos,
ScreenAnchor  anchor,
float  life,
Color start = null,
Color end = null,
int  id = 0,
string  font = "" 
)
inline

Displays a message on the player's screen.
The message is always displayed on top of whatever is on the screen, including UI elements.

Parameters
messageThe message to print.
xPosThe x coordinate relative to anchor.
yPosThe y coordinate relative to anchor.
anchorThe screen anchor/origin point.
lifeDuration to show ControlledCreature string in seconds.
startThe starting color of ControlledCreature text (default: white).
endThe color of the text to fade to as it nears the end of the lifetime (default: white).
idAn optional numeric ID for ControlledCreature string. If not set to 0, subsequent calls to PostString will remove the text with the same ID.
fontIf specified, the message will be rendered with the specified font instead of the default console font.

◆ PrepareSQLQuery()

SQLQuery Anvil.API.NwPlayer.PrepareSQLQuery ( string  query)
inline

Sets up a SQL Query for this player.
This will NOT run the query; only make it available for parameter binding.
To run the query, you need to call SQLQuery.Execute even if you do not expect result data.

Parameters
queryThe query to be prepared.
Returns
A SQLQuery object.

◆ RefreshClientObject()

unsafe void Anvil.API.NwPlayer.RefreshClientObject ( NwGameObject  gameObject)
inline

Causes this player to refresh the client object associated with the given game object.

Parameters
gameObjectThe game object to refresh.

◆ RefreshPlayerClientObject()

void Anvil.API.NwPlayer.RefreshPlayerClientObject ( )
inline

Causes this player to refresh the player client object associated with their current controlled creature.

◆ RemoveFromCurrentParty()

void Anvil.API.NwPlayer.RemoveFromCurrentParty ( )
inline

Removes the player from their current party.

◆ RestoreCameraFacing()

async Task Anvil.API.NwPlayer.RestoreCameraFacing ( )
inline

Restores the camera mode and facing to what they where when StoreCameraFacing was last called.
RestoreCameraFacing can only be used once, and must correspond to a previous call to StoreCameraFacing.

◆ SeekAudioStream()

void Anvil.API.NwPlayer.SeekAudioStream ( AudioStreamIdentifier  streamIdentifier,
float  seekOffset 
)
inline

Seeks the audio stream with the specified identifier to a new position on the currently playing audio track.

Parameters
streamIdentifierThe stream identifier to update.
seekOffsetThe new position on the audio track

◆ SendServerMessage()

void Anvil.API.NwPlayer.SendServerMessage ( string  message,
Color  color 
)
inline

Sends a server message to the player.

Parameters
messageThe message to send.
colorA color to apply to the message.

◆ SendToServer()

void Anvil.API.NwPlayer.SendToServer ( string  ipAddress = "",
string  password = "",
string  waypointTag = "",
bool  seamless = false 
)
inline

Sends the player to a new server, where the player's character will connect and log in.

Parameters
ipAddressDNS name or the IP address + port of the destination server.
passwordThe player password to connect to the destination server.
waypointTagThe custom waypoint tag on the destination server for the player to jump to. Defaults to the module's start location.
seamlessIf true, the player will not be prompted with information about the new server, and they will not be allowed to save a copy of their character (if it is a local vault character).

◆ SetAreaExplorationState() [1/2]

void Anvil.API.NwPlayer.SetAreaExplorationState ( NwArea  area,
bool  explored 
)
inline

Sets whether the player has explored an area.

Parameters
areaThe area to explore.
exploredtrue if ControlledCreature area has been explored, otherwise false to (re)hide the map.

◆ SetAreaExplorationState() [2/2]

unsafe void Anvil.API.NwPlayer.SetAreaExplorationState ( NwArea  area,
byte[]  newState 
)
inline

Sets this player's area exploration state for the specified area.

Parameters
areaThe area to modify.
newStateA byte array representing the tiles explored for the area, as returned by GetAreaExplorationState.

◆ SetAudioStreamPaused()

void Anvil.API.NwPlayer.SetAudioStreamPaused ( AudioStreamIdentifier  streamIdentifier,
bool  paused,
TimeSpan  fadeTime = default 
)
inline

Pauses/Unpauses the audio stream on the specified identifier.

Parameters
streamIdentifierThe stream identifier to pause/unpause.
pausedThe new pause state.
fadeTimeThe time to fade out/fade in before pausing/unpausing the stream.

◆ SetAudioStreamVolume()

void Anvil.API.NwPlayer.SetAudioStreamVolume ( AudioStreamIdentifier  streamIdentifier,
float  volume = 1.0f,
TimeSpan  fadeTime = default 
)
inline

Changes the volume of the audio stream with the specified identifier.

Parameters
streamIdentifierThe stream identifier to receive the new volume level.
volumeThe new volume level (0.0-1.0)
fadeTimeThe time to fade in to the new volume level.

◆ SetCameraFacing()

async Task Anvil.API.NwPlayer.SetCameraFacing ( float  direction,
float  pitch = -1.0f,
float  distance = -1.0f,
CameraTransitionType  transitionType = CameraTransitionType.Snap 
)
inline

Changes the direction the player's camera is facing.

Parameters
directionHorizontal angle from East in degrees. -1 to leave the angle unmodified.
pitchVertical angle of the camera in degrees. -1 to leave the angle unmodified.
distanceDistance (zoom) of the camera. -1 to leave the distance unmodified.
transitionTypeThe transition to use for moving the camera.

◆ SetCameraLimits()

void Anvil.API.NwPlayer.SetCameraLimits ( float  minPitch = -1.0f,
float  maxPitch = -1.0f,
float  minDist = -1.0f,
float  maxDist = -1.0f 
)
inline

Sets camera limits that override any client configuration.
A value of -1 means to use the client limits.

◆ SetCutsceneMode()

void Anvil.API.NwPlayer.SetCutsceneMode ( bool  inCutscene = true,
bool  leftClickEnabled = false 
)
inline

Toggles the CutsceneMode state for the player.

Parameters
inCutsceneTrue if cutscene mode should be enabled, otherwise false.
leftClickEnabledTrue if ControlledCreature user should be allowed to interact with the game with the left mouse button. False to prevent interaction.

◆ SetGuiPanelDisabled()

void Anvil.API.NwPlayer.SetGuiPanelDisabled ( GUIPanel  panel,
bool  disabled,
NwGameObject targetObject = null 
)
inline

Disable a specific gui panel for this player.
Will close the GUI panel if it is currently open.
Will fire a GuiEventType.DisabledPanelAttemptOpen event for some panels if a player attempts to open them while disabled.

Parameters
panelThe panel type to disable.
disabledTrue to disable the panel, false to re-enable the panel.
targetObjectThe target object (e.g. examined object) where this panel should be disabled.

◆ SetObjectNameOverride()

void Anvil.API.NwPlayer.SetObjectNameOverride ( NwGameObject  gameObject,
string  name 
)
inline

Sets an override name for a specific game object, as visible from this player.
Supports placeables, doors, items and creatures.

Parameters
gameObjectThe game object to set a new name for.
nameThe new name of the object.
Exceptions
ArgumentExceptionThrown if gameObject is not a placeable, door, item or creature.

◆ SetPCReputation()

void Anvil.API.NwPlayer.SetPCReputation ( bool  like,
NwPlayer  target 
)
inline

Sets if the player should like, or unlike the specified player.

Parameters
liketrue if the player should like the target, false if the player should dislike the target.
targetThe target to like/dislike.

◆ SetPersonalVisibilityOverride()

void Anvil.API.NwPlayer.SetPersonalVisibilityOverride ( NwGameObject  target,
VisibilityMode  visibilityMode 
)
inline

Sets the visiblity override for the specified object for this player.

◆ SetPlayerNameOverride() [1/2]

void Anvil.API.NwPlayer.SetPlayerNameOverride ( PlayerNameOverride  nameOverride)
inline

Sets an override player character name and community name on the player list for all players. Is not persistent.

Parameters
nameOverrideThe new names for the player.

◆ SetPlayerNameOverride() [2/2]

void Anvil.API.NwPlayer.SetPlayerNameOverride ( PlayerNameOverride  nameOverride,
NwPlayer  observer 
)
inline

Sets an override player character name and community name on the player list as observed by a specific player. Is not persistent.

Parameters
nameOverrideThe new names for the player.
observerThe observer to see the new names.

◆ SetShaderUniform() [1/3]

void Anvil.API.NwPlayer.SetShaderUniform ( ShaderUniform  uniform,
float  value 
)
inline

Sets a global shader uniform for this player.
These uniforms are not used by the base game and are reserved for module-specific scripting.
You need to add custom shaders that will make use of them.
In multiplayer, these need to be reapplied when a player rejoins.

Parameters
uniformThe uniform to set.
valueThe value to set for the uniform.

◆ SetShaderUniform() [2/3]

void Anvil.API.NwPlayer.SetShaderUniform ( ShaderUniform  uniform,
int  value 
)
inline

Sets a global shader uniform for this player.
These uniforms are not used by the base game and are reserved for module-specific scripting.
You need to add custom shaders that will make use of them.
In multiplayer, these need to be reapplied when a player rejoins.

Parameters
uniformThe uniform to set.
valueThe value to set for the uniform.

◆ SetShaderUniform() [3/3]

void Anvil.API.NwPlayer.SetShaderUniform ( ShaderUniform  uniform,
Vector4  value 
)
inline

Sets a global shader uniform for this player.
These uniforms are not used by the base game and are reserved for module-specific scripting.
You need to add custom shaders that will make use of them.
In multiplayer, these need to be reapplied when a player rejoins.

Parameters
uniformThe uniform to set.
valueThe value to set for the uniform.

◆ SetSpellTargetingData()

void Anvil.API.NwPlayer.SetSpellTargetingData ( TargetingData  data)
inline

Sets a spell targeting data override for this player.

Parameters
dataThe override to apply.
Exceptions
ArgumentNullExceptionThrown if data.Spell is not specified.

◆ SetTextureOverride()

void Anvil.API.NwPlayer.SetTextureOverride ( string  oldTexName,
string  newTexName 
)
inline

Makes ControlledCreature PC load a new texture instead of another.

Parameters
oldTexNameThe existing texture to replace.
newTexNameThe new override texture.

◆ ShowVisualEffect()

void Anvil.API.NwPlayer.ShowVisualEffect ( VfxType  effectType,
Vector3  position 
)
inline

Plays the specified VFX at the target position in the current area for this player only.

Parameters
effectTypeThe effect to play.
positionWhere to play the effect.

◆ StartAudioStream()

void Anvil.API.NwPlayer.StartAudioStream ( AudioStreamIdentifier  streamIdentifier,
string  resRef,
bool  looping = false,
TimeSpan  fadeTime = default,
float  seekOffset = -1f,
float  volume = 1f 
)
inline

Assign one of the available audio streams to play a specific file. This mechanism can be used
to replace regular music playback, and synchronize it between clients.

Parameters
streamIdentifierThe audio stream/channel to use for playing audio.
resRefThe audio resref to play.
loopingIf the audio should loop.
fadeTimeAn optional fade in time for the audio.
seekOffsetThe offset to seek in the audio track. If this is greater than the length of the track, it will loop back to the start.
volumeThe volume to set on the audio stream.

◆ StopAudioStream()

void Anvil.API.NwPlayer.StopAudioStream ( AudioStreamIdentifier  streamIdentifier,
TimeSpan  fadeTime = default 
)
inline

Stops the audio stream playing on the specified identifier.

Parameters
streamIdentifierThe stream identifier to stop.
fadeTimeThe fade out time.

◆ StopFade()

void Anvil.API.NwPlayer.StopFade ( )
inline

Removes any current fading effects or black screen from the monitor of the player.

◆ StoreCameraFacing()

async Task Anvil.API.NwPlayer.StoreCameraFacing ( )
inline

Stores (bookmarks) the camera's facing and position so it can be restored later with RestoreCameraFacing.

◆ TryCreateNuiWindow()

bool Anvil.API.NwPlayer.TryCreateNuiWindow ( NuiWindow  window,
out NuiWindowToken  token,
string  windowId = "" 
)
inline

Create a NUI window for this player.

Parameters
windowThe window to create.
tokenThe created player-unique token for this window instance.
windowIdA unique alphanumeric ID identifying this window. Re-creating a window with the same id of one already open will immediately close the old one.
Returns
True if the window was successfully created, otherwise false.

◆ TryEnterTargetMode()

bool Anvil.API.NwPlayer.TryEnterTargetMode ( Action< ModuleEvents.OnPlayerTarget handler,
TargetModeSettings settings = null 
)
inline

Attempts to get this player to enter cursor targeting mode, invoking the specified handler once the player selects something.
If the player is already in targeting mode, the existing handler will not be cleared.

Parameters
handlerThe lamda/method to invoke once this player selects something.
settingsDisplay and behaviour options for the target mode.
Returns
True if the player successfully entered target mode, otherwise false.

◆ UnlockAchievement()

void Anvil.API.NwPlayer.UnlockAchievement ( string  achievementId,
int  lastValue = 0,
int  currentValue = 0,
int  maxValue = 0 
)
inline

Unlock an achievement for the player who must be logged in.

Parameters
achievementIdThe achievement ID on the remote server.
lastValueThe previous value of the associated achievement stat.
currentValueThe current value of the associated achievement stat.
maxValueThe maximum value of the associate achievement stat.

◆ UnpossessCreature()

void Anvil.API.NwPlayer.UnpossessCreature ( )
inline

If this player is possessing a creature, instructs them to unpossess them.

◆ Vibrate()

void Anvil.API.NwPlayer.Vibrate ( VibratorMotor  motor,
float  strength,
TimeSpan  duration 
)
inline

Vibrates the player's device or controller. Does nothing if vibration is not supported.

Parameters
motorWhich motors to vibrate.
strengthThe intensity of the vibration.
durationHow long to vibrate for.

Property Documentation

◆ BicFileName

string Anvil.API.NwPlayer.BicFileName
get

Gets the name of the player's .bic file.

◆ CameraFlags

CameraFlag Anvil.API.NwPlayer.CameraFlags
set

Sets camera settings that override any client configuration settings.

◆ CameraHeight

float Anvil.API.NwPlayer.CameraHeight
set

Sets the camera height for this player.

◆ CDKey

string Anvil.API.NwPlayer.CDKey
get

Gets the public part of the CD key that the player used when logging in.

◆ ClientVersion

Version Anvil.API.NwPlayer.ClientVersion
get

Gets the player's client version (Major + Minor + Build).

◆ ClientVersionCommitSha1

string Anvil.API.NwPlayer.ClientVersionCommitSha1
get

Gets the player's client version, as a Sha1 commit hash.

◆ ControlledCreature

NwCreature? Anvil.API.NwPlayer.ControlledCreature
get

Gets the creature this player is currently controlling.
This will return the player's current possessed creature (familiar, DM possession), otherwise their player character if they are currently not possessing a creature.

◆ CutsceneCameraMoveRate

float Anvil.API.NwPlayer.CutsceneCameraMoveRate
getset

Gets or sets the movement rate factor for the cutscene camera following ControlledCreature 'camera man'.

◆ IPAddress

string Anvil.API.NwPlayer.IPAddress
get

Gets the connecting IP address for the player.

◆ IsConnected

bool Anvil.API.NwPlayer.IsConnected
get

Gets if this player is connected and playing (true), or if this player is still on character selection or connecting (false).

◆ IsConnectionRelayed

bool Anvil.API.NwPlayer.IsConnectionRelayed
get

Gets a value indicating whether the player has connected to the server over a relay (instead of directly).

◆ IsDM

bool Anvil.API.NwPlayer.IsDM
get

Gets a value indicating whether the player is a Dungeon Master.

◆ IsInCursorTargetMode

bool Anvil.API.NwPlayer.IsInCursorTargetMode
get

Gets if this player is in cursor targeting mode.
NOTE! Only works if the player entered target mode using TryEnterTargetMode.

Returns
True if this player is attempting to target something.

◆ IsInCutsceneMode

bool Anvil.API.NwPlayer.IsInCutsceneMode
get

Gets a value indicating whether ControlledCreature creature is currently in "Cutscene" mode.

◆ IsPlayerDM

bool?? Anvil.API.NwPlayer.IsPlayerDM
getset

Gets or sets whether the player has DM privileges gained through a player login (as opposed to the DM client).

◆ IsValid

bool Anvil.API.NwPlayer.IsValid
get

Gets a value indicating whether this NwPlayer object is valid.
Returns false after the player disconnects from the server.

◆ Language

PlayerLanguage Anvil.API.NwPlayer.Language
get

Gets the language configured by this player.

◆ LoginCreature

NwCreature? Anvil.API.NwPlayer.LoginCreature
get

Gets the original creature that this player logged in with.

◆ PartyMembers

IEnumerable<NwPlayer>?? Anvil.API.NwPlayer.PartyMembers
get

Gets all players in this player's party (including themself).
Associates are not included. Use LoginCreature.Faction.GetMembers() for a list of all party members, including associate creatures.

◆ Platform

PlayerPlatform Anvil.API.NwPlayer.Platform
get

Gets the platform this player is currently playing from.

◆ PlayerId

uint Anvil.API.NwPlayer.PlayerId
get

Gets the unique numeric ID of this player.

◆ PlayerName

string Anvil.API.NwPlayer.PlayerName
get

Gets the player's login name.

◆ RestDurationOverride

TimeSpan?? Anvil.API.NwPlayer.RestDurationOverride
getset

Gets or sets a custom rest duration for this player.
Null indicates that no override is set. Assign null to use the default rest duration.

◆ SpawnLocation

Location??? Anvil.API.NwPlayer.SpawnLocation
getset

Gets or sets the location that this player will spawn at when logging in to the server.


The documentation for this class was generated from the following files: