Does anyone know how the game sets up the "%s killed %s" messages? I figure it probably is with SOME kind of LUA scripting on a death callback, set up like SetMessageText("game.infomsg.killed"), but I don't know how the game modifies this string to replace the "%s" with the names of the killer and deceased. I had hoped that something like string.format("game.infomsg.killed","[killer]","[killed person]") might work, but it won't make any replacements, because it tries to make the replacements before going to the core for localization and doesn't find any "%s" in "game.infomsg.killed", I think? I ask because in a mod the game makes tons of faulty (inaccurate) "x killed y" messages, and while I could just edit the localization to make all of these messages be blank, I don't see a way to manually recreate them.
On a side note, does anyone know how the game changes the default yellow color of SetMessageText to the red or blue, depending on the team of the killer/killed?
Localization Question
Moderator: Moderators
-
razac920
- 2nd Lieutenant

- Posts: 365
- Joined: Sun Jan 16, 2011 12:42 am
- Anakin
- Master of the Force

- Posts: 4817
- Joined: Sat Sep 19, 2009 11:37 am
- Projects :: RC Side Mod - Remastered - SWBF3 Legacy
- Location: Mos Espa (germany)
Re: Localization Question
maybe this is helpfull for the first problem:
can be found here:
http://www.gametoast.com/forums/viewtop ... =27&t=6088
Hidden/Spoiler:
http://www.gametoast.com/forums/viewtop ... =27&t=6088
-
razac920
- 2nd Lieutenant

- Posts: 365
- Joined: Sun Jan 16, 2011 12:42 am
Re: Localization Question
Ah sorry but that's not what I meant. Basically I'd like to create a localization key, game.infomsg.killed2, which is identical to the default game.infomsg.killed, which in English reads "%s killed %s". I want to make the default message blank, and use the one I created instead, whenever I choose to make this message appear. However, I don't know how to substitute the %s with the names, as the game does.
