• 🏆 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 9
Joined
Feb 24, 2018
Messages
342
It is possible to remove timed life from units by using Phoenix ability to prevent the unit from dying. You just catch the "phoenixmorph" order and remove the ability on that event, to prevent the actual morphing. This trick has always worked even in the oldest patches.

But now that Blizzard is actively developing the game, and adding many new features for mapmakers, I suppose it's time to stop improvising things and request that they implement as much as possible natively.
Oh, I didn't know that! That's quite handy.
 
Level 24
Joined
Feb 9, 2009
Messages
1,787
1540705038021.png

Want...
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Melee AI was disabled. It was whatever mode the default is. I just opened a new map, placed a start point and disabled the time of day, AI, and victory/defeat conditions in the Melee Initialization trigger.
The melee triggers run periodic checks for when bases and stuff are killed. Maybe the leak is with those. Try disabling all triggers and seeing if the leak still happens.
 
Level 4
Joined
May 17, 2008
Messages
75
I said the victory/defeat conditions were disabled. Anyway, I tried it with no triggers and no units. It still increased by 1,000 K every 20-25 seconds on the x64 version.

The x32 version appears to increase at a much slower rate.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
I said the victory/defeat conditions were disabled. Anyway, I tried it with no triggers and no units. It still increased by 1,000 K every 20-25 seconds on the x64 version.
Some increase is expected due to replays being saved.

In any case with this leak a match lasting 5 hours would inflate by 900MB. Seeing as how there is no address size limit and modern computes easily have 8-16GB of RAM, this inherent leak is not too much of a concern although I do agree it should be fixed or at least limited.
 
Level 5
Joined
Sep 29, 2016
Messages
43
Are there any informations on what exactly got changed so that the custom maps listed (dbz tribute, builders & fighters, etc.) no longer desync?

Since desync is still a huge problem (at least for me), i'd like to know if you guys have an idea on how to support the devs in pinpointing the problems. (It's cool to see that 6 maps got fixed (desyncs, loads), but you know..)
For example my current LineTowerWars Crash quota is around 100%. Both for LTW and TeamLTW. Any version. Would it help them to give them the map and the replay?

As for other maps, desyncs happen, but its hard to figure out what the cause is.
I did think that LTW crashes because of many units, but since i played 23 Taurens and battled around 1k units at 1 spot with 0.8fps and didn't have a desync on 1.30, i have no clue what else could be the issue. Maybe some certain later units spawning or some endgame elemental towers getting build...
 
Level 4
Joined
May 17, 2008
Messages
75
I noticed something odd about the garbage collection map regarding unit groups, which I'd avoided like the plague because of seemingly unstoppable leaking.

If I try to destroy the group directly and set the var to nil, the handle(?) still leaks and causes the memory use to increase by 500K/second.

However, if I disable the selected line and let Dr Super Good's garbage collection system destroy the group, the memory levels off.

Or am I just doing it wrong?
 

Attachments

  • leaktest.png
    leaktest.png
    7.1 KB · Views: 352

~El

Level 17
Joined
Jun 13, 2016
Messages
557
I noticed something odd about the garbage collection map regarding unit groups, which I'd avoided like the plague because of seemingly unstoppable leaking.

If I try to destroy the group directly and set the var to nil, the handle(?) still leaks and causes the memory use to increase by 500K/second.

However, if I disable the selected line and let Dr Super Good's garbage collection system destroy the group, the memory levels off.

Or am I just doing it wrong?

First off, setting the var to nil does nothing in Lua. In JASS it had a purpose because JASS leaks handle values unless you null them. Not the case in Lua.

My guess as to why the difference, would be that DSG's system also changes Lua's GC settings to make it more aggressive, which means handles are more eagerly collected. There's been some investigation but the results are very strange, and it seems that for whatever reason the Lua GC doesn't really want to collect the handles on the default settings, unless explicitly told to (via a call to collectgarbage()).
 
I found also a strange behavior concerning ethereal units. This is a bug in both 1.30.4 and 1.31 PTR,
It used to be that enemy units ignored ethereal units, which they could not damage.
Now, they attack ethereal units but do no damage.
I think the old behavior was better.

EDIT: I found the reason for the bug. I had set Gameplay Constant called "Gameplay - Magic Immunes resist damage" to False. When it is true, Ethereal works normally.

Test map attached.
 

Attachments

  • EtherealTest.w3x
    17.1 KB · Views: 105
Last edited:

Remixer

Map Reviewer
Level 31
Joined
Feb 19, 2011
Messages
1,957
It is possible to remove timed life from units by using Phoenix ability to prevent the unit from dying. You just catch the "phoenixmorph" order and remove the ability on that event, to prevent the actual morphing. This trick has always worked even in the oldest patches.

But now that Blizzard is actively developing the game, and adding many new features for mapmakers, I suppose it's time to stop improvising things and request that they implement as much as possible natively.
Could you explain how to make the "Timed-life" bar disappear? I tried but could not quite make it work.
 
Level 5
Joined
May 10, 2018
Messages
129
What are difference between names of functions in Lua with ones in JASS?
I just found ConditionalTriggerExecute. In JASS, it is simply TriggerExecute.
I want a complete list of them.
 
Could you explain how to make the "Timed-life" bar disappear? I tried but could not quite make it work.

Make a trigger that detects the "phoenixmorph" order (using an issues a no-target event). Cancel the timed life (kills the summon without the morph phoenix ability), intercept the order, and prevent morphing inside that order event.
 

Remixer

Map Reviewer
Level 31
Joined
Feb 19, 2011
Messages
1,957
Make a trigger that detects the "phoenixmorph" order (using an issues a no-target event). Cancel the timed life (kills the summon without the morph phoenix ability), intercept the order, and prevent morphing inside that order event.
It would probably be easiest if you could make a test map for me. But I do not quite comprehend how you can intercept the order and prevent it? Cancel timed-life does not seem to apply to units having the "Morph Phoenix" ability, so that does not make them "summoned" so I guess this solution only works if something makes your units summoned to begin with.
 
Level 5
Joined
Sep 6, 2010
Messages
91
It would probably be easiest if you could make a test map for me. But I do not quite comprehend how you can intercept the order and prevent it? Cancel timed-life does not seem to apply to units having the "Morph Phoenix" ability, so that does not make them "summoned" so I guess this solution only works if something makes your units summoned to begin with.

I do not know if this would be helpful. But you can use the power book, and put in this item the Morph Phoenix skill, the only thing you have to do is that a unit picks up this item, and the life bar will appear as a defect, although it has some side effects. Greetings ...
 
Level 3
Joined
May 12, 2019
Messages
12
Does anyone know how to use TriggerRegisterVariableEvent in Lua without using GUI trigger and variable? In other words, how to create a global real variable in Lua without GUI?
Before the Lua support comes out, i was worried about how did they handle that parameters like "string varName" or "funcName". I recently tested this, found that only GUI real variables (with registered GUI TriggerRegisterVariableEvent) can become global, that makes a "udg_realVar" (inside Lua function "InitGlobals") convert to "globals.udg_realVar", but "globals" is a userdata in Lua environment. I've no idea what make this happens and how to do the same thing with pure Lua code.
 

~El

Level 17
Joined
Jun 13, 2016
Messages
557
Does anyone know how to use TriggerRegisterVariableEvent in Lua without using GUI trigger and variable? In other words, how to create a global real variable in Lua without GUI?
Before the Lua support comes out, i was worried about how did they handle that parameters like "string varName" or "funcName". I recently tested this, found that only GUI real variables (with registered GUI TriggerRegisterVariableEvent) can become global, that makes a "udg_realVar" (inside Lua function "InitGlobals") convert to "globals.udg_realVar", but "globals" is a userdata in Lua environment. I've no idea what make this happens and how to do the same thing with pure Lua code.

Why would you want TriggerRegisterVariableEvent with Lua variables? I know in JASS it was used for custom events and whatnot, to compensate for JASS's deficiencies, but in Lua there's a myriad of ways of accomplishing the same thing just using the language itself.

Besides, this native would be impossible to implement without significantly modifying Lua, and potentially destroying performance in the process.

TL;DR Regardless of what you used that native for in the past, there's probably a better way of doing it now.

EDIT: P.S. As to how udg globals are created in Lua, I think that is performed entirely by the engine now, using the GUI variable table or whatever.
 
Last edited:
Level 3
Joined
May 12, 2019
Messages
12
Why would you want TriggerRegisterVariableEvent with Lua variables?
I think this native is very convenient for state machine or some structures that which can easily doing interactive between events.

Actually, what I really want to know is the usage of things that Blz put into Lua's environment, such as userdata "globals", function "__jarray", table "bj_ghoul".
 
Last edited:

Kazeon

Hosted Project: EC
Level 33
Joined
Oct 12, 2011
Messages
3,449
- "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.
Want to address these two issues. They are caused by undersized texture. I use some 1x1 alpha textures for units and as a tile texture (to save filesize) but it causes crash on 1.31. I think people will rarely experience this but just in case they need to know. Would be nice to have the 1x1 textures back working again though.
 
Level 5
Joined
May 10, 2018
Messages
129
Need a syntax checker for Lua.

Now I have a 13000 lines of lua converted from JASS and it just doesn't compile.
(If you know YDWE), It works in YDWE and I have fixed all '_array_', '_loop_' issues. All official natives/API.

I need to know what's wrong!
 
Level 1
Joined
May 13, 2019
Messages
1
Good news, editor and game perfectly working on wine (latest staging version), in latest ubuntu (19.04).

Screenshot_from_2019-05-14_01-03-50.png


How to install:
- setup latest nvidea drivers, lutris/lutris
- setup wine staging (i try this on stable and develop, working only on staging at this moment)
- configure wine with 64bit prefix
- in winetricks add lib vcrun2015 (nothing more needed). Additionally you can install core fonts.
- download battle.net app
- run $ wine64 Battle.net-Setup.exe
- install battle.net, login to account
- download warcraft 3 PTR installed from blizzard site
- run $ wine64 Warcraft-III-Public-Test-Setup.exe
- install wc3 to default directory (program files)
- now install lutrise
- open lutrise and add game/editor with this options
-- Executable = /home/<username>/wine/drive_c/Program Files/Warcraft III Public Test/x86_64/Warcraft III.exe
-- Arguments = -nativefullscr
-- Working Directory = /home/<username>/wine/drive_c/Program Files/Warcraft III Public Test/x86_64/
-- Wine preifx = ~/wine
-- Arch = 64-bit
(paths may be different)

In runner options tab, specify checkbox on "Enable DXVK" (or game will crash on start video after 3-4 seconds)

All working perfectly.

For editor, change executable path in lutrise to /home/<username>/wine/drive_c/Program Files/Warcraft III Public Test/x86_64/World Editor.exe
 

~El

Level 17
Joined
Jun 13, 2016
Messages
557
Need a syntax checker for Lua.

Now I have a 13000 lines of lua converted from JASS and it just doesn't compile.
(If you know YDWE), It works in YDWE and I have fixed all '_array_', '_loop_' issues. All official natives/API.

I need to know what's wrong!

Does it not compile or does it not run properly in WC3? That's an important distinction to make, because Lua code can compile just fine but be logically invalid, in a way that JASS code can't, since Lua is dynamically typed.

At any rate, I recommend trying to use mpeterv/luacheck for your purposes, and seeing if it emits any errors. If it doesn't emit any errors (it'll throw a bunch of warnings into your face on default settings, though), then there's a more obscure kind of error in there, that only occurs while the map is running. Unfortunately, pinning that down might be hard, but it's possible to catch runtime Lua errors with the built-in "pcall" and "xpcall" functions - you can read more about them in the official Lua reference.
 
Level 5
Joined
May 10, 2018
Messages
129
Does it not compile or does it not run properly in WC3? That's an important distinction to make, because Lua code can compile just fine but be logically invalid, in a way that JASS code can't, since Lua is dynamically typed.

At any rate, I recommend trying to use mpeterv/luacheck for your purposes, and seeing if it emits any errors. If it doesn't emit any errors (it'll throw a bunch of warnings into your face on default settings, though), then there's a more obscure kind of error in there, that only occurs while the map is running. Unfortunately, pinning that down might be hard, but it's possible to catch runtime Lua errors with the built-in "pcall" and "xpcall" functions - you can read more about them in the official Lua reference.
Not compile. Error message emits when choose the map, a typical complie error behavior.

Update: Use the tool and it shows
upload_2019-5-13_21-50-41.png
.
Anyway, thank you so much, Sir.
 
Last edited:
Level 5
Joined
May 10, 2018
Messages
129
A WE Bug in Lua mode:
√ Trigger Editor -> "New Trigger Script", one should write in Lua, not JASS.
√ During the saving process, WE checks syntax in JASS.
× WE doesn't automatically add "//! beginusercode" and "//! endusercode" to head and tail of the custom trigger script in Lua. And one is not able to add them manually to the custom trigger script, because "//! beginusercode" and "//! endusercode" are JASS, not Lua. So, map cannot be saved.

(Btw, why trigger script requires a function of InitTrig_?????? Is that another bug?)

Update:
After one night's trial, now I think that In Lua mode, WE should not check syntax in JASS (Bug is here). Because if there is no "Trigger Script", WE check the whole script in Lua. When there are trigger scripts, WE check each scripts in Lua but check the whole in JASS. Ridiculous?

And once I coincidentally managed to save the map with trigger script (I don't remember how I did that). When I analyzed map files with tools, I found that there was "war3map.lua" in (listfile), but actually no war3map.lua was there. There was war3map.j. (Bug confirmed)
 
Last edited:
Level 1
Joined
Feb 11, 2019
Messages
5
Any ideas how Orb of Fire could detect healing done by a custom spell? Is healing now a damage type? Is there a function to do healing now that can be detected by Orb of Fire debuff to reduce it?
 
The gamma slider in the video options in the game is now unlocked. However, they do not seem to be doing anything. (Perhaps local pc settings can explain this).

"whosyourdaddy" detection is now trivial (storing the damage dealt (Damaging event), and comparing it to the damage received (Damaged event)).

Is healing now a damage type?

No, healing is not a damage type.

Is there a function to do healing now that can be detected by Orb of Fire debuff to reduce it?

Based on the common.j, no such function exists yet.
 
Last edited:
Level 5
Joined
May 10, 2018
Messages
129
Any ideas how Orb of Fire could detect healing done by a custom spell? Is healing now a damage type? Is there a function to do healing now that can be detected by Orb of Fire debuff to reduce it?
From new Orb of Fire Bug See:1.31ptr orb bug?,
I guess that, inside the game different types of regenerations (item, unit, ability) are hard-coded. So, there is no elegant way to detect regeneration. In 1.31, (I guess) Blizzard detects by using a periodic timer, comparing unit's HP before and after, and setting after=(before+after)/2.
(Something like the implement of the ultimate of Oracle in DotA)
 

~El

Level 17
Joined
Jun 13, 2016
Messages
557
Can anyone test if you can change a unit's model mid-game by changing the path? Also if it would work locally? I don't want to update and lose my 1.30 or risk the possibility of accidentally saving work on 1.31 editor.

No, you can't. The only properties you can change are those specified in the common.j as constants. The unit model isn't amongst them, and even if you try to do edit it directly, it won't work - I've tried.
 
Level 5
Joined
May 10, 2018
Messages
129
So called "Lua Transcomplier" in World Editor is buggy!
My script passes JASS syntax check but "Lua Transcomplier" says it has an unknown compile error at line 0.

(Any undergraduate major in Computer Science can easily write a bug-free version of this. Maybe Blizzard programmers are all high school students. Wow! A company full of young Bill Gates.)
 
Level 5
Joined
May 10, 2018
Messages
129
I've finally figured this out!!!
For guys whose maps written in JASS without GUI, if you want to change the language to Lua, besides from war3map.j->war3map.lua,
you must also fix the w3i:
upload_2019-5-17_21-36-31.png

Hope this will help you!
 

~El

Level 17
Joined
Jun 13, 2016
Messages
557
Dont know if this case for PTR 1.31 , but in last official patch in game lobby list i saw game tree tag (14/24 players)
When i entered there was actualy only 3 real players and 11 "closed" slots rofl...Other was also empty and "open" .

So thats how we got 14/24 xD lol

Is this normal how game behaves?

Pretty much. It's the same behaviour on non-PTR. Game simply counts how many slots are "unavailable", either filled or manually closed.
 
Status
Not open for further replies.
Top