Home | Webstore
Latest News: OOTP 25 Available - FHM 10 Available - OOTP Go! Available

Out of the Park Baseball 25 Buy Now!

  

Go Back   OOTP Developments Forums > Out of the Park Baseball 25 > OOTP Mods > OOTP Mods - Database Tools

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

Reply
 
Thread Tools
Old 09-10-2007, 09:11 AM   #121
Solonor
Hall Of Famer
 
Solonor's Avatar
 
Join Date: Mar 2003
Location: Maine
Posts: 4,457
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?
__________________
Solonor's Groovy Computer Baseball League - Making baseball a hobbit since 2003!

"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
Comedian2004
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
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!
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
Comedian2004 is offline   Reply With Quote
Old 09-10-2007, 04:08 PM   #123
Solonor
Hall Of Famer
 
Solonor's Avatar
 
Join Date: Mar 2003
Location: Maine
Posts: 4,457
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.
__________________
Solonor's Groovy Computer Baseball League - Making baseball a hobbit since 2003!

"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
Neags23
All Star Starter
 
Neags23's Avatar
 
Join Date: Apr 2006
Posts: 1,576
I think "The Lil Evil Eye Bug" is the coolest named bug I've ever heard of, though.
__________________
Former GM Washburn Sea Wolves Dog Days Baseball
1981 & 1986 Kennel Cup Champions!
Neags23 is offline   Reply With Quote
Old 09-10-2007, 09:10 PM   #125
targy
All Star Starter
 
targy's Avatar
 
Join Date: Jan 2002
Location: Clearwater, FL
Posts: 1,152
So what is causing the ID2 problem
__________________
www.emerge180.com
targy is offline   Reply With Quote
Old 09-11-2007, 08:17 AM   #126
Comedian2004
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
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?
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
Comedian2004 is offline   Reply With Quote
Old 09-11-2007, 08:28 AM   #127
targy
All Star Starter
 
targy's Avatar
 
Join Date: Jan 2002
Location: Clearwater, FL
Posts: 1,152
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
__________________
www.emerge180.com
targy is offline   Reply With Quote
Old 09-11-2007, 08:45 AM   #128
targy
All Star Starter
 
targy's Avatar
 
Join Date: Jan 2002
Location: Clearwater, FL
Posts: 1,152
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
__________________
www.emerge180.com
targy is offline   Reply With Quote
Old 09-11-2007, 09:52 AM   #129
Comedian2004
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
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.
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
Comedian2004 is offline   Reply With Quote
Old 08-26-2008, 09:45 AM   #130
Comedian2004
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
For Version 9, try this version:

Anderson Utilities - AUHistoryHint2008
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
Comedian2004 is offline   Reply With Quote
Old 08-26-2008, 11:03 AM   #131
falkonisback
All Star Reserve
 
falkonisback's Avatar
 
Join Date: Mar 2007
Location: New Iberia, Louisiana
Posts: 869
Is the problem with the special characters (for foreign names) fixed with this new version, or does it still look crazy when it comes to a special character?
falkonisback is offline   Reply With Quote
Old 08-26-2008, 12:14 PM   #132
ashantewarrier
Hall Of Famer
 
ashantewarrier's Avatar
 
Join Date: Feb 2004
Location: Somerset, NJ via Brooklyn, NY
Posts: 2,293
Blog Entries: 7
Quote:
Originally Posted by Comedian2004 View Post
For Version 9, try this version:

Anderson Utilities - AUHistoryHint2008
Thanks Larry!
__________________
"I'm not concerned with your liking or disliking me... All I ask is that you respect me as a human being."
-Jackie Robinson, #42 Brooklyn Dodgers


"Hitting is better than sex." - Reggie Jackson
ashantewarrier is offline   Reply With Quote
Old 08-26-2008, 12:53 PM   #133
Comedian2004
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
You mean special characters, like Pudge, who requires 9 lockers or Sparky Lyle, who likes to sit on birthday cakes naked or do you mean the accent type characters?

Basically, all I did was convert the program to read the change in the players.csv file.

There is an option in the database dump options to ignore the accents.

Let me know if it works, as I have no special characters in my current league, except for Bob Gibson, but he is only special because he is 10-2. OK, Lockwood is pretty special also, since he has not allowed an earned run yet.

Quote:
Originally Posted by falkonisback View Post
Is the problem with the special characters (for foreign names) fixed with this new version, or does it still look crazy when it comes to a special character?
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
Comedian2004 is offline   Reply With Quote
Old 06-06-2009, 06:29 PM   #134
jarmenia
Hall Of Famer
 
jarmenia's Avatar
 
Join Date: Mar 2002
Location: Tampa, FL USA
Posts: 4,503
Anyone have this working with OOTP X?

I've attached the error. I know Larry has been having some health issues so I'm trying to debug this on my own. Anyone have any advice?
Attached Images
Image 
__________________
When is good enough, good enough?

jarmenia is offline   Reply With Quote
Old 06-06-2009, 07:37 PM   #135
Comedian2004
Hall Of Famer
 
Comedian2004's Avatar
 
Join Date: Nov 2004
Location: In a house in Saint Cloud, Florida.
Posts: 7,085
Check out AU2008 for the new program that has the history hint program in it. It is not complete as the old one, but it works with X.
__________________
Like BLUES? Visit www.smokestacklightnin.com, you will LOVE it! New show every Monday!! New Blues HOF![/COLOR][/FONT]
Comedian2004 is offline   Reply With Quote
Old 06-06-2009, 08:03 PM   #136
targy
All Star Starter
 
targy's Avatar
 
Join Date: Jan 2002
Location: Clearwater, FL
Posts: 1,152
NO matter what I do the History Hint in AU2008 does not work well yet. Let me know when you can look at it with me and we will figure out how to make it better. It seams no matter what parameters I pick it does not search right
__________________
www.emerge180.com
targy is offline   Reply With Quote
Old 06-08-2009, 10:57 PM   #137
jarmenia
Hall Of Famer
 
jarmenia's Avatar
 
Join Date: Mar 2002
Location: Tampa, FL USA
Posts: 4,503
Quote:
Originally Posted by Comedian2004 View Post
Check out AU2008 for the new program that has the history hint program in it. It is not complete as the old one, but it works with X.
Well that worked Larry but unfortunately I can't use it. My league is a stats only league and I noticed you give ratings in some of the hints. If you ever get around to adding more options, an option to exclude ratings would be great.

Thanks for the help.
__________________
When is good enough, good enough?

jarmenia is offline   Reply With Quote
Old 06-09-2009, 03:55 AM   #138
Solonor
Hall Of Famer
 
Solonor's Avatar
 
Join Date: Mar 2003
Location: Maine
Posts: 4,457
Quote:
Originally Posted by jarmenia View Post
Well that worked Larry but unfortunately I can't use it. My league is a stats only league and I noticed you give ratings in some of the hints. If you ever get around to adding more options, an option to exclude ratings would be great.

Thanks for the help.
I don't use all of the hints it comes up with, either. Just edit the hints file after it's done and get rid of the ones you don't want.
__________________
Solonor's Groovy Computer Baseball League - Making baseball a hobbit since 2003!

"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
Reply

Bookmarks

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:54 PM.

 

Major League and Minor League Baseball trademarks and copyrights are used with permission of Major League Baseball. Visit MLB.com and MiLB.com.

Officially Licensed Product – MLB Players, Inc.

Out of the Park Baseball is a registered trademark of Out of the Park Developments GmbH & Co. KG

Google Play is a trademark of Google Inc.

Apple, iPhone, iPod touch and iPad are trademarks of Apple Inc., registered in the U.S. and other countries.

COPYRIGHT © 2023 OUT OF THE PARK DEVELOPMENTS. ALL RIGHTS RESERVED.

 

Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright © 2020 Out of the Park Developments