• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Spell Book Question

Status
Not open for further replies.
Level 7
Joined
Nov 13, 2006
Messages
243
Ok so i have 3 spell books per hero and they all have 11 spells so in total 33 spells per hero.

So my question is , is there a possibility that whenever the hero learns lets say Spellbook 1 Level 2 to make all abilities level 2 in that spellbook without a trigger?
 
Level 11
Joined
Aug 25, 2006
Messages
971
Actually, it is possible. (in a way) For every level of the ability make another ability. Then for each level-up of the spell book, make it use the higher up abilities. (Level 2 of the spell book uses all the level 2 abilities)
 
Level 11
Joined
Aug 25, 2006
Messages
971
Could you try re-phrasing that question? I don't really understand. However, JNGP does come with an extension that allows you to merge object editor data.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Why not with triggers?
It is easy.
Just make a trigger with hero learns skill event.
Conditions And multiple conditions:
Skill learned is equal to spell book #
Level of spell book # is atleast 2
And the actions
Set level of Ability (the one in the spell book) to curent level of spell book # (you just need to add every ability)
 
Level 7
Joined
Nov 13, 2006
Messages
243
should i start telling you why not?

ok , first of all , i have 11 abilities per spellbook , 3 speelbooks per hero, 5 heroes per race and 10 races the rest is math , just think ...

Oh and 10 levels for each spelbook (PS: all spellbooks have different spells)

EDIT:currently developing a system to aid in that
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Then i would suggest using a single trigger for all the spellbooks(not sure of the final syntax ) but it will be a bit tricky.
Events:
a hero learns an ability
Conditions:
level of ability learned greater than or equal to 2
actions:
(Now i will explain the logic but cannot help with the actual source/trigger)
Get the skill name/id in a variable.
get the all the skills in the book using the variable from above and set them to a variable(array)
Level them all up.
But it is easier said than done. The tricky thing is to get all the spells in the book after that it is child's play. To be honest I'm not sure it is possible.
 
Level 7
Joined
Nov 13, 2006
Messages
243
Then i would suggest using a single trigger for all the spellbooks(not sure of the final syntax ) but it will be a bit tricky.
Events:
a hero learns an ability
Conditions:
level of ability learned greater than or equal to 2
actions:
(Now i will explain the logic but cannot help with the actual source/trigger)
Get the skill name/id in a variable.
get the all the skills in the book using the variable from above and set them to a variable(array)
Level them all up.
But it is easier said than done. The tricky thing is to get all the spells in the book after that it is child's play. To be honest I'm not sure it is possible.

i'm jassing it not GUI anyway my project will not use map imported jass ... or triggers ..
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
anyway my project will not use map imported jass ... or triggers ..
Not sure what relevance this has...

Anyway unless you want to 'code' all of the spells (one way or another) you will have to come up with a way(function) 'get'-ing the name of the spell book and returning an array of all the skills in it.
This way you will be able to compact all of the 1650 spells leveling in 30-50 lines(not including the mentioned above function).
 
Status
Not open for further replies.
Top