Badge time.png   The Paragon Wiki Archive documents the state of City of Heroes/Villains as it existed on December 1, 2012.

Difference between revisions of "Popmenu (Slash Command)"

From Paragon Wiki Archive
Jump to: navigation, search
m (Undo revision 136540 by Aggelakis external links header instead, re-add FW's guide)
m (External Links: update link)
 
(12 intermediate revisions by 5 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{TOCright}}
 
== SlashCommand ==
 
== SlashCommand ==
 
{{SlashCommandArticle|command=popmenu|options=menuname|note=This command opens a custom pop-up menu by ''menuname'' at the current cursor's location.}}
 
{{SlashCommandArticle|command=popmenu|options=menuname|note=This command opens a custom pop-up menu by ''menuname'' at the current cursor's location.}}
  
=== Directory ===
+
== Creating the Popmenu ==
  
 
Custom pop-up menu files are read from the following directory:
 
Custom pop-up menu files are read from the following directory:
Line 17: Line 17:
 
* ''uk''
 
* ''uk''
  
City of Heroes looks in this directory for files with the .mnu file extension. If none are found, it uses the internal default <tt>[http://blanketyblankman.googlepages.com/original.quickchat.mnu quickchat]</tt> menu.  If there is a customized quickchat.mnu file found, that will be used in place of the internal default when you click the "Quick Chat" button.  You can place multiple files with the extension <tt>.mnu</tt> in this directory and they will be available for use with the '''popmenu''' command.
+
City of Heroes looks in this directory for files with the .mnu file extension. If none are found, it uses the internal default <tt>[http://sites.google.com/site/blanketyblankman/r0/original.quickchat.mnu?attredirects=0&d=1 quickchat]</tt> menu.  If there is a customized quickchat.mnu file found, that will be used in place of the internal default when you click the "Quick Chat" button.  You can place multiple files with the extension <tt>.mnu</tt> in this directory and they will be available for use with the '''popmenu''' command.
  
==== Syntax ====
+
=== Syntax ===
 
MNU files can be edited in any text editor. Menus have the following general structure:
 
MNU files can be edited in any text editor. Menus have the following general structure:
  
Line 31: Line 31:
 
     Menu ''SubMenuName''
 
     Menu ''SubMenuName''
 
     {
 
     {
         {{color|gray|Title ''SubMenuTitleName''}}
+
         {{color|gray|Title ''TitleName''}}
 
         Option ''OptionName'' ''Command''
 
         Option ''OptionName'' ''Command''
 
         {{color|gray|Divider}}
 
         {{color|gray|Divider}}
         Option ''OptionName'' ''Command''
+
         LockedOption
 +
        {
 +
            DisplayName ''OptionName''
 +
            Command ''Command''
 +
            Authbit ''AuthIdentifiers''
 +
            Badge ''BadgeIdentifiers''
 +
            RewardToken ''RewardIdentifiers''
 +
            StoreProduct ''ProductIdentifiers''
 +
        }
 
     }
 
     }
 
  }
 
  }
Line 45: Line 53:
 
** To create an option name of more than one word with spaces between them, enclose it in quotes.
 
** To create an option name of more than one word with spaces between them, enclose it in quotes.
 
** '''''<tt>Command</tt>''''' is one or more [[slash commands]] (separated by '''<tt>$$</tt>''').
 
** '''''<tt>Command</tt>''''' is one or more [[slash commands]] (separated by '''<tt>$$</tt>''').
 +
* '''<tt>LockedOption</tt>''' is an Option, which may be grayed out (disabled) for certain characters or accounts.
 +
** Only one of '''<tt>Authbit</tt>''', '''<tt>Badge</tt>''', '''<tt>RewardToken</tt>''', or '''<tt>StoreProduct</tt>''' is required, though you may use multiple. These are what defines the circumstances under which the LockedOption is enabled or disabled.
 +
** Multiple identifiers may be specified for a single type, for example: ''<tt>Badge CouncilRobotBadge StMartialTour1</tt>''. This produces a logical '''OR'''; the previous example unlocks the Option if the character has either [[Burkholder's Bane]] or [[Deuces Wild]].
 +
*** [http://sites.google.com/site/blanketyblankman/r0/lockedoption-badge-names-visible.txt List of badge names] (10/22/2010)
 +
*** [http://sites.google.com/site/blanketyblankman/r0/lockedoption-badge-names-hidden.txt List of hidden badge names] (9/9/2010)
 +
*** [[/List of Authbit Identifiers|List of Authbit Identifiers]]
 +
*** [[/List of RewardToken Identifiers|List of RewardToken Identifiers]]
 +
*** [[/List of StoreProduct Identifiers|List of StoreProduct Identifiers]]
 
* '''<tt>Title</tt>''' is an optional element.
 
* '''<tt>Title</tt>''' is an optional element.
 
** '''''<tt>TitleName</tt>''''' labels a menu, or a section of a menu. Titles are not selectable.
 
** '''''<tt>TitleName</tt>''''' labels a menu, or a section of a menu. Titles are not selectable.
Line 50: Line 66:
 
* '''<tt>Divider</tt>''' places a horizontal line in the menu.
 
* '''<tt>Divider</tt>''' places a horizontal line in the menu.
  
==== Notes ====
+
=== Notes ===
 
* The '''popmenu''' command is called using the top-level "Menu" name inside the Menu (.mnu) file and NOT the name of the Menu (.mnu) file itself.  The filename does not matter and does not even have to match the "Menu" name as long as it has the .mnu file extension.
 
* The '''popmenu''' command is called using the top-level "Menu" name inside the Menu (.mnu) file and NOT the name of the Menu (.mnu) file itself.  The filename does not matter and does not even have to match the "Menu" name as long as it has the .mnu file extension.
 
* MNU files allow comments. Use a double forward slash (<tt>//</tt>) anywhere on a line to force the client to ignore anything between the double slash and the line return.
 
* MNU files allow comments. Use a double forward slash (<tt>//</tt>) anywhere on a line to force the client to ignore anything between the double slash and the line return.
Line 58: Line 74:
 
* '''<tt>Option</tt>''' and its parameters must be on one line. Otherwise, the menu will not function.
 
* '''<tt>Option</tt>''' and its parameters must be on one line. Otherwise, the menu will not function.
 
** Inspiration and power names with spaces can be used in commands by replacing the spaces with an underscore (for example, Catch_a_Breath).  You can also enclose the entire ''<tt>Command</tt>'' portion in quotation marks.
 
** Inspiration and power names with spaces can be used in commands by replacing the spaces with an underscore (for example, Catch_a_Breath).  You can also enclose the entire ''<tt>Command</tt>'' portion in quotation marks.
** Multiple '''<tt>Command</tt>'''s can be executed by one '''<tt>Option</tt>''' by joining them with <tt>$$</tt>, just as they would be on the client command line.
+
** Multiple '''<tt>Commands</tt>''' can be executed by one '''<tt>Option</tt>''' by joining them with <tt>$$</tt>, just as they would be on the client command line.
 +
*<tt>Bind_load</tt> and <tt>Bind</tt> used as commands do not currently work as expected. Binds made via popmenu will take effect after the client is restarted.
 +
 
 +
==See Also==
 +
*{{slashcommand|quickchat}}
  
 
==External Links==
 
==External Links==
* [http://boards.cityofheroes.com/showflat.php?Number=13056291#Post13056291 Customizing the QuickChat Menu] by Fleeting_Whisper
+
* [http://web.archive.org/web/20120905021547/http://boards.cityofheroes.com/showthread.php?t=127186 Customizing the QuickChat Menu] by [[User:Fleeting Whisper|Fleeting Whisper]]
* [http://boards.cityofheroes.com/showflat.php?Number=13617130#Post13617130 ] by TheUnnamedOne
+
* [http://web.archive.org/web/20120905181021/http://boards.cityofheroes.com/showthread.php?t=136343 The magic of the POPMENU command] by [[User:TheUnnamedOne|TheUnnamedOne]]

Latest revision as of 19:44, 3 November 2013

SlashCommand

/popmenu menuname

This command opens a custom pop-up menu by menuname at the current cursor's location.

Creating the Popmenu

Custom pop-up menu files are read from the following directory:

<COH_INSTALL_DIRECTORY>\data\texts\<LANGUAGE>\Menus\

<LANGUAGE> may be one of the following and needs to match the language of the version of City of Heroes that is installed:

  • ChineseTraditional
  • English
  • French
  • German
  • Japanese
  • Korean
  • uk

City of Heroes looks in this directory for files with the .mnu file extension. If none are found, it uses the internal default quickchat menu. If there is a customized quickchat.mnu file found, that will be used in place of the internal default when you click the "Quick Chat" button. You can place multiple files with the extension .mnu in this directory and they will be available for use with the popmenu command.

Syntax

MNU files can be edited in any text editor. Menus have the following general structure:

Menu MenuName
{
    Title TitleName
    Option OptionName Command
    Divider
    Title TitleName
    Option OptionName Command
    Menu SubMenuName
    {
        Title TitleName
        Option OptionName Command
        Divider
        LockedOption
        {
            DisplayName OptionName
            Command Command
            Authbit AuthIdentifiers
            Badge BadgeIdentifiers
            RewardToken RewardIdentifiers
            StoreProduct ProductIdentifiers
        }
    }
}
  • Menu defines a group of Options. Menus can be nested, but each sub-menu requires its own pair of curly braces.
    • MenuName is the name of the menu opened by the /popmenu menu name slash command.
    • To create a menu name of more than one word with spaces between them, enclose it in quotes.
  • Option is a selectable command within a menu.
    • One letter in OptionName can be designated as a hotkey by prefixing an ampersand (&).
    • To create an option name of more than one word with spaces between them, enclose it in quotes.
    • Command is one or more slash commands (separated by $$).
  • LockedOption is an Option, which may be grayed out (disabled) for certain characters or accounts.
  • Title is an optional element.
    • TitleName labels a menu, or a section of a menu. Titles are not selectable.
    • Menus can have more than one Title.
  • Divider places a horizontal line in the menu.

Notes

  • The popmenu command is called using the top-level "Menu" name inside the Menu (.mnu) file and NOT the name of the Menu (.mnu) file itself. The filename does not matter and does not even have to match the "Menu" name as long as it has the .mnu file extension.
  • MNU files allow comments. Use a double forward slash (//) anywhere on a line to force the client to ignore anything between the double slash and the line return.
  • IMPORTANT: MNU files must have at least one line containing a carriage-return at the end of the line above the first "Menu" entry. It can be blank, a full comment, or just the comment tag (//) or any number of those lines otherwise it will not function.
  • Changes to custom menus require you to exit the client in order for the changes to take effect.
  • Custom menus are accessible by all characters on the same machine. By extension, you can send custom menu files to other people so that they can use them as well.
  • Option and its parameters must be on one line. Otherwise, the menu will not function.
    • Inspiration and power names with spaces can be used in commands by replacing the spaces with an underscore (for example, Catch_a_Breath). You can also enclose the entire Command portion in quotation marks.
    • Multiple Commands can be executed by one Option by joining them with $$, just as they would be on the client command line.
  • Bind_load and Bind used as commands do not currently work as expected. Binds made via popmenu will take effect after the client is restarted.

See Also

External Links