A talk table (tlk) string reference.
More...
|
| StrRef (int stringId) |
|
| StrRef (uint stringId) |
|
void | ClearOverride () |
| Clears the current text override for this StrRef. More...
|
|
void | ClearPlayerOverride (NwPlayer player, bool restoreGlobal=true) |
| Clears the string override for the specified player, optionally restoring the global override. More...
|
|
void | SetPlayerOverride (NwPlayer player, string? value) |
| Overrides the string for the specified player only.
Overrides will not persist through re-logging. More...
|
|
string? | ToParsedString () |
| Gets the formatted string associated with this string reference/token number.
This will parse any tokens (e.g. <CUSTOM0>) as their current set token values. More...
|
|
override string | ToString () |
| Gets the raw string associated with this string reference/token number. More...
|
|
|
static StrRef | FromCustomTlk (uint stringId) |
| Gets a StrRef from the module's custom tlk table.
Use the index from the custom tlk. This factory method will automatically offset the id value. More...
|
|
|
uint | CustomId [get] |
| Gets the index/key for this StrRef relative to the module's custom talk table. (-16777216) More...
|
|
string? | Override [get, set] |
| Gets or sets a string override that this StrRef should return instead of the tlk file definition. More...
|
|
A talk table (tlk) string reference.
◆ ClearOverride()
void Anvil.API.StrRef.ClearOverride |
( |
| ) |
|
|
inline |
Clears the current text override for this StrRef.
◆ ClearPlayerOverride()
void Anvil.API.StrRef.ClearPlayerOverride |
( |
NwPlayer |
player, |
|
|
bool |
restoreGlobal = true |
|
) |
| |
|
inline |
Clears the string override for the specified player, optionally restoring the global override.
- Parameters
-
player | The player to clear the override from. |
restoreGlobal | If true, restores Override as the string value. |
◆ FromCustomTlk()
static StrRef Anvil.API.StrRef.FromCustomTlk |
( |
uint |
stringId | ) |
|
|
inlinestatic |
Gets a StrRef from the module's custom tlk table.
Use the index from the custom tlk. This factory method will automatically offset the id value.
- Parameters
-
stringId | The custom token index. |
- Returns
- The associated StrRef.
◆ SetPlayerOverride()
void Anvil.API.StrRef.SetPlayerOverride |
( |
NwPlayer |
player, |
|
|
string? |
value |
|
) |
| |
|
inline |
Overrides the string for the specified player only.
Overrides will not persist through re-logging.
- Parameters
-
player | The player who should see the different string. |
value | The override string to show. |
◆ ToParsedString()
string? Anvil.API.StrRef.ToParsedString |
( |
| ) |
|
|
inline |
Gets the formatted string associated with this string reference/token number.
This will parse any tokens (e.g. <CUSTOM0>) as their current set token values.
- Returns
◆ ToString()
override string Anvil.API.StrRef.ToString |
( |
| ) |
|
|
inline |
Gets the raw string associated with this string reference/token number.
- Returns
- The associated string.
◆ Id
readonly uint Anvil.API.StrRef.Id |
Gets the index/key for this StrRef.
◆ CustomId
uint Anvil.API.StrRef.CustomId |
|
get |
Gets the index/key for this StrRef relative to the module's custom talk table. (-16777216)
◆ Override
string? Anvil.API.StrRef.Override |
|
getset |
Gets or sets a string override that this StrRef should return instead of the tlk file definition.
The documentation for this struct was generated from the following file:
- NWN.Anvil/src/main/API/Tlk/StrRef.cs