There is a couple of problems that make developing custom spells a painful task.
Correct me if I'm wrong but:
- You can't spawn a spell from the same tile where party is located, and if I spawn a spell in front of party it will go through doors if party is standing right next to door.
- There is no way to specify the originator of the custom spell so you can not get XP from custom spells as the only way to cast them is to use spawn-function.
It would be great if we could shoot projectile spells with shootProjectile-function but there should also be a similar flags argument as damageTile-function has, so we could specify the originator of the projectile. This would correct both problems.
[for Devs] Problems with current custom spell system
[for Devs] Problems with current custom spell system
Last edited by JKos on Fri Oct 26, 2012 7:43 pm, edited 1 time in total.
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
- cloneObject viewtopic.php?f=22&t=8450
Re: Problems with current custom spell system
These definitely echo my findings.. especially the XP problem which presents a problem for all offensive spells.
And spells spawned in the party's space tend to hit the party instead! I haven't tested this, but there may be a work around by changing the tile offset of the spawned entity so it is far enough infront of the party it doesn't hit them if spawned on the same tile. I have been meaning to test if this is possible, but haven't had chance.
And spells spawned in the party's space tend to hit the party instead! I haven't tested this, but there may be a work around by changing the tile offset of the spawned entity so it is far enough infront of the party it doesn't hit them if spawned on the same tile. I have been meaning to test if this is possible, but haven't had chance.
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: Problems with current custom spell system
Yeah, I think the support for custom spells was not tested at all before release I hope the devs will still have time and motivation to fix this someday.
Another problem, I tried to modify the fireball spell for EoB mod, but it's simply not possible. Modifying damage with cloneObject does not work, ProjectileSpell:setAttackPower could work, but I can't get access to the fireball entity as onCastSpell only gets the name on the spell as argument. So only way to do working modified fireball is to make a projectile that looks like a fireball and use damageTile on monster:onProjectileHit to deal the damage. It's doable I have couple of spells using this method for EoB Waterdeep servers , but it's pretty awkward.
Another problem, I tried to modify the fireball spell for EoB mod, but it's simply not possible. Modifying damage with cloneObject does not work, ProjectileSpell:setAttackPower could work, but I can't get access to the fireball entity as onCastSpell only gets the name on the spell as argument. So only way to do working modified fireball is to make a projectile that looks like a fireball and use damageTile on monster:onProjectileHit to deal the damage. It's doable I have couple of spells using this method for EoB Waterdeep servers , but it's pretty awkward.
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
- cloneObject viewtopic.php?f=22&t=8450
Re: Problems with current custom spell system
well we used to have NO ability to customize spells at all, and they managed to get us some ability in that regard as one of the very last updated before they hit their late deadline, so we have to give credit for that much at least. I know they are planning some longer term updates in the future, so maybe better spell customization will hopefully be a part of that.
Finished Dungeons - complete mods to play
Re: Problems with current custom spell system
Yeah I know that they added it on last meters, and it's awesome, but I just hope that they will improve it a bit, as now properly working custom projectile spells requires pretty advanced scripting.
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
- cloneObject viewtopic.php?f=22&t=8450
Re: [for Devs] Problems with current custom spell system
Yeah, the custom spell and projectile systems are quite limited at the moment.
Spawning a fireball with custom attack power should work though:
local dx,dy = getForward(party.facing)
spawn("fireball", party.x + dx, party.y + dy, party.facing):setAttackPower(100)
Unfortunately there are limitations:
- it's not possible to spawn a fireball in party's square without hitting the party
- shootProjectile() doesn't work with spell projectiles
- there's no hook for executing custom code when a spell projectile hits a target (monster/party/wall)
(- conceptually the separation of item and spell projectiles is a bad idea)
I'll add a reminder about these to my todo list, but I'm not sure how much the situation can be improved without fully rewriting the projectile system - the original projectile code is crappy because of tight time constraints we had last year...
Spawning a fireball with custom attack power should work though:
local dx,dy = getForward(party.facing)
spawn("fireball", party.x + dx, party.y + dy, party.facing):setAttackPower(100)
Unfortunately there are limitations:
- it's not possible to spawn a fireball in party's square without hitting the party
- shootProjectile() doesn't work with spell projectiles
- there's no hook for executing custom code when a spell projectile hits a target (monster/party/wall)
(- conceptually the separation of item and spell projectiles is a bad idea)
I'll add a reminder about these to my todo list, but I'm not sure how much the situation can be improved without fully rewriting the projectile system - the original projectile code is crappy because of tight time constraints we had last year...
Re: [for Devs] Problems with current custom spell system
Thanks for the reply, this just gives me a reason to write projectile spell tutorial (using the method I described on my above post), I have been holding it back because I wasn't sure if the spell system was going to be improved in next patch. And according to what you said I think it's not very likely to happen?
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
- cloneObject viewtopic.php?f=22&t=8450
Re: [for Devs] Problems with current custom spell system
Well, I hope to get at least some of the issues sorted out (making the fireball ignore collisions with the party should be fairly easy). Meanwhile if you have a workaround it would be great if you could write a tutorial. Thanks!
Re: [for Devs] Problems with current custom spell system
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
- cloneObject viewtopic.php?f=22&t=8450
Re: [for Devs] Problems with current custom spell system
Tell you what. To fund the development of the spell system I vow to buy a copy of Grimrock every pay cheque where feasible. (like this one)
What will I do with those copies? HOARD THEM.
No. no. This isn't candy.. hmm.
Well I'll give some to my friends with the game on their wishlist and dump the rest on SteamGifts. =D
What will I do with those copies? HOARD THEM.
No. no. This isn't candy.. hmm.
Well I'll give some to my friends with the game on their wishlist and dump the rest on SteamGifts. =D
"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
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!