• 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] Many channel based abilities - how to choose base ID

Status
Not open for further replies.
Level 28
Joined
Feb 2, 2006
Messages
1,631
Hey,
in my grimoire system I use many abilities based on "Channel" for the buttons. Each of them needs different "Base ID" as far as I know.
It looks like some of the IDs may have side effects or it may have side effects if the original ability with the base ID somehow ends up in the unit's abilities.
How do I choose the base IDs carefully or is there any way to make sure that there are absolutely no side effects? For example there is the option "Disable other abilities", does it help to enable this option?

The button abilities should be called immediately without delay and I want to react on every single one of them with a trigger.
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
I am not sure but I think that "disable other abilities" is that other abilities are disabled while you are casting the channel based one.

Next to that... Just try to give them an id that you are sure that you won't use in other abilities of the same unit.
A unit cannot/shouldnt have multiple abilities with the same id. However, another unit can have a different ability with the same id as the first unit on another ability.
Give the most unique ids to abilities that every hero/unit can have.
 
Level 28
Joined
Feb 2, 2006
Messages
1,631
So there is no real safe way I guess. The field type in AbilityMetaData.slk is "orderString". So to add a completely independent order I would have to set the field "Order" for a new ability for example in "Units/CommonAbilityFunc.txt" or maybe it would be enough if I could simply enter any string.
Did anyone ever try if custom order strings do work?
 
Level 28
Joined
Feb 2, 2006
Messages
1,631
The class abilities are chosen at the beginning and I can choose them that they do not overlap. But item abilities are added randomly, so I must be careful. For example if you have an item which spawns a unit or casts another spell.

edit: And some abilities might be learned later in the game ....
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Item abilities use different order strings. Technically it's not the item ability that gets cast, but the item.
On unit abilities it is usually the most reasonable to have 1 order string per ability slot and if you wish to allow an ability in different slots just make several versions of it. You can also do this with hotkeys for consistency.
If you use spellbooks... don't use spellbooks for this.

I have a map where I use this exact method. You can look at the code(Stuff>AbilManager) since it's unprotected.

I now use a more advanced version of this system, but it's based on similar principles.
 

Attachments

  • Rise of Carnage v0.17.w3x
    318.1 KB · Views: 59
Level 28
Joined
Feb 2, 2006
Messages
1,631
Thanks and are you sure that all item abilities use different order strings? As far as I know you can make unit abilities for items as well.
The problem is that when the inventory is open the abilities of the equipment are added to the unit that they are still permanent even if the items of equipment are not visible. But your idea with per slot order strings is quite good.
The spell book is required since a character can have I think 11 + 5 or 6 abilities.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
I've used items quite a lot and they have a different system. They each have a cooldown based on their ability(cooldown group), which is the same with different items in the same group.
They also have order IDs that are solely based on slots. Those orders don't have strings though.

About spellbooks, I strongly advise against using them for organizing abilities. It's better to use items or some kind of an ability switching system.
With channel-based abilities the ability switching is easy - Make each ability have a level where it's not shown, doesn't have a cooldown and doesn't use the usual order ID.
Why no cooldown you might ask? Well, it's possible to chain orders in a way that makes the unit cast hidden abilities, because the game doesn't care if channel has visibility ticked on. If you choose to use an ability organization system alike to mine, you'll also be able to automatically filter out any false casts(because they don't use the order ID of any slot).
 
Status
Not open for further replies.
Top