Hello Spooky,
I have run the RSP, and your mod DPCA pops up very often with higher processing times. (aadpMoreAIScript [SCPT:A400E27E])
ok, I took a short glance at your script, and it reveals some glitches in terms of speed, not playabitlity.
This section for example
***************************************************************************
if PlayerRef.AnimPathIncludes "getup" == 0 && startClimb == 0 && ( ME.AnimPathIncludes "forward" ) && me.GetFatiguePercentage > .2 && me.getitemcount aadpJumpAwayToken == 0 && PainPauseTimer <= 0if me.isrunning == 1 && me.GetCombatTarget == player && me.IsShieldOut == 1 && ShieldChargeTimer <= 0 && me.IsCasting == 0 && SprintNum > 0 && ( PlayerRef.IsAnimPlaying + PlayerRef.IsIdlePlaying ) > 0if ( Me.getav agility ) > 10 && ( Me.getav block ) > 10 && ( ME.getav handtohand ) > 10 && ( ME.GetHeadingAngle Player > -15 ) && ( ME.GetHeadingAngle PLAYER < 15 ) && PlayerRef.GetKnockedState == 0 && ME.GetFatiguePercentage > .1if ME.getdistance player < 600 && ME.getdistance player > 280 && me.AnimPathIncludes "getup" == 0if me.getdistance player < 300me.playgroup BlockHit 1endifset ShieldRaiseOnce to 0set ShieldChargeTimer to .001me.playgroup FastForward 1endifendifendifendif
Contructs like this should be avoided, because their evaluation takes more time for one reason. technically this is caused by stack and jump conditions.
This would be appropriate:
***************************************************************************
if PlayerRef.AnimPathIncludes "getup" == 0 if startClimb == 0 if ( ME.AnimPathIncludes "forward" ) if me.GetFatiguePercentage > .2 if me.getitemcount aadpJumpAwayToken == 0 if PainPauseTimer <= 0 if me.isrunning == 1 if me.GetCombatTarget == player if me.IsShieldOut == 1 if ShieldChargeTimer <= 0 if me.IsCasting == 0 if SprintNum > 0 if ( PlayerRef.IsAnimPlaying + PlayerRef.IsIdlePlaying ) > 0 if ( Me.getav agility ) > 10 if ( Me.getav block ) > 10 if ( ME.getav handtohand ) > 10 if ( ME.GetHeadingAngle Player > -15 ) if ( ME.GetHeadingAngle PLAYER < 15 ) if PlayerRef.GetKnockedState == 0 if ME.GetFatiguePercentage > .1 if ME.getdistance player < 600 if ME.getdistance player > 280 if me.AnimPathIncludes "getup" == 0if me.getdistance player < 300me.playgroup BlockHit 1endifset ShieldRaiseOnce to 0set ShieldChargeTimer to .001me.playgroup FastForward 1 endif endif endif endif.....< all closing endif's >....................
The condition with the highest probability to be NOT TRUE should be placed first.
The other part is here, another example:
***************************************************************************
if ME.getdistance player <= 90 && ( ME.AnimPathIncludes "forward" ) set ShieldChargeTimer to 0me.playGroup Idle 1if ( 1.25 * ( ME.getav strength + ( .25 * ME.getav speed ) ) ) * ME.GetFatiguePercentage > ( PlayerRef.getav strength * PlayerRef.GetFatiguePercentage )ME.pushactoraway player 10elseif ( 1.25 * ( ME.getav strength + ( .5 * ME.getav speed ) ) ) * ME.GetFatiguePercentage > ( PlayerRef.getav strength * PlayerRef.GetFatiguePercentage )ME.pushactoraway player 7elseif ( 1.25 * ( ME.getav strength + ( ME.getav speed ) ) ) * ME.GetFatiguePercentage >= ( PlayerRef.getav strength * PlayerRef.GetFatiguePercentage )ME.pushactoraway player 3elseif ( 1.25 * ( ME.getav strength + ( ME.getav speed ) ) ) * ME.GetFatiguePercentage < ( PlayerRef.getav strength * PlayerRef.GetFatiguePercentage )PlayerRef.pushactoraway me 3elseif ( 1.25 * ( ME.getav strength + ( ME.getav speed ) ) ) * ME.GetFatiguePercentage < ( ( 1.5 * PlayerRef.getav strength ) * PlayerRef.GetFatiguePercentage ) && PlayerRef.isblocking == 1;nothing happenselseif ( 1.25 * ( ME.getav strength + ( ME.getav speed ) ) ) * ME.GetFatiguePercentage < ( ( 1.25 * PlayerRef.getav strength ) * PlayerRef.GetFatiguePercentage ) && PlayerRef.isblocking == 1PlayerRef.pushactoraway me 3endif
This part evaluates different conditions, but does the same calculations again over and over for every evaluation. And lets says the very last condition is only true,
it has a lot to do. Better would be:
***************************************************************************
let MEStrenth := ME.getav strengthlet MESpeed := ME.getav speedlet MEFatigue := ME.GetFatiguePercentagelet PREFStrength := PlayerRef.getav strengthlet PREFFatigue := PlayerRef.GetFatiguePercentagelet PREFSTRXFAT := PREFStrength * PREFFatigue if ( 1.25 * ( MEStrenth + ( .25 * MESpeed ) ) ) * MEFatigue > ( PREFSTRXFAT )ME.pushactoraway player 10elseif ( 1.25 * ( MEStrenth + ( .5 * MESpeed ) ) ) * MEFatigue > ( PREFSTRXFAT )ME.pushactoraway player 7elseif ( 1.25 * ( MEStrenth + ( MESpeed ) ) ) * MEFatigue >= ( PREFSTRXFAT )ME.pushactoraway player 3elseif ( 1.25 * ( MEStrenth + ( MESpeed ) ) ) * MEFatigue < ( PREFSTRXFAT )PlayerRef.pushactoraway me 3elseif ( 1.25 * ( MEStrenth + (MESpeed ) ) ) * MEFatigue < ( 1.5 * PREFSTRXFAT ) && PlayerRef.isblocking == 1;nothing happenselseif ( 1.25 * ( MEStrenth + ( MESpeed ) ) ) * MEFatigue < ( 1.25 * PREFSTRXFAT ) && PlayerRef.isblocking == 1PlayerRef.pushactoraway me 3endif
If you like to, I could try to optimze the script, to evaluate it and see the differences in speed.