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