Classes:Powerup
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
|
| Power-up | |||
|---|---|---|---|
| Actor type | Internal | Game | |
| DoomEd Number | None | Class Name | Powerup |
Classes: Inventory→Powerup
→PowerDamage
→PowerDoubleFiringSpeed
→PowerDrain
→PowerFlight
→PowerFrightener
→PowerHighJump
→PowerInfiniteAmmo
→PowerInvisibility
→PowerGhost
→PowerShadow
→PowerInvulnerable
→PowerIronFeet
→PowerMask
→PowerLightAmp
→PowerTorch
→PowerMinotaur
→PowerMorph
→PowerProtection
→PowerRegeneration
→PowerScanner
→PowerSpeed
→PowerStrength
→PowerTargeter
→PowerTimeFreezer
→PowerWeaponLevel2
Powerups are internal classes that are placed in the player's inventory to tell the game that the player possesses a power.
In this context, the word "powerup" refers to the power itself, not to the PowerupGiver item that you pick up in order to get the power. For example in Doom, the radiation suit is a powerup giver and isn't itself a powerup; instead it gives a power, in this case "protection from radiation", whimsically named the "IronFeet" powerup by the programmers who made Doom.
In the same way, the word "powerup" has traditionally been used for all kinds of artifacts in the game, but some of them are not actually true powerups nor powerup givers; for example in Doom, the soulsphere is actually a very powerful form of HealthBonus and the gained health is just normal health; however, the iron feet power that the radiation suit gives is a true powerup, because the effect lasts over a period of time and stays with the player until it is exhausted.
If a negative duration is given to a powerup subclass, it will be the amount of seconds the power stays active. If a powerup has the INVENTORY.HUBPOWER flag, it stays active when moving between levels within a hub. If a powerup has an Inventory.Icon property, this icon is displayed on the HUD while the power is active. (All standard HUDs will place it in the upper-right corner.)
Note that powerup is an abstract class - you do not give the player a generic powerup item, rather the associated powerup giver must give one of the predefined subclasses of powerup, such as IronFeet or WeaponLevel2. Currently, there is no way in DECORATE to create completely new powerups, but some powerups, such as Protection and Morph are explicitly designed so that you can subclass them to a limited extent.
It is possible to give a player a powerup that lasts the entire level. In this case a CustomInventory item gives the player a powerup, such as Doom's Berserk powerup.
Powerups support these special properties in addition to the basic Inventory properties:
- Powerup.Color color, alpha
- Powerup.Color BlueMap
- Powerup.Color GoldMap
- Powerup.Color GreenMap
- Powerup.Color InverseMap
- Powerup.Color RedMap
- Specifies the color and the opacity of the screen blend that is used when the powerup is active. Color is specified either as three integers, an "RR GG BB" string or a color name from the X11R6RGB lump. Alpha is a value between 0.0 and 1.0. Instead of specifying a color you can also use the predefined values 'BlueMap', 'GoldMap', 'GreenMap', 'InverseMap' and 'RedMap'. These don't set a blending value but instead use a predefined blend.
- Powerup.Colormap [sourcecolor, ]destcolor
- A generalization of the colormaps (which, counter-intuitively, are used with Powerup.Color), this creates a color ramp from the source color to the destination color. This uses decimal numbers for the red, green, blue components, ranging from 0.0 to 1.0, inclusive. If only one color is provided, then black (0.0, 0.0, 0.0) is used as the source color. For example, Powerup.Colormap 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 and Powerup.Colormap 1.0, 1.0, 1.0 both create a grayscale, Powerup.Colormap 1.0, 1.0, 1.0, 0.0, 0.0, 0.0 creates the well known inverse map and Powerup.Colormap 1.0, 0.0, 0.0, 0.0, 1.0, 0.0 creates a red to green effect.
- Powerup.Duration time
- The length of time the power up will last in tics (1/35 of a second). If a negative duration is given, it will be taken as the duration in seconds (e.g., -30 is half a minute, while 30 is less than a second). The maximum duration is 0x7FFFFFFF, which corresponds to about two years of real time and can therefore safely be used for permanent powerups.
- Powerup.Mode mode
- For some powerups which may behave in different ways, specify the mode. Currently affects Invulnerability and Invisibility.
- Invulnerability modes: None and Reflective. "None" is invulnerability without any added effect. "Reflective" also makes all projectiles bounce off of the player while the powerup is in effect.
- Invisibility modes: Cumulative, Fuzzy, Opaque, Stencil and Translucent. Cumulative" allow multiple invisibility powerups of the same type to stack when active at the same time, adding their strength value together. "Fuzzy" uses the fuzz effect renderstyle, like that of the spectre. "Opaque" results in an opaque renderstyle, making the actor not invisible graphically speaking. "Stencil" uses the stencil renderstyle, showing just the shape. "Translucent" is merely a way of explicitly specifying the default invisibility mode.
- Powerup.Strength strength
- The magnitude of a powerup's effect. Currently only applies to Invisibility, as other powerups have unquantifiable effects or use predetermined fields such as DamageFactor.
- Invisibility strength: determines how translucent the affected actor becomes. 0 is for opaque, and 100 is for fully invisible. Does not apply to "Fuzzy" mode.
DECORATE definition
ACTOR Powerup : Inventory native {}
- Chex Quest actors
- Chex Quest internal actors
- Chex Quest 3 actors
- Chex Quest 3 internal actors
- Doom actors
- Doom internal actors
- Doom II actors
- Doom II internal actors
- Heretic actors
- Heretic internal actors
- Hexen actors
- Hexen internal actors
- Strife actors
- Strife internal actors
- ZDoom actors
- ZDoom internal actors
- Internal