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
RomaGoth
Fringe Player
Posts: 399
Joined: Wed Dec 10, 2008 4:42 pm
Favourite Team: Detroit Red Wings
Location: The Internet

Re: EHM 1 Database Editor (2016)

Post by RomaGoth »

Chrisu wrote:Thanks for the reply. One last question, is there a way to transfer draft picks to a new club?
Use the extra_config file
User avatar
CJ
TBL Rosters Researcher
Posts: 3411
Joined: Tue Nov 08, 2011 6:34 pm
Custom Rank: Formerly jhcjobpb
Favourite Team: Florida Panthers
Location: Finland

Re: EHM 1 Database Editor (2016)

Post by CJ »

Chrisu wrote:Thanks for the reply. One last question, is there a way to transfer draft picks to a new club?
What do you mean by "new club"? You can trade draft picks OR you can in the database folder edit the "extra_config.cfg" and switch draft picks there. (works only for new created games, not in a middle of a save)
Sparty
Junior League
Posts: 9
Joined: Fri Feb 19, 2016 12:56 am
Favourite Team: Detroit Red Wings

Re: EHM 1 Database Editor (2016)

Post by Sparty »

This has probably been answered before in this thread, so my apologies if so. I'd like to realign the NHL with fifteen teams in each conference, is that possible? Seven in the Northeast, Eight in the Metro, Eight in the Central and Seven in the Pacific.

Thanks!
User avatar
Alessandro
Olympic Gold
Posts: 2865
Joined: Sat Aug 27, 2005 1:54 pm
Custom Rank: TBL Rosters Man
Favourite Team: Team Russia
WHL Team: Calgary Flames

Re: EHM 1 Database Editor (2016)

Post by Alessandro »

Currently not possible
User avatar
y2jericho
Prospect
Posts: 77
Joined: Mon Mar 07, 2011 7:47 pm
Custom Rank: yzerwing

Re: EHM 1 Database Editor (2016)

Post by y2jericho »

When trying to download this from the link on page one, it says that there is a virus or malware in the file.
User avatar
A9L3E
All-Star
Posts: 1230
Joined: Tue Sep 09, 2008 6:22 am
Custom Rank: Shiny gilded nameplate
Favourite Team: Helsingin Jokerit
Location: Vantaa, Finland

Re: EHM 1 Database Editor (2016)

Post by A9L3E »

y2jericho wrote:When trying to download this from the link on page one, it says that there is a virus or malware in the file.
A false positive.
celislanders1
Prospect
Posts: 85
Joined: Sun Apr 05, 2015 11:32 pm

Re: EHM 1 Database Editor (2016)

Post by celislanders1 »

Can you add competitions ??
Gallagher x 11
Learning to skate
Posts: 2
Joined: Wed Aug 17, 2016 3:39 am
Favourite Team: Montréal Canadiens

Re: EHM 1 Database Editor (2016)

Post by Gallagher x 11 »

Hey guys, I was wondering... I downloaded the DB editor to make some adjustments on the rosters v8.2 but I don't know how to load the DB in the editor. You need a file with the .db extension (which I can't find). I've never been really good with computers so I don't really know what to do haha
User avatar
jonathanorjas
Junior League
Posts: 28
Joined: Sun Apr 05, 2015 3:32 pm
Favourite Team: Leksands IF
Location: Sweden

Re: EHM 1 Database Editor (2016)

Post by jonathanorjas »

Gallagher x 11 wrote:Hey guys, I was wondering... I downloaded the DB editor to make some adjustments on the rosters v8.2 but I don't know how to load the DB in the editor. You need a file with the .db extension (which I can't find). I've never been really good with computers so I don't really know what to do haha
You need to import the roster in the game first before you can edit it in the 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:

Re: EHM 1 Database Editor (2016)

Post by archibalduk »

celislanders1 wrote:Can you add competitions ??
No data can be added yet (it is edit only). This should, however, be possible with the next version though. I'll try to post an update on development progress later this week.
jonathanorjas wrote:
Gallagher x 11 wrote:Hey guys, I was wondering... I downloaded the DB editor to make some adjustments on the rosters v8.2 but I don't know how to load the DB in the editor. You need a file with the .db extension (which I can't find). I've never been really good with computers so I don't really know what to do haha
You need to import the roster in the game first before you can edit it in the editor.
That's right; the Import function in EHM 1 generates the .db file.
Gallagher x 11
Learning to skate
Posts: 2
Joined: Wed Aug 17, 2016 3:39 am
Favourite Team: Montréal Canadiens

Re: EHM 1 Database Editor (2016)

Post by Gallagher x 11 »

jonathanorjas wrote:
Gallagher x 11 wrote:Hey guys, I was wondering... I downloaded the DB editor to make some adjustments on the rosters v8.2 but I don't know how to load the DB in the editor. You need a file with the .db extension (which I can't find). I've never been really good with computers so I don't really know what to do haha
You need to import the roster in the game first before you can edit it in the editor.
That's right; the Import function in EHM 1 generates the .db file.[/quote]

Thank you guys. But how do you do that? I click on Import Database but I can't find the rosters
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 1 Database Editor (2016)

Post by archibalduk »

This explains it: Importing an EHM 2007 database into EHM:EA - http://www.ehmtheblueline.com/wiki/inde ... nto_EHM:EA

I'm now without Internet access until Saturday thanks to my useless ISP. So I'll post an update on the Editor in a week or so once I'm back from holiday. It would take forever to type out on my phone otherwise.
Djungelurban
Prospect
Posts: 58
Joined: Thu Nov 26, 2009 9:57 am

Re: EHM 1 Database Editor (2016)

Post by Djungelurban »

archibalduk wrote:I'm now without Internet access until Saturday thanks to my useless ISP. So I'll post an update on the Editor in a week or so once I'm back from holiday. It would take forever to type out on my phone otherwise.
Oh boy, oh boy, oh boy! Things are getting exciting!
Sparty
Junior League
Posts: 9
Joined: Fri Feb 19, 2016 12:56 am
Favourite Team: Detroit Red Wings

Re: EHM 1 Database Editor (2016)

Post by Sparty »

Another realignment question. I'm trying to switch some teams across conferences. Whenever I do it, if I look at the conference standings it shows the teams in the correct conference, but when I look at the division standings, it doesn't show the teams listed in the division standings at all. Am I somehow doing this wrong or is this not possible?

:help:

If it's not possible, I guess I could then take all the players, personnel and such and then transfer them? I'm not changing the number of teams in the conferences or the divisions, just trying to do even swaps.
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 1 Database Editor (2016)

Post by archibalduk »

It is possible, but I suspect you may need to wait until the league structures in an EHM 1 database are fully editable in the Editor. In the meantime, you could try using "CHANGE_DIVISION_DATA" in the import_config file when importing an EHM 2007 database into EHM 1 - see here: http://www.ehmtheblueline.com/forums/vi ... 70#p199124
Sparty
Junior League
Posts: 9
Joined: Fri Feb 19, 2016 12:56 am
Favourite Team: Detroit Red Wings

Re: EHM 1 Database Editor (2016)

Post by Sparty »

Thanks! I suppose for now I can realign differently than I'd prefer and then hopefully fix it when that function becomes available.
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 1 Database Editor (2016)

Post by archibalduk »

I decided to wait a couple of extra weeks than planned before posting an update on the Editor's progress just so I had some more interesting information to share:

It has been seven months since I released the last beta of the Editor (back in February - time has really flown). I made a lot of progress after releasing that version but then I hit a crippling issue: The Editor would repeatedly crash when loading databases (and the debugger wasn't really offering any helpful insight). After days of trying to figure out why the sudden crash I realised that I had updated my development/compiler software and that the way in which the Editor loaded in databases was, for some reason, not compatible with this new version. Annoyingly this affects many tools I have written - including the EHM Updater.

Whilst figuring out the EHM 1 database structure, I found that the database is structured in a very different manner and the old method of reading and writing the database was not really ideal. So it was something I had planned to revise at some point, but it was a big task and so I wanted to do it at a later date once the Editor was more developed. Anyhow, the incompatibility forced me to do the re-writing task right away. Hence why no new version has been released for so long.

I have however since finished re-writing the affected part of the code and now the Editor is much more flexible. So much so, it is now compatible with EHM 2005 and 2007 databases as well as EHM 1 databases and saved games. I haven't done any real testing with EHM 2005 and 2007 yet, but the potential is there for being able to edit those databases too (as well as eventually EHM 2004 once I have figured out the database structure - but that's low priority right now). The reason I have added this compatibility it that it is possible to use the Editor to convert databases from one format to another. Realistically this will not work for converting from EHM 2004/2005/2007 to EHM 1 because we have EHM 1's import function already and so there's no point me even trying to replicate that. What I'm more interested in is converting EHM 2004 and 2005 databases to EHM 2007 because we can then import them into EHM 1. It would be pretty neat to play the original EHM 2004 database in EHM 1. There would of course be some manual editing required in order to update the number of teams in leagues, etc so that they match EHM 2007's structure - but it's very doable. I don't know if the conversion will be fully up and running for the next release of the Editor, but it's very close.

There is more good news - I can now read and write the full EHM 1 database structure. This means that I can start work on adding editing screens for each of these. So far I have completed editing screens for Financial Rules, Schedule Templates (these are the real life templates that can be used instead of relying on EHM generating them) and Transfer Rules. I have posted screenshots below of each of those editing screens. The "Extra Rules" tab of the Transfer Rules screen is particularly interesting - there are 147 different types of rule that can be added to a league (see the second screenshot below). The remaining new tables are Ruling Bodies and League Structures. I might add the Ruling Bodies screen to the upcoming release but I might push it back to the following release - depending on how much spare time I have. The League Structures table will most definitely be in the following release. It is perhaps the most interesting of the tables, but it is also rather complex and is going to take time to get fully up and running (the structure of the table is essentially a great number of tables nestled together a bit like a Russian doll).

In addition to the above, I have made a great deal of improvements and adjustments. For instance, all of the drop-down menus are now customisable via text files. We have encountered an issue with the EHM 2007 Pre-Game Editor because it does not support the additional Player Roles (it only supports the original goalie roles). This means that (1) we cannot select any of the other roles via the Pre-Game Editor (we have to rely on the Updater) and (2) the Pre-Game Editor actually erases the Player Role from a player when you try to edit him. In order to avoid any similar sort of issue with the Editor in the future, all drop-down menus (such as the Player Roles drop-down menu) are fully customisable. If additional values were added to EHM in the future then you could add them to the relevant text file and these would show up in the Editor. It also allows you to customise how text is matched using the Updater/data import functions have been added to the Editor (once the Updater/import functions have been added, of course).

Other improvements include the ability to added and delete entries from many of the editing screens (in the following version I want to look at being able to copy and paste entire entries from the new tables, such as League Structures, to see if we can make playable leagues from the modern DB playable in the 2006 DB). It is also possible to import and export schedule templates for leagues. Incidentally, you might notice in the Schedules Templates screenshots below that there are also alternative schedules. These are used when the Olympics are taking place IIRC (so that the schedules work around the Olympics like in real life).

You'll notice in the screenshots below that the old editing screens are currently missing from the menu-bar. This is because I'm still updating those in order to be compatible with the new drop-down menus. These will all be added back in time for the upcoming release.

I don't have an ETA for the release of the next version as it is dependant upon how much free time I have. It will be a some point this year and hopefully not too far in the future - assuming my job does not go crazy busy in the mean time.

Image
Full resolution: http://i209.photobucket.com/albums/bb43 ... l6ygy9.png

Image
Full resolution: http://i209.photobucket.com/albums/bb43 ... rme1k7.png

Image
Full resolution: http://i209.photobucket.com/albums/bb43 ... fjgiiy.png

Image
Full resolution: http://i209.photobucket.com/albums/bb43 ... vtktyr.png

Image
Full resolution: http://i209.photobucket.com/albums/bb43 ... ioizw2.png
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 1 Database Editor (2016)

Post by nino33 »

That's a lot of amazing work, way to go Arch! =D> Pretty cool! :nod:

archibalduk wrote: The League Structures table will most definitely be in the following release. It is perhaps the most interesting of the tables, but it is also rather complex and is going to take time to get fully up and running (the structure of the table is essentially a great number of tables nestled together a bit like a Russian doll).
Does "League Structures" refer to the number of teams in a League? So that retro databases from say the 21 NHL era could be better replicated?

archibalduk wrote:Schedule Templates (these are the real life templates that can be used instead of relying on EHM generating them)
Is this potentially editable? Or you just choose between available templates?

archibalduk wrote:to see if we can make playable leagues from the modern DB playable in the 2006 DB
That would be most helpful 8-)
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 1 Database Editor (2016)

Post by archibalduk »

Thanks :thup:
nino33 wrote:Does "League Structures" refer to the number of teams in a League? So that retro databases from say the 21 NHL era could be better replicated?
It refers to a lot of different settings around league structures including the number of teams in the league, the number of divisions and conferences, the number of points awarded for wins/losses/OT/PS/etc, how the standings are sorted, how often teams play, the structure of the playoffs, how the schedule is generated (including how to deal with games occurring locally and those that will be televised). The list goes on!...

There is a great deal of flexibility by the looks of it and so I would expect that a 21 team NHL would be possible.
nino33 wrote:Is this potentially editable? Or you just choose between available templates?
EDIT: I'm really sorry for the lengthy post. I thought I'd explain how it works in full, but it turned into a bit of an essay! :-D But hopefully this clarifies what the Templates do. The short answer is: Yes, the Templates are fully editable using the Editor - you can either edit via the Editor or import/export via spreadsheets.

The starting point is the League Structure table. This table includes all of the settings for setting up the schedule so that the game can generate the full schedule. However, rather than relying on the game to generate the schedule, you can create your own Schedule Template. I guess you can think of it as a way of overriding the game's schedule generator. Thus enabling you to import and use a real life schedule. Using your example of the 21 team NHL (e.g. the 1979/80 season), you could let the game generate your schedule or, assuming you can find it, you could input the real life 1979/80 schedule.

The Schedule Templates are in the following format:
  • Home Team ID
  • Road Team ID
  • Day of Month
  • Month
  • Year Offset
The Day of Month and Month are self explanatory (e.g. Day 7 of Month 10 = 7th October). The Year Offset determines whether that game will occur in the first year of the season or the second year. In the case of the 2015/16 season, 2015 is regarded as the first year (i.e. offset = 0) and 2016 is the second year (offset = 1).

Home and Road Team IDs do not relate to the teams' usual ID numbers. Instead, the teams are ordered alphabetically and then the first team is 0, the second team is 1, etc. Where a league has divisions, the teams are grouped into their divisions and sorted alphabetically within each division. The divisions are sorted according to the order they appear in the Editor (take a look at the second to last screenshot in my post above and you'll see a list of divisions down the right hand side). Each team has a prefix added to the Team ID according to the division in which they belong. A zero is prefixed to Team IDs in the first division, a 1 to the Team IDs in the second division and so on.

Based on the above, here is how it works for the NHL Schedule Template (based on the modern DB - i.e. 2015/16 structures):

1. First, take a look at the list of divisions in the Editor in order to figure out the Team ID prefix (the first division is 0, the second is 1, etc). As you will see from this screenshot the divisions are in this order:
  • Atlantic = 0
  • Metropolitan = 1
  • Central = 2
  • Pacific = 3
2. Secondly, group the teams by division and sort them alphabetically. Within each group/division of teams, assign them their Team ID. The first team is 0, the second is 1 and so on. Then add the division prefix mentioned above. The final Team ID will be three digits long as the division prefix will be one digit (unless you have 11 divisions, I guess?...) and the team's assigned number is two digits. For example, the second team (=1) in the third division (=3) would have a Team ID of 301.

With the teams in the first division (i.e. with a prefix of 0), the zeros are disregarded and so you end up with just a single or double digit Team ID. For example, the fifth team (=4) in the first division (=0) is simply 4 rather than 004, the 19th team (=18) in the first division (=0) is 18 rather than 018 and the first team (=0) in the first division (=0) is 0 rather than 000.

Based on the above, these are the Team IDs for the NHL teams in the modern DB:

Image

If you take a look at the first of the screenshots below, you will see the Schedule Template for the NHL from the TBL v8.2 rosters. The four games on the opening day (7 October 2015) shown in that screenshot are:

Home v Road:
7 v 4
200 v 104
302 v 306
304 v 305

Using the above-mentioned system, the Team IDs translate as:

Home v Road:
TOR v MTL
CHI v NYR
CGY v VAN
LAK v SJS

And, if you check the real life NHL 2015/16 schedule (see here) you will see that this matches! 8-)

Using the above system, you can create the whole schedule in a spreadsheet. Once you have this in a spreadsheet, you can import it into the database using my Editor. So there isn't a fixed Template - you just create it yourself.

Image

Image
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 1 Database Editor (2016)

Post by nino33 »

Thanks for the great/informative reply! :thup:


archibalduk wrote:Thus enabling you to import and use a real life schedule. Using your example of the 21 team NHL (e.g. the 1979/80 season), you could let the game generate your schedule or, assuming you can find it, you could input the real life 1979/80 schedule.
Via Guides/Yearbooks/etc I've got the 79-80 schedule and many more :-D


Any idea what happens "year after year"
Can you input many years/decades of schedules?.....or "edit on the fly" and input a schedule yearly into a saved game?.....or?
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 1 Database Editor (2016)

Post by archibalduk »

I'm not really sure. I need to re-enable saved game editing in the Editor. Once I've done that, I'll take a look and will let you know. :thup:
User avatar
Edgars
Top Prospect
Posts: 134
Joined: Fri Mar 08, 2013 6:37 am
Location: Rīga, Latvija

Re: EHM 1 Database Editor (2016)

Post by Edgars »

It sounds fantastic that it would be possible to add new playable leagues to the game!

Is this function already done/function even in the most basic level or there is only done forms/windows (which are seen in screenshots), but actual import function into the database and game itself is still work in progress?
szczepek25
Junior League
Posts: 48
Joined: Thu May 07, 2015 3:22 pm
Favourite Team: Poland
Location: Kraków

Re: EHM 1 Database Editor (2016)

Post by szczepek25 »

Do I understand? When will the new version of the editor it will be possible to add new playable league? If so, good news :D I'm very happy :D
User avatar
Alessandro
Olympic Gold
Posts: 2865
Joined: Sat Aug 27, 2005 1:54 pm
Custom Rank: TBL Rosters Man
Favourite Team: Team Russia
WHL Team: Calgary Flames

Re: EHM 1 Database Editor (2016)

Post by Alessandro »

Guys, I'm sorry, but I fear you misread Archi's post. He wrote "playable leagues from the modern DB playable in the 2006 DB" that means to add more leagues to historical mode.
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 1 Database Editor (2016)

Post by archibalduk »

As Alessandro says, the hope is to add extra playable leagues to the historical mode which are currently only playable using the modern mode. The screenshots in my post are fully working, so you can add/edit/delete data as much as you like. In a future version (i.e. the one after the next release), I will look at adding the copy and paste function so that we can copy league structures, finances, etc from one database to another (e.g. from a modern DB to an historic DB).

I don't know at this stage whether adding league structures, finances, etc to a new league will make it playable (or even if it will make it possible to add playable leagues to the historical mode). All I know is that for a league to be playable it must have basic structure, finances, etc settings. But whether this makes additional leagues playable, I just don't know right now. Once we have the league structures fully editable then we will be able to start experimenting. :-)
Post Reply