[Script] Get difficulty settings from script
Re: [Script] Get difficulty settings from script
Difficulty only seems to affect monsters' damage and the frequency of moves/attacks. It doesn't seem to affect the speed they move 1 square, so you can't measure it that way. You could look at how long it takes to move multiple squares, perhaps.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: [Script] Get difficulty settings from script
Hmmm...
I've tried this:
and it crashes the editor.
In Error-Logfile:
What does this say? Function doesn't exist?
I've tried various getStatistic("commands") and the editor never crashed.
I've tried this:
Code: Select all
local df = getStatistic("difficulty_level")
hudPrint(df.." ")
In Error-Logfile:
Code: Select all
[string "Statistics.lua"]:0: attempt to index a nil value
stack traceback:
[C]: in function 'error'
[string "DungeonEditor.lua"]: in function 'handleError'
[string "DungeonEditor.lua"]: in function 'playPreview'
[string "DungeonEditor.lua"]: in function 'previewButtons'
[string "DungeonEditor.lua"]: in function 'update'
[string "Grimrock.lua"]: in main chunk
I've tried various getStatistic("commands") and the editor never crashed.
I am a REAL 'Master of Disaster' `;.;´
- JohnWordsworth
- Posts: 1397
- Joined: Fri Sep 14, 2012 4:19 pm
- Location: Devon, United Kingdom
- Contact:
Re: [Script] Get difficulty settings from script
If I put anything 'invalid' in getStatistic then it always crashes for me. Just for testing purposes I tried getStatistic("ABC"); getStatistic("Something"); and both crashed the editor instantly. It would be awesome if there were a 'difficulty' statistic for the getting, but I fear there is not
.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
Re: [Script] Get difficulty settings from script
Thanks, but where is the "grimrock.lua"? In the Grimrock.dat?
If it so, can anybody extract me all LUA files from this file?
If you "Load" a savegame, the difficulty setting where displayed. Is there a way to "read" this entry in a script?
Srry for the questions^^
If it so, can anybody extract me all LUA files from this file?
If you "Load" a savegame, the difficulty setting where displayed. Is there a way to "read" this entry in a script?
Srry for the questions^^
I am a REAL 'Master of Disaster' `;.;´