CoriBoom Please Help - MZ Crime and Police Language Translations
54 posts in this topic Last Reply
Highlighted Posts
See this post to download rivit's LTexter v2.03 tool. It is an excellent program to help with language translations.
Recommended by CorinaMarie
Step 01: We are using this post as our reference for the Swedish language conversion: Step 02: I've made a separate folder for this, then renamed Ron's program with v2.03 so I'm certain I'm using the current version. Next I copied in our template .dat file, and made two zero byte placeholder files. (One for the text output and one for the translated language file.) Like so: Step 03: Run Ron's program. Here's the initial screen. We then click the Get LText from DatFile button: Step 04: This is the DAT File picker window which opens next. For this, I'm doing two steps so I can have a pic of it. In real use, you can simply double click the file. Step 05: This is the output Text file picker window. As before, you can double click the filename, but I'm showing two steps to have an image of it shown here. Step 06: Because we are using placeholder files, you will see an overwrite confirmation box. Click the Yes button: Step 07: Next we open the text file in N++, select the Language menu, and click on Ron's LTEXTER option: Step 08: Here's how it looks now with the fancy highlighting: Step 09: This is after I've copied and pasted each Swedish translation from Flat Raver's post. I used their Alternate Advisor Message. (More on that in the next step.) Step 10: This is a special case for this file. What we are doing is making part of the LText be a clickable linky. Y'all prolly won't need to know this, but I'm including it for completeness. Words that are to become a linky get special code before and after. It's similar to HTML. For this one, it gets <a href="#link_id#game.window_budget(budget_window_types.PUBLIC_SAFETY)"> before the words to be the linky. And </a> after them. (Note: This shows as one long line since I don't turn on line wrapping because I use N++ for coding.) ^ After all the editing is done, Save the file in N++. Step 11: Back in the LTexter program, we add the little checkmark to the Renumber TGI box. Step 12: Now select the desired language from the dropdown thinger. (This is what will update the GIDs with the proper offset values.) Then click the Make DatFile from LText button: (The sv part in the dropdown menu is the Unicode prefix.) Step 13: In the file picker window, single click the Swedish .txt file, then click the Open button. (Again, in real life you can double click the filename.) Step 14: Next we want to save this and overwrite the placeholder .dat file. (Double clicking is still the real way to go.) Step 15: Like we did earlier, click the Yes button to overwrite: Step 16: And then the completion is confirmed: Step 17: These show the file names again, but notice both zero byte files have been updated: Step 18: I then opened the new .dat file in Reader just to peek at it. What I'm looking at are the GIDs which have been updated to the correct offsets from the originals. This means the original GID values have been incremented by 0x09 (for this Swedish example) to be at the correct language offset. (As this topic explains.) For example: Step 19: Testing in the game (which I've set to Swedish) and here's the Police Station UI for a Vanilla Kiosk: Step 20: This is the updated Advisor Message: Step 21: After clicking the new linky, it goes to the budget panel: Step 22 (optional): If'n y'all want to take the new LTexter program for a spin (and follow the above guide), here's the Language Template file: MZ Crime and Police - [Template] English Text - v1.4.dat To test in the game, place your final language .dat file in a folder in Plugins along with the main mod: MZ Crime and Police - Exemplars and Such - Main File - v1.307.dat
@rivit Again thank you ever so much for creating this tool. It's exactly what we need. -Cori & CB
Main guide to using rivit's LTexter tool for language translations.
Recommended by Cyclone Boom
Step 01: The first thing we need to know is the TGI of the LTexts which get called by the UI. The easiest way to do this is from the file:
MZ Crime and Police - Exemplars and Such - Main File - v1.307.dat
Open this in Reader 1.5.4 and view the UI entry. The next thing I did is click where the # of Cells placeholder is in the UI image in the right hand pane. Now peek in the Properties list looking for captionres. It's that pair of numbers we want to know. Ergo, the {ea5524eb,ca54e6be}. Step 02: Do the same thing for the # of Inmates to find {ea5524eb,ea54e6c2}. Step 03: For files preparation, I copied in the current (already translated) Polish language file and created two zero byte placeholder files: Step 04: Do Steps 03 thru 08 from the main guide above. Here we are in N++ with the fancy highlighting: Step 05: This is where we'll do the advanced technique using Ron's LTexter program. We need two new LText entries so the easiest way to get them is to copy an existing one, paste twice, and then edit each of those. I decided I want the new ones to be below the renaming of the vanilla deluxe police station. I copy those three lines and paste them twice to get two new sets. I also temporarily added a blank line above and below this to help me visually keep track of where I'm working. Step 06: Now this next part might seem complicated, but bear with us as it's easier than it appears.
Firstly I copied these two pairs from the UI: ea5524eb,ca54e6be
ea5524eb,ea54e6c2
Next made them UPPERCASE, so they become:
EA5524EB,CA54E6BE
EA5524EB,EA54E6C2
(This probably isn't an essential step, but it helps for added assurance.) Little Trick:
In Notepad++ this can be done easily by selecting both pairs and then using:
Edit -> Convert Case to -> UPPERCASE (It might be easier to do this in a new N++ document.) Next I add 0x10 to the GIDs (the offset amount for Polish) Finally changed the commas to dashes, and then pasted them over the corresponding parts of my newly copied lines. This gives me for those two TGI entries: 2026960B-EA5524FB-CA54E6BE
2026960B-EA5524FB-EA54E6C2 The E changes to F as highlighted. This is the 0x10 difference when adding this on. Tip: For more complex hex calculations, you might find an online converter page like this one handy. Next I copied Cricket's text from the post above and pasted in where they need to go. After that, I removed the two blank lines. Then save this file. Step 07: Run Ron's LTexter program. Since we already have the correct GIDs for the previously existing LText entries and we manually set the two new entries, we will use the passthrough option. This means we do not add a checkmark to the little Renumber TGI box and so we also do not select a language. Step 08: Now we do Step 12 (skipping the language choice) to Make DatFile from LText thru Step 15 of the main guide above. Here's the files showing they have been updated and are no longer zero bytes: Step 09: Run the game to see the updated Text: @TheMurderousCricket Let us know if you perform these steps and if they all make sense.
Mini walk-thru using rivit's LTexter program and an advanced technique.
Recommended by Cyclone Boom
-
Similar Content
-
Recently Browsing 0 members
No registered users viewing this page.


