Problem with custom wand with custom spell

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
Blichew
Posts: 157
Joined: Thu Sep 27, 2012 12:39 am

Problem with custom wand with custom spell

Post by Blichew »

So one of my puzzles is about shooting from a wand to correct receptor. But I've encountered a problem:
Long story short i get the message: Warning! unknown spell: activation.

So I've created a wand with this code:
SpoilerShow

Code: Select all

defineObject{
	name = "activation_rod",
	class = "Item",
	uiName = "Special Wand",
	model = "assets/models/items/lightning_rod.fbx",
	description = "This wand has been enchanted with special powers.",
	gfxIndex = 222,
	attackPower = 14,
	accuracy = 0,
	coolDownTime = 5,
	attackMethod = "castWandSpell",
	spell = "activation",
	wandPower = 0,
	charges = 7,
	emptyItem = "activation_rod_empty",
	attackSwipe = "vertical",
	attackSound = "swipe",
	impactSound = "impact_blunt",
	weight = 1.7,
}

defineObject{
	name = "activation_rod_empty",
	class = "Item",
	uiName = "Special Wand (Empty)",
	model = "assets/models/items/lightning_rod.fbx",
	description = "This wand has once been enchanted with special powers. Now it is out of charges.",
	gfxIndex = 223,
	attackPower = 14,
	accuracy = 0,
	coolDownTime = 4,
	attackMethod = "meleeAttack",
	attackSwipe = "vertical",
	attackSound = "swipe",
	impactSound = "impact_blunt",
	weight = 1.7,
}
And then a spell with this code:
SpoilerShow

Code: Select all

defineObject{
	name = "activation",
	class = "ProjectileSpell",
	particleSystem = "fireball",
	hitParticleEffect = "fireball_hit",
	lightColor = vec(0.9, 0.9, 0.9),
	lightBrightness = 9,
	lightRange = 3,
	lightHitBrightness = 40,
	lightHitRange = 1,
	castShadow = true,
	launchSound = "fireball_launch",
	projectileSound = "fireball",
	hitSound = "fireball_hit",
	screenEffect = "fireball_screen",
	projectileSpeed = 30,
	attackPower = 0.1,
	damageType = "fire",
	--cameraShake = true,
	tags = { "spell" },
}
I've also put "import" line in the init.lua script for the spells.lua.

Anyone's got any ideas ? I ran out of mine, so help please :)

Small update: Spell created this way is working when used without an item (i.e. spawner).
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Problem with custom wand with custom spell

Post by Neikun »

Test your code with a regular fireball spell rather than a custom activation spell.
Does that at least work?
"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
Blichew
Posts: 157
Joined: Thu Sep 27, 2012 12:39 am

Re: Problem with custom wand with custom spell

Post by Blichew »

Yeah, it works. I guess only normal spells can be replaced to be put on the wand. Maybe we could get AH Devs word in this matter - my guess is that they didn't put spells.lua in the mod scripts for a reason. NYI ?
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Problem with custom wand with custom spell

Post by Komag »

they've said before that spells are hard-coded and not customizable yet
Finished Dungeons - complete mods to play
User avatar
Blichew
Posts: 157
Joined: Thu Sep 27, 2012 12:39 am

Re: Problem with custom wand with custom spell

Post by Blichew »

booo :( that's really bad news for the end of Sunday...
Post Reply