Illusionary Walls Are Go!

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Lmaoboat
Posts: 359
Joined: Wed Apr 11, 2012 8:55 pm

Re: Illusionary Walls Are Go!

Post by Lmaoboat »

Isaac wrote:This is solved.
The way to do it is to clone the Ivy as the base object.

I tried it with my project above and it looks indistinguishable. :)
Seems three of us solved it all with different objects.
User avatar
Isaac
Posts: 3188
Joined: Fri Mar 02, 2012 10:02 pm

Re: Illusionary Walls Are Go!

Post by Isaac »

Lmaoboat wrote:
Isaac wrote:This is solved.
The way to do it is to clone the Ivy as the base object.

I tried it with my project above and it looks indistinguishable. :)
Seems three of us solved it all with different objects.
Does anyone know what the script method for Instant opening is? I'm sure I read it somewhere, but I can't seem to find it. I just checked the script reference page ~did I miss it?

I do think that you are right about that. The secret door blocks the map from displaying all that is behind it. I have it working in the editor, but it does need to instantly pop open... and hopefully that bypasses the sound cue.

It looks as though the pressure plate method would only allow the player to notice the passage if they were directly in front of it. It could be done such that the party had to be facing the illusion wall, but that would prevent them from walking sideways through the illusion.

** Best method is to have an official Illusionary wall in the release. 8-)
*** Something else I'd love to see in the release is the ability to move while looking at the map. In the editor you can clearly see every creature going about their business; in the game if you happen to look at the map while in a series of teleporters, you will see your party appear in the various destinations. It would seem that the player could be allowed to uses the WASD/QE keys while on the map screen.
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Illusionary Walls Are Go!

Post by Komag »

Isaac wrote: Does anyone know what the script method for Instant opening is? I'm sure I read it somewhere, but I can't seem to find it. I just checked the script reference page ~did I miss it?
Door:setDoorState(state)
Sets door’s state immediately without playing animation and sound effects. State must be “open” or “closed”.
Finished Dungeons - complete mods to play
User avatar
Isaac
Posts: 3188
Joined: Fri Mar 02, 2012 10:02 pm

Re: Illusionary Walls Are Go!

Post by Isaac »

This works well! :)
http://www.youtube.com/watch?v=y_8QxX12l_4

To create the illusion, clone the Dungeon Ivy object as your illusionary wall object; override the model with the secret door model.
Create a material for the illusionary wall object that uses the secret door's diffuse/spec/and normal maps.

Place your illusionary wall object and a secret door where you want the illusion, and place a hidden pressure plate on both sides of the secret door, and connect both plates to two lua scripts (one to set the state to open; the other to closed).

What you get is an indistinguishable wall that you can walk through, but is not revealed on the map until you stand next to it. After you pass through it and off of the plates, you see a closed secret door on the map; it shows as open when standing next to it on one of the pressure plates.

** In the dark, a torch light behind the wall shines slightly between some of the bricks; it looks good.

The trade off for the auto-map fix, is that thrown objects will hit the illusionary wall and fall to the ground. :(
(Pressure plates don't activate for flying objects passing over them; but they will activate when an object lands on them [if set to react to items]. In this case the first object will open the secret door in the illusion and a second thrown object will pass through the wall.)
User avatar
Darklord
Posts: 2001
Joined: Sat Mar 03, 2012 12:44 pm
Location: England

Re: Illusionary Walls Are Go!

Post by Darklord »

Nice work guys, the odd illusionary wall is essential for a classic dungeon! :D

Daniel.
A gently fried snail slice is absolutely delicious with a pat of butter...
User avatar
Montis
Posts: 340
Joined: Sun Apr 15, 2012 1:25 am
Location: Grimrock II 2nd playthrough (hard/oldschool)

Re: Illusionary Walls Are Go!

Post by Montis »

Isaac wrote:This works well! :)
http://www.youtube.com/watch?v=y_8QxX12l_4

To create the illusion, clone the Dungeon Ivy object as your illusionary wall object; override the model with the secret door model.
Create a material for the illusionary wall object that uses the secret door's diffuse/spec/and normal maps.

Place your illusionary wall object and a secret door where you want the illusion, and place a hidden pressure plate on both sides of the secret door, and connect both plates to two lua scripts (one to set the state to open; the other to closed).

What you get is an indistinguishable wall that you can walk through, but is not revealed on the map until you stand next to it. After you pass through it and off of the plates, you see a closed secret door on the map; it shows as open when standing next to it on one of the pressure plates.

** In the dark, a torch light behind the wall shines slightly between some of the bricks; it looks good.

The trade off for the auto-map fix, is that thrown objects will hit the illusionary wall and fall to the ground. :(
(Pressure plates don't activate for flying objects passing over them; but they will activate when an object lands on them [if set to react to items]. In this case the first object will open the secret door in the illusion and a second thrown object will pass through the wall.)
Also the problem is that as soon as you step on the square that "opens" the wall, it will draw the adjacent room on the map, thus giving away your secret passage :/
When destiny calls, the chosen have no choice.

My completed dungeon (LoG1): Hypercube
User avatar
Isaac
Posts: 3188
Joined: Fri Mar 02, 2012 10:02 pm

Re: Illusionary Walls Are Go!

Post by Isaac »

Montis wrote:Also the problem is that as soon as you step on the square that "opens" the wall, it will draw the adjacent room on the map, thus giving away your secret passage :/
In practice, you'd have to stand in front of a wall and check the map to ever find it that way. To check a hall would require a concentrated search with at least three key-presses per wall segment; if you're going to do that then you would find it without the map. I don't look at it as a problem or a method flaw.

There is only the slight chance that the player will look at the map while standing on the control plate and notice the passageway.
** What I hope for is an official Illusionary wall with the final release; and this is a seed idea for doing one with current methods and assets.
zapibranigan
Posts: 15
Joined: Thu Sep 20, 2012 9:37 am

Re: Illusionary Walls Are Go!

Post by zapibranigan »

I've written a piece of script that should be able to let you use Illusionary walls (i.e. when you move into it, you pass through them)and it doesn't use any wall clones.

I'll give it a try tonight, and tell you if it works :)
zapibranigan
Posts: 15
Joined: Thu Sep 20, 2012 9:37 am

Re: Illusionary Walls Are Go!

Post by zapibranigan »

Ok that's done, and that works pretty damn good :D

The basic idea if that illusionary walls (IW) works by pair (two secret doors), and you can cross each ones of these doors from two different directions, look at the picture behind :
Image or Image

This said, when you want to create an IW, you have to create 2 different secret doors. (iw_array{} in the following scripts)

Then you have to note the coordinates of the tile between these two doors (iw_x{} & iw_y{} in the following scripts)

Then you have to note the level where these doors are (iw_l{} in the following scripts)

Then you have to note the directions from where you can cross the doors (iw_fdir{} & iw_sdir{} in the following scripts)


First, in init.lua of your project :
SpoilerShow

Code: Select all

cloneObject{
   name = "party",
   baseObject = "party",
   onMove = function(party, direction)
   
		-- IW entities array : they always worked by pair, so when you had a secret door, you have to add its twin
		iw_array = {temple_secret_door_1, temple_secret_door_2}
		-- the two coordinates where your party will go after crossing the wall
		iw_x = {17, 17}
		iw_y = {16, 16}
		-- the level of the IW
		iw_l = {1, 1}
		-- the two direction sides of the IW : 0 (north), 1 (east), 2 (south) or 3 (west)
		iw_fdir = {1, 3}
		iw_sdir = {3, 1}
		
		-- lets know the coords where we are going
		if direction == 0 then
			destmove_x = party.x
			destmove_y = party.y - 1
		elseif direction == 1 then
			destmove_x = party.x + 1
			destmove_y = party.y
		elseif direction == 2 then
			destmove_x = party.x
			destmove_y = party.y + 1
		elseif direction == 3 then
			destmove_x = party.x - 1
			destmove_y = party.y
		end
		
		-- find index
		for i=1,table.getn(iw_array),1 do
			-- test if party is on the good location
			if iw_x[i] == destmove_x  and iw_y[i] == destmove_y and iw_l[i] == party.level then
				-- test if party is heading on the right direction : towards the IW, from one of its two sides
				if iw_fdir[i] == direction or iw_sdir[i] == direction then
					-- instant opening of the door
					iw_array[i]:setDoorState("open")
					if iw_array[i+1] then
						iw_array[i+1]:setDoorState("open")
					else
						iw_array[i-1]:setDoorState("open")
					end
					-- return true : movement ok
					return true
				end
			end
		end
	end,
}
Then, you have to have to add two invisible pressure plates, in front of each secret doors (and not beneath them!), pointing to a LUA script entity doing :
SpoilerShow

Code: Select all

function close()
	temple_secret_door_1:setDoorState("closed")
	temple_secret_door_2:setDoorState("closed")
end
User avatar
Isaac
Posts: 3188
Joined: Fri Mar 02, 2012 10:02 pm

Re: Illusionary Walls Are Go!

Post by Isaac »

zapibranigan wrote:Ok that's done, and that works pretty damn good :D
That works really cool. 8-)
Your method (visually) shows the exact same effect as seen in Eye of the Beholder; and once the scripts are in place, it's a lot easier to use on the map than the method posted before.
But I do like the previous solution's effect a bit better; it shows the party walk right up to ~and through the wall.
SpoilerShow
Image
*There is no reason it couldn't work with your script though; all it would need is for the two [custom] 'illusion Wall' models to be placed ~that's it.

***Edit: I've seen from use, that both methods fail miserably when there are monsters present in the vicinity of the illusionary wall. Methods that use a pressure plate will have to add additional scripting to account for the monster stepping on a plate. To have the plates ignore monsters would mean they cannot pass through the wall, but when they activate the plates, they run the scripts to close the doors; in tandem with a moving party, this can (and often does) trap one or the other inside the wall with the doors closed. Plates that close the doors when deactivated... trap those inside the illusion; and when the monster (or the party) stands on the plate, this blocks the passage... meaning one must kill the other. I did not test, but I would assume that killing a monster on the plate that keeps the door open, would close it, and trap you in the wall indefinitely.

****Edit: I've seen that adding a 3-5 second [timer] delay to the script that closes the doors, is sufficient to prevent standoffs and trapped monsters. With the delay it now works pretty good.
Post Reply