Allow setting the leading character used with Fixed Length variables (%D)
Is your feature request related to a problem? Please describe.
I have 2 counter displays in my HUD, one being the score, that shows leading zeros. To emulate the appearance of a LCD number display, I want leading zeros to be a different "zero" character in my custom font, so they appear to be "unlit", but %D does not allow changing it.
A more common use case I can think of that this would work for is if you want fixed length with leading spaces instead of zeros, to allow right aligning text.
Describe the solution you'd like
It would be nice to have a way to set the character used by %D, I don't know what syntax would be best but I imagine 2 possible ways. Assuming $myvariable = 42:
A separator after the length number and the ASCII character code after it:
%D5|65$myvariablewould printAAA42instead of00042
A text command that sets the leading length character:
!Leading, behaving similarly to!Waitwhere you put a number with it, showing asL(65)in the text field. All%Dafter it in the text field would useA.
Describe alternatives you've considered
Trying it with tile swapping is much more tedious for score displaying since it requires either using the expensive modulus function or storing each digit as separate variables.
Additional context
What I want to achieve:
What I have to settle for when drawing text and using %D:
Source: chrismaltby/gb-studio