Register  |  Home  |  Chat   |  ArmaBrowser  |  HowTo  |  Wiki  |  ServerStats  |  Donate  |  Forum  |  MapTools  |  Servers  |  Log in 
Information Desk
Latest News
Round Table
Challenge us!
Off Topic

Clan Information
Public Clan Information
Active CTers+Trainees
All CTers+Trainees
Inactive CTers
CTers Earth Map
CT Groups
CT Medals
Armahacktron Wiki
Forum Ranks
Won/Lost Battles

Servers and Maps
BFC New Ladder
CT Server Ladders
CT Mayhem Ladder
CTWF New Ladder
CT Server Maps
Flower Power Sumo Assault
Map Tools
Want to help? Donate

Forum Members
NewsView Online


Advanced Search

User Block


 Remember me

I forgot my password

Don't have an account yet?
You can register for FREE

Reply to topic
 How To make Crazy Tronners Wild Fortress..... 
Crazy Tronner
Server Tech
Honorary Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
CT Rank: Not Ranked
Field's place: sweeper
Grid Name: ct-eddie
GID: ed@ct/jedi
CT Wild Fort Rank: na
Joined: 22 Mar 2006
Posts: 1X9362493 Posts
Location: Wales, UK
Reply with quote
A question I get asked quite reguarly. I usually just say it's a php/mysql script written by PTA. You can get the same results with one I wrote here, it's just not as easy to admin:

Well I spoke to PTA, and he's happy for me to release the code so anyone else who wants a crack at a map rotation tron server can have a go, using the same tools that we use.

I am no computer genius, I have a basic understanding of linux and using a ssh connection to admin a server. Anyone who has this can run a similar server, it aint Rocket Science.

I will first explain how I install and run armagetronad-dedicated. As I have about 7 tron servers, believe it or not, that are up or down at any one time. So I need an easy way to control these.

My English skills are poor, my head screwy (I should have spent more time in school, less time taking drugs), but I'll do my best to put a tutorial together that anyone with some basic computer skills can follow. Starting with installation, ending with the map rotation script. Not saying my way is the best way, it certainly isn't the only way. But it does work.

I don't have root access to the server that runs CT Wild. This is not necessary. I compile armagetron-dedicated from source using the --prefix option. I have changed the names and colours of the teams on my server, just for fun. If you want to do this you need to do this before compiling:

I then compile using:

./configure --prefix /home/ed/tron --disable-glout

after this run make && make install to install the thing.

This will install armagetron-dedicated ONLY into dir /home/ed/tron

For each server I run I have a directory dedicated to them. So, wild has a dir: /home/ed/wild
within here I create 3 dir's: config, log and var

Then we need the config. All the settings I use are more or less the same as standard Bugfarm fortress, which are all ready to use in the basic install.
You need to copy all the files from the default config files into /home/ed/wild/config. In my case I copied them from: /home/ed/tron/etc/games/armagetronad-dedicated/

I now have all the default config files within /home/ed/wild/config make sure it's these ones you modify, that way if you mess them up, you can always go back to the original.
Although it's not considered good practice and the file itself tells you not to do it, I go ahead and modify the file settings_dedicated, changing TALK_TO_MASTER to 1 so your server appears on the main server list. And change server name, etc to your own. And a few others I add, like:


the important line to add at the base of the file is:

Include examples/cvs_test/fortress_complete.cfg

This will set the server up as a clone of fortress. Everything else is added to that. I won't go into great detail about the settings I change, nothing major, just change winzone to dz, alter dz timeout settings, etc. If anyone wants a copy of my config files, just ask.

to run this server I have a simple bash script to make it easier for myself. This looks like:



$tron --configdir $config --vardir $var | tee -a $log

this just means it runs my own install of tron. Uses my config files in "/home/ed/wild/config", outputs ladder, etc to "/home/ed/wild/var" and finally writes the files to log file "/home/ed/wild/log/wildlog.txt"
The "tee" program running there simply outputs to screen as well as writing to the log - so I can see any problems.

I run all this in a screen session, as I'm connecting via ssh.
with this we now have a clone of Bugfarm Fortress, with the exceptions of any modifications made to the config files. In my case, very few.

Now let's get onto the map rotation.
One problem with changing settings in each round is that let's say I wanted to change a setting for chico's eye, which uses
<Setting name="CYCLE_BRAKE" value="-50"/>
meaning brake will actually act as a boost.
Unless I tell tron server to change that setting back to default it will continue to use this setting for the next map, and the next one, etc. Not something we want.

I get around this by having 2 everytime.cfg files. One at:


This file is loaded at the end of every round and contains every setting that I use that changes from map to map. It looks like this:


These are the default fortress values for these settings.
So after each round all settings are set back to default. The new map then loads with it's unique settings. Then after the round they are set back again, etc.

That is why, if you play there, you see settings changing all over the place.

The second everytime.cfg is kept in:


This is the one that changes the map file at the end of every round. I just copied from it now and it says:

MAP_FILE ed/fortress/slingshot-0.0.1.aamap.xml
ROUND_CENTER_MESSAGE Round 5 - Slingshot

Lets try it now, it says:

MAP_FILE ed/fortress/chico_time-0.1.4.aamap.xml
ROUND_CENTER_MESSAGE Round 6 - It's Chico Time

Again, this file is read from by tron server at the end of every round.

So all we have to do it look at the log file that is being written to. See what round we're on and update /home/ed/wild/var/everytime.cfg with a map and center message.

I created a folder called /home/ed/mapscript
in here we have four files:

It all starts with the bash script that looks like this. I run this one in a new screen session:


tail -n1 -f $log | /home/ed/mapscript/

This will take each line of the wildlog.txt and feed it into that looks like this:


while true
  read line
  echo $line
   /home/ed/mapscript/tron.php "$line"

This will take each line and feed it to tron.php that looks like this. It will also output to screen so I can see any error message, etc:


$tron=new tron;

if (substr($line,0,13)=="[0] Go (round"){
        for ($i=1;$i<13;$i++){
                if ($line=="[0] Go (round ".$i." of 12 )!"){
                        if ($i==12){
                        } else {


This calls upon tron.class.php that looks like this:

class tron {

// Start Config

var $cfg_host="localhost";
var $cfg_user="mysqlusername";
var $cfg_pw="mysqlpassword";
var $cfg_db="tron";
var $cfg_file="/home/ed/wild/var/everytime.cfg";

// End Config

function mysql_start(){

function mysql_stop(){

function map_cycle($round){
        $mapquery=mysql_query('SELECT * FROM maps WHERE round="'.$round.'"');
        srand ((double)microtime()*1000000);
        $mapnumber = rand(0,$maps-1);
        if ($round==12){
                 $content='MAP_FILE '.$mapfile."\nROUND_CENTER_MESSAGE Final Round - ".$mapname."\n";
                $content='MAP_FILE '.$mapfile."\nROUND_CENTER_MESSAGE Round ".$round.' - '.$mapname."\n";

function filewrite($content,$mode){
        if ($mode=="new") {
                $execfile=fopen ($this->cfg_file,'w+');
        } else if ($mode=="add"){
                $execfile=fopen ($this->cfg_file,'a+');
        echo $content;


Of course you need a mysql database, in my case called tron. Within here is a table called maps.
What does the maps table look like?
If I run a query SELECT * FROM maps;
I get this:


mysql> select * from maps;
| id | round | mapfile                                                  | mapname                 | server        |
|  1 |     1 | ed/fortress/pillar-0.0.7.aamap.xml                       | Pillar                  | wildfortress1 |
|  2 |     1 | ed/fortress/lookout-0.0.6.aamap.xml                      | Look Out!               | wildfortress1 |
|  3 |     1 | ed/fortress/johnny-0.0.2.aamap.xml                       | Hello, my name's Johnny | wildfortress1 |
|  4 |     2 | ed/fortress/minefield-0.0.7.aamap.xml                    | Minefield               | wildfortress1 |
|  5 |     2 | ed/fortress/minepillars-0.0.3.aamap.xml                  | Mine Pillars            | wildfortress1 |
|  6 |     2 | ed/fortress/hairbrush-0.0.2.aamap.xml                    | HairBrush               | wildfortress1 |
|  7 |     3 | ed/fortress/octazigzag-0.0.3.aamap.xml                   | Octagon Wiggle!         | wildfortress1 |
|  8 |     3 | ed/fortress/octagon-0.0.2.aamap.xml                      | Octagon Fortress!       | wildfortress1 |
|  9 |    10 | ed/fortress/hexagon_triangles-0.0.3.aamap.xml            | Hexagonal Triangles     | wildfortress1 |
| 10 |     3 | ed/fortress/octagoneloopy-0.0.1.aamap.xml                | Octa Gone Loopy!        | wildfortress1 |
| 11 |     4 | ed/fortress/arcanoid-0.0.6.aamap.xml                     | Arcanoid                | wildfortress1 |
| 12 |     4 | ed/fortress/behind_you-0.0.9.aamap.xml                   | Behind You              | wildfortress1 |
| 13 |     5 | ed/fortress/slingshot-0.0.1.aamap.xml                    | Slingshot               | wildfortress1 |
| 14 |     5 | ed/fortress/speed_dome-0.0.7.aamap.xml                   | Speed Kills             | wildfortress1 |
| 15 |     5 | ed/fortress/speed_city-0.0.2.aamap.xml                   | Speed City              | wildfortress1 |
| 16 |     6 | ed/fortress/chico_time-0.1.4.aamap.xml                   | It's Chico Time         | wildfortress1 |
| 17 |     6 | ed/fortress/chico_teamsumo-0.0.4.aamap.xml               | It's Chico Sumo         | wildfortress1 |
| 18 |     6 | ed/fortress/hourglass-0.0.4.aamap.xml                    | Chico's Hourglass       | wildfortress1 |
| 19 |     7 | ed/fortress/boxes-0.0.6.aamap.xml                        | Little Boxes            | wildfortress1 |
| 20 |     7 | ed/fortress/columns-0.0.1.aamap.xml                      | Little Columns          | wildfortress1 |
| 21 |     7 | ed/fortress/circles-0.0.3.aamap.xml                      | Little Circles          | wildfortress1 |
| 22 |     7 | ed/fortress/little_spiral-0.0.5.aamap.xml                | Little Spirals          | wildfortress1 |
| 23 |    13 | ed/fortress/mini-0.0.6.aamap.xml                         | Mini                    | wildfortress1 |
| 24 |     8 | ed/fortress/nano-0.0.4.aamap.xml                         | Nano                    | wildfortress1 |
| 25 |    11 | ed/fortress/chico_clover-0.0.4.aamap.xml                 | Chico's Clover          | wildfortress1 |
| 26 |    11 | ed/fortress/chicoeye-0.0.3.aamap.xml                     | Chico's Eye - Brake!    | wildfortress1 |
| 27 |    11 | ed/fortress/houreye-0.0.2.aamap.xml                      | Chico's Wild Ride       | wildfortress1 |
| 28 |    12 | ed/fortress/diamond_death-0.0.8.aamap.xml                | Diamond Death           | wildfortress1 |
| 29 |    12 | ed/fortress/diamond_sumo-0.0.5.aamap.xml                 | Diamond Sumo            | wildfortress1 |
| 30 |     3 | ed/fortress/octagon_weasel-0.0.1.aamap.xml               | Octagon Weasel          | wildfortress1 |
| 31 |     9 | ed/fortress/desperate_housewives-0.0.1.aamap.xml         | Desperate Housewives    | wildfortress1 |
| 32 |    12 | ed/fortress/diamond_masacre-0.0.1.aamap.xml              | Diamond Massacre        | wildfortress1 |
| 33 |     9 | ed/fortress/grand_designs-0.0.1.aamap.xml                | Grand Designs           | wildfortress1 |
| 34 |    13 | ed/fortress/magic_roundabout-0.0.2.aamap.xml             | Magic Roundabout        | wildfortress1 |
| 35 |    13 | ed/fortress/little_bear-0.0.2.aamap.xml                  | Little Bear             | wildfortress1 |
| 36 |     8 | ed/fortress/nano_knightmare-0.0.5.aamap.xml              | Nano Knightmare         | wildfortress1 |
| 37 |     4 | ed/fortress/crossfire-0.0.1.aamap.xml                    | Crossfire               | wildfortress1 |
| 38 |     9 | ed/fortress/staff-0.0.1.aamap.xml                        | The Mighty Staff        | wildfortress1 |
| 39 |     6 | ed/fortress/chico_nano-0.0.5.aamap.xml                   | Chico in Nanoland       | wildfortress1 |
| 40 |    10 | ed/fortress/three_deadly_hexagonal_sumos-0.0.7.aamap.xml | Three Deadly Hex Sumo's | wildfortress1 |
| 41 |     8 | ed/fortress/nano_sumo-0.1.2.aamap.xml                    | Nan's Team Sumo         | wildfortress1 |
| 42 |    10 | ed/fortress/death_of_hex-0.0.3.aamap.xml                 | Death of Hex            | wildfortress1 |
| 43 |     9 | ed/fortress/staffs_tomb-0.0.2.aamap.xml                  | Staffs Tomb             | wildfortress1 |
43 rows in set (0.00 sec)

This makes it very easy for me to update maps, move maps around, remove them, etc.

And I think that's it. If you spot any errors, let me know. I hope it's useful to someone.

As I said this is just the way I do it. There are many alternative ways.
View user's profile Find all posts by ed Send private message
Crazy Tronner
Clan Admin
Senior Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
CT Rank: 10
Field's place: def-sweep
Grid Name: ct¤kyle
GID: kyle@ct/jedi
CT Wild Fort Rank: na
Joined: 31 Mar 2006
Posts: 4JU365898 Posts
Location: United States
Reply with quote
Lets put this on the wiki


In theory it should work in reality who knows if it will work.

MB53: I am 26 years old how can i be a teen ? Very Happy
owned: You got the heart of a teen Smile
Gonzap: and the innocence of a little child
View user's profile Find all posts by kyle Send private message AIM Address Yahoo Messenger MSN Messenger
Crazy Tronner
Server Tech
Honorary Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
CT Rank: Not Ranked
Field's place: sweeper
Grid Name: ct-eddie
GID: ed@ct/jedi
CT Wild Fort Rank: na
Joined: 22 Mar 2006
Posts: 1X9362493 Posts
Location: Wales, UK
Reply with quote
Feel free to put it on the wiki. I still haven't learned how to use it properly. No time.
I didn't really have time to write this up, but I promised it to a couple of people, so here it is.
View user's profile Find all posts by ed Send private message
Crazy Tronner
Honorary Member
Donator (Amount: 1)
CT Rank: Not Ranked
Field's place: support
Grid Name: CT×X3V1
GID: xevic@ct/jedi
CT Wild Fort Rank: na
Joined: 22 Mar 2006
Posts: 26B362819 Posts
Location: Barcelona
Reply with quote
ok nice work ed, but now people will clone wild Razz

Visca el Barça! CUIG (See you in game) and don't forget to sing with us: lalalalala Sing
View user's profile Find all posts by xevic Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger ICQ Number
Crazy Tronner
Server Tech
Honorary Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
CT Rank: Not Ranked
Field's place: sweeper
Grid Name: ct-eddie
GID: ed@ct/jedi
CT Wild Fort Rank: na
Joined: 22 Mar 2006
Posts: 1X9362493 Posts
Location: Wales, UK
Reply with quote
xevic wrote:
ok nice work ed, but now people will clone wild Razz

That is the plan, I welcome others to do the same. Hopefully with their own maps, not ours.

A little competition is a good thing. Keep us map makers on our toes, being forced to come up with new ideas.
View user's profile Find all posts by ed Send private message
Map Maker (Amount: 1)
CT Rank: Not a CTer
Field's place:
Grid Name: syllabear
GID: syllabear@ct/public
CT Wild Fort Rank: na
Joined: 14 May 2006
Posts: 16F361527 Posts
Location: UK
Reply with quote
oh yeah nice non-rocket science... AAAAGGGGHHHH!!!!! so complicated!

(u took drugs ed?)
View user's profile Find all posts by syllabear Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

 Reply to topic  Post a reply  

free counters