Latest News: OOTP 13 Announced with Screenshots & Feature List! Pre-Order Now! - OOTP Baseball 12 Available! - iOOTP Baseball 2011 Available! - Title Bout Championship Boxing 2.5 released! - Inside the Park Baseball Patch 1.03 released, DEMO now available

Pre-Order OOTP 13, Save & Win! | OOTP 12 Off-Season Special, just $19.99!

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

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

Reply
 
LinkBack Thread Tools Display Modes
Old 09-01-2009, 01:52 AM   #121 (permalink)
Minors (Triple A)
 
snnort's Avatar
 
Join Date: Apr 2004
Posts: 272
Thanks: 16
Thanked 10x in 10 posts
Quote:
Originally Posted by snnort View Post
Any thoughts on adding HOF voting? It's not that it's totally necessary, but since this has become the god of all OOTP Utilities and has nearly everything you could want to supplement the reporting, voting, drafting aspect of any online league... just thought it wouldn't hurt to ask.
Quote:
Originally Posted by fhomess View Post
I've thought about it. I have a partial design for it that I haven't gotten around to finishing yet. I've just not been happy with some of the considerations to this point, so I need to think on it some more.
Cool enough. I've set up StatsLab for the BCBL (a league I commish) as well as the SIMBL (a league I am in, but I help out with some behind the scenes stuff too). And owners in both leagues LOVE it.

The HOF voting would be just icing on an already very yummy cake.

Those divisional race graphs... they used to have those on ESPN's site for MLB and I used to create them using MS Excel for an OOTP league I helped with back in 2003. That was a lot of work entering the data by keyboard after every sim. Nice to see something like that implimented using data dumps.

OOTP has come a long way with the help of peeps like you writing utilities that become easier and easier to update.

Thank you.
snnort is offline   Reply With Quote
Old 09-01-2009, 03:09 AM   #122 (permalink)
Minors (Double A)
 
Join Date: Jun 2009
Posts: 103
Thanks: 0
Thanked 0x in 0 posts
With the patch installed, I'm getting some whacky player development. Kind of need to look at it yourself: Development Tracker - StatsLab for OOTPX

Also a string of errors running the win shares utilities:

Warning: Division by zero in /home/.../forum/statslab/ootpsqlou/winshares.php on line 1118
BobDylanRH is offline   Reply With Quote
Old 09-01-2009, 08:51 AM   #123 (permalink)
Stu
All Star Starter
 
Stu's Avatar
 
Join Date: Dec 2005
Posts: 1,249
Thanks: 17
Thanked 16x in 8 posts
Is there any way to retroactively run the season metrics (namely OPS+ and ERA+) if we have a backup of every end of season file. So if I restored year 1 ran the metrics, restored year 2 ran the metrics, would it work or screw stuff up?
__________________
Brewers League Baseball
Stu is offline   Reply With Quote
Old 09-01-2009, 09:07 AM   #124 (permalink)
Stu
All Star Starter
 
Stu's Avatar
 
Join Date: Dec 2005
Posts: 1,249
Thanks: 17
Thanked 16x in 8 posts
Also I'm still getting strange permission issues. All folders are currently set to 755 but anytime it needs to write a file I get an error. As an example, I get this when trying to view a players game logs:

Quote:
Warning: fopen(./cache/player_429_sim_stats_Season.html) [function.fopen]: failed to open stream: Permission denied in /home/.../blb/utilities/ootpsqlou/playerStats.php on line 995

Warning: fwrite(): supplied argument is not a valid stream resource in /home/.../blb/utilities/ootpsqlou/playerStats.php on line 996

Warning: fclose(): supplied argument is not a valid stream resource in /home/.../blb/utilities/ootpsqlou/playerStats.php on line 997
If I set the permissions to 777 it works but I obviously don't want to leave them at 777. Is there something wrong in my configuration that would be causing this?
__________________
Brewers League Baseball
Stu is offline   Reply With Quote
Old 09-01-2009, 12:41 PM   #125 (permalink)
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 2,723
Thanks: 13
Thanked 255x in 119 posts
Quote:
Originally Posted by snnort View Post
OOTP has come a long way with the help of peeps like you writing utilities that become easier and easier to update.

Thank you.
You're welcome.

Quote:
Originally Posted by BobDylanRH View Post
With the patch installed, I'm getting some whacky player development. Kind of need to look at it yourself: Development Tracker - StatsLab for OOTPX

Also a string of errors running the win shares utilities:

Warning: Division by zero in /home/.../forum/statslab/ootpsqlou/winshares.php on line 1118
Nothing's changed in the patch with the Win Shares utility. I'll look into this some more.

As for development, it looks like you didn't run the conversion after installing the patch. There was another problem with the development getting GB% and Knucklecurve Talent confused. I've fixed that and now re-uploaded the patch. The conversion will need to be rerun.

Quote:
Originally Posted by Stu View Post
Is there any way to retroactively run the season metrics (namely OPS+ and ERA+) if we have a backup of every end of season file. So if I restored year 1 ran the metrics, restored year 2 ran the metrics, would it work or screw stuff up?
Yeah, actually you could do that. Upload the end of season SQL files, then run the season metrics for each season. Rinse and repeat for each year. This'll work as long as those backups still spit out all the necessary data.

Quote:
Originally Posted by Stu View Post
Also I'm still getting strange permission issues. All folders are currently set to 755 but anytime it needs to write a file I get an error. As an example, I get this when trying to view a players game logs:

If I set the permissions to 777 it works but I obviously don't want to leave them at 777. Is there something wrong in my configuration that would be causing this?
Not in your StatsLab config, that's just installing files on your server and setting up information so it knows how to access the data. However, it has been my experience that not all server configurations are as flexible as others. It may be that on your server, you need to give 757 or 777 permissions to get it to write those files in the cache folder.
__________________
StatsLab11 - PHP/MySQL based utilities for Online Leagues
Other Mods:
19th Century: Schedules, FaceGen
BBCards: 1887 Allen & Ginter, 1934 Goudey, 1988 Score, 1996 fhomess, 2005 fhomess
FaceGen: 1960-Pres MLB, 32 Colleges, Backgrounds

PEBA - Connecticut Nutmeggers
fhomess is online now   Reply With Quote
Old 09-01-2009, 02:47 PM   #126 (permalink)
Minors (Double A)
 
Join Date: Jun 2009
Posts: 103
Thanks: 0
Thanked 0x in 0 posts
Quote:
Originally Posted by fhomess View Post
As for development, it looks like you didn't run the conversion after installing the patch. There was another problem with the development getting GB% and Knucklecurve Talent confused. I've fixed that and now re-uploaded the patch. The conversion will need to be rerun.
I ran it a few times. The conversion tool says the tables were removed and to run player development again. But it doesn't seem to fix my whacky reports.
BobDylanRH is offline   Reply With Quote
Old 09-02-2009, 01:01 AM   #127 (permalink)
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 2,723
Thanks: 13
Thanked 255x in 119 posts
Quote:
Originally Posted by BobDylanRH View Post
I ran it a few times. The conversion tool says the tables were removed and to run player development again. But it doesn't seem to fix my whacky reports.
FYI to everyone else, we got this fixed via PM. If you're running into the same problem, it could be because you ran development without running the conversion after installing the patch.
__________________
StatsLab11 - PHP/MySQL based utilities for Online Leagues
Other Mods:
19th Century: Schedules, FaceGen
BBCards: 1887 Allen & Ginter, 1934 Goudey, 1988 Score, 1996 fhomess, 2005 fhomess
FaceGen: 1960-Pres MLB, 32 Colleges, Backgrounds

PEBA - Connecticut Nutmeggers
fhomess is online now   Reply With Quote
Old 09-02-2009, 01:03 PM   #128 (permalink)
All Star Starter
 
MrWorkrate's Avatar
 
Join Date: Mar 2002
Location: Raleigh, NC
Posts: 1,239
Thanks: 9
Thanked 2x in 2 posts
I would have PMed this but I figured this was good info for others.

If you're in the offseason and just updating development, which SQL files should you upload?
__________________
I used to come here a lot. Now, not so much.
MrWorkrate is offline   Reply With Quote
Old 09-02-2009, 01:34 PM   #129 (permalink)
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 2,723
Thanks: 13
Thanked 255x in 119 posts
Quote:
Originally Posted by MrWorkrate View Post
I would have PMed this but I figured this was good info for others.

If you're in the offseason and just updating development, which SQL files should you upload?
The ReadMe has a handy table in the appendix that tells you which SQL tables are needed for each utility. For development, you'll see that the following is checked:
leagues
teams
players
players_batting
players_fielding
players_pitching
__________________
StatsLab11 - PHP/MySQL based utilities for Online Leagues
Other Mods:
19th Century: Schedules, FaceGen
BBCards: 1887 Allen & Ginter, 1934 Goudey, 1988 Score, 1996 fhomess, 2005 fhomess
FaceGen: 1960-Pres MLB, 32 Colleges, Backgrounds

PEBA - Connecticut Nutmeggers
fhomess is online now   Reply With Quote
Old 09-02-2009, 05:36 PM   #130 (permalink)
Minors (Double A)
 
Join Date: Jun 2009
Posts: 103
Thanks: 0
Thanked 0x in 0 posts
Small issue here...

The last sim tool doesn't show the inning by inning tallies. And it doesn't pull up any stats for pitchers in any of the last sim statistic pages.

Not a big deal, so throw this on the bottom of your support list, fhomess.
BobDylanRH is offline   Reply With Quote
Old 09-02-2009, 05:49 PM   #131 (permalink)
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 2,723
Thanks: 13
Thanked 255x in 119 posts
Quote:
Originally Posted by BobDylanRH View Post
Small issue here...

The last sim tool doesn't show the inning by inning tallies. And it doesn't pull up any stats for pitchers in any of the last sim statistic pages.

Not a big deal, so throw this on the bottom of your support list, fhomess.
Make sure you've loaded the latest games_score and players_game_pitching_stats SQL files for your league. You can verify the load date of all your SQL files on the SQL File Load page accessible from the admin page of StatsLab.
__________________
StatsLab11 - PHP/MySQL based utilities for Online Leagues
Other Mods:
19th Century: Schedules, FaceGen
BBCards: 1887 Allen & Ginter, 1934 Goudey, 1988 Score, 1996 fhomess, 2005 fhomess
FaceGen: 1960-Pres MLB, 32 Colleges, Backgrounds

PEBA - Connecticut Nutmeggers
fhomess is online now   Reply With Quote
Old 09-02-2009, 06:36 PM   #132 (permalink)
Stu
All Star Starter
 
Stu's Avatar
 
Join Date: Dec 2005
Posts: 1,249
Thanks: 17
Thanked 16x in 8 posts
Quote:
Originally Posted by Stu View Post
Is there any way to retroactively run the season metrics (namely OPS+ and ERA+) if we have a backup of every end of season file. So if I restored year 1 ran the metrics, restored year 2 ran the metrics, would it work or screw stuff up?
For anybody who is interested I was able to run the season metrics for all but the first 3 years of my league. I had all my old backups so just imported the backup from before the World Series of each year as if it was an OOTP 9 league. This worked for league files from OOTP 2007, 8 and 9.

I wasn't able to import the first 3 seasons because I can't find the backups.
__________________
Brewers League Baseball
Stu is offline   Reply With Quote
Old 09-04-2009, 01:56 PM   #133 (permalink)
Hall Of Famer
 
satchel's Avatar
 
Join Date: Apr 2002
Location: Ft Smith AR
Posts: 2,680
Thanks: 52
Thanked 48x in 26 posts
In the Jamaica League, our season just ended, and I put up Awards ballots, and for the Outstanding Batter awards candidates, several of the batters' statistics are doubled. They have two times the number of all of their statistics: games, at-bats, RBI, everything. This is only the case for about half of the batters on the ballot, and the half who are doubled are the ones who had the highest totals, going in (that is, before the doubling).

This doubling has taken place in both sub-leagues. The doubling has not occurred in any other awards categories.

Last edited by satchel; 09-04-2009 at 01:58 PM.
satchel is offline   Reply With Quote
Old 09-04-2009, 02:09 PM   #134 (permalink)
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 2,723
Thanks: 13
Thanked 255x in 119 posts
Quote:
Originally Posted by satchel View Post
In the Jamaica League, our season just ended, and I put up Awards ballots, and for the Outstanding Batter awards candidates, several of the batters' statistics are doubled. They have two times the number of all of their statistics: games, at-bats, RBI, everything. This is only the case for about half of the batters on the ballot, and the half who are doubled are the ones who had the highest totals, going in (that is, before the doubling).

This doubling has taken place in both sub-leagues. The doubling has not occurred in any other awards categories.
PM Sent.

EDIT: If you split your SQL files before loading them, do be careful you don't load any of the split files more than once. The SQL dump doesn't prevent duplicate rows from being created in some tables since there are no primary keys defined in the table definition.
__________________
StatsLab11 - PHP/MySQL based utilities for Online Leagues
Other Mods:
19th Century: Schedules, FaceGen
BBCards: 1887 Allen & Ginter, 1934 Goudey, 1988 Score, 1996 fhomess, 2005 fhomess
FaceGen: 1960-Pres MLB, 32 Colleges, Backgrounds

PEBA - Connecticut Nutmeggers

Last edited by fhomess; 09-04-2009 at 05:19 PM.
fhomess is online now   Reply With Quote
Old 09-10-2009, 02:03 PM   #135 (permalink)
Minors (Triple A)
 
snnort's Avatar
 
Join Date: Apr 2004
Posts: 272
Thanks: 16
Thanked 10x in 10 posts
Sandwich picks (between rounds 1 and 2)

How should this be handled in league that use the new FA Compensation option in OOTP X... using the StatsLab Draft Utility?

My thought was to treat the "sandwich" round as round 2 and move each round after that down one (so round 3 in the utility would actually be round 2 in the OOTP X game... and so on).

In the case of the league I commish... we have less sandwich picks total, than we have teams... so all the sandwich picks fit into one round. The extra picks at the end of the round will just be drafting the worst players of the draft as fillers so that we can move to the next round.

Fhomess, is this the best way to handle this kind of situation AND do you (or anyone else in this thread) see any possible hang ups?

In a possible future patch.... it would be cool if you could have the option when assigning picks to each round, of choosing to not list a team and then move it to the next round. OR even better would be if you could simply choose a toggle for the sandwich pick round to be active or not (between round 1 and 2) and then choose how many picks, exactly, to have in that round.
snnort is offline   Reply With Quote
Old 09-10-2009, 03:54 PM   #136 (permalink)
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 2,723
Thanks: 13
Thanked 255x in 119 posts
Quote:
Originally Posted by snnort View Post
How should this be handled in league that use the new FA Compensation option in OOTP X... using the StatsLab Draft Utility?

My thought was to treat the "sandwich" round as round 2 and move each round after that down one (so round 3 in the utility would actually be round 2 in the OOTP X game... and so on).

In the case of the league I commish... we have less sandwich picks total, than we have teams... so all the sandwich picks fit into one round. The extra picks at the end of the round will just be drafting the worst players of the draft as fillers so that we can move to the next round.

Fhomess, is this the best way to handle this kind of situation AND do you (or anyone else in this thread) see any possible hang ups?

In a possible future patch.... it would be cool if you could have the option when assigning picks to each round, of choosing to not list a team and then move it to the next round. OR even better would be if you could simply choose a toggle for the sandwich pick round to be active or not (between round 1 and 2) and then choose how many picks, exactly, to have in that round.
I think your proposed plan of adding a round and picking scrubs for the teams that don't have sandwich picks is the best plan in the current version.

I have a second patch in the works which includes the ability to mark picks to skip over. This lets you have the flexibility to create a sandwich pick round with less picks than the number of teams in your league, but also allows you to impose sanctions on teams by skipping any pick in any round. You could even create additional sandwich pick rounds later in the same draft if your league has custom FA compensation rules. If you're interested in beta testing this patch, I'll send you a link where you can download it. Just shoot me a PM.

The patch will also contain the ability to display fielding stats, career metrics, and season metrics on the leaderboards pages.
__________________
StatsLab11 - PHP/MySQL based utilities for Online Leagues
Other Mods:
19th Century: Schedules, FaceGen
BBCards: 1887 Allen & Ginter, 1934 Goudey, 1988 Score, 1996 fhomess, 2005 fhomess
FaceGen: 1960-Pres MLB, 32 Colleges, Backgrounds

PEBA - Connecticut Nutmeggers

Last edited by fhomess; 09-10-2009 at 03:59 PM.
fhomess is online now   Reply With Quote
Old 09-10-2009, 04:35 PM   #137 (permalink)
All Star Starter
 
Recte44's Avatar
 
Join Date: Dec 2001
Location: Greendale, WI
Posts: 1,921
Thanks: 24
Thanked 29x in 8 posts
I just loaded all my SQL files, and the date at the top left of the page is the current game date, but on "Last Sim" it shows the boxscores for the sim before this current one.

Any ideas?
Recte44 is offline   Reply With Quote
Old 09-10-2009, 05:25 PM   #138 (permalink)
Minors (Triple A)
 
snnort's Avatar
 
Join Date: Apr 2004
Posts: 272
Thanks: 16
Thanked 10x in 10 posts
Quote:
Originally Posted by Recte44 View Post
I just loaded all my SQL files, and the date at the top left of the page is the current game date, but on "Last Sim" it shows the boxscores for the sim before this current one.

Any ideas?
First place I would check is the link "SQL Files" from the Admin section... and make sure that all the files are up-to-date...meaning... they should all basically have the time/date stamp within a few minutes of one another... OR at least the important ones for the "last sim" utility... which is basically any SQL file that has the word "game" in it.

For you the link to see those files listed is here:
http://mbwba.whsites.net/ootpsqlou/sql_file_load.php

Being that I don't have admin access to your StatsLab... I can't view that page.

Last edited by snnort; 09-10-2009 at 05:30 PM.
snnort is offline   Reply With Quote
Old 09-10-2009, 05:46 PM   #139 (permalink)
All Star Starter
 
Recte44's Avatar
 
Join Date: Dec 2001
Location: Greendale, WI
Posts: 1,921
Thanks: 24
Thanked 29x in 8 posts
They are all current files.

I imported once, then I imported each individually. No change.
Recte44 is offline   Reply With Quote
Old 09-10-2009, 07:28 PM   #140 (permalink)
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 2,723
Thanks: 13
Thanked 255x in 119 posts
Quote:
Originally Posted by Recte44 View Post
They are all current files.

I imported once, then I imported each individually. No change.
The utility stores these pages in the cache folder so they can be accessed again without hitting the database or taking the time to recreate a large page. If the page exists already in the cache, then the util checks the date/timestamp and compares it to the last SQL file load. If it's older than the file load, it should create the page anew. The utility is also supposed to clear out the cache folder of these pages when a file load is performed or the last sim settings are saved from the last sim admin page. If it's not getting cleared out, then there are permissions that aren't configured to allow it. I'm not sure why it wouldn't still create the new page, though, if the SQL load has happened recently.
__________________
StatsLab11 - PHP/MySQL based utilities for Online Leagues
Other Mods:
19th Century: Schedules, FaceGen
BBCards: 1887 Allen & Ginter, 1934 Goudey, 1988 Score, 1996 fhomess, 2005 fhomess
FaceGen: 1960-Pres MLB, 32 Colleges, Backgrounds

PEBA - Connecticut Nutmeggers
fhomess is online now   Reply With Quote
Reply

Bookmarks

Thread Tools
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

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



All times are GMT -4. The time now is 01:29 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0
Copyright © 2009 Out of the Park Developments