Since I last posted, I have released 2.2.9, 10, and 11, which were individually small bugfix releases but add up to a fair number of changes now that there are three of them.
The bulk of these changes have been focused on making the time machine and its corresponding reports more robust and – dare I say it? – bug free. Now that all API keys are automatically discovered from your messaging, the time machine and reports know how to properly use all the data available to give you the best historical info possible given what you know. The ownership report and activity report no longer require you to have merged your own key to know what to do. The key report can recognize dead keys and tell you when they were invalidated so that when someone revokes a key on you, you’ll know when they did so.
For formal alliances, the combat calculator now recognizes stars and fleets belonging to your allies and gives you more correct combat outcomes taking that into account. As far as I’ve seen, this works well in formal alliance games to enable you to properly plan defence and attack with multiple players’ fleets on the move. Also for formal alliances, your counterparty gets charged 150 until they accept, and acceptance refunds 75; so on the accounting sheet the balance will show you what they owe you from your point of view if you offered the alliance.
For bulk trading, if you had to send multiple levels of the same tech it used to show you the correct cost but then transmit only one level of each tech. Now it transmits all levels that are missing to the recipient.
Game messaging read/unread bugs are improved, but I don’t think they are completely eliminated. I would really value bug reports on specific cases where it failed for you as this is turning into a thorny problem that is outside the clients’ control.
The economists have come to town. They would like to advise you so that you can figure out when Terraforming is a better tech than Banking. They report as follows:
First off, they assume you’ll spend your cash stockpile on econ (the number in brackets in the header). Then, they tell you how much income that’ll buy you if you have no tech in time (the $170) or if you get banking tech first ($245), or if you get Terraforming first to make the econ cheaper ($200). Then they compute the balance you’ll have right after paytime and tell you how much Econ, Industry, OR Science you could buy if you spent it all in one category. As expected, you can buy more with less in late game Terraforming, but in early to mid-game banking is quite competitive. Happy researching.
The controls table is updated. It’s as ugly as ever but now lists the hotkeys in the hopes that will make it easier to absorb them for future use. In addition, if you press a hotkey when the UI is already up it will show you the correspnoding report rather than just silently putting it on your clipboard (it is still on the clipboard and in the ‘Intel’ button as before). Finally, hotkeys that conflict with browser hotkeys, like Control-8 and Control-9 on Windows and Linux now take over the functionality so that they work without triggering browser behaviour too.
Speaking of C-8 / C-9, if the territory display is not visible and you try to change the style, the first “change” will make it visible instead of changing it. So when players are confused that it is missing and try to change the style to bring it back, that will now work as they expected (2 users with this bug report).
Pimple drawing on range and scanning territory didn’t used to adjust when you used the combat handicap to see what you’d get with one more level of these techs; now it does. Substitutions in messages used to cap at 1,000 which was too few for really big games; increased the cap. And the QUIT QUIT QUIT bug came back and had to be fixed again.
commit 81f64369355c5cdb1dc067c65ad79f88263a794d
Some fixes for unread state; still unsure it is working.
commit 8e2fabefa38677c47a731d4a1952dc397b0989bb
Update star ownership to work across multiple API keys. Following the same pattern as for activity, walk through the ticks using all available API keys to generate the best star report this user can.
commit 25ebcace38603a746bad29f75451b19b88e98c02
Fix a missing case for alliance detection. The allied fleet check for the combat calculator only worked in one direction; but alliances go both ways and so the condition needed updating. I think it is correct now.
commit d3c1ec8f6a7e488907526f2a3c08790a7d223615
Fix the activity report to use all available scan data. Instead of relying on the user to have a single key for the whole game, search all known API key data to build the activity report. The approach taken is horrifically inefficient, but after caching the JSON.parse results the time varies between about 60 - 100ms, fast enough to be not worth fixing yet.
commit a3d9db3ae139337ff98819d31be837ddeae0c43b
Charge for alliances in the accounting screen. When you request peace, consider that the other owes you the full price of peace until they accept. If/when they accept, count that as half the value so they still owe the other half. On game defaults that means someone owes you $150 as soon as you offer peace and $75 if they accept.
commit 8ea09b3b43c8bb249bc395dfc6301de15393917a
Attempt to fix unread state after load time too.
commit 3c17e74ba3a429b46fa6442d9fa2328e931186a4
Update the economists report to include buys. In addition to your balance, show how much of each thing you can buy after the tick so that it's clear when Terraforming has made your money more valuable than $75 more of today's dollars.
commit 87979f80c8f4a08bee2127ebe001b796d0e58fc5
Try a different layout for the controls table. The controls table was already not very nice looking; try having a single column with hotkey reminders on the right to see if that helps users find/remember the hotkeys.
commit 10a415aa5706ff81cc2c006aadac3c89537710c5
Update battle calculator for allied fleets. If we know a fleet is allied with us or we are allied with the destination star, show an arrival rather than a combat.
commit 8478cef51a8738ad86a558d2eddfd474ae2b6275
When the UI is already up, visibly display reports. If the user has brought up the UI and triggers a report, immediately display it as well as putting it on the clipboard.
commit 0825d747759c860baa136554d063a177a401eb5a
Change territoryBrightness behaviour when display is off. Sometimes users have turned off territory display with ) by accident and then try to use ctrl-8 / ctrl-9 to change the style to fix it, but think it's broken. If display is off and you change the style, turn it on first (and don't change the style); then if you change the style again it will change as expected. Also attempt to make all hotkeys override browser hotkeys by telling Mousetrap that is what we want, so that c-8 / c-9 don't also switch tabs on Windows and Linux.
commit 4133290545a1db6ac5a027ac6d1be56483cd1e4e
Fix up some bad boundary condition bugs. In bulk trade, if you didn't have the cash to send a level, the new code to try to send all levels would wind up in an infinite loop. Just give up in this case. In time travel, traveling forwards across an API key reset boundary would fail to start at the right place in the new block and give up on finding data. Fix it to start at the beginning when moving forward, and at the end when moving backwards. Linear is still fast enough but probably I will want to make this a binary or galloping search if the tick # is far enough away from the current index...but at least it is now working well in the presence of multiple API keys in all directions.
commit edade32cf242cf9c2761c693eefda52fa9bf0f3d
Record eof so that the key report works again.
commit c55caba409325af5c37b8b11767994f56970d3ed
npaserver doesn't yet recognize bad keys, defend for it. Since the server will happily return error codes for every tick after someone invalidates a key, be sure to trim those bad entries off so that the time machine still works.
commit a3b1af644f1216c243f61559c1382f0db43685fd
Fix key report to handle regenerated keys. Once a key is regenerated, recognize it and find the last good scan from that key. Report that timestamp in the table for all seen keys.
commit 6e7e363c370a51aca676b4d186e8309069fef054
Early version of the economists report.
commit ea6e48323b3a8127d7df1f0be36d5798f06319f4
Bulk send wouldn't send duplicate techs. Bulk send would send only the first level of each tech instead of sending all of them. The price listed was correct but the transfer was incomplete, fix it to send all missing tech levels at once.
commit 74514e22f29d8d0b5ce7d24997723ba1ee37efbc
Accept dashes in youtube video IDs.
commit 9588bd50d2d35408aed13c44602474cb2d5ad714
Have the message cache read state be authoritative. The server expects that if you request a comment thread, you must be on the screen that displays the comment thread because that's the only way that ever happens in the vanilla game. However since NPA is caching all the diplomacy for you behind the scenes, that means that the read state is wrong for the UI. Update it so that the read state in the database cache is authoritative, and that read state changes will trigger database updates. This seems to fix the unread count/unread message problems.
commit 873fd759fae3c7aa2c87b94adebe8a80e2dadec6
Increase substitution limit to 5k for big games.
commit e84145699f025e45bd9b6939b34c96cde8f6a108
Update pimple drawing to respect range adjustement. Previously the pimples for borderline stars were based on the star owner's true range, without the handicap adjustment. Fix up the drawing to be simpler for star territory so that the range adjustement would be factored out, and then use the refactored range calculation for the pimples too so that the feedback is always right.
commit 7e660570d8d8d63eff4e297bb42d301f929056c3
Add visibility pimples for stars on the border of range/scan. Shrink where the border is a bit so that it clearly excludes stars that are out of scan/fleet range, and then route the border around stars that are close to the border but actually in range. Should make it much clearer what is in or out.
commit da5516cac7f774b5d62285182783b61ea7b9ff64
A first cut at typescript types for scanning_data. The API returns the galaxy wrapped in an object named scanning_data. Provide typescript types for this structure to make it safer to take apart correctly.
commit 5abb84dec993183b18481bb9b885931348a75e28
Fix the QUIT QUIT QUIT bug again. When the early exit was added to avoid merging one's own scan data, it also bypassed the fix for the QUIT QUIT QUIT bug on each merge. Fix it so that the player name reset always happens.
commit b3b9924bed293a7b748278aba437edd086911ae5
Make the time machine move in turn increments. In turn based games, it is annoying to have to step through multiple ticks of "missing data" because of the 8 tick turn increment. Instead read the game configuration and jump around in turn increments so that you can play back the game as you might expect given that there are no intermediate updates.
Osric