A Call for Help (Freeware)

Prior to the development of Eastside Hockey Manager by SI Games, the game was a one-man freeware project by Risto Remes. This forum is the place to discuss any aspects relating to the freeware edition.

Moderator: Freeware Moderators

Forum rules
Visit our Downloads Section to download the full game as well as various editors and data updates (including roster updates).

All advertisements for online leagues must be posted in our Online Leagues Thread.
Post Reply
User avatar
Primis
Freeware Moderator
Posts: 1698
Joined: Tue Aug 03, 2010 7:46 pm
Location: Michigan, USA

A Call for Help (Freeware)

Post by Primis »

So. Here's the thing.

I don't want the freeware EHM to completely die. I really, really love freeware EHM and play it a lot. I know some others do too. So please read my long plea, I'll go ahead and ask the question some others I know want to but don't want to be ridiculed over.

FHockey.com is mostly dead anymore, but I know the freeware EHM still has a much-larger active userbase than it indicates. There are actually still some freeware EHM online leagues out there even. And I know others who would pick it back up if a couple glaring things could be fixed in the .EXE. The freeware is a pretty awesome game, in that if you don't coach in-game you can make serious progress with your seasons, and it runs really nicely on modern machines. Going in and editing the raw .EHM files is actually quite simple to do as well.

The freeware's been kicking around since 2001-02 IIRC and weathered some radical changes in the way the NHL does things since. The NHL instituted a salary cap, for example. They eliminated the waiverdraft, and changed some other roster rules. However none of those changes honestly are going to compare to the blow that the upcoming realignment is. It honestly might be a death blow to it, as keeping things current isn't really going to be possible or matter with the realignment.

The freeware league alignment (and naming) is hard-coded in the .EXE, much like 2005 and 2007 are. The freeware was coded in VB and then compiled to .EXE.

Some years ago someone came along and played around in the hex editor and figured out a way to remove the preseason waiverdraft from the various .EXE files after the previous lockout ended it. It's the only instance i'm aware of for someone directly hex-editing the .EXE to fix something. Others have come up with ingenious tools/utilities like PlayerScout, Ceiling Fixer, and EHM Tool (a suite of EHM tools) coded externally, but nobody else has ever tackled the .EXE directly.

Now, I've tackled the .EXE and managed to edit the plain-text contained therein. I changed the British league to the then-IHL, and also renamed the Russian league the KHL in both 1.15b and 1.16. I know how to get in and change plaintext, but that's about it because I'm not and have never been a programmer, and changing plain-text isn't exactly a big achievement. And I know you can decompile the .EXE into, I believe, Assembly, but have no idea if there's much of anyone who could edit in Assembly given what it is. That leaves hex-editing the .EXE as the only option I'm aware of.


So I come to this: is there anyone with hex-editing experience who would be willing to tackle the freeware's NHL alignment?. The 4 new divisions, the 16-14 teams split, and getting WIN in the West and CBS & DET East? It's one thing, one small thing, but it would be a start. Unlike the commercial products, I don't think Riz really minds people hacking at the freeware .EXE at this point. I know some of you on here muck about in hex editors and have the ability. It may seem stupid to want to fix it if you never played the freeware version, and that's fine. I realize not everyone would want or care to bring the freeware up to snuff.

However, it doesn't hurt to ask, so I'm asking in pretty much the only place I figure there might actually be a shot.

Is anyone up for this and giving the old girl new life?
User avatar
archibalduk
TBL Admin Team
Posts: 20372
Joined: Tue Jul 06, 2004 8:44 pm
Custom Rank: Seaside + Fruit Juice Mode
Favourite Team: Guildford (EPL) / Invicta (NIHL)
Location: United Kingdom
Contact:

Re: A Call for Help (Freeware)

Post by archibalduk »

Hobbit13 is the person who knows what he's doing when it comes to these sorts of things. Unfortunately he only comes around briefly once in a while...

I have v1.18 installed on my laptop but I really can't promise that I'll have a chance to look at anything. I have already overloaded myself on what little free time I have right now. However if I do find some spare time, I will take a look. Trying to find the division data is going to be a needle in a haystack sort of thing. In fact it might be a lot easy to try running it through OllyDbg to access the assembly code - this might give pointers on where to look.

Did Riz ever consider releasing the source code of the game? If we had the source code, it'd be so much easier to change (but not necessarily straightforward).
User avatar
Primis
Freeware Moderator
Posts: 1698
Joined: Tue Aug 03, 2010 7:46 pm
Location: Michigan, USA

Re: A Call for Help (Freeware)

Post by Primis »

archibalduk wrote:I have v1.18 installed on my laptop but I really can't promise that I'll have a chance to look at anything. I have already overloaded myself on what little free time I have right now. However if I do find some spare time, I will take a look. Trying to find the division data is going to be a needle in a haystack sort of thing. In fact it might be a lot easy to try running it through OllyDbg to access the assembly code - this might give pointers on where to look.
I've decompiled the .EXE with VB Decompiler. My understanding is that puts the objects into Assembly. I have *no* idea what to look for with that though, because while the object tree names and structure then are revealed... the code itself is absolutely nonsense to me with no plaintext or comments anywhere and the same things repeated over and over again, I can't get any kind of feel for it. I originally had hoped decompiling it, even to Assembly, would give me some clues. But I just don't have the skills. I have 0 programming ability or experience (OK, so maybe some QBASIC back about 20 years ago, but...)

Part of posting this here was that maybe Hobbit would happen by and see it, he was the first name that popped into my mind, and this forum seems to get the most cross-traffic out of TBL, TBN, and Fhockey.
archibalduk wrote:Did Riz ever consider releasing the source code of the game? If we had the source code, it'd be so much easier to change (but not necessarily straightforward).
I only know of one person who's seen the source, Tie at Fhockey, years ago. He said that it was baffling and that what comments were there were often in Finnish (naturally) which was no help at all.

I don't think Riz has any intention of releasing the source ever. And I know people've been asking about it for years and years. Source code getting released would be amazing an much easier, but I've figured by now it's not an option and don't want to continue pestering Riz about it, especially since he's state din the past that he hadn't ruled out making a hockey sim himself again later down the road.
User avatar
archibalduk
TBL Admin Team
Posts: 20372
Joined: Tue Jul 06, 2004 8:44 pm
Custom Rank: Seaside + Fruit Juice Mode
Favourite Team: Guildford (EPL) / Invicta (NIHL)
Location: United Kingdom
Contact:

Re: A Call for Help (Freeware)

Post by archibalduk »

I just took a look at VB Decompiler. It provides a lot of information, but alas I can't read assembly (IIRC you need to study a degree on the subject before you can really understand what's going on). Running it through Olly DBG 1.10 provides a lot of ASCII but I couldn't see all that much promising in there (but I bet somebody like Hobbit13 might). I'll take a look with ArtMoney later on.

How much is known about the structure of the saved game files and the DB files? There are lots of numbers in there - any idea what they mean?
User avatar
Primis
Freeware Moderator
Posts: 1698
Joined: Tue Aug 03, 2010 7:46 pm
Location: Michigan, USA

Re: A Call for Help (Freeware)

Post by Primis »

archibalduk wrote:I just took a look at VB Decompiler. It provides a lot of information, but alas I can't read assembly (IIRC you need to study a degree on the subject before you can really understand what's going on). Running it through Olly DBG 1.10 provides a lot of ASCII but I couldn't see all that much promising in there (but I bet somebody like Hobbit13 might). I'll take a look with ArtMoney later on.

How much is known about the structure of the saved game files and the DB files? There are lots of numbers in there - any idea what they mean?
I totally never thought of ArtMoney for the freeware, I forget that it can apply elsewhere. I should try that maybe as well, that might be a better way of tracking down what's needed initially.

The .EHM files and their cousins (.RST, .CAR, etc) are pretty much well-known at this point, we know that some of the stuff isn't anywhere in the savefiles and that leaves the .EXE. Some like the schedule file, players file, etc, are edited raw on a regular basis by a whole lot of people (I still mess around in the players file anymore without references or thinking about it). You can go to Fhockey.com to the EHM 101 sections though and get pretty detailed breakdowns of most of the important files, so they're fairly well-known. There are rumors of some hidden flags still buried in the PLAYERS.EHM or Career files and I myself have tried to track them down, but I've never found any such thing and after all my experience with EHM I now sincerely doubt they exist. A lot of the files are pretty straight-forward to read and edit. The gamefiles outside of the .EXE though have all been picked at pretty thoroughly in the past.

I was unfamiliar with OllyDBG but I just tried it on the 1.15 .exe and wow, this is something entirely different still. I'm guessing this is a debugger type of tool? Some neat things. For instance, this is the first thing I've seen that will plainly list the non-playable teams hardcoded in the game (at the bottom of the main window): UNICODE "London Knights", etc. That may sound dumb, but I know in hex editors you can search for plaintext but it won't find it unless you have the right setting because in hex it comes out as "L_O_N_D_O_N___K_N_I_G_H_T_S" with all those extra spaces and some hex editors won't even find them.
User avatar
archibalduk
TBL Admin Team
Posts: 20372
Joined: Tue Jul 06, 2004 8:44 pm
Custom Rank: Seaside + Fruit Juice Mode
Favourite Team: Guildford (EPL) / Invicta (NIHL)
Location: United Kingdom
Contact:

Re: A Call for Help (Freeware)

Post by archibalduk »

I don't have Olly open, but if you right click in the top left section of the window, there should be a sub-menu entitled something like "search for" and there's an option under there entitled something like "all referenced text strings". This lists every ASCII/UNICODE entry in the file. You can the right-click on any of those entries to take you to the relevant part of the file. I'll post some screenshots with better instructions when I next boot up my laptop.
User avatar
Primis
Freeware Moderator
Posts: 1698
Joined: Tue Aug 03, 2010 7:46 pm
Location: Michigan, USA

Re: A Call for Help (Freeware)

Post by Primis »

archibalduk wrote:I don't have Olly open, but if you right click in the top left section of the window, there should be a sub-menu entitled something like "search for" and there's an option under there entitled something like "all referenced text strings". This lists every ASCII/UNICODE entry in the file. You can the right-click on any of those entries to take you to the relevant part of the file. I'll post some screenshots with better instructions when I next boot up my laptop.
That All Text search is amazing, way better than any hex editor searches I've ever run.

For instance, I'm really unclear as to why there's a plaintext list of goalie names hardcoded into the .EXE. It's not an all-time list, and guys like Jamie Storr, Jani Hurme, Kevin Weekes, Trevor Kidd, and Damian freaking Rhodes show up, alongside Hasek, Richter, Roy, etc. I have no... idea... why those names would be hardcoded in to the .EXE. I am aware that a few of the core other gamefiles are duplicated in the .EXE for some reason but... I can't fathom a core gamefile including Damian Rhodes for any conceivable reason.

However... I also discovered that divisional names are not even in the game (which I had not previously realized I guess). This is probably going to complicate tracking down how to fix any alignments. It looks like they may be referred to simply as "divisiona" in the code, since they are unlabelled.

The one other highly-requested "fix" has also been to change the embedded countries (because it aggravates people that countries like Japan and Poland are in, while some others aren't). While changing country NAMES isn't difficult (again, plaintext, easy enough to find in a editor or debugger) unfortunately the little country flags are also embedded and I don't know that there's a way to fix or reverse those. Another fun tibdit I discovered: Amongst the three-letter country initials in the file is a "QUE", presumably as a potential flag for Quebec nationality/naming.

Maybe someone with more knowledge than me can also answer this nagging question I've literally had for years but that comes up now again after looking at this: I know in hex-editing, if a plain-text object is say 12 characters in length, your replacement edit can only be a max of 12 characters as well (it can be shorter if you Space out the remaining characters of course). Is there any other way around that?
User avatar
archibalduk
TBL Admin Team
Posts: 20372
Joined: Tue Jul 06, 2004 8:44 pm
Custom Rank: Seaside + Fruit Juice Mode
Favourite Team: Guildford (EPL) / Invicta (NIHL)
Location: United Kingdom
Contact:

Re: A Call for Help (Freeware)

Post by archibalduk »

Olly is a very useful tool indeed. In fact, it can help find where things are located in the exe (which is useful for using a normal hex editor) and/or the RAM (which is useful for ArtMoney). Hobbit13 uses Olly to pinpoint useful offsets (exe/memory addresses) which contain settings - you then change these settings directly in the exe using a hex editor.

Yeah there's a lot of weirdness in the game data, that's for sure. I've come to the same conclusion about the divisions; it must be the "divisioona" parts. Looking at the divisional standings screen in game, it's really just a simple grid. In fact, there seems to be a blank row for each of the divisions, suggesting as though it might be possible/easy to add/remove teams to/from each set of grids. As I understand it (and from looking through the ASCII in Olly), this kind of grid is called an MS Flex Grid.

If you open Olly and view the Referenced Text Strings window, do a search for "divisioona". You should find the first result at 0045 0C1E. If you look at the lines directly below this there are mentions of MSFlexGridLib.MS, FlexGrid and MS Sans Serif. I'm almost certain that this will be the layout/settings for the divisional standings. If you look at the lines directly following those, you'll see that they repeat - i.e. there are seven consecutive divisioona Flex Grids listed. I would have expected only six of these (seeing as there are only six NHL divisions), but I'm still of the mind that this is where the divisional standings are located.

I guess this doesn't in itself really help, but perhaps it's something worth looking at. What I'd really like to find is more information relating to each of the NHL teams. I'm wondering if there is something like a Division ID number assigned to each team which determines to which division they belong. I've tried looking at some team things in Olly, but I can't see any sort of identifier. The way to do it is probably to compare data relating to say the Rangers, Islanders and Predators. In theory, the Rangers and Islanders would share division IDs whereas the Preds would have a different ID. So if you could find some data/numbers that the Islanders and Rangers shared but are different to the Preds then that might be the answer. It's a needle in a haystack, though...

I'm taking a look through ArtMoney at the moment to see if there's anything interesting there.
Primis wrote:Maybe someone with more knowledge than me can also answer this nagging question I've literally had for years but that comes up now again after looking at this: I know in hex-editing, if a plain-text object is say 12 characters in length, your replacement edit can only be a max of 12 characters as well (it can be shorter if you Space out the remaining characters of course). Is there any other way around that?
When you compile an exe from programming code (VB, C++, etc) the compiler converts it into machine code and compresses it (so the exe takes up less space). Presumably within the exe there are links between different parts so that the exe can call the different functions as and when it needs them. So I guess by inserting an extra byte/character within the exe, all of the references are wrong (e.g. if the exe expects a simulation function to begin at the 1000th byte and you've inserted an additional byte at the 900th byte, it's no longer able to find the function at the 1000th byte as everything has shifted by one). The exe isn't read by the computer like we read text; instead it expects certain things to be located at precise locations within the file.
User avatar
Primis
Freeware Moderator
Posts: 1698
Joined: Tue Aug 03, 2010 7:46 pm
Location: Michigan, USA

Re: A Call for Help (Freeware)

Post by Primis »

archibalduk wrote:Yeah there's a lot of weirdness in the game data, that's for sure. I've come to the same conclusion about the divisions; it must be the "divisioona" parts. Looking at the divisional standings screen in game, it's really just a simple grid. In fact, there seems to be a blank row for each of the divisions, suggesting as though it might be possible/easy to add/remove teams to/from each set of grids. As I understand it (and from looking through the ASCII in Olly), this kind of grid is called an MS Flex Grid.

If you open Olly and view the Referenced Text Strings window, do a search for "divisioona". You should find the first result at 0045 0C1E. If you look at the lines directly below this there are mentions of MSFlexGridLib.MS, FlexGrid and MS Sans Serif. I'm almost certain that this will be the layout/settings for the divisional standings. If you look at the lines directly following those, you'll see that they repeat - i.e. there are seven consecutive divisioona Flex Grids listed. I would have expected only six of these (seeing as there are only six NHL divisions), but I'm still of the mind that this is where the divisional standings are located.
I wonder if the 7th one could refer to the in-game AHL standings (no alignment there, only just all 30 teams listed in standings)? There's a "View All Farm Teams" button under the Standings...All Teams... section. *shrug*, I dunno'.

I've actually seen that I think but am unsure, because EHM is also designed to output/export HTML and text files of stats and standings, so I don't know if those sections represent the actual structure, or if they're what tells the game how to exports stats and standings to file. When I poked at them, I thought maybe they were tables for data exporting ... *shrug*... again though I don't know enough to say one way or another.
archibalduk wrote:I guess this doesn't in itself really help, but perhaps it's something worth looking at. What I'd really like to find is more information relating to each of the NHL teams. I'm wondering if there is something like a Division ID number assigned to each team which determines to which division they belong. I've tried looking at some team things in Olly, but I can't see any sort of identifier. The way to do it is probably to compare data relating to say the Rangers, Islanders and Predators. In theory, the Rangers and Islanders would share division IDs whereas the Preds would have a different ID. So if you could find some data/numbers that the Islanders and Rangers shared but are different to the Preds then that might be the answer. It's a needle in a haystack, though...
Well I know you can move teams around in the CONFIG_TEAMS.EHM file by say, swapping Detroit and Winnipeg's spots in the list (and then their respective farm teams below as well). However, then you end up with all of DET's players on WIN because WIN now has DET's team ID that is used in the PLAYERS.EHM file (and possibly the career file as well). I also used to have list somewhere of every team ID # in the game, but can't find it right now, each team NHL on down is assigned an ID number (IIRC NHL is 1-30, AHL is 31-60, etc). There has to be somewhere in the .EXE, I've figured, that those teams are listed and assigned their ID's, and then those ID's are assigned to the divisions. The AHL and other non-playable leagues have no alignment, so only the NHL would be a concern. I figure those ID's have to be aligned *somewhere*, right?

Also, team #'s are used in the schedule IIRC, so in the above example DET would then get WIN's schedule, and WIN get DET's.

People have kinda' gotten around the 30-team hardcoding in the past by editing the schedule file and excluding a certain amount of teams from playing games, but the schedule file is an unholy bear to edit, it needs fixed every simmed season, and it still does not stop there from being 30 teams trying to do things even if they aren't all playing games.

One other note: Back when Chip (watchemeunravel) made his 1980's mod for the freeware, he discovered that for some reason EHM won't generate schedules for any seasons prior to gamedate 2000. The game doesn't appear to know what to do with dates prior to 2000, which we found odd. I only mention this because it's an example of some of the hardcoded weirdness we've run across in the .EXE before.
ryan callahan
Learning to skate
Posts: 4
Joined: Tue Aug 09, 2016 9:35 pm
Favourite Team: Canadiens de Montréal

Re: A Call for Help (Freeware)

Post by ryan callahan »

I know this is an old post but it will be hard for the freeware to recover with Las Vegas coming in. Anyone made improvements or it's completely dead?
temkaUU
Junior League
Posts: 23
Joined: Sat Aug 13, 2016 8:49 am
Favourite Team: New Jersey Devils

Re: A Call for Help (Freeware)

Post by temkaUU »

I guess adding a 31st team is a real problem and we'll not see that coming
and if rosters are made they will be made for 30 teams with Vegas players on the UFA market
Post Reply