stairs to go up one elevation?

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
User avatar
THOM
Posts: 1281
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

stairs to go up one elevation?

Post by THOM »

I wonder if someone ever tried to combine the behaviour of stairs with the functionallity of a ladder.

Don't know if it's possible but wouldn't it be fine to have stairs that bring you not in the level above but in the elevation above?

My moddeling-/scripting-skills are not good enough but is someone else interested?
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
Azel
Posts: 808
Joined: Thu Nov 06, 2014 10:40 pm

Re: stairs to go up one elevation?

Post by Azel »

I used script to place one of the wooden bridge assets in a "spiral staircase" position. As long as the platform is within a reasonable distance in terms of Height, then players can simply walk up and in to them similar to a staircase.

Here is the Code I used (minmay, look away) :

Code: Select all

function CreateStairs()

	local startPos = 16.0;
	
	for stairCounter = 1,12 do
		local stair = findEntity("stair_" .. stairCounter);
		
		if stair ~= nil then
			local pos = stair:getWorldPosition();
			startPos = startPos - 1;
			pos[2] = startPos;
			
			stair:setWorldPosition(pos);
		end
	end
end
This creates 12 staircase steps starting from an Elevation of 4 down to an Elevation of 1. I did this a bit sloppy, because before I call the code, I actually placed the stair assets in a circle pattern first (although it's really a big square since Grimrock is grid-based). Once I manually placed them on the map, this function is called in order to create the proper spacing to achieve the stair effect. I'm sure this could be done better.

Here is a screenshot of how it looks so far in my Mod, this is the Channelwood spiral staircase:

Image
Azel
Posts: 808
Joined: Thu Nov 06, 2014 10:40 pm

Re: stairs to go up one elevation?

Post by Azel »

I created a 1 room dungeon with a version of the spiral staircase shown in the screenshot:
http://www.mystrock.com/files/SpiralStairs.zip

Not the most glamorous approach but gets the job done I think :mrgreen:
User avatar
Dr.Disaster
Posts: 2876
Joined: Wed Aug 15, 2012 11:48 am

Re: stairs to go up one elevation?

Post by Dr.Disaster »

THOM wrote:I wonder if someone ever tried to combine the behaviour of stairs with the functionallity of a ladder.

Don't know if it's possible but wouldn't it be fine to have stairs that bring you not in the level above but in the elevation above?
Both ways were already done in LoG 1 so it should also be possible in LoG 2.

In "The One Room Round Robin 2" ladders worked like stairs.
In "Master Quest" Komag made the stairs inside the Tomb of the Designers work like ladders.
User avatar
Isaac
Posts: 3192
Joined: Fri Mar 02, 2012 10:02 pm

Re: stairs to go up one elevation?

Post by Isaac »

In LoG 1 the stair animation and behavior is hardcoded.
Dr.Disaster wrote:In "The One Room Round Robin 2" ladders worked like stairs.
Not technically though. The ladders I made were doors given whole [10x10] room models that opened and closed depending on direction of travel; but the actual effect did not use stairs, just teleporting the party around.

It is possible to use a stairway to traverse one level, and then teleport the party to another level from there, making it a two story stairwell, but I find it better to just have a landing between floors. A landing lets them know they are traveling two floors instead of one.
User avatar
THOM
Posts: 1281
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: stairs to go up one elevation?

Post by THOM »

Boys, I forgot that in LoG2 you can choose the destination-square where the stairs ends.

I cannot test it right now because I'm not at home but in theory it should be possible to set the destination to the same level one elevation up... :)
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
User avatar
Eleven Warrior
Posts: 752
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: stairs to go up one elevation?

Post by Eleven Warrior »

Don't worry guys Uncle Azlel will fix it bro :) Well at least this bloke is willing to give us a demo dungeon yeah errrrrr unlike some.

WAIT:::: Since Dr Disaster is here why don't he solve it..............He does everthing else...
User avatar
Isaac
Posts: 3192
Joined: Fri Mar 02, 2012 10:02 pm

Re: stairs to go up one elevation?

Post by Isaac »

THOM wrote:Boys, I forgot that in LoG2 you can choose the destination-square where the stairs ends.

I cannot test it right now because I'm not at home but in theory it should be possible to set the destination to the same level one elevation up... :)
It comes with a fade to black; so each elevation change on the same level, fades to black and back.
Azel
Posts: 808
Joined: Thu Nov 06, 2014 10:40 pm

Re: stairs to go up one elevation?

Post by Azel »

THOM wrote:Boys, I forgot that in LoG2 you can choose the destination-square where the stairs ends.

I cannot test it right now because I'm not at home but in theory it should be possible to set the destination to the same level one elevation up... :)
Oh yes, like the "castle_stairs_up" which allow you to select a "customTarget" that works very similar to setting the destination of a Teleporter.

I was a bit confused by your original post; I was thinking of going Up and Down between Elevations within the same room. Although, with the custom staircase (like those Spiral Stairs), we can still create the same effect to move up and down between Levels. I will try to upload a demo of that as well for anyone interested. Cheers!
User avatar
Dr.Disaster
Posts: 2876
Joined: Wed Aug 15, 2012 11:48 am

Re: stairs to go up one elevation?

Post by Dr.Disaster »

Isaac wrote:
THOM wrote:Boys, I forgot that in LoG2 you can choose the destination-square where the stairs ends.

I cannot test it right now because I'm not at home but in theory it should be possible to set the destination to the same level one elevation up... :)
It comes with a fade to black; so each elevation change on the same level, fades to black and back.
As far as i know that is hardcoded in LoG 1, so there we have to live with it.
LoG 2 uses a class system and there is a class called "Stairs". Couldn't it be changed/modified or even an alternate be implemented?
Last edited by Dr.Disaster on Sat Jul 11, 2015 4:54 pm, edited 1 time in total.
Post Reply