In-Development TradeDangerous: power-user trade optimizer

I am actively trying to keep up with pull-requests from people who are forking the repos to make changes, and I'm trying also to give credit in the readme etc.

-Oliver

One idea that solves this problem I have seen earlier was having an AUTHORS file in the project root directory (with name and email address). This way the authors themselves were referenced in the readme/credits only indirectly.

Perhaps the file was sorted alphabetically. One could easily see in git who does most of the work (where credit is due) anyway.

Then everyone making a pull request was required to add herself/himself to the AUTHORS file for their first pull request. Problem solved.
 
I've never been great at UIs (http://web.archive.org/web/20071015121411/http://kfs.org/~oliver/617/, http://web.archive.org/web/19981212012359/http://about.warbirds.org/, http://web.archive.org/web/20020803094040/http://oliver.kfs.org/daoc/, http://web.archive.org/web/20020701055226/http://www.kfs.org/arctest/, http://web.archive.org/web/20020704121346/http://www.kfs.org/memtest/ plus I'm kind of to blame for that ****ty "Voice Comms" dialog that Windows XP inherited from Battlefield Communicator which was based on a prototype I knocked up for BFC).

I'm more of a systems programmer, so ... as I said in the original blurb, I've built this so that people who are good at building front-ends can leverage the back-end code to power their tools; that's part of why this is open source.

Thanks for the explanation.

The challenge to create a GUI for this is there to be taken up then, I wish I had the ability to assist!
 
I'm more of a systems programmer, so ... as I said in the original blurb, I've built this so that people who are good at building front-ends can leverage the back-end code to power their tools; that's part of why this is open source.

Writing back-end code is more fun for me too. For my own trade planner (inspired by many projects, including TradeDangerous) I switched to using templates for the output, that way the problem of a frontend was partially solved. In the end the same code could be used for the both text and html output.

It was not updated for Beta 2 (code is in folders cmd/profit and planner within my project, but it looked like this. It was meant for offline use so the "details" link showing sell/buy/stock/demand does not work from the dropbox URL, only when the html was opened locally.
 
Smacker has a pull request with the latest systems data, but I have to eyeball it a little closer; I'm drawing wife agro and if I don't want to be KOS, I've got to scoot. I'll look at getting that merged asap tomorrow. Sorry, folks.

-Oliver
Hey, no worries. Totally understand. Sorry if I am a bit overwhelming , I was just in a creative phase this week :)
 
I'm still a rookie at handling push/pull requests. For the most part it's easy, and I'm largely not clear on the etiquette. For instance, if someone submits a pull request but when I get to it it is way behind master, am I being a if I decline and say "rebase, dude"?

-Oliver
Perfectly reasonable request. Especially if you get lots of conflicts.
 

ShadowGar

Banned
I'm still a rookie at handling push/pull requests. For the most part it's easy, and I'm largely not clear on the etiquette. For instance, if someone submits a pull request but when I get to it it is way behind master, am I being a if I decline and say "rebase, dude"? (there's a good chance that if they simply resync with master any merge conflicts will go away).

I'll also look into adding at least one more person to the admin status on the repos, I won't name names because I don't want to pressure them :)

-Oliver

I don't know if its official proper etiquette but I know it is aggravating to do a ton of work on something to find out it was already done a week ago. Plus its even more aggravating to sync with main, add my code and someone behind the times makes a pull request with basically the same code and it overwrites everything I did for no reason. If it's adding newer stuff than I understand. Its just some people do that to claim code and step on other contributors. But that isn't happening here. I've seen that in other projects I've worked on.

And for the sake of main it is wise to sync first before adding something. You may have redone a core feature in 4.2.1 and someone with 4.0.2 added something to a now defunct core which will just add irrelevant code.

But it is whatever the main owner wants done. :)
 
Last edited:
Oh very nice :) I was thinking about doing something similar. I am impressed.

As the creator of the Elite: Dangerous - Beta 1 map you sort of did it already. :)

You could duplicate the effort, but beware, then you would also duplicate the fun. :D Apart from the HTML/JS/CSS part. While sorting that out my children would have learned a lot of new nasty words, inappropriate for their age if they weren't sleeping already.

I guess it would make sense to do something like this on top of TradeDangerous as well. My project is written in go, not python. Then trade routes could be shown in a nice interactive graphic.
 
Random question looking ahead to when people are potentially scattered across a large area and, more significantly, FD may not provide coordinate information, perhaps a "manual navigation" mode might be suitable? Rather than basing the route on jump ranges, base it on a list of systems that the player knows are within range?
 
Random question looking ahead to when people are potentially scattered across a large area and, more significantly, FD may not provide coordinate information, perhaps a "manual navigation" mode might be suitable? Rather than basing the route on jump ranges, base it on a list of systems that the player knows are within range?
I would be surprised if FD don't add some sort of multi-hop navigation into the game. Let's see what beta3 brings :)
 
Hello everyone,

Thanks for all the work put into this, it does look like a great tool.

I'm hoping that you can help me sort out a data import, I've browsed through the thread, but for the life of me can't seem to get it working.
I've grabbed a copy of the TradeDangerous.prices from Maddavo's Market Share and placed it in the .\data folder.
Whatever I try to run with it I receive an error:
Code:
C:\td>trade.py run --credits 25000 --ship COBRA --capacity 24 --from Dahan --insurance 14000 --hops 5
Traceback (most recent call last):
  File "C:\td\trade.py", line 1030, in <module>
    main()
  File "C:\td\trade.py", line 1019, in main
    tdb = TradeDB(debug=args.debug, dbFilename=args.db)
  File "C:\td\tradedb.py", line 346, in __init__
    self.reloadCache()
  File "C:\td\tradedb.py", line 413, in reloadCache
    buildcache.buildCache(dbPath=self.dbPath, sqlPath=self.sqlPath, pricesPath=self.pricesPath, debug=self.debug)
  File "C:\td\buildcache.py", line 182, in buildCache
    processPricesFile(tempDB, pricesPath, debug=debug)
  File "C:\td\buildcache.py", line 143, in processPricesFile
    for price in priceLineNegotiator(pricesFile, db, debug):
  File "C:\td\buildcache.py", line 92, in priceLineNegotiator
    stationID, categoryID, uiOrder = systemByName[stationName], None, 0
KeyError: 'LHS 6309/Rangarajan Platform'

It's always the same station and the same error, any clue?

Thanks in advance,
Iotzan
 
Apparently there is interest to have easier access to the systems data of TradeDangerous. I figured this could be done with minimal burden on TradeDangerous developers with git submodules: effectively the "data" subdirectory would be a pointer to another repository.

If Oliver would consider such a patch at some point, I would be happy to do it to give something back to the project. Otherwise I see no point of doing it (then it would be just another fork, and a rather useless one). Let me know what you think.
 
Hi, Vixus; please get the latest version of TD (the one I just pushed) and let me know if you still have this problem. I've normalized some of the error handling so that errors like these should have better user feedback (in this case, it should be more succinct - a one liner - and yet more descriptive).

Hi!

I've pulled the latest version and tried again..
2014-10-17_15-39-47.png
 
All right, I got it to work!
I deleted the @ LHS 6309/Rangarajan Platform and the @ MELIAE/Dupuy De Lomes Pride sections from the downloaded TradeDangerous.prices and everything seems fine. Can't wait to get home and try to start gaining some cash back after buying my Cobra.

I didn't have much time to look into the .sql filem but I suspect that these 2 are simply omitted from there. How can they be added?
 

ShadowGar

Banned
This worked -- Thank you very much!

Those stations are not in TD. Someone is using a modified version of TD that submitted those prices. We will add them in so everyone doesn't have to remove them from the prices file.

This is the reason we ask people to use the main and submit fixes or additions to main so we don't have multiple copies with different data.
 
I didn't have much time to look into the .sql filem but I suspect that these 2 are simply omitted from there. How can they be added?

Just add the new stations after the last 'INSERT "Station" VALUES(ID#, ..." command with new ID# (lastID#+1). For this to work the system must be known of course.

Code:
INSERT INTO "Station" VALUES(286, 'Rangarajan Platform', (SELECT System.system_id FROM System WHERE System.name = 'LHS 6309'), 0.0);
INSERT INTO "Station" VALUES(287, 'Dupuy De Lomes Pride', (SELECT System.system_id FROM System WHERE System.name = 'MELIAE'), 0.0);
 
Yes but if the in-game navigation is good enough then you won't need TD to do the navigation, just the profits.

The value of a trade route depends greatly on the length of the route, and the stops in between those are necessary, therefore routing is also necessary. Otherwise the user has to specify which systems he thinks can be reached, but then it would be still good to know if a hop can be done without refueling. My planner used the number of jumps plus the numbers of refuels needed, the latter being multiplied by a factor (default 10) to calculate the cost of a trade hop. Did you came up with a better method?
 
Back
Top Bottom