Reforged 2.0 Real-to-String Behavior

Level 7
Joined
Dec 30, 2007
Messages
60
Hey, y'all.

My map contains a casting bar in the form of a UI Frame that shows the time to cast a spell. You can preview the practical function of this casting bar in the following video:


As of Reforged 2.0, this casting bar no longer functions. The debugging process has led me to believe that 2.0 has introduced unusual behavior into the process of creating Real variables or converting arbitrary Real numbers to Strings. I'm looking at the following test cases:

  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
    • Conditions
    • Actions
      • Set VariableSet tempInt = (Integer((Entered chat string)))
      • Game - Display to (All players) the text: |cffffff00Display the following message:|r
      • Game - Display to (All players) the text: (String(tempInt))
Of the above trigger, I expect the following behavior: the entered chat string is displayed in the form of an Integer.
This event works as expected. (1 returns 1, 2 returns 2, 1.5 returns 1, 1074.15 returns 1074).
Here's where things seem to get unusual.

  • Untitled Trigger 002
    • Events
      • Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
    • Conditions
    • Actions
      • Set VariableSet tempReal = (Integer((Entered chat string)))
      • Game - Display to (All players) the text: |cffffff00Display the following message:|r
      • Game - Display to (All players) the text: (String(tempReal))
Of the above trigger, I expect the following behavior: the entered chat string is displayed in the form of a Real. (1 should return 1.00.)
This event fails to print a number; the third action never fires.

  • Untitled Trigger 003
    • Events
      • Player - Player 1 (Red) types a chat message containing -r as An exact match
    • Conditions
    • Actions
      • Set VariableSet tempReal = (Random real number between 0.00 and 1000.00)
      • Game - Display to (All players) the text: |cffffff00Display the following message:|r
      • Game - Display to (All players) the text: (String(tempReal))
Of the above trigger, I expect the following behavior: when -r is entered as a chat message, a random real number is printed.
This event prints instead uniformly presents random numbers that grow smaller and less precise until it stops functioning.
(-r, -r, -r, -r, -r returns 9724, 572., 16, 4, and fails to fire.)
The lack of function then persists through a map restart (Alt+Q, Alt+R), but does not persist when the Warcraft III client is restarted.

This is one of the strangest things I've ever seen and I'm honestly wondering if it's not just localized to me. Regardless, I'm not sure if I'll be able to resolve the issue with my project.
I've attached a map with cases like the above. You can enable the triggers and try them for yourself!
 

Attachments

  • Real conversion cases.w3m
    16.6 KB · Views: 4
Level 3
Joined
Mar 15, 2021
Messages
22
I've had the same issue when using debug messages from real to string. Occasionally some of the real values do work, like "Blood pact extra damage" here, but the rest either show nothing, or just the first digit of the decimal.


default.png
 
Top