Community Event / Creation TradeDangerous GUI front end

Okay, I just pushed v1.03c. Hopefully that fixes most of the UI weirdness so far. Also, the Rare command is in--sort of. I'm not really happy with how TD's Rare command works, so I'm exploring some commits to extend the functionality a bit.
 
Last edited:
looking good, one query, if i enter 12.83 for example in the ly laden box, when i select run it use 12.82? only niggley ( do you need to use int and decimals? if you are just copying the value and adding it to a command line? or do you run some math? then they can all be strings?)

also could you read from the maddavo.stamp file and calculate to use full if greater than 48 hours, 2d less than 48 hrs and 3hr option if less that 3 hour?

Thanks
 
looking good, one query, if i enter 12.83 for example in the ly laden box, when i select run it use 12.82? only niggley ( do you need to use int and decimals? if you are just copying the value and adding it to a command line? or do you run some math? then they can all be strings?)

also could you read from the maddavo.stamp file and calculate to use full if greater than 48 hours, 2d less than 48 hrs and 3hr option if less that 3 hour?

Thanks

Hmm, I'll look into both issues for the next release. I'm currently busy with rewriting the rare command.

(Edit: The way I'm doing the rounding of decimals is unnecessary, and I'm embarrassed at how I implemented it. I'll fix it when I add the new "market" command with the next release. As for the timestamp checking, and the update feature as a whole, I'll definitely look into improving that very soon. Thanks for the suggestion.)
 
Last edited:
something like this for the maddavo thingy?

Code:
private string CheckMadDavoLastUpdateTimestamp()        {
            try
            {


                string[] Lines = File.ReadAllLines(blar blar "/data/maddavo.stamp");
                DateTime lasttimestamp = Convert.ToDateTime(Lines[0]);


                var hours = (DateTime.Now - lasttimestamp).TotalHours;
                
                if (hours >= 0 && hours < 3)
                {
                    
                    //"Downloading 3h file";
                    return "--opt=use3h";
                }
                else if (hours >= 3 && hours < 48)
                {
                    
                    //"Downloading 2d file";
                    return "--opt=use2d";
                }
                else if (hours >= 48)
                {
                    //"Downloading full file";
                    return "--opt=usefull";
                }
                else
                {
                    //"Downloading full file";
                    return "--opt=usefull";
                }
            }
            catch
            {
                //"Downloading full file";
                return "--opt=usefull";
            }


        }
 
something like this for the maddavo thingy?

Code:
private string CheckMadDavoLastUpdateTimestamp()        {
            try
            {


                string[] Lines = File.ReadAllLines(blar blar "/data/maddavo.stamp");
                DateTime lasttimestamp = Convert.ToDateTime(Lines[0]);


                var hours = (DateTime.Now - lasttimestamp).TotalHours;
                
                if (hours >= 0 && hours < 3)
                {
                    
                    //"Downloading 3h file";
                    return "--opt=use3h";
                }
                else if (hours >= 3 && hours < 48)
                {
                    
                    //"Downloading 2d file";
                    return "--opt=use2d";
                }
                else if (hours >= 48)
                {
                    //"Downloading full file";
                    return "--opt=usefull";
                }
                else
                {
                    //"Downloading full file";
                    return "--opt=usefull";
                }
            }
            catch
            {
                //"Downloading full file";
                return "--opt=usefull";
            }


        }

Time comparisons should be in UTC since that's what the plugin spits out. I've got a new push coming for v1.03d that adds something along those lines, fixes a bunch more UI bugs, and adds some new functionality before I start working toward adding rare trading in earnest. I'm also working on extending some of the functionality of TD to have it work better with the GUI, and hopefully be more comparable to Slopey's (sans gridview, atm).
 
could you also do multi updates, ie full then 2d then 3h ? to be completely upto date from maddavo?

As far as I'm aware that isn't necessary. The updates are mutually inclusive, i.e. full includes 2d and 3h, 2d includes 3h, and 3h is the smallest data-chunk served. Full should only be necessary when jump-starting a database after a few days, or a fresh git pull. In other words, older data is not always better; especially after patch 1.1 changed the way demand/supply works.
 
Last edited:
I never thought I would finish adding stuff to this "simple" update, but I finally pushed v1.03d. Lots of bug fixes and such. I'll be taking a little break from updating for a few days, unless there's some big showstopping bug that pops up, which I'll be using to try to write a proper rare route trading module for TD. Cheers :)
 
as you can see below if i just downloaded the full its only updated every 24 hours, so would need a 2d + 3h for total latest? if im reading it right?

TradeDangerous.prices24/02/2015 1:48:35 AMThis is the full prices file from the shared database, all data (all timestamps). It is generated every 24hrs.
TradeDangerous-2d.prices24/02/2015 11:00:10 AMThis is 2days worth of prices data. It is updated every 2 hrs.
TradeDangerous-3h.prices24/02/2015 12:32:01 PMThis is 3hrs worth of prices data. It is updated on demand after a batch of data is processed. These three files together comprise the entire price database.
 
Hmm, interesting. It seems like grabbing the 3h file every 30 minutes (the way I currently have it set) would be the best way to get the latest updates after a full database pull. I've got the 2d file set for anything over 3 hours though. I'll change it to grab 2d and 3h in the next update.

Nice catch on that one. The way the plugin is written seems to say that they're mutually inclusive, but it isn't explicit. I'll ask Maddavo for details next time I get a chance.
 
I got tired of staring at the bugfix commits in my repo, and decided to just go ahead and push them.

So there, have fun with v1.03e while I continue to work on a rare trading route module. :)
 
Last edited:
hi there,

should line 146 be something like this ?

if (forceUpdateCheckBox.Checked || diffHours > 48)

as the current line logic does a full update if greater than 3 and less than 48 hours?

Thanks
 
hi there,

should line 146 be something like this ?

if (forceUpdateCheckBox.Checked || diffHours > 48)

as the current line logic does a full update if greater than 3 and less than 48 hours?

Thanks

Well, looking over the code, the logic is something like:

Code:
if no database/timestamp or >3 hours and <48 hours or >48 hours
  do usefull
if >30 mins or <3 hours
  do use3h
if >3 hours or <48 hours
  do use2d
else
  assume we don't have to update

I gather that you're saying that there's a redundancy with usefull overriding use2d. You're correct; it was an oversight on my part, and I'll clean it up in the near future. Although it is annoyingly unnecessary, as far as I can tell it doesn't do any harm at the moment. After all, use2d is still run during a full update, which you can verify with the command line that pops up in the output during the update.

In addition to fixing that and a few other things I'll also be adding station editing and import.prices support for the next update. Hopefully I'll finish with that in a few days. I'm also continuing to work on the rare trading module; no ETA on when I'll finish with that. I would guess within a week or two based on the current progress.
 
Last edited:
Just merged my feature branch for v1.04. I polished off a bunch of nagging bugs and weirdness; also added some support for people that do quick OCR imports while I finish the more fully featured station editor/importer. Hopefully I can get that and the rare module finished in the next week or so, we'll see.

Cheers! :)
 
just want to put this out there, but the current system you have setup for editing doesn't work, because it takes the system name from the Source field, which you cannot edit, you must edit a station, so unless I'm missing something, the commodity editor is kinda useless right now.
 
just want to put this out there, but the current system you have setup for editing doesn't work, because it takes the system name from the Source field, which you cannot edit, you must edit a station, so unless I'm missing something, the commodity editor is kinda useless right now.

The way I've been using the editor is to:

1) Hit the C button while at a station to grab the most recent system name from the log
2) Click on the Source field and add "/NameOfStation" to the current system
3) Hit the E button, edit the contents, then close the window to create an updated.prices file.

It should tell you if the system/station name is wrong or not in the output log. I squashed a bug a ways back that prevented editing the source/destination boxes. They should work fine now, but if you're still having issues I'll take a look at it tonight.

I'm still in the process of finishing a more robust station editor for commodities and details. I'll probably end up taking a few passes at it, each pass should make it more in line with the features of the command line.
 
Okay, I just pushed v1.03c. Hopefully that fixes most of the UI weirdness so far. Also, the Rare command is in--sort of. I'm not really happy with how TD's Rare command works, so I'm exploring some commits to extend the functionality a bit.

I haven't been using it much, so let me know what I can do to improve it.

Great work!

-Ol
 
Back
Top Bottom