PPF Home
Plugins
Developers
   Font size:      

BF Match (v0.9)

PDF
PDF

Description

The BF Match plugin reports live game information from Battlefield 1942 games and mods. Currently it is a bit more geared towards Desert Combat due to names of some things (such as teams) but it should be clear for any mod type.

The plugin is actually made up of two parts; a small C program that is run on the game server and sends the logs, and the PPF plugin that parses that information and displays the info to IRC. The game server must have uncompressed XML logging on.

To show correct flag names upon capture, flag information is read from config files in the plugins/BFMatch/mapinfo directory. If the map doesn't have a mapinfo config, you can create one by turning the flag mode on (!flagmode on) and then running around the map to each flag and type into chat !setflag name where name is the name of the flag that you are standing at. When you have done all of the flags on the map then type into chat !done and this will create a new config file for the current map and the flag names will be available at the next capture. Remember to turn flag mode off when you have done this.

Configuration

The configuration file for this plugin is system/BFMatch/BFMatchConfig.xml

commandStart

The command to start the reporting. You can set the authLevel to control who is allowed to access the command. The output is used to define where the output from the command will go.

  • authLevel - ANY, ADMIN, MASTER, TRUSTED, NONE
  • output - CHANNEL, PM, NOTICE

      <commandStart authLevel="trusted" output="notice">!startbf</commandStart>

    

commandStop

The command to stop the reporting. You can set the authLevel to control who is allowed to access the command. The output is used to define where the output from the command will go.

  • authLevel - ANY, ADMIN, MASTER, TRUSTED, NONE
  • output - CHANNEL, PM, NOTICE

      <commandStop authLevel="trusted" output="notice">!startbf</commandStop>

    

commandChatLevel

The command to set the visible chat levels. You can set the authLevel to control who is allowed to access the command. The output is used to define where the output from the command will go.

  • authLevel - ANY, ADMIN, MASTER, TRUSTED, NONE
  • output - CHANNEL, PM, NOTICE

      <commandChatLevel authLevel="trusted" output="notice">!startbf</commandChatLevel>

    

commandFlagMode

The command to turn on/off the flag setting mode. You can set the authLevel to control who is allowed to access the command. The output is used to define where the output from the command will go.

  • authLevel - ANY, ADMIN, MASTER, TRUSTED, NONE
  • output - CHANNEL, PM, NOTICE

      <commandFlagMode authLevel="trusted" output="notice">!startbf</commandFlagMode>

    

server

Server details and log sender connection information.

  • host - host name/ip of the server that the logs are coming from
  • port - port to use to connect to the server side log sender
  • password - password to allow connection to the server side log sender

      <server host="123.456.789.999" port="4444" password="password"/>

    

gameserver

Game server details used for querying (using the QueriEd library).

  • type - game type
  • ip - host name/ip of the game server
  • queryport - query port of the game server
  • localport - local port to use when querying

      <gameserver type="BF" ip="123.456.789.999" queryport="23000" localport="27777"/>

    

showTicketDelay

How long, in seconds, to wait between showing ticket status.


      <showTicketDelay>120</showTicketDelay>

    

chatLevel

The chat level to use by default.

  • off - no chat messages
  • public - only public chat messages
  • all - public and team chat messages

      <chatLevel>OFF</chatLevel>

    

createPlayer

How the output for this event will appear. The colours and formatting are explained in the Output Formatting page.

  • ${playerColoured} - the name of the player in the team colour
  • ${playerScore} - overall score of the player
  • ${playerKills} - current kills
  • ${playerDeaths} - current deaths
  • ${playerTeam} - the team name of the player

      <createPlayer>${playerColoured} [$DARK_GREEN${playerScore}$NORMAL/$BLUE${playerKills}$NORMAL/$RED${playerDeaths}$NORMAL] joined ${playerTeam}</createPlayer>

    

changePlayerName

How the output for this event will appear. The colours and formatting are explained in the Output Formatting page.

  • ${playerColouredOld} - the name that the player had
  • ${playerColoured} - the new name the player has changed to

      <changePlayerName>${playerColouredOld} changed name to ${playerColoured}</changePlayerName>

    

disconnectPlayer

How the output for this event will appear. The colours and formatting are explained in the Output Formatting page.

  • ${playerColoured} - the name of the player in the team colour
  • ${playerScore} - overall score of the player
  • ${playerKills} - current kills
  • ${playerDeaths} - current deaths

      <disconnectPlayer>${playerColoured} [$DARK_GREEN${playerScore}$NORMAL/$BLUE${playerKills}$NORMAL/$RED${playerDeaths}$NORMAL] disconnected</disconnectPlayer>

    

setTeam

How the output for this event will appear. The colours and formatting are explained in the Output Formatting page.

  • ${playerColoured} - the name of the player in the team colour
  • ${playerScore} - overall score of the player
  • ${playerKills} - current kills
  • ${playerDeaths} - current deaths
  • ${playerTeam} - the team the player changed to

      <setTeam>${playerColoured} [$DARK_GREEN${playerScore}$NORMAL/$BLUE${playerKills}$NORMAL/$RED${playerDeaths}$NORMAL] changed to ${playerTeam}</setTeam>

    

roundInit

How the output for this event will appear. The colours and formatting are explained in the Output Formatting page.

  • ${tickets_axis} - the number of tickets the axis team have
  • ${tickets_allied} - the number of tickets the allied team have

      <roundInit>Tickets :: Axis: ${tickets_axis} - Allied: ${tickets_allied}</roundInit>

    

restartMap

How the output for this event will appear. The colours and formatting are explained in the Output Formatting page.

  • ${map} - the map being started
  • ${tickets_axis} - the number of tickets the axis team have
  • ${tickets_allied} - the number of tickets the allied team have

      <restartMap>Map restarted (${map}) :: Tickets :: Axis: ${tickets_axis} - Allied: ${tickets_allied}</restartMap>

    

server

How the output for this event will appear. The colours and formatting are explained in the Output Formatting page.

  • ${server name} - name of the server
  • ${modid} - mod code that the server is running
  • ${map} - the map being started
  • ${gametime} - round time
  • ${ticketratio} - ticket ratio

      <server>${server name} :: ${modid} :: Map: ${map} :: Round time: ${gametime} :: Ticket ratio: ${ticketratio}%</server>

    

scoreEvent

How the output for this event will appear. The colours and formatting are explained in the Output Formatting page.

  • ${playerColoured} - the name of the player in the team colour
  • ${playerScore} - overall score of the player
  • ${playerKills} - current kills
  • ${playerDeaths} - current deaths
  • ${weapon} - the name of the weapon used
  • ${victimColoured} - the name of the victim in the team colour
  • ${victimScore} - overall score of the victim
  • ${victimKills} - current kills of the victim
  • ${victimDeaths} - current deaths of the vitcim

      <scoreEvent>${playerColoured} [$DARK_GREEN${playerScore}$NORMAL/$BLUE${playerKills}$NORMAL/$RED${playerDeaths}$NORMAL] [$OLIVE${weapon}$NORMAL] ${victimColoured} [$DARK_GREEN${victimScore}$NORMAL/$BLUE${victimKills}$NORMAL/$RED${victimDeaths}$NORMAL]</scoreEvent>

    

teamKill

How the output for this event will appear. The colours and formatting are explained in the Output Formatting page.

  • ${playerColoured} - the name of the player in the team colour
  • ${playerScore} - overall score of the player
  • ${playerKills} - current kills
  • ${playerDeaths} - current deaths
  • ${victimColoured} - the name of the victim in the team colour
  • ${victimScore} - overall score of the victim
  • ${victimKills} - current kills of the victim
  • ${victimDeaths} - current deaths of the vitcim

      <teamKill>${playerColoured} [$DARK_GREEN${playerScore}$NORMAL/$BLUE${playerKills}$NORMAL/$RED${playerDeaths}$NORMAL] team killed ${victimColoured} [$DARK_GREEN${victimScore}$NORMAL/$BLUE${victimKills}$NORMAL/$RED${victimDeaths}$NORMAL] - DOH!</teamKill>

    

teamKilledSelf

How the output for this event will appear. The colours and formatting are explained in the Output Formatting page.

  • ${playerColoured} - the name of the player in the team colour
  • ${playerScore} - overall score of the player
  • ${playerKills} - current kills
  • ${playerDeaths} - current deaths

      <teamKilledSelf>${playerColoured} [$DARK_GREEN${playerScore}$NORMAL/$BLUE${playerKills}$NORMAL/$RED${playerDeaths}$NORMAL] killed themself ... ROFL!</teamKilledSelf>

    

isNoMore

How the output for this event will appear. The colours and formatting are explained in the Output Formatting page.

  • ${playerColoured} - the name of the player in the team colour
  • ${playerScore} - overall score of the player
  • ${playerKills} - current kills
  • ${playerDeaths} - current deaths

      <isNoMore>${playerColoured} [$DARK_GREEN${playerScore}$NORMAL/$BLUE${playerKills}$NORMAL/$RED${playerDeaths}$NORMAL] is no more</isNoMore>

    

flagCapture

How the output for this event will appear. The colours and formatting are explained in the Output Formatting page.

  • ${playerColoured} - the name of the player in the team colour
  • ${playerScore} - overall score of the player
  • ${playerKills} - current kills
  • ${playerDeaths} - current deaths
  • ${flag} - name of the flag captured

      <flagCapture>${playerColoured} [$DARK_GREEN${playerScore}$NORMAL/$BLUE${playerKills}$NORMAL/$RED${playerDeaths}$NORMAL] captured a flag (${flag})</flagCapture>

    

chat

How the output for this event will appear. The colours and formatting are explained in the Output Formatting page.

  • ${playerColoured} - the name of the player in the team colour
  • ${chat} - the public chat message

      <chat>${playerColoured} $DARK_GRAYsaid:$NORMAL "${chat}"</chat>

    

chatTeam

How the output for this event will appear. The colours and formatting are explained in the Output Formatting page.

  • ${playerColoured} - the name of the player in the team colour
  • ${chat} - the team chat message

      <chatTeam>${playerColoured} $LIGHT_GRAYsaid [TEAM]:$NORMAL "${chat}"</chatTeam>

    

roundstats

How the output for this event will appear. The colours and formatting are explained in the Output Formatting page.

  • ${winningteam} - the name of the winning team
  • ${winTickets} - the ticket count of the winning team
  • ${losingteam} - the name of the losing team
  • ${loseTickets} - the ticket count of the losing team

      <roundstats>Round result: ${winningteam} ${winTickets} - ${loseTickets} ${losingteam}</roundstats>

    

Commands

Start the reporting

Command: !startbf
Description: Start the game reporting
Auth Level: trusted
Where to give command: channel
Outputs to: notice
Example(s):

  • !startbf

Stop the reporting

Command: !stopbf
Description: Stop the game reporting
Auth Level: trusted
Where to give command: channel
Outputs to: notice
Example(s):

  • !stopbf

Set the chat level

Command: !chatlevel
Description: Set the level of chat to show. Options are off, public, and all
Auth Level: trusted
Where to give command: channel
Outputs to: notice
Example(s):

  • !chatlevel off
  • !chatlevel public
  • !chatlevel all

Turn on/off flag mode

Command: !flagmode
Description: Turn the flag mode setting on or off. Options are on and off
Auth Level: trusted
Where to give command: channel
Outputs to: notice
Example(s):

  • !flagmode on
  • !flagmode off

Change History

v0.9 First Version by DeadEd and xkr47