Page 3 of 5

Re: [Monster] Bring on the snails! *working*

Posted: Tue Nov 04, 2014 1:01 am
by sps999
Just figured out I was missing: "turnToAttackDirection = true,". Putting that in allowed him to execute is turn attack.

But I also overlooked the Ice Lizard's immunity to cold. I tried adding in "immunities = { "cold", } but he still takes damage from cold attacks and can even be frozen.

Considering monsters now have weaknesses and resistances I figured maybe "immunities = { "cold", } is now outdated.
So I tried using "resistances = { "cold", } but no matter what I put into resistances the game prints: "warning! invalid resistance: cold" (or whatever I put in)

Does anyone know how to work with these? I'll probably try to mess with the editor for a while to get it to print() out a hint.


Edit: It also appears the turn attack doesn't do any damage. :(
Edit the Edit: Had to change event names in animation event from "attack_left" and "attack_right" to just "attack".

Re: [Monster] Bring on the snails! *working*

Posted: Tue Nov 04, 2014 2:02 am
by Prozail
resistances = { cold="absorb", fire="weak"},
immunities = { "sleep", "blinded", "frozen" },


Edit: a few more... apparently you can be "vulnerable", "immune", "resist"
Edit 2:
resistances
fire
poison
shock
cold

resistlevel
weak
resist
vulnerable
immune
absorb

traits
animal
undead
elemental

immunities
sleep
blinded
frozen
stunned
knockback
backstab
poisoned

Re: [Monster] Bring on the snails! *working*

Posted: Tue Nov 04, 2014 2:18 am
by sps999
Works perfectly, thanks Prozail.

Updated the code from the old post, but if you decide to use it keep in mind I have taken some liberties with resistances considering there are new mechanics in Grimrock 2:

I gave the Ice Lizard cold immunity and not absorption (Since he is organic), weakness to fire (which is obvious but different from Grimrock 1) , and immunity to blind (Lizards smell right? I can't tell if those tiny eyes are useless or specially made to be even better at seeing. I vaguely remember some warning in Grimrock 1 right before encountering them, but I'm not sure if the warning hinted towards any of their senses being keen).

Some of these things might not be how the Ice Lizard was in Grimrock 1 so if you want him to be as accurate as possible these are the changes you might have to make.

Re: [Monster] Bring on the snails! *working*

Posted: Tue Nov 04, 2014 2:22 am
by Prozail
I don't mind.. I think i went for the ice-elemental to check what he had :) that's why it became "absorb".... I'm getting pretty good at reading compiled lua-code in notepad++

Re: [Monster] Bring on the snails! *working*

Posted: Tue Nov 04, 2014 2:50 am
by SpacialKatana
Tried the lizard. He works , runs around and I can hit him....but he just barks at me and does no damage :(

Re: [Monster] Bring on the snails! *working*

Posted: Tue Nov 04, 2014 2:53 am
by Prozail
Ah, i think sps999 accidentally deleted someting when he updated the immunities.. This part should go before the monster-definition:

After adding it, be sure to restart the editor (not just reload the project)

Code: Select all


defineAnimationEvent{
   animation = "assets/animations/monsters/ice_lizard/ice_lizard_attack.fbx",
   event = "attack",
   frame = 10,
}

defineAnimationEvent{
   animation = "assets/animations/monsters/ice_lizard/ice_lizard_attack_left.fbx",
   event = "attack",
   frame = 10,
}

defineAnimationEvent{
   animation = "assets/animations/monsters/ice_lizard/ice_lizard_attack_right.fbx",
   event = "attack",
   frame = 10,
}

defineAnimationEvent{
   animation = "assets/animations/monsters/ice_lizard/ice_lizard_walk.fbx",
   event = "footstep",
   frame = 10,
}

defineAnimationEvent{
   animation = "assets/animations/monsters/ice_lizard/ice_lizard_walk.fbx",
   event = "footstep",
   frame = 21,
}

defineAnimationEvent{
   animation = "assets/animations/monsters/ice_lizard/ice_lizard_turn_left.fbx",
   event = "footstep",
   frame = 10,
}

defineAnimationEvent{
   animation = "assets/animations/monsters/ice_lizard/ice_lizard_turn_right.fbx",
   event = "footstep",
   frame = 10,
}


Re: [Monster] Bring on the snails! *working*

Posted: Tue Nov 04, 2014 3:08 am
by SpacialKatana
Cheers Prozail...I get eaten now, they bite hard lol.

Re: [Monster] Bring on the snails! *working*

Posted: Tue Nov 04, 2014 5:53 am
by sps999
Whoops, looks like I did. I'll put it back in the post.

Re: [Monster] Bring on the snails! *working*

Posted: Tue Nov 04, 2014 5:55 am
by NutJob
Prozail wrote: Note: When dabbling with definition files outside the editor... Some changes gets read on CTRL+R, but not all.. some stuff is cached!
So! RESTART YOUR EDITOR EVERY ONCE IN A WHILE
To further expand on this, I too, found textual edits to scripts (either modified, added, or removed code) sometimes get cached. So if you know for certain you removed that print(), or loop, etc. but it's still printing, looping etc'ing (lol) just restart the editor.

Re: [Monster] Bring on the snails! *working*

Posted: Tue Nov 04, 2014 7:21 am
by Grimfan
I got back from work and fired up the editor to start converting the ice lizard across and lo and behold it has already been done! :lol:

I love the people here sometimes. :D