Play Now Login Create Account
illyriad
  New Posts New Posts RSS Feed - Combat API and its use in a Player Run Tourney
  FAQ FAQ  Forum Search   Register Register  Login Login

Combat API and its use in a Player Run Tourney

 Post Reply Post Reply Page  <1 891011>
Author
GM Stormcrow View Drop Down
Admin Group
Admin Group
Avatar
GM

Joined: 23 Feb 2010
Location: Illyria
Status: Offline
Points: 3274
Post Options Post Options   Thanks (0) Thanks(0)   Quote GM Stormcrow Quote  Post ReplyReply Direct Link To This Post Posted: 17 Apr 2016 at 18:35
Awesome.  Is this a list that everyone's agreed on?  Speak now, or forever hold your peace!

I'm assuming you want me to supply <winner id="2"> if combat does not occur?

SC
Back to Top
Digioso View Drop Down
Forum Warrior
Forum Warrior
Avatar

Joined: 09 Feb 2015
Location: Germany
Status: Offline
Points: 285
Post Options Post Options   Thanks (0) Thanks(0)   Quote Digioso Quote  Post ReplyReply Direct Link To This Post Posted: 17 Apr 2016 at 18:56
So far that's the list I need. :D

Hmm... that's a good question.

Can you put a 0 (attacker wins) in there if there is no defense (= square was onuccupied)?
And a 2 (no winner) if the new army is sent as a reinforcement?

Then I can do:
If winner == 2
    if casualties == 0
            army must be a reinforcement
    else
            a battle took part but both sides survived. In our case that means that the defender is still holding the square.
Back to Top
GM Stormcrow View Drop Down
Admin Group
Admin Group
Avatar
GM

Joined: 23 Feb 2010
Location: Illyria
Status: Offline
Points: 3274
Post Options Post Options   Thanks (0) Thanks(0)   Quote GM Stormcrow Quote  Post ReplyReply Direct Link To This Post Posted: 17 Apr 2016 at 19:59
Originally posted by Digioso Digioso wrote:


If winner == 2
    if casualties == 0
            army must be a reinforcement OR A FEINT
    else 
            a battle took part but both sides survived. In our case that means that the defender is still holding the square.
Added at least one other circumstance above; there may be other scenarios you need to consider for your win/loss/draw calculation.

Regards,

SC



Back to Top
Cilcain View Drop Down
Wordsmith
Wordsmith
Avatar

Joined: 13 Oct 2012
Status: Offline
Points: 106
Post Options Post Options   Thanks (0) Thanks(0)   Quote Cilcain Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 2016 at 10:04
Digioso/SC,

 

That XML looks fine.

I would suggest that battle casualties are per side rather than for the battle as a whole – this would make reporting on the tournament more meaningful.

One observation though, the <personalcombatkey id> will need to have a different value to that returned from the current ‘combatreportsapi’ API, otherwise it would be possible to obtain the <personalcombatkey id> via the new tournament version of ‘combatreportsapi’ and then feed it into the existing ‘combatreport’ API and get the full data set.

(X,Y) co-ords from the first API is a good idea, as it will mean you do not have to execute the detailed process for squares you are not interested in (e.g. if someone in the future just wants to run a BL tourney)

 

C


Back to Top
kodabear View Drop Down
Postmaster General
Postmaster General
Avatar
Player Council - Astronomer

Joined: 18 Jun 2013
Location: Lucerna
Status: Offline
Points: 1153
Post Options Post Options   Thanks (0) Thanks(0)   Quote kodabear Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 2016 at 10:22
What will this  limited data Tournament api key show if one of the Faction attack one of the Tournament Squares?
Back to Top
kodabear View Drop Down
Postmaster General
Postmaster General
Avatar
Player Council - Astronomer

Joined: 18 Jun 2013
Location: Lucerna
Status: Offline
Points: 1153
Post Options Post Options   Thanks (0) Thanks(0)   Quote kodabear Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 2016 at 21:28
Something that would be great, if you guys added when Messenger recall an army to the Tournament API.
Back to Top
GM Stormcrow View Drop Down
Admin Group
Admin Group
Avatar
GM

Joined: 23 Feb 2010
Location: Illyria
Status: Offline
Points: 3274
Post Options Post Options   Thanks (0) Thanks(0)   Quote GM Stormcrow Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 2016 at 22:51
Originally posted by Cilcain Cilcain wrote:

I would suggest that battle casualties are per side rather than for the battle as a whole – this would make reporting on the tournament more meaningful.

Sure, can do.

Originally posted by Cilcain Cilcain wrote:

One observation though, the <personalcombatkey id> will need to have a different value to that returned from the current ‘combatreportsapi’ API, otherwise it would be possible to obtain the <personalcombatkey id> via the new tournament version of ‘combatreportsapi’ and then feed it into the existing ‘combatreport’ API and get the full data set.
Well, any player involved could of course have just supplied their full API key instead, but yup, can do.  

I just don't want any player thinking that because they have supplied a tournament-only API key, they have an expectation that the only data getting shared is what they wanted shared - because that's not necessarily the case.  If I ever hear "But I only supplied my tournament API key... why is all my secret combat info plastered across this tournament summary?", I shall refer said player to you guys to explain the logic behind it Big smile

Originally posted by Cilcain Cilcain wrote:

(X,Y) co-ords from the first API is a good idea, as it will mean you do not have to execute the detailed process for squares you are not interested in (e.g. if someone in the future just wants to run a BL tourney)

 

As it's not needed for this tournament, I won't implement now - esp as the next one may have other requests/refinements.  But I agree that this would be useful.

Originally posted by kodabear kodabear wrote:

What will this  limited data Tournament api key show if one of the Faction attack one of the Tournament Squares?

No idea, I'm afraid, but it'd be the same as whatever currently appears in the XML for an attack by a faction (at the listing level) and the same, but slimmed data fields as specified, at the individual report level.

Does anyone have a combat report individual XML link from when they were attacked by a faction that they wouldn't mind sharing publicly?

Originally posted by kodabear kodabear wrote:

Something that would be great, if you guys added when Messenger recall an army to the Tournament API.

That's not going to happen in the Tournament API as it's an entirely different dataset, format, and functional bucket to combat.

We are looking into producing a diplo key API for all diplomatic unit events including messengers, but that's a way away.  And then we can have a discussion about producing a limited version of it too, as well Smile 

Regards,

SC



Edited by GM Stormcrow - 18 Apr 2016 at 22:53
Back to Top
kodabear View Drop Down
Postmaster General
Postmaster General
Avatar
Player Council - Astronomer

Joined: 18 Jun 2013
Location: Lucerna
Status: Offline
Points: 1153
Post Options Post Options   Thanks (0) Thanks(0)   Quote kodabear Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 2016 at 22:57
<participants>
<participant>
<role>Attacker</role>
<player>
<playername id="-1"/>
<troopsfromtown id="-1"/>
<alliance id="0">
<allianceticker/>
<alliancename/>
</alliance>
</player>
<armies>
<army>
<armyname id="0"/>
<divisions>
<division>
<divisionname id="0"/>
<units>
<unit>
<unitname id="726">Warrior Chiefs</unitname>
<unitquantity>82</unitquantity>
<unitcasualties>82</unitcasualties>
</unit>
</units>
</division>
</divisions>
</army>
</armies>
</participant>
<participant>
Back to Top
kodabear View Drop Down
Postmaster General
Postmaster General
Avatar
Player Council - Astronomer

Joined: 18 Jun 2013
Location: Lucerna
Status: Offline
Points: 1153
Post Options Post Options   Thanks (0) Thanks(0)   Quote kodabear Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 2016 at 23:05
Originally posted by GM Stormcrow GM Stormcrow wrote:

Originally posted by kodabear kodabear wrote:

Something that would be great, if you guys added when Messenger recall an army to the Tournament API.

That's not going to happen in the Tournament API as it's an entirely different dataset, format, and functional bucket to combat.

We are looking into producing a diplo key API for all diplomatic unit events including messengers, but that's a way away.  And then we can have a discussion about producing a limited version of it too, as well Smile 

Regards,

SC


I had guess as much it wouldn't be able to add to the Tournament API
Back to Top
GM Stormcrow View Drop Down
Admin Group
Admin Group
Avatar
GM

Joined: 23 Feb 2010
Location: Illyria
Status: Offline
Points: 3274
Post Options Post Options   Thanks (0) Thanks(0)   Quote GM Stormcrow Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 2016 at 23:59
Originally posted by kodabear kodabear wrote:

<participants>

<XML> snipped



Hi Koda,

Not sure what that xml snippet was related to, but as far as I know that's absolutely *not* what people want in this limited key, including (as it does) total troop counts, town names, army names, division names, unit types etc.

Regards,

SC
 
EDIT:  Oh wait... is that the faction attack return?


Edited by GM Stormcrow - 19 Apr 2016 at 00:10
Back to Top
 Post Reply Post Reply Page  <1 891011>
  Share Topic   

Forum Jump Forum Permissions View Drop Down

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