Capture Point Systems

Maps, modifications, add-ons, projects, and other releases for Zandronum. Also includes announcers.
Post Reply
MajorSlime
New User
Posts: 4
Joined: Fri Jan 02, 2015 5:25 am

Capture Point Systems

#1

Post by MajorSlime » Fri Jan 02, 2015 6:40 am

Hello all! I was going to post this as a X-mas present, but I guess it'll be a New Year's gift :P

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

ImageImageImage

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.
There are no current servers that are hosting this, but if anyone wants to host it, feel free, I would love it. Just let me know via PM or something that you are hosting it, as well as the server name (I want to play too :wink: ).

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! :smile:


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. :wink:

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);
    }
That will run the actual loop that CPS uses. Make sure the delay is 5 ticks, or you'll get different capture and general processing speeds.

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);
    }
}
[/spoiler]

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");
}
[/spoiler]

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);
    }
}
[/spoiler]

*All credits for music and textures are given inside the pk3s
Last edited by MajorSlime on Sat Jan 03, 2015 1:59 am, edited 1 time in total.

false_chicken
 
Posts: 36
Joined: Sat Aug 09, 2014 10:47 pm

RE: Capture Point Systems

#2

Post by false_chicken » Fri Jan 02, 2015 7:44 am

This looks nice! It might integrate nicely with my WWII Realism mod. I was planning to implement point capture gameplay like Red Orchestra/Battlefield.

MajorSlime
New User
Posts: 4
Joined: Fri Jan 02, 2015 5:25 am

RE: Capture Point Systems

#3

Post by MajorSlime » Fri Jan 02, 2015 8:10 am

Go for it! You can probably use the CapturePointSystems.pk3 as support, and keep the original stuff just fine, with a few tweaks.

false_chicken
 
Posts: 36
Joined: Sat Aug 09, 2014 10:47 pm

RE: Capture Point Systems

#4

Post by false_chicken » Fri Jan 02, 2015 11:57 am

Yeah minimal changes would be the goal. Espcially since I would like to keep it as compatible as possible for future updates you may do. Would make merging the changes much easier.

MajorSlime
New User
Posts: 4
Joined: Fri Jan 02, 2015 5:25 am

RE: Capture Point Systems

#5

Post by MajorSlime » Fri Jan 02, 2015 7:56 pm

Actually, I was just considering, I can probably tweak the current scripts to be a bit more modular and act as 'plugins'. IE The CPS scripts don't control game ending, point scoring, etc (unless you want them to), but you can check the point data from specific points for your own needs (which, technically, you can already do).

User avatar
CloudFlash
Zandrone
Posts: 1074
Joined: Mon Jun 04, 2012 5:35 pm
Location: Wonderland (except not really)

RE: Capture Point Systems

#6

Post by CloudFlash » Sun Jan 04, 2015 6:01 pm

So um, what exactly is the difference between this and domination gamemode?
https://i.imgflip.com/i5tpe.jpg
*Hey, who wants to hear my solution to the modern world's problems? ^Me! %Me! @Me! #Me! *WELL TOO BAD @Did he just stab himself with this butcher knife? %Looks like it ^Hey, the pizza guy arrived! %Pizza! Yey

jwaffe
Forum Regular
Posts: 219
Joined: Sun Jun 03, 2012 11:45 pm
Location: Just beyond the line horizon

RE: Capture Point Systems

#7

Post by jwaffe » Sun Jan 04, 2015 6:42 pm

CloudFlash wrote: So um, what exactly is the difference between this and domination gamemode?
In capture point the points take time to capture, and they must be captured in a specific order.

It's like TF2's capture point game mode, if you've ever played TF2.
Image

MajorSlime
New User
Posts: 4
Joined: Fri Jan 02, 2015 5:25 am

RE: Capture Point Systems

#8

Post by MajorSlime » Mon Jan 05, 2015 5:13 am

It's very similar to TF2's capture point mode. Although I admit that if you set a timelimit, it will act similar to Domination, in that you do get points for how many points you control. It still usually has a rigid structure though. CPS is also a bit more flexible in what you can do with it. (And will be even more flexible after I redo the scripts according to my above post)

I would very much like to see what kinds of maps can be made for this, though, so please, someone make a map? :biggrin:
Last edited by MajorSlime on Mon Jan 05, 2015 5:15 am, edited 1 time in total.

false_chicken
 
Posts: 36
Joined: Sat Aug 09, 2014 10:47 pm

RE: Capture Point Systems

#9

Post by false_chicken » Mon Jan 05, 2015 2:05 pm

MajorSlime wrote: It's very similar to TF2's capture point mode. Although I admit that if you set a timelimit, it will act similar to Domination, in that you do get points for how many points you control. It still usually has a rigid structure though. CPS is also a bit more flexible in what you can do with it. (And will be even more flexible after I redo the scripts according to my above post)

I would very much like to see what kinds of maps can be made for this, though, so please, someone make a map? :biggrin:

I am going to be getting on that soon :). Right after I figure out why I cannot get kills in my TDM map. :/. For some reason when ever I play my Trench TDM map (From my WWII mod.) and I am in TDM mode I cannot get any kills. But if I switch to a vanilla DOOM2 DM map using the map command it works fine. The hud clearly shows that I am in TDM mode but the kills count for nothing. Weird.

Post Reply