API Documentation (player written)

Well, I went too deep into the rabbit hole of NP’s maps, so now I have a generator… :smiley:

Here’s a link to github, you can take a look if you have expirience with linux shell.
It is messy, utterly inneficient and slow, but afaik nobody else bothered, so now we have it.
I will try to optimize and finish it later.

Is this a map creator or just a mapper of existing games? It looks like it just maps current games from what I can tell. I also made something similar, just a simple scatter plot made with python and matplotlib. You can find that plus a bunch of other random things I have made for NP here

It is a map plotter, and the intent behind it was to automate drawing boundaries between teams. But that part is incomplete for now.

When that part IS complete I’ll be very happy, as I hate doing it by hand :slight_smile:

1 Like

For tech levels sv = start value and bv = base value (i.e. value per level) which is why value = sv + level*bv. For many techs, this just computes the level again. For example weapon strength is the level and weapons.value is the weapon strength.

For scanning and range (aka propulsion) the values are multiples of 1ly = 0.125, which is why they are low decimal values and can be used to determine range or scanning directly against the coordinate system of the map.

It is unclear why the sv and bv of experimentation are what they are. I couldn’t map them onto anything meaningful.

For all other techs the level and the value are the same number, at least on default settings.

Osric

2 Likes

I second this. Everything Osric said is right, including the fact that no one can figure out what the hell experimentation means :rofl:

I have recently been adding functionality for formal alliances to NPA and so have documentation to contribute regarding the war key. It is a map from player # to an enum of four possible values

Value Meaning
0 Formal Alliance
1 Alliance Offered (no cost to accept)
2 Alliance Requested (paid $150)
3 At war

In any state other than 0 the players are at war. All states can be distinguished on the other player’s empire page according to the prompt there, which offers you the ability to initiate an alliance (in state 3, moves you to 2), cancel that request (moves you from 2 to 3), accept an alliance (in state 1, moves you to 0), or declare war (in state 0, starts the countdown to war with that player at 24 ticks; you will stay in state 0 until war is activated, I believe, but have not verified).

Osric

2 Likes