Coder Social home page Coder Social logo

tautomer / edmmc Goto Github PK

View Code? Open in Web Editor NEW
17.0 3.0 3.0 1.21 MB

A GUI helper to track the mission progresses for stacking massacre missions in Elite: Dangerous

Home Page: https://tautomer.github.io/EDMMC/

License: MIT License

Python 100.00%
elite-dangerous elitedangerous

edmmc's Introduction

ico EDMMC (ED Massacre Mission Companion)

A GUI helper for stacking pirates massacre missions in Elite: Dangerous

Example of a simulated stacking run with my previous log.

running

What is EDMMC

If you have ever stacked pirates massacre missions in Elite: Dangerous, you must have realized that managing these missions can be extremely difficult. More specifically, it's difficult to know

  • how many missions you accepted for each faction,
  • how many kills you need for each faction,
  • what's the current progress for each mission.

As a result, I had to use Excel to get my missions organized and you know it sucks!

So here is EDMMC. Before I get started, there are two limitations in this program.

  • I'm no professional code. More importantly, I have never built GUI before, so the UI might be naive, but this is pretty the best I can offer with Tkinter.
  • Due to technical issues, I CANNOT precisely track the mission progresses, which means that you may find the progress shown in EDMMC is inaccurate. I will talk about more details later.

Features

  • Monitor all you current massacre mission and organize them based on factions.
  • Count the mission and faction specific progress based on the Bounty event.

How it works

Much information in this part was inspired by Elite Dangerous Player Journal.

All data are extracted from the game journal files stored in

%USERPROFILE%\Saved Games\Frontier Developments\Elite Dangerous

Each line of these journal files is a JSON format string. There are a few entries related to missions.

  • Resume missions from previous sessions

    {
      "timestamp": "2017-10-02T10:37:58Z",
      "event": "Missions",
      "Active": [
          {
              "MissionID": 65380900,
              "Name": "Mission_Courier_name",
              "PassengerMission": false,
              "Expires": 82751
          }
      ],
      "Failed": [],
      "Complete": []
    }
  • Mission accepted

    {
      "timestamp": "2018-02-28T12:06:37Z", "event": "MissionAccepted",
      "Faction": "Official i Bootis Liberty Party",
      ......
      "Influence": "Med",
      "Reputation": "Med",
      "Reward": 2686155,
      "MissionID": 65393626
    }
  • Mission redirected

    {
      "timestamp": "2017-08-01T09:04:07Z",
      "event": "MissionRedirected",
      "MissionID": 65367315,
      "NewDestinationStation": "Metcalf Orbital",
      "OldDestinationStation": "Cuffey Orbital",
      "NewDestinationSystem": "Cemiess",
      "OldDestinationSystem": "Vequess"
    }

    This event happens when you have fulfilled the number of kills required by the mission and the mission is redirected back to the station.

  • Mission abandoned/completed/failed

    Skip. Pretty straightforward.

  • Bounty claimed

    {
      "timestamp": "2018-04-17T11:11:02Z",
      "event": "Bounty",
      "Rewards": [
          {
              "Faction": "Nehet Patron's Principles",
              "Reward": 5620
          }
      ],
      "Target": "empire_eagle",
      "TotalReward": 5620,
      "VictimFaction": "Nehet Progressive Party"
    }

    This event happens when you kill a criminal. However, the log does NOT say if this criminal is your "MISSION TARGET". Sure, the log records the faction which the criminal belongs to, but NOT all wanted ship from your target faction are your mission targets.

So here is how the program works

  • All missions for the same faction is based on "first come, first serve" rule. There is no way I can know the current progress of the mission, so it's assumed to be 0.
  • Whenever a criminal of the target faction is killed, the first active mission of each faction will move forward by 1.
  • When the mission is redirected, the status is changed to "Done". If there is a discrepancy between the progress and kill counts, I will force sync the progress. I guess you can understand that there is no other way.
  • Next kills will be counted towards the next mission in queue. Missions in "Done" status will be removed from the list will the reward is claimed.

TODO

The code is still in very preliminary state. Many things can be greatly improved.

  • Save faction/mission status and rationally restart on the next launch.
  • Add a warning for non-pirate massacre missions.
  • Add a button to "calibrate" the mission progress.
  • Add settings for stuff like color and font, etc.
  • A better way to watch file changes, like watchdog.
  • Use separated processes for processing log files and tk.
  • Logging and debugging options.
  • Unit tests, CI and docs, etc.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template. The colors used in the built-in theme are taken from flatuicolors. The logo of this program is adpated from EDAssets. The executable is compiled with PyInstaller with upx enabled.

edmmc's People

Contributors

kamd avatar tautomer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

edmmc's Issues

Add scrollbar

  • MaccacreCompanion version: 88cba9b
  • Python version: 3.9.1
  • Operating System: Linux

Description

I have a lot of missions and when the list goes beyond screen height there is no scrollbar.

I have a messy implementation done, I can prepare PR if you are interested.

Incorrect station display

  • MassacreCompanion version: 0.1.0
  • Python version: 3.8.7
  • Operating System: Windows 10

Description

View the correct station the mission came from.

What I Did

Accepted a bunch of missions in Goplang, HIP 108729, and HIP 109787 targeting HIP 108701. The tool shows that all the missions' station is in MacCready Dock and Kagawa Ring in 108701, instead of the station the mission came from in the source systems.

Thanks for this tool, it's very useful!

crash on executable check

  • MaccacreCompanion version: 7c5bda8
  • Python version: 2.9.5
  • Operating System: Win10

Description

Crashes on launch when trying to retrieve executable status.

readlog.py

check_process()
    status = subprocess.check_output(self.ed_process_name, shell=True).decode()

What I Did

C:\repos\EDMMC\edmmc>python edmmc.py
Active code page: 437
'EliteDangerous64.exe' is not recognized as an internal or external command,
operable program or batch file.
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\b\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py", line 1892, in __call__
    return self.func(*args)
  File "C:\Users\b\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py", line 814, in callit
    func(*args)
  File "C:\repos\EDMMC\edmmc\edmmc.py", line 30, in update
    self.initialized = rl.initialize(rl.current_log, self.missions,
  File "C:\repos\EDMMC\edmmc\readlog.py", line 116, in initialize
    self.check_process()
  File "C:\repos\EDMMC\edmmc\readlog.py", line 106, in check_process
    status = subprocess.check_output(self.ed_process_name, shell=True).decode()
  File "C:\Users\b\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "C:\Users\b\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'EliteDangerous64.exe' returned non-zero exit status 1.

I basically just comment out the function and force the following:

        self.is_game_running = True
        self.label_texts.ed_status.set("ED client is running")

Of course, the application now doesn't actually check if ED is running but to be frank not my most desired feature.

Incorrect missions displaying (too many, probably old ones)

  • MaccacreCompanion version: 1.2.5
  • Python version: 3.7
  • Operating System: Windows 10

Description

After installing, I got the follow problem. As you can see, the tool reports 29 active missions with 14 being complete (the game only allows 20 missions in the mission log, so 29 is impossible). I believe the extra missions are from a previous run, but have already been turned in.

image

What I Did

I uninstalled an older version of this tool (installed on 4/11 I think, don't remember the version), then installed the latest version using the link in the Readme for the installer. Problems arose after launching the new version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.