Monitor

From SRB2 Wiki
(Redirected from Strong Random Monitor)
Jump to navigation Jump to search
This article or section is outdated and has not been fully updated to reflect the current version of SRB2.

Please help the Wiki by correcting or removing any misinformation, as well as adding any new information to the page.


Monitors

Monitors (or item boxes) are special Objects that commonly appear in levels in SRB2. As in the classic Sonic games, these Objects resemble computer monitors or televisions – the designs of the monitors in SRB2 are based on those from Knuckles' Chaotix. If a player breaks a monitor open, they will receive a power-up or bonus (or sometimes a negative effect) from it. However, monitors can only be broken if a player directly interacts with them: by spinning or jumping into them as any character that can spin, gliding into them as Knuckles, hammering them as Amy, tail bouncing or shooting them as Fang, or running through them while in boost mode as Metal Sonic. Projectiles other than Fang's corks will have no effect on monitors, and neither do Armageddon Shield blasts. If the player jumped onto a monitor to break it, they will bounce back upwards off them, allowing the player to break further monitors or enemies afterwards before landing on the ground again (this is known as "Monitor bouncing").

The icon displayed on a monitor usually identifies what effect will be given when it is broken (except in the case of Random Monitors, where the effect is randomised). When the monitor is broken, a secondary "monitor icon" Object will be created that displays this icon and rises into the air to a certain extent – after a short interval, the monitor's power-up or bonus (or otherwise) is awarded to the player via this Object, and the Object itself then disappears.

Most monitors in SRB2 also have gold variations, only a few of which are used in-game. Unlike regular monitors, gold monitors are not destroyed when popped. After the player is given a gold monitor's effect, the monitor's screen will go blank for three seconds, then the icon will reappear and the monitor can be popped again. Gold monitors are typically used in sections where the monitor's ability is required to progress, so if the player loses the monitor's ability, they can go back and refill it. Monitors that give numerical bonuses (extra lives, rings, or points) do not have gold versions.

Monitors in SRB2 are solid Objects, which means it is possible for players to stand and walk on top of monitors if they did not jump or spin to get there. However, if a monitor falls onto a player from above, the player will be crushed and die – in competitive gametypes such as Match and CTF, a player is awarded points if they manage to pop the monitor before it falls on another player.

It is possible to make a monitor trigger a linedef executor when it is popped. This can be done by setting the Extra flag on the monitor Thing, and setting its Angle value to the tag of the trigger linedef that should be called, plus 16384. For example, to trigger a linedef executor with tag 1, the angle of the monitor Thing should be 16385.

Monitors in SRB2

* SRB2 does not use these monitor types directly in maps; most appear as special replacements for other monitor types depending on the game mode or gametype being played, while Pity Shield and Gravity Boots Monitors never appear at all in normal gameplay. However, all of these are still available for custom maps to use.

Golden monitors

* These monitors do not appear in any SRB2 levels, but are still available for custom maps.

Monitor respawning

When a normal monitor is broken by a player in Single Player/Co-op, it will remain broken for the duration of the level (or until the player respawns, if in Single Player). Outside these gametypes, monitors can have the ability to automatically respawn after a limited time: the console variable respawnitem toggles this feature on/off, while respawnitemtime determines how long it takes for a monitor to respawn after being broken. Golden monitors are not broken when popped, and will respawn the item they hold after three seconds.

Alternatively (outside of Single Player/Co-op), all monitors in a level can be replaced by a single type of monitor or made to not spawn at all: in Competition this is determined by competitionboxes; in other gametypes this is determined by matchboxes.

Weighted random monitors

In Match and Capture the Flag, a special randomized respawning mechanism is used to ensure a fair distribution of items in the map: Most monitor types in SRB2 can be given the Special or Ambush flag to turn them into weighted random monitors. A weighted random monitor will spawn normally when the map initially loaded, but when it respawns, the monitor type it will respawn as will be picked randomly from a predetermined table, where each monitor type has a fixed respawning probability. There are two types of weighted random monitors: the Strong Random Monitor (or SRM) and the Weak Random Monitor (or WRM).

The Special flag will turn a monitor into a Strong Random Monitor. When a SRM respawns, it will choose one of the following monitors to respawn as:

Monitor Icon Probability (fraction) Probability (percentage)
Whirlwind Shield
3/16 18.75%
Elemental Shield
3/16 18.75%
Force Shield
3/16 18.75%
Attraction Shield
2/16 12.50%
Armageddon Shield
2/16 12.50%
Invincibility
2/16 12.50%
Extra Life Monitor
1/16 6.25%

The Ambush flag will turn a monitor into a Weak Random Monitor. When a WRM respawns, it will choose one of the following monitors to respawn as:

Monitor Icon Probability (fraction) Probability (percentage)
Super Sneakers
10/32 31.25%
Whirlwind Shield
8/32 25.00%
Elemental Shield
8/32 25.00%
Force Shield
3/32 9.38%
Teleporter Monitor
1/32 3.13%
Recycler Monitor
1/32 3.13%
Extra Life Monitor
1/32 3.13%

The following types of monitors, none of which can respawn from an SRM or WRM, cannot be turned into weighted random monitors with the Special or Ambush flag:

Special and Ambush will also have no effect for all custom monitor types and for respawning monitors.

Custom monitors

To do
Add a mini-tutorial on setting up a set of states/Object types for a typical monitor

It is possible to make custom monitors for SRB2 with the use of SOCs. To make an Object behave like and be recognised as a monitor, it needs to be given the MF_MONITOR flag. However, MF_SHOOTABLE is also needed to allow the Object to be destroyed by a player. MF_SOLID is generally also given to monitors so that they can be stood on when the player is not spinning/jumping onto them.

The following Object properties control the monitor's behavior:

  • DeathState: When a monitor is popped by a player, it will go to this state to trigger the monitor's death sequence; ideally this state should use A_MonitorPop for the standard effects for a monitor.
  • DeathSound: Used by A_MonitorPop for the monitor's "pop" sound.
  • Speed: Used by A_MonitorPop to determine the Object type of the monitor remains spawned; usually this is set to MT_MONITOREXPLOSION. The Mass property of this Object type in turn determines the Object type of the explosion graphic also spawned (for MT_MONITOREXPLOSION this is MT_EXPLODE, for example).
  • Damage: Used by A_MonitorPop to spawn the Object type to use as the monitor's "icon" – this object is typically expected to have the MF_BOXICON flag so it can rise up into the air until it reaches a set height above the ground, and ultimately run the monitor's respective action. The icon Object's Speed and Damage properties determine the vertical speed and maximum height of the icon's rising respectively.
  Object types [view]
General EnemyBossPushableSpringMonitorNiGHTS power-upProjectileAmbient sound effect
Special PlayerShieldsFlickiesOverlay
Related links List of Object types