Home | Webstore
Latest News: - OOTP 15: Update #4 Released! - OOTP 15 Released! - FHM 2014: Version 1.6.19 Available! - iOOTP Baseball 2014 for iOS Available NOW! - Beyond the Sideline Football Announced! - Title Bout Championship Boxing 2.5 released!

OOTP 15 Released - Buy Now!

  

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

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

Reply
 
LinkBack Thread Tools
Old 07-03-2009, 03:11 PM   #21 (permalink)
Moderator
 
Join Date: Mar 2002
Location: Mass.
Posts: 1,963
Thanks: 15
Thanked 136x in 94 posts
Quote:
Originally Posted by endgame View Post
Curious. In the past, a solo player could setup his league as if it were an online league and direct his league upload path (am I using that term correctly) to his own local hard drive, much like was possible in 6.5<

Is this routine possible with this version in order to make use of these utilities?
Absolutely it is possible!
__________________
- Front Office Offseason League. (Fast Paced OOTP-X and OOTP11 leagues, sims one season every week)
Alan T is offline   Reply With Quote
Old 07-03-2009, 03:13 PM   #22 (permalink)
Hall Of Famer
 
endgame's Avatar
 
Join Date: Aug 2002
Posts: 12,733
Thanks: 1,649
Thanked 1,871x in 1,008 posts
Quote:
Originally Posted by Alan T View Post
Absolutely it is possible!
If it's not too lengthy and not too much trouble, would you mind laying out the steps to set it up for the solo user? It'd be a great addition and a way to expand the experience to a wider audience.

Thanks, Alan.

and thanks, fhomess, for the contribution!
__________________
"Try again. Fail again. Fail better." -- Samuel Beckett
_____________________________________________
endgame is online now   Reply With Quote
Old 07-03-2009, 03:26 PM   #23 (permalink)
Moderator
 
Join Date: Mar 2002
Location: Mass.
Posts: 1,963
Thanks: 15
Thanked 136x in 94 posts
Quote:
Originally Posted by endgame View Post
If it's not too lengthy and not too much trouble, would you mind laying out the steps to set it up for the solo user? It'd be a great addition and a way to expand the experience to a wider audience.

Thanks, Alan.

and thanks, fhomess, for the contribution!
Well, there are three sections of things that you upload for online leagues that Statslab seems to tie into. The SQL export, the HTML reports and the League file (league.tar.gz).

Some parts of the Statslab utility I am not sure that a single player would really care about (export status, online draft, end of season award voting and all star award voting), since most of those are available within game when just caring about yourself. Everything else I could see being interesting for single user play as well. So you can enable or disable the parts that you do not care about.

Now to get the info out of OOTP for a single play user, most of it is pretty similar to how you would do it for online league play:

SQL exports: 1) Go to Game Setup and on the Major League Setup page, simply click on the Import/Export button and choose "Create SQL dump for MySQL. This will end up putting a ton of *.mysql.sql files in your saved_games/league.lg/import_export folder. These files need to simply be moved to the directory you want to use for your SQL upload that you configued in the statslab utility. (or you probably can just use this directory if you are doing the entire thing from this system).

HTML reports: Go to Global setup -> Online Options. You do not have to enable online league mode to create the HTML reports. You can simply just click on the create/upload reports button there.

League File: I am not sure you really need this, I don't know if statslab would choke on not having a league file there in your directory. You could likely just zip up your league.lg folder into a league.tar.gz format and then put it into a directory and never update it again. I might be wrong on that.


So that is all you need for the statslab to get the info it needs from OOTP. The only other catch you will have is for it to work properly, you will need some form of Mysql database running on your computer. There are various free ones around that you could likely use but since this application is designed to use mysql, you have to leave the database running for the application to function properly. You also need some form of http server running on the system that can handle PHP as well. I do not believe that it will work just like clicking on a .html file on your computer.

So for single player, you probably are better off at still uploading everything to a webserver instead, but you don't have to if you don't want to.
__________________
- Front Office Offseason League. (Fast Paced OOTP-X and OOTP11 leagues, sims one season every week)
Alan T is offline   Reply With Quote
Old 07-03-2009, 03:38 PM   #24 (permalink)
Hall Of Famer
 
endgame's Avatar
 
Join Date: Aug 2002
Posts: 12,733
Thanks: 1,649
Thanked 1,871x in 1,008 posts
Thanks for the info, Alan. Certainly something I'll have to mull over before I know enough to know what i don't know. But I'll ask at that point.
I greatly appreciate you taking the time to do this.
__________________
"Try again. Fail again. Fail better." -- Samuel Beckett
_____________________________________________

Last edited by endgame; 07-03-2009 at 03:48 PM.
endgame is online now   Reply With Quote
Old 07-03-2009, 05:47 PM   #25 (permalink)
Major Leagues
 
hank9481's Avatar
 
Join Date: Jun 2002
Posts: 318
Thanks: 0
Thanked 3x in 3 posts
I'm having all kinds of issues with the install as I am unsure what some of the directions are telling me to do. Can I get some help, maybe a PM with an IM screenname?
__________________
HH
www.mblsim.com
hank9481 is offline   Reply With Quote
Old 07-03-2009, 06:15 PM   #26 (permalink)
Major Leagues
 
hank9481's Avatar
 
Join Date: Jun 2002
Posts: 318
Thanks: 0
Thanked 3x in 3 posts
I get a 500 internal server error when loading SQL the very first time, then when I attempt to access the admin page, it says I must be a commissioner. I am the commissioner though. I don't get it.
__________________
HH
www.mblsim.com
hank9481 is offline   Reply With Quote
Old 07-03-2009, 06:55 PM   #27 (permalink)
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 3,188
Thanks: 93
Thanked 702x in 307 posts
Quote:
Originally Posted by hank9481 View Post
I get a 500 internal server error when loading SQL the very first time, then when I attempt to access the admin page, it says I must be a commissioner. I am the commissioner though. I don't get it.
After the first SQL load, it should kick you back out to the login page so you can login and it knows that you're the commish. Then you can click back over to the admin page pretty easily.

However, if you're getting an error, it's not making it all the way through. If you shoot me a PM with a link to your install, I would be happy to try to help you through these issues via PM on these forums if that works for you. I don't use IM.
__________________
StatsLab- PHP/MySQL based utilities for Online Leagues
Other Mods:
StatsLab11
19th Century: Schedules, FaceGen
BBCards: Full list of known templates
- Fictional Cards: 1996 fhomess, 2005 fhomess
FaceGen: 1960-Pres MLB, 32 Colleges, Backgrounds

PEBA - Connecticut Nutmeggers
fhomess is offline   Reply With Quote
Old 07-03-2009, 11:48 PM   #28 (permalink)
Hall Of Famer
 
Raidergoo's Avatar
 
Join Date: Mar 2003
Posts: 8,647
Thanks: 235
Thanked 290x in 151 posts
I noticed that development is spelled wrong on two different league sites using this tool.

Coincidence or is it the Statslab package?
Attached Images
 
Raidergoo is offline   Reply With Quote
Old 07-04-2009, 12:02 AM   #29 (permalink)
Hall Of Famer
 
Killebrew's Avatar
 
Join Date: Dec 2001
Posts: 3,321
Thanks: 110
Thanked 45x in 23 posts
It took several attempts to get this set up a few days ago, but I restarted today because I wanted to redo the player dev data in sequential order from previous sims. I deleted all the statslab files, dumped all the mysql tables, uploaded my older sql data files, then redid the install steps.

Note: A few days back I also had that 'you are not a commish' admin page loop, the only way I could get around was to undo all I had done restart from scratch.

Anyway, today I got this message using the same install info that worked a few days back. Any idea's of what would cause this?


Could it possibly be my slightly older sql files? Other than that there was no difference in my install process. As you can see this won't allow me to do my initial "Load SQL Files" button step. I have tried the total reinstall (drop tables, delete all files and upload statslab again) and that is not working today, same num_row error. Any ideas would be greatly appreciated:-).
Killebrew is offline   Reply With Quote
Old 07-04-2009, 01:27 AM   #30 (permalink)
Hall Of Famer
 
Killebrew's Avatar
 
Join Date: Dec 2001
Posts: 3,321
Thanks: 110
Thanked 45x in 23 posts
Never mind my last post question (pst#29) - manually deleting the 2 cookies this app creates solved my mysql_num_rows error. That is probably a helpful tip for a few of these unusual issues:-).
Killebrew is offline   Reply With Quote
Old 07-04-2009, 02:39 PM   #31 (permalink)
Hall Of Famer
 
Afino's Avatar
 
Join Date: Sep 2008
Location: Rochester, NY
Posts: 3,201
Blog Entries: 2
Thanks: 652
Thanked 450x in 267 posts
Yeah, I'd love an easy way to use this for a solo league.

Unfortunately, I don't think I'm computer literate enough to use mysql
__________________
GUBA: Moscow Enforcers

Afino is offline   Reply With Quote
Old 07-06-2009, 02:46 AM   #32 (permalink)
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 569
Thanks: 16
Thanked 5x in 5 posts
So if you have coaches and scouts off the development part is basically useless with how OOTP works (unless you care about year to year). Right?
__________________
DanGarion
GM - Los Angeles Dodgers The Peanuts and Cracker Jack Baseball League
PCJBL!
dangarion is offline   Reply With Quote
Old 07-06-2009, 06:02 AM   #33 (permalink)
Moderator
 
Join Date: Mar 2002
Location: Mass.
Posts: 1,963
Thanks: 15
Thanked 136x in 94 posts
Quote:
Originally Posted by dangarion View Post
So if you have coaches and scouts off the development part is basically useless with how OOTP works (unless you care about year to year). Right?

No, it keeps track of it sim to sim. Players ratings and talents go up and down all of the time. OOTP just reports on it in the development reports infrequently. There is actually alot of development that occurs behind the scenes.
__________________
- Front Office Offseason League. (Fast Paced OOTP-X and OOTP11 leagues, sims one season every week)
Alan T is offline   Reply With Quote
Old 07-06-2009, 08:48 AM   #34 (permalink)
Minors (Rookie Ball)
 
Join Date: Mar 2002
Posts: 36
Thanks: 0
Thanked 0x in 0 posts
Ditto with an easy to do setup for solo play.. on the mac. . Right now it looks like the closest thing we'll get to catobase for 10, and that would truly be a blessing!
locust9 is offline   Reply With Quote
Old 07-06-2009, 09:36 AM   #35 (permalink)
Minors (Single A)
 
Join Date: Aug 2008
Posts: 88
Thanks: 9
Thanked 0x in 0 posts
How difficult would it be to put several years of development that I have for my online league into this database? It would be a waste to get rid of all that valuable information. I can write my own scripts to inject the data I was just wondering if this was taken into consideration at all.

Just to clarify this would be going from Getch's utility and csv files to this sql DB.

Last edited by eodgooch; 07-06-2009 at 09:41 AM.
eodgooch is offline   Reply With Quote
Old 07-06-2009, 12:15 PM   #36 (permalink)
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 3,188
Thanks: 93
Thanked 702x in 307 posts
Quote:
Originally Posted by eodgooch View Post
How difficult would it be to put several years of development that I have for my online league into this database? It would be a waste to get rid of all that valuable information. I can write my own scripts to inject the data I was just wondering if this was taken into consideration at all.

Just to clarify this would be going from Getch's utility and csv files to this sql DB.
Getch's util contains all the data you'd need to put it in this SQL database. A script would have to be written to extract the data from getch's individual player development files and generate the SQL insert statements, then load that into the DB.
__________________
StatsLab- PHP/MySQL based utilities for Online Leagues
Other Mods:
StatsLab11
19th Century: Schedules, FaceGen
BBCards: Full list of known templates
- Fictional Cards: 1996 fhomess, 2005 fhomess
FaceGen: 1960-Pres MLB, 32 Colleges, Backgrounds

PEBA - Connecticut Nutmeggers
fhomess is offline   Reply With Quote
Old 07-08-2009, 12:34 PM   #37 (permalink)
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 569
Thanks: 16
Thanked 5x in 5 posts
Ok just going to free flow some observations and some suggestions. Just to give you a background I used to run BOSI for the RWBL as well, so I have used tools like this in the past.

It would be nice if the tool would show the SQL import progress. Especially since the import of a large league (that has the full MLB history data) takes upwards of 10 minutes.

Also if there is an issue with a SQL import is there a way to revert and do it again?

I'm also having some type of issue with the financials since my SQL Log keeps showing this for all the teams in the league.
Code:
LOADING: team_last_financials.mysql.sql ... 237
   insert into `team_last_financials` VALUES (31, 41306087, 29565975, 16372701, 0, 0, 0, 10000000, 79733000, 7200000, 0, 2630961, 0, 0, 0, 0.0000, 0, 0, 91200000, 0, 0, ,1,1);
 -> You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1,1)' at line 1
   insert into `team_last_financials` VALUES (32, 44920259, 34783500, 21813997, 0, 0, 0, 10000000, 95662500, 7930000, 0, 2861163, 0, 0, 0, 0.0000, 0, 0, 108200000, 0, 0, ,1,1);
 -> You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1,1)' at line 1
   insert into `team_last_financials` VALUES (33, 41306087, 29565975, 18711658, 0, 0, 0, 10000000, 81197000, 8970000, 0, 2630961, 0, 0, 0, 0.0000, 0, 0, 94500000, 0, 0, ,1,1);
 -> You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1,1)' at line 1
   insert into `team_last_financials` VALUES (34, 51794560, 45218550, 25992582, 0, 0, 0, 10000000, 123155308, 7280000, 0, 2999106, 0, 0, 0, 0.0000, 0, 0, 135500000, 0, 0, ,1,1);
 -> You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1,1)' at line 1
   insert into `team_last_financials` VALUES (35, 44920259, 34783500, 22734952, 0, 0, 0, 10000000, 97257500, 8000000, 0, 2861163, 0, 0, 0, 0.0000, 0, 0, 109900000, 0, 0, ,1,1);
 -> You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1,1)' at line 1
   insert into `team_last_financials` VALUES (36, 57363462, 45218550, 31280296, 0, 0, 0, 10000000, 136253500, 7590000, 0, 3321567, 0, 0, 0, 0.0000, 0, 0, 149200000, 0, 0, ,1,1);
I know there are team filters but it would also be nice to see all the data without a filter, and even positional filters in the areas that it's possible (any area that has the drop downs to only via each team, career metrics, development, ratings).

I know you did it for security reasons, but all the blank fields on the admin screen can be sort of confusing to people, especially to those that are used to seeing information in fields like that listed in other web scripts (phpBB, etc). Maybe include some text that they are blank for security reasons, still difficult to tell if the settings are correct though, not sure what you could do.

Talking about security, I've been forced to move our league exports to a separate UNIX user on the server, and unfortunately that makes it impossible for the script to see the folders that user has access to (the commish user is the web access account, and the export user only has access to it's own folders, unsure if there is a way to work around that with the export tracker or not, don't worry about it, just thought I would mention it.) I'm guessing there wouldn't be a way for me to resolve this unless if I did it on my own by like running a cron job or something, but even that would be a PITA.

Overall this tool is awesome! Really like what I'm seeing, and love that it was integrated in with the existing league reports.
__________________
DanGarion
GM - Los Angeles Dodgers The Peanuts and Cracker Jack Baseball League
PCJBL!
dangarion is offline   Reply With Quote
Old 07-08-2009, 12:47 PM   #38 (permalink)
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 569
Thanks: 16
Thanked 5x in 5 posts
One more thing. I've also noticed that sometimes after it has appeared to run it's course of importing, if I attempt to go back to it, it hangs for quite sometime. I'm wondering if that is because it's actually still importing (this is why showing the activity might be useful. I wish the SQL files were so big, this is a pretty big import compared to what I'm used to.
__________________
DanGarion
GM - Los Angeles Dodgers The Peanuts and Cracker Jack Baseball League
PCJBL!
dangarion is offline   Reply With Quote
Old 07-08-2009, 01:15 PM   #39 (permalink)
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 569
Thanks: 16
Thanked 5x in 5 posts
Ah i got another one. If you go to career metrics and look at the team index. The W-L record for all the teams in 2008 is messed up.

Minnesota Twins History - Index - StatsLab for OOTPX
__________________
DanGarion
GM - Los Angeles Dodgers The Peanuts and Cracker Jack Baseball League
PCJBL!
dangarion is offline   Reply With Quote
Old 07-08-2009, 02:26 PM   #40 (permalink)
All Star Reserve
 
dangarion's Avatar
 
Join Date: Feb 2003
Location: Orange, CA
Posts: 569
Thanks: 16
Thanked 5x in 5 posts
Last one! I promise!

I didn't read anywhere in the manual about having to go to the Development Tracker admin and checking boxes to get the development to actually show. That explains why I wasn't able to see development.
__________________
DanGarion
GM - Los Angeles Dodgers The Peanuts and Cracker Jack Baseball League
PCJBL!
dangarion 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
Trackbacks are On
Pingbacks are On
Refbacks are On



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


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