Demon Head Eye Sockets.

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
King Semos
Posts: 123
Joined: Sun Apr 15, 2012 6:05 pm

Demon Head Eye Sockets.

Post by King Semos »

Hey guys, I had a quick question. I can't seem to figure out how to make a Coloured Gem respond to a left or right eye socket. I figured it would be like locks and how you chose which keys respond to which locks. Anyone familiar with this?
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Demon Head Eye Sockets.

Post by Neikun »

The Alcove Guy does! haha
The gem colour that is needed to be put in the socket is defined by the socket's object definition.
The base one accepts only blue gems. If you were to copy the eye socket definitions out of the asset pack, replaced the word "blue_gem" with the color gem of your choice, you'll do fine.
You should also give these new objects names that differ from the eye_sockets you have selected from the asset browser.
My suggestion: in relevance to the colour of the gem needed.
"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
King Semos
Posts: 123
Joined: Sun Apr 15, 2012 6:05 pm

Re: Demon Head Eye Sockets.

Post by King Semos »

Neikun wrote:The Alcove Guy does! haha
The gem colour that is needed to be put in the socket is defined by the socket's object definition.
The base one accepts only blue gems. If you were to copy the eye socket definitions out of the asset pack, replaced the word "blue_gem" with the color gem of your choice, you'll do fine.
You should also give these new objects names that differ from the eye_sockets you have selected from the asset browser.
My suggestion: in relevance to the colour of the gem needed.

Hmm, I'm not quite sure how to find the eye socket definitions, or the asset pack. Where do I locate this stuff, if it's in a folder in windows, do I open it with notepad?
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Demon Head Eye Sockets.

Post by Neikun »

The asset pack is a free resource for modders. In it, you'll find scripts and files of all the assets you have access to with the editor.
You can find a download link on the modding tab at the top of the page.
"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
Pandafox
Posts: 268
Joined: Wed Apr 11, 2012 11:25 pm
Location: France
Contact:

Re: Demon Head Eye Sockets.

Post by Pandafox »

hi

yes you can edit with notepad.
the script files to edit are here :
C:\Users\username\Documents\Almost Human\Legend of Grimrock\Dungeons\the_name_of_your dungeon\mod_assets\scripts

in order to make a combination, red gem for left eye and blue gem for right eye, for example, you must add the following scripts into the file 'object.lua'

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_blue",
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 == "blue_gem" and

self:getItemCount() == 0
end,
editorIcon = 92,
}


Then you can add the 2 scoket objects on the demon head in the editor.
Next, you must create the script to check the 2 gems are inside using the object 'counter' ... you can find information about it in this forum... ;)
User avatar
King Semos
Posts: 123
Joined: Sun Apr 15, 2012 6:05 pm

Re: Demon Head Eye Sockets.

Post by King Semos »

Pandafox wrote:hi

yes you can edit with notepad.
the script files to edit are here :
C:\Users\username\Documents\Almost Human\Legend of Grimrock\Dungeons\the_name_of_your dungeon\mod_assets\scripts

in order to make a combination, red gem for left eye and blue gem for right eye, for example, you must add the following scripts into the file 'object.lua'

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_blue",
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 == "blue_gem" and

self:getItemCount() == 0
end,
editorIcon = 92,
}


Then you can add the 2 scoket objects on the demon head in the editor.
Next, you must create the script to check the 2 gems are inside using the object 'counter' ... you can find information about it in this forum... ;)
wow, thanks. That is really complicated I would have never figured this out on my own. Scripting with all the curious terms and characters in a proper sequence is something I am 100% unfamiliar with. Any source where I can learn the basics for this?
User avatar
Pandafox
Posts: 268
Joined: Wed Apr 11, 2012 11:25 pm
Location: France
Contact:

Re: Demon Head Eye Sockets.

Post by Pandafox »

the best I think, is to read all the topics about scriptings into this forum and be patient to learn :P
You also should download the asset_pack_v2 which contains all the basic scripts. Then you can try to modify them for training...
http://www.grimrock.net/modding/asset-pack/
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Demon Head Eye Sockets.

Post by Komag »

Read all the stuff from the Superthread:
viewtopic.php?f=14&t=3240
3 steps:
- watch the videos
- try out some of the "easy" scripts from the script repository
- become awesome at Grimrock modding!
Finished Dungeons - complete mods to play
Post Reply