In-Development TradeDangerous: power-user trade optimizer

Ok - strongly encourage folks who haven't already to get the latest version of TD.

- "trade.py import" command to import prices from a file without clobbering all your other data,
- "trade.py update -GF" now provides a GUI. The 'F' tells it to make itself the front-most window so you can see it infront of TD,
- You can leave boxes empty in the UI if you want them to default to '?' (I'll make them default soon),
- For stations with no data yet, add '-A' to "Add" items (also if you get an exception about a list index; I'll tidy that up shortly),
- The 20,000 Systems that maddavo synced from MB,
- Lot of the stations around Aiabiko so it's working well with Maddavo's data right now.

I'll work on improving how we add stations in the next few days so it's not so much of a problem.

I'll try and do a cleanup-pass on the update GUI this weekend.
 
I think that this may be a question more for maddavo than you kfsone.

But if I want to operate as a lone trader who keeps my own database of trade data, who is prepared to share it with others, but who doesn't want their data (I want to discover things on my own), can you confirm the steps.


  • Empty the tradedangerous.prices file apart from data I've added myself.
  • keep the station.csv and system.csv from maddavo site
  • add/upkeep my own trade data using trade.py update
  • If I discover a system or station that isn't in the database, try and download newer station.csv and system.csv. If the system/station is still not present, add them myself
  • To add a system use the link that maddavo gave me to get coordinates
  • When I'm feeling generous upload my .prices file to maddavo


Have I got that right?
 
Last edited:
I think that this may be a question more for maddavo than you kfsone.

But if I want to operate as a lone trader who keeps my own database of trade data, who is prepared to share it with others, but who doesn't want their data (I want to discover things on my own), can you confirm the steps.


  • Empty the tradedangerous.prices file apart from data I've added myself.
  • keep the station.csv and system.csv from maddavo site
  • add/upkeep my own trade data using trade.py update
  • If I discover a system or station that isn't in the database, try and download newer station.csv and system.csv. If the system/station is still not present, add them myself
  • To add a system use the link that maddavo gave me to get coordinates
  • When I'm feeling generous upload my .prices file to maddavo


Have I got that right?

Yep, looks good. Basically just don't download the prices file.
 
Part of the reason I have TD lurking here in the user-creations forum is that I recognize it's very much a power-user tool. I've tried to build it in such a way that other developers might be able to build on it and use it for the heavy-lifting for their own tools.

To that end, there are a couple of people building things with TD, one of which is Lars project to use something called "flask" to turn TD into a browser-based app that you run locally (you don't need a web server), and someone else was building a GUI.
Ah I see, so its essentially an SDK?

Generating a multi step trading route and printing it to my orange Logitech G13 screen would be so damn sweet. :')

Updating the system prices seems to be a bit of a pickle right now though. A while ago there was a Polish man who made this fantastic OCR scanner app that would just print data to a server by reading text straight from your game screen, sadly that's limping behind 6 months by now, and it no longer works. Has anyone figured out something clever to make data entry/updating a bit easier?
 
Updating the system prices seems to be a bit of a pickle right now though. A while ago there was a Polish man who made this fantastic OCR scanner app that would just print data to a server by reading text straight from your game screen, sadly that's limping behind 6 months by now, and it no longer works. Has anyone figured out something clever to make data entry/updating a bit easier?

Right now, there isn't (a FD approved way). You should do some work yourself to gain credits ;)

FD said they will implement an API in the future to get access to the ingame data. When that's released I'm sure someone will think of something.

There is an iPad/iPhone app which does display market data based on your current location. Someone allready found a way to get the data but didn't share a "howto" and Michael Brooks stated it should not be done.
 
There is an iPad/iPhone app which does display market data based on your current location. Someone allready found a way to get the data but didn't share a "howto" and Michael Brooks stated it should not be done.

That was me. I'm not sure if i should give a "howto" since Michael said that they don't want us to use the data outside the app. But there is definitly interesting stuff in that data. Sadly no system coordinates.
 
That was me. I'm not sure if i should give a "howto" since Michael said that they don't want us to use the data outside the app. But there is definitly interesting stuff in that data. Sadly no system coordinates.

I was explicitly vague about that, so you won't get spamed with PMs how you've done it. I myself was very tempted to just ask you how you've done it (I have no iPad/iPhone to check it out), so I can use it to fill my market data without typing it in myself.
 
I really love this tool, great job!
for those windows users, who might want to use aliases for quicker access and less typing :)

create a file macros.txt - sample contents:
trun=trade.py run -v --ship cobra --cap 34 --insurance 70000 $*
trup=trade.py update --vim $*

then create a batch that loads this file and opens a cmd-shell
DOSKEY /MACROFILE=[path_to_file]\macros.txt
START /B CMD

now you have quick access to all your presets :)
 
Quick feedback on the update feature. It lists items in alphabetical order. For some reason, in the Machinery section, the game lists MINERAL EXTRACTORS before MICROBIAL FURNACES.
 
I have flown through 3 systems this morning that don't appear in maddavo's system.csv. The common factor beween them is that they are Anarchies and/or my rubbish scanner has not found any stations. I mapped their co-ordinates using this link. If you wish to paste them into your system.csv, open the spoiler.

Code:
'Cephei Sector NX-U B2-6',-91.96875,0.78125,-29.03125,'Gamma1','2014-11-26 15:00:00'
'Cephei Sector NX-U B2-7',-96.53125,1.3125,-29.09375,'Gamma1','2014-11-26 15:00:00'
'Cephei Sector KM-W C1-24',-99.28125,-1.15625,-23.28125,'Gamma1','2014-11-26 15:00:00'

Please can you tell me how to force trade.py to print out all the steps along the way with a 'nav' argument.
 
Last edited:
My apologies for piping in here as I am not a programmer (not even close) but since most of the ones doing posting are, I thought I would offer thoughts....

In my attempts to find something viable for a faster method of entering market information, I discovered something that hopefully someone can put to good use. I have tried it myself and the results for just a couple of seconds of work can put the text output from the entire screen into the windows clipboard. If you manually select only the first 3 columns, the data entry is nearly flawless.

There is a screen shot program out there, getgreenshot.org, which is not only completely free, but also has both the ability of being called by external applications as well as having an OCR integrated plugin which works very effectively with the font used by Elite.

If someone is willing to figure out a way to use this output, as well as how to call from an external program, I am willing to do extensive testing for the sake of helping the trading community as a whole. This method does not touch the elite application at all, not even a hook. It just reads the screen.

Again, I just don't know how to do what I know can be done and this tool is completely free... I am only trying to help.
 
I think that this may be a question more for maddavo than you kfsone.

But if I want to operate as a lone trader who keeps my own database of trade data, who is prepared to share it with others, but who doesn't want their data (I want to discover things on my own), can you confirm the steps.


  • Empty the tradedangerous.prices file apart from data I've added myself.
  • keep the station.csv and system.csv from maddavo site
  • add/upkeep my own trade data using trade.py update
  • If I discover a system or station that isn't in the database, try and download newer station.csv and system.csv. If the system/station is still not present, add them myself
  • To add a system use the link that maddavo gave me to get coordinates
  • When I'm feeling generous upload my .prices file to maddavo


Have I got that right?

Pretty much. Might want to add a step to "git pull" to update your copy of TD periodically - it continues to change at a fairly fast rate :) "git pull and check the CHANGES.txt file" :)

I'm expecting a lot of people will want to run independently -- either solo or with a small circle of friends, and the work I'm doing to integrate maddavo's data I will do in the usual modular fashion to allow people to Do My Own Thing(TM), so the maddavo stuff will basically be a default integrator plugin.

You can also bypass TD's System and Station stuff yourself, TD is mostly the engine and if you feed it data it'll do its thing. But crowd-sourcing the System and Station data is probably a good idea and there's really not a lot of point in redoing the Category/Item tables but there's no reason you couldn't make your own :)

After that it's just down to the .prices file, but that *is* fairly dependent on the Station data. Maddavo's Station.csv only has stations that have price information, so any stations that are non-market stations won't be listed there which might be a problem for refueling stops or if someone wants to record where ships are bought (I kind of gave up tracking the ship vendors because it was more work than I could manage with everything else).

- - - - - Additional Content Posted / Auto Merge - - - - -

Ah I see, so its essentially an SDK?

Generating a multi step trading route and printing it to my orange Logitech G13 screen would be so damn sweet. :')

Essentially - there's an "mfd" directory for multi-function display drivers. Right now it only supports the X52 because that's what I have, but if the logitech api isn't insane, it wouldn't hard to implement. See "trade.py run ... --checklist --x52" :)

Updating the system prices seems to be a bit of a pickle right now though. A while ago there was a Polish man who made this fantastic OCR scanner app that would just print data to a server by reading text straight from your game screen, sadly that's limping behind 6 months by now, and it no longer works. Has anyone figured out something clever to make data entry/updating a bit easier?

Can't speak to that - I've done a POC but I'm not going to use or publish it or do anything for the specific purpose of supporting such work. At the moment the new GUI for doing updates is making it a lot easier to put prices in, and I'm planning to make it a lot more efficient for the majority of people by disabling the "DEMAND" columns and making it more obvious that you don't need to fill out "supply" unless it's under 10k (otherwise ? is perfectly fine). After that, there are a few last tweaks that I think make it pretty fast. Couple with options like maddavos and it's going to be fairly slick.
 
Last edited:
Quick feedback on the update feature. It lists items in alphabetical order. For some reason, in the Machinery section, the game lists MINERAL EXTRACTORS before MICROBIAL FURNACES.

For now, edit that system with one of the text editor options and swap the lines around. TD still remembers used-specified ordering.

- - - - - Additional Content Posted / Auto Merge - - - - -

I have flown through 3 systems this morning that don't appear in maddavo's system.csv. The common factor beween them is that they are Anarchies and/or my rubbish scanner has not found any stations. I mapped their co-ordinates using this link. If you wish to paste them into your system.csv, open the spoiler.

Code:
'Cephei Sector NX-U B2-6',-91.96875,0.78125,-29.03125,'Gamma1','2014-11-26 15:00:00'
'Cephei Sector NX-U B2-7',-96.53125,1.3125,-29.09375,'Gamma1','2014-11-26 15:00:00'
'Cephei Sector KM-W C1-24',-99.28125,-1.15625,-23.28125,'Gamma1','2014-11-26 15:00:00'

Please can you tell me how to force trade.py to print out all the steps along the way with a 'nav' argument.

The "--detail" or "-v" option; it's cumulative, so "-vvv" is 3x more verbose than "-v".

- - - - - Additional Content Posted / Auto Merge - - - - -

I really love this tool, great job!
for those windows users, who might want to use aliases for quicker access and less typing :)

create a file macros.txt - sample contents:
trun=trade.py run -v --ship cobra --cap 34 --insurance 70000 $*
trup=trade.py update --vim $*

then create a batch that loads this file and opens a cmd-shell
DOSKEY /MACROFILE=[path_to_file]\macros.txt
START /B CMD

now you have quick access to all your presets :)

I use git bash on Windows as my shell. You can probably do similar things with CMD and PowerShell, but what I do is have a file called "config.sh" and scripts like "trun.sh".

Code:
# config.sh
LY=7.56
CAP=4
JUMPS=4
CR=28086

Code:
# trun.sh
. config.sh # loads values from config.sh
trade.py --ly=${LY} --cap={$CAP} --jumps=${JUMPS} --cr=${CR} $*

Then I can just do:

Code:
$ trun --from huiport --hops 2

and when I make more money or tune my ship, update the config. But the *last* value of any argument is always the one that TD uses, so I can also do:

Code:
$ trun --from huiport --hops 2 --cap 2

if I've picked up a mission that's using 2 of my capacity.
 
I have flown through 3 systems this morning that don't appear in maddavo's system.csv. The common factor beween them is that they are Anarchies and/or my rubbish scanner has not found any stations. I mapped their co-ordinates using this link. If you wish to paste them into your system.csv, open the spoiler.

Code:
'Cephei Sector NX-U B2-6',-91.96875,0.78125,-29.03125,'Gamma1','2014-11-26 15:00:00'
'Cephei Sector NX-U B2-7',-96.53125,1.3125,-29.09375,'Gamma1','2014-11-26 15:00:00'
'Cephei Sector KM-W C1-24',-99.28125,-1.15625,-23.28125,'Gamma1','2014-11-26 15:00:00'

Please can you tell me how to force trade.py to print out all the steps along the way with a 'nav' argument.

Thanks dry, will take a look later.

Bear in mind that Maddavo discards stations which don't have price data.
 
Thanks dry, will take a look later.

Bear in mind that Maddavo discards stations which don't have price data.

I'm fairly confident that they have the correct co-ordinates. They are output by trade.py as interim jumps where I would expect them to be.
 
Quick feedback on the update feature. It lists items in alphabetical order. For some reason, in the Machinery section, the game lists MINERAL EXTRACTORS before MICROBIAL FURNACES.
Yeah, I was getting annoyed with that too. This is because TD displays the data in the order in which it appears in the prices file, and my prices file is generated in Category/Item alphabetical order. The game was headed towards that in Beta2, but with some name changes of items in Beta 3 and Gamma they didn't reorder the items. I was kinda hoping that they would fix up the order but as we're getting closer to release I get the feeling that it's going to stay as it is.

I have changed the code to generate the prices file so that order of Mineral Extractors and Microbial Furnaces are swapped now.
 
Last edited:
Back
Top Bottom