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.
 

ianu74

New Member
Reaction score
8
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
 

WackO_WilL

New Member
Reaction score
4
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.
 

ianu74

New Member
Reaction score
8
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.
 

perkeyone

something clever
Reaction score
71
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.
 

WackO_WilL

New Member
Reaction score
4
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.
 

crazyfanatic

New Member
Reaction score
20
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.
 

jomik

New Member
Reaction score
17
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
 

Lord Regno

Active Member
Reaction score
19
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
 

WackO_WilL

New Member
Reaction score
4
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 :)
 

WackO_WilL

New Member
Reaction score
4
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.
 

GetTriggerUnit-

DogEntrepreneur
Reaction score
129
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.
 

WackO_WilL

New Member
Reaction score
4
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.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top