Page 2 of 3

Re: some problems

Posted: Fri Sep 25, 2015 8:06 pm
by Drakkan
Modraneth wrote:For me, the easiest way to fix the sound issues with the Goromorg and Scavenger was to just simply use the monster sounds that come with LoG2.
u need the assect pack 2 for this right ?
yep, all monster sounds are withing each monster definitions

Re: some problems

Posted: Fri Sep 25, 2015 8:24 pm
by Modraneth
Drakkan wrote:
Modraneth wrote:For me, the easiest way to fix the sound issues with the Goromorg and Scavenger was to just simply use the monster sounds that come with LoG2.
u need the assect pack 2 for this right ?
yep, all monster sounds are withing each monster definitions
ok thank you

Re: some problems

Posted: Fri Sep 25, 2015 9:10 pm
by THOM
To make it more clear: You do not need to have downloaded the asset pack. All sounds Sutekh uses in his example are already in the game. His definitions will work without owning the asset pack...

Re: some problems

Posted: Fri Sep 25, 2015 9:38 pm
by Modraneth
THOM wrote:To make it more clear: You do not need to have downloaded the asset pack. All sounds Sutekh uses in his example are already in the game. His definitions will work without owning the asset pack...
i had tried and dont work on me..
so maybe i do something wrong.
where i need to past that? on the sound.lua right?

Re: some problems

Posted: Sat Sep 26, 2015 12:02 am
by Sutekh
If you have the asset pack, just place a copy of the goromorg.lua and scavenger.lua files in your mod's assets/scripts folder. Open these .lua files in a text editor and you'll see the sound definitions at the bottom, where you can change the sound files to whatever you want. Save the changes and then open your mod's init.lua file and add the following lines:

Code: Select all

import "mod_assets/scripts/goromorg.lua"
import "mod_assets/scripts/scavenger.lua"

Re: some problems

Posted: Sat Sep 26, 2015 10:47 am
by Modraneth
Sutekh wrote:If you have the asset pack, just place a copy of the goromorg.lua and scavenger.lua files in your mod's assets/scripts folder. Open these .lua files in a text editor and you'll see the sound definitions at the bottom, where you can change the sound files to whatever you want. Save the changes and then open your mod's init.lua file and add the following lines:

Code: Select all

import "mod_assets/scripts/goromorg.lua"
import "mod_assets/scripts/scavenger.lua"
hi, i have downloaded this assect pack
maybe i got the wrong one because i dont found a file scavenger.lua here
http://www.grimrock.net/modding_log1/asset-pack/

Re: some problems

Posted: Sat Sep 26, 2015 11:35 am
by Sutekh

Re: some problems

Posted: Sat Sep 26, 2015 11:38 am
by Modraneth

Re: some problems

Posted: Sun Sep 27, 2015 10:01 pm
by Modraneth
im using this code to Goromog

Code: Select all

defineObject{
	name = "goromorg",
	baseObject = "base_monster",
	components = {
		{
			class = "Model",
			model = "assets/models/monsters/goromorg.fbx",
			storeSourceData = true,
		},
		{
			class = "Animation",
			animations = {
				idle = "assets/animations/monsters/goromorg/goromorg_idle.fbx",
				moveForward = "assets/animations/monsters/goromorg/goromorg_walk.fbx",
				strafeLeft = "assets/animations/monsters/goromorg/goromorg_strafe_left.fbx",
				strafeRight = "assets/animations/monsters/goromorg/goromorg_strafe_right.fbx",
				turnLeft = "assets/animations/monsters/goromorg/goromorg_turn_left.fbx",
				turnRight = "assets/animations/monsters/goromorg/goromorg_turn_right.fbx",
				attack = "assets/animations/monsters/goromorg/goromorg_attack.fbx",
				getHitFrontLeft = "assets/animations/monsters/goromorg/goromorg_get_hit_front_left.fbx",
				getHitFrontRight = "assets/animations/monsters/goromorg/goromorg_get_hit_front_right.fbx",
				getHitBack = "assets/animations/monsters/goromorg/goromorg_get_hit_back.fbx",
				getHitLeft = "assets/animations/monsters/goromorg/goromorg_get_hit_left.fbx",
				getHitRight = "assets/animations/monsters/goromorg/goromorg_get_hit_right.fbx",
				fall = "assets/animations/monsters/goromorg/goromorg_get_hit.fbx",
			},
			currentLevelOnly = true,
		},
		{
			class = "Monster",
			meshName = "goromorg_mesh",
			hitSound = "slime_hit", -- identical to goromorg_hit
			dieSound = "goromorg_die",
			hitEffect = "hit_dust",
			capsuleHeight = 0.8,
			capsuleRadius = 0.25,
			collisionRadius = 0.8,
			health = 400,
			protection = 0,
			exp = 1000,
			immunities = { "sleep", "blinded" },
		},
		{
			class = "GoromorgBrain",
			name = "brain",
			sight = 5,
			seeInvisible = true,
			allAroundSight = true,
			morale = 100,
		},
		{
			class = "MonsterMove",
			name = "move",
			sound = "dark_acolyte_walk",
			cooldown = 1,
			animationSpeed = 1.3,
		},
		{
			class = "MonsterTurn",
			name = "turn",
			sound = "dark_acolyte_walk",
			animationSpeed = 1.5,
		},
		{
			class = "MonsterAttack",
			name = "rangedAttack",
			attackPower = 40,
			cooldown = 6,
			animation = "attack",
			sound = "wizard_ranged_attack",
			onAttack = function(self)
				local h = 1.4
				
				local r = math.random()				
				if r < 0.45 then
					-- cast fireball
					self.go.monster:shootProjectile("fireball_large", h, 40)
				elseif r < 0.7 then
					-- cast lightning bolt
					self.go.monster:shootProjectile("lightning_bolt_greater", h, 40)
				elseif r < 0.8 then
					-- cast poison bolt
					self.go.monster:shootProjectile("poison_bolt", h, 40)
				else
					-- cast ice shards
					local dx,dy = getForward(self.go.facing)
					local spell = spawn("ice_shards", self.go.level, self.go.x + dx, self.go.y + dy, self.go.facing, self.go.elevation)
					spell.tiledamager:setAttackPower(40)
				end
			end,
		},
		{
			class = "GoromorgShield",
		},
		{
			class = "Particle",
			parentNode = "light1",
			particleSystem = "goromorg_lantern",
		},
		{
			class = "Light",
			parentNode = "light1",
			color = vec(0.5, 1.0, 2.5),
			brightness = 4,
			range = 4.5,
			fillLight = true,
		},
	},
}
defineMaterial{
	name = "goromorog1",
	diffuseMap = "assets/textures/monsters/goromorg_dif.tga",
	specularMap = "assets/textures/monsters/goromorg_spec.tga",
	normalMap = "assets/textures/monsters/goromorg_normal.tga",
	doubleSided = false,
	lighting = true,
	alphaTest = true,
	blendMode = "Opaque",
	textureAddressMode = "Wrap",
	glossiness = 20,
	depthBias = 0,
}
defineSound{
	name = "dark_acolyte_walk",
	filename = "assets/samples/monsters/dark_acolyte_walk_01.wav",
	loop = false,
	volume = 0.45,
	minDistance = 1,
	maxDistance = 10,
	clipDistance = 5,
}
defineSound{
	name = "wizard_ranged_attack",
	filename = "assets/samples/monsters/wizard_ranged_attack_01.wav",
	loop = false,
	volume = 1,
	minDistance = 2,
	maxDistance = 10,
}

-- dark bolt with 1 less soundcomponent, used in pit of the disgraced to
-- prevent sound system stress from too many sound sources
defineObject{
	name = "dark_bolt_quiet",
	baseObject = "base_spell",
	components = {
		{
			class = "Particle",
			particleSystem = "dark_bolt",
		},
		{
			class = "Light",
			color = vec(0.2, 0.25, 0.6),
			brightness = 2,
			range = 4,
		},
		{
			class = "Projectile",
			spawnOffsetY = 1.35,
			velocity = 10,
			radius = 0.1,
			hitEffect = "dark_bolt_blast",
		},
		{
			class = "Sound",
			name = "launchSound",
			sound = "dark_bolt_launch",
		},
	},
}

defineAnimationEvent{
	animation = "assets/animations/monsters/goromorg/goromorg_attack.fbx",
	event = "attack",
	frame = 10,
}
defineParticleSystem{
	name = "goromorg_lantern",
	emitters = {
		-- smoke
		{
			emissionRate = 5,
			emissionTime = 0,
			maxParticles = 50,
			boxMin = {-0.03, 0.1, -0.03},
			boxMax = { 0.03, 0.1,  0.03},
			sprayAngle = {0,30},
			velocity = {0.1,0.5},
			texture = "assets/textures/particles/smoke_01.tga",
			lifetime = {1,1.25},
			color0 = {0.08, 0.11, 0.15},
			opacity = 1,
			fadeIn = 0.5,
			fadeOut = 0.5,
			size = {0.3, 0.6},
			gravity = {0,0,0},
			airResistance = 0.1,
			rotationSpeed = 0.6,
			blendMode = "Translucent",
			objectSpace = false,
		},

		-- flames
		{
			emissionRate = 30,
			emissionTime = 0,
			maxParticles = 100,
			boxMin = {-0.03, -0.07, 0.03},
			boxMax = { 0.03, -0.07,  -0.03},
			sprayAngle = {0,10},
			velocity = {0.1, 0.4},
			texture = "assets/textures/particles/goromorg_lantern.tga",
			frameRate = 45,
			frameSize = 64,
			frameCount = 16,
			lifetime = {0.25, 0.85},
			colorAnimation = false,
			color0 = {1.5, 1.5, 1.5},
			opacity = 1,
			fadeIn = 0.15,
			fadeOut = 0.3,
			size = {0.17, 0.015},
			gravity = {0,0,0},
			airResistance = 1.0,
			rotationSpeed = 1,
			blendMode = "Additive",
			depthBias = -0.0005,
			objectSpace = true,
		},

		-- inner glow
		{
			spawnBurst = true,
			emissionRate = 1,
			emissionTime = 0,
			maxParticles = 1,
			boxMin = {0,-0.05,0.0},
			boxMax = {0,-0.05,0.0},
			sprayAngle = {0,30},
			velocity = {0,0},
			texture = "assets/textures/particles/glow.tga",
			lifetime = {1000000, 1000000},
			colorAnimation = false,
			color0 = {0.07, 0.11, 0.23},
			opacity = 1,
			fadeIn = 0.1,
			fadeOut = 0.1,
			size = {0.5, 0.5},
			gravity = {0,0,0},
			airResistance = 1,
			rotationSpeed = 0,
			blendMode = "Additive",
			depthBias = -0.0005,
			objectSpace = true,
		},

		-- outer glow
		{
			spawnBurst = true,
			emissionRate = 1,
			emissionTime = 0,
			maxParticles = 1,
			boxMin = {0,0,0},
			boxMax = {0,0,0},
			sprayAngle = {0,30},
			velocity = {0,0},
			texture = "assets/textures/particles/glow.tga",
			lifetime = {1000000, 1000000},
			colorAnimation = false,
			color0 = {0.07, 0.11, 0.23},
			opacity = 0.25,
			fadeIn = 0.1,
			fadeOut = 0.1,
			size = {2, 2},
			gravity = {0,0,0},
			airResistance = 1,
			rotationSpeed = 0,
			blendMode = "Additive",
			depthBias = -0.0005,
			objectSpace = true,
		}
	}
}
defineParticleSystem{ -- used for diamond edge boss
	name = "goromorg_torch",
	emitters = {
		-- smoke
		{
			emissionRate = 5,
			emissionTime = 0,
			maxParticles = 50,
			boxMin = {-0.03, 0.1, -0.03},
			boxMax = { 0.03, 0.1,  0.03},
			sprayAngle = {0,30},
			velocity = {0.1,0.5},
			texture = "assets/textures/particles/smoke_01.tga",
			lifetime = {1,1.75},
			color0 = {0.15, 0.15, 0.15},
			opacity = 1,
			fadeIn = 0.5,
			fadeOut = 0.5,
			size = {0.3, 0.6},
			gravity = {0,0,0},
			airResistance = 0.1,
			rotationSpeed = 0.6,
			blendMode = "Translucent",
		},

		-- flames
		{
			emissionRate = 50,
			emissionTime = 0,
			maxParticles = 100,
			boxMin = {-0.03, -0.03, 0.03},
			boxMax = { 0.03, 0.03,  -0.03},
			sprayAngle = {0,10},
			velocity = {0.2, 1},
			texture = "assets/textures/particles/goromorg_lantern.tga",
			frameRate = 35,
			frameSize = 64,
			frameCount = 16,
			lifetime = {0.25, 0.85},
			colorAnimation = true,
			color0 = {2, 2, 2},
			color1 = {1.0, 1.0, 1.0},
			color2 = {0.25, 0.5, 1.0},
			color3 = {0.1, 0.3, 1.0},
			opacity = 1,
			fadeIn = 0.15,
			fadeOut = 0.3,
			size = {0.35, 0.015},
			gravity = {0,0,0},
			airResistance = 1.0,
			rotationSpeed = 1,
			blendMode = "Additive",
			depthBias = 0.1,
		},

		-- glow
		{
			spawnBurst = true,
			emissionRate = 1,
			emissionTime = 0,
			maxParticles = 1,
			boxMin = {0,0,-0.1},
			boxMax = {0,0,-0.1},
			sprayAngle = {0,30},
			velocity = {0,0},
			texture = "assets/textures/particles/glow.tga",
			lifetime = {1000000, 1000000},
			colorAnimation = false,
			color0 = {0.08, 0.11, 0.23},
			opacity = 1,
			fadeIn = 0.1,
			fadeOut = 0.1,
			size = {2, 2},
			gravity = {0,0,0},
			airResistance = 1,
			rotationSpeed = 0,
			blendMode = "Additive",
			depthBias = 0.1,
		}
	}
}
defineSound{
	name = "goromorg_die",
	filename = "assets/samples/monsters/tentacles_die_01.wav",
	loop = false,
	volume = 1,
	minDistance = 1,
	maxDistance = 10,
}

Re: some problems

Posted: Sun Sep 27, 2015 10:06 pm
by minmay
you dont need to copy the definitions for dark_bolt_quiet or goromorg_torch...those are unrelated as the comments say

you also don't need to define dark_acolyte_walk and wizard_ranged_attack yourself if you are including dark_acolyte.lua and wizard.lua, respectively (actually i hope you aren't because those monsters are sooo boring)