endless-sky icon indicating copy to clipboard operation
endless-sky copied to clipboard

code(feat): Strategic Scan & Targeting information flexibility (makes all tactical & strategic info available individually as well as collectively)

Open Zitchas opened this issue 3 years ago • 101 comments

Feature: This PR implements additional strategic information, accessible by having a scanner with "strategic scan power." This works the same way as Tactical Scan, and also provides the range. By request from Amazinite, this PR now also breaks up all the individual data elements into individually callable attributes, so that an outfit can display just one piece of information, or any collection thereof, and at varying distances.

Feature Details

This feature adds:

  • Calculated gun range (uses the hardpoint location & gun range to calculate the longest ranged gun on the target)
  • Calculated turret range (uses the hardpoint location & turret range to calculate the longest ranged turret on the target)
  • Calculates the targets actual turn speed (includes effects of slowing)
  • Dynamically adjusts the display depending on the outfit configuration to display just tactical display, just strategic, or both.
  • If a ship has just a tactical scanner, it will not have any visual changes compared to continuous prior to this PR.
  • Tactical scan and strategic scan are available as before, both individually and together.
  • Range, Weapon ranges, Turning speed, Fuel, Energy, Thermal, and Crew count can each be accessed individually as stand-alone items.
Removed stuff This PR originally included a bunch of useful debug info on what a ship was doing, personalities in use, etc.

Removed all the debug stuff, which includes the parent ship identifier, parent system, hyperjump status, and personality info. This needs to be refined and/or hidden behind a "debug only" restriction. With some modifications it could be used as in-character info. Example, instead of displaying parent ship, call it the flagship. For flagships, display number of ships in fleet instead of "parent of X"

credit: Thanks to @vitalchip for creating the code that makes this possible. They did the original code, I updated it, added the info repositioning logic/data, and did the artwork. Thanks to Hurleveur for their help working out some change requests and cleaning it up!

Graphics:

  • the new icons are 100% my own creations, not based on anything. The original .xcf, 2x, and normal png can be found in the attached zip file:

Strategic Scan UI elements.zip

UI Screenshots

This shows the info display of a ship that has both tactical and strategic scan power.

Tactical Augmentations_v2

An example of a ship with just a tactical scanner:

Strategic Scan_v4_C(just tactical)

An example of a ship with just a strategic scanner:

Strategic Scan_v4_B(just strategic)

Usage Examples

Someone who prioritizes combat information may want an outfit that just displays range, weapon range, and turning speed. A faction that has ionizing weapons and enjoys combat might want range, weapon range, turning, and ionization. A faction that does a lot of boarding might not want anything except the crew count. The FW, with its preponderance of heat weapons, might be interested in a specialized scanner that just displays range and thermal. The Navy, fighting against ships with flamethrowers, might want a scanner that shows range and fuel. These could also be used to created a cascade of information. For example, in the plug-in I attached to a post farther down, the cascade info scanner will show the player range continuously. At a certain range it'll start showing manouverability info (weapon ranges and turning). Get a bit closer and it'll pick up fuel. Closer yet and it will determine energy, closer still will show thermal, and then when one is practically at the target it will show crew.

Data Usage:

  • "strategic scan power" 10
  • "range finder power" 1 (can be any non-zero value, as range finding is infinite.)
  • "crew scan power" 10
  • "thermal scan power" 10
  • "energy scan power" 10
  • "fuel scan power" 10
  • "weapon scan power" 10
  • "maneuver scan power" 10

This is used as an attribute on any ship or outfit, in the same exact manner as Tactical Scan.

The display position for all these information values and their associated icon is included in interfaces.txt, which means that a player can reposition any of these individually or collectively to anywhere on the screen at their discretion.

Testing Done

Played the game and checked to see if the information appeared.

Automated Tests Added

No idea if this needs a test, but it's displaying info, not an action something can do, so I don't think so?

Performance Impact

I don't think there should be any noticeable impact, but I have no idea how to check.

Artwork Checklist

  • [X] I updated the copyright attributions, or decline to claim copyright of any assets produced or modified
  • [X] I created a PR to the endless-sky-assets repo with the necessary image, blend, and texture assets: https://github.com/endless-sky/endless-sky-assets/pull/124
  • [X] I created a PR to the endless-sky-high-dpi repo with the @2x versions of these art assets: https://github.com/endless-sky/endless-sky-high-dpi/pull/349

Zitchas avatar Jan 21 '23 18:01 Zitchas

I think that some of this information should be restricted to debug mode only, like the personality and parent of the ship All of this, actually:
image

Hurleveur avatar Jan 21 '23 19:01 Hurleveur

Screenshot 2023-01-21 at 2 00 11 PM

I am not too sure about the placement here, this looks crowded

RisingLeaf avatar Jan 21 '23 22:01 RisingLeaf

also, you probably want to open a PR to assets

RisingLeaf avatar Jan 21 '23 22:01 RisingLeaf

I will. And high-dpi too. I just wanted to get this through the first round of fixes and people getting eyes on it.

Zitchas avatar Jan 21 '23 22:01 Zitchas

I suggest choosing between expanding the information provided in the tactical display and providing details about a ship and its behaviour for debugging purposes for this PR.

While I like the debugging stuff, I'm not a huge fan of this specific implementation, and the way I would do it involves changing almost every single line relating to it.

warp-core avatar Jan 22 '23 01:01 warp-core

Gun range, turret range, [...] are relevant to everyone engaged in combat.

I kinda disagree, because that information is not actionable at all due to how ES combat works.

quyykk avatar Jan 22 '23 14:01 quyykk

Gun range, turret range, [...] are relevant to everyone engaged in combat.

I kinda disagree, because that information is not actionable at all due to how ES combat works.

That's fair, and I disagree, but that's also a problem that I hope we're trying to fix. If something so basic as the range of your opponent's weapons doesn't factor into one's decisions at all... That's a problem.

That being said, that's also why this is a part of the tactical scanner display. People who have no use for information like heat, energy, ranges, or turn speed.... Well, they can just not install the outfit. There's zero mission requirements for a tactical scanner, so they'll never be forced to have one.

On the flip side, for mission NPCs, I can often come back to a battle, or change my loadout nextime. If someone has twenty blasters or heavy lasers on their ship, I can use particle cannons or missiles. If someone uses a lot of guns but has not-great turning, I can build my ship for manouverability and stay out from in front of them.

I agree that revealing this information isn't going to miraculously make combat into a varied and flexible environment. But it does put more information in the hands of players at the point of combat, and reduces the need for them to consult with wikis or memorize data.

Common change it makes for me in combat: I have fairly long range weapons (Particle Waveform Turrets). Knowing the rang of my enemy's weapon systems informs me as to how much care and attention I need to pay to ranging. If they're fairly slow with a lot of heavy lasers; then I've got a clear range advantage and I can play around a bit. If they're packing things that can reach out to 800+, then I'm going to have to carefully manouver and anticipate that they'll start hitting me before I can hit them, just due to the size of my ship and the turret placement.

Zitchas avatar Jan 22 '23 15:01 Zitchas

No information is actionable in current ES combat >:(

Ferociousfeind avatar Jan 25 '23 05:01 Ferociousfeind

If we don't do anything ES combat will stay the same. I really hope these informations will be useful in the future though. ~~Also it'll make more people notice the problem and complain about it to pressure devs to actually do something.~~

1010todd avatar Jan 25 '23 05:01 1010todd

Unfortunately, our best solutions involve revamping most of ES combat, involving basically every sector of gameplay. And, most crucially, no single change alone is beneficial to the game. They all kind of hurt it unless taken all together at once. Which is hell on reviewers trying to see the hypothetical PR all at once.

Ferociousfeind avatar Jan 25 '23 06:01 Ferociousfeind

No information is actionable in current ES combat >:(

While I appreciate the sentiment, this isn't the time or place to solve all of EndlessSky's combat related problems. This is only intended to provide the player (and perhaps just as importantly, the developers) with the tools to understand what is happening in-game an thus inform our thoughts in regards to revamping the game.

Now, to track down the errors and hopefully make some improvements to this...

Zitchas avatar Jan 27 '23 12:01 Zitchas

I don't think we should be adding more information to the tactical scanner. For information like range and turn rate, I think that that is information that a player should gain with experience. That is, after playing for some time, you should recognize which ships are fast and slow, which ships have guns or turrets, and the distance at which different weapons can hit. Adding that information to the tac scanner removes those advantages gained by experience.

From the experience angle, it makes sense that the tac scanner would display fuel, energy, heat, and crew levels. While from experience you might know roughly how much crew a ship can have or how much fuel it carries or how much energy or heat damage it can take before becoming disabled, without the tactical scanner, you can never know the exact values that a ship has at any given moment just through experience. The tactical scanner provides information that would otherwise be unknowable.

As for the rest of the information, I think this makes more sense as a "debug scanner" mechanic than an extension to the tactical scanner's capabilities. It's not uncommon that we see a ship doing something strange and we don't understand why. Having an extra scanner used only for dev purposes that provides more information like this could be helpful.

Amazinite avatar Feb 04 '23 22:02 Amazinite

Respectfully, I disagree: Heat: The player is equally capable of knowing how much heat a ship can take as they can the range. Actually, more so: Heat capacity is largely determined by the ship's total mass, which is unchanging. While the rate at which a ship can cool itself down may vary; there's not a lot of outfits in each area for doing so, and ship variants don't really seem to have much variation here. Granted, this is situationally very useful if the player is specifically trying to overheat a target, but that's not a universal strategy.

Range: In contrast, its weapon range can be anything from 350 to... just glancing at the chart... 89k, apparently, for the new "Fate Sealer". Of guns the player is likely to be able to use, however, they top out at 2.6k. There's at least ten different potential guns in human space alone. Given that we have ship variants whose purpose is explicitly to add variety to loadouts, we can expect to see most of those guns & secondaries on most ships that will fit them. (Some exceptions, but very few. No tech in human space seems too restricted to have it eventually make its way into the hands of pirates and merchants, eventually.) As such, I think it is unfair currently, and increasingly unfair as the game content expands and we have more variants, to expect the player to somehow magically "know" what range any particular ship might have. The very point of variants is to add variety so that ships aren't memorizeable, so we aren't just automatically going "Oh, that's a ship X, it always uses Y gun". Even for turrets, which the player theoretically could fly in and get a good look at and maybe be able to identify at a glance, the same extreme variety of ranges holds true. Not to mention the fact that we'll usually be shot at when doing that, so it basically falls into the category of "in order to identify what gun it is, get shot by it." To top it off, the main method of finding out what guns or turrets a ship is using used to be doing outfit scans. That was hard to do before, and it's been made harder and effectively shorter range, so the options for figuring out what a ship's longest range gun or turret are have been made significantly harder.

Crew: The same holds true for crew count: It is very easy to find out what the required crew and bunk count for a ship is. Baring a few extreme cases such as the Ground Assault variant, the max crew count almost never varies at all, and the required crew by less than the total number of turrets. That's typically <10. Then there's the fact that we're actively trying to discourage capturing as a regular mechanic. I don't have the hate for capturing that some people in our community do, but the opinion that capturing is a bit too powerful a way to race up the ship ladder is a fairly wide one. So on the one hand, crew count is completely useless for tactical ship to ship combat (we have no weapons that affect crew count, and no ship ever spawns with less than required crew, so the amount of crew an enemy ship has never affects ship to ship combat. Ever. On the other hand, providing that crew count makes picking and choosing capture targets easier, when the community is fairly solidly in agreement that we don't want capturing to be easier.

Turning Speed: This is a straightforward ship analysis of the target's performance. The sort of information that we'd expect to be able to ask our tactical officer on many a sci-fi TV show or book. It's also valuable info for helping someone decide what sort of tactic to use in a battle. This one also has the interesting aspect that it reveals if a ship is actually being affected by slowing effects, as one can watch the turn speed change as it builds up.


All of these pieces of information are things that the player can find out in battle. Whether it is boarding the target to find out how much crew they have (and doing so is a risk free activity, so a tactical scanner's count doesn't protect them or anything); or engaging with them to see how long a range their guns are or how fast they turn; or even just shooting them with a flamethrower to see how long it takes them to overheat.

Question: So the question becomes "What is the purpose of the tactical scanner?"

Right now, the tactical scanner is five things:

  • The tool by which players pick their capture targets.
  • The temperature gauge to monitor how fast a ship is overheating.
  • The power gauge to see how a ship's power supply is holding up against ionization.
  • The rangefinder to see how far it is to the target.
  • There's also the fuel guage. I guess when we're hunting a target, we could follow it along its jumps until it runs out of fuel before ambushing it?

Interesting to note that two of these, overheating and capturing, are both things deemed "OP" and in need of nerfing.

So right now, the tactical scanner isn't a tool to enable tactics, but rather a patience meter to give people feedback on whether or not their heat or ionization based damage is having an impact and/or a measure to judge how long until it disables the target. While this is useful information, it's hardly something that enables tactical combat, especially since we don't really have a choice: We're engaging already by the time we get this info in most cases, and we often don't get the chance to leave and switch loadouts if there isn't someone suitable for us to target. (And then there's the fact that pretty much everyone is vulnerable to heat, so there's really no "picking the best target" for flamethrowers...)

In the current system, players can get no tactical information prior to engaging the enemy, and thus the predominant "tactic" is "Buy biggest ship, fit with biggest guns and shield regenerators, and charge in to brawl." The AI does this, the players do it, the main variation is "how many ships does one bring with you into the fight."

My proposed change enables this to become a tool that allows players to make intelligent choices about how they approach a fight before they are in the fight. Should they stay back and use missiles? Can they close and circle out of the line of fire of its guns? Do they have guns that outrange their enemy? These are things that change a player's tactical choices and approaches, and encourages gameplay that enables those choices by allowing players that choose to do so the ability to see at least some cursory information that they can use to infer other information and respond accordingly.

Enabling tactical choice helps players break out of the "there is no combat but the deathball" mentality that currently plagues ES.


I think our gameplay experience is best served by allowing experience to learn more specific information in-situ, and thus focus on figuring out how to handle a specific threat; rather than be caught up in the minutia of memorizing every possible weapon combination of every ship. This isn't devaluing veteran knowledge, it is enabling people to learn about their opponents. If all our NPCs flew stock ships, then this wouldn't be an issue. After fighting a ship, they have only to look at the shipyard, find that ship, and see that those weapons were X and thus that ship will always have an engagement distance of Y. Since this isn't the case, our veteran knowledge is safe in that our actual strength lies in the countless hours of flight time, flight skill, and tactical operations rather than just simply memorizing variant builds. I think that should be enough.


As for the fleet information, hyperjump status, and personalities... I agree. Having a preference setting for revealing that info would be good. Or an advanced tactical info thing or something. Fleet information and hyperjump status are both things that could realistically be expected to be broadcast by transponders and/or figured out by sensitive scanners. The Personalities, though... Yeah, that's pure debugging, and I'd love to hide that via preference. (I'd be willing to hide all three of these things behind a preference, but I haven't figure out how to do that yet)

Zitchas avatar Feb 05 '23 04:02 Zitchas

I think it makes sense for tactical scanners in general to have this, especially thinking of the Unfettered Value Detector that should display this kind of info, since the point is to find easy targets for raiding.

Hurleveur avatar Feb 05 '23 17:02 Hurleveur

Just in case anyone is wondering what's changed:

  • All the debug info (the stuff that was below the ship name/faction) has been removed
  • Two variables moved to being private
  • Improved logic
  • Fixed a bug where the ranges weren't updating properly
  • Cleaned up a bunch of stylization stuff
  • Various fixes and optimization

Thank you to Hurleveur for taking the time to walk me through the changes and help me figure out how to make the changes and explain why they were necessary. It is very much appreciated.

Zitchas avatar Feb 05 '23 17:02 Zitchas

Tactical Info Updated Final_v3

In response to feedback, I've adjusted the layout. The Range (which is the only piece of data that isn't limited by the range of the outfit) has been moved to the top left. Gun and Turret range have move up to the top row, and turn speed has been move up adjacent to the target circle, where it is fit in around the circle like the other pieces of tactical info.

I tested by equipping my testbed palavret with some extremely long range weaponry to see how the values fit, and they fit quite nicely. I'm quite happy with this now.

Thanks to everyone who provided suggestions!

Zitchas avatar Feb 13 '23 18:02 Zitchas

That looks stunning, and not out of place at all, good job!

Hurleveur avatar Feb 13 '23 18:02 Hurleveur

I am against this info being added to the tactical scanner.

Information such as: Range Target Gun Range Target Turret Range Target Turn Radius

Is all information that can be effectively intuited by interacting with the ship in question or via experience, adding it to the UI is therefore, effectively, a quality of life feature.

Locking a quality of life feature behind an outfit doesn't seem like a sensible course of action to me. I am aware that range is currently locked behind a tactical scanner, but I would prefer all of this information, range included, be easily accessible to everyone via a UI toggle rather than being locked behind an outfit.

This allows newer players who lack the experience required to intuit these values easy access to them simply via toggling it on in the UI rather than needing to find and install an outfit just to get access to the same information veteran players have by default and helps to prevent newer players from being overwhelmed by information they don't understand and can't effectively make use of as soon as they install a tactical scanner by splitting it into two smaller, easier to understand chunks.

Veteran players who don't need this information on the UI can then disable it to reduce visual clutter while maintaining the ability to see information they otherwise have no way of knowing, such as fuel or energy.

Tactical scanner can continue providing Fuel, Energy, Heat and Crew Count, allowing the player access to additional information they otherwise are unable to get while in flight, at the expense of some outfit space.

Hecter94 avatar Feb 14 '23 16:02 Hecter94

I agree with you on the range-to-target. If more people voice their opinion in agreeing with that, I would be happy to move the "range to target" statistic out of the tactical scanner and make it just an "always visible" piece of info.

The rest, I have to disagree on. Knowing how close I can get before someone shoots me... That's not quality of life, that's a critical life-safety. Likewise, there's no good reason that ships should universally be able to identify range or turn speed of a target. That's detailed analysis that should be paid for, not just a given.

Lastly... This isn't an overwhelming amount of data here. It's adding two static numbers, and one that will vary only if the target gets shot with slowing. You guessed them correctly just based on a little screenshot in very little time. I'd expect that most players could either succesfully guess them or figure them out in very short order just by scanning different ships around them.

Beyond that, @samrocketman has expressed an interest in making Flight UI tooltips, which would enable us to clearly label and describe each and every one of these so that there is zero confusion or guessing about what they mean.

And lastly - if we're really concerned about limiting the tactical display to stuff that a new player (who probably doesn't have one anyway) can use, then our best course of action would be to remove crew, energy, and heat. Ranges are relevant to everyone, so is how fast your target can turn. That's core combat data. It's these other three (crew, energy, and heat) that are 100% useless to most combat. Crew in particular is never relevant to combat, ever. It's got no business being in a tactical display at all.

That being said, if we could combine things, I'd say that crew count should show up on the Outfit or Cargo scan panel when one does one of those scans - but only if they have a tactical scanner. Likewise, it'd be interesting if gun range and turret range only showed up on the tactical display if one also had an outfit scanner. So having just a tactical scan gives some info, having a tactical scan backed up by an outfit scanner gives more info. That'd be awesome, but not something this PR can do.

Zitchas avatar Feb 14 '23 17:02 Zitchas

@Amazinite doesn't like having additional information included in the tactical scan, so this PR has split out all the new information into a new scan type, called "maneuver scan power". This works identically to tactical scan power, but displays a different set of data. The two are compatible with each other, so one can have both tactical and maneuver scan, or just either one of them. I hope this satisfies them.

As such, new players and people who have just a tactical scanner will see no change in the amount of data they are provided, and thus shouldn't be overwhelmed; while making this tactically useful information available to those who wish to do so.

~~It does implement the maneuver scan power on the Salvage Scanner so that it is immediately accessible.~~

Zitchas avatar Feb 14 '23 20:02 Zitchas

The change to the Salvage Scanner has been removed, and will be included in the follow-up Remnant Scanner Fix, which is hoped to include in the upcoming release.

Zitchas avatar Feb 14 '23 20:02 Zitchas

What happened to Range? I'm all for it being visible w/o a special outfit, as it's quite a critical data point (and getting killed because you're a beginner and don't know the enemy ship's range is just an ANNOYANCE)

Zireael07 avatar Feb 15 '23 10:02 Zireael07

You should not just have access to that kind of information all the time? If you scanned the enemy it can make sense, but otherwise how would you know that? Eventually I think we should have a focus mode that would show you a zoom on the enemy ship, and with visible gunports you'd be able to see the weapons they're using, for instance. But the goal of this PR never was to add that info by default

Hurleveur avatar Feb 15 '23 11:02 Hurleveur

Good idea with the focus/zoom thing.

Zireael07 avatar Feb 15 '23 11:02 Zireael07

What happened to Range? I'm all for it being visible w/o a special outfit, as it's quite a critical data point (and getting killed because you're a beginner and don't know the enemy ship's range is just an ANNOYANCE)

I'm not sure which range you are referring to, but they're still there. The existing range from you to your target has been moved to the left hand side of the targeting reticule, as it is the one piece of data that tactical scan provides all the time, regardless of distance. The gun range and turret range are both on the right hand side, but are revealed using the "maneuver scan power" instead of the "tactical scan power".

They're all still there, though, just slightly different placement and means of access

Zitchas avatar Feb 15 '23 13:02 Zitchas

I was referring to their max range. Finding THAT out currently usually takes trial and error, often including dying

Zireael07 avatar Feb 15 '23 19:02 Zireael07

I guess you'll be using a Value Detector or Salvage Scanner, then!

Hurleveur avatar Feb 15 '23 20:02 Hurleveur

For the removal of consts its because GetArmament is not const, and is called upon to be modified (so we cant just make it const) so its either this or a const cast or a new method, the way I see it. However, GetAICache could be made const easily

Now that you mention it, a new method that would be const and making getaicache const sounds like the best option

Hurleveur avatar Feb 15 '23 21:02 Hurleveur

Just a thought, but instead of displaying a set of numbers for range (which kind of blur together for me honestly), what if maneuver scan instead added visuals to the radar? Something like arrows instead of dots to display ship orientation, with thin rings for weapons ranges and whatnot.

Though some of that, like directional arrows, might be better off as the default for the radar.

Azure3141 avatar Feb 16 '23 05:02 Azure3141

@Azure3141 maybe for a follow-up PR?

Zireael07 avatar Feb 16 '23 09:02 Zireael07