Jump to content
Wanted

Introducing Variance!

Recommended Posts

http://wiki.scar-divi.com/osi/index.php?title=Using_Variance

 

In order to use variance with RS2 simply do nothing other than update your OSI and SCAR to the latest versions (Rev 44, SCAR 3.28 Alpha)

 

In order to not use variance with RS2 simply define {$DEFINE NoVariance}

 

Currently this is automatic when RS2 is not defined. In order to use variance without RS2 being defined you must {$DEFINE OverrideVariance}

 

Right now, in Divi\Globals.scar, the default Variance is set to 3.0 in const OSI_Variance.

 

Ok so what the heck is variance?

 

There's two threads you can read

 

http://forums.scar-divi.com/showthread.php?tid=177

http://forums.scar-divi.com/showthread.php?tid=186&pid=839#pid839

 

But basically all it is, is a way for OSI to be more human like when it comes to generating random values.. like in waiting, mousebox etc.

 

The way it works is, using some hardcore maths, depending on the variance number, the end number will be more likely to appear in the center of your box, circle, or number range. Much like a human normally does things near the same or towards the center with some near the edge on occasion.

 

These are OSI functions with the builtin variance

 

RR "RandomRange)

RRectanglePoint

RCirclePoint

 

And any functions that use them.. that means functions like

 

WaitRR

Mouse

MMouse

MouseBox

MouseBox etc...

TypeSend

 

Hell anything with RR, WaitRR, or uses a box/circle. The list goes on quite a bit.

 

So a good portion of everything has been greatly improved with this new ability!

 

Cheers.

 

Link to comment
Share on other sites

Variance with Box is temporarily disabled due to a bug in the variance alg.

 

[sCAR]function RRectanglePoint(X1, Y1, X2, Y2: Integer): TPoint;

begin

//{$IFDEF NoVariance} // TEMPORARY FIX

Result := RndBoxPoint(Box(X1, Y1, X2, Y2));

//{$ELSE}

//Result := RndBoxPointG(Box(X1, Y1, X2, Y2), OSI_Variance);

//{$ENDIF}

end;[/sCAR]

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...