EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Discuss all aspects of editing the data and databases in EHM here. Have a question about the EHM Editor, EHM Assistant, editing the .cfg files, hex editing the .dat or .db files? Want to tweak the EHM exe file to change league rules/structure, start date etc? This is the place!
Forum rules
This is the forum to discuss all aspects of editing the EHM data and tweaking the game.

Have a bug or feature request for the EHM Editor? Post them in the EHM Editor thread. Please start a new thread or post in another thread if you have a question about how to use the EHM Editor.

Given the large number of questions on similar topics, we ask that you start a new thread for a new question unless you can locate a similar question in an existing thread. This will hopefully ensure that similar questions do not get buried in large threads.

Useful links: EHM 1 Assistant (Download) | EHM 1 Editor (Download) | EHM 1 Editor Tutorials | Editing Rules & Structures Guide | Converting EHM 2004 / 2005 DBs to EHM 1 | Converting an EHM 2007 DB to EHM 1 | Extra_config.cfg | Import_config.cfg | Player Roles
Post Reply
Corwin86
Junior League
Posts: 18
Joined: Thu Apr 17, 2014 4:19 pm

Re: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by Corwin86 »

I made some test, but still I didn't managed to have an all saved game working...

I wonder if can be simplier to build a small application to work on the three-four hex files, because working directly with hex numbers is long and difficult :-)

Maybe I can start with something for me.

However, now it seems that the problem is always with the insert of the player in the SquadList, but I will try again.
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: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by archibalduk »

To insert the player, just find the next available SquadList entry. You'll be able to see the next available entry because it'll be FF FF FF FF.
Corwin86
Junior League
Posts: 18
Joined: Thu Apr 17, 2014 4:19 pm

Re: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by Corwin86 »

Thanks, I've found some SquadList entry, and inserted the player.

It's for this that I don't understand why the saved game remain corrupted...

I will try again this evening, I think :-)
Corwin86
Junior League
Posts: 18
Joined: Thu Apr 17, 2014 4:19 pm

Re: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by Corwin86 »

Ok, I made some test, and maybe I found the problem: I'm playing with a QMJHL team, so do I have also to change player rights?

I tried to made some changes at the player_rights_manager.dat, but I didn't find how to "connect" the rights data with staff.dat.

I see an "LONG StaffPlayerRightsIndex;" in the struct STAFF, but also the struct of the rights have a LONG as ID ("LONG PlayerRightsID;"), and I don't understand how connect the two field :(

There is maybe a sort of table with a connection StaffPlayerRightsIndex-->various PlayerRightsID?

Thanks very much!
Corwin86
Junior League
Posts: 18
Joined: Thu Apr 17, 2014 4:19 pm

Re: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by Corwin86 »

I tried again to add a player contract, but with no luck :(

It seems that I'm close, but something corrupt the file...

AND I FOUND IT :joy:

It's seems that you have also to change the contract data record count, then I found another error (player with no salary...), but it load the game and put the player in the correct team :)

I'm becoming fast to read the hex files, but I think I really need to use some sort of editor to change the data.
I will think about creating it (a simple php version maybe, to fast prototype) :)

It's a shame that the old saved game editor isn't supported anymore, because they correctly load all the data.
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: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by archibalduk »

Doh! Sorry, I overlooked the fact that you must update the contract record count. The updater updates the other internal indexes for you, but it doesn't do that one.

Sounds like you're well on your way. Let me know if you find out anything further about the data structure as it'd be great to add this to the Updater.
Corwin86
Junior League
Posts: 18
Joined: Thu Apr 17, 2014 4:19 pm

Re: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by Corwin86 »

Sorry for the delay in the answer, but I was "disconnected" for some days!

I tried again today to solve the problem about the fact that the game don't recognize the salary of the contract (only of the newly created contract).

About the structure, I would be a pleasure to help, but at the moment I just used the data already present in the forum, and put all together :-)

When I finally managed to insert a new contract, a will post a little "resume" of what to do and not to do.
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: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by archibalduk »

Thanks! Best of luck!
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: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by archibalduk »

I have released version 2.0.5 of the Updater. The download link can be found in the first post of this thread: http://www.ehmtheblueline.com/forums/vi ... 54#p157635

Here's the changelist:
  • Fixed an issue with Auto Names Correct where it would fail to match consecutive instances of a particular name.
  • Fixed an issue with the Database Optimisation function which corrupted clubs' disliked and favourite staff settings.
  • Added auto repair of invalid club disliked and favourite staff settings (auto repair is applied each time you load and save the DB in the Updater).
  • Added erase club disliked and favourite staff setting to the Erase Data drop-down menu.
  • Fixed a bug whereby the year of birth wasn't always updating players and non-players.
  • Fixed a bug with auto-correct names whereby _none was not being processed as a correction.
  • Fixed a bug with header column spanning which wasn’t always working correctly in csv files.
  • Significantly increased the number of teams and leagues corrected by the auto-correct function.
  • Added affiliation export.
  • Added arena export.
  • Added colour export (as both xml/csv and an html colour chart).
  • Added currency export.
  • Added injury export.
  • Added officials export.
  • Added currency mini-editor (but it seems editing the exchange rates has no effect in-game).
The most important change in this version is a bug fix with the DB Optimisation function. As mentioned previously, there was a bug with version 2.0.0 - 2.0.1 where teams' Favourite and Disliked Staff (which can be seen on the Clubs tab in the Pre-Game Editor) weren't updating when the various DB tables were being re-ordered. This resulted in teams' Favourite and Disliked Staff lists being jumbled/corrupted and, in some cases, resulted in the Pre-Game Editor displaying an error.

Unfortunately it isn't possible to restore the corrupt Favourite and Disliked Staff lists. However, there are two things that can be done to fix the problem (note to CJ and Manimal - I have already fixed the 1998 DB and the TBL v6.3 DB so there's no need for you to fix these DBs):

1. Load the DB in the Updater and save it. This will apply a fix which will prevent any related errors in the Pre-Game Editor.
2. From the Erase Data drop-down menu, select "Club Disliked and Favourite Staff". This will erase all of the teams' Favourite and Disliked Staff lists.

I plan on adding team updating to the Updater in the near future. Once team updating is added, it'll be possible to transfer the teams' Favourite and Disliked Staff lists from a backup copy to the fixed DB, thereby restoring the lists.

NOTE: This only affects the teams' Favourite and Disliked Staff lists - it does NOT affect the players'/non-players' Favourite and Disliked Staff lists.

A couple of other notes:

1. I've added a currency mini editor (this is accessible from the Edit menu - it only works for DBs and not saved games). Unfortunately it seems editing the currencies has no effect in game. I was hoping it would have a cosmetic effect, but changing the values does nothing. Nonetheless, the mini editor is there if anybody wants to try experimenting (let me know if you get any of it to work / appear in game).
2. The team/club data spreadsheet export is fairly interesting in that it shows a variety of data fields that aren't editable in the Pre-Game Editor (such as alt. team colours).
MKoivuFan
Checking Line
Posts: 526
Joined: Wed Mar 07, 2007 5:05 am
Custom Rank: MKoivuSports

Re: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by MKoivuFan »

anyone know if u can edit the cap with the editor ehm 2007 updater.. for example when i am at 2000-present in my game file from 1998 i want to be able to up the cap from what it was at the beginning of the roster file at 1998-1999
User avatar
Asbeen
Drafted
Posts: 161
Joined: Wed May 03, 2006 2:41 pm
Location: Gatineau
Contact:

Re: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by Asbeen »

I don't know if you can with the updater but you can with the old SGE.
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: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by archibalduk »

I'm afraid you can't with the Updater. Sounds like the SGE is the best way to go. :thup:
User avatar
Asbeen
Drafted
Posts: 161
Joined: Wed May 03, 2006 2:41 pm
Location: Gatineau
Contact:

Re: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by Asbeen »

When trying to download the latest version I get a message from google chrome that the file is malicious, anyone else got it?
Is it safe to download or there is a possibility that it has been hacked?
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: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by archibalduk »

Asbeen wrote:When trying to download the latest version I get a message from google chrome that the file is malicious, anyone else got it?
Is it safe to download or there is a possibility that it has been hacked?
I'm getting the same error.

I doubt it has been infected. I have an up to date virus scanner running the background at all times - and SkyDrive virus scans all files hosted. So I suspect it's a false-positive on Chrome's part (i.e. it thinks it is malicious but it's not). I searched the error on Google and it seems there are plenty of users encountering false positives.

I will in any event re-upload the file this weekend. :thup:
User avatar
Asbeen
Drafted
Posts: 161
Joined: Wed May 03, 2006 2:41 pm
Location: Gatineau
Contact:

Re: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by Asbeen »

archibalduk wrote:So I suspect it's a false-positive on Chrome's part (i.e. it thinks it is malicious but it's not). I searched the error on Google and it seems there are plenty of users encountering false positives.
That's what I think. Thanks. I will wait for the re-upload to make sure.
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: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by archibalduk »

Asbeen wrote:
archibalduk wrote:So I suspect it's a false-positive on Chrome's part (i.e. it thinks it is malicious but it's not). I searched the error on Google and it seems there are plenty of users encountering false positives.
That's what I think. Thanks. I will wait for the re-upload to make sure.
I've re-uploaded it here: http://1drv.ms/1k9wazR

I've virus-scanned the ZIP file and the extracted contents and they all come up clean. And the file size of the exe is virtually the same size as the previous version of the Updater (as would be expected). Despite that, it's still being flagged by Chrome as malicious. I guess it's as we said; it's a false positive.
MKoivuFan
Checking Line
Posts: 526
Joined: Wed Mar 07, 2007 5:05 am
Custom Rank: MKoivuSports

Re: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by MKoivuFan »

my question was:

If i have a save file and for example i want to start a game as a team but not have the expansion team until the spring is there a way i can make those players UFAs and assign the players to my team..

For example I know if i birng back Quebec Nordqiues i would have to put them into the game to start the file but i mean besides the save game editor or customer patch day I cant really start on like June just before the entry draft without siming the first season can i? The reason why im asking is because about the editor if i make quebec as a expansion team i would have to trade all of the players that the team auto signs to other teams to acquire my expansion team picks untill i just pick my expansion picks out of the unsigned FAs, and two as far as the date goes, normally expansion teams begin their expansion season in the spring preparing for UFAs and entry draft
User avatar
Manimal
TBL Admin Team
Posts: 6344
Joined: Thu Apr 24, 2008 4:01 am
Custom Rank: EHM Rosters Man
Favourite Team: Djurgårdens IF
Location: Karlstad, Sweden

Re: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by Manimal »

MKoivuFan wrote:my question was:

If i have a save file and for example i want to start a game as a team but not have the expansion team until the spring is there a way i can make those players UFAs and assign the players to my team..

For example I know if i birng back Quebec Nordqiues i would have to put them into the game to start the file but i mean besides the save game editor or customer patch day I cant really start on like June just before the entry draft without siming the first season can i? The reason why im asking is because about the editor if i make quebec as a expansion team i would have to trade all of the players that the team auto signs to other teams to acquire my expansion team picks untill i just pick my expansion picks out of the unsigned FAs, and two as far as the date goes, normally expansion teams begin their expansion season in the spring preparing for UFAs and entry draft
No, you can't change that
MKoivuFan
Checking Line
Posts: 526
Joined: Wed Mar 07, 2007 5:05 am
Custom Rank: MKoivuSports

Re: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by MKoivuFan »

can this updater program fix cfg files in a save file for example open the save file and fix the salary cap in CJ roster that i forgot to change before i started my file..
User avatar
nino33
Mr. Goalie
Posts: 6088
Joined: Sat Aug 07, 2010 3:37 am
Custom Rank: Retro Rosters Specialist
Favourite Team: 1970s hockey

Re: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by nino33 »

MKoivuFan wrote:can this updater program fix cfg files in a save file for example open the save file and fix the salary cap in CJ roster that i forgot to change before i started my file..
Yes the Updater allows for some saved-game-editing (the ReadMe file will tell you what can be edited)
No you can't edit the Salary Cap in a saved game using the Updater (as Archi already told you last week)
MKoivuFan
Checking Line
Posts: 526
Joined: Wed Mar 07, 2007 5:05 am
Custom Rank: MKoivuSports

Re: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by MKoivuFan »

Basically what i wanna do is take CJ 2006-2007 roster auto sim to March 18th 2007, scout for the upcoming WHL bantam draft... My question is when in EHM does the stats in the players profile move from the profile to the history part. The reason why is because I want to be able to edit the roster to move all of the players to the edmonton oil kings expansion team using the updater but i dont want the player profile or player history to show edmonton in their history... does it switch over at May 30th/June 1st or end of june..
User avatar
nino33
Mr. Goalie
Posts: 6088
Joined: Sat Aug 07, 2010 3:37 am
Custom Rank: Retro Rosters Specialist
Favourite Team: 1970s hockey

Re: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by nino33 »

MKoivuFan wrote:Basically what i wanna do is take CJ 2006-2007 roster auto sim to March 18th 2007, scout for the upcoming WHL bantam draft... My question is when in EHM does the stats in the players profile move from the profile to the history part. The reason why is because I want to be able to edit the roster to move all of the players to the edmonton oil kings expansion team using the updater but i dont want the player profile or player history to show edmonton in their history... does it switch over at May 30th/June 1st or end of june..
Hmmm...I'm not sure about when history "switches over" (July 1st maybe?)...and I'm not sure if you can delete player history from a saved game (if you're looking to delete the Oil Kings 2006-07 player history); there is no WHL expansion in EHM, so the Oil Kings will exist from start-up...editing a contract in a saved game seems to require some hex-editing as well as the Updater (see page 7, April 17th posts in this thread)
MKoivuFan
Checking Line
Posts: 526
Joined: Wed Mar 07, 2007 5:05 am
Custom Rank: MKoivuSports

Re: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by MKoivuFan »

nino33 wrote:
MKoivuFan wrote:Basically what i wanna do is take CJ 2006-2007 roster auto sim to March 18th 2007, scout for the upcoming WHL bantam draft... My question is when in EHM does the stats in the players profile move from the profile to the history part. The reason why is because I want to be able to edit the roster to move all of the players to the edmonton oil kings expansion team using the updater but i dont want the player profile or player history to show edmonton in their history... does it switch over at May 30th/June 1st or end of june..
Hmmm...I'm not sure about when history "switches over" (July 1st maybe?)...and I'm not sure if you can delete player history from a saved game (if you're looking to delete the Oil Kings 2006-07 player history); there is no WHL expansion in EHM, so the Oil Kings will exist from start-up...editing a contract in a saved game seems to require some hex-editing as well as the Updater (see page 7, April 17th posts in this thread)
my bad nino i should have explained more... no what i wanted to do was sign 20 rubbish players from junior A doesnt matter if it shows in their history playing for the edmonton franchise or not just the players that i want to add to the roster aka out of ehm expansion players that i wanted to add but since u answered my question that july 1st is usually when i am to switch the players over thanks..
MKoivuFan
Checking Line
Posts: 526
Joined: Wed Mar 07, 2007 5:05 am
Custom Rank: MKoivuSports

Re: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by MKoivuFan »

archibalduk wrote:
Corwin86 wrote:There is maybe a way to change a player contract directly editing the exported saved game?
For example, in the case of a free agent, maybe is possible to create a new contract for him? So isn't possible with the updater or with other tools?
I can't remember, but does the Saved Game Editor do this?

Otherwise, yes you could certainly do this using a hex editor. The easiest way would be to first extract the sub-files from the saved game using the Updater. Then once you've made the changes, re-pack the sub-files into the saved game using the Updater.

There are three things you'll need to do in order to move a player to another team:

1. Edit the appropriate record in staff.dat. The two fields you'll need to edit are StaffClubContracted and StaffClubPlaying (see the DB structure here).

2. Update the appropriate records in club.dat. Each team has a ClubSquadList array. This stores a list of the staffIDs of players on that team's roster. So you'll need to remove the ID from the former team and add it to the new team (again, see the DB structure above).

3. Update contract.dat. This stores the contract data for all existing contracts and future transactions (the dat file is split into two with the current contracts first followed by the future contracts). If the player is a free agent, you'll need to a record to the existing contracts. If he is already on a team's roster, you'll just need to edit the appropriate entry. We don't have the full structure, but you'll find some details here. Also, take a look at this which has some details of how many bytes per record.
1. I understand that in the club_staff.xml file you have to change the contract club & contract league and who they are playing for, when they joined the team and when the contract expires the part im confused is the iD numbers.

2. i tried to open the exported_clubs.xml and it just lists the different clubs unless all 3 steps above are in the exported_staff.xml file..

if someone just updates the contract club & league, playing for, date it joined and contract expired just fixed all of those it should work right..

for example

Player A contracted with Regina Pats / Western Hockey League
Playing For: Regina Pats
Date Joined 6/30/2006
contract expired: 6/30/2010

changed to

Player A contracted with Lethbridge Hurricanes / Western Hockey League
Playing For: Lethbridge Hurricanes
Date Joined 7/1/2007
contract expired: 6/30/2010

if i made those changes to the players they should work?
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: EHM 2007 Updater (A Pre-Game & Saved Game Editor)

Post by archibalduk »

Just to be 100% clear, the post I quoted is about editing the .DAT files using a hex editor and NOT the .XML files. The Updater cannot edit contracts in a saved game. The Updater only edits contracts in the database.

I'm really struggling to understand your questions, but I've tried to answer them:
MKoivuFan wrote: 1. I understand that in the club_staff.xml file you have to change the contract club & contract league and who they are playing for, when they joined the team and when the contract expires the part im confused is the iD numbers.
What is a club_staff.xml file?
MKoivuFan wrote:2. i tried to open the exported_clubs.xml and it just lists the different clubs unless all 3 steps above are in the exported_staff.xml file..
Exported_clubs.xml lists just the details of all of the clubs. What were you expecting? :-? If you tell me what you're expecting to find then I can tell you whether or not it is currently possible with the Updater.

Exported_staff.xml lists all of the staff (i.e. players and non-players).
MKoivuFan wrote:if someone just updates the contract club & league, playing for, date it joined and contract expired just fixed all of those it should work right..

for example

Player A contracted with Regina Pats / Western Hockey League
Playing For: Regina Pats
Date Joined 6/30/2006
contract expired: 6/30/2010

changed to

Player A contracted with Lethbridge Hurricanes / Western Hockey League
Playing For: Lethbridge Hurricanes
Date Joined 7/1/2007
contract expired: 6/30/2010

if i made those changes to the players they should work?
Yes, if you make those changes using a contract_update.xml file then it'll work. But, as I mentioned above, you can only do this with a database and not a saved game.
Post Reply