Overview
Add support for string overrides to the modpkg format, bringing feature parity with the Fantome format. This will allow modpkg mods to customize in-game text strings without shipping the entire lol.stringtable file.
Background
The Fantome format currently supports string overrides per layer (DESIGN.md). The modpkg format should support the same functionality to enable text customization in mods.
Current State
The ModpkgLayerMetadata struct in crates/ltk_modpkg/src/metadata.rs:75-86 currently only has:
name: String
priority: i32
description: Option<String>
Proposed Addition
Add a string_overrides field to match the Fantome format:
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub struct ModpkgLayerMetadata {
pub name: String,
pub priority: i32,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
// NEW FIELD
#[serde(default, skip_serializing_if = "HashMap::is_empty")]
pub string_overrides: HashMap<String, String>,
}
Requirements
Core Implementation
Format Specification
Builder Support
Technical Notes
- String overrides format should match Fantome's implementation for consistency
- Full list of valid field names are in
data/menu/en_us/lol.stringtable
cdragon-rst is the tool for working with RST hashtables (stringtable format)
- Mods ship only the overrides, not the full stringtable, to stay up-to-date with game changes
Acceptance Criteria
Dependencies
This is a prerequisite for issue #83 (UI flow for string overrides in workshop)
Related
Overview
Add support for string overrides to the modpkg format, bringing feature parity with the Fantome format. This will allow modpkg mods to customize in-game text strings without shipping the entire
lol.stringtablefile.Background
The Fantome format currently supports string overrides per layer (DESIGN.md). The modpkg format should support the same functionality to enable text customization in mods.
Current State
The
ModpkgLayerMetadatastruct incrates/ltk_modpkg/src/metadata.rs:75-86currently only has:name: Stringpriority: i32description: Option<String>Proposed Addition
Add a
string_overridesfield to match the Fantome format:Requirements
Core Implementation
string_overrides: HashMap<String, String>toModpkgLayerMetadataModpkgMetadataFormat Specification
lol.stringtable) to new string valuesdata/menu/en_us/lol.stringtablefromLocalized/Global.{locale}.wad.clientBuilder Support
Technical Notes
data/menu/en_us/lol.stringtablecdragon-rstis the tool for working with RST hashtables (stringtable format)Acceptance Criteria
ModpkgLayerMetadatahasstring_overridesfieldDependencies
This is a prerequisite for issue #83 (UI flow for string overrides in workshop)
Related