Smart Spawns
Smart Spawns
Image Unavailable

Author: Zoinkity

Date: August 11, 2007

Category: GE Misc


SmartSpawns v4.0
SmartSpawns is a special feature that allows certain intro block types to selectively be 'turned off' depending on the number of players in the stage. By using set values, it ensures that ROMs that do not allow smart spawns simply ignore the feature.
This is done by setting flags in the "set" value register. When a flag is set, it disables the command for the given number of players.
0080 do not allow 1 player
0100 do not allow 2 player
0200 do not allow 3 player
0400 do not allow 4 player
0800 do not allow multiplayer
1000 do not allow agent
2000 do not allow secret agent
4000 do not allow 00 agent
8000 do not allow 007

The spawn (0), item (1), ammo (2), and new respawn distance (A) commands are supported.

Flags can be combined to disable something in more than one mode or difficulty setting. For instance, 300 would disable the spawn in both 2 and 3 player, but allow it in solo and 4 player.
Another use would be to set different spawn locations for a solo stage. Flag one spawn E000 and it will only be used in agent, D000 on secret agent, and 3000 on both 00 and 007. Combined co-op and solo stages might use both player and difficulty masks simulataneously.
In addition, you can selectively hand out equipment based on difficulty. If only 00 and 007 modes require plastique for an objective, you can set the 3800 flags to both the item and ammo command so agent and secret agent don't receive the extra equipment.

With version 4.0, an additional intro command has been added. Type 0A allows you to set the minimum acceptable distance to allow respawn in a multiplayer map. Note this new command will be ignored by unhacked ROMs, so it is safe to include in any setup file.
Respawn works as such:
First, for each spawn, the distance to the nearest player is computed. If a player is within the minimum distance, the spawn is skipped.
If at least one spawn was beyond the minimum distance, one of these spawns is randomly selected and you are moved to that position.
Otherwise, if a player was within distance of each of them, the spawn furthest away from a player is selected.

The new intro 0A command follows this format:
0x1 2 set #/smartspawn flags
0x3 1 type, which must be 0A
0x4 4 (float) distance

The default value if a command isn't present is 1000.0. By including a command you can set the value to something more appropriate for the stage or setup. Also, since this type also accepts smartspawn flags, you can change the minimum distance based on the number of players.
One caveat though: the distance must not be zero and should be a positive value. If you wish to always randomly select a spawn by blatantly ignoring distance, choose 1.0, 2.0, or a similiarly small value. This not only ignores a division by zero error but prevents respawn directly on top of another player. In addition, a nonzero distance ensures the command is ignored by unhacked ROMs.



File nameFile typeSize
smartspawns_v4.zipZip archive data28.61 kBInfo
smartspawn[zoinkity].zipZip archive data12.49 kBInfo


Feel free to edit this with navigation and backlinks
Go back to Goldeneye Levels
Diddy Kong Racing Levels
Mickey's Speedway USA Levels
Super Smash Bros Levels

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License