Page 1 of 1

useable spell scrolls

Posted: Thu Dec 20, 2012 6:08 pm
by Roman42
since the spell scrolls are completely useless in Grimrock, i wanted to make them work like in other RPGs.
Hold it in a hand, right-click it, the spell is cast, the scroll disappears, only mages should be able to use them.

I was surprised how easily this is done. For Fireball, simply copy this in to items.lua:

Code: Select all

cloneObject {
 baseObject = "scroll_fireball",
 attackMethod = "castWandSpell",
 wandPower = 25,
 coolDownTime = 5,
 charges = 1,
 skill = "spellcraft",
 requiredLevel = 1,
}
... and that's it. It works absolutely perfect, even the magic icons graphic on the scroll still works.

I've searched this board for "useable spell scrolls" "consumable spell scrolls" and got ready to find somerhing really complicated, but I didn't find anything, so I've tried this. IMHO, it should be in the main game like this, or am I missing somehting?

Here is a .lua file with all spell scrolls replaced + the missing enchant arrow spell scrolls. Seems to work fine: :)

Code: Select all

-- usable_spell_scrolls.lua v1.2 by Roman Adler

cloneObject {
 baseObject = "scroll_light",
 attackMethod = "castWandSpell",
 wandPower = 25,
 coolDownTime = 5,
 charges = 1,
 skill = "spellcraft",
 requiredLevel = 1,
}

cloneObject {
 baseObject = "scroll_darkness",
 attackMethod = "castWandSpell",
 wandPower = 25,
 coolDownTime = 5,
 charges = 1,
 skill = "spellcraft",
 requiredLevel = 1,
}

cloneObject {
 baseObject = "scroll_fireburst",
 attackMethod = "castWandSpell",
 wandPower = 15,
 coolDownTime = 5,
 charges = 1,
 skill = "spellcraft",
 requiredLevel = 1,
}

cloneObject {
 baseObject = "scroll_enchant_fire_arrow",
 attackMethod = "castWandSpell",
 wandPower = 25,
 coolDownTime = 5,
 charges = 1,
 skill = "spellcraft",
 requiredLevel = 2,
}

cloneObject {
 baseObject = "scroll_fireball",
 attackMethod = "castWandSpell",
 wandPower = 25,
 coolDownTime = 5,
 charges = 1,
 skill = "spellcraft",
 requiredLevel = 3,
}

cloneObject {
 baseObject = "scroll_fire_shield",
 attackMethod = "castWandSpell",
 wandPower = 25,
 coolDownTime = 5,
 charges = 1,
 skill = "spellcraft",
 requiredLevel = 4,
}


cloneObject {
 baseObject = "scroll_poison_cloud",
 attackMethod = "castWandSpell",
 wandPower = 15,
 coolDownTime = 5,
 charges = 1,
 skill = "spellcraft",
 requiredLevel = 1,
}

cloneObject {
 baseObject = "scroll_poison_bolt",
 attackMethod = "castWandSpell",
 wandPower = 25,
 coolDownTime = 5,
 charges = 1,
 skill = "spellcraft",
 requiredLevel = 3,
}

cloneObject {
 baseObject = "scroll_poison_shield",
 attackMethod = "castWandSpell",
 wandPower = 25,
 coolDownTime = 5,
 charges = 1,
 skill = "spellcraft",
 requiredLevel = 4,
}

cloneObject {
 baseObject = "scroll_ice_shards",
 attackMethod = "castWandSpell",
 wandPower = 25,
 coolDownTime = 5,
 charges = 1,
 skill = "spellcraft",
 requiredLevel = 1,
}

cloneObject {
 baseObject = "scroll_frostbolt",
 attackMethod = "castWandSpell",
 wandPower = 25,
 coolDownTime = 5,
 charges = 1,
 skill = "spellcraft",
 requiredLevel = 3,
}

cloneObject {
 baseObject = "scroll_frost_shield",
 attackMethod = "castWandSpell",
 wandPower = 25,
 coolDownTime = 5,
 charges = 1,
 skill = "spellcraft",
 requiredLevel = 4,
}

cloneObject {
 baseObject = "scroll_shock",
 attackMethod = "castWandSpell",
 wandPower = 15,
 coolDownTime = 5,
 charges = 1,
 skill = "spellcraft",
 requiredLevel = 1,
}

cloneObject {
 baseObject = "scroll_lightning_bolt",
 attackMethod = "castWandSpell",
 wandPower = 25,
 coolDownTime = 5,
 charges = 1,
 skill = "spellcraft",
 requiredLevel = 3,
}

cloneObject {
 baseObject = "scroll_shock_shield",
 attackMethod = "castWandSpell",
 wandPower = 25,
 coolDownTime = 5,
 charges = 1,
 skill = "spellcraft",
 requiredLevel = 4,
}

cloneObject {
 baseObject = "scroll_invisibility",
 attackMethod = "castWandSpell",
 wandPower = 25,
 coolDownTime = 5,
 charges = 1,
 skill = "spellcraft",
 requiredLevel = 4,
}

defineObject{
 name = "scroll_enchant_poison_arrow",
 class = "Item",
 uiName = "Scroll of Enchant Poison Arrow",
 model = "assets/models/items/scroll_spell.fbx",
 gfxIndex = 113,
 scroll = true,
 spell = "enchant_poison_arrow",
 weight = 0.3,
 attackMethod = "castWandSpell",
 wandPower = 25,
 coolDownTime = 5,
 charges = 1,
 skill = "spellcraft",
 requiredLevel = 2,
}

defineObject{
 name = "scroll_enchant_frost_arrow",
 class = "Item",
 uiName = "Scroll of Enchant Frost Arrow",
 model = "assets/models/items/scroll_spell.fbx",
 gfxIndex = 113,
 scroll = true,
 spell = "enchant_frost_arrow",
 weight = 0.3,
 attackMethod = "castWandSpell",
 wandPower = 25,
 coolDownTime = 5,
 charges = 1,
 skill = "spellcraft",
 requiredLevel = 2,
}

defineObject{
 name = "scroll_enchant_shock_arrow",
 class = "Item",
 uiName = "Scroll of Enchant Shock Arrow",
 model = "assets/models/items/scroll_spell.fbx",
 gfxIndex = 113,
 scroll = true,
 spell = "enchant_shock_arrow",
 weight = 0.3,
 attackMethod = "castWandSpell",
 wandPower = 25,
 coolDownTime = 5,
 charges = 1,
 skill = "spellcraft",
 requiredLevel = 2,
}
EDIT:
v1.1 changed the required skill level for higher spells.
v1.2 changed damagelevel of lower spells

Re: useable spell scrolls

Posted: Thu Dec 20, 2012 8:04 pm
by Skuggasveinn
I was using something along this lines for spells on scrolls in Tomb of Zarthos
I used charges to limit the use and gave them descriptions and a new gfxAtlas icons for inventory

Code: Select all

defineObject{
		name = "power_scroll_fire",
		class = "Item",
		uiName = "Casting Scroll: Fireball",
		model = "assets/models/items/note.fbx",
		description = "Reading the incantations from this scroll will cast Fireball.",
		gfxAtlas = "mod_assets/textures/gui/items_3.tga",   
		gfxIndex = 3,
		glitterEffect = "glitter_gold",
		attackPower = 14,
		accuracy = 0,
		coolDownTime = 4,
		skill = "spellcraft",
		requiredLevel = 5,
		damageType = "fire",
		attackMethod = "castWandSpell",
		spell = "fireball",
		wandPower = 25,
		charges = 10,
		emptyItem = "power_scroll_empty",
		weight = 0.3,
	}
and when the charges are finished you and up with a new Item thats a burned out scroll

Code: Select all

defineObject{
		name = "power_scroll_empty",
		class = "Item",
		uiName = "Casting Scroll:(depleted)",
		model = "assets/models/items/note.fbx",
		description = "The runes have faded from use.",
		gfxIndex = 114,
		accuracy = 0,
		weight = 0.3,
	}
Skuggasveinn.

Re: useable spell scrolls

Posted: Fri Dec 21, 2012 2:48 am
by Roman42
The empty scroll is a nice idea! Perhaps with a magic ink item, one could even prepare some new scrolls out of them.