HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Levelling a spell wihin a spellbook.

10-26-2009, 09:20 AM#1
Kino
How do I go about increasing the level of a particular ability in a spellbook?

Theres was a topic awhile ago about it but it seems that the suggested solution isnt working for me.
10-26-2009, 10:46 AM#2
Anitarf
Do you mean like a hero skill or a regular ability? In my experience, using SetUnitAbilityLevel works just fine on abilities inside spellbooks.
10-26-2009, 11:31 AM#3
Askhati
Alternatively... You could simply make a player upgrade, with the function: levels ability (cannot remember the correct syntax now, but it's something in that line), and increments of 1. Then, whenever you want the ability to increase in level, you simply set the player upgrade to one level higher, which then increases the level of the targeted unit ability as well. I played around with something like that in the beginning of the year, and the results were solid.
10-26-2009, 11:34 AM#4
Anachron
Quote:
Originally Posted by Askhati
Alternatively... You could simply make a player upgrade, with the function: levels ability (cannot remember the correct syntax now, but it's something in that line), and increments of 1. Then, whenever you want the ability to increase in level, you simply set the player upgrade to one level higher, which then increases the level of the targeted unit ability as well. I played around with something like that in the beginning of the year, and the results were solid.
This is awful dude. Upgrades can't be removed or downgraded, so I wouldn't do it this way.
10-26-2009, 12:35 PM#5
Kino
Quote:
This is awful dude. Upgrades can't be removed or downgraded, so I wouldn't do it this way.

I decided not to use the upgrade method due to the vast uneccesary object editor work.

Quote:
SetUnitAbilityLevel

Its for a normal unit ability, i did use that function but it doesnt seem to be working.
Perhaps someone could explain how exactly to use this.
10-26-2009, 12:38 PM#6
Anachron
Quote:
Originally Posted by Kinorhynkar
Perhaps someone could explain how exactly to use this.
There is no 'How exactly to use this'.

Use it like this:
Collapse JASS:
call SetUnitAbilityLevel(unit, 'abID', level)
And if it doesn't work, there is no way to do such things.
10-26-2009, 12:54 PM#7
Kino
Thats exactly what im doing, but its still not working
Is there a reason why it may not work?
10-26-2009, 01:00 PM#8
Anachron
Are you trying to change the spellbooks level?
Are you sure the unit has the spelllbook?
Are you sure the ability is in there?
Are you sure all IDs are correct?
10-26-2009, 01:03 PM#9
Kino
Quote:
Are you trying to change the spellbooks level?
Are you sure the unit has the spelllbook?
Are you sure the ability is in there?
Are you sure all IDs are correct?

Im trying to increase the level of 1 of the spellbooks abilities.
Yes the unit has the correct spellbook.
Yep the ability is there its simply not leveling up.
Yes the Id's are correct.
10-26-2009, 01:06 PM#10
Anachron
Make sure you do not use this:
Collapse JASS:
native          IncUnitAbilityLevel takes unit whichUnit, integer abilcode returns integer

but this:
Collapse JASS:
native          SetUnitAbilityLevel takes unit whichUnit, integer abilcode, integer level returns integer
10-26-2009, 01:18 PM#11
Kino
Quote:
native SetUnitAbilityLevel takes unit whichUnit, integer abilcode, integer level returns integer

Ok just tested, it work with other abilities but for some reason the particlular ability im trying to level isnt owrking.
Maybe its beacuse its based on charge gold and lumber or some wierd reason.

Did somemore testing it seems that it was working all along.
However it seems that somehow the tooltip never updates.
10-26-2009, 02:26 PM#12
Anachron
Quote:
Did somemore testing it seems that it was working all along.
However it seems that somehow the tooltip never updates.
Sure? Maybe it updates when you close the spellbook and open again?
10-26-2009, 02:30 PM#13
Anitarf
Quote:
Originally Posted by Kinorhynkar
Did somemore testing it seems that it was working all along.
However it seems that somehow the tooltip never updates.
Well, does the ability have different tooltips for different levels?
10-26-2009, 03:35 PM#14
Panto
A handful of bugged abilities don't level effectively or don't show it when they do. This is the only problem ability for you?

Also, the spellbook is a little funny if the spellbook ability itself is leveled, in which situation the abilities inside it use the details from their corresponding level, iirc.

Now that wasn't confusing.
10-26-2009, 04:49 PM#15
Kino
Well i changed the base ability to channel and it works fine now.

Previously it was based off "Charge Gold and Lumber".