Play Now Login Create Account
  New Posts New Posts RSS Feed - 03OCT15 - XML API update, notifications
  FAQ FAQ  Forum Search   Register Register  Login Login

03OCT15 - XML API update, notifications

 Post Reply Post Reply
GM Stormcrow View Drop Down
Admin Group
Admin Group

Joined: 23 Feb 2010
Location: Illyria
Status: Offline
Points: 3353
Post Options Post Options   Thanks (0) Thanks(0)   Quote GM Stormcrow Quote  Post ReplyReply Direct Link To This Post Topic: 03OCT15 - XML API update, notifications
    Posted: 03 Oct 2015 at 23:36
Hi everyone,

Live, immediately, some additions and changes to the API XML (with thanks to Kubluntu for flagging these up) and notifications.

Combat API XML
  1. New entries on the XML combat API list ( /external/combatreportsapi/[yourkeyhere] )

    The attacker only will now get entries for individual reports where combat does not occur upon arrival for:

    a) Usage of the Feint stratagem

    b) Friendly-fire incidents ("arrived at x under orders to y-hostile-act but found friendly units...")

    c) Timed Orders to:
      i) Occupy
      ii) Siege
      iii) Blockade

  2. Addition of a new field: <occupationlengthsecs>

    This field is only populated via the Attacker's XML Key (ie Occupier, Sieger or Blockader).

    The field appears in the <combatoverview>...<datetime>... XML block
  • If blank or not supplied, then it is not available in this XML report
  • If zero, then the order given is not capable of a timer (ie Attack or Raid)
  • It non-zero & non-blank, contains an integer reflecting the length of time in seconds that the army has been ordered to perform this occupying/sieging/blockading task
Please note that complete sets of this new XML data is only available for arrivals from now on - historic data will either not be available or will be incomplete.

Of a non-contested occupation report.

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<personalcombatkey id="XXXXXXXXXXXXXXX"/>
<server id="elgea"/>
<combatguid id="XXXXXXXXXXXXXXX"/>
<troopmovementevent id="XXXXXXXXXXXXXXX" occurrence_datetime="2015-10-03T22:03:41.987"/>
<datacomplete id="1"/>
<terrainspecifictype id="50">Landslip</terrainspecifictype>
<terraincombattype id="4">Small Hill</terraincombattype>
<armyaction id="6">Occupying</armyaction>
<playername id="1">GM Stormcrow</playername>
<troopsfromtown id="1">Stormont</troopsfromtown>
<alliance id="18">
<alliancename>Band of Devs</alliancename>
<armyname id="514810">Test Army 1</armyname>
<divisionname id="791189"/>
<commandername id="29130">Mantoa Beringer</commandername>
<unitname id="123">Elite Praetorian Guardsmen</unitname>

  1. Army Arrival Notification

    There is now a notification supplied when your army arrives at a location under orders to occupy, siege or blockade.  

    This notification now appears ingame, and is also supplied with the notifications XML feed, with a notificationtype_id of 42 "Unit Army Arrives".

    <notification id="123456789"/>
    <notificationtype id="42">Unit Army Arrives</notificationtype>
    <notificationoveralltype id="4">Military</notificationoveralltype>
    <notificationtown id="0"/>
    [@ps=GM Stormcrow|1|DEVS|18|1|0|740-746-755-0-0-0-0-0-0-0-0-0-0|Illyriad Dev Team|Game Master|10-456-294-72] units from [@t=Stormont|1|383|-1815|13360|1|1|1|51|1|GM Stormcrow|DEVS|1|5-4 wall] arrive at [@l=384|-1814|51|50|5] with orders to occupy

    The final word will read "occupy", "siege" or "blockade", depending on the order type.

  2. Messenger Notifications

    Upon arrival, messengers currently provide a notification (type 33) - however this has now been modified to include the name of the town they were sent from.

    As above, this appears in both the ingame notifications interface as well as in the XML.


    <notification id="123456789"/>
    <notificationtype id="33">Diplomatic Mission Arrived - Messengers</notificationtype>
    <notificationoveralltype id="5">Diplomatic</notificationoveralltype>
    <notificationtown id="1"/>
    [@ps=GM Stormcrow|1|DEVS|18|1|0|740-746-755-0-0-0-0-0-0-0-0-0-0|Illyriad Dev Team|Game Master|10-456-294-72] messengers from [@t=Stormont|1|383|-1815|13360|1|1|1|51|1|GM Stormcrow|DEVS|1|5-4 wall] arrive at [@l=384|-1814|51|50|5]

Please do let me know of any issues you run into with these data feeds.


Back to Top
ubluntu View Drop Down
Forum Warrior
Forum Warrior

Joined: 24 Aug 2013
Status: Offline
Points: 304
Post Options Post Options   Thanks (0) Thanks(0)   Quote ubluntu Quote  Post ReplyReply Direct Link To This Post Posted: 04 Oct 2015 at 00:27
Thank You!
Back to Top
Rill View Drop Down
Postmaster General
Postmaster General
Player Council - Geographer

Joined: 17 Jun 2011
Location: California
Status: Offline
Points: 6813
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rill Quote  Post ReplyReply Direct Link To This Post Posted: 04 Oct 2015 at 03:24
This is awesome, will help with ubluntu's planned king of the hill style tournament, I imagine?
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.