From c717eba29ab8d3d014719aa1e3409365bbf69adc Mon Sep 17 00:00:00 2001 From: Lily Date: Wed, 18 Dec 2024 17:10:15 -0600 Subject: [PATCH 1/2] Fix Teleport to Map-Relative Coordinates for Shadow of the Erdtree. --- .../Teleport to Map-Relative Coordinates/.cea | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CheatTable/CheatEntries/Open - The Grand Archives - Elden Ring/Coordinates & Teleport/Teleport to Map-Relative Coordinates/.cea b/CheatTable/CheatEntries/Open - The Grand Archives - Elden Ring/Coordinates & Teleport/Teleport to Map-Relative Coordinates/.cea index 008d2345e..3da4b04b8 100644 --- a/CheatTable/CheatEntries/Open - The Grand Archives - Elden Ring/Coordinates & Teleport/Teleport to Map-Relative Coordinates/.cea +++ b/CheatTable/CheatEntries/Open - The Grand Archives - Elden Ring/Coordinates & Teleport/Teleport to Map-Relative Coordinates/.cea @@ -61,7 +61,7 @@ end function getAbsoluteCoords(mapRelPos) local minfo = getMapInfo(mapRelPos.map) -- 3C = open world map, divided in 256x256 chunks. - if (minfo.id == 0x3C) then + if (minfo.id == 0x3C or minfo.id == 0x3D) then return { x = mapRelPos.x + 256 * minfo.gridXNo, y = mapRelPos.y, @@ -73,7 +73,8 @@ function getAbsoluteCoords(mapRelPos) for id, addr in pairs(worldMapLegacyConv) do local mapConv = readWorldMapLegacyConvParam(addr) if (mapConv.srcAreaNo == minfo.id and - mapConv.dstAreaNo == 0x3C and + mapConv.dstAreaNo == 0x3C or + mapConv.dstAreaNo == 0x3D and mapConv.srcGridXNo == minfo.gridXNo and -- These aren't really grid coords, more like dungeon number for the same type mapConv.srcGridZNo == minfo.gridZNo) then -- Perform conversion to open world coords by rebasing to open world map origin @@ -124,4 +125,4 @@ registersymbol(TargetCoords) autoAssemble([[ dealloc(TargetCoords) unregistersymbol(TargetCoords) -]]) +]]) \ No newline at end of file From 2ec4e5bc9e14aafb87c5ba98b11ada8c7f585f10 Mon Sep 17 00:00:00 2001 From: Lily Date: Sun, 22 Dec 2024 15:11:35 -0600 Subject: [PATCH 2/2] Group the dstAreaNo check so it won't short-circuit without evaulating --- .../Teleport to Map-Relative Coordinates/.cea | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CheatTable/CheatEntries/Open - The Grand Archives - Elden Ring/Coordinates & Teleport/Teleport to Map-Relative Coordinates/.cea b/CheatTable/CheatEntries/Open - The Grand Archives - Elden Ring/Coordinates & Teleport/Teleport to Map-Relative Coordinates/.cea index 3da4b04b8..a1a4af7ac 100644 --- a/CheatTable/CheatEntries/Open - The Grand Archives - Elden Ring/Coordinates & Teleport/Teleport to Map-Relative Coordinates/.cea +++ b/CheatTable/CheatEntries/Open - The Grand Archives - Elden Ring/Coordinates & Teleport/Teleport to Map-Relative Coordinates/.cea @@ -73,8 +73,7 @@ function getAbsoluteCoords(mapRelPos) for id, addr in pairs(worldMapLegacyConv) do local mapConv = readWorldMapLegacyConvParam(addr) if (mapConv.srcAreaNo == minfo.id and - mapConv.dstAreaNo == 0x3C or - mapConv.dstAreaNo == 0x3D and + (mapConv.dstAreaNo == 0x3C or mapConv.dstAreaNo == 0x3D) and mapConv.srcGridXNo == minfo.gridXNo and -- These aren't really grid coords, more like dungeon number for the same type mapConv.srcGridZNo == minfo.gridZNo) then -- Perform conversion to open world coords by rebasing to open world map origin