MM1:Special Stages

Special Stages are strange areas in the Unstable Realm where the seven Chaos Bridges can be found. In each Special Stage, Mary or Xane must collect a required amount of stars within a set time or they will be forced back to their normal realm at the entrance they entered it from.

Appearance
Special Stages are floating blocks, with perfectly symmetrical layouts. These float in a colored void with strange, warping clouds floating around it. Many stars of every color of the rainbow can be found around the areas, usually concentrated in one part of the map in each quadrant.

Modding
Custom Special Stages can be created by users, though it might be tricky if unfamiliar with ACS scripting, which these stages use to create their gameplay and store settings.

Creating the Stage
With all of this done, your map should now be a proper special stage. Test it with all four difficulties to make sure it isn't impossible and add extra time if you come close to running out of time on normal difficulty without grabbing the floating clock. After this is done, edit SPECSTG.acs again, setting the star limit to the correct value for normal difficulty if you set it to -1 previously.
 * Make a new map, named SPECSTG#, where # is its number, from 1-7. Save it into your map WAD using "File > Save Map Into..." or by pushing.
 * Open the script editor by pushing and paste this code, replacing "NUMBER" with the Special Stage number you chose:
 * Next, make your map; To make it symmetrical like the official Special Stages (though it isn't required), make one quadrant then copy-paste it to the other three, mirroring it horizontally and vertically as necessary using the buttons on the toolbar when editing a selection . Place coins and coin circles, which will become stars automatically if this stage is visited outside of matches. Make sure to not copy-paste objects near quadrant boundaries, or you might find multiple coins collected at the same time.
 * Open MaryMagicalAdventure1.ipk3 and open SPECSTG.acs in the root directory. (If you'd like to, copy this file into your map or mod's WAD file.) There are two arrays at the top of this script that have to be modified to your Special Stage's requirements. On both directories, the first array index is for Special Stage 1, continuing until the last one, which is Special Stage 7. Count across and modify the one corresponding to your Special Stage.
 * coins_required is how many stars the player has to pick up on normal difficulty to complete this Special Stage. On Hard difficulty, the player has to pick up 50 more stars and vice versa for easy difficulty. Also, when playing with other players, the star amount required increases. When testing, set this to -1 to force a 999-star requirement regardless of difficulty or number of players.
 * time_required is how many 15 seconds of time the player initially has to complete this Special Stage on normal difficulty. For example, 4 is a minute, while 6 is 1 minute 30 seconds. Keep in mind this, like the star limit, is altered depending on difficulty, with the hardest difficulty taking at least a minute off the clock. Unlike the star requirement, playing in multiplayer doesn't affect the time limit.

Making a Special Stage Entrance
NOTE: This isn't required for making a Special Stage itself, just for normal levels. You can skip this if not making your own normal levels.

The way the player enters a Special Stage is the Special Stage Entrance, a arch with "SPECIAL" written over it. When approached, the player will be moved to the next Special Stage in order. This isn't about your Special Stage itself, but any normal levels you make; Skip this if you're only making custom Special Stages intended to be used with another mod or the base game. If done correctly, you should be able to visit a Special Stage from your new entrance!
 * Make a 128-long line next to a wall, preferably 1 unit or less away from it. Give it the SPECSTGD texture and lower unpeg the linedef to make the door appear on the ground. Don't make your entrance on a 3D floor, as the script doesn't check for the player's height, unlike Boosting Objects.
 * Next, draw a second linedef 64 units or greater away from the entrance then give it these properties:
 * Action: 80: ACS Execute
 * Script: Named, SSEnter
 * Map Number: 0
 * Argument 1: Was used for the "ID" of where to appear when returning from this Special Stage entrance, but it's now unused.
 * Argument 2: The "Special ID" of this Special Stage; The Special ID is an array that determines if the player has done something previously like picking up an item or entering a Special Stage. Set this to a unique number. The array in XCOMMON.acs may need to be increased if extra IDs are needed.
 * Argument 3: TID of the "checkpoint" the player will respawn from if they fall down a pit or drown without activating another one. Make sure to set this or the player may respawn at the very beginning of the level.
 * Check "Player crosses" as the activation method.