Jump to content

Advice needed: Proper infrastructure for mod localization.


Recommended Posts

Posted (edited)

Hello

 

Does anyone know what is the proper way to save larger arrays of string into files/ read them from files into string arrays, in a way that works consistently on OG and NG?



I am trying to build a friendly infrastructure for localization for my mod. 
As far as I can tell, the type of assets to be localized are: 

A - Classic Dialogue lines in the ESP, complete with making sure the translated ones point to the new (corresponding) audio voice files (and ofc the audio files themselves). 

B - Text Message type assets (MSG forms) in the ESP

C - The text strings in the MCM menu of the respective mod.
D - Text strings defined and used in the mod scripts themselves.


Categories A, B - I understand have pretty straightforward procedures and tools already, like tool that can directly edit an ESP file, and folks doing localizations are already familiar with those tools.  

For category C I can look at examples in the config.json on other mods  that have translated MCM entries, and see how they handled localizations there (I see they use reference string variables that they load from Interface\Translations text files)

However, for D, things can get a bit more hairy. 
The way I started to do that was in two stages. 

 

 

Stage 1: I am migrating all user-displayable strings (that were initially scattered across all scripts) into one singular String Manger Script.
All the other scripts draw their strings from this script's string arrays.
This allows the one big script to use its own update functions, and prompt a refresh/reloading of all string arrays if needed. 
This makes management more palatable, since all the spellchecks and whatnot stay just in one script.
However, it still means someone wanting to make edits would have to edit and recompile this papyrus script, which is not ideal.


Stage 2:  To take this a step further, I  would want this script to be able to load and populate its string arrays  from an external, humanly editable file on disk,(txt, or JSON) 
Does anyone know what's the best practice on that, which script extender function would do that? 
Initially, I was looking at functions from SUP F4SE JSON Functions Tutorial at Fallout 4 Nexus - Mods and community , which seemed that would do the trick.
However, they depend on SUP F4SE at Fallout 4 Nexus - Mods and community , and it lists as broken in next gen update. 


 

Edited by MSM_Alice
Posted (edited)

Found  some info here, in theory things can be saved in an ini file as settings and retried from here,  (but still seems like misusing something that was designed for low amounts of data)


 

Edited by MSM_Alice

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...