Page 2 of 2

Re: Monster needed: Ice Skeleton

Posted: Mon Oct 08, 2012 4:10 pm
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!

Re: Monster needed: Ice Skeleton

Posted: Tue Oct 09, 2012 12:49 pm
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.

Re: Monster needed: Ice Skeleton

Posted: Tue Oct 09, 2012 4:36 pm
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!).

Re: Monster needed: Ice Skeleton

Posted: Tue Oct 09, 2012 6:04 pm
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.