XML

From FreeAllegiance Wiki
Jump to navigationJump to search

You can save the scores at the end of a game to an XML file using the save button on the scores screen. The XML file gets saved to your Allegiance install directory with the file name "scores-yyyy-MM-dd-hh-mm.xml" where yyyy is the year, MM is the month, dd is the day, hh the hour in 24 hour clock and mm the minute the file was saved.

Uses of saved XML files

  • They can be loaded by a program called "EndGame: Statisfied" by madpeople which allows you to sort the scores and output them as an image or as text with or without bb code formatting. It is available here

Technical Information

The XML file allegiance saves is structured like this:

 <xml>
 <GameInfo>
   <Date>Date and time file was saved format: MM/dd/yy hh:mm:ss</Date>
   <Server>Server name (String)</Server>
   <Core>Core name (String)</Core>
   <GameOverReason>Reason game ended [This is displayed at the top of the score screen] (String)</GameOverReason>
 </GameInfo>
 <Teams>
   <Team>
     <TeamNumber>Team number (Integer 0 to 5)</TeamNumber>
     <Name>Team name (String)</Name>
     <Faction>Faction name (String)</Faction>
   </Team>
   <Team>
     <TeamNumber>1</TeamNumber>
     <Name>Example Blue Team Name</Name>
     <Faction>Faction Name</Faction>
   </Team>
 </Teams>
 <PlayersScore>
   <PlayerScore>
     <Name>Player name (String)</Name>
     <TeamNumber>Team number (Integer)</TeamNumber>
     <IsCommander>True / false (Boolean String)</IsCommander>
     <Rank>Players rank as a number (Integer)</Rank>
     <Assists>Number of assists (Integer)</Assists>
     <BaseCaptures>Number of base captures (integer)</BaseCaptures>
     <BaseKills>Number of base kills (Integer)</BaseKills>
     <Deaths>Number of deaths (Integer)</Deaths>
     <Ejections>Number of ejects (Integer)</Ejections>
     <Kills>Number of kills (Integer)</Kills>
     <Score>Score (Floating point)</Score>
     <TimePlayed>Number of seconds player was in game (Floating point)</TimePlayed>
   </PlayerScore>
   <PlayerScore>
     <Name>Example name</Name>
     <TeamNumber>1</TeamNumber>
     <IsCommander>false</IsCommander>
     <Rank>14</Rank>
     <Assists>5</Assists>
     <BaseCaptures>0</BaseCaptures>
     <BaseKills>0</BaseKills>
     <Deaths>7</Deaths>
     <Ejections>29</Ejections>
     <Kills>8</Kills>
     <Score>292.593</Score>
     <TimePlayed>14020.6</TimePlayed>
   </PlayerScore>
 </PlayersScore>
 </xml>

There is only one "GameInfo" section. There are as many "Team" sections in the "Teams" section as there were teams in the game, they are numbered 0 to 5 (yellow team is 0, blue is 1 etc). There are as many "PlayerScore" sections as there were players in the game - every player who played in the game as a "PlayerScore" section in the "PlayersScore" section.