01-29-2018, 08:09 AM
(This post was last modified: 01-29-2018, 09:36 AM by TheKillerVortex.)
(01-29-2018, 07:54 AM)Sir Krist Wrote: Define sort of data?
What are you looking for?
Anything and everything!
Right now: I am looking into how maps are generated. Including player position.
EG: When you join a new game.
It seems I was actually right on the spot. I ended up toggling the hack that shows the answer (I was 9 offsets away).
The function entry (my break-point / comment):
Code:
00440A05 | 53 | push ebx | Spawn location (join-game only?)
My variable break-point:
Code:
00440A7B | C6 80 87 65 68 00 01 | mov byte ptr ds:[eax+0x686587],0x1 | Flag to force displaying "Player XXXX joined?"
The actual answer was here:
Code:
00440A30 | 8B 0C 85 F8 0E 4A 00 | mov ecx,dword ptr ds:[eax*4+0x4A0EF8] | Player X (spawn location)
00440A37 | 8B 14 85 1C 0F 4A 00 | mov edx,dword ptr ds:[eax*4+0x4A0F1C] | Player Y (spawn location)
EDIT: To add just a smidge more of information:
The town's dimensions are: [00, 00] to [5F, 5F].
This flips the negative value to a positive (from: xFFFFFFD9 for example).
Code:
00440A44 | 83 C1 4B | add ecx,0x4B |
00440A47 | 83 C2 44 | add edx,0x44 |
Code:
00440A30 | B9 D9 FF FF FF | mov ecx,0xFFFFFFD9 | Player X (spawn location)
00440A35 | 90 | nop |
00440A36 | 90 | nop |
00440A37 | BA D2 FF FF FF | mov edx,0xFFFFFFD2 | Player Y (spawn location)
00440A3C | 90 | nop |
00440A3D | 90 | nop |
This will spawn you on the graveyard (on the tombstone that fell over).
I cannot seem to find what causes the X/Y to lap over, so I can calculate where you will spawn on the map.
Looks like I'll have to dig into the program deeper.
![Smile Smile](https://www.lurkerlounge.com/forums/images/smilies/smile.gif)
You can explicitly set ECX / EDX to the exact desired position (range: B5, BC is the 'far upper left corner').
I do not have a copy of the technical manual that Zamal had on the forums.
To clarify: I do not have any particular set objective. I am just enjoying myself, learning how to reverse engineer games / programs again (since I have some free time right now).
I figured I could compile a more comprehensive and up-to-date list for Diablo, for all the old fans (like myself!).
There are many bugs listed in this site and I am sure the majority of them could be patched unofficially.
You could also add items (I can build utilities easily, given I have some data to work with).
I noticed there were a lot of unused spells (audio / graphics) that function just fine on Diablo v1.09.
Even with the game hacks: A lot of the spells and potential options were never used.
In fact: There's a "Golem" you can spawn (they are all attached internally to the same AI mechanism, acting as a 'singular' unit). It charges like an Elemental, then roams freely like a typical Golem (there is no quantity delimiter).
Fixing that (or modifying it even) would be very small.