Question about eye sockets

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
trancelistic
Posts: 275
Joined: Sat Jun 16, 2012 5:32 am

Question about eye sockets

Post by trancelistic »

Hey all. I'm still trying to finish my LoG1 dungeon but I've stumbeld on something silly.

I can use the basic blue_gem(s) on the eye sockets but not the basic red and green gems.
So I thought, what if I clone the blue_gem and make it look like a green or red gem?. However that doesn't seem to work.
Could any 1 help me out here so that the daemonhead eye sockets also accepts an input of a green or red gem?

Thanks in advanced<3
User avatar
THOM
Posts: 1281
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Question about eye sockets

Post by THOM »

The sockets are only defined for blue gems.
In my dungeon I defined sockets for the other gems, too:

Code: Select all

defineObject{
name = "eye_socket_left_green",
class = "Alcove",
anchorPos = vec(0.21, 1.58, -0.45),
targetPos = vec(0.2, 1.65, -0.45),
targetSize = vec(0.1, 0.1, 0.1),
placement = "wall",
onInsertItem = function(self, item)
   return item.name == "green_gem" and
   self:getItemCount() == 0
   end,
editorIcon = 92,
}

defineObject{
name = "eye_socket_right_green",
class = "Alcove",
anchorPos = vec(-0.21, 1.58, -0.45),
targetPos = vec(-0.2, 1.65, -0.45),
targetSize = vec(0.1, 0.1, 0.1),
placement = "wall",
onInsertItem = function(self, item)
   return item.name == "green_gem" and
   self:getItemCount() == 0
   end,
editorIcon = 92,
}

defineObject{
name = "eye_socket_left_red",
class = "Alcove",
anchorPos = vec(0.21, 1.58, -0.45),
targetPos = vec(0.2, 1.65, -0.45),
targetSize = vec(0.1, 0.1, 0.1),
placement = "wall",
onInsertItem = function(self, item)
   return item.name == "red_gem" and
   self:getItemCount() == 0
   end,
editorIcon = 92,
}

defineObject{
name = "eye_socket_right_red",
class = "Alcove",
anchorPos = vec(-0.21, 1.58, -0.45),
targetPos = vec(-0.2, 1.65, -0.45),
targetSize = vec(0.1, 0.1, 0.1),
placement = "wall",
onInsertItem = function(self, item)
   return item.name == "red_gem" and
   self:getItemCount() == 0
   end,
editorIcon = 92,
}
Or you do a multigem-socket. I did it this way for the mouth socket - maybe you can script something similar for the eye-sockets:

Code: Select all

cloneObject{
            name = "mouth_socket_multigem",
            baseObject = "mouth_socket",
            onInsertItem = function (self, item)
                         local a, b = string.find (item.name, "_gem")
                         return a ~= nil and b == string.len(item.name) and self:getItemCount() == 0
                         end,
}
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
trancelistic
Posts: 275
Joined: Sat Jun 16, 2012 5:32 am

Re: Question about eye sockets

Post by trancelistic »

Wow very nice and thanks for the fast feedback. I haven't tried the code yet but isn't this missing a model for this?. ( or am i now completly noob for asking this?)

Or.. do I need to place this "inside" the same location with a normal daemonhead model?.

luv ya <3 and greetz.

Ps If I wanted to change A model. Like for exsample, make a true basic "blue_gem" as it supose to work like in the orginal release of grimrock but for says I wanted it to look like a knife, but works as the normal "blue_gem"

How would I define such a thing? ( not that I need it, but then I coudl understand the code(s) beter or location where all models are. I do know the stuff like "model = "assets/models/env/dungeon_pillar.fbx"," but thats a dungeon_pillar but where are the items/models located? That I never knew:(

For an exsmaple: I could define a knife looking like a pillar.. then it would be: (model = "assets/models/env/dungeon_pillar.fbx",) ( i guess) But that is a model for the dungeon itself. Where is the items directory? Like food, armor, etc.
User avatar
THOM
Posts: 1281
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Question about eye sockets

Post by THOM »

You don't need a model beciase this is just a pure socket object. Just mechanic - nothing to see...

Item models are at - well... assets\models\items
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
trancelistic
Posts: 275
Joined: Sat Jun 16, 2012 5:32 am

Re: Question about eye sockets

Post by trancelistic »

Meh. im such a fool.
I blame myself being months on a break, so Ive forgot most.

I still love this game and older rpgs. Specialy people who has the same intrest as me.

I just hope people will try out me dungeon when its finished.... I know log2 is out haha. Its a great game as well. But i'd thought the real dungeon crawler like dm1 is in a way better.. I so want to share my dungeon once its finished.

I hope people will play it<3


I know nexus(site) is online but I never managed to register to it...

I know my heart I should upload my .. soon. finished dungeon there.. but how.. I don't understand the nexus site at all:S
trancelistic
Posts: 275
Joined: Sat Jun 16, 2012 5:32 am

Re: Question about eye sockets

Post by trancelistic »

Thom Thanks for the code. It works perfect<3
Post Reply