Not enough ratings
How to Teleport with Console
By kaelsidhe
Use the Console to teleport anywhere!
   
Award
Favorite
Favorited
Unfavorite
Introduction
First let me say that before you use the console to teleport, make sure you save your game and are certain you want the shortcut. If you teleport somewhere you are not supposed to be, you can die or the game will crash!

I have completed the game and I can tell you that there IS an in-game way to get everywhere you are supposed to get to. With that said, I typically used this method as a shortcut to keep from having to run across the entire world, or when I knew how to get to a particular location but didn't want to race some stupid timed event.

Lastly, there are plenty of articles on how to enable the console so I'm not covering that here. Just Google LEGEND OF GRIMROCK 2 CONSOLE.
Console Teleport
The console command to move the party to another location in the game is
party:setPosition(a,b,c,d,e)

Parameter a: X Coordinate
Parameter b: Y Coordinate
Parameter c: Facing (0=North, 1=East, 2=South, 3=West)
Parameter d: Elevation
Parameter e: Map ID

Example: party:setPosition(19,28,0,0,31)

This will teleport the party to:
  • X Coordinate=19
  • Y Coordinate=28
  • Facing North=0
  • Elevation=0
  • Map ID=31
which is just outside the prison cage where you first landed on the beach when the game started.
How Do I Know What Coordinates To Use?!?!
So now you know how to teleport but it's useless without knowing how to translate where you want to go into coordinates. You can use 2 more console commands to help you figure this out.

print(party:getPosition())
This command displays four numbers which represent your current
X Coordinate, Y Coordinate, Facing, and MapID


print(party:getElevation())
This command displays one number which represents your current elevation

Using these two commands you can determine the exact coordinates for where you are right now, and from that you can easily extrapolate the coordinates of where you want to go. Admittedly this does mean you have to be close to where you want to go when figuring this out but then you can make a note of the coordinates and teleport to it anytime you want.

Example:

Lets say you are standing at the edge of a river and want to use the console to teleport to the other side. Looking at the river you can see it's 3 steps wide so you want to teleport 4 steps to the other bank of the river.

Use the two commands I just described to determine where you are right now.
print(party:getPosition()) 16 15 1 22 print(party:getElevation()) 0

This tells us we are at X Coordinate 16, Y Coordinate 15, Facing East, on Map ID 22, at elevation 0.

You can now extrapolate where you want to go if you just remember two simple rules:
  • Moving East INCREASES the X Coordinate.
  • Moving South INCREASES the Y Coordinate.

However, if this reminds you too much of geometry class then you can always figure it out the manual way. Just take a step toward or away from your goal and get your coordates again and see which one changed.

So we're standing at the edge of a river and we don't want to get wet so lets take one step in the opposite direction from where we want to go and get our position again.

print(party:getPosition()) 15 15 1 22

Ok so stepping AWAY from where want to go lowers our X Coordinate from 16 to 15. That means if move back to where we were at the edge of the river and INCREASE our X Coordinate by 4, (because we already determined we were 4 steps away) then we will end up on the other side of the river.

party:setPosition(20,15,1,0,22)

Profit!
1 Comments
RIP Bozo Dec 4, 2022 @ 3:30pm 
You can also teleport 1 tile forward (including clipping into tiles you wouldn't normally be able to walk into) with this command:

local dx,dy = getForward(party.facing)
party:setPosition(party.x + dx, party.y + dy, party.facing, party.elevation, party.level)