11051-Una_duda_o_problema_\[PE_DS]
#0
DreaMiT 13738
Buenos días.

Desde ayer, he tratado cambiar el idioma (más bien, traducirlo) del juego, pero a la hora de implementarlo me quedo pillado. (Soy nuevo en ésto).

A la hora de extraer los textos, bien. Los traduzco y los compilo y bien, los renombre los meto en la carpeta DATA y bien. Ahora, he aquí el fallo. Que no me aparecen los textos traducidos.

Seguí la guía que ponía en el notes.html y ví que me aparecería un menú con lenguage que no me aparece.
También me percaté de que debía editar no se qué en el script de PokémonSystem y como no supe bien que había que editar del apartado lenguages, cambié lo que se me ocurrió, y me quedó así:

def pbSafeLoad(file)
if (FileTest.exist?("./Game.rgssad") || FileTest.exist?("./Game.rgss2a")) && FileTest.exist?(file)
File.delete(file) rescue nil
end
return load_data(file)
end

def pbLoadRxData(file)
if $RPGVX
return load_data(file+".rvdata")
else
return load_data(file+".rxdata")
end
end

LANGUAGES=[
# Languages used in the game. When the game starts and no save file exists,
# a menu displays the available languages and a "Language" option appears on
# the main menu.
# Uncomment to add entries to the array
# Name of language in native language, message file in Data folder
# ["Castellano","es.dat"],
# ["Deutsch","es.dat"]
]


def pbChooseLanguage
commands=[]
for lang in LANGUAGES
commands.push(lang[0])
end
return Kernel.pbShowCommands(nil,commands)
end

$pp=0
def dbgp
$pp+=1; p $pp
end

def pbSetUpSystem
#############
#############
begin
trainer=nil
framecount=0
havedata=false
File.open(RTP.getSaveFileName("Game.rxdata")){|f|
trainer=Marshal.load(f)
framecount=Marshal.load(f)
$game_system=Marshal.load(f)
$PokemonSystem=Marshal.load(f)
}
raise "Corrupted file" if !trainer.is_a?(PokeBattle_Trainer)
raise "Corrupted file" if !framecount.is_a?(Numeric)
raise "Corrupted file" if !$game_system.is_a?(Game_System)
raise "Corrupted file" if !$PokemonSystem.is_a?(PokemonSystem)
havedata=true
rescue
$PokemonSystem=PokemonSystem.new
$game_system=Game_System.new
end
$ResizeOffsetX=[0,0,80,80][$PokemonSystem.screensize]
$ResizeOffsetY=[0,0,80,80][$PokemonSystem.screensize]
resizefactor=[0.5,1.0,0.5,1.0][$PokemonSystem.screensize]
pbSetResizeFactor(resizefactor)
# Load constants
begin
consts=pbSafeLoad("Data/Constants.rxdata")
consts=[] if !consts
rescue
consts=[]
end
for script in consts
next if !script
eval(Zlib::Inflate.inflate(script[2]),nil,script[1])
end
if LANGUAGES.length>=2
if !havedata
$PokemonSystem.language=pbChooseLanguage
end
pbLoadMessages("Data/"+LANGUAGES[$PokemonSystem.language][1])
end
end
def pbScreenCapture
capturefile=nil
5000.times {|i|
filename=RTP.getSaveFileName(sprintf("capture%03d.bmp",i))
if !FileTest.exist?(filename)
capturefile=filename
break
end
i+=1
}
if capturefile && FileTest.exist?("rubyscreen.dll")
takescreen=Win32API.new("rubyscreen.dll","TakeScreenshot","%w(p)","i")
takescreen.call(capturefile)
if FileTest.exist?(capturefile)
pbSEPlay("expfull") if FileTest.audio_exist?("Audio/SE/expfull")
end
end
end

def pbLoadFromCodes
str=[]
File.open("codes.txt","rb"){|f|
while !f.eof?
ln=f.gets
if ln[/^[A-F0-9]+\:([A-F0-9][A-F0-9])([A-F0-9][A-F0-9])([A-F0-9][A-F0-9])([A-F0-9][A-F0-9])\s*$/]
str.push($4.hex,$3.hex,$2.hex,$1.hex)
end
end
}
bytes=str.pack("C*")
$Trainer.party[0]=pbLoadFromFile(bytes)
end

module Input
unless defined?(update_KGC_ScreenCapture)
class << Input
alias update_KGC_ScreenCapture update
end
end
def self.update
update_KGC_ScreenCapture
if trigger?(Input::F8)
pbScreenCapture
end
if trigger?(Input::F7)
pbDebugF7
end
end
end
def pbDebugF7
if $DEBUG
Console::setup_console
begin
debugBitmaps
rescue
end
pbSEPlay("expfull") if FileTest.audio_exist?("Audio/SE/expfull")
end
end
pbSetUpSystem()


El archivo .dat se llama 'es.dat'.
Aparte de cambiar eso, que seguro que está mal, hice un script con una persona para que me saliera para elegir un idioma, pero a la hora de hacerlo, me salía el cuadro arriba a la derecha de la pantalla del juego y sin ninguna opción.
El script era éste:
$PokemonSystem.language=pbChooseLanguage

Seguro, que también lo tengo mal. Ya dije, que era nuevo en ésto.

Pues eso. Si necesitáis algún dato más... pedidlo. Se que puede ser una tontería, y pido disculpas, pero sin ésto, no puedo continuar mi hack. Ya tengo todo preparado, tiles, minis, scripts listos para insertar el texto... etc.

¡Saludos!