Extracting and enabling the console
Posted: Sat Apr 21, 2012 6:56 pm
Edit by petri:
To enable the console all you have to do is to change/add the following lines to the config file at Documents/Almost Human/Legend of Grimrock/grimrock.cfg:
console = true
consoleKey = 192 --uses tilde as console key
-----------------------
As we've been nicely asked not to distribute the modified console.lua, but some people have been having trouble with the extraction and editing process:
I've taken the liberty of modifying the Python extractor someone posted here to do the following:
1. Extract Console.lua, and no other file.
2. Modify the console height from 10 lines to 42.
3. Modify the two instances of .developer. to .muteMusic., so an existing setting lets you toggle the console's availability.
4. Change the activation character to '~', since my keyboard doesn't have the one it originally had.
5. Remove the references to psyco, because it's unsupported and doesn't work with recentish Python.
http://www.seebs.net/tmp/grimrock_console.py
I've tested this very lightly, but it's offered without warranty. And most importantly, don't hassle the devs about issues with this; they are being pretty tolerant of our mucking about. To use this:
1. Make sure you have Python. I used the Python 2.7 from http://www.python.org.
2. Copy this file to your LoG game directory (the one containing grimrock.exe, NOT your save directory).
3. Open a shell in your LoG game directory.
4. Run the script. If you're clever and have mingw, this looks like /c/python27/python foo.py. If you are foolish and use the horrible, lame, Windows shell, this loooks like C:\Python27\python foo.py.
If you see:
found Console.lua
Modifying file...
and get your prompt back, you're set. Next time you start LoG, ~ should open the console.
And here's some handy stuff:
http://www.seebs.net/tmp/debug.lua
To use this:
1. Copy it to the LoG directory (again, the one containing grimrock.exe).
2. At the console, dofile('debug.lua')
It's not really documented, but for a quick starting point:
$ p = d.partymembers()
$ d.dump(p, 1)
$ d.bump_level(1)
$ d.bump_stat(1, 'strength', 99)
Go wild. Be aware that the console persists between game sessions, and if you keep references to old objects or mobs around, bad stuff can happen. So don't do that!
To enable the console all you have to do is to change/add the following lines to the config file at Documents/Almost Human/Legend of Grimrock/grimrock.cfg:
console = true
consoleKey = 192 --uses tilde as console key
-----------------------
As we've been nicely asked not to distribute the modified console.lua, but some people have been having trouble with the extraction and editing process:
I've taken the liberty of modifying the Python extractor someone posted here to do the following:
1. Extract Console.lua, and no other file.
2. Modify the console height from 10 lines to 42.
3. Modify the two instances of .developer. to .muteMusic., so an existing setting lets you toggle the console's availability.
4. Change the activation character to '~', since my keyboard doesn't have the one it originally had.
5. Remove the references to psyco, because it's unsupported and doesn't work with recentish Python.
http://www.seebs.net/tmp/grimrock_console.py
I've tested this very lightly, but it's offered without warranty. And most importantly, don't hassle the devs about issues with this; they are being pretty tolerant of our mucking about. To use this:
1. Make sure you have Python. I used the Python 2.7 from http://www.python.org.
2. Copy this file to your LoG game directory (the one containing grimrock.exe, NOT your save directory).
3. Open a shell in your LoG game directory.
4. Run the script. If you're clever and have mingw, this looks like /c/python27/python foo.py. If you are foolish and use the horrible, lame, Windows shell, this loooks like C:\Python27\python foo.py.
If you see:
found Console.lua
Modifying file...
and get your prompt back, you're set. Next time you start LoG, ~ should open the console.
And here's some handy stuff:
http://www.seebs.net/tmp/debug.lua
To use this:
1. Copy it to the LoG directory (again, the one containing grimrock.exe).
2. At the console, dofile('debug.lua')
It's not really documented, but for a quick starting point:
$ p = d.partymembers()
$ d.dump(p, 1)
$ d.bump_level(1)
$ d.bump_stat(1, 'strength', 99)
Go wild. Be aware that the console persists between game sessions, and if you keep references to old objects or mobs around, bad stuff can happen. So don't do that!