In-Development TradeDangerous: power-user trade optimizer

I never considered the impact of that statement on TD. I assumed that the new commodities WERE slaves only though, no others. There are so many other commodities already that seem to serve very little purpose in trading terms.
 
One of the updates listed for Gamma 2 says "Slavery missions and commodities added". Anyone know what the new commodities are and what categories they are in?

In Leesti (George Lucas)
Narcotics Sell Buy Ave
Blue Milk 3010 3123 1546
Leestian Evil Juice 334 347 171

These are Rare and increase in value the further you get from source!!


Taking the figures from the iPad app as game has just gone down for me.
 
I've just gotten done implementing a plugin architecture, right now only for "Import".

This will allow us to move forward with better ways to import and export data, e.g. using json to download just recent updates from a site like Maddavo's, and allowing stand-alone groups to make their own little plugin to up/download data between each other, etc.

The upshot of this is that "import --maddavo" becomes "import --plug=madadvo" (or import --plug maddavo).

Next target will be "update" macros.

I've also overhauled the readme and wiki and I've created a "CookBook" for people to record the tricks they've found to make TD do clever things.
 

wolverine2710

Tutorial & Guide Writer
I've just gotten done implementing a plugin architecture, right now only for "Import".

This will allow us to move forward with better ways to import and export data, e.g. using json to download just recent updates from a site like Maddavo's, and allowing stand-alone groups to make their own little plugin to up/download data between each other, etc.

The upshot of this is that "import --maddavo" becomes "import --plug=madadvo" (or import --plug maddavo).

Next target will be "update" macros.

I've also overhauled the readme and wiki and I've created a "CookBook" for people to record the tricks they've found to make TD do clever things.

JSON for prices Brilliant. Indeed makes import/export for others much easier. I hope once that works well you could implement optional JSON out for the other commands as well, especially "run". That would probably make life much easier for those commanders working on a GUI for TD. A JSOn structure is much easier to manipulate then the current text output of run ;-)
 
JSON for prices Brilliant. Indeed makes import/export for others much easier. I hope once that works well you could implement optional JSON out for the other commands as well, especially "run". That would probably make life much easier for those commanders working on a GUI for TD. A JSOn structure is much easier to manipulate then the current text output of run ;-)

They shouldn't need to parse the output from "run" at all. The commands are all built as little modules with two main components. One executes the command and generates data ("results"). The second is called by trade.py to turn the results into output text. The split is so that if someone needs the data in a different format, they don't have to snag it from a text representation but can get at the actual data.

Code:
from commands import *
import tradedb
import json

cmdIndex = commands.CommandIndex()
cmdenv = cmdIndex.parse([
    __name__,
    "run",
    "--from", "Bethe Station",
    "--hops", "2",
    "--cr", "5000",
    "--cap", "16",
    "--ly", "10.5",
])

tdb = tradedb.TradeDB(cmdenv, load=cmdenv.wantsTradeDB)

results = cmdenv.run(tdb)

json.dumps(results)
 
Last edited:
Thanks for this great tool. I have some questions though...

Is there a way to import additional Systems/Stations? Right now I'm modifying the corresponding .csv files by hand, which is rather painful. Downloading updated source files would overwrite this too, right? I'm fairly new to this whole shared coding thing and don't want to break anything.
I am also teaching myself a bit of python and just hacked together a converter for EliteOCR .csv output to .prices format, but the new plugin system may be a way to integrate this into trade dangerous, right?
 
Thanks for this great tool. I have some questions though...

Is there a way to import additional Systems/Stations? Right now I'm modifying the corresponding .csv files by hand, which is rather painful. Downloading updated source files would overwrite this too, right? I'm fairly new to this whole shared coding thing and don't want to break anything.
I am also teaching myself a bit of python and just hacked together a converter for EliteOCR .csv output to .prices format, but the new plugin system may be a way to integrate this into trade dangerous, right?

At the moment, editing the .csv's is the only way to do it.

One of the problems with the current scheme is that there's no easy way to match up one persons system.csv with another person's prices station list and another person's price data, because we're using the text names for things. I screwed up the other day and submitted "Thornycrofy Colony" to Maddavo.
 
I can't figure this out keeps here is what it says



trade.py import TradeDangerous.prices
trade.py: TradeDangerous.prices:1891 Unrecognized STAR/Station, 'ALACARAKMO/WEYL GATEWAY'.

trade.py update -G -F LP 254-40/JACOBIDOCK
trade.py: ERROR: unrecognized arguments
: 254-40/JACOBI DOCK

usage: trade.py {update} ...


trade.py update -GF LP254-40/JACOBIDOCK

trade.py: Unrecognized place: LP254-40/JACOBIDOCK

trade.py update -GF LP254-40/JACOBI DOCK
trade.py: ERROR: unrecognized arguments
: DOCK

usage: trade.py {update} ...


trade.py update -GF LP 254-40/JACOBIDOCK
trade.py: ERROR: unrecognized arguments
: 254-40/JACOBIDOCK

usage: trade.py {update} ...




and when i tried importing it says



trade.py import -i http://kfs.org/td/prices
Connecting to server: http://kfs.org/td/prices
Download: 2,735,863/2,735,863 bytes | 60.53KB/s | 100.00%
import.prices:3781 Unrecognized STAR/Station, 'ALACARAKMO/WEYL GATEWAY'.
import.prices:27487 Unrecognized STAR/Station, 'HELVETITJ/FRIEND ORBITAL'.
import.prices:42007 Unrecognized STAR/Station, 'LHS 6309/JONES STATION'.
import.prices:42097 Unrecognized STAR/Station, 'LHS 6309/NOETHER CITY'.
import.prices:50833 Unrecognized STAR/Station, 'MANNONA/THORNYCROFY PENAL COLONY'.


trade.py import -i --maddavo
Connecting to server: http://www.davek.com.au/td/prices.asp
Download: 2,735,863/2,735,863 bytes | 68.57KB/s | 100.00%
import.prices:3781 Unrecognized STAR/Station, 'ALACARAKMO/WEYL GATEWAY'.
import.prices:27487 Unrecognized STAR/Station, 'HELVETITJ/FRIEND ORBITAL'.
import.prices:42007 Unrecognized STAR/Station, 'LHS 6309/JONES STATION'.
import.prices:42097 Unrecognized STAR/Station, 'LHS 6309/NOETHER CITY'.
import.prices:50833 Unrecognized STAR/Station, 'MANNONA/THORNYCROFY PENAL COLONY'.




also is there an GUI version yet?
 
Last edited:
I can't figure this out keeps here is what it says



trade.py import TradeDangerous.prices
trade.py: TradeDangerous.prices:1891 Unrecognized STAR/Station, 'ALACARAKMO/WEYL GATEWAY'.

You need a later Station.csv file that has that station in it, OR you can add that station to your Station.csv . It's probably worthwhile getting a later Station.csv since you may also be missing other stations.

trade.py update -G -F LP 254-40/JACOBIDOCK
trade.py: ERROR: unrecognized arguments
: 254-40/JACOBI DOCK

Spaces on the command line in the name of the system might be causing issues there, also the system should have a @ before it. But it probably isn't necessary to put the system anyway. You could try:
trade.py update -F @lp25440/jacobidock
trade.py update -F jacobid


...and when i tried importing it says



trade.py import -i http://kfs.org/td/prices
Connecting to server: http://kfs.org/td/prices
Download: 2,735,863/2,735,863 bytes | 60.53KB/s | 100.00%
import.prices:3781 Unrecognized STAR/Station, 'ALACARAKMO/WEYL GATEWAY'.
import.prices:27487 Unrecognized STAR/Station, 'HELVETITJ/FRIEND ORBITAL'.
import.prices:42007 Unrecognized STAR/Station, 'LHS 6309/JONES STATION'.
import.prices:42097 Unrecognized STAR/Station, 'LHS 6309/NOETHER CITY'.
import.prices:50833 Unrecognized STAR/Station, 'MANNONA/THORNYCROFY PENAL COLONY'.


trade.py import -i --maddavo
Connecting to server: http://www.davek.com.au/td/prices.asp
Download: 2,735,863/2,735,863 bytes | 68.57KB/s | 100.00%
import.prices:3781 Unrecognized STAR/Station, 'ALACARAKMO/WEYL GATEWAY'.
import.prices:27487 Unrecognized STAR/Station, 'HELVETITJ/FRIEND ORBITAL'.
import.prices:42007 Unrecognized STAR/Station, 'LHS 6309/JONES STATION'.
import.prices:42097 Unrecognized STAR/Station, 'LHS 6309/NOETHER CITY'.
import.prices:50833 Unrecognized STAR/Station, 'MANNONA/THORNYCROFY PENAL COLONY'.

See comment above regarding Station.csv .

also is there an GUI version yet?
Not that I know of.
 
You need a later Station.csv file that has that station in it, OR you can add that station to your Station.csv . It's probably worthwhile getting a later Station.csv since you may also be missing other stations.



Spaces on the command line in the name of the system might be causing issues there, also the system should have a @ before it. But it probably isn't necessary to put the system anyway. You could try:
trade.py update -F @lp25440/jacobidock
trade.py update -F jacobid




See comment above regarding Station.csv .


Not that I know of.

I just got the program today, shouldnt it of grabbed the latest 1? Im using source tree and when I went to https://bitbucket.org/kfsone/tradedangerous I've clicked the button that says "clone" wasent that what I was supose to do?

If so then how am I supposed to update the station.csv?
 
Last edited:
i just got the program today, shouldnt it grabbed the latest 1? how do i update the station.csv ? im using source tree when i went to the site i clicked the button that says "clone"

The Station.csv changes all the time - less often than the prices, but whenever someone adds prices for a new station then you need a new Station.csv. See http://www.davek.com.au/td/ for the prices file and the Station.csv required for viewing the prices. The Station.csv there is automatically updated when prices for new stations are added to the database.
 
The Station.csv changes all the time - less often than the prices, but whenever someone adds prices for a new station then you need a new Station.csv. See http://www.davek.com.au/td/ for the prices file and the Station.csv required for viewing the prices. The Station.csv there is automatically updated when prices for new stations are added to the database.

I thought the trade.py import -i --maddavo command automaticaly pulls all that?
 
Last edited:
o well it would be cool if it imported everything needed

There are different people's needs though. Some people like to maintain their own station.csv and system.csv with just the systems/stations they have visited, but they do want the prices.

The prices are the most dynamic part of the data. You can normally get away with updating just the prices. But if you ever get errors like that, you know you need the other files too.
 
ok im getting this error when im trying to display it on my x52 pro


trade.py run -vvv --fr NIMA/RUSH --cr 5000 --cap 4 --ly 8 --x52-pro
WARNING:root:DLLError 193
mfd: error#193: Unable to initialize the Saitek X52 Pro module: possible 32/64 bit mismatch between Python interpreter and DLL. Make sure you have installed both the 32- and 64-bit driver from Saitek's website
 
Last edited:
is there a way that i can set my own stations?
example: --fr nima/rash --then nima/burbank --to nima/rush

so i can see what's best to trade from "nima/rush" to "nima/rash" stations so i can have a whole loop going

the loop would be example: nima/rush -> nima/rash -> nima/burbank -> nima/rush
 
Last edited:
Back
Top Bottom