Jump to content

help me figure out how to structure this spell


Recommended Posts

I'm trying to recreate the IWD spell Produce Fire as a semi-psionic ability. The key thing about my psionic abilities is, they sap the caster of max hp; and if the caster doesn't have enough hp to survive such a decrease, the ability should not fire. Currently the ability is structured like this:

 

Spell1 has:

- header target = any location

- no projectile

- effect 1 = opcode 146, cast spell, target = self, resource = SubspellA

- effect 2 = opcode 318, target = self, condition = not enough hp, resource = Spell1

- effect 3 = opcode 148, cast spell at point, target = preset target, resource = SubspellB

 

SubspellA has

- target = self, 6 points damage, reduce max hp by 6

 

SubspellB has:

- header target = any location

- projectile = Produce Fire projectile (affects anyone in ~15' diameter

- effect 1 = fire damage, target = preset target

 

For whatever reason, it seems like anyone affected by the Produce Fire projectile is losing 6 hp/max hp - they're being affected by SubspellA. I think there's some kind of problem with having no projectile, and a 148 effect, and a subspell with a projectile. But I can't put the projectile in SpellA because the 146 and 318 effects need to target the caster. When the projectile was in Spell1, the "self" target of the 146 and 318 effects seemed to transfer to the projectile targets, instead applying to the caster.

 

Hmm, maybe I can put the projectile in Spell1, and those effects can use target 9 "original caster?"

Link to comment

Spell1 has:

- header target = any location

- no projectile

- effect 1 = opcode 146, cast spell, target = self, resource = SubspellA

- effect 2 = opcode 318, target = self, condition = not enough hp, resource = Spell1

- effect 3 = opcode 148, cast spell at point, target = preset target, resource = SubspellB

 

SubspellA has

- target = self, 6 points damage, reduce max hp by 6

 

SubspellB has:

- header target = any location

- projectile = Produce Fire projectile (affects anyone in ~15' diameter

- effect 1 = fire damage, target = preset target

 

 

Maybe I'm missing something but I'm really confused how your spell1's second effect is supposed to protect the caster from its first effect in any case?

 

For whatever reason, it seems like anyone affected by the Produce Fire projectile is losing 6 hp/max hp - they're being affected by SubspellA.

 

Are they really though? I would assume everyone is affected by Spell1. You could test this by just reducing subB's projectile range to 1 or something and see if targets outside are still affected.

 

For me it looks like your Spell1 with its target set to any point within range will affect anyone within your set range (which makes sense) and since your second effect can never protect anyone from the first effect- which will already have been resolved at that point- anyone gets hit by SubspellA.

Link to comment

Maybe I'm missing something but I'm really confused how your spell1's second effect is supposed to protect the caster from its first effect in any case?

It doesn't. SubspellA reducing the caster's hp should be cast no matter what. Thus, the 146 effect comes first. The 318 effect is next, and if the conditions are met (not enough hp) then the rest of the spell - the actual Produce Fire part - doesn't happen. The idea is, if you try the use the ability without enough energy reserves, it misfires and you get hurt. (SubspellA has conditions handling this... basically it does nonlethal damage to you, so you knock yourself unconscious.)

 

Are they really though? I would assume everyone is affected by Spell1. You could test this by just reducing subB's projectile range to 1 or something and see if targets outside are still affected.

 

For me it looks like your Spell1 with its target set to any point within range will affect anyone within your set range (which makes sense) and since your second effect can never protect anyone from the first effect- which will already have been resolved at that point- anyone gets hit by SubspellA.

Ah, I think you're right. Effect target "self" isn't good enough; maybe I need a header targeting "caster." I just don't onow how to structure that such that you also get an ability targeting "any point in range." Is this just asking too much of the engine's spell structure?

 

It's weird, I have this working just fine for single-target abilities; I target a creature, and the main spell affects me while a subspell affects the creature. For some reason going from single-target to an area effect is throwing me. Presumably because the latter requires use of a projectile while the former doesn't.

Link to comment

 

It doesn't. SubspellA reducing the caster's hp should be cast no matter what. Thus, the 146 effect comes first. The 318 effect is next, and if the conditions are met (not enough hp) then the rest of the spell - the actual Produce Fire part - doesn't happen. The idea is, if you try the use the ability without enough energy reserves, it misfires and you get hurt. (SubspellA has conditions handling this... basically it does nonlethal damage to you, so you knock yourself unconscious.)

 

Ah, okay didn't get that it is supposed to always damage and that the spell takes care about preventing leathal.

 

As for your problem, have you tried simply chaning the target to original caster? I would assume that works.

 

It's weird, I have this working just fine for single-target abilities; I target a creature, and the main spell affects me while a subspell affects the creature. For some reason going from single-target to an area effect is throwing me. Presumably because the latter requires use of a projectile while the former doesn't.

 

Yeah, I can only guess but maybe the engine handles that "at any point" as if the spell was an area projectile affecting anyone within range of target point. I agree though it is inconsistent with what one would expectr from how single target spells work. On the other hand.. if it worked like that the spell should also make all creatures cast subspellB, is that the case?

Edited by Ulb
Link to comment

Yeah, I can only guess but maybe the engine handles that "at any point" as if the spell was an area projectile affecting anyone within range of target point. I agree though it is inconsistent with what one would expectr from how single target spells work. On the other hand.. if it worked like that the spell should also make all creatures cast subspellB, is that the case?

Right. At first when I wasn't using a subspell, I just had a spell with a projectile, and target = any point. I (foolishly) though setting the effect targets variously to "self" vs. "preset target" would allow the effects to distinguish between the caster and targets. But it doesn't. Instead the 146 effect was fired from every target hit by the projectile.

 

I hoped using several subspells could separate the effects enough that the caster-focused stuff would stay on the caster, and the target-focused stuff would travel through a projectile. But clearly that is easier said than done.

Link to comment

Which casting mode are each of the opcode 146/148 effects using?
Is "Spell1" being cast manually or by another spell/opcode?

This should work:
Spell1 has:
- header target = any location
- projectile "None - 1"
- effect 1 = opcode 146, cast spell, target = self, param2=1, resource = SubspellA
- effect 2 = opcode 318, target = self, condition = not enough hp, resource = Spell1
- effect 3 = opcode 148, cast spell at point, target = self, param2=(0 or 1), resource = SubspellB

SubspellA has
- projectile "None - 1"
- target = self, 6 points damage, reduce max hp by 6

SubspellB has:
- header target = irrelevant
- projectile = Produce Fire projectile (affects anyone in ~15' diameter)
- effect 1 = fire damage, target = preset target

 

Link to comment

Is "Spell1" being cast manually or by another spell/opcode?

Looks like it is actually cast by another spell. The whole system runs via opcode 214 so I have to temporarily populate my wizard spellbook with wizard spells, and those wizard spells cast my psionic abilities, which are innate abilities. I honestly don't remember why I didn't simply make the psionic abilities into wizard spells. (EDIT - oh right, because these are being cast by a thief and a wizard spell would not take caster level into account.)

 

The wizard spell - call it Spell0 - uses header target 4 "any point" and, looking more closely, it seems to be using a projectile, with the "c0" prefix...?? Wtf happened here? Isn't that Artemius_1's modder prefix? How did one of my abilities get patched to use his projectile??

 

effect 3 = opcode 148, cast spell at point, target = self,

That's not something I would have tried. I'll see how it works. And stripping out the weird projectile from Spell0.

Link to comment

I think it finally works. I removed the spurious projectile from the wizard spell, and more or less set it up as kjeron suggested, except moving everything out to the main wizard spell. (The offensive subspell is still an innate so, maybe that will reflect my caster level?)

 

EDIT - except targets are taking double damage. When I try on the two ogrillons south of beregost. I suspect that the damage is getting repeated for each person hit by the projectile (sorry Imoen, you're about to be sacrificed to test this).

 

Sigh. I'm seriously deficient when it comes to understanding and modding projectiles...

Edited by subtledoctor
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...