Page 5 of 7
Re: Editing league structures & rules using a hex editor / A
Posted: Sun Aug 26, 2012 8:23 am
by Alessandro
archibalduk wrote:I will do my best to work on a new patch file as soon as I can.
You better
How are you making these changes? Are you using ArtMoney, editing the exe or modifying the saved game data?
All through ArtMoney
Re: Editing league structures & rules using a hex editor / A
Posted: Sun Aug 26, 2012 8:40 am
by archibalduk
Alessandro wrote:archibalduk wrote:I will do my best to work on a new patch file as soon as I can.
You better
I might even see if I can do it tomorrow!
Alessandro wrote:All through ArtMoney
Perfect! This will make life for everybody so easy.

Re: Editing league structures & rules using a hex editor / A
Posted: Sun Aug 26, 2012 12:59 pm
by Alessandro
Ok later today I will send you the latest copy
Re: Editing league structures & rules using a hex editor / A
Posted: Sun Aug 26, 2012 2:20 pm
by Hobbit13
archibalduk wrote:Alessandro wrote:archibalduk wrote:I will do my best to work on a new patch file as soon as I can.
You better
I might even see if I can do it tomorrow!
That would be great! Thanks. There's no big hurry though but it would be nice to have it when the new Manimal roster is released
archibalduk wrote:Alessandro wrote:All through ArtMoney
Perfect! This will make life for everybody so easy.

Yeah that's the one thing I forgot to mention. I mean it occurred to me that we can actually edit the exe using ArtMoney as well...
And about editing the leagues, when I first changed them by hexediting the exe, there were 4 parts that I borrowed from Slovakia to make Austria into a 10 team league. The 4 parts were for changing the number of teams in a league, changing the league structure (like OT rules, number of players dressed), changing the schedule and playoff format and the last part was needed to get the playoffs to start but otherwise I didn't know what its function was. Well I have had to borrow that last part from Slovakia (by editing the exe using ArtMoney) due to having changed the playoff format for Austria (instead of originally 4 teams qualifying, I changed it to 8). But otherwise I have modified the original Austrian schedule to accomodate for the 12 teams playing each other 5 times during the regular season. It turns out that, at least for leagues that aren't split into divisions, you don't actually put in how many games each team has to play. You change the schedule so that it has the correct number of games and then in another part you edit how many times the teams play against each other and the game then allocates the teams to play each other the correct amount of times. I'll post more about this, possibly a tutorial, some time later (probably once I sooner or later get stuck).
It means though that for leagues that are coded in a simple manner, such as Austria, that I could change the league size and schedule to whatever I want! However leagues split up into divisions and leagues such as the RSL, which contracts after the 1st season and where also the schedule is a bit complicated, as well as the Allsvenskan, where in the exe there are actually more games scheduled than played, will probably be much more difficult to edit. But hopefully sometime in the future I will figure these out as well!
Re: Editing league structures & rules using a hex editor / A
Posted: Sun Aug 26, 2012 3:18 pm
by archibalduk
Whilst I think of it, it would be really useful if my League Patch exe file could simply load the AMT file. It would actually be really easy to do this (it is very similar to a csv file). The difficulty I will have (and this is the difficulty I have been having with loading a csv file containing offsets) is that I haven't been able to yet figure out how to use the offsets listed in an external file. Essentially, my attempts so far have truncated/mis-calculated the offsets from the file. If I can figure this out then I can make the League Patch (and the Custom Start Date Patch) compatible with the ArtMoney AMT files.
Hobbit13 wrote:But otherwise I have modified the original Austrian schedule to accomodate for the 12 teams playing each other 5 times during the regular season. It turns out that, at least for leagues that aren't split into divisions, you don't actually put in how many games each team has to play. You change the schedule so that it has the correct number of games and then in another part you edit how many times the teams play against each other and the game then allocates the teams to play each other the correct amount of times. I'll post more about this, possibly a tutorial, some time later (probably once I sooner or later get stuck).
I didn't realise it would be that simple. That really is good news. I had assumed that you would have to write out every and each game that is to take place.
Hobbit13 wrote:I'll post more about this, possibly a tutorial, some time later (probably once I sooner or later get stuck).
Thank you. That would be great.
Hobbit13 wrote:It means though that for leagues that are coded in a simple manner, such as Austria, that I could change the league size and schedule to whatever I want! However leagues split up into divisions and leagues such as the RSL, which contracts after the 1st season and where also the schedule is a bit complicated, as well as the Allsvenskan, where in the exe there are actually more games scheduled than played, will probably be much more difficult to edit. But hopefully sometime in the future I will figure these out as well!
I think it's just a matter of time until you solve it. Even for the conference system, I bet it is just a case of finding the correct settings to change the number of games/teams in each conference/division, etc.
Re: Editing league structures & rules using a hex editor / A
Posted: Tue Aug 28, 2012 8:58 pm
by archibalduk
I have made a start on the new League Patch (I think it should probably be called a Super Patch now!!). I won't have much spare time tomorrow, but I promise I will have it ready and uploaded by Thursday.
If you tell me what teams need to be added/removed from leagues then I can write a simple additional patch so that any database can be made compatible with League Patch. I think it is really important that the Manimal Rosters continue to be designed and set up for the unmodified EHM league structure because it is possible that not everybody will be able to use the League Patch (I know a very small number of users cannot get the CSD Patch to work without also using ArtMoney - and there are also people who have Macs). If I write an additional DB patch then it will allow those users to convert any DB for use with the League Patch.
Re: Editing league structures & rules using a hex editor / A
Posted: Wed Aug 29, 2012 8:47 am
by Alessandro
Me and Marek already call it superpatch

For now we just need to add 4 teams to the Austrian league. Automatic editing could be a problem, because if you take a team from a league, you get a hole, and you need to fill that hole... what do you think
Re: Editing league structures & rules using a hex editor / A
Posted: Wed Aug 29, 2012 9:01 am
by archibalduk
How exactly do we want to modify the DB in order to be compatible with the SuperPatch? If it is simply a case of moving and/or creating teams, I can easily implement this into a patch.
Re: Editing league structures & rules using a hex editor / A
Posted: Wed Aug 29, 2012 8:11 pm
by Alessandro
Would it be possible for you to create a command or smth like that which moves teams between leagues?
Re: Editing league structures & rules using a hex editor / A
Posted: Wed Aug 29, 2012 9:18 pm
by archibalduk
Alessandro wrote:Would it be possible for you to create a command or smth like that which moves teams between leagues?
Yeah, that would be easy to do. Just tell me what teams need to move where and I will do it.
Re: Editing league structures & rules using a hex editor / A
Posted: Thu Aug 30, 2012 9:26 am
by Alessandro
Ok great, let me know when the SP is ready to be published and I'll write a list down
Re: Editing league structures & rules using a hex editor / A
Posted: Thu Aug 30, 2012 11:21 am
by archibalduk
It'll be ready tonight - for testing purposes at least.
Re: Editing league structures & rules using a hex editor / A
Posted: Thu Aug 30, 2012 2:00 pm
by Alessandro
Ok excellent. Then do this:
HDD Olimpija Ljubljana > to Austrian EBEL
EC Dornbirn Bulldogs > to Austrian EBEL
HC Tiroler Wasserkraft Innsbruck > to Austrian EBEL
Orli Znojmo > to Austrian EBEL
HK Partizan Beograd > to Slovenian Elite League
Re: Editing league structures & rules using a hex editor / A
Posted: Thu Aug 30, 2012 8:59 pm
by archibalduk
Here's a first version of the SuperPatch:
http://sdrv.ms/O6NszK
There's an issue with three of the offsets relating to league to 12 teams. Although the patch can read the values at those offsets, it is unable to write to them. I haven't figured out the cause of this yet. There's no reason why it shouldn't work. The only thing that makes those offsets unique is that whereas the others are located at 09xxxxxx, those three are located at 0BBxxxxx. This shouldn't make a difference however. I need to have a further look at this.
I'll get the DB converter done this weekend.
Re: Editing league structures & rules using a hex editor / A
Posted: Thu Aug 30, 2012 10:13 pm
by Alessandro
So this is like the other one? Just a click to apply it? Should we update the db manually?
Re: Editing league structures & rules using a hex editor / A
Posted: Thu Aug 30, 2012 10:32 pm
by archibalduk
Alessandro wrote:So this is like the other one? Just a click to apply it? Should we update the db manually?
Yeah, just load it once you have loaded EHM. You need to load the CSD Patch too if you want the custom start date.
You'll need to update the DB manually for the time being. I'll get the DB patching bit done this weekend. At the moment, this is really just a beta for testing. The final thing will be tidier.
When the patch loads, take a look at the bottom three values listed. When I load it on mine, I get "Error" for those final three values. I've no idea why I can't modify those offsets, but I'll see what I can do.
Re: Editing league structures & rules using a hex editor / A
Posted: Fri Aug 31, 2012 10:45 am
by Alessandro
Nah, it doesn't work. I get a .cpp error during the game creation and the Austrian league shows just 8 teams in the standings. You need to investigate further.
Re: Editing league structures & rules using a hex editor / A
Posted: Fri Aug 31, 2012 11:04 am
by archibalduk
So I take it in that case you get "error" listed for the bottom three offsets listed in the patch window too.
Re: Editing league structures & rules using a hex editor / A
Posted: Fri Aug 31, 2012 12:38 pm
by Hobbit13
The three offsets relating to changing the EBEL league size to 12 are located in the actual .exe file but if you open the game with ArtMoney, the offsets are at 0BBxxxxx. The reason that I couldn't change the offset that the 0BBxxxxx offset links to is because the Slovenian league (also originally with 8 teams) links to the same offset. If that offset would be changed then the game would try to load 12 teams for the Slovenian league as well...
Re: Editing league structures & rules using a hex editor / A
Posted: Fri Aug 31, 2012 1:18 pm
by archibalduk
It's not a problem. I just need to figure out why my patch cannot write new values to the 0BBxxxxx offsets. It can read them okay, but writing is problematic. I'll work on it this weekend.
Re: Editing league structures & rules using a hex editor / A
Posted: Fri Aug 31, 2012 5:36 pm
by fredriklarsson41
Is the swedish allsvenskan changed in the superpatch? So teams 1-3 goes to qualification league and 4-7 playoff?
Re: Editing league structures & rules using a hex editor / A
Posted: Sun Sep 02, 2012 2:58 pm
by archibalduk
I have found the cause of the SuperPatch error. The area where the the 00BBxxxx values are located is read only memory:
Thus I need to figure out how to unprotect that area of memory (ArtMoney must do this automatically when you edit this area of memory). Unfortunately it involves more .NET coding - I hate .NET!!

Re: Editing league structures & rules using a hex editor / A
Posted: Sun Sep 02, 2012 4:00 pm
by archibalduk
Here is version 0.2:
http://sdrv.ms/T9Gspo
I have fixed the issue about the protected memory. The patch unprotects the memory, applies the changes and then protects it again. It seems to work fine now in that it applies the changes, but I don't have time to properly test it today (nor write the DB patcher yet) and so I'm simply releasing as-is.
Please note that you must close ArtMoney whilst you apply the Patch. It seems ArtMoney interferes with my patch in that it prevents it from modifying the memory access. You can re-load ArtMoney once you have run the patch, if you like.
Re: Editing league structures & rules using a hex editor / A
Posted: Sun Sep 02, 2012 7:49 pm
by Lazion
Is it required to run superpatch when loading game?
Also is it possible to change league point system via ArtMoney? I know where this is located in temp files, but it would be cool to get 3 points from game win in Mestis and Suomi Division instead of 2 using this awesome superpatch.
Re: Editing league structures & rules using a hex editor / A
Posted: Sun Sep 02, 2012 8:23 pm
by Hobbit13
You're gonna have to run the superpatch file every time you load up EHM if you want to play with the updated rules. Also your DB has to have 12 teams in the EBEL.
If I remember correctly, then the point system is edited by the same part that changes other league rules for the regular season, like OT and shootout, two-line passes, icing, etc. So if there is another league with similar other league rules then I could change it. But as I said I'm not sure if it actually is edited in that place. I'll probably only have time to check it out in a few weeks time though...