Tooltip Renders Default Values for per_buff_memory_declaration
Published on Sunday, August 27, 2023 By
I'd previously mentioned this to jseward on discord, but figured I ought to make a post here as well, if only for bookkeeping.
In playing around with attempting to improve tooltips for missiles (eg modding them to display their damage, penetration, and lifetime) and Warpath (display how many stacks you have), I believe I stumbled across a bug.
Below, you'll see what is otherwise a standard missile from a level 1 Marza, modded to list those three traits in its tooltip:
Here's what was added to standard_torpedo.buff:
which should have referenced the unmodified data source...
I believe that should have displayed the values of 22.8/200/18, but instead displayed 1/1/1. I assume this is due to the tooltip getting set on unit creation or something, before the values are initialized by the weapon's torpedo_firing_definition code, thus leading to it rendering the defaults (and I have confirmed it's the default values that render by setting them to other values, like 11).
It's possible that I'm misunderstanding how per_buff_memory_declaration is to be referenced in the gui definition as there were no examples of it, but this felt like a bug.