Closed arancaytar closed 4 years ago
Update: As of right now, Aitvas Corp.
(https://inara.cz/galaxy-minorfaction/3057/) in Ngalinn
(https://inara.cz/galaxy-starsystem/14912/) have this state in-game:
but in the system state report, the corresponding presence in the system has presence.FactionState.invariantName
set to an empty value (not None
) and presence.state
set to "None".
This causes the script to not filter out the state (because it checks the first variable) and then read out "a state of None".
I don't know enough to know what is going wrong here.
(Edit: Should add that the "Bust / Blight" double state is visible in-game but Inara only shows "Bust")
I can't figure out why presence.FactionState
is sometimes not set, but replacing presence.FactionState.invariantName
with presence.state
in the condition seems to stop the problem from occurring.
I believe the .invariant
version is a language independent version (although I may be wrong). I also think that the following would be a better method of 'fixing' this:
{if presence.FactionState.invariantName && presence.FactionState.invariantName != "None":
This first checks that the variable isn't empty, so should work for any language.
I've not tested this, so feel free to correct me if I'm wrong. :)
presence.FactionState
is referencing an object with properties invariantName
and localizedName
. invariantName
is the constant English name as @Darkcyde13 stated above while localizedName
can vary with the language setting that EDDI is using. Since presence.FactionState
is an object rather than a string, it cannot be read as a string. presence.state
is a shortcut to presence.FactionState.localizedName
.
The journal reports both an overall faction state and all active faction states. For the purpose of this script, we have chosen to report the overall faction state rather than all faction states. However, it looks like the overall faction state was not set. I'm not sure if it wasn't reported from the player journal or if it was a reported but unrecognized state (since Blight
is a fairly new state that isn't yet supported in the latest released version).
@arancaytar If you can provide the player journal file from the game where you observed this then we can investigate further. The player journal logs are located at [your Saved Games folder]/Frontier Developments/Elite Dangerous
. You can match the Date Modified
for the file to when you reported this 23 days ago. And if you're not sure which file to provide, it's alright to provide several. If you want to find the specific event rather than sending the entire file, we're looking for an entry like "event":"FSDJump"
with "StarSystem":"Ngalinn"
.
@arancaytar Were you able to locate the requested player journal file?
@Darkcyde13 I've submitted a PR to handle this on the back-end (the FactionState object should never be null).
EDDI version in which issue is found
v3.5.2
Steps to reproduce
Expected
No special mention of that faction in the state report
Observed
"The {Faction} is in a state of None"
Investigation
This doesn't seem to happen consistently, and from looking into the script, there does seem to be code that should filter out "None" already. I'll see if I can reliably reproduce it anywhere.