MundoBezier

Translator Helper for Pokemon Essentials

Jan 17th, 2025 (edited)
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | Gaming | 0 0
  1. Translator Helper es un programa Free Use creado para traducir los textos de los fangames hechos con las bases 16.3, BES y 21
  2.  
  3. Autor: Bézier
  4. Para cualquier pregunta o duda, me tienes en X: @mundo_bezier
  5.  
  6.  
  7. -- LINK DE DESCARGA --
  8.  
  9. https://mega.nz/file/v84XST6D#xwSthsNoc5hk5WMsyhYOhhypjoxlT01siNakkJWtQww
  10.  
  11. -- TUTORIAL EN YOUTUBE --
  12.  
  13. https://www.youtube.com/watch?v=FQuf3C3rpb4
  14.  
  15. -- CÓDIGO PARA VERSIÓN 16 Y BES CON LOS SCRIPTS EN UNA CARPETA EXTERNA --
  16.  
  17. ## Añade el siguiente código a tu juego antes de la función def pbSetTextMessages
  18. # Función que extrae el contenido de los scripts que están en la carpeta indicada
  19. def pbSetTextExternalScripts(texts,path)
  20. files = []
  21. folders = []
  22. Dir.foreach(path) do |f|
  23. next if f == '.' || f == '..'
  24. (File.directory?(path + "/" + f)) ? folders.push(f) : files.push(f)
  25. end
  26. files.sort!
  27. files.each do |f|
  28. code = File.open(path + "/" + f, "r") { |file| file.read }
  29. pbAddRgssScriptTexts(texts,code)
  30. end
  31. folders.sort!
  32. folders.each do |folder|
  33. pbSetTextExternalScripts(texts,path + "/" + folder)
  34. end
  35. end
  36.  
  37. # Este texto es el original del juego
  38. def pbSetTextMessages
  39. Graphics.update
  40. begin
  41. t = Time.now.to_i
  42. texts=[]
  43. for script in $RGSS_SCRIPTS
  44. if Time.now.to_i - t >= 5
  45. t = Time.now.to_i
  46. Graphics.update
  47. end
  48. scr=Zlib::Inflate.inflate(script[2])
  49. pbAddRgssScriptTexts(texts,scr)
  50. end
  51.  
  52. # Añade estas 3 líneas después del bucle for para cargar los scripts de la carpeta
  53. if $RGSS_SCRIPTS.length == 1 && safeIsDirectory?("Data/Scripts")
  54. pbSetTextExternalScripts(texts,"Data/Scripts")
  55. end
  56.  
  57. # Se deben agregar mensajes porque este código es usado tanto en el sistema del juego como el Editor.
  58. [...]
  59.  
  60.  
  61. -- RELEASE NOTES --
  62.  
  63. Versión 1.0
  64.  
  65.  
Add Comment
Please, Sign In to add comment