I'm sure you guys have all seen the score HUD in wager matches, you can do the same with every gametype, also with custom ones. That way you don't have to edit hud.menu and you can play the normal gamemodes as well.
for this tut my gametype will be "mod"
create 2 new textfiles:
mp_mod\ui_mp\hud_mod.menu
mp_mod\ui_mp\hud_mod.txt
put the following in the txt file:
then create your score-hud in the hud_mod.menu file, here's an example:
the first menuDef: "mod_gamemessages" should always be in your file, this is the killfeed. After that you can make whatever you want.
Now add the files to your mod.csv
and when you start your gametype you will have a custom hud for that specific gametype Ohh and don't forget to change the gametype name, so in this tutorial its "mod" and it should be renamed to your gametypename .. for every file like for tdm it would be: hud_tdm.txt etc
little screenie of the example above:
for this tut my gametype will be "mod"
create 2 new textfiles:
mp_mod\ui_mp\hud_mod.menu
mp_mod\ui_mp\hud_mod.txt
put the following in the txt file:
Code:
{
loadMenu { "ui_mp/hud_mod.menu" }
}
then create your score-hud in the hud_mod.menu file, here's an example:
Code:
// CONSOLE HUD - MP
#include "ui/menudef.h"
#include "ui_mp/hud_gametypes.inc"
#include "ui_mp/hud_wager_summary.inc"
{
// game messages
menuDef
{
name "mod_gamemessages"
rect 0 0 0 0 HORIZONTAL_ALIGN_USER_RIGHT VERTICAL_ALIGN_USER_TOP
fullScreen 0
visible 1
visibilityBits bits( !BIT_IN_KILLCAM !BIT_DEMO_ALL_GAME_HUD_HIDDEN )
itemDef
{
rect 0 0 0 0
exp rect Y( 5 );
exp rect X( -5 );
type ITEM_TYPE_GAME_MESSAGE_WINDOW
gamemsgwindowindex 0
gamemsgwindowmode MODE_BOTTOMUP_ALIGN_BOTTOM
textfont UI_FONT_DEFAULT
textstyle ITEM_TEXTSTYLE_SHADOWED
textalign ITEM_ALIGN_RIGHT
textscale TEXTSIZE_SMALL
visible 1
visibilityBits bits( !BIT_UI_ACTIVE BIT_HUD_OBITUARIES )
}
}
menuDef
{
name "scorebars_team_scores"
rect BOTTOM_RECT_X BOTTOM_RECT_Y 640 480 HORIZONTAL_ALIGN_FULLSCREEN VERTICAL_ALIGN_FULLSCREEN
exp rect Y( BOTTOM_RECT_Y - (ONLINEGAME * ONLINEGAME_OFFSET) );
fullScreen 0
visible 1
visibilityBits bits( BIT_HUD_VISIBLE !BIT_IN_KILLCAM !BIT_UI_ACTIVE !BIT_SPECTATING_CLIENT HUD_VISIBILITY SHOULD_DISPLAY_SCOREBAR )
itemDef
{
style WINDOW_STYLE_SHADER
type ITEM_TYPE_IMAGE
rect BG_START_X BG_START_Y (187*SPLITSCREEN_MULTIPLIER) (46*SPLITSCREEN_MULTIPLIER) WAGER_SUMMARY_ALIGN
exp material( "hud_frame_faction_fade" );
forecolor 1 1 1 0.5
visible 1
decoration
}
itemDef
{
style WINDOW_STYLE_SHADER
type ITEM_TYPE_IMAGE
rect (BAR_START_X-(69*SPLITSCREEN_MULTIPLIER)) (BG_START_Y-(14*SPLITSCREEN_MULTIPLIER)) (240*SPLITSCREEN_MULTIPLIER) (59*SPLITSCREEN_MULTIPLIER) WAGER_SUMMARY_ALIGN
exp material( "hud_frame_faction_lines" );
forecolor 1 1 1 0.4
visible 1
decoration
}
itemDef
{
style WINDOW_STYLE_SHADER
type ITEM_TYPE_IMAGE
rect FACTION_BG_X_START FACTION_BG_Y_START FACTION_BG_WIDTH FACTION_BG_HEIGHT WAGER_SUMMARY_ALIGN
exp material( "hud_faction_back_light" );
forecolor 1 1 1 0.25
visible 1
decoration
}
itemDef
{
style WINDOW_STYLE_SHADER
type ITEM_TYPE_IMAGE
rect FACTION_BG_X_START FACTION_BG_Y_START FACTION_BG_WIDTH FACTION_BG_HEIGHT WAGER_SUMMARY_ALIGN
exp material( "hud_faction_backing" );
forecolor 1 1 1 0.2
visible 1
decoration
}
itemDef
{
style WINDOW_STYLE_SHADER
type ITEM_TYPE_IMAGE
rect (FACTION_BG_X_START+(FACTION_BG_WIDTH/2)-FACTION_ICON_WIDTH/2) (FACTION_BG_Y_START+(FACTION_BG_HEIGHT/2)-FACTION_ICON_HEIGHT/2) FACTION_ICON_WIDTH FACTION_ICON_HEIGHT WAGER_SUMMARY_ALIGN
exp material( "cyaozm_icon_axis" );
visible when( team( name ) == "TEAM_AXIS" );
forecolor 1 1 1 1
decoration
}
itemDef
{
style WINDOW_STYLE_SHADER
type ITEM_TYPE_IMAGE
rect (FACTION_BG_X_START+(FACTION_BG_WIDTH/2)-FACTION_ICON_WIDTH/2) (FACTION_BG_Y_START+(FACTION_BG_HEIGHT/2)-FACTION_ICON_HEIGHT/2) FACTION_ICON_WIDTH FACTION_ICON_HEIGHT WAGER_SUMMARY_ALIGN
exp material( "cyaozm_icon_allies" );
visible when( team( name ) == "TEAM_ALLIES" );
forecolor 1 1 1 1
decoration
}
itemDef
{
type ITEM_TYPE_TEXT
rect (BAR_START_X+FACTION_BG_WIDTH/2) -22 1 BAR_HEIGHT_TOP WAGER_SUMMARY_ALIGN
dvar "ui_zom_allies_alive"
textstyle ITEM_TEXTSTYLE_SHADOWED
textalign ITEM_ALIGN_MIDDLE_LEFT
textfont UI_FONT_EXTRABIG
textscale TEXTSIZE_LARGE
forecolor 1 1 1 0.65
visible 1
decoration
}
itemDef
{
type ITEM_TYPE_TEXT
rect (BAR_START_X+FACTION_BG_WIDTH/2) -42 1 BAR_HEIGHT_TOP WAGER_SUMMARY_ALIGN
dvar "ui_zom_money" \
textstyle ITEM_TEXTSTYLE_SHADOWED
textalign ITEM_ALIGN_MIDDLE_LEFT
textfont UI_FONT_EXTRABIG
textscale TEXTSIZE_LARGE
forecolor 1 1 1 0.65
visible when( team( name ) == "TEAM_ALLIES" );
decoration
}
itemDef
{
type ITEM_TYPE_TEXT
rect (BAR_START_X+FACTION_BG_WIDTH/2) -42 1 BAR_HEIGHT_TOP WAGER_SUMMARY_ALIGN
dvar "ui_zom_health"
textstyle ITEM_TEXTSTYLE_SHADOWED
textalign ITEM_ALIGN_MIDDLE_LEFT
textfont UI_FONT_EXTRABIG
textscale TEXTSIZE_LARGE
forecolor 1 1 1 0.65
visible when( team( name ) == "TEAM_AXIS" );
decoration
}
}
}
the first menuDef: "mod_gamemessages" should always be in your file, this is the killfeed. After that you can make whatever you want.
Now add the files to your mod.csv
Code:
menufile,ui_mp/hud_mod.menu
menufile,ui_mp/hud_mod.txt
and when you start your gametype you will have a custom hud for that specific gametype Ohh and don't forget to change the gametype name, so in this tutorial its "mod" and it should be renamed to your gametypename .. for every file like for tdm it would be: hud_tdm.txt etc
little screenie of the example above:
(08-10-2011, 12:58)Pozzuh Wrote:Se7en Wrote:Stealed, from cod4 mod ...look who's talking
[Release] Old School Mod v2.2
[Release] Scroll menu