News:

11 March 2016 - Forum Rules

Main Menu

Baseball Simulator 2014 (NES)

Started by keithisgood, January 10, 2013, 04:33:07 PM

Previous topic - Next topic

keithisgood

Thanks. Trying to up my game to compensate for the lack of all 30 clubs. I'm a bit worried that the icons for Coors Field (replacing Space in BBSIM) and San Fran (replacing Harbor) are a bit too conceptual. The others actually feature snapshots from their stadiums. Thoughts? Does it even matter?

keithisgood

Got some notes asking for the release on this. got bogged down with other things, but I'm still chugging along.
title screen is implemented, however, I had to shift tiles vertically and that seems to have taken away my ability to have "2014" in green.


Also, editing stadiums is a bit trickier than I'd first imagined, so it may have to be saved for a later patch. really, its just getting the rosters together now.

keithisgood

#42
Hack is completed and submitted to the database. Barring any idiocy on my part in filling out the forms, it should be up in a few days.

April 29, 2014, 10:50:11 AM - (Auto Merged - Double Posts are not allowed before 7 days.)

Apparently the .sav file included in the original archive didn't work as advertised. I've updated the rhdn page (http://www.romhacking.net/hacks/1990/) with the fixed .sav.

Also considering another revision to lower power stats; seems like everyone is hitting home runs.

CaptainKwok

I made a few changes to an edit team's data in the .sav file. How do I fix the checksum?

keithisgood

I've found its easiest to avoid all that and simply make changes to the edit teams in fceux's hex editor. Go to edit any of the edit teams, bring up the NES memory and load a table for BBSIM. I can't recall the specific offsets in the RAM, but the team data shows near the start, beginning with the team name. From there it's just a matter of changing hex values to achieve the stats you want (I believe there's a hacking bible in the BBSIM archive which explains how all the stats are stored). The changes won't show on the team edit screen, but if you then press start in the game to save the team, your changes will be registered.  Remember, we're changing RAM, not the ROM memory.

If you have any other questions, feel free to ask.

CaptainKwok

Thanks - that's a decent workaround. The other thing I was trying was changing around the default order of a team's season roster (the team season data is stored just like the regular team info) while keeping their accumulated stats correctly referenced. I wasn't able to test this though because of other edits I had made to the .sav file that wrecked the checksum. I think if I'm just switching around the order of the player pointers though it should keep the checksum the same. I'll post the results.

I also know which bytes represent the checksum but I haven't been able to find out which values are used to calculate it yet. Would you know what type of checksum it would be?

Most of my previous hex editing was done with Super BBSIM - mostly because the season stats are more elaborate and simulation is faster... although why they never tracked runs scored is beyond me!

A few other things:

The 10 bytes before the team info stores information about the team's individual won-lost records versus the other teams in season mode. This is only populated in the stored season info for a team though. The first 5 bytes are the wins, the second 5 bytes are the losses.

.SAV file offsets:
~$4B = Season Team Info (including accumulated vs W-L records)
$240 = Batter accumulated season stats (AB, H, HR, RBI); 2 bytes per stat, 8 bytes total per player. Includes pitcher batting data.
$700 = Pitcher accumulated season stats (?, W, L, S, OUTS or IP*3, R) + 2 Bytes 0; 8 bytes per pitcher; I think ? might be related to freshness?

At the end of each team's player data set, it seems to keep the sum values from the last time you looked at the team stats screen.*

In general I would increase pitcher stamina. IIRC, BBSIM uses 1 stamina per "unmodified" pitch and 2 points for any pitch that is modified (fastball, changeup, curve). A starter with 60 stamina would throw about 40ish pitches before starting to tire - which is typically 4-5 innings in the game. I would also use IP/start versus total IP to provide a baseline for their stamina.

I've done a few 60 game seasons and HRs in general are quite high for some players or a bit low in other cases and not all of it is due to Space stadium! A few I have seen are errors in hex data versus your excel sheet (ie JOSE and EDWN on Toronto) but others are a bit high. I know in Super BBSIM that the player's stance had a big impact on power numbers. I'll run a longer season (165gp) to see if I can spot some trends.

---

Some other things I would like to achieve:
Change the AI's use of pitchers so the first 3 slots were starters and the last 3 are relievers. Right now they cycle through slots 1356-2456-3156-4256 over each 4 game stretch. I'd prefer 1-456; 2-456; 3-456 type system where starters don't show up in relief.

Alter season length or schedule? I know where all accumulated stats are stored, so maybe I can do a hex comparison and identify where the schedule position is tracked?

Alter stadium dimensions?

---

Thanks again for your efforts.  I go through a phase ever couple years where I relive my childhood playing seasons of BBSIM/Super BBSIM and was glad to find this rom hack.

keithisgood

Wow. Thanks for the notes.

As far as checksums go, I haven't done any previous work modifying .sav files, so I have no clue on that one.
And all the individual stats were taken from fangraphs and then modified using a quadratic regression to match the data sets in the original Baseball Simulator. I know there are some players for whom this didn't quite work, so some stats are off.

And if stance affects power, that's news to me. I played around with it but didn't notice any change. If it indeed is a factor then its something I'll definitely have to look at. Do you know of exactly how it effects power? Does it add/subtract from power? From "contact?"

yes; IP/start is much better. I'll mark it in my notes for the next update/release.

I have no idea how the AI currently cycles through pitchers. I'm not the most profficeint hacker, so I'm not sure how I'd go about that.

And yes, stadium dimensions were supposed to be changed for this release (to better match current MLB stadiums). I imagine it would be a simple matter of comparing different stadiums to see how the dimensions are written and then change the hex to suit. Unfortunately, I ran out of time for this release.

Again, thanks for the notes. The goal is to make each release better than the last, hopefully I can keep that going.

CaptainKwok

The only other suggestion I have for your MLB data set is to use a rate version of BsR as well to set the R value. A few players got short changed on their R ratings because their projections were impacted by previous injury history.

---

I think the stance effect is due to ball/bat geometry or at least it was it Super BBSIM. Certain stances had cleaner contact. I haven't run a test yet for stances in BBSIM but I will try to tonight.

---

A bit more information on the season schedule:
The .sav file starts with a 00 byte and then the next 6 bytes represent the very first 04 05 00 02 03 01 line of the initial schedule. The format is HHHAAA where H is home team and A is away team. In the example I gave the games would be 2 at 4, 3 at 5, 1 at 0. The next byte is the season length (05=5, 1E=30, 3C=60, A5=165). The next byte is the current "schedule line" by which I mean the game #. So if the teams are on their 10th game of the season, it would be 10. The next 8 bytes are tricky. I know they are related to the schedule but I haven't been able to deduce how they change exactly after each game is played. The game doesn't store the whole schedule but instead uses the 6 byte sequence above as a "seed" and then applies some sort of transformation of which I think the tricky 8 bytes are.

After that there is a sequence of 8 bytes that I'm not sure what they do. I thought they might be related to team-stadium and manual/auto settings but no luck yet deciphering them.  There's 4 more bytes of 00 and then the next 4 bytes I believe are the checksum.

Lastly after the season team data/player accumulated stats/edit team data, there's a section in the .sav that has the linescore of the last game played and the team stat lines. After that point the rest of the file are blank bytes.

keithisgood

Wow. Thanks for the info.

I thought I used Projected BsR from fangraphs for the steals stat. Perhaps people getting short changed is due to my math.

CaptainKwok

The math is good. BsR is cumulative so players with fewer projected at bats who are speedy might be losing a chunk of running ability. A rate version of BsR would be most fair.

keithisgood

Ah, i See. I must have missed that in the BsR description. I may update at the all star break. If I do, I'll address baserunning.

CaptainKwok

#51
Just a few more random observations and suggestions:

I haven't had a chance yet to do a "controlled" study of the stance effect, but I think it's less than I imagined. What makes it difficult is the influence of the different parks - especially town and space with their really small fields. Do you have any ideas where the playing field dimensions are set?

Overall your MLB dataset is pretty good and in balance with the default teams. However, if you are hoping to generate season numbers a bit closer to MLB ones, then overall most players are hitting with too much power or too high an average. Increasing the stadium size would be one option. I took a look at how the default data set was generated and came up with the below.

The default teams and edit teams calculate the CONTACT attribute using the following formula:
101.2 - AVG*0.2474

Since "plate discipline" is not really a factor in BBSIM (ie walks are not really a factor that a player's attributes influence) it makes more sense to base contact on batting average since it directly influences the player's ability to get hits.

The game uses this formula for most default (and any edit) teams to calculate the POWER attribute:
HR*6 + 672

Although this is not 100% true for all default game players. A few of the better HR hitters have a bit more or less than expected from their HR totals. Going with isolated power was a good move. It gives low average hitters a better chance of hitting HRs (think Adam Dunn) if you tie the CONTACT attribute with batting average. However, when CONTACT is not tied with average, a lot of these guys are hitting many more HRs because their batting averages are ending up over .300 etc.

I would suggest reducing the power attribute range though to control HR totals. Keep the same bottom end (around 700) but the top end to 800 or so.

Lastly, we should figure out what attributes make a pitcher good particularly when used by the AI. Maybe simulate a few long seasons and pick out any pitchers that consistently do well.

keithisgood

I know there are 2 bytes in the pitcher data which control how they utilize their pitches -- the probability that they throw left or right curve in a given situation. I imagine juicing these bytes would force them to throw more off-speed and curving pitches, which would boost their effectiveness against a human player. I haven't tested this as yet, though.

The other pressing need I see is that the AI fielding is horrific. I plan on running a few dummy games where I juice the CPU's fielding stats to see what happens.

CaptainKwok

I ran a 100 game season simulation with 6 teams of the exact same roster. The batters alternated L-R with a mix of averages and power amongst the 8 batters but the same batting order for each team. All the pitchers were the same, but just alternated L-R.

General findings:
- L batters tend to hit only 75-80% of their average
- R batters hit about 100% of their average
- L/R power about the same
- Low contact hitters hit proportionately less HRs versus high contact hitters with the same power
- Space Stadium increases power by about 50%(!), average 10-15%
- Harbor and Town Stadiums increase power by about 20%, average 5-10%
- Grass and Brown Stadiums slightly decrease power/average, Dome Stadium the most
- Average differences due to increased HR rates only

For improved simulations:
- Base contact on average, probably boost L batters a bit
- ISO is a good route to go for power, should help correct for depressed HR totals due to poor contact rate (ie low contact power guys will flub hits more often, but when they do hit it clean, it's outta here)
- Converting ISO to Power should be some sort of power function versus linear
- 800-820 power is probably the max for realistic HR totals over a season
- Stadium re-sizing needs to be figured out

keithisgood

Oh wow. Cheers for that! Did stance have any bearing on hitting?
Stadium edits are indeed next on my list. Just need a block of free time.

CaptainKwok

#55
I didn't control for batter stance but I will check to see if there is anything I can pick out. I am running another season with a few minor changes... reducing power but increasing average running speed. Trying to get more runs scored from hits vs HRs. Right now it's like 75% of runs result from homers.

I know in the rbi forums that one guy made changes to the stadium for rbi baseball which is very similar. Do you know where the stadium info is in the rom?



May 27, 2014, 10:31:54 PM - (Auto Merged - Double Posts are not allowed before 7 days.)

I ran a second simulation with a few changes to reduce HR totals and try to work out a way to produce a high average low power type hitter. The first one worked out ok... capping out at about 800 power kept HR totals over a 165 game season to about 40 max. The second goal didn't work out so well even with good running speed. The better contact ratings just end up hitting more HRs than you'd expect. Overall the L vs R trend remained the same. The only time L batters came close to their target average was when it was low (<250) and they had good power.

I'm assuming from watching the RAM that BBSIM works more or less the same as RBI baseball for how contact is applied. Depending on where the ball makes contact with the bat, the contact rating will be subtracted from the power rating. I believe the range for this is POW-CON*0 to POW-CON*6. I've tried to come up with a predictive rating called "effective power" that is a blend of the contact and power ratings.

Ultimately without increasing stadium size, I think it will be hard to make a high average hitter with low power or get more run generation from hits.

Proveaux

____________________

2013 Fixed

Title screen demo wrap works as it should.
____________________

2014 Fixed

Fixed 2014 color.
____________________

keithisgood

I'd intended for a mid-season update, but my desired edits proved harder than anticipated. Maybe I'll just do an update patch with the fixed title screen.