Automatic Elevator Script

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
Lark
Posts: 178
Joined: Wed Sep 19, 2012 4:23 pm
Location: Springfield, MO USA

Re: Automatic Elevator Script

Post by Lark »

crisman wrote:Those ideas are great!
For now I personally managed to get my 7 1/2 floor, in a stack of floor from 1 to 10, my 7 1/2 floor is the 10th, until you use a key on a special lock, the elevator will ignore the 10th. Then, the elevator will travel from 7th floor to 10th, to 10th floor to 8th. Originally when I said "skip 3 levels" I meant this, but now I realize it could be interesting if in a stack there are some floor not served by the elevator!
Still have to work on the button and the leds, in these days I don't have so much time :(
For the space I'll try to place an opened prison portcullis on prison-level I'm not sure if their height is enough to cover the hole But I'll give it a try later!
I'll wait for your next update!
Oh that is really cool! I love it! A locked out virtual floor that the elevator skips until the floor is enabled! I'm going to add that to my list of things to support in version 2.1

I've already completed the LED display color enhancement where you can define a different color on each floor. I think I'll add a function that will let you change the color dynamically on a given level too. If the car is on that level, the color will change immediately, otherwise when the car arrives. Would you like support for displays such as 7.5? I can't do 17.5 in the given space currently, but dropping in a decimal point shouldn't be hard. I can also add special symbols for numbers greater than 99...

I have a function that will disable and enable the whole elevator stack which I will probably keep just for grins, but I'm going to add levelDisable() and levelEnable() functions that will let you turn off a floor. Like I said, that's very cool! The elevator will ignore these floors if disabled therefore skipping or refusing to go to them as if they don't exist.

To accommodate your requirement for a hidden floor, I'm going to redefine the floor definition table yet again. I think I can add sequencing to the table so that the elevator need not traverse the floors in actual level order. This would let you service floors 1 through 8 normally, for example, yet if the secret floor was enabled, you could insert it between floors 7 and 8 just like you want. This will take a little doing, but I already have a concept in mind. If you wanted, you could service floor 1, 12, 4, 6, 2, and 10 in that order. Weird, but why not?!

To support this, I think I'll add a virtual floor number which will be used to determine actual service order and travel times. For your application, this would be {1, 2, 3, 4, 5, 6, 7, 7.5, 8} corresponding to the real level numbers of {1,2,3,4,5,6,7,10,8}. Initially, floor 7.5 would be disabled and, therefore, skipped. The definition would be something like {1,1,1,1,1,1,0,1}. The lower travel time to and from virtual floor 7.5 would be only half as floors traveled would only be calculated between virtual floors, not real ones.

I'm hoping for generic code that will handle all needs that is parameter driven. If so, you could drop this new code in (if you wanted to), set a few parameters, and go. The parameters would be arranged by either floor or type of function (as in the examples above). I’m leaning towards floor and using something like:

Code: Select all

levels = {{floor-1-definition},{floor-2-definition},…{floor-n-definition}}
each floor definition would be something like {level, virtual-level, {call_location}, {color}, enabled, ...}
I'm still working on the door and ceiling issues, but I found that if you put a secret prison door over the elevator door on prison levels and set it to open, it looks a lot better. I think custom objects for this are a must - I'm planning on learning how to create my own graphics, but not just yet.

Thank you, -Lark
User avatar
Lark
Posts: 178
Joined: Wed Sep 19, 2012 4:23 pm
Location: Springfield, MO USA

Re: Automatic Elevator Script

Post by Lark »

Neikun wrote:One solution to the door size issue, is to in the elevator room of every level, construct it out of the prison wallset by defining prison wall decorations with replaceWall = true, lines.
I've been looking at some of your door constructions and they are awesome. I only played with them a little bit last night, but couldn't get them working right. I do think this is the right track, however, thank you.

Now if you wanted to make or define such a set of graphics, I'd be really grateful! We need to kill the pillars, define a ceiling that hangs at the same height on each level (regardless of the level's default ceiling height which messed up my attempts last night.) Better walls that go all the way to the edge when pillars are missing, and most of all, a good door that opens like real elevator doors!

Your work is awesome - thank you for all of the fantastic alcoves and other things you've provided thus far.

Sincerely, -Lark
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Automatic Elevator Script

Post by Neikun »

You wouldn't even have to make new models. Just use prison wall models as decorations, much like how wall drainages are done.

So it would look like this in code.
defineObject{
name = "prison_wall_deco",
class = "Decoration",
model = "assets/models/env/prison_wall_01.fbx",
placement = "wall",
replacesWall = true,
editorIcon = 92,
}
Oh boo, it can't replace the pillars.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Re: Automatic Elevator Script

Post by crisman »

Lark wrote:
crisman wrote:Those ideas are great!
For now I personally managed to get my 7 1/2 floor, in a stack of floor from 1 to 10, my 7 1/2 floor is the 10th, until you use a key on a special lock, the elevator will ignore the 10th. Then, the elevator will travel from 7th floor to 10th, to 10th floor to 8th. Originally when I said "skip 3 levels" I meant this, but now I realize it could be interesting if in a stack there are some floor not served by the elevator!
Still have to work on the button and the leds, in these days I don't have so much time :(
For the space I'll try to place an opened prison portcullis on prison-level I'm not sure if their height is enough to cover the hole But I'll give it a try later!
I'll wait for your next update!
Oh that is really cool! I love it! A locked out virtual floor that the elevator skips until the floor is enabled! I'm going to add that to my list of things to support in version 2.1

I've already completed the LED display color enhancement where you can define a different color on each floor. I think I'll add a function that will let you change the color dynamically on a given level too. If the car is on that level, the color will change immediately, otherwise when the car arrives. Would you like support for displays such as 7.5? I can't do 17.5 in the given space currently, but dropping in a decimal point shouldn't be hard. I can also add special symbols for numbers greater than 99...
About the led colors, that's great, but don't bother with 7.5, I did it on my own :D
Image
It's not perfect, but I think it's ok ;)
I don't know about the special symbols... I don't have anything in mind. Unless I use them for a puzzle... (why not???)
For now I think you should not bother with the led, I really don't have anything for real in mind ;)
Lark wrote:I have a function that will disable and enable the whole elevator stack which I will probably keep just for grins, but I'm going to add levelDisable() and levelEnable() functions that will let you turn off a floor. Like I said, that's very cool! The elevator will ignore these floors if disabled therefore skipping or refusing to go to them as if they don't exist.

To accommodate your requirement for a hidden floor, I'm going to redefine the floor definition table yet again. I think I can add sequencing to the table so that the elevator need not traverse the floors in actual level order. This would let you service floors 1 through 8 normally, for example, yet if the secret floor was enabled, you could insert it between floors 7 and 8 just like you want. This will take a little doing, but I already have a concept in mind. If you wanted, you could service floor 1, 12, 4, 6, 2, and 10 in that order. Weird, but why not?!
Good, If you can change how the elevator works that's great! That could be weird, but this is Grimrock, think of a magic elevator, that would be fantastic! ^__^
But also for logistical reason, you can create an upper hub with several elevator, and then using them to reach different parts.
I decided to put the secret floor down because the player should not fell there's something missing - for the minimap reason. If the player opens the minimap it will see a missing floor, and did not wanted - he must realize there is a hidden floor after reading a note or something similar :D
Lark wrote:To support this, I think I'll add a virtual floor number which will be used to determine actual service order and travel times. For your application, this would be {1, 2, 3, 4, 5, 6, 7, 7.5, 8} corresponding to the real level numbers of {1,2,3,4,5,6,7,10,8}. Initially, floor 7.5 would be disabled and, therefore, skipped. The definition would be something like {1,1,1,1,1,1,0,1}. The lower travel time to and from virtual floor 7.5 would be only half as floors traveled would only be calculated between virtual floors, not real ones.

I'm hoping for generic code that will handle all needs that is parameter driven. If so, you could drop this new code in (if you wanted to), set a few parameters, and go. The parameters would be arranged by either floor or type of function (as in the examples above). I’m leaning towards floor and using something like:

Code: Select all

levels = {{floor-1-definition},{floor-2-definition},…{floor-n-definition}}
each floor definition would be something like {level, virtual-level, {call_location}, {color}, enabled, ...}
I'm still working on the door and ceiling issues, but I found that if you put a secret prison door over the elevator door on prison levels and set it to open, it looks a lot better. I think custom objects for this are a must - I'm planning on learning how to create my own graphics, but not just yet.

Thank you, -Lark
If you mange to do so, that will be easy to set it up then :)
And your idea could do the trick! I think the most difficult part is settings a friendly user interface to edit it...
I'll give it a try with the secret door if you say it looks better!
Can't wait! :D
Szragodesca
Posts: 59
Joined: Sun Oct 14, 2012 7:13 am

Re: Automatic Elevator Script

Post by Szragodesca »

Adding in the ability to turn levels on and off through triggers is awesome. :D

I can see it now. You climb into the elevator after a harrowing experience, hear a grunt behind you, and see an ogre charging. The doors shut, it smacks into them, and the screen shakes. A squealing sound pierces your ears and everything goes dark for a moment as the elevator suddenly plunges far deeper than you have been before. . .
User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Re: Automatic Elevator Script

Post by crisman »

idea: put a small led on the calling button...
red -> elevator is called and is coming
green -> elevator is arrived
something like this :)
rsdworker
Posts: 8
Joined: Fri Mar 02, 2012 2:18 pm

Re: Automatic Elevator Script

Post by rsdworker »

looks great

so how i use in my map - i downloaded and there was no infomation how to put this mod in :D
bongobeat
Posts: 1076
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: Automatic Elevator Script

Post by bongobeat »

Hello,
I have test your elevator, what a wonderful thing! Thank you for doing this! :D
(elevator 2)

but i can only have access to 4 level: the elevator is on level 7 and I can only "descend" to level 10

I had to put another script and another cage lift beside the other, to complete the descend into level 11.
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505
Post Reply