Jump to content
Yak

CPU Logic for Play Selection?

Recommended Posts

Gotcha. I guess my question would be then where should I start researching to make that code something I can read and edit? I am assuming something in the hex code can be edited, just need to learn to be able to read the code and figure out the how's, what, where's and why's.

Share this post


Link to post
Share on other sites
41 minutes ago, SBlueman said:

Gotcha. I guess my question would be then where should I start researching to make that code something I can read and edit? I am assuming something in the hex code can be edited, just need to learn to be able to read the code and figure out the how's, what, where's and why's.

 

the NES opcodes.  then take a microprocessor class.

 

 

Edited by buck

Share this post


Link to post
Share on other sites

@SBlueman

THe NES is programmed in 6502 assembly language. Jstout put together a nice learning post with links way back.. \...

 

 

All the comments  and such come hour and hours and hours of reverse engineering the game since the original dissassembly is just unamed labels, register values and memory locations.  You start with something at the bottom of the picture and a LONG time later get to the top of the  picture.

 

 

 

 

DHskYwmV0AQyQQI.jpg:large

Share this post


Link to post
Share on other sites

Anyy chance anyone who's been smart enough to implement this into a game can share either a set command or ips patch us troglodytes can use? Doesn't hurt to ask, you never know.... 

Share this post


Link to post
Share on other sites

Correct me if I am wrong those who know better:

 

To get the defense to choose plays based on the offensive preference, I set x018B4A to 4C84AA.  

This jumps the defensive logic back to loop 66, which is where the offense gets its play percentages from, and thus will select defensive run/pass plays at the same frequency the offense does.

 

In my testings it has worked so far, but I haven't tested every scenario yet.

 

Edit: pretty sure this doesn't work, the defense just chooses run 1 every time.

Edited by MajorLee

Share this post


Link to post
Share on other sites

OK Major, just so I understand: jstout's original hack was built so that if the com defense called a pass play, then there was a 50% chance that it called your favorite (i.e. most-called) pass play and if it called a run play, there was a 50% chance that it called your favorite run play.  BUT the computer doesn't factor your run/pass tendency into its initial decision to call a run or pass.

 

So, with your hack, if all someone does is pass, the computer defense will call a pass 100% of the time, right?  That also means that if this is a supplement to jstout's hack, and all someone does is call 1 pass play all game long, then the computer should call that play about 50% of the time, right?

 

If I have this correct, then this is a brilliant wrinkle to an already brilliant hack.  

Edited by Tecmonster

Share this post


Link to post
Share on other sites

Yeah, so basically it just loops it back to the same percentage logic the CPU uses on offense.

 

The weighting will be based on the percentages you choose to set up from this topic.

So if you set Heavy Passing to xFF, and your team is set to heavy passing, the CPU defense will call pass defense 100% of the time. And then yes with jstout's other logic hack, the jailbreak would take effect still I believe. I haven't been using his logic hack up to this point, so you may want to test that out fully.

Share this post


Link to post
Share on other sites

OK, so you're saying it doesn't track your IN-GAME run/pass play-calling ratio for a MAN-controlled team (since humans call any play they want and don't have to adhere to any weighted ratio settings).  Essentially, you added this hack to make defensive play-calling smarter in COM vs. COM games, right?

Share this post


Link to post
Share on other sites

The somewhat cheap method I came up with awhile back was somewhat similar or a modifcation to jstouts jailbreak method.

 

I had the CPU defense switch to the right play type after the play had been called a certain pct of the time if it hadnt already called the right type. 

 

This was the quickest way to have a fairly compenent cpu playcaller without having a giant logic tree. 

 

The worst thing with the cpu is anytime they guess run and you call pass on offense its basically an automatic td. 

 

 

Share this post


Link to post
Share on other sites

Yeah I suppose it's most effective in COM vs COM, but it's also just kind of nice to not have the CPU being totally stupid and random like bruddog said. Very annoying when my team is stacked with WRs and a great QB, and yet the CPU keeps guessing run all the time. Maybe only useful to some people making their own custom ROMs, but thought I would offer the solution just in case.

Share this post


Link to post
Share on other sites

I agree on all counts.  Bruddog, so if that "certain pct" you used was, say 33%, then multiple plays might be eligible to be called, right?  If so, how did your code handle that?

Share this post


Link to post
Share on other sites

Oh, I think I misunderstood your post.  I overlooked where you said play TYPE.  So I think you mean that if you've been calling a ton of pass plays, then the computer will call nothing but pass on defense (until you dip below whatever play-calling % threshold you set), AND, if it's a supplement to jstout's hack, then that means there is a 50% chance that your favorite pass play will be called by the computer D.  Do I understand that correctly now?

Share this post


Link to post
Share on other sites

No my hack was not a supplement to jstouts hack. It was an independant one. 

 

It peeked at the mans offensive play call after both teams had selected their play and could change the COM's defensive play call after the fact.  

 

EXAMPLE: 

 

If the man selected run and the com had selected a run slot . It would check for a switch to the exact play. This was like a 5% chance. 

 

If the man selected run and the com had selected a pass slot . It would check for a switch to the correct type. This was like 20-30% chance.  Then it would also check for switching to the exact play. 

 

 

It wasn't keeping track of the total number of pass calls or run calls. 

 

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...