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

Warcraft III - Patch 1.31 PTR

Status
Not open for further replies.
Level 7
Joined
Jun 5, 2018
Messages
180
64 bit and DX 11 supports are beneficial to graphical and performance improvements, which promote war3 the most popular game to modern era.

But I am thirstier for world editor improvements such as UI and object data manipulation system APIs.

Great job!

Btw, the feedback online system developed by TriggerHappy is great program by which the submitted and approved feedbacks could be directly sent to Blizzard.
I would also suggest Blizzard to add a support for sending issues after a game crash.
 
Last edited:
Level 11
Joined
Dec 21, 2012
Messages
373
Well, the new natives are certainly welcome, but... It was rumoured, that the new patch would add TESH to standard WE... But I do not see anything of the sort. Not even a function list. Once converted to custom text, the entire thing is exactly the same.
 
Level 7
Joined
Dec 28, 2014
Messages
83
I tried using Lua, this is what I have done so far...



upload_2019-4-25_1-23-10.png


Code:
//! beginusercode
function Handle(handle)
    local this = {}
  
    this.handle = handle
    function this:getHandleId()
        return GetHandleId(handle)
    end
    return this
end
//! endusercode

Code:
//! beginusercode
function Agent(agent)
    local this = Handle(agent)
  
    function this:saveAgentHandle(ht, parentKey, childKey, value)
        SaveAgentHandle(ht, parentKey, childKey, value)
    end
    return this
end
//! endusercode

Code:
//! beginusercode
function Widget(widget)
    local this = Agent(widget)
  
    function this:setHP(value)
        SetWidgetLife(this.handle, value)
    end
    function this:getHP()
        return GetWidgetLife(this.handle)
    end
    return this
end
//! endusercode

Code:
//! beginusercode
function Unit(playerId, unitId, x, y, angle)
    local this = Widget(CreateUnit(playerId, unitId, x, y, angle))
    function this:setName(str)
        BlzSetUnitName(this.handle, str)
    end
    function this:getName()
        return GetUnitName(this.handle)
    end
    return this
end
//! endusercode

Code:
//! beginusercode
function Hero(playerId, unitId, x, y, angle)
    local this = Unit(playerId, unitId, x, y, angle)
  
    function this:addXP(xp, showEyeCandy)
        AddHeroXP(this.handle, xp or 0, showEyeCandy or false)
    end
    return this
end
//! endusercode

Code:
//! beginusercode
function _main ()
    print("main")
    x = Unit(Player(0), udg_Footman, 0, 0, 270)
    y = Unit(Player(0), udg_Footman, 0, 0, 270)
    x:setName("Biggs")
    y:setName("Wedge")
    z = Hero(Player(0), udg_Paladin, 0, 0, 270)
    z:addXP(500)
    print(x:getName() .. " & " .. y:getName())
    print(z:getHandleId())
    print(z:getHP())
end
//! endusercode


upload_2019-4-25_1-22-27.png





Edit:
I realized I could also do this:

Code:
Hero = {}
function Hero:new(playerId, unitId, x, y, angle)
 
Last edited:
Level 1
Joined
Apr 17, 2019
Messages
5
i am not find to BlzSetUnitAttackSpeed and BlzGetUnitAttackSpeed , it is important YDjapi , Plz i need it !

UnitAttackSpeed Values range from 0.00 to 4.00 in War3 , It exists , you just have to allow us to read and write it.

UnitAttackCoolDown is unmanageable.
 
Last edited:
I tried using Lua, this is what I have done so far...



View attachment 321549

Code:
//! beginusercode
function Handle(handle)
    local this = {}
 
    this.handle = handle
    function this:getHandleId()
        return GetHandleId(handle)
    end
    return this
end
//! endusercode

Code:
//! beginusercode
function Agent(agent)
    local this = Handle(agent)
 
    function this:saveAgentHandle(ht, parentKey, childKey, value)
        SaveAgentHandle(ht, parentKey, childKey, value)
    end
    return this
end
//! endusercode

Code:
//! beginusercode
function Widget(widget)
    local this = Agent(widget)
 
    function this:setHP(value)
        SetWidgetLife(this.handle, value)
    end
    function this:getHP()
        return GetWidgetLife(this.handle)
    end
    return this
end
//! endusercode

Code:
//! beginusercode
function Unit(playerId, unitId, x, y, angle)
    local this = Widget(CreateUnit(playerId, unitId, x, y, angle))
    function this:setName(str)
        BlzSetUnitName(this.handle, str)
    end
    function this:getName()
        return GetUnitName(this.handle)
    end
    return this
end
//! endusercode

Code:
//! beginusercode
function Hero(playerId, unitId, x, y, angle)
    local this = Unit(playerId, unitId, x, y, angle)
 
    function this:addXP(xp, showEyeCandy)
        AddHeroXP(this.handle, xp or 0, showEyeCandy or false)
    end
    return this
end
//! endusercode

Code:
//! beginusercode
function _main ()
    print("main")
    x = Unit(Player(0), udg_Footman, 0, 0, 270)
    y = Unit(Player(0), udg_Footman, 0, 0, 270)
    x:setName("Biggs")
    y:setName("Wedge")
    z = Hero(Player(0), udg_Paladin, 0, 0, 270)
    z:addXP(500)
    print(x:getName() .. " & " .. y:getName())
    print(z:getHandleId())
    print(z:getHP())
end
//! endusercode





Edit:
I realized I could also do this:

Code:
Hero = {}
function Hero:new(playerId, unitId, x, y, angle)

Learn metatables ;)


They are using a modified version of 5.3.4.

You can use any of the natives in common.j with Lua.

So it retains the same syntax? Does it retain 100% of the Lua features?
 
Level 6
Joined
Aug 28, 2015
Messages
213
First of all thank you very much for the hard work was looking forward to this patch and I'm like it.
here is something I stumbled on for my first tests.

-Do we get the frame functions for GUI in the next update?

-Can't get
JavaScript:
native BlzGetUnitWeaponRealField(..., UNIT_WEAPON_RF_ATTACK_RANGE, ...)
native BlzSetUnitWeaponRealField (..., UNIT_WEAPON_RF_ATTACK_RANGE, ...)
to work somehow. have a map attached to show what I tried so far.
will update this post when I find more things..
Cheers.
 

Attachments

  • RangeChangeMap.w3x
    8.5 KB · Views: 158
Last edited:
Level 7
Joined
Dec 28, 2014
Messages
83
Learn metatables ;)
I'm working on that one! From what I understand so far it has metamethods or something. :D

I'm currently studying Python for Pygame (finding an alternative for C#'s XNA/Monogame) until Blizzard suddenly introduced this patch. I rushed reviewing Lua.

It took me time to find out //! beginusercode and //! endusercode are required in order to use Lua in the World Editor.
 
Level 9
Joined
Feb 24, 2018
Messages
342
Me yesterday - "Okay, its time to decide if I implement a damage system of some sorts and so rework all spells I've done now, or I wait until patch 1.31 which is coming Soon(tm), because the map reached the point where static placeholder values don't cut it anymore. On one hand, 1.31 will probably include all I need, on the other hand, there's no guarantee, and it may or may not arrive before the end of the world. Gah, what to do? Okay, I'll decide tomorrow..."

Blizzard today - "YOUR PRAYERS HAVE BEEN HEARD AND ANSWERED, MY SON!"
 
Last edited:
Hmm, from tinkering with the damage events, I found out that trying to deal damage based on spells to (spell immune) enemy units defaults to 1.00 for unreduced damage. An odd find, might I add.

Evasion still evades the attack, which does not activate the EVENT_UNIT_DAMAGING event.

EDIT:

It appears that the size of a group will not adapt when a unit is removed from the game. It will still remain the same, which lines up with the behavior we've seen so far with group handles.
 
Last edited:
Level 11
Joined
Nov 23, 2013
Messages
665
Here are a few thoughts about 1.31 changes:
  • Sundering Blades:
    • Icon: I don't see what it is supposed to represent? A shield? If so, why is it a shield and not a sword?
    • Attachment effect: there is a visual glowing effect on Knights' swords once the upgrade has been researched. It is good that a visual effect is applied to show when a unit is upgraded, however, I think this one is too much, too noticeable. It looks like Knights carry torches. It would look better if that glow wasn't permanent but periodic instead (like glowing every 10-15 seconds)
    • In game: AI doesn't seem to research Sundering Blades upgrade.
  • In Unit and Doodads Palettes, it's great to be able to search for an object by typing in its name. However, in Unit Palette, it's not very relevant, because it only searches within the race and category (melee/campaign/custom). If I search "priest" when Human Melee is selected, I'll get one result only, human priest, I won't get troll priests for example. This features isn't very useful, because one can already select priest by using the regular priest icon, which is faster than typing+clicking, unless there is an insane amount of custom units. This search feature should allow us to search any unit, regardless of its category and race.
  • No GUI support for damage detection and UI customising. That's a big desillusion for me. Any plans to make them GUI-friendly in the near future?

I must confess that I expected more from that patch. Not that it's a bad patch obviously, but it contains mostly features that cannot be used by beginners: Lua, new natives with no GUI support, UI customisation. Apart from those, it's mostly quality of life improvement (Tooltip previewer is awesome) and balance changes, which I'm all for, but it doesn't bring anything actually new. I'm very happy for those who can use those features, because they master WE more than I will ever do and they will create amazing projects, yet I can't help being disappointed because I hoped I could do more amazing things in WE but there is barely anything for non-programmers. Even though the majority of us uses GUI... Also, I was expecting more features, such as higher max limit for unit speed, unlimited units selection, additional building menus for workers... So I really hope the new natives will be made available in GUI, for those of us who don't have a clue about coding, and I also hope Blizzard will keep adding new features for WE, before or after Reforged.
 
Last edited:
Level 9
Joined
Feb 24, 2018
Messages
342
@Kam by the way, since you are adding new abilities and (hopefully) icons... are there plans to add OLD abilities and icons, from Alpha/Beta, that didn't make the cut? Native non-triggered Charge, Corpse Explosion, Soul Siphon, etc? And maybe... maybe Alpha/Beta models too? Some have been recreated/extracted by community, true, but far from all, AFAIK.
 
There is a bug showing the campaign name. The Gnoll Campaign text shows only the first word. Note that we have added a color to the name, which causes this: |cffFCD211Gnoll Campaign|r. When we remove the text color everything works ok.

FirstWordShowingOnly.png


Test file also attached (GnollCampaign-C1R6-build1).

EDIT: Second Bug. Gnoll Warlock level icon shows up as a green icon in the game.

felgnoll-traingin-green.png


Best regards,
Tommi
 

Attachments

  • GnollCampaign-C1R6-build1.w3n
    28 MB · Views: 298
Last edited:

SpasMaster

Hosted Project: SC
Level 23
Joined
Jan 29, 2010
Messages
1,969
Here are a few thoughts about 1.31 changes:
My thoughts exactly.
  • No GUI support for damage detection and UI customising. That's a big desillusion for me. Any plans to make them GUI-friendly in the near future?
I must confess that I expected more from that patch. Not that it's a bad patch obviously, but it contains mostly features that cannot be used by beginners: LUA, new natives with no GUI support, UI customisation. Apart from those, it's mostly quality of life improvement (Tooltip previewer is awesome) and balance changes, which I'm all for, but it doesn't bring anything actually new. I'm very happy for those who can use those features, because they master WE more than I will ever do and they will create amazing projects, yet I can't help being disappointed because I hoped I could do more amazing things in WE but there is barely anything for non-programmers. Even though the majority of us uses GUI... So I really hope those new features will be made available in GUI, for those of us who don't have a clue about coding.
 
Bug report:

A bit of an oddity with groups now (PTR) is that FirstOfGroup does not appear to work (in my tests).
BlzGroupUnitAt only takes valid indices from 0 to (size of group - 1).

GroupRemoveUnit does not update BlzGroupGetSize. A call to GroupClear must be made, along with the help of another group handle. However, GroupAddUnit works fine with BlzGroupGetSize.

EDIT:

FirstOfGroup works as before. False observation
 

Attachments

  • groupNativeTest.w3m
    17.9 KB · Views: 144
Last edited:
Level 7
Joined
May 26, 2017
Messages
127
Speaking of new icons, I add a new one (also add those that @Trill has added but a little better) and the two "new" effects:

ReplaceableTextures\PassiveButtons\PASBTNSunderingBlades.blp

PASBTNSunderingBlades.blp.png


ReplaceableTextures\CommandButtons\BTNAmbushDay.blp

BTNAmbushDay.blp.png


ReplaceableTextures\CommandButtons\BTNSacrificialDagger.blp

BTNSacrificialDagger.png


Abilities\Spells\Human\SunderingBlades\SunderingBlades.mdl

SunderingBladesGIF.gif

Abilities\Spells\Items\RitualDagger\RitualDaggerTarget.mdl

RitualDaggerTargetGIF.gif

PS: I do not like the new ShadowMeld icon I do not understand what it has to do with Blood Elves.

PS2: The Sundering Blades icon also seems to me to be very unclear.

PS3: When I use the new search bar in the Editor, the Editor slows down a lot while typing.
 
Level 7
Joined
Jan 1, 2014
Messages
95
I was banned from blizzard forums because they didnt like my jokes.

Well anyways. What comes with the patch it seems like ridicculous like always with the team. Some changes they previously made and were not well tought was reverted back. So inconclusion the old wc3 community is lightyears ahead in knowledge comparing to the team that actually make the game changes. However there is new but very loud amount of newcomers who think they know excactly how to make the game fun for them and blizzard seems to listen them at least 50% of the time.

I dont seem to connect with the philosophy and world view the devs seem to have.

This patch just made ud the most op race that ever has been in the patch history by 20%> increase.
 
I was banned from blizzard forums because they didnt like my jokes.

Well anyways. What comes with the patch it seems like ridicculous like always with the team. Some changes they previously made and were not well tought was reverted back. So inconclusion the old wc3 community is lightyears ahead in knowledge comparing to the team that actually make the game changes. However there is new but very loud amount of newcomers who think they know excactly how to make the game fun for them and blizzard seems to listen them at least 50% of the time.

I dont seem to connect with the philosophy and world view the devs seem to have.

This patch just made ud the most op race that ever has been in the patch history by 20%> increase.

If you do not nerf the Night Elves you have to make every race OP, my feedback about balance is simply this: More messed up again without solving the real issue, I don't think Undead will be that op but Necros are really really good now, though what about Keeper and Mountain Giants? No changes to them at all... I think Orc and Human will get some kind of Undead like boosts too to be able to fight with Night Elf
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
Great hooray for new patch. Pity I'm still sitting on my old computer, so I can't experience all the awesome stuff.

Are changes like the Unholy Frenzy not going to break triggers that have a unit cast the ability on another unit?
With* these major changes to orb of fire healing reduction, would you be able to use it outside of the item or is it hard coded to the orb of fire item?
If Blizzard is keeping the good practices of old, then they probably created a whole new ability and updated the Necromancer's command card to have it. It would be bad practice to retroactively change ability mechanics, especially such significant ones (such as the one applied to Unholy Frenzy), perhaps less so for small ones (such as Life Drain).

Closely related, the effects introduced to Orb of Fire and Sundering Blades are very useful to have because you don't need scripts to toy with damage dealt. It would be a shame if a future patch erases them completely. E.g. Vorpal Blades was great for line damage on attack. I hope it was somehow maintained?


Can somebody post a screenshot of Sundering Blades's fields?
 

~El

Level 17
Joined
Jun 13, 2016
Messages
556
Does LUA have the same VM access as JASS?

Not sure what you mean, but as an overview:

  • All JASS functions and types are re-exported in Lua.
  • When the map is in lua-mode, JASS triggers and GUI triggers are transpiled into Lua.
  • There are some API changes in the Lua interface to accomodate it. E.g. the code type seems obsolete - TriggerRegister natives now simply take Lua functions. Globals are also now just normal Lua values.
  • Native Lua features also render some JASS features obsolete - e.g. hashtables are no longer really necessary because Lua already has excellent table support that is much better than hashtables. A lot of JASS String API functions are also obsolete because of Lua's in-built features.
In general: yes, it's just as capable as JASS, in fact, even more so.

P.S. Please, people, Lua is a name, not an acronym. Don't call it LUA :)
 

deepstrasz

Map Reviewer
Level 69
Joined
Jun 4, 2009
Messages
18,827
Abilities\Spells\Items\RitualDagger\RitualDaggerTarget.mdl
What? this is from a demon/dreadlord spell. I forgot its name now. It's not a new FX. It might be modified.
Abilities\Spells\Human\SunderingBlades\SunderingBlades.mdl
That one also looks familiar but not so much.
eplaceableTextures\PassiveButtons\PASBTNSunderingBlades.blp
I think this should be tweaked a little to make the sword more visible as it cuts through the shield. Right now, it's not really resembling the Knight sword and the shield is too colourful and the used palette too similar to the sword's.
ReplaceableTextures\CommandButtons\BTNAmbushDay.blp
You are right. What's this WoW icon doing here? They should make it a person under a cloak and a mouth mask/scarf to avoid resemblance with a specific race.
 
Level 1
Joined
Apr 25, 2019
Messages
1
  • There are some API changes in the Lua interface to accomodate it. E.g. the code type seems obsolete - TriggerRegister natives now simply take Lua functions. Globals are also now just normal Lua values.
Is it possible to pass a metatable with __call method to such natives? If so, it would make it trivial to attach additional data to callback functions, making the use of natives like TimerStart much easier.
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
Thanks so much @Sieben!
I wanted to verify if you could choose the type of armor that is affected. And you can also choose flat and percent bonus. Excellent design decisions!

One thing I'd like to see in future patches is Object Editor dummy abilities that help bypass the need for triggers and scripts. E.g. Attack while moving (currently, can somewhat be mimicked with Phoenix Fire innate, but still difficult), elune's grace for other damage types, etc.
 
Last edited:

Kazeon

Hosted Project: EC
Level 33
Joined
Oct 12, 2011
Messages
3,449
I want to test the EmberCraft on 1.31 but got the following issues:

- "Could not load texture" error message appeared when the map is 25% loaded. I tried to open the map in WE and the same error message appeared when it's preloading the 16th tile texture. Then I checked the tileset and found that the alpha tile did not get loaded.
- After re-saving the map using the new WE, the "couldn't load texture" message was gone. But the map crashes after loading is about ~80% complete. I will attach the log file below.

- I experienced very bad and heavy lag after using "Validate Map Triggers" for the first time. I had to force end task the WE to fix it. I had multiple WEs open at the time that's probably why. I certainly don't even want to try to reproduce it. And the trigger validate function seems to work much slower than before.

- Already saved the map but when pressed "test map" it re-compiles the whole map again.

Will be back if I find more.
 

Attachments

  • Log.rar
    113.5 KB · Views: 143
Level 9
Joined
Feb 24, 2018
Messages
342
Couple questions to people who can code:

native BlzSetAbilityStringField - do I get it right that it can change ability hotkey? There's no "player" or "unit" field, so I guess it would affect that ability for everyone?
Would that cause desyncs if I couple it with "GetLocalPlayer() == Player(x) then"?
 
Status
Not open for further replies.
Top