Random Chance Duration Effects

Post » Mon Jun 18, 2012 1:57 am

Are random chance conditions based on a second to second basis?

If I put a fire damage effect on a target with a duration of 10 seconds, but give it a condition to happen with a random chance of 50%, will the fire damage have a 50% chance of happening at all... or will each second have a 50% chance of fire damage?

If the latter is the case, is there a way to make the entire effect based on the random chance?

Thank you! :-)
User avatar
Amanda Furtado
 
Posts: 3454
Joined: Fri Dec 15, 2006 4:22 pm

Post » Mon Jun 18, 2012 1:41 pm

I would assume that the chance is a one time thing, saying whether the entire 10 second effect happens or not. You could potentially instead make it a 1s effect, with like a 90% chance of reapply the effect when it ends. So there is a 90% chance of them being on fire for 1 seconds, then a .81% chance of them being on fire to a total of 2 seconds, etc. Though that would also have a small chance of going on forever, so you'd want to find a way to limit to to a total of 10 seconds or something.

Then again, I've barely looked into the new scripting or effect stuff, so these are just ideas.
User avatar
Katie Pollard
 
Posts: 3460
Joined: Thu Nov 09, 2006 11:23 pm

Post » Mon Jun 18, 2012 1:59 am

Thank you :-)

It is odd, though. I have a 60 second bleeding effect. In fact, I've got it applied several times on one spell.

I've got it set to do...

100% chance of 1 damage every second
75% chance of 2 damage every second
50% chance of 3 damage every second
25% chance of 4 damage every second

That should give a possibility of 1-10 points of damage every second.

I strike a target one time, then watch the health gauge. The speed of drain seems to increase and decrease sporadically throughout the effect :-P
User avatar
Jerry Jr. Ortiz
 
Posts: 3457
Joined: Fri Nov 23, 2007 12:39 pm

Post » Mon Jun 18, 2012 5:35 am

You could make a spell for each of the random possibilities and then a spell/ench with a scripted effect that does the randomisation and apply one of those spells to the target.

This is what I mean;

Scriptname BleedScript extends activemagiceffectimport utilitySpell property BleedA autoSpell property BleedB autoSpell property BleedC autoSpell property BleedD autoint randEffect = 0EVENT onEffectStart(Actor akTarget, Actor akCaster)	BleedA(akTarget)	randEffect = utility.randomInt(1, 4)	If (randEffect < 4)		BleedB(akTarget)	ElseIf (randEffect < 3)		BleedB(akTarget)		BleedC(akTarget)	ElseIf (randEffect < 2)		BleedB(akTarget)		BleedC(akTarget)		BleedD(akTarget)	EndIfendEventFunction BleedA(ACTOR targ)	BleedA.Cast(targ, targ)EndFunctionFunction BleedB(ACTOR targ)	BleedB.Cast(targ, targ)EndFunctionFunction BleedC(ACTOR targ)	BleedC.Cast(targ, targ)EndFunctionFunction BleedD(ACTOR targ)	BleedD.Cast(targ, targ)EndFunction
User avatar
Kayla Bee
 
Posts: 3349
Joined: Fri Aug 24, 2007 5:34 pm

Post » Mon Jun 18, 2012 4:11 am

Claw seems to have the best way to tackle this problem, unless there is a way in the script to cast a spell, and define its maginitude within the script? That way you only need one bleedspell and you cna define the damage it does when you call it. That would be sweet and efficient :D
User avatar
Haley Merkley
 
Posts: 3356
Joined: Sat Jan 13, 2007 12:53 pm

Post » Mon Jun 18, 2012 3:52 am

Ah, thank you :-)
I'll have to dive into scripting! :-D
User avatar
lacy lake
 
Posts: 3450
Joined: Sun Dec 31, 2006 12:13 am


Return to V - Skyrim