CTF/Lua

v4.0.2

By W'rkncacter

Note: the main web site for this file is The House of Luck.

If you have already read this stuff and just want to know what's new, look at the changelog.

This document accompanies the Capture the Flag Lua script released by W'rkncacnter. The script came into existence because almost no one in the Marathon community can stand the Capture the Flag mode that is now built into the Aleph One engine. Why?

  1. The "flag" is really the Ball from KTMWTB, which poses a few problems:
  2. The beloved mapmaking program, Forge, does not support making maps of this game type. The mapmakers that do support it are either buggy or still under development.
  3. Apart from the programs themselves, creating a CTF map is very complicated.

As you can see, CTF is a pain to play and create in Marathon. The script is here in order to simplify the process for everyone. Who needs to know about this? Gamers, hosts, and mappers.

To The Gamers

(How to play the game)

You should probably know how to play capture the flag already. If you don't, I'll outline the basics. There are two teams, red and blue, and each of has a home base and a flag in that base. The object of the game is to infiltrate the enemy team's base, steal the flag, and bring it to your own base, hence the name "capture the flag." Each flag turned into the base results in a point for you, and therefore, for your team.

You will of course want to leave someone to defend your base, and so on, but in the event that an enemy captures your flag, you can kill him and touch your flag (which should now be on the ground) to return it to base instantly.

This is where the new Lua HUD (heads-up display) comes in handy. See below for details. The most important new features in the HUD are the team status fields and the distance to the enemy flag meter. At the top of the screen, you will see several fields of information. The first two are the red and blue team scores, respectively. To the right of each of these fields is an icon representing the activities of the team whose name they are next to. The icons, which show up in either red or blue, are broken down as follows:

Base

The team's goal flag is in the enemy base

Carrying

The team is carrying its goal flag

Dropped

The team has dropped its goal flag

Two new fields in v4.0 show the distance between you and your enemies' flag, and the distance between you and your own flag. This is very useful for tracking it down when you don't know exactly where it is.

If you are looking at a team mate, the HUD will also display a third field that prints the team mate's name and their current health percentage. This is useful for giving orders to that particular person. The name will come up no matter how far away you are, which helps you know where the team mates are. You will also notice that the oxygen meter now starts empty (or close to empty). It will get fuller as you get closer to the enemy's flag. This helps greatly when the enemy still hasn't returned their flag, and you need to find it before they do.

HUD pic

When a player is carrying the flag, he will have a white shirt (personal color) and his pants (team color) will remain the same. In addition, the compass that overlays the motion detector will point to an enemy if he is carrying the flag. If the enemy drops your flag, the compass will point to its location.

To The Hosts

(What to do for hosting CTF/Lua)

When hosting, choose the built in mode "Capture the Flag" as the gametype. Instead of using a time limit, select score limit and enter the capture limit that way. The game will end when one team reaches the capture limit. Ideally, you will divide into two teams, red or blue. If you start a game with more or less than two teams, the script will divide you into red or blue. Alternatively, if you want a random team assignment, you can divide teams by yellow and purple, and you will become red and blue randomly.

You will still need a special map. It won't be a map specially designed for Aleph One's CTF mode; instead, mappers will have to make new maps to go with this script. The script will tell you if the map you are using is not set up correctly for the lua version of CTF.

The last step of hosting a CTF game with this script is, of course, selecting the script in the game gather screen. At the top of this screen, there should be a tab that says something like "Other Stuff." Selecting this tab will bring up options like "Use Lua Script," "Allow Crosshair," etc. Check the "Use Lua Script" option and then find the path to the Lua script, click on it, and confirm your selection.

Once all of this is set up, you're ready to play.

To The Mappers

(What you need to do to make a CTF/Lua map)

The biggest change between this version of CTF and version 3 is that we re-introduced some basic elements of the normal CTF gametype because it made the script smaller (so we could add features without actually making the file bigger) and it also got rid of the "hackiness" of the way we did some things. So you will indeed need a specialized editor to apply the newly-necessary attributes. We, the creators and maintainers of CTF/Lua, are also working on a stand-alone Java program called JUICE that will very soon support these features. A manual will come with JUICE that will describe in detail how to change the necessary settings. Look for JUICE v1.0, which should be coming soon. Until then, here is the general idea:

  1. Edit all spawn points for the red team to be "Red Team" player spawns in the Edit Objects menu for that level.
  2. Do the same for all blue spawn points, making them "Blue Team" player spawns.
  3. Make the polygon that should hold the flag into a "Base" polygon and set its permutation to 1 for the red team's flag.
  4. For the blue team's flag polygon, do the same, but set permutation to 6.
  5. Check "Every man for himself" AND "Kill the man with the Ball" in the main flags window; you will see the "Capture the Flag" checkbox set itself automatically.

While this is a little more complicated and arduous than previous methods, it puts everything where it belongs, and we no longer have to teleport players to a fake team spawn point when they revive, meaning you can get into the action about a second faster, which can make a large difference.

Refer to other CTF/Lua maps if you need an example. There is an excellent pack available at The House of Luck called Magenta Filter. Version 1.1 of Magenta Filter is the first set of maps compatible with version 4.0 of this script.

Changelog

v4.0.2 (Changes by irons)

v4.0.1 (Changes by irons)

v4.0 (Changes by irons)

v3.1

v3.0

v2.2 (Changes by irons)

v2.1