View source for How to display negative numbers with the digital font - EDukeWiki

# View source for How to display negative numbers with the digital font

← How to display negative numbers with the digital font

You do not have permission to edit this page, for the following reasons:

- The action you have requested is limited to users in the group: Users.
- You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

In the default game, there is no minus symbol for the digital numbers. When you try to display a negative number with the digital set, it displays the steroids icon instead of a minus symbol. With that knowledge, in this tutorial, we will take advantage of the [[dynamicremap]] command to move the steroids icon to a different slot, and the [[DEF_Language#tilefromtexture|tilefromtexture]] to add in the new minus symbol and the steroids icon. == Procedure == In GAME.CON/EDUKE.CON, put this at the top of the file: dynamicremap Down in DEFS.CON where it says: define STEROIDS_ICON 2469 Change to: define STEROIDS_ICON 2459 // 2469 This will tell the game to display tile #2459 for the steroids icon, instead of #2469. Currently, tile #2459 is empty, so we will have to re-add the steroids icon, as well as the minus symbol. Download [http://hendricks266.duke4.net/stuff/digital_minus.zip digital_minus.zip (1.67 kb)], and extract it to your base-level mod directory. Finally, put this at the '''bottom''' of duke3d.def. It will add in the 8-bit art required for the steroids icon and minus symbol, as well as adding high resolution versions of the two tiles. undefmodel 2459 undeftexture 2459 undefmodel 2469 undeftexture 2469 tilefromtexture 2459 { file "highres/8bit/2459.png" } tilefromtexture 2469 { file "highres/8bit/2469.png" xoffset -4 yoffset -3 } texture 2459 { pal 0 { file "highres/screen/hud/2469_steroids.png" } } texture 2469 { pal 0 { file "highres/screen/fonts/digital/2469.png" } } Violá! If you want to test it, put this at the top of GAME.CON: gamevar [[PLR_MORALE]] -5 0 The large HUD should display "-5" under ARMOR. == Credits == Hendricks266: minus symbol art, both 8-bit and highres; tutorial

Return to How to display negative numbers with the digital font.

Retrieved from "http://wiki.eduke32.com/wiki/How_to_display_negative_numbers_with_the_digital_font"