Template:MessageFormatting
Jump to navigation
Jump to search
Formatting notation[edit | edit source]
%.2f - This means format the variable with 2 decimal places.
%.0f - This will format the variable with 0 decimal places, so is the normal choice for integers.
%5.0f - The number in front of the point specifies the minimum width of the number. In this case, there will always be enough space in front of the number for 5 digits:
Number 12 wins Number 1234 wins
Formating switches[edit | edit source]
The following formatting switches can be used in Oblivion. Put them in any sequence right after the '%'
Switch | Function |
---|---|
+ | Display + in front of positive numbers |
<Space> | Leave a leading space in front of positive numbers |
- | Use left-aligned formation instead of right alligned. |
0 | The filling-char used for formatting is '0' instead of ' ' |
Other Functions[edit | edit source]
%g - This usually works just like "%.0f", displaying 0 decimal places. When the number is 1000000 or larger, though, the game displays it in scientific notation (1E+006)
%.3e - Shows numbers in scientific notation (123000 = 1.23E+005)
%% - Use this to display a percent-sign in the message