GEONE
December 1st, 2024, 02:54
Hello! I wanted to report a pretty obscure bug I encountered when trying to make a spell/power for the Staff of the Magi to add to a character's actions tab.
Initially, I was confused as the auto-parsed actions was insisting the staff dealt 16215 force damage
https://i.imgur.com/UsRGgR5.png
This clearly wasn't correct, so I took a look at the wording I copied into the spell:
"If you fail to avoid the effect, you take force damage equal to 16 × the number of charges in the staff."
The only strange thing about it was the multiplication sign, so I tried a different unicode character to see if that was the issue: the inverted exclamation mark (¡)
https://i.imgur.com/iKHu5YU.png
Ah hah! In HTML Character Entity Number Encoding, these are characters are encoded as & #161; for the inverted exclamation mark and & #215; for the multiplication sign (ignore the spaces after the &, without them the forum post auto-decodes them). So it was just putting the 16 (force damage) in front of whatever the encoding for the character was, 161 for the inverted exclamation mark, and 215 for the multiplication sign, resulting in 16161 and 16215 respectively.
This bug is very easy to replicate. Just make a new spell, type "takes force damage equal to &" into the description, and drag it onto a character's action tab.
https://i.imgur.com/dqABrQn.png
and voila!
https://i.imgur.com/bHE4Fca.png
the ampersand is encoded as & #38; in HTML, which is why the damage is 38.
Initially, I was confused as the auto-parsed actions was insisting the staff dealt 16215 force damage
https://i.imgur.com/UsRGgR5.png
This clearly wasn't correct, so I took a look at the wording I copied into the spell:
"If you fail to avoid the effect, you take force damage equal to 16 × the number of charges in the staff."
The only strange thing about it was the multiplication sign, so I tried a different unicode character to see if that was the issue: the inverted exclamation mark (¡)
https://i.imgur.com/iKHu5YU.png
Ah hah! In HTML Character Entity Number Encoding, these are characters are encoded as & #161; for the inverted exclamation mark and & #215; for the multiplication sign (ignore the spaces after the &, without them the forum post auto-decodes them). So it was just putting the 16 (force damage) in front of whatever the encoding for the character was, 161 for the inverted exclamation mark, and 215 for the multiplication sign, resulting in 16161 and 16215 respectively.
This bug is very easy to replicate. Just make a new spell, type "takes force damage equal to &" into the description, and drag it onto a character's action tab.
https://i.imgur.com/dqABrQn.png
and voila!
https://i.imgur.com/bHE4Fca.png
the ampersand is encoded as & #38; in HTML, which is why the damage is 38.