Skip to content

"Default spell on missed"

chimericchimeric Member Posts: 1,163
This is in projectile properties. I'm having trouble getting anything to happen, though. Editing ARROW, the projectile all weapons use. I want a miss to explode in a fireball.

Comments

  • kjeronkjeron Member Posts: 2,368
    edited June 2017
    Aside from maybe PSTEE it is not implemented, and (melee) weapons do not use the ARROW (or any other) projectile anyway. Ranged weapons, weapon abilities, spells, and in some cases external EFF's and other projectiles utilize their projectile field, melee weapons do not.

    Melee weapons use an exclusive version of projectile #1(none) with slightly different behavior, and both versions of projectile #1(none) are still functionally different from projectile #0(default). All of which is hardcoded.
  • chimericchimeric Member Posts: 1,163
    Well, "1 - ARROW (None)" is what I see for projectile in Near Infinity when I look at an axe or sword. There is also "Default (None)" on the list, which can't be edited, but that's not the one weapons use. But you know, it's possible my setup is screwed-up when it comes to projectiles... I don't know if this got fixed when I uninstalled some mods I had, but I used to see wrong projectiles opposite spells. So not a fireball for Fireball etc. They still worked correctly, but they weren't shown right. Which projectile do you see for a battle axe?

    But I'd like to know whether the Default feature was definitely not implemented or you've just never seen it anywhere. I can't think of any spell that does something in case of a miss, not to mention weapons, so it might just never come up. And how would you make a spell miss, anyway? Touch spells just create weapons in the form of glowing hands, and everything seems governed by the same mechanism that does the rolling for weapons. Otherwise spells only shoot in the general direction of the target, like Lightning Bolt, or they always hit, like Agannazar's Scorcher.
  • semiticgoddesssemiticgoddess Member Posts: 14,903
    Currently the only such option is to use one of the new EE opcodes to cast a spell on a critical miss, not just any miss. There's a pair of monk-only gloves or gauntlets that applies Aid to the user on a critical miss, which you can copy if you wanted to make a similar effect.
  • kjeronkjeron Member Posts: 2,368
    chimeric said:

    Well, "1 - ARROW (None)" is what I see for projectile in Near Infinity when I look at an axe or sword. There is also "Default (None)" on the list, which can't be edited, but that's not the one weapons use. But you know, it's possible my setup is screwed-up when it comes to projectiles... I don't know if this got fixed when I uninstalled some mods I had, but I used to see wrong projectiles opposite spells. So not a fireball for Fireball etc. They still worked correctly, but they weren't shown right. Which projectile do you see for a battle axe?

    You probably have an outdated version of NI, that behavior slipped into one of April releases, but has since been fixed. All melee weapons should display projectile "None (None) - 1", but ultimately it is irrelevant, as melee weapon simply do not use their projectile field.
    chimeric said:

    But I'd like to know whether the Default feature was definitely not implemented or you've just never seen it anywhere.

    This was the last time I remember anything about projectile updates being released: http://gibberlings3.net/forums/index.php?showtopic=26810.
    2048 - not implemented yet - applies the default spell on missed targets
    chimeric said:

    And how would you make a spell miss, anyway? Touch spells just create weapons in the form of glowing hands,

    0x44 - default/fail spell, add it to non matching ids
    Admittedly that post is out of date, as these 2 flags have been implemented as of v2.X:
    4096 - not implemented yet - falling path, like cow and comet
    8192 - not implemented yet - set for comet (m_sideMove)
    But I have not managed to get Default spell or Touch projectile to work in v2.X.

    Several PSTEE spells do have resources in the default and success spell fields, but as 99% of PSTEE is hardcoded anyway, I don't know whether its actually implemented there or just for show.
  • chimericchimeric Member Posts: 1,163
    edited July 2017
    Thanks for a detailed answer. I haven't been able to get either a Success spell or a Default spell option to work on hit. There could be some roundabout ways to implement what I had in mind, faking an attack, with the attacker and target both playing attack animations for a parry effect. I've put together something like this, but the target's animation gets thrown off a split second later - this is using effect 138. The attacker performs fine, so if I could get an invisible minion to do ActionOverride on the target instead, with SetSequence, I may have more success... But without any way to weave this into actual attacks that miss as part of the mechanism it's pointless.

    Unless... Hm-hm. Is there any trigger for an attempted attack, an attack made? An effect to put in weapon properties?
  • chimericchimeric Member Posts: 1,163
    edited July 2017
    In answer to my own question, yes there is! Effect 232, Cast Spell on Condition, condition - target attacked, triggers at the speed of the attacking weapon or hostile spell - when the attack roll is made or the projectile arrives. This means that we do have a "success spell" and "default spell," and they are even more universal than could have been hoped for. I can't possibly take on anything else right now, but if someone wanted to change combat behavior so that people react to hits in one way and to misses in another way, he would just need to patch all creatures with a Cast Spell On Condition effect, casting spell X and removing previous instances of X so that they don't pile up, on an attack; and he would also patch them with a Melee Hit Effect opcode giving the target protection from X. This way anybody's miss on anyone would unleash X from within of them, so to speak, and scoring would block it.

    I tested this with a fireball and hit effects (the immunity gift was on a weapon) are faster than a contingency. The fireball exploded and hurt everyone around, but the victim of the blow only suffered weapon damage...
  • kjeronkjeron Member Posts: 2,368
    edited July 2017
    @chimeric
    I did not suggest the "AttackedBy()/When Attacked" trigger because works off any source of hostile action, not just physical attacks.
    Such as:
    • any spell flagged hostile
    • any source of damage(including poison/disease dot)
    • any weapon attack(hit or miss, damage or not)
    You may be able to patch all weapons/spells, but there isn't much you can do about poison/disease without granting complete immunity (either to them or to the contingent spell while suffering from them).

    Also because unlike spells, ranged weapons trigger "AttackedBy()/When Attacked" at the to-hit roll, not upon projectile impact, so the contingency fires before the hit effects.
  • chimericchimeric Member Posts: 1,163
    This limits the usefulness of this to melee and spells, then. No dodging arrows, too bad. For poison and disease... This is a tricky one. Maybe attacks with poison and disease should be patched to remove the contingency, first thing? Then it's a question of when to recast it. When not in those states, obviously.
Sign In or Register to comment.