Jump to content
NHL'94 Forums

Extracting Stats


Recommended Posts

any hope of seeing a stat extracting type program that you can download in the near or distant future?

Dadonch has a program on here somewhere that lets you run a league offline (it's a program you run on your computer).

I can and have given out my online league website code and database, but it's complicated and I don't give a lot of help with it so you need to know or learn how to use it on your own.

Link to comment
Share on other sites

  • 8 months later...
My extraction tool is starting to work really well. Already outputting 56 for Excel use, that outputs a total of 83 stats, including calculating w/l/t/otw/otl etc. It's just a matter of pasting a string in Excel that my proggie produces

Not very advanced compared to what malachku has done, I know, but I didn't imagine I would get this far!

I'm trying to automatically output both team names used (it's pretty much done, it's only a matter of time).. Next step would be to log individual player stats. Unfortunately I'm not familiar with database use so I would have to take detours...

Are you still working on this extraction tool? How's it working? Could I test it out? This would be unbelievable for SNES leagues!

Link to comment
Share on other sites

  • 4 months later...

offset indicating which period length was selected: 0xF4C8

0000 means 1st option (5 mins)

0001 means 2nd option (10 mins in default rom..)

0002 means 3rd option (20 mins..)

Current period: 0xE8DE

0000 means 1st period

0001 means 2nd period

0002 means 3rd period

0003 means OT

Current time remaining in period: 0xE8E0

012c would be 5 minutes (300 seconds)

003c would be 1 minute (60 seconds)

etc...

Length of current period: 0xE8E4

012c would be 5 minutes (300 seconds)

0258 would be 10 minutes (600 seconds)

etc...

(not the same thing as the period length selected, because OT might be a different length)

offset indicating which line change method was selected: 0xF4EA

0000 - on

0001 - off

0002 - auto

Link to comment
Share on other sites

this is a great find for stats leagues:

player time on the ice is recorded! it's recorded in seconds.

home team:

up to 26 players, 2 bytes per player, from offset EC7C to ECAF

away team:

up to 26 players, 2 bytes per player, from offset EFE0 to F013

one thing i have noticed, though, is that the value is not 100% correct. it tends to lose or gain a second here and there, but it stays better than 99% accurate (typically it loses around 10 seconds over the course of a game).

i'll incorporate this into Blitz eventually..

Link to comment
Share on other sites

  • 3 months later...

How to get the +/- stat.

The +/- stat can be added to a ROM using my Hack Applicator

The stat is not recorded the same as goals/assists, etc, as a total per player.

Instead, every time a goal is scored, the indexes of the players who were on the ice are recorded. Also, the type of goal (PP/PK/PS) is recorded, and if it was a home or away goal. It's a bit like the Scoring summary.

size of +/- data: offset: 01036C, 2 bytes.

Each goal is 14 bytes

start of +/- data: 01036E

So, for the first goal:

Goal Type:

01036E: type of goal in format xy.

x = 0, it's a home goal.

x = 4, home penaltyshot goal.

x = 8, it's an away goal.

x = c, away penaltyshot goal.

y = 0, short handed by 2

y = 1, sh1

y = 2, even strength

y = 3, powerplay goal

y = 4, pp2 goal

example:

c3: away penalty shot goal, and it was a pp1 when the penalty shot was called

02: home goal, even strength.

01036F: not used

Who was on the ice:

010370-010375: indexes of home players who were on the ice for the first goal

010376-01037B: indexes of away players who were on the ice for the first goal

In your stat extractor, you will need to use some rules:

  • On an even strength goal, +/- is applied.
  • On a powerplay goal, +/- is ignored.
  • On a shorthanded goal, +/- is applied.
  • Penalty shots also follow the above rules, but only the scorer gets the +.
Note: Which goalie was on the ice is also recorded. This could be used to assign win/loss records to goalies in leagues since you can now tell which goalie was actually playing when the deciding goal was scored.

Note/Bug: On a penalty shot goal, the +/- data will record both goalies as being on the ice. Ignore the goalie for the scoring team (if you aren't already ignoring all the goalies anyway!)

Link to comment
Share on other sites

  • 11 months later...
  • 8 months later...
  • 2 years later...

Has anyone ever found the offset that keeps track of player status?

i.e. Player on ice, injured for period, injured for game...under the Team Roster

I think it would be a cool stat to add. We already track the "Injuring" penalty, but it would be nice to track who gets taken out the most.

The only drawback would be we could only keep track of game ending injuries. I would imagine the flag would reset after an injury for a period.

Link to comment
Share on other sites

Has anyone ever found the offset that keeps track of player status?

i.e. Player on ice, injured for period, injured for game...under the Team Roster

I think it would be a cool stat to add. We already track the "Injuring" penalty, but it would be nice to track who gets taken out the most.

The only drawback would be we could only keep track of game ending injuries. I would imagine the flag would reset after an injury for a period.

Cool idea. I see what you mean by not being able to track period injuries, at least for period 1 and 2, if we just have a savestate at the end of the game.

Gartner on my Blitz team seems to get injured for the game every other game, so I'll record the games and see if I can help find the offset.

Link to comment
Share on other sites

  • 4 weeks later...

I started this search a little while back and I think I've gotten some progress...just been busy with many leagues going on now (Blitz, TDL, Classic GENS, Classic SNES, Dream Team).

What I did was take savestates from one game:

* player on ice

* player injured

* player on bench

* player on ice

* player bench

etc. Then I compare the values and see which offset has values where ("ice" = "ice", "bench = bench", "ice <> bench", "injured" <> "ice or bench").

I've only done one set of these (Blitz final Game 5, McSorley injures Courtnall right at the

) and I found that offset 0018344 has a value of

* 00 - right before the injury (ice)

* 33 - right after the injury (injury P)

* 0F - end of 1st (bench)

* 00 - start of 2nd (ice)

* 0F - another save I took when I benched Courtnall (bench)

This is the only offset that matched what I would expect the values to be. Courtnall is the 4th player on the home team in the ROM.

Anyway, wanted to share this progress. I'm using the Blitz finals because I have the krecs to grab saves, and the stats and videos are available so I can quickly isolate the penalties/injuries. If I can replicate this pattern a few times, that should be a good indicator that this is what we are looking for.

Link to comment
Share on other sites

  • 3 years later...

I know I am really late in on this... I hope it is not a problem I'm bumping this.

 

Have any of you guys tried HLS2? It is an old league simulator with also minor league player relegation/promotion and possibility to run several seasons. Can run with DOSBOX.

It has a feature of importing data from saved Wayne Gretzky Hockey 3 games.

It would be really cool to use this to instead import data from NHL94.

Edited by nikethebike
Link to comment
Share on other sites

  • 2 months later...
On 6/9/2018 at 2:58 PM, oboe said:

is there any program or something where i can put my savestates and it would bring stats to excel file.

You can open the saves as text in Excel and extract the stats directly in a separate sheet via lookups.

Link to comment
Share on other sites

19 hours ago, kingraph said:

You can open the saves as text in Excel and extract the stats directly in a separate sheet via lookups.

When i try to open the savestate it shows me some symbols and letters its a mess. Do i need to download some program or do i need coding skills?

Link to comment
Share on other sites

1 hour ago, oboe said:

When i try to open the savestate it shows me some symbols and letters its a mess. Do i need to download some program or do i need coding skills?

I think the idea is to use the info in this thread (data offsets) to read the data with excel. You'll need to make use of excel functions like MID and CODE to extract the data, then probably things like SUM, VLOOKUP, etcetc to turn the raw exracted data into something human-readable. @kingraph?

It'll be a good amount of work.

If you're playing SNES, someone made a neat extractor many years ago. It may be difficult to get to work, and the guy no longer posts, so you'll have to experiment with it: http://forum.nhl94.com/index.php?/topic/3875-nhl-94-record-keeper-30-snes-version/

 

Link to comment
Share on other sites

Ahh, sorry, it's been a while, I first open the savestate in a hex editor - I like HxD - and then export the hex values in text to open in Excel.

Sorry for the confusion!

I think I have a Google Doc that does the translation, I remember doing this for a league a long time ago....I'll find and share as well, will save you time!

Link to comment
Share on other sites

On 6/9/2018 at 2:58 PM, oboe said:

is there any program or something where i can put my savestates and it would bring stats to excel file.

If you are patient, I can probably whip something up in Python within a week. I can have it export the data into a CSV format, which would open in Excel.

Link to comment
Share on other sites

Thanks for your answers kingraph and swozoma. So i need to open my savestate in hxd then bring these hex values to excel and somehow translate them to text? :D and chaos that would be amazing it doesnt have to be excel but some text software so i can manually input the stats to me and my friends league.

Link to comment
Share on other sites

  • 3 weeks later...
6 hours ago, oboe said:

@chaos any update for extractor? :)

 

I apologize. I have a rough draft of what needs to be done but got carried away with another project (RetroArch). I will work on it this week (I already started some, just didn't finish it up).

What emulator are you using?

I plan on making it available to extract stats from RetroArch, ZSNES, Gens, but if there is a specific one you use I'll do the work for that one first, then add the rest later.

Link to comment
Share on other sites

  • 2 weeks later...
On 7/4/2018 at 4:38 PM, oboe said:

@chaos any update for extractor? :)

@oboe I'm working on this right now, should be done by tomorrow (for Gens saves). I'll add ZSNES and RetroArch at a later (maybe the weekend) time, but I'd like to make sure I can at least get it working first.

  • Like 1
Link to comment
Share on other sites

Quick update, 90% of the stuff is done, just need to set it up to export it to a CSV file. Prob an hour of work left, all the hard stuff is done. I'll have it up tomorrow

  • Like 1
Link to comment
Share on other sites

20 hours ago, chaos said:

Quick update, 90% of the stuff is done, just need to set it up to export it to a CSV file. Prob an hour of work left, all the hard stuff is done. I'll have it up tomorrow

So Excel thinks some of the data is in Date format. Gonna need another day, so close. I found another way to do it, instead of CSV file I will make an XLS file.

Link to comment
Share on other sites

  • 4 weeks later...

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...