Jump to content
Game-Labs Forum

Public "API" for Naval Action


Recommended Posts

Recently we've finished preparing server data for public access and now we are ready to share it with community

Currently we prefer to avoid extra load on our servers so "API" does not contain run-time information, instead we're making dump of all data each time when we do maintenance and export it to google storage

All information about shard contained in 4 files:
- ItemTemplates_*.json
- Shops_*.json
- Ports_*.json
- Nations_*.json
where '*' replaced by internal shard name (ex. ItemTemplates_cleanopenworldprodeu1.json) and stored at google storage (ex. https://storage.googleapis.com/nacleanopenworldprodshards/ItemTemplates_cleanopenworldprodeu1.json)

From this data you can access description about all item templates in game (not items), shop content, port statuses and national information, but there is no player specific data

Also, in here (http://pastebin.com/Q68M53ev) you can find simple tool based on top of this data - TradersTool, which allows to find specific items/resources/materials/... within specified range from port and filtered by nation

  • Like 25
Link to comment
Share on other sites

And to think I was trying to reverse engineer those http requests and rabbit mq protocol calls.

 

THANKS ALOT!!!!!

 

Also your link is broken the bracket at the end needs to be removed from the url.

Edited by Martin
Link to comment
Share on other sites

If you mean shipsofwar.net - yes, you can use it. I will update it using the new data.

Maybe enable queries to use the parameters id, name etc in the lookups. Would be nice :).

 

e.g http://api.shipsofwar.net/ports?apikey=secret&id=133

 

 

 

instead we're making dump of all data each time when we do maintenance and export it to google storage

Could we be so bold as to ask for a nightly backup =D

 

I've attached this picture as a bribe 

369550_f288_625x1000.jpg

Edited by Martin
Link to comment
Share on other sites

Ya, not sure that shop info should be given out, but ports is nice.

If it is made available to those with the skills / know how to get it outside of game, they should just build an auction house into the game and make it EASILY available to all players ingame.

Easy of access and use does not favor the general masses of the gaming population. A select few will get rich with this data.

Overall, I love the API. But there is some concern as noted :)

  • Like 1
Link to comment
Share on other sites

If it is made available to those with the skills / know how to get it outside of game, they should just build an auction house into the game and make it EASILY available to all players ingame.

Easy of access and use does not favor the general masses of the gaming population. A select few will get rich with this data.

Overall, I love the API. But there is some concern as noted :)

That is exactly what is going to happen.  It will be a requirement on every map to have the data.  But those who can play right after server maintenance will get a very clear picture of the economy and can go grab everything up.

 

The port data is nice, it allows us to update port nationality changes easily.  That doesn't really affect anything because it is what we have on the map in game.  But what the shop data will make it so the current shop data on the map is irrelevant.  Right now you only get consumption and production based on the ports you travel to.  Now you can look at an external map and get everything.

For example.

Under the shops api.  First entry is ID 3.  If you look at the ports api, ID 3 is Walker's Cay.  It produces item template 40 (Pine), 41 (Redwood), 42 (Silver), 43 (stone).  Comparing the data between the game and the files will give the formula to put the produced amount into to get the actual produced amount.

 

It has silver currently in stock as of the last maintenance. 

{"TemplateId":42,"Quantity":23,"SellPrice":70,"BuyPrice":90,"BuyContractQuantity":-1,"SellContractQuantity":300},
  • Like 1
Link to comment
Share on other sites

P.s.  As of server maintenance

 

Nassau has 4 gold in stock

Harbour Island has 175 gold in stock priced at 159

George's Town has 9

Ragged Cay has 5

Atwood has 9

Nuevitas has 265 priced at 152

Puerto Del Padre has 140 priced at 159

Baracoa 125 at 159

Port Antonio 251 at 152

 

etc

 

I did this all quickly by hand.  A computer can do it in seconds shortly after server maintenance is done and without error (I could have made errors because I was quickly skimming)

Link to comment
Share on other sites

Some people are asking why it was done and will it break game balance.

 

1) requests that some services were trying to get from the servers loaded them with queries creating all sorts of problems

2) based on the types of requests we were getting some players have already done similar tools - creating advantage without sailing anyway

 

API is open now. But we can all decide eventually what we need in it and what should remain hidden.

  • Like 3
Link to comment
Share on other sites

×
×
  • Create New...