Tool RPGM Creando scripts Python para traducir Rpgs MV y MZ/Creating Python scripts to translate Rpgs MV and MZ

Ciberpunk77

Newbie
Mar 16, 2021
19
15
Primero que todo quiero decir unas cosas:
1: que no se casi programar me e estado ayudando con IAS(soy aun novato)
2: Busco una manera mas optima para poder traducir juegos en RPG MAKER MV y MZ y talvez ACE(Aun estoy aprendiendo Ruby y Python)
3:ire compartiendo código Python el cual a estado medio funcionando aunque obviamente tengo muchos errores pero intentare mejorarlo.
4:agradeceria cualquier información de herramientas que podría implementarlo en el código toda ayuda sirve porfis.
5:esto es un pasatiempo y no lo hago con fines de lucro solo es un proyecto que me ayudara a aprender todo lo relacionado con la programación muchas gracias por su atención.

**instalar Python y visual code o Pycharm (busquen en YouTube si no saben) y cuando los tengas instalados abres una consola cmd o dentro del IDE y instalas: pip install deep-translator **
#cuando hayas instalado todo ya puedes comenzar a jugar con el código para traducir tu juego.
#antes de todo crea una copia de seguridad de tu data de tu juego y ya puedes pegarlo en la carpeta share y lo arrastras a tu Visual code o Pycharm y comienza a ejecutar 1 x 1


First of all I want to say a few things:
1: I hardly know how to program and they have been helping me with IAS (I'm still a newbie)

2: I'm looking for a more optimal way to translate games into RPG MAKER MV and MZ and maybe ACE (I'm still learning Ruby and Python)

3: I will share Python code which is half working although obviously I have many errors but I will try to improve it.

4: I would appreciate any information on tools that could implement it in the code, any help is helpful please.

5: This is a hobby and I am not doing it for profit, it is just a project that will help me learn everything related to programming. Thank you very much for your attention.

**install Python and visual code or Pycharm (search on YouTube if you don't know) and when you have them installed, open a cmd console or within the IDE and install: pip install deep-translator **
#when you have installed everything you can start playing with the code to translate your game.

#First of all, create a backup copy of your game data and you can paste it in the share folder and drag it to your Visual code or Pycharm and start running 1 x 1
 

Ciberpunk77

Newbie
Mar 16, 2021
19
15
oye carnal me da curiosidad, exactamente que es lo que quieres crear ?

ya cheque tu codigo y tiene potencial
hola pues estoy haciendo traductor para traducir los juegos rpg me funciona para el motor RPG MAKER MV Y MZ pero lo que busco ahora es crear un traductor gratuito y que no se bloquee no se porque razón se me bloquea cuando traduzco juegos y también una observación que cuando traduce hay textos unidos con: <br></br>...\c[0]\fi\C[25]\V[56]\N[2]\n en algunos json y en el json de items hay palabras que están encerrados con:[algo aqui] <tambien aqui algo> todos esto son propiedades que van unidos al dialogo y pues estos textos me lo alteran o me los traduce quisiera manejar eso de alguna manera en la hora de traducirlo hacerlos intocable pero aun no domino estos cambios que intento implementar.
 
Apr 14, 2024
166
2,035
buen trabajo
un par de ideas.... aunque sólo miré el código por encima
-creo que traduces linea por linea (ségun las vas "detectando".... quizás por eso se te bloquea el traductor), yo lo que hago es extraer todos los textos en 1 solo archivo (restando duplicados) y traducirlo todo por fragmentos de 5-10kb y despues lo vuelvo a unir, y creo un "diccionario" de reemplazos (de esta manera no haces tantas peticiones al traductor).. he visto otro traductor de RPG similar y por eso es tan lento.... el mio es muchísimo más rápido.... hace poco me hice uno que los traduce todos en 1 minuto.... incluso hice otro con Deepl.
-en lo referente a las "variables" que mencionas, que no se deben traducir, sustitúyelas "antes" de traducir con Regex, por ejemplo :

[algo aqui] = @1
re.finditer(r'\[.+?\]', lines)

<tambien aqui algo> =@2
re.finditer(r'\<.+?\>', lines)


y después una vez traducido las recuperas
poco a poco irás conociendo las "variables comunes" que usa RPG Maker (puedes buscarlas) y crearte una lista y añadirla a las "sustituciones previas" que te indiqué antes


iré siguiendo tu hilo para ayudarte en tus futuras dudas .... ánimo
 
Last edited:

Ciberpunk77

Newbie
Mar 16, 2021
19
15
buen trabajo
un par de ideas.... aunque sólo miré el código por encima
-creo que traduces linea por linea (ségun las vas "detectando".... quizás por eso se te bloquea el traductor), yo lo que hago es extraer todos los textos en 1 solo archivo (restando duplicados) y traducirlo todo por fragmentos de 5-10kb y despues lo vuelvo a unir, y creo un "diccionario" de reemplazos (de esta manera no haces tantas peticiones al traductor).. he visto otro traductor de RPG similar y por eso es tan lento.... el mio es muchísimo más rápido.... hace poco me hice uno que los traduce todos en 1 minuto.... incluso hice otro con Deepl.
-en lo referente a las "variables" que mencionas, que no se deben traducir, sustitúyelas "antes" de traducir con Regex, por ejemplo :

[algo aqui] = @1
re.finditer(r'\[.+?\]', lines)

<tambien aqui algo> =@2
re.finditer(r'\<.+?\>', lines)


y después una vez traducido las recuperas
poco a poco irás conociendo las "variables comunes" que usa RPG Maker (puedes buscarlas) y crearte una lista y añadirla a las "sustituciones previas" que te indiqué antes


iré siguiendo tu hilo para ayudarte en tus futuras dudas .... ánimo
Muchas gracias por las ideas y si me olvido aclarar eso que traduce linea a linea de forma ordenada ya que no pude hacerlo "Paralelizarla" porque se rompe los ordenes de los diálogos dentro del juego probare tu ideas y experimentare nuevamente con los códigos y muchas gracias de nuevo por responderme actualizare cada mes mas omenos, y te molestare con mas dudas que me vaya surgiendo a lo largo.
 

aru6551

Newbie
Oct 28, 2019
52
84
Hi!
Your post reminds me of a plugin I got from a dlsite's game, which is for translated versions of games. I modified your code to match this plugin.
After unzipping source.zip, copy the game's data folder to the rpg-maker-python folder, double-click extract.bat, it will generate the file to_Translation.json, translate it and rename it to _Translation.json. Copy it to the game's data folder, then copy the _DLTranslationConvertMVMZ.js plugin to the game's js\plugins folder, then modify the plugins.js file under the js folder and add the following line:
{"name":"_DLTranslationConvertMVMZ","status":true,"description":"翻訳テキストに自動でコンバートします(MV/MZ両対応)","parameters":{"Accuracy":"false"}}
Then after executing the game, it will be the translated game.

edit:
i checked it again . sorry for any inconvenience.
 
Last edited:

Ciberpunk77

Newbie
Mar 16, 2021
19
15
Hi!
Your post reminds me of a plugin I got from a dlsite's game, which is for translated versions of games. I modified your code to match this plugin.
After unzipping source.zip, copy the game's data folder to the rpg-maker-python folder, double-click extract.bat, it will generate the file to_Translation.json, translate it and rename it to _Translation.json. Copy it to the game's data folder, then copy the _DLTranslationConvertMVMZ.js plugin to the game's js\plugins folder, then modify the plugins.js file under the js folder and add the following line:
{"name":"_DLTranslationConvertMVMZ","status":true,"description":"翻訳テキストに自動でコンバートします(MV/MZ両対応)","parameters":{"Accuracy":"false"}}
Then after executing the game, it will be the translated game.
Thank you very much for your contribution. This method looks more convincing. I will do experiments for both my code and the one you have given me.
For now I have been making an optimal flat translator that does not crash, but it is becoming difficult for me to find free options.
I'm also implementing some regex to handle certain html properties of certain game dialogs.
I've almost got the regular expressions ready to handle them in the dialogs. Tomorrow I'll release an update.
 
Apr 14, 2024
166
2,035
Hi!
Your post reminds me of a plugin I got from a dlsite's game, which is for translated versions of games. I modified your code to match this plugin.
After unzipping source.zip, copy the game's data folder to the rpg-maker-python folder, double-click extract.bat, it will generate the file to_Translation.json, translate it and rename it to _Translation.json. Copy it to the game's data folder, then copy the _DLTranslationConvertMVMZ.js plugin to the game's js\plugins folder, then modify the plugins.js file under the js folder and add the following line:
{"name":"_DLTranslationConvertMVMZ","status":true,"description":"翻訳テキストに自動でコンバートします(MV/MZ両対応)","parameters":{"Accuracy":"false"}}
Then after executing the game, it will be the translated game.
Fantastic
 
Apr 14, 2024
166
2,035
la diferencia es que lo mete todito en un diccionario eh se ve interesante la forma en que se va traduciendo XD me recuerda un metodo como el replace creo que se llamaba
pues el método es fantástico

acabo de traducir "Peasants Quest " en 2 minutos

esto va a traer muchas traducciones al foro y .... como siempre ,,,, habrá gente que se lucrará con ello .... una pena
 

Ciberpunk77

Newbie
Mar 16, 2021
19
15
fua me e roto la cabeza para que funcione las expresiones y no funcionan x.x e hecho varios enfoques pero por ahora dejare la actualización de los códigos y de paso quiero decir el que medio me a funcionado en el tema de los regex fue en el código de itemSetcs.py y se me olvida es aun lento porque aun no e actualizado el traductor sigo iterando 1 x 1 aun.
wow I've racked my brains to get the expressions to work and they don't work x.x I've tried several approaches but for now I'll leave the codes to update and by the way I want to say that the one that has half worked for me on the regex issue was in the itemSetcs.py code and I forget it's still slow because I haven't updated the translator yet, I'm still iterating 1 x 1.
 
  • Like
Reactions: Paloslios_Official

Ciberpunk77

Newbie
Mar 16, 2021
19
15
Hi!
Your post reminds me of a plugin I got from a dlsite's game, which is for translated versions of games. I modified your code to match this plugin.
After unzipping source.zip, copy the game's data folder to the rpg-maker-python folder, double-click extract.bat, it will generate the file to_Translation.json, translate it and rename it to _Translation.json. Copy it to the game's data folder, then copy the _DLTranslationConvertMVMZ.js plugin to the game's js\plugins folder, then modify the plugins.js file under the js folder and add the following line:
{"name":"_DLTranslationConvertMVMZ","status":true,"description":"翻訳テキストに自動でコンバートします(MV/MZ両対応)","parameters":{"Accuracy":"false"}}
Then after executing the game, it will be the translated game.
I want to tell you that the method you have shared with me is fabulous and I have translated huge games without problems. Thank you very much. The only drawback is the missions, but I will see if I can implement that in another python script to make it work with the single json that generates all the extractions in the dictionary.

e probado ese metodo con este juego a español y va de a 10 :D
1683029519922.jpeg https://f95zone.to/threads/among-cults-v0-2-9-7-test-artes-septim.158503/
 

Ciberpunk77

Newbie
Mar 16, 2021
19
15
pues el método es fantástico

acabo de traducir "Peasants Quest " en 2 minutos

esto va a traer muchas traducciones al foro y .... como siempre ,,,, habrá gente que se lucrará con ello .... una pena
te doy la razón me e ahorrado un montón de errores de ciertos juegos gracias a este método cuando tenga mas conocimientos veré si puedo extenderlo para el tema de las misiones ya que eso es lo único que no extrae es una lastima que se lucren la gente de esto me imagino porque la mayoria de gente no encuentra este tipo de forums o bien no saben usar la pagina (ami me paso y estube como bobo llendo a paginas con acortadores para obtener las traducciones de unos jueguillos)
 
  • Like
Reactions: Paloslios_Official
Apr 14, 2024
166
2,035
te doy la razón me e ahorrado un montón de errores de ciertos juegos gracias a este método cuando tenga mas conocimientos veré si puedo extenderlo para el tema de las misiones ya que eso es lo único que no extrae es una lastima que se lucren la gente de esto me imagino porque la mayoria de gente no encuentra este tipo de forums o bien no saben usar la pagina (ami me paso y estube como bobo llendo a paginas con acortadores para obtener las traducciones de unos jueguillos)
por mis pruebas .... en las misiones (quest) no me ha funcionado..... una lástima .... a ver si tu tienes más suerte
 

aru6551

Newbie
Oct 28, 2019
52
84
I want to tell you that the method you have shared with me is fabulous and I have translated huge games without problems. Thank you very much. The only drawback is the missions, but I will see if I can implement that in another python script to make it work with the single json that generates all the extractions in the dictionary.

e probado ese metodo con este juego a español y va de a 10 :D
View attachment 4101052 https://f95zone.to/threads/among-cults-v0-2-9-7-test-artes-septim.158503/
por mis pruebas .... en las misiones (quest) no me ha funcionado..... una lástima .... a ver si tu tienes más suerte
i checked it again . sorry for any inconvenience.
the _DLTranslationConvertMVMZ.js only processes json files in the data folder. text of quest, gallery, hentai event, etc. usually is in plugins.js and needs to be translated separately.
 
Last edited:
  • Like
Reactions: Paloslios_Official