Compare commits
4 Commits
fbd5a66156
...
32e5898b02
Author | SHA1 | Date | |
---|---|---|---|
32e5898b02 | |||
34934c82a6 | |||
5a8ea2940c | |||
a13a708c22 |
@ -16,6 +16,22 @@ the game:
|
||||
}
|
||||
```
|
||||
|
||||
## Bounty vouchers show up twice
|
||||
|
||||
Sometimes bounty vouchers are redeemed twice. This happens because FDev writes out two
|
||||
`RedeemVoucher` entries with the same values:
|
||||
|
||||
```
|
||||
{ "timestamp":"2022-11-20T14:30:30Z", "event":"RedeemVoucher", "Type":"bounty", "Amount":3197549,
|
||||
"Factions":[ { "Faction":"Nova Paresa", "Amount":3197549 } ] }
|
||||
{ "timestamp":"2022-11-20T14:30:34Z", "event":"RedeemVoucher", "Type":"bounty", "Amount":4785831,
|
||||
"Factions":[ { "Faction":"", "Amount":723175 }, { "Faction":"Nova Paresa", "Amount":3197549 }, { "Faction":"Prismatic Imperium", "Amount":4062656 } ] }
|
||||
```
|
||||
|
||||
Two separate events (apart by four seconds) containing the same entries twice. This
|
||||
happens when you turn in one bounty manually, and then click the "redeem all" button
|
||||
again, which contains the already turned in vouchers.
|
||||
|
||||
## Combat zones
|
||||
|
||||
Combat zones receive no mention within the player journal whatsoever. There is no event
|
||||
|
2
EDPlayerJournalTests/DoubleVouchers.txt
Normal file
2
EDPlayerJournalTests/DoubleVouchers.txt
Normal file
@ -0,0 +1,2 @@
|
||||
{ "timestamp":"2022-11-20T14:30:30Z", "event":"RedeemVoucher", "Type":"bounty", "Amount":3197549, "Factions":[ { "Faction":"Nova Paresa", "Amount":3197549 } ] }
|
||||
{ "timestamp":"2022-11-20T14:30:34Z", "event":"RedeemVoucher", "Type":"bounty", "Amount":4785831, "Factions":[ { "Faction":"", "Amount":723175 }, { "Faction":"Nova Paresa", "Amount":3197549 }, { "Faction":"Prismatic Imperium", "Amount":4062656 } ] }
|
6
EDPlayerJournalTests/ThargoidKillsAndBonds.txt
Normal file
6
EDPlayerJournalTests/ThargoidKillsAndBonds.txt
Normal file
@ -0,0 +1,6 @@
|
||||
{ "timestamp":"2022-11-25T10:10:43Z", "event":"FSDJump", "Taxi":false, "Multicrew":false, "StarSystem":"Nyalayan", "SystemAddress":1458309042898, "StarPos":[29.71875,-172.71875,-6.46875], "SystemAllegiance":"Independent", "SystemEconomy":"$economy_Agri;", "SystemEconomy_Localised":"Agriculture", "SystemSecondEconomy":"$economy_Refinery;", "SystemSecondEconomy_Localised":"Refinery", "SystemGovernment":"$government_Theocracy;", "SystemGovernment_Localised":"Theocracy", "SystemSecurity":"$SYSTEM_SECURITY_medium;", "SystemSecurity_Localised":"Medium Security", "Population":1920608781, "Body":"Nyalayan A", "BodyID":1, "BodyType":"Star", "JumpDist":7.769, "FuelUsed":0.142448, "FuelLevel":15.857553, "Factions":[ { "Name":"Nyalayan Imperial Society", "FactionState":"Election", "Government":"Patronage", "Influence":0.165138, "Allegiance":"Empire", "Happiness":"$Faction_HappinessBand2;", "Happiness_Localised":"Happy", "MyReputation":17.496799, "ActiveStates":[ { "State":"Election" } ] }, { "Name":"Reret Emperor's Grace", "FactionState":"War", "Government":"Patronage", "Influence":0.257900, "Allegiance":"Empire", "Happiness":"$Faction_HappinessBand2;", "Happiness_Localised":"Happy", "MyReputation":100.000000, "ActiveStates":[ { "State":"Expansion" }, { "State":"War" } ] }, { "Name":"Nyalayan Silver Transport Org", "FactionState":"None", "Government":"Corporate", "Influence":0.076453, "Allegiance":"Empire", "Happiness":"$Faction_HappinessBand2;", "Happiness_Localised":"Happy", "MyReputation":81.875000 }, { "Name":"Nyalayan Power & Co", "FactionState":"None", "Government":"Corporate", "Influence":0.060143, "Allegiance":"Independent", "Happiness":"$Faction_HappinessBand2;", "Happiness_Localised":"Happy", "MyReputation":23.173201 }, { "Name":"Amanogawa Enlight", "FactionState":"War", "Government":"Theocracy", "Influence":0.257900, "Allegiance":"Independent", "Happiness":"$Faction_HappinessBand2;", "Happiness_Localised":"Happy", "MyReputation":-1.210600, "ActiveStates":[ { "State":"Expansion" }, { "State":"War" } ] }, { "Name":"Nyalayan Crimson Dragons", "FactionState":"None", "Government":"Anarchy", "Influence":0.017329, "Allegiance":"Independent", "Happiness":"$Faction_HappinessBand2;", "Happiness_Localised":"Happy", "MyReputation":-13.530000 }, { "Name":"Traditional Nyalayan Front", "FactionState":"Election", "Government":"Dictatorship", "Influence":0.165138, "Allegiance":"Independent", "Happiness":"$Faction_HappinessBand2;", "Happiness_Localised":"Happy", "MyReputation":64.699997, "ActiveStates":[ { "State":"Election" } ] } ], "SystemFaction":{ "Name":"Amanogawa Enlight", "FactionState":"War" }, "Conflicts":[ { "WarType":"election", "Status":"active", "Faction1":{ "Name":"Nyalayan Imperial Society", "Stake":"Pilcher Port", "WonDays":2 }, "Faction2":{ "Name":"Traditional Nyalayan Front", "Stake":"Lamar Falls", "WonDays":0 } }, { "WarType":"war", "Status":"active", "Faction1":{ "Name":"Reret Emperor's Grace", "Stake":"", "WonDays":1 }, "Faction2":{ "Name":"Amanogawa Enlight", "Stake":"Sutter Ring", "WonDays":2 } } ] }
|
||||
{ "timestamp":"2022-11-25T09:50:45Z", "event":"FactionKillBond", "Reward":80000, "AwardingFaction":"$faction_PilotsFederation;", "AwardingFaction_Localised":"Pilots' Federation", "VictimFaction":"$faction_Thargoid;", "VictimFaction_Localised":"Thargoids" }
|
||||
{ "timestamp":"2022-11-25T09:52:28Z", "event":"FactionKillBond", "Reward":24000000, "AwardingFaction":"$faction_PilotsFederation;", "AwardingFaction_Localised":"Pilots' Federation", "VictimFaction":"$faction_Thargoid;", "VictimFaction_Localised":"Thargoids" }
|
||||
{ "timestamp":"2022-11-25T09:47:19Z", "event":"FactionKillBond", "Reward":80000, "AwardingFaction":"$faction_PilotsFederation;", "AwardingFaction_Localised":"Pilots' Federation", "VictimFaction":"$faction_Thargoid;", "VictimFaction_Localised":"Thargoids" }
|
||||
{ "timestamp":"2022-11-25T10:13:32Z", "event":"Docked", "StationName":"Pilcher Port", "StationType":"Orbis", "Taxi":false, "Multicrew":false, "StarSystem":"Nyalayan", "SystemAddress":1458309042898, "MarketID":3222853120, "StationFaction":{ "Name":"Nyalayan Imperial Society", "FactionState":"Election" }, "StationGovernment":"$government_Patronage;", "StationGovernment_Localised":"Patronage", "StationAllegiance":"Empire", "StationServices":[ "dock", "autodock", "commodities", "contacts", "exploration", "missions", "outfitting", "crewlounge", "rearm", "refuel", "repair", "shipyard", "tuning", "engineer", "missionsgenerated", "flightcontroller", "stationoperations", "powerplay", "searchrescue", "stationMenu", "shop", "livery", "socialspace", "bartender", "vistagenomics", "pioneersupplies", "apexinterstellar", "frontlinesolutions" ], "StationEconomy":"$economy_Refinery;", "StationEconomy_Localised":"Refinery", "StationEconomies":[ { "Name":"$economy_Refinery;", "Name_Localised":"Refinery", "Proportion":1.000000 } ], "DistFromStarLS":76.465557, "LandingPads":{ "Small":8, "Medium":11, "Large":6 } }
|
||||
{ "timestamp":"2022-11-25T10:13:53Z", "event":"RedeemVoucher", "Type":"CombatBond", "Amount":24240000, "Faction":"PilotsFederation" }
|
@ -31,11 +31,7 @@ public class MissionFormat : LogFormatter {
|
||||
}
|
||||
|
||||
foreach (var mission in collated) {
|
||||
if (objective.Faction != null) {
|
||||
output.AppendFormat("{0}\n", mission.Key);
|
||||
} else {
|
||||
output.AppendFormat("{0}\n", mission.Key);
|
||||
}
|
||||
output.AppendFormat("{0}: ", mission.Key);
|
||||
output.Append("(");
|
||||
foreach (var influence in mission.Value.OrderBy(x => x.Key.Length)) {
|
||||
output.AppendFormat("Inf{0} x{1}, ", influence.Key, influence.Value);
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Schema;
|
||||
using EDPlayerJournal;
|
||||
using EDPlayerJournal.BGS;
|
||||
|
||||
@ -8,10 +9,10 @@ namespace EliteBGS.LogGenerator;
|
||||
public class VoucherFormat : LogFormatter {
|
||||
public string GenerateLog(Objective objective) {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
var missions = objective.UITransactions
|
||||
.Where(x => x.IsEnabled)
|
||||
.Select(x => x.Transaction)
|
||||
.OfType<Vouchers>()
|
||||
var missions = objective
|
||||
.EnabledOfType<Vouchers>()
|
||||
.GroupBy(x => x.Type)
|
||||
.ToDictionary(x => x.Key, x => x.ToList())
|
||||
;
|
||||
|
||||
if (missions == null || missions.Count() <= 0) {
|
||||
@ -19,7 +20,8 @@ public class VoucherFormat : LogFormatter {
|
||||
}
|
||||
|
||||
foreach (var m in missions) {
|
||||
builder.AppendFormat("Handed in {0} vouchers: {1}\n", m.Type, Credits.FormatCredits(m.TotalSum));
|
||||
ulong total = (ulong)m.Value.Sum(x => (decimal)x.TotalSum);
|
||||
builder.AppendFormat("Handed in {0} vouchers: {1}\n", m.Key, Credits.FormatCredits(total));
|
||||
}
|
||||
|
||||
return builder.ToString().Trim();
|
||||
|
Loading…
Reference in New Issue
Block a user