• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Indexing Ability levels?

Status
Not open for further replies.
Level 15
Joined
Nov 30, 2007
Messages
1,202
Yes you heard that right... I need a sytem that assigns an unique level to abilities as units enter the map, when the unit is deindexed it must recycle the available level. The purpose is to be able to determine which tooltip has been assigned to which unit / player-unit to make changes MUI.

  • The system must take into account the maximum level that the ability can take (if possible) and print an error if it's full.

  • There could be a constant to toggle between global indexing of levels and player indexing of levels, meaning each player has their own index.

  • It doesn't matter to me if the indexes maintains order or if the index fragments as long as the levels can be recycled correctly.
Anyone up for the task? ^^


I'm thinking the API would be something like this:

JASS:
static method addAbility(AbilCode, MaxLevel) returns nothing // setup

static method sharedIndex(AbilCode, MaxLevel) returns integer

static method playerIndex(Player, AbilCode, MaxLevel) returns integer

static method sharedDeindex(AbilCode, Level)

static method playerDeindex(Player, AbilCode, Level)

static method handlesAbility(AbilCode) returns boolean // checks if an ability is handled by the system

When the unit enters the map one would loop through all abilities added via "addAbility" to see if the unit has such an ability level greater than 0. Than it would be given it's index between 1 - MaxLevel.
 
Last edited:
Level 6
Joined
Jan 9, 2019
Messages
102
There's a way to make the abilityUI-mods Multi-UnitType-Instanceable. It's quite a hard-work though.

Basically, the tooltip/icon/position changes are registered for actual updates only when the units are in selection. By UnitType is as far as it can get through this method, as a player can choose multiple units. Selection of multiple units of the same UnitType will require serious attention as well.

I personally would rather stick to MPI abilityUI and see what happens to world editor in this near future.
 
Status
Not open for further replies.
Top