Neptune's Pride Agent αλφα Edition

Version 2.2.16 is now up for firefox, iOS and on the Chrome Web Store. As usual it may take about 24h to update in Chrome.

The two main features added in this release are filtering for all reports screens and autoruler combat HUD enhancements.

Filtering comes from a great FR from @Gingey that the accounting screen be filterable. At the top of every report screen there is a ‘Filter’ text field and as you type into it the underlying report will be filtered down to show you lines with the words you’ve typed.

For the autoruler, it is now aware of both range restrictions and formal alliances, and it will automatically show you potential combat outcomes at the destination star. For example:

In the example shown, the 9 hotkey has been used to add two potential attack vectors, and both are in range for a potential attack. The HUD shows the maximum attack that could land, includes the 720 possible additional defenders, and shows how many land or live depending on whether the defending star wins or loses.

In another example, here is a system where there is unknown info:

In this case two other features are shown: when there is unknown info, the conclusion is marked with a question mark; and when a star is out of range, the number of range upgrades needed is shown and the arrow is greyed out and not considered for combat.

The hope is that these features make the autoruler even more useful for figuring out attack and defence scenarios, especially in combination with 8 and 9 to dial the considered stars up and down and look at various scenarios.

In addition to the above features, there is a formal alliances report that shows the last tick when you observed two enemy empires on the same star, thus confirming a formal alliance between them. It is not yet aware of declarations of war.

The combat HUD for fleets was off by one round for the flip calculation; that is fixed so that the flip shows just enough to have 1 ship survive. In addition it wasn’t calculating FA captures of stars properly, but having the allied parties fight it out if they captured a star jointly; it now recognizes this situation and has them jointly defend for the next round of combat. Finally there was a very nasty bug in the star ownership report which would make it display the wrong ticks if invoked via hotkey instead of via the UI.

commit e6e0cead7fc13433173e26659e7b2fde6e53cea5

Add filtering to all reporting screens.

Use the new filtering support to filter every reporting screen
if the user types in a query string into the filter box.

commit ffb1f30b2769f414e14d144ebf1dbf8700190d4f

Create a general filtering mechanism for all reports.

Change reports to be defined in terms of "stanzas" and "lines". A
report is now an array of either individual strings or subarrays
of strings called "Stanzas", and filtering works by always including
all the top level strings but including or excluding entire stanzas
based on whether or not any line in the stanza passes the applied
filter.

This means, for example,that you can have a top level structure to
define a table (for the accounting ledger for example) but the rows
of that table are isolated into stanzas so that they can be filtered.

In addition, you can have a lengthy multi-line result like in the
long fleet report, and filter out only those that relate to a star,
player, or specific string (like "Combat!") to then see the subset
of the report you're actually interested in.

Implement the filtered combat reports on top of this new structure
and pull the mechanism out into its own unit tested file for
documentation purposes. Next up, adding a UI to let the user custom
filter any report they are looking at.

commit 66591485d10a1989e5ab58f16a2238b784e78ace

Use raw distance for range requirements in autoruler.

Don't use the warped distance, because that makes the autoruler
think stars are in range that players can't reach just due to the
warp gates.

commit f4159b7dca3675c07dcf5c1f68b9e3fea71f153a

Set defenderWS correctly from the star.

Instead of relying on defending stars to figure out the weapons,
ensure that the selected star also participates! As at a minimum
the garrison there sets the weapons.

commit 76f3fd4f5a774c3ddc3b2cc8473a7b369c6cf52e

Add a combat projection to the autoruler.

For those arrows the user has decided are in scope, project
an all out combat outcome and show the result to the right of
the star's selection ring.

commit f8e69154a0e2d1c85c3e8e6e491a880f670fca41

Update autoruler to be range aware.

When you see autoruler vectors, grey out those which represent
out of range travel and indicate the range research required to
be in range. Respect the handicap, so if you grant range to people
out of range vectors will become in range.

commit 824f3def6c65f6b554cfffde44b17c30cc58ad0e

Update formal alliances to know the most recent tick.

In preparation for being able to process declarations of war (which
the code still doesn't do as I don't have a ready exmaple of it
yet) the knownAlliances are recorded with the tick # of the most
recent observed allied activity. So now, if someone declared war
_after_ that, the end of the alliance can be known and used to clear
out the alliance to enable correct calculations.

Also updated the autoruler to take allies into account, making it
more useful for seeing real attack vectors and enabling you to
consider your allies as possible defense vectors.

commit 42c16a9192daaf91d16f3b6959b1d46ee1160abd

Remove the handcoded clone in favour of the generic version.

The generic version might be a tiny bit slower but it is much
less error prone than the handcoded scan clone.

commit f23fae0d41f85baca2a766e9409a36f4dd286f8f

A first cut of formal alliance detection.

This doesn't yet take into account declarations of war, but
merely assumes any players who have ever shared a star are
in a formal alliance. The combat calculator then correctly
accounts for their fleets.

commit bdd353ab1012f469017f98969f630a82691322b8

Fix an off-by-one-round error in the required flip calculation.

For both defense and attack, the calculation provided an entire
round's worth of buffer needlessly. Change it so that the flip
combat is just one more ship than required.

commit 29f3082e4ab656ba96af6dda5d82d592a0adbea4

Rename diff2/patch2/Patch2 to diff/patch/Patch.

Now that the old implementation is gone, use sensible names
for the "new" version.

commit c7aed6d650d31b204eb7a375d5fd68e568b74b23

Remove unused original diff/patch implementation.

Having the old version there kept causing me to write incorrect
tests that mixed the two approaches. Remove the obsolete code.

commit 93e66c2b29142a012114852c89380c11b6bd90ad

Fix a nasty bug in the star report caused by corrupt diffs.

The new diff code has a flaw where if either the source object
of the diff or the patched result of a diff are modified, that
could corrupt the diff itself, making repeated diffs produce
incorrect answers. This shows up in the ownership report which
is executed twice due to a different bug with hotkey implementation
and the second execution gets the wrong result, so that the
star report is only reliable if chosen from the GUI dropdown
after a reload.

Add tests for the problem in diff2/patch2, fix the underlying
problem, and fix an object aliasing issue in the star report.

commit 9e7f7f0ba0f0c993802ff62227a6fbf938d0136b

Update the combat calculator for multi-round FA combat.

If multiple players from a formal alliance landed at once,
defeating an enemy system, the code would then have them
fight it out as usual without realizing that they are allies.

Now, the system is credited to the FA's biggest contributor,
and all incoming FA fleets are added to the star's total
defenses, and combat will continue if any offense remains.

Possibly/probably there will be a bug in cases where the FA
wins initially but then loses to an incoming FA. It's a hard
situation to manufacture.

commit 3c3e69b9e5d7d532724b0d0340f7082be742a200

A heap data structure to be used for priority queues.

Osric

v2.2.20 is now available. This release contains a two bug fixes that attempt to make the userscript more reliable on iOS, hopefully fixing a load-time race condition and a load-time repeated crash. In addition, the territory display has been made more efficient reducing jank significantly on large displays, and the star ownership report runs a bit faster to make it easier to work with in 64p games.

Feature wise, this release contains two hopefully significant new reports: a trading report and a combat report. Each of these reports is meant to make it quicker and easier to determine who is trading with who and who is fighting with who, especially in early game stages.

The trading report looks like this:

Each line begins with a clickable timestamp to take you back to the relevant point in time in the time machine, then lists the recipient of the tech, and finally lists the icons of every empire that could have sent that recipient that technology. In a trade scanned game, this knows about the rules and will only show candidates who had the destination player in range on the historical tick in question. In order to do all this, the report needs your historical game data, and the easiest thing to do is to generate your API key before or at game start so that you have the history gathered. The report is conservative and will not show a player acquiring tech on production, so if other players are extremely prompt trading (within 15 minutes of production) a trade could be missed; but by and large this report captures trade acrivity and makes it pretty easy to see who is trading with who.

Similarly, for probable combat activity, the report looks like this:

Here we see several examples: on some lines, just one player has lost ships that tick and it isn’t clear against whom they suicided – this happens when a tiny exploration fleet encounters defence in early ticks of the game. On other ticks, exactly two players have lost ships and it seems most likely that it was player A vs player B, though it could also be twin suicides. Finally, on some ticks multiple players lose ships and you’d need to go look at the tick if you really wanted to be sure what was happening. As with all times, once again the tick #s are clickable to rewind the game state to that moment in time so that you can see what was happening, or check the pre-existing star report to see who lost a star on the relevant tick #.

All of these reports: combat activity, trade activity, star ownership, and activity, rely on having historical game state and can only report accurately since you started collecting it (which means when you generated your API key). I hope you find them as time saving as I do!

commit f262b706b41e6aa2700f0133bad857add2d0a3e6

Detect and defer event handling to prevent race on iOS.

commit 6b8ab03a4f3f13c0d392b84b9733f5add7a0cf51

Force long polling for Safari to reduce RAM usage.

commit b986f66dc107dc0ef5f4cef07f222a3de8f1134b

New combat activity report enables spotting conflict with precision.

commit 606a9841c06a8d3eb7843989e186cb3b0bc873e1

New trade activity report enables spotting tech transfers.

commit 79bdd7ccf84dd0eb4413cbc36469eb3530f71089

Got distracted speeding up the ownership report.

The ownership report felt really laggy on the 64p game in combination
with filtering. Make the report itself require 50-100ms but ultimately
it is still laggy if you generate a giant report with thousands of
lines. It's probably good enough for now and long term fixes would
be to optimize Crus.format or to automatically truncate or filter
huge reports (e.g. by showing only the last 100 ticks).

commit b18bbadc5d7e10249a814a2c9a08c071c54799bb

Avoid drawing territory that isn't even on the screen.

For large galaxies, maybe it will make performance slightly better
to draw star discs that might be visible to the user and avoid
drawing the rest. This too doesn't seem to result in a perceptible
performance difference but doesn't seem like it can hurt performance.

commit 4954b20c17ac0a6746bfe2f29cfb2e5d3ddd22db

Star territory performance fix #1: don't recreate the canvas.

In the original code, canvas elements were being created on demand
during the requestAnimationFrame callback, and this was causing a
lot of jank. Change it to have one globally allocated canvas that
gets re-used, which seems to eliminate almost all of the drawing
inefficiency.

Osric

Well αλφα users, it’s been a rough ride but I hope it’s been worth it. I believe that the bugs are starting to settle and the time machine and enabled reports hopefully make the bumpy ride worth it.

The latest issue in αλφα is that the new database code could sometimes lose a record. This update fixes the only way I could find for that to happen as well as puts in a sanity check on the event log if you review your event log manually in the UI.

This release also adds a new “Empires” report which presents empire stats in an easier to consume way than paging through all the empires one by one. All tables are now sortable, so you can click on a column, for example ships/h, and see who is doing best in that category:

It makes for a better leaderboard than the leaderboard, because you can easily focus on whatever dimension you feel is more important at the moment; and at a glance you can see how you’re doing by the prevalence of red and green. The empires report also shows you a table of just your own alliance members aggregated. Alliances are still determined solely by API key merging.

commit 4f555a9d93602152fea573144d3cbf710a4f4309

Add data validation of event cache when the user views events.

Though hopefully the previous fix made it so that the event db
can't be corrupted, since we've now seen corruption in the wild
make it so that when the user views events there is a sanity
check on the database and a forced restore if a record is missing.

Some kind of server side logging will probably be needed for
αλφα Edition users so that occurrences of this problem can be
metered to prove that it is either fixed or that people are
hitting the restore case.

commit 4bdf6fcf6de6ed6f81523b111a7797b54c11d1cf

Make filtering pick up shape icons for aliases.

Now if you type someone's alias but they only appear in the
output as their icon (as happens in trading activity and
combat activity) the rows with their icon will still be
found and shown.

commit 983dda335609113e39cdae5d21115eb06e0c04d9

Move in memory append to after successful store.

One of the few ways I could see that it is possible to lose
a record in event storage is if the store request fails once
and then starts succeeding, causing the in memory store to
know about the unpersisted record and then skip over it forever
for future storage.

This change alters the order of operations so that if the persistent
storage fails, it won't be cached in RAM which will force it to
reattempt download and storage of the event.

commit efe5e4d40d814192ba55694d581fbcea2410bd99

Add sorting to all NPA tables.

If you click on a header, the table will be sorted by that
column. Repeated clicking will cycle between ascending, descending,
and original order.

commit 651b75eaed95a08e2caa86836fe6a2a11c2fcb3e

Row based version of empires report.

commit 1c201e6664a03e97e965ce8379e70b11a4641b4b

First version of the empire report modeled after tech.

This version turns out to be no good. There's no nice way
to sort and get a leaderboard style view, no nice place to
put allied sums to get an alliance v alliance view.

Fundamentally modeling this report after tech was wrong,
instead it should be one row per player and columns for
each stat. Checking it in just because I hate deleting
things.

Osric

v2.2.22 is just a few bug fixes, plus a new menu.

The new menu is adjacent to the main NP menu, and contains all the reports as well as their hotkeys in the hopes that they are both more discoverable and easier to access on mobile devices.

@BelSon reported a nasty bug where if you had generated an API key but never shared it with anyone, the time machine couldn’t find your data. Fixed it so that it will, and also changed it so that it sends a message to yourself with the API key so that the API key will also be found if you use multiple browsers/devices.

Fixed a long-standing bug where if an abandoned star had fleets departing it, the entire combat HUD would be disabled.

Fixed the built-in filtered reports, which were broken by a recent change to add user-driven filtering.

commit 4c422b6ac5e51474df68cb3d435c53e9e34f3976

Automatically send a message with new API key.

Each time the user generates an API key, send yourself a message
with the API key so that it is findable by the code on other clients,
as well as known in case you regenerate it.

This fixes the edge case in the prior change by making it that
all keys are in your messages and repeatedly generating your key
won't cause the time machine to lose it.

commit 636898cb33bc13032c2894f5f74d8a157387ff41

Make time machine work when you've not shared your key.

A bug in prior versions relied on the idea that you would have
mailed your key to yourself for reference or to another player
to share, and if neither of those things had happened the time
machine would fail to pick up your scan data.

Change it so that any key you have merged is also in the list
of keys, and since generating a key merges it, the case where
you've never shared your key works.

This does still leave a bad edge case where you generate a key,
never share it, and then for some reason regenerate it. In that
case the older key data will no longer be found. I'll fix that
in a follow-up.

commit ae5517e5b3dedb6a6ee2101bf776bfb91aec7be1

Make star weapons robust for abandoned stars.

commit 13838f1989f0e0cb45a54f4e108e4a3e40369397

Fix the built in filtering for case and translation.

When I made search operate on formatted text and be case
insensitive, I failed to change the built-in searches to
account for that and broke the built in all combats and
filtered fleet searches. This makes those reports work
again.

commit fc00ad3c37c459feb5dcd512921cd72b16740297

First version of menu access for NPA.

In an attempt to make the NPA functionality more discoverable and
the hotkeys more memorable, add a top level menu that lists all the
reports and their hotkeys. The top level menu itself can be invoked
with the 'm' hotkey, and if it is up, any menu item hotkey will
both execute and display the relevant report.

Thanks to Rob for proposing this FR.

Osric

Thanks for fixing that time machine bug!

Also the menu looks great, makes things a lot easier to access. Only problem I’m having is it auto-opens upon game loading.

v2.2.24 is dedicated to improving the stability of NPA.

The main thing added is that stack traces will now be recorded on the server so that if users are encountering bugs I can much more quickly diagnose and fix them. The only information other than the stack trace that is logged is the game id, so that if you report a bug to me and tell me the game id I can find your stack trace. The stack trace itself should not contain any identifying information.

The menu no longer pops down at startup.

Also, I had recently introduced a battle calculator bug where if a star changed hands the new defenders would get the old defenders’ weapon strength. Fixed it to recalculate weapons at the star based on the new owner and their allies.

Added a notifications key to API key recording to enable server-side notifications. If you are interested in pre-alpha testing notifications, send me a PM.

commit a6df2f1a9f26f87266fe7a1ae6237156244c4c88

Add server-side logging of stack traces.

Log stack traces for unhandled exceptions so that it's possible
to follow up on failures in production. The stack traces contain
the game id but no other identifying information.

commit d28912feeada1529b380ffe436fb6ece282ac242

Add a test for patching fleet orders.

commit 07142abe407592bc680edf52bc5bbc38eb70d78f

Fix a star's weapons level to change when it changes hands.

In the previous commit to handle allied fleet weapons, the star
held on to weapons state even if it was taken over by an incoming
alliance. Fix it so that if the star changes hands, its weapons
level is computed as the max of the new owner and their allied
fleets in attendance.

commit f16c5baa1d87cceb2efb40816640e7242886944d

Move 'onPopDown()' bug fix so that npaMenu is defined.

commit 21bf007bd3a127697260eb632f635cd2318214ee

Correct patch type to include 'null'.

commit 2132a1227500481b3143529b56303b3c88b0419a

Two small bug fixes.

First one is to avoid dereferencing the menu if it isn't
initialized yet which avoids some race condition I've
forgotten the details of.

The second is to never report needing only 0 ships to flip
the outcome of battle for the autoruler HUD.

commit 1b1ae7dcd5a4191033d91c97ef6434239681f80a

Pop down the side menu at initialization time.

It looks like in the main code the onRefreshInterface puts the
menu in the right state perhaps; while the NPA side menu starts
open when created the same way. Pop it down so that it isn't
open on every page reload.

Osric

Unmoved carrier warning: in turn-based games It would be interesting to have this or a button to cycle on carriers without orders to move
(I forgot a bunch of carriers in a friendly star of a player that I have formal alliance with)

It isn’t technically a button, but it is fairly easily accessible in the game. If you go to galaxy → carriers, and then sort by number of waypoints, you can bring all carriers with 0 waypoints to the top of the list, and from there give them orders. Not sure what an extension would be able to do that that can’t?

Unless you are talking about a warning that comes up when submitting: WARNING! YOU STILL HAVE CARRIERS WITHOUT SUFFICIENT ORDERS! In that case, maybe the warning should come up if you have any carriers with a total ETA less than the turn jump, so that no carriers are ever idle? But still, it’s easy enough to tell this by going to the carrier list and sorting by total ETA.

And if that warning was implemented, I’d like to see an option to remove the warning for looping carriers with total ETA less than the turn jump. Because oftentimes I’d already have them set, and the loop means it won’t stop doing what it’s doing at the end of the order list.

You can also use the hotkey ‘f’ to bring up the same page.

@BelSon @AStonedApe I overlooked that screen, that totally helps, thank you both.

It’s been a while since I posted an update because I’ve been trying to focus on just fixing errors since v2.2.24 with the intention of taking the time machine to stable channel. I just love being able to use the time machine to determine what happened when, who is trading with who, and so on and I believe the current version has become quite stable.

But recently on discord someone asked for configurable alliances and this has been on my TODO list for a long time. So now you can type ctrl+a to bring up the “Colours and Shapes” screen:

On this screen, you can configure every single player’s colour and shape to whatever you like so that you can easily distinguish particular players or group players according to who you think is allied. These changes appear on the map instantly and affect the empires report, which will now show you separate summaries for each alliance so that you can more easily compare aggregate stats like ships/h, science, and star count across the factions in your game.

The settings are persisted on a per game basis.

Another feature in this version is the ability to capture screenshots directly to IBB if you want to send someone a message with what’s currently on your screen. Pressing the screenshot button will do it right from message compose, or will take you to the settings screen if your IBB API key is unknown. Generate an API key on https://imgbb.com/ and put it in the field in settings for quick and easy screenshots right to messaging.

Also, the x hotkey now creates a fake enemy fleet for you to route and displays who you are acting as in the lower right of the map near the version number. Select an enemy star, press x to give yourself a fleet there, and then control as if you were the other player setting up an attack on your own systems to see the battle calc’s predictions and plan for invasions.

Aside from those things, this version mainly contains a variety of bug fixes.The biggest of these is due to @Skilly146 reporting inaccurate economists – the report was no longer correctly computing the impact of terraforming! So Banking was always looking better. Banking is good for much longer than most people think, but certainly not forever :open_mouth:

commit 45a369c895132e30d5c94f6f9b8d592024f35de4

Include an all surviving empires leaderboard.

commit ba2c772ccade399fe17b49361d662cb13eec645b

Make the empires report use color or shape to group allies.

Now that you can set the colours and shapes of every player in the
game, make the empires report respect the way you want to determine
who is allied and break up the tables into sub-tables by alliance.

commit c7e70fb45f03d35d7295a439b6b6f58fe6e2fa41

Fix the reset button to work in both cases.

Reset would only reset the colour/shape if the colour had been
modified; make it work if either one is modified.

commit 5101dc82882c65931ea39abf6adfd08c98dae1b3

Move recoloring to a spot that isn't an infinite loop.

Oops :)

commit 23673708b9ff3e51820ea53230f9d8829b11c581

Rework the UI and persist the state changes.

Change the UI to use the icon font for shapes, which looks
nicer, and persist shape and colour changes.

commit 6ccba17ca2580dd229f1b8a884d6c5ebf7f1b0de

A first cut of shape & colour setting UI.

This version doesn't persist anything but does barely work to
let the user reset the colours and shapes of every player.
Committing it so that I can take a second pass at the shape
selection UI without losing a working example.

commit 30cb029fc8481c71cb1010ff8b78c761fd79afcd

Move custom colours into a setting, fix route enemy help.

Move the custom colours into their own setting to prepare for
allowing the user to configure colours for every player in the
game. While I was at it, noticed the help being broken for
route enemy (as well as the control button) and fixed it to
have a better help string and a reasonable button name.

commit ac46c0186f8ad3065115f4cfc082113673e3f124

Change approach for alliance definition/coloring.

Instead of deciding what colour someone is based on what alliance
they are in, set it up so that the user will be able to configure
colours and shapes for every player as an orthogonal feature.

Then, we can provide alliance modes that decide who's allied based
on them sharing either a common symbol or a common colour at the
user's option, and the user doesn't have to use alliance inferences
at all if they don't want to. So the alliance mode will be "group
by colour", "group by symbol", or "don't assume alliances", and the
default will be "group by colour". Setting two players to the same
colour will then make them allied as far as the rest of the reports
are concerned, starting first and foremost with the empires report.

commit b4bc314f5df6d36e15a43be0f3bd5c3987874d91

The beginnings of manual alliance grouping/coloring.

commit 00a1d9e1d54380c35576911654b4995625f94bc2

2.2.33

commit b0f430438e9f972973910af35fe0512267ddcb04

Hack around typescript errors in the generic settings.

commit 115ed8350710c32764ec5a23b6d2951ae4e24166

2.2.32

commit 13ccac21901b367e723152365a3e26d4fb854076

Fix economists report based on @Skilly146's bug report.

Most embarrassingly, it looks like when I refactored the code
to include @BelSon's FR for the buy vs trade for terra I broke
the output table and didn't include terra in the analysis of
what you can buy after production, making banking always look
better.

Banking is still better a surprising amount of the time, but not
always!

commit 95a0ecbd251e0e21fd7ba7ea9f34814961593627

Couldn't remember why I changed clipboard setting.

Originally, if you ever viewed a report using the UI, it would
be set as the 'lastClip' and put on the clipboard. I couldn't
remember why I changed this to not copy by default, and it
wreaks havoc with async report generation. For now, make things
go to both places again so that I can see what the problem was.

Also gut the example test for hotkey.ts because I couldn't be
bothered how to deal with the navigator call and there are now
better (real) test examples in the codebase, for example patch.ts
and patch.spec.ts.

commit 9eaf6f289d7b1206408fe27b4858803be891aeee

player.colourBox is spelled differently in proteus.

commit 6257a0e364ccf01c3ac86c334b982bfc238bb8c4

Add screenshot functionality for users of imgbb.com.

You can create an imgbb.com account to host screenshots and get
an API key from them. Putting your API key into NPA's settings
allows the extension to upload your current map view as a screenshot
for sharing with your allies.

This involved a fairly big overhaul of the settings to have types
and allowed values and a generic form for setting all of them. It
mostly works; it struggles with editing the text fields but
otherwise seems OK. It's good enough to be getting on with even if
not ideal.

commit fe597a2494b92d4a73b1bb4b51cead5fb3062327

On firefox, reportSelector is sometimes not initialized.

When this check executes, don't try to dereference reportSelector
if it is null.

commit 25bbb87a722c0c2caef66c411622808b06b37566

Finally get all cases for war and peace.

In the formal alliances report, capture agreed peace, observed
peace, declared war, and war, so that the battle calc will respect
the war state when returned to after a period of peace. This gets
all the cases: there is no need to 'observe war' because war is
the default and must be formally declared after peace.

The only edge case is if two players are at peace and you never
observe it: you cannot then know when they were at peace if they
first declare war.

commit 395d22a4a3ee0b44beb912074fc1ff9eeea731cb

Setting ouid is required for proteus fleets.

commit 5f2ad682a57046bb7ee6ab57542edfae21a9e00f

Make a distinction between who you're controlling and you.

When using 'x' to control enemy fleets, note that in the lower
right of the HUD with the text 'controlling <alias>'; and if
you're viewing as someone else, don't lose that info. So you can
view as player a and control player b and see A controlling B as
the indication of the unreal state you are in.

commit be6a78d09c8a6d50e2bef1bab283ed1c81cb762c

Fix research figures for Proteus.

In triton the research is brr*level, but in Proteus it's brr*level^3.
Redo calculations for Proteus so that correct numbers are shown for
ETA and science upgrade impact.

commit 1aedc5e53acc48f1c54c6e2b32bef6449bcb9441

Add an x hotkey for fake fleet orders.

If you select an enemy fleet you can now press 'x' to give it
new orders in order to explore scenarios in the battle calculator.

If you select an enemy star, a fake fleet will be created there
for you to direct.

Reload when you're done to reset the game data.

commit 52a86212953ac5e97d5d0d9e1ba4fe88d5fd71c4

Omit star report sections where no stars are visible.

Change visibility rules to work well for proteus, and while I
was at it make the star report not show empty headings for players
where you can't see any of their stars.

commit 49883a06fcae72069619d56ad263679ec5ece46a

Avoid a null pointer exception when the table can't be found.

If we're trying to sort a table that is no longer in the markup,
bail out instead.

commit d534346563d4e4dd4e83e1213534779cd9f6cc86

Partial fix for declaring war.

When you are one of the parties who was involved in the allied fleet
detection, you can use the warmap to be sure you're at war or not
without having to review the event log to know. Make the allied
fleet detection take this into account so that if you're at war,
that is correctly noted before the faReport data are used to decide
you're allied because you once shared a star.

Really the alliance detection also needs to watch the event log to
fix this properly.

commit cd50b511e73f9cd5651c775764310049d2053b22

Modify event overlap to account for ordering problem.

Frustratingly it turns out that if the timestamps on events are
identical, they aren't _always_ returned in the same order from
indexedDB and so they don't _always_ overlap in exactly the same
way.

Two possible fixes: either make the writes accept the idea that
duplicate records can happen (which would be harmless) or detect
out of order records with identical timestamps. For now I went with
the second as I like the tight constraint that exactly the correct
records are written to the db. This might be wrong, though, as we've
also seen cases of missing records rarely which could possibly be
caused by a similar ordering problem if the server isn't guaranteed
to send us all the events with the identical timestamp at the same
time. So in fact a fix that favours robustness might be better.
Something to worry about.

commit fe22bc59437a776b6a285b72f4d3d0560b329a3b

Modify the star report to be easier to filter.

Put the empire's shape icon on every star line so that you can
type the owner's name in the filter and generate a report of just
their stars trivially.

commit 5348dc84c6e17816c3376e3a314fd17cd731ac09

Hopefully make scan key iterators more robust.

commit ca83d408763cfd41b1bc9ef6ab9e1d81f473bd6d

When the bubbles context is missing, don't draw them.

For reasons that are unclear, it is possible to fail to get the
correct graphics context for territory bubbles sometimes. Don't
attempt to draw them when that happens.

commit f74b7634cc3c6a37e4a83402cef0b4d5454b0bdf

For a fleet whose destination is unknown, don't throw.

It is possible for the user to select a fleet for which a battle
outcome couldn't be calculated, and this would throw a harmless
exception trying to read the eta string. Don't throw it but avoid
it instead, to clean up the server side logging of same.

commit 0cde139a840ba4c95c42a8df03e0384515f8f160

Defend against null pointer in scan iterators.

commit 600fd67c68d99590f4eaaa1430de4050a9e51136

Record source map as part of the build process.

To make it easy to map production stack traces back to source,
record the source map each time a production build is done and
put it next to the zip files as intel.{version}.map.

Then you can

npm install -g source-map-cli

and get convenient output like:

$ source-map resolve intel.v2.2.29.map 2 257317
Maps to webpack://neptunes-pride-agent/src/scans.ts:73:24 (getScanData)

        return h.peek().getScanData();
                        ^

commit 774e2a63688dc27cd7c913fb16f21ea98cf77116

Defend against a race condition initializing proteus colours.

The colorMap could sometimes still be uninitialized when loading
proteus for the first time, leading to an uncaught exception in
recordTrueTick. Defend against this and ensure the colorMap is
initialized correctly when these events happen out of the usual
order.

commit 8af2e3222173b154c7d967d88ad7f6d5a30e5005

Defend against a star not being a star.

The base game code has a bug when using the ruler that when the
user selects a fleet it sets universe.selectedStar to the fleet
instead of setting universe.selectedFleet, most likely because
using the ruler from fleets was a feature added in after the code
was initially written.

The autoruler assumed that the selectedStar was really a star and
was throwing (harmless) uncaught exceptions in this case. Fix it
to detect this case and avoid it.

commit 8ecda6190647e32301f0898fe09bf291436f6b92

Fix the map of undefined keys stacktrace in faReport.

Since I always seem to have some API keys I have seldom personally
seen one of the most commonly occurring stack traces in the wild: an
attempt to map over all API keys for the faReport.

Fix it so that the code doesn't execute if there are no API keys to
look at, as well as don't bother to execute it if FAs aren't even
enabled for the game.

commit b71374a07255567b32d1ded097fc283c3fa4e106

Make range bubbles accurate for proteus again.

In a previous change where I refactored the range bubbles I had
hardcoded the lyToMap ratio which is different in proteus. Range
tech itself also seems different; change the computation to be
robust for proteus (at least the territory display and the in-game
sprite match up).

commit 661786ecc9b16ac352bf365753463e24b54ecdf3

Add version, timestamp, and promise rejection info to logs.

Promise rejections had no info in them, and lacking timestamps
it was difficult to sort through the thousands of logs to figure
out the most recent ones. Add version and timestamp to make the
data significantly more usable.

commit fadd60907e53f7f907b9063074450ceacf2c4e68

Defend against a rare stacktrace.

commit aac0b49577d39272b7da9acf25c49ee8dccdce62

Hopefully fix the second most common stack trace.

Defend against the scan cache being empty for a given API key.

commit 717bd63d8d3b1921603d2369f39a645a941db225

Suppress the most common uncaught exception.

The autoruler code would compute defenderWS for unoccupied stars,
triggering an error trying to look up tech for a non-existent
player.

commit 31e0da0c2bdea2c2be8b233e6b4b0424c4cbedef

Defend against undefined player object.

When joining a game, your player object is not yet initialized.
Avoid dereferencing undefined and causing stack traces each time a
user joins a game.

Previous impact: harmless, but HUD text might not fully render.

Osric

1 Like

v2.2.43 is now live everywhere.

On Feb 16th or so, I launched v2.2.8 to the αλφα channel which was able to index all your diplomacy messages in order to make finding and merging API keys easier. Diplomacy messages and game events have a similar interface on the game side, and I re-used the code for game events, which are used by the accounting screen in order to display debts for quick payment. Unfortunately this introduced a subtle bug which I still haven’t understood and caused traffic to the game to skyrocket, affecting Jay’s billing. In v2.2.43 the code is reverted to how it was in v2.2.7 so that the bug is gone. To find API keys you need to merge them from the message where they were sent to you once, and thereafter they will appear in the key report.

Also in v2.2.43 (and other versions since I last posted about v2.2.34):

The code is now capable of counting and logging to a server various non-identifying client side events for debugging purposes (e.g. how often an exception is thrown, how often an API call is made, etc).

Custom colours and recolour to white weren’t working at all in proteus; make them work better. In addition, make recolour to white not affect alliance determination so that you can easily pick out your own stars, but still see correct alliance v alliance summaries in the empires report.

The combat calculator was not noticing that industry would get wiped out by conquests in proteus; change it to assume 0 industry if the star has just changed hands. This assumption too is wrong, since the conqueror may build industry, but you can’t know what they might build in advance.

Finally, in proteus it is always trade scanned so make the trading report aware of that.

In the bulk trading screen, one of the two footer rows was sometimes out of order making it hard to do a bulk send of all tech to the right person. Make sure both footer rows are always correct.

The activity report contained an egregious bug where all upgrades were seen as human driven activity. Fix it so that only those upgrades which are surely the user taking action are used. Also, the activity report has been reworked to show info on every player by default, and automatically highlight players who look AFK since the start of the game. This is most useful after the first production cycle has passed because often players won’t upgrade during the first day of play:

The home planets report is no longer put on your clipboard on reload, so you can copy diplomacy messages and reload the whole page if you want. It is more efficient to just click the production countdown to refresh the game, but not everyone knows that.

Fixed notifications configuration so that it is written for only your own keys and not lost, making notifications reliable and not notifying you about your allies’ woes.

commit 94aa5370b1aa859c2b6ac4aff86ae2f57873c870

Revert event fetch code to something like v2.2.7.

Without understanding why this might be the problem, revert the
event fetch code to how it was in v2.2.7 to stop the bleeding on
the server, where events are now being repeatedly and constantly
fetched by some client.

commit 43a05861fab22f412ccf594fee53bd6ae27d8782

Log initialization paths and abbreviate version.

For counts it feels like the full version info is a lot, so
abbreviate it down. Also log initialization paths to get a
sense of how the code loads, and avoid duplicate versions
on exception counts for exceptions with no stack trace.

commit 69d050cda55112cc4bb62ac4ad2352e90140d2b4

Attempt to catch and log document not focused.

commit e9029a10e19b1f5b5adf4b7e3a9d60954f76f97e

Use correct request path for proteus.

commit 4c38a07b4fd1882bea5b54cea2c9bfd53e7e76ba

2.2.40

commit 5ac0fdbd8c1d84239bb299acde27cba0abb7aced

Remove reading/indexing game_diplomacy messages.

In an attempt to narrow down where all the fetch game event traffic
is coming from, remove reading game diplomacy to find API keys. You
can add API keys by merging them as before.

commit 92c0aca3a188e85782c96cee88727af23b8fbd31

Fix custom colors and recolor to white for proteus.

commit 9178c62d412befd33d157c449d72c642e08ba78e

Make caching of scan data more conservative.

In the original code, it didn't wait for the API data to be written
to the cache before returning it, opening up the possibility that
repeated calls would hit the real API endpoint multiple times
needlessly. Though it introduces latency in the client, wait for
this to get written to the database to make that scenario impossible.

Also, refreshScanData was willing to refresh multiple times as it is
async and could be called repeatedly triggering multiple API calls
for the same scan. The actual effect of this was two API calls per
key at load time, one of which was needless. Change it to refuse to
refresh again if it has been called in the last five minutes.

Also, don't hook on_full_universe for refreshScanData as it is
already wired to refresh_interface, so only one was needed.

All of this in the hope of reducing API calls to the server, but
none of these fixes look high impact to me. Still better than it
was even if it doesn't fix the real problem.

commit d347a6f877e437aee09d3b273df01afc860eff59

Fix up footer to use order!

Somehow when I wrote 62da53f7 I only fixed one of the two footers,
so the send all numbers were still in the wrong spots. Fix that
up too.

commit d8e57ef4774e2cc924b39e0c3dbc1119bb8199d7

Log type of message downloaded.

commit d06a791592ab7ef32f31f6e6dbf2c4f98e0bf1a1

Add counters to track API calls.

Suspicious that v2.2.8 started unduly hammering Jay's np servers
with requests, I have added the ability to log arbitrary counts
and am now logging counts of all post requests coming from the
extension so that if there is something spinning out of control
it can be seen in the counters. Counters are per version number.

commit 6bddaa1d5d7b069a1a3fcdf3e59562edf1142f95

Fix an egregious bug in the activity report.

Though the code purportedly checked for tick changes for industry
and science based activity, in fact the dereferenced field was
always undefined so all star captures were showing up as manual
activity on behalf of the player.

Fix it to use the actual tick number and report activity
conservatively as it should.

commit 2cb67ac98466b70dcbe337dfd5e5b1a53a115b5f

Passing undefined in is not allowed for firebase.

When making objects with optional parameters, passing in the name
sets name: undefined and in this case causes new key watches to
fail because firebase won't store undefined. Defend against that.

commit e8b97cbb79381fdaff754b205e5d0d2245dbb288

Defend against people passing undefined as the callback.

Somehow someone is passing undefined as the callback to window.setTimeout
and this is logging uncaught exceptions. Just pass it through when
it happens to avoid the failure.

commit a58594d708c228e687911b7d513827a0bc2e9e04

Redo the activity report.

Redo the activity report to make it easier to spot AFK players and
easier to consume in a tabular format. This doesn't give quite all
the data that are there, only the last 5 actions the player took,
but I think this is 90% of the utility of this form of the report.
Separately an activity histogram per player might be really nice,
but I am not sure if that should be in this report or a new report
of its own.

commit 5e643efc35e6d7b5ee0446868df17b99e07cd145

Remove home planets report at startup.

In order to avoid always clobbering the user's clipboard with a
report they are unlikely to need now that the UI has autocomplete,
don't put the home planets on the clipboard at startup anymore.

This also might have been the source of the zillions of "Document
is not focused" errors.

commit cc4de3b4b3cfecf3957122c559342cf94678d826

Remove server side logging of no stack trace.

For now, remove logging of no stack trace as this seems to be
causing spikes of tens of thousands of "Document is not focused"
with no helpful debugging info.

commit e7bdf5675bfc16f839866d29dfb579e4c9691702

Fix tradeScanned for proteus.

In proteus the game is always "tradeScanned" so the gameConfig
doesn't reflect the setting as it can't be unset, but the extension
was relying on the setting to know the case. Isolate this into
a helper function that checks both conditions so that the trading
report is accurate.

commit f45f578c7079b587ec8371b0fb0a02b874180642

Modify empires report to use a new 'footer' feature.

Add [[footer:label]] so that tables can still sort and format
properly when emailed, and use it in the empires report.

commit 933e9d210ebc1e1710255cae7f7d0e4e68ae2bdd

Make alliance matching play well with recolor to white.

If the current player has temporarily set their colour to white,
use their configured colour for alliance matching so that they
still show up in their own alliance.

commit b5b996080aaa74928964f9ffe0979c2e2c777ac1

Write notifications configuration only on key creation.

Previously the code would associate the user with all the keys
they might be watching in preparation for notifications from API
data changes. Make it set this up only for keys you generate, which
makes more sense I think (rather than getting notified for every
user whose key you have).

The server side is currently discarding this information, too.

commit d17ea6150818f41fc761ede772b33d277e3daacf

Make sure the store is initialized before init.

In the common outcome of the load race condition in production,
the store is not yet initialized when init gets called, making
the recolour feature inoperable in production. Initialize store
earlier so that no matter what the outcome of the race it is
ready when init is called.

Osric

v2.2.50 is now live for firefox and iOS, and in review for Chrome (should auto update in about 24-48h).

Since v2.2.43 the highlights are a new alliance summary in the empires screen, a new alliance research table, a new communal economy report, and the ability to share colour schemes with other players. Many thanks to Rob for contributing the new alliance research table which makes it easy to see at a glance if your alliance is researching the right techs and who rolled what with exp.

Osric

commit e32936a8e5e7f10445286e50864a26bbf7cf4f84

Add the ability to share colour schemes.

If you visit the colors & shapes screen, put a button on the
clipboard that can be mailed to other players to let them
import your colour scheme.

commit c740675631e1b61cfcdd505fff25c0868d41b3d8

Show both research priorities if they are the same.

commit 8f05afeb0a4bb872324ce89296df14aca09549b8

Simplify all alliance research report.

Show best tech level in table headers. Only show empire level if it's
not at the best level. Also show first and second research priority.

commit b14224a323eb9ac8a911f747b6e714a392b179ba

Add the new communal economy report.

The economists would like to convince your alliance that since money
transfers are free, it's better to build the cheapest economy
communally across the alliance and split the cash after production
rather than have each member ramp their economy individually. In
this way, the exponential growth will ensure the alliance is rolling
in it sooner.

Of course, this just requires a little trust.

The new economists report tells you how to rebalance cash for econ
buys and outputs a table of who buys econ on what stars.

It adds three new [[ ]] expansions, one to show a player's cash,
one to enabling transferring them the right amount of cash, and one
to enable a bulk upgrade button for upgrading stars.

It adds a new feature to merging scan data where player data are
now merged into the main view and so it is easier to get information
about the other player's research and cash based on what is currently
merged.

It adds a new feature to combatOutcomes where the caller can pass
in an object to get back the star states after combat, so that the
economists will decline to propose that you buy economy on a star
that you can already see you will lose before the cycle. If you
lose it and gain it in the combat sequence, they will still wrongly
recommend it.

Written in a sequence of pair programming sessions with Rob! Thanks!

commit 1e5b9dad08ee4e802fa74bff5fa65ccc89b3d45b

Change sorting strategy for tables.

If a field begins with a digit or minus sign, treat it as starting
with a number that should be used to sort the column.

commit df238a7a913007b15c941ec2e9cde3a88c0a143e

Make distance map robust to dark galaxies.

commit c0b82fd8dfdd351cbf6721aebafcbf1569bea83c

Skip colorMap iteration in early initialization races.

commit 9681291572557aed9051eac46dd60cdbaf942a68

Make rebuildColorMap reset all the player colours.

In a somewhat hacky fix, ensure that the player colours are up
to date any time rebuildColorMap is called and be sure to call
it when refreshing scan data. This eliminates a bunch of corner
cases where the colors get mixed with original colours on data
refreshes.

commit 3e8a1f77b8f59b4e1ba7134d829dadcb9ece2b2c

Show tick savings on research report.

As a small subscript on how much science you need to complete
a research activity faster, show how many ticks will be saved
if you pay for the upgrade. Especially useful in early game
where the tick savings are often more than a single tick.

commit 005d66b5a2781d7386ff6f31029a9052cc49a836

Add all alliances summary to empires screen.

To make it easier to compare across alliances in big games,
add a separate summary table with one row per alliance so
that you can see where your alliance stands relative to
the others in aggregate.

commit f3dbb406c5bda4546f70693fee451d001d1aa7a0

Change max finding to be level sensitive.

In the research report, the coloring was sometimes wrong if
a player had lots of research at the prior level. Ensure that
the player who is furthest ahead level+points wise is colored
green.

commit bf0b2ee1e11357228bb320b31ae6d0d2f3ce5ce2

Refresh interface when adjusting combat handicap.

Especially when viewing the filtered combat report, it's nice
to see the report update as soon as you adjust the enemy's
weapons level.

commit cac448d69decd993f609cdd28eef2fa03c5806ae

Fix activity report to include the end tick.

commit 502fc1805d6f8f52819f63e91a19f887b8934384

Change ownership report to show only the last cycle.

Make the ownership report show the last 24h (or 20h, or whatever
depending on cycle length) so you can scroll through it with the
time machine and just see current changes when you pull it up.

Unsure of the goodness of this change as it works worse with
filtering but better for interactive exploring. Might make it
show full history if you apply a filter for the best of both
worlds.

commit 564e7c564d5196bb5ef3911441df49f17056ca04

Modify activity report to not consider tick 0 updates.

A player will go AFK if they didn't make any updates after
the start of the game, but activity was crediting pre-game
activity to tick #1 if the player was active multiple times
in the pre-game interval. Squish all that together so that
they show up as possibly AFK instead.

Also, make the activity report only run up to the current
tick on display, rather than the current real tick, so that
you can scroll back through activity with the time machine.

commit 3225ce63915b3b944575c52172a3495a7523782b

Add in more logging and code from v2.2.41.

Version v2.2.48 doesn't reproduce the request messages bug after
a week of waiting, yet seems to contain all the code that was in
the original faulty diff between v2.2.7 and v2.2.8. It was missing
one block from v2.2.41, the last version where the bug was observed.

Deploy this with the safety in place so that it shouldn't actually
hammer the real server, to see if the bug is still reproducing in
the wild.

commit e3b4020903811d09586c913c75f93cc8d83e3d81

Change autocomplete to prefer players over stars.

commit 3484ab6440db5ddfae8f1cc87a2523c857aba15d

More debug info for event cache.

commit 4bc63863d91965baabb8c925b1612b494ee592c5

Update techs for proteus in Rob's new table.

commit a4c3522a47dc07d008bdd91cec0aa430a467cb7a

Complete player and star names when square bracket is typed.

Subsequent presses of the key cycle through matches.

commit 7df2e3f2b4c8a5d1efc0ae9e4b478aad971e612c

Fix column descriptions.

commit 7db37f2d1b55db9f7d985da89e6087f687b1a39d

Add asterisk next to current research.

commit f485fe63e6384085f2809b8e4d2c35c5d2f946e1

Colour code research progress.

Green = max ally level and max ally progress
White = max ally level but not max progress
Red = not max ally level

commit 02da11b9fe3a7ab7900995ae00abb213981e0621

Show all alliance research progress.

Updates the alliance research screen to show progress for all research
areas regardless of the one currently being researched. This is useful
for coordinating research to quickly figure out who is closest to the
next level.

commit da6d6b2134b815bf9d88c32cb7339e0b48bc5da0
Merge: 451d206 1b0ad2c
Author: anicolao anicolao@gmail.com
Date: Mon May 22 13:29:46 2023 -0400

Merge pull request #5 from flackr/autocomplete-cursor

Separate autocompete logic and fix bug.

commit 1b0ad2ce77beff116c6acb8b4296c61f8407e7c5

Separate autocompete logic and fix bug.

This fixes a bug when completing a player name or api key before another
player name or key that it doesn't consider the insertion position.

Tests are also added for autocompletion logic by separating it out into
its own file and callable function to set up.

commit 0dee86a22796f415e5ac80a4bb8a9cc8a5b0ecfc

Attempt to fix screenshots for iPadOS.

commit d3fe81d5b633a86dea014b85418bfb836c6241eb

Merge pull request #4 from flackr/mkdir

Create dist dir if it doesn't exist.

commit 735571413f9686644b4852bac3e9210752e89b18

Create dist dir if it doesn't exist.

During the initial setup the dist dir doesn't yet exist and bin/version
fails to write the manifest due to this. Create the dir so the first run
just works.

commit 320863ac25fe89404f4c0018c0b177df58b48c27

Handle undefined response to game messages.

It looks like occasionally the response that comes back doesn't
contain game messages - perhaps there's an auth problem or an
error in the underlying game - so check for and handle this.

Also make another attempt to find a message in unhandled promise
rejections which often have no message and no stack trace.

commit 348780d7c5c78195e8a05193e26c40140ce60500

Fix that type error again.

commit b1b9b129b7fd77e1957826fce3fe49e20bd88ece

Experimenting with request bug.

I was unable to reproduce the request bug locally, so add
a variety of logCount calls on the broken codepaths, but
make the code behave as the current production version in
an effort to pinpoint the bug while not actually reproducing
it.

Hopefully these new counts provide good insight.

D’oh! I missed describing one of my favourite new features! Rob added the ability to autocomplete with strings as well as numbers!

As before if you type [[0] it will autocomplete to the 0th player, but you have to know the player numbers. Now you can type [[Osr] and that will complete to the first player whose alias starts “Osr”; if you press ] again, it will advance to the next match. If no player matches, it’ll find the first star that matches, and pressing ] advances through star matches. It makes typing star names and player names so much faster and easier!

Osric

@Osric What is the proper API key formatting to send via message? I have tried to use this feature for partnerships and I can’t get it to work :confused:

** found a post that says “When you type [[api:APIKEY]] into a message it will convert it into a button that allows you (or other users of this extension in your message) to either see their scans or merge both scans.” it worked, is there somewhere these commands are clearly written out?

Unfortunately the best documentation is here in these threads and in the online help (? hotkey). But always feel free to send me a PM or find me on discord and I’ll be happy to help with any questions.

1 Like

Is the discord still active? The discord link in the first post is dead.

Oh! The discord problem is me not realizing that all discord invites expire. I replaced the link with a new one that will last 30 days and will try to remember to update it occasionally. I’d love to see more people on the discord server, it’s very quiet over there … I guess expired invite links don’t help :slight_smile:

Thanks, Osric!

Just gonna throw this out there, for anyone trying to play on-the-go on android, I have done a thing:
Neptune’s Pride plus NPA αλφα on mobile (Play store)
NPA-Mobile on Github (Source)

I’m purposely trying to not add any features or extras to the app, just serving NPA αλφα on android (I couldn’t get anything working to allow NPA on android).

Announcing v2.2.58 … after quite a long delay, today a significant update was pushed to αλφα, the highlights of which are future time machine and NP4 support.

Now, when you use the time machine hotkeys to advacne past the current tick, real and fake fleet orders that you know about will be advanced and you can see the outcomes of future combats and star ownership changes. You can also now advance a fleet past some intermediate hop that previously would have obscured the true outcome in the combat calc, which always takes into account only the next hop. This combos well with the x hotkey which lets you put fake fleets on enemy stars and control all of their units to set up a hypothetical attack or defence scenario. Please report bugs (and I am sure there are many) on discord.

Aside from future time, the other main feature in this version is partial NP4 support. Many things are not working yet, but much is working, too. Please give it a try and join the discssion channel for it on discord. Do not report bugs in NP4 to Jay until you’ve reproduced them with the extension disabled.

This version also includes a new galaxy wide tech report, enabling you to check the signatures of tech owned by trading cartels/enemy alliances that you’ve identified. It also contains a new generals report which tells you of damage done and inflicted by enemy empires.

GL, and see you in the game or on discord!
O.

commit 622b0258607e55d9df194818cae8ae9bdc7dd05f
Author: Alex Nicolaou alex@stockgamblers.com
Date: Mon Apr 8 01:19:57 2024 -0400

2.2.58

commit adf9b6d95f08877f9b130a1d8adae6e4fecd05e2
Author: Alex Nicolaou alex@stockgamblers.com
Date: Mon Apr 8 01:19:37 2024 -0400

Revert "Experiment with putting HTML on the clipboard"

This reverts commit a5827364d518a44ced68e8ce687c6966611056b8.

This commit does not work on firefox

commit ee5e36fcfc4452c1de04afabc386d1e41a9bf515
Author: Alex Nicolaou alex@stockgamblers.com
Date: Mon Apr 8 01:16:10 2024 -0400

2.2.57

commit 03e12b82da073b61e222594987b6c1959f800bc4
Author: Alex Nicolaou alex@stockgamblers.com
Date: Mon Apr 8 01:16:04 2024 -0400

Take 2 on firefox match rules

commit 8b40c2ea2951ec30794b886cd18fe5cee3b72c39
Author: Alex Nicolaou alex@stockgamblers.com
Date: Mon Apr 8 01:13:51 2024 -0400

2.2.56

commit 646f88b0b3cca0e9d38a551aa998d920c54ce148
Author: Alex Nicolaou alex@stockgamblers.com
Date: Mon Apr 8 01:13:41 2024 -0400

Attempt to make firefox match new np4 URLs.

commit e90db1ede328cdb51b27c4bfca25f29d6cb2a817
Author: Alex Nicolaou alex@stockgamblers.com
Date: Mon Apr 8 00:57:08 2024 -0400

2.2.55

commit 150edb7cdd4f8f047e3f9670ca90078a4957a98b
Author: Alex Nicolaou alex@stockgamblers.com
Date: Mon Apr 8 00:15:35 2024 -0400

Change URL to np4.ironhelment.com to ship.

commit f41570a5bdf007bcd4dd0ec5b3004e32d6f37ac8
Author: Alex Nicolaou alex@stockgamblers.com
Date: Sun Apr 7 10:16:20 2024 -0400

Fix FA cooldown to handle new NP4 options

commit 769492d2559e32ed17a0d10f97f236b31648299a
Author: Alex Nicolaou alex@stockgamblers.com
Date: Sun Apr 7 09:54:17 2024 -0400

Fix API key generation mail for NP4.

commit 2142f7b8ee79223ad1eb2f52ffc43a80c3750a86
Author: Alex Nicolaou alex@stockgamblers.com
Date: Sun Apr 7 06:44:23 2024 -0400

Fix a long standing combat calculator bug.

Partial orders from _all_ fleets were being considered by the
combat calculator, but unsubmitted partial orders that were
abandoned by the player shouldn't be taken into account at
all.

Update it to respect .o only from the currently selected fleet.
Incredibly, this bug is in stable v2.2.0 as well.

commit 798b2690d90787d32f2af5f474afbae0a40e68cf
Author: Alex Nicolaou alex@stockgamblers.com
Date: Sun Apr 7 00:48:24 2024 -0400

Fix up annals of war for FA report in NP4.

commit 50dbc5477ea5ff9e9fcffa6749d5cb891a5ddb1f
Author: Alex Nicolaou alex@stockgamblers.com
Date: Sun Apr 7 00:32:27 2024 -0400

Fix accounting and game message indexing for NP4.

commit c27f576f5752cab40b5ca3127d15fea4f1e9b26e
Author: Alex Nicolaou alex@stockgamblers.com
Date: Fri Apr 5 20:41:59 2024 -0400

Fix up discrepancies between scanCache and diffCache.

Now that there is only a diffCache, fix places where it wasn't
identical to scanCache so that the time machine based reports
work.

commit 67b6282343f07025800866154ca1a81f5a675584
Author: Alex Nicolaou alex@stockgamblers.com
Date: Fri Apr 5 16:53:50 2024 -0400

Switch to a diffCache only implementation for API data.

commit b701c7409617dccf4f8f8b800d66493ccce54f89
Author: Alex Nicolaou alex@stockgamblers.com
Date: Fri Apr 5 00:24:30 2024 -0400

Add playerUid to scanning data to avoid typescript errors.

commit ec09013b63fecd93192a69e14b790e076a5f9a1a
Author: Alex Nicolaou alex@stockgamblers.com
Date: Fri Mar 29 19:35:33 2024 -0400

Fix infinity output to use the symbol and remove a needless log.

commit 544a51714d779812d1141ffea4ebc47fa1ef08aa
Author: Alex Nicolaou alex@stockgamblers.com
Date: Wed Mar 27 04:20:28 2024 -0400

Fix up activity and probable combat reports for NP4.

commit 983ab1197101e52bd8f9785bf336b8643f96b266
Author: Alex Nicolaou alex@stockgamblers.com
Date: Tue Mar 26 14:46:11 2024 -0400

Time machine fixes for NP4.

Make sure scanInfo contains the correct  value for puid now that
the underlying scan data has a new name for it (playerUid instead
of player_uid) and fix up access of productionTicks to point at
the new config in the galaxy object instead of the old (and
now empty) config on universe.

Makes the ownership and trading reports work again.

commit 5256266ab0b7f2b25a35940da611e157d264dc15
Author: Alex Nicolaou alex@stockgamblers.com
Date: Tue Mar 26 13:54:53 2024 -0400

Pacify typescript

commit b6640c97b68cae59980ed8cfe28111fa9f9208a9
Author: Alex Nicolaou alex@stockgamblers.com
Date: Tue Mar 26 13:51:06 2024 -0400

Fix historical time machine in NP4.

Use the correct UID when merging historical scan data so that
historical time machine functions again.

commit 9020e7d2f5387b56363f52e8e17a110ab7bafd88
Author: Alex Nicolaou alex@stockgamblers.com
Date: Tue Mar 26 12:53:57 2024 -0400

More relatively unorganized NP4 fixes.

URL pattern match for images and videos failing with the new
HTML escaping rules in NP4, fixed to match what's coming
through.

Changed research report to include data from FA members as well
as API key sources and sped it up in the process.

Other small misc fixes I don't remember.

commit dd8d23dd1f6978858e55912b593c8b186794e35e
Author: Alex Nicolaou alex@stockgamblers.com
Date: Sat Mar 23 23:43:27 2024 -0400

ios build for np4

commit 5c424bc0f8895962ab5ed473d11b1a4fe0b9233a
Author: Alex Nicolaou alex@stockgamblers.com
Date: Tue Mar 19 16:43:34 2024 -0400

Various hacky fixes for NP4 changes.

isVisible to deal with visibility type change, templates moved
spots, comment out a bunch of npaserver, and add fleet stats to
star and fleet reports.

commit 51b5d9ca8f704840a57e59ae9a87eddfe23a5408
Author: Alex Nicolaou alex@stockgamblers.com
Date: Sun Feb 25 21:15:31 2024 -0500

Fixes to the research report for NP4.

commit 99650c3b947f4b30821b108b98b3a5581da95716
Author: Alex Nicolaou alex@stockgamblers.com
Date: Fri Feb 23 02:02:14 2024 -0500

A first cut at API key support and colormap fixes.

API keys can now be merged in NP4, and colormap and shapemap
got completely redone to handle being 1-indexed in NP4 and
0-indexed in triton.

commit 26349f7e0360d86c2171a1901fb359199e1bdd53
Author: Alex Nicolaou alex@stockgamblers.com
Date: Thu Feb 22 01:48:05 2024 -0500

Rename in hte metadata

commit 7d879a0732c34ab215fd3865cf804aec715a45e8
Author: Alex Nicolaou alex@stockgamblers.com
Date: Thu Feb 22 01:47:35 2024 -0500

rename ios version

commit afa67e26a6be0c567f182e4c0a53360a4454220d
Author: Alex Nicolaou alex@stockgamblers.com
Date: Thu Feb 22 01:36:17 2024 -0500

A v2.2.10 marked NP4 iOS build

commit 634332e7f58d3be492bc0a5e2fc95600b9b5a587
Author: Alex Nicolaou alex@stockgamblers.com
Date: Thu Feb 22 01:24:55 2024 -0500

Silence typescript complaints

commit df117b9ac96c34d2f54842ae57982027b1e2c249
Author: Alex Nicolaou alex@stockgamblers.com
Date: Wed Feb 21 23:36:27 2024 -0500

Enable autoruler for NP4

commit afd2aca87f29ca25caaca32d1764284ec3682d73
Author: Alex Nicolaou alex@stockgamblers.com
Date: Mon Feb 19 08:51:35 2024 -0500

Production for future time machine in NP4.

commit 22e6d56cb60baba8c659545b76033c35edbdecc3
Author: Alex Nicolaou alex@stockgamblers.com
Date: Mon Feb 19 08:25:30 2024 -0500

Fleet movement working; prod not working.

commit 9aebb0b654152fc13556f54c731da8f48e9b3dbf
Author: Alex Nicolaou alex@stockgamblers.com
Date: Mon Feb 19 00:59:48 2024 -0500

Fix territory display for NP4.

commit adb800fbaa31d53b173655ca3e596459caaf7ee3
Author: Alex Nicolaou alex@stockgamblers.com
Date: Mon Feb 19 00:24:24 2024 -0500

Make trading screen mostly work for NP4.

commit d10e9a81b83851b4052455470a260a6995a4c5ca
Author: Alex Nicolaou alex@stockgamblers.com
Date: Sun Feb 18 22:35:37 2024 -0500

Add $/day to the empires screen for NP4.

commit 71456ce372433f617f7cd5c5cc3d1a4ba45e9dd0
Author: Alex Nicolaou alex@stockgamblers.com
Date: Sun Feb 18 09:20:05 2024 -0500

Fix up empires for offset

commit 9f47c92869452be61ee815c498526586f5ba9513
Author: Alex Nicolaou alex@stockgamblers.com
Date: Sun Feb 18 22:46:55 2024 -0500

Probably bad diff patch changes.

commit 4361346dcc2cf349112b67c8030883d941169d16
Author: Alex Nicolaou alex@stockgamblers.com
Date: Sun Feb 18 23:06:42 2024 -0500

Part of the scan cache changes

commit 61425e9c7e3cb44e93d35bd40e4b6cd221493cc9
Author: Alex Nicolaou alex@stockgamblers.com
Date: Mon Apr 8 00:48:28 2024 -0400

A very rough cut of changes to load in NP4.

commit 0ac1ff295e32728e3a26aa257fa0666635dc8138
Author: Alex Nicolaou alex@stockgamblers.com
Date: Mon Apr 8 00:46:11 2024 -0400

Add new reports that are partly working.

A new generals report tells you how much damage you've sustained
and inflicted on other empires; tech signatures gives a faster
way to see who has what tech and to check that the tech levels
among members that  you've grouped into enemy alliances make sense,
and past games attempts to let you replay old games from saved
API data (not quite working).

commit cfcb1130003950effa5f8ef45525e03df38e3831
Author: Alex Nicolaou alex@stockgamblers.com
Date: Mon Apr 8 00:42:47 2024 -0400

A first attempt at future time machine.

With Rob's help put together an initial partially working
future time machine which in spite of its bugs combos very
well with 'x' for hypothetical simulations enabling a lot
of ideation on attack and defence scenarios.

commit b613f18d74d0e96e1552ae7e6fb2e1522bef3b70
Author: Alex Nicolaou alex@stockgamblers.com
Date: Mon Apr 8 00:36:48 2024 -0400

Factor out combatcalc.ts from intel.ts.

Once the entirety of the extension, the combatcalc code is still
a large chunk of relatively opaque code that deserves to be hidden
away in its own file. Also makes it easier to write future time
machine and reuse the combat calc outside of the original use
cases.

commit fa3339ed504cc8e5ecce3dae0d8d75de01644198
Author: Alex Nicolaou alex@stockgamblers.com
Date: Sun Feb 18 22:50:13 2024 -0500

Formatting changes by vscode.

commit a5827364d518a44ced68e8ce687c6966611056b8
Author: Alex Nicolaou alex@stockgamblers.com
Date: Sun Feb 18 22:43:55 2024 -0500

Experiment with putting HTML on the clipboard

commit 9ab3885b2560b6c7ae14668bb0b6409a3f133d09
Author: Alex Nicolaou alex@stockgamblers.com
Date: Sun Feb 18 22:40:10 2024 -0500

Dubious fix to patch.js; get Rob to review.

commit 2ea7e4527cc195ba30b0c97415e4323cc3aff682
Author: Alex Nicolaou alex@stockgamblers.com
Date: Sun Feb 18 22:38:08 2024 -0500

Update from rome to biome for ci.
1 Like