Page 2 of 7

Re: Editing league structures & rules using a hex editor / A

Posted: Sat Sep 03, 2011 8:28 pm
by archibalduk
Hobbit13 wrote:The really annoying thing about this is that in CM they don't have this problem. There, whatever you find in Olly, you also find it exactly the same in the exe so they can't help us.

So unless we figure out how EHM de-codes itself, we're gonna have to resort to using ArtMoney for these changes.
Perhaps a solution would be some sort of launcher file. You run the launcher and it loads EHM and makes the changes to the offsets in the memory. Probably something like this: http://www.d3scene.com/forum/developmen ... ogram.html

Unfortunately we'd need somebody with C++ programming skills to write the launcher. However, the tutorial I've linked to would be a very good starting point even for a novice... Maybe I'll even give it a go when I have some spare time! :dunno: :-k

Re: Editing league structures & rules using a hex editor / A

Posted: Tue Sep 06, 2011 9:05 pm
by archibalduk
Hey Marek. Would you mind posting what offsets you have found for the Czech Republic Extraliga and what they do? That would be really helpful because it'll help me find the same settings for other leagues (I'm guessing each offset is located relative to the <league name>.cpp string within Olly) - and maybe even for the World Championships. :-)

Re: Editing league structures & rules using a hex editor / A

Posted: Wed Sep 07, 2011 1:50 am
by Midas
Hobbit's the main man I learned from and explained it better than I ever could.

Re: Editing league structures & rules using a hex editor / A

Posted: Wed Sep 07, 2011 6:15 pm
by archibalduk
Midas wrote:Hobbit's the main man I learned from and explained it better than I ever could.
He's the man when it comes to editing leagues isn't he! :D :notworthy:

The reason I was asking (other than trying to understand the WC) is because I'm going to try and create an application using C++ that will adjust the start date and update the league rules/structures/etc with a simple click on a mouse button (rather than having to fiddle with ArtMoney each time). I'm new to C++ so I can't promise I'll pull it off, but I'll give it my best shot. I taught myself php, sql and css and so I'm hopeful I can create a simple C++ program...

Re: Editing league structures & rules using a hex editor / A

Posted: Tue Sep 27, 2011 9:17 pm
by AdamOates
Any recent news with this project?

Re: Editing league structures & rules using a hex editor / A

Posted: Tue Sep 27, 2011 9:22 pm
by archibalduk
AdamOates wrote:Any recent news with this project?
Yes - I just happened to start a new thread asking for help researching: http://www.ehmtheblueline.com/forums/vi ... =13&t=8277

Re: Editing league structures & rules using a hex editor / A

Posted: Wed Sep 28, 2011 1:42 pm
by Vapeteus
I was wondering, is it now possible to make NHL "National Hockey League". Like theres only international teams, FInland, USA etc and that those teams could only have players from that nation?

Re: Editing league structures & rules using a hex editor / A

Posted: Thu Sep 29, 2011 1:50 am
by YZG
It has always been possible with the pre-game editor.

EDIT: Except for the "only national players" part. But as soon as the league rules patch is released, you could make the league a zero-foreigner league and it'll work.

- YZG

Re: Editing league structures & rules using a hex editor / A

Posted: Thu Sep 29, 2011 5:07 am
by nino33
Vapeteus wrote: theres only international teams, FInland, USA etc and that those teams could only have players from that nation?
YZG wrote:as soon as the league rules patch is released, you could make the league a zero-foreigner league and it'll work. - YZG
I'm not sure you could make each team (Finland, USA, etc) have players only from that nation, because I think the "zero-foreigners" would apply only to the single nation selected on the Club Competitions (Leagues) tab in the Editor

Re: Editing league structures & rules using a hex editor / A

Posted: Thu Sep 29, 2011 8:19 am
by Alessandro
nino33 wrote:
Vapeteus wrote: theres only international teams, FInland, USA etc and that those teams could only have players from that nation?
YZG wrote:as soon as the league rules patch is released, you could make the league a zero-foreigner league and it'll work. - YZG
I'm not sure you could make each team (Finland, USA, etc) have players only from that nation, because I think the "zero-foreigners" would apply only to the single nation selected on the Club Competitions (Leagues) tab in the Editor
No, they are right, it will work.

Re: Editing league structures & rules using a hex editor / A

Posted: Thu Sep 29, 2011 2:54 pm
by Vapeteus
That would be great, if those teams would even draft players from their nation only.

Re: Editing league structures & rules using a hex editor / A

Posted: Thu Sep 29, 2011 3:14 pm
by Alessandro
I doubt it can be done frankly

Re: Editing league structures & rules using a hex editor / A

Posted: Thu Sep 29, 2011 4:49 pm
by nino33
Alessandro wrote:No, they are right, it will work.
Alessandro wrote:I doubt it can be done frankly
So you’re saying an “international NHL” with a zero-foreigner rule would work (Finland would dress only Finish players, USA would dress only Americans, etc) but these same teams would draft players from all nations?

Re: Editing league structures & rules using a hex editor / A

Posted: Wed Nov 23, 2011 3:18 pm
by Vapeteus
Just wondering, how is this coming? Can't wait to start SM-League with current EU and non-EU players rules.

Re: Editing league structures & rules using a hex editor / A

Posted: Wed Nov 23, 2011 6:18 pm
by archibalduk
I'm not sure where Alessandro and Marek are with regards to this and so cannot reply on their behalf. From my point of view, I've written a patch that allows you to put the changes into a CSV file (Excel spreadsheet) and then applies them. Unfortunately it's not perfect yet because, although it makes the changes, it crashes. I'm reading up on what the cause of the issue is and will hopefully solve it sooner or later.

Re: Editing league structures & rules using a hex editor / A

Posted: Thu Nov 24, 2011 8:09 am
by Alessandro
Unfortunately this project is for now halted due to lack of time. We did send some changes to Archi, but unfortunately we got only crashes so far. However, we can release something as compromise once our UUDB 2012 version will be out, but I doubt it will be before Q3 2012.

Re: Editing league structures & rules using a hex editor / A

Posted: Thu Nov 24, 2011 8:10 am
by Alessandro
nino33 wrote:
Alessandro wrote:No, they are right, it will work.
Alessandro wrote:I doubt it can be done frankly
So you’re saying an “international NHL” with a zero-foreigner rule would work (Finland would dress only Finish players, USA would dress only Americans, etc) but these same teams would draft players from all nations?
Exactly.

Re: Editing league structures & rules using a hex editor / A

Posted: Sat Dec 10, 2011 10:23 pm
by Tonait
Hopefully somebody understand my bad english.
I just wondering can i change league rules? for example i want update Finland SM-liiga foreign players rule. 4 foreign player --> Unlimited EU- players and 3 Non-eu players.
Is it possible somehow?

Editing the hardcoded league names (ArtMoney / Hex Editing)

Posted: Tue Jun 05, 2012 12:23 pm
by archibalduk
I have set myself the challenge of renaming some of the hardcoded leagues names. In particular, I want to rename the United Hockey League the Southern Professional Hockey League and the Russian Superleague the Kontinental Hockey League.

The first method I tried was to use ArtMoney. It is pretty simple to rename any of the leagues in a saved game using this method. For example, here is the KHL:

Image

It seems that when I save the game, it saves the league name changes to the game. However, if I try to reload the game, the game crashes. Presumably this is because the game checks to ensure that the hardcoded league names are present. I managed to circumvent this by clicking on New Game -> Search and rename the league names using ArtMoney -> Press cancel in EHM to return to the main menu and then loading the saved game. This presumably works because I have renamed the hardcoded league names to match those in the saved game. However it is pretty messy because you would have to go through the New Game screen and manually change the league names each time you reload.

When changing the league names via the New Game screen, if you create the new game from this screen, the leagues will show up in game with their modified names. So this method works both for existing saved games and when starting a new game.

The additional difficulty I found with the ArtMoney method is that the offsets where the league names are located seems to change each time you load EHM (i.e. it is dynamic). There are a couple of static locations, but these aren't present or editable until you go to the New Game screen. Thus it looks unlikely I that I would be able to implement league name changes into something like the CSD Patch.

The second method is to hex edit the ehm2007.exe itself. This is much more successful because all you have to do is make the league name changes once to the exe (and also to the database) and that is it. The drawback is that you are restricted with regards to the length of the names. In most cases, the new league name cannot be any longer than the existing league name - although some league names have space for an additional one or two letters. However, I was able to circumvent this for the UHL and effectively double the space available for the league name - thereby allowing me to rename it to the SPHL (note in the screenshots that I haven't yet renamed the All-Star team names):

Image

Image

This method seems to work fine when creating new games. However it doesn't work with saved games that were saved using the old league names.

Re: Editing the hardcoded league names (ArtMoney / Hex Editi

Posted: Tue Jun 05, 2012 1:51 pm
by Alessandro
Excellent. Are you going to try and circunvent the limit for the KHL too? And please have a look at my problem as Manimal DB needs me :-p

Re: Editing the hardcoded league names (ArtMoney / Hex Editi

Posted: Tue Jun 05, 2012 1:57 pm
by Primis
archibalduk wrote:I have set myself the challenge of renaming some of the hardcoded leagues names. In particular, I want to rename the United Hockey League the Southern Professional Hockey League and the Russian Superleague the Kontinental Hockey League.

It seems that when I save the game, it saves the league name changes to the game. However, if I try to reload the game, the game crashes. Presumably this is because the game checks to ensure that the hardcoded league names are present.
Is there a way to swap league/competition names, kinda' like we already have to do with teams in the editor? Essentially, can't you rename the UHL to SPHL and then use ArtMoney to rename some other defunct league/competition to the UHL so that the name is still present in the DB/savegame when the game does its check? To the point you could even create a new League/Competition that exists solely so its name can be changed to the UHL, so no other leagues/comps are compromised? Just an idea.

I really like what you're trying to do, Archi. In a perfect scenario, someone figures out a good way to rename league and change their alignment/team numbers so we can have the AHL at its proper 30 teams and get rid of the aggravating "AHL team in the ECHL" thing and scenarios like that. That's the one thing I really want is a fixed AHL and ECHL. A bonus of course would be updated rules to go along with those leagues...

Re: Editing the hardcoded league names (ArtMoney / Hex Editi

Posted: Tue Jun 05, 2012 4:15 pm
by archibalduk
Alessandro wrote:And please have a look at my problem as Manimal DB needs me :-p
Haha! Patience, my friend! :D I've been taking a couple of days off from the Updater to work on the UK EIHL research for Manimal as well as some OOTP stuff. I think I've fixed the problem with the semicolon delimiters and I should have something for you this evening or tomorrow.
Alessandro wrote:Are you going to try and circunvent the limit for the KHL too?
It's not looking possible I'm afraid... but I haven't given up quite yet. The best I've been able to do so far is rename it Kontinental League (which isn't too bad, really).
Primis wrote:Is there a way to swap league/competition names, kinda' like we already have to do with teams in the editor? Essentially, can't you rename the UHL to SPHL and then use ArtMoney to rename some other defunct league/competition to the UHL so that the name is still present in the DB/savegame when the game does its check? To the point you could even create a new League/Competition that exists solely so its name can be changed to the UHL, so no other leagues/comps are compromised? Just an idea.
This is what I was initially trying, but I couldn't get it to work. I think the reason for this is as follows:

Each competition in the database has an ID number. For example, the NHL is ID# 0 and the UHL is 17. It seems, for example, that the league with ID# 17 in the database has to be named the United Hockey League. If you rename it, EHM will crash. It will crash even if you swap names with another league. However, I can get around this by using a hex editor to rename the league name stored in the exe and also making the same name change in the database. This way, I can change the name of the league that EHM expects to have ID# 17, etc. This is how I can rename the UHL to the SPHL and the original SPHL to UHL.

I'm going to see if I can swap the Norwegian League with the Italian Serie A as an extension of the above. It's a bit of a long-winded way of doing things, but it's a start. If I can find the location of the ID numbers within the exe then I might be able to do some serious swapping without having to make any changes to the database.
Primis wrote:That's the one thing I really want is a fixed AHL and ECHL.
I completely agree! I want to look at this. Whether I'll have any luck is doubtful however. It's a shame Lazion is around so much at the moment - he seemed to know quite a lot about editing rules and structures.

Re: Editing the hardcoded league names (ArtMoney / Hex Editi

Posted: Tue Jun 05, 2012 11:42 pm
by archibalduk
Well, I've been trying to use Lazion's guide to league sizes (here) but no luck so far with the AHL. I guess perhaps this is because of the additional complication with regards to the league being divided into conferences and divisions...

Re: Editing league structures & rules using a hex editor / A

Posted: Wed Jun 06, 2012 11:57 am
by archibalduk
Alessandro - are you able to explain how you edited the exe in order to change the Austrian league to ten teams please? As an experiment, I have been trying to change the number of teams in the Danish league but without success.

Re: Editing the hardcoded league names (ArtMoney / Hex Editi

Posted: Wed Jun 06, 2012 12:22 pm
by Primis
archibalduk wrote:Well, I've been trying to use Lazion's guide to league sizes (here) but no luck so far with the AHL. I guess perhaps this is because of the additional complication with regards to the league being divided into conferences and divisions...
Ugh. Do you have to then set each Conference and Division sizes as well? That sounds ugly. That does not inspire confidence in finding a simple way to fix league sizes for the AHL and ECHL...