Jump to content
Naval Games Community

Recommended Posts

Posted

@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.  

  • 5 months later...
Posted (edited)

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
  • 2 months later...
Posted

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?

  • 3 weeks later...
  • 2 weeks later...
Posted

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?

  • 5 weeks later...
  • 2 months later...
Posted
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

 

Posted
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

  • 2 weeks later...
Posted (edited)

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
  • 2 weeks later...
Posted
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.

  • 8 months later...
Posted

I'm trying to fetch this data using Angular 9. typescript.

 

This is my service, but it simply doesn't work, does somebody have a clue what I'm doing wrong?

 

import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';

@Injectable({
  providedIn: 'root'
})
export class NationsService {

  constructor(private http: HttpClient) { }

  getData() {
    const url = 'http://storage.googleapis.com/nacleanopenworldprodshards/Nations_cleanopenworldprodeu1.json';
    this.http.jsonp(url, 'callback').subscribe(response => console.log(response));
  }


}

 

Posted
On 8/15/2020 at 9:36 PM, Pirata said:

const url = 'http://storage.googleapis.com/nacleanopenworldprodshards/Nations_cleanopenworldprodeu1.json';

Result is

Quote

var Nations = {...};

Probably nothing you can parse directly with http.jsonp

Posted
On 11/25/2019 at 7:11 PM, DanseMacabre said:

sell price for consumed item in port?

 

On 12/5/2019 at 10:40 PM, Marlinspike said:

bump, hoping for an answer.

The estimated sell price for a consumed good is

buyPrice * 3 + (planarDistance * buyPrice * distanceFactor) / 6 / 100
  • buyPrice: BasePrice from API data
  • planarDistance: distance between sell port and closest port dropping this good
  • distanceFactor: RangePct from API data

But fear not, my map calculates it all. Just use 'Select trade relations' and click a port. Estimated net profits are indicated at the bottom of the port info.

  • Like 1
×
×
  • Create New...