• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Custom Ability/AI Problems

Status
Not open for further replies.
Level 2
Joined
Jul 25, 2011
Messages
11
Good evening folks. It is high time I submit my inquiry as to my troubles about the "Custom" ( I know the notion makes you shudder as much as I.) attributes of the Warcraft 3 World Editor.

Two things: (Hope this isn't too much for you to read. /crosses fingers.)

1. I made some new custom spells and abilities (For my personal enjoyment.) and for the most part. They don't work quiet as well as I had hoped. For instance. I made a spelled that was to resemble Cone of Cold (A shock wave type spell with the Crushing Wave animation.) spell. But for some reason the damage is set to the default Shockwave damage output instead of the improved custom damage values.

(For example. The spell is supposed to do 90 (level 1) but instead displays the damage as being dealt as 75.I'm starting to think the values are being reset somehow. The only thing I change was the damage output itself. The text description remains the same as shown here:"A cone of frost ripples outward from the caster, causing <AOsh,DataA1> damage [in this case. It's set to 90.] to land units in a line." But when I test it out. The text displays it as default Shockwave damage [75].)

Similar cases also included Bloodlust (I made it a custom Hero Ability.) and Command Aura (Also a custom Hero ability for a custom Hero I modeled after Lord Garithos called the Knight Captian. It should've been the mountain King's default Aura ability. Come on Blizzard! Why can the dwarf have some Aura love?) As well as a Crushing Wave based move called Hydro Blast (I decided to make an ArchDruid Hero with this ability. Again the damage is not being dealt. It's as if the values aren't being used when they clearly have been set. I've had to resort to copy/pasting Shockwave with Crushing Wave Animation just to make it work as intended slightly.)

Is there some way to make the custom spell work as intended? (Better if there is a form thread to point me in the right direction.)

And:

2.Is there anyway for the AI to use all the Custom Data I've created? Every time I've played I'm hoping for the AI to pop an Archer or a custom unit and use it's abilities/upgrades. I've even managed to fashion the Ranger Upgrade for the Archer (To work just like the Troll Berserker Upgrade. Same with the Axethrowers in another map. Only problem is that when I use the Berserker ability the sound doesn't work as often as it should. Their axes don't even glow like the headhunter spears do.) So far the only custom object I've seen it do was use the Regrowth Ability I gave to the dryads. (Dryads should auto heal. Night elfs don't have healing units and rejuvenation can only go so far.)

Again any help would be appreciated ( Also, Again if there's a forum thread that solves this problem [A specific thread that discusses this problem more thoroughly and/or in depth] that would also help me greatly.)

Thanks for taking the time to read this and I hope to get this issue resolved.
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
1. I made some new custom spells and abilities (For my personal enjoyment.) and for the most part. They don't work quiet as well as I had hoped. For instance. I made a spelled that was to resemble Cone of Cold (A shock wave type spell with the Crushing Wave animation.) spell. But for some reason the damage is set to the default Shockwave damage output instead of the improved custom damage values.

(For example. The spell is supposed to do 90 (level 1) but instead displays the damage as being dealt as 75.I'm starting to think the values are being reset somehow. The only thing I change was the damage output itself. The text description remains the same as shown here:"A cone of frost ripples outward from the caster, causing <AOsh,DataA1> damage [in this case. It's set to 90.] to land units in a line." But when I test it out. The text displays it as default Shockwave damage [75].)

Similar cases also included Bloodlust (I made it a custom Hero Ability.) and Command Aura (Also a custom Hero ability for a custom Hero I modeled after Lord Garithos called the Knight Captian. It should've been the mountain King's default Aura ability. Come on Blizzard! Why can the dwarf have some Aura love?) As well as a Crushing Wave based move called Hydro Blast (I decided to make an ArchDruid Hero with this ability. Again the damage is not being dealt. It's as if the values aren't being used when they clearly have been set. I've had to resort to copy/pasting Shockwave with Crushing Wave Animation just to make it work as intended slightly.)

Is there some way to make the custom spell work as intended? (Better if there is a form thread to point me in the right direction.)

Have you made a NEW custom ability based on Shockwave? You would then change the missile to Crushing Wave (missile). As for the damage, set it to the amount in your custom ability and in the description, rather just put in the amount instead of the whole "<AOsh,DataA1>" thing. If you really do want to use this, press CTRL+D to view the raw data codes and use the one of your custom ability, not of the original Shockwave.

2.Is there anyway for the AI to use all the Custom Data I've created? Every time I've played I'm hoping for the AI to pop an Archer or a custom unit and use it's abilities/upgrades. I've even managed to fashion the Ranger Upgrade for the Archer (To work just like the Troll Berserker Upgrade. Same with the Axethrowers in another map. Only problem is that when I use the Berserker ability the sound doesn't work as often as it should. Their axes don't even glow like the headhunter spears do.) So far the only custom object I've seen it do was use the Regrowth Ability I gave to the dryads. (Dryads should auto heal. Night elfs don't have healing units and rejuvenation can only go so far.)

The AI will use some abilities on their own. For example, with your Cone of Cold ability, they should be able to cast it because it is based on the Shockwave ability. If they don't cast it on their own, you will have to set it up using Triggers.

If you don't understand something, let me know and I will upload screenshots! :xxd:

Mr_Bean
 
Last edited:
Level 2
Joined
Jul 25, 2011
Messages
11
Have you made a NEW custom ability based on Shockwave? You would then change the missile to Crushing Wave (missile). As for the damage, set it to the amount in your custom ability and in the description, rather just put in the amount instead of the whole "<AOsh,DataA1>" thing. If you really do want to use this, press CTRL+D to view the raw data codes and use the one of your custom ability, not of the original Shockwave.

Mr_Bean

..Now that I think about it. I think that's the problem there. Let me see if the missile is set to crushing wave. I might have confused the art with the missile.

EDIT: Yeah the missile is set to crushing wave. You might also be right about the damage. I'll just write it out and not use the <> command.

The AI will use some abilities on their own. For example, with your Cone of Cold ability, they should be able to cast it because it is based on the Shockwave ability. If they don't cast it on their own, you will have to set it up using Triggers.

If you don't understand something, let me know and I will upload screenshots! :xxd:Mr_Bean

Well the thing is that they never use it because they can't even hire the neutral hero from the tavern. What triggers would I have to use to get them to do so? Would there be any triggers I'd need to use to have them use the custom regular units I've created as well?
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
Well the thing is that they never use it because they can't even hire the neutral hero from the tavern. What triggers would I have to use to get them to do so? Would there be any triggers I'd need to use to have them use the custom regular units I've created as well?

Unfortunately you would probably have to create the unit instead of hiring it. For example, you could have a trigger making the AI hero go to the shop. Then when it enters the shop area, the game checks whether the AI has enough gold, and if it does, creates the unit at the shop and subtracts the unit cost from their current gold. Here is what the trigger could look like:

  • Trigger
    • Events
      • Unit - A unit comes within [x] of [your shop]
    • Conditions
      • ((Owner of (Entering unit) controller) Equal to Computer
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) Current Gold) Greater then or equal to [cost of unit]
        • Then - Actions
          • Unit - Create 1 [your unit] for (Owner of (Entering unit)) at (Position of (Selling unit) facing...
          • Player - Set (Owner of (Entering unit)) Current gold to (((Owner of (Entering unit)) Current gold) - [cost of unit])
        • Else - Actions
          • Do nothing
Mr_Bean
 
Level 2
Joined
Jul 25, 2011
Messages
11
Unfortunately you would probably have to create the unit instead of hiring it. For example, you could have a trigger making the AI hero go to the shop. Then when it enters the shop area, the game checks whether the AI has enough gold, and if it does, creates the unit at the shop and subtracts the unit cost from their current gold. Here is what the trigger could look like:

  • Trigger
    • Events
      • Unit - A unit comes within [x] of [your shop]
    • Conditions
      • ((Owner of (Entering unit) controller) Equal to Computer
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) Current Gold) Greater then or equal to [cost of unit]
        • Then - Actions
          • Unit - Create 1 [your unit] for (Owner of (Entering unit)) at (Position of (Selling unit) facing...
          • Player - Set (Owner of (Entering unit)) Current gold to (((Owner of (Entering unit)) Current gold) - [cost of unit])
        • Else - Actions
          • Do nothing
Mr_Bean

I'm having a bit of trouble trying to find the [cost of Unit] option that was stated in the trigger.

I get it for the most part,and if I wanted to make the AI create a custom units that I've added to a specific race? (Archers = Human, Shadow Wraiths (My own custom Unit) = Undead, Dragons = Orc. Shadow Sentry (My own custom Unit) = Night Elf.)
 
Last edited:
Level 17
Joined
Feb 11, 2011
Messages
1,860
I see, and if I wanted to make the AI create a custom units that I've added to a specific race? (Archers = Human, Shadow Wraiths (My own custom Unit) = Undead, Dragons = Orc. Shadow Sentry (My own custom Unit) = Night Elf.)

You would need an extra condition:

  • Trigger
    • Events
      • Unit - A unit comes within [x] of [your shop]
    • Conditions
      • ((Owner of (Entering unit) controller) Equal to Computer
      • (Race of (Owner of (Entering unit))) Equal to [your race]
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) Current Gold) Greater then or equal to [cost of unit]
        • Then - Actions
          • Unit - Create 1 [your unit] for (Owner of (Entering unit)) at (Position of (Selling unit) facing...
          • Player - Set (Owner of (Entering unit)) Current gold to (((Owner of (Entering unit)) Current gold) - [cost of unit])
        • Else - Actions
          • Do nothing
You would then need a trigger for each race.

Mr_Bean
 
Level 11
Joined
Jul 9, 2009
Messages
926
Mr_Bean987
Please Remove a part of your signature which says
If I have helped you, please add to my reputation
According to reputation rules it is not allowed >.>
Subliminal asking for reputation (ex: "Remember to rep people if they helped you/you found their post helpful!")

read more Info about the rules about reputation Here.

Please follow rules to avoid negative reputation :)
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
[cost of unit] is an integer.

  • Trigger
    • Events
      • Unit - A unit comes within 150 of [your shop]
    • Conditions
      • ((Owner of (Entering unit) controller) Equal to Computer
      • ((Entering unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Entering unit)) Current Gold) Greater then or equal to [cost of unit]
        • Then - Actions
          • Set Temp_Point = (Position of (Selling unit))
          • Unit - Create 1 [your unit] for (Owner of (Entering unit)) at (Temp_Point) facing Default building facing degrees
          • Player - Set (Owner of (Entering unit)) Current gold to (((Owner of (Entering unit)) Current gold) - [cost of unit])
          • Custom script: call RemoveLocation(udg_Temp_Point)
        • Else - Actions
Notice the changes I have made to the previous trigger. The "Set Temp_Point = (Position of (Selling unit))" and "Custom script: call RemoveLocation(udg_Temp_Point)" triggers are used to prevent leaking. Go here for a memory leaking tutorial.

- Mr_Bean
 
Status
Not open for further replies.
Top