[Monster] Bring on the snails! [now with turbo-mode]

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
User avatar
sps999
Posts: 44
Joined: Sun Oct 26, 2014 11:16 pm

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

Post 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".
User avatar
Prozail
Posts: 158
Joined: Mon Oct 27, 2014 3:36 pm

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

Post 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
User avatar
sps999
Posts: 44
Joined: Sun Oct 26, 2014 11:16 pm

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

Post 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.
Last edited by sps999 on Tue Nov 04, 2014 2:24 am, edited 1 time in total.
User avatar
Prozail
Posts: 158
Joined: Mon Oct 27, 2014 3:36 pm

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

Post 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++
SpacialKatana
Posts: 163
Joined: Fri Sep 14, 2012 6:20 pm

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

Post by SpacialKatana »

Tried the lizard. He works , runs around and I can hit him....but he just barks at me and does no damage :(
User avatar
Prozail
Posts: 158
Joined: Mon Oct 27, 2014 3:36 pm

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

Post 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,
}

SpacialKatana
Posts: 163
Joined: Fri Sep 14, 2012 6:20 pm

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

Post by SpacialKatana »

Cheers Prozail...I get eaten now, they bite hard lol.
User avatar
sps999
Posts: 44
Joined: Sun Oct 26, 2014 11:16 pm

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

Post by sps999 »

Whoops, looks like I did. I'll put it back in the post.
NutJob
Posts: 426
Joined: Sun Oct 19, 2014 6:35 pm

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

Post 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.
Grimfan
Posts: 369
Joined: Wed Jan 02, 2013 7:48 am

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

Post 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
Post Reply