Since we are waiting for asset pack to be released...

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
Doridion
Posts: 256
Joined: Tue Jun 10, 2014 9:23 pm

Re: Since we are waiting for asset pack to be released...

Post by Doridion »

Blichew wrote:Sure thing, will try to do that in a few hours when I get home. And thanks for getting them definitions together.

As a side note and somewhat definition-related: has anyone come up with adding custom components with different hooks? Like the case with clickable door.
Thanks in advance, i stick your thread in the superthread as "Custom assets definitions" ^^

For custom components it's in LoG2 ... as usual, and we're actually some modders to do that : JohnWordsworth, cromcrom, Prozail, sps666, etc.
Grimfan
Posts: 369
Joined: Wed Jan 02, 2013 7:48 am

Re: Since we are waiting for asset pack to be released...

Post by Grimfan »

Mmmm...

Looking at the list is seems the six noticeable exceptions are recipes, spells, classes, traits, skills and races.

Get right on it Doridion. ;)
Ixnatifual

Re: Since we are waiting for asset pack to be released...

Post by Ixnatifual »

The cube wrote:woah, so nobody has defined tomes yet?

Oh, and thank you very much doridion.
I was planning on it, but I'm not sure if adding a lot of tomes like the Grimrock 1 tome library should be a thing. Skill trees are so easy to max in LoG2 and for stat boosts there are already potions.
User avatar
Doridion
Posts: 256
Joined: Tue Jun 10, 2014 9:23 pm

Re: Since we are waiting for asset pack to be released...

Post by Doridion »

Grimfan wrote:Mmmm...

Looking at the list is seems the six noticeable exceptions are recipes, spells, classes, traits, skills and races.

Get right on it Doridion. ;)
Thanks to you Grimfan ;) I forgot the skill thread :D

So for Class, Traits and Races, it'll be here !

I add it to my temp list before.
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Since we are waiting for asset pack to be released...

Post by akroma222 »

Cool thread!
I have some more weapon definitions for you to add, will post them up soon
User avatar
QuintinStone
Posts: 72
Joined: Sat Nov 01, 2014 9:58 pm

Re: Since we are waiting for asset pack to be released...

Post by QuintinStone »

The cube wrote:woah, so nobody has defined tomes yet?

Oh, and thank you very much doridion.

Code: Select all

defineObject{
	name = "tome_pain",
	baseObject = "tome_health",
	components = {
		{
			class = "Item",
			uiName = "Tome of Pain",
			gfxIndex = 30,
			description = "If you use this, you will lose health",
			fitContainer = true,
			fragile = false,
			gameEffect = "Lose health",
			weight = 1
		},
		{
			class = "UsableItem",
			sound = "level_up",
			onUseItem = function(self, champion)
				playSound("level_up")
				hudPrint(champion:getName().." lost Health -25.")
				champion:damage(25, "physical")
				return true
			end
		},
		{
			class = "Model",
			castShadow = true,
			model = "assets/models/items/tome.fbx"
		},
	},
}
Crypt of Zulfar
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Since we are waiting for asset pack to be released...

Post by akroma222 »

Here is a better dagger definition for now...
demonstrates special attacks/chain actions/traits/tags/cause condition/underwater weapon
SpoilerShow

Code: Select all

defineObject{
     	name = "eviscerater_dagger",	
        baseObject = "assassin_dagger",
	tags = { "weapon", "dagger" , "aquatic"},
        components = {
	{
          	class = "Model",
           	model = "assets/models/items/assassin_dagger.fbx",	
        },
        {
           	class ="Item",
           	uiName = "Eviscerater",
           	gfxAtlas = "assets/textures/gui/items_3.tga",
		gfxIndex = 2,
           	weight = 1.2,
           	impactSound = "impact_blade",
		secondaryAction = "flurry_of_slashes1",
		gameEffect = {"15% Chance to casue sleep"},
           	traits = { "dagger", "light_weapon" , "aquatic"},
           	description = "This dagger has been crafted in such a way to inflict the most internal damage possible on it's target... you suspect it was possibly used for ritual suicides or for hunting extremely tough prey."
        },
        {
           	class = "MeleeAttack",
           	attackPower = 26,
           	accuracy = 5,
           	swipe = "horizontal",
           	attackSound = "swipe",
           	cooldown = 2.2,
           	baseDamageStat = "dexterity",
           	damageType = "physical",
		causeCondition = "sleep",
		conditionChance = 15,
           	requirements = {"light_weapons" ,2},
        },
	{
             	class = "MeleeAttack",			
             	name = "flurry_of_slashes1",
		uiName = "Flurry of Slashes",
		buildup = 2.0,
		chainAction = "flurry_of_slashes2",
		chainActionDelay = 0.2,
		attackPower = 26,
		swipe = "horizontal",
		attackSound = "swipe_special",
		baseDamageStat = "dexterity",
		causeCondition = "sleep",
		conditionChance = 30,
             	cooldown = 0.2,
             	energyCost = 25,
		gameEffect = {"A series of powerful strikes with increased chance (30%) to cause sleep"},
             	requirements = { "accuracy", 2},
             	onAttack = function(self,champion,hand)
			champion:playDamageSound()
             	end,
        },
	{
             	class = "MeleeAttack",			
             	name = "flurry_of_slashes2",
		uiName = "Flurry of Slashes",
		chainAction = "flurry_of_slashes3",
		chainActionDelay = 0.2,
		--repeatCount = 1,
		attackPower = 26,
		swipe = "vertical",
		attackSound = "swipe_special",
		baseDamageStat = "dexterity",
		causeCondition = "sleep",
		conditionChance = 30,
             	cooldown = 0.1,
             	energyCost = 30,
             	requirements = { "accuracy", 2},
             	onAttack = function(self,champion,hand)
			champion:playDamageSound()
             	end,
        },
	{
             	class = "MeleeAttack",			
             	name = "flurry_of_slashes3",
		uiName = "Flurry of Slashes",
		attackPower = 26,
		chainActionDelay = 0.2,
		--repeatCount = 1,
		swipe = "horizontal",
		attackSound = "swipe_special",
		baseDamageStat = "dexterity",
		causeCondition = "sleep",
		conditionChance = 30,
             	cooldown = 3.2,
             	energyCost = 30,
             	requirements = { "accuracy", 2},
             	onAttack = function(self,champion,hand)
			champion:playDamageSound()
             	end,
        },
	}
    }	
User avatar
QuintinStone
Posts: 72
Joined: Sat Nov 01, 2014 9:58 pm

Re: Since we are waiting for asset pack to be released...

Post by QuintinStone »

A steam particle system I made. Could also be used for a white mist.

Code: Select all

defineParticleSystem{
	name = "steam_particles",
	emitters = {
		{
			emitterShape = "BoxShape",  -- type of the emitter, either “BoxShape” (default) or “MeshShape”.
			emissionRate = 55, -- number of particles to emit per second.
			emissionTime = 0, -- duration of emission in seconds. If set to zero, emission time is infinite.
			maxParticles = 1000, -- maximum number of active particles. Sensible values are between 100 and 1000.
			spawnBurst = false, -- if enabled maximum number of particles are emitted in a single burst when the particle system is started.
			boxMin = vec(-1.2, -0.02, -1.2), -- a 3D vector defining the minimum extents for particle emission.
			boxMax = vec(1.2, -0.02, 1.2), -- a 3D vector defining the maximum extents for particle emission.
			sprayAngle = { 0, 20 }, -- a table whose first and second elements set the minimum and maximum spraying angle in degrees.
			velocity = { 0.1, 0.2 }, -- a table whose first and second elements set the minimum and maximum velocity in units per second.
			size = { 1, 2 }, -- a table whose first and second elements set the minimum and maximum size for for emitted particles.
			lifetime = { 1.5, 4}, -- a table whose first and second elements set the minimum and maximum lifetime for emitted particles.
			texture = "assets/textures/particles/fog.tga", -- a valid texture asset reference. The texture may contain multiple frames laid out on a grid.
			--frameSize = 32, -- (optional) pixel size of a frame in the particle animation sequence. Typically 32 or 64.
			--frameCount: (optional) total number of frames in the particle animation sequence.
			--frameRate: (optional) frame rate of the particle animation sequence.
			color0 = { 1, 1, 1 }, -- a table containing R,G,B values in range 0-1 for initial particle color.
			--color1,color2,color3: (optional) particle color sequence. These parameters have no effect if colorAnimation is not enabled.
			--colorAnimation = false, -- a boolean which enables particle color animation.
			opacity = 0.05, -- particle opacity value between 0 and 1.
			fadeIn = 0.1, -- particle’s fade in time in seconds.
			fadeOut = 1.5, -- particle’s fade out time in seconds.
			gravity = vec(0, 0.1, 0), -- a 3D gravity vector.
			airResistance = 0.1, -- air resistance parameter. Sensible values are between 0 and 10.
			rotationSpeed = 0.3, -- rotation speed of particles in degrees.
			randomInitialRotation = true, -- a boolean flag, if enabled particles’ initial rotation angle is randomized.
			blendMode = "Translucent", -- blending mode for particle rendering. Must be either “Additive” or “Translucent”.
			objectSpace = true, -- a boolean flag, if enabled particles are emitted to object space rather than world space.
			clampToGroundPlane = false, -- a boolean flag, if enabled particles collide against the ground.
			--depthBias = 1, -- depth bias value in world space units.
		}
	}
}

defineObject{
	name = "floor_steam",
	placement = "floor",
	editorIcon = 88,
	components = {
		{
			class = "Particle",
			particleSystem = "steam_particles",
		},
	},
}

Crypt of Zulfar
User avatar
cromcrom
Posts: 549
Joined: Tue Sep 11, 2012 7:16 am
Location: Chateauroux in a socialist s#!$*&% formerly known as "France"

Re: Since we are waiting for asset pack to be released...

Post by cromcrom »

Thanks for sharing.
A trip of a thousand leagues starts with a step.
kelly1111
Posts: 349
Joined: Sun Jan 20, 2013 6:28 pm

Re: Since we are waiting for asset pack to be released...

Post by kelly1111 »

quitinstone, thanks for your steam/fog object. I have a question, how do I make the particle box larger than one (game) square ? .. tried fiddling with some of the variables, but cannot get it bigger
Post Reply