Wanted Posted September 23, 2011 Share Posted September 23, 2011 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. Quote Link to comment Share on other sites More sharing options...
Jakkle Posted September 23, 2011 Share Posted September 23, 2011 This is grate news, now for testing and making sure it works, which I'm sure it will Quote Link to comment Share on other sites More sharing options...
Wanted Posted September 27, 2011 Author Share Posted September 27, 2011 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] Quote Link to comment Share on other sites More sharing options...
FHannes Posted September 27, 2011 Share Posted September 27, 2011 The bug is already fixed in the latest 3.28 revision, the algorithm is now 100% accurate. Quote Link to comment Share on other sites More sharing options...
Wanted Posted October 5, 2011 Author Share Posted October 5, 2011 Updated OSI. Edit: http://wiki.scar-divi.com/osi/index.php?title=Using_Variance Quote Link to comment Share on other sites More sharing options...