The language of the game I'm developing is in Spanish, and so I had to translate the terms of the game, including the Vocab script.
The problem is that I have some issues translating the log messages when using Skills and acquiring and removal of States.
In the Database, it is impossible to add preceding text to the character's name, so I can't add the "¡" text character, which appears in all exclamation sentences in Spanish (for example, "¡Enemigo ataca!"), and as a result the outcome would be displayed incorrectly ("Enemigo ataca!").
If you don't understand, it would be almost like displaying the enemy's class before the enemy's name, just like the "Wild" or "Foe" prefix in the battles of Pokémon series: "Wild PKMN appeared!".
I'm not a scripter, but I was wondering if I could add it by changing the Window_BattleLog class, in the display_added_states, display_removed_states, display_use_item, but of course adding the "¡" string by itself would cause an error.
Is there a way to add that "¡" before the character's name on those message logs?
[ACE] Adding strings to Window_BattleLog
● ARCHIVED · READ-ONLY
-
-
Well, this absolutely a serious business if you're going to translate your game language into non-english. I'm Indonesian and this sometime bugging me.
You can try by overwriting def display_use_item
def display_use_item(subject, item) if item.is_a?(RPG::Skill) text = item.message1.gsub(/<n>/i) { subject.name } add_text(text) unless item.message2.empty? wait add_text(item.message2) end else add_text(sprintf(Vocab::UseItem, subject.name, item.name)) endendIt's allow you to reposition battler name in any place that you want. For example "Casting skill. <n> use fireball". <n> will be replaced by battler name
Or, if you only want to add 'i' in every item use display. Try this instead.
def display_use_item(subject, item) if item.is_a?(RPG::Skill) add_text("i" + subject.name + item.message1) unless item.message2.empty? wait add_text(item.message2) end else add_text(sprintf(Vocab::UseItem, subject.name, item.name)) endendHope it helps -
The second alternative seemed to work well! It seems that I added the "¡" string somewhere else, which made the error.Well, this absolutely a serious business if you're going to translate your game language into non-english. I'm Indonesian and this sometime bugging me.
You can try by overwriting def display_use_item
def display_use_item(subject, item) if item.is_a?(RPG::Skill) add_text("i" + subject.name + item.message1) unless item.message2.empty? wait add_text(item.message2) end else add_text(sprintf(Vocab::UseItem, subject.name, item.name)) endendHope it helps
Thank you very much!