[ACE] Adding strings to Window_BattleLog

YonicStudios

Warper
Member
Joined
May 2, 2014
Messages
2
Reaction score
0
First Language
Spanish
Primarily Uses
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?
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
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
 

YonicStudios

Warper
Member
Joined
May 2, 2014
Messages
2
Reaction score
0
First Language
Spanish
Primarily Uses
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
The second alternative seemed to work well! It seems that I added the "¡" string somewhere else, which made the error.

Thank you very much!
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,868
Messages
1,017,066
Members
137,576
Latest member
SadaSoda
Top