Chaos Emerald

From SRB2 Wiki
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.

For the pick-up emerald objects, see Thing types > Other collectibles.

The seven Chaos Emeralds and the secret eighth

The Chaos Emeralds are hidden items in most Sonic games, and collecting all seven is necessary to get the true ending. In SRB2, the seven Chaos Emeralds are used to allow Sonic, Knuckles and Metal Sonic to turn into Super Sonic, Super Knuckles, and Super Metal Sonic respectively, as well as unlock secrets. Transforming into super form is done by pressing spin mid-jump, and can only be done if the player has at least 50 rings, and is not holding a shield.

The exact implementation of the Chaos Emeralds, as well as the method to collect them, differs depending on the gametype being played, as does the behavior of Super forms.

The earliest possible act to have all seven Chaos Emeralds is Techno Hill Zone Act 2.

Single Player/Coop

In Single Player, the emeralds are to be collected as the player progresses through the various levels. The emeralds collected by the player can be kept track of using the Rankings/Scores HUD.

To collect the emeralds, the player must collect an Emerald Token in one of the stages. When the stage is completed, the player is warped to one of seven Special Stages. In these stages, the player is transformed into their NiGHTS form and must fly around the track to collect enough blue spheres to destroy the Ideya Capture, and return to the start again within the time limit for the Special Stage. If this is done successfully, the player is rewarded with a Chaos Emerald as well as any points they earned from that Special Stage. If not, the Special Stage ends, and the player earns nothing. If more than one Emerald Token is collected in a stage, a player re-enters either the same Special Stage, or enters a new one, depending on how the previous Special Stage went.

In Cooperative mode, emerald-collecting is much the same as in Single Player, except with multiple players and with the Multiplayer Special Stages instead – the emeralds are shared by all players in the game, but only those players who are playing as Sonic, Knuckles, or Metal Sonic can turn Super in regular, unmodified SRB2.

Match/Capture the Flag

In the Match and Capture the Flag gametypes (not including Team Match), the Chaos Emeralds are collectable within the stages themselves, and can allow one of the players in the game to gain a temporary speed boost and temporary invincibility. Because of this, the emeralds are considered an important part of these gametypes, as they can potentially decide the winning players or team. The console variable powerstones can be used to turn this feature on or off; by default it is turned on.

Each Match/CTF stage contains a large amount of Match Chaos Emerald Spawns in which the seven Chaos Emeralds can randomly appear. At the start of the Match/CTF session, each of the emeralds will spawn at the location of one of these after a random time between 1 and 2 minutes. Once spawned, they can each be collected by one of the players – unlike in Single Player/Coop these emeralds are not shared by all players, but are stored as separate collections for individual players. The displayed player's own collection is visible on the Game HUD. The emerald collections of all players in the game session can be viewed through the Rankings/Scores HUD, which displays the icons for the emeralds collected by each player besides their own life icons in the player listings.

Being damaged by an opponent or a hazard will cause a player to spill all their collected emeralds if they lack a shield. However, emeralds can also be tossed by players, allowing other players to obtain the emeralds – this tactic can be useful in CTF in particular. If a spilled/tossed emerald is not collected within 12 seconds, or it falls into a death pit, it will disappear from the map. Any missing emeralds will eventually be respawned at a Chaos Emerald spawn again up to approximately a minute afterwards.

If a player manages to collect all seven Chaos Emeralds, they will be granted 20 seconds of Super Sneakers and Invincibility. Afterwards, the Chaos Emeralds will start spawning again.

Technical information

Given the two different systems of collecting Chaos Emeralds in-game detailed above, the internal storage methods for Chaos Emeralds also differ accordingly:

  • In Single Player/Coop, the Chaos Emeralds collected by all players are stored in the global variable emeralds, which can be accessed or modified with the use of Lua scripts.
  • In Match/Capture the Flag, the Chaos Emeralds collected by each player are stored using the player power pw_emeralds. In Lua, this power can be accessed or modified for a particular player with the code player.powers[pw_emeralds].

To store the collected emeralds in both of the above systems, the Chaos Emeralds themselves are represented by a series of toggles known as the Chaos Emerald flags. These are listed below:

Value Flag name Emerald Icon
1 EMERALD1 Green Emerald
2 EMERALD2 Purple Emerald
4 EMERALD3 Blue Emerald
8 EMERALD4 Light Blue Emerald
16 EMERALD5 Orange Emerald
32 EMERALD6 Red Emerald
64 EMERALD7 Gray Emerald

The Lua function All7Emeralds can be used to determine whether a given variable contains all of the above Chaos Emerald flags within.

There are several sets of emerald sprites used by the game. Among them are CEMGA0CEMGG0 (used by the emerald Objects), CEMGH0 (used for the wire-frame emerald in Black Hole Zone), CHAOS1CHAOS7 (full-size sprites used by the HUD), and TEMER1TEMER7 (miniature sprites used by the Match/CTF HUD).