Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show the system security (lawlessness) in the map sector view #5654

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JonBooth78
Copy link
Contributor

In the sector view add a security indication for the system being looked at:

image

I've arbitrarily decided on 7 different security levels and English translations for them, a color scheme and a warning icon for some levels, using a blank icon for safe systems as I couldn't find something I like. I don't know if we need one?

Note: this lawlessness doesn't do much in the current iteration of the code. Happy to roll this into a bigger PR when I've added more that hooks into it but feel there is enough here for a discussion.

@impaktor
Copy link
Member

I was surprised (a while back) to find we didn't already have this indicator, perhaps I'm thinking of OldUI or maybe even original Frontier. Either way, happy to see this.

a color scheme and a warning icon for some levels, using a blank icon for safe systems as I couldn't find something I like. I don't know if we need one?

Ping @nozmajner

@bszlrd
Copy link
Contributor

bszlrd commented Oct 31, 2023

How about these icons?
image
Most are from the wpzoom set we already use, some changed or used as a base.
The "Mostly harmless" level is a towel, to take the Hitchhikers Guide reference a bit further.
The skull is the already existing one, could be reused. The triangle exclamation mark is based on the already existing one, but the triangle is flipped, so it is a new icon (and we have six free places around the end of the svg, so if there's six new one, they'd fit nicely.

@JonBooth78
Copy link
Contributor Author

Nice @nozmajner. I might already have picked that skull one for 'Deadly' :-)

Are we happy with 7 levels reported to the user (I'm just mapping the 0-1 numeric value), so we could have more or less depending on our preferences.

@Web-eWorks
Copy link
Member

I think 7 levels is a little much, especially given the lack of distinct verbs to refer to them. I'd prefer 5 - Safe, Mostly Harmless, Dangerous, Very Dangerous, Deadly.

@Zireael07
Copy link

I think you meant nouns, @Web-eWorks

@impaktor
Copy link
Member

impaktor commented Nov 1, 2023

I'd even argue 3 is sufficient, but we really do need "Mostly Harmless", and then we probably need one below, and 3 above that level.

@bszlrd
Copy link
Contributor

bszlrd commented Nov 1, 2023

Five seems a bit simpler, yeah. I've put them to the empty space in the svg:
icons.svg
image
I've included all five, so it is straightforward to change if we want to differentiate the skulls later

I did not update the theme file to add them though.

@JonBooth78
Copy link
Contributor Author

@Web-eWorks or others, how does the asset conditioning pipeline work to import a new icons.svg? I'm probably missing something but I can't see an obvious way to import it.

@Web-eWorks
Copy link
Member

how does the asset conditioning pipeline work to import a new icons.svg? I'm probably missing something but I can't see an obvious way to import it.

Edit in Inkscape / etc., save as .svg format, overwrite existing icons.svg. The file is loaded as-is and rasterized on startup. Icon name->index mappings are declared in pigui/themes/default.lua.

@JonBooth78
Copy link
Contributor Author

Ahh, thanks, I searched for icons.svg and couldn't find it. Was searching the user folder, not the source tree. duh. Apologies.

@Web-eWorks Web-eWorks self-requested a review November 12, 2023 05:48
Copy link
Member

@Web-eWorks Web-eWorks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After playtesting this, I have some fundamental objections to the effect of this PR. A system like Wolf 359 shows as "very dangerous", even though it's quite literally a star and a single orbital spacestation, with no in-universe reason for a significant enough amount of pirate traffic to threaten a player who might be in a kitted-out AC33.

The way the danger rating is currently communicated to the player feels very "meta", as if it's an out-of-context message to the player directly about whether they will, with their current ship/loadout, survive jumping to that system or spending a significant amount of time there.

I don't think the single lawlessness variable for a system is necessarily a good fit for what's being proposed - the [safe ... deadly] range is a better fit for a more direct indicator of hostile (e.g. pirate or aggressive faction) presence or spawn chance, and I think a "security rating" number more akin to EVE Online's security system might do a better job at expressing the concept of lawlessness in a way that isn't confusing to the player.

The lawlessness of a system shouldn't be a direct indicator of pirate presence - e.g. we don't want to always spawn a pirate megabase in every single 1.0 lawlessness system - but rather an indicator of how well the system is patrolled or secured by the faction who nominally "owns" it. I think a separate factor - possibly derived from the faction system but still influenced at some level by lawlessness - should be introduced to more directly control the spawn chance of hostile encounters and that factor would be a much better fit for this style of "danger indicator".

It'd also be very confusing for a player to see a system marked Very Dangerous or Deadly still have a bunch of civilian trade ships flying around completely unmolested.

In sum, my feedback is I like the idea, but as currently implemented it communicates a clear and present danger to the player ("you will die") for even being in the system, rather than a warning indicator that they're "on their own" if they are unlucky enough to encounter hostile elements.

@@ -123,6 +126,22 @@ local function calc_star_dist(star)
return dist
end

local function rate_lawlessness(system)
if system.lawlessness < 1.0/5.0 then
return icons.security_shield, lc.SYSTEM_SECURITY_1, sytleColors.success_500
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using colors in this context, we prefer to create semantic component-specific aliases rather than use the style colors directly, e.g. theme.colors.systemSecurity_1. Also, you imported the variable as sytle, which will break Ctrl+F for usages.

Our semantic color system is loosely based on this article if you're interested in further reading (...or updating the developer docs to cover the topic of UI programming).

@impaktor
Copy link
Member

I haven't tried it, but the critique sounds relevant to me: if a system is dangerous player expects there to be danger.

(perhaps relevant, but I have a branch that adds pirate system)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants