Show / Hide Table of Contents

Interface ITextProvider

Interface to a text provider. Provides common functionality for dealing with various text sources.

Namespace: DaggerfallWorkshop.Utility
Assembly: Assembly-CSharp.dll
Syntax
public interface ITextProvider

Methods

| Improve this Doc View Source

CreateTokens(TextFile.Formatting, String[])

Creates a custom token array.

Declaration
TextFile.Token[] CreateTokens(TextFile.Formatting formatting, params string[] lines)
Parameters
Type Name Description
TextFile.Formatting formatting

Formatting of each line.

String[] lines

All text lines.

Returns
Type Description
TextFile.Token[]

Token array.

| Improve this Doc View Source

EnableLocalizedStringDebug(Boolean)

Enable or disable verbose localized string debug in player log.

Declaration
void EnableLocalizedStringDebug(bool enable)
Parameters
Type Name Description
Boolean enable

True to enable, false to disable.

| Improve this Doc View Source

GetAbbreviatedStatName(DFCareer.Stats)

Gets abbreviated text for stat name.

Declaration
string GetAbbreviatedStatName(DFCareer.Stats stat)
Parameters
Type Name Description
DFCareer.Stats stat

Stat.

Returns
Type Description
String

Abbreviated text for this stat.

| Improve this Doc View Source

GetArmorMaterialName(ArmorMaterialTypes)

Gets name of armor material type.

Declaration
string GetArmorMaterialName(ArmorMaterialTypes material)
Parameters
Type Name Description
ArmorMaterialTypes material

Material type of armor.

Returns
Type Description
String

String for armor material name.

| Improve this Doc View Source

GetCustomEnemyName(Int32)

Gets the name associated with a custom enemy id (ie: not defined in MobileTypes). Returns null if the enemy id is unknown.

Declaration
string GetCustomEnemyName(int enemyId)
Parameters
Type Name Description
Int32 enemyId

Custom enemy id

Returns
Type Description
String

Name if the enemy id is known, null otherwise

| Improve this Doc View Source

GetLocalizedString(String, String, out String)

Attempts to read a localized string from a named table collection.

Declaration
bool GetLocalizedString(string collection, string id, out string result)
Parameters
Type Name Description
String collection

Name of table collection.

String id

ID of string to get.

String result

Localized string result or null/empty.

Returns
Type Description
Boolean

True if string found, otherwise false.

| Improve this Doc View Source

GetRandomText(Int32)

Gets random string from separated token array. Example would be flavour text variants when finding dungeon exterior.

Declaration
string GetRandomText(int id)
Parameters
Type Name Description
Int32 id

Text resource ID.

Returns
Type Description
String

String randomly selected from variants.

| Improve this Doc View Source

GetRandomTokens(Int32, Boolean)

Gets tokens from a randomly selected subrecord.

Declaration
TextFile.Token[] GetRandomTokens(int id, bool dfRand = false)
Parameters
Type Name Description
Int32 id

Text resource ID.

Boolean dfRand

Use Daggerfall rand() for random selection.

Returns
Type Description
TextFile.Token[]

Text resource tokens.

| Improve this Doc View Source

GetRSCTokens(Int32)

Gets tokens from a TEXT.RSC record.

Declaration
TextFile.Token[] GetRSCTokens(int id)
Parameters
Type Name Description
Int32 id

Text resource ID.

Returns
Type Description
TextFile.Token[]

Text resource tokens.

| Improve this Doc View Source

GetRSCTokens(String)

Gets tokens from RSC localization table with custom string ID and conversion back to RSC tokens. Does not support fallback to classic TEXT.RSC. Record key must exist in RSC localization table.

Declaration
TextFile.Token[] GetRSCTokens(string id)
Parameters
Type Name Description
String id

String table key.

Returns
Type Description
TextFile.Token[]

Text resource tokens.

| Improve this Doc View Source

GetSkillName(DFCareer.Skills)

Gets text for skill name.

Declaration
string GetSkillName(DFCareer.Skills skill)
Parameters
Type Name Description
DFCareer.Skills skill

Skill.

Returns
Type Description
String

Text for this skill.

| Improve this Doc View Source

GetSkillSummary(DFCareer.Skills, Int32)

Gets text to be shown in the Skill summary popup

Declaration
TextFile.Token[] GetSkillSummary(DFCareer.Skills skill, int startPosition)
Parameters
Type Name Description
DFCareer.Skills skill

Skill.s

Int32 startPosition

Position in pixel of the first positioning token

Returns
Type Description
TextFile.Token[]

Tokens for the skill.

| Improve this Doc View Source

GetStatDescriptionTextID(DFCareer.Stats)

Gets text resource ID of stat description.

Declaration
int GetStatDescriptionTextID(DFCareer.Stats stat)
Parameters
Type Name Description
DFCareer.Stats stat

Stat.

Returns
Type Description
Int32

Text resource ID.

| Improve this Doc View Source

GetStatName(DFCareer.Stats)

Gets text for stat name.

Declaration
string GetStatName(DFCareer.Stats stat)
Parameters
Type Name Description
DFCareer.Stats stat

Stat.

Returns
Type Description
String

Text for this stat.

| Improve this Doc View Source

GetText(Int32)

Gets string from token array.

Declaration
string GetText(int id)
Parameters
Type Name Description
Int32 id

Text resource ID.

Returns
Type Description
String

String from text resource.

| Improve this Doc View Source

GetWeaponMaterialName(WeaponMaterialTypes)

Gets name of weapon material type.

Declaration
string GetWeaponMaterialName(WeaponMaterialTypes material)
Parameters
Type Name Description
WeaponMaterialTypes material

Material type of weapon.

Returns
Type Description
String

String for weapon material name.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX