Print Page | Close Window

03OCT15 - XML API update, notifications

Printed From: Illyriad
Category: News & Announcements
Forum Name: News & Announcements
Forum Description: Changes, patch release dates, server launch dates, downtime notifications etc.
URL: http://forum.illyriad.co.uk/forum_posts.asp?TID=6601
Printed Date: 17 Apr 2022 at 10:03
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: 03OCT15 - XML API update, notifications
Posted By: GM Stormcrow
Subject: 03OCT15 - XML API update, notifications
Date 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.

SAMPLE XML OUTPUT
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.
<combatevent>
<script/>
<server>
<name>elgea</name>
<servercountrycode>gb</servercountrycode>
<serverlanguagecode>en</serverlanguagecode>
<serverlivedate>2010-02-21T21:53:01.190</serverlivedate>
<datagenerationdatetime>2015-10-03T22:09:48.110</datagenerationdatetime>
</server>
<personalcombatkey id="XXXXXXXXXXXXXXX"/>
<uniquecombatidentifier>
<server id="elgea"/>
<combatguid id="XXXXXXXXXXXXXXX"/>
<troopmovementevent id="XXXXXXXXXXXXXXX" occurrence_datetime="2015-10-03T22:03:41.987"/>
<datacomplete id="1"/>
</uniquecombatidentifier>
<combatoverview>
<location>
<X>384</X>
<Y>-1814</Y>
<terrainspecifictype id="50">Landslip</terrainspecifictype>
<terraincombattype id="4">Small Hill</terraincombattype>
</location>
<datetime>
<armymovementbegandate>2015-10-03T21:55:38.990</armymovementbegandate>
<combatoccurrencedate>2015-10-03T22:03:41.987</combatoccurrencedate>
<occupationlengthsecs>600</occupationlengthsecs>
</datetime>
<stratagem>
<armyaction id="6">Occupying</armyaction>
<feint>No</feint>
</stratagem>
<defensedataincluded>Yes</defensedataincluded>
</combatoverview>
<participants>
<participant>
<role>Attacker</role>
<player>
<playername id="1">GM Stormcrow</playername>
<troopsfromtown id="1">Stormont</troopsfromtown>
<alliance id="18">
<allianceticker>DEVS</allianceticker>
<alliancename>Band of Devs</alliancename>
</alliance>
</player>
<armies>
<army>
<armyname id="514810">Test Army 1</armyname>
<divisions>
<division>
<divisionname id="791189"/>
<commandername id="29130">Mantoa Beringer</commandername>
<commanderhealth>400</commanderhealth>
<units>
<unit>
<unitname id="123">Elite Praetorian Guardsmen</unitname>
<unitquantity>500000</unitquantity>
</unit>
</units>
</division>
</divisions>
</army>
</armies>
</participant>
</participants>
</combatevent>

NOTIFICATION ADDITIONS
  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".

    Sample:
    <notification>
    <notification id="123456789"/>
    <notificationtype id="42">Unit Army Arrives</notificationtype>
    <notificationoveralltype id="4">Military</notificationoveralltype>
    <notificationtown id="0"/>
    <notificationdetail>
    [@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
    </notificationdetail>
    <notificationoccurrencedate>2015-10-03T22:03:42.823</notificationoccurrencedate>
    </notification>

    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.

    Sample:

    <notification>
    <notification id="123456789"/>
    <notificationtype id="33">Diplomatic Mission Arrived - Messengers</notificationtype>
    <notificationoveralltype id="5">Diplomatic</notificationoveralltype>
    <notificationtown id="1"/>
    <notificationdetail>
    [@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]
    </notificationdetail>
    <notificationoccurrencedate>2015-10-03T22:29:22.333</notificationoccurrencedate>
    </notification>
    </notifications>
    </notificationsapi>

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

Regards,

SC



Replies:
Posted By: ubluntu
Date Posted: 04 Oct 2015 at 00:27
Thank You!


Posted By: Rill
Date Posted: 04 Oct 2015 at 03:24
This is awesome, will help with ubluntu's planned king of the hill style tournament, I imagine?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net