This wiki is archived and useful information is being migrated to the main website


From BZFlagWiki
Jump to: navigation, search

Timedctf is a standard plug-in that is shipped with the BZFlag Source code. The timedctf plugin will start a timed capture the flag game in which a team must capture another team's flag in a configurable amount of time.


  • If the time expires before the team captures a flag, all members of the team will be destroyed and the timer will restart for that team.
  • If the team captures another team's flag before their time expires, their timer is reset and starts counting down again.
  • All 4 teams have individual timers.

There are warning messages sent to individual teams as their time starts to expire:

  • A warning every minute (with time remaining) until the last minute.
  • A warning at 30 seconds before time expires.
  • A warning at 20 seconds before time expires.
  • A warning at 10 seconds before time expires.

The plugin also monitors the balance of teams and will disable the timer if teams are uneven. To determine if teams are balanced or not, at least a 75% match is used. This means that even teams would be considered:

These would work:

  • 2 vs 2 (100%)
  • 3 vs 4 (75%)

These won't:

  • 2 vs 4 (50%)
  • 1 vs 4 (25%)

The percentage is calculated this way:

smaller team / larger team * 100

If the teams are uneven, capture the flag is disabled; if a player tries to pick up a team flag, it will almost immediately be dropped.

The plugin is set up for all 4 teams (red, green, blue and purple) and will monitor/time all 4 teams. However, it is best suited to 2 team capture the flag type maps in that it only looks for the 75% match between any 2 team sizes. This means that it is possible (on a 4 team ctf map) to have teams considered to be even if:

1 vs 1 vs 3 vs 1
2 vs 2 vs 8 vs 1
and so on.

There are also informative messages when the status of the game changes, for example:

If a new player joins/parts that causes team imbalance, a message is sent stating that teams are uneven and timed ctf is disabled. If a new player joins/parts that balances teams out, a message is sent that timed ctf is enabled and how much time there is to capture a flag. And so on...

There are also standard CTF sounds used whenever significant events take place.

Note that the balance of teams will still be monitored when the ctf timer is off, and team flags will be dropped if teams are uneven (as described above). This allows this plugin to be utilized for fair, normal ctf play as well, if the ctf timer is turned off. If both functions (tctf and fairctf) are turned off, the plugin is effectively disabled. If the fair CTF function is disabled and the timed CTF function is enabled, the plugin will check for at least 2 teams present before allowing timed CTF to take place.


The plugin will allow the time limit to be passed to the plugin through the -loadplugin command line with bzfs. The format is as follows:

"-loadplugin <path>timedctf,i" where i is the timer value (in minutes)for timed ctf. For example,"-loadplugin plugins/timedctf,7" would start the plugin with the timer set for 7 minutes. The minimum is 1 minute and the maximum is 120 minutes. If no time is specified, the plugin defaults to 5 minutes.

Server Commands

The plugin has the following administration commands available:

/tctftime <iii> - this will change required capture time to <iii> (1-120 minutes).
/tctfoff - this will disable timed CTF.
/tctfon - this will enable timed CTF.
/tctfsoundoff - this will disable timed CTF sounds.
/tctfsoundon - this will enable timed CTF sounds.
/tctfstatus - this will return the current status of functions and the current time limit.
/fairctfoff - this will disable the fair ctf function.
/fairctfon - this will enable the fair ctf function.