Advanced Topics - Remapping Buttons

What is Remapping?  In World of Warcraft, action buttons have what is called an ID.  This number is not necessarily the number of the button.  It is a number from 1-120 and it uniquely identifies the action on the button.  Two buttons with the same ID will have the same action on them, if you drag an action from one of them, it will dissappear from the other.  This is key to the way the default action-bar changes when warriors change stances, druids change forms, rogues stealth or anyone changes the page.  They are still the same button, they just have a new ID.

Why Remap?  Hotkeys are attributes that are attached to the actual button, if you want the same hotkey to perform a different action depending on what stance/form etc. you are in, then the way to do it is to change what action is on the button, rather than what button the hotkey points to.

/FlexBar Remap Button=# Base=#

This is the basic FlexBar remap command - it takes a button or list of buttons and changes their ID to that specified in Base (or to a series of them starting at Base).  IE:

/flexbar remap button=1 base=13

Will cause button 1 to take on ID 13.

/flexbar remap button=1-12 base=13

Will cause button 1 to have ID 13, button 2 to have ID 14 on up to button 12 having ID 24

 

Just remapping like this isn't terribly useful, but remapping on events (See Advanced Topics - Events, Delays and Conditions) is the key to both mimicing the Default Action bar, and extending that behavior to classes like hunters (map from melee moves to ranged combat and back based on range to target) shadow priests and more.

Examples:

For warriors, the default action bar remaps page 1 based on what stance you are in.  To mimic this we will create a 12 button bar that will map to ID's 1-12 on battle stance, 13-24 on defensive stance and 25-36 on berserker stance.

This is best done in the Scripts Editor (See the GUI Panels Section).  (basically cut and past the following into it, hit the config button, then close the scripts editor)

Group Button=1-12 Anchor=1
Horizontalgroup group=1
Show Group=1
GroupButton=13-36
Verticalgroup Group=13 Width=6
Show Group=13

these commands will set up 2 groups - 1 of 12 buttons in a line (drag this where you will want to use it) and one of 24 buttons in 4 rows of 6 (this will end up hidden - put it anywhere)

Next, put the commands you want in battle stance in buttons 1-12, defensive stance in buttons 13-24 and berserker stance in buttons 25-36.

Next type /flexbar hide group=13 (as we don't need to see it any more)

then, clear the editor and put the following in:

Remap Group=1 Base=1 Reset='true' On='GainAura' Target='Battle Stance
Remap Group=1 Base=13 On='GainAura' Target='Defensive Stance'
Remap Group=1 Base=25 On='GainAura' Target='Berserker Stance'

Now hit the config button again and hide the scripts editor.  Switch stances and watch the buttons move.

The last thing we need to do to make this complete is make sure that your keybindings are set to FlexBar Buttons 1-12 NOT the regular WoW Action buttons, or this will cause problems.

Extending this to forms is easy - just use On='GainAura' Target='Bear Form' (or 'Dire Bear Form') and target='Cat Form' and use 'LoseAura' Target=['Cat Form' 'Bear Form' 'Dire Bear Form'] to get back to your caster buttons.

For Stealth it is GainAura/LoseAura Target='Stealth'

For Hunters, put auto shot somewhere safe (button 120 perhaps) and use On='NowInRange' Target=120 to move to ranged skills and On='OutOfRange' Target=120 to move to melee skills.