• 🏆 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!

[General] New Natives Questions

Status
Not open for further replies.
Level 16
Joined
Mar 27, 2011
Messages
1,349
I have a few questions about the new natives that have been brought in by the new patch. See below for reference:

Producer Update: Natives List

1.) The new natives aren't recognised by my game client. "Undeclared function". I've tried modifying unit damage, change ability tooltips, etc but it won't compile. I'm on the Warcraft 1.30 client. How do I use the new natives?
call SetUnitBaseDamage(myUnit, damage, 0) // compile error
2.) Will the Jass manual be updated to include the new natives? JASS Manual: API Browser - Functions in common.j
3.) Without testing, it looks like SetAbilityExtendedToolip('A005', "Hurrow", 1) changes the tooltip for all spells. Any way to change it for 1 unit's instance of the ability? If possible, this would be very useful.
 
  1. The natives were renamed to have the Blz prefix once the patch went live. SetUnitBaseDamage only ever existed in the 1.29 PTR. (it's BlzSetUnitBaseDamage now)
  2. I don't think THW has anything to do with that link.
  3. Currently I don't think there's a way for you to modify the ability tooltip for only a specific unit. You might be able to give the ability many levels and choose a different level per unit.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
  1. The natives were renamed to have the Blz prefix once the patch went live. SetUnitBaseDamage only ever existed in the 1.29 PTR. (it's BlzSetUnitBaseDamage now)

Cool, thanks for that

2. I don't think THW has anything to do with that link.

Is there any complete list which includes all natives with their name, parameter list and maybe a description of what they do?

3. Currently I don't think there's a way for you to modify the ability tooltip for only a specific unit. You might be able to give the ability many levels and choose a different level per unit.

Ahh that's a shame. This isn't practical for what I want to do because there could be hundreds of combinations for a single ability. I want to dynamically change an abilities description based on a unit's stats.
 
Is there any complete list which includes all natives with their name, parameter list and maybe a description of what they do?

You can extract the common.j from the CASC with Ladik's CASC viewer.

Ahh that's a shame. This isn't practical for what I want to do because there could be hundreds of combinations for a single ability. I want to dynamically change an abilities description based on a unit's stats.

The limitation would come from how many units are going to have the ability you want to set the tooltip of at any given time, and if the ability normally has levels. If it's a single level ability, you can just set the levels to a higher number in the object editor and associate each level with a unit, dynamically.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
The limitation would come from how many units are going to have the ability you want to set the tooltip of at any given time, and if the ability normally has levels. If it's a single level ability, you can just set the levels to a higher number in the object editor and associate each level with a unit, dynamically.

Ahh that's a clever idea. They are in fact single level abilities. Though there could be lots of units, usually 30 or so but could be as high as 448!! There might be about 150 abilities or so.

Let's just average and say there are 100 units multiplied by 150. That's 150 abilities with a total 15,000 levels. What load time or performance impact would this have on the map?

Edit: To ensure no bugs, I think I have to factor in max potential levels. That's 150 x 448 = 67200 levels.
Edit 2: I didn't factor in the fact that when units die, their ability level can be "recycled". I'd have to develop some system to keep track of this.
 
Last edited:
Ahh that's a clever idea. They are in fact single level abilities. Though there could be lots of units, usually 30 or so but could be as high as 448!! There might be about 150 abilities or so.

Let's just average and say there are 100 units multiplied by 150. That's 150 abilities with a total 15,000 levels. What load time or performance impact would this have on the map?

Edit: To ensure no bugs, I think I have to factor in max potential levels. That's 150 x 448 = 67200 levels.

I was told that most of the loading time comes from loading the initial object data. The subsequent data for levels shouldn't affect loading time much. I haven't tested this personally, so make sure you do if you decide to go that route.

I would also make a wrapper for this, like SetUnitAbilityTooltip, so if Blizzard implements this functionality it will be easy to replace your current implementation.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
I was told that most of the loading time comes from loading the initial object data. The subsequent data for levels shouldn't affect loading time much. I haven't tested this personally, so make sure you do if you decide to go that route.

Ok thanks for your help. I'll run some tests to ensure things run smoothly.

I would also make a wrapper for this, like SetUnitAbilityTooltip, so if Blizzard implements this functionality it will be easy to replace your current implementation.

Let's hope they do! :D
 
Status
Not open for further replies.
Top