Page 2 of 2

Re: [Script] Get difficulty settings from script

Posted: Sun May 18, 2014 6:30 am
by minmay
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.

Re: [Script] Get difficulty settings from script

Posted: Wed Jul 23, 2014 12:01 am
by MasterJoe
Hmmm...
I've tried this:

Code: Select all

local df = getStatistic("difficulty_level")
hudPrint(df.." ")
and it crashes the editor.

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
What does this say? Function doesn't exist?
I've tried various getStatistic("commands") and the editor never crashed. :?

Re: [Script] Get difficulty settings from script

Posted: Wed Jul 23, 2014 3:25 am
by JohnWordsworth
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 :(.

Re: [Script] Get difficulty settings from script

Posted: Wed Jul 23, 2014 3:00 pm
by MasterJoe
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^^