squad.xml: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Added: My free XML hosting)
m (Removed annoying "?" sign at the end stylesheet filename and added small note.)
Line 18: Line 18:
<code><span style="color:#1874CD;"><?xml version="1.0"?></span>
<code><span style="color:#1874CD;"><?xml version="1.0"?></span>
<span style="color:#1874CD;"><<span style="color:#008B45;">!DOCTYPE squad SYSTEM</span> "squad.dtd"></span>
<span style="color:#1874CD;"><<span style="color:#008B45;">!DOCTYPE squad SYSTEM</span> "squad.dtd"></span>
<span style="color:#1874CD;"><?xml-stylesheet href="squad.xsl?" type="text/xsl"?></span>
<span style="color:#1874CD;"><?xml-stylesheet href="squad.xsl" type="text/xsl"?></span>
</code>
</code>


Line 115: Line 115:
|}
|}


As this description only covers 'the Gimp', [http://block2000.horror-fans.com/tutorials/tut_logo.php here] is an old tutorial made for Flashpoint, using Photoshop 6 and explaining how to get an alphachannel working within the TGA-Picture. 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.
As this description only covers 'the Gimp', [http://block2000.horror-fans.com/tutorials/tut_logo.php 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 [http://www.adobe.com/support/downloads/detail.jsp?ftpID=1544 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 ===
=== Convert TGA to PAA ===

Revision as of 17:02, 17 May 2007

About

Example of a logo, provided by "squad.xml"

To support the multiplayer community in their effort to play as teams, like many ArmA clans and squads are trying to, it's 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 informations 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 [1] or tutorials [2] 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.

How to create a "squad.xml"

The file consist of three main parts:


1. Head: defines the doctype. Just leave it!

<?xml version="1.0"?> <!DOCTYPE squad SYSTEM "squad.dtd"> <?xml-stylesheet href="squad.xsl" type="text/xsl"?>


2. Squad properties

<squad nick="[cHoe]"> <name>Chaos-Hoernchen</name> <email>admin@chaos-hoernchen.de</email> <web>www.chaos-hoernchen.de</web> <picture>choe_logo.paa</picture> <title>Chaos-Hoernchen</title>

nick The clan-tag, is displayed together with players nickname. Attention: Don't use reserved XML tags -> Link
name Squad name
email Your contact email
picture Your logo (optional), it has to in the same folder as the "squad.xml" file
title Squad name, displayed on vehicles manned by squad members


3. Member list

<member id="123456" nick="John"> <name>John Doe</name> <email>john.doe@anymail.com</email> <icq>N/A</icq> <remark>Mostly harmless</remark> </member> </squad>

id your ArmA-UID, always the same and irrespective of your selected character
nick your nick, the same as used with your selected character
name your "real" name...
email your personal email
icq your personal icq number
remark as the name says it...


Remarks:

  • You can leave any field blank, but it's recommended to fill it with a "N/A" instead.
  • Extend the members list by adding another XML-"Member" block

How to get your ArmA UID

ArmA UID 1: Start ArmA and select the player edit-menu
ArmA UID 2: In the bottom-right corner there your 6-digit UID

How to create a logo for the use with "squad.xml"

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.
  • Download Texview or the PAA-Plugin for the use with 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. Its always recommended to 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.

Important note: All logos must a have resolution of 2^x / 2^y (e.g. 16 / 16, 32 / 32, 64 / 64, 256 /256)

Step1: Create a new file
Step2: Select the appropriate size of image and set background color to transparency
Step3: Draw your logo and save as TGA...
Step4: after selecting TGA this window appears...

As this description only covers 'the 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

Your logo should be something like this
  1. Start TexView
  2. Open your "logo.tga"
  3. Save it as "logo.paa" (replace *.tga with *.paa in the "save as"-dialog)

Remark: Your are absolutely free to name your logo as you like. The filename "logo.tga" etc. is just an example!

How to publish it

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
  • mylogo.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 URL of the "squad.xml" of your team into the "Clanpage" field in the player edit-menu. As reference see the picture "ArmA UID 2" in section How to get your ArmA UID.

Here are a few examples of proper URL:s for the "Clanpage" field:

http://www.somewhere.net/squad.xml
http://www.elsewhere.org/squad/mysquad.xml

Files


Update: "squad.xml" and "squad.xls" were modified to get diplayed properly also by Firefox (Gecko-Engine). Additionaly a "squad.css" was added for a more easier way to adopt the display of the Html-output to individual needs.

References

Free Arma XML hosting