[for Devs] Problems with current custom spell system

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
JKos
Posts: 464
Joined: Wed Sep 12, 2012 10:03 pm
Location: Finland
Contact:

[for Devs] Problems with current custom spell system

Post by JKos »

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.
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
User avatar
Grimwold
Posts: 511
Joined: Thu Sep 13, 2012 11:45 pm
Location: A Dungeon somewhere in the UK

Re: Problems with current custom spell system

Post by Grimwold »

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.
User avatar
JKos
Posts: 464
Joined: Wed Sep 12, 2012 10:03 pm
Location: Finland
Contact:

Re: Problems with current custom spell system

Post by JKos »

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.
- 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
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Problems with current custom spell system

Post by Komag »

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
User avatar
JKos
Posts: 464
Joined: Wed Sep 12, 2012 10:03 pm
Location: Finland
Contact:

Re: Problems with current custom spell system

Post by JKos »

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
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: [for Devs] Problems with current custom spell system

Post by petri »

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...
User avatar
JKos
Posts: 464
Joined: Wed Sep 12, 2012 10:03 pm
Location: Finland
Contact:

Re: [for Devs] Problems with current custom spell system

Post by JKos »

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
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: [for Devs] Problems with current custom spell system

Post by petri »

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!
User avatar
JKos
Posts: 464
Joined: Wed Sep 12, 2012 10:03 pm
Location: Finland
Contact:

Re: [for Devs] Problems with current custom spell system

Post by JKos »

Ok, the tutorial is done :)

viewtopic.php?f=14&t=3910
- 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
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: [for Devs] Problems with current custom spell system

Post by Neikun »

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
"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!
Post Reply