- Joined
- May 20, 2009
- Messages
- 822
A small group of developers, known as ZanManagement, may have or may have not been the first to discover this. Either way, I found this out by looking through their mod WarCraft Vs StarCraft.
Here is a map template if you need additional help: Map <- Updated
First, we need to know of a few files in the War3.MPQ archive.
CommandStrings.txt, HumanAbilityFunc.txt, UndeadAbilityFunc.txt, OrcAbilityFunc.txt, and NightElfAbilityFunc.txt.
Extract these using an MPQ program, I suggest Ladik's MPQ Editor. You can find these files in the Units\ directory.
These files contain the first part of the necessary data to do this. Once you're done editing these, you can simply import them into any map you want.
Now, as we all know in the normal WC3 Map Editor, (And even in some modded editors,) you cannot edit the Build Ability.
These files, however, contain the necessary data needed to modify to do so!
Here is a map template if you need additional help: Map <- Updated
First, we need to know of a few files in the War3.MPQ archive.
CommandStrings.txt, HumanAbilityFunc.txt, UndeadAbilityFunc.txt, OrcAbilityFunc.txt, and NightElfAbilityFunc.txt.
Extract these using an MPQ program, I suggest Ladik's MPQ Editor. You can find these files in the Units\ directory.
These files contain the first part of the necessary data to do this. Once you're done editing these, you can simply import them into any map you want.
Now, as we all know in the normal WC3 Map Editor, (And even in some modded editors,) you cannot edit the Build Ability.
These files, however, contain the necessary data needed to modify to do so!
I'm going to use Humans as an example:
This Ability is in HumanAbilityFunc.txt
[AHbu]
Art=ReplaceableTextures\CommandButtons\BTNBlank.blp
Buttonpos=2,1
Order=humanbuild
This Ability is in HumanAbilityFunc.txt
[AHbu]
Art=ReplaceableTextures\CommandButtons\BTNBlank.blp
Buttonpos=2,1
Order=humanbuild
Also, be sure to change the button positions of other abilities, such as Call to Arms or Unsummon Building. They will be in the way of the Advanced Build Button.
The way I have it set up in the Map Template is how I suggest you should set it up, the abilities being shifted over one. (Detonate is at 2,2 , Unsummon is at 3,2 , Sacrafice is at 2,2 , Etc)
[Just as a little flavor note, the A stands for Ability, H stands for Human, and BU stands for Build.]
Please note the Button Position, and the Button Art itself. These are important.
The Button Position needs to be in a position on the worker for the exact race, meaning if you make another Worker for the Human Race it will use this same button position for it's Build Ability.
The Button being blank is so it isn't visible.
The way I have it set up in the Map Template is how I suggest you should set it up, the abilities being shifted over one. (Detonate is at 2,2 , Unsummon is at 3,2 , Sacrafice is at 2,2 , Etc)
[Just as a little flavor note, the A stands for Ability, H stands for Human, and BU stands for Build.]
Please note the Button Position, and the Button Art itself. These are important.
The Button Position needs to be in a position on the worker for the exact race, meaning if you make another Worker for the Human Race it will use this same button position for it's Build Ability.
The Button being blank is so it isn't visible.
This is in CommandStrings.txt
[CmdBuildHuman]
Tip=
Ubertip=
Hotkey=Z
[CmdBuildHuman]
Tip=
Ubertip=
Hotkey=Z
You can change the Hotkey to whatever you want. I suggest a far-off Hotkey that you will never use for any of your Hotkeys. When you decide on your Hotkey, MAKE SURE YOU MAKE IT CAPITAL! I''ve made that mistake before and it drove me insane.
All the other ones are, [CmdBuildOrc], [CmdBuildUndead], and [CmdBuildNightElf].
Notice that Tip and Ubertip are not blank, they have a single space after them, this is so when the icon is hovered over it doesn't show any text.
Now just import these into your map and you're done with the Hard/Easy part (Whichever you think)
The next thing you need to do is make a copy of the Mana Shield and Wind Walk abilities, since these are the easiest abilities to modify that do not target a unit, and have an Order String.
Remove all the buffs, effects, set all the data values to 0, (Such as Damage absorbed for Mana Shield, Speed Increase for Wind Walk, etc) and that should be good to go. Alternatively, a Channel ability with the order you are using in question should also be sufficient.
Now, we move on to the Triggers.
All the other ones are, [CmdBuildOrc], [CmdBuildUndead], and [CmdBuildNightElf].
Notice that Tip and Ubertip are not blank, they have a single space after them, this is so when the icon is hovered over it doesn't show any text.
Now just import these into your map and you're done with the Hard/Easy part (Whichever you think)
The next thing you need to do is make a copy of the Mana Shield and Wind Walk abilities, since these are the easiest abilities to modify that do not target a unit, and have an Order String.
Remove all the buffs, effects, set all the data values to 0, (Such as Damage absorbed for Mana Shield, Speed Increase for Wind Walk, etc) and that should be good to go. Alternatively, a Channel ability with the order you are using in question should also be sufficient.
Now, we move on to the Triggers.
-
Human Build Advanced Build
-
Events
- Unit - A unit Is issued an order with no target
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Unit-type of (Triggering unit)) Equal to Villager
-
Conditions
- -------- Checks for units issued an order with no target, than to make sure it's your worker -------
-
Or - Any (Conditions) are true
-
Actions
- -------- IF WORKER PRESSED "BUILD" OR "ADVANCED BUILD" --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Issued order) Equal to (Order(manashieldon))
- (Issued order) Equal to (Order(manashieldoff))
-
Conditions
-
Or - Any (Conditions) are true
-
If - Conditions
-
-------- This checks for Advanced Build --------
-
Then - Actions
- -------- Upgraded Construction --------
- Player - Make Weaponry Encampment Available for training/construction by (Owner of (Ordered unit))
- Player - Make Villa Available for training/construction by (Owner of (Ordered unit))
- Player - Make Keep Available for training/construction by (Owner of (Ordered unit))
- Player - Make Settlement Unavailable for training/construction by (Owner of (Ordered unit))
- Player - Make Farm Unavailable for training/construction by (Owner of (Ordered unit))
- Player - Make Draft Camp Unavailable for training/construction by (Owner of (Ordered unit))
- Player - Make Altar of Lost Souls Unavailable for training/construction by (Owner of (Ordered unit))
- Player - Make Long House Unavailable for training/construction by (Owner of (Ordered unit))
- -------- FORCE "BUILD" KEY --------
- Game - Force (Owner of (Ordered unit)) to press the key Z
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Issued order) Equal to (Order(windwalk))
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
-------- This checks for Basic Build --------
-
Then - Actions
- -------- Normal Build --------
- Player - Make Weaponry Encampment Unavailable for training/construction by (Owner of (Ordered unit))
- Player - Make Keep Unavailable for training/construction by (Owner of (Ordered unit))
- Player - Make Villa Unavailable for training/construction by (Owner of (Ordered unit))
- Player - Make Settlement Available for training/construction by (Owner of (Ordered unit))
- Player - Make Farm Available for training/construction by (Owner of (Ordered unit))
- Player - Make Draft Camp Available for training/construction by (Owner of (Ordered unit))
- Player - Make Altar of Lost Souls Available for training/construction by (Owner of (Ordered unit))
- Player - Make Long House Available for training/construction by (Owner of (Ordered unit))
- -------- FORCE "BUILD" KEY --------
- Game - Force (Owner of (Ordered unit)) to press the key Z
- Else - Actions
-
Then - Actions
-
Then - Actions
-
Events
If you did this right, than what will happen is:
You click or press the Hotkey for the Basic Build icon, and it will disable certain buildings and enable others, than force the Hotkey for the REAL build icon to be pressed.
This is my first tutorial, so go easy. Also, if you already know this than please don't be too mean. ^^
I will let you know now, that this MAY or MAY NOT cause lag in Multiplayer, I don't know for sure since I never tested.
There are a few side effects to doing this.
-The Original Build icon is still clickable, and will show you the buildings that are currently enabled.
-You get two annoying click sounds instead of one.
-Acolytes won't be able to sacrifice properly.
-Build commands will be reset if Advanced Build is clicked before
But other than that, it is FULLY functional.
EDIT:
Also in my example here, I show how this can be used to make a unique mechanic. The way I was setting this up was there are several buildings that can be upgraded into an improved counter-part.
However, if you already have the improved counterpart on the field you can build it straight-up without having to build the original building.
This made this race slow to tech at the start, but able to keep up with production later on. They are meant to be a more macro-oriented race, instead of micro. Lots of cheap units, with lower stats, most having abilities that spawn more units.
If you have any suggestions on how to make it simpler for beginners to read, please let me know in this Thread or PM if you want.
Credits go to the ZanManagement Team, which is who I learned this off of. Go check out their website or other projects. =p
For an alternative implementation, you may want to check this out: Basic and Advanced Build Icons
You click or press the Hotkey for the Basic Build icon, and it will disable certain buildings and enable others, than force the Hotkey for the REAL build icon to be pressed.
This is my first tutorial, so go easy. Also, if you already know this than please don't be too mean. ^^
I will let you know now, that this MAY or MAY NOT cause lag in Multiplayer, I don't know for sure since I never tested.
There are a few side effects to doing this.
-The Original Build icon is still clickable, and will show you the buildings that are currently enabled.
-You get two annoying click sounds instead of one.
-Acolytes won't be able to sacrifice properly.
-Build commands will be reset if Advanced Build is clicked before
But other than that, it is FULLY functional.
EDIT:
Also in my example here, I show how this can be used to make a unique mechanic. The way I was setting this up was there are several buildings that can be upgraded into an improved counter-part.
However, if you already have the improved counterpart on the field you can build it straight-up without having to build the original building.
This made this race slow to tech at the start, but able to keep up with production later on. They are meant to be a more macro-oriented race, instead of micro. Lots of cheap units, with lower stats, most having abilities that spawn more units.
If you have any suggestions on how to make it simpler for beginners to read, please let me know in this Thread or PM if you want.
Credits go to the ZanManagement Team, which is who I learned this off of. Go check out their website or other projects. =p
For an alternative implementation, you may want to check this out: Basic and Advanced Build Icons
Last edited: