Skip to content

Setup Guide

Stefan Morrell edited this page Aug 1, 2018 · 50 revisions

Contents


Windows Users

Install Python

At the time of writing, the current version of Python is 3.6.5.
Trade Dangerous should also work with versions of Python higher than 3.6.5, but the absolute minimum version is 3.4.2. Trade dangerous will not work with any version earlier than this.

The 64-bit version is recommended, don't be confused by the filename, the amd64 release is for all 64-bit processors. You can obtain the Python installer here: https://www.python.org/downloads/

You can install this a number of ways, but we recommend the following if possible

  • Run the installer as administrator
  • Use Customize installation
  • Tick both boxes

Python installer screen 1

All boxes will likely be ticked on the next screen. In particular ensure pip is ticked. This is not currently a requirement for TD, but may well save you from a headache later if you use other python apps, or something changes with TD.

Python installer screen 2

Finally, before pressing "Install" ensure that "Install for all users" is ticked. This will change the install location to a sensible location as in the image shown.

Python installer screen 3

Checking that it installed correctly

Once the installation is complete, open a Command Prompt window (If you've never done this before, press the Windows key and type 'cmd'), at the prompt, type python --version and verify that it reports a version number matching that which you just installed (e.g. 3.6.5 or higher).

Screenshot showing python version (Screenshot taken using Windows 10, so it may look a little different)

Get TradeDangerous

Option 1: Download a snapshot

There is no installer or auto-updated for TD because there's no ".exe" file; instead it's all Python code. If you've installed Python correctly, your system will recognize this and you'll be able to use TD without special incantations.

You can download the latest snapshot from here: https://github.com/eyeonus/Trade-Dangerous Click the "Clone or download" link and then "Download zip"

This will (no surprise!) download a .zip file, extract the contents to somewhere on your system. For example C:\trade. When you're done, if you browse to the folder, you should see a file called "trade.py" in it.

The downside to this approach is that you will have to periodically refresh your copy of TD by hand (i.e., whenever there's an update to TD on github). The upside is that it requires no additional knowledge or software.

Option 2: Use GIT to pull the repository

Don't know git? Don't want to? But would like regular updates? Check out Atlassian Sourcetree. It's free and it makes it a breeze to use Git for basic stuff.

Git users wanting to pull TD from source can clone the repository: https://github.com/eyeonus/Trade-Dangerous

Check that it works

Open a Command Prompt window as above. For these notes we'll assume you unpacked TD to c:\trade, otherwise substitute the correct folder name.

C:\Users\UserName>

Change directory to the directory you put TradeDangerous in (the one with the trade.py file)

C:\Users\UserName> cd \trade
C:\trade\> dir trade.py

Once you are in the right directory and can see "trade.py" you should be able to run the program just by typing it's name:

C:\trade\> trade.py
trade.py: TradeDangerous provides a set of trade database facilities for Elite: Dangerous.

Usage: trade.py <command>
...

If you run into problems:

  • Check your directory,
  • Check your python installation

Proceed to the "Getting Started" section below.

Mac Users

OSX and Python 3.4.2

Mac OS and Python

As of 10.9, OS X ships with Python 2.7.6. DO NOT "upgrade" your system to the latest version (3.7 at the time of writing). Instead download the latest python installer for MacOs from https://www.python.org/downloads/.

Once it has downloaded run the installer by locating the downloaded file in the Filer and double-clicking the .pkg file or right-click on the file and choose 'Open'.

Click on the 'Continue' button and the 'Agree' button where necessary until the last screen is reached where you press the 'Install' button and python will be installed.

Python mac installer screen 3
You will be asked to enter your admin password once the installation has started.

Installing TradeDangerous

You can download the latest snapshot from here: https://github.com/eyeonus/Trade-Dangerous Click the "Clone or download" link and then "Download zip".
This will (no surprise!) download a .zip file, which you can then extract to somewhere on your system.

Alternatively you can use a git client to fetch the latest code. To avoid your experience of Elite Dangerous being "I plied the galaxy and learned to use the git command line", I recommend Atlassian Sourcetree as an awesome front-end for GIT. The repository is here: https://github.com/eyeonus/Trade-Dangerous.

Check that it works

Open a terminal window and cd to the directory that contains the "trade.py" file from the source.
Once you've found it, verify that it works by typing:

$ python3.7 trade.py help

It should respond with basic usage instructions.

If you have installed a different version simply change the 3.7 to the version that you just installed.

Proceed to the "Getting Started" section below

Linux Users

No. You figure it out yourself. https://github.com/eyeonus/Trade-Dangerous
As a note though, do be careful. Many distributions (still!) come by default with python 2 installed. If you confuse your system into trying to use a new python install, many things can and will break, for example, on Redhat or Centos your package manager (yum) will die.
If you are at all unsure, install your own copy of Python as an unprivileged user.

Getting Started

You can explore what TD can do just by invoking the command using the help system.

$ trade.py --help
# outputs general trade.py help

$ trade.py buy --help
# outputs help on the "buy" command

But before you can do anything useful with TradeDangerous, you'll need price data.

You can obtain price data by:

  1. Entering it yourself as you fly,
  2. Obtaining a ".prices" file from a friend.
  3. Downloading a crowd-sourced ".prices" file.
  4. Importing data with a plugin.

For the first three options, you may well need to create the base data files containing the lists of ships, commodities and so forth currently in the game. It is therefore recommended that before you use any prices data you run the eddblink plugin with some special options. If you are using a plugin, check the instructions for that plugin. (You do NOT need to do this if you are using the recommended EDDBlink plugin, though it will do no harm).

$ trade.py import --plug=eddblink --options=all,solo

Entering your own price data

To use the built-in (and frankly, a bit crap) UI:

$ trade.py update -G star/station
e.g.
$ trade.py update -G mokosh/bethestation

If you want TD to appear in-front of the game UI all the time, you can add '-F':

$ trade.py update -G -F sol/abraham
or
$ trade.py update -GF sol/abraham

There are also several options that will let you use a text editor instead. See

$ trade.py update --help

Using someone else's price data

There are a number of crowd and small-group sources maintaining their own ".prices" file, or you can use your own.

The "import" sub-command takes a file name or a URL. If you have downloaded .prices from someone and saved them as "shiny-new-data.prices" in your trade directory, or if you have a saved ".prices" fragment from an editor session, or if you have written "shiny-new-data.prices" yourself in notepad by hand, you can import with:

$ trade.py import shiny-new-data.prices

If you have a URL for price data, you can use the URL:

$ trade.py import http://elite.ripz.org/files/TradeDangerous.prices

(This prices file will be recent though semi static but will probably work unless a megaship has recently moved).

Lastly, if you are using a supported crowd-sourced/public prices site, you can import data using a plugin -- see the plugins directory or obtain a plugin from a third party:

$ trade.py import --plug=eddblink 

When importing data from a 3rd party, you may get "Unknown Station" or "Unknown Item" errors, you can ignore these with the "-i" option. The errors will still be reported but processing will continue. Use "-q" to silence them entirely.

The eddblink plugin has options to pull all available data into your local database.

It is recommended to use '-O clean,skipvend' on slower computers when doing a clean run, including the first run. This command can also be used to completely regenerate and download all the data from scratch if you run into any issues such as a corrupted database. Faster computers (or patient users) may skip this step and need not use skipvend if they need to rebuild from scratch.

$ trade.py import --plug=eddblink -opt=clean,skipvend

On faster computers, or any computer after the first run, it is recommended to use '-O listings'.

$ trade.py import --plug=eddblink -opt=listings

This will only download files if they are newer than your current versions. This is a merge so any local systems/stations you have added will not be lost; if you have filled in a value that is still blank/unknown in the eddb data, your value will be kept. However, if there is a conflict, for example if eddb says "Abraham Lincoln" is 150 ls-from-star and your db says it is 120, your local value will be overwritten.

Clone this wiki locally