Saturday, November 4, 2023

In OOTP schedule, how do numbers in file correspond to teams in league?

An Out of the Park (OOTP) Baseball schedule uses numbers (1 through however teams in the league).  If you want to get to specific matchups between teams, you need to know how those numbers match up with the teams in the league.

Sunday, September 10, 2023

Rigging weekend home/away splits

I have come to make it a high priority to balance the number of home and away weekend series for all the teams.  There is an attendance boost in the game for weekend games, so it is not optimal to have some teams with several more home weekends than away and others with several more away than home.

Tuesday, March 28, 2023

Gametimes

When does it start?

Saturday, March 25, 2023

5-team divisions, an easy scenario

Fairly recently there was a request involving an odd number of teams per division, which is a complicating factor, but the other parameters combined to make layout fairly easy. Granted, you may look at the full post length and wonder how it could be easy. But if you see past all the detail in the steps here, hopefully the key point is clear.

Tuesday, March 21, 2023

8 teams, 84 games - Part 7

With a gap of over 3 years in this series, I have forgotten what all I intended to include in this series.  So extending the "ta-da" jump to the end of the grid work in the previous part, I am jumping to the end of the process here.  Basically I will just hand-wave on how I get from completed grid from the previous entry to the file that can be used by the game.

Where I last left off I had the grid all worked out in the webpage.  That webpage was when I did a bit of Javascript learning - just enough to get the page to do the main things I wanted.  For "export" of the grid content, all I did was make that "Console" button that will dump the data into the browser developer console.  So I have to hit F12 to bring up the Developer Tools, choose the Console tab, and copy the info dumped there.  I can then paste than into basically a text file from which I can do subsequent work.  That is my "adjusted" grid file.

The webpage showed a variety of stats used to show the details for the characteristics I want to set.  But I have a separate stats processing script that computes those same things and more.  I run that over the adjusted data to make sure everything looks good.

Another script takes the input of that grid and produces the LSDL file for the game.  I have the details that go into the header section of the LSDL file in a configuration file, so that info gets pulled in from there and plugged in the file as it is built.  Comments to describe the schedule can also be pulled in to include them in the file.

There is one detail not yet addressed at all in the prepartion - gametimes.  Rather than tuck in discussion of that here, I will save it for its own post and simply say that some decision is made for each each game.  Most simply that could be using the same default value like 7pm, but through configuration there can be other options made available.

8 teams, 84 games - Part 6

Where last left off we had just moved one pair of series, switching the positions of a couple series involving teams 3 & 4 in halfweeks 22 & 26 to try to improvement their homestands/roadtrips.

That left us with "dh" instances for those teams - they each now have two 4-game series in one week (halfweeks 21 & 22).  We are aiming to not have any actual doubleheaders, so we will want to adjust to move one game for each of those teams in that week.  The simplest thing would be to move the 4-game series now in halfweek 22 (that was originally in halfweek 26).  We could simply switch that with the 3-game series that are also 4@3 in halfweeks 9 & 16.  That would be fine.  But we could introduce more variation in offdays by removing the extra games for teams 3 & 4 from their halfweek 21 series.  We would do that by switching out those 4-game series from there with 3-game series between the same pairs of teams from other places in the schedule grid.

Very often the case is like that - one improvement does what it intended toward achieving some target (like decreasing the number of single-series homestands/roadtrips, but lead to another thing to address (like creating instances of too many games in a week).  There can often be quite a chain - doing change A creates a need or benefit to doing change B, which compels change C, which ...  Sometimes things end up getting worse such that the preferred action becomes erasing all those changes, then doing something different instead of that original change A.

I am just going to skip all the way to the end rather than show individually at lot more of the changes made.  Here is a side-by-side of the grid (with teams 3 & 4 highlighted) before any changes at all, then after all the changes done to get the grid into a good overall condition with all the stats at satisfactory levels.

Here is a gif version that shows going back and forth between before and after.  From that it may be easier to see the changes made to flip-flop series in different places, juggle the 3-game & 4-game series, and tweak the day-move checkboxes.

That stats at the bottom of the grid are all "OK" in the after picture.  Some things are very precise, like getting the counts of home & away games.  The thresholds for others are rather arbitrary, like for single_series.  There hsa to be some decision of "good enough" to decide to quit tinkering.

In the after picture team 4 has the green indicator on its series for halfweek 25.  That indicates the series there is at home and could be bumped to start a day later to have the offday before the series after a road series rather than in the middle of the homestand as it sits now.  I like to do that as a matter of personal preference.  But there is something blocking that change.

Moving that 2@4 series to start a day later (from Mon-Wed to Tue-Thu) would clash for team 2 with its 4-game series in halfweek 26 covering Thu-Sun.  That 4-game series of 2@1 could be switched with one of the 3-game series for 2@1 in halfweek 9 or 13.  But maybe I prefer the way the 4-game series (and thus offdays) are and leaving in that mid-homestand offday.

So it is important to have targets and an endpoint in mind.  After all stats warnings are cleared, maybe I glance around for more improvements, but it is good enough.

Tuesday, December 31, 2019

8 teams, 84 games - Part 5

We saw the grid and statistics for the initial layout in the previous part.  For a first step in making revisions it would be better to see exactly what we want to revise.  Parameters can be defined for each schedule that set the thresholds we want for the statistics, and the grid can show where something is outside the desired bounds.