Increasing Proto Ranges - is this right?

Discussion in 'Modding and Scripting Support' started by The Pigeon, May 29, 2012.

Remove all ads!
Support Terra-Arcanum:

GOG.com

PayPal - The safer, easier way to pay online!
  1. The Pigeon

    The Pigeon Member

    Messages:
    305
    Likes Received:
    5
    Joined:
    Nov 28, 2007
    Before I go making any hex changes that might destroy space-time, I would like to know how much of this I have right. I want to increase ranges so I can add a critter to the monster table.

    The monster range is 28310-28472 and the hex offsets are 1B3848, 1B3898 (Arcanum.exe 1.0.7.4), 178184, 1781D4 (WorldEd.exe 1.0.6.9). To read the new entries in the critter tables 9B3A8, 9B3B4 (Arcanum) and 50C28, 50C34 (World Ed) must also be increased.

    I'm using the UAP so I don't know if that affects the ranges, but assuming it doesn't, these are the hex values I'm interested in. Presumably the first number in each offset pair is the lower boundary of the range, while the other is the upper boundary. That means in Arcanum.exe I want to increase the hex values at 1B3898 and 9B3B4. In world ed I would want 1781D4 and 50C34. For the offset 1B3898 the line looks like this;

    Offset----- 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
    001B3890 98 65 00 00 02 6B 00 00 38 6F 00 00 00 00 00 00

    The number should be 28472. However when I convert the hex to decimal it doesn't come close. I did the following:

    Num = 3x4096 + 8x256 + 6x16 + 1x15
    = 12288 + 2048 + 96 + 15
    = 14447 != 28472

    I'm obviously missing something, but my knowledge of hex files and Arcanum at this low level is highly limited so I'm not sure what the logical thing to do is.
     
  2. Drog Alt

    Drog Alt Member

    Messages:
    593
    Likes Received:
    19
    Joined:
    Jun 30, 2010
    The numbers are reversed (little endian). That is, 0x386F = 0x6F38 = 28472.
     
  3. The Pigeon

    The Pigeon Member

    Messages:
    305
    Likes Received:
    5
    Joined:
    Nov 28, 2007
    Thanks very much! Would never have thought to reverse them. Doing it that way now, the values of the offsets to change are as follows:

    ---Without Making changes:

    Arcanum.exe
    Offset 1B3898 = 386F = 0x6F38 = 28472 (Maximum Monster limit)
    Offset 9B354 = FF74 = 0x74FF = 29951 (Additional value)

    WorldEd.exe
    Offset 1781D4 = 6365 = 0x6563 = 25955
    Offset 50BD4 = 0000 = 0x0000 = 0 (Additional value)

    ---Increasing all by 1

    Arcanum.exe
    Offset 1B3898 = 396F
    Offset 9B354 = 0075

    WorldEd.exe
    Offset 1781D4 = 6465
    Offset 50BD4 = 0100


    One last question before I go make the changes;

    Are the values at 9B354, 1781D4, 50BD4 supposed to be different from 1B3898? I assumed at least that WorldEd 1781D4 was its store of the value 28472, but it appears different. It could be that world ed uses different range values (min and max reduced by some amount) but I'm just guessing.
     
  4. Drog Alt

    Drog Alt Member

    Messages:
    593
    Likes Received:
    19
    Joined:
    Jun 30, 2010
    Are you using WorldEd 1.0.6.9? The one included with the UAP?
     
  5. The Pigeon

    The Pigeon Member

    Messages:
    305
    Likes Received:
    5
    Joined:
    Nov 28, 2007
    Maybe that's it. I do have the UAP installed and have the old interface, but I got the old version of WorldEd from the forums since my version was the latest (Arcanum->1074->UAP->Level Cap Remover->High Res->Get old world ed from forums).

    I think I'll reinstall but this time make a back up copy of my WorldEd before I add the 1074 so I can patch it using UAP.
     
  6. Drog Alt

    Drog Alt Member

    Messages:
    593
    Likes Received:
    19
    Joined:
    Jun 30, 2010
    The UAP is already using the 1.0.6.9 (old) version of WorldEd (since the final official one is completely useless), no need to download any other versions. More than that, the UAP fixes many bugs and annoyances in WorldEd.

    If you still don't get it (you seem to be a slow one, so I'll go over it one more time). The UAP replaces the 1.0.7.4 WordlEd with the 1.0.6.9 one (with custom fixes). Don't replace it with the one from the web (or any other one for that matter), as it will remove the UAP specific changes and fixes.
     
  7. Jojobobo

    Jojobobo Well-Known Member

    Messages:
    3,029
    Likes Received:
    122
    Joined:
    May 29, 2011
    Flattering as ever.
     
  8. The Pigeon

    The Pigeon Member

    Messages:
    305
    Likes Received:
    5
    Joined:
    Nov 28, 2007
    @Drog

    All the hex locations now show 386F which is most nifty! Time to make the changes.

    @Jojobobo

    Flattering indeed :p



    Edit:

    @Drog

    Ok I have good news and confusing news.

    THE GOOD NEWS:

    The fearsome monster, "CustomDude" in his giant spectral armor and with his spectral sword gave battle to the unassuming Tumblebrook in the land of Amtut, brutally slaying him without mercy.

    The confusing news:

    How I got it to work basically. I was thinking about how you said the UAP does it all and it should all work fine and stuff and came to a decision. I would do a complete clean reinstall of Arcanum. I would patch it from the ground up, making sure all the UAP features were enabled, the hex locations modified, the description in place and the creature table updated.

    See the thing is, the WorldEd I opened had the later version's interface. And none of the patch enabled creatures - nor mine - appeared. I remembered I had this problem before when I asked about the mechanical creatures and decided to replace the WorldEd with the one I got from the net (Which was an old version of world ed).

    All the patch enabled creatures appeared - my creature appeared too - and it all worked fine in game.

    Why does this happen? I followed all the instructions to the letter and the WorldEd after the UAP was applied was still the new world ed, only all the hex locations were now right. The download only included the installer exe file and there was no WorldEd.exe anywhere other than then main Arcanum directory.
     
Our Host!