Latest News: OOTP PATCH 9.1.6 released! - OOTP 9 RELEASED! - Title Bout Championship Boxing 2.5 released! - OOTP 2007 receives Editors Choice Award from PC Gamer - Inside the Park Baseball Patch 1.03 released, DEMO now available

Click here to download Out of the Park Baseball 9!

Go Back   OOTP Developments Forums > OUT OF THE PARK BASEBALL 9 > OOTP 9 - Mods > Database Tools
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Database Tools Do you need to take a dump? SQL gurus welcome

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 07-25-2006, 11:20 PM   #1 (permalink)
Minors (Double A)
 
LeafsFan2005NC's Avatar
 
Join Date: Mar 2005
Posts: 108
Home Run Log Generator

Not sure which category this should go in, but Database Tools seemed the best place. If it's in the wrong one, I apologize.

I hope no one else has started this.

I've started work on a program that will create a home run log. So far I've got it to parse each box score file and extract the date, the batter hitting the home run, the opposing pitcher, inning, number on and number out.

It's pretty basic at this point. I still have to get it to only parse regular season games and add a routine to have it pick up with the last number when the program is run the next year.

After that I'll add routines to display homers by certain players, thus giving everyone the ability to display the who, what and where of every home run hit by that player.

Hopefully I'll be able to add a routine to generate web pages for those online leagues.

But, I'll keep everyone updated as I go along.
__________________
Download my OOTP 6 to OOTP 2006 Schedule Converter:

http://www.ootpdevelopments.com/boar...d.php?t=121664
LeafsFan2005NC is offline   Reply With Quote
Old 07-25-2006, 11:28 PM   #2 (permalink)
Administrator
 
Steve Kuffrey's Avatar
 
Join Date: Jul 1999
Location: S.E. TN - Georgia born and raised
Posts: 16,915
Nice work, sounds interesting.
__________________
Steve Kuffrey
DABS Atlanta Braves - 2008 Eastern Division Champ
*DBLC Atlanta Braves - 2011, 2014 East Division Champ, 2012, 2013 NL Wildcard
Baseball Maelstrom-Montreal Expos-2013 Tourney winner, 2014 WC Team
Sparky's League - Tampa Bay D'Rays

*No longer an active league.
Steve Kuffrey is offline   Reply With Quote
Old 07-27-2006, 11:33 PM   #3 (permalink)
Minors (Double A)
 
LeafsFan2005NC's Avatar
 
Join Date: Mar 2005
Posts: 108
I've got the parsing down pat. I've tested parsing under most all league setups, though a few still need to be tested. So far I've had to add a control so that users can enter when the regular season ends. Something about the game will calculate how many games will be played and set aside those numbers for regular season box scores, then skip a number to get the ID number for the All-Star game (if one is played). The issue arises when the postseason begins because the game then goes back to that unused number and numbers from there. It's no big deal, though. If it's fixed in the future, then it'll make things easier, but it's nothing that can't be worked around

I simmed three seasons and did various things such as increasing # of teams, moving teams to new cities and switching to division formats and everything parsed just fine.

Once I test as many conceivable universe setups as possible, I'll move on to actually generating a report. I want the user to be able to go in, sort by year, team or player (maybe even sub-league, but that may be a difficult task) and generate a report showing say how many homers player X hit at team Y's ballpark, or how many pitchers have fell victim to player X over the years. That'll be later.

But, everything's progressing smoothly at this point. More as it comes.
__________________
Download my OOTP 6 to OOTP 2006 Schedule Converter:

http://www.ootpdevelopments.com/boar...d.php?t=121664
LeafsFan2005NC is offline   Reply With Quote
Old 07-31-2006, 12:55 AM   #4 (permalink)
Minors (Double A)
 
LeafsFan2005NC's Avatar
 
Join Date: Mar 2005
Posts: 108
Here's a sample of a webpage I was able to create showing all the homers hit by one player over his career:

http://www.geocities.com/billyharrel...un_log_46.html

The program itself is still rough at the moment, but things are moving forward. In the end, much like Anderson's utilities, you'll have to do a CSV dump at the end of each year. This will generate all the necessary files to make sure the right boxscores are looked at.

The good thing here is I'll now eventually be able to have the program create a database of postseason home runs. But that's still in the future.
__________________
Download my OOTP 6 to OOTP 2006 Schedule Converter:

http://www.ootpdevelopments.com/boar...d.php?t=121664
LeafsFan2005NC is offline   Reply With Quote
Old 07-31-2006, 02:23 AM   #5 (permalink)
Hall Of Famer
 
endgame's Avatar
 
Join Date: Aug 2002
Posts: 6,385
I can see that this is only the beginning of many great things you have in store for us along these lines. Good work, Leafs, good work.
__________________
"Try again. Fail again. Fail better." -- Samuel Beckett

We live in the shadowlands. The sun is always shining somewhere else.
__________________
endgame is offline   Reply With Quote
Old 07-31-2006, 09:37 PM   #6 (permalink)
Minors (Double A)
 
Join Date: May 2006
Posts: 133
Looks good so far. Can't wait to see the finished product.
glenn is offline   Reply With Quote
Old 08-02-2006, 02:55 AM   #7 (permalink)
Minors (Double A)
 
LeafsFan2005NC's Avatar
 
Join Date: Mar 2005
Posts: 108
Well, I've hit a slight snag, but one that's probably not hard to overcome. At the moment, the program requires a CSV dump to get some information. However, I've discovered that if you contract a team, then that team is never dumped again. So there's going to have to be a re-write of some code somewhere so that there's a master list of teams created somewhere, at least so that people running 19th century historical leagues (where teams were contracted about every year) don't have to worry about not being able to recreate a log for some teams. Also have to make sure the team win-loss records are put in this master list as well since I want to include those in team home run logs (so that one can compare home run output vs. team record).

But, that'll be tomorrow since it's 3am where I'm at. But it's going great. I've managed to create pages that resemble those generated by the game itself.

EDIT: Well, it was a quick fix. Now I'm trying to fix it so that if you have two teams in the same city, then you'll get only the team you choose and not every team from that city.
__________________
Download my OOTP 6 to OOTP 2006 Schedule Converter:

http://www.ootpdevelopments.com/boar...d.php?t=121664

Last edited by LeafsFan2005NC : 08-02-2006 at 04:08 PM.
LeafsFan2005NC is offline   Reply With Quote
Old 08-02-2006, 07:33 PM   #8 (permalink)
Moderator*
 
sporr's Avatar
 
Join Date: Dec 2001
Location: Muscatine, IA
Posts: 8,222
This looks pretty sweet. I can think of a few good uses for this. Thanks!
__________________


Baseball Maelstrom - Commish/ St Louis Cardinals
USBA - Las Vegas Scorpions

sporr is offline   Reply With Quote
Old 08-03-2006, 11:28 PM   #9 (permalink)
Minors (Double A)
 
LeafsFan2005NC's Avatar
 
Join Date: Mar 2005
Posts: 108
Yes, there are many good uses for what I'm trying to accomplish. Which is why I'm taking my time and making sure everything is near perfect (trust me, no one can be truly perfect) before releasing anything.

I've been working on the team portion of the program the past few days. I've managed to create a nifty little page, which you can view here:

http://www.geocities.com/billyharrel...es_Angels.html

One thing I've noticed, and I hope to speed this up, is if your league has a huge number of players, then it does take a few minutes to generate a report. My historical league, simming from 1901, has about 16,000 players so it does take time to match up player IDs to player names. As I said I'm trying to speed this up.

Another thing I've still to do is display the throwing hand of the pitchers.

Soon I'll go back to the player pages and add all the necessary information to flesh them out a little and then work on a routine to generate all the pages for one year.

In the end, I'm hoping, and I can't guarantee it at the point, at least until I see how the game generates an entire website for a league, but I hope to add a function to allow the online simmers the ability to add links to the home run logs on the player pages. This way viewers can go "hmmm, lets see how Babe Ruth did back in the '20s." and click the necessary link. But, still, no guarantees at the point, just hopes.

EDIT: Here's a new player page so y'all can see how I've improved it:

http://www.geocities.com/billyharrel...log_12170.html
__________________
Download my OOTP 6 to OOTP 2006 Schedule Converter:

http://www.ootpdevelopments.com/boar...d.php?t=121664

Last edited by LeafsFan2005NC : 08-05-2006 at 05:27 PM.
LeafsFan2005NC is offline   Reply With Quote
Old 08-11-2006, 12:42 AM   #10 (permalink)
Minors (Double A)
 
LeafsFan2005NC's Avatar
 
Join Date: Mar 2005
Posts: 108
Progress Report as of 8/11/2006:

Well, I've been working intently on the HR log generator the past week and have managed to add a little more information for the logs. For player logs (and this applies to team logs as well) the stadium where the home run is hit will now be displayed. Also on the player pages, number of multi HR games as well as those times a player hits three or four homers in a game (this may be expanded to display five home run games, but that's never really happened, at least not in MLB).

And, I've finally wrote the routine for the generate all button. And since not every player will ever hit a home run, the program will delete pages of those players failing to do so.

But, it's progressing pretty well now and perhaps I'll have a working program for y'all to play around with in the next few days or so (pending no further snags).
__________________
Download my OOTP 6 to OOTP 2006 Schedule Converter:

http://www.ootpdevelopments.com/boar...d.php?t=121664
LeafsFan2005NC is offline   Reply With Quote
Old 08-11-2006, 11:41 AM   #11 (permalink)
Stu
All Star Starter
 
Stu's Avatar
 
Join Date: Dec 2005
Posts: 1,026
Very cool program. It'll be fun to check out the dates, stadiums and pitchers of all the milestone HR's.
Stu is offline   Reply With Quote
Old 08-11-2006, 11:47 AM   #12 (permalink)
Hall Of Famer
 
jaxmagicman's Avatar
 
Join Date: Jun 2003
Location: In Guam training to be a defloration-maker
Posts: 6,591
I guess it is not feesible to put distance the homerun was hit because that doesn't show up in the box score?
__________________
See ID
jaxmagicman is offline   Reply With Quote
Old 10-11-2006, 09:24 PM   #13 (permalink)
All Star Reserve
 
Kyros's Avatar
 
Join Date: May 2006
Posts: 981
Is this program dead? I would love to have something like this!

Opps... I didn't see this post;

HR Log Generator - Test Version

sorry.

Last edited by Kyros : 10-11-2006 at 09:27 PM.
Kyros is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 07:43 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 Out of the Park Developments