dao::strings::Table
class
One talk table of a plugin’s strings.
Declared in dao/Strings.h.
Functions
File()
const std::optional<std::filesystem::path> & File() const
Returns the path of the file that was read, or nullopt if none was.
Load()
static Table Load(const LoaderInfo &info, std::wstring_view name)
Loads the table, as above, from the folder of the plugin’s DLL.
Load()
static Table Load(const std::filesystem::path &folder, std::wstring_view name)
Loads <folder>\<name>_<locale>.tlk for the game’s language, or <name>_en-us.tlk if there is no file for that language.
| Parameter | |
|---|---|
name |
the start of the file name, such as L”turnbased” |
Returns an empty table, whose String always returns the fallback, if neither file can be read
String()
std::wstring String(std::uint32_t id, std::wstring_view fallback={}) const
Returns the string with the given ID.
Returns fallback if the table has no such string or no file was read