0
Completed - Resolved

"Math Operation" produces wrong output for decimals

bzy.xyz 1 year ago • updated by Cian Noonan (Graphics Plumber) 1 year ago 5

In particular, arguments appear to be being cast to integers before operation.


Replicate:


  1. Create a new custom map.
  2. Add a Dungeon Core for player 1.
  3. Create 6 decimals "A" := 1.5, "B" := 1.6, "A+B", "A-B", "A*B", "A/B".
  4. Create an objective with description "{0} {1} {2} {3} {4} {5}".
  5. Create a new script with "On Start" trigger and four Math Operation actions:
    1. "A"+"B" -> "A+B"
    2. "A"-"B" -> "A-B"
    3. "A"*"B" -> "A*B"
    4. "A"/"B" -> "A/B"
  6. After above actions add a "Set Objective Contents (Number)" updating the created objective with all 6 decimals in order.
  7. Export and test.
  8. Observe the objective window.

Expected: Objective window reads "1.5 1.6 3.1 -0.1 2.4 0.9375".


Actual: Objective window reads "1.5 1.6 2 0 1 1".

Game Version:
Steam Public
Platform:
Windows
Marked for Review

Hi bzy.xyz,


Same as my previous response we really appreciate the comprehensive nature of the report and we're sure to look into it. Hopefully we'll be able to hotfix these sometime soon.


Cheers,


Lee

Completed - Next Patch