Anvil
|
A player client connected to the server. More...
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... | |
T | 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 () |
JournalEntry? | GetJournalEntry (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, PlayerNameOverride > | GetOverridesForObserver (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... | |
PlayerNameOverride? | GetPlayerNameOverride (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... | |
NwCreature? | 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. 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... | |
NwCreature? | LoginCreature [get] |
Gets the original creature that this player logged in with. More... | |
Action< OnBarterEnd > | OnBarterEnd |
Action< OnBarterStart > | OnBarterStart |
Action< OnClientDisconnect > | OnClientDisconnect |
Action< ModuleEvents.OnClientEnter > | OnClientEnter |
Action< ModuleEvents.OnClientLeave > | OnClientLeave |
Action< OnClientLevelUpBegin > | OnClientLevelUpBegin |
Action< OnCombatStatusChange > | OnCombatStatusChange |
Action< ModuleEvents.OnCutsceneAbort > | OnCutsceneAbort |
Action< OnDMAppear > | OnDMAppear |
Action< OnDMChangeDifficulty > | OnDMChangeDifficulty |
Action< OnDMDisableTrap > | OnDMDisableTrap |
Action< OnDMDisappear > | OnDMDisappear |
Action< OnDMDumpLocals > | OnDMDumpLocals |
Action< OnDMForceRest > | OnDMForceRest |
Action< OnDMGetFactionReputation > | OnDMGetFactionReputation |
Action< OnDMGetVariable > | OnDMGetVariable |
Action< OnDMGiveAlignment > | OnDMGiveAlignment |
Action< OnDMGiveGold > | OnDMGiveGold |
Action< OnDMGiveItem > | OnDMGiveItem |
Action< OnDMGiveLevel > | OnDMGiveLevel |
Action< OnDMGiveXP > | OnDMGiveXP |
Action< OnDMGoTo > | OnDMGoTo |
Action< OnDMHeal > | OnDMHeal |
Action< OnDMJumpAllPlayersToPoint > | OnDMJumpAllPlayersToPoint |
Action< OnDMJumpTargetToPoint > | OnDMJumpTargetToPoint [get] |
Action< OnDMJumpToPoint > | OnDMJumpToPoint |
Action< OnDMKill > | OnDMKill |
Action< OnDMLimbo > | OnDMLimbo |
Action< OnDMPlayerDMLogin > | OnDMPlayerDMLogin |
Action< OnDMPlayerDMLogout > | OnDMPlayerDMLogout |
Action< OnDMPossess > | OnDMPossess |
Action< OnDMPossessFullPower > | OnDMPossessFullPower |
Action< OnDMSetDate > | OnDMSetDate |
Action< OnDMSetFaction > | OnDMSetFaction |
Action< OnDMSetFactionReputation > | OnDMSetFactionReputation |
Action< OnDMSetStat > | OnDMSetStat |
Action< OnDMSetTime > | OnDMSetTime |
Action< OnDMSetVariable > | OnDMSetVariable |
Action< OnDMSpawnObject > | OnDMSpawnObject |
Action< OnDMSpawnTrapOnObject > | OnDMSpawnTrapOnObject |
Action< OnDMTakeItem > | OnDMTakeItem |
Action< OnDMToggleAI > | OnDMToggleAI |
Action< OnDMToggleImmortal > | OnDMToggleImmortal |
Action< OnDMToggleInvulnerable > | OnDMToggleInvulnerable |
Action< OnDMToggleLock > | OnDMToggleLock |
Action< OnDMViewInventory > | OnDMViewInventory |
Action< OnExamineObject > | OnExamineObject |
Action< OnExamineTrap > | OnExamineTrap |
Action< OnMapPinAddPin > | OnMapPinAddPin |
Action< OnMapPinChangePin > | OnMapPinChangePin |
Action< OnMapPinDestroyPin > | OnMapPinDestroyPin |
Action< ModuleEvents.OnNuiEvent > | OnNuiEvent |
Action< OnPartyEvent > | OnPartyEvent |
Action< ModuleEvents.OnPlayerChat > | OnPlayerChat |
Action< ModuleEvents.OnPlayerDeath > | OnPlayerDeath |
Action< ModuleEvents.OnPlayerDying > | OnPlayerDying |
Action< ModuleEvents.OnPlayerEquipItem > | OnPlayerEquipItem |
Action< ModuleEvents.OnPlayerGuiEvent > | OnPlayerGuiEvent |
Action< ModuleEvents.OnPlayerLevelUp > | OnPlayerLevelUp |
Action< OnPlayerQuickChat > | OnPlayerQuickChat |
Action< ModuleEvents.OnPlayerRespawn > | OnPlayerRespawn |
Action< ModuleEvents.OnPlayerRest > | OnPlayerRest |
Action< ModuleEvents.OnPlayerTarget > | OnPlayerTarget [get] |
Action< ModuleEvents.OnPlayerTileAction > | OnPlayerTileAction |
Action< ModuleEvents.OnPlayerUnequipItem > | OnPlayerUnequipItem |
Action< OnServerCharacterSave > | OnServerCharacterSave |
Action< OnServerSendArea > | OnServerSendArea |
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... | |
A player client connected to the server.
|
inline |
Shows an examine dialog for the specified target.
target | The target to examine. |
|
inline |
Starts a conversation with another object, typically a creature.
converseWith | The target object to converse with. |
dialogResRef | The dialogue to start. If ControlledCreature is unset, the target's own dialogue file will be used. |
isPrivate | Whether ControlledCreature dialogue should be visible to all nearby players, or visible to the player only. |
playHello | Whether the hello/greeting should be played once the dialogue starts. |
|
inline |
Adds/updates a journal entry.
entryData | The new/updated journal entry. |
silentUpdate | false = Notify player via sound effects and feedback message, true = Suppress sound effects and feedback message |
|
inline |
Attaches the specified creature to the player as a henchmen.
henchmen | The henchmen to attach to the player. |
|
inline |
Adds an entry to the player's journal.
categoryTag | The tag of the Journal category (case-sensitive). |
entryId | The ID of the Journal entry. |
allPartyMembers | If true, ControlledCreature entry is added to all players in the player's party. |
allowOverrideHigher | If true, disables the default restriction that requires journal entry numbers to increase. |
|
inline |
Adds the specified visual effect to an object, but only visible to this player.
gameObject | The game object to apply the effect to. |
visualEffect | The visual effect to apply. |
|
inline |
Adds the player to the specified party leader's party.
partyLeader | The party leader of the party to join. |
|
inline |
Plays the specified "instant" VFX (Com*, FNF*, IMP*) on the target for this player only.
visualEffect | The effect to play. |
target | The target object to play the effect upon. |
|
inline |
Attaches this player's camera to the specified game object. The object must be in the same area, and within visible distance.
target | The target object. |
findCleanView | If true, the client will attempt to find a camera position where the target is in view. |
|
inline |
Boots the player from the server.
reason | An optional message to show to the player. |
|
inline |
Clears looping visual effects on the specified object visible only to this player.
gameObject | The object to clear visual effects form. |
|
inline |
Clears an override name for the specified object.
gameObject | The object whose overriden name will be cleared. |
|
inline |
Clears an overridden player character name.
clearAll | If true, both global and any personal overrides will be cleared for that target player. |
|
inline |
Clears an overridden player character name for a specific observer.
observer | The observer whose overriden name of target is being cleared. |
|
inline |
Removes the override for the specified texture, reverting to the original texture.
texName | The name of the original texture. |
|
inline |
Immediately kicks the player and deletes their character file (.bic).
kickMessage | The kick message to show to the player. |
preserveBackup | If true, instead of being deleted it will be renamed to be hidden from the character list, but remain in the vault directory. |
|
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.
|
inline |
If this player is a DM, causes them to possess the specified creature.
creature | |
impersonate | True if the DM should retain their full powers during possession, false if they get the creature's powers. |
InvalidOperationException | Thrown if the player is not a DM, or the creature is already possessed by another player. |
|
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.
allowLeftClick | If true, allows the player to interact with the game world using the left mouse button only. Otherwise, prevents all interactions. |
|
inline |
Triggers the player to enter cursor targeting mode, invoking the specified handler once the player selects something.
handler | The lamda/method to invoke once this player selects something. |
settings | Display and behaviour options for the target mode. |
|
inline |
Exits "Cutscene" mode, restoring standard GUI and camera controls to the player, and restoring their plot flag.
|
inline |
Forces the player's character to saved and exported to its respective directory (LocalVault, ServerVault, etc).
|
inline |
Fades the screen for a given player from black to regular screen.
fadeSpeed | Determines how fast the fade occurs. |
|
inline |
Fades the screen for a given player from a regular screen to black.
fadeSpeed | Determines how fast the fade occurs. |
|
inline |
Briefly displays a floating text message above the player's head.
message | The message to display. |
broadcastToParty | If true, shows the floating message to all players in the same party. |
chatWindow | If true, the floating text will be shown in the player's chat window. |
|
inline |
Briefly displays a floating text message above the player's head using the specified string reference.
strRef | The string ref index to use. |
broadcastToParty | If true, shows the floating message to all players in the same party. |
chatWindow | If true, the floating text will be shown in the player's chat window. |
|
inline |
Forces this player to reload their current area.
|
inline |
Forces the player to examine the specified game object.
Works on NwCreature, NwPlaceable, NwItem and NwDoor.
Does nothing for other object types.
target | The GameObject to examine. |
|
inline |
Gets this player's area exploration state for the specified area.
area | The area to query. |
|
inline |
Gets the specified campaign variable for the player.
campaign | The name of the campaign. |
name | The variable name. |
T | The variable type. |
T | : | CampaignVariable | |
T | : | new() |
|
inline |
Gets the specified device property/capability as advertised by the client.
property | The property to query. |
|
inline |
Gets an existing journal entry with the specified quest tag.
questTag | The quest tag you wish to get the journal entry for. |
|
inline |
Gets a list of visual effects for the specified object visible only to this player.
gameObject | The game object containing the visual effects. |
|
inline |
Gets the current name override set for the specified object.
gameObject | The game object that has an override name. |
|
inline |
Gets a list of all name overrides for the specified observer.
includeGlobal | True if global overrides should be included in the returned map. |
|
inline |
Gets the visiblity override for the specified object for this player.
|
inline |
Gets the current name override set for the specified player.
observer | The specific observer. |
|
inline |
Gives the specified XP to the player, adjusted by any multiclass penalty.
xPAmount | Amount of experience to give. |
|
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.
|
inline |
Locks the player's camera distance to its current distance setting, or unlocks the player's camera distance.
|
inline |
Locks the player's camera pitch to its current pitch setting, or unlocks the player's camera pitch.
|
inline |
Changes the current Day/Night cycle for the player to daylight.
delayTransitionTime | Time it takes for the daylight to fade in. |
|
inline |
Instructs the player to open their inventory.
|
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.
target | The target creature's inventory to view. |
|
inline |
Forces the player to open the inventory of the specified placeable.
target | The placeable inventory to be viewed. |
|
inline |
Plays the specified sound at the target in the current area for this player only.
sound | The sound resref. |
target | The target object for the sound to originate. Defaults to the location of the player. |
|
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).
respawnButton | If true the "Respawn" button will be enabled. |
waitForHelp | If true the "Wait For Help" button will be enabled. |
helpStringRef | String reference to display for hel. |
helpString | String to display for help which appears in the top of the panel. |
|
inline |
Displays a GUI panel to a player.
panel | The panel type to display. |
|
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.
message | The message to print. |
xPos | The x coordinate relative to anchor. |
yPos | The y coordinate relative to anchor. |
anchor | The screen anchor/origin point. |
life | Duration to show ControlledCreature string in seconds. |
start | The starting color of ControlledCreature text (default: white). |
end | The color of the text to fade to as it nears the end of the lifetime (default: white). |
id | An optional numeric ID for ControlledCreature string. If not set to 0, subsequent calls to PostString will remove the text with the same ID. |
font | If specified, the message will be rendered with the specified font instead of the default console font. |
|
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.
query | The query to be prepared. |
|
inline |
Causes this player to refresh the client object associated with the given game object.
gameObject | The game object to refresh. |
|
inline |
Causes this player to refresh the player client object associated with their current controlled creature.
|
inline |
Removes the player from their current party.
|
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.
|
inline |
Seeks the audio stream with the specified identifier to a new position on the currently playing audio track.
streamIdentifier | The stream identifier to update. |
seekOffset | The new position on the audio track |
|
inline |
Sends a server message to the player.
message | The message to send. |
color | A color to apply to the message. |
|
inline |
Sends the player to a new server, where the player's character will connect and log in.
ipAddress | DNS name or the IP address + port of the destination server. |
password | The player password to connect to the destination server. |
waypointTag | The custom waypoint tag on the destination server for the player to jump to. Defaults to the module's start location. |
seamless | If 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). |
|
inline |
Sets whether the player has explored an area.
area | The area to explore. |
explored | true if ControlledCreature area has been explored, otherwise false to (re)hide the map. |
|
inline |
Sets this player's area exploration state for the specified area.
area | The area to modify. |
newState | A byte array representing the tiles explored for the area, as returned by GetAreaExplorationState. |
|
inline |
Pauses/Unpauses the audio stream on the specified identifier.
streamIdentifier | The stream identifier to pause/unpause. |
paused | The new pause state. |
fadeTime | The time to fade out/fade in before pausing/unpausing the stream. |
|
inline |
Changes the volume of the audio stream with the specified identifier.
streamIdentifier | The stream identifier to receive the new volume level. |
volume | The new volume level (0.0-1.0) |
fadeTime | The time to fade in to the new volume level. |
|
inline |
Changes the direction the player's camera is facing.
direction | Horizontal angle from East in degrees. -1 to leave the angle unmodified. |
pitch | Vertical angle of the camera in degrees. -1 to leave the angle unmodified. |
distance | Distance (zoom) of the camera. -1 to leave the distance unmodified. |
transitionType | The transition to use for moving the camera. |
|
inline |
Sets camera limits that override any client configuration.
A value of -1 means to use the client limits.
|
inline |
Toggles the CutsceneMode state for the player.
inCutscene | True if cutscene mode should be enabled, otherwise false. |
leftClickEnabled | True if ControlledCreature user should be allowed to interact with the game with the left mouse button. False to prevent interaction. |
|
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.
panel | The panel type to disable. |
disabled | True to disable the panel, false to re-enable the panel. |
targetObject | The target object (e.g. examined object) where this panel should be disabled. |
|
inline |
Sets an override name for a specific game object, as visible from this player.
Supports placeables, doors, items and creatures.
gameObject | The game object to set a new name for. |
name | The new name of the object. |
ArgumentException | Thrown if gameObject is not a placeable, door, item or creature. |
|
inline |
Sets if the player should like, or unlike the specified player.
like | true if the player should like the target, false if the player should dislike the target. |
target | The target to like/dislike. |
|
inline |
Sets the visiblity override for the specified object for this player.
|
inline |
Sets an override player character name and community name on the player list for all players. Is not persistent.
nameOverride | The new names for the player. |
|
inline |
Sets an override player character name and community name on the player list as observed by a specific player. Is not persistent.
nameOverride | The new names for the player. |
observer | The observer to see the new names. |
|
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.
uniform | The uniform to set. |
value | The value to set for the uniform. |
|
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.
uniform | The uniform to set. |
value | The value to set for the uniform. |
|
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.
uniform | The uniform to set. |
value | The value to set for the uniform. |
|
inline |
Sets a spell targeting data override for this player.
data | The override to apply. |
ArgumentNullException | Thrown if data.Spell is not specified. |
|
inline |
Makes ControlledCreature PC load a new texture instead of another.
oldTexName | The existing texture to replace. |
newTexName | The new override texture. |
|
inline |
Plays the specified VFX at the target position in the current area for this player only.
effectType | The effect to play. |
position | Where to play the effect. |
|
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.
streamIdentifier | The audio stream/channel to use for playing audio. |
resRef | The audio resref to play. |
looping | If the audio should loop. |
fadeTime | An optional fade in time for the audio. |
seekOffset | The offset to seek in the audio track. If this is greater than the length of the track, it will loop back to the start. |
volume | The volume to set on the audio stream. |
|
inline |
Stops the audio stream playing on the specified identifier.
streamIdentifier | The stream identifier to stop. |
fadeTime | The fade out time. |
|
inline |
Removes any current fading effects or black screen from the monitor of the player.
|
inline |
Stores (bookmarks) the camera's facing and position so it can be restored later with RestoreCameraFacing.
|
inline |
Create a NUI window for this player.
window | The window to create. |
token | The created player-unique token for this window instance. |
windowId | A unique alphanumeric ID identifying this window. Re-creating a window with the same id of one already open will immediately close the old one. |
|
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.
handler | The lamda/method to invoke once this player selects something. |
settings | Display and behaviour options for the target mode. |
|
inline |
Unlock an achievement for the player who must be logged in.
achievementId | The achievement ID on the remote server. |
lastValue | The previous value of the associated achievement stat. |
currentValue | The current value of the associated achievement stat. |
maxValue | The maximum value of the associate achievement stat. |
|
inline |
If this player is possessing a creature, instructs them to unpossess them.
|
inline |
Vibrates the player's device or controller. Does nothing if vibration is not supported.
motor | Which motors to vibrate. |
strength | The intensity of the vibration. |
duration | How long to vibrate for. |
|
get |
Gets the name of the player's .bic file.
|
set |
Sets camera settings that override any client configuration settings.
|
set |
Sets the camera height for this player.
|
get |
Gets the public part of the CD key that the player used when logging in.
|
get |
Gets the player's client version (Major + Minor + Build).
|
get |
Gets the player's client version, as a Sha1 commit hash.
|
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.
|
getset |
Gets or sets the movement rate factor for the cutscene camera following ControlledCreature 'camera man'.
|
get |
Gets the connecting IP address for the player.
|
get |
Gets if this player is connected and playing (true), or if this player is still on character selection or connecting (false).
|
get |
Gets a value indicating whether the player has connected to the server over a relay (instead of directly).
|
get |
Gets a value indicating whether the player is a Dungeon Master.
|
get |
Gets if this player is in cursor targeting mode.
NOTE! Only works if the player entered target mode using TryEnterTargetMode.
|
get |
Gets a value indicating whether ControlledCreature creature is currently in "Cutscene" mode.
|
getset |
Gets or sets whether the player has DM privileges gained through a player login (as opposed to the DM client).
|
get |
Gets a value indicating whether this NwPlayer object is valid.
Returns false after the player disconnects from the server.
|
get |
Gets the language configured by this player.
|
get |
Gets the original creature that this player logged in with.
|
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.
|
get |
Gets the platform this player is currently playing from.
|
get |
Gets the unique numeric ID of this player.
|
get |
Gets the player's login name.
|
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.
|
getset |
Gets or sets the location that this player will spawn at when logging in to the server.