lunarplasma / edmc-combattracker Goto Github PK
View Code? Open in Web Editor NEWPlugin to track massacre missions
Plugin to track massacre missions
Would help quickly pick out which missions are from the current station if they were highlighted when you dock.
Assassination frame to track target's name, faction, system, and reward.
@jberanek reports that the logger for the Data module (and the Display module?) is causing exceptions:
I mean the "Data" subdir in the plugin, where massacres.py lives.
Originally posted by @jberanek in #1 (comment)
Maybe you could add a label at the bottom of all the rewards showing the sum of all current mission rewards (as if you'd take the maximum Cr as a reward).
Check if there's a MissionExpired event and make sure that this is handled correctly.
Currently it shows a date + time. Would be easier to digest if:
I took a stack of missions from two stations, completed them, and turned them in. After I turned the last 3 in, the plugin's display did not reset to "no missions" or blank.
Screenshot of no missions active: https://i.imgur.com/CoQSMj3.png
Screenshot of EDMC: https://i.imgur.com/zsB7599.png
Desired outcome: "Massacre Tracker" section does not continue to list completed missions.
Restarting EDMC (I didn't try the game yet) does clear the last mission out properly.
Now. You may notice that I have hidden the target frame, by editing the code. I did this just by commenting out 3 self.target_frame
lines in controller.py (not the first one) (replacing line 171 with a pass
). If you think that's related I can undo and re-test and apologize if I have brought this upon myself.
Might be an edge case in update_massacre_display
, though?
EDMC: 5.1.1
EDMC-CombatTracker: 0.5.1
Journal:
{ "timestamp":"2021-07-24T21:22:53Z", "event":"Docked", "StationName":"Scully-Power Base", "StationType":"Outpost", "Taxi":false, "Multicrew":false, "StarSystem":"Neitsi", "SystemAddress":5581209277146, "MarketID":3221587968, "StationFaction":{ "Name":"Pleiades Concordat", "FactionState":"CivilLiberty" }, "StationGovernment":"$government_Theocracy;", "StationGovernment_Localised":"Theocracy", "StationServices":[ "dock", "autodock", "commodities", "contacts", "exploration", "missions", "refuel", "repair", "tuning", "engineer", "missionsgenerated", "facilitator", "flightcontroller", "stationoperations", "powerplay", "searchrescue", "stationMenu", "socialspace" ], "StationEconomy":"$economy_Extraction;", "StationEconomy_Localised":"Extraction", "StationEconomies":[ { "Name":"$economy_Extraction;", "Name_Localised":"Extraction", "Proportion":1.000000 } ], "DistFromStarLS":1022.074064, "LandingPads":{ "Small":2, "Medium":1, "Large":0 } }
{ "timestamp":"2021-07-24T21:22:56Z", "event":"RefuelAll", "Cost":109, "Amount":2.160362 }
{ "timestamp":"2021-07-24T21:23:10Z", "event":"MissionCompleted", "Faction":"Dhakya Purple Federal Systems", "Name":"Mission_MassacreWing_name", "MissionID":794717774, "TargetType":"$MissionUtil_FactionTag_Pirate;", "TargetType_Localised":"Pirates", "TargetFaction":"HIP 109067 Crimson Pirates", "KillCount":45, "NewDestinationSystem":"Neitsi", "DestinationSystem":"HIP 109067", "NewDestinationStation":"Scully-Power Base", "DestinationStation":"Varthema Vision", "Reward":11764377, "FactionEffects":[ { "Faction":"", "Effects":[ { "Effect":"$MISSIONUTIL_Interaction_Summary_EP_up;", "Effect_Localised":"The economic status of $#MinorFaction; has improved in the $#System; system.", "Trend":"UpGood" } ], "Influence":[ { "SystemAddress":2007796486874, "Trend":"DownBad", "Influence":"+" } ], "ReputationTrend":"DownBad", "Reputation":"+" }, { "Faction":"Dhakya Purple Federal Systems", "Effects":[ { "Effect":"$MISSIONUTIL_Interaction_Summary_EP_up;", "Effect_Localised":"The economic status of $#MinorFaction; has improved in the $#System; system.", "Trend":"UpGood" } ], "Influence":[ { "SystemAddress":5581209277146, "Trend":"UpGood", "Influence":"+++" } ], "ReputationTrend":"UpGood", "Reputation":"++" } ] }
{ "timestamp":"2021-07-24T21:23:14Z", "event":"MissionCompleted", "Faction":"Mortis Incorporated", "Name":"Mission_MassacreWing_name", "MissionID":794717881, "TargetType":"$MissionUtil_FactionTag_Pirate;", "TargetType_Localised":"Pirates", "TargetFaction":"HIP 109067 Crimson Pirates", "KillCount":30, "NewDestinationSystem":"Neitsi", "DestinationSystem":"HIP 109067", "NewDestinationStation":"Scully-Power Base", "DestinationStation":"Hume Orbital", "Reward":7241889, "FactionEffects":[ { "Faction":"", "Effects":[ { "Effect":"$MISSIONUTIL_Interaction_Summary_EP_up;", "Effect_Localised":"The economic status of $#MinorFaction; has improved in the $#System; system.", "Trend":"UpGood" } ], "Influence":[ { "SystemAddress":2007796486874, "Trend":"DownBad", "Influence":"+" } ], "ReputationTrend":"DownBad", "Reputation":"+" }, { "Faction":"Mortis Incorporated", "Effects":[ { "Effect":"$MISSIONUTIL_Interaction_Summary_EP_up;", "Effect_Localised":"The economic status of $#MinorFaction; has improved in the $#System; system.", "Trend":"UpGood" } ], "Influence":[ ], "ReputationTrend":"UpGood", "Reputation":"++" } ] }
{ "timestamp":"2021-07-24T21:23:21Z", "event":"MissionCompleted", "Faction":"People's HR 8461 Confederacy", "Name":"Mission_MassacreWing_name", "MissionID":794717958, "TargetType":"$MissionUtil_FactionTag_Pirate;", "TargetType_Localised":"Pirates", "TargetFaction":"HIP 109067 Crimson Pirates", "KillCount":32, "NewDestinationSystem":"Neitsi", "DestinationSystem":"HIP 109067", "NewDestinationStation":"Scully-Power Base", "DestinationStation":"Brooks Survey", "Reward":15515229, "FactionEffects":[ { "Faction":"", "Effects":[ { "Effect":"$MISSIONUTIL_Interaction_Summary_EP_up;", "Effect_Localised":"The economic status of $#MinorFaction; has improved in the $#System; system.", "Trend":"UpGood" } ], "Influence":[ { "SystemAddress":2007796486874, "Trend":"DownBad", "Influence":"+" } ], "ReputationTrend":"DownBad", "Reputation":"+" }, { "Faction":"People's HR 8461 Confederacy", "Effects":[ { "Effect":"$MISSIONUTIL_Interaction_Summary_EP_up;", "Effect_Localised":"The economic status of $#MinorFaction; has improved in the $#System; system.", "Trend":"UpGood" } ], "Influence":[ ], "ReputationTrend":"UpGood", "Reputation":"++" } ] }
EDMC debug log:
2021-07-24 17:22:59.072 - DEBUG - 36272:58140:58140 <plugins>.EDMC-Canonn-6.2.1.canonn.patrol.CanonnPatrol.visible:939: no patrols True
2021-07-24 17:23:09.968 - INFO - 36272:58140:58140 <plugins>.EDMC-CombatTracker-0.5.1.Data.massacres.Massacres._store_new_massacre:47: Updating mission: 794717774 (MissionCompleted)
2021-07-24 17:23:09.970 - INFO - 36272:58140:58140 <plugins>.EDMC-CombatTracker-0.5.1.Data.massacres.Massacres.add_event:30: Marking mission 794717774 as done. Reason: MissionCompleted
2021-07-24 17:23:09.971 - INFO - 36272:58140:58140 <plugins>.EDMC-CombatTracker-0.5.1.Data.massacres.Massacres._remove_from_factions:71: Deleting faction from massacre lists: Dhakya Purple Federal Systems
2021-07-24 17:23:09.972 - INFO - 36272:58140:58140 <plugins>.EDMC-CombatTracker-0.5.1.Display.massacreFrame.MassacreFrame.update_data:101: Updating.
2021-07-24 17:23:12.998 - INFO - 36272:58140:58140 <plugins>.EDMC-CombatTracker-0.5.1.Data.massacres.Massacres._store_new_massacre:47: Updating mission: 794717881 (MissionCompleted)
2021-07-24 17:23:12.999 - INFO - 36272:58140:58140 <plugins>.EDMC-CombatTracker-0.5.1.Data.massacres.Massacres.add_event:30: Marking mission 794717881 as done. Reason: MissionCompleted
2021-07-24 17:23:13.000 - INFO - 36272:58140:58140 <plugins>.EDMC-CombatTracker-0.5.1.Data.massacres.Massacres._remove_from_factions:71: Deleting faction from massacre lists: Mortis Incorporated
2021-07-24 17:23:13.000 - INFO - 36272:58140:58140 <plugins>.EDMC-CombatTracker-0.5.1.Display.massacreFrame.MassacreFrame.update_data:101: Updating.
2021-07-24 17:23:20.064 - INFO - 36272:58140:58140 <plugins>.EDMC-CombatTracker-0.5.1.Data.massacres.Massacres._store_new_massacre:47: Updating mission: 794717958 (MissionCompleted)
2021-07-24 17:23:20.065 - INFO - 36272:58140:58140 <plugins>.EDMC-CombatTracker-0.5.1.Data.massacres.Massacres.add_event:30: Marking mission 794717958 as done. Reason: MissionCompleted
2021-07-24 17:23:20.066 - INFO - 36272:58140:58140 <plugins>.EDMC-CombatTracker-0.5.1.Data.massacres.Massacres._remove_from_factions:71: Deleting faction from massacre lists: People's HR 8461 Confederacy
2021-07-24 17:23:23.411 - DEBUG - 36272:58140:58140 <plugins>.EDMC-Canonn-6.2.1.canonn.news.CanonnNews.news_update:139: Refreshing News
2021-07-24 17:23:28.974 - INFO - 36272:55696:55696 plugins.inara.new_worker:1484: sending 7 events for Winter Ihernglass
^^ see lack of last Display.massacreFrame.MassacreFrame.update_data:101: Updating.
As per https://github.com/EDCD/EDMarketConnector/blob/Release/4.1.7-rc1/PLUGINS.md#events and advice from EDMC's developers, we should avoid using threads altogether.
For the initial startup data, add some code in journal_entry() to trigger reading the initial logs data.
For the regular 1-min update for Time Left in missions - remove this for now and replace Time Left with the actual Expiry Date.
If massacre missions are taken which target different groups/systems, it will be difficult to see which missions would stack with each other. There needs to be a mechanism to group these missions by target-type/faction to make it clearer that they would stack (or not).
Add a panel/frame that gives detailed information of the current target - specifically whether they have been scanned and what their total bounty is worth.
Via Sebyujii on the EDCD Discord:
@lunarplasma it would be great to have a little indicator on which missions are wing and which are not. Maybe in front of the reward label or sth like that
Would be neater to tick down the kills for each mission as you kill pirates.
Not easy but maybe if you know the target faction and the time the mission was accepted, you could tick them off one by one.
Since I have my EDMC on my second monitor (which I dont have my eyes on constantly), I dont really use the Target Ship section. I don't think, its that handy and for me personally, it's just taking up space. If you could make that an optional drop in-drop out kinda thingy, that'd be great.
Plugin version 0.1.0
I have a few massacre missions currently, but when EDMC starts up the plugin display is there, but shows no mission data.
Relevant looking bit of data from the logs:
2021-02-17 10:25:55.949 - INFO - <plugins>.EDMC-CombatTracker-0.1.0.controller.Controller.rebuild_from_logs:38: Starting to read previous journal files: C:\Users\john\AppData\Local\EDMarketConnector\plugins\EDMC-CombatTracker-0.1.0\Test\Data
Exception in thread Thread-1:
Traceback (most recent call last):
File "threading.pyc", line 926, in _bootstrap_inner
File "threading.pyc", line 870, in run
File "C:\Users\john\AppData\Local\EDMarketConnector\plugins\EDMC-CombatTracker-0.1.0\controller.py", line 40, in rebuild_from_logs
logs = [f for f in os.listdir(journal_folder) if ".log" in f] # get logs only
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\john\\AppData\\Local\\EDMarketConnector\\plugins\\EDMC-CombatTracker-0.1.0\\Test\\Data'
When you've finished your missions, when the factions name and the name of the station where you need to turn it in are quite big, the window just gets huge. Maybe you could either not display the full name of the system (bc most of the time you'd know the system of that mentioned station) or just change things up in that table so the location row doesnt get as wide. (see screenshot)
Make it work with dark mode.
All the digits as is seems like overkill and makes it harder to grep at a glance.
Currently:
Reward
34,680,120 cr
Simpler:
Reward
(m cr)
34.680
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.