- Details
- Written by: INsane
- Category: Day of Defeat Customisation Guides
- Hits: 5666
Why make a Menu? One very good reason is when you have so many binds and scripts for all your tweaks, movie making, and whatever else, you just run out of keyboard keys! Another is some people prefer a graphical button and a mouse click…to each his own.
I was making a menu for my favorite DoD bot program ShrikeBot one day and came across something that may make the laborious… and sometimes confusing task of making a Half Life menu…easy. Well easier anyway.
More on that latter, if you are totally new to making a menu, please take the time to read just a little more before looking at the "Menu Making with Anselm Fohrs editor" page.
If you know a fair bit about Half Life menus or even scripting already go there now by pressing next at the bottom.
This information will also work on other Steam Half-Life Mods, I have not tried others myself just yet.
It’s not difficult to make a menu. Anyone who knows how to make a script will have little trouble. But I noticed when I was learning there is not much info for users who are new to messing around with config files and such.
So, armed with what I found out along the way a while back, I thought putting it down somewhere may help someone… here goes.
The standard DoD menu is controlled by a small file called a "commandmenu.txt". Like the contents in a userconfig.cfg file it has to conform to a certain layout to function correctly. Get one bit wrong and it breaks. Don’t let this worry you, faults are not that hard to fix.
The first thing that you will notice is that you will not have a commandmenu.txt in your dod folder. Steam holds this file locked up in its .gcf file (Game Cache File). This is actually a good idea, if you "break" your command menu when making it, just move out or delete the one in the dod folder and Steam will replace it with a standard one.
When you place a file called commandmenu.txt in your dod folder, that file will be used instead of the one in the C:\Program Files\Steam\SteamApps\day of defeat.gcf.
Steam also works this way when handling custom files like sprites and sounds, the custom content you place in the dod folder overrides the standard file... until it is removed.
There are many good guides already on how to assemble a command menu and mostly they will suit all. I will show you the long "traditional" way…then a shorter, clearer, less complicated way. There is a reason for this, it will help fault finding latter.
The Short way I speak of involves using a purpose built Commandmenu-Editor made by Anselm Föhr. It will display the layout a lot clearer and looks a lot like the left pane in Windows Explorer… a directory tree view we are all familiar with…
More on the use of that program latter, to continue....
The above layout in Notepad looks like this... (Any text in italics is for description only)
"1" "First column Button #1"
{
"1" "Second column Button"
{
"1" "Third column Button #1"
{
"1" "Fourth column Button #1" "Fourth Button command #1"
"2" "Fourth column Button #2" "Fourth Button command #2"
}
"2" "Third column Button #2"
{
"1" "Fourth column Button #1" "Fourth Button command #1"
"2" "Fourth column Button #2" "Fourth Button command #2"
}
}
}
"2" "First column Button #2"
"3" "HELP"
(This is the start of the standard menu, "Help" is usually "1" change these numbers as you add more)
If you are looking at all that text in the example and saying "it's a mess", I quite agree.
That's why Anselm Föhrs editor is needed, it takes away the need to learn how to place all the "{" that arrange where all the buttons sit inside a particular column.
It is more like adding new folders/sub folders of a directory tree inside Windows Explorer.
The buttons act like the folders in the editor... complete with a plus and minus action on every button that expands out to others.
The program does have its limits like coping and pasting more than one line ...or looking at it graphically... "button".
This will still have to be done one by one in the editor or copy/paste as a group in Notepad, an inexperienced user may find building their menu in Notepad a little difficult, far better to start in the editor.
The example I made above is just a dummy menu, it sits on top of the standard DoD menu and ends up looking like this on your screen...
If you make a mistake the menu will "break". It will still work, but parts of it will be misplaced or jumbled up!
When this happens you need to find the place where things started to go wrong, check you have not made an error.
The following is just for an example so you can spot the mistake...
"1" "Fourth column Button #1" "Fourth Button command #1"
The above format will work, all the spaces and " are in the right place, lets make a mistake...
"1" "Fourth column Button #1 "Fourth Button command #1"
There is a " missing after... "1" "Fourth column Button #1 <----- " missing!
Look what happens now....
It got messed up because I didn't put a " in the right place. But notice how the menu shows you where you went wrong. At least you can narrow down the area or line the mistake occurs.
Don't give up just yet because it looks too complicated, it's all in the learning process, if you build something you better know how to fix it first.
The next section is about building the Menu, it is actually easier than the pages you have completed.
Press Next... Menu Making with Anselm Fohrs Commandmenu Editor
{mospagebreak title=Menu Making with Anselm Fohrs editor&heading=Menu Making with Anselm Fohrs editor}
Start by downloading Anselm Fohrs Commandmenu-Editor. I have made a package for all you will need next, download here.
Next you will want a standard DoD menu, a commandmenu.txt, one is included in my download of the editor. If you want to see where your "locked up" commandmenu.txt is on your drive, you will need a special program to extract it from the...
C:\Program Files\Steam\SteamApps\day of defeat.gcf.
The program is called GCFScape. You don’t need to do this. I just put this info here if you are the curious type.
Run the editor.
It will be a good time to read the help section "?" for familiarizing yourself with the basic functions now. Open the dod standard commandmenu.txt file in the "dod standard command text" of the download…
As you can see, it is the same layout as you will see on your game screen. Now lets say you want to add a section for adjusting your graphics quickly while in-game. You may also want to have other sections like audio controls.
This is where you have to plan a bit, you could make another button on top of "HELP" called "Graphics" then another below or inserted (the editor has a "Insert" button too), called "Audio". This is where planning comes in to it. You may want to group them under a button called "Controls". It’s up to you… and how much screen area you use up!
Click on the word "HELP" once. Click on the "Insert" icon…
The new button is made!
Now you want to give it a name and decide if you are going to branch more buttons off this one or it just finishes here by inserting a command after the name.
In this case we will name this "Audio" and we want to put in a command that stops all ambient sounds while in-game the next button will be called "Quiet Mode" the command when the button is pressed is called "stopsound".
Naming a button is easy the format looks like this…
"1" "Audio"
(1 = this is the first button in the column, Audio = the name of the button).
What you have just made is a button that, when your mouse hovers over it another column will "pop up", let’s make that next column button now…
Click on the word "Audio" once.
Click on the "New Subnode" icon….
Type this in the new button… "1" "Quiet Mode" "stopsound"
That format is now a button ("1" "Quiet Mode") added to that is a command ("stopsound"), when you click on this button in the game the ambient sounds will stop!
You now have your new buttons and a command off one of them. You have to do a little tidying up now, the number before "HELP" is not #1 anymore in that first column it is #2. Same goes for all the buttons below that, edit those now…
Click on the word "HELP" once.
Right Click behind the "1" before the word "HELP", press backspace key and change it to a "2".
Repeat this for all the ones that branch off that first column as well. Now it will look like this…
You’re done with editing for now, time to save it… Don’t press the save icon just yet! You don’t want to overwrite the standard menu it comes in handy latter, still call it "commandmenu.txt" but save it to another folder and give that folder another name, I have made an empty folder in the download called "MY Command Menus" that will do for now.
Select "File" "Save as" drop down the "Save in" address box find the "MY Command Menus" folder and name it "commandmenu.txt" select save. The menu is ready for a test, all you have to do now is put it in the dod folder.
Some Steam installs are in…
C:\Valve\Steam\SteamApps\your-email-address\day of defeat\dod
Some are in…
C:\Program Files\Steam\SteamApps\ your-email-address \day of defeat\dod
The important thing is, it’s the "dod" folder you want. The one with your config.cfg files the same place your screenshots go, demo files, sprites, models and such. After it is in, run the game and try it. It will look like this…
If you have done everything correctly, you now have the basics over with and you can move onto more complicated arrangements to suit yourself… use your imagination.
Press Next… Advanced Menus Information
{mospagebreak title=Advanced Menus Information&heading=Advanced Menus Information}
Advanced Menus Information
You must be neat!
Naming a button and adding commands to it must follow a set format or you're in trouble....
The above section in my menu are a "High and Low quality graphics" buttons set using seven commands to select, low quality and then, turn them back again by altering the variable in each command.
If you get one thing wrong there it will not work, well part of it will break anyway. Every space and " is important if you want it to work...be neat!
There are limits to the amount of items in a menu.
Limitations:
- Maximum of 40 menus.
- Maximum of 100 buttons per menu.
That's more than enough, the other limits are governed by...
How wide you make your buttons...
The width is set by how long the word is when you name your new button, the longer the name, the bigger the button. Name it carefully.
How big your screen is...
If you are going to share your menus and you have a 21 inch screen, it will look OK on yours but give it to a friend with a 17 inch screen and the buttons may start to "return" on top of each other. If you are planning to make one for others keep this in mind and test it first on a smaller screen.
The basic lay out...
Some buttons can have about 10 buttons coming off them in a new column, then expanding out again to another column, those buttons that have more coming off them need height... or they will disappear off the bottom of your screen!
Let your imagination run wild, a menu is a personal thing, making your own to suit your needs can be rewarding and save you a lot of time while playing online instead of typing commands in the console. DoD is for fun not frustration.