Messagebox with the "%0.f" format should use 0 digit precision
This may need some feedback from a non-OpenMW user, but:
As the title states, the mod Town Criers (http://mw.modhistory.com/download-64-12713) places new NPCs into cities that routinely announce the time.
During my testing of the mod, the Town Criers gave the time in decimal numbers ranging until ca 5 values after the decimal point.
Screenshots from the original mod suggest this is unintended and that the Town Criers are meant to announce the times in a more "normal" fashion.
#3 Updated by Andrei Kortunov 8 days ago
- Status changed from New to Confirmed
- Reproducibility changed from Have not tried to Always
- Operating system changed from MacOS to Other
A script command:
MessageBox "Town Crier: ''The time is %0.f of the clock.''" Gamehour
Looks like an original engile rounds float values, OpenMW - no:
A question: If we will add a rounding here, how to display float as it is?
#4 Updated by Miroslav Remák 7 days ago
I'm pretty sure that's not the case. I believe OpenMW uses default precision for formatting if the format specifier contains no number after the dot, while it should use 0 precision. See https://github.com/OpenMW/openmw/blob/master/components/misc/messageformatparser.cpp#L39.
#5 Updated by Andrei Kortunov 3 days ago
- Subject changed from [Mod] Town Criers - town crier NPCs announce the time in decimal numbers as opposed to an integer. to Messagebox with the "%0.f" format should use 0 digit precision
- Category set to Scripting
- Status changed from Confirmed to Closed
- Assignee set to Andrei Kortunov
- Target version set to openmw-0.43
- % Done changed from 0 to 100
Applied in the 4bb349a5259d534c34ef2017d2f941c5be838045 commit.