Home | Webstore
Latest News: OOTP 26 Available - FHM 11 Available - OOTP Go! Available

Out of the Park Baseball 26 Buy Now!

  

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

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

Reply
 
Thread Tools
Old 07-09-2020, 06:47 PM   #1
cavebutter
All Star Starter
 
cavebutter's Avatar
 
Join Date: Dec 2005
Location: Los Angeles
Posts: 1,164
cavebutter's Gameday Utilities V2.0

Version 2.0 is available HERE!!

Key Changes from V1.0

Identical output to v1.0, but refactored to use sqlite instead of MySQL. There is no longer a requirement for any MySQL server or connection.
New databases are created in file system and deleted upon completion, so over time recycling bins may need to be cleared.

That's right, you no longer need MySQL. All the database stuff is done inside the app, so it's just click and go.

I will post the readme and screenshots below.

This is still Windows only. I will keep working on a Mac version.

You can check out the source code on Github
__________________
MySQL, MyStruggle - A self-indulgent blog about my attempts to roll my own MySQL Database with OOTP

Logo Gallery

Last edited by cavebutter; 07-09-2020 at 06:56 PM.
cavebutter is offline   Reply With Quote
Old 07-09-2020, 06:51 PM   #2
cavebutter
All Star Starter
 
cavebutter's Avatar
 
Join Date: Dec 2005
Location: Los Angeles
Posts: 1,164
Gameday Utilities V2.0 README

Description

OOTP Game Day Tools is a set of utilities to enhance the gameplay of Out of the Park Baseball. It was developed to work with OOTP 21 and forward, though it should work with version XX as well.

There are 2 utilities in this package:
Depth Charts - Creates an Excel Workbook showing organizational depth at each position
Game Day Workbooks - Creates an Excel Workbook showing a team's stats against their next 7 probable starting pitchers, against their opponents' bullpens, and their current year L/R splits overall

NOTE: This is alpha software. I have tested it on Windows and Mac and nothing has blown up. However, I have included only basic error handling. This means, essentially, that you will likely find a way to error out it if you try to get too creative. Nothing catastrophic, but just a heads up that this is less-than professional grade error handling at the moment.

Specs and Requirements
Excel or comparable spreadsheet application

Setup
1. Download the Gameday zip file and extract it somewhere on your computer.

2. Double-click on gameday_utilities.exe

Walkthru
1. Launch gameday_utilities_home.exe
- You will be presented with 2 options:
- Depth Charts
- Game Day Workbook

Depth Charts
* You will be asked for the location of your datafiles. Copy/Paste it in.
* Once you're connected, you will be asked to choose the league that your team is in. Enter the league ID.
* Once you choose your league, you will be asked to choose your team. You may also see options for All-Star teams or Futures teams. Selecting these probably won't produce results.
* An Excel workbook with the name format: `team name-YYYY-mm-dd_depth_chart.xlsx` will be created in the `output` sub-directory.
* All of charts on the depth chart tabs pull data from the first several rows of the tables on the left. These can be sorted by any field by (in Excel) clicking the Data section of the ribbon and choosing Sort. This will open a dialog box to choose the sorting fields.
* Tip: You can highlight cells and then sort by highlight color.

Game Day Workbooks
* Before you start, export the schedule for your team's league from the OOTP game. Make a note of, and copy, the location.
* You will be asked for the location of your datafiles. Copy/Paste it in.
* Once you're connected to the database, you'll choose your team's league by entering the league id...
* Then choose your team's id
* Paste the location of the schedule file when prompted
* An Excel workbook with the name format `team name_mm_dd_YYYY-mm_dd_YYYY.xlsx` will be created in the `output` subdirectory.
__________________
MySQL, MyStruggle - A self-indulgent blog about my attempts to roll my own MySQL Database with OOTP

Logo Gallery
cavebutter is offline   Reply With Quote
Old 07-09-2020, 06:53 PM   #3
cavebutter
All Star Starter
 
cavebutter's Avatar
 
Join Date: Dec 2005
Location: Los Angeles
Posts: 1,164
Screenshots of Depth Charts

Here are pictures of the depth charts:
Attached Images
Image Image 
__________________
MySQL, MyStruggle - A self-indulgent blog about my attempts to roll my own MySQL Database with OOTP

Logo Gallery
cavebutter is offline   Reply With Quote
Old 07-09-2020, 06:54 PM   #4
cavebutter
All Star Starter
 
cavebutter's Avatar
 
Join Date: Dec 2005
Location: Los Angeles
Posts: 1,164
Screenshots of Gameday Book

Here's the Gameday Book:
Attached Images
Image Image 
__________________
MySQL, MyStruggle - A self-indulgent blog about my attempts to roll my own MySQL Database with OOTP

Logo Gallery
cavebutter is offline   Reply With Quote
Old 07-10-2020, 01:58 AM   #5
ALB123
All Star Reserve
 
Join Date: Jan 2020
Location: Massachusetts
Posts: 638
Oh geez.. I was just reading the other post for the 1.0 version. This v2.0 update is awesome. No MySQL is pretty cool and a lot easier for most people. Awesome work and thanks for sharing it.
__________________
"I'm on the side that's always lost against the side of Heaven. I'm on the side of snake-eyes tossed against the side of seven" - Leonard Cohen "The Captain"
ALB123 is offline   Reply With Quote
Old 07-10-2020, 09:53 AM   #6
cavebutter
All Star Starter
 
cavebutter's Avatar
 
Join Date: Dec 2005
Location: Los Angeles
Posts: 1,164
Quote:
Originally Posted by ALB123 View Post
Oh geez.. I was just reading the other post for the 1.0 version. This v2.0 update is awesome. No MySQL is pretty cool and a lot easier for most people. Awesome work and thanks for sharing it.

As soon as I put version 1 out, I felt that it was not user-friendly enough for anyone besides me to use it. Between having to install a database server and having to wait 3-4 minutes a pop...


So I started trimming it down. What used to take 4 minutes start to finish takes about 30 seconds now, if that. It's a huge improvement, and I will save the full database stuff for a different app.
__________________
MySQL, MyStruggle - A self-indulgent blog about my attempts to roll my own MySQL Database with OOTP

Logo Gallery
cavebutter is offline   Reply With Quote
Old 07-10-2020, 02:57 PM   #7
ALB123
All Star Reserve
 
Join Date: Jan 2020
Location: Massachusetts
Posts: 638
Hey Cavebutter... I noticed on the Depth Chart spreadsheet if you click on the depthchart_sp or depthchart_bp sheet there are two boxes titled "Pitching Ratings v R".

I'm sure you meant to have one of the boxes titled "Pitching Ratings v L", right?

Also, this is just nitpicking, but did you intentionally title the sheet "depthchart_bp" instead of "depthchart_rp"? Ya know because OOTP refers to non-starting pitchers as RP not BP. Before some wiseguy jumps on this, I'm well aware that some non-starters are CL, but that was not the point.

For some reason, the created spreadsheet: New York Yankees-02-24-1990_depth_chart.xlsx is an empty 89kb file. It has all of the charts and individual pages, but there are no player names and no data at all. I have properly entered in the directory where all of my data files are from the OOTP Export to csv files feature - C:\Users\Chris\Documents\Out of the Park Developments\OOTP Baseball 21\saved_games\1981 Yankees OOTP 21.lg\import_export\csv. The csv files, such as players.csv, teams.csv, leagues.csv, etc. are all present and accounted for and they all contain the appropriate data for your application. I ran a test and I know your program will not proceed if you entered in the wrong directory because it can't find those files it needs. I'm then selecting 100 for MLB and 10 for NY Yankees and I receive the message "All set! Your depthchart is..." indicating all was well. As I said, it produces the spreadsheet, but there is nothing occupying any of the fields you created. You may have noticed that I ran this application of yours on in-game date 02/24/1990. Does it have anything to do with running it during the off-season?

Likewise, I am not any having success with the gameday workbook option. I launch the application and select the feature I want. It asks for the location of my data files, just like the Depth Chart option does. I enter it and the Small Database is successfully created and the program is connected to it - all good signs. Then I enter in 100 for MLB and 10 for the Yankees. Next, I need to paste the location of the file that was created when I exported the league schedule. I placed the file named ILN_BGN_G162_SL1_D2_T7_T7_SL2_D2_T6_T6.lsdl in the same directory (mentioned previously) with all of the csv files for simplicity. Your app mentions that if I don't provide the correct location of that schedule file it will quit and I'll be left pulling my hair out. Of course, as soon as I press Enter something appears on the screen but its gone 1/10th of a second later when the app quits completely.

Does this gamebook workbook option need to be run on Day 1 of the regular season at the earliest or something? I use the up/down arrows that shows 6 dates with either game information or no game/All-Star Game, etc. I clicked the down arrow until I got to the opening week of my upcoming 1990 season. It shows me 6 days' worth of dates and opponents including the scheduled starting pitcher. Based on that, I stopped thinking that running this gameday workbook option during Preseason mattered at all, but maybe it does?

Any thoughts on this matter? If anyone who's had success with this amazing tool feels like giving my files a shot on their system, let me know and I'll 7Zip the necessary files and post a download link. I don't mean to be so rude. I know everybody only has so much free time, why waste any of it on my problems? I hope I haven't offended Cavebutter or anyone who's read this post. Thank you.
__________________
"I'm on the side that's always lost against the side of Heaven. I'm on the side of snake-eyes tossed against the side of seven" - Leonard Cohen "The Captain"
ALB123 is offline   Reply With Quote
Old 07-10-2020, 04:10 PM   #8
ALB123
All Star Reserve
 
Join Date: Jan 2020
Location: Massachusetts
Posts: 638
Woah... I just did all of the same procedures on a different saved game that I use for testing.

The depthchart spreadsheet was created and this time it was filled with all of my players on the Yankees in that saved game. Unfortunately, I did not have any luck with the gameday workbook.

The in-game date of this saved game is June 5, 2019. So, my Yankees are well into the season. I wish I knew what the error message said when I try to make a gameday workbook.

EDIT:
When I select a sheet such as 3B, for example, it shows all of the 3B in my organization and in the chart is shows the data for the top three 3B players in that list of all 3B's I have in my org. On my 3B sheet, right now, the top three names are all from my Triple-A farm team. I'd like to see Chase Headley and Ronald Torreyes in the charts instead of the three AAA players. How can I switch which players are graphed?
__________________
"I'm on the side that's always lost against the side of Heaven. I'm on the side of snake-eyes tossed against the side of seven" - Leonard Cohen "The Captain"

Last edited by ALB123; 07-10-2020 at 04:17 PM.
ALB123 is offline   Reply With Quote
Old 07-13-2020, 01:01 PM   #9
cavebutter
All Star Starter
 
cavebutter's Avatar
 
Join Date: Dec 2005
Location: Los Angeles
Posts: 1,164
First of all, thank you so much for the feedback! There is no other way for me to get better than to have people other than me try this out. Thank you, thank you, thank you. I will respond as best I can in-line.

Quote:
Originally Posted by ALB123 View Post
Hey Cavebutter... I noticed on the Depth Chart spreadsheet if you click on the depthchart_sp or depthchart_bp sheet there are two boxes titled "Pitching Ratings v R".

I'm sure you meant to have one of the boxes titled "Pitching Ratings v L", right?
That's correct, one of the chart titles is incorrect. They both should be pulling data from the correct columns though. This will be corrected in the next point release.

Quote:
Originally Posted by ALB123 View Post
Also, this is just nitpicking, but did you intentionally title the sheet "depthchart_bp" instead of "depthchart_rp"? Ya know because OOTP refers to non-starting pitchers as RP not BP. Before some wiseguy jumps on this, I'm well aware that some non-starters are CL, but that was not the point.
In the category of "It made sense to me at the time...", I made one sheet for starters ("SP") and one for the bullpen ("BP"). I see how that can be unclear and I will change that in the next release.

Quote:
Originally Posted by ALB123 View Post
For some reason, the created spreadsheet: New York Yankees-02-24-1990_depth_chart.xlsx is an empty 89kb file. It has all of the charts and individual pages, but there are no player names and no data at all. I have properly entered in the directory where all of my data files are from the OOTP Export to csv files feature - C:\Users\Chris\Documents\Out of the Park Developments\OOTP Baseball 21\saved_games\1981 Yankees OOTP 21.lg\import_export\csv. The csv files, such as players.csv, teams.csv, leagues.csv, etc. are all present and accounted for and they all contain the appropriate data for your application. I ran a test and I know your program will not proceed if you entered in the wrong directory because it can't find those files it needs. I'm then selecting 100 for MLB and 10 for NY Yankees and I receive the message "All set! Your depthchart is..." indicating all was well. As I said, it produces the spreadsheet, but there is nothing occupying any of the fields you created. You may have noticed that I ran this application of yours on in-game date 02/24/1990. Does it have anything to do with running it during the off-season?
Sure does. The application pulls current year stats. More specifically, it pulls stats from the current calendar year. So, I believe that you can run the depth charts on 12/31 and get good data, but not on 1/1. There's probably an easy way to change it. Will look into it for a future release.

Quote:
Originally Posted by ALB123 View Post
Likewise, I am not any having success with the gameday workbook option. I launch the application and select the feature I want. It asks for the location of my data files, just like the Depth Chart option does. I enter it and the Small Database is successfully created and the program is connected to it - all good signs. Then I enter in 100 for MLB and 10 for the Yankees. Next, I need to paste the location of the file that was created when I exported the league schedule. I placed the file named ILN_BGN_G162_SL1_D2_T7_T7_SL2_D2_T6_T6.lsdl in the same directory (mentioned previously) with all of the csv files for simplicity. Your app mentions that if I don't provide the correct location of that schedule file it will quit and I'll be left pulling my hair out. Of course, as soon as I press Enter something appears on the screen but its gone 1/10th of a second later when the app quits completely.

Does this gamebook workbook option need to be run on Day 1 of the regular season at the earliest or something? I use the up/down arrows that shows 6 dates with either game information or no game/All-Star Game, etc. I clicked the down arrow until I got to the opening week of my upcoming 1990 season. It shows me 6 days' worth of dates and opponents including the scheduled starting pitcher. Based on that, I stopped thinking that running this gameday workbook option during Preseason mattered at all, but maybe it does?
So, keep in mind that the schedule file is league-specific. That is, even if you have leagues that are structured identically, you will still need to export the schedule file associated with that league. Reason being that those schedule files include the team_id that I use to tie everything together.

Also, not entirely clear from what you wrote, but I am assuming that you ran this tool in the offseason as well. I should have been more clear in the docs, but the gameday utility will show your games over the next 7 days, NOT your next 7 games.

Quote:
Originally Posted by ALB123 View Post
Any thoughts on this matter? If anyone who's had success with this amazing tool feels like giving my files a shot on their system, let me know and I'll 7Zip the necessary files and post a download link. I don't mean to be so rude. I know everybody only has so much free time, why waste any of it on my problems? I hope I haven't offended Cavebutter or anyone who's read this post. Thank you.
Again, I really appreciate the feedback! I'd like this to be useful to people other than just myself.

So, try running this again during the regular season and let me know how it works out.
__________________
MySQL, MyStruggle - A self-indulgent blog about my attempts to roll my own MySQL Database with OOTP

Logo Gallery

Last edited by cavebutter; 07-13-2020 at 01:36 PM.
cavebutter is offline   Reply With Quote
Old 07-13-2020, 01:25 PM   #10
cavebutter
All Star Starter
 
cavebutter's Avatar
 
Join Date: Dec 2005
Location: Los Angeles
Posts: 1,164
Quote:
Originally Posted by ALB123 View Post
Woah... I just did all of the same procedures on a different saved game that I use for testing.

The depthchart spreadsheet was created and this time it was filled with all of my players on the Yankees in that saved game. Unfortunately, I did not have any luck with the gameday workbook.
I'm glad that the depth chart worked out! Bothered by the fact that the gameday book did not. The thing that pops into my mind is that there's a problem with the schedule file. Either the location or it's not for the right league specifically.

Quote:
Originally Posted by ALB123 View Post
The in-game date of this saved game is June 5, 2019. So, my Yankees are well into the season. I wish I knew what the error message said when I try to make a gameday workbook.
I will PM you to set up a link to upload to my dropbox. If you don't mind, could you zip up your csv's and league file and load them?
Quote:
Originally Posted by ALB123 View Post
EDIT:
When I select a sheet such as 3B, for example, it shows all of the 3B in my organization and in the chart is shows the data for the top three 3B players in that list of all 3B's I have in my org. On my 3B sheet, right now, the top three names are all from my Triple-A farm team. I'd like to see Chase Headley and Ronald Torreyes in the charts instead of the three AAA players. How can I switch which players are graphed?
There are a couple of ways that you can sort the players. Sort the data the way you would in any spreadsheet - in Excel, click Data and then sort. You can choose the columns want to sort by. Also, if you want to choose specific players to include in the charts, you can highlight the players you want to include and then sort by cell color.
__________________
MySQL, MyStruggle - A self-indulgent blog about my attempts to roll my own MySQL Database with OOTP

Logo Gallery
cavebutter is offline   Reply With Quote
Old 07-13-2020, 01:41 PM   #11
cavebutter
All Star Starter
 
cavebutter's Avatar
 
Join Date: Dec 2005
Location: Los Angeles
Posts: 1,164
Oh, one more thought.

When you're asked to enter the path to the schedule file, you need to provide the exact path to the file location including the file itself.

So, this:
folder/sub_folder/schedule.file

NOT this:
folder/sub_folder

It's a longshot, but maybe that will help?
__________________
MySQL, MyStruggle - A self-indulgent blog about my attempts to roll my own MySQL Database with OOTP

Logo Gallery
cavebutter is offline   Reply With Quote
Old 07-13-2020, 05:27 PM   #12
cavebutter
All Star Starter
 
cavebutter's Avatar
 
Join Date: Dec 2005
Location: Los Angeles
Posts: 1,164
@ALB123 and anyone else having an issue with the Gameday Workbook.


I have to go back and make this super explicit in the docs. Here's what you need to do:


Game --> Game Settings --> League Settings --> Select your league from the pulldown in upper right --> Functions --> Edit League Schedule (middle column, near the top) --> Actions --> Export to File --> choose the destination directory and change filename if you want --> ignore the error that says "could not find team id".


That is a lot of clicks but you only need to do that once a season.


Here's why you need to do that:
The game selects a schedule to apply to each league from the directory that the game installs for schedules. These are generic schedules for specific league structures. Once it selects that schedule, it rewrites it with all the team_id numbers associated with the teams in the league. We need the version of the schedule that has all of the team_ids for your league.
__________________
MySQL, MyStruggle - A self-indulgent blog about my attempts to roll my own MySQL Database with OOTP

Logo Gallery

Last edited by cavebutter; 07-13-2020 at 05:29 PM.
cavebutter is offline   Reply With Quote
Old 12-13-2020, 10:04 AM   #13
CTBrewCrew
Minors (Rookie Ball)
 
Join Date: Nov 2018
Posts: 35
Commish Mode

First off this is a great project! Thank you for all your hard work.

Im trying to get this to work for an online league. Looks like u need to be the commish of the league to get this to work (exporting those csvs required.)

I tried some things to get it to work for an online league where im not a commish.

Using the headers from my offline league (where i am the commissioner), I was able to make an in-game exports as a gm only of an online league. Just choosing my own team using OOTP reports, and recreating the needed files. I just saved them all as the same names as your program is looking for.

For example my teams file with only has my team in it. Eliminating the need for all the csvs from the commissioner. I was able to get the depth chart one to work.

However i cant seem to reproduce is the schedule to a html file to export to a csv. But it looks like the schedule file is in a different type (non-csv).

Also whats the variable that its looking at to determine the top 3 innthe org at each spot for the radar and bar charts?

Ill shoot you of a PM with more details 😄
__________________
CTBrewCrew is offline   Reply With Quote
Old 12-18-2020, 11:46 AM   #14
cavebutter
All Star Starter
 
cavebutter's Avatar
 
Join Date: Dec 2005
Location: Los Angeles
Posts: 1,164
Yes- I hadn't thought about it during development, but you would have to be commish to get this to work in an online league.

The bar and radar charts will automatically select the top three rows from each table. Within the tables, you can sort the players by any of the visible or invisible fields on the page using standard Excel methods. (The invisible field headers are dim but visible off to the right of each sheet.)

I told you in DM about the current state of the Gameday feature. I will summarize it in the next post.
__________________
MySQL, MyStruggle - A self-indulgent blog about my attempts to roll my own MySQL Database with OOTP

Logo Gallery
cavebutter is offline   Reply With Quote
Old 12-18-2020, 11:59 AM   #15
cavebutter
All Star Starter
 
cavebutter's Avatar
 
Join Date: Dec 2005
Location: Los Angeles
Posts: 1,164
Current Status of Gameday Feature

I have not been active in trying to resolve the issues that come up in many cases when trying to use Gameday.

Currently, Gameday will work when you successfully export a schedule file for a league that meets the following conditions:
* Has not expanded or contracted since inception
* Has not evolved to change the number of games per season since inception

Obviously, this is problematic for many leagues. The issue is that the schedule file that is exported from within game does not seem to ever reflect changes made to the league after it was created.

Finding a workaround is top of the TODO list for this project, but life has gotten in the way and I am a little slow.
__________________
MySQL, MyStruggle - A self-indulgent blog about my attempts to roll my own MySQL Database with OOTP

Logo Gallery
cavebutter is offline   Reply With Quote
Old 01-26-2021, 03:37 AM   #16
darkcloud4579
Hall Of Famer
 
Join Date: Jun 2003
Posts: 8,659
Quote:
Originally Posted by cavebutter View Post
I have not been active in trying to resolve the issues that come up in many cases when trying to use Gameday.

Currently, Gameday will work when you successfully export a schedule file for a league that meets the following conditions:
* Has not expanded or contracted since inception
* Has not evolved to change the number of games per season since inception

Obviously, this is problematic for many leagues. The issue is that the schedule file that is exported from within game does not seem to ever reflect changes made to the league after it was created.

Finding a workaround is top of the TODO list for this project, but life has gotten in the way and I am a little slow.
Cool tool! Hope it use it someday when there's a workaround!
darkcloud4579 is offline   Reply With Quote
Old 05-01-2021, 10:28 PM   #17
mladuke
Bat Boy
 
Join Date: Feb 2007
Posts: 16
Ootp22

Does this work for OOTP 22. I was trying the depth chart and was able to select my team but only got blank charts.
mladuke is offline   Reply With Quote
Old 07-09-2021, 02:41 PM   #18
hammerev
Bat Boy
 
Join Date: Feb 2012
Posts: 1
Stuck

I have been trying to figure out the game day utilities and it has been driving me nuts. Obviously I am doing something wrong but what that is I dont know. I get the depth charts to come out fine but the gameday workbook is a no go. I have tried everything and followed the directions exactly still to no avail. I have move the schedule file to different locations, renamed it and still nothing. Maybe somebody knows something I don't. Help if you can
hammerev is offline   Reply With Quote
Reply

Bookmarks


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 10:27 AM.

 

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 - 2025, vBulletin Solutions, Inc.
Copyright © 2024 Out of the Park Developments