Latest News: 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-10-2007, 09:11 AM   #121 (permalink)
Hall Of Famer
 
Solonor's Avatar
 
Join Date: Mar 2003
Location: Orlando
Posts: 2,556
Quote:
Originally Posted by redsoxford View Post
Commas in text fields inside CSVs are a pain. I think OOTP does stick quotes round text fields but that changes the method of parsing the strings.

I could probably do a similar thing using the .dat files directly. Maybe I should have a word with Larry to see what sort of things he's pulling out and how it could be done with my direct access methodology.
If it's the "Jr" problem, then does no one have "Ken Griffey, Jr." in their league running this util? Or are all the Junior's set up in the game without commas?
__________________
SGCBL Commissioner

"Beings will come, Frodo. The one constant through all the years has been baseball. Middle Earth has rolled by like an army of Mumakil. It has been erased like a slate, rebuilt and erased again. But baseball has marked the time. This field, this game: it's a part of our past, Frodo. It reminds of us of all that once was good and it could be again. Oh... beings will come Frodo. Beings will most definitely come." - Gladden Field of Dreams
Solonor is offline   Reply With Quote
Old 09-10-2007, 02:20 PM   #122 (permalink)
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,268
Yep, the comma is the problem.

When I parse a field, I first turn all the commas into semi-colons. So, that comma becomes a semi colon, so his record will have an extra field.

I can't think of a way around it, but I will look at it and see.

I am assuming the comma is in the actual name of the player, as part of their last name. What database did you use?

Just remove the comma from the name in the game, or after you do the dump, remove the comma from the name in the players.csv file.

I have done many historical seasons and never came across that, so I am assuming that since I use the Lahman database, you muse be using another that has added the comma. Whoever created the database needs to change that, as you cannot have a comma or a semi-colon in a field, as either one of those can be used as CSV dump delimiters. Markus originally had a comma in the nickname field when a player went by more than 1 nickname. When I TT'd it, he just eliminated the 2nd nickname instead of changing it to a dash, like I suggested.

For me to change my code to look for a jr. would be too much work, as every program that accessed that file would have to be changed, then it would also have to check for other names:

, jr.
, sr.
, stupid,
,M.D.

Be easier to REMOVE THE DAMN COMMA!
__________________
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-10-2007, 04:08 PM   #123 (permalink)
Hall Of Famer
 
Solonor's Avatar
 
Join Date: Mar 2003
Location: Orlando
Posts: 2,556
Quote:
Originally Posted by Comedian2004 View Post
Yep, the comma is the problem.

When I parse a field, I first turn all the commas into semi-colons. So, that comma becomes a semi colon, so his record will have an extra field.

I can't think of a way around it, but I will look at it and see.

I am assuming the comma is in the actual name of the player, as part of their last name. What database did you use?

Just remove the comma from the name in the game, or after you do the dump, remove the comma from the name in the players.csv file.

I have done many historical seasons and never came across that, so I am assuming that since I use the Lahman database, you muse be using another that has added the comma. Whoever created the database needs to change that, as you cannot have a comma or a semi-colon in a field, as either one of those can be used as CSV dump delimiters. Markus originally had a comma in the nickname field when a player went by more than 1 nickname. When I TT'd it, he just eliminated the 2nd nickname instead of changing it to a dash, like I suggested.

For me to change my code to look for a jr. would be too much work, as every program that accessed that file would have to be changed, then it would also have to check for other names:

, jr.
, sr.
, stupid,
,M.D.

Be easier to REMOVE THE DAMN COMMA!
No sweat. I can fix that. Thanks for the info.

I'm not using a specific roster set. These are fictional players created by the game using names we have put in the names dat files.

In Lahman, they don't use the "Jr" designation as part of the name. Ken Griffey, Jr., is in there as nameFirst = Ken, nameLast = Griffey, and nameGiven = George Kenneth (Jr.).

I wonder why it never bothered any of your other programs?

Anyway, thanks for this utility. I have spent the last few weeks coming up with league-specific hints, but it's been tedious, and it's nearly impossible to calculate streaks and such manually.
__________________
SGCBL Commissioner

"Beings will come, Frodo. The one constant through all the years has been baseball. Middle Earth has rolled by like an army of Mumakil. It has been erased like a slate, rebuilt and erased again. But baseball has marked the time. This field, this game: it's a part of our past, Frodo. It reminds of us of all that once was good and it could be again. Oh... beings will come Frodo. Beings will most definitely come." - Gladden Field of Dreams
Solonor is offline   Reply With Quote
Old 09-10-2007, 04:27 PM   #124 (permalink)
All Star Starter
 
Neags23's Avatar
 
Join Date: Apr 2006
Posts: 1,068
I think "The Lil Evil Eye Bug" is the coolest named bug I've ever heard of, though.
__________________
Checkout my Player Development Tracker for Solo Leagues:
Solo League Player Development Tracker

Neags23 is offline   Reply With Quote
Old 09-10-2007, 09:10 PM   #125 (permalink)
All Star Reserve
 
targy's Avatar
 
Join Date: Jan 2002
Location: Clearwater, FL
Posts: 915
So what is causing the ID2 problem
__________________
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 for 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 25 years of experience in negotiating settlements.....
targy is offline   Reply With Quote
Old 09-11-2007, 08:17 AM   #126 (permalink)
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,268
The ID2 section deals with the games.csv file and the games_score files.

Looking at the code, I have it pretty tight for error checking. There must be something weird.

What month is your season in. Have you deleted or added any teams after the league started?
__________________
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-11-2007, 08:28 AM   #127 (permalink)
All Star Reserve
 
targy's Avatar
 
Join Date: Jan 2002
Location: Clearwater, FL
Posts: 915
No changes but the new season is starting and I ran a dump and the problem goes away...I will tell you what month it starts to happen again if it does. I am just simming this season and will go back to managong next season
__________________
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 for 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 25 years of experience in negotiating settlements.....
targy is offline   Reply With Quote
Old 09-11-2007, 08:45 AM   #128 (permalink)
All Star Reserve
 
targy's Avatar
 
Join Date: Jan 2002
Location: Clearwater, FL
Posts: 915
Ok I ran the program at the beginning of May with no problems...I will try it again as the season progresses and then when I become the manager again and see it that was the problem
__________________
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 for 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 25 years of experience in negotiating settlements.....
targy is offline   Reply With Quote
Old 09-11-2007, 09:52 AM   #129 (permalink)
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 6,268
That actually makes sense to me. When you run the program before the start of the season, but after the pre-season starts, there is some funky data out there because OOTP does not properly clean up last year's files.

So, all of the game box scores exist, but the CSV files do not match the actual files. As the games.csv file is based on this year.

The ID2 section is mainly used for the stuff like, most runs scored in the 5th inning, etc. So, at this point of the season, there are none. There could be spring training games, but they are ignored.

That is why I have the debug section to shut off the different ID sections when they error. You simply shut it off and try again later in the season.

I personally think the best time to run the program is at the end of the season, before you cross over into the new year. You then get tons of information about your 'last year', and then when June arrives, you run it again and then you get a lot of information based on this year.
__________________
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 04:39 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