a.greene Posted December 4, 2022 Share Posted December 4, 2022 Would it be possible to have battle automatically trigger a spell effect for example: Item X equipped, each time that character (with item X equipped) enters a battle, they automatically receive the benefits of a spell for a predetermined duration (haste for 1 round)? Thank you in advance. Quote Link to comment
lynx Posted December 5, 2022 Share Posted December 5, 2022 Use the cast spell on condition effect with the enemy sighted condition. There's just more hassle to make it apply only once per combat and to make it work properly as an equipping effect. Quote Link to comment
subtledoctor Posted December 5, 2022 Share Posted December 5, 2022 (edited) This could be tricky, if you want it to only apply once at the start of battle. I’d say you need something like, a repeated contingency (op272) with enemy sghted condition (op232 in the .eff), and then have a repeated subspell giving ~6-second immunity to the ultimate spell cast by the contingency, and another, trailing subspell (offset the timing by a second or so by using timing mode 4 somewhere) giving op206 immunity against that first immunity subspell, but this trailing one gets the ‘non-combat’ flag. EDIT - probably better: when the effect first fires from enemy sighted, have it apply immunity to itself after one round. Then have it also apply repeated application of a subspell with op321 canceling the whole thing; but give this op321 subspell the ‘non-combat’ flag. Edited December 5, 2022 by subtledoctor Quote Link to comment
morpheus562 Posted December 5, 2022 Share Posted December 5, 2022 Could you not have it apply a new script to the characters race script? While equipped, it will continually check if in combat. If in combat, it will then apply the spell/effect/ability and then update a variable that combat began and it was cast. Once combat ends, reset casting variable to show the character went out of combat. Quote Link to comment
Dan_P Posted December 5, 2022 Share Posted December 5, 2022 (edited) I do something like this in the Workshop Kitpack, with the Beast's Embrace item, if you want to take a look at it. Uses a combination of op232s, op326s, and op321s. It transforms the party into werewolves when enemies are in visual range, and transforms them back into natural form after battle. The transformation happens only once per battle. For Beast's Embrace, this is an item ability, not an equipped effect, but the same ideas should apply. It's probably simpler if you look at the files yourself, but I can explain it here briefly: On the main ITM file, I have 2 op232s (Cast spell on condition), both with condition see EVILCUTOFF. These are checked once per round. 1. One of them casts a spell with at least 2 effects. One effect would be the main spell effect (i.e. Haste). The other gives immunity to this subspell (either permanent or super long duration), which prevents the spell from re-applying multiple times. For Beast's Embrace, I need a few additional effects, so I cast another subspell that has this immunity effect. 2. The second op232 casts a spell, also with at least 2 effects. The top effect is an op321 that removes effects from this second subspell. The lower effect is a delayed effect that removes any permanent or long duration effects from the first subspell. You want the delay to be at least 7+ seconds. For Beast's Embrace, I set the delay to 15 seconds to allow 2 rounds of checks for enemies. This is to prevent characters from transforming back and forth mid-battle if an enemy is just slightly out of visual range. Edited December 5, 2022 by Dan_P Quote Link to comment
Recommended Posts
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.