SRL Archive - MSI Bugs

Varrock West Mine Silver is Mining Tin Too


YoHoJo

2011-11-13 19:41:08

Set VWM to mine iron and silver.
It is also mining tin (assuming it is silver).
Color needs to be adjusted.

YoHoJo

2011-11-13 19:46:34

SetColorSpeed2Modifiers(0.07, 2.58);

FindColorsSpiralTolerance(MMCX, MMCY, arP, 12830182, MMX1, MMY1, MMX2, MMY2, 14);

Copy/Paste of ACA information for silver that I just gathered, will test it now.

Is
Accuracy := 10;
How many points of color must be found?

YoHoJo

2011-11-13 20:31:50

My ACA File:
http://up.ht/uUeUxr


As you can see in this image, there is a TIN rock with only TWO matching pixels.
My MSI Object for silver is:

ROCK_SILVER:
with result do
begin
Name := 'ROCK_SILVER';
Uptexts := ['ocks'];
Options := ['ine'];
Level := 20;
Colors := [13290472];
Tol := 12;
Hue := 0.10;
Sat := 2.97;
FindAllColors := False;
W := 30;
H := 30;
Accuracy := 25;
SearchArea := MSBox;
MaxTime := 20000;
ExcludeSelf := False;
RightClickOnly := False;
WaitToMove := True;
MultiClick := True;
Track := True;
AssociatedItems := [ORE_SILVER];
end;

As you can see I set accuracy to 25, so why is a rock with only TWO pixels being clicked?! WTF!

Coh3n

2011-11-13 23:17:40

Just because ACA says there's two pixels doesn't mean that's what's on the main screen. It just means that's what was on the main screen at that moment. As the camera angle and player's location changes, the pixels change as well. They're both really similar colours; I'm not exactly sure what can be done here.

And yes, Accuracy is the amount of colours to be found.

E: I don't know which rocks are silver and which are tin in your image.

YoHoJo

2011-11-14 00:03:57

I took that ACA image RIGHT when MSI clicked the rock.

The two diagonal ones on the bottom right are silver, all others are tin.

Gu3st...

2011-11-14 13:37:58

We should delete the indexes in the ATPA in MSI_FindObjectTPA that is lower than the parameter set int he MainScreen object of the object we're searching for. This will also keep MSI from hovering over I.E dropped ores as Simba sometimes only see 2 or 3 pixels of that color and so on.

Coh3n

2011-11-14 17:59:52

From: Zyt3x
We should delete the indexes in the ATPA in MSI_FindObjectTPA that is lower than the parameter set int he MainScreen object of the object we're searching for. This will also keep MSI from hovering over I.E dropped ores as Simba sometimes only see 2 or 3 pixels of that color and so on.
That's like one of the most basic TPA sorting techniques. ;) So of course MSI does this, that's what the Accuracy field does in TMSObject.

The Accuracy for Silver right now is 10, meaning if less than 10 colours are found, it will skip that box.

Gu3st...

2011-11-14 19:34:20

From: Coh3n
That's like one of the most basic TPA sorting techniques. ;) So of course MSI does this, that's what the Accuracy field does in TMSObject.

The Accuracy for Silver right now is 10, meaning if less than 10 colours are found, it will skip that box.
Then how come MSI hovers an iron ore that's been dropped? The debug tells me the TPA has < 5 points in it :confused:

YoHoJo

2011-11-14 20:33:24

From: Zyt3x
Then how come MSI hovers an iron ore that's been dropped? The debug tells me the TPA has < 5 points in it :confused:


SAME HERE! Something is up BRO!
Even when I changed the silver color to a more updated one myself the ACA screen showed TWO pixels match and my accuracy is at 20 and it still clicked the rock!

Coh3n

2011-11-14 21:48:17

From: Zyt3x
Then how come MSI hovers an iron ore that's been dropped? The debug tells me the TPA has < 5 points in it :confused:
Well for whatever reason, Iron's Accuracy was at 2. :p So that explains that. Iron is fixed in the latest version, though.

From: YoHoJo
SAME HERE! Something is up BRO!
Even when I changed the silver color to a more updated one myself the ACA screen showed TWO pixels match and my accuracy is at 20 and it still clicked the rock!
Enabling SMART debug may help too see more what's going on. The actual RS screen and the ACA screen aren't going to show exactly the same results. I know for a fact MSI handles Accuracy. If you want me to post the code I will. And yes, it works.

Coh3n

2011-11-29 20:29:56

YoHoJo, did you have any luck tweaking the object records for this?

YoHoJo

2011-11-29 20:35:50

I forgot :X, stopped mining there.
From looking at the tread I the the ACA looking right, but even with a high accuracy it was still clicking tins! D:

Coh3n

2011-12-05 22:26:13

Alright, I'll have to do some more debugging when I have time.

E: I apologize, YoHoJo, there was a bug in MSI_FindObjectTPA which did cause it to think it found more objects than it did (only in some instances). It was the way I was using DeleteValueInATPA in a loop (which doesn't work properly). I did mess with this, and it works a lot better from my testing. I will still mine tin in place of silver in certain angles, but definitely not as much as it used to.

This will be updated for the next version.

YoHoJo

2011-12-05 22:27:19

Awesome! Thanks for looking into this so much cohen!
You've spotted it!