Page 1 of 3 123 Last
Results 1 to 15 of 45

Thread: Elite Dangerous Companion Emulator (EDCE)

  1. #1

    Elite Dangerous Companion Emulator (EDCE)

    *This was published early 2015 before the API was officially allowed*

    Elite Dangerous Companion Emulator (EDCE)

    Everything mentioned in this post is a Good Thing™, and I encourage you to read it fully before voicing an opinion.

    TL;DR
    EDCE is a python script that securely retrieves your commander data from Frontier exactly like your iPhone would if you were using the Elite Dangerous Companion mobile app. It can also optionally post market data from where your commander is docked to EDDN.

    Latest release
    GitHub
    EDCodex

    Foreword (2016)
    EDCE was meant as a proof-of-concept for other developers to learn how to use the Companion API, and to show FD how incredibly positive third-party apps can be when using the Companion API. As such this is why it’s not fully fleshed out comparatively to the other great tools out there.

    With that in mind anyone else that wishes to become a collaborator to continue tweaking it, or turn it into a proper library for others to use, please do not hesitate to contact me.


    *Begin historical documents*

    Why?
    Community developers have wanted access to game data since the earliest Alpha and Beta releases in order to produce cool tools that enhance the gaming experience for many commanders.

    Initially, data was mined directly from the client, and this caused difficulties for Frontier: not only were there exploits, but it caused stability issues with the clients that strained their support capabilities. Frontier then obfuscated the client executable code and indicated to community developers that direct access to game data from the client would no longer be supported.

    The first requests for an API (Application Programming Interface) where then made to Frontier for allowing game information to be extracted and processed by third-party tools. Frontier responded that it was an interesting idea, and that they would consider it in the future due to their limited resources.

    Community developers have nevertheless continued to develop many incredible tools, using very difficult and unreliable techniques such as OCR (Optical Character Recognition) to access game information, to the great appreciation of commanders.

    A thread was started by Frontier in January to collect ideas for an external API, which ran for 32 pages. However, to date, there are no definite plans by Frontier to develop this API in the near future. It is understood that their limited resources are fully dedicated to continue making a great game.

    In the meantime Frontier released the Elite Dangerous Companion app for iPhones. This app uses SSL (Secure Sockets Layer) to retrieve commander data from a Frontier website using a Web-based API. All you need is the app and your Frontier store credentials, and you have access to your commander data.

    Other developers and myself have contacted Frontier to see if they would allow community developers to use the Web API to extract game data for tool development. The response was that they do not have the resources to provide support for this approach, and that they would rather look at a real API when they will be able to.

    Hence, in good faith, I am releasing the approach to access the Web API, with the undestanding that Frontier will not provide support for it. Hopefully, Frontier will tolerate its use by developers and commanders as long as it does not induce any extra effort on their part, affect the operation of their servers, and does not otherwise compromise their game.

    What is in the data?
    The same data as in the app. Commanders using this script do not have any more of an "advantage" over others than those using the Companion app. It just allows to access the data in a way to allow it to be stored and manipulated (e.g. commander's log for systems visited, etc.)

    The data has a wealth of information about your commander that you can explore by viewing the logged data, namely:

    • Location
    • Ranks
    • Reputations
    • Credits
    • Systems visited
    • Full game stats (trade, combat, exploration, ...)
    • Current ship and loadout
    • Other ships and their locations
    • Last system visited and faction
    • Last station at which docked and faction
    • Last station market data and outfitting item availability
    • ..and more


    Prerequisites
    • Runs on Windows, Linux and Mac OSX
    • Python 3.3+
    • You may need to install some modules if the script complains. Example, if "requests" is missing, run "pip3 install requests"
    • If you wish to obtain the source code, use git and use the command "git clone https://github.com/Andargor/edce-client.git"


    Obtaining
    Latest release

    EDCE is open source and available on Github.

    Installation
    • Unzip in any directory
    • Requirements:
    • - Python 3.3 or higher
    • - Python requests library: pip3 install requests
    • Run client-setup.py (use python3 client-setup.py on Linux and Mac)
    • Enter your Frontier store credentials (NOTE: The password is stored unencrypted in the edce.ini file. You can leave the password blank, however this means you will need to run the client in interactive mode and you will be prompted to enter the password every time)


    Usage
    EDCE is a really basic script that fetches your data, and optionally posts to EDDN. It needs to be manually executed every time you wish to fetch data.

    There is a lot of information in the data, and community developers are free to write more sophisticated clients that uses this code. For example, if someone can figure out a way to determine when a commander is docked, then this can be automatically run at that time.

    • Run edce_client.py (use python3 edce_client on Linux and Mac)
    • The first time it is run, a verification code will be sent by Frontier to your account email. Enter it when prompted
    • If you have left either your Frontier store username or password empty, you will be prompted to enter it
    • The script will fetch your commander data, dump it to "last.json", and store it compressed in the "logs" directory. The data is in JSON format, which is machine-readable and marginally human readable. It is compressed (7-zip can read it)
    • Optionally, if you have enabled it, and if your commander is docked, it will post the current station market data to EDDN. No private information is sent.
    • You need to run the program manually every time you wish to fetch data (and post to EDDN)


    Security
    • Protect your edce.ini file as it contains your Frontier store credentials in unencrypted form if you have not left them blank during setup
    • Your store credentials are transmitted in the same way the iPhone app does, using secure requests directly to Frontier, without any intermediaries. This communication is not logged.
    • This script has been developed as open source so that you may verify how your store credentials are handled


    Other Notes
    • Avoid querying the Elite Dangerous Companion site too often in order to avoid overloading it. As a rule, try not to query more than once every 2-3 minutes.
    • By default, there is a 120 second delay imposed between queries.
    • The web API sometimes lags actual game state by several seconds. For example, you might dock, but only be able to post market data to EDDN after a few seconds until the web API catches up.
    • You can modify the code as you wish, the edce subdirectory contains the core module to access the Elite Dangerous Companion web API

  2. #2
    Waaaait.... "
    • Last station market data and outfitting item availability"

    Does that mean they provide all the data from the market you docked at?

  3. #3
    Originally Posted by seeebek View Post (Source)
    Waaaait.... "
    • Last station market data and outfitting item availability"

    Does that mean they provide all the data from the market you docked at?
    Yes, commodities and outfitting.

  4. #4
    Originally Posted by Andargor View Post (Source)
    Yes, commodities and outfitting.
    Ladies and gentlemen! We have an OCR killer! Great. I will have a closer look tommorow. There is a lot of potential.

  5. #5
    Originally Posted by seeebek View Post (Source)
    Ladies and gentlemen! We have an OCR killer! Great. I will have a closer look tommorow. There is a lot of potential.
    Like I mentioned, what you and others did with OCR is nothing short of miraculous. You should be proud

  6. #6
    Originally Posted by Andargor View Post (Source)
    Like I mentioned, what you and others did with OCR is nothing short of miraculous. You should be proud
    Oh I am. But I'm also thankful I don't need to work on it too much longer. And I will be happier to work on a project based on your code an the "API".

  7. #7
    EDITED

    This is an error on my system and not related to your scripts, but any ideas as to why I'm seeing this :

    C:\Temp\edce-client-1.0>client-setup.py
    Job information querying failed

    python 3.4.2, requests 2.5.1, windows 10 build 10074 64bit (64bit python)

    I also see it trying to run Trade Dangerous Google foo gives me nothing useful.

  8. #8
    Originally Posted by hitchhiker54 View Post (Source)
    EDITED

    This is an error on my system and not related to your scripts, but any ideas as to why I'm seeing this :

    C:\Temp\edce-client-1.0>client-setup.py
    Job information querying failed

    python 3.4.2, requests 2.5.1, windows 10 build 10074 64bit (64bit python)

    I also see it trying to run Trade Dangerous Google foo gives me nothing useful.
    I've... actually never seen that message. But I don't have Windows 10, might it be related to that?

    EDIT: did you unzip somewhere, or are you trying to run from the archive?

  9. #9
    i've been using win 10 for a while now with no issues regarding python, and yes have unzipped the archive and running from folder. Uninstalling python for clean install of 3.4.3 to see if that cures it.

  10. #10
    Originally Posted by hitchhiker54 View Post (Source)
    i've been using win 10 for a while now with no issues regarding python, and yes have unzipped the archive and running from folder. Uninstalling python for clean install of 3.4.3 to see if that cures it.
    I've reinstalled python 3.4.3 to see if I had something different, and I had to pip3 install requests, but other than that it seems to work fine. Stumped...

  11. #11
    That didn't work, but calling 'python client-setup' did... odd as my path is still intact and worked fine up until today's windows update. Maybe a bug with current windows build.

  12. #12
    Nice work! Well done. Let's hope this works out well for FD and pilots alike.

  13. #13
    Great work. This is much easier to use than other methods and a boon to the community. Now we just need more people to get out there and update stations...

  14. #14
    Glad you like it, even though it is very basic. Can't wait to see what the other community developers will do with it.

    I've made a few minor changes and released 1.0.1. There's a player_dump.py utility now that will give you your basic commander info, where your ships are and last visited locations, as a demonstration. This utility reads the last.json file, and doesn't query directly, which shows that you can process it offline.

  15. #15
    There was an app that emulated the iPhone interface and FDev asked that it be stopped while they worked on an actual API, hence why we went with OCR.

Page 1 of 3 123 Last