[Tools] SLR Translator - Offline JP to EN Translation for RPG Maker VX, VX Ace, MV, and MZ

Shisaye

Moderator
Moderator
Elite Member
Aug 17, 2016
288
209
doodle.png

Overview:
SLR Translator is a tool I've been developing over the past few years to translate RPGM games at a high enough standard to be able to finish them without getting stuck,.
(This will actually work on a fairly old laptop as long as it doesn't overheat.)
If you've ever used Translator++ before, then the tool will immediately feel familiar, because I am using it's UI licensed under GPLv3.
But the actual translation process is very different from Dreamsavior's stuff.
Most outside credit there actually goes to Reddo9999, his code helped me a lot.
(We don't know each other, but his code is also licensed under GPLv3.)
Also includes the DSLR Translation engine to use whatever LLM you want as long as it supports the 'v1/chat/completions' endpoint.
(Pre-configured for DeepSeek since that seems to have the best cost/performance ratio.)


Important Notes:
Press F1 with the tool open for tutorials on how to use this.
SLR will only function if you have a working SugoiV4 server running locally on the default port 14366.
You can visit Ming Shiba's Patreon, or the F95 Sugoi thread to find out more about Sugoi.
The V9-V9.4 Toolkits are not compatible with SLR, but 9.5 works again.
DSLR requires manual setup. Read the documentation.


Developer: Shisaye
Version: 1.140
System Requirements: Windows (64bit), At least 8GB of RAM, Decent cooling.

Installation:
Extract the tool and launch it using the SLR Translator executable.
If you have problems extracting, please update your 7zip to the latest version.
After launching the tool, please press F1 to get to the help page explaining all basic stuff.

Changelog:
See attached "Changelog.txt".

[/SPOILER]
Preview Screenshots:
edit plugins with proper context.pngword wrapping with proper spacing.pngbuilt in dictionary.pngparse any readable file.pngdetailed tutorials with pictures.png

FAQ:
Q: A game is not working correctly after translation, or the translator has problems during the translation of a game, what do I do?
A: Please post the DLsite code of the game (or it's full name), a screenshot of the problem, and a description when exactly the problem occured. If appropriate please also include a save file to reproduce the issue in-game.
Please do not include any rule breaking content in your post.

Q: So this is just another way to run Sugoi on a game?
A: No, Sugoi is only used for basic dialogue. Most scripts, noises, menu buttons, etc., have pre-defined translations from a dictionary I've built. There's also hundreds of regex patterns fixing common quirks and issues with Sugoi.

Q: Translator++ is terrible and constantly crashes stuff, so this does the same?
A: This is not using T++ parsing or converting. I'm just using its UI. Even old VX/Ace converts and exports correctly in SLR Translator, and as a result this does not have the crashing issues T++ has.
Also SLR Translator actually gives you the option to turn de-duplication off.

Q: When I use SLR on a cell why do some parts remain Japanese?
A: That means those parts have preset translations. Just click the "Fix cells and check for errors" button and the Japanese will be replaced. (Only works in the Initial Translations column to prevent it from touching manual edits.)

DOWNLOAD
SLR Translator:​
To see this hidden content, you must react with one of the following reactions : Like Like
To see this hidden content, you must react with one of the following reactions : Like Like
SHA-256 of the archive:
7e151e856ec7d445be5453720e8338de05a9a67fc357087e91b6b763f5ff0ca0


Additional Tools:
(Extractors, Editors, etc. Also includes a minimalist Sugoi Repack.)
(I did not make any of these.)​
To see this hidden content, you must react with one of the following reactions : Like Like
To see this hidden content, you must react with one of the following reactions : Like Like
SHA-256 of the archive:
61bfb54dc700ecd875a0d28fd10d032058db4b901bc191ddbd2257008c926f3b
 

Attachments

  • Changelog.txt
    25.5 KB · Views: 1
Last edited:
Best mascot ever.

Edit:
SLR Translator has a lot of optimizations based around Japanese to English translation + the Sugoi Offline Translator v4.0 NMT model. The Sugoi Offline Translator v4 NMT model is included in Sugoi Toolkit v6-v9+.

Using SLR Translator in its intended configuration requires:
1) The Sugoi Offline Translator v4.0 model in either PyTorch/Fairseq format or in CTranslate2 format.
2) Software that can run that model on either the CPU or GPU.

The PyTorch/Fairseq/original version of the model and a small flask server to run it are available from the Official Toolkit (~6.5+ GB), but FOSS alternatives are also available here for convenience, reduced size, better performance, improved compatibility, added cache, added UI, transparency, stability, etc.

I went ahead and bundled everything together in a Sugoi-Repackage to bootstrap the Sugoi Offline Translator v4.0 NMT model + SLR Translator as fast, as clearly, and as reliably as possible. The Sugoi-Repackage is already included under AdditionalTools.7z\apps\Sugoi-Repackage-CPU in the OP. Just double click on the .bat to set up the software and then add the CTranslate2 format model to the correct folder to begin using SLR Translator right away.

1. Most users should use the Sugoi-Repackage-CPU (32MB -> ~900 MB after setup) if just starting out.
- This is already included under AdditionalTools.7z\apps\Sugoi-Repackage-CPU in the OP.
- CUDA users should download one of the CUDA versions.
- The CUDA version supports both CPU and CUDA. CUDA is faster, but it requires an Nvidia GPU and takes a lot more space (~5 GB+).
2. Double click on the .bat to setup the local server software.
- It will download, install, and configure CTranslate2/PyTorch into an isolated Python environment.
3. CPU users should download the model in the CTranslate2 format (+1 GB).
- CUDA users should download the model in PyTorch/Fairseq format (+1 GB).
4. If using CTranslate2, copy the CTranslate2 model to Sugoi-Repackage\sugoi_v4model_ctranslate2.
- If using the PyTorch/fairseq model, copy the model to Sugoi-Repackage\sugoi_v4model_fairseq.

For more detailed notes on the Sugoi-Repackage, see the main thread and expand the small summary below.

Disclaimer: I did not write most of the information. I just copied it for everyone else's documentation and bundled the work of other people together to make their software easier to use.

Summary: The default software that Sugoi Offline Translator v4.0 uses to run the model is an old version of Facebook/Meta's fairseq project + a small flask server. Issues:

- This old unupdated version of Fairseq used is very slow.
- It does not release memory properly after use which means the system will eventually run out of memory while using it.
- Due to the platform specific nature of the toolkit, this software does not reliably work on other operating systems due to configuration limitations especially when using Nvidia CUDA on Windows 7, 8, Linux, Mac OSX. Even though PyTorch and CTranslate2, the software that runs the model, supports these configurations, the toolkit does not.
- It is complicated to switch between the different PyTorch and CTranslate2 models and configurations (CPU, CUDA, DirectML).
- Translations are not cached.
- Early versions of Sugoi Toolkit v9 dropped support for T++/SLR Translator (unofficially). The developer, MingShiba, may re-add support at some point.

Basically, the Sugoi Toolkit is the worst option to run the Sugoi Offline Translator v4 NMT model because it has the least compatibility, the slowest performance, and the most bugs. The software is just that bad, especially the non-existent technical documentation. The Sugoi-Repackage fixes all of the above problems and uses py3translationServer as the server software since they had the best documentation, cache, and it also includes a UI at http://localhost:8501 for those who want to use the model directly.

This thread is to discuss SLR Translator. To discuss the repackage, please use the repackage main thread.
 
Last edited:
  • Like
Reactions: Shinji ntrman
If you have downloaded SLR Translator before, please upgrade to v1.91 v1.92.
There was a serious issue with the escaper that could potentially cause errors and crashes.

Edit: I screwed up a regex pattern and it was putting random spaces in the text and deleting dots at the end. Please use v1.92.

Edit: Found another annoying bug, please just keep checking regularly if there was an update and upgrade your version...
I only really push updates if I fixed something substantial.
 
Last edited:
1.105 fixed a really annoying error that was causing quite a few games running on VX Ace to crash during certain actions. I recommend updating to that one in case you had crashing issues before.
(I obviously always recommend updating, but I know people don't really want to.)
 
In case you were also annoyed by the "POTENTIALFILENAME" error code spam, I've completely removed it in v1.112 now.
I've improved escaping and detection of that stuff to the point that it "should" no longer be necessary.
 
Concerning v1.119.
This one will feel like a massive downgrade on some games, but it's "working as intended".
Basically it will spam lost placeholder errors, but that doesn't actually mean those cells looked any better beforehand, it just actually tries, and reports failure...

The big issue is and always was custom colors.
When Japanese text suddenly has a word in a different color.
In the actual text box that looks like this:
Code:
TEXTTEXT\C[12]COLOREDTEXT\C[0]TEXTTEXT

And the big issue is, how the fuck do you feed that to Sugoi?
If you just feed TEXTTEXT, COLOREDTEXT, TEXTTEXT separately while escaping the color commands, the result is horrible because they need the context of one another to make sense.

If you feed it TEXTTEXTCOLOREDTEXTTEXTTEXT, the resulting translation will be decent, but different length and you have no way of knowing which word or words are actually supposed to be in the color box.
Because Japanese is almost always shorter than English, it will almost always be wrong.

So unless you just remove all colors from all text, your only option is to isolate the color block, translate it on its own, and then feed Sugoi TEXTTEXTPLACEHOLDERTEXTTEXT.
But the only way for that to give the desired result is if Sugoi on one hand leaves enough of the placeholder intact so the color block can be inserted back in, but on the other hand doesn't ignore its existence and actually treats it as a "thing" to integrate in its output.
And that's super inconsistent, hence all those previously hidden bad translations.
 
Hi there Shisaye, question. Is there a global text replacement function in the translator. The translator did its job by flagging it as potential file names. But its a 2k+ lines edit, just wondering whether there is a easy way to fix this.
 
Hi there Shisaye, question. Is there a global text replacement function in the translator. The translator did its job by flagging it as potential file names. But its a 2k+ lines edit, just wondering whether there is a easy way to fix this.
What version are you using? How is it being flagged?
The POTENTIALFILENAME error code was retired in 1.112 and shouldn't actually exist anymore.
 
I am using 1.102. But that the flagging is not the problem. it was actually an error that can be fix by
un-translating the file names (I tested it). Issue is those few sound files are all over the place (2000+ times lol) and i have to overwrite it back to the original file name in Japanese. Thus i wonder there exist a global text replacing functions.
P.S. i was also wondering if i can just change the file name to the translated one, will that break the game in any way.

Thx
 
I am using 1.102. But that the flagging is not the problem. it was actually an error that can be fix by
un-translating the file names (I tested it). Issue is those few sound files are all over the place (2000+ times lol) and i have to overwrite it back to the original file name in Japanese. Thus i wonder there exist a global text replacing functions.
P.S. i was also wondering if i can just change the file name to the translated one, will that break the game in any way.

Thx
Well it depends on the context/content of the cells.
If they all include something unique to them like a special word or used character you could just use regex in the Ctrl+F menu.

For example if they all include the capital characters "SE" you could clear them all using:
Code:
[\s\S]*SE[\s\S]*
If you check the "match case" and "regexp" options, and replace it with nothing.

If they do not include anything identifiable like that, you need to look at their context entries and clear that using a custom script, but that's a bit more annoying.

Which game are we talking about? I would need to take a look at that myself.
 
I am using 1.102. But that the flagging is not the problem. it was actually an error that can be fix by
un-translating the file names (I tested it). Issue is those few sound files are all over the place (2000+ times lol) and i have to overwrite it back to the original file name in Japanese. Thus i wonder there exist a global text replacing functions.
P.S. i was also wondering if i can just change the file name to the translated one, will that break the game in any way.

Thx
I've found and fixed your issue in v1.123.
It was just a broken escaper pattern and a complicated replace script is not necessary.
But if you notice something like that again please just report it so It's fixed for everyone instead of just fixing it yourself.

Here's a proof of concept translation using the fix:
https://www.anime-sharing.com/threads/english-slr-mtl-breeding-presser-rj01260762.1599611/
 
I have found that using MTools text extraction nearly never results in any breakages. I then just run it through some scripts and batch it to sugoi. Once done MTool reinjects it back into the game.

Instructions:
Load a game via Mtool then navigate to the translation tab. Click export offline tranlation file. It will be save in the games folder. Copy the json to the ordered action scripts folder and then execute the scripts name something like "1. run first". You will now see a bunch of text files in the folder. Cut the text files 0, 1, 2, 3 into the translation folder (leave the temp ones alone). Start up Sugoi then execute the translate.js script. Once it has completed cut the translated files into the ordered actioin folder again and run the script "2. run second". Now you have a translated json to import back into MTool.

Here are the scripts.

Perhaps you could use mtool to extract the text, to then import it into your translator++ fork perhaps resulting in no breakages.
 

Attachments

  • Batch_Translate_Scripts.rar
    5.5 KB · Views: 2
  • Ordered_Action_Scripts.rar
    6.1 KB · Views: 2
Last edited:
I have found that using MTools text extraction nearly never results in any breakages. I then just run it through some scripts and batch it to sugoi. Once done MTool reinjects it back into the game.

Instructions:
Load a game via Mtool then navigate to the translation tab. Click export offline tranlation file. It will be save in the games folder. Copy the json to the ordered action scripts folder and then execute the scripts name something like "1. run first". You will now see a bunch of text files in the folder. Cut the text files 0, 1, 2, 3 into the translation folder (leave the temp ones alone). Start up Sugoi then execute the translate.js script. Once it has completed cut the translated files into the ordered actioin folder again and run the script "2. run second". Now you have a translated json to import back into MTool.

Here are the scripts.

Perhaps you could use mtool to extract the text, to then import it into your translator++ fork perhaps resulting in no breakages.
SLR Translator already has support for MTool files.
If you load a game into MTool, you can switch to the translate tab, and then click on "Export the original text needs to be translate". That will create a file called "ManualTransFile.json".
You can load this file into SLR Translator by using the "Json Parser" option.
Once translated you can load it back into MTool using the "Load translation file" button.

This is useful for translating something like Wolf RPG that is currently not supported by SLR.

For actually supported RPGM engines I do not really see the point, because translation quality is just going to be worse than just going through the normal SLR process.
I am not aware of any crashing issues with my Tool unless you've actually made a mistake.
 
  • Like
Reactions: Amniotic
Yamiyashiki Trial Ver Hello!Sorry for bothering but how can we fix the text overlap seen like this?
View attachment 62737
View attachment 62738
This game is using an incredibly inefficient custom text box. Especially during special cutscenes like the intro.
Unless you want to remake the plugin you can pretty much just wrap it even tighter and/or change the font and font size.
For example during a quick test I wrapped the project to "size", changed the font to stint and the font size to 20.
1.png2.png3.png4.png5.png
The result looked like this:
6.png7.png
 
This game is using an incredibly inefficient custom text box. Especially during special cutscenes like the intro.
Unless you want to remake the plugin you can pretty much just wrap it even tighter and/or change the font and font size.
For example during a quick test I wrapped the project to "size", changed the font to stint and the font size to 20.
View attachment 62752View attachment 62753View attachment 62754View attachment 62755View attachment 62756
The result looked like this:
View attachment 62757View attachment 62758
Thank you!
 
Just to have it said.

When I started working on the SLR project the MTL options were really bad and there was even a short moment in time in which my Sugoi/dictionary hybrid was arguably the best option out there.

Now "AI" has evolved to the point that this project feels very outdated.
But I cannot really add support for more modern models because I neither have the necessary hardware, nor the funds to get that hardware. I can barely pay my bills.
Technically someone could provide me a remote server for testing to outsource the processing, but I just do not think that's worth it. Considering this is just for RPG Maker games this project is probably not for someone with a high end gaming rig anyway.

I still think SLR has a reason to exist because not everyone has a high end rig capable of running large models, and so SLR Translator is still the only free, as open source as possible, offline alternative for someone to get something "decent enough" to be able to finish a game without knowing Japanese, but I do not think I will develop it further besides fixing bugs/crashes reported to me. (And please do actually report them to me.)

I had plans to rework Scripts parsing for VX/Ace to make proper automation for it, as well as implementing automatic font changes and other QOL stuff, and at some point before my GPU died I was even working on an OCR system to automate the translation of picture based text, but given the hardware constraints and the complete lack of funding, these changes would ultimately just be a lot of unpaid work for incremental improvements to a project, that already gave up on being "good".

But if someone else has any ambitions for this project or finds parts of it useful, you can obviously change and redistribute any part of SLR however you like as long as you keep it open source. (GPLv3 license and all that.)
 
The current local LLM in my experience are not as good Sugoi. They get the genders and idioms right if prompted well but they're all over the place contextually. I haven't tried one since summer but that was 14B with a Japanese Qlora at 8 bit quant.

Look into Intels OpenVino framework, it is very fast for OCR on CPUs.

Anyway thanks for the translation software, especially the additional software. I can run sugoi on ROCm now.

Check out CUDO compute, they offer RTX Quadro 4000 for like 0.36 cents an hour.
 
Just to have it said.

When I started working on the SLR project the MTL options were really bad and there was even a short moment in time in which my Sugoi/dictionary hybrid was arguably the best option out there.

Now "AI" has evolved to the point that this project feels very outdated.
But I cannot really add support for more modern models because I neither have the necessary hardware, nor the funds to get that hardware. I can barely pay my bills.
Technically someone could provide me a remote server for testing to outsource the processing, but I just do not think that's worth it. Considering this is just for RPG Maker games this project is probably not for someone with a high end gaming rig anyway.

I still think SLR has a reason to exist because not everyone has a high end rig capable of running large models, and so SLR Translator is still the only free, as open source as possible, offline alternative for someone to get something "decent enough" to be able to finish a game without knowing Japanese, but I do not think I will develop it further besides fixing bugs/crashes reported to me. (And please do actually report them to me.)

I had plans to rework Scripts parsing for VX/Ace to make proper automation for it, as well as implementing automatic font changes and other QOL stuff, and at some point before my GPU died I was even working on an OCR system to automate the translation of picture based text, but given the hardware constraints and the complete lack of funding, these changes would ultimately just be a lot of unpaid work for incremental improvements to a project, that already gave up on being "good".

But if someone else has any ambitions for this project or finds parts of it useful, you can obviously change and redistribute any part of SLR however you like as long as you keep it open source. (GPLv3 license and all that.)
Also I have an old AMD RX 590 8GB that definitely works and an AMD Vega 56 8GB which are supported by ROCm 5.7 and DirectML (AMD r9 290 too but that's ancient and I think it's dead) sat in a draw doing nothing. The Vega 56 needs the thermal paste and thermal pads changing but it functions but has more compute and memory bandwidth than the 590. I'd happily give either to you for free (if you cover shipping) if you want one, but understand if you rather keep your anonymity or if shipping is expensive.

On the other hand now I have Ctranslate2 working with ROCm, I'd happily do the translation and then send you the files to do the fixes and word wrap. I wouldn't be reliable as I go through phases where I don't have any interest in playing games for a couple of months, then for a few weeks I'll play loads.

Alternatively I'll gift some sheckles so you can use cloud computing. It'd be in a cryptocurrency though, so you'd have to convert it dollars/sterling/roubles/yen/euros or whatever.

Just let me know.

Apologies if anything in this post is breaking any site rules.

Btw Google cloud gives you like $200 free credit when you sign up for the first time. They have both NMT and LLM finetuned translation APIs.
 
Last edited:
Also I have an old AMD RX 590 8GB that definitely works and an AMD Vega 56 8GB which are supported by ROCm 5.7 and DirectML (AMD r9 290 too but that's ancient and I think it's dead) sat in a draw doing nothing. The Vega 56 needs the thermal paste and thermal pads changing but it functions but has more compute and memory bandwidth than the 590. I'd happily give either to you for free (if you cover shipping) if you want one, but understand if you rather keep your anonymity or if shipping is expensive.

On the other hand now I have Ctranslate2 working with ROCm, I'd happily do the translation and then send you the files to do the fixes and word wrap. I wouldn't be reliable as I go through phases where I don't have any interest in playing games for a couple of months, then for a few weeks I'll play loads.

Alternatively I'll gift some sheckles so you can use cloud computing. It'd be in a cryptocurrency though, so you'd have to convert it dollars/sterling/roubles/yen/euros or whatever.

Just let me know.

Apologies if anything in this post is breaking any site rules.
Thank you for the offer, but I really don't think that's worth the trouble.

To reasonably run the type of LLMs I would consider superior to Sugoi, I would need something comparable to an RTX 3090 and then I would need to completely remake large parts of the translator because the way text is currently fed to the model doesn't give it enough context. (Sugoi works really well with short isolated inputs, but those "AI"s really do not.)

I have no idea how long that would take, or if I would even have the skill to make it work at all and so I really wouldn't want someone else to pay for the time it takes me to throw shit at all wall hoping something sticks.

It's also not like this translator is something world changing here anyway and from what I've seen in the last 3 years demand is also pretty low.
People used me to get quick free low effort translations when I was taking requests on F95, but interest in the actual translator was always very low.
The few donations I've gotten until now did not even cover the power consumption during processing, let alone the 2 GPU's I've killed while working on over 400 different translations during that time.

I should probably do the responsible thing and instead of continuing to sink all my free time into this, get a second job and actually get some savings so I can pay for "hobbies" like this myself.
 
Thank you for the offer, but I really don't think that's worth the trouble.

To reasonably run the type of LLMs I would consider superior to Sugoi, I would need something comparable to an RTX 3090 and then I would need to completely remake large parts of the translator because the way text is currently fed to the model doesn't give it enough context. (Sugoi works really well with short isolated inputs, but those "AI"s really do not.)

I have no idea how long that would take, or if I would even have the skill to make it work at all and so I really wouldn't want someone else to pay for the time it takes me to throw shit at all wall hoping something sticks.

It's also not like this translator is something world changing here anyway and from what I've seen in the last 3 years demand is also pretty low.
People used me to get quick free low effort translations when I was taking requests on F95, but interest in the actual translator was always very low.
The few donations I've gotten until now did not even cover the power consumption during processing, let alone the 2 GPU's I've killed while working on over 400 different translations during that time.

I should probably do the responsible thing and instead of continuing to sink all my free time into this, get a second job and actually get some savings so I can pay for "hobbies" like this myself.
Offers always there but yeah seems to much effort.

But why would you need a 3090? The vega managed 40 t/s with vulkan.

All the best translation llm models at the moment are under 10b. A 7/8b model (like bigwebdatas ja-en Gemma on huggingface) in 4 bit gguf is around 4.5GB. Add to that your dictionary using embedding a temp of 0 and some form of chunking for context you'd easily fit that in 8GB of vram.

I know nothing of parsing text or regex or whatever else you have to spend your time on. So yeah probably not worth the hassle.
 

Users who are viewing this thread

Latest profile posts

Kanz0 wrote on Ryzen111's profile.
Hello, Could you please reupload these?
RJ01041019
RJ281985
KingofMing wrote on Shine's profile.
hi, could you please reupload https://www.anime-sharing.com/threads/211119-惑星kaim-ボクはふたなりサキュママの娘になる。-rj357673.1128832
thanks in advance
V0rko_ wrote on Otokonoko's profile.
Hi, could you please upload the final version of [250329][ドライドリーム] ブレイキングリンクス(Ver25.03.31) [RJ01286853]. Thank you!
V0rko_ wrote on Shine's profile.
Hi, could you please upload the final version of [250329][ドライドリーム] ブレイキングリンクス(Ver25.03.31) [RJ01286853]. Thank you!
I’ll try to come back and share content here again 🥲 since I really love sharing and still want to contribute. Honestly, I also feel a bit bad for just downloading some CDs shared by other uploaders here 😓. So once again, thank you so much to those who are still generously sharing.

I’m also very thankful to everyone who reached out to me through DM to offer support and suggestions. It really means a lot. --