CTF/Lua

v3.0

By W'rkncacter

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

(Flag is in base)

Carrying

(Team is carrying flag)

Dropped

(Team has dropped flag)

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.

Top

To The Hosts

(What to do for hosting CTF/Lua)

Starting with CTF v3.0, you will now 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.

Top

To The Mappers

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

Making a map that will work in CTF/Lua is far, far easier than making one for Aleph One's own CTF mode. You can use any map editor that will make valid Marathon 2 or Marathon Infinity netmaps.

You only need to remember five items. These key points require you to use map annotations. These annotations are not case-sensitive, so "BB" is the same as "bb". You can also designate these special polygons by polygon type:

  1. To designate a polygon as a "Base" polygon (that is, one where a revived player can spawn to):
    • Team 1's base polygons must be annotated with the map annotation "rb" (without the quotes) OR a polygon of type "dual monster trigger"
    • Team 2's base polygons must be annotated with the map annotation "bb" (again, without quotes) OR a polygon of type "must be explored"
  2. Each team's flag should have one area where it will appear. Ideally, the area will be one polygon.
    • Team 1's flag will appear on polygons annotated "rf" OR a polygon of type "visible monster trigger"
    • Team 2's flag will appear on polygons annotated "bf" OR a polygon of type "invisible monster trigger"
  3. Spawning: In order to make sure that players will spawn in their proper bases, you should make a polygon isolated from the rest of the map that will serve as the spawn point for all players. That is to say, put all eight player spawn points somewhere not connected to the main map. This keeps the newly-spanwed players from getting in the way. The script will teleport players to the right place after they spawn in such an area.
  4. Check "Every man for himself" AND "Kill the man with the Ball" so the map shows up in the list of Capture the Flag maps.

PLEASE NOTE: Because the script now uses the "Capture the Flag" gametype instead of EMFH, you MUST have EMFH and Kill the Man with the Ball checked for the map to show up in the list of available maps. This may result in CTF maps made for previous versions (pre-3.0) to need to be updated to work with this script. Besides checking Kill the man with the ball, maps made for previous versions of Lua/CTF will still be compatible. Refer to other CTF/Lua maps if you need an example. There are quite a few available at the Lh'owon Ar'kives.

And that's it! Of course, it would be best to make a good CTF map, but this is far easier and far more attractive thanks to the CTF/Lua script. You can use your favorite editor, and you only have to remember the five items listed above. Make some good maps, and maybe we will at last have fun playing CTF--our way!

Top

Changelog

v3.0

v2.2 (Changes by irons)

v2.1

Top