Page 3 of 8

Re: [WIP] - Animation Resizer

Posted: Wed Oct 24, 2012 3:20 pm
by Batty
Now we need feet in the UI so all these little critters can be kicked in the face, crotch, 5 tiles forward, etc. :lol:

Re: [WIP] - Animation Resizer

Posted: Wed Oct 24, 2012 3:52 pm
by thomson
What we really need now a "Shrink monster" spell. That ogre gives you a hard time? Shrink him and then well talk differently.

Re: [WIP] - Animation Resizer

Posted: Wed Oct 24, 2012 3:55 pm
by Batty
thomson wrote:What we really need now a "Shrink monster" spell. That ogre gives you a hard time? Shrink him and then well talk differently.
Nice idea! That may be doable too!

Re: [WIP] - Animation Resizer

Posted: Wed Oct 24, 2012 6:32 pm
by SpiderFighter
Batty wrote:
thomson wrote:What we really need now a "Shrink monster" spell. That ogre gives you a hard time? Shrink him and then well talk differently.
Nice idea! That may be doable too!
Hmm...do I smell a Duke Nukem 3D remake coming on? :D

Re: [WIP] - Animation Resizer

Posted: Wed Oct 24, 2012 8:46 pm
by HaunterV
JohnWordsworth wrote: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,
}

So if I stuff that into the code, it should work now? I'll try when I get home.

Re: [WIP] - Animation Resizer

Posted: Thu Oct 25, 2012 1:23 am
by JohnWordsworth
@HaunterV: A complete guess (you will need to be put the real variables / paths in), but I'm almost certain you will need to add animation events to your new animations (even though they are just rescaled, they are complete new animations) through Lua before the game will know when to 'hit' you during an attack.

Re: [WIP] - Animation Resizer

Posted: Thu Oct 25, 2012 4:32 am
by HaunterV
JohnWordsworth wrote:@HaunterV: A complete guess (you will need to be put the real variables / paths in), but I'm almost certain you will need to add animation events to your new animations (even though they are just rescaled, they are complete new animations) through Lua before the game will know when to 'hit' you during an attack.

ok so i'm going to start by looking over the ogre events and working from there.

any help is welcome even if its just advice.

Re: [WIP] - Animation Resizer

Posted: Thu Oct 25, 2012 5:03 am
by HaunterV
i am dissappoint...
SpoilerShow

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/micro_ogre/micro_ogre_idle.fbx",
		moveForward = "mod_assets/animations/monsters/micro_ogre/micro_ogre_walk.fbx",
		turnLeft = "mod_assets/animations/monsters/micro_ogre/micro_ogre_turn_left.fbx",
		turnRight = "mod_assets/animations/monsters/micro_ogre/micro_ogre_turn_right.fbx",
		attack = "mod_assets/animations/monsters/micro_ogre/micro_ogre_attack.fbx",
		getHitFrontLeft = "mod_assets/animations/monsters/micro_ogre/micro_ogre_get_hit_front_left_02.fbx",
		getHitFrontRight = "mod_assets/animations/monsters/micro_ogre/micro_ogre_get_hit_front_right_02.fbx",
		getHitBack = "mod_assets/animations/monsters/micro_ogre/micro_ogre_get_hit_back_02.fbx",
		getHitLeft = "mod_assets/animations/monsters/micro_ogre/micro_ogre_get_hit_left_02.fbx",
		getHitRight = "mod_assets/animations/monsters/micro_ogre/micro_ogre_get_hit_right_02.fbx",
		fall = "mod_assets/animations/monsters/micro_ogre/micro_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",
}
	

defineObject{
	name = "microogre_patrol",
	class = "MonsterGroup",
	monsterType = "microogre",
	count = 4,
}	

and the events

SpoilerShow

Code: Select all



-------------------------------------------------------
-- MicroOgre
-------------------------------------------------------

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

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_attack.fbx",
	event = "playSound:ogre_whoosh",
	frame = 17,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_attack_stab.fbx",
	event = "attack",
	frame = 12,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_attack_two_handed.fbx",
	event = "attack",
	frame = 36,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_attack_left.fbx",
	event = "attack_left",
	frame = 16,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_attack_left.fbx",
	event = "playSound:ogre_whoosh",
	frame = 12,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_attack_right.fbx",
	event = "attack_right",
	frame = 11,
}

defineAnimationEvent{
	animation = "modassets/animations/monsters/micro_ogre/micro_ogre_attack_right.fbx",
	event = "playSound:ogre_whoosh",
	frame = 5,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_attack_leap.fbx",
	event = "attack",
	frame = 42,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_attack_leap.fbx",
	event = "footstep",
	frame = 34,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_attack_leap.fbx",
	event = "footstep",
	frame = 38,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_rush_hit_left_step.fbx",
	event = "rush_attack",
	frame = 3
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_rush_hit_right_step.fbx",
	event = "rush_attack",
	frame = 3,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_walk.fbx",
	event = "footstep",
	frame = 16,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_walk.fbx",
	event = "footstep",
	frame = 33,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_walk.fbx",
	event = "footstep",
	frame = 48,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_turn_right.fbx",
	event = "footstep",
	frame = 16,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_turn_right.fbx",
	event = "footstep",
	frame = 32,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_turn_left.fbx",
	event = "footstep",
	frame = 16,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_turn_left.fbx",
	event = "footstep",
	frame = 28,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_rush_begin.fbx",
	event = "footstep",
	frame = 29,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_rush_continue_right_step.fbx",
	event = "footstep",
	frame = 5,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_rush_continue_left_step.fbx",
	event = "footstep",
	frame = 6,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_rush_hit_left_step.fbx",
	event = "footstep",
	frame = 4,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_rush_hit_right_step.fbx",
	event = "footstep",
	frame = 4,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_attack_right.fbx",
	event = "footstep",
	frame = 30,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_attack_right.fbx",
	event = "footstep",
	frame = 40,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_attack_left.fbx",
	event = "footstep",
	frame = 9,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_attack_left.fbx",
	event = "footstep",
	frame = 40,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_attack.fbx",
	event = "footstep",
	frame = 19,
}

defineAnimationEvent{
	animation = "mod_assets/animations/monsters/micro_ogre/micro_ogre_attack.fbx",
	event = "footstep",
	frame = 39,
}
still no damage being handed out. unless I misunderstood Johns advice.

Re: [WIP] - Animation Resizer

Posted: Thu Oct 25, 2012 12:01 pm
by Neikun
It probably is infact that they literally cannot reach.
In my work with alcoves, I discovered that something cannot be in the middle of the square and still be interactive with the player.
Try putting your tiny ogre in a monster group of four and see if it still occurs.

Re: [WIP] - Animation Resizer

Posted: Thu Oct 25, 2012 1:21 pm
by Xanathar
No, there is no collision detection in animation in the end - and for me it's working so no problem.

A checklist of a couple of things for you to understand why it isn't working:
  • Double check the file names of animation files
  • Check that an import "mod_assets/scripts/animation_events.lua" is in init.lua (it isn't by default) or simply defineAnimationEvent somewhere else.