squad.xml
To support the multiplayer community in their effort to play as teams, like many Arma clans and squads are trying to, it is possible to create a common information file - the "squad.xml" -, which is stored on a personal webspace or on an FTP server and loaded by the Arma game server, if a member of this team is playing on it.
Beside detailed information about the single player and its team which can be gained by pressing "P" ingame, the feature supports also a common logo, which will be displayed on vehicles, if such team has boarded it. |
Preliminaries
If you feel unfamiliar with the XML file format itself and/or have questions about basic XML markup, you are advised to consult literature, documentation (http://www.w3.org/XML) or tutorials (http://www.w3schools.com/xml/default.asp) as fundamental questions about the XML technology itself will not be covered here. There are multiple resources on in the World Wide Web that can help you learning XML.
Squad.xml File Content
The file consist of three main parts:
Head
This part defines the doctype. Just leave it as it is!
<?xml version="1.0"?>
<!DOCTYPE squad SYSTEM "squad.dtd">
<?xml-stylesheet href="squad.xsl" type="text/xsl"?>
Squad properties
<squad nick="ESN">
<name>Example Squad Name</name>
<email>email@example.com</email>
<web>www.example.com</web>
<picture>logo.paa</picture>
<title>Use this e.g. for your squads name or your squads URL</title>
Property | Max-Length | Description |
---|---|---|
nick | 64 | The clan-tag, is displayed together with players nickname. Attention: Don't use reserved XML tags -> Link |
name | 64 | Squad name |
64 | Your contact email | |
web | 64 | Your Website Address |
picture | 64 | Your logo (optional), it has to in the same folder as the "squad.xml" file |
title | 64 | Squad name, displayed on vehicles manned by squad members |
Member list
<member id="123456" nick="=[TAG]= John">
<name>John Doe</name>
<email>john.doe@example.com</email>
<icq>N/A</icq>
<remark>Mostly harmless</remark>
</member>
</squad><!-- closing squad -->
Property | Max-Length | Description |
---|---|---|
id | N/A | your Player-UID, always the same and irrespective of your selected character |
nick | 64 | your nick, the same as used with your selected character |
name | 64 | your "real" name... |
64 | your personal email | |
icq | 64 | your personal ICQ number |
remark | 128 | as the name says it... |
How to get your Player-UID
Logo Creation
To create a logo for the use with "squad.xml" you'll need:
- a bitmap manipulating software (aka "Paintprogram") which is able to handle bitmaps in TGA or JPG format.
- TexView 2 or the PAA plugin for the use with Adobe Photoshop
For a logo without transparency you can use an ordinary JPG without further treatment. To get transparency you'll have to convert a TGA to PAA format. It is recommended to alwayd use PAA and to avoid alpha blending.
Create the TGA
In this tutorial we'll use GIMP - a open source tool - to create our sample-logo.
As this description only covers 'Gimp', here is an old tutorial made for Flashpoint, using Photoshop 6 and explaining how to get an alphachannel working within the TGA-Picture (Note: If you're using Photoshop 7, you'll need to download patch from adobe, since it does not save alphachannel in targa files). You can stick with 'Texview I' as long as those new tools need time to get published. The whole thing is working the same way like it did in Flashpoint, till now. The linked tutorial was part of newsreports by ofp.info.
Convert TGA to PAA
- Start TexView
- Open your "logo.tga"
- Save it as "logo.paa" (replace *.tga with *.paa in the "save as"-dialog)
Publish your Squad data
To use the "squad.xml" you'll have to upload the following files to a webspace:
- squad.xml (mandatory)
- squad.dtd (mandatory)
- squad.xsl (optional), needed to show the "squad.xml" in a webbrowser, but isn't needed by the Arma gameserver
- logo.paa (optional)
All files will have to be in the same directory!
How to use it as a team-member
- You have to have your own member-block in the "squad.xml" file
- Additionally you have to put the full URL of the "squad.xml" of your team into the "Clanpage" field in the player edit-menu (e.g https://www.example.com/squad.xml). As reference see the picture "Arma UID 2" in section How to get your Player-UID.
Files
Download
Source code
squad.xml
<?xml version="1.0"?>
<!DOCTYPE squad SYSTEM "squad.dtd">
<?xml-stylesheet href="squad.xsl" type="text/xsl"?>
<squad nick="">
<name></name>
<email></email>
<web></web>
<picture></picture>
<title></title>
<member id="" nick="">
<name></name>
<email></email>
<icq></icq>
<remark></remark>
</member>
</squad>
squad.dtd
<!ELEMENT squad (name, email, web?, picture?, title?, member+)>
<!ATTLIST squad nick CDATA #REQUIRED>
<!ELEMENT member (name, email, icq?, remark?)>
<!ATTLIST member id CDATA #REQUIRED nick CDATA #REQUIRED>
<!ELEMENT name (#PCDATA)>
<!ELEMENT email (#PCDATA)>
<!ELEMENT icq (#PCDATA)>
<!ELEMENT web (#PCDATA)>
<!ELEMENT picture (#PCDATA)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT remark (#PCDATA)>
squad.xsl
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet
version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="text()">
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="*">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="/">
<HTML>
<HEAD>
<TITLE><xsl:value-of select="/squad/name"/></TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="squad.css"></LINK>
</HEAD>
<!--
XSL template for "squad.xml", used in "Armed Assault" (Ref: "http://www.armedassault.com")
and "{{arma2}}" (Ref: "http://www.arma2.com")
See also the Arma-Wiki page: "http://community.bistudio.com/wiki/squad.xml"
Created by TomNedry, 26.Jan07
Reviewed by TomNedry, 15.Jul09
License: Creative Common (http://creativecommons.org/licenses/by-nc-sa/2.5/deed.de)
To have a squad logo in the HTML output, just put a "sqd_logo.png" in the same folder...
-->
<BODY>
<!--Main TABLE -->
<TABLE class="main">
<TR>
<TD class="left_row" valign="top">
<!-- Squad Info Table -->
<TABLE class="sqd_info">
<TR height="30">
<TD class="one">
<DIV class="sqd_name">
<xsl:value-of select="/squad/name"/>
</DIV>
</TD>
</TR>
<TR height="30">
<TD class="two">
<DIV class="sqd_title">
<xsl:value-of select="/squad/title"/>
</DIV>
</TD>
</TR>
<TR height="100%">
<TD width="100%" height="100%" valign="top">
<DIV class="sqd_logo">
<TR height="100%">
<TD width="100%" height="100%" valign="top">
<DIV class="sqd_logo">
<img alt="Picture: Squad Logo">
<xsl:attribute name="src">
<xsl:value-of select="concat(substring-before(/squad/picture,'.paa'),'.png')"/>
</xsl:attribute>
</img>
</DIV>
</TD>
</TR>
</DIV>
</TD>
</TR>
<TR height="10">
<TD class="sqd_website">
Web site:
<A>
<xsl:attribute name="href">
http://<xsl:value-of select="/squad/web"/>
</xsl:attribute>
<xsl:value-of select="/squad/web"/>
</A>
</TD>
</TR>
<TR>
<TD class="sqd_email">
e-mail:
<A>
<xsl:attribute name="href">
mailto:<xsl:value-of select="/squad/email"/>
</xsl:attribute>
<xsl:value-of select="/squad/email"/>
</A>
</TD>
</TR>
</TABLE>
<!-- Squad Info Table -->
</TD>
<TD class="right_row" valign="top">
<!-- Member-Info Table -->
<TABLE class="member_info">
<Tr>
<Th>Members</Th>
<Th>e-mail</Th>
<Th>ICQ</Th>
</Tr>
<xsl:for-each select="/squad/member">
<TR>
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">one</xsl:when>
<xsl:otherwise>two</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<TD class="member_name" rowspan="2">
<xsl:value-of select="name"/>
</TD>
<TD class="member_email">
<A>
<xsl:attribute name="href">
mailto:<xsl:value-of select="email"/>
</xsl:attribute>
<xsl:value-of select="email"/>
</A>
</TD>
<TD class="member_icq">
<xsl:value-of select="icq"/>
</TD>
</TR>
<TR>
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">one</xsl:when>
<xsl:otherwise>two</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<TD class="member_remark" colspan="2" valign="top">
<xsl:value-of select="remark"/>
</TD>
</TR>
</xsl:for-each>
</TABLE>
<!-- Member Info Table -->
<!--Main TABLE -->
</TD>
</TR>
</TABLE>
<p style="font-family:verdana;font-size:7pt;color:darkgrey;text-align:center;padding:10px;">
"squad.xsl" by <strong>TomNedry</strong>, last change: 15.Jul09
</p>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
squad.css
/*
CSS template for "squad.xml", used in "Armed Assault" (Ref: "http://www.armedassault.com")
and "{{arma2}}" (Ref: "http://www.arma2.com")
See also the Arma-Wiki page: "http://community.bistudio.com/wiki/squad.xml"
Created by TomNedry, 26.Jan07
Reviewed by TomNedry, 15.Jul09
License: Creative Common (http://creativecommons.org/licenses/by-nc-sa/2.5/deed.de)
*/
body
{
font-family:Arial;
background-color:#eaece5;
margin:0;
}
a:link
{
text-decoration:none;
color:#800000;
}
a:visited
{
text-decoration:none;
color:#800000;
}
a:hover
{
text-decoration:none;
color:#ffffff;
}
a:active
{
text-decoration:none;
}
a:focus {
text-decoration:none;
}
th
{
background-color:#aeb399;
font-family:Arial;
font-size:10pt;
font-weight:bold;
padding:4px;
}
tr.one
{
background-color:#dde4c3;
width:100%;
padding:4px;
}
tr.two
{
background-color:#d2d9b8;
width:100%;
padding:4px;
}
td.one
{
background-color:#aeb399;
width:100%;
}
td.two
{
background-color:#e2e9c7;
width:100%;
}
.main
{
text-align:center;
width:100%;
border:0 solid #333333;
}
div.sqd_name
{
text-align:center;
font-family:Arial;
font-size:12pt;
font-weight:bold;
}
div.sqd_title
{
text-align:center;
font-family:Arial;
font-size:10pt;
}
div.sqd_logo
{
text-align:center;
font-size:8pt;
padding:5px;
}
.sqd_info
{
border:1px dotted darkgrey;
width:100%;
padding:0;
border-spacing:0;
}
.sqd_website
{
font-family:Arial;
font-size:10pt;
text-align:center;
background-color:#aeb399;
width:100%;
padding:4px;
border-spacing:0;
}
.sqd_email
{
font-family:Arial;
font-size:10pt;
text-align:center;
background-color:#aeb399;
width:100%;
padding:4px;
border-spacing:0;
}
.left-row
{
vertical-align:top;
height:100%;
}
.right-row
{
vertical-align:top;
height:100%;
}
.member_info
{
border:1px dotted darkgrey;
width:100%;
padding:0;
border-spacing:0;
}
.member_name
{
font-family:Arial;
color:black;
font-size:10pt;
padding:4px;
}
.member_email
{
font-family:Arial;
color:black;
font-size:8pt;
padding:4px;
}
.member_icq
{
font-family:Arial;
color:black;
font-size:8pt;
padding:4px;
}
.member_remark
{
font-family:Arial;
color:black;
font-size:8pt;
text-align:center;
}
See Also
Tools/Programms
- Squad XML manager for use on the Desktop by laxentis [application/exe]
- Squad.xml Editor - Open source webtool by TomNedry [source/php]
- Squad.xml Editor 2 - Manage multiple squads via a browser by TomNedry [source/php]
- MyBB Squad.XML managment plugin by Jsmuk [source/php]
Online Arma XML Hoster/Editors
These hosters allow you to create and edit Arma 3 squad.xml files directly online and you will be provided with a unique link to your squad.xml to put into your game profile.
- Arma Squads XML Hoster/Editor Support all image formats and online image to PAA conversion for transparent squad logos