Date/Time script help and dungeon testing
Posted: Sun Nov 13, 2016 6:02 am
Hey guys, it's been a while from me; finally picked up Grimrock 2 and have been working with it to update my Grimrock 1 dungeon. I got two things I could really use some help with.
The first thing is help with a script. I essentially am working on a script that will create a 'time' system inside Grimrock. The premise is pretty simple when the hero's move one tile it increments time forward x minutes (script has it move forward 1 but the integer could be set to anything). What I need help with is some of the coding to get the month and weekday down and how to call the various elements to display in game when called. This is just a fun thing I though about doing and wanted to see if possible to do. Here's the code as I have it so far; I've not really been able to test it either and I'm sure there's tons of errors, but that's why I'm here.
The second bit is I've gotten a lot of stuff done inside the dungeon. Done a lot of personal internal testing and made sure that everything is functioning well as designed. Before I delve further I'd like some outside hands to test the mechanics of the traps, bosses, and content as is and provide feedback. I've built this in a 'Call of Cthuhlu' type theme. Where the party is essentially ill equipped to stand toe to toe against the encounters and must think of indirect ways to topple monsters. Things to point out, there's no story elements in the current version and I've not put the solutions to the puzzles in their hidden places either. I'm looking for blind difficulty to resolve the fights and puzzles as they are presented. Any party of any level could technically be used for this, but higher party levels can potentially brute force their way through.
Google Drive link 620 MB:
https://drive.google.com/file/d/0ByvKIU ... sp=sharing
The first thing is help with a script. I essentially am working on a script that will create a 'time' system inside Grimrock. The premise is pretty simple when the hero's move one tile it increments time forward x minutes (script has it move forward 1 but the integer could be set to anything). What I need help with is some of the coding to get the month and weekday down and how to call the various elements to display in game when called. This is just a fun thing I though about doing and wanted to see if possible to do. Here's the code as I have it so far; I've not really been able to test it either and I'm sure there's tons of errors, but that's why I'm here.
Code: Select all
function clocktime
-- minutes = m
-- 24 Hour = h
-- 12 Hour = t
-- Days = d
-- Weekday = w
-- Month = n
-- Monthday = x
-- counter = i
weekday = {{"Monday", 1},{"Tuesday", 2},{"Wednesday", 3},{"Thursday", 4},{"Friday", 5},{"Saturday", 6},{"Sunday", 7}}
month = {{"January", 1},{"february", 2},{"March", 3},{"April", 4},{"May", 5},{"June", 6},{"July", 7},{"August", 8},{"September", 9},{"October", 10},{"November", 11},{"December", 12}}
endmonth = {{"January", 31},{"february", 28},{"March", 31},{"April", 30},{"May", 31},{"June", 30},{"July", 31},{"August", 31},{"September", 30},{"October", 31},{"November", 30},{"December", 31}}
"w, n d t:m"
for i = 1, do
m = m + i
if m > 60 then
m - 60
h + 1
andif h > 24 then
h - 24
d + 1
else
return nil
end
end
if h > 12 then
t = h - 12
else
t = h
end
n = month
if d > endmonth then
n + 1
andif n > 12
n - 12
else
return nil
end
end
Google Drive link 620 MB:
https://drive.google.com/file/d/0ByvKIU ... sp=sharing
