• 🏆 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!

[Trigger] Added Hero Abilities

Status
Not open for further replies.
Level 3
Joined
Dec 1, 2012
Messages
27
I am having an issue with my map that hopefully someone can help with .

I have a skill shop setup (the code will be below)


  • Shop Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Skills[0] = Bash
      • Set Items[0] = Bash
      • Set Skills[1] = Critical Strike
      • Set Items[1] = Critical Strike
      • Set Skills[2] = Reincarnation
      • Set Items[2] = Reincarnation
      • Set Skills[3] = Evasion
      • Set Items[3] = Evasion
      • Set Skills[4] = Spiked Carapace
      • Set Items[4] = Spiked Carapace
      • Set Skills[5] = Cleaving Attack
      • Set Items[5] = Cleaving Attack
      • Set Skills[6] = Brilliance Aura
      • Set Items[6] = Brilliance Aura
      • Set Skills[7] = Devotion Aura
      • Set Items[7] = Devotion Aura
      • Set Skills[8] = Endurance Aura
      • Set Items[8] = Endurance Aura
      • Set Skills[9] = Thorns Aura
      • Set Items[9] = Thorns Aura
      • Set Skills[10] = Trueshot Aura
      • Set Items[10] = Trueshot Aura
      • Set Skills[11] = Unholy Aura
      • Set Items[11] = Unholy Aura
      • Set Skills[12] = Vampiric Aura
      • Set Items[12] = Vampiric Aura
  • Skill Shop
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to Powerup
    • Actions
      • Set TempUnit = (Triggering unit)
      • Set TempPlayer = (Owner of (Triggering unit))
      • If (TempPlayer Equal to Player 1 (Red)) then do (Set PlayerNumber = 1) else do (Do nothing)
      • If (TempPlayer Equal to Player 2 (Blue)) then do (Set PlayerNumber = 2) else do (Do nothing)
      • If (TempPlayer Equal to Player 3 (Teal)) then do (Set PlayerNumber = 3) else do (Do nothing)
      • If (TempPlayer Equal to Player 4 (Purple)) then do (Set PlayerNumber = 4) else do (Do nothing)
      • If (TempPlayer Equal to Player 5 (Yellow)) then do (Set PlayerNumber = 5) else do (Do nothing)
      • If (TempPlayer Equal to Player 6 (Orange)) then do (Set PlayerNumber = 6) else do (Do nothing)
      • If (TempPlayer Equal to Player 7 (Green)) then do (Set PlayerNumber = 7) else do (Do nothing)
      • If (TempPlayer Equal to Player 8 (Pink)) then do (Set PlayerNumber = 8) else do (Do nothing)
      • If (TempPlayer Equal to Player 9 (Gray)) then do (Set PlayerNumber = 9) else do (Do nothing)
      • For each (Integer A) from 0 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Items[(Integer A)] Equal to (Item-type of (Item being manipulated))
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Skills[(Integer A)] for TempUnit) Less than 1
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • Items[0] Equal to (Item-type of (Item being manipulated))
                          • Items[1] Equal to (Item-type of (Item being manipulated))
                          • Items[2] Equal to (Item-type of (Item being manipulated))
                          • Items[3] Equal to (Item-type of (Item being manipulated))
                          • Items[4] Equal to (Item-type of (Item being manipulated))
                          • Items[5] Equal to (Item-type of (Item being manipulated))
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • PassiveAmt[PlayerNumber] Less than 3
                        • Then - Actions
                          • Game - Display to (Player group(TempPlayer)) for 1.00 seconds the text: (You bought + ((Name of (Item being manipulated)) + ( for + (Name of (Triggering unit)))))
                          • Unit - Add Skills[(Integer A)] to TempUnit
                          • Set PassiveAmt[PlayerNumber] = (PassiveAmt[PlayerNumber] + 1)
                          • Skip remaining actions
                        • Else - Actions
                          • Player - Set TempPlayer Current lumber to ((TempPlayer Current lumber) + 1)
                          • Game - Display to (Player group(TempPlayer)) for 1.00 seconds the text: You already have th...
                    • Else - Actions
                      • Do nothing
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • Items[6] Equal to (Item-type of (Item being manipulated))
                          • Items[7] Equal to (Item-type of (Item being manipulated))
                          • Items[8] Equal to (Item-type of (Item being manipulated))
                          • Items[9] Equal to (Item-type of (Item being manipulated))
                          • Items[10] Equal to (Item-type of (Item being manipulated))
                          • Items[11] Equal to (Item-type of (Item being manipulated))
                          • Items[12] Equal to (Item-type of (Item being manipulated))
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • AuraAmt[PlayerNumber] Less than 3
                        • Then - Actions
                          • Game - Display to (Player group(TempPlayer)) for 1.00 seconds the text: (You bought + ((Name of (Item being manipulated)) + ( for + (Name of (Triggering unit)))))
                          • Unit - Add Skills[(Integer A)] to TempUnit
                          • Set AuraAmt[PlayerNumber] = (AuraAmt[PlayerNumber] + 1)
                          • Skip remaining actions
                        • Else - Actions
                          • Player - Set TempPlayer Current lumber to ((TempPlayer Current lumber) + 1)
                          • Game - Display to (Player group(TempPlayer)) for 1.00 seconds the text: You already have th...
                    • Else - Actions
                      • Do nothing
                • Else - Actions
                  • Do nothing
            • Else - Actions
              • Do nothing



Now here is the issue;

Normally the hero starts with 1 skill point, and also gains one when they level up.
HeroAbilities.png

They can then use these points to spend on the abilities in their list.
LearnAbility.png


Now I have cleared all the abilities on the hero so that they start fresh, and people can choose their own skills.

So they head to the shop and buy a skill.
SkillShop.png


But here is the issue, instead of the skill going in their ability list it is added straight to the Hero's list of skills.
MyHero.png


How do I make it so that;
1. The Hero has an empty "Hero Abilities" list
2. Has one skill point to spend at the start
and
3. The skills are added to their "Hero Abilities" so they can level them up like normal instead of being sent right to the hero and requiring them to buy their ability level ups?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
By default (and hard-coded by Blizzard), any abilities added to a unit, it cannot be levelled up via the red cross mark.
The abilities inside the red cross mark should only be assigned to Heroes via Object Editor (before the game start, not while).

However, the trick could be done by using Spell Book, but hell yeah, it's gonna be messy.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
I think it's done by disabling all abilities at the start of the game.
Then, when a spell is cast (you know, one of those "buy spell"-abilities), you enable the bought spell for the buying player.
This way the hero can still level the enabled abilities and won't be able to see any disabled ones.

(It's the action "Player - Enable/Disable Ability").

Edit: It's going to be less messy, but still not that great. The heroes will need to have all abilities in the object editor (by shift-clicking), and you'll need to disable quite a lot of abilities for all players.
Theoretically (in my mind), it should work fine.
 
Level 3
Joined
Dec 1, 2012
Messages
27
Oops my mistake *derp* Yeah that works...but I am starting to think this may not be the best route to take..

You know how some games have an invisible backpack that follows you around (or possibly one that just has infinite range, I am not sure how its done), would it be possible to turn that into a skill trainer, that has "Spell Book" like categories (like "Passive Skills", "Auras", "Toggle Skills" and "Active Skills") that you can buy the skills from instead of using the normal skill shop, and just have the hero, gain one lumber every level to do so? (I know how to do the one lumber thing :) )
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Yes.

Make two spells for every dummy spell you want to add inside of the spellbook. One of the spells is the main spell your adding and the other is a dummy spellbook that contains the main spell and has the same base order id as the spellbook you want to add to. On map init, disable the dummy spellbook. When u want to add the main spell to a spellbook, add the dummy spellbook that contains the main spell.

e/ Kinda misread what you said lol

just make the abilities inside of the spellbook categories all channel instant dummy abilities and when the channel dummy is cast, if lumber > 0 then subtract 1 wood than add spell to player

BTW you dont need those Do Nothings. They just add space to your map and stop the thread for a milisecond
 
Level 3
Joined
Dec 1, 2012
Messages
27
Now I have a spellbook for storing the hero's passives and auras in, will this conflict with the spellbooks for my skill trainer?

Also if I shift click "Data - Base Order ID" and enter a custom value that is not in the list will it work? (IE, I want to change "Data - Base Order ID" for my passive/aura book "PassiveAuraBook")
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
I dont understand your first question

and no on your second question, you have to choose from the list of pre-selected order ids
 
Level 3
Joined
Dec 1, 2012
Messages
27
What is an example skill that I can use as I base? (not really sure what are channeling skills are, I pretty much only use passives and auras on my Heroes)

EDIT: Read there is an ability called Channel is that what you mean?
 
Last edited:
Level 19
Joined
Aug 8, 2007
Messages
2,765
Read this post for more info: http://www.hiveworkshop.com/forums/2161992-post2.html
The only thing you need to know is to adjust the Data - Base Order ID to any string that has the same Target-type with your ability.

Let's say your Channel is a Target-unit ability, well, you should change the Order ID to Target-unit based string order, such as thunderbolt (Storm Bolt Base Order ID) / chainlightning (Chain Lightning Base Order ID) / etc.

Here's a a few list of String Order ID;

Target-unit
acidbomb
chainlightning
charm
cripple
curse

Target-point
blink
blizzard
carrionswarm
earthquake

Instant-target
avatar
berserk
phaseshift
waterelemental

Make sure after you set the Base Order ID, you must follow the order string for it to work.

Let's say you set the Target-unit spell ID to thunderbolt, you must use this action to make it work;
  • Unit - Order (Triggering unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
If let's say you set it to chainlightning, this will work;
  • Unit - Order (Triggering unit) to Orc Far Seer - Chain Lightning (Target unit of ability being cast)
You just have to find the right action depending on your pre-set Base Order ID.

NOTE: AND MAKE SURE EACH SPELL HAS ITS OWN UNIQUE ORDER ID FOR A SINGLE UNIT, ELSE YOU WILL BE OVERLAPPING ITS ORDER ID.
Just create a new spell based on Channel, if you want it to be channeled - make "Disable Other Abilities" to False, set the "Follow Through Time" to the duration of the channeling time that you want, tick "Visible" in the Options field and then if you want to use it as an AoE spell and want the targeting image to show up tick "Targeting Image" too and choose your "Target Type" to whatever you want to be required for a target of the spell, leave the Base Order ID to it's default (so it won't mess up with other spells if you do not base them on Channel with it's default ID) (Do not take this advice if you have multiple channel-based spells), the rest is like a normal ability.
sdfsafeagsdf
 
Status
Not open for further replies.
Top