SRL Archive - OSR Help

SPS and ObjDTM not working for me.. Working Path Method??


Zorgatone

2013-02-01 08:11:39

Does anybody have a working method to walk a path correctly? I've tried with SPS and ObjDTM and they both sucks

Now I'm using a combination of them both, but every 3 times it stops somewhere I don't know why..

I've tried both to update the SPS maps and adding more points, but nothing..

Ilya

2013-02-01 10:45:31

SPS is not working for me either. Probably just cause i'm doing something dumb.
i get the Access denied, SPS load message.
Not quite sure what the problem is.

Sjoe

2013-02-01 11:25:14

From: Zorgatone
Does anybody have a working method to walk a path correctly? I've tried with SPS and ObjDTM and they both sucks

Now I'm using a combination of them both, but every 3 times it stops somewhere I don't know why..

I've tried both to update the SPS maps and adding more points, but nothing..



they're pretty accurate, mostly SPS.
Make sure the points you're walking to aren't at the edge of your SPS map. and that it's big enough.
Alternatives are RadialWalk / TPA Walking / DDTM.

SPS is the most userfriendly way though

Zorgatone

2013-02-01 12:48:46

[ATTACH=CONFIG]18910[/ATTACH]

I've made this custom map because I've found that a recent update of RS made the minimap images larger than the full large map view, and SPS is fucked up for this reason.. Comparing the maps I've found that this one I've made is more accurate, but sometimes it doesn't work.. Maybe because I've cropped the border or something…. My TPointArray is:

WalkPath_VarrockToGEVar := [Point(357, 486), Point(347, 483),
Point(344, 473), Point(344, 459), Point(345, 450), Point(344, 438),
Point(344, 428), Point(344, 416), Point(344, 406), Point(344, 396),
Point(343, 385), Point(342, 375), Point(342, 365), Point(340, 355),
Point(336, 342), Point(339, 327), Point(340, 317), Point(340, 303),
Point(342, 293), Point(339, 286), Point(332, 274), Point(328, 266),
Point(320, 261), Point(311, 256), Point(300, 256), Point(291, 254),
Point(283, 248), Point(282, 236), Point(281, 225), Point(282, 214),
Point(282, 203), Point(280, 189), Point(277, 182), Point(272, 174),
Point(262, 167), Point(254, 162), Point(243, 158), Point(229, 153),
Point(216, 147), Point(196, 145), Point(178, 146), Point(162, 147),
Point(153, 142), Point(140, 136), Point(133, 128), Point(128, 120),
Point(129, 101), Point(127, 91), Point(117, 83), Point(101, 80),
Point(88, 76), Point(74, 72), Point(64, 63), Point(56, 54),
Point(60, 42)];
And I've copied the map to C:\Simba\Includes\SPS\img\runescape_other and I'm using "{$i sps/sps.simba}" and "sps_setup(runescape_other,['Varrock']);" because the file is called "Varrock.png"

But if fails most of the times.. What did I do wrong?

Zorgatone

2013-02-01 12:51:09

From: Sjoekeloe
they're pretty accurate, mostly SPS.
Make sure the points you're walking to aren't at the edge of your SPS map. and that it's big enough.
Alternatives are RadialWalk / TPA Walking / DDTM.

SPS is the most userfriendly way though


Do you know someone who is coding in the last week or a script that is working today and walking? I hope that this is not a RS Update problem

Zorgatone

2013-02-01 12:52:50

From: Ilya
SPS is not working for me either. Probably just cause i'm doing something dumb.
i get the Access denied, SPS load message.
Not quite sure what the problem is.


Have you enabled security.sex? Disable it.. And make sure you included {$i srl/srl.simba} and called SPS_Setup before using SPS_WalkPath

EDIT: Sorry Guys for triple posting, I was in a hurry (lol)

The Killer

2013-02-01 14:11:48

From: Zorgatone
[ATTACH=CONFIG]18910[/ATTACH]

I've made this custom map because I've found that a recent update of RS made the minimap images larger than the full large map view, and SPS is fucked up for this reason.. Comparing the maps I've found that this one I've made is more accurate, but sometimes it doesn't work.. Maybe because I've cropped the border or something…. My TPointArray is:

WalkPath_VarrockToGEVar := [Point(357, 486), Point(347, 483),
Point(344, 473), Point(344, 459), Point(345, 450), Point(344, 438),
Point(344, 428), Point(344, 416), Point(344, 406), Point(344, 396),
Point(343, 385), Point(342, 375), Point(342, 365), Point(340, 355),
Point(336, 342), Point(339, 327), Point(340, 317), Point(340, 303),
Point(342, 293), Point(339, 286), Point(332, 274), Point(328, 266),
Point(320, 261), Point(311, 256), Point(300, 256), Point(291, 254),
Point(283, 248), Point(282, 236), Point(281, 225), Point(282, 214),
Point(282, 203), Point(280, 189), Point(277, 182), Point(272, 174),
Point(262, 167), Point(254, 162), Point(243, 158), Point(229, 153),
Point(216, 147), Point(196, 145), Point(178, 146), Point(162, 147),
Point(153, 142), Point(140, 136), Point(133, 128), Point(128, 120),
Point(129, 101), Point(127, 91), Point(117, 83), Point(101, 80),
Point(88, 76), Point(74, 72), Point(64, 63), Point(56, 54),
Point(60, 42)];
And I've copied the map to C:\Simba\Includes\SPS\img\runescape_other and I'm using "{$i sps/sps.simba}" and "sps_setup(runescape_other,['Varrock']);" because the file is called "Varrock.png"

But if fails most of the times.. What did I do wrong?

Ok, You have made the map wrong, You made it at a slight angle and not dead north. I'd recommend retrying but using maps in the include (Saves time).

edit: feel free to pm me if you need more help.

Zorgatone

2013-02-01 16:08:03

From: The Killer
Ok, You have made the map wrong, You made it at a slight angle and not dead north. I'd recommend retrying but using maps in the include (Saves time).

edit: feel free to pm me if you need more help.


Maps in the include don't work.. For me and others because of the updates.. http://villavu.com/forum/showthread.php?t=93787 http://villavu.com/forum/showthread.php?t=89831&page=2 http://villavu.com/forum/showthread.php?t=95950


EDIT: And yes, I've clicked north and I'm sure it's correct (But everytime the minimap is a bit different in some pixels).. I've used the minimap because the World map is littler and a bit different, as taught here: http://villavu.com/forum/showthread.php?t=84360

The Killer

2013-02-01 16:18:01

From: Zorgatone
Maps in the include don't work.. For me and others because of the updates.. http://villavu.com/forum/showthread.php?t=93787 http://villavu.com/forum/showthread.php?t=89831&page=2 http://villavu.com/forum/showthread.php?t=95950


EDIT: And yes, I've clicked north and I'm sure it's correct (But everytime the minimap is a bit different in some pixels).. I've used the minimap because the World map is littler and a bit different, as taught here: http://villavu.com/forum/showthread.php?t=84360


its not correct, look how the buidlings lines aren't straight. Try the include maps, they work quite well for me.

Zorgatone

2013-02-01 17:08:21

From: The Killer
its not correct, look how the buidlings lines aren't straight. Try the include maps, they work quite well for me.


For me it's working only the very first path and not the next ones, even if I call again SPS_Setup with the correct arguments..

The Killer

2013-02-01 17:38:38

From: Zorgatone
For me it's working only the very first path and not the next ones, even if I call again SPS_Setup with the correct arguments..


Hmm post your script or something, I'd be happy to test for you. Where do I need to start it?

John

2013-02-01 18:08:40

TK, The only reason it isn't working is because it is only 1 minimap wide, It needs to be at least 2. having a slight angle should'nt really matter too much.

Zorgatone

2013-02-01 18:09:52

From: The Killer
Hmm post your script or something, I'd be happy to test for you. Where do I need to start it?


Well I've edited it a bit.. I've made a custom map that holds all the paths that I need, just to be sure I don't have to use SPS_Setup more than once (preventing bugs) but does not work either..
[ATTACH=CONFIG]18917[/ATTACH]

Zorgatone

2013-02-01 18:11:03

From: John
TK, The only reason it isn't working is because it is only 1 minimap wide, It needs to be at least 2. having a slight angle should'nt really matter too much.


I'll try that way.. The weird thing is that the "official" maps don't work either, and they've been updated today or yesterday.. I've done the update today.

From: Zorgatone
Well I've edited it a bit.. I've made a custom map that holds all the paths that I need, just to be sure I don't have to use SPS_Setup more than once (preventing bugs) but does not work either..
[ATTACH=CONFIG]18917[/ATTACH]


I'm teleporting to Varrock Lodestone, Walking to the G.E to check some things there, after that I'm teleporting to barbarian outpost and jumping in the whirlpool.. After that I'm walking to the Gnome Stronghold Door, opening it and walking to the northen swamp

John

2013-02-01 19:11:34

The maps need to be wider and spaced out more, if it's too close it'l go hay wire.

Zorgatone

2013-02-02 08:39:08

From: John
The maps need to be wider and spaced out more, if it's too close it'l go hay wire.


[ATTACH=CONFIG]18928[/ATTACH] Doesn't work either… Maybe the problem is because I'm teleporting? After I teleport to barbarian outpost it stops there.. If I start from the Barbarian outpost it works with the same code -.-'

Sjoe

2013-02-02 09:03:50

I had that problem once, after one run and teleport it didn't walk anymore.

I solved it by making another path, using more points. (close to eachother)
But I think it's cause of your map too.



Try and make the points close together. and make the map big enough so nothing is sticking out of the edge (I did this in a hurry, my map should be bigger at the bottom, cause it's sticking at the edge)

Ian

2013-02-02 10:45:42

ObjDTMs are working fine for me, could be your path is wrong. Try my CrayFisher, I'm using it right now so it is definitely working :)

Zorgatone

2013-02-02 12:06:04

From: Sjoekeloe
I had that problem once, after one run and teleport it didn't walk anymore.

I solved it by making another path, using more points. (close to eachother)
But I think it's cause of your map too.



Try and make the points close together. and make the map big enough so nothing is sticking out of the edge (I did this in a hurry, my map should be bigger at the bottom, cause it's sticking at the edge)



This way.. Yes but not if I'm walking to the whirlpool, jumping into it, and walking again.. It won't walk the second path

EDIT: And (of course) I'm using points close to eachother…


From: BMWxi
ObjDTMs are working fine for me, could be your path is wrong. Try my CrayFisher, I'm using it right now so it is definitely working :)


I'm In trouble walking from Varrock Lodestone to the G.E. the most of the times it stops near the weapon vendor because some minimap symbols will move and cover ladders and trees, and in that case there are not many objects in the minimap to rely on..

Ian

2013-02-02 12:17:30

From: Zorgatone

I'm In trouble walking from Varrock Lodestone to the G.E. the most of the times it stops near the weapon vendor because some minimap symbols will move and cover ladders and trees, and in that case there are not many objects in the minimap to rely on..


Yeah, there are some places that ObjectDTM walking can't do that well. Because you're walking along a road, consider trying RadialWalk. :)

Zorgatone

2013-02-02 12:27:47

From: BMWxi
Yeah, there are some places that ObjectDTM walking can't do that well. Because you're walking along a road, consider trying RadialWalk. :)


I'm trying to learn that.. But I'm starting at the lodestone… Maybe I should walk to the first point using ObjDTM and after that with radialWalk..
Is out there a video about RadialWalk ?
Ty


EDIT: I wrote ObjectDTM video, I wanted to write RadialWalk :P
Corrected

Ian

2013-02-02 12:47:40

From: Zorgatone
I'm trying to learn that.. But I'm starting at the lodestone… Maybe I should walk to the first point using ObjDTM and after that with radialWalk..
Is out there a video about ObjectDTM?
Ty


Not that I know of, but Euphemism's ObjDTM Tutorials teach you how to make paths.

Sjoe

2013-02-02 12:50:17

From: Zorgatone
I'm trying to learn that.. But I'm starting at the lodestone… Maybe I should walk to the first point using ObjDTM and after that with radialWalk..
Is out there a video about ObjectDTM?
Ty


2 tutorials:
http://villavu.com/forum/showthread.php?t=72067
http://villavu.com/forum/showthread.php?t=78905

whichever u prefer

Zorgatone

2013-02-02 13:00:21

Holy crap… I've wrote it wrong I mean radialWalk…<

I'm trying to learn that.. But I'm starting at the lodestone… Maybe I should walk to the first point using ObjDTM and after that with radialWalk..
Is out there a video about radialWalk?


LOL…

Now it's correct xD

Sjoe

2013-02-02 13:02:30

From: Zorgatone
Holy crap… I've wrote it wrong I mean radialWalk…<

I'm trying to learn that.. But I'm starting at the lodestone… Maybe I should walk to the first point using ObjDTM and after that with radialWalk..
Is out there a video about radialWalk?


LOL…

Now it's correct xD


No video's but there are some tutorials out there. and there's also a tool for it, making it easier to use. (It's linked in one of those tutorials)

Zorgatone

2013-02-02 13:08:15

From: Sjoekeloe
No video's but there are some tutorials out there. and there's also a tool for it, making it easier to use. (It's linked in one of those tutorials)


Yes I'm using those, both the tutorial and the tool.. I just need to practise more I think.. Anyway I still have this problem I don't know why: http://villavu.com/forum/showthread.php?t=66266&page=12&p=1167122#post1167122

Sjoe

2013-02-02 13:10:29

From: Zorgatone
Yes I'm using those, both the tutorial and the tool.. I just need to practise more I think.. Anyway I still have this problem I don't know why: http://villavu.com/forum/showthread.php?t=66266&page=12&p=1167122#post1167122


Yeah sorry I have no idea at all anymore :)
Maybe @Flight has a solution? (mentioned him in case)

Zorgatone

2013-02-02 13:56:27

From: Sjoekeloe
Yeah sorry I have no idea at all anymore :)
Maybe @Flight has a solution? (mentioned him in case)


Ok thank you

Flight

2013-02-02 18:46:20

From: Sjoekeloe
Yeah sorry I have no idea at all anymore :)
Maybe @Flight has a solution? (mentioned him in case)


I heard my name.

Indeed I do have a suggestion as just last night I was running into issues of inaccurate SPS but I found a notable trick to improving accuracy and I'll pass it along to you. When making a custom map image you need to make sure there's plenty of room on all sides of the path you plan to be walking. I also recommend just cutting out pieces from the huge 'runescape_surface.png' map file. I can see in your custom map image you didn't allow much image for SPS to get an accurate location from, so let me give you a different map instead, of the same area.


You'll notice it's 485x538 and this is okay. I thought before that the map pieces must be 500x500 but from what I can tell so far it doesn't make a difference. For confirmation on that I would recommend talking to @Coh3n. You should see my 'farmlocations.png' SPS image, it's 500x1000 but quite accurate.

So download that, put it in your runescape_other folder, load it correctly through SPS and use my tile-finding script to create your own path (as I always do this manually, never through SPS path tools).

program MyCoords;
{$DEFINE SMART8}
{$i SRL/srl.simba}
{$i SPS/sps.simba}

Var
Me,nMe: TPoint;

begin
setupSRL();

//SPS_Setup(RUNESCAPE_SURFACE, ['10_7','10_6']);
SPS_Setup(RUNESCAPE_OTHER, ['varrock']);
SPS_AnyAngle := True;

Me := SPS_GetMyPos();
Writeln(ToStr(Me));
Repeat
nMe := SPS_GetMyPos();
if (Me <> nMe) then
begin
ClearDebug;
Writeln(ToStr(nMe));
Me := SPS_GetMyPos();
end;
Wait(250);
Until(False)
end.

Olly

2013-02-02 19:09:47

^ Previous SPS versions needed maps to be 500x500, but now if there in runescape_other i believe they will run at any size.

Sjoe

2013-02-02 19:13:16

From: Flight


So download that, put it in your runescape_other folder, load it correctly through SPS and use my tile-finding script to create your own path (as I always do this manually, never through SPS path tools).

program MyCoords;
{$DEFINE SMART8}
{$i SRL/srl.simba}
{$i SPS/sps.simba}

Var
Me,nMe: TPoint;

begin
setupSRL();

//SPS_Setup(RUNESCAPE_SURFACE, ['10_7','10_6']);
SPS_Setup(RUNESCAPE_OTHER, ['varrock']);
SPS_AnyAngle := True;

Me := SPS_GetMyPos();
Writeln(ToStr(Me));
Repeat
nMe := SPS_GetMyPos();
if (Me <> nMe) then
begin
ClearDebug;
Writeln(ToStr(nMe));
Me := SPS_GetMyPos();
end;
Wait(250);
Until(False)
end.


Do u find it more accurate if you make the path manually?

Flight

2013-02-02 19:15:58

From: Sjoekeloe
Do u find it more accurate if you make the path manually?


I do absolutely.

Coh3n

2013-02-03 00:12:59

As far as I know, the maps could always be any size. I know for a fact that now it doesn't matter. The smaller the map, the faster SPS will be.

The inaccuracy issue if the point is close to the edge of map: I really don't know what causes this. I implemented a system where your SPS areas are combined (if using RUNESCAPE_SURFACE) into one map so it makes SPS more efficient and more accurate. It improved, but didn't completely solve the issue.

For example: run the following script and check your Simba folder for an image named 0. You'll see that all four SPS areas are combined into one map. This is the map SPS searches in.

program new;
{$i srl/srl.simba}
{$i sps/sps.simba}

var
counter: integer;

function SPS_SetupEx(surface: integer; areas: TStringArray): boolean;
var
t: integer;
tmp: TMufasaBitmap;
begin
t := getSystemTime;

SPS_MultiMouse := true;
SPS_Accuracy := 4;

if (length(areas) > 0) then
begin
if (surface = RUNESCAPE_SURFACE) then
tmp := SPS_MergeAreas(areas) // combine the SPS areas into 1; makes for a more accurate read
else
if (surface = RUNESCAPE_OTHER) then
if (length(areas) = 1) then
tmp := SPS_GetArea(areas[0], surface)
else begin
writeln('SPS_Setup(): Invalid dungeon areas. You can only select one!');
exit;
end;

SPS_IsSetup := true;
result := true;
tmp.SaveToFile(appPath+toStr(counter)+'.png');
inc(counter);

{$IFDEF SIMBAMAJOR990}
SPS_BitmapToMap(tmp, SPS_Accuracy, SPS_AreaMaps);
{$ELSE}
SPS_AreaMaps := SPS_BitmapToMap(tmp, SPS_Accuracy);
{$ENDIF}

if (surface = RUNESCAPE_SURFACE) then
SPS_Areas := SPS_SortAreas(areas)
else
if (surface = RUNESCAPE_OTHER) then
SPS_Areas := areas;

tmp.free();

end else
writeln('SPS_Setup(): ERROR: SPS areas are not set!');

t := (getSystemTime - t);

if (SPS_Debug) and (result) then
writeln('[SPS] SPS_Setup() took '+toStr(t)+' ms. Areas: '+toStr(SPS_Areas));
end;

begin
ClearDebug();
SPS_SetupEx(RUNESCAPE_SURFACE, ['11_7', '11_8', '10_7', '10_8']);
end.

I still have no idea why switching surfaces/maps doesn't work for some people. It has always worked perfectly for me, and I know there are others who have had no problems.

Daniel

2013-02-03 00:20:05

Moved. Development Tutorials> Scripting Help.

Zorgatone

2013-02-03 02:09:41

From: Flight
I heard my name.

Indeed I do have a suggestion as just last night I was running into issues of inaccurate SPS but I found a notable trick to improving accuracy and I'll pass it along to you. When making a custom map image you need to make sure there's plenty of room on all sides of the path you plan to be walking. I also recommend just cutting out pieces from the huge 'runescape_surface.png' map file. I can see in your custom map image you didn't allow much image for SPS to get an accurate location from, so let me give you a different map instead, of the same area.


You'll notice it's 485x538 and this is okay. I thought before that the map pieces must be 500x500 but from what I can tell so far it doesn't make a difference. For confirmation on that I would recommend talking to @Coh3n. You should see my 'farmlocations.png' SPS image, it's 500x1000 but quite accurate.

So download that, put it in your runescape_other folder, load it correctly through SPS and use my tile-finding script to create your own path (as I always do this manually, never through SPS path tools).

program MyCoords;
{$DEFINE SMART8}
{$i SRL/srl.simba}
{$i SPS/sps.simba}

Var
Me,nMe: TPoint;

begin
setupSRL();

//SPS_Setup(RUNESCAPE_SURFACE, ['10_7','10_6']);
SPS_Setup(RUNESCAPE_OTHER, ['varrock']);
SPS_AnyAngle := True;

Me := SPS_GetMyPos();
Writeln(ToStr(Me));
Repeat
nMe := SPS_GetMyPos();
if (Me <> nMe) then
begin
ClearDebug;
Writeln(ToStr(nMe));
Me := SPS_GetMyPos();
end;
Wait(250);
Until(False)
end.


Thanks.. I was already testing this.. The weird thing is that my script will only walk one path.. The next one won't work.. If I test the individual paths they're fine, but if I put them all in one script it doesn't do anything after the first one.
It isn't an issue to varrock itself or how to walk properly.. I've used SPS before, but I don't know what I'm doing wrong.