Page 1 of 1

HLDJ Custom Command Menu

Posted: Mon Sep 08, 2008 10:54 pm
by Renegade
Many of you may be familiar with command menus already: they are the menus that pop-up on screen in HL1 games and show options to say/do various things such as change teams, drop a weapon, say a command etc. But what you may not have known is that you can make your own custom command menus that include your own commands. Here is how to make one for HLDJ for an HL1 game (example screenshot):

Image

Create a text file named "commandmenu.txt" and place it in your game directory (if one already exists, you can rename it or edit it and add menus to it, see below).
Now you can create your own menus and items in it using the following format for menu items:

Code: Select all

"<key>" "<label>" "<command>"
and this one for submenus:

Code: Select all

"<key>" "<label>"
{
     ... some items ...
}
Where <key> is the key used to activate that menu item, <label> is the display name of the item and <command> is the command(s) that are executed when that item is selected.
Here's an example of a simple HLDJ custom command menu:

Code: Select all

"1" "Play/Stop" "playaudio"
"2" "List" "la; toggleconsole"
"3" "Next" "hldjn"
"4" "Previous" "hldjp"
"5" "Info"
{
     "1" "Audio" "hldjca"
     "2" "Directory" "hldjcd"
     "3" "Say info (team)" "hldjstca"
     "4" "Say info (all)" "hldjsca"
}
"6" "HLDJ"
{
     "1" "Reset Dir" "hldjr"
     "2" "Reload" "hldjre"
     "3" "Stop" "hldjst"
     "4" "Stop & Quit" "hldjsq"
     "5" "Quit All" "hldjqa"
}
"7" "Help"
{
     "1" "Quick-Help" "hldj; toggleconsole"
     "2" "Help 1" "hldj1; toggleconsole"
     "3" "Help 2" "hldj2; toggleconsole"
     "4" "Help 3" "hldj3; toggleconsole"
     "5" "About" "hldjab; toggleconsole"
     "6" "Say About" "hldjsab"
}
Now just bind a key to "+commandmenu" in-game, and you have a quick way of accessing all HLDJ commands from a menu.
Here's the commandmenu.txt file for downloading.

You can place this file into your custom folder instead, to have it loaded every time you start a game with HLDJ.

Re: HLDJ Custom Command Menu

Posted: Mon Oct 13, 2008 12:01 am
by Anonymouse
Can this be done on a source engine game, like tf2?

Re: HLDJ Custom Command Menu

Posted: Mon Oct 13, 2008 4:09 am
by Renegade
This is an HL1-only feature, some Source games feature tweakable UI/dialogs, but unfortunately there's no generic/easy interface to do something like this for Source.

Re: HLDJ Custom Command Menu

Posted: Tue Aug 25, 2009 3:13 pm
by Kramer
but do you KNOW how to do that for CSS ? :oops:

Re: HLDJ Custom Command Menu

Posted: Tue Aug 25, 2009 11:22 pm
by Renegade
I played around with custom UI's in CSS early in development, at the time there was nothing useful to be gained from them.