Jump to content
jstout

NES Improved Grappling Code

Recommended Posts

Here is some code I'm working on for improved human grappling. This code is loosely tested and I haven't looked at the 32-team rom to see if it fits. I would love to see any comments or suggestions from those that try this.

Improvements:

HP has been added into the equation for the players.

HP is scaled from of 0 to 7 presses where 6 HP = 0 and 100 HP = 7

CPU has random number of presses rather than 2. Presses will range from 0 to 15 presses. In comparison, I'm a horrible grappler online and get 6 presses normally in the emulator FCEUXD.

NEW: Man vs Man now has random presses added in.

At x284F4:
20 40 BF JSR $BF40 ; MAN VS CPU GRAPPLING
EA NOP
D1 3E CMP ($3E),Y

At x2852E:
20 66 BF JSR $BF66 ; MAN VS MAN GRAPPLING
EA NOP
D1 AE CMP ($AE),Y

At x2BF50:
MAN VS CPU GRAPPLING:
A0 1C LDY #$1C
B1 AE LDA ($AE),Y ; LOAD PLAYER HP
4A LSR
4A LSR
4A LSR
C8 INY
18 CLC
71 AE ADC ($AE),Y ; HP/8 + Presses
91 AE STA ($AE),Y
20 90 B1 JSR $B190 ; LOAD CPU PLAYER
A0 1C LDY #$1C
B1 3E LDA ($3E),Y ; LOAD CPU HP
4A LSR
4A LSR
4A LSR
C8 INY
91 3E STA ($3E),Y ; HP/8
A5 3D LDA $003D ; RANDOM NUMBER
29 0F AND #$0F ; Make Random x0-F
18 CLC
71 3E ADC ($3E),Y ; HP/8 + RANDOM
91 3E STA ($3E),Y
; RETURN TO NORMAL
B1 AE LDA ($AE),Y
60 RTS
MAN VS MAN GRAPPLING:
A0 1C LDY #$1C
B1 AE LDA ($AE),Y ; LOAD OFFENSE HP
4A LSR
4A LSR
4A LSR
C8 INY
18 CLC
71 AE ADC ($AE),Y ; HP/8 + Presses
91 AE STA ($AE),Y
A5 3C LDA $003C ; RANDOM NUMBER
29 03 AND #$03 ; Make Random x0-3
18 CLC
71 AE ADC ($AE),Y ; HP/8 + Presses + RANDOM
91 AE STA ($AE),Y
A0 1C LDY #$1C
B1 3E LDA ($3E),Y ; LOAD DEFENSE HP
4A LSR
4A LSR
4A LSR
C8 INY
18 CLC
71 3E ADC ($3E),Y ; HP/8 + Presses
91 3E STA ($3E),Y
A5 3D LDA $003D ; RANDOM NUMBER
29 03 AND #$03 ; Make Random x0-3
18 CLC
71 3E ADC ($3E),Y ; HP/8 + Presses + RANDOM
91 3E STA ($3E),Y
; RETURN TO NORMAL
B1 3E LDA ($3E),Y
60 RTS

For those that want human players to be able to popcorn each other also do:

At x2851B:
4C 95 BF JMP $BF95 ; Jump to New Code

At x2BFA5:
MAN VS MAN POPCORNING:
20 90 B1 JSR $B190 ; MAY NOT BE NEEDED
A0 1C LDY #$1C
B1 AE LDA ($AE),Y ; LOAD OFFENSE HP
38 SEC
F1 3E SBC ($3E),Y ; OFFENSE HP - DEFENSE HP
90 07 BCC :+
; IF OFFENSE HP > DEFENSE HP
C9 20 CMP #$20
B0 0D BCS :++
4C AC BF JMP $BFAC ; OFFENSE HP < POPCORN so to Grapple
; IF DEFENSE HP > OFFENSE HP
: C9 E2 CMP #$E2
90 09 BCC :++
; NORMAL GRAPPLE
20 36 B1 JSR $B136
4C 0E 85 JMP $850E
; OFFENSE POPCORNS
: 4C 26 85 JMP $8526
; DEFENSE POPCORNS
: 4C 33 85 JMP $8533

Share this post


Link to post
Share on other sites
CPU has random number of presses rather than 2. Presses will range from 0 to 15 presses.

Nice.

Is there a way to take grappling "out"? Specifically, a MAN v MAN player (defender) can be 'instantly' popcorned by the RB if RB HP is high enough? (Like what happens on some INT returns, when you can actually popcorn the MAN QB, and there's nothing he can do but dive)..But let grappling still occur when HPs are not crossing the thresholds. :lol:

:P hey, ROD WOODSON :D

Share this post


Link to post
Share on other sites

Awesome I've been waiting for this! :lol:

Now somebody make a rom with week 17 defensive reactions, week 1 abilities, and hard to grapple cpu and I'll be a happy camper!

Share this post


Link to post
Share on other sites
Is there a way to take grappling "out"? Specifically, a MAN v MAN player (defender) can be 'instantly' popcorned by the RB if RB HP is high enough?

Yes, code has been added upon my post for the human players to do that. Please let me know if the thresholds of x20 xnd xE2 are too high or low for the humans.

I wish there was a place where we could all test how fast our tapping skills are and compare them to others

Without writing an entire program to perform the sames code, the best I could do is tell you how to snap the FCUEXD emulator during play so you would be able to read the amount at the moment the games does. Let me know if you are interested in the debug spots and where to look.

Share this post


Link to post
Share on other sites

yes, i'm back!

CPU has random number of presses rather than 2. Presses will range from 0 to 15 presses.

Nice.

Is there a way to take grappling "out"? Specifically, a MAN v MAN player (defender) can be 'instantly' popcorned by the RB if RB HP is high enough? (Like what happens on some INT returns, when you can actually popcorn the MAN QB, and there's nothing he can do but dive)..But let grappling still occur when HPs are not crossing the thresholds. :lol:

:P hey, ROD WOODSON :D

Share this post


Link to post
Share on other sites
Here is some code I'm working on for improved human grappling. This code is loosely tested and I haven't looked at the 32-team rom to see if it fits. I would love to see any comments or suggestions from those that try this.

Improvements:

HP has been added into the equation for the players.

HP is scaled from of 0 to 7 presses where 6 HP = 0 and 100 HP = 7

CPU has random number of presses rather than 2. Presses will range from 0 to 15 presses. In comparison, I'm a horrible grappler online and get 6 presses normally in the emulator FCEUXD.

NEW: Man vs Man now has random presses added in.

Ok so "presses" is that button presses per second? I haven't played with this but maybe scale hp from 0-14 instead of 0-7. And the comp could have the same scale just add the random presses this may already be what you've done?

If someone could shoot me an original rom with these changes I'd play around with it but I suck at editing hex.

Share this post


Link to post
Share on other sites

Is it possible to tweak the COM vs COM grappling code at all.

The only reason I ask is it could make OL vs DL play a little more realistic when non picked plays are involved. Ie bad o-lines hold up occasionally vs good d-lines and bad d-lines bust through OL's occasionally.

Share this post


Link to post
Share on other sites
Is it possible to tweak the COM vs COM grappling code at all.

The only reason I ask is it could make OL vs DL play a little more realistic when non picked plays are involved.

Yes, it is possible to tweak the COM vs COM. What kind of changes did you have in mind?

Share this post


Link to post
Share on other sites
Yes, code has been added upon my post for the human players to do that. Please let me know if the thresholds of x20 xnd xE2 are too high or low for the humans.

damn...

here's the TSBTool code to try out the MAN v MAN popcorn (though I'm a bit drunken as I type):

SET( 0x2851b, 0x4c95bf )
SET( 0x2bfa5, 0x2090b1a01cb1ae38f13e9004c920b00ac9e290092036b14c0e854c26854c3385 )

I will try it out against a MAN in the next couple of days - thanks jstout!

Share this post


Link to post
Share on other sites
Here is some code I'm working on for improved human grappling. This code is loosely tested and I haven't looked at the 32-team rom to see if it fits. I would love to see any comments or suggestions from those that try this.

Improvements:

HP has been added into the equation for the players.

HP is scaled from of 0 to 7 presses where 6 HP = 0 and 100 HP = 7

CPU has random number of presses rather than 2. Presses will range from 0 to 15 presses. In comparison, I'm a horrible grappler online and get 6 presses normally in the emulator FCEUXD.

NEW: Man vs Man now has random presses added in.

Ok so "presses" is that button presses per second? I haven't played with this but maybe scale hp from 0-14 instead of 0-7. And the comp could have the same scale just add the random presses this may already be what you've done?

If someone could shoot me an original rom with these changes I'd play around with it but I suck at editing hex.

I second this. I'll be honest, though, I'm just lazy :D If you have already made the changes upload it, I'd download it in a second.

Share this post


Link to post
Share on other sites
I second this. I'll be honest, though, I'm just lazy :D If you have already made the changes upload it, I'd download it in a second.

lol, I'm lazy too. Any feedback or wanted adjustments is appreciated.

I'm working on many ideas like this trying to find some quality things. Some turn out well and others not so much but knowing what people enjoy or would like to see implemented always helps in what to work with or try next.

TSB Grapple.zip

Share this post


Link to post
Share on other sites

I played a few games online last night with the new MAN v MAN grapple code.

There seems to be a problem with some defenders - they were coming in and straight-mashing the RB (no grapple - just drop dead.) Now, the Defenders in question did have a 'high' HP, but they were also 'mashing' RBs with 81 HP - so somethings off.

jstout, can you make this code work like this?

1. if Off HP is *greater than or equal to* 50 HP over Defender, then Defender is POPCORN (no grapple).

2. if Def HP is *greater than or equal to* 50 HP over Off Player, then Off Player is MASHED (no grapple).

3. anything else is the normal grapple

examples:

1. 75 HP off Player POPCORNS a 25 HP defender

2. 63 HP defender MASHES a 13 HP off Player

3. 38 HP off player GRAPPLES with 56 HP defender and etc.

I think I'm gonna have some fun with this code.

Share this post


Link to post
Share on other sites

well i only played a preseason game so the cpu is still slow as crap, but I used 38hp Albert Bentley and the Colts against the 49ers and I definitely got out-grappled in a few one-on-one situations. When it is human vs. cpu does the human player get points for hp or it's all based on how much you grapple? Because I don't want to be controlling Lott and be outgrappled by Bentley, either.

So the 0-15 thing is in addition to the 0-7 for the hp? So a 100hp player controlled by the cpu will have between 7 and 22 presses? I also think it should be one extra press per notch of hp, as tupa said, so from 0-100 would be 0-15 instead of 0-7.

Definitely a step in the right direction. For the random presses I think the starting point should also be higher than 0. Maybe 5-12 instead of 0-15? So the total then from 6hp to 100hp would be 5-27 presses:

6hp 5-12

13hp 6-13

19hp 7-14

etc. up to

100hp 20-27

Share this post


Link to post
Share on other sites
When it is human vs. cpu does the human player get points for hp or it's all based on how much you grapple?

So the 0-15 thing is in addition to the 0-7 for the hp? So a 100hp player controlled by the cpu will have between 7 and 22 presses? I also think it should be one extra press per notch of hp, as tupa said, so from 0-100 would be 0-15 instead of 0-7.

Definitely a step in the right direction. For the random presses I think the starting point should also be higher than 0. Maybe 5-12 instead of 0-15?

Thanks for the input. This is the stuff I'm looking for and I will be going back to test if this works better than my original coding. It would be beneficial to me though if I knew approximate ranges for the highly-skilled grapplers so I could adjust the numbers around that.

In both ManVsMan and ManVsCPU the HP is included for both sides then the presses are added on. So Human and CPU are treated identical other than the CPU has a random number of presses while the human is the number of presses.

Yes, the 0-15 is in addition to the 0-7 so a 100 HP is 7-22 presses. I'm looking into the 0-15 range over the 0-7 as a few have brought this up. I originally believe 0-7 for HP was quite sufficient but I'll look into the larger range.

Thanks, I agree that a range higher than 0 like 5-12 would be better and I believe I will change it to do this.

Share this post


Link to post
Share on other sites

Make a rom with the com players always having a set amount of taps, and make it really high. Send it to some of the faster tappers, see what they can beat consistantly, and find out exactly where they start to lose, or can't ever beat.

Share this post


Link to post
Share on other sites
Make a rom with the com players always having a set amount of taps, and make it really high. Send it to some of the faster tappers, see what they can beat consistantly, and find out exactly where they start to lose, or can't ever beat.

That's a good idea. I was also thinking that the cpu should be set higher than the best humans because all other aspects of the cpu game are so awful. If you give the cpu a distinct advantage in button mashing this might even things up a bit. This way when even the best go against a cpu player with a few notches of hp higher they will lose the grapple most of the time.

Another idea for MAN vs. MAN games might be to make a player's grappling skill less significant. Make the points for hp alone so high that what you add to it by grappling would not matter much. For example if you are controlling a 38hp player and your opponent has a 50hp player, if the 50 guy gets something like 50 presses automatically and the 38 gets 35 then even if you press 10 times a second you couldn't outgrapple him. Good grapplers probably wouldn't like this but it would even the playing field for those of us who are slower :D

Share this post


Link to post
Share on other sites
Make a rom with the com players always having a set amount of taps, and make it really high. Send it to some of the faster tappers, see what they can beat consistantly, and find out exactly where they start to lose, or can't ever beat.

That's a good idea. I was also thinking that the cpu should be set higher than the best humans because all other aspects of the cpu game are so awful. If you give the cpu a distinct advantage in button mashing this might even things up a bit. This way when even the best go against a cpu player with a few notches of hp higher they will lose the grapple most of the time.

Another idea for MAN vs. MAN games might be to make a player's grappling skill less significant. Make the points for hp alone so high that what you add to it by grappling would not matter much. For example if you are controlling a 38hp player and your opponent has a 50hp player, if the 50 guy gets something like 50 presses automatically and the 38 gets 35 then even if you press 10 times a second you couldn't outgrapple him. Good grapplers probably wouldn't like this but it would even the playing field for those of us who are slower :D

Whoa there, I wouldn't go that extreme. One press per hp should be plenty. 94 okoye vs even 75 fulcher would take 4 more presses i guess, it's 3 away..... tie goes to hp or tie goes to defender or.... just how does that work???

Anyways a 5 press advantage 94vs a 63 i would think is almost unbeatable, but we need some research on this i guess. and the 13 hp qb would be toast against most defenders.

And bo why didn't you speak up when I mentioned (even before jstout did all this) about a cpu wins all grapples/max coverage and reactions rom with no ability boosts. Well maybe slight in later weeks, no way to tell how hard it would be until playing it. I just hate not being able to intercept or run in later weeks vs cpu because of the stupid boosts.

Share this post


Link to post
Share on other sites
And bo why didn't you speak up when I mentioned (even before jstout did all this) about a cpu wins all grapples/max coverage and reactions rom with no ability boosts. Well maybe slight in later weeks, no way to tell how hard it would be until playing it. I just hate not being able to intercept or run in later weeks vs cpu because of the stupid boosts.

Sorry, my attention to Tecmo stuff wavers, I have a short attention span :D Right now my all time greats rom is probably about 6 working hours from completion, but I have gone off and started working on a 2002 rom because I have come up with yet more formulas for figuring ratings, that I think does a good job of considering both individual and team performance. I could go a month without checking this board, then I'll be all into it again for a period of time.

Share this post


Link to post
Share on other sites

jstout, I made a patch from your TSB Grapple.nes and applied it to the most recent 32 team ROM. So far so good - I haven't noticed any glitches 4 games into a season. :D I will test it MAN v MAN tonight.

One thing, why add "random presses" for a MAN controlled player- doesn't that take the skill away? Or is that what you're trying to do? That's my only beef with this code.

Share this post


Link to post
Share on other sites

I think there is a bug in this code for MAN v MAN play.

I made a .ips patch from the 'TSB Grapple.NES' file you uploaded and applied it to the newest 32 team rom.

In MAN v MAN games-

A 88 HP rb would popcorn (no grapple) a 38 HP defender (MAN controlled)

BUT -

A 63 HP defender (MAN controlled) would instantly DROP the 88 HP rb (no grappling)

So something must be off with the code - there's no way that a 63 HP defender should 'instantly drop' (no grapple at all, MASH) an 88 HP rb.

I saw this same sort of thing happen 3 games in a row of MAN v MAN, not just in this particular HP scenario. This is the same thing I posted a few days ago when I was just testing the MAN v MAN code you made. I'm just trying to help you test it and make it better. :D

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.

×