CTF/Lua

v2.2

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

The game will print who won just before the game ends. The postgame carnage report screen is interpreted differently: each death recorded there represents a capture (point).

Top

To The Hosts

(What to do for hosting CTF/Lua)

Hosting is easy, and with this Lua version of CTF, it does _not_ require you to select the "Capture The Flag" game mode in the gathering screen. Instead, The script is designed for play on the EMFH (Every Man For Himself) style game, but with teams enabled. 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. Make sure the map you want to host is designed for Lua CTF, or else you will have a bad game or, more likely, a crash.

Selecting a time limit will affect the game by limiting how long it can last. The script will end the game automatically if the _point limit_ is reached (more on that in a bit). With a time limit, the game will end either when the game reaches the time limit, or when a team has score the point limit. Be warned that the end game screen is _not_ directly indicative of a team's or a player's score, so if you reach the time limit, it won't be very clear who "won." This is in part due to a problem with the SDL version of Aleph One, which crashes when it tries to graph a negative suicide on the end-game screen. Anyway, if you refrain from adding a time limit to your game, when a player scores the last point, the game will stop and the winner and scores will be printed to the screen.

The default number of captures to win the game is 5. To change this, there is no longer a need to edit the script itself. simply add a dash (-) and the desired number of captures (an integer, of course). For example, to host a 7-capture game, W'rkncacnter would make him name W'rkncacnter-7 and then host.

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.

CTF/Lua maps for older versions of the script (v1.1 and below) are still compatible with v2.0. 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

v2.2 (Changes by irons)

v2.1

Top