Ha! I never thought about that. Will test it to see what happens and maybe adjust the monster list.Merethif wrote:Amazing. I love your spells.Grimwold wrote: Push Monster
I'm not sure if above spell should work on Tentacles though?
New Spells >> show them off here
Re: New Spells >> show them off here
Puzzle Frameworks - http://www.grimrock.net/forum/viewtopic.php?f=14&t=4564
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Re: New Spells >> show them off here
My first spell & contribution to the modding community:
CREATE FOOD
Creates a random piece of food - requires Spellcraft 14 and 20 mana.
On a separate note - I'm still undecided if utility spells should be in the spellcraft school (as per light/darkness) or to enrich one of the elementals (to counterbalance invisibility).
CREATE FOOD
Creates a random piece of food - requires Spellcraft 14 and 20 mana.
On a separate note - I'm still undecided if utility spells should be in the spellcraft school (as per light/darkness) or to enrich one of the elementals (to counterbalance invisibility).
Code: Select all
-- Create Food spell
defineSpell{
name = "create_food_spell",
uiName = "Create Food",
skill = "spellcraft",
level = 14,
runes = "EF",
manaCost = 20,
onCast = function(caster, x, y, direction, skill)
if getMouseItem() == nil then
local rand = math.random(5)
local obj
if rand == 1 then obj = "ice_lizard_steak"
elseif rand == 2 then obj = "baked_maggot"
elseif rand == 3 then obj = "boiled_beetle"
elseif rand == 4 then obj = "rat_shank"
else obj = "pitroot_bread"
end
setMouseItem(spawn(obj))
end
end
}
Waking Violet (Steam, PS4, PSVita, Switch) : http://www.wakingviolet.com
The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563
My preciousss: http://www.moonsharp.org
The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563
My preciousss: http://www.moonsharp.org
Re: New Spells >> show them off here
@Xanathar
If I may, I'd change your spell a bit so it would be easier to add new types of food to be spawned with it. So here it goes:
I've also added your version of the spell to our wiki @ http://grimwiki.net (http://grimwiki.net/wiki/Create_Food_Spell)
If I may, I'd change your spell a bit so it would be easier to add new types of food to be spawned with it. So here it goes:
I've also added your version of the spell to our wiki @ http://grimwiki.net (http://grimwiki.net/wiki/Create_Food_Spell)
Code: Select all
defineSpell{
name = "create_food_spell",
uiName = "Create Food",
skill = "spellcraft",
level = 14,
runes = "EF",
manaCost = 20,
onCast = function(caster, x, y, direction, skill)
local foodList = {"ice_lizard_steak", "baked_maggot", "boiled_beetle", "rat_shank", "pitroot_bread"}
if getMouseItem() == nil then
local obj = foodList[math.random(1,#foodList)]
setMouseItem(spawn(obj))
end
end,
}
Re: New Spells >> show them off here
Thanks!
Didn't know of the wiki (and neither that there were alread create food spells there ).
Didn't know of the wiki (and neither that there were alread create food spells there ).
Waking Violet (Steam, PS4, PSVita, Switch) : http://www.wakingviolet.com
The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563
My preciousss: http://www.moonsharp.org
The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563
My preciousss: http://www.moonsharp.org
Re: New Spells >> show them off here
The spells that creates food in mage's hand, rather then on the floor, is a way more spiffy IMO Especially since it is random food.Xanathar wrote:Thanks!
Didn't know of the wiki (and neither that there were alread create food spells there ).
BTW,
Grimwold, when I'm trying to cast Push Monster in editor it quits. Any idea why? Anyone has similar problem?
Re: New Spells >> show them off here
I've created an "Enchant Arrow" spell (separate from original Enchant Fire Arrow Spell. It has to be cast while holding (mouseItem) arrow(s). What it does it randomly enchants arrow(s) by replacing them with fire, cold, etc. Feel free to change, I've decided to go with spellcraft level 5 and mana cost of 20.
Enchant Arrow
Enchant Arrow
Code: Select all
defineSpell{
name = "enchant_arrow",
uiName = "Enchant Arrow",
skill = "spellcraft",
level = 5,
runes = "AF",
manaCost = 20,
onCast = function(caster, x, y, direction, skill)
local arrowList = {"cold", "fire", "poison", "shock"}
local rnd = math.random(1,#arrowList)
local arrowType = arrowList[rnd].."_arrow"
if getMouseItem().name ~= "arrow" then
hudPrint("You have to cast this spell while holding an arrow in your hand (cursor)")
else
local size = getMouseItem():getStackSize()
setMouseItem(spawn(arrowType):setStackSize(size))
playSound("generic_spell")
if size > 1 then
hudPrint(caster:getName().." enchanted "..size.." arrows into "..arrowList[rnd].." arrows")
else
hudPrint(caster:getName().." enchanted arrow into "..arrowList[rnd].." arrow")
end
end
end,
}
Re: New Spells >> show them off here
Does the game crash out completely, or are you returned to the editor screen? If the second, are there any messages in the script?Merethif wrote:Grimwold, when I'm trying to cast Push Monster in editor it quits. Any idea why? Anyone has similar problem?
Did you add the teleport_probe monster to your monsters.lua file?
I actually re-created the spell on my home PC using only what I posted here and got it to work ok. (Since I forgot to copy my original files from my office PC to my googleDrive!!)
Puzzle Frameworks - http://www.grimrock.net/forum/viewtopic.php?f=14&t=4564
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Re: New Spells >> show them off here
Ok, I know what I was doing wrong. I forgot to rename script entity from script_entity_3 to pushback_spell_script (facepalm).Grimwold wrote:Does the game crash out completely, or are you returned to the editor screen? If the second, are there any messages in the script?Merethif wrote:Grimwold, when I'm trying to cast Push Monster in editor it quits. Any idea why? Anyone has similar problem?
Did you add the teleport_probe monster to your monsters.lua file?
I actually re-created the spell on my home PC using only what I posted here and got it to work ok. (Since I forgot to copy my original files from my office PC to my googleDrive!!)
Now it works like a charm.
Re: New Spells >> show them off here
Great. That was the other thing I was going to suggest.Merethif wrote:Ok, I know what I was doing wrong. I forgot to rename script entity from script_entity_3 to pushback_spell_script (facepalm).Grimwold wrote:Does the game crash out completely, or are you returned to the editor screen? If the second, are there any messages in the script?Merethif wrote:Grimwold, when I'm trying to cast Push Monster in editor it quits. Any idea why? Anyone has similar problem?
Did you add the teleport_probe monster to your monsters.lua file?
I actually re-created the spell on my home PC using only what I posted here and got it to work ok. (Since I forgot to copy my original files from my office PC to my googleDrive!!)
Now it works like a charm.
Puzzle Frameworks - http://www.grimrock.net/forum/viewtopic.php?f=14&t=4564
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Re: New Spells >> show them off here
I've added a sound effect to the Push Monster Spell above... there's now also an Optional Particle Effect, which requires some particle definition code to be added to the lua files (I use a particles.lua file and add an import line in init.lua)
Puzzle Frameworks - http://www.grimrock.net/forum/viewtopic.php?f=14&t=4564
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382
Magic Pack - https://www.nexusmods.com/grimrock/mods/70
Area of Effect Spell System - http://www.grimrock.net/forum/viewtopic ... 150#p44382