In-Development TradeDangerous: power-user trade optimizer

ok now when i copied the station and systems over today and then ran the trade.py import -i --maddavo command it said

trade.py import -i --maddavo
NOTE: Rebuilding cache file: this may take a moment
TradeDangerous.prices:3177 Unrecognized STAR/Station, 'ANAPOS/HERSCHEL PLATFORM'.
TradeDangerous.prices:27580 Unrecognized STAR/Station, 'MANNONA/THORNYCROFY PENAL COLONY'.
TradeDangerous.prices:31405 Unrecognized STAR/Station, 'ORERVE/WATSON SATION'.
TradeDangerous.prices:37519 Unrecognized STAR/Station, 'TRELLA/O COLONY'.
TradeDangerous.prices:37582 Unrecognized STAR/Station, 'TYR/GLASHOW'.
Connecting to server: http://www.davek.com.au/td/prices.asp
Download: 2,968,075/2,968,075 bytes | 53.86KB/s | 100.00%
import.prices:63435 Unrecognized item name, 'Slaves'.
 
ok now when i copied the station and systems over today and then ran the trade.py import -i --maddavo command it said

trade.py import -i --maddavo
NOTE: Rebuilding cache file: this may take a moment
TradeDangerous.prices:3177 Unrecognized STAR/Station, 'ANAPOS/HERSCHEL PLATFORM'.
TradeDangerous.prices:27580 Unrecognized STAR/Station, 'MANNONA/THORNYCROFY PENAL COLONY'.
TradeDangerous.prices:31405 Unrecognized STAR/Station, 'ORERVE/WATSON SATION'.
TradeDangerous.prices:37519 Unrecognized STAR/Station, 'TRELLA/O COLONY'.
TradeDangerous.prices:37582 Unrecognized STAR/Station, 'TYR/GLASHOW'.
Connecting to server: http://www.davek.com.au/td/prices.asp
Download: 2,968,075/2,968,075 bytes | 53.86KB/s | 100.00%
import.prices:63435 Unrecognized item name, 'Slaves'.

for the slaves you need the latest version of TD, that was added recently. the others should have been solved with updating the system/station csv files. did you put the downloaded files in the data directory?
 
for the slaves you need the latest version of TD, that was added recently. the others should have been solved with updating the system/station csv files. did you put the downloaded files in the data directory?

yes i did put them in the data directory, and for the latest version of td do i just use the "fetch" button in SourceTree?


when i click "pull" it says

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin

git -c diff.mnemonicprefix=false -c core.quotepath=false pull --no-commit origin master
From https://bitbucket.org/kfsone/tradedangerous
* branch master -> FETCH_HEAD


Updating 505f9ce..a3dd276

error: Your local changes to the following files would be overwritten by merge:
data/Station.csv
Please, commit your changes or stash them before you can merge.
Aborting




Completed with errors, see above.
 
Last edited:
As a rule of thumb every time you update your prices you should do the following three things:
1) Upload your TradeDangerous.prices file to Maddavos page (this is probably meant by "commit" above)
2) Download the same prices to a different folder first (you might want to check if your prices are in) before copying it to your folder
3) Download the Station.csv in a similar manner as 2) in case you added new stations (else simply overwrite it)
 
no, thats not it im talking about the StationTree program it wont "pull" unless it commits changes but idk how o let it commit changes or force pull it
 
I really like this tool, I have my Macbook always next to me and I prefer to enter the data there, which works great with this tool. Thank you.

However, I have a problem with the actuality of the data. :( Seems like around the system I currently trade in (Cosi), a lot profitable routes have been nerved or changed, nobody seems to be interested in metals anymore and the refineries are dealing with electronics (I really don't know what happened to trading :( ).
Anyway, the problem is that most profitable runs that are given to me are based on out-of-date data (even though I sync with maddavo daily and update stations like crazy, but I guess the runs base don the updated data are not that promising).
So it would be really helpful for me to have an "--avoid" option that is based on time, like "--avoid=2d" would ignore all stations with data older than 2 days. Is that possible?
Or is there another possibility to solve that problem?

There's some discussion going on about this right now - my inclination is to add a weighting or ranking system. Right now it chooses a run based solely on profit. This would start with the profit as a score and then adjust it based on (a) age of data, (b) distance to the destination system.

IMHO the advantage to this is that you won't see "no profitable routes" instead of "sure, there's a run that'd make you a billion credits but the data is old". It makes it easier to do things like the scripts/td* scripts which have kind-of fire-and-forget settings.
 
no, thats not it im talking about the StationTree program it wont "pull" unless it commits changes but idk how o let it commit changes or force pull it

I think I may need to make it so that the *.csv files that come with TD are defaults so that you can have your own version that overrides them and ignore the stuff that comes-with entirely.

For now - what you'll need to do is go into sourcetree;
On the left, under "File Status" click "Working Copy"
You should now see "unstaged files" and you should see the files you've changed shown with a little yellow icon (Station.csv, etc). Right click on them and select "discard". Then you can pull.

You *could* do the whole commit thing, which would then try to combine the incoming changes with those you've "made" ('git' doesn't care that you've replaced the file entirely, it just sees that as a source of many changes), but then you'd have to know how to deal with merges when an incoming change conflicted with what you'd done and .. yadda yadda.

So ... 'discard' the changes, do the pull, then replace with the maddavo files. Or, stick with the td files and bear with it while we get the official files synced (I like to go check that the names actually exist before adding them to td's source files)
 
I think I may need to make it so that the *.csv files that come with TD are defaults so that you can have your own version that overrides them and ignore the stuff that comes-with entirely.

For now - what you'll need to do is go into sourcetree;
On the left, under "File Status" click "Working Copy"
You should now see "unstaged files" and you should see the files you've changed shown with a little yellow icon (Station.csv, etc). Right click on them and select "discard". Then you can pull.

You *could* do the whole commit thing, which would then try to combine the incoming changes with those you've "made" ('git' doesn't care that you've replaced the file entirely, it just sees that as a source of many changes), but then you'd have to know how to deal with merges when an incoming change conflicted with what you'd done and .. yadda yadda.

So ... 'discard' the changes, do the pull, then replace with the maddavo files. Or, stick with the td files and bear with it while we get the official files synced (I like to go check that the names actually exist before adding them to td's source files)

thank you :3
 
Just checked in 6.2.1

v6.2.1 Dec 12 2014
. (kfsone) Added "olddata" command
. (kfsone) "run" (with -vv) will now show data age
. (kfsone) Gamma 2.0.5 renamed "Slaves" category to "Slavery"
. (kfsone) "sell" now has a --ages option too
. (kfsone) "buy" and "sell" --near now checks the station/system too
. (kfsone) "buy" now shows average cost if you specify --detail (-v)
. (kfsone) "sell" now shows average value if you specify --detail (-v)
. (kfsone) Fixed item name matching (--avoid)
. (kfsone) Fixed use of via in "run"
. (kfsone) Exposed cache.regeneratePricesFile()
. (kfsone) Call regeneratePricesFile() after calling plugin.finish()
. (kfsone) General code cleanup (removed buildLinks and loadTrades)
. (kfsone) Added VisualStudio pyproj (great for performance analysis)
+ Stations, distances, ship data: gazelle, gulasch, kfsone, mseven
 
how do i upload the prices and which file do i upload? i made alot of changes in the NIMA system i mean there were alot of really huge differences also updated Branglal cause like it was missing 80% of its resources in the prices, and the 2ed station there had NO price data for it except for 2 resources
 
Last edited:
how do i upload the prices and which file do i upload? i made alot of changes in the NIMA system i mean there were alot of really huge differences also updated Branglal cause like it was missing 80% of its resources in the prices, and the 2ed station there had NO price data for it except for 2 resources
You can either upload the updated.prices file after each update OR you can upload your TradeDangerous.prices file as one big lot. The advantage of uploading after each update is that the data transfer is smaller so it is quick.
 
btw at the BRANGLAL/GIBSON HORIZONS station trying to update the prices gave me an error

*** ERROR ENCOUNTERED ***
*** YOUR UPDATES WILL BE SAVED AS prices.last ***
trade.py: prices.tmp:24 Unrecognized line/syntax,
got: 'Semiconductors 684 703 ? 24,563H'.


how do i open up the prices.last?
ok i can open it with notepad++ but how do i apply the changes? so that the program sees it
 
btw at the BRANGLAL/GIBSON HORIZONS station trying to update the prices gave me an error

*** ERROR ENCOUNTERED ***
*** YOUR UPDATES WILL BE SAVED AS prices.last ***
trade.py: prices.tmp:24 Unrecognized line/syntax,
got: 'Semiconductors 684 703 ? 24,563H'.


how do i open up the prices.last?
ok i can open it with notepad++ but how do i apply the changes? so that the program sees it

The comma in the stock was probably the problem.

To keep some of the data you updated, you could do a copy/paste from the prices.last to the new update file that opens when you do another update.
 
You can either upload the updated.prices file after each update OR you can upload your TradeDangerous.prices file as one big lot. The advantage of uploading after each update is that the data transfer is smaller so it is quick.

i just uploaded the TradeDangerous.prices file it only took like 30 seconds to upload
the systems I've updated is all the stations in NIMA and BRANGLAL

so how does the overwriting work on the server? example if someone has no data set for there stations in the systems i update will it get reset back to nothing? or back to what it was before i uploaded it?
 
Last edited:
btw at the BRANGLAL/GIBSON HORIZONS station trying to update the prices gave me an error

*** ERROR ENCOUNTERED ***
*** YOUR UPDATES WILL BE SAVED AS prices.last ***
trade.py: prices.tmp:24 Unrecognized line/syntax,
got: 'Semiconductors 684 703 ? 24,563H'.


how do i open up the prices.last?
ok i can open it with notepad++ but how do i apply the changes? so that the program sees it

Use

Code:
trade.py import prices.last
 


Dr Jackson, how are you editing the prices? Are you using a text editor or are you using the UI? E.g. to use the GUI to edit Rasheed Station in Nima:

Code:
trade.py update -GF nima/rash

(The advantage of this is that if you have ED in windowed mode, the TD window will sit infront of ED)

-Oliver
 
to redo the prices.last i just typed them and copied them into each individual box in the GUI... and then made sure they were all correct so that it would work. I COULD use NOTEPAD++ to edit them though but i just chose to use the GUI instead so that everything was done correctly.


Here are the commands that I have used:


trade.py update nima/rush -F -A

trade.py update nima/rash -F -A

trade.py update nima/bur -F -A

trade.py update branglal/skri -F -A

trade.py update branglal/gib -F -A
 
Last edited:
i just uploaded the TradeDangerous.prices file it only took like 30 seconds to upload
the systems I've updated is all the stations in NIMA and BRANGLAL

so how does the overwriting work on the server? example if someone has no data set for there stations in the systems i update will it get reset back to nothing? or back to what it was before i uploaded it?

There is a process that runs on the server that compares incoming prices to the database. The prices are all UTC timestamped in the prices files. The timestamp is used to determine if the price is newer than what is already in the database and thus should be updated. The server also inserts any new prices if they don't already exist in the database. If any prices were added or updated, then it regenerates the TradeDangerous.prices file that is available for download. If any new stations were added, then it regenerates the Station.csv file that is available for download.
 
Back
Top Bottom