Slash Commands: Difference between revisions

From Unofficial Homecoming Wiki
Jump to navigation Jump to search
imported>TonyV
mNo edit summary
No edit summary
 
(105 intermediate revisions by 20 users not shown)
Line 1: Line 1:
{{wip}}
{{TOCright}}
== Overview ==
== Overview ==


In City of Heroes and City of Villains, there are a number of commands that can be typed on the chat command line to execute various functions.  These are known as '''slash commands''', because they begin with a slash (/).  The following list is a list of known slash commands, along with their command line format.
In City of Heroes and City of Villains, there are a number of commands that can be typed on the chat command line to execute various functions.  These are known as '''slash commands''', because they begin with a slash (/).  Slash commands often have underscores within the name to improve legibility, but they are not needed to actually take effect, i.e. /PowExec_Name, /Pow_Exec_Name, /P_o_w_E_x_e_c_n_a_m_e all perform the same way. Almost every action taken in the game is a slash command bound to a key. The number 1 on the keyboard activates the slash command "pow_exec_slot 1", which executes the power in slot 1 of your power tray. Some slash commands, such as the movement commands, should not be called from the chatbox without taking care and knowing what will occur. See [[List of Slash Commands]] for a list of known slash commands; see also [[:Category:Slash Commands]].
__TOC__
== Supergroup Commands ==


'''chan_Invite_sg''' ''channel_name'' ''rank'': Invite your entire supergroup to a global chat channelOnly leaders may use this command.  You must specify the minimum rank to invite:<br>
== Concatenating Commands ==
:'''0''': Invite the entire supergroup (members, captains, and leaders).
Multiple commands may be strung together for simultaneous execution using the '$$' operatorFor example, the following command will cause a character to say "Ready!" and perform the "thumbsup" emote at the same time.
:'''1''': Invite captains and leaders only.
:'''2''': Invite leaders only.


'''ci''' ''player'': Invite player's supergroup to join coalition.  (Also: ''coalition_Invite'')
:{{slashcommand|local|Ready!}}$${{bindcommand|emote|thumbsup}}


'''coalition_Cancel''' ''supergroup'': Cancel coalition with a supergroup.
Note that when concatenating two or more commands, the slash is used on only the first command.


'''coalition_Invite''' ''player'': Invite players supergroup to join coalition. (Also: ''ci'')
== Parsing Concatenated Commands ==
When multiple commands are strung together in a string (i.e., concatenated), the game executes each slash command in sequence from left to right. However, what command actually activates and when depends on the kind of action that is being executed. Powers appear to activate from ''right to left'' because commands with activation or cast times interrupt each other as the game attempts to execute them. Most other actions (such as chat messages, "Forward", "Petcom Attack", "Follow", turning powers off, etc.) activate normally (from left to right) because they essentially take no time to execute. Animation times can also cause a command to be interrupted, preventing its activation. For example, when the game attempts to execute the command string <code>\powexec_name fly$$powexec_name invincibility$$powexec_name unyielding</code>, the game first attempts to execute Fly, but before Fly can fully activate it is interrupted by the next power in the string, Invincibility. That power then attempts to activate, but before it has time to do so it is interrupted by Unyielding. The last power in the string, Unyielding, activates because there's no command after it to stop it from processing through its activation and animation times.


'''coalition_MinTalkRank''' ''rank'': Sets the minimum rank of members of a coalition supergroup who your supergroup can hear.
== Substitution Strings ==
Substitution strings, also referred to as [[Variables|variables]], allow you to create chat commands that will display the same basic behavior each time they are used, but will vary slightly depending on certain variable conditions such as your current character or your currently selected target. When a variable is used the appropriate information referring to your target or character is substituted for the variable before it is sent to the appropriate communication channel. Several pre-defined substitution strings exist and are denoted by a single '$' prefix:
* $archetype - the [[archetype]] of your character
* $battlecry - your character's battlecry, as entered on your character ID screen
* $level - your character's current [[level]]
* $name - your character's name
* $primary - your [[Primary Power Sets|primary power set]]
* $secondary - your [[Secondary Power Sets|secondary power set]]
* $origin - your character's origin
* $target - your currently selected target's name
* $side - displays "Hero" or "Villain" depending on your character's current content flag (see [[Variables]] page for more details)
* $loc - your current coordinates as a clickable [[Thumbtack (Slash Command)|thumbtack]] link


'''coalition_sg_MinTalkRank''' ''rank'': Sets the minimum rank of members of your supergroup who can use coalition chat.  ''Note'': This command is currently non-functional.
For example, if a level 12 natural-origin scrapper named Captain Obvious were to target a Behemoth Overlord, the following command would cause him to say "I, Captain Obvious, a level 12 natural scrapper, challenge you, Behemoth Overlord, to a battle to the death!" in his currently selected chat channel.


'''coalition_NoSend''': Stop your supergroup from sending coalition chat to an ally supergroup.
:{{slashcommand|local|"I, $name, a level $level $origin $archetype, challenge you, $target, to a battle to the death!"}}


'''gInvite_sg''' ''channel_name'' ''rank'': Invite your entire supergroup to a global chat channel.  Only leaders may use this command.  You must specify the minimum rank to invite:
The same command, executed by a level 42 magic-origin brute named Mauler who is targeting Arbiter Howe would cause the character to say, "I, Mauler, a level 42 magic brute, challenge you, Arbiter Howe, to a battle to the death!"
:'''0''': Invite the entire supergroup (members, captains, and leaders).
:'''1''': Invite captains and leaders only.
:'''2''': Invite leaders only.


:(Also: ''chan_invite_sg'')
==Command Line Parameters==
Many slash commands, especially graphics commands, can also be used as [[Command Line Parameters|command line parameters]] or launch parameters.


'''sg''' ''<message>'': Send message to the supergroup channel.  (Also: ''supergroup'')


'''sgi''' ''character'': Invite character to join supergroup.  (Also: ''sginvite'')
== See Also ==


'''sgInvite''' ''character'': Invite character to join supergroup.  (Also: ''sgi'')
* [[List of Slash Commands]]
* [[Keybind Profiles]]
* [[Binds]]
* [[Macros]]
* [[List of Key Names]]
* [[Variables]]
* [[Communication Commands]]
* [[Pet Commands]]
* [[Supergroup Commands]]
* [[The Incomplete and Unofficial Guide to /bind]]


'''sgk''' ''character'': Kick character from supergroup.  (Also: ''sgKick'')


'''sgKick''' ''character'': Kick character from supergroup.  (Also: ''sgk'')


'''sgLeave''': Leave your current supergroup.
'''sgMode''': Toggle Supergroup mode.
'''sgModeSet''' ''mode'': Set Supergroup mode.
:'''0''': Leave supergroup mode.
:'''1''': Enter supergroup mode.
'''sgSetMOTD''' ''message'': Sets supergroup Message Of The Day
'''sgRaid_Window''' ''daybits'' ''<hour>'': Sets your supergroup raid window.
'''sgSetDemoteTimeout''' ''days'': Sets the number of days a leader in your supergroup has to log in before the leader is demoted.  ''Note'': This command is currently non-functional.
'''sgSetDescription''' ''description'': Sets your supergroup description.
'''sgSetMotto''' ''motto'': Sets your supergroup motto.
'''sgStats''': Display supergroup info in chat window.  ''Note'': This command is currently non-functional.
'''supergroup''' ''message'': Send ''message'' to the supergroup channel.  (Also: ''sg'')


[[Category:Gameplay]]
[[Category:Gameplay]]
[[Category:Slash Commands]]

Latest revision as of 05:20, 13 October 2024

Overview

In City of Heroes and City of Villains, there are a number of commands that can be typed on the chat command line to execute various functions. These are known as slash commands, because they begin with a slash (/). Slash commands often have underscores within the name to improve legibility, but they are not needed to actually take effect, i.e. /PowExec_Name, /Pow_Exec_Name, /P_o_w_E_x_e_c_n_a_m_e all perform the same way. Almost every action taken in the game is a slash command bound to a key. The number 1 on the keyboard activates the slash command "pow_exec_slot 1", which executes the power in slot 1 of your power tray. Some slash commands, such as the movement commands, should not be called from the chatbox without taking care and knowing what will occur. See List of Slash Commands for a list of known slash commands; see also Category:Slash Commands.

Concatenating Commands

Multiple commands may be strung together for simultaneous execution using the '$$' operator. For example, the following command will cause a character to say "Ready!" and perform the "thumbsup" emote at the same time.

/local Ready!$$emote thumbsup

Note that when concatenating two or more commands, the slash is used on only the first command.

Parsing Concatenated Commands

When multiple commands are strung together in a string (i.e., concatenated), the game executes each slash command in sequence from left to right. However, what command actually activates and when depends on the kind of action that is being executed. Powers appear to activate from right to left because commands with activation or cast times interrupt each other as the game attempts to execute them. Most other actions (such as chat messages, "Forward", "Petcom Attack", "Follow", turning powers off, etc.) activate normally (from left to right) because they essentially take no time to execute. Animation times can also cause a command to be interrupted, preventing its activation. For example, when the game attempts to execute the command string \powexec_name fly$$powexec_name invincibility$$powexec_name unyielding, the game first attempts to execute Fly, but before Fly can fully activate it is interrupted by the next power in the string, Invincibility. That power then attempts to activate, but before it has time to do so it is interrupted by Unyielding. The last power in the string, Unyielding, activates because there's no command after it to stop it from processing through its activation and animation times.

Substitution Strings

Substitution strings, also referred to as variables, allow you to create chat commands that will display the same basic behavior each time they are used, but will vary slightly depending on certain variable conditions such as your current character or your currently selected target. When a variable is used the appropriate information referring to your target or character is substituted for the variable before it is sent to the appropriate communication channel. Several pre-defined substitution strings exist and are denoted by a single '$' prefix:

  • $archetype - the archetype of your character
  • $battlecry - your character's battlecry, as entered on your character ID screen
  • $level - your character's current level
  • $name - your character's name
  • $primary - your primary power set
  • $secondary - your secondary power set
  • $origin - your character's origin
  • $target - your currently selected target's name
  • $side - displays "Hero" or "Villain" depending on your character's current content flag (see Variables page for more details)
  • $loc - your current coordinates as a clickable thumbtack link

For example, if a level 12 natural-origin scrapper named Captain Obvious were to target a Behemoth Overlord, the following command would cause him to say "I, Captain Obvious, a level 12 natural scrapper, challenge you, Behemoth Overlord, to a battle to the death!" in his currently selected chat channel.

/local "I, $name, a level $level $origin $archetype, challenge you, $target, to a battle to the death!"

The same command, executed by a level 42 magic-origin brute named Mauler who is targeting Arbiter Howe would cause the character to say, "I, Mauler, a level 42 magic brute, challenge you, Arbiter Howe, to a battle to the death!"

Command Line Parameters

Many slash commands, especially graphics commands, can also be used as command line parameters or launch parameters.


See Also