Jump to content

How To Read Cw Api?

CW API

6 replies to this topic

#1 Artgathan

    Member

  • PipPipPipPipPipPipPipPip
  • Knight Errant
  • Knight Errant
  • 1,764 posts

Posted 11 December 2016 - 06:22 PM

I'm trying to figure out how to read the CW API (http://static.mwomer...cw/mapdata.json) for a side-project I'm working on. For instance, given this object:

Spoiler


I can tell that a Smoke Jaguar planet is under attack by Rasalhague, that a unit with the tag 'FOX' is currently the owner of the planet, and that the planet has 13 regions that can be contested.

However, I can't make sense of the following keys:
  • contested: seems to be a 0 or 1 value indicating if the planet is under attack. If that's all is does, why not just have it be a bool?
  • defense_level: seems to be a placeholder at the moment. I can't find a planet where the value is not null.
  • territories:this one I can't make heads nor tails of. It's obviously some kind of counter, but I have no idea for what, or what each position in the array corresponds to. For instance, the length of the array is 8, which is not the number of factions in the game, nor the number of territories on the planet. It also doesn't seem to be the number of wins for a given faction, as when I took this the balance of power was 53% in favor of Rasalhague. (42 / 72 != 53%)
  • rules: I can see what the intent was with this, but the fact that it's blank is odd.
If anyone could shed light on what those keys correspond with (in particular the 'defense_level' and 'territories' keys) that would be much appreciated!

#2 QueenBlade

    Member

  • PipPipPipPipPipPipPip
  • WC 2017 Bronze Champ
  • WC 2017 Bronze Champ
  • 711 posts

Posted 12 December 2016 - 11:49 AM

defense_level may be when the owners of the planet spend coffer money to increase the amount of sectors on the planet.

defense_level: null (13 sectors)
defense_level: 1 (15 sectors)
defense_level: 2 (17 sectors)

territories...

it does appear to relate to the balance of power, but how...

#3 QueenBlade

    Member

  • PipPipPipPipPipPipPip
  • WC 2017 Bronze Champ
  • WC 2017 Bronze Champ
  • 711 posts

Posted 16 December 2016 - 03:30 PM

And now is doesn't matter anymore, with the release of 4.1 the api data is no longer being referenced correctly. All values are null.

#4 Artgathan

    Member

  • PipPipPipPipPipPipPipPip
  • Knight Errant
  • Knight Errant
  • 1,764 posts

Posted 17 December 2016 - 08:56 AM

Yeah. Hopefully PGI will provide us with a new (and better) implementation that we can access.

#5 Night Fury76

    Member

  • PipPipPipPipPipPip
  • Ace Of Spades
  • Ace Of Spades
  • 300 posts
  • LocationAustralia

Posted 26 January 2017 - 03:19 AM

And the wait begins.....

#6 Psycho Cop

    Member

  • PipPipPip
  • The Nimble
  • The Nimble
  • 76 posts
  • Twitch: Link
  • LocationNetherlands

Posted 26 July 2017 - 06:18 AM

Any chance of the CW / FP API getting refreshed again after each combat phase?
Seems like the last time the JSON was generated was on Tue, 18 Jul 3052 17:00:02.

Edited by Psycho Cop, 26 July 2017 - 06:19 AM.


#7 Davegt27

    Member

  • PipPipPipPipPipPipPipPipPipPip
  • Ace Of Spades
  • Ace Of Spades
  • 7,021 posts
  • LocationCO

Posted 29 August 2017 - 11:10 PM

you probably need to know what and the right way to ask a question

so we know PGI used Cryengine so we look up Cryengine
I had herd they use a modified version of Cryengine 4.2 I think



but that still does not give you what you want to know
when these guys/gals go to school more then likely Cryengine is not taught but C++ is, so the game is probably
written in C++ and then its converted to Cryengine (just keep that in mind)

anyways that still does not give you what you need to know
your looking for the syntax and the look up tables (in ATLAS called the preamble)

so in the example you use you want to know the meaning of
all those little symbols

http://docs.cryengin...tBind+Reference

HTH

edit:

Edited by Davegt27, 30 August 2017 - 06:15 AM.






2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users