Page 1 of 1

Basic New Spell

Posted: Thu Nov 01, 2012 4:29 am
by Xaxus
I want to make a fireburst that looks and acts the same as the first, but just does a ridiculously greater amount of damage.
First off, I noticed everyone was making spells for spells.lua
I didn't seem to have a spells.lua
So I copied wall sets and renamed it to "spells",
I then put this inside of it

Code: Select all

cloneSpell{
	name = "bigass_fireburst",
	baseSpell = "fireburst",
	uiName = "Big Kaboom",
	skill = "fire_magic",
	level = 26,
	runes = "ABC",
	manaCost = 69,
	attackPower = 70,
}
However, in game my spawners could not spawn this spell. Which is the primary use for it.
Reloaded the mod and everything.
I figured with all the steps I did something wrong, anybody able to point me in the right direction?

Re: Basic New Spell

Posted: Thu Nov 01, 2012 11:19 am
by JohnWordsworth
If you had to add spells.lua to your project yourself, then you will also need to tell Grimrock to include that file when your level loads. In your init.lua file, copy and paste one of the import lines at the top and point it at your spells.lua file. Off the top of my head, it would look like...

Code: Select all

import "mod_assets/scripts/spells.lua"

Re: Basic New Spell

Posted: Fri Nov 02, 2012 5:40 am
by Xaxus
Adding spells.lua seems to have worked.
My next issue that that cloneSpell in the aforementioned coding is a nil value.
Is there anyway to clone a spell or must I do it all by hand?

Re: Basic New Spell

Posted: Fri Nov 02, 2012 5:58 am
by msyblade
use defineSpell instead