NI Probability check with Cast spell on condition
Maerdyl
Member Posts: 15
I've recently started creating my own items using NearInfinity, things have been working fine for me until now.
I'm trying to use "Cast spell on condition (232)" on an armor piece in BGEE + SoD, my problem here is that the effect triggers ALL THE TIME even with a 10% Probability.
So i was wondering, am i doing something wrong or is this function somehow hardcoded to not take into consideration the Probability parameter ?
I'm trying to use "Cast spell on condition (232)" on an armor piece in BGEE + SoD, my problem here is that the effect triggers ALL THE TIME even with a 10% Probability.
So i was wondering, am i doing something wrong or is this function somehow hardcoded to not take into consideration the Probability parameter ?
0
Comments
If you want the triggered spell to only take effect 10% of the time, you need to make a custom spell whose only effect is to cast the spell on the target with 10% Probability (specifically, set probability1 to 9 if you want a 10% chance). The Cast Spell on Condition effect should have probability1 = 100, and it should trigger the custom spell.
In case this was the problem, giving a Cast Spell on Condition effect a 10% Probability will make the Cast Spell on Condition effect work perfectly 10% of the times the armor is put on; it will not make the spell trigger on 10% of conditions.
As for your message, i got the first part alright, but i don't really understand what you mean in the second one, or more precisely the last sentence: Sorry to bother you, my brain is kinda slow, would it be possible to elaborate on what this means ? maybe with an example ?
Now on the part i did (hopefuly) understand, i already created a custom spell to do exactly what you are suggesting, but i must have done it wrong, because it still triggers 100% of the time.
For more details, what i did was:
- Add "Cast spell on condition" as an effect on my armor. (should i have made it an item ability ?)
- Set up the effect with a 50% Probability and linked it to my custom spell as a resource
- Set up my custom spell with a Spell ability
- Edited all Effects on that Spell ability to trigger with a 50% Probability
(I set up 50% Probability for testing purposes so it triggers quicker and more often)
Despite all this, it still triggers 100% of the time regardless...
Do you want me to link any of my ITM or SPL files btw ?
P.S: Sorry for the first part, i think i finally got what you meant. in short the Cast Spell on Condition will trigger 10% of the time at each check to determine if the armor is worn or not and i guess the frequency of those checks is so high that it will trigger constantly. Therefore the 10% chance to trigger based on the parameters i want doesn't really matter.
Sure! Just post them here and I'll take a look at them.
Some screenshots:
(She got hit by the battle horror and that triggered Armor of Faith, but the effects didn't get applied this time.)
(She got hit by the battle horror and that triggered Armor of Faith, and the effects were applied.)
That's why I recommended making a custom spell that casts the spell you want. Make it so SPPR111B has no name, and put just one effect on it; that effect should cast SPPR111, but probability1 should be set to 9 (10% chance of triggering).
By the way, it might be simpler just to have the armor give the effects of Armor of Faith while equipped.
Anyway, i transformed SPPR111B into a blank spell that only casts SPPR111, well at least that's what it's supposed to do... but sadly it doesn't work at all, nothing triggers, maybe i set it up wrong due to my inexperience?
I've taken the liberty of adding the changed spell (now called PLAT08B.SPL) and the Updated Armor that goes with it as attachments, if you want to check them out again.
Also, if you want to have the spell not display its name when triggered, set the name to -1 rather than 99999, since certain mods might add so many strings to the game that the total goes over 99999.
I redid the whole thing from scratch and it worked perfectly in the end !
I'm really grateful for your help, i would never have managed to get even close to figuring this out without you!
Thanks a lot!!!