Race 1.2 [toktok.sscentral.com 02/08/04]

-Compiling
Linux: make -f race.mk
Win: .dll project (add util.c, zlib.lib, pthread.lib if necy)

-Installation
Put race.so/.dll in bin/.
Put arena.conf, ra-ship, race.conf and simple.conf in arenas/<name of your choice>
Put race:race at the bottom of conf/modules.conf
Append cmd_race to conf/groupdef.dir/mod

-Usage
?race start|stop|status

-Customisation
For best results use at least 3 checkpoint areas that are at least 10x10 tiles in size (actual size depends on max speed of the ships and Misc:SendPositionDelay). Up to 8 prizes can be specified in the Prize action, if you want more and can't edit the source yourself contact me.

Sample race.conf:

#define PRIZE_WARP 7
#define PRIZE_THRUST 11
#define PRIZE_SPEED 12
#define PRIZE_FULLCHARGE 13

[Race]
MinPlaying=1
MinTeams=1
Laps=2

; rectangular checkpoint area (top left and bottom right map tile coord)
ChkPt0=507,507,516,516
ChkPt1=549,500,558,509
ChkPt2=527,566,536,575

;whether checkpoint 0 is the start and the finish
ContinuousMap=1

; anyone not in a safe zone on 'gogogo' gets specced
InSafeToPlay=1

; stages: Ready, Start, CheckPoint, Lap, Death and Finish
; actions: Spec, ShipReset, Prize, WarpXY, ArenaMessage, Message

; message macros: 
; name  - player's name
; lap   - laps completed so far
; chkpt - last checkpoint crossed
; rank  - position in the race, 0 if still racing
; time  - time in seconds since the race started (#.##)
; #     - play bong#.wa2

; example configuration:
Ready-ShipReset = 1
Ready-Prize = $PRIZE_SPEED,$PRIZE_SPEED, $PRIZE_THRUST, $PRIZE_THRUST
Ready-WarpXY = 512,512
Ready-ArenaMessage=Get ready!

Start-ArenaMessage=GooOOoo Go GO gO!!%104

CheckPoint-Message=checkpoint %chkpt ok%26

Lap-Message=lap %lap time so far %time

Death-ShipReset = 1
Death-Prize = $PRIZE_WARP
Death-ArenaMessage=%name had a fatal accident (%lap laps)

;Finish-Spec = 1
Finish-Prize = $PRIZE_WARP, $PRIZE_FULLCHARGE
Finish-ArenaMessage=#%rank %time %name

-Notes
The config file has changed a lot this time round. Maximum race time/extra time per checkpoint is still not yet implemented as there are a few design complications.
