Play Now Login Create Account
illyriad
  New Posts New Posts RSS Feed - Combat Report XML
  FAQ FAQ  Forum Search   Register Register  Login Login

Topic ClosedCombat Report XML

 Post Reply Post Reply
Author
GM Stormcrow View Drop Down
Moderator Group
Moderator Group
Avatar
GM

Joined: 23 Feb 2010
Location: Illyria
Status: Offline
Points: 3626
Direct Link To This Post Topic: Combat Report XML
    Posted: 06 Aug 2010 at 16:42
Hi all,

Just a few clarifications, and I'll edit/expand this post to include any questions that come up.

General

Bad requests will return an error, in the format:


<errormsg>Some Text about your naughtiness</errormsg>

Uniqueness & "When should I query data?"

<personalcombatkey>

is the parameter that was used to pull out this specific report. 

This parameter is unique to the player who received the mail and the combat it refers to.

However... many players may receive the same report (think of a joint defense of X city, or a Sally Forth), and - because personalcombatkey is unique to the player - you might end up requesting the same report multiple times.

So if you're really, truly looking for the unique identifier - or, rather, the parameters that make up an absolutely unique identifier for whether you already have this data, you need to use the data contained within the uniquecombatidentifier container.


<uniquecombatidentifier>
<server id="UK1"/>
<combatguid id="ABCDEFGHI-JKLMNOPQ-123456563ETC"/>
<troopmovementevent id="1234567"/>
<datacomplete id="1"/>
</uniquecombatidentifier>


This combination of 4 things uniquely marks out a piece of combat data as original.

Obviously there is a remote chance that multiple servers might replicate the same GUID.

And obviously there is a 100% likelihood that multiple servers will replicate the same troopmovementevent (which is our internal incrementing identity field for unique combat events on each server).

But the combination of server, combatguid and troopmovementevent is impossible to come up again.

So this is your true, unique, primary key.

However!

The datacomplete variable is important too.  This flag essentially references whether the combat report you are reviewing at the moment is the complete truth. 

Examples (currently) of where it might not be the complete truth include where you send out a Raid against another army, and don't get the defenders' troop numbers back. In this case, all the data you have is "true" but incomplete.  This will become even more relevant with the Illusion schools of magic when they are introduced.

So the datacomplete field tells you the completeness of your report, and whether the new report is more "complete".

datacomplete of zero is less complete than datacomplete of one.  Please be aware that datacomplete is not a "bit" flag, and may extend through other levels of authoritativeness in the future.

So:
  • If you already have a report for every variable in the uniquecombatidentifier container then you don't need to retrieve the new report - it'll be a duplicate of data you already have

  • If you already have a report for every variable in the uniquecombatidentifier container except that the new report has a datacomplete higher value, then you should get this new report and replace your existing combat report with this new data, as it will contain everything your old report did, and then some more information on top
We generally think the rest of the data is fairly self-explanatory, but please ask questions if necessary.

Best wishes,

GM Stormcrow




Edited by GM Stormcrow - 06 Aug 2010 at 16:58
Back to Top
GM Stormcrow View Drop Down
Moderator Group
Moderator Group
Avatar
GM

Joined: 23 Feb 2010
Location: Illyria
Status: Offline
Points: 3626
Direct Link To This Post Posted: 06 Aug 2010 at 17:00
Please also note that - as mentioned in an earlier thread - XML combat reports where players utilised the Covert Ops stratagem are NOT retrievable by the attacking party.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.