The Custom Alcove Thread. (Neikun, Batty and Crisman)

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Deadlylama
Posts: 22
Joined: Tue Oct 09, 2012 5:06 pm

Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)

Post by Deadlylama »

Neikun wrote:Oh dear. That is an issue. :o
Perhaps an invisible teleporter activated by item only that sends the item back to the square thrown? is that possible? hmm

Testing it. accidentally discovered a cool puzzle mechanic. :o

I wish I new how to change where exactly it appears in a square.
i got an idea, maybe a hidden pressure plate reacting to items in this square which powers a script that puts any item facing in the direction of the "waltar" into it.
Dungeon maker, scripter and modeling beginner
My first Wallset
User avatar
Kuningas
Posts: 268
Joined: Wed Apr 11, 2012 10:29 pm
Location: Northern Finland

Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)

Post by Kuningas »

Neikun wrote:Oh dear. That is an issue. :o
Perhaps an invisible teleporter activated by item only that sends the item back to the square thrown? is that possible? hmm

Testing it. accidentally discovered a cool puzzle mechanic. :o

I wish I new how to change where exactly it appears in a square.
Have you tried this? I noticed it in the scripting reference, but haven't had the chance to test it:

"Item:setSubtileOffset(x, y)
Sets item’s relative position to the center of tile."

And the invisible pressure-plate thing just might work... I'll give it a shot.

EDIT: how to check items in a map square or a pressure plate? I am quessing getContents won't work here...
Last edited by Kuningas on Thu Oct 11, 2012 1:43 pm, edited 1 time in total.
BASILEUS
Deadlylama
Posts: 22
Joined: Tue Oct 09, 2012 5:06 pm

Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)

Post by Deadlylama »

Kuningas wrote:
Neikun wrote:Oh dear. That is an issue. :o
Perhaps an invisible teleporter activated by item only that sends the item back to the square thrown? is that possible? hmm

Testing it. accidentally discovered a cool puzzle mechanic. :o

I wish I new how to change where exactly it appears in a square.
Have you tried this? I noticed it in the scripting reference, but haven't had the chance to test it:

"Item:setSubtileOffset(x, y)
Sets item’s relative position to the center of tile."
ill test this, as i already used it in my own dungeon, i will post my script when im done :D

Edit: Script works, any item gets put in the middle of the tile, but sadly you can still push the item into the walltar D:

still, here is it:
SpoilerShow

Code: Select all

function CheckItems()
	for i in entitiesAt(self.level,self.x,self.y) do
		if (i.setSubtileOffset ~= nil ) then
			i:setSubtileOffset(0,0)
		end
	end
end	
its meant to be used in a script entity in the same tile as the walltar with a hidden pressure plate in the same tile that only reacts to items and calls the function.
Last edited by Deadlylama on Thu Oct 11, 2012 2:25 pm, edited 1 time in total.
Dungeon maker, scripter and modeling beginner
My first Wallset
User avatar
Grimwold
Posts: 511
Joined: Thu Sep 13, 2012 11:45 pm
Location: A Dungeon somewhere in the UK

Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)

Post by Grimwold »

Kuningas wrote:EDIT: how to check items in a map square or a pressure plate? I am quessing getContents won't work here...
for i in entitiesAt(level,x,y) do
User avatar
Kuningas
Posts: 268
Joined: Wed Apr 11, 2012 10:29 pm
Location: Northern Finland

Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)

Post by Kuningas »

Deadlylama wrote:
Kuningas wrote:
Neikun wrote:Oh dear. That is an issue. :o
Perhaps an invisible teleporter activated by item only that sends the item back to the square thrown? is that possible? hmm

Testing it. accidentally discovered a cool puzzle mechanic. :o

I wish I new how to change where exactly it appears in a square.
Have you tried this? I noticed it in the scripting reference, but haven't had the chance to test it:

"Item:setSubtileOffset(x, y)
Sets item’s relative position to the center of tile."
ill test this, as i already used it in my own dungeon, i will post my script when im done :D
Alright. : D I got this far myself, but I can't seem to use the setSubtileOffset with this because it treats it as an entity, I think.

EDIT: Once again, my favourite codemaster to the rescue! ; D Thanks, but this time I figured it out myself immediately after asking it... which is kind of silly.

EDIT 2: Also, I think it needs to be moved to another square -- else the party will "kick" it under the altar again : /

EDIT 3: AHA! By the wheels of progress everturning, I've nearly perfected a solution!

Code: Select all

function itemrecover(item)
	for i in entitiesAt(1, 20, 6) do
		if i.class == Item then
			print("this works so far")
			ItemRecoverTeleport:activate()
			break
		else
		end
	end
end
Now I just need it to dectivate when the item leaves, which should be a piece of cake.

Actually, I think I don't need that function -- I suppose I could just activate the teleporter with the pressure plate : /.

EDIT *whoknowshowmany*: Yup, works like a charm. I feel a bit... silly.

EDIT *previous + 1*: this, of course, also teleports items that are set on the floor by the player... Maybe if I set it not to work while the party is in that square...?

EDIT AGAIN: No, I could do it, but I think it is a bit excessive, considering the item is also teleported if another item is thrown into the square -- and I'd say the chances of people throwing stuff in the room is pretty much equal to the chance that people will drop stuff in the square. At least now they can't lose them... But I gotta admit, it is nagging me a bit.
BASILEUS
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)

Post by Neikun »

I want to make this thread easier to reference, but since it's mostly images and code, it'd be kinda hard. Anyone have some suggested layouts?
SpoilerShow
Spoilers are kinda large D:
Does is make sense to categorize by logical alcove and physical alcove?
"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
Komag
Posts: 3656
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)

Post by Komag »

I'm not sure which is the best way, can you explain the difference a bit? I'm also thinking how we can get this stuff into the wiki as well
Finished Dungeons - complete mods to play
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)

Post by Neikun »

Well I've recently set up the custom sounds thread in a much cleaning looking format. (Will make it easier to post it to the wiki, as well)
And I would like to do something similar in this thread.
I just don't know how I would categorize the alcoves to make them into a neat list.

Alphabetically perhaps?
"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
Komag
Posts: 3656
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)

Post by Komag »

yeah but I mean what is logical vs physical alcove?
Finished Dungeons - complete mods to play
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: The Custom Alcove Thread. (Neikun, Batty and Crisman)

Post by Neikun »

A logical alcove is an alcove without a model, useful for making alcoves with multiple position slots.
A physical alcove has a model file in it.
Since physical alcoves often have trouble stacking, one of the best ways of doing a multiple slot alcove is to have a physical alcove as a base, and place logical alcoves with slots in different x,y,z positions and rotations as desired.

That's almost a wiki worthy explanation, I think :0
"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!
Post Reply