MEDALDEF: Difference between revisions

From Zandronum Wiki
(Created a page for the MEDALDEF lump added in 3.2.)
Tag: Source edit
 
m (Fixed links.)
Tag: Source edit
Line 1: Line 1:
{{SpecialLumpWarning}}
{{SpecialLumpWarning}}
{{DevfeatureWarning|version=3.2|type=a [[:Category:Special lumps|special lump]]}}
{{DevfeatureWarning|version=3.2|type=a [[:Category:Special lumps|special lump]]}}
{{Devfeature|3.2|alpha}} '''MEDALDEF''' is a special lump that allows mods to create their own medals, similar to the built-in [[Skulltag medals|Skulltag medals]]. Custom medals can be awarded to players using either [[GivePlayerMedal|GivePlayerMedal]] or [[DECORATE|A_GivePlayerMedal]].
{{Devfeature|3.2|alpha}} '''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:
To create or edit a medal, the following syntax can be used:

Revision as of 01:41, 27 May 2024

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 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.