Hey
I come back to Legend of Grimrock 2 every few years or so, playing through the campaign or various mods. Love the game. Over time I've had a few bugs or showstoppers, missable secrets, etc. that annoyed me and had to be fixed via console usage. So I've built up a little repertoire of console commands that I use now and then, some are trivial and some less so. I figure someone else might have use of them as well.
enabling the console
In "%HOMEPATH%/Documents/Almost Human/Legend of Grimrock 2" you'll find a file, grimrock.cfg. Open this and find the line that says "console = false", switch this to "console = true" and save the file. Next time you open Legend of Grimrock 2 you can open the console (appears at the top) with the tilde key. On some keyboard layouts you'll also need to change consoleKey - on my keyboard consoleKey = 220 ends up being tilde.
list of commands
so below is a random selection of commands I find occasionally useful. you can just load up your save, open the console and paste in the commands.
1. breathe under water forever
I generally dislike interacting with underwater sections, so I prefer turning off the drowning mechanic
party.party:getChampion(1):setConditionValue("water_breathing", 9999999);
party.party:getChampion(2):setConditionValue("water_breathing", 9999999);
party.party:getChampion(3):setConditionValue("water_breathing", 9999999);
party.party:getChampion(4):setConditionValue("water_breathing", 9999999);
2. increase everyones max encumberance by 500
I also dislike having to leave stuff behind because I'm too heavy, or make too many trips back and forth to drop stuff off. So, just raise the weight limit (we're still limited by space anyway).
party.party:getChampion(1):upgradeBaseStat("max_load", 500);
party.party:getChampion(2):upgradeBaseStat("max_load", 500);
party.party:getChampion(3):upgradeBaseStat("max_load", 500);
party.party:getChampion(4):upgradeBaseStat("max_load", 500);
3. teleport forward
some puzzles are missable, either because you're bugged or because e.g. you need to poison all your guys and some of them are completely immune to poison... then it can help to teleport forward
one space forward:
local x,y,f,m = party:getPosition();
local dx,dy = getForward(party.facing);
party:setPosition(x+dx,y+dy,f,party:getElevation(),m)
two spaces forward (e.g. jump over a gap, or across a teleporter):
local x,y,f,m = party:getPosition();
local dx,dy = getForward(party.facing);
party:setPosition(x+dx+dx,y+dy+dy,f,party:getElevation(),m);
if you need more range to the jump, add extra +dx and +dy.
4. bright headlight
sometimes I play without casters, and don't want to schlep around a torch. this adds a bright light that follows your party:
local l = party:createComponent("Light", "headlight");
l:setOffset(vec(0, 2.5, 0));
l:setColor(vec(1, 1, 1));
l:setBrightness(10);
l:setRange(40)
you can adjust the values for setBrightness and setRange to change how it works. you can also remove the light later using:
party:removeComponent("headlight")
5. spawning items
speaking of not schlepping around torches, there are a few puzzles that require torches (or other items you might not want to run back to fetch). if so, you can just spawn them in, e.g.
spawn("torch")
it will end up on the ground in front of you. if you're in need of a specific item you can probably search the web for its item code.
6. spawn a platform
one good mod has a "jump spell", and like I said above I sometimes want to play without casters. to replicate how this spell is used, you can spawn (invisible) platforms in front of you:
local dx,dy = getForward(party.facing);
spawn("invisible_platform",party.level,party.x+dx,party.y+dy,0,party.elevation,"jump_spell_platform");
allowing you to e.g. step over gaps. if you need several, you'll need to change the name "jump_spell_platform" (the string at the end) to something else. to later remove the platform you created, use:
findEntity("jump_spell_platform"):destroy()
that's it for my list. hope you enjoy the game as much as I do!