redeyedtreefrogthesecond Posted July 29, 2020 Share Posted July 29, 2020 I'm looking into creating a rather niche potion, one that operates similarly to a black-blood potion from the witcher 3. Essentially, when the player (or preferably any npc) drinks the potion, vampiric absorb spells used against them will damage them normally, but instead of healing the caster, the caster will also take damage. I know I could alter the vanilla absorb spells to check for the potion effect, but want to avoid potential incompatibilities with other vampire mods. Is there a way to apply an effect to the caster of a type of spell? (ideally with a check for: is the magic effect an absorb health spell, is the caster a vampire) Link to comment Share on other sites More sharing options...
maxarturo Posted July 29, 2020 Share Posted July 29, 2020 Wait now... You want your 'Custom Made' potion to heal and at the same time to damage the actor that drinks it ?. * I don't quite get it... Link to comment Share on other sites More sharing options...
redeyedtreefrogthesecond Posted July 29, 2020 Author Share Posted July 29, 2020 Wait now...You want your 'Custom Made' potion to heal and at the same time to damage the actor that drinks it ?. * I don't quite get it... I don't want it to heal anyone; I'd like it to damage anyone who targets the drinker with an absorb spell/effect. So it would be conditionally damaging enemies. Link to comment Share on other sites More sharing options...
maxarturo Posted July 29, 2020 Share Posted July 29, 2020 Then your potion must give them a 'Disease' with an 'Magic Effect' does has no resistance value apply to it, any of the actor's resistance to disease will be ignored by your 'Disease Spell', this means you need to create your own 'Magic Effect' and the 'Disease' spell for your potion. Another way you could do this is by creating an empty 'Magic Effect' that will execute a script to damage the actor. I hope it helps. Link to comment Share on other sites More sharing options...
cumbrianlad Posted August 3, 2020 Share Posted August 3, 2020 Hi, folks. Maxarturo, do you think that using the event 'Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)' in the script for the potion might work? It is used somewhere, but I can't recall where, just at the minute. Hang on, I'm thinking of the spell 'DLC1AbDeerGlow' I'm thinking that this could be used to check that the player has been hit and has been hit by the specific vampiric drain spell. If those conditions are true, then the OP applies vampiric drain to the aggressor. If it can work this way, the only downside is that vampiric drain will be applied to the aggressor until they die. I suppose the OP could get around this by adding a line to 'RegisterForSingleUpdate(MySpellTime)' and set the 'MySpellTime' as a float property and give it a value. In a separate event 'Event OnUpdate()' the spell is removed from the aggressor. They might also want to remove it in the event of the aggressor dying... don't know if the effect will hang on the dead aggressor forever if it's not removed. If and it's a big 'If' my rambling will work, the OP could then make a specific spell to be applied to the aggressor, so they could then tailor the amount of damage done to the aggressor. As I've put it, the aggressor gets exactly the same damage as the vampire is dealing out, for the specified time. With new spells, the vampire could get the same damage, or they could get more or less damage, depending how the OP wants to play it. Less damage implies that some of the original spell is reflected back on the aggressor. More damage means the aggressor is truly wasting their magicka by using the spell! In that case, as long as the player's health is higher than the vampire's, they can simply dodge the vampire until it dies! Sweet. Link to comment Share on other sites More sharing options...
maxarturo Posted August 3, 2020 Share Posted August 3, 2020 @ cumbrianlad Yes, this can be done using different approaches, it's all down to what and how the modder is trying to achive in the long run. In the OP case, i think a disease is the simpler way to do this. I always try to create / provide scripts or solutions that will use the minimum of system resources and they will accomplish the same result with a lighter and simpler way as possible. Have a happy modding. Link to comment Share on other sites More sharing options...
cumbrianlad Posted August 3, 2020 Share Posted August 3, 2020 Right. Makes a change me suggesting a scripted method! Normally I'm doing my damndest to avoid scripts. So how does the disease get applied to an enemy, some time after downing the potion? I can't see how to condition the disease being given to the attacker if the attacker is a vampire and has used one of the vampiric drain spells on the player, without using a script. Anyway, I guess we'll wait for the OP to reply, rather than carrying out our own little conversation, however interesting it may be! Link to comment Share on other sites More sharing options...
Recommended Posts