For the past while (months) I have been working on a Capture Point Systems mod, mostly over on the CQ forums. I finally converted it to Doom (mostly the map/s, as the scripting itself is IWAD independent), and am now releasing it.
Capture Point Systems



The concept behind this mod is really simple: You stand on a point, and it captures for your team. Capture all the points to win. Or, if timelimit is enabled, capture more points over time. This is, at its core, just a gameplay mod. The real specialty comes in the fact that its easy for anyone else to create maps for it.
Features:
- Teams with less people have their people count as more. (Weight balancing)
- Automatic Game Setup
- Automatic HUB that incorporates any extra maps.
- Fully modular system, meaning maps are easy to create and add to a collection.

I am releasing this with just a HUB map, and one playable map, but it is easy to create more maps, and I want to see what the rest of you comes up with!

Downloads
Capture Point Systems Core WAD: http://www.ifocserv.net/ftp/wads/Captur ... ase1.0.pk3
Default Doom Map/s WAD: http://www.ifocserv.net/ftp/wads/Defaul ... ase1.0.pk3
CPLIB ACS library (only for making your own maps): http://www.ifocserv.net/ftp/wads/CPLIB.acs
Server Setup Instructions
To setup a server, just run it with the two WADs above; one is the actual CPS scripting, the other is a set of map/s to use. If you want to use any other CPS maps that may be made by other people, just add it to the list of loaded WADs. It's also recommended that you set the map rotation to just 'HUB_DOOM'. Of course, you could create a rotation of just maps with the HUB if you wanted to, but I don't see why you would do that when the HUB auto-loads any added maps.

Also, you can set a timelimit if you wish (default is none). The system is built to adapt to any timelimit that is set.
Map Creation Instructions
Oh boy, here we get to the interesting stuff. There are a few things you must do to actually make a CPS map, but their fairly simple. First, you must know how to script, as the entire process to define a CPS map is done in ACS.
To start, just make a script of the OPEN type on your map that you want to use CPS with. Then, after your [#include "zcommon.acs"] line, add the line [#import "CPLIB.acs"]. You will also need to put the ACS library (can be downloaded above) in the same directory as your map WAD. After this, there are a few functions that you can use in your OPEN script to define parts of the CPS map, as detailed below. Unless otherwise specified, you generally use all of the functions of one type before moving on to the next, in the order they are presented below.
defineCapturePoint(x, y, z, radius, zHeight, team)
Creates a new point.
x, y, z: The x, y, and z coords of your point.
radius: The radius of your point. Atm, only square points work, so technically this is half of a side length.
zHeight: How tall your point is.
team: What team this point starts as. 0 is neutral, 1 is blue, 2 is red.
defineConnection(originalPoint, requiredPoint, team)
Creates a 'requirement' connection for a point. IE, you must own the required point in order to capture this point. Can be used more than once with one point. Point ID is based off of the order in which points were defined using the above; the first point defined has an ID of 0, the next an ID of 1, and so on.
originalPoint: The point ID in question.
requiredPoint: The point ID of the point required to capture the originalPoint.
team: What team this connection is for. 1 is blue, 2 is red. 0 does nothing.
defineChange(pointID, team, tag, side, location, texture, flat)
Ooh boy, this one is fun. This is used to define a visual change in the map when a point is taken.
pointID: The point ID in question.
team: What team this change is for. 0 is neutral, 1 is blue, 2 is red.
tag: Tag of the line or sector in question.
side: one of SIDE_FRONT, or SIDE_BACK.
location: one of TEXTURE_TOP, TEXTURE_MIDDLE, TEXTURE_BOTTOM.
texture: the string name of the texture to change to.
flat: will change a line if this is 0. If this is 1, it will instead change a floor of a sector, and 2 will change the ceiling of a sector. When non-zero, the side and location arguments are ignored. (Their still needed, but won't change anything)
And that's it! The only other thing needed is the following code:
Code: Select all
while(true)
{
CP_RUN();
delay(5);
}
If your ever confused or lost, feel free to open up one of the maps I have made to look at its scripts. Or look at this:
[spoiler]
Code: Select all
#include "zcommon.acs"
#import "CPLIB.acs"
// Main Game Loop
script 3 OPEN
{
delay(5);
//defineCapturePoint(x, y, z, radius, zHeight, team)
defineCapturePoint(-1504, 1504, 180, 320, 200, 1);
defineCapturePoint(-3584, 0, 0, 320, 300, 0);
defineCapturePoint(0, 3584, 0, 320, 300, 0);
defineCapturePoint(0, 0, 0, 320, 300, 0);
defineCapturePoint(3584, 0, 0, 320, 300, 0);
defineCapturePoint(0, -3584, 0, 320, 300, 0);
defineCapturePoint(1504, -1504, 180, 320, 200, 2);
//defineConnection(originalPoint, requiredPoint, team)
//Blue
defineConnection(1, 0, 1);
defineConnection(2, 0, 1);
defineConnection(3, 1, 1);
defineConnection(3, 2, 1);
defineConnection(4, 3, 1);
defineConnection(5, 3, 1);
defineConnection(6, 4, 1);
defineConnection(6, 5, 1);
//Red
defineConnection(4, 6, 2);
defineConnection(5, 6, 2);
defineConnection(3, 4, 2);
defineConnection(3, 5, 2);
defineConnection(1, 3, 2);
defineConnection(2, 3, 2);
defineConnection(0, 1, 2);
defineConnection(0, 2, 2);
//defineChange(point, team, tag, side, location, texture, flat)
defineChange(0, 0, 1, SIDE_FRONT, TEXTURE_TOP, "GLASSW2A", 0);
defineChange(0, 1, 1, SIDE_FRONT, TEXTURE_TOP, "GLASSW2B", 0);
defineChange(0, 2, 1, SIDE_FRONT, TEXTURE_TOP, "GLASSW2C", 0);
defineChange(0, 0, 1, SIDE_FRONT, TEXTURE_TOP, "STKIA01", 1);
defineChange(0, 1, 1, SIDE_FRONT, TEXTURE_TOP, "FLAT14", 1);
defineChange(0, 2, 1, SIDE_FRONT, TEXTURE_TOP, "FLOOR1_6", 1);
defineChange(1, 0, 11, SIDE_FRONT, TEXTURE_MIDDLE, "N_LTGY02", 0);
defineChange(1, 1, 11, SIDE_FRONT, TEXTURE_MIDDLE, "N_LTBL02", 0);
defineChange(1, 2, 11, SIDE_FRONT, TEXTURE_MIDDLE, "N_LTRD02", 0);
defineChange(1, 0, 14, SIDE_FRONT, TEXTURE_TOP, "LITE3", 0);
defineChange(1, 1, 14, SIDE_FRONT, TEXTURE_TOP, "LITEBLU5", 0);
defineChange(1, 2, 14, SIDE_FRONT, TEXTURE_TOP, "LITERED5", 0);
defineChange(1, 0, 15, SIDE_FRONT, TEXTURE_TOP, "GLASSW2A", 0);
defineChange(1, 1, 15, SIDE_FRONT, TEXTURE_TOP, "GLASSW2B", 0);
defineChange(1, 2, 15, SIDE_FRONT, TEXTURE_TOP, "GLASSW2C", 0);
defineChange(1, 0, 11, SIDE_FRONT, TEXTURE_TOP, "STKIA01", 1);
defineChange(1, 1, 11, SIDE_FRONT, TEXTURE_TOP, "FLAT14", 1);
defineChange(1, 2, 11, SIDE_FRONT, TEXTURE_TOP, "FLOOR1_6", 1);
defineChange(1, 0, 12, SIDE_FRONT, TEXTURE_TOP, "LITE3", 2);
defineChange(1, 1, 12, SIDE_FRONT, TEXTURE_TOP, "LITEBLU5", 2);
defineChange(1, 2, 12, SIDE_FRONT, TEXTURE_TOP, "LITERED5", 2);
defineChange(2, 0, 21, SIDE_FRONT, TEXTURE_MIDDLE, "N_LTGY02", 0);
defineChange(2, 1, 21, SIDE_FRONT, TEXTURE_MIDDLE, "N_LTBL02", 0);
defineChange(2, 2, 21, SIDE_FRONT, TEXTURE_MIDDLE, "N_LTRD02", 0);
defineChange(2, 0, 24, SIDE_FRONT, TEXTURE_TOP, "LITE3", 0);
defineChange(2, 1, 24, SIDE_FRONT, TEXTURE_TOP, "LITEBLU5", 0);
defineChange(2, 2, 24, SIDE_FRONT, TEXTURE_TOP, "LITERED5", 0);
defineChange(2, 0, 25, SIDE_FRONT, TEXTURE_TOP, "GLASSW2A", 0);
defineChange(2, 1, 25, SIDE_FRONT, TEXTURE_TOP, "GLASSW2B", 0);
defineChange(2, 2, 25, SIDE_FRONT, TEXTURE_TOP, "GLASSW2C", 0);
defineChange(2, 0, 21, SIDE_FRONT, TEXTURE_TOP, "STKIA01", 1);
defineChange(2, 1, 21, SIDE_FRONT, TEXTURE_TOP, "FLAT14", 1);
defineChange(2, 2, 21, SIDE_FRONT, TEXTURE_TOP, "FLOOR1_6", 1);
defineChange(2, 0, 22, SIDE_FRONT, TEXTURE_TOP, "LITE3", 2);
defineChange(2, 1, 22, SIDE_FRONT, TEXTURE_TOP, "LITEBLU5", 2);
defineChange(2, 2, 22, SIDE_FRONT, TEXTURE_TOP, "LITERED5", 2);
defineChange(3, 0, 31, SIDE_FRONT, TEXTURE_MIDDLE, "N_LTGY02", 0);
defineChange(3, 1, 31, SIDE_FRONT, TEXTURE_MIDDLE, "N_LTBL02", 0);
defineChange(3, 2, 31, SIDE_FRONT, TEXTURE_MIDDLE, "N_LTRD02", 0);
defineChange(3, 0, 32, SIDE_FRONT, TEXTURE_TOP, "GLASSW2A", 0);
defineChange(3, 1, 32, SIDE_FRONT, TEXTURE_TOP, "GLASSW2B", 0);
defineChange(3, 2, 32, SIDE_FRONT, TEXTURE_TOP, "GLASSW2C", 0);
defineChange(3, 0, 33, SIDE_FRONT, TEXTURE_TOP, "LITE3", 0);
defineChange(3, 1, 33, SIDE_FRONT, TEXTURE_TOP, "LITEBLU5", 0);
defineChange(3, 2, 33, SIDE_FRONT, TEXTURE_TOP, "LITERED5", 0);
defineChange(3, 0, 31, SIDE_FRONT, TEXTURE_TOP, "STKIA01", 1);
defineChange(3, 1, 31, SIDE_FRONT, TEXTURE_TOP, "FLAT14", 1);
defineChange(3, 2, 31, SIDE_FRONT, TEXTURE_TOP, "FLOOR1_6", 1);
defineChange(3, 0, 32, SIDE_FRONT, TEXTURE_TOP, "LITE3", 2);
defineChange(3, 1, 32, SIDE_FRONT, TEXTURE_TOP, "LITEBLU5", 2);
defineChange(3, 2, 32, SIDE_FRONT, TEXTURE_TOP, "LITERED5", 2);
defineChange(4, 0, 41, SIDE_FRONT, TEXTURE_MIDDLE, "N_LTGY02", 0);
defineChange(4, 1, 41, SIDE_FRONT, TEXTURE_MIDDLE, "N_LTBL02", 0);
defineChange(4, 2, 41, SIDE_FRONT, TEXTURE_MIDDLE, "N_LTRD02", 0);
defineChange(4, 0, 44, SIDE_FRONT, TEXTURE_TOP, "LITE3", 0);
defineChange(4, 1, 44, SIDE_FRONT, TEXTURE_TOP, "LITEBLU5", 0);
defineChange(4, 2, 44, SIDE_FRONT, TEXTURE_TOP, "LITERED5", 0);
defineChange(4, 0, 45, SIDE_FRONT, TEXTURE_TOP, "GLASSW2A", 0);
defineChange(4, 1, 45, SIDE_FRONT, TEXTURE_TOP, "GLASSW2B", 0);
defineChange(4, 2, 45, SIDE_FRONT, TEXTURE_TOP, "GLASSW2C", 0);
defineChange(4, 0, 41, SIDE_FRONT, TEXTURE_TOP, "STKIA01", 1);
defineChange(4, 1, 41, SIDE_FRONT, TEXTURE_TOP, "FLAT14", 1);
defineChange(4, 2, 41, SIDE_FRONT, TEXTURE_TOP, "FLOOR1_6", 1);
defineChange(4, 0, 42, SIDE_FRONT, TEXTURE_TOP, "LITE3", 2);
defineChange(4, 1, 42, SIDE_FRONT, TEXTURE_TOP, "LITEBLU5", 2);
defineChange(4, 2, 42, SIDE_FRONT, TEXTURE_TOP, "LITERED5", 2);
defineChange(5, 0, 51, SIDE_FRONT, TEXTURE_MIDDLE, "N_LTGY02", 0);
defineChange(5, 1, 51, SIDE_FRONT, TEXTURE_MIDDLE, "N_LTBL02", 0);
defineChange(5, 2, 51, SIDE_FRONT, TEXTURE_MIDDLE, "N_LTRD02", 0);
defineChange(5, 0, 54, SIDE_FRONT, TEXTURE_TOP, "LITE3", 0);
defineChange(5, 1, 54, SIDE_FRONT, TEXTURE_TOP, "LITEBLU5", 0);
defineChange(5, 2, 54, SIDE_FRONT, TEXTURE_TOP, "LITERED5", 0);
defineChange(5, 0, 55, SIDE_FRONT, TEXTURE_TOP, "GLASSW2A", 0);
defineChange(5, 1, 55, SIDE_FRONT, TEXTURE_TOP, "GLASSW2B", 0);
defineChange(5, 2, 55, SIDE_FRONT, TEXTURE_TOP, "GLASSW2C", 0);
defineChange(5, 0, 51, SIDE_FRONT, TEXTURE_TOP, "STKIA01", 1);
defineChange(5, 1, 51, SIDE_FRONT, TEXTURE_TOP, "FLAT14", 1);
defineChange(5, 2, 51, SIDE_FRONT, TEXTURE_TOP, "FLOOR1_6", 1);
defineChange(5, 0, 52, SIDE_FRONT, TEXTURE_TOP, "LITE3", 2);
defineChange(5, 1, 52, SIDE_FRONT, TEXTURE_TOP, "LITEBLU5", 2);
defineChange(5, 2, 52, SIDE_FRONT, TEXTURE_TOP, "LITERED5", 2);
defineChange(6, 0, 61, SIDE_FRONT, TEXTURE_TOP, "GLASSW2A", 0);
defineChange(6, 1, 61, SIDE_FRONT, TEXTURE_TOP, "GLASSW2B", 0);
defineChange(6, 2, 61, SIDE_FRONT, TEXTURE_TOP, "GLASSW2C", 0);
defineChange(6, 0, 61, SIDE_FRONT, TEXTURE_TOP, "STKIA01", 1);
defineChange(6, 1, 61, SIDE_FRONT, TEXTURE_TOP, "FLAT14", 1);
defineChange(6, 2, 61, SIDE_FRONT, TEXTURE_TOP, "FLOOR1_6", 1);
while(true)
{
CP_RUN();
delay(5);
}
}
The only other thing you must add to your wad or pk3 is an autoloaded script library that adds your maps to any HUB. (See the ZDoom wiki for creating script libraries) What I'll tell you here is that you want to name it something 8 letters or less that you think will be unique to your WAD (you should also name your maps something unique, so they don't overlap with other CPS maps). The code should look like this:
[spoiler]
Code: Select all
#library "YOURLIBRARYNAME" // <- this actually needs to be 8 letters or less
#include "zcommon.acs"
#import "CPLIB.acs" // <- you'll want to also put CPLIB.acs in the directory where you are compiling this library
script ### OPEN // give it a unique number that you hope no-one else will use
{
delay(35);
// addHUBPortal(mapImageName, mapLumpName, mapNiceName, mapNameImageNam)
addHUBPortal("DMDFCP01","DMDFCP01","Warehouse Warfare","DMDFNM01");
}
HUB Creation Instructions
Creating a HUB uses similar concepts to above, but is actually simpler. It has one command, and it is:
defineHUBPortal(mainTag, nameTag, scroll)
mainTag: The lineid to use for displaying a picture of the map for this portal, as well as to use as the activator for the map voting script (note you have to define HOW it activates yourself IE: player walks over, repeatable, etc)
nameTag: The lineid to assign a texture that displays the map's name.
scroll: a boolean describing whether or not to scroll the texture set on the 'nameTag' line
Note that this function must be used once for each portal slot that your HUB has. Example:
[spoiler]
Code: Select all
#include "zcommon.acs"
#import "CPLIB.acs"
script 1 OPEN
{
for(int i = 0; i < 24; i++)
{
defineHUBPortal(100+i*2, 101+i*2, true);
}
}
*All credits for music and textures are given inside the pk3s