Statistic and Output Information (Full Version)

All Forums >> [Current Games From Matrix.] >> [Sports] >> Maximum-Football 2.0 >> 3rd Party Developers Area



Message


mbsports -> Statistic and Output Information (7/15/2008 5:20:36 PM)

As many of you know, and probably many of you don't:

My #1 absolute least favorite part of Maximum Football is the stats output or lack thereof.

I find the game outputs, the season stat outputs, the career stats, etc. etc. to be extremely counterproductive and a massive hindrance on running any sort of a league with MaxFB.

In fact I would go so far as to say it is near impossible to run a league with what Maximum Football outputs. For as much customization and all the good things about it, this is a serious issue that I've been working thru 2 seasons to come up with some sort of solution.

What I would like to do is to find out what other MaxFB users are doing in order to get their leagues running and to provide output.

Our website is at http://www.mbsportsnet.com/mbfl/mbcfl.htm

What we did after Season 2, due to the 2.0+ changes that kinda' clear away career stats, is output every piece of statistical data so that our league history wouldn't be wiped clean and we would have some career information. I took that mostly from the Stats_League table utilizing access. I then fired that out into excel with no team information - IE remove nulls in the player column and There is a thankfully a stat group column so I was able to pull that to determine which stats were which.

then I worked on this horrific data field
1:0/2:0/3:0/4:0/5:0/6:0/7:0/8:0/9:0/10:0/11:0/12:0/

The absolute only way I was able to turn this into anything that can't be described as useless is to convert all colons and slashes into commas. I output the whole table to excel with the team stats exclued as stated above. Then I just did a replace all on the colons and slashes. I saved as a CSV and imported back into Access and used delimination to create the new columns

From there I was able to link everything together and actually produce stats that make some sense.

Now I run an NFL League as well which I use Madden for. For all of Madden's shortcomings the community has done a real nice job of breaking it's information into nice data packets and MADCAT is absolutely fantastic for any commish. So I took the MADCAT formats and information and CFL-Ized it based on the mess of data that I now had from MaxFB.

The result is no where near perfect. In fact I'd go far to say there are some massive limitations due to the missing fields.

I won't and can't even justify the reporting that comes out of Maximum Football. It's attrocious and it might be the single worst thing about the sim. In my opinion just about everything else can be worked around in some way or another to achieve a reasonable game of football, but at the end of the day if you can't show what happened to the GMs of your league all of that is great but meaningless.

So what's on the docket for me

1 I need to make the ratings lineup properly, they're off one column and I'm struggling with how to fix that, my php skills are limited.

2 I need to fix some stats holes for kickers and punters - this is due to the lack of blocked/touchback/kickoff stats from MaxFB.

3 Cleanup the scheduled games sql DB so that BC Lions become BCLions and things like that.

4 By using Deft's play analyzer, which actually outputs a nice scoring summary put together a format for game result uploads.


Overall that will go a long way towards fixing my issues, but I want to know what else is out there being done in the community. As all of this gets compiled MBCFL has career stats up to date whenever we put in weekly stats and standings and we have a player card for each player to be clicked on showing their career numbers.

I believe this is an understated issue that really hurts the acceptance of the sim in the community.

Thanks,

Mike







Tullius -> RE: Statistic and Output Information (7/15/2008 6:51:29 PM)

quote:

then I worked on this horrific data field
1:0/2:0/3:0/4:0/5:0/6:0/7:0/8:0/9:0/10:0/11:0/12:0/


At the moment i am dealing with Visual Basic 2008 again and have noticed that problem again. Now i think i have at least a theoretical solution.

This line could be converted in a string, then processed in useable data and fill a table in a new database.

Much of the problems could be caused by the fact that developement of the game started at the beginning of this century and using Access97 as database and a recordset was at that time standart and now a reason for headaches.




Tullius -> RE: Statistic and Output Information (8/2/2008 12:50:50 PM)

quote:

then I worked on this horrific data field
1:0/2:0/3:0/4:0/5:0/6:0/7:0/8:0/9:0/10:0/11:0/12:0/


At the end it was easy when you know what to do. Visual Basic has a class named "String" and in this class you have a "Replace" method. This method allows you to replace every letter or sign even with nothing. So the expression "1:" becomes "" and "/" and ",". Here is a test application to show the result. When you add the player name and team you can save the result in a csv file, too.



[image]local://upfiles/14669/91462715510D473EB6A553DFAD4F76DB.jpg[/image]




mbsports -> RE: Statistic and Output Information (8/2/2008 1:42:36 PM)

very cool, I'll have to give her a shot on my machines and see if I can make it hum.




garysorrell -> RE: Statistic and Output Information (8/2/2008 3:36:29 PM)

If you guys could ever come up with something to pull the stats out and output it in useable format, you will be hailed as great conquering heros [:)]




mbsports -> RE: Statistic and Output Information (8/2/2008 4:23:51 PM)

It actually shouldn't be that bad I don't think - it can be done now but if I ever can figure out VB a little better, should be doable.





Mykal -> RE: Statistic and Output Information (8/2/2008 4:30:20 PM)


quote:

ORIGINAL: garysorrell

If you guys could ever come up with something to pull the stats out and output it in useable format, you will be hailed as great conquering heros [:)]

I'll 2nd that




Tullius -> RE: Statistic and Output Information (8/5/2008 5:21:15 PM)

I have found an other intersting way. You have the ability to export the roster. When you export a roster the actual stats were included. The export is done as html. The interesting is that even the player id will be included (i think this was not intended by DW but could now very fortunate fact)

I have now found a html - edior, formated the text and removed all tags and had so a clean text. The last step would be adding commas and reformat the text but how is not clear for me - at least in the moment.



[image]local://upfiles/14669/EC9AACB5DA7C4F22981A5FE35DFBE0BE.jpg[/image]




Tullius -> RE: Statistic and Output Information (8/5/2008 10:41:04 PM)

And then is there an other way.

Export all the stats so you have an html - file. Load it using Excel or Open Office Calc. They have a function called "change table in text" and so you can create csv file.




Tullius -> RE: Statistic and Output Information (9/27/2008 12:01:08 PM)

quote:

If you guys could ever come up with something to pull the stats out and output it in useable format


XML ?




mbsports -> RE: Statistic and Output Information (9/27/2008 6:35:22 PM)

I'm not all that good with XML - I have to start learning that one.  What I ended up doing was kicking it out and creating a series of SQL scripts that makes the data play nice with MADCAT and then I use that .php framework for the sites.

I was pretty geeked the other day when I got the CFL Records part up...





Tullius -> RE: Statistic and Output Information (9/27/2008 10:43:12 PM)

Ok, then is no need to push something and JD will have his own solution. In the last 24 hours i had a real "creative" phase and found my answers to some problems. Here i have a snapshot from a little programm which could be the first step. The table you can copy to Excel, the database you can transform in XML and then html (? - but here i have no clue) and it should be possible to write the database in a textfile (csv). And i think some time i crack the string a write the numbers in a new table but there is no schedule. There are only 4 QB listed as i have made it only for the passing stats at the moment. The league consists only of 4 teams and only the first week in the first season is played.





mbsports -> RE: Statistic and Output Information (9/28/2008 3:14:34 AM)

Nice work, that's pretty cool!  I'm brainstorming and trying to find a better output methodology and it looks like you've got it about 90% of the way there :-)





Tullius -> RE: Statistic and Output Information (9/28/2008 4:06:39 PM)

Approach Run ...



[image]local://upfiles/14669/D725DC4DD5DA4226B1A52025AF4A75B6.jpg[/image]




Tullius -> RE: Statistic and Output Information (10/1/2008 9:14:35 AM)


A stat viewer is on my draw board. Created tables you could copy in Excel or Writer (Open Office). In Open Office you can transform this file in pdf or html. A text (csv) file is perhaps in the cards.




Marauders -> RE: Statistic and Output Information (10/1/2008 5:05:25 PM)

Looking good, Uwe!




Shaggyra -> RE: Statistic and Output Information (10/4/2008 7:27:35 PM)

Some code to help you.

Option Compare Database
Function CountCSWords(ByVal S) As Integer
' Counts the words in a string that are separated by commas.
Dim WC As Integer, Pos As Integer
  If VarType(S) <> 8 Or Len(S) = 0 Then
    CountCSWords = 0
    Exit Function
  End If
  WC = 1
  Pos = InStr(S, "/")
  Do While Pos > 0
    WC = WC + 1
    Pos = InStr(Pos + 1, S, "/")
  Loop
  CountCSWords = WC
End Function

Function GetCSWord(ByVal S, Indx As Integer)
' Returns the nth word in a specific field.
Dim WC As Integer, Count As Integer, SPos As Integer, EPos As Integer
  WC = CountCSWords(S)
  If Indx < 1 Or Indx > WC Then
    GetCSWord = Null
    Exit Function
  End If
  Count = 1
  SPos = 1
  For Count = 2 To Indx
    SPos = InStr(SPos, S, "/") + 1
  Next Count
  EPos = InStr(SPos, S, "/") - 1
  If EPos <= 0 Then EPos = Len(S)
  GetCSWord = Trim(Mid(S, SPos, EPos - SPos + 1))
End Function

Function CountWords(ByVal S) As Integer
' Counts the words in a string that are separated by commas.
Dim WC As Integer, Pos As Integer
  If VarType(S) <> 8 Or Len(S) = 0 Then
    CountWords = 0
    Exit Function
  End If
  WC = 1
  Pos = InStr(S, ":")
  Do While Pos > 0
    WC = WC + 1
    Pos = InStr(Pos + 1, S, ":")
  Loop
  CountWords = WC
End Function

Function GetWord(ByVal S, Indx As Integer)
' Returns the nth word in a specific field.
Dim WC As Integer, Count As Integer, SPos As Integer, EPos As Integer
  WC = CountWords(S)
  If Indx < 1 Or Indx > WC Then
    GetWord = Null
    Exit Function
  End If
  Count = 1
  SPos = 1
  For Count = 2 To Indx
    SPos = InStr(SPos, S, ":") + 1
  Next Count
  EPos = InStr(SPos, S, ":") - 1
  If EPos <= 0 Then EPos = Len(S)
  GetWord = Trim(Mid(S, SPos, EPos - SPos + 1))
End Function


Example:  Yards =  GetWord(GetCSWord([Statvalues],2),2)
             Long: GetWord(GetCSWord([Statvalues],3),2)
             TD: GetWord(GetCSWord([Statvalues],4),2)


          




Tullius -> RE: Statistic and Output Information (10/4/2008 9:13:16 PM)

@ Shags

Thanks. I have found an other way:


(Form)

For Each DsRow As DataRow In dataset01.Tables("StatsTab").Rows
                            Conversion(DsRow("StatsValues_Group1"))
...
Next

(Modul)
Public StatArray() As String
...
Public Sub Conversion(ByVal StatGroup)
        Dim A As String
        Dim B As String
        Dim i As Integer
        Dim x As String

        A = StatGroup

        For i = 1 To 30
            x = i & ":"
            If i > 10 And i < 21 Then x = "1:"
            If i = 20 Then x = "20:"
            If i > 20 And i < 30 Then x = "2:"
            A = A.Replace(x, ":")
        Next

        B = A.Replace(":", "")

        StatArray = Split(B, "/")

(REM It would be better to count from 30 to 1 then you can save some ifs but this function has worked))






Tullius -> RE: Statistic and Output Information (10/4/2008 9:22:36 PM)

Here is a little preview. The report screen is not ready but the main components works. I have now to add all the stats and this needs more diligence than brain and it costs time. This is only 1 of 13 possible team reports which include all teams and then players have stats, too.
The report is here sorted by TO Ratio. You can sort all stat columns and even the rank will be displayed correct.

Edit: The recorded team stats were not complete in all categories (Defense only Sacks and Tackes) or not existing (Receiving) so the abilty to add some more stats which are not shown by the game was limited. I do not speak about individual stats. So the receiving stats for players are recorded but no stats as team summary.

[image]local://upfiles/14669/143DAD4FAD494FCE90A8985826F88E50.jpg[/image]




garysorrell -> RE: Statistic and Output Information (10/4/2008 10:10:01 PM)

Absolutely fantastic!




Marauders -> RE: Statistic and Output Information (10/5/2008 12:11:18 AM)

I agree ... nice so far.

I am sure Michael is watching this thread closely.





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.828125