MEDALDEF

Revision as of 14:32, 27 May 2024 by AKMDM (talk | contribs) (Clarified that a "text colour" should be the name used for the colour in the TEXTCOLO lump.)
This article documents a Zandronum-specific special lump which may not be supported by ZDoom and its other child ports.
This article documents a special lump which is only available in development builds of Zandronum 3.2 and newer.

(development version 3.2-alpha and above only) MEDALDEF is a special lump that allows mods to create their own medals, similar to the built-in Skulltag medals. Custom medals can be awarded to players using either GivePlayerMedal or A_GivePlayerMedal.

To create or edit a medal, the following syntax can be used:

MedalName
{
   AddFlag <flag>
   RemoveFlag <flag>

   Property = "<value>";
}

All values for properties must be enclosed in quotation marks.

Flags

  • KEEPBETWEENLEVELS

Players are allowed to keep the medal when the level changes.

  • ALWAYSSHOWQUANTITY

When a player receives the medal, the quantity and only one copy of the medal's icon will always appear on the screen.

Properties

  • Icon

The name of the graphic that appears on the screen when the medal is awarded to a player.

  • ScoreboardIcon

The name of the graphic used to show the medal on the scoreboard via the DrawMedals margin command. If left unspecified, or if the graphic doesn't exist, then the Icon is used instead.

  • Class

Which FloatyIcon actor class to spawn over the player's head when they receive the medal. This must be specified.

  • State

Which state in the FloatyIcon actor class to show over the player's head when they receive the medal. This must be specified.

  • Text

The text that appears on the screen when the medal is awarded to a player.

  • TextColor

The text colour (as defined in the   TEXTCOLO lump) used to draw the text on the screen.

  • QuantityColor

The text colour used to draw how much of the medal a player has earned, if there's too many to fit all of them on the screen, or if the ALWAYSSHOWQUANTITY flag is enabled.

  • AnnouncerEntry

The announcer entry to play when a player receives the medal.

  • LowerMedal

If a player previously earned the specified "lower" medal and it's currently being shown over their head, then receiving this medal will instantly replace it.

  • Sound

The name of the sound to play when a player receives the medal. This sound only plays when the user isn't looking through the player's eyes.