Monster needed: Ice Skeleton

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
Kuningas
Posts: 268
Joined: Wed Apr 11, 2012 10:29 pm
Location: Northern Finland

Re: Monster needed: Ice Skeleton

Post by Kuningas »

HaunterV wrote:
Kuningas wrote:Speaking of nodes, are the different monsters' nodes listed somewhere?
per monster.... definately something for a wiki.
At least for now, it seems one can see a list of nodes in the GrimrockModelToolkit, but of course it involves opening the model. So this info can be extracted, but categorising it will be a pain. Now we can use good old trial and error!
BASILEUS
User avatar
Daght
Posts: 146
Joined: Sun Apr 15, 2012 12:28 pm
Location: Italy

Re: Monster needed: Ice Skeleton

Post by Daght »

Daniv wrote:I managed to find a way to move the particles with the skeleton. With a little trial and error, I found that "hip" counts as a node, and it's pretty much in the middle of the model. The only problem was that the crystal particles are centered to grow upwards from a floor placement, so I copied the script for the crystal particles and made a new one with the same settings, but with boxMin and boxMax set to grow both up and down:

Code: Select all

defineParticleSystem{
	name = "cold_glow",
	emitters = {
		-- fog
		{
			emissionRate = 10,
			emissionTime = 0,
			maxParticles = 1000,
			boxMin = {-0.5, -1.25,-0.5},
			boxMax = { 0.5, 1.25, 0.5},
			sprayAngle = {0,360},
			velocity = {0.1,0.2},
			objectSpace = true,
			texture = "assets/textures/particles/fog.tga",
			lifetime = {3,3},
			color0 = {0.152941, 0.352941, 0.803922},
			opacity = 1,
			fadeIn = 2.2,
			fadeOut = 2.2,
			size = {1.5, 1.5},
			gravity = {0,0,0},
			airResistance = 0.1,
			rotationSpeed = 0.3,
			blendMode = "Additive",
		},

		-- stars
		{
			emissionRate = 200,
			emissionTime = 0,
			maxParticles = 1000,
			boxMin = {-0.6, -1,-0.6},
			boxMax = { 0.6, 1, 0.6},
			sprayAngle = {0,360},
			velocity = {0.2,0.2},
			objectSpace = true,
			texture = "assets/textures/particles/teleporter.tga",
			lifetime = {1,1},
			color0 = {3.0,3.0,3.0},
			opacity = 1,
			fadeIn = 0.1,
			fadeOut = 0.1,
			size = {0.05, 0.13},
			gravity = {0,0,0},
			airResistance = 0.1,
			rotationSpeed = 2,
			blendMode = "Additive",
		}
	}
}
Then I just added the following to the skeleton's script:

particleSystem = "cold_glow",
particleSystemNode = "hip",

It works fine for me, so I hope this helps. ;)
where i must put this code? I mean, the name of the .lua file.
If we do not end the war, the war will end us.
User avatar
Daniv
Posts: 29
Joined: Sat Aug 11, 2012 10:34 am
Location: Northamptonshire, England

Re: Monster needed: Ice Skeleton

Post by Daniv »

I'd suggest making 3 new .lua files.
The first one would be for your custom particles, maybe something like "daght_particles.lua", which is where you'd put the script I showed you.
Then you'd want one for your custom monsters, such as "daght_monsters.lua", where you would put your new skeleton.
The third one would be an overall file to group your custom files together, with a name like "daght_mods.lua".

Then you'd be able to use the "daght_mods.lua" file to import as many custom files as you like in one place. For your skeleton and its particles you'd want to add this to the "daght_mods.lua" file:

import "mod_assets/scripts/daght_particles.lua"
import "mod_assets/scripts/daght_monsters.lua"

You can keep adding more custom .lua files to this list and it keeps everything tidy.
Then all you have to do is open the "init.lua" file that you'll find in your dungeon's scripts folder and add one line:

import "mod_assets/scripts/daght_mods.lua"

And that's it (I hope!).
User avatar
HaunterV
Posts: 676
Joined: Mon Apr 16, 2012 9:54 pm
Location: Barrie, Ontario, Canada

Re: Monster needed: Ice Skeleton

Post by HaunterV »

Daniv wrote:I'd suggest making 3 new .lua files.
The first one would be for your custom particles, maybe something like "daght_particles.lua", which is where you'd put the script I showed you.
Then you'd want one for your custom monsters, such as "daght_monsters.lua", where you would put your new skeleton.
The third one would be an overall file to group your custom files together, with a name like "daght_mods.lua".

Then you'd be able to use the "daght_mods.lua" file to import as many custom files as you like in one place. For your skeleton and its particles you'd want to add this to the "daght_mods.lua" file:

import "mod_assets/scripts/daght_particles.lua"
import "mod_assets/scripts/daght_monsters.lua"

You can keep adding more custom .lua files to this list and it keeps everything tidy.
Then all you have to do is open the "init.lua" file that you'll find in your dungeon's scripts folder and add one line:

import "mod_assets/scripts/daght_mods.lua"

And that's it (I hope!).
crazy. I think I stumbled onto this fix all by myself.

i like how the radiant pillar looks behind the prison statues <---- oops wrong thread.
Grimrock Community 'FrankenDungeon 2012. Submit your entry now!: http://tinyurl.com/cnupr7h
SUBMIT YOUR ASSETS! Community Asset Pack (C.A.P.): http://tinyurl.com/bqvykrp
Behold! The HeroQuest Revival!: http://tinyurl.com/cu52ksc
Post Reply