-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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: Stringpriority: i32description: 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
- Add
string_overrides: HashMap<String, String>toModpkgLayerMetadata - Update schema version from 1 to 2 in
ModpkgMetadata - Ensure backward compatibility (schema v1 should still load without string_overrides)
- Add tests for serialization/deserialization with string overrides
- Update CHANGELOG.md with the breaking change
Format Specification
- String overrides should map field names (from
lol.stringtable) to new string values - Empty string_overrides map should be omitted from serialization (to keep files small)
- Field names reference
data/menu/en_us/lol.stringtablefromLocalized/Global.{locale}.wad.client
Builder Support
- Update modpkg builder to support adding string overrides to layers
- Ensure project conversion from Fantome preserves string overrides
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-rstis 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
-
ModpkgLayerMetadatahasstring_overridesfield - Schema version bumped to 2
- Backward compatibility maintained (v1 metadata still loads)
- Roundtrip serialization tests pass with string overrides
- Builder API supports setting string overrides
- Documentation updated with example usage
Dependencies
This is a prerequisite for issue #83 (UI flow for string overrides in workshop)
Related
- Fantome DESIGN.md: String Overrides section
- Issue Implement UI flow for setting string overrides in workshop mod editor #83: Implement UI flow for string overrides
- cdragon-rst: https://docs.rs/cdragon-rst/latest/cdragon_rst/
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
No status