Jump to content
Sign in to follow this  
jerryhopper

SquadXML, and what is wrong with it in 2013

Recommended Posts

SquadXML, And what is wrong with it in 2013

By Jerry Hopper

The SquadXML has been around in Bohemia Interactive’s military simulators since the very beginning. The use of the SquadXML has alway been focussed on ‘displaying a custom vehicle image ingame’, while there are many other uses.

As im a programmer i look at things from another perspective. So, here are my conclusion and view on the SquadXML as it is now.

im not going to discuss anything about the actual SquadLOGO. this research was focussed on how the squadXML works in a technical way.

So how does it 'technically' work?

When you have met all the requirements for a squadlogo ( entered a name, playerid, and squadxml location in your profile.) everytime you start the game, the following happens :

The game-engine requests the SquadXML which is located on a remote server.

Gameclient ( game starts, requests squadxml) ---> webserver ( serves squadxml, which see's the useragent.)

Gameclient joins server

Gameserver ( check the squadxml of the joining player ) ---> webserver ( serves squadxml, which see's the useragent.)

In the log of the webserver where the squadXML resides, we can see this happening:

The webserver gets a request from the gameclient, which identifies itself with the useragent “BIGameEngineâ€, but when i joined a server, i noticed another useragent being used : “Flashpoint/1.91â€

Here is a log from the webserver which hosts my SquadXML

82.173.160.150 - - [13/Jan/2013:11:03:58 +0000] "GET /1223681.xml HTTP/1.1" 200 694 "-" "BIGameEngine"

82.173.160.150 - - [13/Jan/2013:11:03:59 +0000] "GET /36.paa HTTP/1.1" 200 89586 "-" "BIGameEngine"

46.105.124.58 - - [13/Jan/2013:11:05:47 +0000] "GET /1223681.xml HTTP/1.0" 200 694 "-" "Flashpoint/1.91"

82.173.160.150 = ip of my gameclient.

46.105.124.58 = ip of gameserver i joined.

As you can see in the log, the gameserver requested the SquadXML and identifies with "Flashpoint/1.91"

But, not all servers i joined, returned the "Flashpoint/1.91" useragent. Many also replied with "BIGameEngine"

I assumed that both Windows Game servers, and Windows Game Clients will identify with "BIGameEngine", opposed to the Linux variant, which have the "Flashpoint/1.91" Useragent.

When the useragents are consistently implemented, the use of useragents could be used far more than only ‘displaying a image ingame’

With the useragent info we could see which user is online, on which gameserver.

The contents of the XML can be used to get the players information, but currently the XML has outdated fields like ICQ, and lacks any ‘new social media’ like Facebook or Twitter or such(*out of the scope of this article).

My suggestion/recomendation

My recommendation for the use of the useragents in the SquadXML would be :

Minor adjustments

UserAgent:

The game’s useragent should be changing according to its patch-level and product name.

below a overview of the useragents in current, and ideal situation.

Current situation :

Flashpoint/1.91 <--- Linux dedicated server

BIGameEngine <--- Windows dedicated server

BIGameEngine <--- Windows game client

Ideal situation :

Arma2/1.60 ↠Game in CLIENT mode.

Arma2OA/1.60 ↠Game in CLIENT mode.

DayZ/1.01 ↠Game in CLIENT mode.

ToH/1.21 ↠Game in CLIENT mode.

win32/Arma2/1.60 ↠Game in SERVER mode.

win32/Arma2OA/1.60 ↠Game in SERVER mode.

linux/Arma2OA/1.60 ↠LINUX Game in SERVER mode.

linux/Arma2/1.60 ↠LINUX Game in SERVER mode.

Linux or Windows game servers should identify themselves as ‘server’. Clients should always identify their patch (and eventually build) version.

Looking at the Useragent, this client/version stamp seems logical and originally planned from a programmers point of view, but somehow all w32 gameclients ended up reporting with a generic useragent.

---

SquadXML xml structure:

My recommendation of the actual SquadXML xml-keys would be :

Drop the ICQ field (its soooo 1999! ) and add Twitter, Facebook, Skype

Add a custom key, which holds custom subkeys.

<member>
<custom>
  <subkey1>some text</subkey1>
  <subkey2 type=’paa’>custom paa image url</subkey2>
...room for custom keys
</custom>
</member>

This should be added per member, but also in the main squad-section.

Both the useragent, as well as the actual squadxml content can be creativly exploited by web-programmers, in order to serve their community with that extra bit of information.

Major adjustments

Make the player-info from the squadXML available for sqf-scripts (as in: read values in script variables ) the custom XML keys should also be readable by SQF

When a game client/server is querying for a squadXML, use POST variables to post an array of loaded addons.

This could be positivly be exploited by creative web-programmers to display information about the squads, players and servers.

Result:

A small open source PHP script could be made which shows several information.

Clans and squads have better control over their squads, in terms of :

Tracking errors - version conflicts or Addon requirements

Consistent identification of game servers & clients allows an ‘Who is online’ functionality.

Having the player-info available ingame allows scripters to create new cool stuff, as the customXML keys can be used for : Scores/Upgrades, but there are many more applications

With just just some minor adjustments, this could have major impact on the social aspect of the game.

Conclusion

Welcome in the year 2013, With DayZ and ArmA3 coming up and a SquadXML system that has been forgotten since 2001 ;)

I assume BI has several variations of one codebase. to fully support each game, this year would be a perfect time for a change in the SquadXML implementation, make it more dynamic and flexible for better use in all real-virtuality's derivates.

DISCLAIMER

This information is based on my own research and a few personal assumptions.(*) I specificly didnt touch the actual XML structure in terms of what keys should be removed or added. that is a whole different discussion on its own. i wrote this with a 'passive external interaction' view on this subject, as im a programmer - always looking for ways to solve problems and creative ideas. What im saying is that im trying to show that a squadxml can be more than only a image ingame, and make clear that the current implementation isnt consequent, and therefore cant be creatively exploited.

Edited by jerryhopper

Share this post


Link to post
Share on other sites
i dont see why? you can parse the xml and make your own json?

Like this ?

XML http://squadxml.limnosradio.com/1223681.xml

JSON http://squadxml.limnosradio.com/1223681.json

Honestly, first thing that came to mind jokingly in the spirit of the thread was "XML is so 2001, JSON being the new sexiness".

But to be serious for a second, I'm not saying it's hard to convert or parse, we've got plenty tools for that.

Actual benefits being simplicity, less data to transfer, easier to process for the game client due to simpler structure (DOM orientation vs data orientation). I'm sure you can find more benefits if you dig into it.

Share this post


Link to post
Share on other sites

Actual benefits being simplicity, less data to transfer, easier to process for the game client due to simpler structure (DOM orientation vs data orientation). I'm sure you can find more benefits if you dig into it.

yea, but i wrote this in the spirit of "minimal impact in current code, and still be flexible in the future"

there could be many improvements, or ways to do it better. Fact is, that this part of the game is a very low priority one, and thus gets minimal attention (which is completely understandable)

Please mind that im not looking this from a inGame perspective (improvements etc), but with a 'passive interaction' view in combination with the current squadxml system ingame.

Edited by jerryhopper

Share this post


Link to post
Share on other sites

In short :

Please fix the useragent in both server and client.

Current situation :

Flashpoint/1.91 <--- Linux dedicated server

BIGameEngine <--- Windows dedicated server

BIGameEngine <--- Windows game client

Ideal situation :

Arma2/1.60 ↠Game in CLIENT mode.

Arma2OA/1.60 ↠Game in CLIENT mode.

DayZ/1.01 ↠Game in CLIENT mode.

ToH/1.21 ↠Game in CLIENT mode.

win32/Arma2/1.60 ↠Game in SERVER mode.

win32/Arma2OA/1.60 ↠Game in SERVER mode.

linux/Arma2OA/1.60 ↠LINUX Game in SERVER mode.

linux/Arma2/1.60 ↠LINUX Game in SERVER mode.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×