I'm doing a translation of a game and I run into a problem.
Inside a common event, there is a script call and all this code below is inside it.
I need to edit the text where "XYZ" is but I can't.
I can delete a character from the script but I can't add anything due to some script character limit.
I don't even know how he managed to put inside so many characters.
Half of the characters you can't even see when you edit the script.
Does anyone know how to do this?
for i in 0..$game_party.actors.size - 1
if $game_variables[27].include?("XYZ")
if $game_party.actors.id == 3
a = $game_variables[1]
hp = $game_party.actors.hp
maxhp = $game_party.actors.maxhp
$game_switches[100] = true if maxhp != hp
hpp = maxhp * $data_items[a].recover_hp_rate
hpp *= 0.01;hpp = hpp.to_i
$game_party.actors.hp += hpp
$game_switches[87] = true
end;end;end
nothing can change the editor, which means you can't add characters there.
You can only try to copy the entire part into a regular notepad program, edit it there and then copy it back into an empty script window - hoping that the edit doesn't add any more letters to the code.
If all things fail, you can ask someone to turn that script box into a full script and provide a shortened command to call that script from the script box, but that will need a lot more data than you gave here.
Thanks for the fast reply.
I thought of a way to solve this problem but not sure if it's going to work like I think it is.
The game I'm translating uses a script to transform letters into an image and then displays it on screen.
So instead of going through all common events and translating character names in every script, I thought of this.
My thought process is:
1. add XYZ to actor name -> MikeXYZ
2. add convert.gsub!(/XYZ/){""} -> this would delete XYZ from displaying on screen if actor name is called in a dialog. Only Mike would be displayed.
3. if a script is called with and this is checked -> if $game_variables[27].include?("XYZ") it's going to return true because Mike has XYZ included in his name.
variable 27 is set twice in same script:
$game_variables[27] = $game_party.actors[$select_item[1]].name
$game_variables[27] = $game_party.actors[@command_p_n.index].name
Would this work if I do it like that?
Can some explain to me why this doesn't work.
Inside an common event, I added a script.
if
$game_variables[181] == "ガム選"
$game_variables[501] = "Gum選"
end
This above works!
This below doesn't! Why?
Some of the item names are pretty longer and they can't fit inside script widows row limit and if they go in another row I automatically get an error. Because of that, I wanted to add a new variable (z) and store it inside it the translation and then put that variable value inside variable 501.
if
$game_variables[181] == "ガム選"
z = "Gum選"
$game_variables[501] = z
end
Some of the items are longer and I can't translate them directly because their Japanese names are used in other scripts. So what I wanted to do is just add a part of my own script above the place where the text is displayed on the screen and with if elsif else loop or switch make it so it displays English translation instead. Because of that, I made variable 501.
The error I get when trying to open item "Gum" is "undefined method 'description' for [11]:Array.
EDIT:
Ignore this, I figured out what the problem was.