Skip to content

Radius effect spell effect question

BoasterBoaster Member Posts: 622
edited July 2012 in General Modding
Is it possible to make a radius of effect spell that effects Party Members in one way and the caster in another.

For example, I'm trying to come up with a spell that adds +1/+2/+3 AC bonus to friendly units, while adding +1 AC to the caster for every hostile target within 30' radius.

Is such a thing possible?

Comments

  • WispWisp Member Posts: 1,102
    edited July 2012
    You can achieve the different effects for caster and nearby friendlies with a spell that, say, affects only the caster and also casts a second spell with an area of effect that affects friendlies (there are various ways to have the second spell not affect the caster). But you can not make the effects different depending on how many enemies there are.
  • AndreaColomboAndreaColombo Member Posts: 5,525
    But you can not make the effects different depending on how many enemies there are.
    Could this become a possibility via unhardcoding something?
  • WispWisp Member Posts: 1,102


    Could this become a possibility via unhardcoding something?
    Not really. It would require some sort of conditional effects, but the effect system wasn't designed with conditions in mind, so I would expect it to be a major undertaking, or conditionals of highly limited utility.
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    edited July 2012
    In IWD2 it was very easy, because you could put a stopping effect even in middle of the effect block that made the target "resistant" to the rest of effects. I'm fairly sure this is doable even with the ToB engine.
    There are projectiles that affect party only (sans caster), and you can add effects to the casting feature block (that's how we call it in dltcep) that affect only the caster. Even without cfb something like this could work:
    1. make the projectile affect only party, ignore caster
    2. build this effect block
    target type / effect
    original caster / self targeting effects
    pre-target / party affecting effects

    Your example is different, i'm not sure how could you do this in ToB. IWD2 had a targeting for enemy ally in effect, not just in projectile.
  • CuvCuv Member, Developer Posts: 2,535
    @Avenger_teambg This sounds like something that would be a useful addition to the updated engine. Perhaps @CameronTofer should take a look at this above information.
  • ArdanisArdanis Member Posts: 1,736
    For example, I'm trying to come up with a spell that adds +1/+2/+3 AC bonus to friendly units, while adding +1 AC to the caster for every hostile target within 30' radius.

    Is such a thing possible?
    IIRC yes. You need to use the 177th opcode to target friendlies and enemies separately. For the former you simply add the AC bonus to target type=2, for the latter you add AC to self (target type=1).
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    edited July 2012
    If you want per opponent ac bonus on caster, then you need a different target type than 1 (self).
    The self targeted effect won't go into the projectile, so it will be applied only once.
    The "original caster" target type will apply the effect on the caster only when the projectile(s) hit(s) the target.
    It is probably still possible to do with the ToB engine, but needs a lot of tweaking.
  • AndreaColomboAndreaColombo Member Posts: 5,525
    @Avenger_teambg This sounds like something that would be a useful addition to the updated engine. Perhaps @CameronTofer should take a look at this above information.
    It would be positively awesome.
  • BoasterBoaster Member Posts: 622
    edited July 2012
    If you want per opponent ac bonus on caster, then you need a different target type than 1 (self).
    The self targeted effect won't go into the projectile, so it will be applied only once.
    The "original caster" target type will apply the effect on the caster only when the projectile(s) hit(s) the target.
    It is probably still possible to do with the ToB engine, but needs a lot of tweaking.
    Melee Effect
    Target: Caster (5)
    Range (feet): 40
    Minimum Level: 1
    Casting Speed: 1
    Projectile: INAREAPA.PRO (158)
    Effect: AC Bonus (0); Target: Original Caster (9); AC Value: 1.

    Only seems to provide a single AC bonus to the caster.

    I have also tried Projectile SPARGRNP.PRO (177), which doesn't seem to have any different effect.
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    edited July 2012
    How many partymembers were around? inareapa targets partymembers in 30'
    Anyway, testing custom spell/item effects takes days. Testing them blindly takes weeks.
    So many things could go wrong. My method with this kind of stuff: start with simpler things, add very visible effects, then gradually close up on the goal.
  • BoasterBoaster Member Posts: 622
    This is for the +X AC bonus to the caster, where X equals the number of enemies nearby.

  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    So, you used INAREAPA, which is "counting" party members. You have to use INAREANP (or something similar). And this was just one problem, there is no guarantee it was the only.
  • BoasterBoaster Member Posts: 622
    I've tried both of those. Unfortunately, either way it doesn't seem to help.
Sign In or Register to comment.