From 4750684d144710d2a6eec3ae2015f8504b829b1d Mon Sep 17 00:00:00 2001 From: Nohus Date: Mon, 2 Feb 2026 18:22:40 +0000 Subject: [PATCH] Added guide page on system security status --- docs/guides/system-security.md | 47 +++++++++++++++++++ docs/services/static-data/index.md | 2 +- snippets/formulae/security-class.kt | 9 ++++ snippets/formulae/security-status-rounding.kt | 7 +++ 4 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 docs/guides/system-security.md create mode 100644 snippets/formulae/security-class.kt create mode 100644 snippets/formulae/security-status-rounding.kt diff --git a/docs/guides/system-security.md b/docs/guides/system-security.md new file mode 100644 index 0000000..0cb7559 --- /dev/null +++ b/docs/guides/system-security.md @@ -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. + +

Example

+ +--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$ + +

Example

+ +--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 | +|------------------------------------------------------|----------------|-----------------| +|
| #2C75E1 | ≥ 1.0 | +|
| #399AEB | ≥ 0.9 | +|
| #4ECEF8 | ≥ 0.8 | +|
| #60DBA3 | ≥ 0.7 | +|
| #71E754 | ≥ 0.6 | +|
| #F5FF83 | ≥ 0.5 | +|
| #DC6C06 | ≥ 0.4 | +|
| #CE440F | ≥ 0.3 | +|
| #BB1116 | ≥ 0.2 | +|
| #731F1F | ≥ 0.1 | +|
| #8D3163 | else | diff --git a/docs/services/static-data/index.md b/docs/services/static-data/index.md index bf7a6b3..03169c8 100644 --- a/docs/services/static-data/index.md +++ b/docs/services/static-data/index.md @@ -103,5 +103,5 @@ Formatting uses the same rules above. ## Security Office -The SDE lists stations having a Security Office; however, only the ones in Lowsec-located CONCORD / DED stations are available to you. +The SDE lists stations having a Security Office; however, only the ones in [Lowsec](../../guides/system-security.md)-located CONCORD / DED stations are available to you. diff --git a/snippets/formulae/security-class.kt b/snippets/formulae/security-class.kt new file mode 100644 index 0000000..c420f04 --- /dev/null +++ b/snippets/formulae/security-class.kt @@ -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 +} diff --git a/snippets/formulae/security-status-rounding.kt b/snippets/formulae/security-status-rounding.kt new file mode 100644 index 0000000..c117ff4 --- /dev/null +++ b/snippets/formulae/security-status-rounding.kt @@ -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 +}