I've implemented this as follows:
The mainhall.tbl supports two new keys: "+Door region" and "+Door description"
"+Door region" specifies what happens when the user clicks on that door. Currently allowed are Exit, Barracks, Readyroom, Techroom, Options, Campaigns, Load Mission, Quickstart, Skilllevel and Script.
The first six are the default doors. Load Mission is defined in the code (LOAD_MISSION_REGION) but not implemented (it does nothing). You can trigger it by default by pressing "L".
Quickstart immediatly starts a mission by skipping the briefing screens but works only in debug builds. This can be triggered by pressing "G" right now.
Skilllevel increases the pilot's skill.
Script initiates the GS_STATE_SCRIPTING game state and sets "hv.MenuButton" in LUA to the index of the clicked door. This way the script can tell which door the user chose.
"+Door description" specifies a new description.
"+Door region" comes after "+Door pan" and after that comes "+Door description".
The six first "+Door region" and "+Door description" options overwrite the default options. If you want to add more options you have to edit the mainhall mask and add new areas (with new colors). You also have to add the new options to menu.tbl.
Every door has its own line in menu.tbl which normally looks this:
"" COLOR_NUM NULL NULL NULL
You can also write a single letter behind COLOR_NUM to connect that door with a key. COLOR_NUM is a number between 0 and 255. To get the actual color for the mask you have to substract COLOR_NUM from 255 and write the result in hexadecimal.
I.e., if COLOR_NUM is 6:
255 - 6 = 249 = 0xf9
In this case the color is #F9F9F9 (since the mask is greyscale).
Right now the code contains a limit of 20 entries for menu.tbl (in the MAIN HALL section). If you add more, FS2 will (most likely) crash.
I've put together a demo. Just extract that archive in your FS2 folder, select the test directory as your mod and start the patched build (which you have to compile yourself, sorry).
Here is the patch.What do you think?