Adding Abillities Ingame.

WackO_WilL

New Member
Reaction score
4
I couldnt find a thread on this. So i thought id ask you guys. Im Working on an RPG where, you start with 1 in all stats, 50 health, and 15 mana. And you Choose your main Attribute, STR,AGIl,INT, but you dont get abillities like normal heros, you attain them from tomes. You kill a unit, you get a tome, you use it. a trigger removes it. And adds abillity to your hero. How ever. If i level. I cannot use it. And i was wondering if anyone out there. Knew how to fix this?

All in all. I want to be able to make a hero force learn a spell from an item. And then be able to upgrade that abillity from his levels. Anyone got any ideas? I got my code. Hold on
Trigger:
  • Raise Skeleton
    • Events
      • Unit - A unit Uses an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Not equal to Tome of Chain Lightning
          • And - All (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to Tome of Raise Skeletons
        • Then - Actions
          • Item - Remove (Item being manipulated)
          • Unit - Add Raise Skeleton to (Hero manipulating item)
        • Else - Actions
          • Do nothing


Im stumped, Ive been sitting here for 3 hours looking for a work around.

Also, you can Unlearn spells. and i noticed when i unlearn a spell. IT stays in my Spell card, Any idea how to remove it?

This is what i got.

Also, I should add, The research Card button doesnt appear unless the unit naturally has a spell. If you grant him a spell. No abillity upgrade button appears.

Thanks in advance.
 
I can't find a way to solve your problem but what i'm suggesting is that you try to level up the skills that the hero has learnt via triggers, sorta like if the hero gains a level the ability levels up or he gets a skill point (Sorta like an item that can be used)

Sorry but i can't really solve ur problem
 
Thanks. But I mean. When he learns an abillity. The option to Upgrade it with his level Isnt there. Like, THe upgrade abillity with a point Icon. ANd when i do add that. It still doesnt add the spell to the spell card. hmmm.
 
How about adding a unit that allows the hero to level up his spells? like upgrades and once the upgrade is done the hero's spell levels up.
 
your item-type cant be "tome of raise skeletons" and "tome of chain lightning" at the same time.
remove that part about chain lightning.
put the part about raise skeletons into the trigger conditions if you want.
 
Trigger:
  • Raise Skeleton
    • Events
      • Unit - A unit Uses an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Tome of Raise Skeletons
        • Then - Actions
          • Item - Remove (Item being manipulated)
          • Unit - Add Raise Skeleton to (Hero manipulating item)
        • Else - Actions
          • Do nothing


That better? Little easier on the eyes. Still havent found a solution. When i get home. I might scrounge around a bit. Just might make it so every time you use a tome. it adds to level. Then you can have a maximum of 5 skills anyways. But id rather go by hero level. so people dont get way too strong with spells.

Man i just got an idea after writing this. Ill make a Dialog that lets you upgrade your spell as you level. ill have to create an invisiable table for it. But granted my idea works. i can share it with you guys later.
 
your item-type cant be "tome of raise skeletons" and "tome of chain lightning" at the same time.
remove that part about chain lightning.
put the part about raise skeletons into the trigger conditions if you want.
One checks if it is, one if it isnt.
 
Add all abilities the heroes can learn through items to their skills in the editor.
Then make a trigger that disables those abilities for all players, and then when they use the item, just do what you're doing + enable the abilities, That should work, I can do a script if you don't understand it :D
 
I will show you my trigger on this matter, if you make the item on a tome of power or tome of agility or something like that the item will disappear then you pick it up! Only chance the ability's on it! So that he don't get more lvl or agility...

Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Item-type of (Item being manipulated)) Equal to Tome of Abosorb Mana
    • Then - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Absorb Mana (lvl 1) for (Hero manipulating item)) Equal to 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of (Hero manipulating item)) Current lumber) Greater than or equal to 1
            • Then - Actions
              • Unit - Add Absorb Mana (lvl 1) to (Hero manipulating item)
              • Player - Add -1 to (Owner of (Hero manipulating item)) Current lumber
              • Floating Text - Create floating text that reads -1 above (Hero manipulating item) with Z offset 11.00, using font size 14.00, color (50.00%, 100.00%, 50.00%), and 0.00% transparency
              • Floating Text - Set the velocity of (Last created floating text) to 10.00 towards 70.00 degrees
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
            • Else - Actions
              • Item - Remove (Last created item)
              • Game - Display to (All players) the text: You haven't enatch ...
              • Sound - Play KnightNoLumber1 <gen> at 100.00% volume, attached to (Hero manipulating item)
        • Else - Actions
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Item-type of (Item being manipulated)) Equal to Tome of Abosorb Mana
      • Then - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Level of Absorb Mana (lvl 1) for (Hero manipulating item)) Greater than or equal to 1
          • Then - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Owner of (Hero manipulating item)) Current lumber) Greater than or equal to 1
              • Then - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (Level of Absorb Mana (lvl 1) for (Hero manipulating item)) Equal to 1
                  • Then - Actions
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • (Hero level of (Hero manipulating item)) Greater than or equal to 5
                      • Then - Actions
                        • Player - Add -1 to (Owner of (Hero manipulating item)) Current lumber
                        • Floating Text - Create floating text that reads -1 above (Hero manipulating item) with Z offset 11.00, using font size 14.00, color (25.00%, 100.00%, 25.00%), and 0.00% transparency
                        • Floating Text - Set the velocity of (Last created floating text) to 10.00 towards 70.00 degrees
                        • Floating Text - Change (Last created floating text): Disable permanence
                        • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
                        • Unit - Increase level of Absorb Mana (lvl 1) for (Hero manipulating item)
                      • Else - Actions
                        • Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: You don't are in re...
                  • Else - Actions
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • (Level of Absorb Mana (lvl 1) for (Hero manipulating item)) Equal to 2
                      • Then - Actions
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • (Hero level of (Hero manipulating item)) Greater than or equal to 10
                          • Then - Actions
                            • Player - Add -1 to (Owner of (Hero manipulating item)) Current lumber
                            • Floating Text - Create floating text that reads -1 above (Hero manipulating item) with Z offset 11.00, using font size 14.00, color (25.00%, 100.00%, 25.00%), and 0.00% transparency
                            • Floating Text - Set the velocity of (Last created floating text) to 10.00 towards 70.00 degrees
                            • Floating Text - Change (Last created floating text): Disable permanence
                            • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
                            • Unit - Increase level of Absorb Mana (lvl 1) for (Hero manipulating item)
                          • Else - Actions
                            • Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: You don't are in re...
                      • Else - Actions
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • (Level of Absorb Mana (lvl 1) for (Hero manipulating item)) Equal to 3
                          • Then - Actions
                            • Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: This skill are alre...
                          • Else - Actions
              • Else - Actions
                • Game - Display to (All players) the text: You haven't enatch ...
                • Sound - Play KnightNoLumber1 <gen> at 100.00% volume, attached to (Hero manipulating item)
          • Else - Actions
      • Else - Actions
 
Thanks for the trigger. But im working on my own where it brings up a dialog box. and reads what spells your hero has. and it cost 1 lumber to add to a spells level. So its something like.
You have 2 heros. ones named Your hero, and the other is named Upgrade ability. when you click upgrade ability, it selects your 2ed hero. but automatical deselects it, and selects your hero. at the same time it opens a dialog box with your heros spells. And you can upgrade them there.

There it will have 7 buttons, Theyll go in the order you learned the spells. Example: Chain Lightning,Raise Skelitons, Empty, Empty, Empty, Unlearn Spell, and Return.

if you press Empty, it shows a dialog with no button for 3 seconds saying that there is no skill here!

If you press chain lightning with 0 lumber, itll say No ability point is avaliable!

And if you press Unlearn spell, It opens a second dialog, with your saved spells. you can click them to unlean them. Return makes you return to game.

When I get the chain of triggers done. I post them up on the fourm somewhere, and add a demo map with my trigger chain on it. So you guys can mess with it.

But thanks all for the help! i have found my solution! How ever. If you want to keep working on the same Approach, where your Skills are learned normaly. I will be more than happy. Save me alot of triggering time :)
 
Yes. I removed it after seeing that my silly self. But now another problem Arises!

Trigger:
  • Raise Skeleton P1
    • Events
      • Unit - A unit Uses an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • ((Triggering player) Food used) Equal to 0
              • (Triggering unit) Equal to HeroArray[1]
              • (Item-type of (Item being manipulated)) Equal to Tome of Raise Skeletons
        • Then - Actions
          • Player - Add 1 to (Triggering player) Food used
          • Item - Remove (Item being manipulated)
          • Unit - Add Raise Skeleton to HeroArray[1]
          • Set P1Abillities[1] = Raise Skeleton
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Triggering player) Food used) Equal to 1
                  • (Triggering unit) Equal to HeroArray[1]
                  • (Item-type of (Item being manipulated)) Equal to Tome of Raise Skeletons
            • Then - Actions
              • Player - Add 1 to (Triggering player) Food used
              • Item - Remove (Item being manipulated)
              • Unit - Add Raise Skeleton to HeroArray[1]
              • Set P1Abillities[2] = Raise Skeleton
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • ((Triggering player) Food used) Equal to 2
                      • (Triggering unit) Equal to HeroArray[1]
                      • (Item-type of (Item being manipulated)) Equal to Tome of Raise Skeletons
                • Then - Actions
                  • Player - Add 1 to (Triggering player) Food used
                  • Item - Remove (Item being manipulated)
                  • Unit - Add Raise Skeleton to HeroArray[1]
                  • Set P1Abillities[3] = Raise Skeleton
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • And - All (Conditions) are true
                        • Conditions
                          • ((Triggering player) Food used) Equal to 3
                          • (Triggering unit) Equal to HeroArray[1]
                          • (Item-type of (Item being manipulated)) Equal to Tome of Raise Skeletons
                    • Then - Actions
                      • Player - Add 1 to (Triggering player) Food used
                      • Item - Remove (Item being manipulated)
                      • Unit - Add Raise Skeleton to HeroArray[1]
                      • Set P1Abillities[4] = Raise Skeleton
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • And - All (Conditions) are true
                            • Conditions
                              • ((Triggering player) Food used) Equal to 4
                              • (Triggering unit) Equal to HeroArray[1]
                              • (Item-type of (Item being manipulated)) Equal to Tome of Raise Skeletons
                        • Then - Actions
                          • Player - Add 1 to (Triggering player) Food used
                          • Item - Remove (Item being manipulated)
                          • Unit - Add Raise Skeleton to HeroArray[1]
                          • Set P1Abillities[5] = Raise Skeleton
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • And - All (Conditions) are true
                                • Conditions
                                  • ((Triggering player) Food used) Equal to 5
                                  • (Triggering unit) Equal to HeroArray[1]
                                  • (Item-type of (Item being manipulated)) Equal to Tome of Raise Skeletons
                            • Then - Actions
                              • Game - Display to (Player group((Triggering player))) the text: You do not have an ...
                            • Else - Actions
                              • Do nothing


This is my New Spell Learn Trigger, your food cap is 5. The maximum Ability count is 5. Its set so, If player 1 Tries to learn with 5 food, It doesn't work. How ever, Depending on what food is used, 1-5, Is the slot it uses. So if the ability Uses 1 food It is slot one. And shows up first in the Upgrade Dialog.

Trigger:
  • P1Heroabilityupgrade
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • (Triggering unit) Equal to Upgrade Abilities 0071 <gen>
    • Actions
      • Selection - Select HeroArray[1] for Player 1 (Red)
      • Trigger - Run P1 UG String 1 <gen> (checking conditions)


This trigger is the Starting trigger for dialog. Upgrade Abilities is a hero, So the icon is in the top left. if you click that it selects the hero, Which is then deselected then moved onto this sequence of triggers:

Trigger:
  • P1 UG String 1
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • P1Abillities[1] Equal to Empty
        • Then - Actions
          • Dialog - Clear HeroSkillDialog[1]
          • Dialog - Change the title of HeroSkillDialog[1] to Cick an ability...
          • Dialog - Create a dialog button for HeroSkillDialog[1] labelled Empty
          • Set Heroskilldialogbuttons[1] = (Last created dialog Button)
          • Trigger - Run P1 UG String 2 <gen> (checking conditions)
        • Else - Actions
          • Dialog - Clear HeroSkillDialog[1]
          • Dialog - Change the title of HeroSkillDialog[1] to Cick an ability...
          • Dialog - Create a dialog button for HeroSkillDialog[1] labelled (Name of P1Abillities[1])
          • Set Heroskilldialogbuttons[1] = (Last created dialog Button)
          • Trigger - Run P1 UG String 2 <gen> (checking conditions)


This checks if the ability Array is set to an Empty ( a spell that the hero will never get, Just made an empty spell that does nothing so it looks neater)

It checks for If its ability slots are still set for empty.

If it is, It names the button for upgrading, Empty, If its not. It renames the button to the Ability, For Slot 1, Which is the first ability you learn.

After checking, Either way empty or not. it'll move onto the next trigger, Which is to check slot 2, then 3, then 4.

Slot 2:
Trigger:
  • P1 UG String 2
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • P1Abillities[2] Equal to Empty
        • Then - Actions
          • Dialog - Create a dialog button for HeroSkillDialog[1] labelled Empty
          • Set Heroskilldialogbuttons[2] = (Last created dialog Button)
          • Trigger - Run P1 UG String 3 <gen> (checking conditions)
        • Else - Actions
          • Dialog - Create a dialog button for HeroSkillDialog[1] labelled (Name of P1Abillities[2])
          • Set Heroskilldialogbuttons[2] = (Last created dialog Button)
          • Trigger - Run P1 UG String 3 <gen> (checking conditions)


Slot 3:
Trigger:
  • P1 UG String 3
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • P1Abillities[3] Equal to Empty
        • Then - Actions
          • Dialog - Create a dialog button for HeroSkillDialog[1] labelled Empty
          • Set Heroskilldialogbuttons[3] = (Last created dialog Button)
          • Trigger - Run P1 UG String 4 <gen> (checking conditions)
        • Else - Actions
          • Dialog - Create a dialog button for HeroSkillDialog[1] labelled (Name of P1Abillities[3])
          • Set Heroskilldialogbuttons[3] = (Last created dialog Button)
          • Trigger - Run P1 UG String 4 <gen> (checking conditions)


Slot 4:
Trigger:
  • P1 UG String 4
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • P1Abillities[4] Equal to Empty
        • Then - Actions
          • Dialog - Create a dialog button for HeroSkillDialog[1] labelled Empty
          • Set Heroskilldialogbuttons[4] = (Last created dialog Button)
          • Trigger - Run P1 UG String 5 <gen> (checking conditions)
        • Else - Actions
          • Dialog - Create a dialog button for HeroSkillDialog[1] labelled (Name of P1Abillities[4])
          • Set Heroskilldialogbuttons[4] = (Last created dialog Button)
          • Trigger - Run P1 UG String 5 <gen> (checking conditions)


Slot 5:
Trigger:
  • P1 UG String 5
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • P1Abillities[5] Equal to Empty
        • Then - Actions
          • Dialog - Create a dialog button for HeroSkillDialog[1] labelled Empty
          • Set Heroskilldialogbuttons[5] = (Last created dialog Button)
          • Dialog - Show HeroSkillDialog[1] for Player 1 (Red)
        • Else - Actions
          • Dialog - Create a dialog button for HeroSkillDialog[1] labelled (Name of P1Abillities[5])
          • Set Heroskilldialogbuttons[5] = (Last created dialog Button)
          • Dialog - Show HeroSkillDialog[1] for Player 1 (Red)


Slot 5, Generates the button for the last slot on the List. And shows the dialog. How ever. It seems when i run it ingame. It doesnt show up when i select my hero. it De-selects it. But will not show dialog. Any idea why?

Again, Thanks in Advance.
 
Trigger:
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -unlearn CL as An exact match
    • Conditions
    • Actions
      • Unit - Remove Spell[1] from (Last created unit)

There's no such last created unit.
 
You can ignore that. That was for mere Testing. I added that in somewhere? I cant seem to find where. Ill have to remove it. Last created unit is my Hero unit.

Also i found the problem. You cannot select a unit that you cannot See. So I was selecting a Unit That had 0 sight, and off the map. How ever, I have found an alternate solution. while testing my hero has 7 open slots avaliable for spells. There is 2 options, make a spell that does nothing. but when used opens dialog. Much like the heros research ability Icon. Or Set up where you can Upgrade at Certain units. For example, Set a trigger where a unit has to be With in X distance of unit type, and selects unit. how ever, now im going to allow 6 abilities, and put in the dummy spell that opens Dialog.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top