Page 1 of 2

Monster needed: Ice Skeleton

Posted: Sun Oct 07, 2012 8:36 am
by Daght
I need the Skeleton Archer to have a particle system on it (crystal of life will do it at best). It must have ore Hit Point and do not fire arrows but ice_shards and use the ice_shards only when its in reach.
Can someone help me?

Re: Monster needed: Ice Skeleton

Posted: Sun Oct 07, 2012 5:24 pm
by Skuggasveinn
Here you go

Code: Select all

defineObject{
	name = "skeleton_archer_ice",
	class = "Monster",
	model = "assets/models/monsters/skeleton_archer.fbx",
	meshName = "skeleton_archer_mesh",
	animations = {
		idle = "assets/animations/monsters/skeleton_archer/skeleton_archer_idle.fbx",
		moveForward = "assets/animations/monsters/skeleton_archer/skeleton_archer_walk.fbx",
		strafeLeft = "assets/animations/monsters/skeleton_archer/skeleton_archer_strafe_left.fbx",
		strafeRight = "assets/animations/monsters/skeleton_archer/skeleton_archer_strafe_right.fbx",
		turnLeft = "assets/animations/monsters/skeleton_archer/skeleton_archer_turn_left.fbx",
		turnRight = "assets/animations/monsters/skeleton_archer/skeleton_archer_turn_right.fbx",
		attack = "assets/animations/monsters/skeleton_archer/skeleton_archer_attack.fbx",
		attackBack = "assets/animations/monsters/skeleton_archer/skeleton_archer_attack.fbx",
		getHitFrontLeft = "assets/animations/monsters/skeleton_archer/skeleton_archer_get_hit_front_left.fbx",
		getHitFrontRight = "assets/animations/monsters/skeleton_archer/skeleton_archer_get_hit_front_right.fbx",
		getHitBack = "assets/animations/monsters/skeleton_archer/skeleton_archer_get_hit_back.fbx",
		getHitLeft = "assets/animations/monsters/skeleton_archer/skeleton_archer_get_hit_left.fbx",
		getHitRight = "assets/animations/monsters/skeleton_archer/skeleton_archer_get_hit_right.fbx",
		fall = "assets/animations/monsters/skeleton_archer/skeleton_archer_get_hit_front_left.fbx",
	},
	moveSound = "skeleton_walk",
	footstepSound = "skeleton_archer_footstep",
	attackSound = "skeleton_archer_attack",
	hitSound = "skeleton_hit",
	dieSound = "skeleton_die",
	hitEffect = "hit_dust",
	capsuleHeight = 0.7,
	capsuleRadius = 0.25,
	collisionRadius = 0.6,
	health = 120,
	sight = 6,
	attackPower = 14,
	rangedAttack = "ice_shards",
	coolDown = { 1, 4 },
	protection = 5,
	particleSystem = "crystal",
	particleSystemNode = "skeleton_archer_mesh",
	immunities = { "poison", "cold" },
	movementCoolDown = 2,
	noRecoilInterval = { 0.25, 0.5 },
	lootDrop = { 35, "cold_arrow" },
	exp = 90,
	healthIncrement = 15,
	attackPowerIncrement = 5,
	brain = "Ranged",
}
drop this in your monsters.lua under your mod_assets\scripts folder an reload you project.
You will see a new monster asset called skeleton_archer_ice

Take a look at the skeleton here
http://cloud-2.steampowered.com/ugc/540 ... F3C0E6E99/

few things to note: the particle system is set to the mesh of the archer, but when the archer moves, the particle system does not until the archer has fully crossed over to the next tile (you will see this as soon as you try)

you can play around with this by signin the particles to another area of the model and even change the particle system, its controlled by these 2 lines.

Code: Select all

	particleSystem = "crystal",
	particleSystemNode = "skeleton_archer_mesh",
also the ranged attack can be changed from ice_shards to lets say improved_frostbolt by simply changing the attack

Code: Select all

	rangedAttack = "ice_shards",
I have also giving it another immunity (all skeletons are immune to poison) since its an Ice Skeleton.

Code: Select all

	immunities = { "poison", "cold" },
have fun.

Skuggasveinn.

Re: Monster needed: Ice Skeleton

Posted: Sun Oct 07, 2012 5:29 pm
by Kuningas
Well I tried. I got it to fire frost shards and just changed it's sight to four. It spots the party later now, I think, but it does try to get into range after that.

Adding the crystal particles was not hard either, but they don't follow with it's animations and the result looks bad. See for yourself.

Here is what I've got, if someone more skilled wants to improve, just add it to the monsters script and you should be good to go.:

Code: Select all

defineObject{
	name = "frost_skeleton_archer",
	class = "Monster",
	model = "assets/models/monsters/skeleton_archer.fbx",
	meshName = "skeleton_archer_mesh",
	animations = {
		idle = "assets/animations/monsters/skeleton_archer/skeleton_archer_idle.fbx",
		moveForward = "assets/animations/monsters/skeleton_archer/skeleton_archer_walk.fbx",
		strafeLeft = "assets/animations/monsters/skeleton_archer/skeleton_archer_strafe_left.fbx",
		strafeRight = "assets/animations/monsters/skeleton_archer/skeleton_archer_strafe_right.fbx",
		turnLeft = "assets/animations/monsters/skeleton_archer/skeleton_archer_turn_left.fbx",
		turnRight = "assets/animations/monsters/skeleton_archer/skeleton_archer_turn_right.fbx",
		attack = "assets/animations/monsters/skeleton_archer/skeleton_archer_attack.fbx",
		attackBack = "assets/animations/monsters/skeleton_archer/skeleton_archer_attack.fbx",
		getHitFrontLeft = "assets/animations/monsters/skeleton_archer/skeleton_archer_get_hit_front_left.fbx",
		getHitFrontRight = "assets/animations/monsters/skeleton_archer/skeleton_archer_get_hit_front_right.fbx",
		getHitBack = "assets/animations/monsters/skeleton_archer/skeleton_archer_get_hit_back.fbx",
		getHitLeft = "assets/animations/monsters/skeleton_archer/skeleton_archer_get_hit_left.fbx",
		getHitRight = "assets/animations/monsters/skeleton_archer/skeleton_archer_get_hit_right.fbx",
		fall = "assets/animations/monsters/skeleton_archer/skeleton_archer_get_hit_front_left.fbx",
	},
	moveSound = "skeleton_walk",
	footstepSound = "skeleton_archer_footstep",
	attackSound = "skeleton_archer_attack",
	hitSound = "skeleton_hit",
	dieSound = "skeleton_die",
	hitEffect = "hit_dust",
	capsuleHeight = 0.7,
	capsuleRadius = 0.25,
	collisionRadius = 0.6,
	health = 150,
	sight = 4,
	attackPower = 14,
	rangedAttack = "ice_shards",
	coolDown = { 1, 4 },
	protection = 5,
	immunities = { "poison" },
	movementCoolDown = 2,
	noRecoilInterval = { 0.25, 0.5 },
	lootDrop = { 35, "frost_bomb" },
	exp = 90,
	particleSystem = "crystal",
	healthIncrement = 15,
	attackPowerIncrement = 5,
	brain = "SkeletonArcher",
}
EDIT: Hoho, Ninja'd! And it looks like a much better solution, too.

Re: Monster needed: Ice Skeleton

Posted: Sun Oct 07, 2012 5:46 pm
by Skuggasveinn
@Kuningas good call to lower the sight , my skeleton fires when they see the player, even if they are outoff range.

Re: Monster needed: Ice Skeleton

Posted: Sun Oct 07, 2012 6:12 pm
by Daniv
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. ;)

Re: Monster needed: Ice Skeleton

Posted: Sun Oct 07, 2012 6:15 pm
by HaunterV
awesome

a shame i never can get particle systems to work... i cut n paste and all i get is particle system not found or some such jazz

Re: Monster needed: Ice Skeleton

Posted: Sun Oct 07, 2012 9:14 pm
by HaunterV
What if we do sometihng similar with the Uggardian?
the Balrog in the LoTR movie was a model covered in 1000 candles. what if we do the same but with smaller teleporter glows all over the uggardian's body?

Re: Monster needed: Ice Skeleton

Posted: Sun Oct 07, 2012 9:20 pm
by HaunterV
ok fixed my particle system issue from before, i understand it now.

however i tried cloneObject on the ice shards spell and renamed it and changed the range to 6. it just doesnt seem to work.

i actually cant change the attack to frostbolt for some reason.

Re: Monster needed: Ice Skeleton

Posted: Mon Oct 08, 2012 3:43 pm
by Kuningas
Speaking of nodes, are the different monsters' nodes listed somewhere?

Re: Monster needed: Ice Skeleton

Posted: Mon Oct 08, 2012 3:56 pm
by HaunterV
Kuningas wrote:Speaking of nodes, are the different monsters' nodes listed somewhere?
per monster.... definately something for a wiki.