- Joined
- Aug 23, 2014
- Messages
- 208
Better way to hide ANY button founded by leandrotp. But it crash on MAC versions.
Command Buttons Stacking |
![]() |
Now you can fix it! Fold unnecessary buttons under top-left corner button and free some space for abilities.
Bonus: hidden buttons are not activated when you press their shortcuts on the keyboard. You can assign a skill shortcut to the vacant key.
Note: these changes will apply to all units and all players, use wisely!
Download DEMO map
How to use?
1. Make a copy of Units\CommandFunc.txt file from war3.mpq
2. Open it with Notepad
3. Change lines "Buttonpos=X,Y" to "Buttonpos=-2147483648,-2147483648" for all command buttons you want to stack.
4. Save file
5. Import file in your map
6. Change imported file full path to "Units\CommandFunc.txt" (Right click -> Modify File Properties... -> check Use custom path -> type new path in enabled textbox -> OK)
7. Save map and test how it works!
Which command button will be shown on the top?
It seems that game places first loaded command button on the top. There are two stacking types:
- Type A - Attack, Attack Ground, Stop
- Type B - Move, Stop, Patrol, Hold Position
- Theoretically, Type C - Hero abilities
If first loaded unit:
- can move and can attack, game will place Movement buttons (Type B) first.
- can move and can not attack, game will place Movement buttons (Type B) first.
- can not move and can attack, game will place Attack buttons (Type A) first.
- can not move and can not attack (or command card hidden with Ward classification), game will ignore this unit.
In what order the game loads the units? I can not say exactly how this works, but: buildings loaded before units, and probably heroes loaded after buildings and before units.
Warning! Stacking order is always set to Type A after loading saved game. Keep it in mind if your map uses standart Save/Load.
How to define stacking type?
1. Open Object Editor in World Editor (F6)
2. Open Units tab
3. Select: Standart Units -> Human -> Melee -> Buildings -> Guard Tower (hgtw)*
3.5 Copy it if you want use standart Guard Tower in map later.
4. Modify Standart Guard Tower:
- for Type A stacking you must keep tower attack ability. (when you select tower, you must see Attack button)
- for Type B stacking you must set Movement - Speed Base to 1 (or higher value). (when you select tower, you must see Move button)
4.5 You can change different values to make tower more "dummy", but keep in mind:
- Stats - Is a Building must be TRUE
- If you changing attack, watch attack availability in command card.
- Guard Tower must be visible for all players. However, you can replace model with dummy and make it unselectable with Locust.
5. Place edited Guard Tower on the map.
6. Change ownership of placed Guard Tower to Neutral Passive. (so it will not interfere normal gameplay)
7. Save map and test it!
*If you find an object that overrides Guard Tower, please write it in comments.
Important info
- Stacking order depends on placed on the map units at the game start.
- Stacking order does not change during the game.
- Buttons stacking works properly only in 0,0 slot of command card (top-left). Attempts to stack two command buttons in other slots led to crashes.
- Minimal value for start stacking buttons is "Buttonpos=-2147483648,-2147483648" (closer to 0 values lead to crashes in some situations, still not sure what effect have closer to -inf values).
- Hidden in the stack buttons can not be activated via shortcuts. Only displayed buttons work.
- This method changes command card for all units and all players.
- It seems that this method does not cause game crashes. Nevertheless, I advise to use it with caution as all "hacks".
Button stacking order from uppermost to the bottom for the normal unit
Type A |
|
|
|
|
|
|
| ||||||||||||||
Type B |
|
|
|
|
|
|
|
Button stacking order for stationary unit (Movement - Speed Base = 0)
Type A |
|
|
|
| ||||||||
Type B |
|
|
|
|
Button stacking order for unit without attacks (Combat - Attacks Enabled = None)
Type A |
|
|
|
|
| ||||||||||
Type B |
|
|
|
|
|
Button stacking order for unit with hidden attacks (Combat - Attack 1&2 - Show UI = false)
Type A |
|
|
|
|
|
| ||||||||||||
Type B |
|
|
|
|
|
|
[CmdMove]
Art=CommandMove
Buttonpos=-2147483648,-2147483648
[CmdAttack]
Art=CommandAttack
Buttonpos=-2147483648,-2147483648
[CmdAttackGround]
Art=CommandAttackGround
Buttonpos=-2147483648,-2147483648
[CmdBuild]
Art=CommandBasicStruct
Buttonpos=0,2
[CmdBuildHuman]
Art=CommandBasicStructHuman
Buttonpos=0,2
[CmdBuildOrc]
Art=CommandBasicStructOrc
Buttonpos=0,2
[CmdBuildNightElf]
Art=CommandBasicStructNightElf
Buttonpos=0,2
[CmdBuildUndead]
Art=CommandBasicStructUndead
Buttonpos=0,2
[CmdCancel]
Art=CommandCancel
ButtonPos=3,2
[CmdCancelBuild]
Art=CommandCancel
ButtonPos=3,2
[CmdCancelTrain]
Art=CommandCancel
ButtonPos=3,2
[CmdCancelRevive]
Art=CommandCancel
ButtonPos=3,2
[CmdHoldPos]
Art=CommandHoldPosition
Buttonpos=-2147483648,-2147483648
[CmdPatrol]
Art=CommandPatrol
Buttonpos=-2147483648,-2147483648
[CmdPurchase]
Art=CommandPurchase
Buttonpos=0,0
[CmdRally]
Art=CommandRally
Buttonpos=3,1
PlacementModel=UI\Feedback\RallyPoint\RallyPoint.mdl
[CmdSelectSkill]
Art=CommandNewSkill
Buttonpos=-2147483648,-2147483648
[CmdStop]
Art=CommandStop
Buttonpos=-2147483648,-2147483648
//[CmdUnivAgi]
//Art=
//Buttonpos=2,0
//[CmdUnivInt]
//Art=
//Buttonpos=1,0
//[CmdUnivStr]
//Art=
//Buttonpos=0,0
Art=CommandMove
Buttonpos=-2147483648,-2147483648
[CmdAttack]
Art=CommandAttack
Buttonpos=-2147483648,-2147483648
[CmdAttackGround]
Art=CommandAttackGround
Buttonpos=-2147483648,-2147483648
[CmdBuild]
Art=CommandBasicStruct
Buttonpos=0,2
[CmdBuildHuman]
Art=CommandBasicStructHuman
Buttonpos=0,2
[CmdBuildOrc]
Art=CommandBasicStructOrc
Buttonpos=0,2
[CmdBuildNightElf]
Art=CommandBasicStructNightElf
Buttonpos=0,2
[CmdBuildUndead]
Art=CommandBasicStructUndead
Buttonpos=0,2
[CmdCancel]
Art=CommandCancel
ButtonPos=3,2
[CmdCancelBuild]
Art=CommandCancel
ButtonPos=3,2
[CmdCancelTrain]
Art=CommandCancel
ButtonPos=3,2
[CmdCancelRevive]
Art=CommandCancel
ButtonPos=3,2
[CmdHoldPos]
Art=CommandHoldPosition
Buttonpos=-2147483648,-2147483648
[CmdPatrol]
Art=CommandPatrol
Buttonpos=-2147483648,-2147483648
[CmdPurchase]
Art=CommandPurchase
Buttonpos=0,0
[CmdRally]
Art=CommandRally
Buttonpos=3,1
PlacementModel=UI\Feedback\RallyPoint\RallyPoint.mdl
[CmdSelectSkill]
Art=CommandNewSkill
Buttonpos=-2147483648,-2147483648
[CmdStop]
Art=CommandStop
Buttonpos=-2147483648,-2147483648
//[CmdUnivAgi]
//Art=
//Buttonpos=2,0
//[CmdUnivInt]
//Art=
//Buttonpos=1,0
//[CmdUnivStr]
//Art=
//Buttonpos=0,0
What can you do with it?
AZERTY friendly spell layout for 8 spells
|
Layout with 11 free slots (10+1 for heroes)
| |||
![]() | ![]() | Configure as you wish! | ||
Bonus
Additional information that can be used with Command Buttons Stacking.How to make custom descriptions for standart command buttons or remove shortcuts?
1. Make a copy of Units\CommandStrings.txt file from war3.mpq
2. Open it with Notepad
3. Change lines "Tip", "Ubertip", "Hotkey" for all command buttons you want to customize.
- Tip. Name of the command button (1 line)
- Ubertip. Description of the command button (several lines, make line break with "|n")
- Hotkey. One letter or numeric key code. Leave it empty if you want remove hotkey from button.
4. Save file
5. Import file in your map
6. Change imported file full path to "Units\CommandStrings.txt" (Right click -> Modify File Properties... -> check Use custom path -> type new path in enabled textbox -> OK)
7. Save map and test how it works!
2. Open it with Notepad
3. Change lines "Tip", "Ubertip", "Hotkey" for all command buttons you want to customize.
- Tip. Name of the command button (1 line)
- Ubertip. Description of the command button (several lines, make line break with "|n")
- Hotkey. One letter or numeric key code. Leave it empty if you want remove hotkey from button.
[CmdAttackGround]
Tip=|cffffcc00Standart Command Buttons Stacking
Ubertip="All standart command card buttons (even hero abilities select button, for demo purposes) are hidden under this modified Attack Ground standart button.|n|nYou can customize which standart buttons should be stacked in Units\CommandFunc.txt|n|nYou can change standart buttons descriptions and remove hotkeys for them in Units\CommandStrings.txt|n|nMore info at Hiveworkshop forums!|n|n|cffffcc00Author: ALEXz407"
Hotkey=
Tip=|cffffcc00Standart Command Buttons Stacking
Ubertip="All standart command card buttons (even hero abilities select button, for demo purposes) are hidden under this modified Attack Ground standart button.|n|nYou can customize which standart buttons should be stacked in Units\CommandFunc.txt|n|nYou can change standart buttons descriptions and remove hotkeys for them in Units\CommandStrings.txt|n|nMore info at Hiveworkshop forums!|n|n|cffffcc00Author: ALEXz407"
Hotkey=
5. Import file in your map
6. Change imported file full path to "Units\CommandStrings.txt" (Right click -> Modify File Properties... -> check Use custom path -> type new path in enabled textbox -> OK)
7. Save map and test how it works!
How to change standart command button icon?
1. Open Game Interface window in World Editor (Advanced -> Game Interface...)
2. Check "Use Custom Game Interface"
3. You can now select new icons for standart buttons!
4. Save map and test how it works!
2. Check "Use Custom Game Interface"
3. You can now select new icons for standart buttons!
Icon - Command - Attack Ground = Engineering Upgrade <Normal> (ReplaceableTextures\CommandButtons\PASBTNEngineeringUpgrade.blp)
Last edited: