For a mod, I need to make custom RSC format strings. As those can be difficult to reproduce in string literals inside the code, and for the sake of potential localization, I thought of putting those strings inside a localization string table. These tables can easily handle RSC strings, as seen in Internal_RSC.
The file I made (Backstories_RSC) was essentially like Internal_RSC. Using a custom TextProvider, when being requested a certain string id, I can make a lookup into my string table and see if it provides a string for that, and fallback to Internal_RSC if not.
This works fine when playing from the Editor. I do need to build addressables, but otherwise it's all good. But that limitation seems to be fatal for modding support.
Shipping a string table with your mod won't be enough for a DFU client to use the table. You can't ship addressables with your mod either, since it won't merge with other mods that would like to do the same.
Am I missing something in terms of how to load localization string tables in mods? Should mods rely on something else for RSC strings?
I noticed the string tables in StreamingAssets/Text, and I know mods can provide such a table. However, that does not seem appropriate for RSC strings.
Shipping Localization string tables in mods
- Kab the Bird Ranger
- Posts: 123
- Joined: Tue Feb 23, 2021 12:30 am
- Hazelnut
- Posts: 3016
- Joined: Sat Aug 26, 2017 2:46 pm
- Contact:
Re: Shipping Localization string tables in mods
You can use tokens easily enough to replace RSC entries. See examples in Archeologists mod. Just wanted to point that out, though for localization that's not going to solve the problem.Kab the Bird Ranger wrote: ↑Wed Mar 24, 2021 9:13 pm For a mod, I need to make custom RSC format strings. As those can be difficult to reproduce in string literals inside the code,
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods