Jump to content
Game-Labs Forum
raskolnikoff

Public "API" for Naval Action

Recommended Posts

@admin

Is NA developement team considering an option of reducing the number of playable factions prior to the release? 

The player base is not so big to support 10 nations. Many veterans think that 4-5 bigger nations should be better for the game and I think the same.  

Share this post


Link to post
Share on other sites

I'm just getting my server back on line after being down for months.  I'm noticing no DLC ships, and the battle ratings are way off.  Is this something new?

--thanks

lol -- wrong API file .... argh

Edited by RyebreadMike

Share this post


Link to post
Share on other sites

Can anyone explain to me, how the following data can be retrieved from the API?

Mast HP, Mast Thickness, Armor Thickness, Rudder Half Turn Time

Is the formula SPEED = SpdToWind * MaxSpeed / 13.03 still correct?

Share this post


Link to post
Share on other sites

Hello!
I want to automatically draw up the optimal route for carrying out trade missions with the delivery of passengers and goods, but I do not find this information in the 4 database files listed on the first page of the topic.
Where to get this information?

Share this post


Link to post
Share on other sites
On 9/6/2019 at 4:09 PM, Shane_Martin said:

Where would I go getting started with all this?

For example, database, connections ect.

Sample bash script to download all current API data and convert them to valid json files

#!/usr/bin/env bash

server_base_name="cleanopenworldprod"
source_base_url="http://storage.googleapis.com/nacleanopenworldprodshards/"
server_names=(eu1 eu2)
api_vars=(ItemTemplates Nations Ports Shops)

server_maintenance_hour=10
if [ "$(date -u '+%H')" -lt "${server_maintenance_hour}" ]; then
    server_date=$(date -u '+%Y-%m-%d' --date "- 1 day")
else
    server_date=$(date -u '+%Y-%m-%d')
fi

for server_name in "${server_names[@]}"; do
    for api_var in "${api_vars[@]}"; do
        url="${source_base_url}${api_var}_${server_base_name}${server_name}.json"
        out_file="${server_name}-${api_var}-${server_date}.json"

        curl --output "${out_file}" "${url}"
        sed -i -e "s/^var $api_var = //; s/\\;$//" "${out_file}"
    done
done

 

Share this post


Link to post
Share on other sites
On 8/6/2019 at 9:25 PM, ded said:

Hello!
I want to automatically draw up the optimal route for carrying out trade missions with the delivery of passengers and goods, but I do not find this information in the 4 database files listed on the first page of the topic.
Where to get this information?

Shop prices are available only for contracted goods

Share this post


Link to post
Share on other sites

How to calculate sell price for consumed item in port?

In-game example:

Item#1861: Alligator hides, 

Port "Ays" (produced Alligator hides), sell price = 4715 (like as BasePrice field in ItemsTemplate)

Port "West End" (consumed Alligator hides), sell price = 5840

Distance from Ays to West End = 67k

 

Question: How to calculate sell price in consumed port, when we know BasePrice and Distance from produced port?

 

ItemTemplate json for item#1861 (Alligator hides): https://pastebin.com/embed_iframe/3mR1STD1

Shop json for shop#4 (West End)https://pastebin.com/embed_iframe/7TLKgcNJ

Shop json for shop#321 (Ays)https://pastebin.com/embed_iframe/aCvcN8aW

 

@admin can you help me?

Edited by DanseMacabre
add json examples from Naval Action public API
  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, Thomas Goodman said:

Is this API still being maintained? Who do we have to contact to get a key for it?

No key needed last time I checked. Just click the link in the OP.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...