Page 1 of 1

The NHL 50 Contracts/80 Rights rule.

Posted: Wed Dec 18, 2013 6:33 pm
by Primis
After hacking the .exe directly to make my global NHL thing with laregly-domestic rosters a while back, I went in the other night and simply removed the vet rule from the AHL so I could do a game there. It has been fun, especially with a lowered Salary Cap that cuts a few more guys free.

The one thing I've never found though is how to modify/remove the 50 Contracts/80 Rights rule for the NHL. I've always wanted to try a game where I could do 60/80 or something and run two different AHL affiliates (with no ECHL affiliates), and I've also often wondered what effect having more contracts might have on the "AA" (ECHL/CHL) levels in terms of affiliates supplying players.

Does anyone have knowledge or where or what this is set in hex?

Re: The NHL 50 Contracts/80 Rights rule.

Posted: Sat Dec 21, 2013 4:05 pm
by archibalduk
I'm not sure about how to do it by hacking the exe directly. However, there is a post by me somewhere which lists various rules that can be edited using ArtMoney.

Re: The NHL 50 Contracts/80 Rights rule.

Posted: Wed Apr 23, 2014 3:08 pm
by Leafsdude
Where can I get this ArtMoney program? :help:

The 50 contracted rule really annoys me. I don't even really mind the 80 right rule (though it really would be much nicer if it was 100), but I really like signing everyone I can, and not being able to ruins my gameplay experience, personally. Plus, I can't fill my AHL team with a full prospect roster. ](*,)

Edit: Found the ArtMoney Program. =D>

Re: The NHL 50 Contracts/80 Rights rule.

Posted: Tue Apr 29, 2014 5:10 am
by Leafsdude
Alright, I've managed to find this...sort of...bear with me a moment.

Let me first note that I've used the tutorials from the hex/art money threads, particularly the memory editor switcheroo thing archi noted and the HxD method of finding things on the exe in the first place.

Here's where things get interesting. It appears that the 50/80 rules are not hardcoded into the exe. Or, at least, that's my best guess because its memory location is variable in the memory editor and therefore impossible to find via HxD.

It, thankfully, is still generally easy to find, at least for the NHL, via art money. Just do a sequence search for 50/80 and edit all the 1-byte integers that appear before the first 2-byte integers to whatever you want and that seems to almost always work. This, of course, is completely useless for leagues with only rights limits like the CHL where sequence searches are impossible. 8-[

Be careful that you don't edit a 2-byte integer, though, as that will cause a crash. As well, trying to save the game with the roster limits changed will cause a crash before it gets to the save box.

Re: The NHL 50 Contracts/80 Rights rule.

Posted: Tue Apr 29, 2014 9:14 pm
by archibalduk
Leafsdude wrote:Here's where things get interesting. It appears that the 50/80 rules are not hardcoded into the exe. Or, at least, that's my best guess because its memory location is variable in the memory editor and therefore impossible to find via HxD.
It will be hardcoded. It's just that it's not as simple as searching for "50" or "80" in the exe because it'll be encoded/compressed somehow.

Can you tell me at which offsets you found the settings in ArtMoney? This should help me identify it within the exe. If you're not sure about what offsets they are, just post a screenshot of your ArtMoney window and I should be able to figure it out from that.

Re: The NHL 50 Contracts/80 Rights rule.

Posted: Tue Apr 29, 2014 11:04 pm
by Leafsdude
I assume this is what you're looking for?

Image

32 is the contracts and 50 is for rights.

Let me know if you were asking for something else. :grin:

Re: The NHL 50 Contracts/80 Rights rule.

Posted: Wed Apr 30, 2014 8:05 pm
by archibalduk
That's exactly what I needed. Thank you!

It'll be interesting to see if there are any mentions of 48 CD 2F 03 (or thereabouts) in the game exe.

Re: The NHL 50 Contracts/80 Rights rule.

Posted: Wed Apr 30, 2014 9:50 pm
by Leafsdude
archibalduk wrote:That's exactly what I needed. Thank you!

It'll be interesting to see if there are any mentions of 48 CD 2F 03 (or thereabouts) in the game exe.
Almost certain there won't be as, just like I mentioned above, it varies every time I reload the exe. That just happens to be the sequence I had yesterday when I took the screenshot. :grin:

What I wonder is if there's any 00 32 50 XX mentions in the exe. I suppose there's probably not, but it's probably as good a bet as any. :nod:

I've looked through the nhl_rules.cpp section via HxD as well, but found nothing that was obviously about the contract rules, though there was a decent number of mentions for "32", but unless all the different league limits are listed under the NHL section (the Junior CHL and most likely most of the European leagues have a limit of 50), that's probably just a coincidence. I think I also need to note that I didn't pay attention to the pointers when looking at each offset, so I might have missed something obvious when looking through it.

Re: The NHL 50 Contracts/80 Rights rule.

Posted: Wed Apr 30, 2014 10:21 pm
by archibalduk
Leafsdude wrote:Almost certain there won't be as, just like I mentioned above, it varies every time I reload the exe. That just happens to be the sequence I had yesterday when I took the screenshot. :grin:
How significantly does the offset (aka location/address) change each time? Have you tested that your rule change definitely works?
Leafsdude wrote:What I wonder is if there's any 00 32 50 XX mentions in the exe. I suppose there's probably not, but it's probably as good a bet as any. :nod:
I'm afraid it's not that simple. The hex code in the exe tends to refer to offsets rather than raw figures (typically the hex corresponds to offsets in the RAM/ArtMoney). This is why it is so challenging editing league rules and structures.

Re: The NHL 50 Contracts/80 Rights rule.

Posted: Thu May 01, 2014 3:59 am
by Leafsdude
archibalduk wrote:How significantly does the offset (aka location/address) change each time?
Not sure. I started recording all the numbers hoping that there'd be some sort of pattern, but I didn't notice one right away, so I figured it was useless.

If no one's figured it out by then, I'll try and put together a set of offsets and look for patterns when I have some free time over the weekend, unless someone else here does beforehand.
archibalduk wrote:Have you tested that your rule change definitely works?
Absolutely. Here's a before and after I just took:

Image
Image

For the record, the offset this time was 0412CCD8 and 0412CCD9.
archibalduk wrote:I'm afraid it's not that simple. The hex code in the exe tends to refer to offsets rather than raw figures (typically the hex corresponds to offsets in the RAM/ArtMoney). This is why it is so challenging editing league rules and structures.
Yeah, I figured.

Re: The NHL 50 Contracts/80 Rights rule.

Posted: Thu May 01, 2014 4:20 am
by Primis
I want to believe.

Re: The NHL 50 Contracts/80 Rights rule.

Posted: Thu May 01, 2014 4:46 am
by Leafsdude
Here's an interesting factoid I just noticed: on this load of the game, after the obvious 32/50 numbers and a bunch of 00s, the next 40 entries are different...but then the next 24 are the same.

Here's the values for the two for those entries:

First:
32 50 00 00 00 00 00 00 01 FF C9 9A 3B 00 8F 6E 02 61 79 65 72 73 2E 00 FC B6 C4 5C 9D 3A 00 8F 64 19 BB 00 40 AC E5 06 02 01 7E 27 AF 07 97 04 AC 07 01 59 59 59 59 59 59 59 01 00 FF FF FF FF 00 00 00 00 00 00 00 00 00

Second:
32 50 00 00 00 00 00 00 01 80 D1 F0 08 80 F0 FA 02 E7 13 E0 10 E4 E6 64 C5 AA 40 1F 43 43 00 8F 64 19 BB 00 F8 3E A8 04 02 01 65 62 D4 07 1E 24 D1
07 01 59 59 59 59 59 59 59 01 00 FF FF FF FF 00 00 00 00 00 00 00 00 00

There's another area near the bottom of the screenshot that matches with similar entries (59s and FFs followed by a bunch of 00s). I assume this is some sort of [end] type command in the coding, but it might still be of some use somehow.

ETA: this is interesting further. I did another load for fun and the second sequence of numbers was loaded exactly the same as the one before it. Also interesting is that I can now predict which offsets are the ones used for this rule, though I'm not exactly sure how. Here's the sets I've seen:

03F2CD48 and 03F2CD49
0412CCD8 and 0412CCD9
03F2CCD8 and 03F2CCD9

The constants are the 2C in the middle (XXX2CXXX) and there's a D in there somewhere each time, too, and the final number is always 8 and 9. The rest seems random, but somewhat close together (03F is 1 lower than 041 in hex, and the 7th entry is a pair of Cs and an D).

Once again, this will probably need more data points to show better, but it seems there is some level of predictability here.

This'll be my last post for the night. Hopefully someone can figure it out between now and the weekend so I don't have to waste any more time going through this stuff. :-D

Re: The NHL 50 Contracts/80 Rights rule.

Posted: Sun May 04, 2014 2:12 pm
by Leafsdude
Alright, I did some more tests today, and the results are quite interesting. :nod:

It started off being kind of worrisome because I was getting crazy variants of offsets with locales like 06E39B40/06E39B41, which is nowhere near the results I'd gotten that I've posted here. Then I realized that I'd be doing a tonne of rubbish on the computer since the last reboot. Of course, I didn't want to have to restart after each load, so I found out how to clear the memory cache, and then things got better.

Much better, in fact. Here are the first two results after I cleared the cache:

0408CCA0
0408CCA1

03FACD10
03FACD11

Both fit really close to the sets I've gotten so far.

And then I realized I'd been clearing the cache with a program that didn't have administrative rights. So I told it to run as administrator and here's the results I got:

03EFCD10
03EFCD11

03FACD10
03FACD11

Look at that again. The second one. They're the same! :grin: :joy: :grin: :joy: :grin: :joy: :grin: :joy: :grin: :joy:

Now, I'm not sure if that's the location in the exe, of if it was just luck of the draw, but it's pretty darn awesome that I got a match at all.

Of course, the real issue is trying to figure out where these offsets are in the exe in the first place. It still doesn't look like they're located in the x_rules.cpp section, but I really wasn't looking for anything beyond a 32/50 pair. Maybe with a more precise location that could still be where it is.

Re: The NHL 50 Contracts/80 Rights rule.

Posted: Sun May 04, 2014 8:49 pm
by Leafsdude
Alright. I like to think of myself as not a quitter, but...Well, I'm a quitter.

I've spent about 5 hours trying to find this with the latest info I've found, and I'm still no closer to it.

The best that I can figure is that it is loaded when each file is loaded, but it is still within the exe file, so it must load as part of the season load process. I've also figured it's within the last 1/10th of the load process, but the exact where and how requires more patience than I'm lucky to be equipped with.

So, I hope the info I've figured out leads to someone else figuring it out (and if you do, please let me know :grin:), but it's not gonna be me.

At the very least, if you're playing an NHL league, it's relatively easy to find and fix in ArtMoney, but good luck finding it in any other league, and since it's picked up when the game loads and not from the load file, it changes back every time to reload it.