View Full Version : How to Play Defense 301: Gameplanning for your opponent
In the 3rd segment of my defensive writings (the other 2 will be updated at some point) I will go into something I have recently figured out.
I know that there are programs/scripts out there that will break down what plays your opponent calls and when. Breaking it down by down/yardline/game situation, ect. It's also possible by databases. And while it's beyond my skills to program something to do that, I have found a little more manual intensive way of doing it that I intend to share.
I have found that between using excel/calc and notepad++ that it is possible to take the gamelog and reduce it to a csv file that is sortable by pretty much anything you want.
There isn't an NFL coach that doesn't know that about his opponents in the NFL. In FoF, that information is limited to those that know how to access that information and to output it. For years I have advocated someone to put forth one of the scripts/programs that I know are there to do that. Now, I am doing what I can to take those matters into my own hands. May it enhance your fof play experience.
It will take me a couple of days to compile all the information/screen shots and post them.
johnnyshaka
08-23-2010, 10:42 AM
Nice! I believe Greg had something for the previous version of FOF but never updated it for what we're all playing now...or at least never released it to the public...or anybody I know! :)
Looking forward to this.
I am going to start this small then edit it as I go along.
First of all, you need to know these built in key functions for windows.
CTRL-A selects everything in the active document
CTRL-C copies all selected material
CTRL-V paste
This does not involve getting into anything, opening files that few people know how to access or anything like that. If I knew how, I'd share it :D
Ok, doing this will require use of 2 programs. The first is either Mircosoft Excel or Open Office Calc. They are both just spread sheet programs that are useful in sorting this information. The other is called notepad++. You can find it here: Notepad++ | Download Notepad++ software for free at SourceForge.net (http://sourceforge.net/projects/notepad-plus/)
Also, if anyone has a better way to do this or a way to improve on this, please post.
Open up FoF, Excel (references to Excel or Calc will be made just using Excel from this point forward) and notepad++.
Open up a game log for the team you want to scout. Single mouse click in the log. Hit CRTL-A then CTRL-C.
Then go to Excel. Click on EDIT and then PASTE.
There is a little grey box above the 1 and to the left of the A. Click on that. Then double click on one of the lines between the columns (like between A & B). That could open up the column a bit.
Next click DATA and then SORT. Just hit ok.
Once sorted you will see something like this:
http://www.jimmyrepine.com/images/DefensivePlanning01.jpg
Now, to begin the clean up. Go through and delete all the useless information. Information about punts, kickoffs, start and end of quarters, stuff like that. The sorting we just did clumped all that stuff together.
Once it is cleaned up, click on the top cell in Row A. Then scroll down to the last cell with data in it and hold down SHIFT and click there. That sould give you a selecting of all the plays run. Right click in the selected area and select COPY.
Switch over to notepad++. Right click select paste. You should have something that looks like this:
http://jimmyrepine.com/images/DefensivePlanning02.jpg
One of the things I like for notepad++ is its macro feature. It really makes cleaning up these files easy. I forgot to mention it earlier, but I haven't found a limit on a number of games that I can edit like this. Granted, the most I've done it 8. Also, I've only come up with this in the past couple of weeks, so I am sure it can be greatly improved upon.
Now, you can set this up to pull out any of the information that you want that is availible here. And if you are pretty good with databases, you can even get stats and have them auto compiled for you.
For purposes of this instruction, I am only converned with what down, if the play was a run or a pass and what yardline the line of scrimmage was on.
If you are doing more than one game, you'll want to delete all their opponents game information unless you are also looking at their defense. Again, I am just looking at 1 teams offensive game planning.
Anyway.... Once the file is pasted into notepad++, hit CTRL-A and then CTRL-C. Go back into Excel, hit CRTL-A delete all that information, then hit CTRL-V. It will bring up the Text Import box. Remove the check from TAB and place a check in OTHER. In the box next to OTHER put a period .
Hit ok.
You should see something like this:
http://www.jimmyrepine.com/images/DefensivePlanning03.jpg
From here you will need to do a bit of clean up, there aren't the same number of sentances in each play, but more often than not, there is. Just delete and add spaces where you need them to make the colums line up.
I do a DATA > SORT to order things up and it makes it easier to clean up.
For further editing, I don't care what the formation was or what coverage the defense was in for purposes of this exercise. So, we'll delete the 1st 2 columns.
Again, sort and clean.
In column A at this point is all the information that I want.
1-10-HOU14 (3Q: 03:57) Karl Cormier ran around the left tackle for 0 yards
It has the down, distance and LoS. So, we can delete all the other columns. And it should look like this:
http://jimmyrepine.com/images/DefensivePlanning04.jpg
Click in the top cell of column A, scroll down to the last cell with data, hold down shift, click in the last box. Right click- copy.
Go to notepad++ and hit CRTL-A then CTRL-V
You will notice that the downs don't quite line up. To fix that you will need to fix that. Click on SEARCH and then REPLACE.
In the FIND WHAT box type " 1-" that's hit the space bar once and then 1-. In the REPLACE WITH box put 1-
Click replace all. Then do it again. Do this for 2- and 3- as well.
Next what I do is go through and change each of opponents side of the field to OPP. Go back into SEARCH then REPLACE. Find -HOU (for example) and replace with -OPP. Why the dash? When you do a search and replace you want to be as specific as possible. Do that for each opponent.
For the yards to go, you need it in a two digit format. What I do is a Search and replace for -1-, -2-, -3-, ect through -9-. And replace with -01-, -02-, ect. And that should give you this:
http://jimmyrepine.com/images/DefensivePlanning05.jpg
In notepad++, make sure the cursor is at the top of the document. Then with the mouse, click on MACRO and RECORD and do the following key strokes:
HOME
Arrow Key once to the right
PERIOD
DELETE the -
Arrow Key twice to the right
PERIOD
DELETE the -
Arrow Key five times to the right
PERIOD
Arrow Key once down
Click on MARCO and STOP RECORDING.
Click MACRO and Run a Macro Multiple Times
Click Run until end of file
Click SEARCH > REPLACE. Find ran and replace with .ran
Find pass and replace with .pass
Click CTRL-A, CTRL-C
Switch to Excel
File> New> Spread Sheet
CTRL-V and like before remove check from TAB and put one in OTHER and a .
Click on B so that column B is highlighted. Right click- Format Cells- Numbers- Put 2 in leading zeros.
Delete Column D.
Sort the new column D.
In the first cell, type run or pass, which ever it is.
At the bottom right of the cell, you will notice a black box in the corner.
Click and drag that box down for the rest of the runs/passes. Release.
What you should have now:
http://jimmyrepine.com/images/DefensivePlanning06.jpg
You will see that DOWN, DISTANCE, Line of Scrimmage, RUN/PASS have their own columns that you can sort by.
I will update, clean this up as I get a chance, but I wanted to get this out there. Welcome for any input/feedback.
johnnyshaka
08-23-2010, 01:22 PM
How long does this take you, on average, for one game log from start to finish?
EDIT: Thanks for the precise writeup...I'll definitely give it a go in the coming weeks.
Let's see- I will go back and do my whole last season in the GEFL and gameplan against myself. :D I'll time it and let you know.
jeffrey
08-23-2010, 02:44 PM
You should look into grep. The following commands, for instances, would tell you how often the team runs and passes on 1-10, respectively:
jmeier:universe jmeier$ grep 1-10 lastboxlog.html | grep Madison: | grep ran | wc
5 295 2036
jmeier:universe jmeier$ grep 1-10 lastboxlog.html | grep Madison: | grep pass | wc
20 1010 7412
We see that Madison ran 5 times on 1-10 and passed 20.
I've always meant to code up something more elaborate to churn through logs and give me a screen like the one in-game with the percentages on 1st/2nd/3rd and 8-10, 6-7, etc. I've never gotten around to it. If you know any python, this should be very easy with a python script. The grep commands above would give you a quick and easy look at various situations, though. Throw in a few regular expressions and you're all set.
It took me 26 minutes to break down my previous season in the GEFL
On 1st down, I ran the ball 54% and passed it 46%
On 1st and 10, I passed the ball 53% of the time and ran it 47%
Breaking it down will take a bit longer. I need to figure out macros and scripts to help get that done faster.
I remember some basic from when I was like 14 and got a C-64. Then in college there were some courses like c++, java script, asp.net and I've been playing around with php some, but that's about it.
I've never heard of grep, I'll check it out.
jeffrey
08-23-2010, 02:51 PM
I remember some basic from when I was like 14 and got a C-64. Then in college there were some courses like c++, java script, asp.net and I've been playing around with php some, but that's about it.
I've never heard of grep, I'll check it out.
awk would do the trick, too, but if you're going to put the time into learning one, python would be much more useful.
MalcPow
08-23-2010, 03:18 PM
What's the most effective way to translate this information into better gameplanning? Have you found it helpful to try to exactly match the opposing team's offensive percentages?
I've already found several places where I skipped a step and where I can consolidate steps.
As for effectiveness. Yes, I believe it has. For example:
One of my opponents always ran the ball on 2nd and 1 EXCEPT when inside their opponents 20.
Another always passed inside the 20.
One ran it 70% on 1st and 10, and 20% of the time outside of that. But if you looked at the scouting report, they looked pretty balanced.
I am not so much worried about exactly matching, but I think that weighing your gameplan to their trends is important to having a successful defense.
In general, I try to break it down like the FoF gameplan screens, and I feel that is has helped. But, it's too time consuming doing it this way to do it for everygame, at least for me for the number of leagues I am in.
Another example- through the various stat screens in FoF you can tell how often someone passes as opposed to runs the ball on 3rd down. But you don't know is how often they run on 3rd and 1. You can't tell in FoF how many times a team runs the ball on 1st and 10, with this you can.
Not only that, but you can take this a step further. This shows how to put the gamelog into a sortable format.
Dandelion
08-23-2010, 05:00 PM
not to forget that one can work it the other way around and see which defense the opponent brings on for certain situations...
brimar
08-23-2010, 05:06 PM
Very impressed with this and as always how you've shared it with everyone.
I've never really had the time to look into this and like you my programming years were back when I was a teen. I have less time to put into my teams in the coming months but I'm all for giving this approach a go.
natcret
08-23-2010, 05:44 PM
Great read Yoda! Thanks for sharing!
You're welcome. :)
I want to finish this up and then look into what Jeffery posted. It's been a while since I've done any scripting (other than a few j-script projects in college)... I am thinking it was 1995? On an AS/400 with DB/2. Anyway....
If I can come up with something more effective, I'll be posting it here.
Dandelion
08-24-2010, 03:02 AM
uhm.. I *think* that notepad++ isn't needed, when You are working with open office, as about everything You do to format/sort/etc the data can be done with the options that open office has.
And for me one problem came up with copying the text from the log into open office (or notepad++) gave me the data for each play in two seperate lines. Seems in the html for the log there is a "< br > " inserted before the Down/Time/Quarter data.
My way to work around that was to use the html of the log and edit out the html code with the search/replace function..
ravensmac66
08-24-2010, 05:45 AM
Your work in doing this reflects the community aspect of Front Office leagues...sharing info.
When you are in notepad++ do you do searches to narow down to the data you are looking for? Then copy and paste back to Excel?
strickzilla
08-24-2010, 09:39 AM
You should look into grep. The following commands, for instances, would tell you how often the team runs and passes on 1-10, respectively:
jmeier:universe jmeier$ grep 1-10 lastboxlog.html | grep Madison: | grep ran | wc
5 295 2036
jmeier:universe jmeier$ grep 1-10 lastboxlog.html | grep Madison: | grep pass | wc
20 1010 7412
We see that Madison ran 5 times on 1-10 and passed 20.
I've always meant to code up something more elaborate to churn through logs and give me a screen like the one in-game with the percentages on 1st/2nd/3rd and 8-10, 6-7, etc. I've never gotten around to it. If you know any python, this should be very easy with a python script. The grep commands above would give you a quick and easy look at various situations, though. Throw in a few regular expressions and you're all set.
hey thanks for the heads up ive tinkered with grep and its so awesome, this will surely improve my horrible game play :party:
Ben E Lou
08-24-2010, 10:47 AM
I appreciate Yoda's effort and sharing here. It's quite a bit of work that he's undertaken, and sharing that with the community is admirable.
That said, everyone needs to keep in mind that FOF isn't Tecmo Bowl. If I run 55% of the time on 1st and 10, and you put 55% run expectation on 1st and 10, that doesn't give you some massive defensive advantage. Reading this thread makes me wonder about the effort-to-helpfulness ratio. Yoda does give a couple of good examples of people trying to game the system, and I'd agree that against someone running 70% on 1st and 10 and running 20% otherwise, there's *some* benefit here. I would argue, though, that I suspect that the great majority of FOF MP participants don't participate in such game plan shenanigans anyway.
And keep in mind that coaches in FOF do adjust to those types of shenanigans. I can't help but wonder if something like a 1-49-49-1 defense with a coach who is VG or Exc at defensive playcalling has enough of an effect as to render this sort of information not terribly useful against the vast majority of people. With the combination of the coach adjusting and the fact that I strongly suspect that a heavy majority of people play things pretty straight, I wonder where it becomes diminishing returns. Thoughts?
Dandelion
08-24-2010, 10:54 AM
That said, everyone needs to keep in mind that FOF isn't Tecmo Bowl. If I run 55% of the time on 1st and 10, and you put 55% run expectation on 1st and 10, that doesn't give you some massive defensive advantage. Reading this thread makes me wonder about the effort-to-helpfulness ratio.
After getting the inspiration by Yoda I guess it doesn't take that much time to analyze a season.. so even if it's not that helpfull to find out what the opponent is planning, it can help to see if the game behaves as the player wants it too.. might be usefull for finetuning of gameplans and to see if in certain situations the formations are used, that I want to get used..
johnnyshaka
08-24-2010, 12:31 PM
Yeah, I'm not so sure that this info would be helpful week to week but it could help with a few things.
It would definitely hash out future opponents who do use extremes in their gameplans and knowing that could help you out down the road. You could also try and narrow down formation and personnel trends...for yourself and your opponent.
brimar
08-24-2010, 02:41 PM
Okay after my inital enthusiasm it could be I've done something not quite right here when trying this. I click on the log and it opens as a page in my IE browser, which I assume is right.
I copy and paste the info into Excel and all is well. I sort it out and remove the rubbish, all is still well. It looks like the screen shot.
Then however when I copy it to notepad++ my screenshot doesn't look the same!!! Where ... all of a sudden ... does the information come from about what formation is sued and what defence is being faced?
I've being thick here somewhere I know ?!? Equally thought it's not going to magic the data from nowhere is it ? Granted I've always been able to see formation information in Solevision but never in the game logs when I open them?!?
zullojer
08-24-2010, 03:05 PM
thx for the info yoda. I wish i had the time to run this stuff. It's true what others say that if someone runs a balanced run pass in certain down and distances that setting your D up the same won't help much. But it will for sure help to spot those down and distances where an owner specifically passes or runs out of. I know it took me a couple seasons to figure out that a few of my rivals pass 100% on 2nd and 1 and 2nd and 2 etc... Or the guy who runs a ton out of 1st and 2nd down and long situations. Being able to spot that and shut those easy runs down without hurting your pass defense is huge.
That being said, i don't have the time to do all this stuff from game to game in all my leagues so if you right a utility and share it with me I will donate for your time.
johnnyshaka
08-24-2010, 04:38 PM
Okay after my inital enthusiasm it could be I've done something not quite right here when trying this. I click on the log and it opens as a page in my IE browser, which I assume is right.
I copy and paste the info into Excel and all is well. I sort it out and remove the rubbish, all is still well. It looks like the screen shot.
Then however when I copy it to notepad++ my screenshot doesn't look the same!!! Where ... all of a sudden ... does the information come from about what formation is sued and what defence is being faced?
I've being thick here somewhere I know ?!? Equally thought it's not going to magic the data from nowhere is it ? Granted I've always been able to see formation information in Solevision but never in the game logs when I open them?!?
I believe it's a setting in the global settings of FOF.
brimar
08-25-2010, 07:42 AM
Brilliant the setting is indeed there and seems to work to add this information. Now I have to be honest i've played this game for years on multi-player and had no idea at all. Maybe this very small but huge impact setting should be stickied somewhere? Not just inside this thread for that matter
Sometimes we all miss the simple things !!!!
I'll do my best to update this later today or tomorrow.
strickzilla
04-18-2011, 06:58 PM
bump in teh quest for truth!
vBulletin v3.6.0, Copyright ©2000-2026, Jelsoft Enterprises Ltd.