raskolnikoff Posted March 15, 2016 Posted March 15, 2016 Recently we've finished preparing server data for public access and now we are ready to share it with communityCurrently 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 storageAll information about shard contained in 4 files:- ItemTemplates_*.json- Shops_*.json- Ports_*.json- Nations_*.jsonwhere '*' 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 dataAlso, 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 25
Ned Loe Posted March 15, 2016 Posted March 15, 2016 Can this data be used to code a new public interactive map?
raskolnikoff Posted March 15, 2016 Author Posted March 15, 2016 Can this data be used to code a new public interactive map? sure, but better if you will cache data on your side to avoid unnecessary load on our servers 2
Martin Posted March 15, 2016 Posted March 15, 2016 (edited) 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 March 15, 2016 by Martin
qw569😳 Posted March 15, 2016 Posted March 15, 2016 Супер теперь не надо тратить время на изучение того, что производится и потребляется в городах.
Henry d'Esterre Darby Posted March 15, 2016 Posted March 15, 2016 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. Thanks Martin, I fixed the errant parenthesis.
raskolnikoff Posted March 15, 2016 Author Posted March 15, 2016 is ShopId a foreign key to port Id? yes guys, if possible, please post link to your tools made with this data, it would be awesome to see what you've did with it
Martin Posted March 15, 2016 Posted March 15, 2016 raskolnikoff there is another api mentioned in the pastebin post, are we meant to be able to access that ?
raskolnikoff Posted March 15, 2016 Author Posted March 15, 2016 raskolnikoff there is another api mentioned in the pastebin post, are we meant to be able to access that ? this is api made by Slik, he is reading this topic, so you can ask directly
slik Posted March 15, 2016 Posted March 15, 2016 raskolnikoff there is another api mentioned in the pastebin post, are we meant to be able to access that ? If you mean shipsofwar.net - yes, you can use it. I will update it using the new data.
Martin Posted March 15, 2016 Posted March 15, 2016 (edited) 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 Edited March 15, 2016 by Martin
Prater Posted March 15, 2016 Posted March 15, 2016 Some people are going to get very rich. Ya, not sure that shop info should be given out, but ports is nice.
SKurj. Posted March 15, 2016 Posted March 15, 2016 know nothing about this ort of thing.. but is the port defence window timers available with this?
Mored Posted March 15, 2016 Posted March 15, 2016 Is there a hint for using google script? Because with: var response = UrlFetchApp.fetch("http://storage.googleapis.com/nacleanopenworldprodshards/ItemTemplates_cleanopenworldprodeu1.json");var data = JSON.parse(response.getContentText()); i got an error...
Grim DeGrim Posted March 15, 2016 Posted March 15, 2016 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 1
Domox Posted March 15, 2016 Posted March 15, 2016 This is excellent. I guess I need to get to updating my map!
Mored Posted March 15, 2016 Posted March 15, 2016 (edited) i now tested the link in http://jsonlint.com/ and it also displayed an error, so can you confirm this please? Error: Parse error on line 1:var ItemTemplates =^Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined' Edited March 15, 2016 by Mored
raskolnikoff Posted March 15, 2016 Author Posted March 15, 2016 i now tested the link in http://jsonlint.com/ you are trying to parse plain json and google serves it as jsonp
Prater Posted March 15, 2016 Posted March 15, 2016 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}, 1
Prater Posted March 15, 2016 Posted March 15, 2016 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)
admin Posted March 15, 2016 Posted March 15, 2016 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. 3
Recommended Posts