Brutus

Downloadable Offline League/Stat Extractor

Recommended Posts

Hello everyone. I'm new around here, and I've spent a lot of my free time curiously catching up on your last 6 years or so of your forums. Half the time it's because I was looking for the answer to a question, and had to sort through a 5 page topic thread to see if the question is ever answered. I think the site has several topics pinned to the top, so it's easy enough to get the basic grasp of things, but the true guts is not laid out in a friendly, non-nerd way, like the initial page of "getting started" is.

If someone is looking to expand through the base use of this game aside from joining a league or playing exihibition games, you'd need to be pretty proficient in computers to do it. Most of my "computer" code type talk is so far behind me I don't remember any of it, as I never use it, so I can "read" along, but I can't actually figure out how you would do some of the real cool things. I once learned how to read binary, how to program C++, etc, but after not using it for 15 plus years, it's but a fuzzy haze to me!

Anyhow, I am but one guy, and have invited 3 friends to the site within 3 weeks of finding it. None have opted to play online through the site, as they seemed overwhelmed by it, yet all downloaded the programs I told them to, and play me/each other on occasions either direct or via Hamachi. Being able to upgrade the casual experience would only bring more and more people back to the NHL94 game, and in turn, bring more and more competition, members to this site. Inevitibly, old blood leaves, and new blood is needed to fill in to keep leagues going, so even without being a contributor to code, helping those have access to things has a long term benefit to everyone who plays here.

For example,

#1 How I would say set up my own offline draft that would look cool like in the GDL, especially sorting through weight, speed, etc as you can in the drafted section. You'd need some file downloaded I'd assume to do this, doesn't have to be the GDL file, as those guys might not want to "share", but if the site had a base one, it'd be a bonus. Right now, we'd be doing an email draft at my house, and logging onto GDL's site to sort through guys!

#2 I've read how to save the stats, and I have created the savestat.file, and IF I were able to join one of your leagues that have already started, I could easily upload the game onto that league's site. However, if I wanted to keep some stats from exhibition between myself and any friends, well I wouldn't know what to do with the savestat.file. I can use an excel spread sheet, and have imported data before, but this one is amiss to me, even after reading 2 hours of various threads. So a downloadable stat extractor would help guys run offline leagues. I never did Madden Online, but I've heard from non-programming type video gamers how much fun they used to have setting up online leagues. In the case of NHL94, most guys loved tournaments 20 yrs ago, so having the ability to see up things offsite to keep records during tournaments, etc would really get the old NHL94 mojo meter running.

#3 Classic, Weight bug, classic draft, survivor draft, etc. for leauges, and how "often" are games played. By this I mean, how long does a season take, and what is the average wait time to get into that league. The reason I post about this is I feel the mass confusion deters others away, and when you log in, league play is at the bottom. I still haven't put myself on a waiting list because I would hate to join a "dead" league, and can't figure out which ones have ended, started, etc, other than GDL seems to have just ran it's draft.

For the record, I'm not complaining. I don't expect anyone to "give" me anything like I'm owed. I'm not a paying member. And in addition, several people are helpful in making sure files are downloadable and with good directions. But, if you take a step back, log into the forum as if you had fresh eyes, you might see the chaos I'm describing.

Either way, I look forward to playing some more NHL94, and joining a league soon.

Share this post


Link to post
Share on other sites

Sorry, that came out a bit longer than it looked when I typed it!

The main message if you take anything out might be to re-organize what is downloadable, delete or achive the old, unnessary threads from before Baby Einstein-smoz came into being, and make it more accessable without having to navigate through posts from 2006 only to find out they are obsolete on page 6 of the same thread because Super Smoz made an even greater program.

That dude is amazing. Reading back through those "discovery" forums and his ability to lay out the ideas plus code the solutions really made me glad to log in AFTER he's fixed 90% of things!

Share this post


Link to post
Share on other sites

What's up brother? I am new too, just stumbled on the site randomly, downloaded some of the software, and am plinking my way through to competency. Great post BTW. This is why I prefer the console experience (because everything is just right there), however, as we all know, there is something about the NHL94-97 years that was just unique and as of yet unmatched in hockey games. For other games (like FPS), sure, I would take MW3 over Rambo any day, but yea the NHL thing is an enigma. and thus, here we are.

Share this post


Link to post
Share on other sites

An offline draft could be easily created and shared in a google spreadsheet, sortable and you could mark which players have been drafted etc..

As far as stats, I'm not sure if there is an easy way to do this without getting help from some of the website programmers.

Good luck guys, and welcome.

Share this post


Link to post
Share on other sites

Brutus, you make very valid points. One of my personal "to do's" is some forum housekeeping to make it less intimidating for new users. Something like a table of contents, with links to the appropriate materials. As with most things, it comes down to time. However, I am really going to try to do this soon. As for your questions:

1. Agree with jer_33 that using Google Docs Spreadsheet is a great option! You can share the document so that when a person chooses a player, they can highlight that player as taken, or something similar. As far as the basic player stats sheet, you can use this tool (roster extractor) to get the '94 rosters and attributes.

Here's a link: https://dl.dropbox.com/u/10816388/94%20players.xls

(and yes, this should be part of the TOC I mentioned above!)

2. The basics of stat extraction is this:

a. Download a Hex Editor (HxD is free and works great...google it)

b. Open up your savestate in the hex editor

c. This will be a large file with a bunch of information, sorted by "offsets". Think of an offset as simply a location reference. The location of each statistic is referenced here: http://forum.nhl94.com/index.php?/topic/14469-reference-gens-stat-extract-offsets/

So from there you know that each reference will be a statistic, in hexadecimal format that you have to translate into numbers.

So now you have a text file that you can extract into Excel and lookup the appropriate values yourself. The folks here who have programming skills have been able to create extract tools, but that's beyond my capabilities. I hope the basics above make sense...that doesn't change.

3. Classic is normally done twice a year, fall and spring. March and September is when it starts and the season is 40 games, 6 games a week. So the season should last 7-8 weeks or so. Then playoffs should be another 4 weeks, so in total about 3 months. Other leagues (GDL/Blitz/Dynasty/Survivor, etc) aren't as consistent and basically occur when the commissioner of that league has time to run it! Just have to keep your eyes peeled.

Share this post


Link to post
Share on other sites

#2--

I set up http://sea-hag.net specifically for recording stats from exhibition games. There's no obligation to play anyone other than your friends, and so far it's worked out fine. It supports ZSnes and Gens save states.

I believe there are standalone .exe stat extractors floating around somewhere, although I haven't personally used them. If there is some real interest in this, it's something I could look into. What features are you looking for in this? Do you want a local db to save the results with some sort of view? Or do you just want it to export CSV/xml/json? Both?

Share this post


Link to post
Share on other sites

I appreciate all of the feedback. I've been swamped with work, and haven't had time to check over using google docs.

I ended up doing a small draft using the GDL site as a guide for shits & grins w/ my friend breaking up 3 teams each, just to have some variance when we go head to head, and to give us more stacked teams when we play without it just being 2 Allstar teams. We've played about 40 games with these teams, and it's been a blast and solid break from the tourneys we were running against each other. Haven't done one tourney since our side draft.

As for the stats, I was looking to say run a season offline and have those stats not have to be kept manually. I will look through the suggestions you guys have when I have more time. I'm not familiar with google docs at all, but I'm a quick learner and I doubt it's that complicated.

Primarily, I was hoping there was something as quick to download and use as the emulator & hamachi/DS3 tool for my joypad was!!

Share this post


Link to post
Share on other sites

http://forum.nhl94.com/index.php?/topic/3827-nhl-94-record-keeper-30-genesis-version/

DaDonch made a program to run offline leagues with stat extracts, etc. See the link above. It only works with the original '94 ROM though. Anyway, that's the only extraction tool that I know of.

Share this post


Link to post
Share on other sites

i'd really like to see a universal stat extractor so i started working on one. getting the stats in a more modern language like c# is a first step and here is how to do that:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace StatExtractor
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
//Find the byte
BinaryReader br = new BinaryReader(File.OpenRead("c:\\nhl94.gs0"));
br.BaseStream.Position = 0;
br.BaseStream.Position = 60602;
byte[] bData = br.ReadBytes(0x2);
string strContent="";
for (int i = 0; i < bData.Length; i++)
{
strContent = strContent + bData.ToString(); // not 100% right but just want to show right data
}
MessageBox.Show("byte found was " + strContent);
br.Close();
}
}
}
To do this there will need to be an init step where you point to the rom and it builds the db of teams and players. Anyone know of the addresses for that in the 30 team roms? Once this is complete I can create a basic app and work towards what DaDonch had but will be usable on win7 and with custom roms.

Share this post


Link to post
Share on other sites

You might find my savestate stat extractor useful. It's a Python 3.4.0 script but it probably works in newer versions of Python. I wrote it several months ago so I don't remember every single little detail about it but I'm pretty sure it does the job nicely. I didn't write a GUI for it, so you'd have to modify a few strings that specify where the inputs are.

The inputs are the ROM, the savestate (generated during while the "three stars" window is up at the end of the game), and the location of the desired output CSV file with the statistics.

To find the strings that need to be changed, do a search (CTRL-F) for the following text:

saveStateFile - This will take you to the line with the path to the input savestate file.

ROMFile - This will take you to the line with the path to the input ROM file.

csvWriter - This will take you to the line with the path to the output CSV file.

I've attached the script along with some sample output (I think I used an AHL 2005 ROM, hence the non-NHL teams). Let me know if you have questions.

NHL94_Stat_Extractor.rar

Share this post


Link to post
Share on other sites

If anyone has interest in this offline item still you can follow the progress here:
https://github.com/wallywojo/Extractor

I put it in public source control since I feel the community really owns this content. This builds off Tickenest's python code. I am working on having this as a 28/30 team version. If you have any interest in contributing let me know and I can add you to the project.

Share this post


Link to post
Share on other sites

Does anyone have the work that dan_Iizhot did from this post?

Also, what program is currently used to extract the SNES stats from the save state on this website?

I thought I read that it was done in c# in one of the older posts?

NOTE:

I realize this is for GENS, just wondering if there is anything out there for SNES.

Edited by McMarkis

Share this post


Link to post
Share on other sites

Does anyone have the work that dan_Iizhot did from this post?

Also, what program is currently used to extract the SNES stats from the save state on this website?

I thought I read that it was done in c# in one of the older posts?

NOTE:

I realize this is for GENS, just wondering if there is anything out there for SNES.

The website is programmed in PHP.

Share this post


Link to post
Share on other sites

You might find my savestate stat extractor useful. It's a Python 3.4.0 script but it probably works in newer versions of Python. I wrote it several months ago so I don't remember every single little detail about it but I'm pretty sure it does the job nicely. I didn't write a GUI for it, so you'd have to modify a few strings that specify where the inputs are.

The inputs are the ROM, the savestate (generated during while the "three stars" window is up at the end of the game), and the location of the desired output CSV file with the statistics.

To find the strings that need to be changed, do a search (CTRL-F) for the following text:

saveStateFile - This will take you to the line with the path to the input savestate file.

ROMFile - This will take you to the line with the path to the input ROM file.

csvWriter - This will take you to the line with the path to the output CSV file.

I've attached the script along with some sample output (I think I used an AHL 2005 ROM, hence the non-NHL teams). Let me know if you have questions.

Made required changes.......excel file is created...but it contains your AHL stats???

Am I missing something??

Changed rom file location......change save state file location (which is nhl94.gs1) and the excel file created is the name I indicated in the script....

Help would be appreciated.

Thanks

Rick

Share this post


Link to post
Share on other sites
On 3/5/2013 at 11:56 AM, halfMANhalfDONUT said:

#2--

I set up http://sea-hag.net specifically for recording stats from exhibition games. There's no obligation to play anyone other than your friends, and so far it's worked out fine. It supports ZSnes and Gens save states.

Hi there, Is this option still available? Site seems operational but no indication of any NHL 94 stat saving. Looking for an option for our offline league. Thanks! 

Share this post


Link to post
Share on other sites
10 hours ago, probure98 said:

Hi there, Is this option still available? Site seems operational but no indication of any NHL 94 stat saving. Looking for an option for our offline league. Thanks! 

I don't know about sea-hag.net, but there is a GENs-only site for uploading series, that extracts the stats for each game and the series as a whole?  AtomicRaven and I use it to keep track of our own games (we mostly play each other).

Anyone can join and use it, though it doesn't support custom ROMs.

Here is an example of a series: http://nhl94rocks.com/resultsSeries.php?seriesId=609
 

Share this post


Link to post
Share on other sites
4 hours ago, aqualizard said:

I don't know about sea-hag.net, but there is a GENs-only site for uploading series, that extracts the stats for each game and the series as a whole?  AtomicRaven and I use it to keep track of our own games (we mostly play each other).

Anyone can join and use it, though it doesn't support custom ROMs.

Here is an example of a series: http://nhl94rocks.com/resultsSeries.php?seriesId=609
 

Very cool! Looks great, but sadly we are using a custom ROM. Thanks anyways aqualizard!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Who's Online   0 Members, 0 Anonymous, 6 Guests (See full list)

    There are no registered users currently online