[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
Eleven Warrior
Posts: 746
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

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

Post by Eleven Warrior »

Awesome Lizard thxs for doing this, now we need to just add the rest of the monsters from LOG 1. Once again fine work :) When I Press K for instant kill the party gets no xp strange.
Grimfan
Posts: 369
Joined: Wed Jan 02, 2013 7:48 am

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

Post by Grimfan »

That's normal for all monsters Eleven.
swampie
Posts: 9
Joined: Sun Nov 02, 2014 1:12 am

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

Post by swampie »

Sooo wait a sec... are all the old monsters in the log2 assets pack? Waiting to be ported over?
SpacialKatana
Posts: 163
Joined: Fri Sep 14, 2012 6:20 pm

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

Post by SpacialKatana »

Any ideas on how to add spells ( a ranged attack like fireball) to , let's say, a Crowern?

I did it for LoG1, but without the asset files for reference I be strugglin to do it :(
User avatar
Zo Kath Ra
Posts: 937
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

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

Post by Zo Kath Ra »

Found this on Deviantart and was instantly reminded of Grimrock:
http://magin-go.deviantart.com/art/Cara ... -436722168
User avatar
blob
Posts: 50
Joined: Fri Aug 02, 2013 9:34 am

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

Post by blob »

Hah, so awesome to have those guys back. Thank you!
User avatar
sps999
Posts: 44
Joined: Sun Oct 26, 2014 11:16 pm

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

Post by sps999 »

Decided to make something a little bit wacky, but I think the code might be useful as an example to some:

Introducing the turbo snail, a snail that moves so fast he leaves a trail of flames everywhere he goes. He also comes with a relatively simple custom brain that has him wander until the party is adjacent to him, and then he'll turn and bite them.

Code: Select all


defineObject{
   name = "snail_turbo",
   baseObject = "base_monster",
   components = {
      {
         class = "Model",
         model = "assets/models/monsters/snail.fbx",
         storeSourceData = true,
      },
      {
         class = "Animation",
         name = "animation",
         currentLevelOnly = true,
         animations = {
            idle = "assets/animations/monsters/snail/snail_idle.fbx",
            moveForward = "assets/animations/monsters/snail/snail_walk.fbx",
            turnLeft = "assets/animations/monsters/snail/snail_turn_left.fbx",
            turnRight = "assets/animations/monsters/snail/snail_turn_right.fbx",
            attack = "assets/animations/monsters/snail/snail_attack.fbx",
            getHitFrontLeft = "assets/animations/monsters/snail/snail_get_hit_front_left.fbx",
            getHitFrontRight = "assets/animations/monsters/snail/snail_get_hit_front_right.fbx",
            getHitBack = "assets/animations/monsters/snail/snail_get_hit_back.fbx",
            getHitLeft = "assets/animations/monsters/snail/snail_get_hit_left.fbx",
            getHitRight = "assets/animations/monsters/snail/snail_get_hit_right.fbx",
            fall = "assets/animations/monsters/snail/snail_get_hit_front_left.fbx",
         },
      },
      {
         class = "Monster",
         meshName = "snail_mesh",
         level=1,
         health = 240,
         evasion = -10,
         exp = 500,
         lootDrop = { 75, "snail_slice", 10, "snail_slice" },
         traits = { "animal" },
         hitEffect = "hit_goo",
         capsuleHeight = 0.2,
         capsuleRadius = 0.7,
         hitSound = "snail_hit",
         dieSound = "snail_die",
		 resistances = { fire="immune"},
		 onPerformAction = function(self, name)
			if name == "move" then
				local fire = spawn("wall_fire", self.go.level, self.go.x, self.go.y, 0, self.go.elevation)
				fire.particle:disable()
				fire.particle2:disable()
				fire.impact:disable()
				fire.light:disable()
			end
         end,
      },
      {
         class = "Brain",
         name = "brain",
		 sight = 0.5,
		 allAroundSight = true,
         onThink = function(self)
			--print(math.abs(self.go.x - party.x))
			--print(math.abs(self.go.y - party.y))
			if math.abs(self.go.x - party.x) + math.abs(self.go.y - party.y) == 1 then
				self:turnTowardsParty()
				self:meleeAttack()
			else
				self:wander()
				self:moveForward()
			end      
		end
      },
      {
         class = "MonsterMove",
         name = "move",
         sound = "snail_walk",
         resetBasicAttack = false,
         turnDir = 0,
         cooldown = 0,
         animationSpeed = 8,
      },
      {
         class = "MonsterTurn",
         name = "turn",
         sound = "snail_walk",
         cooldown = 0,
         animationSpeed = 8,
      },
	  {
         class = "MonsterAttack",
         name = "basicAttack",
         sound = "snail_attack",
         cooldown = 0,
         attackPower = 14,
         animationSpeed = 8,
         animation = "attack",	
      },
   }
}
Note: If you don't already have them, this snail uses the sounds, materials, and animation events from the original snail.
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

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

Post by akroma222 »

@sps999 - Your turbo snail is hilarious! He's sooo fast :D

Question - I have re skinned some snails, based on Prozails code from original post and using model/textures from LoG1
They work fine but the console keeps telling me: cant find head node for snail_blue_green
This is my snail definition
SpoilerShow

Code: Select all

defineObject{
       name = "snail_blue_green",
       baseObject = "base_monster",
       components = {
          {
             class = "Model",
             model = "mod_assets/models/snail_blue_green.fbx",
             storeSourceData = true,
          },
          {
             class = "Animation",
             name = "animation",
             currentLevelOnly = true,
             animations = {
                idle = "assets/animations/monsters/snail/snail_idle.fbx",
                moveForward = "assets/animations/monsters/snail/snail_walk.fbx",
                turnLeft = "assets/animations/monsters/snail/snail_turn_left.fbx",
                turnRight = "assets/animations/monsters/snail/snail_turn_right.fbx",
                attack = "assets/animations/monsters/snail/snail_attack.fbx",
                getHitFrontLeft = "assets/animations/monsters/snail/snail_get_hit_front_left.fbx",
                getHitFrontRight = "assets/animations/monsters/snail/snail_get_hit_front_right.fbx",
                getHitBack = "assets/animations/monsters/snail/snail_get_hit_back.fbx",
                getHitLeft = "assets/animations/monsters/snail/snail_get_hit_left.fbx",
                getHitRight = "assets/animations/monsters/snail/snail_get_hit_right.fbx",
                fall = "assets/animations/monsters/snail/snail_get_hit_front_left.fbx",
             },
          },
          {
             class = "Monster",
             meshName = "snail_mesh",
             level=1,
             health = 90,
             evasion = -10,
             exp = 60,
             lootDrop = { 75, "snail_slice", 10, "snail_slice" },
             traits = { "animal" },
             hitEffect = "hit_goo",
             capsuleHeight = 0.2,
             capsuleRadius = 0.7,
             hitSound = "snail_hit",
             dieSound = "snail_die",
          },
          {
             class = "MeleeBrain",
             name = "brain",
             sight = 2.5,
          },
          {
             class = "MonsterMove",
             name = "move",
             sound = "snail_walk",
             resetBasicAttack = false,
             turnDir = 0,
             cooldown = 4,
          },
          {
             class = "MonsterTurn",
             name = "turn",
             sound = "snail_walk",
             cooldown = 4,
          },
          {
             class = "MonsterAttack",
             name = "basicAttack",
             sound = "snail_attack",
             cooldown = 4,
             attackPower = 6,
             animationSpeed = 1,
             animation = "attack",
          },
       }
    }
Cant seem to sort out this head node business, anyone know what I am doing wrong here??
Grimfan
Posts: 369
Joined: Wed Jan 02, 2013 7:48 am

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

Post by Grimfan »

It doesn't look like there is anything amiss. Did you have any issues with the re-textured lizards?

Change base_object to snail perhaps? :?
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

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

Post by akroma222 »

No problems at all with the retextured lizards... nor with the normal snail.
Tried changing from base_monster to snail but still get the same console msg
Tried opening and closing editor instead of reloading but no change either...

Hmm :?
Post Reply