Forum Jump :

Author Message

DarkXess  

Modsaholic Founder


Posts: 2856
Rank:


Level: Member

Country: cn
Location: PRC
Occupation:
Age: 36
In-game name: DarkXess

 
#1 Posted at 2011-04-04 11:42        
     
Ok ive been learning more on how to set this up on a website these days, and im just sharing to what ive got
as ive succesfully set it up and its working great, so here is a how to guide on setting up a clan XML file for ArmA 2.
.XML, .DTD, .XSL, .CSS are all copyable codings. Put it into Notepad and save it with the proper extension.

.XML is the only file that NEEDs to be changed.

Only .XML and .DTD are required for online use.

.PAA is optional depending on whether you want to have a clan logo in game or not (will show up on the sides of
certain vehicles, possibly on as an armpatch on the character model as well, and on the player in-game profile (P)
when the player is selected).

.XSL and .CSS only needed if you want to view the XML online for the public.

All files need to be in the same folder. Player needs to have your Squad XML url in their player profile for it to work.

.XML -- can save as any name, as long as the extension is .xml

<?xml version="1.0"?>
<!DOCTYPE squad SYSTEM "squad.dtd">
<?xml-stylesheet href="squad.xsl?" type="text/xsl"?>
<squad nick=""> <!-- what will show up in brackets behind each member's name -->
	<name></name> <!-- clan name (FULL) -->
	<email></email> <!-- clan's official (or leader's) email address -->
	<web></web> <!-- clan website -->
	<picture></picture> <!-- the squad logo. See post below for details -->
	<title></title> <!-- what you want to show on vehicles -->
<member id="" nick=""> <!-- Squad member's PID, Player name -->
		<name></name> <!-- optional: real name or player name again -->
		<email></email> <!-- optional: member's email address -->
		<icq></icq> <!-- optional: ICQ, I used this with an edited XSL to show X-Fire usernames -->
		<remark></remark> <!-- "PLayer's Comment" anything they want to say. Does not word wrap in game -->
	</member>
</squad>

.DTD -- save as " 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)>

In the XML file, simply remove the comments ( letters wrapped in <!-- to the --> ), though you don't have to. Have a separate Member portion for each and every member in your clan that plays ArmA 2 / OA.
If you have players that also play ArmA 2 alone, without Combined Arms, you will need a second <member></member> for the different PID (Player ID), even though the name would be the same.

Logos should be in .PAA format. Using 256x256 resolution works the best. Start off with a logo in .PNG format, 256x256, and open it using TexView 2 ( link ). Save the logo as .PAA and place it in the same folder as the .DTD and .XML files.
Example of linking the XML and the .PAA: Assume the PAA was saved as logo2.paa

<?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>logo2.paa</picture>
	<title></title>

This should all be hosted in the same folder online, YOUR preferred website such as

http://www.yourdomain.com/squad.xml

For Web Page viewing:
You will need to add two other files to your folder. These will be .XSL and a .CSS file.
This is the coding as shown on the BISwiki: .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 "Armed Assault 2" (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
	Lisence: 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">
					<img src="sqd_logo.png" alt="Picture: Squad Logo"/> <!-- NOTICE! the file referenced as quote "sqd_logo.png" unquote can be changed if your image is named something else. Just edit sqd_logo to say your image's filename instead -->
					</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 <a href="http://www.csar-clan.net">TomNedry</a>, last change: 15.Jul09
	</p>
	</BODY>
	</HTML>
</xsl:template>
</xsl:stylesheet>

.CSS

/*
  CSS template for "squad.xml", used in "Armed Assault" (Ref: "http://www.armedassault.com")
  and "Armed Assault 2" (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
  Lisence: Creative Common (http://creativecommons.org/licenses/by-nc-sa/2.5/deed.de)
*/

body
{
	font-family:Arial;
	background-color:#eaece5;
	margin:0px;
}

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:0px 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:0px;
	border-spacing:0px;
}
.sqd_website
{
	font-family:Arial; 
	font-size:10pt;
	text-align:center;
	background-color:#aeb399;
	width:100%;
	padding:4px;
	border-spacing:0px;
}
.sqd_email
{
	font-family:Arial; 
	font-size:10pt;
	text-align:center;
	background-color:#aeb399;
	width:100%;
	padding:4px;
	border-spacing:0px;
}
.left-row
{
	vertical-align:top;
	height:100%;
}
.right-row
{
	vertical-align:top;
	height:100%;
}
.member_info
{
	border:1px dotted darkgrey;
	width:100%;
	padding:0px;
	border-spacing:0px;
}
.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;
}

The outcome will look something like this but the colors may be different, and the logo will be different.

To change the ICQ, like I did on the example XML, simply change

<!-- 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>

to something sort of like this:

<!-- Member-Info Table -->
						<TABLE class="member_info">
							<Tr>
								<Th>Members</Th>
								<Th>E-Mail</Th>
								<Th>X-Fire</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">
								      <xsl:value-of select="email"/>
								    </xsl:attribute>
								    <xsl:value-of select="email"/>
								  </A>
								</TD>
								<TD class="member_icq">
								  <A>
								    <xsl:attribute name="href">
								      xfire:add_friend?user=<xsl:value-of select="icq"/>
								    </xsl:attribute>
								    <xsl:value-of select="icq"/>
								  </A>
								</TD>
							</TR>

As you can see, its simply changing the ICQ field to show as "X-Fire" username, and changing the HREF link
to instead link to xfire:add_friend?user= then the user name. This would require that you treat the ICQ field
as an Xfire field instead, but if thats the way you wish to do it, feel free.

No, you can't change the ICQ and Email fields in-game, but you can change how they show up on the webpage.
Remarks will not word wrap in game either.

EDIT: Updated XSL Code to show where the image source is, in case clans want to change it from default "sqd_logo.png"

IMPORTANT: To find your PID (Player ID) start up ArmA 2 or ArmA 2 OA (different PIDs for A2 and A2OA.
Combined Operations uses your OA ID). In the start menu it will say "Player Profile". Click this.
In the menu that appears, select your username and Edit. From here you can change your face, username,
XML Link and view your PID. The bolded portion will be the bottom two rows in the Player Profile window.


Any questions, either PM me, or post a reply here.

----------------------------------------------------------------
Credits to TomNedry for this part below:

While managing our active community at www.pzgrenbtl417.net i had to edit our "squad.xml"
about once a week. Not that much work you may think,
but some sort of annoying and error-prone... So i decided to write a small web-based tool and
as i found it somewhat useful to me i like to donate it to the community under the GPL3 licence.

Download-Link: www.airpressuretendency.net/squadxml_editor/squadxml_editor.zip

More info and screenshots can be seen here: http://forums.bistudio.com/showthread.php?t=117080

This post was edited by DarkXess (2011-04-05 05:17, ago)

1st - Check The Rules! 2nd - Use The Search!


Author Message

VIPER[CWW]  

I'm a stable whore


Posts: 2126
Rank:


Level: Member

Country: en
Location:
Occupation:
Age: 28
In-game name: VIPER [RR]

 
#2 Posted at 2011-04-06 04:16        
     
Any idea's why a 512x512 picture or even 256x256 for that matter would get squished in the player profile, I know you don't know Dark but if anybody does I would be more then happy to know.... Last two clan tags I've created look great on the side of vehicles, on arm patch etc but in the player profile they get squished into almost a blob of pixelated mess.

Here's what I mean:-


As you can see in the player profile the picture has been reduced in size by about 75% messing up all the layout... (you should have seen it when it was originally .tga picture was undecipherable)

Pictures were originally saved as .tga but they gave issues after using TexView to convert to .paa (quality was worsened) so I reverted to saving as .png first then converting to .paa, Ican narrow down that its not the picture being over the top in texture as I have just made a completely different one which is a bit more basic...

Any Idea's? If any does have an idea and would like to see the original files pm me as I'm not going to share my clantag I worked on for ages here :-D


Advertisement


Author Message


Posts: 33
Rank:


Level: Member

Country: au
Location: Fraser Coast, Queensland
Occupation: Unemployed
Age: 31
In-game name: SSG Austin

 
#3 Posted at 2011-04-06 08:24        
     
Judging from the resize, I believe it's just that, a resize so that it is uniform on the player listing image. I am familiar with the issue and haven't managed to narrow down the issue beyond the simple answer.

If there is a more technical reasoning behind it I am all ears but at the same time, the whole idea of the xml image is to make your soldier and your vehicle stand out and get you recognised, the player listing is more the place to look for information for the unit in question.

Long story short, I believe there is diddly squat you can do about it, but personally, I'd keep optimising them for vehicles and shoulder patches and not worry quite so much about the player list.

Regards,
Austin.


Author Message

VIPER[CWW]  

I'm a stable whore


Posts: 2126
Rank:


Level: Member

Country: en
Location:
Occupation:
Age: 28
In-game name: VIPER [RR]

 
#4 Posted at 2011-04-06 19:15        
     
I hope there is something I can do about it :-D

I've seen the squad logo in the player profile much larger then of mine..... and very clear too.... shame there isn't much on this, perhaps its a midmap setting in TexView or maybe the pictures I'm seeing were 128x128.... saying that though they were still double perhaps tripe the size of mine...


Author Message

samas  



Posts: 1
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name: 2LT.Samas.S [10MD]

 
#5 Posted at 2012-06-19 18:26        
     
I have a question about this. First, how do you control where these elements show up in-game (like a custom field I added in the .dtd)? And second, has anyone figured out how to drive this document with data from a TS3 server? Such as using the TS3 server groups to automatically populate the fields? I want to make something like this for my milsim clan to reduce the amount of manual editing required on the squad.xml. Any help would be greatly appreciated!


Author Message


Posts: 1
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#6 Posted at 2012-12-09 16:44        
     
So I realize that this topic is old and chances are will not be viewed/replied to. But I am going to try anyway.

Does anybody have an idea of how to get the squad nick to show up in front of the players name instead of behind?

For Example the code looks like this:
<squad nick="AC">
	<name>A Clan</name>
	<email>N/A</email>
	<web>N/A</web>
	<picture></picture>
	<title>AC</title>
	<member id="1111111" nick="player">
		<name>John Doe</name>
		<email>N/A</email>
		<icq>N/A</icq>
		<remark>akhdsgkjahsg</remark>
	</member>

In game the player would show up as this:
player [AC]

I am trying to find a way where instead it would show up as:
[AC] player

Any ideas? Is it possible?[/ac][/ac]


Author Message

DarkXess  

Modsaholic Founder


Posts: 2856
Rank:


Level: Member

Country: cn
Location: PRC
Occupation:
Age: 36
In-game name: DarkXess

 
#7 Posted at 2012-12-10 05:30        
     
Hey almaxkiller and welcome to Armaholic :-)

I am not sure as ive not tried this, but playing around with the code does in fact give you different
results though im not sure it will give you what you want, so play around with it but first try this way:

<squad nick="AC">
        <title>AC</title>
	<name>A Clan</name>
	<email>N/A</email>
	<web>N/A</web>
	<picture></picture>
	<member id="1111111" nick="player">
		<name>John Doe</name>
		<email>N/A</email>
		<icq>N/A</icq>
		<remark>akhdsgkjahsg</remark>
	</member>

Like I said, not sure it will work but in theory it should do :-)

1st - Check The Rules! 2nd - Use The Search!


Author Message


Posts: 7
Rank:


Level: Member

Country: us
Location: United States
Occupation: Highschool Student
Age: 19
In-game name: M.Murakami

 
#8 Posted at 2012-12-20 19:00        
     
Hay guys Um I've been looking for a domain or something to host my files for free :/ I tried the on in forum but it is a paid thing and I tried W webs but they broke their link thing so I cant post it on the page. If any of you could help me many thanks


nevrmind on that but I dont know what link to put in my profile. my website or my xml

This post was edited by mlkmlkmlk (2012-12-20 19:57, ago)

I sneak in by land air and soon be sea.... Killin those Takis with a Dual core i5

Author Message


Posts: 149
Rank:


Level: Member

Country: us
Location:
Occupation:
Age: 26
In-game name: PFC Grunyev.C

 
#9 Posted at 2012-12-22 03:33        
     
Since this thread is magically active again, I'll ask.

How do you make the .paa transparent? I saved it in 32BIT as a .tga then converted in TexView, any specific settings I have to convert with?

Danger close is not an option. Its default.

Author Message


Posts: 22
Rank:


Level: Member

Country: nl
Location:
Occupation:
Age: 44
In-game name:

 
#10 Posted at 2013-01-17 22:29        
     
# Cards525 : Since this thread is magically active again, I'll ask.

How do you make the .paa transparent? I saved it in 32BIT as a .tga then converted in TexView, any specific settings I have to convert with?

Make PNG image, which contains transparancy. (goto http://pixlr.com/editor/ and create a transparent image.)

Then use Texview or the commandline utility 'Pal2Pace.exe' to convert that png to transparant .PAA

the easiest way to manage your squadXML and a transparant logo, is to use http://squadxml.limnosradio.com/

;)


Author Message

Rick  

One of Armaholic's finest ..... by presence....


Posts: 256
Rank:


Country: ca
Location: Alberta
Occupation: Sodbuster
Age: 26
In-game name: Rick

 
#11 Posted at 2013-03-09 01:51        
     
I've added my arma 3 alpha profile to my working arma 2 squad.xml. It's not working but it's possible it just hasent been implimented yet. Can anyone confirm this or did I just do something wrong?

I am very macho.

Author Message


Posts: 20279
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 41
In-game name: Foxhound

 
#12 Posted at 2013-03-09 07:32        
     
I have read on the BI forums others can also not get it working. But I have to be honest I lost track of the thread so I am not really sure wether they were able to fix it or not or that indeed it is not implemented yet in the Alpha. If there is a way you will find it in the Arma 3 forum section.

Visit my family webshop desteigerhoutshop.nl.

Author Message


Posts: 19
Rank:


Level: Member

Country: it
Location:
Occupation:
Age:
In-game name:

 
#13 Posted at 2013-03-11 09:14        
     
# Foxhound : I have read on the BI forums others can also not get it working. But I have to be honest I lost track of the thread so I am not really sure wether they were able to fix it or not or that indeed it is not implemented yet in the Alpha. If there is a way you will find it in the Arma 3 forum section.

Hi guys.

just check inside your profile file, cause the URL is converted uppercase if u do any mod in the profile inisde arma, so check in your document ArmA3Alpha nick.profile and write it lower case it should work without any modify

;)

Cheers


Author Message

Rick  

One of Armaholic's finest ..... by presence....


Posts: 256
Rank:


Country: ca
Location: Alberta
Occupation: Sodbuster
Age: 26
In-game name: Rick

 
#14 Posted at 2013-03-11 23:20        
     
Yeah it works, helps if you get the URL right..

Added 3 hours 39 minutes later:

So I have the info and tags on the username, that's working. The logo isn't though, I'm assuming this isnt implemented yet as the logo works fine in arma 2..

This post was edited by Rick (2013-03-12 02:59, ago)

I am very macho.

Author Message


Posts: 1
Rank:


Level: Member

Country: no
Location:
Occupation:
Age: 29
In-game name: coolshooter

 
#15 Posted at 2013-03-26 09:32        
     
# jerryhopper : Make PNG image, which contains transparancy. (goto http://pixlr.com/editor/ and create a transparent image.)

Then use Texview or the commandline utility 'Pal2Pace.exe' to convert that png to transparant .PAA

the easiest way to manage your squadXML and a transparant logo, is to use http://squadxml.limnosradio.com/

;)

Ok and how can you place the transparent logo into the game, does it support png? Also, i heard that the game might support something like turning green into transparent like with the counter strike logo

I shoot I hide and I still get the bullet!





Tags: Guide, Squad, Team, Xml