Log in

View Full Version : [FF]: FF Draft Assistant Rewrite


Vikesrock
22-06-2010, 01:39
As a project to refresh my programming skills this summer I plan to completely rewrite my FF Draft Assistant app as a full GUI application using GTK+.

Here's a current planned feature list:

Full Draft Setup Capabilities

Uses full player names (hopefully allowing spaces, likely no periods)
Option for randomized or entered player order
Option for randomized or entered random team list order
Settings for # of rounds and serpentine or standard draft for flexibility
Automatic pick time creation based on entered start time Built-in default time per round, and an option for manual configuration.
Automatic download and parsing of event team list (hopefully)
Manual entry if list is unavailable or parser fails
Robust list reader
Remove need for list ending character such as -1 or .
Automatically remove non-attending teams
Automatically match lists to tiers


Full Draft Running Capabilities
Manual, random and list pick options
Separate button for single list pick or multiple if possible
Visual indicator of players with lists with available teams (hopefully)
Intuitive pick edit capabilities
In-Draft List Editor
Option for auto draft running using list/random based on time (maybe)
Direct CD export
Possibly direct copy paste from in-program display

Save/Resume Functionality
Allow save at any point
Resume from single save file or from CD output + setup files


There may be more implemented if I think of things, but if anyone has anything they would like to see in a program like this please post here with your idea(s).

Chris is me
22-06-2010, 04:36
How about a way to "auto-rollback" a draft when a user posts a minute later going "oh i wanted team x that you gave to that guy"?

Vikesrock
22-06-2010, 14:07
How about a way to "auto-rollback" a draft when a user posts a minute later going "oh i wanted team x that you gave to that guy"?

Interesting, I'll have to think about that one.

Vikesrock
17-07-2010, 22:32
I have completed the draft setup portion of the new program that will create tier and random team text files similar to the last version. The auto team list portion is not working yet, I am having some issues with getting something written to download a webpage to a file. I am going to put that off for now and work on the portion that runs the draft.

Here's a screenshot of the "New Draft Wizard" with the "Edit Round Times" and "Manual Team List" dialog boxes open.

The edit round times dialog will adjust the number of boxes to match the number of rounds selected at the time.

http://i32.tinypic.com/6y3506.jpg

EricH
19-07-2010, 00:33
Kevin, I'll volunteer to run beta tests when you're ready for that. Ought to be able to use last year's or offseason team lists for that.

Vikesrock
23-07-2010, 14:48
Thanks Eric, I'm not there quite yet, but I'm getting closer.

Most of the draft setup is done (I did realize I forgot the option for an entered random list order, but it shouldn't be too bad to add)

The UI for the draft running is mostly done, the last thing I have to work out is how to display the text to copy-paste to CD. My current plan is to use an expander (one of those little triangles that expands when clicked) to show/hide a text box below the draft table.

Here's a peak at the draft running interface:

http://i29.tinypic.com/29p7nyo.jpg

Vikesrock
19-08-2010, 23:01
After having some trouble with the installer and less time to work on this than I would have liked I finally have a version of this program ready to test (I think).

The program is posted here (http://www.chiefdelphi.com/media/papers/2307) as FF_Draft_Assistant_setup.zip

Unfortunately the way it is currently written it is incompatible with both tier files and list files from the previous version.

I couldn't come up with a good way to parse the list files if the player names have spaces. Right now the program uses list files where the player names are followed by periods. I could switch back to no spaces in player names and no required periods in the list files if that seems like it would be easier.

There's a brief ReadMe and an example list file included in the install. Feel free to post or PM with any questions or anything that's broken.

I don't think the player coloring is explained in the ReadMe yet. Players in green have teams left on their list, players in red do not.

Known Issue: Player coloring does not occur when changing to a new tier for the first time.

EricH
19-08-2010, 23:19
Guess I better get testing before too long...

When life is a little less crazy, of course (getting ready to go back to college and all that).

BTW, hitting "apply" with not all the lists in/files loaded simply exits the program with no warning.

Vikesrock
19-08-2010, 23:21
BTW, hitting "apply" with not all the lists in/files loaded simply exits the program with no warning.

Forgot about that one. I did discover that at some point, I'll add graceful error handling to the list of things to work on.

Vikesrock
24-08-2010, 17:26
Forgot about that one. I did discover that at some point, I'll add graceful error handling to the list of things to work on.

That problem is now solved (although I haven't put the new copy up yet). I have also fixed the list coloring and another error I discovered where odd things happened if you selected a time like you were making a manual pick, but then didn't change the text in the box.

These are all minor edits so I'll hold onto the new version for now.

There are still issues (crashes or lockups) if you accidentally load a file of the wrong format. I'm going to try to work on that a little bit, but it's not quite as easy to solve as the other issues were.

Vikesrock
31-08-2010, 17:20
A new version has now been posted.

Changes:

New Features:
1. Auto team list downloading and processing is now available, simply enter the event code in the box.

Error Fixes:
1. Graceful handling of missing player file or team file.
2. Player coloring based on list status is available immediately on tab change
3. Fixed glitch which occurred when selecting a time but making no pick.


I haven't had a chance to test what happens if you try to use this installer directly over the last install, so there a few ways to upgrade:

1) Uninstall the old version and install this one
2) Guinea pig installing this over the other one (I think this will work if you say yes to any file overwrites it asks about)
3) Download the 4th file listed in the paper and replace your current program with the new one and copy curl.exe into "Install Directory\GTK\bin"

EricH
01-09-2010, 12:22
Well, I discovered how to lock up the old version.

Manually enter the team list.

I haven't tried event code hunting yet; I also can't figure out how to actually run a draft instead of just set one up.

Guess I better see if the newer version works on that front...

Oh, and when I uninstalled in preparation to install the new one, all the .txt files on my desktop vanished entirely. Ditto for some movies and the .exe files for some other programs that I'd written.

EricH
01-09-2010, 12:35
OK, new version: I go to put in a file for players with the requested parameters. It can't open (but goes right back to the setup screen, which is good). Check the file again, save it again, try again. Then it pops up the manual team entry list box, so I enter that again, then I get an error message "encountered a problem and needs to close. Sorry..."

However, it did spit out the files needed for a draft.

And I figured out how to run it. Next up: testing with lists when I get the time. (Oh, and the manual team entry popped up again when I went to run the draft.)

Vikesrock
01-09-2010, 12:41
Well that sounds fun!

I will fix the uninstall problem, I know what caused that.

If you could email me the files you have been using (player and team list) that have been giving you trouble I'll try to figure out what's going on. My email is my CD Username @ gmail.com

I'm hoping to get in some more testing of my own tonight as I have been primarily testing all versions with a single player file and team file that haven't caused these issues.

EricH
01-09-2010, 18:26
I got a clean run using the files that I sent and a lists file (after I put the periods in the list file). Can't wait to get some team lists for the actual events and try it out that way...

Vikesrock
01-09-2010, 18:53
I got a clean run using the files that I sent and a lists file (after I put the periods in the list file). Can't wait to get some team lists for the actual events and try it out that way...

It will actually currently pull up the teamlists from this past year's events when using the automatic download.

The event codes are the same as those listed at frclinks.com

Vikesrock
01-09-2010, 19:42
I just fixed it so that it will not try to download a teamlist if the box is left blank. While the download attempt was harmless it set a flag to randomize the teams which may potentially be unwanted behavior.

I am also working on handling some additional errors (such as non-numerical characters in a teamlist) and displaying appropriate error dialogs to explain what's going on.

EricH
01-09-2010, 20:41
Crashed it by putting in a good pick list set... Reopened the program and it worked fine.

I think it doesn't like if a needed file is modified while the program is open. I don't know if there is anything that can be done about that, though.

Also, a note: If you're generating a fresh draft setup, it's a good idea to remove old tiers--it'll pick them up as good ones if they're still around. (Saw that just now, going from my test draft (4 tiers) to AZ (2 tiers)--tiers 1 and 2 changed to AZ tiers, tiers 3 and 4 stuck around and were opened up when I started the program.)

Vikesrock
01-09-2010, 22:10
Crashed it by putting in a good pick list set... Reopened the program and it worked fine.

I think it doesn't like if a needed file is modified while the program is open. I don't know if there is anything that can be done about that, though.


This appears to be the case with many or all of the files that the program opens. I have tried some things that I thought would fix this, but I haven't managed to knock this one out yet. For now I am modifying error dialogs to recommend restarting the program where appropriate.

If there is an error with the manual teamlist it can be edited and retried because the dialog box closes. I will probably implement a button or menu option to load lists in addition to the automatic prompt so that list files can be fixed without restarting the program.


Also, a note: If you're generating a fresh draft setup, it's a good idea to remove old tiers--it'll pick them up as good ones if they're still around. (Saw that just now, going from my test draft (4 tiers) to AZ (2 tiers)--tiers 1 and 2 changed to AZ tiers, tiers 3 and 4 stuck around and were opened up when I started the program.)

This confused the heck out of me yesterday, but I forgot to post about it. I spent a long time trying to figure out why the right number of tiers were not being created when I used one of the manual tiers options.

Vikesrock
31-10-2010, 17:35
The program has been updated to better handle some errors that can occur (many still require program restart, but better inform you of what happened with dialogs).

It also now uses the FIRST pages directly for auto-team loading as the site I was using that provided the lists in XML is not going to be updated for this year's events.

Installer still located here:
http://www.chiefdelphi.com/media/papers/2307

Vikesrock
19-12-2010, 10:36
I have posted an updated version of the program at the CD-Media page listed in the previous post. If you have a version that does automatic team fetching, you can just grab the Update zip file and replace the main EXE with the one in the ZIP.

Changes:

CD Text automatically includes Code tags
File menu now includes a "Reload List" menu item which allows lists to be reloaded during the draft without restarting the program
The program no longer needs to be restarted when errors are encountered loading list files (not sure about other files yet).
Credit to rtfgnow for feature requests

As always, feature requests or bug reports are welcome via post, PM, email or IM

Basel A
19-12-2010, 12:34
Can code-tags be in the settings somewhere? They're not universally used among the current draft runners (and I don't like them).

I mean, not that it's a huge deal; I'm just nitpicking.

Vikesrock
19-12-2010, 13:23
Can code-tags be in the settings somewhere? They're not universally used among the current draft runners (and I don't like them).

Sure!

I turned the autorun checkbox, which I never implemented anyway, into a checkbox to enable or disable the code tags.

Eric, Alex and I all use them and Ed doesn't use the program so the default state of the checkbox is on.

Updated installer and update zips will be posted shortly. are posted.

Basel A
19-12-2010, 15:27
Sure!

I turned the autorun checkbox, which I never implemented anyway, into a checkbox to enable or disable the code tags.

Eric, Alex and I all use them and Ed doesn't use the program so the default state of the checkbox is on.

Updated installer and update zips will be posted shortly. are posted.

Ah, you're right, my bad. Thanks!

Vikesrock
19-12-2010, 15:30
Ah, you're right, my bad. Thanks!

No worries! Flexibility is always a good thing and it was pretty easy to implement.

ATannahill
19-12-2010, 18:52
Another thing. Can you implement a 'copy text' button.

Vikesrock
19-12-2010, 19:21
Another thing. Can you implement a 'copy text' button.

Hmmmm... that would be handy. Probably a little tougher to implement. I'll see if I have time to work on it before I go home for the holidays on Wednesday, depends how my project at work is going.

If I don't get it done before Wednesday I probably won't have time to work on it for this season of drafting because I won't have a development machine at my parent's.

ATannahill
22-12-2010, 16:35
I tried to uninstall and install the new version. I am getting an error message saying libgcc_s_dw2-1.dll is missing. I uninstalled and reinstalled but it still doesn't work.

Vikesrock
22-12-2010, 16:54
I tried to uninstall and install the new version. I am getting an error message saying libgcc_s_dw2-1.dll is missing. I uninstalled and reinstalled but it still doesn't work.

Eww... well that's obnoxious. I did the development for the latest version on a different machine and must have missed a compiler flag of some sort or used a new version of the compiler that requires that dll for some reason.

Looks like that dll can be found here:
http://pt.sourceforge.jp/projects/sfnet_openmarias/downloads/libgcc_s_dw2-1.dll/

You can either put it in your C:\Windows\System32 directory or the GTK\bin directory inside your FF Draft Assistant install.

Hopefully that's the only one that is missing *crosses fingers*

ATannahill
22-12-2010, 17:05
Done, now it wants libstdc++-6.dll.

I appreciate your help but I'd prefer you to work on the waiver wires and I'll draft manually.

Vikesrock
22-12-2010, 17:15
I appreciate your help but I'd prefer you to work on the waiver wires and I'll draft manually.

Ok, sounds good. I set up a Teamviewer session on my desktop before I left and my boss lent me a laptop from work, so hopefully tomorrow I'll be able to attack this and either get a version without the additional dependencies or an installer that includes them posted up.

Vikesrock
24-12-2010, 00:31
I've posted updated versions of the instaler and update file that do not have the extra dependencies. Turns out it was the newer version of the compiler that caused the issue.

Chris is me
24-12-2010, 02:33
A feature not urgent but worth implementing if you get bored: being able to decide who goes in what tier (for redrafts mainly)

EricH
24-12-2010, 02:42
I think it's possible to do that now, but it's nastier than normal. You wouldn't be able to randomize easily, but you could list the names of who you want in tier 1, then the names of who you want in tier 2, enter that list and unselect "Randomize Players". Of course, then you get the fun of randomizing tiers yourself.

Or you could just enter a partial list to randomize. Again, not easy, and then you get to deal with renaming file outputs and whatnot.

Chris is me
24-12-2010, 02:46
I just have two separate draft files and copied the random team list from one to another. Works for me with 2 instances of the program running.