• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[1.31.1] Bug: Loading saved game breaks some unit events

Status
Not open for further replies.
Level 10
Joined
Dec 11, 2009
Messages
234
Uploading test map for demonstration.

Save the game, then load that game, and some specific unit events will not be recognized anymore.
For example, these will break:
JASS:
EVENT_UNIT_ISSUED_POINT_ORDER
EVENT_UNIT_ISSUED_TARGET_ORDER
EVENT_UNIT_ISSUED_ORDER
EVENT_UNIT_SPELL_CAST
EVENT_UNIT_ATTACKED
// I didn't check all of events, so probably there is more

I suppose they broke something when they added new generic unit events.

This bug does not occur in WC 1.30.4
This bug occurs in WC 1.31.1.
 

Attachments

  • 1.31.1-GameLoadUnitEventBug.w3x
    9.6 KB · Views: 224
I did that for soem triggers but I don'T like the idea of fixing bugs like this. I would wait for a patch unless it's urgent.
The same here. We just patched one critical trigger in the Dwarf Campaign like this and left everything else as they were.

I am still at 1.29.2.
Is this workaround required if I did not create the map with 1.31.1 but players use 1.31.1 to play the map?
You need the workaround only if people save-and-load your maps. And yes, AFAIK, the bug affects all maps created with previous versions of Warcraft III.
 

Shar Dundred

Community Moderator
Level 73
Joined
May 6, 2009
Messages
5,911
Level 7
Joined
Apr 26, 2015
Messages
125
Hey there, I think I may have ran into this bug too, and am looking for some advice....I had it so where a unit casting a spell would trigger an event, and now it no longer works :/ For example, I have a trigger set up where to talk to an npc you have to select the custom ability "Talk" in its ability section...Selecting it is supposed to trigger a cinematic, but as I was testing my map in the 1.31.1, after a few hours into the game, ability's like those which triggered events no longer work, it just casts the spell without triggering the cinematic :/

*Note: I did save and quite, loaded the map again to continue, and I think that's where i started noticing these issues....

Ugg I'm at a total loss....My game works for the 1.29, with loading issues late in the game, and this 1.31.1 seemed to have made things run much smoother, and I was so excited!...But then the dreaded bug happened :(

Any advice would be much appreciated, I'm not very smart when it comes to complex triggers :p
 
Level 2
Joined
Jul 24, 2007
Messages
199
If it helps, I also noticed that after loading the function OrderId2String doesn't work, so I had to replace comparisons in my triggers from
Code:
if (OrderId2String(GetIssuedOrderId()) == "defend") then...
to
Code:
if (GetIssuedOrderId() == OrderId("defend")) then...
 
Level 2
Joined
Jul 24, 2007
Messages
199
A bit of investigation on the issue.

These events work after game load:
Code:
EVENT_UNIT_DAMAGED
EVENT_UNIT_DAMAGING
EVENT_UNIT_DEATH
EVENT_UNIT_DECAY
EVENT_UNIT_SELECTED
EVENT_UNIT_DESELECTED
EVENT_UNIT_CONSTRUCT_CANCEL
EVENT_UNIT_CONSTRUCT_FINISH
EVENT_UNIT_STATE_LIMIT*

These don't:
Code:
EVENT_UNIT_ACQUIRED_TARGET
EVENT_UNIT_TARGET_IN_RANGE
EVENT_UNIT_ATTACKED
EVENT_UNIT_UPGRADE_START
EVENT_UNIT_UPGRADE_CANCEL
EVENT_UNIT_UPGRADE_FINISH
EVENT_UNIT_TRAIN_START
EVENT_UNIT_TRAIN_CANCEL
EVENT_UNIT_TRAIN_FINISH
EVENT_UNIT_RESEARCH_START
EVENT_UNIT_RESEARCH_CANCEL
EVENT_UNIT_RESEARCH_FINISH
EVENT_UNIT_ISSUED_ORDER
EVENT_UNIT_ISSUED_POINT_ORDER
EVENT_UNIT_ISSUED_TARGET_ORDER
EVENT_UNIT_HERO_LEVEL
EVENT_UNIT_HERO_SKILL
EVENT_UNIT_HERO_REVIVABLE
EVENT_UNIT_HERO_REVIVE_START
EVENT_UNIT_HERO_REVIVE_CANCEL
EVENT_UNIT_HERO_REVIVE_FINISH
EVENT_UNIT_SUMMON
EVENT_UNIT_DROP_ITEM
EVENT_UNIT_PICKUP_ITEM
EVENT_UNIT_SELL
EVENT_UNIT_SELL_ITEM
EVENT_UNIT_SPELL_CHANNEL
EVENT_UNIT_SPELL_CAST
EVENT_UNIT_SPELL_EFFECT
EVENT_UNIT_SPELL_FINISH
EVENT_UNIT_SPELL_ENDCAST
EVENT_UNIT_PAWN_ITEM
EVENT_UNIT_RESCUED
EVENT_UNIT_USE_ITEM
EVENT_UNIT_LOADED
EVENT_UNIT_CHANGE_OWNER

These I don't know how to invoke:
Code:
EVENT_UNIT_DETECTED
EVENT_UNIT_HIDDEN

* - The EVENT_UNIT_STATE_LIMIT, which is also listed as a unitevent, probably has something to do with TriggerRegisterUnitStateEvent (as a returned event, I guess), however you do not use it in TriggerResiterUnitEvent normally (because you also need to specify the limit and limitop). As far as I checked, TriggerRegisterUnitStateEvent works fine after game is loaded in 1.31.1.

UPD: yeah, checked - GetTriggerEventId() returns EVENT_UNIT_STATE_LIMIT when registered with TriggerRegisterUnitStateEvent.
 
Last edited:

deepstrasz

Map Reviewer
Level 72
Joined
Jun 4, 2009
Messages
19,438
You can workaround by changing unit-specific events to generic events and use conditions to specify the triggering unit. But that's cumbersome.
What can I do about A Unit Takes Damage events without using a damage detection system?
Will putting a condition like, Triggering Unit=the variable unit referred in the takes damage event, work?
 

deepstrasz

Map Reviewer
Level 72
Joined
Jun 4, 2009
Messages
19,438
Level 25
Joined
Jul 26, 2008
Messages
1,380
Oh that's good to know! :) I'm currently using patches 1.29 and 1.30.4 for some map projects, and am a little nervous switching over to the reforge still as none of my maps work on those :(
I mean, I would stay away from editing on Reforged for now, because many people have reported bugs where saving a map causes imports to become corrupted and stuff. But in terms of playing single player maps like yours that have long play time and require saving, Reforged is probably the best option now.

Why do you say your maps don't work on reforged?
 
Level 7
Joined
Apr 26, 2015
Messages
125
Why do you say your maps don't work on reforged?
Oh hey there!:D
I really wish I could be using the latest patch, however when they released reforge and tested out some of my maps, the editor and title screen kept freezing on me, taking over ten minutes to load one of my maps.
In game none of the imported music would work ether for some reason. I'm just a little nervous to switch over mainly because they made it kinda tricky to switch back to an older patch, having to completely remove the game from the computer, then reinstall :p
 
Level 25
Joined
Jul 26, 2008
Messages
1,380
When they initially released reforged, it was very buggy. I think they have solved many of those issues, and this save-load bug was the last main one affecting your campaign.

But i completely agree, to stay away from reforged if you are using the editor.

As for how your map plays on reforged, perhaps Deepstrasz or Cleavinghammer can confirm if it works the next time they use it (not sure if they using reforged or not).
 

deepstrasz

Map Reviewer
Level 72
Joined
Jun 4, 2009
Messages
19,438
As for how your map plays on reforged, perhaps Deepstrasz or Cleavinghammer can confirm if it works the next time they use it (not sure if they using reforged or not).
I'm definitely not. Still boycotting.
If the StarCraft II bois keep updating the Galaxy Editor making it even saner, then I'd probably not even care about Warcraft III anymore aside from some map reviews now and then, maybe, that if I'll feel like installing the newest patch.
 
Level 25
Joined
Jul 26, 2008
Messages
1,380
I'm definitely not. Still boycotting.
If the StarCraft II bois keep updating the Galaxy Editor making it even saner, then I'd probably not even care about Warcraft III anymore aside from some map reviews now and then, maybe, that if I'll feel like installing the newest patch.
You mean if they allow custom maps from Wc3 to convert to ScII, you will move there? Or you already plan to move there.
 

deepstrasz

Map Reviewer
Level 72
Joined
Jun 4, 2009
Messages
19,438

@FeelsGoodMan pointed this out to me. I had no idea there was an ingame/editor fix for it.
 
Level 30
Joined
May 14, 2021
Messages
1,214

Aside from this guy's post, you could try use this one (still requires a CD-Keys).
 
Status
Not open for further replies.
Top