[FF]: FF Draft Assistant Rewrite

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

Full Draft Running Capabilities
[ul][li]Manual, random and list pick options
[/li] [list][li]Separate button for single list pick or multiple if possible
[/li] [li]Visual indicator of players with lists with available teams (hopefully)[/ul]
[/li] [li]Intuitive pick edit capabilities
[/li] [li]In-Draft List Editor
[/li] [li]Option for auto draft running using list/random based on time (maybe)
[/li] [li]Direct CD export
[/li] [ul][li]Possibly direct copy paste from in-program display[/ul][/list]
[/li]
Save/Resume Functionality
[ul][li]Allow save at any point
[/li] [li]Resume from single save file or from CD output + setup files
[/li][/ul]

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).

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.

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.

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.

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:

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 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.

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.

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.

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”

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.

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.)

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.

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

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.

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.)

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.

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