Purpose
Extracts translation files for the selected mod and saves them inside the mod folder.
The result is written to `[selectedMod]/Languages/[selectedLang]`.
[b]Warning:[/b] the tool clears that target language folder and writes fresh files — make a backup if you want to keep existing translations.
[u]If you notice any missing entries, please let me know.[/u]
[hr]
How it works
It operates differently from RimWorld’s original extractor, so the [i]order[/i] of strings may differ; required entries should still be present.
The extractor includes strings that are available at runtime — if an optional mod is not enabled, its strings will not be extracted.
Quick instructions
[list]
[*] [b]Optional (recommended):[/b] create a new language folder beforehand to avoid overwriting: `Mods/[SelectedMod]/Languages/<new-lang-folder>`.
[*] Enable this extractor mod together with the mod whose strings you want to extract. Also enable any [i]possible[/i] dependencies (mods referenced with `IfModActive`) for a more complete extraction.
[*] Start RimWorld with those mods enabled. An extra button appears in the main menu to choose the target mod.
[*] After confirmation, the extractor writes files to `[selectedMod]/Languages/[selectedLang]`. It [b]clears that folder[/b] and writes fresh files.
[/list]
Example — optional (IfModActive) dependencies
This shows an *optional* mod reference — not a required dependency. The extractor includes those extra strings only when the referenced mod is enabled.
<li IfModActive="VanillaExpanded.VPsycastsE">1.5/Mods/VanillaPsycastsExpanded</li>
Explanation:
[list]
[*] `IfModActive="VanillaExpanded.VPsycastsE"` means "if *Vanilla Psycasts Expanded* is present".
[*] When that mod is present, the target mod may load extra content from `1.5/Mods/VanillaPsycastsExpanded` which can add translation keys.
[*] The extractor only includes those keys if the optional mod is enabled at runtime.
[/list]
Patches (mods that modify other mods)
Some mods apply [i]patches[/i] to another mod’s defs (for example, rename an item or replace a label). Current extractor [b]does not[/b] copy those patched strings into the language folder when you extract the patching mod itself.
How it behaves now:
[list]
[*] If Mod B contains a patch that changes strings in Mod A, extracting [b]Mod B[/b] will NOT produce the new/changed strings for Mod A.
[*] If you extract [b]Mod A[/b], the patched strings [b]will[/b] appear in Mod A’s extracted language files (because the changes are present at runtime in Mod A’s final data).
[/list]
This behavior is suboptimal because extracting Mod B does not include the strings it [i]injects[/i] into other mods. Planned improvement: add support so that extracting a mod will also gather strings it injects via patches (so Mod B’s extraction would include its patch-provided strings).