EHM 1 Database & Saved Game Editor v1: BUG REPORTS & FEATURE REQUESTS

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
User avatar
xECK29x
TBL Rosters Researcher
Posts: 1010
Joined: Sun May 03, 2015 2:52 pm
Custom Rank: Premier Pivot Rosters Man
Favourite Team: New York Islanders

EHM 1 Database & Saved Game Editor

Post by xECK29x »

archibalduk wrote: Sat Jul 18, 2020 10:40 pm It's exactly as you say - historical records won't appear in game unless the player exists in the database. This reminds me that I need to check the v1.5 patch changelist to see if this is something that has been fixed. If it hasn't, I'll mention it to Riz as I can't remember whether or not I reported this.
This has been fixed in 1.5
User avatar
xECK29x
TBL Rosters Researcher
Posts: 1010
Joined: Sun May 03, 2015 2:52 pm
Custom Rank: Premier Pivot Rosters Man
Favourite Team: New York Islanders

EHM 1 Database & Saved Game Editor

Post by xECK29x »

archibalduk wrote: Sat Jul 18, 2020 10:46 pm Yes just set the Club and Comp to "_none" and the GP to zero. The Editor will then delete the entry when you next save/refresh. This can be done either via the Editor or the importer spreadsheet (you'll need to enter the current Club, Comp, Season and Playoffs in the spreadsheet and then set the Edit Club and Edit Comp to "_none" and GP to zero).
Awesome, thanks I knew there was a workaround I had used before!
User avatar
xECK29x
TBL Rosters Researcher
Posts: 1010
Joined: Sun May 03, 2015 2:52 pm
Custom Rank: Premier Pivot Rosters Man
Favourite Team: New York Islanders

EHM 1 Database & Saved Game Editor

Post by xECK29x »

Archi,

Can we add a check or mass-update in the new editor to include teams with no detailed division set and have a mess edit option to quickly fix those by copying League to Detailed Division? We know we ran into errors related to teams not having a detailed division set in the past, would be good to enforce 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:

EHM 1 Database & Saved Game Editor

Post by archibalduk »

xECK29x wrote: Tue Jul 21, 2020 2:00 pm
archibalduk wrote: Sat Jul 18, 2020 10:40 pm It's exactly as you say - historical records won't appear in game unless the player exists in the database. This reminds me that I need to check the v1.5 patch changelist to see if this is something that has been fixed. If it hasn't, I'll mention it to Riz as I can't remember whether or not I reported this.
This has been fixed in 1.5
Great - thank you :thup:
xECK29x wrote: Tue Jul 21, 2020 4:44 pm Archi,

Can we add a check or mass-update in the new editor to include teams with no detailed division set and have a mess edit option to quickly fix those by copying League to Detailed Division? We know we ran into errors related to teams not having a detailed division set in the past, would be good to enforce that.
Sure, will 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:

EHM 1 Database & Saved Game Editor

Post by archibalduk »

EHM Editor v0.4.1 is now available: https://ehmtheblueline.com/editor

This is a pretty sizeable release with a lot of fixes, tweaks and improvements - see the lengthy changelist below! Much of the work for this update is preparation for the EHM v1.5 update and is currently hidden in the Editor. The EHM v1.5 specific functions will be enabled in a future release of the Editor - so don't try saving your database in v1.5 format or using the additional Potential Ability ranges for now as you'll find that your database won't work with the current EHM.

New Features:
  • Added support for database version 1033 (EHM game version 1.5);
  • Added UTF-8 support when importing (but not exporting) CSV spreadsheets where a byte order mark (BOM) is present
  • Retired number import and export via spreadsheets; and
  • Retired number validation (entries with blank player names are now deleted and the table is now ordered by club ID and jersey number).
Fixes and Improvements:
  • Active clubs with no Professional Status set are flagged as invalid when filtering in the Editor and are highlighted in yellow;
  • Added a 'Delete' button to the Contract Details screen;
  • Added a more detailed error message when the Editor is saving the database;
  • Added a setting to automatically save databases to the latest EHM database version (via Settings -> General) (NOTE: DO NOT ENABLE THIS SETTING UNTIL EHM v1.5 IS RELEASED);
  • Added additional Potential Ability values of -16 to -20 (NOTE: DO NOT USE THESE RANGES UNTIL EHM v1.5 IS RELEASED);
  • Added an error message when trying to add Contract Details to a non-player;
  • Added Birth City filtering to the Players and Staff screen;
  • Added colour validation to prevent invalid/blank colours (note: the database must be re-saved in order to fix existing databases);
  • Added extended logging when updating/refreshing the database;
  • Added logging of rolling save numbers to assist with debugging;
  • Added sorting for historical team name changes;
  • Adding an Extra Rule now automatically shows the Extra Rule selection pop-up window;
  • Adjusted the Players & Non-players spreadsheet export such that the Nations filter will act as a sub-filter when also filtering by Club Competition;
  • Changing database version now changes both of the Current Version and Original Version settings;
  • Clauses fields are now true/false settings;
  • Corrected the club histories export spreadsheet which was exporting the Loss and Tie columns the wrong way round;
  • Corrected the Database Settings title from Header to Settings;
  • Corrected the Nation field on the Editor screen which would flag Afghanistan (id #0) as invalid;
  • Enabled fractional DPI scaling;
  • Extended the log text file limit to 300 lines from 150 lines;
  • Fixed bug with the Player filter resetting when trying to filter by Club Drafted and Club Rights;
  • Fixed minor issue with the Editor attempting to delete zero rows from the Contract Details table if there are no records which require deletion;
  • Fixed the Club field on the Contract Details screen when the Club Contracted changes (NOTE: This was just a cosmetic issue);
  • Improved handling of database versions to ensure compatibility with v1.4.1 and v1.5 format databases;
  • Improvements to the UID validation function including the generation of a log spreadsheet showing all changes made;
  • Merged the Database Header and Game Basic Data screens into a new Data -> Database Settings screen;
  • Minor adjustments to the sizes of labels on the editing screens;
  • Re-enabled logging to the Log screen;
  • Re-enabled the database author field;
  • Resized the ID, UID and Rows fields shown at the foot of each editing screen;
  • Retired number import and export via spreadsheets;
  • Retired number validation (entries with blank player names are now deleted and the table is now ordered by club ID and jersey number);
  • The Detailed Division of every club is automatically set from the club's Division where no Detailed Division has been set;
  • Tidied up the Club Name Changes screen;
  • Tweaked Award Bonus table sorting to fix an invalid comparator error;
  • Upgraded to Qt 5.15; and
  • Widened tab sizes slightly (delete the stylesheet.css file for changes to take effect).
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:

EHM 1 Database & Saved Game Editor

Post by archibalduk »

xECK29x - Just for your information, these are the changes since v0.4.0:
  • Active clubs with no Professional Status set are flagged as invalid when filtering in the Editor and are highlighted in yellow;
  • Added colour validation to prevent invalid/blank colours (note: the database must be re-saved in order to fix existing databases);
  • Corrected the Nation field on the Editor screen which would flag Afghanistan (id #0) as invalid;
  • Enabled fractional DPI scaling; and
  • The Detailed Division of every club is automatically set from the club's Division where no Detailed Division has been set.
User avatar
ZaZooM
Prospect
Posts: 79
Joined: Fri Sep 03, 2010 5:26 pm
Favourite Team: Lokomotiv Yaroslavl / NY Rangers
Location: Moscow, Russia

EHM 1 Database & Saved Game Editor

Post by ZaZooM »

There is “competition history” export.
How to import fixed file in db?
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:

EHM 1 Database & Saved Game Editor

Post by archibalduk »

ZaZooM wrote: Sun Jul 26, 2020 10:13 pm There is “competition history” export.
How to import fixed file in db?
Click on the Import Spreadsheet button.
Hockeyiow86
Junior League
Posts: 41
Joined: Fri Nov 03, 2017 6:54 pm
Favourite Team: Wightlink Raiders

EHM 1 Database & Saved Game Editor

Post by Hockeyiow86 »

Getting an error when loading the game using new editor.

V. 1.41 select leagues screen. Cpp 114
Hockeyiow86
Junior League
Posts: 41
Joined: Fri Nov 03, 2017 6:54 pm
Favourite Team: Wightlink Raiders

EHM 1 Database & Saved Game Editor

Post by Hockeyiow86 »

Also when loading v0. 3.7 of editor it now gets stuck on loading finance info screen. Not sure what I've done to be honest
User avatar
xECK29x
TBL Rosters Researcher
Posts: 1010
Joined: Sun May 03, 2015 2:52 pm
Custom Rank: Premier Pivot Rosters Man
Favourite Team: New York Islanders

EHM 1 Database & Saved Game Editor

Post by xECK29x »

Hockeyiow86 wrote: Mon Jul 27, 2020 9:12 am Getting an error when loading the game using new editor.

V. 1.41 select leagues screen. Cpp 114
Check the version of the database you saved, make sure the drop down says version 1025.
nathans
Junior League
Posts: 8
Joined: Fri Sep 01, 2017 10:25 am
Favourite Team: Nottingham

EHM 1 Database & Saved Game Editor

Post by nathans »

Hockeyiow86 wrote: Mon Jul 27, 2020 10:59 am Also when loading v0. 3.7 of editor it now gets stuck on loading finance info screen. Not sure what I've done to be honest
Yep sounds like you have saved the database under the new format, not on purpose maybe, this option seems to be automatically selected so you have to go in to the settings to deselect it at the current time before saving anything.

Maybe an idea to update the editor to not have this option ( always save databases using the latest EHM version) automatically selected until 1.5 comes out
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:

EHM 1 Database & Saved Game Editor

Post by archibalduk »

nathans wrote: Mon Jul 27, 2020 2:17 pm
Hockeyiow86 wrote: Mon Jul 27, 2020 10:59 am Also when loading v0. 3.7 of editor it now gets stuck on loading finance info screen. Not sure what I've done to be honest
Yep sounds like you have saved the database under the new format, not on purpose maybe, this option seems to be automatically selected so you have to go in to the settings to deselect it at the current time before saving anything.

Maybe an idea to update the editor to not have this option ( always save databases using the latest EHM version) automatically selected until 1.5 comes out
Sorry, that ought to be defaulting to disabled for now but I clearly forget to change this after testing. I have uploaded v0.4.2 which fixes this by defaulting it to disabled (and it overwrites any existing 'Enabled' setting upon start-up, albeit you can re-enable it on a session by session basis but I don't recommend it).

You can fix any affected database saved using the v1.5/1033 version by re-loading the database in the v0.4.2 Editor, selecting "EHM 1025" from the Version drop-down menu in the bottom left corner of the Home screen and then saving.
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:

EHM 1 Database & Saved Game Editor

Post by archibalduk »

Note to self: Add position filtering to the next Editor release.
User avatar
tieio
Junior League
Posts: 5
Joined: Fri Mar 27, 2015 1:25 am

EHM 1 Database & Saved Game Editor

Post by tieio »

Can't seem to get this to work, I installed the redistribution file, the program loads just fine and even loads in my saved game but when I put anything into the search box at the bottom and hit enter, nothing happens.
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:

EHM 1 Database & Saved Game Editor

Post by archibalduk »

Could you post a screenshot showing how you are entering your search and how the navigation screen looks?
User avatar
tieio
Junior League
Posts: 5
Joined: Fri Mar 27, 2015 1:25 am

EHM 1 Database & Saved Game Editor

Post by tieio »

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:

EHM 1 Database & Saved Game Editor

Post by archibalduk »

What does the list down the left hand side say when you're not searching for "anyone"? Is your saved game saved as compressed? The Editor will only work for uncompressed games.
User avatar
tieio
Junior League
Posts: 5
Joined: Fri Mar 27, 2015 1:25 am

EHM 1 Database & Saved Game Editor

Post by tieio »

archibalduk wrote: Fri Jul 31, 2020 6:52 pm What does the list down the left hand side say when you're not searching for "anyone"? Is your saved game saved as compressed? The Editor will only work for uncompressed games.
Yep, that's what it was, thought I had uncompressed saves but had not apparently.
So, next question, say I want to extend a players contract, how do I save that once I add years to the expiring contract? EDIT - NM, read back, I see this cannot be done. ](*,) :-D
BulldogsFan
Drafted
Posts: 196
Joined: Fri Aug 11, 2006 7:59 pm

EHM 1 Database & Saved Game Editor

Post by BulldogsFan »

Archi... Since i want to use an old database TBL 1.5 database which goes back to EHM 2007... My question is would your Editor work with EHM 2007? I want to try to expand the NHL in EHM 2007 and I was wondering if it was possible to use your editor with EHM instead of the pre game editor..
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:

EHM 1 Database & Saved Game Editor

Post by archibalduk »

It has been a long time since I worked on the EHM 2007 aspects of the Editor, but you should be able to. I would recommend just making a few edits at a time and then checking that it works in-game. The Editor reflects the additional flexibility that EHM 1 allows and so it doesn't stop you from doing things that would break EHM 2007 (such as renaming hardcoded teams or trying to change the number of teams in a playable league).

When you mention expanding the NHL, I assume you're aware that EHM 2007 won't allow you to change the number of teams in the NHL from 30.
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:

EHM 1 Database & Saved Game Editor

Post by archibalduk »

Just to flag that we have come across a seemingly rare bug in the Editor which causes the database to be saved in the incorrect database format. It seems that the Editor switches mid-save from saving in the EHM v1.4.1 format (aka database version 1025) to a tentative EHM v1.5 format (aka database version 1033, albeit this is subject to change). This causes a problem because the 'Database Version' setting in the database is set as 1025 whereas the remainder of the database is in fact in version 1033 format. This will cause EHM to crash when trying to create a new game from the database as the game will be trying to process the database using the 1025 format when in fact it is in 1033 format. Similarly, parts of the database will appear to be corrupt when viewing the database in the Editor (notably, the Transfer Rules, Finance Info and Schedule Templates screens will list lots of "Out of Range" entries) - see the screenshot below.

Thankfully there is a simple fix in the event you encounter the issue:

1. Immediately exit the Editor and do not attempt to save the database again. Trying to re-save the corrupted database will cause it be irrecoverable.
2. Download and run the EHM Database Settings Editor.
3. Open the affected database in the EHM Database Settings Editor.
4. The "Created With Version" and "Database Version" settings will most likely be set as 1025. Change both of these to 1033. Then save the database and exit the EHM Database Settings Editor.
5. Re-load the database in the EHM Editor and all should be well again (a good way of checking is that the Transfer Rules screen appears ok).
6. On the Home screen of the Editor, change the Version drop-down menu setting to EHM 1025 and save the database.

The above instructions are on the assumption that the Database Version setting needs to be corrected from 1025 to 1033 to reflect the actual format of the database and then changed back to 1025 for the purposes of EHM v1.4.1. Obviously any future releases of EHM patches will mean that different database version numbers will be relevant.

Whilst I know what is causing the issue, I cannot pinpoint when or why it is actually occurring in the Editor. The EHM Database Settings Editor is intended as a quick fix whilst I try to pinpoint the issue.

Here is an example of the tell-tale sign that there is a version setting mismatch in the database (note all of the "Out of Range" text down the left hand section of the screen):
Image
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:

EHM 1 Database & Saved Game Editor

Post by archibalduk »

archibalduk wrote: Mon Aug 10, 2020 2:36 pmJust to flag that we have come across a seemingly rare bug in the Editor which causes the database to be saved in the incorrect database format. It seems that the Editor switches mid-save from saving in the EHM v1.4.1 format (aka database version 1025) to a tentative EHM v1.5 format (aka database version 1033, albeit this is subject to change). This causes a problem because the 'Database Version' setting in the database is set as 1025 whereas the remainder of the database is in fact in version 1033 format. This will cause EHM to crash when trying to create a new game from the database as the game will be trying to process the database using the 1025 format when in fact it is in 1033 format. Similarly, parts of the database will appear to be corrupt when viewing the database in the Editor (notably, the Transfer Rules, Finance Info and Schedule Templates screens will list lots of "Out of Range" entries) - see the screenshot below.
This is largely only of interest to xECK29x but I mention it here in case it is of use to anybody else:

I believe I have located the source of this issue. It looks as though it relates to exporting and importing playable leagues to/from the database (using the .ehm file format). When importing or exporting data, information relating to the database format is saved to the .ehm file in order to ensure that the Editor knows how to decode the .ehm file. If the database format changes in the future then the Editor can check the database format details in the .ehm file in order to ascertain how to decode and import the playable league. This allows us to export an .ehm file from an older format database and import into a newer format database (or vice-versa).

The issue appears to be that the Editor overwrites the database's version number with the version number stored in the .ehm file. So if you import a 1033 format .ehm file into a 1025 format database, the Editor will incorrectly change the database to 1033 rather than leaving it as 1025. I have removed this conflict from the Editor which I *hope* resolves the issue mentioned in the quote above. I still need to fully test this but, at least on paper, this conflict shouldn't arise any further. The difficulty with this issue is that it is proving hard to reproduce, meaning that I am not as confident that the issue is *definitely* fixed as I would ordinarily be.
GuelphBossman
Learning to skate
Posts: 4
Joined: Fri Aug 14, 2020 5:04 pm
Favourite Team: Toronto Maple Leafs

Editing Club Competitions issue

Post by GuelphBossman »

Hi.

First post ever, fairly long-time forum lurker.

I am trying to use the EHM Editor to edit the database to my liking (mostly actual info but some differences). The first problem comes when I try to edit the name of a Club Competition. I edit the name of the league and as soon as I save the database, it basically erases itself. I look in the directory and it has 0 KB. Why would this be happening?
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:

Editing Club Competitions issue

Post by archibalduk »

Does the log.txt file from the same folder as the EHM Editor.exe contain any log entries? If so, could you post them here?

If the database is saved within C:/Program Files/ then you must use Run As Admin when loading the Editor.
Post Reply