Can somebody please drop some offsets or tips on where to find the heightmap?
I found 3 sets of map-data i use for pathfinding, but the height-data still eludes me.
Expected to find it close to the other map-arrays, maybe i just can't see the bytes for all the bits.
Need the height to properly get Z-position for worldToScreen so i can place movement-clicks
correctly.
Image of one of the map-arrays (sadly no heights, mapData2 below):
Some offsets i got (3.0.1smth):
{"baseMgr": ["base"]},
{"frameBase": ["baseMgr","0x04","0xFC","0x1C"]},
{"mapBase": ["frameBase"],"startOffset":"0x140"},
{"mapStart0": ["mapBase"],"startOffset":"0x29C"},
{"mapEnd0": ["mapBase"],"startOffset":"0x2A0"},
{"mapStart1": ["mapBase"],"startOffset":"0x2A8"},
{"mapEnd1": ["mapBase"],"startOffset":"0x2AC"},
{"mapStart2": ["mapBase"],"startOffset":"0x318"},
{"mapEnd2": ["mapBase"],"startOffset":"0x31C"},oh, and i am using the 32bit global non-steam version.["mapWidth","UINT","mapBase","0x2B4"],
["mapOther0","UINT","mapBase","0x2B8"],
["mapOther1","UINT","mapBase","0x2BC"],
["mapOther2","UINT","mapBase","0x2C0"],
["mapOther3","UINT","mapBase","0x2C4q"],
["mapData0","DATA","mapStart0","0x0","mapEnd0"],
["mapData1","DATA","mapStart1","0x0","mapEnd1"],
["mapWidth2","UINT","mapBase","0x310"],
["mapData2","DATA","mapStart2","0x0","mapEnd2"],
and these have nothing to do with my question, but someone playing around like me might find them interesting:
void WorldItemComponent::read(MemoryReader & r) {
//WorldItem contains Entity
Address p = r.djump({address+0x14});
itemEntityPtr = std::make_shared <Entity >(0,p);
itemEntityPtr->parseEntity(r);
itemEntityPtr->parseComponents(r);
}
void ChestComponent::read(MemoryReader & r) {
opened = r.dread<unsigned char>(address+0x20);
}
void RenderComponent::read(MemoryReader & r) {
x = r.dread<float>(address+0x3;
y = r.dread<float>(address+0x3C);
z = r.dread<float>(address+0x40);
}
void LifeComponent::read(MemoryReader & r) {
healthMax = r.dread<unsigned int>(address+0x2C);
healthCurrent = r.dread<unsigned int>(address+0x30);
// this also contains buffs!
}
void PositionComponent::read(MemoryReader & r) {
x = r.dread<float>(address+0x1C);
y = r.dread<float>(address+0x20);
z = r.dread<int>(address+0x2C); //height?
gx = r.dread<int>(address+0x10);
gy = r.dread<int>(address+0x14);
}