Jump to content

SecretCisco

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by SecretCisco

  1. 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: 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.
  2. Ah, I didn't see that in my search! I reported it as a support ticket (before I saw that I should post it on the bugs forum) and a GM responded that they could reproduce it. It's not a big deal I'll just move that bit in my project, but it definitely shouldn't do that! I find it fascinating how you can still move and use the keyboard/mouse, you just can't use the keyboard/mouse to move.
  3. If you open a second popmenu with a command inside a submenu of another popmenu your character will freeze in place. Everything else seems to work except that you can't move until you restart. I tested it and if the command to open a second menu is in the main part of the popmenu then you'll be fine, it only keeps your from moving if called from inside a submenu. You can still move by slash commands and following somebody, but not by mouse or keyboard. Other characters on the same session are effected as well. Example/Demo: //Required Line Menu "SubmenuFreeze" { Option "This doesn't freeze you" "popmenu SubmenuFreeze2" Menu "SubMenu" { Option "This does freeze you" "popmenu SubmenuFreeze2" } } //Part two, it makes no difference if this is a separate file or not. Menu "SubmenuFreeze2" { Title "The character may be frozen now" }
  4. Funny thing, I actually just came here to say I found it on City of data 2! Unfortunately, in my test just now, Shivan Shard and Envenomed Dagger were both still greyed out in the popmenu despite being ready to go. So far the only "new" power I've been able to get checked properly is brawl "Inherent.Inherent.Brawl" But I feel like this is a step in the right direction and a useful resource to have besides! I'll keep experimenting tomorrow and hopefully figure how to make it work or at least find evidence it can't be done due to a current code-limitation or bug. For now though, bed. Actually nevermind, I noticed something and did another test and now it works! Both powers are enabled now and the daggers worked perfectly! Shivan Shard didn't but that's my bad for messing up the command. The trick is that the URL of the power on City of Data has the right name, so it's not "temporary_powers.temporary_powers.shivan_shard" like in the search or page but "temporary_powers.temporary_powers.v_shivan_shard" with extra little "v_"! Tell your friend, beautiful and functional custom popmenus for all! Note: P2W Envenomed Daggers are "temporary_powers.temporary_powers.invention_envenomed_dagger" and not "temporary_powers.temporary_powers.alt_lp_envenomed_dagger" I'm gonna update the unofficial wiki too and then go to bed for real! (Woooooo finally got it working!!!)
  5. I want to use the method of the Fast Travel popmenu to create a menu for deploying powers like Shivan Shard, and the warburg payloads but I need help finding the specific names the game uses internally for those powers. I searched the Powers "API" to no avail and reading through the binaries myself is way outside my area of expertise. So if anybody can find it or maybe point me in the right direction I'd greatly appreciate the assistance! Example: That last name after "PowerReady" LockedOption { DisplayName "&Long Range Teleporter" Command "powexecname Long Range Teleporter" Icon "Accolade_LongRangeTeleport" PowerReady "Temporary_Powers.Accolades.Long_Range_Teleport" }
×
×
  • Create New...