Jump to content
Lhopital

Applying SIM data

Recommended Posts

I am a fairly new member to the site, but I have visited for the last few years. I have tried to do a lot of reading, searching, dabbling, and testing before I decided to join. My hat goes off to all the great work and progress that has been done - from the first release of RoseBowl to TSB Manager to TSBTool to the 32-team rom to in-game playbook changes.

I know a great deal of time and work goes into all the roster updates and attribute adjustments. However, in every release I have come across, there seems to be a common misapplication of SIM data. I know it is only used in simulating SKP vs SKP games, but for some of us who don't have the time to play in online leagues, season play is a top priority. I enjoy playing against a league that is as accurate as possible. With that much said, here is the breakdown of SIM data that I have discovered.

Team SIM offense - offensive production

Team SIM defense - stopping opponents offensive production

Just like in real life, a good defense with a poor offense will not do well. Don't expect a team with OFF-2 and DEF-14 to lead the league in defense. That team may do well stopping their opponent, but if the offense cannot do anything, the other team will get more chances with their offense.

The pass/rush preference works as stated:

0-rush more; 1-rush much more; 2-pass more; 3-pass much more

The playbook only affects the proportion of carries; the passing game is unaffected.

QB SIM - rushing ability, passing ability, pocket tendency

So far, this is nothing new - I know.

RB, WR, and TE - these are the numbers I think people get confused on.

The first number affects rushing average.

The third number affects receiving average.

The fourth number is a fraction of passes thrown his way. There are 5 starting skill players (2 RBs, 2WRs, 1TE); the sum of their fourth numbers should be 32. So, if a player has a 4 for this SIM rating, he should get thrown to 4/32 or 1/8 of the time.

Compare the teams from the original 1991 rom. You'll find that even the programmers made mistakes with these figures. The Colts will never throw to Pat Beach in a SIM season (his number is 2) because the sum of the 4 starters in front of him is 32. It seems that the Bills were supposed to be the model team, but when programmers were assigned to the other teams, some of them didn't quite get it right. Some teams have a sum of 32 for all 10 skill players. The difficulty is deciding what number to give a backup. If the starter should get injured, what proportion of the throws should the backup get? Some teams put a 0 for all the backups.

Defense works the same way - only with sacks and interceptions. The sum for the team should be 255 for each. If Ware on the Cowboys got 20 of the team's 50 sacks, he should have a pass rush rating of 102. A player who had 8 sacks on a team with 40 total, should be rated 51.

I don't claim to know too much, and I don't want to come across offensive. I would just like to see the same great roms that are being produced - adjust the SIM data according to this and give us a more realistic simulation of a season.

BTW - I have never actually pinpointed with 100% accuracy the purpose of that 2nd SIM number. I ran some tests to see if it was return average, but it was too random. Any thoughts? If I have made an error in my conclusion, please correct me.

Share this post


Link to post
Share on other sites

You're right. All 10 players add up to 42, but the starters add up to 32. Some of the other teams total 32 for all 10 players, and the Redskins starters would add up to 32 if Gary Clark had a 10 instead of a 1 (type-o ... don't know). None of the teams have a starting sum greater than 32, so maybe this is just the limit.

We had been comparing players on different teams and found no discernable pattern. I tried a team-autonomous view by rating each player with a 2 - then all 3's, 4's, 5's and so on to find a threshhold. The TE got the ball a lot with 2's; at about 6, all starters were even. At 8's, the TE got nothing. At 15, the RBs hogged the ball, WR1 got very little, and WR2 and TE got nothing. The same odd occurence appeared when trying to rate a great defense. I concluded that higher numbers lead to more touches (catches, sacks, INTs), but with a sum limit. For defense, that limit was 255; for offense, it looked like 32. So, why the sum of 42 for BUF? Because only 5 of those 10 play at one time. All 11 defenders start, so their proportions are easy to calculate. On offense, the 5 starting skill players share chances for passes.

I know it sounds odd, but it does explain why edited roms with player 4th number ratings of 10, 8, 14, 12, 10 complain that the WR2 and TE never get the ball (all 32 points are being used by higher roster postions). Whether or not this system was an original programmer's intention, it has proven reliable on my edits for about a year, and I have yet to suffer from statistical anomalies. My hope was that this would spark someone to update the existing SIM editor or create one based partly on statistical data (averages, proportions) as well as assigned attributes.

Any feedback would be welcomed.

Share this post


Link to post
Share on other sites

Sum of 32?? You are right that the KR value is chance at receptions (fairly known as I've stated this for a long while) but its basic subtraction:

SIM_KICK_RETURNING_VALUES: (x18117 from 0 to 15)

.BYTE $00,$14,$19,$21,$26,$2E,$33,$3B,$40,$47,$4C,$54,$59,$66,$73,$80


x175B9:
LDA $003D ; Load random # (x00 to xFF)
--------$95AB:
CMP $0400,X ; compare with receiver value
BCC $95C3 ; if receiver value is more then goto $95C3
SEC
SBC $0400,X ; subtract receiver value from random #
INX ; next receiver #
DEY ; subtract from total receivers (starting at 5)
BNE $95AB ; if more receivers goto $95AB:
--------Receivers didn't create result
LDA $003B ; load random # (x00 to xFF)
LDX #$04
JSR $9FF8 ; subroutine that determines a value from RB1 to TE
CLC
ADC $0044 ; if player 2 then we need to adjust #
TAX ; change to receiver #
--------$95C3:
STX $03BF ; Store receiver # for catch

Basically it checks RB1 to TE against a random number and when player's value is greater then it counts a catch. If the 5 receivers don't become larger then it randomizes a catch.

Share this post


Link to post
Share on other sites

If the random number is from x00 to xFF, then I don't get why WR2 and TE aren't getting any of the randomized catches (given that all are set to 15). Is there something (the sum) stopping the selector from finding "more receivers" to compare their values to? I'm going to try compressing the range of values at x18117 to see if that allows for a higher ratings sum.

Share this post


Link to post
Share on other sites
If the random number is from x00 to xFF, then I don't get why WR2 and TE aren't getting any of the randomized catches (given that all are set to 15). Is there something (the sum) stopping the selector from finding "more receivers" to compare their values to? I'm going to try compressing the range of values at x18117 to see if that allows for a higher ratings sum.

Simple, from the values a sim of 15 = x80. The random # is x00 to xFF. When all 15 and the highest possible xFF, then RB1 checks (xFF - x80) = x7F then RB2 checks (x7F - x80) = OVER (RB2 would be credited with a catch). So all the values are gone by then. So the later guys won't ever reach to be checked and will never get a catch.

Share this post


Link to post
Share on other sites

Ok, now I feel silly. It DOES work like the defense (out of 255) except that you have to translate to a 15 point scale. If I take another look at the 91 Bills starters (8,2,6,10,6) that translates into (64,25,51,76,51) which is 267. IND (2,10,10,10,2) is (25,76,76,76,25) - a sum of 253 before TE Pat Beach is reached (that explains why he catches about 1 pass every 3 seasons). Does this mean that the original programmers still goofed?

If the sum was to be "x" (a # less than 255), then (255-x)/255 of the time there should be a remainder of passes to be randomly distributed. Look at KC starters (0,0,6,10,0) = (0,0,51,76,0) with a sum of 127. This should mean that 127/255 of the passes stop at the two WR and (255-127)/255 are randomly distributed, right? But the TE still gets nothing. 8)

I suppose if I wanted to make mathematically even distribution, I would have to rate RB1 to stop the random # 1/5 of the time, RB2 1/4 of the remaining time, WR1 1/3 of what's left from that, and so on. Here's what I get: (51/255, 51/204, 51/153, 51/102, 51/51) which is my original test #s (6,6,6,6,6). It's that leftover randomness that still puzzles me.

Share this post


Link to post
Share on other sites
Ok, now I feel silly. It DOES work like the defense (out of 255) except that you have to translate to a 15 point scale.

Isn't it a 16 point scale (0-15) ? And 0-255 would be 256 numbers.

Share this post


Link to post
Share on other sites

Lhopital, I did the math in excel for the randomization (when a player isn't selected) as the code shown below. Tecmo programmed it so the numbers end so RB1, RB2, WR1, WR2 are the only numbers outputed (if you change the LDX #$04 to a LDX #$05 then the TE is selected as well). That explains why the TE wasn't getting many catches for your tests.

$9FF8:
STA $3E ; Store Random #
STX $3F ; Store Amount
LDA #$00 ; Starting A
LDX #$08 ; Times to Loop
ASL $3E ; Random * 2
@Loop1:
ROL ; A * 2 + Carry
CMP $3F
BCC @Loop2
SBC $3F ; If Amount >= Current then Current - Amount
@Loop2:
ROL $3E ; Random * 2 + Carry
DEX
BNE @Loop1
RTS

As C code:
int Random = # (0 to 255);
int Amount = 4;
int A = 0;
int X = 0;
int Carry = 0;
Random = Random * 2;
if (Random > 255) {
Random = Random - 256;
Carry = 1;
}
for (X = 8; X > 0; X--) {
A = A * 2 + Carry;
Carry = 0;
if (A >= Amount) {
A = A - Amount;
Carry = 1;
}
Random = Random * 2 + Carry;
if (Random > 255) {
Random = Random - 256;
Carry = 1;
}
else {
Carry = 0;
}
}
A = Receiver

Share this post


Link to post
Share on other sites

You guys are great. I would have never found that on my own.

I changed the byte at x175CB from 04 to 05, and it seems to work fine now. Thanks.

I'm assuming that if every team is properly adjusted so that all 256 (not 255) values are used, this subroutine wouldn't be needed at all in the game.

On a different note - because SIM rating edits are so time consuming, I'd like to find some way to implement this into the JeidTSBToolRosters spreadsheet (maybe put stat entry on each position page). I found some info while searching the threads about stats used for attributes. What are some stats we could use for SIM ratings? Here's what I'm thinking so far:

Team offensive and defensive yardage ranking

QB rating; QB rush att/game; QB rush avg

RB rush yds/game

RB, WR, TE rec/game; yds/rec

Defense - TKLs (is there a stat for TKLs for loss); sacks; passes defended (INT are too infrequent)

FG%; FG long; Punt avg

Sometimes I feel like I'm working for hours trying to find a way to save a few minutes. But, if you think it's worth it, feel free to make suggestions. Or ... maybe someone with more coding experience will adopt this project 8) (I know time is not a luxury). Otherwise, I'll stick with the little I know about formulas in Excel. 8)

I'll check back after the weekend.

Share this post


Link to post
Share on other sites
I created this excel worksheet a while back and I did some light updates today on it. I think it works fairly well and at worst is a good starting point. Let me know what you think.

I like some of the things you have going there. I'll look at it closer later on.

Here's a copy of a spreadsheet that I use to get defensive sim values. It's pretty easy to use. Just input sacks/ints and the sim values scale accordingly.

Notes:

RE through LOLB are given an extra sack to their total.

ROLB through SS are given an extra interception.

(because I don't like zero sack value for DL/LB and I don't like zero int value for LB/DB)

it should be evident as to how to modify the cells to remove this "adjustment".

also, if you want to "bump" a guy to give him a higher sim value, just give him more sacks/ints and it will automatically scale him and everyone else.

TSB defensive sim calcs.xls

Share this post


Link to post
Share on other sites

I know most people are on this board for NES, and I also know that most people that tweak sim data for the NES use some kind of simtool app that someone developed years ago. Probably because of this, I'm not able to find the starting address for the sim bytes in the NES version anywhere. The same area of the rom that you guys are talking about in this thread.

I know the sim bytes for the TSB3 version start at hex address x001EE040 (ie: that's Jim Kelly for the Bills). Can someone please tell me where the sim bytes start in the NES version?

Thanks in advance.

amrush

Share this post


Link to post
Share on other sites
I know the sim bytes for the TSB3 version start at hex address x001EE040 (ie: that's Jim Kelly for the Bills). Can someone please tell me where the sim bytes start in the NES version?

The sim bytes are x18163 to x186A2 (Buffalo to Atlanta). The team pointers to those sim bytes are just above those.

Share this post


Link to post
Share on other sites

NFC West starts at x199C1 and follows the same pattern.

Offensive preferences are at 27526 and x27FDB (NFC West).

However (as I recently discovered), you need to change a few bytes.

Per jstout:

Here we go, a couple bugs:

x27479 to x2747B should be x20 xB6 x9F (this goes to cxrom's written code for Team 1)

x27481 to x27483 should be x20 xB6 x9F (this goes to cxrom's written code for Team 2)

In the code to read the values is another bug:

x27FCE should be xE0 (this makes it compare team value correctly)

Now, edits to these values actually get used. Great find, guys.

I'll take a look at those spreadsheets.

Share this post


Link to post
Share on other sites

For those that want to change the sim values, the individual sim values are:

QB SIM:

Rushing Ability, Passing Ability, Pocket Tendency

RB/WR/TE SIM:

Rushing Ability, Receiving Ability, Receiving Yardage, Receiving Target

DL/LB/DB SIM:

Sack, Interception

K/P SIM:

Kicking Ability

*Passing and Receiving Ability work together in deciding a reception, incompletion, or interception on the play.

*Both Punt and Kick Return Sim values are incorrectly found by Tecmo's code as it doesn't get the sim for the KR or PR player (I'm able to write something though to make it work right). The value was supposed to be either Rushing Ability or Receiving Yardage.

Share this post


Link to post
Share on other sites
For those that want to change the sim values, the individual sim values are:

...

*Both Punt and Kick Return Sim values are incorrectly found by Tecmo's code as it doesn't get the sim for the KR or PR player (I'm able to write something though to make it work right). The value was supposed to be either Rushing Ability or Receiving Yardage.

Thanks for the clarifications. I think that an actual KR/PR sim hack would be useful.

Share this post


Link to post
Share on other sites

Regarding TE sim data, does a team's formation set have anything to do with it. I'm struggling to get Heath Miller receptions when I have PIT set to a 1RB, 3WR, 1TE offense, but when I change it to 2RB, 2WR, 1 TE, it seems to fix things with virtually the same sim rec numbers. It's frustrating, I guess Mewelde Moore will have to start over Nate Washington because of it.

Also, the TEs for the Redskins and Chargers in the original barely see the ball either, that's the only 1RB, 3WR, 1TE formations in the original to go by. Anyone know a fix for this?

Share this post


Link to post
Share on other sites

In regards to your TE question:

I haven't seen that problem arise in the original. Their production fits their ratings. Try:

1. Check the SIM numbers in the original (the 4th SIM number - receiving target value); the Chargers TE is rated a 4 and the Redskins TE is rated 1.

2. Check x175CB. If it reads 04, then throws that are randomized (after spreading the ball based on the receiving target values) don't reach the TE. Change the byte to 05.

3. Check the corresponding values of your receiving target ratings. My initial theory about the sum of 32 was a little off. The values 0-15 actually correspond to these values:

00 14 19 21 26 2E 33 3B 40 47 4C 54 59 66 73 80

... meaning that if the sum of your first 4 starters goes over 255, your TE won't get anything.

Check these values with both lineups 2-2-1 and 1-3-1. It could be that your sum with Nate Washington goes over 255 before reaching Miller but stays under 255 with Moore.

3b. On a side note, I changed those values at x18117 to multiples of 8. Now, every increment on the receiving target value corresonds to 1/32 of the throws.

00 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78

The highest rating of 15 now corresponds to 78 (120 in decimal) out of FF (255).

4. Check to see how you are changing formations. I've gotten accustomed to changing formations manually, so I'm not sure which tool you are using. If done properly,

4a. If you are not using a global 2RB set, the coding from x21642 to x21661 should revert to the original. Just change the comparison statements (C9 xx) to reflect the teams you want changed.

4b. Make similar changes at x30FF8. Again, (C9 xx) is compare team # xx. This section is to assign the proper position to players in each formation.

If all else fails, send a copy of your rom for someone to look at.

Good luck

Share this post


Link to post
Share on other sites

Just a thought,

I was just looking through some old notes on the formation locations x21642 and x30FF8.

There are 6 comparison statements in the x21642 section to change to format of the starter screen (2rb 2wr 1te, 1rb 3wr 1te, or 1rb 4wr). However, at x30FF8 there are only 5 comparison statements to label players with the correct positions (rb, wr, or te). :mrgreen: It draws that information from x3104B. Ever noticed that SD in the original is 1-3-1 yet Bernstine is labeled as a RB?

A 2TE set can be easily added if you overwrite x31056 and x3105D as 03's instead of 02's. This basically replaces the 4WR set with 1rb 1te 2wr 1te. I used this back when Dallas claimed it was going to use Witten and Fasano in a 2TE set for most of its plays (Jones, Witten, Owens, Glenn, Fasano). Useful? I use 2rb for almost all the teams - RB by committee makes it difficult to put in a lot of FB's. 1-3-1 makes up another 2 or 3 teams.

On that note, after looking at those spreadsheets, I am wondering if there is a systematic way to set breaking points from stats to automatically set up formations. I loved the point-range system for adjusting OFF/DEF SIM values and adding 1 sack to the front 7 before calculating values is probably a good idea.

Share this post


Link to post
Share on other sites
In regards to your TE question:

I haven't seen that problem arise in the original. Their production fits their ratings. Try:

1. Check the SIM numbers in the original (the 4th SIM number - receiving target value); the Chargers TE is rated a 4 and the Redskins TE is rated 1.

2. Check x175CB. If it reads 04, then throws that are randomized (after spreading the ball based on the receiving target values) don't reach the TE. Change the byte to 05.

3. Check the corresponding values of your receiving target ratings. My initial theory about the sum of 32 was a little off. The values 0-15 actually correspond to these values:

00 14 19 21 26 2E 33 3B 40 47 4C 54 59 66 73 80

... meaning that if the sum of your first 4 starters goes over 255, your TE won't get anything.

Check these values with both lineups 2-2-1 and 1-3-1. It could be that your sum with Nate Washington goes over 255 before reaching Miller but stays under 255 with Moore.

3b. On a side note, I changed those values at x18117 to multiples of 8. Now, every increment on the receiving target value corresonds to 1/32 of the throws.

00 08 10 18 20 28 30 38 40 48 50 58 60 68 70 78

The highest rating of 15 now corresponds to 78 (120 in decimal) out of FF (255).

4. Check to see how you are changing formations. I've gotten accustomed to changing formations manually, so I'm not sure which tool you are using. If done properly,

4a. If you are not using a global 2RB set, the coding from x21642 to x21661 should revert to the original. Just change the comparison statements (C9 xx) to reflect the teams you want changed.

4b. Make similar changes at x30FF8. Again, (C9 xx) is compare team # xx. This section is to assign the proper position to players in each formation.

If all else fails, send a copy of your rom for someone to look at.

Good luck

1. Of course I have Heath Miller rated high in sim number than the three TEs on 1RB 3WR 1TE formations on the original.

2. Did that ahead of time.

3. This is where my error might of occurred. I used the sum of 32 technique, and my numbers are the same with Washington and Moore, but if the 32 technique doesn't directly correspond and is quite confusing to do, I'll try your way, and change them to multiples of 8 and get back.

4. I'm using the Supreme Tool and I have no idea what any of this material really means or why it is relevant. If you change the formations in the Tool, it seems to make them exactly like they are in the original. I don't think the mix up comes here.

Lemme try the multiple of 8s and I'll post the results. If it doesn't work, I'm going to change sim values of the TE's/teams in 1RB, 3WR, 1TE formations on the original to prove that it's a bug then. haha

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

×