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

Leveling Spells in Spellbooks

Status
Not open for further replies.
Level 2
Joined
Dec 31, 2006
Messages
5
Alright, if I'm in the wrong forum I apologize, but I wasn't sure where to post this problem. Anyways, on to said problem...


I'm trying to work on some hero ideas while contemplating making an ORPG, and something I'm trying to do is make "trees" of abilities for heroes, meaning if they level up "Tree 1", they'll get more spells based on the type of ability tree it is. Think World of Warcraft's talent tree.

Now to do this, I figured I'd make them have to level up spellbooks. Unfortunately a problem came in when I got to testing it out. Spellbook levels fine. Ability that I made to test is in there. The problem I ran into was that the ability inside the spellbook isn't leveling up as I'd like it to. Tried searching through the spellbook in the object editor, but couldn't find anywhere to be able to level up abilities inside.

So, I was hoping I could post up here and maybe someone could tell me how to do this, if it's possible, and if not, what a good means of doing this would be. I can think of a way of triggering the learning, but the way I'm thinking of would take far too much triggers.

Here's a more detailed idea of what I'm trying to do:
Tree 1
Level 1: Ability1 [Level 1]
Level 2: Ability1 [Level 2]
Level 3: Ability1 [Level 3]; Ability2 [Level 1]
Level 4: Ability1 [Level 4]; Ability2 [Level 2]

Now I hope that's detailed enough, because, to be honest, I don't know how to explain it any more than that.


If this has been asked before I apologize. I tried searching, but everything I saw on spellbooks didn't involve the leveling of the abilities inside the spellbook.


If y'all could help me out, I'd greatly appreciate it. Tried figuring it out on my own, but just couldn't manage.

Thanks,
~Grim-Death
 
Level 7
Joined
Jul 18, 2009
Messages
272
With triggers, you can level abilities inside spellbooks like any other ability, with "Unit - Set level of ability for unit". It doesn't matter that they are inside a spellbook.

Or you could do it completely without triggers...
Make one extra ability for each level of your abilities (so that "Ability1 [Level 1]" and "Ability1 [Level 2]" are two different abilities) and give each level of the spellbook the abilities/levels it should have.
But depending on the number of levels your spells have this could require quite many abilities. ^^
 
Level 2
Joined
Dec 31, 2006
Messages
5
Alright, thank you. I wasn't sure if it was possible just within the spellbook to level up abilities without triggering or a mass of abilities. I tossed together a simple trigger using my limited knowledge, but I'm not sure if I'm over-complicating it or if this is about as good as a trigger for this will get:

  • Events
    • Unit - A unit Learns a skill
  • Conditions
  • Actions
    • Multiple Functions If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Learned Hero Skill) Equal to (==) Spiritual Blight
      • Then - Actions
        • Multiple Functions If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Level of Spiritual Blight for (Triggering unit)) Equal to (==) 1
          • Then - Actions
          • Else - Actions
            • Multiple Functions If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Level of Spiritual Blight for (Triggering unit)) Equal to (==) 3
              • Then - Actions
                • Unit - Increase level of Soul Bolt (Neutral Hostile) for (Triggering unit)
              • Else - Actions
                • Multiple Functions .....
Since this will a huge trigger by the time I'm finished with one tree, I wasn't sure if there was an easier way of doing this, or if I'll just have to deal with a large trigger. As I'm sure you've noticed by this, I'm not too great with the map editor just yet.

Now, if there was only one ability in the tree, I'm sure variables could be used to shorten the trigger, but since there will be multiple abilities later on, would it still be possible? EDIT:Oh, and since I noticed I forgot to ask, is there any way for the level to be kept? The spellbook leveled up to 3 and the ability leveled up as it should, but when I leveled the spellbook to 4, the ability was level 1 again.


EDIT2: Nevermind, I feel kinda stupid for not noticing this before.. To level up the ability based on the level of the tree, I figured out how to cut the trigger down tremendously.

  • Events
    • Unit - A unit Learns a skill
  • Conditions
  • Actions
    • Multiple Functions If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Learned Hero Skill) Equal to (==) Spiritual Blight
      • Then - Actions
        • Unit - Set level of Soul Bolt (Neutral Hostile) for (Triggering unit) to ((((Learned skill level) - 1) / 2) + 1)
 
Last edited:
Status
Not open for further replies.
Top