Team spawn points
One of the greatest features of nDuke is the team specific spawn points.
This feature was never seen in any duke port so far.
The approach used on classic duke maps is a room with teleporters for each team base.
Players were supposed to choose the corresponding teleport to go to the right team base.
This was done in a lot of maps, a good example is 2v2bases.map
Players had to "agree" not to kill each other while in the teleporter room.
Plus, some players would not respect the rules and would simply use the opposite team's teleport.
But now with nDuke you can define directly in the .map file where each team will spawn!
Team spawn points are defined with the Hi-Tag of the "APLAYER (1405)" sprite.
1 for blue, 2 for red, 3 for green and 4 for brown
On Mapster32, to set up a Hi-Tag for a sprite,
simply hover with the cursor above the APLAYER sprite (2D Mode) and press ALT + H:
So we can set all teams like this:
NOTE: leave the Lo-Tag of APLAYER sprites at 0!
You have just to set the Hi-Tag!
Changing the pallete is not advisable because on Normal DM modes, the APLAYER pallete is used as the player color (DOS Duke behaviour which was kept on nDuke)
If the map has only TDM spawn points, these will be used if the current mode is normal DM.
Also, if no team spawn points are defined, the game will just distribute teams over the current common spawn points.
Also note that in team modes, the player 1 spawn point (green cursor) is not used unless there is no team spawn points defined.
The main new Feature of nDuke 2.0 is the CTF Modes.
As can be seen on the Team Modes subsection, there are 3 Flag based modes:
|CTF||Normal CTF (like ZDaemon's)|
|1-Flag CTF||Each team has a Flag delivering spot on their base
Both teams fight to capture the Neutral Flag (gray colored)
|Attack/Defense CTF||The Attack team only has a flag delivering spot
The Defense team has a capture-able Flag
To be able to place the Flag on a map, you must place the TILES020.ART file that comes on the nDuke zip on Mapster32's folder.
The sprite number for the flag is "5120".
The team of the flag is set with the Hi-Tag of said sprite:
(For 1-Flag CTF mode only)
|1||Blue Team Flag|
|2||Red Team Flag|
|3||Green Team Flag|
|4||Brown Team Flag|
For the A/D CTF Mode, a Lo-Tag of 1 is needed to set the Flag to be a spot only (will be translucent) for the Attacking Team.
NOTE: Unlike on the Team Spawn Points, you can change the pallete of the Flag if you want (but it's not needed and will have no effect in game).
Team Modes mapping tips
Creating equal bases
On Normal CTF and 1-Flag CTF modes, it's important that all teams have equal, symmetric bases, otherwise the map will not be fair.
Instead of creating both bases by hand, you can create one base first, and then copy the map, mirror it, and then connect both bases to form the complete map.
To copy the map, you must use the ALT GR key.
Select which parts of the map you want to copy, and then, with these parts selected, press C, that will create a copy of the selected area.
With the copy selected, press X (to mirror the selection on the X axis) and then Y (to mirror the selection on the Y axis).
Then just place the selection as you wish and join both bases.
Then remember to change the Team Colored details on the map for the mirrored part as well as the Team Spawn Points.
NOTE: remember to reasign different Channel Tags for all the effectors on the mirrored base, or the map will not work correctly!!
Additional tips on creating equal bases
Having equal structures for both bases and equal sprite disposition (items, etc) IS NOT ENOUGH to have both bases 100% equal.
This is because the spawn order on the first-spawn is based on the sprite id.
For example, the sprite id is the reason why the Player 2 always spawns first on the bathroom on Hollywood Holocaust.
It's important that the first-spawn order is the same between the two bases!
And if you just pasted the new base and updated the Hi-Tags, the spawn point order will probably NOT BE RIGHT.
Since the id is not an editable field, but the order in which the sprites were placed on the map, solving this by hand is a mess: you would have to switch the sprites around manually.
Fortunatelly though, my friend Fox made a mapster script which can reorder the sprites automatically, based on the Extra-Tag.
Click HERE to download it, and extract all files inside your Mapster32 folder. Make sure you're using the last version!
As can be seen on the Mapster32's console, there will be 2 new scripts:
set_sprite_extra: Sets the Extra-Tag to all APLAYER (1405) sprites based on the current sprite order (id);
set_sprite_order: Reorders all 'APLAYER' sprites based on the Extra-Tag;
So, execute the first script by typing in the console do state set_sprite_extra and press enter, that will set all APLAYER sprites Extra-Tags based on the current order.
The script is smart enough to order the Coop, DM, and each team TDM spawn points on their own groups.
Then, just change the Extra-Tag (CTRL+M in 2D Mode, ^+M in 3D Mode) of the sprites in an incremental manner, starting at 0 (for the first player) to set the order equally on all Team bases
After you're done, go to the console and execute the second script on the console with do state set_sprite_order (DO IT TWICE).
The script reorders all APLAYER sprites fields (coords, pal, cstat, etc) with exception of current_sector because Mapster32 doesn't allow it (the sprite will be on the wanted coords, but you won't be able to see it on 3D Mode), so you will have to move the sprite around a little and place it on where it was so the current_sector field is updated as well.
Done! Now the Spawn points order are right on both bases!
NOTE: If your maps use Cameras, you may also want to make then have the same order, which is also based on ID. The script also covers them though, so just do the same on the CAMERA1 (1276) sprites.
TIP: Apply the Extra-Tag on the spawn points and cameras BEFORE copying and pasting, then after pasting you can just use the same Extra-Tags and just update the Hi-Tag, to save time
CTF maps tips
The map must be made with the mode in mind. It's not advisable to make a map with all 3 Flag modes in mind. I really doubt that would work well..
For the standard CTF maps, it's recomended that each team have equal bases.
For 1-Flag CTF maps, it's the same as normal CTF, and the Neutral Flag must be placed exactly in the middle of the way that connects both bases, with a reasonable obstacle to get the flag. Also, the bases must not be too far otherwise recovering a stealed flag becomes almost impossible. Having the flag deliver spot placed on the opposite team spawn point area may work to balance this out.
For A/D CTF, only the defense team is supposed to have a "base", and the attack team spawns outside of that base and must invade it to get the flag. The base must be made in a way so it's hard to invade.