Modding:Medal

From DoomRL Wiki

Jump to: navigation, search

Medals are achievements that are received, at most, once per game. As game objects, they are as functional as you require them to be.

Prototype

As with all DoomRL lua objects, medals can be defined in any way at all. The following keys are used in DoomRL's base wad file:

Medal Prototype
string id This is the medal's sid. It must be distinct from other string ids.
string name This is the medal as it appears on the mortem and player info screens.
string desc This is a description of the medal as it appears on the player info screen.
boolean hidden This determines whether or not the medal is visible on the player info screen before the player has been given the medal.
function condition This is a function that is used to set up the requirements for the medal. It usually looks at statistics accrued throughout the game.
boolean winnoly This determines if the medal is only received if the player wins the game. This is only necessary if the medal has been assigned a condition key.
list removes This is a list of medal ids. Any medals added to this list will not be gained if this medal has been given. This is only necessary if the medal has been assigned a condition key.
Personal tools