-
Notifications
You must be signed in to change notification settings - Fork 121
Added guide page on system security status #271
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
Open
Nohus
wants to merge
1
commit into
main
Choose a base branch
from
security-status
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+64
−1
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # System Security | ||
|
|
||
| You can find the security status of any solar system in [SDE](../services/static-data/index.md)'s `mapSolarSystems.jsonl` file. | ||
| It is under the `securityStatus` field, which is a floating point value given with full precision, usually 6 decimal places. | ||
|
|
||
| Not to be confused with the `securityClass` field, which is a string value with unknown meaning. | ||
|
|
||
| In-game, the security status (also known as security level) is shown with 1 decimal place precision, from -1.0 to 1.0. In the SDE, it is given with full precision and needs to be rounded to 1 decimal place to match the in-game display. | ||
|
|
||
| ## Rounding | ||
|
|
||
| Security status rounding follows normal rounding rules, with one exception: | ||
| if the security status is in the range $0.0 < x < 0.05$, it is rounded to 0.1, instead of 0.0. In other words, if the security status is positive, however slightly, the rounded result will always be at least 0.1. | ||
|
|
||
| <h3>Example</h3> | ||
|
|
||
| --8<-- "snippets/formulae/security-status-rounding.md" | ||
|
|
||
| ## Security Class | ||
|
|
||
| Various game mechanics rely on the security class of a system, which can be one of the following: | ||
|
|
||
| - High Security (high-sec), where the security status is $x ≥ 0.45$, or the rounded security status is $x ≥ 0.5$ | ||
| - Low Security (low-sec), where the security status is $0.0 < x < 0.45$, or the rounded security status is $0.1 ≤ x ≤ 0.4$ | ||
| - Null Security (null-sec), where the security status is $x ≤ 0.0$, or the rounded security status is $x ≤ 0.0$ | ||
|
|
||
| <h3>Example</h3> | ||
|
|
||
| --8<-- "snippets/formulae/security-class.md" | ||
|
|
||
| ## Security Status Colors | ||
|
|
||
| In-game, the security status is often colored according to the following table: | ||
|
|
||
| | Color | Color hex code | Security status | | ||
| |------------------------------------------------------|----------------|-----------------| | ||
| | <div style="height:20px; background:#2C75E1;"></div> | #2C75E1 | ≥ 1.0 | | ||
| | <div style="height:20px; background:#399AEB;"></div> | #399AEB | ≥ 0.9 | | ||
| | <div style="height:20px; background:#4ECEF8;"></div> | #4ECEF8 | ≥ 0.8 | | ||
| | <div style="height:20px; background:#60DBA3;"></div> | #60DBA3 | ≥ 0.7 | | ||
| | <div style="height:20px; background:#71E754;"></div> | #71E754 | ≥ 0.6 | | ||
| | <div style="height:20px; background:#F5FF83;"></div> | #F5FF83 | ≥ 0.5 | | ||
| | <div style="height:20px; background:#DC6C06;"></div> | #DC6C06 | ≥ 0.4 | | ||
| | <div style="height:20px; background:#CE440F;"></div> | #CE440F | ≥ 0.3 | | ||
| | <div style="height:20px; background:#BB1116;"></div> | #BB1116 | ≥ 0.2 | | ||
| | <div style="height:20px; background:#731F1F;"></div> | #731F1F | ≥ 0.1 | | ||
| | <div style="height:20px; background:#8D3163;"></div> | #8D3163 | else | | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| enum class SecurityClass { | ||
| HighSec, LowSec, NullSec | ||
| } | ||
|
|
||
| fun Double.getSecurityClass() = when { | ||
| this >= 0.45 -> SecurityClass.HighSec | ||
| this > 0.0 -> SecurityClass.LowSec | ||
| else -> SecurityClass.NullSec | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import kotlin.math.roundToInt | ||
|
|
||
| fun Double.roundSecurity() = when { | ||
| this == 0.0 -> 0.0 | ||
| this in 0.0..0.05 -> (this * 10 + 0.5).roundToInt() / 10.0 | ||
| else -> (this * 10).roundToInt() / 10.0 | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If anyone knows what this value means, do shout.
Some people were fruitlessly wondering here: https://forums.eveonline.com/t/what-is-security-class-of-a-system/362759
I have a suspicion it means nothing in the current version of the game, and maybe should get removed from the SDE to avoid confusion.