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

Reforged Bugs Work Arounds

I felt the need to write this stuff down, otherwise I would forget and this knowledge may be lost to the war3 modding community. The following will be an unordered list of bugs and their solutions. This list will probably grow over time as I remember them, or as other members provide their own list of bugs and fixes.
  • Using slot status or controller status natives during initialization can cause desyncs.
    • Solution: Don't do these comparisons until after the game starts.
  • Unable to set a player name in multiplayer (Credit to Xace for discovering this)
    • Solution: Loop through all players, and set their names using SetPlayerName() during initialization. This will allow the function to work at later times like it used to.
  • Modifying some default frames will break replays
    • Solution:
      JASS:
      local framehandle frame = BlzGetFrameByName("name",0)
      if frame == null then// You are in a replay and this frame doesn't exist
          call Location(0,0) //Generate a handle to replace the frame's handle
      endif                  //that was created in the game(
      You will have to do this for every frame function that returns a handle and that does not exist in replays. You only have to do this once per frame. The location leak is intentional, do not clean it. If you are using lua, you may have to create a table storing these locations, otherwise the GC might free them, causing handle issues again.
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,535
I hope you're right, I'll be checking this shortly.

Also the method to fix replays still needs some work.
Unless they somehow managed to screw it up again in a very recent patch, I guarantee it works. I remember helping people remove (or try to remove) the BNET tags from player names at the time that the bug was around. Once the patch came out it all started to work again.
 
Save&Load is broken.

Lua - string.pack/string.unpack stops working after loading a game, luckly FourCC was updated to not use string.unpack in reforged (making GUI maps in Lua mode safe, but still matters for hand written code),
one can do a series of saving/loading the functions to keep the feature: FourCC breaks in V1.31

Frame/toc api usage is not redone (using the by load Map broken frames in a frame native crashs the game):
I suggest to pack every frame api usage into a function without args then redo them after loading the game.

Also the method to fix replays still needs some work.
In Lua it is safer to check for GetHandleId > 0 of frames instead.
 
Save&Load is broken.

Lua - string.pack/string.unpack stops working after loading a game, luckly FourCC was updated to not use string.unpack in reforged (making GUI maps in Lua mode safe, but still matters for hand written code),
one can do a series of saving/loading the functions to keep the feature: FourCC breaks in V1.31

Frame/toc api usage is not redone (using the by load Map broken frames in a frame native crashs the game):
I suggest to pack every frame api usage into a function without args then redo them after loading the game.


In Lua it is safer to check for GetHandleId > 0 of frames instead.
I'll have to try that GetHandleId check when I get the time.

Does the FourCC issue only exist in 1.31?
 
Top