the stock quickmessage menu file is located here:
iw_06.iwd\ui_mp\wm_quickmessage.menu
excerpt:
Code:
itemDef
{
name "window"
visible 1
rect 16 36 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "@QUICKMESSAGE_2_STATEMENTS"
decoration
}
execKey "2" { close quickmessage; open quickstatements }
itemDef
{
name "window"
visible 1
rect 16 52 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "@QUICKMESSAGE_3_RESPONSES"
decoration
}
execKey "3" { close quickmessage; open quickresponses }
another category can be added below like this:
Code:
itemDef
{
name "window"
visible 1
rect 16 68 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "@QUICKMESSAGE_4_CUSTOM"
decoration
}
execKey "4" { close quickmessage; open quickcustom }
dont forget to update the positions of the follow-up items (y offset between two items is 16 in this case):
Code:
itemDef
{
name "window"
visible 1
rect 16 84 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "@QUICKMESSAGE_ESC_EXIT"
decoration
}
rect 16 68 0 0 -----> rect 16 84 0 0
you'll have to create a localization string for @QUICKMESSAGE_4_CUSTOM
the stock file is here:
localized_english_iw09.iwd\localizedstrings\quickmessage.str
example:
REFERENCE 3_RESPONSES
LANG_ENGLISH "3. Responses"
your entry:
REFERENCE 4_CUSTOM
LANG_ENGLISH "4. Custom"
take one of the quickmessage sub-menus as example and make your own
iw_06.iwd\ui_mp\scriptmenus\quick*.menu
you may call it quickcustom.menu, but the file name doesn't matter actually, what is important, is the menuDef name!
Code:
menuDef
{
name "quickcommands"
the open command refers to "quickcustom", so you would have to write that as menuDef name
see: execKey "4" { close quickmessage; open
quickcustom }
Code:
itemDef
{
name "window"
group ingamebox
visible 1
rect 16 20 0 0
origin ORIGIN_QUICKMESSAGEWINDOW
forecolor 1 1 1 1
textfont UI_FONT_NORMAL
textscale .24
textaligny 8
text "@QUICKMESSAGE_1_FOLLOW_ME"
decoration
}
execKey "1" { scriptMenuResponse "1"; close quickcommands; }
the scheme is: @QUICKMESSAGE_n_description
create localizations for each in the quickmessage.str
execKey "x" means, it will execute the { code in braces } if key "x" is hit
you should use just numbers, 1, 2, 3 ... 9, 0 and change the scriptMenuResponse number accordingly
when key "x" is hit, a menuResponse is send to the script, which called the menu.
it is iw_07.iwd\maps\mp\gametypes\_quickmessages.gsc
you need to precache the menu there and create a variable for the menu (to keep the code style of IW):
game["menu_quickresponses"] = "quickresponses";
add below --> game["menu_quickcustom"] = "quickcustom";
precacheMenu(game["menu_quickresponses"]);
--> precacheMenu(game["menu_quickcustom"]);
add a new function, quickcustom() { ... }
if you don't want to play different taunts depending on team, you could do something like this:
Code:
quickcustom(response)
{
if(!isdefined(self.pers["team"]) || self.pers["team"] == "spectator" || isdefined(self.spamdelay))
return;
self.spamdelay = true;
switch(response)
{
case "1":
soundalias = "your_taunt_soundalias1";
saytext = &"QUICKMESSAGE_YOUR_TAUNT_TEXT1";
break;
case "2":
soundalias = "your_taunt_soundalias1";
saytext = &"QUICKMESSAGE_YOUR_TAUNT_TEXT2";
break;
}
}
you need to create the localizations and soundaliases (of course)
finally, add your function to the iw_07.iwd\maps\mp\gametypes\_menus.gsc
Code:
if(menu == game["menu_quickcommands"])
maps\mp\gametypes\_quickmessages::quickcommands(response);
else if(menu == game["menu_quickstatements"])
maps\mp\gametypes\_quickmessages::quickstatements(response);
else if(menu == game["menu_quickresponses"])
maps\mp\gametypes\_quickmessages::quickresponses(response);
// your new entry:
else if(menu == game["menu_quickcustom"])
maps\mp\gametypes\_quickmessages::quickcustom(response);
sorry for compressed text, not my bad :(