Jump to content

IF function possible for defensive coding?


quince3800

Recommended Posts

Greetings,

I'm wondering if it's possible to write the code of one defender as dependent on the action of another. I'd like to be able to put in a zone blitz, but it doesn't work if BOTH the DL and the LB drop back (or blitz). Thus, is there a way to skip to code (simultaneously) where both have X and Y function respectively and otherwise have Y and X function--within the same byte?

I'm thinking it might be possible since bruddog was able to build in a man or zone option into his 3-4 / 4-3 defense rom.

It'd also allow for safeties to take WR's over the top depending on where the CB is assigned to stay up closer to the line, but have another assignment if the CB is man on someone.

Link to comment
Share on other sites

The IF type logic you described doesn't exist. Maybe that function could be created I'm not sure. The way i achieved man or zone option is that at the very beginning of the play i put a random in so either the player actions are all that of a man type defense. OR they will all be that of a zone type defense.

You can do jumps, loopbacks, or random jumps. The random jumps are as close as you get to an IF even thought they aren't that close.

Link to comment
Share on other sites

@ Bruddog:

That means you could theoretically write everyone else's code up to be the same in both options save for the two interacting front seven players (the DL who's to drop back and the LB who ought to blitz). Thus, X % of the time, they'd go into it and Y % it wouldn't. You could even then alter the surrounding players' coverages to account for holes created by the 'switch.'...

How were you able to get the random man / zone split coded?

Link to comment
Share on other sites

I did something like the following

RE - Random % go to location xxxx (code for zone command), else continue (code for man to man )

NT - Same as above.

LE

ROLB

The VERY first command for each player that has to be a random that way it checks all 11 players fast enough that they will all branch or ALL not branch. Now of course if the player is doing the same thing regardless of man or zone there doesn't need to be random.

Link to comment
Share on other sites

The main thing to get a if/then command would have to start at reading another players set commands. A simple solution or alternate solution would be that the player reads another players rating. We hacked it where a player reads their own ratings, and based on that rating the players %age of doing a command increases or decreases. So fast guys react one way, slow guys react another. So if you could have a defensive player read the qbs speed, he would play the defense different. Ie a mlb could read the qbs scramble code, if high enough the mlb would shadow the qb instead of staying in a spot. Thats what weve been trying to do. Think it would make playing the cpu alot harder.

Link to comment
Share on other sites

@DH:

I really like that idea, but my question then is how would you code that? I know how to jump to things, but not to code a < / > function.

@bruddog:

is what you described also the way to make random presnap movement work? I thought about doing that when I was trying to get going earlier, but kinda figured it just wouldn't work...

Also, for your response, to be clear, I can then just write this random in for 2 players and it would work with everyone else being the same in both instances, correct? also, is the random for player X paired with that of player Y? (i.e., if there's a 2/3 chance of A and player X takes B, than means player Y will also take B for every time X takes B; and will take A for every time that X takes A)

Link to comment
Share on other sites

Yes say you want 3-4 with a zone blitz or normal. In normal the LB drops to cover and DE rushes. In blitz the DE drops and LB comes in.

Psudeo -code below

DE 27 xx xx (if random hits go to normal rush) , zone blitz code

xx xx - normal rush code

RILB 27 yy yy (if random hits go to normal coverage), zone blitz code

yy yy - normal coverage code

You want to put the random in before you even put any of the player location or snap stance info in.

I'm making up locations in this example to make things easy.

So the defensive pointer says the RE action is at x8010 (after adding 0x10 for NEs header offset) say.

@8010

27 xx xx player position code, player stance code, zone blitz code

@ xx xx player position code, player stance code, normal rush code

Ideally player position code, player stance code, is probably the same for both so as not to tip of the play. Or maybe you want to tip off the play some of the time so that a smart offensive player can read what's coming. Or maybe you only want to tip it off sometimes.

Link to comment
Share on other sites

As for an if/then, we had to gut all the AI commands (D8,D7 and such). We then had to rewrite the entire playbook ai section, hence the delays with our TSB rom. We are using the area the original uses, except for a couple of thongs we had to find blank space for. Hope to give the board a taste soon, but DH IS knee deep in his fulltime job right now. This would show some if/then ai. We ise %, but on sime it is a 0 or 100% option. For position control it works if x rating is 7 100%right chance to jump to another command, if any other rating, 0%. So it is acting like a on off switch.

Link to comment
Share on other sites

@bruddog: thank you, that's extremely useful.

@H55 / DH: I like the idea, but I'm new here. I know that C9 compares a value to whatever comes next (as in the DL breakthrew code), but I don't know where to start so far as hex'ing in anything. how would you tell the game to check, say the WR's MS to know if you should bring a deep safety over? ... and also then the CB's MS because certain CB's wouldn't need help.

I know the D7 yy xx ec/ea + pointer stuff, as well as looping and assigning bytes. this is well beyond what I know how to enter in though.

Link to comment
Share on other sites

Thats something we hadnt got to YET... Lol, were mastering the player reading their own bytes first. Thats on the back burner. Also looked into seeing if the computer can regonize where another player is using the x,y location as its reference. Understanding the pulling block code is the starting point. Figuring out how the computer knows when x player is in its path is the key. Might be able to tweak the area the cpu uses to know when a player comes into its path to break off the run to code and go into the block code. That would open so many doors. A QB could look at its IQ (using our jstout logic hack), and if smart enough, would look for blitzes, safetys locations, lb locations.. Man all sorts of craziness could be checked if that ever gets figured out. Again, thats just a wishlist item right now... But so was having each team with its own midfield logo... Its just a matter of time.

Edited by drunken_honkey
Link to comment
Share on other sites

  • 1 year later...

This may interest only me, but you cannot make offensive and defensive players job at the same random % on one play.  If you give them the same % (29, for example), they'll both be at XX%, but this will be calculated separately.  I'd wanted to see if I could get OLs to "respond" to a DL's movement within the same byte by placing the random as the very first element in the code sequence, but this doesn't seem to work the way I'd hoped.  Offensive randoms and defensive randoms are "taken" as a separate time.  I tried it again putting the random after the defensive placement pointer and that didn't work either, so I don't think it's possible.


Link to comment
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.

×
×
  • Create New...