Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

1.31.1 [Bug] Loading saved game breaks some unit events

Discussion in 'Patch & Reforged Discussion' started by BizzaroFukuro, Jul 22, 2019.

  1. BizzaroFukuro

    BizzaroFukuro

    Joined:
    Dec 11, 2009
    Messages:
    201
    Resources:
    2
    Maps:
    2
    Resources:
    2
    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:
    Code (vJASS):
    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.
     

    Attached Files:

  2. Tommi Gustafsson

    Tommi Gustafsson

    Joined:
    May 26, 2017
    Messages:
    328
    Resources:
    6
    Tools:
    1
    Maps:
    2
    Tutorials:
    3
    Resources:
    6
    Last edited: Jul 28, 2019
  3. BizzaroFukuro

    BizzaroFukuro

    Joined:
    Dec 11, 2009
    Messages:
    201
    Resources:
    2
    Maps:
    2
    Resources:
    2
    It's more than annoying. It's game breaking.
     
  4. WaterKnight

    WaterKnight

    Joined:
    Aug 18, 2009
    Messages:
    4,035
    Resources:
    5
    Maps:
    1
    Tutorials:
    4
    Resources:
    5
    Can you workaround by re-creating the triggers/events?
     
  5. Tommi Gustafsson

    Tommi Gustafsson

    Joined:
    May 26, 2017
    Messages:
    328
    Resources:
    6
    Tools:
    1
    Maps:
    2
    Tutorials:
    3
    Resources:
    6
    You can workaround by changing unit-specific events to generic events and use conditions to specify the triggering unit. But that's cumbersome.
     
  6. OutsiderXE

    OutsiderXE

    Joined:
    Sep 28, 2004
    Messages:
    1,107
    Resources:
    3
    Maps:
    3
    Resources:
    3
    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.
     
  7. Shar Dundred

    Shar Dundred

    Map Moderator

    Joined:
    May 6, 2009
    Messages:
    4,444
    Resources:
    12
    Packs:
    1
    Maps:
    10
    Tutorials:
    1
    Resources:
    12
    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?
     
  8. Tommi Gustafsson

    Tommi Gustafsson

    Joined:
    May 26, 2017
    Messages:
    328
    Resources:
    6
    Tools:
    1
    Maps:
    2
    Tutorials:
    3
    Resources:
    6
    The same here. We just patched one critical trigger in the Dwarf Campaign like this and left everything else as they were.

    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.
     
  9. Shar Dundred

    Shar Dundred

    Map Moderator

    Joined:
    May 6, 2009
    Messages:
    4,444
    Resources:
    12
    Packs:
    1
    Maps:
    10
    Tutorials:
    1
    Resources:
    12
    Which is very likely to happen in my maps.
    I fucking hate Blizzard's buggy updates.
    Thanks for the info nontheless.
     
  10. Shar Dundred

    Shar Dundred

    Map Moderator

    Joined:
    May 6, 2009
    Messages:
    4,444
    Resources:
    12
    Packs:
    1
    Maps:
    10
    Tutorials:
    1
    Resources:
    12
    @Tommi Gustafsson I have to ask you because I cannot test myself as I refuse to update my game:
    Is the "Unit comes within range of unit" event also affected by this?
     
  11. BizzaroFukuro

    BizzaroFukuro

    Joined:
    Dec 11, 2009
    Messages:
    201
    Resources:
    2
    Maps:
    2
    Resources:
    2
    No, it's unaffected and still works after game load.
    This bug seems to be related only to
    TriggerRegisterUnitEvent()
    .
     
  12. Shar Dundred

    Shar Dundred

    Map Moderator

    Joined:
    May 6, 2009
    Messages:
    4,444
    Resources:
    12
    Packs:
    1
    Maps:
    10
    Tutorials:
    1
    Resources:
    12
    At least something. Still sucks that this bug appeared.
    Thanks for the info!
     
  13. Mathayis

    Mathayis

    Joined:
    Apr 26, 2015
    Messages:
    116
    Resources:
    2
    Maps:
    2
    Resources:
    2
    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
     
  14. OutsiderXE

    OutsiderXE

    Joined:
    Sep 28, 2004
    Messages:
    1,107
    Resources:
    3
    Maps:
    3
    Resources:
    3
    Yes, its the loading that breaks it. Use a general event if possible and put the unit in a condition
     
  15. Mathayis

    Mathayis

    Joined:
    Apr 26, 2015
    Messages:
    116
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Oh, so it is the loading? Aw geez....I hope maybe there will be a patch to fix this one of these days, the 1.31.1 seemed to be working soo good :/ Thanks for the advice :)
     
  16. ANdROnIQ

    ANdROnIQ

    Joined:
    Jul 24, 2007
    Messages:
    205
    Resources:
    3
    Icons:
    1
    Maps:
    2
    Resources:
    3
    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 (Text):
    if (OrderId2String(GetIssuedOrderId()) == "defend") then...
    to
    Code (Text):
    if (GetIssuedOrderId() == OrderId("defend")) then...
     
  17. ANdROnIQ

    ANdROnIQ

    Joined:
    Jul 24, 2007
    Messages:
    205
    Resources:
    3
    Icons:
    1
    Maps:
    2
    Resources:
    3
    A bit of investigation on the issue.

    These events work after game load:
    Code (Text):
    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 (Text):
    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 (Text):
    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: Oct 29, 2019
  18. deepstrasz

    deepstrasz

    Map Reviewer

    Joined:
    Jun 4, 2009
    Messages:
    15,430
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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?
     
  19. Map Designer

    Map Designer

    Joined:
    May 2, 2011
    Messages:
    1,176
    Resources:
    2
    Maps:
    1
    Spells:
    1
    Resources:
    2
    is this still bug?
     
  20. Toranks

    Toranks

    Joined:
    Feb 24, 2020
    Messages:
    10
    Resources:
    0
    Resources:
    0
    Do anybody know any solutions already? How can I downgrade PTR to the previous version?