SRL Archive - SRL Suggestions

autocolor.simba - srl_BlackColor


Press Play

2012-01-21 00:30:54

I am suggesting to add that black colour on the minimap that appears in places that you can't go. I can't really explain it, but hopefully you know what I'm talking about :p
srl_BlackColor         = 13;
I'm not too sure how autocolor.simba works, otherwise I would've added it myself. Here are some colours that I have picked for it on several occasions:
srl_BlackColor:
Result := [ 460550, 460033, 459776, 458757, 395015, 329476, 328454, 328194,
263170, 262145, 197895, 197120, 132096, 131075, 198151,
1792, 1539, 1286, 1030{, 519, 6 }];

EDIT: Actually, I did it I think :p You just have to add those two things up there^^ in the Simba tags? Now we just need more generic colours for the 'black' I believe?

EDIT2: Added more colours to the array up there ^^. As you can see, I colour picked the colour '6', but it seemed to be stuffing up the calculations (even when the colour was exactly 6!).. so I removed it and all became well :) I'm currently testing this and will keep adding more colours when it fails. I will 'pull request' on git if i get some responses on this thread first :S

EDIT3: Added more colours to the array.

Press Play

2012-01-25 17:30:43

Since I've gotten no replies in 5 days, I'm going to pull request on git :p I know that it works and it doesn't break any scripts either so it'll do no harm :) the black colour is also very useful for location detection :thumbsup:

Narcle

2012-01-25 18:01:43

Function MiniMapBlack: integer;
var
arC, A: TIntegerArray;
i, t, Len, Hi, c: Integer;
H, S, L: Extended;
begin
Result := -1;
t := GetSystemTime;
arC := GetColors(TPAFromBox(IntToBox(MMX1, MMY1, MMX2, MMY2)));
ClearSameIntegers(arC);
SetArrayLength(A, Length(arC));
for i := 0 to High(arC) do
begin
ColorToHSL(arC[i], H, S, L);
if (L <= 10.0) then
begin
A[Len] := arC[i];
Inc(Len);
end;
end;
For i := 0 to Len do
begin
c := CountColor(A[i], MMX1, MMY1, MMX2, MMY2)
if c > Hi then
begin
Hi := c;
Result := A[i];
end;
end;
DebugLn('MiniMapBlack = ' + IntToStr(Result)+ ' '+IntToStr(GetSystemTime-t)+'ms');
end;

I made this for dungeon areas. Hasn't failed me yet.

Coh3n

2012-01-26 13:06:59

Added this. :)