Auto Translate system #3625
Replies: 3 comments 3 replies
-
This is the work LSB has so far: https://github.com/LandSandBoat/server/blob/04ed9c7ed256aa8c1ed64d86b249bcb2acd21644/src/map/autotranslate.cpp |
Beta Was this translation helpful? Give feedback.
-
#3626 opened for version 30230204_0 for additional reference |
Beta Was this translation helpful? Give feedback.
-
I like the idea of a db table and building on init. But I'm unsure of how much that adds to init time/space + what LSB folks feel would be best going forward. Bottom line is we have at least some primitive methodology for deriving values for future updates (currently a tiny bit tedious due to all the extra escape characters needed). |
Beta Was this translation helpful? Give feedback.
-
Hey, we've been doing research on how Auto Translate codes work in the game. We believe we know enough now to have a feature-complete system for LSB. Just need to figure out how it should look.
I'm imagining the finished system might look something like this, in broad strokes:
A script/utility or extracting AT info from the DATs or other DAT-derived sources into a SQL file. I'd like to put this into LSB's UpdateExtractor, but the MassExtractor.exe dependency doesn't seem to get the AT strings, to my knowledge. Windower's ResourceExtractor does grab these.
The SQL file will setup a table that has columns (names open to change): ID (4 byte code that the game's AT codes use), English (English plain text), Japanese?, type (enum representing string, item, or key_item), and ID2 (2 byte uint that matches the actual ID of the item or key_item, since the AT code doesn't always map correctly).
A cpp util that loads the AT table on init. It should have methods for converting from plain text to AT code, from AT code to plain text (choice of English or Japanese?), from AT code to AT type (string, item, key item), and finally from AT code to item id or key item id.
A system that filters chat messages and strips all AT codes that are not valid AT codes.
A Lua bridge for accessing AT features from Lua?
Bert and I have been working on this for another project (with Bert doing the lion's share of the work so far). Bert wrote this utility that takes output from Windower's ResourceExtractor and creates a SQL file: https://github.com/bsips/AutoTParser
Beta Was this translation helpful? Give feedback.
All reactions