• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Advanced Constuction Menu

Status
Not open for further replies.
Level 3
Joined
Feb 29, 2020
Messages
43
Hello, I am currently working on an advanced construction menu. I downloaded a template from on here to use, but it was buggy. I managed to fix some of those bugs, and I am mostly happy with it's current function, but one problem bothers me. There is a stupid + icon where if you click on it it brings up the build buildings button. I can't figure out how to get rid of it. I can't figure out why it's there, why it has a custom icon, or how it works. It was just there in the template i downloaded. I don't understand it. Can someone please take a look and help me figure out how to get rid of it? Thank you.


HELP.png
 

Attachments

  • Advanced Build Test.w3x
    22.9 KB · Views: 20

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,584
That is the original build ability (no idea why it's icon changed).

Check out the map I attached, I removed the + ability from the workers. Also, you don't need that Spellbook ability if you were using it before.
 

Attachments

  • Advanced Build Test Fixed.w3x
    23 KB · Views: 22
Level 3
Joined
Feb 29, 2020
Messages
43
Thanks for your help. By hiding the ability it seems to have broken the rest of the triggers function so it can no longer build units. If only there was some way to figure out how he made the icon change and location change then we could just do what he did but set the location to 0,-11.
 
Level 3
Joined
Feb 29, 2020
Messages
43
I think he must have broken the whole map down to jass and edited that way? Is that a thing? I found a reference to the location of the info for the build ability and a mention that it can only be edited with jass.
 
Level 3
Joined
Feb 29, 2020
Messages
43
Sorry that map I posted is his map. It wasnt hidden. It's just moved positions and changed icons. I have no idea how he did it. I stripped away all the triggers in the map and reset all the unit and abilities and it was still in the different location with a different icon. I just cant figure out what he did to move it and change the icon.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,584
He imported files that contain information regarding button icons/positions.

Unfortunately, it seems like you can't hide the build button, you can only use weird alternatives. However, I think I found a pretty nice alternative that uses your current system.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,584
So in this version you can toggle between Basic/Advanced structures INSIDE of the Build menu. Also, if you import this to a new map the Build button shouldn't be a yellow + icon.

How it works:
The Spellbook ability allows you to "cheat" abilities into the Build menu. This is done by setting the Spellbook's Base Order ID to be equal to one of these: "humanbuild", "orcbuild", "undeadbuild", "nightelfbuild", and "nagabuild". The ID should match the Race of the worker, so a Peasant should have a Spellbook with the "humanbuild" ID.

Inside of this Spellbook we place our Switch Advanced/Basic ability, which is a toggle ability based on Defend. Then with triggers we detect when you issue an order to turn on/turn off Defend (Switch ability). This is the same premise as the "unit begins casting an ability" system you had before, we're just using orders instead. Finally, in response to these orders we limit/make available the proper structures.

Edit: fixed minor issue, not important
 

Attachments

  • Advanced Build Test Fixed 2.w3x
    21.8 KB · Views: 29
Last edited:
Level 3
Joined
Feb 29, 2020
Messages
43
I've done some work on this system. I figured out how to hide the build menu. This is what i have so far. I can fix the bugs easily, but the problem i am having is there is a very slight delay between hitting the build button and being able to build the structure. My map is a fast paced edge of your seat better be good with hotkeys and have a high apm map. This delay is unacceptable. I'm using charge gold and lumber as my base spell. It was the fastest one i could find to work with my system. Is there a faster spell out there that you know of that will cut down the delay time for building? Something instant cast maybe?
 

Attachments

  • testio.w3m
    23.2 KB · Views: 18

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,584
Most spells by default don't have a cast time. It's actually the unit that is causing the delay. Set the Peasant's Art - Animation - Cast Point/Cast Backswing to 0.
 

Attachments

  • testio 2.w3m
    23.2 KB · Views: 23
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,584
An important piece of information I forgot to mention. You will notice that most spells interrupt the Peasant's orders even with a 0 Cast Point/Backswing/Cast Time. To get around that here is a list of abilities that will not interrupt orders that you can use:

Which abilities do not interrupt orders ?

Roar, fan of knives, and howl of terror seem like good candidates for your Build abilities. Just set their values to 0 and Targets Allowed to None so they don't actually do anything.
 
Last edited:
Level 3
Joined
Feb 29, 2020
Messages
43
Thanks, I got timing problem figured out. When you open a build menu with a trigger it still cancels the orders and wont resume them no matter what spell I use, but it's o.k i have a work around for that. I'm going to release my new system to the lab once i fine tune it. Advanced construction menus seem to come up fairly often and this is by far the best system ever created and works really well.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,584
I'm curious, how did you manage to hide the build button? I know you edited the HumanAbilityFunc.txt file, but I tried the same thing and it didn't work.

Is this all you changed in it?

// Human Build
[AHbu]
Art=ReplaceableTextures\CommandButtons\BTNHumanBuild.blp
Buttonpos=0,-11
Order=humanbuild

Because I know I tried that and it didn't work for me...
 
Level 3
Joined
Feb 29, 2020
Messages
43
Are you sure you tried to edit the right file? There are two that controls the references humanabilityfunc.txt and commandfunc.txt. Commandfunc is the one that everyone knows about that lets you change everything and includes refrences to human build button pos, but when you change it, it does nothing for human build button. The HumanAbilityFunc.txt is one i found that when you edit it lets you hide the button.

I will test it some more but I've tried it on two maps and it works for me just by changing the value to what you stated. If it's not working for you and you tried everything else, it could be that both maps at one point had the commandfunc.txt edited with the same value and then later removed when that didn't work. It could be that you must edit and import BOTH files at some point, but only need to keep the one file imported.

I'm making a fresh map right now to upload to the lab ill let you know what i find.
 
Last edited:
Status
Not open for further replies.
Top