New Spells >> show them off here

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Re: New Spells >> show them off here

Post by crisman »

Okay, I'll check the script completely, I'm afraid I forgot something in copy/paste... or worse
EDIT: I've just copied and pasted on a very fresh dungeon, and it's working fine. So... I'm not sure what's the problem.
try using "fireburst" instead of "fireburst3" matbe that's the problem.
User avatar
Merethif
Posts: 274
Joined: Tue Apr 24, 2012 1:58 pm
Location: Poland

Re: New Spells >> show them off here

Post by Merethif »

crisman wrote:Okay, I'll check the script completely, I'm afraid I forgot something in copy/paste... or worse
EDIT: I've just copied and pasted on a very fresh dungeon, and it's working fine. So... I'm not sure what's the problem.
try using "fireburst" instead of "fireburst3" matbe that's the problem.
Nope, still the same problem. Let's wait and see how does it work for others.
I'll check everything again tomorrow.
User avatar
Currann
Posts: 7
Joined: Mon Oct 15, 2012 3:38 am

Re: New Spells >> show them off here

Post by Currann »

I have just started playing around with scripting,cand caught on pretty quickly, but I was wondering if there was a way to clone a spell like you can do for an item. Thanks ahead of time.
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: New Spells >> show them off here

Post by Neikun »

Currann wrote:I have just started playing around with scripting,cand caught on pretty quickly, but I was wondering if there was a way to clone a spell like you can do for an item. Thanks ahead of time.
I really see no reason why you shouldn't be able to.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Grimwold
Posts: 511
Joined: Thu Sep 13, 2012 11:45 pm
Location: A Dungeon somewhere in the UK

Re: New Spells >> show them off here

Post by Grimwold »

There is no such thing as "cloneSpell" function, like there is for objects, but you can re-define a spell

If you take a look in the asset pack (version 2!) there seem to be two parts to the original spells.. first is the spell definition (in spells.lua) which is a very basic.

Code: Select all

defineSpell{ 
	name = "fireburst",
	uiName = "Fireburst",
	skill = "fire_magic",
	level = 2,
	runes = "A",
	manaCost = 15,
	onCast = "fireburst",
}
Then there is an object definition (in objects.lua)

Code: Select all

defineObject{
	name = "fireburst",
	class = "BurstSpell",
	screenEffect = "fireball_screen",
	particleSystem = "fireburst",
	lightColor = vec(0.75, 0.4, 0.25),
	lightBrightness = 40,
	lightRange = 4,
	sound = "fireburst",
	attackPower = 20,
	damageType = "fire",
	--cameraShake = true,
	tags = { "spell" },
}
So it's be possible to modify/clone original spells by re-defining the spell part and then cloning/defining the object part. Some spells, like "Light", do not have an object part in the asset pack... so these are probably hardcoded.

example:

Code: Select all

cloneObject{
name="fireburst",
baseObject="fireburst",
sound = "frostburst",
}
This is a very basic modification to the Fireburst spell to make it sound like Frostburst.
User avatar
Grimwold
Posts: 511
Joined: Thu Sep 13, 2012 11:45 pm
Location: A Dungeon somewhere in the UK

Re: New Spells >> show them off here

Post by Grimwold »

Explosive Mine
Merethif wrote:
crisman wrote:Okay, I'll check the script completely, I'm afraid I forgot something in copy/paste... or worse
EDIT: I've just copied and pasted on a very fresh dungeon, and it's working fine. So... I'm not sure what's the problem.
try using "fireburst" instead of "fireburst3" matbe that's the problem.
Nope, still the same problem. Let's wait and see how does it work for others.
I'll check everything again tomorrow.
I just tried it in the editor and when the snail moved onto the mine I got grimrock.exe not responding.

After a lot of debugging and hudPrinting, it seems to be a problem with the a:destroy in the detonate() function.. I commented out everyhting and then gradually added stuff back until I was left with just the "spawn fireburst3" and the "a:destroy"... I took a guess that the problem was with the spawn, so I uncommented the destroy first.. but that's what caused it to crash!


EDIT. Yeah the fireburst works fine.. but without the destroy you can keep leading the monsters back to that space.
What I did get to work was

Code: Select all

a:setTriggeredByMonster(false)
Which leaves the mine (aka pressure plate) in play but disables it from being triggered by monsters.


PS one other point of consideration is that if a monster is killed by a mine the party get no experience.
User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Re: New Spells >> show them off here

Post by crisman »

Grimwold wrote:Explosive Mine
Merethif wrote:
crisman wrote:Okay, I'll check the script completely, I'm afraid I forgot something in copy/paste... or worse
EDIT: I've just copied and pasted on a very fresh dungeon, and it's working fine. So... I'm not sure what's the problem.
try using "fireburst" instead of "fireburst3" matbe that's the problem.
Nope, still the same problem. Let's wait and see how does it work for others.
I'll check everything again tomorrow.
I just tried it in the editor and when the snail moved onto the mine I got grimrock.exe not responding.

After a lot of debugging and hudPrinting, it seems to be a problem with the a:destroy in the detonate() function.. I commented out everyhting and then gradually added stuff back until I was left with just the "spawn fireburst3" and the "a:destroy"... I took a guess that the problem was with the spawn, so I uncommented the destroy first.. but that's what caused it to crash!


EDIT. Yeah the fireburst works fine.. but without the destroy you can keep leading the monsters back to that space.
What I did get to work was

Code: Select all

a:setTriggeredByMonster(false)
Which leaves the mine (aka pressure plate) in play but disables it from being triggered by monsters.


PS one other point of consideration is that if a monster is killed by a mine the party get no experience.
Ah, good advice! Still I don't understand why it works fine for me thought...
Did not notice killing a creature with a mine you don't get exp. That's a real problem, and I don't think I could solve it so easily... oh well, unless considering it the price for being a coward by using such sneaky tricks :mrgreen: :mrgreen:
Never tried with a charging ogre?? That was the original purpose I had in mind! :D
User avatar
Grimwold
Posts: 511
Joined: Thu Sep 13, 2012 11:45 pm
Location: A Dungeon somewhere in the UK

Re: New Spells >> show them off here

Post by Grimwold »

crisman wrote: Ah, good advice! Still I don't understand why it works fine for me thought...
Did not notice killing a creature with a mine you don't get exp. That's a real problem, and I don't think I could solve it so easily... oh well, unless considering it the price for being a coward by using such sneaky tricks :mrgreen: :mrgreen:
Never tried with a charging ogre?? That was the original purpose I had in mind! :D
Yeah, not sure why it works for you and not others.

Even without XP, it's useful for reducing the monsters health. As long as the killing blow comes from a weapon or direct damage spell, the party will get XP.
User avatar
Currann
Posts: 7
Joined: Mon Oct 15, 2012 3:38 am

Re: New Spells >> show them off here

Post by Currann »

Grimwold wrote:There is no such thing as "cloneSpell" function, like there is for objects, but you can re-define a spell

If you take a look in the asset pack (version 2!) there seem to be two parts to the original spells.. first is the spell definition (in spells.lua) which is a very basic.

Code: Select all

defineSpell{ 
	name = "fireburst",
	uiName = "Fireburst",
	skill = "fire_magic",
	level = 2,
	runes = "A",
	manaCost = 15,
	onCast = "fireburst",
}
Then there is an object definition (in objects.lua)

Code: Select all

defineObject{
	name = "fireburst",
	class = "BurstSpell",
	screenEffect = "fireball_screen",
	particleSystem = "fireburst",
	lightColor = vec(0.75, 0.4, 0.25),
	lightBrightness = 40,
	lightRange = 4,
	sound = "fireburst",
	attackPower = 20,
	damageType = "fire",
	--cameraShake = true,
	tags = { "spell" },
}
So it's be possible to modify/clone original spells by re-defining the spell part and then cloning/defining the object part. Some spells, like "Light", do not have an object part in the asset pack... so these are probably hardcoded.

example:

Code: Select all

cloneObject{
name="fireburst",
baseObject="fireburst",
sound = "frostburst",
}
This is a very basic modification to the Fireburst spell to make it sound like Frostburst.

thank you for the tip. It s Exactly what I'm looking for. I hope to have a new textured spell up soon
User avatar
Currann
Posts: 7
Joined: Mon Oct 15, 2012 3:38 am

Re: New Spells >> show them off here

Post by Currann »

Grimwold wrote:There is no such thing as "cloneSpell" function, like there is for objects, but you can re-define a spell

If you take a look in the asset pack (version 2!) there seem to be two parts to the original spells.. first is the spell definition (in spells.lua) which is a very basic.

Code: Select all

defineSpell{ 
	name = "fireburst",
	uiName = "Fireburst",
	skill = "fire_magic",
	level = 2,
	runes = "A",
	manaCost = 15,
	onCast = "fireburst",
}
Then there is an object definition (in objects.lua)

Code: Select all

defineObject{
	name = "fireburst",
	class = "BurstSpell",
	screenEffect = "fireball_screen",
	particleSystem = "fireburst",
	lightColor = vec(0.75, 0.4, 0.25),
	lightBrightness = 40,
	lightRange = 4,
	sound = "fireburst",
	attackPower = 20,
	damageType = "fire",
	--cameraShake = true,
	tags = { "spell" },
}
So it's be possible to modify/clone original spells by re-defining the spell part and then cloning/defining the object part. Some spells, like "Light", do not have an object part in the asset pack... so these are probably hardcoded.

example:

Code: Select all

cloneObject{
name="fireburst",
baseObject="fireburst",
sound = "frostburst",
}
This is a very basic modification to the Fireburst spell to make it sound like Frostburst.
Sorry to bother you again, but i'm still having some trouble with my spell. My goal is to make a fireball spell that acts like ice shards, but does fire damage with a fireball visual.

So i put the following into my dungeons spells.lua:

Code: Select all

defineSpell{
		name = "fireball",
		uiName = "Unstoppable Fireball",
		skill = "fire_magic",
		level = 1,
		runes = "E",
		manaCost = 30,
		onCast = "fireball",
	}
and i put the next code box into my objects.lua:

Code: Select all

cloneObject{
		name = "fireball",
		baseObject = "ice_shards",
		particleEffect = "fireball_greater",
		sound = "fireball",
		uiName = "Unstoppable Fireball",
		attackPower = 30,
		damageType = "fire",
	}
The only problem is, whenever i try to cast it, my game editor crashes. Also, i downloaded the assets v2 on the website, but was unsure where to put them, so i stuck it in my mod_assets folder.
Post Reply