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 09-17-2006, 03:13 PM   #1 (permalink)
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,395
AULineup

While I was standing on the toilet changing a lightbulb, I fell off and hit my head. That is how I came up with the ideal of the Flux Capacitor.

At the same time, I thought of this baby.

http://www.planetootp.com/AULineup/default.htm

It goes through every game and displays the starting lineup for your team for each game along with the game result.

So, game one, you can see who batted 1st, 2nd, 3rd, etc. and also see if you won the game or not.

Then I can do some math and report:

With Willie Mays batting 4th, the team is 22-4.
With Willie Mays batting 8th, the team is 1-6.
etc.

I can also report how many different lineups the team had thoughout the year, what was the most popular and the records of the lineups.

Cool stuff.

Here is a peek a boo at it. Note: Still working out the code for the 7th, 8th and 9th batter, so some of that information shown is incorrect. (I need a football break).
__________________
Visit www.planetootp.com for my MODS. Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF!

Last edited by Comedian2004 : 09-18-2006 at 05:03 PM.
Comedian2004 is offline   Reply With Quote
Old 09-17-2006, 07:59 PM   #2 (permalink)
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,395
Here is a new screenshot:

Notice how this team after a full season had 42 unique lineups. This was an old team I had drafted and then cloned the league and let the computer run a couple years. Most of my original team is still there. They did trade Hacker for Al Smith though.

The top grid is the 'most popular' lineup. Per say, Willie Mays was used in the 3rd position the most, Al Smith batted cleanup the most, etc.

This was a NON DH league. It gets complicated to see if a game is a DH game or not, as I would have to look into another file to get that information. I may do that anyhow, as that contains some other information I would like to get, like the date of the game.

This routine is actually examining the CSV dump for the pbp game and figuring out who batted 1st, 2nd, etc. It was a real humdinger to write that routine!!

I have to smooth a couple things out, then I want to add a few more things before I release it.
Attached Images
 
__________________
Visit www.planetootp.com for my MODS. Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF!

Last edited by Comedian2004 : 09-17-2006 at 08:04 PM.
Comedian2004 is offline   Reply With Quote
Old 09-18-2006, 11:05 AM   #3 (permalink)
Hall Of Famer
 
Raidergoo's Avatar
 
Join Date: Mar 2003
Location: 39.84 N -84.12 W
Posts: 7,281
Brain asplodes.











__________________
Raidergoo is offline   Reply With Quote
Old 09-18-2006, 11:25 AM   #4 (permalink)
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,395
Hope to have this released tonight, but working on a major website now. Only 150 more pages to design! Thank you COPY and PASTE!

I have a bug in this program that causes some teams to loop. It is a very tricky routine, as I am searching the PBP for the at bats, where it screwed up earlier was when a batter is announced to bat, but did not get to bat. (runner caught stealing, picked off). I solved that, but have to track down why it loops on a couple teams. I also have to have it remove the spring training games.
__________________
Visit www.planetootp.com for my MODS. Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF!
Comedian2004 is offline   Reply With Quote
Old 09-18-2006, 02:49 PM   #5 (permalink)
Hall Of Famer
 
disposableheros's Avatar
 
Join Date: Jun 2004
Posts: 4,339
Quote:
Originally Posted by Raidergoo
Brain asplodes.











" +
__________________
2 Wild Cards, 11 Division Champs, 4 League Champs, 3 World Champs, and 3 Best GM awards

Baseball Maelstrom - New York Mets - 180-149 .547
Corporate League Baseball - Coke Buzz - 889-649 .578
Western Hemisphere Baseball League - Santiago Saints - 672-793 .459

Record - 2428-2271 .517
disposableheros is offline   Reply With Quote
Old 09-18-2006, 04:59 PM   #6 (permalink)
bp_
Hall Of Famer
 
bp_'s Avatar
 
Join Date: Apr 2004
Location: Philadelphia
Posts: 2,398
this is a pretty cool idea
__________________
"al Qaeda wouldn't last a day in parts of Philadelphia" - Mayor Michael Nutter
bp_ is offline   Reply With Quote
Old 09-18-2006, 05:02 PM   #7 (permalink)
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,395
AULineup is here...

Let me know how it works for you.

http://www.planetootp.com/AULineup/default.htm

To use, select your league, then the team and hit START. In a couple of seconds, it will display a screen full of data. Wait for it to finish and then you can scroll down and look at the rest of the games.

I added the date of the game, colored the game score with light green if the team won, light pink if the team lost. You can also sort by any column and switch teams without having to reload. If you change leagues, it will automatically restart the application.

Enjoy...

Now back to work on AURemovethoseDAMN jumpingBananas program.
__________________
Visit www.planetootp.com for my MODS. Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF!
Comedian2004 is offline   Reply With Quote
Old 09-18-2006, 11:25 PM   #8 (permalink)
Hall Of Famer
 
Raidergoo's Avatar
 
Join Date: Mar 2003
Location: 39.84 N -84.12 W
Posts: 7,281
Here's the flaw . . .

I cannot highlight all the data then right click.

One thing I noticed during testing the 1965 Reds is that the lineups used by the AI matched decently with http://www.baseball-reference.com/te.../1965_bo.shtml


Sisler:

Harper
Rose
Pinson
Robinson
Coleman
Johnson
Edwards
Cardenas

AI:

Harper
Coleman
Pinson
Robinson
Tommy Agee
Rose
Cardenas
Edwards
__________________
Raidergoo is offline   Reply With Quote
Old 09-18-2006, 11:55 PM   #9 (permalink)
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,395
Nope, it uses a grid.. I will see if I can write a copy to clipboard routine though.

Pretty display?
__________________
Visit www.planetootp.com for my MODS. Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF!
Comedian2004 is offline   Reply With Quote
Old 09-19-2006, 12:27 AM   #10 (permalink)
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,395
You can now. Right click on the top grid and select copy.

It will copy the team name and the most popular lineup to the clipboard.

I also added a new field that is displayed. It shows the starting pitchers ARM for the other team. (Not a picture of his arm, but if he was a Leftie or Rightie.)

I also color coded the arms to make that visual a little better. I also added color coding to 'most popular player in that slot'.

This has to be one of the most colorful programs.
__________________
Visit www.planetootp.com for my MODS. Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF!

Last edited by Comedian2004 : 09-19-2006 at 03:32 AM.
Comedian2004 is offline   Reply With Quote
Old 09-19-2006, 07:22 AM   #11 (permalink)
Hall Of Famer
 
Raidergoo's Avatar
 
Join Date: Mar 2003
Location: 39.84 N -84.12 W
Posts: 7,281
Oh, my! I knew you'd deliver!

Would you like a ridiculous challenge?


Export the data as HTML, and make it look like

http://www.baseball-reference.com/te.../1965_bo.shtml

especially the Most Common Lineups section. . .

The use of color is very nice touch, almost completly right. A note somewhere in the app needs to explain the usage of the colors, though.


EDITED TO ELIMINATE A BONEHEADED MISTAKE
__________________

Last edited by Raidergoo : 09-19-2006 at 02:11 PM.
Raidergoo is offline   Reply With Quote
Old 09-19-2006, 09:52 AM   #12 (permalink)
All Star Reserve
 
targy's Avatar
 
Join Date: Jan 2002
Location: Clearwater, FL
Posts: 964
Now I know why I donated a few duckets to you, You have enhanced the playability of this game, Thank you again for all the hard work and for all of you who use these programs please donate a few of your duckets to keep up these great programs
__________________
If you own a business and have a lawsuit or judgment pending against your company and do not want to pay the high price of an attorney. I can stop the judgment or lawsuit from going forward. I can reduce the settlement by almost half and if both parties do not agree on the settlement amount there is no fee...We keep the attorneys away and the case out of court...The company I work for has 15 years of experience in negotiating settlements.....
targy is offline   Reply With Quote
Old 09-19-2006, 12:43 PM   #13 (permalink)
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,395
Come on, challenge me...

1st, the link you showed, displayed game by game POSITION, not the batting order. That would be a different program.

So, I went ahead and duplicated the thing anyhow. Mine shows the game by game result, with the starting lineup. Wins by the team are still highlighted, the most popular player is also highlighted.

Here is a sample output:

http://www.planetootp.com/1963%20New...es_lineup.html

NOTE: The player links are not correct at this time. I will add them later.

I will also put at the top the number of unique lineups and the most popular lineups.

Trying to figure out a unique lineup was tricky. At first, I thought if I used a formula, like (ID*1) + (ID*2), etc. where the 2 is their position in the lineup, it would give me a unique number for each lineup. But, if playerID 3 batted 2nd and player ID 2 batted 3rd and they were swapped, the number would be the same.

So, I came up with this way:

LU(x) = JOESMITH-BILLWALKER-JIMJONES...

That gives me a unique string for each lineup and then I tallied them up. Now, to get the top 5 popular lineups, I have to backwards engineer the string, which may not be too hard.

Watch for another update late this evening, or earlier if I get bored in web designing.
__________________
Visit www.planetootp.com for my MODS. Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF!
Comedian2004 is offline   Reply With Quote
Old 09-19-2006, 02:04 PM   #14 (permalink)
Hall Of Famer
 
Raidergoo's Avatar
 
Join Date: Mar 2003
Location: 39.84 N -84.12 W
Posts: 7,281
Look at the bottom of the page.


EDIT

This post has been significantly edited from the original to correct errors on my part. It now has the correct PDF file.

What I really wanted to point out was http://www.baseball-reference.com/te.../1965_bo.shtml

It is significantly different than my original link.
__________________

Last edited by Raidergoo : 04-17-2007 at 11:03 AM.
Raidergoo is offline   Reply With Quote
Old 09-19-2006, 02:57 PM   #15 (permalink)
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,395
Ah, well, my end result is very close to what you had wanted to post. Only thing missing is the positions. Not sure if I can add that though, as that information is not contained in the file I am looking at for the lineup.

Mine is prettier too.
__________________
Visit www.planetootp.com for my MODS. Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF!
Comedian2004 is offline   Reply With Quote
Old 09-19-2006, 05:28 PM   #16 (permalink)
All Star Reserve
 
Join Date: Apr 2003
Location: Minnesota
Posts: 558
It's not working for me. It just stays on the screen where it says like loading or whatever. I select the team, then an error message comes up that says

"Unhandled exceptiong has occured in your application. If you click Continue, the application will ignore this error and attempt to continute. If you click Quit, the application will close immediately. Index was outsie the bounds of the array."

What should I do?
Klew1986 is offline   Reply With Quote
Old 09-19-2006, 06:38 PM   #17 (permalink)
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,395
Let me add some more error trapping later on and see if we can see what the problem is.

Make sure that your CSV dump is uptodate. If you sim any games AFTER you do the dump, it will error for sure.


Quote:
Originally Posted by Klew1986
It's not working for me. It just stays on the screen where it says like loading or whatever. I select the team, then an error message comes up that says

"Unhandled exceptiong has occured in your application. If you click Continue, the application will ignore this error and attempt to continute. If you click Quit, the application will close immediately. Index was outsie the bounds of the array."

What should I do?
__________________
Visit www.planetootp.com for my MODS. Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF!
Comedian2004 is offline   Reply With Quote
Old 09-19-2006, 07:06 PM   #18 (permalink)
Hall Of Famer
 
robster1225's Avatar
 
Join Date: Jun 2006
Location: Long Branch, NJ
Posts: 2,524
man, I want to try this in a couple of my online leagues. To bad I can't do a CSV Dump for them.

oh well...
__________________

Total Sports World - The Place To Get Your Sports Fix!

eMLB - New York Mets
2013 - 30-23
2014 - 93-69 (First ever post season appearance for the Mets)



BLB - Los Lunas Javelinas
robster1225 is offline   Reply With Quote
Old 09-19-2006, 07:54 PM   #19 (permalink)
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,395
Maybe talk your commish into doing it for you.

Quote:
Originally Posted by robster1225
man, I want to try this in a couple of my online leagues. To bad I can't do a CSV Dump for them.

oh well...
__________________
Visit www.planetootp.com for my MODS. Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF!
Comedian2004 is offline   Reply With Quote
Old 09-19-2006, 07:58 PM   #20 (permalink)
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,395
I added something that may help us.

Before you select a team, click on FILE and select DEBUG and then select a team and click start.

It will run a little slower and you will see a number flashing up in the status area. Note what the number is when it locks up or errors. This should be the game that it is working on.

Then look in this folder (change your to your league)

C:\Program Files\Sports Interactive\OOTP Baseball 2006\data\saved_games\1950A.lg\news\txt\leagues

Attach the log_#.txt file as an attachment here and I will take a look and see what the problem is. It could be something bizaare that happened that game.

Larry


Quote:
Originally Posted by Klew1986
It's not working for me. It just stays on the screen where it says like loading or whatever. I select the team, then an error message comes up that says

"Unhandled exceptiong has occured in your application. If you click Continue, the application will ignore this error and attempt to continute. If you click Quit, the application will close immediately. Index was outsie the bounds of the array."

What should I do?
__________________
Visit www.planetootp.com for my MODS. Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF!
Comedian2004 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 05:16 AM.


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