s2client-api
s2client-api copied to clipboard
AbilityData name field missing
AbilityData has no 'name' field like UpgradeData, UnitTypeData, and BuffData do, is link_name the proper value? If so, is there a reason it is named differently than the others?
Short Version:
Abilities are treated a bit differently in the engine than the other types. If you want a unique string identifier for an ability, I would suggest "friendly_name".
Long Version:
The "name" field is the internal string identifier for an instance of a type. Abilities are a bit different where the name is not actually unique. Each Ability can have multiple sub-commands identified by an index number (that is why "name" got split into "link_name" and "link_index"). For example, in the engine "Patrol" and "HoldPosition" are actually sub-commands of the "Move" ability. It would be confusing to refer to these as "Move_1", "Move_2", so we added the "friendly_name" field where we manually gave them all clearer names.
As mentioned in issue #64, I'd like to do a pass giving all these types a "friendly_name" field and encourage people to just use that. Actually once we do that, we should probably just remove all the other name fields other than the "friendly_name" one.
Makes sense, thanks
Hi @davechurchill
Can you please close this issue? Trying to clean up the issues list in order to bring more contributors.