diff --git a/BGS/Report.cs b/BGS/Report.cs index 1a8fec0..f76efff 100644 --- a/BGS/Report.cs +++ b/BGS/Report.cs @@ -208,8 +208,28 @@ namespace EliteBGS.BGS { foreach (var other in completed.Influences) { string faction = other.Key; if (string.IsNullOrEmpty(faction)) { + OnLog?.Invoke(string.Format( + "Mission \"{0}\" has empty faction name in influence block, "+ + "so this influence support was ignored. " + + "Please check the README on why this happens.", completed.HumanReadableName) + ); continue; } + + /* Now comes the fun part. Sometimes the influence list is empty for a faction. + * This happens if the faction in question + */ + if (other.Value.Count() == 0) { + OnLog?.Invoke(string.Format( + "Mission \"{0}\" gave no influence to \"{1}\", so we assume this is because the " + + "faction is in a conflict and cannot gain influence right now. " + + "If this assessment is wrong, just remove the entry from the objective list.", + completed.HumanReadableName, faction + )); + // Add empty entry + other.Value.Add(current_system_address, ""); + } + foreach (var influences in other.Value) { ulong system_address = influences.Key; ulong accepted_address = 0; diff --git a/EliteBGS.csproj b/EliteBGS.csproj index d1eb9cd..927ed24 100644 --- a/EliteBGS.csproj +++ b/EliteBGS.csproj @@ -202,6 +202,7 @@ Always + diff --git a/README.md b/README.md index c91561a..4a86bf4 100644 --- a/README.md +++ b/README.md @@ -52,8 +52,8 @@ controlled by the faction you specified in the objective. Some missions may show up having zero influence for the given faction. This happens if you do missions for a faction which is currently in an election state. You do not gain influence for -the faction so the influence reads as zero. But contribute towards the election, so the missions -are selected anyway. +the faction so the influence reads as zero. But you contribute towards the election, so the +missions are selected anyway. There is no entry in the journal if you win a combat zone. So you have to add those manually. Select an objective for which you wish to log a combat zone. The faction in the objective, must be the @@ -88,11 +88,15 @@ course edit it, if something is wrong or the tool itself missed something. ## Known Issues and Bugs +### Settlement Vouchers + Settlement vouchers (aka Intel Packages) help every faction aligned with the given superpower. So if you turn in an Imperial intel package on an imperial station, all factions aligned with the Empire will gain a bit of INF boost. The tool currently cannot handle that. All intel packages are displayed instead. +### Bugged bounty vouchers + Sometimes bounty vouchers are not properly recognised. This is a bug in the player journal, where the faction information is not properly written out in the journal: @@ -107,6 +111,8 @@ the faction information is not properly written out in the journal: Since the tool does not know for which faction these bounties were redeemed for, it cannot assign it to an objective. +### Combat Zones + The player journal currently does not make an entry when you win or lose a combat zone. This is a an ommission from FDev: @@ -114,6 +120,8 @@ an ommission from FDev: Please upvote the issue to get it fixed. Until then, you have to add combat zone wins manually. +### On-Foot NPC givers + Also missions accepted from NPCs in Odyssey concourses do not get a player journal entry. This is also an ommission from FDev: @@ -121,10 +129,44 @@ also an ommission from FDev: Until this is fixed, please edit the resulting BGS log text, and manually add such entries. +### Failed vs. Abandoned Missions + The tool also currently cannot differentiate between missions you have abandoned in the transaction tab before it was completed, and those that you have failed - either delibaretly or by time-out. So it will find and add them all, and you simply can remove those that you have abandoned manually. +### Influence given to empty/non-existent faction + +Sometimes the log will state that it gave positive or negative influence to a faction, but the +faction name is empty: + +``` + "FactionEffects": [ + { + "Faction": "", + "Effects": [ + { + "Effect": "$MISSIONUTIL_Interaction_Summary_EP_down;", + "Effect_Localised": "The economic status of $#MinorFaction; has declined in the $#System; system.", + "Trend": "DownBad" + } + ], + "Influence": [ + { + "SystemAddress": 251012319587, + "Trend": "DownBad", + "Influence": "+" + } + ], + "ReputationTrend": "DownBad", + "Reputation": "+" + } +] +``` +This happens for example if you do a scan/heist mission from a surface POI, but no one owns said +surface POI. Randomly generated surface POIs sometimes have no owner, and said non-existant owner +then gets the negative influence. + ## Use EDDB information EliteBGS can download information from EDDB to auto complete system and station names. You can diff --git a/TestData/NoFactionName-AndNoInfluence.txt b/TestData/NoFactionName-AndNoInfluence.txt new file mode 100644 index 0000000..d679ff4 --- /dev/null +++ b/TestData/NoFactionName-AndNoInfluence.txt @@ -0,0 +1,4 @@ +{ "timestamp":"2022-02-24T17:32:03Z", "event":"FSDJump", "StarSystem":"Dewikum", "SystemAddress":9467315955081, "StarPos":[19.37500,-0.28125,-68.93750], "SystemAllegiance":"Independent", "SystemEconomy":"$economy_Refinery;", "SystemEconomy_Localised":"Refinery", "SystemSecondEconomy":"$economy_Extraction;", "SystemSecondEconomy_Localised":"Extraction", "SystemGovernment":"$government_Democracy;", "SystemGovernment_Localised":"Democracy", "SystemSecurity":"$SYSTEM_SECURITY_low;", "SystemSecurity_Localised":"Low Security", "Population":83688, "Body":"Dewikum A", "BodyID":1, "BodyType":"Star", "Powers":[ "Zachary Hudson" ], "PowerplayState":"Exploited", "JumpDist":9.563, "FuelUsed":0.107795, "FuelLevel":26.950878, "Factions":[ { "Name":"LHS 1857 Jet Galactic Systems", "FactionState":"Election", "Government":"Corporate", "Influence":0.098098, "Allegiance":"Federation", "Happiness":"$Faction_HappinessBand2;", "Happiness_Localised":"Happy", "MyReputation":0.000000, "ActiveStates":[ { "State":"Election" } ] }, { "Name":"Social LHS 6103 Confederation", "FactionState":"Election", "Government":"Confederacy", "Influence":0.290290, "Allegiance":"Independent", "Happiness":"$Faction_HappinessBand1;", "Happiness_Localised":"Elated", "MyReputation":41.395901, "ActiveStates":[ { "State":"Boom" }, { "State":"Election" } ] }, { "Name":"Susanoo Jet Fortune Corporation", "FactionState":"Election", "Government":"Corporate", "Influence":0.098098, "Allegiance":"Federation", "Happiness":"$Faction_HappinessBand2;", "Happiness_Localised":"Happy", "MyReputation":0.000000, "ActiveStates":[ { "State":"Election" } ] }, { "Name":"Dewikum League", "FactionState":"None", "Government":"Confederacy", "Influence":0.125125, "Allegiance":"Federation", "Happiness":"$Faction_HappinessBand2;", "Happiness_Localised":"Happy", "MyReputation":0.000000 }, { "Name":"Dewikum Blue Ring", "FactionState":"None", "Government":"Anarchy", "Influence":0.010010, "Allegiance":"Independent", "Happiness":"$Faction_HappinessBand2;", "Happiness_Localised":"Happy", "MyReputation":0.000000 }, { "Name":"Silver Dynamic Limited", "FactionState":"None", "Government":"Corporate", "Influence":0.088088, "Allegiance":"Federation", "Happiness":"$Faction_HappinessBand2;", "Happiness_Localised":"Happy", "MyReputation":0.000000 }, { "Name":"Flotta Stellare", "FactionState":"Election", "Government":"Democracy", "Influence":0.290290, "Allegiance":"Independent", "Happiness":"$Faction_HappinessBand2;", "Happiness_Localised":"Happy", "MyReputation":0.000000, "PendingStates":[ { "State":"Expansion", "Trend":0 } ], "RecoveringStates":[ { "State":"InfrastructureFailure", "Trend":0 } ], "ActiveStates":[ { "State":"CivilUnrest" }, { "State":"Election" } ] } ], "SystemFaction":{ "Name":"Flotta Stellare", "FactionState":"Election" }, "Conflicts":[ { "WarType":"election", "Status":"active", "Faction1":{ "Name":"LHS 1857 Jet Galactic Systems", "Stake":"Barnett Dredging Complex", "WonDays":1 }, "Faction2":{ "Name":"Susanoo Jet Fortune Corporation", "Stake":"Ware Dredging Reserve", "WonDays":0 } }, { "WarType":"election", "Status":"active", "Faction1":{ "Name":"Social LHS 6103 Confederation", "Stake":"Mahto Metallurgic Territory", "WonDays":1 }, "Faction2":{ "Name":"Flotta Stellare", "Stake":"Wyeth Platform", "WonDays":0 } } ] } +{ "timestamp":"2022-02-24T17:56:07Z", "event":"MissionAccepted", "Faction":"Social LHS 6103 Confederation", "Name":"Mission_Hack_BLOPS_Elections", "LocalisedName":"Poll Data Retrieval", "DestinationSystem":"LF 8 +16 41", "Target":"$MissionUtil_Settlement_Target_PostBox;", "Target_Localised":"Hub Access Terminal", "Expiry":"2022-02-26T12:08:34Z", "Wing":false, "Influence":"+", "Reputation":"+", "Reward":508025, "MissionID":849749964 } +{ "timestamp":"2022-02-24T19:11:13Z", "event":"MissionRedirected", "MissionID":849749964, "Name":"Mission_Hack_BLOPS_Elections", "NewDestinationStation":"Wyeth Platform", "NewDestinationSystem":"Dewikum", "OldDestinationStation":"Stephenson Landing +", "OldDestinationSystem":"LF 8 +16 41" } +{ "timestamp":"2022-02-24T19:42:38Z", "event":"MissionCompleted", "Faction":"Social LHS 6103 Confederation", "Name":"Mission_Hack_BLOPS_Elections_name", "MissionID":849749964, "NewDestinationSystem":"Dewikum", "DestinationSystem":"LF 8 +16 41", "Target":"$MissionUtil_Settlement_Target_PostBox;", "Target_Localised":"Hub Access Terminal", "Reward":14266, "FactionEffects":[ { "Faction":"", "Effects":[ { "Effect":"$MISSIONUTIL_Interaction_Summary_EP_down;", "Effect_Localised":"The economic status of $#MinorFaction; has declined in the $#System; system.", "Trend":"DownBad" } ], "Influence":[ { "SystemAddress":251012319587, "Trend":"DownBad", "Influence":"+" } ], "ReputationTrend":"DownBad", "Reputation":"+" }, { "Faction":"Social LHS 6103 Confederation", "Effects":[ ], "Influence":[ ], "ReputationTrend":"UpGood", "Reputation":"+" } ] }