Changes made using the Editor do not appear in game [SOLVED]

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
sparkymark75
Junior League
Posts: 9
Joined: Sat Feb 11, 2012 3:31 pm

Changes made using the Editor do not appear in game [SOLVED]

Post by sparkymark75 »

Hi my first post and trying to get my head around how the data side of things work.

I used the Pre Game Editor to update the teams in the EIHL and the rosters for the teams. This all works fine on my install. I copied the folder containing all the data files over to another PC and used this to start a new game on the other PC but it still loads the old structure and rosters, it just ignores any changes I have made.

Am I missing something?

Mod note: The solution to this can be found further down this thread: Click here.
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: Copy custom database to another install

Post by nino33 »

sparkymark75 wrote:I used the Pre Game Editor to update the teams in the EIHL and the rosters for the teams. This all works fine on my install. I copied the folder containing all the data files over to another PC and used this to start a new game on the other PC but it still loads the old structure and rosters, it just ignores any changes I have made.
Are you using Windows 7? Did you select "Run as Administrator" every time you opened the PreGame Editor?

There's some kinda glitch/issue with Windows 7 where not using "Run as Admin" results in data loss once you move the database.....I lost hundreds of hours of editing work last year due to this - it looked like things were saving but as soon as I moved the databae out of the foler it was in all data was lost!
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: Copy custom database to another install

Post by archibalduk »

Try this:

1) Go to your original computer where you made the changes. Go to your database folder and copy all of the dat files.

2) Go to the other computer and create a new subfolder within the 'database' folder (give any name you like). Copy the dat files from step #1 into the new subfolder.

3) Load EHM and click on New Game. When asked which database you want to use, select the name of your new subfolder.

I suggest this because I know a few users in the past have had difficulties when not overwriting the entirety of a previous database with a new database. It's better to put new databases in separate subfolders. It's worth a go, but it does sound like you've run into the same unfortunate difficulty as Nino has previously encountered. ](*,)

The thing I don't understand is that if you save/load your custom database, your changes can still be seen in the Editor. It's only in EHM where they don't appear (or if you move the files). It's almost as though Windows Vista / 7 has two copies of the files in the same location (one as admin and another as a user)... I wonder if there's a way of getting at them. :-k

P.s. Welcome to The Blue Line, sparkymark75!
sparkymark75
Junior League
Posts: 9
Joined: Sat Feb 11, 2012 3:31 pm

Re: Copy custom database to another install

Post by sparkymark75 »

nino33 wrote:
sparkymark75 wrote:I used the Pre Game Editor to update the teams in the EIHL and the rosters for the teams. This all works fine on my install. I copied the folder containing all the data files over to another PC and used this to start a new game on the other PC but it still loads the old structure and rosters, it just ignores any changes I have made.
Are you using Windows 7? Did you select "Run as Administrator" every time you opened the PreGame Editor?

There's some kinda glitch/issue with Windows 7 where not using "Run as Admin" results in data loss once you move the database.....I lost hundreds of hours of editing work last year due to this - it looked like things were saving but as soon as I moved the databae out of the foler it was in all data was lost!
I am on Windows 7 and I didn't "Run as Administrator", I hope this isn't the cause :cry:
sparkymark75
Junior League
Posts: 9
Joined: Sat Feb 11, 2012 3:31 pm

Re: Copy custom database to another install

Post by sparkymark75 »

archibalduk wrote:Try this:

1) Go to your original computer where you made the changes. Go to your database folder and copy all of the dat files.

2) Go to the other computer and create a new subfolder within the 'database' folder (give any name you like). Copy the dat files from step #1 into the new subfolder.

3) Load EHM and click on New Game. When asked which database you want to use, select the name of your new subfolder.

I suggest this because I know a few users in the past have had difficulties when not overwriting the entirety of a previous database with a new database. It's better to put new databases in separate subfolders. It's worth a go, but it does sound like you've run into the same unfortunate difficulty as Nino has previously encountered. ](*,)

The thing I don't understand is that if you save/load your custom database, your changes can still be seen in the Editor. It's only in EHM where they don't appear (or if you move the files). It's almost as though Windows Vista / 7 has two copies of the files in the same location (one as admin and another as a user)... I wonder if there's a way of getting at them. :-k

P.s. Welcome to The Blue Line, sparkymark75!
Thanks archibalduk, will try this once I get back from watching a real game of Hockey :)
sparkymark75
Junior League
Posts: 9
Joined: Sat Feb 11, 2012 3:31 pm

Re: Copy custom database to another install

Post by sparkymark75 »

Update incase anybody else comes across this issue.

I searched my harddrive for the index.dat file and found it in the following path;

C:\Users\Mark\AppData\Local\VirtualStore\Program Files (x86)\NHL Eastside Hockey Manager 2007\data\database\Custom1

so I copied all the files in here to a new folder. Note that this only had 30 files in it. I'm guessing it only had files that had been updated a they all had a modified date of today. I copied the "missing" files from the original Custom1 folder to "fill in the gaps".

I then copied this folder over to the other PC, loaded it up and all was well. :joy:
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: Copy custom database to another install

Post by archibalduk »

Wow! I think you may have solved it!! =D>

I just navigated to C:\Users\<YOUR NAME HERE>\AppData\Local\VirtualStore\Program Files (x86)\Sports Interactive\NHL Eastside Hockey Manager 2007\data\database and found two databases where I had previously lost data. I haven't checked the databases for the missing data because I can't remember exactly what I'd changed. However, I recognise both of the database names I found as being the two I'd had difficulties with.

I searched for 'VirtualStore' on Google and have been able to find an explanation of what is going on. As you may know, since Windows Vista, the User Account Control (UAC) security feature was introduced in order to prevent unauthorised software from accessing system files (such as files in the Windows and Program Files folders). The 'Run as Admin' option was added so that applications could run with more privileges/powers within Windows and the UAC.

If you run an application with low privileges (i.e. you run it as a regular user rather than as admin) then it is unable to modify files in the protected folders (such as Program Files). It is apparently bad practice for applications to save files to these protected folders and should instead be saving elsewhere (such as each user's own user area). In order to support those that want to save to Program Files but don't have admin privileges, Windows redirects them to the VirtualStore. The idea is that if Windows/UAC simply prevented applications from saving to Program Files then you'd have lots of older applications crashing / unable to save. So the VirtualStore was a way of maintaining security whilst enabling all applications to work. This process of redirecting software to a separate VirtualStore folder is known as 'UAC Virtualization'.
Microsoft Windows Blog wrote:Virtualization is intended only to assist in application compatibility with existing programs. New applications designed for Microsoft Windows 7 should NOT perform write operations to sensitive system areas, nor should they rely on virtualization to provide redress for incorrect application behavior. Always develop applications for use with standard user privileges and don’t count on the application running under administrator privileges. Test your application with standard user privileges and not administrator privileges.
There is more info here.


So the key lesson for us all to learn about this is to ALWAYS place your databases in a folder somewhere other than Program Files (such as your desktop or My Documents) when you want to make changes using the Pre Game Editor. Then move the database back into EHM's database folder when you have finished editing.
sparkymark75
Junior League
Posts: 9
Joined: Sat Feb 11, 2012 3:31 pm

Re: Changes made using the Editor do not appear in game [SOL

Post by sparkymark75 »

Cool, just glad I could help in some small way and just glad I got my "missing" data back :)
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: Changes made using the Editor do not appear in game [SOL

Post by nino33 »

Wow......I wish I'd thought of searching for the Index.dat file.....I twice lost HUNDREDS of hours of work last year!
As I moved forward (working on the 1974 db) and what I have now is further along, I'm not even going to look for the old/missing databases......maybe someday I'll seek them out just to delete them.....I'm glad a solution has been found! At least no one else will havee to go through the frustration I remember feeling....good work sparkymark75!

:-)
Post Reply