Jump to content

TecmoBowlTools - Stat Extractor


averagetsbplayer

Recommended Posts

Hmmm, when I try to extract the webpage just refreshes and I do not see a CSV anywhere... Internal Compression is already turned off because I've used jstout's extractor for quite some time now, and I have the correct version of Nestopia selected. Any suggestions?

EDIT: I'm uploading an 'sav' file which I've pulled from the "saves" folder in Nestopia 1.40

.sav is the battery file. This isn't what you want.

You need to save a state and it should default into the state directory. I believe it's .nst or .nsX where X is the quick state number

Link to comment
Share on other sites

Bah, it's probably just operator error on my part. I simulated a game and created a new save state and quick save state on the blue screen just to make sure I had a good file... but I still can't get it to work :wink:

I'm using the original 1991 NES 28 team ROM, so I keep the box checked. I've also tried unchecking the box and manually selecting the ROM and save state..

Don't worry about it, though. I'll keep working at it, and in the end I can still use jstout's just fine.

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 months later...
  • 3 months later...

Also, if anyone is interested in integrating this tool with any of their league's websites, I'd like to help make it easy to use. I personally don't like the idea of having a bunch of copies/modifications of the same core save state extraction code. I'd like to open up this tool as a webservice for those that are interested.

Link to comment
Share on other sites

Also, if anyone is interested in integrating this tool with any of their league's websites, I'd like to help make it easy to use. I personally don't like the idea of having a bunch of copies/modifications of the same core save state extraction code. I'd like to open up this tool as a webservice for those that are interested.

There is some real potential with this.

Considering the blog services here now I could see some real potential of combining this for people to document their individual seasons.

Link to comment
Share on other sites

Matt, can you elaborate on what you're thinking?

I see the tecmomadison.com tool working in the following manner:

- An http request (POST) is made to the server with the request being in xml format

- The tool/service then responses with discrete data in xml format

Request:


<request>
<emulator>Nestopia1.39</emulator>
<extractionType>SingleGame</extractionType>
<saveStateData>[base64 encoded string of the .sta file]</saveStateData>
<romData>[base64 encoded string of the .nes file]</romData>
</request>

Response:


<response>
<singleGameTeams>
<team>
<type>Home</type>
<player>
<position>QB1</position>
<passingYards>185</passingYards>
<passingAttempts>7</passingAttempts>
...
</player>
...
</team>

<team>
...
</team>
<singleGameTeams>
</response>

Link to comment
Share on other sites

Matt, can you elaborate on what you're thinking?

Initially it would be a "post a box score" for people who do games/seasons against the computer.

Potentially this might be for season stats as well. I think it's the same concept as Operation Sports Dynasties to a point, but obviously Tecmo oriented.

Link to comment
Share on other sites

This is the XML schema I'm planning on using for the Single Game Stat Extraction portion.

http://www.tecmomadi...lStatistics.xsd

It uses a separate schema I created for Player Attributes.

http://www.tecmomadi...rAttributes.xsd

For any person interested in potentially consuming the web service, please give me your feedback on the schema. Let me know if you have recommendations/requests for it.

Edited by averagetsbplayer
Link to comment
Share on other sites

Am I correct in assuming that Player Attributes are only for writing/reading players to the rom?

After quickly running through stats I didn't see conditions anywhere. Also I saw tackles which I assume comes from the tackle hack. Are there any other hacks that add additional stats?

Link to comment
Share on other sites

Matt - On my dev machine, I've already added a "Condition" simpleType enumeration. I'm not exactly sure where in the model I want to stick <Condition> and <IsInjured>. Most likely, those two will be the children of the "PlayerStatistics" complexType. Thoughts?

Regarding tackles, it's the only "new statistic" I've seen introduced via a hack. Just like all pretty much all of the fields, <Tackles> would be an optional element.

Turd - For now, I'm limiting scope to xml. I'll consider adding support for JSON in the future, but I want to get the xml-based services working first.

Edited by averagetsbplayer
Link to comment
Share on other sites

Matt - On my dev machine, I've already added a "Condition" simpleType enumeration. I'm not exactly sure where in the model I want to stick <Condition> and <IsInjured>. Most likely, those two will be the children of the "PlayerStatistics" complexType. Thoughts?

I think this makes the most sense.

Tangent: Considering this doesn't really exist yet other than in multiple save states, it'd be awesome to track the conditions per quarter.

Link to comment
Share on other sites

The schema currently would support that idea if <Condition> is plugged into the <PlayerStatistics> complexType.

The parent node of this whole tree is <SingleGameStatistics> which has a subnode of <GameStatistics>. The <GameStatistics> node supports quarter-by-quarter breakdowns (in the event that we allow 4 save states to be submitted, for example).

<SingleGameStatistics>
<Team></Team>
<Team></Team>
<GameStatistics>
<FirstQuarterStatistics></FirstQuarterStatistics>
<SecondQuarterStatistics></SecondQuarterStatistics>
<ThirdQuarterStatistics></ThirdQuarterStatistics>
<FourthQuarterStatistics>
<TeamStatistics></TeamStatistics>
<TeamStatistics>
<TeamIdentifier>BUF</TeamIdentifier>
<PlayerStatistics>
<Position>QB1</Position>
<Statistics></Statistics>
<Condition>Good</Condition>
<IsInjured>false</IsInjured>
</PlayerStatistics>
</TeamStatistics>
</FourthQuarterStatistics>
<FullGameStatistics>
<TeamStatistics></TeamStatistics>
<TeamStatistics>
<TeamIdentifier>BUF</TeamIdentifier>
<PlayerStatistics>
<Position>QB1</Position>
<Statistics></Statistics>
<Condition>Excellent</Condition>
<IsInjured>true</IsInjured>
</PlayerStatistics>
</TeamStatistics>
</FullGameStatistics>
</GameStatistics>
</SingleGameStatistics>

Edited by averagetsbplayer
Link to comment
Share on other sites

I still need to document this on the public website, but here's the first pass of the Save State parsing API on tecmobowltools.com

http://tecmobowltools.com/API/ParseSaveState

You'll need to do a POST, and it will return an XML-based response. The API accepts four arguments at this point:

SaveStateData - Required. Base64-encoded string representing the data from the save state

Emulator - Required. An integer representing the emulator corresponding to the save state data. "1" for Nesticle, "2" for Nestopia 1.36, "3" for Nestopia 1.39, "4" for Nestopia 1.40

ShouldUseOriginalROM - Optional. "1" or "true" if you want to also parse the player attributes for all of the teams on the original ROM

ROMData - Optional. Base64-encoded string representing the data from a specific ROM that you want parsed.

If there is an error, the API will return you XML representing the error. I have not yet documented the schema being used. This will eventually be written, though.

Please let me know if you're a developer out there that is interested in using this API. I'd like to make sure I'm incorporating your feedback to improve/alter/enhance the API.

Edited by averagetsbplayer
Update URL
Link to comment
Share on other sites

I don't think anyone is using this API, yet. Just in case, I'm letting you know that I made a slight modification to it. As part of the URL, you'll now need to specify the "response format". Currently, only xml is supported for this function.

If you check out the old page I linked (http://tecmobowltools.com/API/ParseSaveState), you'll see that it now has a description of the parameters.

Edited by averagetsbplayer
Update URL
Link to comment
Share on other sites

The season stat extractor is great, averagetsbplayer! I especially like the fact that you've added the ability to pull the player names when extracting since I last used it. I do have a few questions though.

Here's a portion of the season I extracted:

showmissingteamstats.jpg

1) Probably not very important, but is it possible to add the three-letter team abbreviation to each team. Column A, which is not shown here, gives Rom Slot. The same as in the player's stats which is below this. What I'm wondering, is since you were able to pull the player names from the Rom, wouldn't it be also possible to pull team names, albeit in abbreviated form for both Team Stats and Player Stats?

2) More importantly, I noticed that when extracting team stats, it only extracted DefenseP, and DefenseR. Any plans to make it pull Total Defense, and the Offensive stats, as well?

3) Lastly, what exactly are the RushOne, RushTwo, etc. at the end of the lines? Are these plays?

4) Here's an unlikely suggestion, request:

I think you have the basis here for many add-ons. I wonder now would it be possible to take multiple seasons in extracted form and add them together to output a "Career Stats" sort of thing. I ask this because my sons and I often adjust our rom slightly after each season. We usually manually write out stats and add them together to come up with career stats, as well as tweak the player abilities. (We even use the general manager to create a draft pool and draft players) Since you already have this basis, how difficult would it be to pull data from multiple extractions and add them together to produce a new one?

EDIT::: I just tried to extract a single game, adding a rom to pull the names, but the names weren't pulled for some reason.

Edited by macknbyner
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...