Page 2 of 8

Re: [WIP] - Animation Resizer

Posted: Wed Oct 24, 2012 2:35 am
by crisman
Neikun wrote:
JohnWordsworth wrote:Haha, I love the little spiders! Maybe this will help those players that don't like spiders. The really small ones should be able to be stepped on. Haha. Seriously though, a great way to add either weaker spiders in earlier levels or tougher spiders with an alternative skin (smaller = more poisonous theory).
This makes me think.
If you resized them to a realistic size, you could attach them to spiderwebs and spider eggs blockages.
Yes, I've already done that :)
And the effect is fantastic!

Re: [WIP] - Animation Resizer

Posted: Wed Oct 24, 2012 4:13 am
by HaunterV
crisman wrote:
Neikun wrote:
JohnWordsworth wrote:Haha, I love the little spiders! Maybe this will help those players that don't like spiders. The really small ones should be able to be stepped on. Haha. Seriously though, a great way to add either weaker spiders in earlier levels or tougher spiders with an alternative skin (smaller = more poisonous theory).
This makes me think.
If you resized them to a realistic size, you could attach them to spiderwebs and spider eggs blockages.
Yes, I've already done that :)
And the effect is fantastic!

we talking non combative spiders? like they just sit in the web?

Xanathar wrote:https://www.dropbox.com/s/81hyd1xpjmnvbh2/miniogres.zip

Here the moonwalk effect is more visible - both because the legs are less confusing and the size has to be 40% in each dimension to be groupable without problems.

Anyway, better than nothing 8-)

As always, remember to change the attack parameters, etc.
I'll take what I can get.

Re: [WIP] - Animation Resizer

Posted: Wed Oct 24, 2012 4:32 am
by HaunterV
ok so i friggn LOVE The mini ogres... I need someone to make smaller hammers.

also i need help getting the mini ogres to actually do dmg....

Code: Select all

defineObject{
	name = "microogre",
	class = "Monster",
	model = "assets/models/monsters/tunnel_ogre.fbx",
	meshName = "tunnel_ogre_mesh",
	animations = {
		idle = "mod_assets/animations/monsters/tunnel_ogre/tunnel_ogre_idle.fbx",
		moveForward = "mod_assets/animations/monsters/tunnel_ogre/tunnel_ogre_walk.fbx",
		turnLeft = "mod_assets/animations/monsters/tunnel_ogre/tunnel_ogre_turn_left.fbx",
		turnRight = "mod_assets/animations/monsters/tunnel_ogre/tunnel_ogre_turn_right.fbx",
		attack = "mod_assets/animations/monsters/tunnel_ogre/tunnel_ogre_attack.fbx",
		getHitFrontLeft = "mod_assets/animations/monsters/tunnel_ogre/tunnel_ogre_get_hit_front_left_02.fbx",
		getHitFrontRight = "mod_assets/animations/monsters/tunnel_ogre/tunnel_ogre_get_hit_front_right_02.fbx",
		getHitBack = "mod_assets/animations/monsters/tunnel_ogre/tunnel_ogre_get_hit_back_02.fbx",
		getHitLeft = "mod_assets/animations/monsters/tunnel_ogre/tunnel_ogre_get_hit_left_02.fbx",
		getHitRight = "mod_assets/animations/monsters/tunnel_ogre/tunnel_ogre_get_hit_right_02.fbx",
		fall = "mod_assets/animations/monsters/tunnel_ogre/tunnel_ogre_get_hit_back_02.fbx",
	},
	moveSound = "ogre_walk",
	footstepSound = "ogre_footstep",
	attackSound = "ogre_attack",
	hitSound = "ogre_hit",
	impactSound = "ogre_impact",
	dieSound = "ogre_die",
	--soundClipDistance = 8,
	hitEffect = "hit_blood",
	capsuleHeight = 0.6,
	capsuleRadius = 0.6,
	health = 165,
	sight = 4,
	attackPower = 20,
	accuracy = 100,
	protection = 6,
	evasion = -10,
	coolDown = { 2, 3 },
	movementCoolDown = 2,
	noRecoilInterval = { 0.1, 1.0 }, -- interval must end at 1, otherwise turn attack can be interrupted (looks ugly)
	exp = 750,
	lootDrop = { 25, "warhammer" },	
	healthIncrement = 50,
	attackPowerIncrement = 10,
	protectionIncrement = 1,
	brain = "Melee",
}
Can anyone see why they cant actually hit the player ?

Re: [WIP] - Animation Resizer

Posted: Wed Oct 24, 2012 4:36 am
by Batty
HaunterV wrote:Can anyone see why they cant actually hit the player ?
They can't reach? :lol:

Re: [WIP] - Animation Resizer

Posted: Wed Oct 24, 2012 5:13 am
by HaunterV
Batty wrote:
HaunterV wrote:Can anyone see why they cant actually hit the player ?
They can't reach? :lol:
i'm actually thinking that.

Re: [WIP] - Animation Resizer

Posted: Wed Oct 24, 2012 9:43 am
by Xanathar
I'm investigating into that.. seems the animation is also used for collision detection (which is odd given the tile structure of the game) :(

Re: [WIP] - Animation Resizer

Posted: Wed Oct 24, 2012 10:04 am
by Xanathar
This is very very strange.

Basically I tried different scalings first and then directly tried the unscaled animations from the asset pack.

It seems that the attacks work only if the path of the animation starts with "assets/" and doesn't work with "mod_assets/" even if it's the same file. Maybe there is some kind of look-up table in the game to determine the attack frame ? This however would mean that not only scaling the monsters would be somewhat difficult (we can always attach to onAttack and do some magic), but also for any other kind of custom animation monster.

I'm not sure of what I discovered and now I have to go to work.
Will try again later this evening before crying "wolf" :) .

Re: [WIP] - Animation Resizer

Posted: Wed Oct 24, 2012 1:06 pm
by Xanathar
I retested briefly in the lunch break the following:
  • Copy the animation folder of the herder from [...]\assets\animation\monsters to [...]\mod_assets\animation\monsters
  • Copy the lua definition of the herder from monsters.lua into the dungeon's own monsters.lua, rename in "myherder"
  • Change in the definition from assets/animation/[...] to mod_assets/animation/[...]
  • Create an empty room with just myself and "myherder"
  • Result: the herder attacks but never hits
This seem to be an issue in the engine unless, of course, I messed up something in the process.

Update:
I tried with a cloneObject instead of a defineObject => same result.
SpoilerShow

Code: Select all

cloneObject{
	name = "myherder",
	baseObject = "herder",
	animations = {
		idle = "mod_assets/animations/monsters/herder/herder_med_top_idle.fbx",
		moveForward = "mod_assets/animations/monsters/herder/herder_med_top_walk.fbx",
		turnLeft = "mod_assets/animations/monsters/herder/herder_med_top_turn_left.fbx",
		turnRight = "mod_assets/animations/monsters/herder/herder_med_top_turn_right.fbx",
		attack = "mod_assets/animations/monsters/herder/herder_med_top_attack.fbx",
		attack2 = "mod_assets/animations/monsters/herder/herder_med_top_attack_02.fbx",
		getHitFrontLeft = "mod_assets/animations/monsters/herder/herder_med_top_get_hit_front_left.fbx",
		getHitFrontRight = "mod_assets/animations/monsters/herder/herder_med_top_get_hit_front_right.fbx",
		getHitBack = "mod_assets/animations/monsters/herder/herder_med_top_get_hit_back.fbx",
		getHitLeft = "mod_assets/animations/monsters/herder/herder_med_top_get_hit_left.fbx",
		getHitRight = "mod_assets/animations/monsters/herder/herder_med_top_get_hit_right.fbx",
		fall = "mod_assets/animations/monsters/herder/herder_med_top_get_hit_front_left.fbx",
	},
}	

Re: [WIP] - Animation Resizer

Posted: Wed Oct 24, 2012 1:22 pm
by JohnWordsworth
If you are attaching new animations to monsters you will also need to define a host of new animation events which tell the game what events occur at specific frames of the animation. These won't carry over from the previous animations automatically.

For instance...

Code: Select all

defineAnimationEvent{
	animation = "assets/animations/monsters/tunnel_ogre/tunnel_ogre_attack.fbx",
	event = "attack",
	frame = 23,
}
Would need to be reproduced in animation_events.lua of the mod (made up the path name for this example)...

Code: Select all

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/tunnel_ogre/mini_tunnel_ogre_attack.fbx",
	event = "attack",
	frame = 23,
}

Re: [WIP] - Animation Resizer

Posted: Wed Oct 24, 2012 1:36 pm
by Xanathar
Oh my, that was that easy, how could I miss that :|

Thank you very much John!! :)