|
||||
|
|
OOTP Mods - Database Tools Do you need to take a dump? SQL gurus welcome |
![]() |
|
Thread Tools |
![]() |
#1 |
All Star Starter
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. |
![]() |
![]() |
![]() |
#2 |
All Star Starter
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 |
![]() |
![]() |
![]() |
#3 |
All Star Starter
Join Date: Dec 2005
Location: Los Angeles
Posts: 1,164
|
Screenshots of Depth Charts
Here are pictures of the depth charts:
__________________
MySQL, MyStruggle - A self-indulgent blog about my attempts to roll my own MySQL Database with OOTP Logo Gallery |
![]() |
![]() |
![]() |
#4 |
All Star Starter
Join Date: Dec 2005
Location: Los Angeles
Posts: 1,164
|
Screenshots of Gameday Book
Here's the Gameday Book:
__________________
MySQL, MyStruggle - A self-indulgent blog about my attempts to roll my own MySQL Database with OOTP Logo Gallery |
![]() |
![]() |
![]() |
#5 |
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" |
![]() |
![]() |
![]() |
#6 | |
All Star Starter
Join Date: Dec 2005
Location: Los Angeles
Posts: 1,164
|
Quote:
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 |
|
![]() |
![]() |
![]() |
#7 |
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. ![]() ![]() 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" |
![]() |
![]() |
![]() |
#8 |
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. |
![]() |
![]() |
![]() |
#9 | |||||
All Star Starter
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:
Quote:
Quote:
Quote:
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:
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. |
|||||
![]() |
![]() |
![]() |
#10 | |||
All Star Starter
Join Date: Dec 2005
Location: Los Angeles
Posts: 1,164
|
Quote:
Quote:
Quote:
__________________
MySQL, MyStruggle - A self-indulgent blog about my attempts to roll my own MySQL Database with OOTP Logo Gallery |
|||
![]() |
![]() |
![]() |
#11 |
All Star Starter
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 |
![]() |
![]() |
![]() |
#12 |
All Star Starter
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. |
![]() |
![]() |
![]() |
#13 |
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 😄
__________________
![]() |
![]() |
![]() |
![]() |
#14 |
All Star Starter
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 |
![]() |
![]() |
![]() |
#15 |
All Star Starter
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 |
![]() |
![]() |
![]() |
#16 | |
Hall Of Famer
Join Date: Jun 2003
Posts: 8,659
|
Quote:
|
|
![]() |
![]() |
![]() |
#17 |
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.
|
![]() |
![]() |
![]() |
#18 |
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
|
![]() |
![]() |
![]() |
Bookmarks |
|
|