
PiranMOTO JokerLap 0.3: An InSim joker lap system
-------------------------------------------------

JokerLap will enforce drivers taking a joker lap in a race. You can set a minimum number of laps required (default 1), and a maximum number of laps allowed (default 1).

You can set the type of penalty given for not meeting the joker lap requirements (default stop-go*). 

You can optionally issue a warning to drivers if they must take the joker on their current lap. (This will warn every required lap in the case of multiple required laps).

The layout requires 3 InSim circles placed in such a way as to cover the whole width of the track in the following places (see refertome.jpg):
  - Index 1, to be placed at the start of the joker lap
  - Index 0, to be placed at the end of the joker lap
  - Index 2, to be placed after the rejoin, but before the finish line
  
You may also optionally place a warning circle:
  - Index 3, to be placed before the joker lap (with enough track left for them to react safely!)
  
Note: *The default penalty is a stop-go penalty applied just before the finish line on the last lap of the race, in order to allow the penalty to cause an LFS-level disqualification, ie, recorded as disqualified in the replay file for the benefit of 3rd party replay analysers.


Configuration Options:
----------------------
(loaded from 'PiranMOTO_JokerLap.cfg', use '#' to comment lines)

  - host                  server IP address (default 127.0.0.1)
  - port                  server InSim port (default 29999)
  - adminpass             administrator password (default blank)
  - jokermin              minimum required joker laps (default 1)
  - jokermax              maximum allowed jokerlaps (default 1; automatically adjusted if invalid)
  - penalty               penalty type for too few/too many joker laps (default 0 (stop-go))
  - jokerwarn             warn drivers if current lap must be joker lap (default 1 (yes))
  - warnsound             warning sound (default 2 (sysmessage))
  
  
Commands:
---------
(commands are available to any server admin; use "!<command>" to view current value; use "!<command> <parameter>" to set value. You may also use ';' instead of '!' to run a command)
  
  - jokermin [X]          sets number of joker laps required to avoid penalty, default 1
  
  - jokermax [X]          sets number of joker laps allowed before penalty, default 1.
  
Note: Jokermax will be automatically adjusted as necessary to fit the setting of jokermin
  
  - jokerpenalty [X]      0 = stop-go (default)
                          1 = drive-through
                          2 = 30 seconds
                          3 = 45 seconds
                          4 = spectate                          
                          
  - jokerwarn [X]         0 = no
                          1 = yes (default)
                          
  - jokerwarnsound [X]    as defined in InSim.txt
                          0 = silent
                          1 = message
                          2 = sysmessage (default)
                          3 = invalidkey
                          4 = error
                          5 = num
                          
  - jokersettings         list current values for all above settings
  
  - jokerkill             shuts down JokerLap, requires confirmation
  
  
Quick setup:
------------

  - Place program file and configuration file in the same directory
  - Edit the config file to your server's ip address, port and admin password
  - Run the program

