• 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.

Warcraft III - Patch 1.31 PTR

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
print ( BlzGetAbilityTooltip (('>I4'):unpack 'AHfs') , 1 ))
Don't thank me. lol
Well unless you explain what you are posting it is not very helpful.

To be honest I am still unsure what that statement is doing. I have not seen anything like that in Java, C/C++ or even Python 2.

And ultimately the use of any function that is not map or load time inlined away will be slower than what JASS allowed.

Anyway since they clearly cannot be bothered to here is a brief explanation for anyone interested.

Firstly in Lua they accept single quotes for strings as well as double quotes. This is important to note because in JASS there were clear functional differences between the two. In most languages only double quotes represent strings with single quotes not being a reserved character.

Secondly unlike most languages Lua allows one to omit the parenthesis when calling a function that takes a single argument and that single argument is "either a literal string or a table constructor". This is a string literal and hence can have the function call parenthesis omitted from the statement.

Then it is using a strange language feature of Lua which is intended to help with implementing Object Orientated Programming. The string native type has a method table declared for it allowing the use of ":" syntax to make some calls to functions which take string as their first parameter. Specifically in this case it is calling the "string.unpack" function which takes a format string as its first parameter. Note this automatic shortening is only available if the function has been mapped to allow it to be used like such, one cannot just declare a function and try to run it off a variable of the first parameter type using ":" as much Lua documentation might trick us into thinking.

Finally it is using a pretty much language specific feature to do the expansion. The > means it will use big endian during the expansion while I4 means an unsigned integer of 4 bytes. The unpack function assumes the passed string is a buffer of bytes, and not a sequence of any kind of human readable characters like most languages define string as.

If people want a more normalized (not Lua specific) form...
Code:
string.unpack(">I4", "AHfs")
 
Last edited:
Level 4
Joined
May 17, 2008
Messages
75
I've also done some experimenting with the new abilityfield natives; trying to change the ability hotkey at runtime. Unfortunately it appears to be impossible.

I was afraid of that. Hopefully that capability will be added, I critically need it.

Something else that came up: Spells and attacks don't ever appear to do less than 1.0 damage, even if you set them to 0.

In addition, some spells cause 1.0 DAMAGE_TYPE_UNKNOWN in the "damaging" event when applying a buff, for instance, but that is zeroed out in the "damaged" event. An example of this is Storm Bolt, which registers as 1.0 DAMAGE_TYPE_UNKNOWN when the stun is applied and again when it wears off, neither of which really cause damage. It may have been this way before, I seem to remember seeing extra 0.0 damage events being registered in previous versions.

The minimum damage even applies to some spells that aren't supposed to do any damage to begin with like Drunken Haze. Drunken Haze actually does cause 1.0 DAMAGE_TYPE_NORMAL, which really is applied to the unit.

The refusal to do less than 1.0 damage breaks one of the systems I worked on that uses 0.01 damage abilities to trigger effects, but it worked in the version before this one.
 
Last edited:
Level 21
Joined
Apr 12, 2018
Messages
494
Also Ritual Dagger ability can apparently can be modified into AoE heal centered on target, either instant or periodic, and it doesn't necessarily has to kill the target! Very useful.
I don't think they've given us an AoE Heal like that before. Almost every instant AoE heal is centered on the caster.

In addition, some spells cause 1.0 DAMAGE_TYPE_UNKNOWN in the "damaging" event when applying a buff, for instance, but that is zeroed out in the "damaged" event. An example of this is Storm Bolt, which registers as 1.0 DAMAGE_TYPE_UNKNOWN when the stun is applied and again when it wears off, neither of which really cause damage. It may have been this way before, I seem to remember seeing extra 0.0 damage events being registered in previous versions.
Yes, Stun is treated as a 0 damage attack in the live game.

And what about ranged attacks? Unless there's no projectile simply using a DDS won't work.
There's no such distinguishment as 'melee' and 'ranged' type attacks in Warcraft 3; every attack is a 'ranged' attack in some manner. The form of which the attack takes (Normal/Instant vs Missile) is immaterial to DDS since DDS works on when the damage is done.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
Although apparently Blizzard will add garbage collection to locations, groups and the like eventually. This is not the case currently with the 1.31 PTR.

However that does not mean one cannot manually implement such a system with the awesome power of Lua. Behold...
Code:
GCTable = {}
GCTableMetatable = {__mode = "k"}
setmetatable(GCTable, GCTableMetatable)

Location_Metatable = {
__gc = function(loc)
    RemoveLocation(loc[1])
end
}

function WrapLocation(loc)
    local locman = {loc}
    setmetatable(locman, Location_Metatable)
    GCTable[loc] = locman
    return loc
end

LocationImpl = Location
function Location(x, y)
    return WrapLocation(LocationImpl(x, y))
end
Thanks to this code the following GUI will no longer leak!
  • Leak Test
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
Note this is the implementation of "Center of region" which is why the above works for it.
JASS:
function GetRectCenter takes rect whichRect returns location
    return Location(GetRectCenterX(whichRect), GetRectCenterY(whichRect))
endfunction
Now technically one could implement this for all location producing natives. This would result in a script which could be imported into any GUI orientated map to immediately fix all location leaks. It does not even need to stop with locations, and could be expanded to group and force as well!

For anyone wondering how the madness works... It abuses the mechanics of weak keys in a table. Weak keys do not stop the key object from being garbage collected. However to prevent cyclic object dependencies a table with weak keys will treat all references to a key from its value as weak. All one then needs is a table which tracks the key object with a metatable gc method and the Lua garbage collector does the rest. Once all references to a location are lost, it tries to remove the location key from the weak keyed table but to do so it has to first remove the wrapper table which results in a call to the wrapper table gc metatable method which cleans up the location. After the whole process is complete the location key is removed from the weak keyed table completely freeing all the resources used.

EDIT:
Someone raised concerns of possible multiplayer sync issues with this depending on how the Lua garbage collector operates. I have not tested this approach for multiplayer sync stability and if anyone intends to use it outside a single player map I suggest testing it before depending on it too much.
 
Last edited:
In GUI, the Unit Weapon Real field that would normally be supplied for the getter function is unitrealfield by mistake. This is also present with other GUI equivalent UnitWeapon<Type>Field getters expecting unitweapon<type>field and getting unit<type>field

UnitWeaponBooleanField -> UnitBooleanField?
upload_2019-4-29_15-28-39.png


UnitWeaponIntegerField -> UnitIntegerField?
upload_2019-4-29_15-29-41.png


UnitWeaponStringField -> UnitStringField?
upload_2019-4-29_15-30-48.png

In addition, it appears that among the unit weapon type fields' equivalent getters and setters, only the type unitweaponstringfield is functional. (Weapon indices from 1-2)

upload_2019-4-29_15-23-55.png

In the tested map, the fields in question were the following:
  • UnitRealField: Sight radius
    Acquisition Range

  • UnitWeaponRealField: Attack Backswing

  • UnitWeaponStringField: Projectile Art

  • UnitWeaponIntegerField: Base Damage

  • UnitWeaponBooleanField: Projectile Homing Flag
Attack Backswing, Base Damage do not appear at all in the message log. This may indicate that the respective setters and getters do not yet work for UnitWeaponRealField, and UnitWeaponIntegerField.

EDIT:

BlzPauseUnitEx does not update IsUnitPaused, whereas PauseUnit does. Moreover, BlzPauseUnitEx keeps the command card, while PauseUnit hides it.

The Critical Strike multiplier bonus applies even before EVENT_UNIT_DAMAGING and is indistinguishable from an attack.
 
Last edited:
Level 12
Joined
Nov 3, 2013
Messages
989
There's no such distinguishment as 'melee' and 'ranged' type attacks in Warcraft 3; every attack is a 'ranged' attack in some manner. The form of which the attack takes (Normal/Instant vs Missile) is immaterial to DDS since DDS works on when the damage is done.
You seem to be completely missing the point... If one wants to know when a projectile is fired, not when it deals damage, then it's currently impossible with a DDS...

For instance, just to give an example, if one were to make a custom searing/cold/dark/etc. arrow-esque ability that costs mana on each attack, you would be able to attack again before the projectile hits and deals damage (if it even hits at all). Now this example in particular can probably be worked around, but that's besides the point.


I really don't get what's so hard to understand about something so obvious... Yes a DDS can do what a DDS does, I'm not that stupid. But unlike with melee attacks most ranged attacks have projectiles and thus don't deal damage at the same time that the attacks are fired which means that a DDS isn't always sufficient...

Just imagine if every ability trigger would have to use begins casting event and DDS instead of effect start event...
 

deepstrasz

Map Reviewer
Level 75
Joined
Jun 4, 2009
Messages
20,248
Because this event triggers at Cast Point of a caster, not at the moment when projectile hits.
Way I see it is A Unit Begins Casting an Ability should do that while the above mentioned should trigger when the effect appears on the target which should be when the projectile hits in case of spells like Storm Bolt etc. Problem is that the trigger doesn't detect the effect appearing after the projectile hits for some reason even though ingame the effect does appear when the projectile hits.
Because A Unit Finishes Casting an Ability doesn't work with these spells.
 
Level 12
Joined
Nov 3, 2013
Messages
989
Way I see it is A Unit Begins Casting an Ability should do that while the above mentioned should trigger when the effect appears on the target which should be when the projectile hits in case of spells like Storm Bolt etc. Problem is that the trigger doesn't detect the effect appearing after the projectile hits for some reason even though ingame the effect does appear when the projectile hits.
Because A Unit Finishes Casting an Ability doesn't work with these spells.
They all "work", it's just that in most cases one would only use 'A Unit Starrts the Effect of an Ability' since most of the time what people do is just check which ability has been used.

Both begin and finish have their own niche uses, while an event for spells hitting their target is missing.

It's really not a case of that events should do different things, there's just some missing events that's all...


Maybe the names can be a bit misleading, since I'm sure pretty much everyone has mistakenly used the wrong event at some point as a beginner map editor, but as I've already said there's nothing wrong with what the events do per se.
 
Level 9
Joined
Feb 24, 2018
Messages
342
Warcraft III in general has very rudimentary projectile (and, while we are at it, buff) mechanics. Projectiles (and buffs) should be full-blown objects that inherit stuff from abilities that create them, but retain certain independence. I'm not talking realistic physics engine, with bouncing projectiles and stuff, but we should at least be able to interact with individual projectiles with triggers, get the damage or other effects they are "carrying", detect their impact, create ability-less projectiles with certain data attached, etc. Same with buffs. We still have no buff handles or anything like that, do we?
 
Level 9
Joined
Jul 20, 2018
Messages
177
Way I see it is A Unit Begins Casting an Ability should do that while the above mentioned should trigger when the effect appears on the target which should be when the projectile hits in case of spells like Storm Bolt etc. Problem is that the trigger doesn't detect the effect appearing after the projectile hits for some reason even though ingame the effect does appear when the projectile hits.
Because A Unit Finishes Casting an Ability doesn't work with these spells.
You need to investigate the work of these events.
Take attached map, play in it and read comments in code.

Here I will put descriptions of all events to those who do not want download map.
Triggers when a an order is given.
Triggers after spell's Cast Time for non-channel spells, it seems. I need more investigations on it.

Before and after this event mana is not spent and CD is not started.
The sane as CAST event.
No, there is difference, CHANNEL always triggers when an order is given, while CAST does this only for spells with zero cast time.
Triggers at unit's Cast Point. Some spells ignore unit's Cast Point, for them EFFECT event triggers almost immediately after CAST event, ex. all morphs ignore Cast Point.

Only AFTER this event (or a pause in trigger) mana is spent and CD is started.
Triggers when casting of spell is successfully finished or interrupted.

If casting of spell is interrupted before Cast Point, unit will try to cast spell again.
If casting of spell is successfully finished, behaves same as FINISH event.
Triggers only when casting of spell is successfully finished.

For channeling spells triggers after (unit's Cast Point + spell's channel time) from CAST event, because all chanelling spells ignore unit's Backswing Point. If spell ignores unit's Cast Point, triggers after spell's channel time.

For morphs triggers after morph duration, since all morph spells ignore Cast Point and Cast Backswing.

For common spells triggers after (unit's Cast Point + unit's Backswing Point) from CAST event. If spell ignores unit's Cast Point and Cast Backswing, FINISH event triggers almost immediately after EFFECT event.

Hope, this will help.
 

Attachments

  • AbilityEvents.w3x
    12.7 KB · Views: 103
Last edited:

Remixer

Map Reviewer
Level 33
Joined
Feb 19, 2011
Messages
2,112
Way I see it is A Unit Begins Casting an Ability should do that while the above mentioned should trigger when the effect appears on the target which should be when the projectile hits in case of spells like Storm Bolt etc. Problem is that the trigger doesn't detect the effect appearing after the projectile hits for some reason even though ingame the effect does appear when the projectile hits.
Because A Unit Finishes Casting an Ability doesn't work with these spells.
I have to disagree with you. We can take the frost bolt as an example ability:
Begins channeling - Triggers when a unit starts to execute an order to channel casting of an ability (the animation starts).
Begins casting - Triggers, when the unit starts casting the ability completes the casting time of the said ability (this is practically the "Begins channeling + Casting Time of the said ability").
Starts effect - Triggers when an EFFECT of the ability starts, meaning something visual that the ability triggers (for example a missile is created (or in other words Begins channeling + Casting Time of the ability + Time required for the unit for the ability (Set by unit's own values for its casting points)).
Finishes casting - Triggers when the cast time set for the said ability for that particular unit runs out, marking the end of a successful cast (Begins channeling + Cast Time + Time For Animations + Duration (Caster))
Stops casting - Triggers whenever the unit that is channeling or casting an ability stops casting it (for example is ordered to Stop, even without finishing the cast).

Hope this helped. =)

But yes, we're missing an event "Unit is affected by an ability..."

The sane as CAST event.
Not entirely, as I pointed above =)
 

deepstrasz

Map Reviewer
Level 75
Joined
Jun 4, 2009
Messages
20,248
Triggers when a an order is given.
So, it works like A Unit is Attacked, when if you stop the unit midway before actually hitting or launching any projectile, the trigger/actions run anyway, considering the caster and target are in spell/ability range?
Triggers at unit's Cast Point. Some spells ignore unit's Cast Point, for them EFFECT event triggers almost immediately after CAST event, ex. all morphs ignore Cast Point.
So Storm Bolt et alii have a built in damage detection system?
For common spells triggers after (unit's Cast Point + unit's Backswing Point) from CAST event. If spell ignores unit's Cast Point and Cast Backswing, FINISH event triggers almost immediately after EFFECT event.
How does it work on Frostbolt? Nothing happens when I use the A Unit Finishes Casting an Ability event. However, as mentioned above, it works with A Unit Starts the Effect of an Ability only earlier than the unit being hit since I suppose the spell has its own damage detection system before the stun buff appears.

Starts effect - Triggers when an EFFECT of the ability starts, meaning something visual that the ability triggers (for example a missile is created (or in other words Begins channeling + Casting Time of the ability + Time required for the unit for the ability (Set by unit's own values for its casting points)).
Ah... but then my trigger buff doesn't appear right after the Frostbolt FX/projectile launches but somewhere on the way, not halfway though if we are to consider the 600 range.
Finishes casting - Triggers when the cast time set for the said ability for that particular unit runs out, marking the end of a successful cast (Begins channeling + Cast Time + Time For Animations + Duration (Caster))
So, A Unit Finishes Casting an Ability works only for channeling spells? Why doesn't anything happen with Frostbolt, if not?
 

Remixer

Map Reviewer
Level 33
Joined
Feb 19, 2011
Messages
2,112
Ah... but then my trigger buff doesn't appear right after the Frostbolt FX/projectile launches but somewhere on the way, not halfway though if we are to consider the 600 range.
I'm not sure what you mean by trigger buff. However, the Starts effect of an ability is triggered right when the missile is created (the unit has no means to cancel the cast anymore, action has been executed). This applies to Frost Bolt too.


So, A Unit Finishes Casting an Ability works only for channeling spells? Why doesn't anything happen with Frostbolt, if not?
It also works for Frost Bolt, I am not sure what you mean?


How does it (Finishes Casting) work on Frostbolt?
Depends on the unit and what its values are. For Frost Bolt, it works like this: Begins Channeling an Ability + Casting Time (0.00 by Default) + Time of the Animations. So by default casting Frost Bolt (by Magnataur Destroyer) with default values it takes 1.50 seconds to trigger the Finishes Casting event, counted from "Begins Channeling" events onwards.

And after this the missile is of course physically travelling towards its target.
 

Remixer

Map Reviewer
Level 33
Joined
Feb 19, 2011
Messages
2,112
Sorry. I meant, the action is that a dummy unit appears and casts a buff on the unit hit by Frostbolt. But for the hit detection, I use A Unit Starts the Effect of an Ability.
But, the actions do not trigger with A Unit Finishes Casting an Ability.
By all logic your dummy unit should appear once the frost bolt missile is created. Which unit are you trying to cast the buff onto? The Triggering unit?
 
Level 9
Joined
Jul 20, 2018
Messages
177
@deepstrasz, just no clarify: NONE of ability events detects if projectile reached its target. NONE of ability events detects the moment when damage is done. Ability events are ONLY for casting abilities, NONE of them can detect the real actions of an ability.
Cast point and Cast Backswing are setting of a unit, not settings of an ability.
You can't control unit between CAST event and EFFECT event.

Download the map and test my words in it.
Not entirely, as I pointed above =)
Open the test map and watch, absolutely the same event, I didn't find any difference.
 

Remixer

Map Reviewer
Level 33
Joined
Feb 19, 2011
Messages
2,112
I've meant the trigger doesn't work/take effect with Finishes Casting.
That is most likely because you can interrupt the cast by giving any other movement command after the Casting Time is finished, thus the "Finished Casting" never triggers. You can use "Stops casting" instead.

@Prometheus3375
See my post above, there is a clear difference in the two.
 
Level 9
Joined
Jul 20, 2018
Messages
177
Begins channeling - Triggers when a unit starts to execute an order to channel casting of an ability (the animation starts).
Begins casting - Triggers, when the unit starts casting the ability completes the casting time of the said ability (this is practically the "Begins channeling + Casting Time of the said ability").
This is absolutely wrong, how did you test this?
upload_2019-4-29_17-44-7-png.321867
upload_2019-4-29_17-50-25-png.321868
 

Attachments

  • upload_2019-4-29_17-44-7.png
    upload_2019-4-29_17-44-7.png
    4.2 MB · Views: 853
  • upload_2019-4-29_17-50-25.png
    upload_2019-4-29_17-50-25.png
    4.2 MB · Views: 751
Last edited:
Level 9
Joined
Feb 24, 2018
Messages
342
Actually, the projectile impact detection you're talking about is very easy to emulate. Ironically I've had this idea the day before 1.31 PTR hit, and then it was kinda hard to implement, but now that we can separate Attack damage and Spell damage, its super easy, barely an inconvenience.
Each ability that deals damage should deal unique amount of damage. E.g. Firebolt would always deal 7 damage. If Damage Taken == 7 and Damage Type == Spells, then you simply have damage source deal desired amount of damage to the target, or spawn a buff-applying dummy, etc. Attack damage was the only problem with this concept, since its normally very variable.
 

deepstrasz

Map Reviewer
Level 75
Joined
Jun 4, 2009
Messages
20,248
That is most likely because you can interrupt the cast by giving any other movement command after the Casting Time is finished, thus the "Finished Casting" never triggers. You can use "Stops casting" instead.
Stop Casting=/=Finishes Casting. It'll only trigger if the unit stops/cancels the ability or does something else instead.
Each ability that deals damage should deal unique amount of damage.
You're saying reduction of spells damage is not calculated?
 
Level 12
Joined
Nov 3, 2013
Messages
989
This is absolutely wrong, how did you test this?
upload_2019-4-29_17-44-7-png.321867
upload_2019-4-29_17-50-25-png.321868
None of the abilities you were using have cast time over 0.00 seconds though, did you actually test that? (Basically like flamestrike.)

I tried to change it but the debug messages stopped appearing when I did that so idk
Stop Casting=/=Finishes Casting. It'll only trigger if the unit stops/cancels the ability or does something else instead.
Stops Casting happens every time with every ability, you can quite easily notice that if you actually tested it...

If a unit finishes casting the ability, they will naturally stop casting (and the event will trigger). But the event will also trigger for any other interruption as well, like pressing stop, the unit being ordered to do something else, or if the unit gets stunned.


p.s. also it's kind of crazy how this thread has been derailed about a feature that is supposed to be coming soon™ anyway...
 
Level 9
Joined
Feb 24, 2018
Messages
342
You're saying reduction of spells damage is not calculated?
I'm not sure, but if I were making damage entirely trigger-based, I wouldn't put abilities like Hardened or Resistant Skin on any units, emulating them with dummy abilities and triggers instead.
If level of HardenedSkinDummy for Triggering Unit == 3, set realDamageToBeDealt to itself - 3, that sort of thing.
 
Level 9
Joined
Jul 20, 2018
Messages
177
None of the abilities you were using have cast time over 0.00 seconds though, did you actually test that? (Basically like flamestrike.)
Shaman has Cast time equal to 1.6.
Tested Flamestarike, CAST and CHANNEL still trigger after pressing button, EFFECT at Cast Point, FINISH after (Cast Point + channel time (AKA cast time)).
I do not see any mistake in my conclusions, Flamestrike behaves as any other channel spell.
upload_2019-4-29_18-19-24-png.321872
upload_2019-4-29_18-19-54-png.321873

UPD: uploaded edited map.

You are welcome to suggest more spells to test, but not in this thread.

UPD2: CHANNEL and CAST have difference, thanks to @Remixer. I will fix my first post a bit.
 

Attachments

  • upload_2019-4-29_18-19-24.png
    upload_2019-4-29_18-19-24.png
    4.2 MB · Views: 832
  • upload_2019-4-29_18-19-54.png
    upload_2019-4-29_18-19-54.png
    4.2 MB · Views: 849
  • AbilityEvents.w3x
    12.8 KB · Views: 86
Last edited:

deepstrasz

Map Reviewer
Level 75
Joined
Jun 4, 2009
Messages
20,248
If a unit finishes casting the ability, they will naturally stop casting (and the event will trigger). But the event will also trigger for any other interruption as well, like pressing stop, the unit being ordered to do something else, or if the unit gets stunned.
I see. I thought there was more nuance.
I'm not sure, but if I were making damage entirely trigger-based, I wouldn't put abilities like Hardened or Resistant Skin on any units, emulating them with dummy abilities and triggers instead.
If level of HardenedSkinDummy for Triggering Unit == 3, set realDamageToBeDealt to itself - 3, that sort of thing.
Sure but even so, a spell can only do so much. It's not like they all have chaos damage. So armour and stuff reduce the damage it deals. Or, is there a way to change the type of damage done by a spell/ability?
 
Level 9
Joined
Feb 24, 2018
Messages
342
Sure but even so, a spell can only do so much. It's not like they all have chaos damage. So armour and stuff reduce the damage it deals. Or, is there a way to change the type of damage done by a spell/ability?
You can change relationship between damage types and armour types in Gameplay Constants. You make spells deal full damage to all armour types. Since we can get armour values too now, you can still get base damage dealt using some math.
 
Level 4
Joined
May 17, 2008
Messages
75
Ensnare also causes 1 damage. Spirit Link distributed damage also always causes at least 1 damage, don't know if that changed from previous versions.

Actually, the projectile impact detection you're talking about is very easy to emulate. Ironically I've had this idea the day before 1.31 PTR hit, and then it was kinda hard to implement, but now that we can separate Attack damage and Spell damage, its super easy, barely an inconvenience.
Each ability that deals damage should deal unique amount of damage. E.g. Firebolt would always deal 7 damage. If Damage Taken == 7 and Damage Type == Spells, then you simply have damage source deal desired amount of damage to the target, or spawn a buff-applying dummy, etc. Attack damage was the only problem with this concept, since its normally very variable.

The new "damaging" event allows you to determine the damage amount the unit is hit with before armor types, runed bracers, banish, mana shield, spirit link and the like are considered, and then you can set the value to the actual base damage you want. Edit: oops, didn't see Tasyen's response.

In any case, the new generic unit damage events are very much appreciated on my end. Much thanks to the devs.
 
Has anyone checked if there are some new fields in the Gameplay Constants/Interface? Don't have access to wc3 atm so can't check myself.
Had a quick look and compared PTR with live version.

"Text - General - 'Upkeep:' seems to be missing in the PTR version. I asume the empty field in the PTR version is supposed to be this field. Trying to edit the empty field crashed the editor.

Other than that, no differences.
 

Attachments

  • scrn1.PNG
    scrn1.PNG
    23.6 KB · Views: 111
  • scrn2.PNG
    scrn2.PNG
    9.3 KB · Views: 100
Level 11
Joined
Sep 14, 2009
Messages
284
Had a quick look and compared PTR with live version.

"Text - General - 'Upkeep:' seems to be missing in the PTR version. I asume the empty field in the PTR version is supposed to be this field. Trying to edit the empty field crashed the editor.

Other than that, no differences.

Was hoping they would at least allow you to fully customize the armor reduction formula, but seems like were still gonna have to stick with the limited multiplier value :/
 
Was hoping they would at least allow you to fully customize the armor reduction formula, but seems like were still gonna have to stick with the limited multiplier value :/

At this point, it would be redundant to obtain access to the reduction formula, since we already have a setter native for damage amount, and the ability to obtain the unreduced damage (in the PTR, a new event EVENT_UNIT_DAMAGING allows one to retrieve the unreduced damage dealt via the same native GetEventDamage)

EDIT:

The native BlzDisplayChatMessage(player whichPlayer, integer recipient, string message) will display a chat message. The interesting part here is the recipient,

where 0 pertains to All players,
1 to Allies only,
2 to Observers,
3 to Private.

All integers outside 0 to 3 will default to Private. This will need further testing for confirmation.

BlzGetLocale returns the "locale" (or language setting, I think?) of the game. In my tests, it returned enUS.
BlzGetLocalClientWidth returns the width of the Warcraft 3 Application window.
BlzGetLocalClientHeight returns the height of the Warcraft 3 Application window.
 
Last edited:
Level 11
Joined
Sep 14, 2009
Messages
284
At this point, it would be redundant to obtain access to the reduction formula, since we already have a setter native for damage amount, and the ability to obtain the unreduced damage (in the PTR, a new event EVENT_UNIT_DAMAGING allows one to retrieve the unreduced damage dealt via the same native GetEventDamage)

Yes, but my issue is that I want the Armor Tooltip to display the correct value for "Damage Reduction". Since the field in the tooltip references the hardcoded formula and the constant "Armor Damage Reduction Multiplier" in Gameplay Constants, there is currently no way to achieve this.
 
Level 5
Joined
May 10, 2018
Messages
129
In 1.31 PTR, the game will crash on exit, after playing a map for a long time.
Also, the game will lose response and not be able to awake again, if it is minimized for a certain amount of time.
 
Level 11
Joined
Nov 23, 2013
Messages
665
I played a few melee games against computer (insane and normal), and I noticed AI seems to no longer use heroes skills. Their mana is always full. I think units don't use skills either (except autocast spells), but I'll check on that.
 
Last edited:
Level 5
Joined
May 10, 2018
Messages
129
Please specify which map (even attach it please). Also, the minimize issue, on the same map?
Minimize issue is not on the same map.
It happens on official campaigns as well. And so do the "crash on exit" issue.
I don't think they are map related.

("Crash on exit" issue is that the game gets freezed after click 'Exit' without a Blizzard error report window, which is apparently not a map crash)

I played a few games against computer, and I noticed AI seems to no longer use heroes skills. Their mana is always full. I think units don't use skills either (except autocast spells), but I'll check on that.
There are AI tweaks on changes note of 1.31
 
Last edited:
Level 9
Joined
Feb 24, 2018
Messages
342
I played a few games against computer, and I noticed AI seems to no longer use heroes skills. Their mana is always full. I think units don't use skills either (except autocast spells), but I'll check on that.
They do for me, but I tested with quick "place a bunch of units in empty field and have them fight for my amusement" map. Maybe something breaks if the AI is forced to actually gather resources, build the base, pick units, and stuff like dat.
 
Status
Not open for further replies.
Top