Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
#353114 13/06/08 01:45 AM
Joined: Aug 2007
D
dvdljns Offline OP
apprentice
OP Offline
apprentice
D
Joined: Aug 2007
Ok! This is what I am looking at.
004A:7CA0 "offset of first line"?
20 73 61 76 65 00 11 00 00 00 53 74 61 72 74 20
41 67 65 6E 74 20 53 61 76 65 00 00 00 00 00 02
00 00 00 20 1C 00 00 60 78 00 00 D0 CB 00 00 00


The A in save is in red. The 60 is below it and if I understand right I need to change D0. But to what? In decimal it is 0010 I think.

What am I doing wrong.

Joined: Mar 2003
Location: Canada
Support
Offline
Support
Joined: Mar 2003
Location: Canada

Based on your earlier post I assume you are trying to get a character across the counter in the armoury. If your hero or DK is standing close to the counter, then they just need to move north a bit, which means you have to decrease the y value of the coordinates. Changing the second coordinate value by 1 will move your character about 2 and a half times their height, so you are correct that you need to change the first value for smaller jumps.

As for what to change it to, you can make an educated guess and try it out. D0 converted to decimal is 208. The full range of the first y coordinate (FF hex / 255 decimal) moves the character 2.5 times their height, so about half that should get you over the counter. The current value D0 = 208; subtracting 128 gives 80 decimal, which is 50 hex.

The calculator program that comes with Windows can convert between decimal and hex values, after you switch it to scientific mode (could be called advanced mode, or something else in XP or Vista, if Vista includes one).

Now you can make that change, load the game, and see if your character can move around behind the counter, or if you need to tweak the value a bit to get it right. However, I listed some coordinates for behind the counter farther down in the hex teleport topic (almost at the end), where I had '46 CB' for the y coordinate.

41 67 65 6E 74 20 53 61 76 65 00 00 00 00 00 02
00 00 00 20 1C 00 00 60 78 00 00 46 CB 00 00 00

I was at a slightly different x value, but you should be fine just changing the y value to move north.


To get the character out from behind the counter, you can have your other character go up or down some stairs, or enter the BF and then exit.

Joined: Aug 2007
D
dvdljns Offline OP
apprentice
OP Offline
apprentice
D
Joined: Aug 2007
Ok I read the teleport link real carefully and finaly got it right. I am gready I took everything.
I was having the same problam I have when I try to understand linix programers. Do peaple like me a favor and put this sentence into the post. You have to change the hex in two places. otherwise we do not understand that. Thanks for the help. I would have never got it on my own. Some times if you get real bored maybe we can discuss this further. who knows maybe I can even learn to hex files without someone telling me how. thanks again I really hate to leave loot behind.

Joined: Mar 2003
Location: Canada
Support
Offline
Support
Joined: Mar 2003
Location: Canada

Just editing the first instance of the coordinates should be good enough as long as you do not end up caught in a wall or rock, etc. If the game has a problem trying to move the character it will switch to the second set of coordinates. Editing both sets of coordinates may be a little more reliable, though.

The forum isn't very busy. If you have any hex editing questions, fire away.
Speaking of learning how to hex edit, someone who had a question about editing skill points asked me in a PM how I figured that stuff out; I'll quote my reply below, as it may be somewhat instructive.

--

In a save game I would distribute a skill or stat point and then save again right away. As long as the file sizes in the two saves are the same, it is easy to do a binary comparison and get a reasonable list of changes. If the data file changes size, it is easier to start over. For example, if I have 9 free stat points and distribute 2 points before saving, then distribute another 2 and save, I would end up with 3 data files. There would be one set of differences comparing the first and second file, and another comparing the second and third. Comparing the two lists of differences, I would look for the same hex offset that changed both times. In this case it is made easier because you can see one of the differences go from 9 to 7, and then from 7 to 5. Once you have the potential target offset, you open the file in a hex editor and jump there, then make a change and try loading the save to see if the corresponding value changes in game. By experimenting you can determine what the limits are from there. You simply scroll up or down to look for potential reference points, and experiment in several different saves to test.

For experience points the process was easier. I had already determined that stat and skill points are listed in the data file in reverse byte order, so I simply picked whatever my latest save was at the time, checked the experience points, converted it to hex, reversed the bytes and searched for that series. It only showed up twice, once for each character.

Character locations were more difficult to determine (though they wouldn't have been if I had assumed they were similar to DD and started from there).
Anyway, starting from scratch I simply saved the game, waited awhile without moving (to let other stuff change) and then saved the game again. After moving the character I saved, waited and saved again. Comparing the first 2 saves, the position was the same, so I got a list of all the bytes that were the same (and again for the second pair of saves). Comparing the lists from the first and second pairs of saves, I then looked for differences, which would eliminate stuff that is always the same or which would not change in this case.
At least that is the theory. I missed the hero's location this way, but got part of the DK's position, and simply by looking at that spot could figure out the rest. Entering and exiting the BF puts the two characters together, so it was easy to then find the hero's position.

Once you know where some stuff is and you play around, you have a better idea of where other stuff might be. A program that extracts text from binary files can help give you an idea of the file structure.


Moderated by  Larian_QA, Lynn, Macbeth 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5