• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Spell] Many channel based abilities - how to choose base ID

Status
Not open for further replies.
Level 29
Joined
Feb 2, 2006
Messages
1,691
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.
 
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.
 
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?
 
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

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.
 
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.
Back
Top