• 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.

Spellbook Questions

Status
Not open for further replies.
Level 3
Joined
Oct 19, 2007
Messages
51
So I'm working on reworking the way that the bacteria race in my virus infection map works. I'm planning on making it so that whenever a bacteria reproduces it passes its abilities onto its offspring, with some slight variation. I'm going to have 11 abilies because I plan to fill one spellbook with passives.

I've read a few tutorials regarding spellbooks, but none of them seem to cover quite what I want to do--they all cover a case where only one instance per player of a unit exists. (ie they use a player disable spell function or whatever)

I think I have a grasp of what I'm going to have to do, but I want to see if anyone else has a better idea. It seems im going to have to have a bacteria with an empty spellbook ability, and have 11 spellbook abilities (one per ability) with the same order id as the empty one. When a bacteria is determined to have a certain ability, i add the appropriate spellbook ability, then use a SetUnitAbilityLevel to control what level the ability is at.

Is that an accurate assessment of what will work? and also is there an easier way?

Additionally, as a side note, I have some abilities based off of item abilities (Item Increase Attack Damage or whatever) that, even though I have assigned an icon and an icon position to it, does not display an icon. Is there something about using item abilities I don't know about?

Thanks
SkoobyDoo
 
Level 3
Joined
Sep 13, 2008
Messages
63
So I'm working on reworking the way that the bacteria race in my virus infection map works. I'm planning on making it so that whenever a bacteria reproduces it passes its abilities onto its offspring, with some slight variation. I'm going to have 11 abilies because I plan to fill one spellbook with passives.
If I understand correctly, you have one main unit with produces offspring. And each offspring will have the main units abilities, with some slight differences.

I've read a few tutorials regarding spellbooks, but none of them seem to cover quite what I want to do--they all cover a case where only one instance per player of a unit exists. (ie they use a player disable spell function or whatever)
If your offspring are only getting passive abilities you can use the spellbook trick. Trigger: enable spellbook>enable abilities (and set levels)>disable spellbook. Your offspring will still have all the passive abilities but they'll be hidden in the spellbook (which you can't see). Note: your unit must have the spellbook ability already, in the object editor. You can disable the ability when the game starts so the player can't see it.

I think I have a grasp of what I'm going to have to do, but I want to see if anyone else has a better idea. It seems im going to have to have a bacteria with an empty spellbook ability, and have 11 spellbook abilities (one per ability) with the same order id as the empty one. When a bacteria is determined to have a certain ability, i add the appropriate spellbook ability, then use a SetUnitAbilityLevel to control what level the ability is at.
One spellbook and 11 abilities. If your main units abilities and the offspring's abilities are the same just use those for the spellbook abilities. Otherwise you'll need to make copies of all the abilities and modify them (for the variations you wanted).

Is that an accurate assessment of what will work? and also is there an easier way?
Yes. No.

Additionally, as a side note, I have some abilities based off of item abilities (Item Increase Attack Damage or whatever) that, even though I have assigned an icon and an icon position to it, does not display an icon. Is there something about using item abilities I don't know about?
I don't know. Some abilities don't display at all or don't display because a setting is wrong. I've had a lot of trouble with the channel ability. The only way to get help on this map would be to give more information on the ability or post the map itself.
 
Level 3
Joined
Oct 19, 2007
Messages
51
I don't want the abilities to be hidden. The play should know whether or not a certain unit has cleave or crit or whatever. The idea is to allow the player to breed the units he/she wants.


I cant use one spellbook, because then all the abilities start at level one. I dont want all units having every ability at all times. I want them to start with 2 or 3 and have to get the others randomly. If I disable them for the player, than NO unit in their entire army can have the ability. If I remove it from the unit and later add it it doesn't go into the spellbook. As far as my research has showed me the only way to dynamically add spells to a spellbook in a variable manner is to add a spellbook containing the desired spell(s) that has the same order id as the destination spellbook, and disable the added spellbook. Though the added spellbook is disabled, the shared order id pops the skills into the other one, giving the illusion that the spells have been 'added' to the other spellbook.


As far as the item abilities not working properly I guess I'll just have to resort to alternatives that don't quite fit ie instead of item Attack Damage Increase ill just use a command aura with a custom buff. Kinda lame, but unless someone has a better solution...

I'd post the entire map, but i've already had an issue on this very website of a version I posted being stolen, so I'll just post a skeleton map with object data copied over if you want to look at it.


Mk i copied over the relevant ability data into an empty map. They are all custom night elf unit abilities. Currently there is one spellbook (DNA) and 9 abilities (binary fission is not related to this system. it is the method by which the units reproduce). Armor, Life, Damage, and Bacterial Frenzy (Guess which ones don't have permanent names yet :p) are all based on item abilities, and none of them show up in the spellbook, while the rest do. IT is clear that the unit HAS said abilities, however, because the unit with the spellbook has 15 extra life, +1 dmg, +2 armor(Accident, one coming from spiked carapace), and its attack speed is listed in green (indicating that it is being buffed).
The other abilities show up fine in the spellbook.
 

Attachments

  • Problem.w3x
    17.8 KB · Views: 52
Level 6
Joined
Jun 14, 2008
Messages
176
As far as the item abilities not working properly I guess I'll just have to resort to alternatives that don't quite fit ie instead of item Attack Damage Increase ill just use a command aura with a custom buff. Kinda lame, but unless someone has a better solution...
Some item abilities just don't plain show up, even if you set icon info on them.

The easiest way to fix this problem is to make a "dummy" passive ability(that does nothing, example make it based off of evasion with 0% evasion) and edit the tooltip info so it displays what you want it to display.

For example, if you want to give a unit an item ability like +damage item ability, then give it to that unit but also add the "dummy" passive ability(based off of evasion).

Edit the tooltip(of the dummy ability based off of evason) to say "Damage Bonus"(for example), then make it display "Adds 20 damage".
 
Level 14
Joined
Nov 20, 2005
Messages
1,156
One display spellbook. Not disabled, no spells in it.

Eleven disabled spellbooks, same order id, each containing one spell.

When you want to add the spell in a spellbook, add the spellbook, and it goes into the display spellbook for that unit (or at least appears to).
 
Status
Not open for further replies.
Top