Command of the Week - Menu Editing (Week 34)

Index

  1. List (Basic)
  2. Symbols Along (Intermediate)
  3. Fractalise (Intermediate)
  4. Edit Text (Basic)
  5. Link with Map/File (Intermediate)
  6. Offset (Intermediate)
  7. Measuring Tools (Basic)
  8. Change like draw tool (Basic)
  9. Modifiers (Intermediate)
  10. File Paths (Intermediate)
  11. Complex Shapes [Combine Path] (Intermediate)
  12. Complex Shapes [Multipoly] (Intermediate)
  13. Break (Intermediate)
  14. Map Notes (Basic)
  15. Coordinates (Intermediate)
  16. Macros (Advanced)
  17. Search Files for Text (Basic)
  18. Text Justification (Basic)
  19. Mirrored Polygons (Intermediate)
  20. Managing Drawing Tools (Intermediate)
  21. Named Views (Basic)
  22. Symbol Lookup Sheets (Intermediate)
  23. Symbol Catalog Settings (Advanced)
  24. Symbol Catalog Filters (Advanced)
  25. Symbol Control Points (Advanced)
  26. Define Symbol (Intermediate)
  27. Curves (Basic)
  28. Selections (Intermediate)
  29. Sort Symbols in Map (Basic)
  30. Extract Properties (Basic)
  31. Convert File (Basic)
  32. Get Extents (Advanced)
  33. Quick Move (Basic)
  34. Menu Editing (Advanced)
  35. Trace (Basic)
  36. Array Copy (Intermediate)
  37. Explode (Basic)
  38. Clipboard Copy (Basic)
  39. Rename & Reorder (Intermediate)
  40. Drawtools Edit (Basic)
  41. Trims (Basic)
  42. Symbol Attributes (Intermediate)
  43. Fill Style Selection Mask (Basic)
  44. Browse Files (Basic)
  45. Node Editing (Intermediate)
  46. Automatic Sheet Selection (Basic)
  47. Scale (Basic)
  48. Text along a Curve (Basic)
  49. Shaded Polygons (Intermediate)
  50. Fill with Symbols (Intermediate)
  51. Global Sun (Basic)
  52. Symbols in Area (Intermediate)
CC3+ contains a huge amount of various commands and features. This series highlights a number of these. There won't be any special progression to this series, and the command will be selected from the entire range, from the simple basic commands, to more advanced features intended for the more advanced users. Feel free to use this topic to discuss the command presented.
This series is called the command of the week, but it could also explain a feature. The explanations will tend to explain the technical parts of the command, and is intended to highlight the basics (and complexities) of the command, and information about how to use it, but won't be a detailed tutorial. It is up to you to use it creatively in your maps.

Week 34 - Menu Editing

CC3+ is a very flexible program, and one of the ways you can customize it to your own needs is by editing the menu files, where the menus and toolbars are defined. This allows you to set up the workspace exactly as you want it to be.

Note that this topic provides an overview of the topic of menu editing, but for more in-depth technical detail, refer to the help files or the Tome of Ultimate Mapping.

Warning: Always make backups of the menu files before editing them. As with any configuration file intended to be read by a computer, it is very vulnerable to errors, so make sure to follow the correct syntax exactly. Improper editing may cause CC3+ to crash at startup. If this happens, and you don't know how to fix it, you should restore the edited files from backup and just begin anew.

Menu Files

In the CC3+ data directory, you'll find one or more files with a .mnu file extension. These are the menu files used by CC3+. Everyone will always have a fcw32.mnu file, which is the default menu file in CC3+. Most addons will also add their own menu file here, so you may have city.mnu (from CD3), dungeon.mnu (from DD3) and so on.
Each of these files represents a complete set with menus and toolbars, and CC3+ switches between these whenever you switch add-on (for example by clicking the add-on buttons). The most important thing to remember here is that each file contains the complete set of menus and toolbars, so if you wish to make a change that should be available no matter what add-on, you need to do the changes in all files. There is one exception to this, menu/toolbar elements that are placed in the fcw32.imn file will be available no matter what menu set is loaded, but if you place anything in this file, you must make sure it doesn't crash with content from any other menu file you might load.
While most of the add-ons have such a menu file of their own, you are not restricted to these. If you wish, you can create your very own menu file and load that, for example to create a hybrid menu with easy access to both modern and medieval symbols for mixed maps. To do this, I recommend starting with a copy of one of the existing menu files, and edit that.
To load a new menu file, use the MENUD command (or the macro version, MENUDM). You could for example include an instruction in the OnOpenMacro of your map to load a spesific custom menu set each time the map is opened (This is what CC3+ maps do to make sure the correct add-on menu is loaded)

Note that menu files are plain text files, and should be opened with a plain text editor, such as notepad.

The Toolbars

Note that CC3+ has 8 toolbars available. CC3+ uses 6 of these by default, but you can use the other two if you wish. To show these toolbars, you need to enable 'Custom Icon bar 2' and 'Custom Icon bar 3' by clicking the screen tools button at the bottom of the CC3+ interface. Note that unless you edit the menu files and add contents to them, they will be blank.

Menu File Contents

Menu files contains two types of content, toolbars and menu elements. You can easily distinguish these by their appearance.
Toolbar items all start with a hash mark and a number, like this:
#300,CC2LAND:[Default Landmass]{|DRAWTOOLSM;LAND*;}|DRAWTOOLSM;Land, Default*;
The number is simply identifies which toolbar this is (the first digit) and then the position on the toolbar for this particular button. Positions goes from 00 to 98, with 99 being reserved for the name of the toolbar itself. By default, CC3+ only uses toolbars 0 (leading zeroes are not shown in the file, so entries for this particular toolbar is thus 1 and 2 digit numbers), 1, 2, 3, 4 and 6, leaving 5 and 7 available.
Note that the order of the toolbar lines doesn't matter, just make sure you don't assign two buttons to the same toolbar/position.

The rest of the lines are the menus. These lines do need to be in the correct order, as menus are built based on their order. The lines doesn't get assigned to a specific menu by an identifier, like the toolbars, but rather they appear on the menu for which header they appear under.

Editing Toolbars

Let us break down our example toolbar line:
#300,CC2LAND:[Default Landmass]{|DRAWTOOLSM;LAND*;}|DRAWTOOLSM;Land, Default*;
  • # - All toolbar lines start with the hash sign
  • 3 - The first digit indicates which toolbar the button will appear on. If the first digit is missing, it refers to toolbar 0
  • 00 - The next two digits indicates the position on the toolbar. 00 is the leftmost position. Normally, these are sequential, but you can skip a number to make a gap in the buttons
  • , - A separator. Required
  • CC2LAND - The internal mane of the icon to use on the button. This can also be the filename of a bitmap file instead.
  • : - Another separator. Required
  • [Default Landmass] - The tool tip shown when hovering the mouse cursor over the button
  • {|DRAWTOOLSM;LAND*;} - That part in curly brackets are the right click command for this button. If this is left out, the button won't do anything when right clicked. The part inside the bracket is the same as for the left click action, described below
  • | - This cancels the current command in progress (if any). This is important, as otherwise undesired results may occur. If it is a transparent command (one that can safely be executed in the middle of another command without disrupting it, like redraw), you can use ~ instead.
  • DRAWTOOLSM;Land, Default*; - This is the actual command executed by the button. Note that the ;'s inside the command are where you would have pressed enter if you had typed this on the command line manually. Depending on the expected inout for the command, spaces can also be considered an end command/next parameter statement, so beware extra spaces in the command.

Right click pop-up menus

Some buttons provide you with a nice little pop-up menu when you (right) click them. They generally look like this:
#211,CC2SCALE:[Scale]{|CMENU @SYSTEM\SCALE.mnc;}|SCA;
The command CMENU is what loads the popup menu, which in this case is found in the @SYSTEM\SCALE.mnc file. These pop-up menus follow the same rules as ordinary menu files, except that they don't contain toolbars, and only contain a single menu (while the ordinary files contain all of them. They are usually stored with the .mnc extension.

Editing menus

The menu entires are much simpler than toolbar entries, but when editing the menu section, there are four kinds of entries you need to look out for:
  • Menu headers: These signifies the start of a new menu (like File, Edit, View, Draw, Tools, etc...). They consists of a line containing a name (the title of the menu) and a colon. They also usually contain a &-sign in there, often at the front. The &-sign is used to indicate the accelerator key for keyboard access to the menu, and can be used on all menu elements, not only menu headers.
    &File:
  • Submenus: Most menus contain one or more submenus. A submenu is defined by a text label followed by >: Note that all menu elements that should be in the submenu are then indented by one space in the .mnu file.
    Entity Order>:
  • Separators: These create separator lines in the menus to visually group/separate parts of the menu.
    --------:
  • Menu Entries: A menu entry consists of the text that appers on the menu, followed by a colon, and then either a | (for a regular command) or a ~ (for a transparent command, as explained in the toolbars section above) and then finally the command to execute. It is also possible to define a shortcut key for a menu element by hitting tab after the name, then typing ^X (where X is any letter), this will define the keyboard shortcut Ctrl+X to execute this menu element.
    &Save	^S:~|SAVE;
    Dungeon Designer:~|LOADDD3;MENUDM @dungeon.mnu;
    &List:|LIST;

General Advice

The best way to find examples of what you can put in a menu file is by looking at the existing menu files. You can find the commands you need either by looking in menu files, looking at the alphabetical command list in the help files, or the CC3+ command reference in the Tome of Ultimate Mapping. For toolbar button icons, there isn't a list, but you can find the identifiers for the existing buttons by looking in the menu file for the addon that has the button image you want to use.

Comments

  • 8 months later
  • I don't seem to be able to get sub-menus to work. I created four sub-menu headings, each with the format of:

    Category>:

    and split up the menu items beneath them, each with a space in front. When I load cc3+ the headings show up with the > after them and the menu items show up beneath them with a space in front. All the menu items work but not as sub-menus.

    What am I doing wrong?
  • You will likely have to paste in here the text you put into the files.
  • edited April 2018
    Here is the file I am working with (cc3plus_vintyri.mnc). It is called from fcw32.mnu #718 if you have the vintyri collection installed

    EDIT: I don't know if the forum software stripped away the leading spaces from menu items when I pasted, or if they are just difficult to see because of the font, but there are definitely leading spaces in the actual file.

    Vintyri Cartographic Collection:
    ----------:
    Brown Beaver Tail>:
    Base Buildings Brown Beaver Tail:|CATALOG @Symbols\Medieval Symbols\Base Buildings Brown Beaver Tail.FSC;
    General Buildings Brown Beaver Tail:|CATALOG @Symbols\Medieval Symbols\General Buildings Brown Beaver Tail.FSC;
    Artisan Buildings Brown Beaver Tail:|CATALOG @Symbols\Medieval Symbols\Artisan Buildings Brown Beaver Tail.FSC;
    Culinary Buildings:|CATALOG @Symbols\Medieval Symbols\Culinary Buildings Brown Beaver Tail.FSC;
    Farm Buildings Brown Beaver Tail:|CATALOG @Symbols\Medieval Symbols\Farm Buildings Brown Beaver Tail.FSC;
    Temples Brown Beaver Tail:|CATALOG @Symbols\Medieval Symbols\Temples Brown Beaver Tail.FSC;
    Institutional Buildings Brown Beaver Tail:|CATALOG @Symbols\Medieval Symbols\Institutional Buildings Brown Beaver Tail.FSC;
    Compounds Brown Beaver Tail:|CATALOG @Symbols\Medieval Symbols\Compounds Brown Beaver Tail.FSC;
    Towers Brown Beaver Tail:|CATALOG @Symbols\Medieval Symbols\Towers Brown Beaver Tail.FSC;
    Walls Brown Beaver Tail:|CATALOG @Symbols\Medieval Symbols\Walls Brown Beaver Tail.FSC;
    Structural Parts Brown Beaver Tail:|CATALOG @Symbols\Medieval Symbols\Structural Parts Brown Beaver Tail.FSC;
    Light Beaver Tail>:
    Base Buildings Light Beaver Tail:|CATALOG @Symbols\Medieval Symbols\Base Buildings Light Beaver Tail.FSC;
    General Buildings Light Beaver Tail:|CATALOG @Symbols\Medieval Symbols\General Buildings Light Beaver Tail.FSC;
    Artisan Buildings Light Beaver Tail:|CATALOG @Symbols\Medieval Symbols\Artisan Buildings Light Beaver Tail.FSC;
    Culinary Buildings Light Beaver Tail:|CATALOG @Symbols\Medieval Symbols\Culinary Buildings Light Beaver Tail.FSC;
    Farm Buildings Light Beaver Tail:|CATALOG @Symbols\Medieval Symbols\Farm Buildings Light Beaver Tail.FSC;
    Temples Light Beaver Tail:|CATALOG @Symbols\Medieval Symbols\Temples Light Beaver Tail.FSC;
    Institutional Buildings:|CATALOG @Symbols\Medieval Symbols\Institutional Buildings Light Beaver Tail.FSC;
    Compounds Light Beaver Tail:|CATALOG @Symbols\Medieval Symbols\Compounds Light Beaver Tail.FSC;
    Towers Light Beaver Tail:|CATALOG @Symbols\Medieval Symbols\Towers Light Beaver Tail.FSC;
    Walls Light Beaver Tail:|CATALOG @Symbols\Medieval Symbols\Walls Light Beaver Tail.FSC;
    Structural Parts Light Beaver Tail:|CATALOG @Symbols\Medieval Symbols\Structural Parts Light Beaver Tail.FSC;
    Slate>:
    Base Buildings Slate Tile:|CATALOG @Symbols\Medieval Symbols\Base Buildings Slate Tile.FSC;
    General Buildings Slate Tile:|CATALOG @Symbols\Medieval Symbols\General Buildings Slate Tile.FSC;
    Artisan Building Slate Tiles:|CATALOG @Symbols\Medieval Symbols\Artisan Buildings Slate Tile.FSC;
    Culinary Buildings Slate Tile:|CATALOG @Symbols\Medieval Symbols\Culinary Buildings Slate Tile.FSC;
    Farm Buildings Slate Tile:|CATALOG @Symbols\Medieval Symbols\Farm Buildings Slate Tile.FSC;
    Temples Slate Tile:|CATALOG @Symbols\Medieval Symbols\Temples Slate Tile.FSC;
    Institutional Buildings Slate Tile:|CATALOG @Symbols\Medieval Symbols\Institutional Buildings Slate Tile.FSC;
    Compounds Slate Tile:|CATALOG @Symbols\Medieval Symbols\Compounds Slate Tile.FSC;
    Towers Slate Tile:|CATALOG @Symbols\Medieval Symbols\Towers Slate Tile.FSC;
    Walls Slate Tile:|CATALOG @Symbols\Medieval Symbols\Walls Slate Tile.FSC;
    Structural Parts Slate Tile:|CATALOG @Symbols\Medieval Symbols\Structural Parts Slate Tile.FSC;
    Wooden Shingle>:
    Base Buildings Wooden Shingle:|CATALOG @Symbols\Medieval Symbols\Base Buildings Wooden Shingle.FSC;
    General Buildings Wooden Shingle:|CATALOG @Symbols\Medieval Symbols\General Buildings Wooden Shingle.FSC;
    Artisan Buildings Wooden Shingle:|CATALOG @Symbols\Medieval Symbols\Artisan Buildings Wooden Shingle.FSC;
    Culinary Buildings Wooden Shingle:|CATALOG @Symbols\Medieval Symbols\Culinary Buildings Wooden Shingle.FSC;
    Farm Buildings Wooden Shingle:|CATALOG @Symbols\Medieval Symbols\Farm Buildings Wooden Shingle.FSC;
    Towers Wooden Shingle:|CATALOG @Symbols\Medieval Symbols\Towers Wooden Shingle.FSC;
    Structural Parts Wooden Shingle:|CATALOG @Symbols\Medieval Symbols\Structural Parts Wood Shingle.FSC;
    Other>:
    Corroded Copper Roofing:|CATALOG @Symbols\Medieval Symbols\Structural Parts Corroded Copper.FSC;
    Structural Parts:|CATALOG @Symbols\Medieval Symbols\Structural Parts General.FSC;
    Miscellaneous Parts:|CATALOG @Symbols\Medieval Symbols\Miscellaneous Objects.FSC;
  • MonsenMonsen Administrator 🖼️ 46 images Cartographer
    Submenus only works in the main menu files, you can't use them for .mnc files unfortunately. Sorry for not making that clear in the post.
  • 3 years later
  • Somehow I can't even get very basic things to work. I tried editing the mouse over text of buttons to add their respective hotkey to the text. So I searched for the FCW32.MNU file, searched for [endpoint] and changed it to [endpoint F5] but the tool tip still reads "endpoint"

    What am I doing wrong here?

  • 8 months later
  • MonsenMonsen Administrator 🖼️ 46 images Cartographer

    Hi @Fersus, your question here somehow eluded me when you posted it. Did you figure it out? If not, my main guess would be that you edited the standard menu file (fcw32.mnu), but the menu file currently open in CC3+ was probably another one, like the dungeon or city menu.

  • Hi @Monsen.

    Thanks for bringing this topic to my attention again. I too did forget about it.

    I did try to edit the fcw32.mnu file as I wanted to add the hotkeys to the buttons and those are stored in the main mnu file.

    Thanks to your hint (and a different problem I had in the meantime) I figured out, that CC3+ is in two folders: the install folder and the program folder on C:

    I now searched for all the fcw32.mnu files and discovered that both folders do have such a file. editing the one on C:.... did the trick, so I guess the last time I simple edited the wrong one...

    The hotkey information now shows up :)

Sign In or Register to comment.