SecretCisco Posted March 21, 2022 Share Posted March 21, 2022 (edited) I did some poking around because I wanted to find out how the Fast Travel menu worked and I wanted to share what I learned and my notes. More information about popmenus can be found on this topic and on the wiki. LockedOptions Clickable options with power icons and checking if a power is available. Always greyed out text & always available option. Unicode symbols, spaces, and style. Editing tools. Notepad++ code highlighting. Checking and fixing brackets. Miscellaneous technical notes. LockedOption If you want to create your own clickable powers with like the ones is the Fast Travel menu, it's actually quite simple. Any locked option can have an icon specified, and "PowerReady" can be used to set a certain power's readiness be used as condition of enabling that option. You can get the information for both these things on the excellent City of Data 2.0. NOTE: The correct identifier for a power is how its name appears in the page's URL Icon identifier: You can also find a list of icons on the wiki. Code examples: Spoiler General: LockedOption { DisplayName "OptionName" Command "CommandString" Icon "IconName"// Get this from the macro_image wiki page or from the icon's URL on City of Data 2.0 (right-click open) PowerReady "PowerIdentifiers"// Get this from the power's URL on City of Data 2.0 } Specific Example: LockedOption { DisplayName "Power Analyzer" Command "powexecname Power Analyzer" Icon "Temporary_PowerAnalyzer" PowerReady "temporary_powers.temporary_powers.power_analyzer" } If LockedOption is given an impossible to fulfill condition like Badge "x" the title of that power is always show as disabled grey text, useful for notes. If on the other hand you don't give the locked option any condition, then the power will always be unlocked but unlike a regular option can have a power icon. Additionally, LockedOption can have multiple conditions, both multiple identifiers of the same type on the same line and both a Badge and PowerReady line. In both cases the option will be enabled if any of its conditions are met. Unicode symbols, spaces, and style There are other things you can do to add to the style and readability of popmenus besides power icons. You can use a not-insignificant selection of special unicode symbols in your popmenus (and macros). You can simply paste any compatible characters into your menu file and they'll display in game. Since font support in game for these extended characters is sporadic and of varying legibility I created a popmenu to display (nearly) every unicode character that the unmodified game can support so you can easily see them in-game. As well as a highlight of some of my favorites. Unicode Systematic.mnu /popmenu UnicodeSystematic All the options are clickable and insert the character into the chat. Another thing worthy of note you may not have noticed/considered is that all spaces in names within popmenus print. You can use this fact to align items in a list that wouldn't otherwise (like icon options and regular options), to left/right align titles, to center align options, and to just create invisible options if you're so inclined. Editing Tools City of Heroes menu files are quite simple so you don't need a full IDE to work with them, but if you haven't already I'd recommend getting something a little more versatile than Microsoft Notepad for your editing. I use Notepad++ for my menu editing so my recommendations are based on that. Code highlighting. I made a NP++ User-Defined Language (UDL) for my own use, it's easy to change and easy to make your own. CoH mnu UDL for Notepad++.xml You can define your own or import mine under Language > User Defined Language > Define your language... Finding bracket errors. If your curly brackets are messed up you can create a screwed up or even game-crashing popmenu. One of the things I used to find and help resolve any bracket errors I might have is the NP++ plugin "BracketsCheck" which you can easily install with the Plugin Admin under the "Plugins" menu at the top. It will locate any unpaired brackets you have, and Ctrl+b will jump you between paired brackets. Any misplaced (duplicated or on a line with anything else but a comment) brackets can be found with a search (ctrl+f) in regular expression mode using this regex ^\h*[{}](?=\h*(\/\/|$))(*SKIP)(*FAIL)|[{}] Demo/Explanation If you make or made a purpose built parser/linter/etc for City of Heroes menus then please share. Miscellaneous technical notes 1. Two (or more presumably) menus can load from a single menu file, just define another menu outside of the paired brackets of your first menu. The second menu doesn't need a blank line or comment between it and the first menu but I think it looks neater. Might be a bad idea, etiquette-wise, if the menus aren't directly related to each other. 2. Regular submenus can't be directly called by commands, only top level menus. 3. Bug, if you call a command to open a second popmenu from inside a submenu it will freeze your character in place until you restart the game, so just put any commands to open another menu in the main portion of your first menu. 4. Fullwidth dollar signs (U+FF04) look better than regular dollar signs. Edited March 21, 2022 by SecretCisco links to other info 2 4 Link to comment Share on other sites More sharing options...
BlackSpectre Posted January 1, 2023 Share Posted January 1, 2023 (edited) @SecretCiscoI just have to comment, this is one of the most useful posts on pop menus that I’ve ever read. The research into Unicode symbols and characters by itself is genius and incredibly useful! Percent % symbols don’t show up in OptionName or DisplayName, but full width percent symbols do! I would never have known about this workaround without your work above… and that’s above and beyond all the cool symbols we can use! Quote 2. Regular submenus can't be directly called by commands, only top level menus. We can call submenus with the /contextmenu command. 🙂 I am so grateful you put in the time and effort to do this. Thank you! Edited January 1, 2023 by BlackSpectre added bit about /contextmenu Black Spectre - A Dark Defender's Home on the Web • The Advanced Bind Guide • The Masters of BAF: A Guide for Leaders and Players • The Wiki List of Slash Commands Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now