SRL Archive - SRL Positioning System

SPS needs failsafes


litoris

2012-09-02 07:44:37

Right now, it is possible for a character to get stuck clicking the same point forever, because WalkPath and BlindWalk have crappy failsafes. With walkpath, the 20-25 seconds timer resets whenever you make a click on the path. Blindwalk's failsafe is a joke, it allows for 20 tries, meaning that even if walkpath had a properly working timer, it would take 8 minutes+ for blindwalk to stop. It would be really nice if a dev could help with this.

Edit: Fixed

J J

2012-09-02 07:47:01

There is also a problem with SPS that it clicks on the run symbol to run, even though the player is running already. This has something to do with the running percentage that is required. I suggest removing the running percentage as people can add it themselves if they feel the need.

litoris

2012-09-02 07:48:54

From: J J
There is also a problem with SPS that it clicks on the run symbol to run, even though the player is running already. This has something to do with the running percentage that is required. I suggest removing the running percentage as people can add it themselves if they feel the need.


The running percentage is set to 20. I agree.

Olly

2012-09-02 07:59:01

Sadly you will need to commit this yourself, Coh3n doesn't have time to develop SRL currently. As for the run energy thing its because it flashes and sometimes it reads the text wrong.

riwu

2012-09-02 08:00:36

From: J J
There is also a problem with SPS that it clicks on the run symbol to run, even though the player is running already. This has something to do with the running percentage that is required. I suggest removing the running percentage as people can add it themselves if they feel the need.

I think it's not to do with the running percentage, but rather it misclicking the run button while trying to click the east of MM. I've seen it happen in the past (several months ago when i still use SPS) while i still have >80% energy.

Also iirc it does not toggle run off under any circumstance. Rather, it toggles run on when run energy is =>20%.

litoris

2012-09-02 08:14:26

From: Ollybest
Sadly you will need to commit this yourself, Coh3n doesn't have time to develop SRL currently. As for the run energy thing its because it flashes and sometimes it reads the text wrong.


Someone still needs to accept the pull request. If any devs post here saying they would accept it, I will try to fix it.

Olly

2012-09-02 08:21:14

Devs are active on github to accept pull requests if there good…..

Mat

2012-09-02 08:23:22

Lit Why don't you fix it so its works fine for you then see if they will take it?
Mat
And if they don't, you have a fully working SPS with a good FailSafe.

litoris

2012-09-02 08:36:16

Alright, I'll work on it then.
Edit:
Fixed it, here's the pull request. I tested it with JJ's GOP since it always has the spamclick stuff because you get teleported constantly. It happened 4 times, and clicking stopped after the second click, because SPS_GetMyPos returned the same value. You can see the changes there.

Sirenia

2012-09-02 15:10:04

Getmypos could return the same value twice if you lagg

litoris

2012-09-02 15:37:32

From: Sirenia
Getmypos could return the same value twice if you lagg


Everything can fail if you lag.

Footy

2012-09-02 15:41:50

I can't wait for openGL. Walking will be so much easier. Good luck with the pull request litoris.

Olly

2012-09-02 18:46:28

Hmm This will fail when rs servers are laggy :/ but then again it works both ways

litoris

2012-09-03 02:05:49

From: Ollybest
Hmm This will fail when rs servers are laggy :/ but then again it works both ways


I think it's much better this way, walkpath returns false in case of lag, avoiding any further problems that could screw up the walking.

CynicRus

2012-09-03 12:21:21

From: litoris
I think it's much better this way, walkpath returns false in case of lag, avoiding any further problems that could screw up the walking.

I see you commit a code, and i have few a questions:

1)

if P<> SPS_GetMyPos then
P := SPS_GetMyPos
else
Exit;
P is undefined variable, we mean that it is the point (0,0). Ie this code block will always produce a result exit if i use point 0,0 on my custom map. Im right?

2)


if MM = MMF then
Inc(Fails);

What is a MMF? And why should they match?

litoris

2012-09-03 14:42:29

From: CynicRus
I see you commit a code, and i have few a questions:

1)

if P<> SPS_GetMyPos then
P := SPS_GetMyPos
else
Exit;
P is undefined variable, we mean that it is the point (0,0). Ie this code block will always produce a result exit if i use point 0,0 on my custom map. Im right?

2)


if MM = MMF then
Inc(Fails);

What is a MMF? And why should they match?


1) Probably true, except that I don't think anyone has ever used the corner of their map as a point. Maps are put at the center of the image, with the unused areas filled with black.
2) MMF is a Tpoint, it is the previous value of MM(see the rest of the code to see when that happens). Fails is increased by 1 when MM=MMF after an iteration, because that indicates that there was no movement, because we are trying to move to the exact same point once again.

CynicRus

2012-09-03 15:42:05

In my opinion must immediately make a safe code:

if MM = MMF then
Inc(Fails);
That a block move after MMF:=MM;
And explicitly assign a value to P. P:=Point(-1,-1);

Again this is just my opinion.

Jakkle

2012-09-03 21:21:26

Would be nice to have them failsafes added :p

VastlySuperior

2012-09-04 03:06:44

@ Litoris

I was very glad when you added this code as I asked a few times around for a solution to my problem where sps spam clicks on a custom map I created. So I downloaded your code and save it, but now my sps walking fails quite a lot, not every time but enough that it screws up my scripts walking.

With the old code it completed its walk successfully, I have copied the old code back and is going to test the same script for a day just to see if it is not the script itself which makes the mess as colors might have changed.

Will let you know tomorrow what I have found. But so far for almost 3 hours I had not as yet had any failure in the path walking, and this script uses walking quite a lot.

litoris

2012-09-04 06:14:28

From: VastlySuperior
@ Litoris

I was very glad when you added this code as I asked a few times around for a solution to my problem where sps spam clicks on a custom map I created. So I downloaded your code and save it, but now my sps walking fails quite a lot, not every time but enough that it screws up my scripts walking.

With the old code it completed its walk successfully, I have copied the old code back and is going to test the same script for a day just to see if it is not the script itself which makes the mess as colors might have changed.

Will let you know tomorrow what I have found. But so far for almost 3 hours I had not as yet had any failure in the path walking, and this script uses walking quite a lot.

I suggest you use blindwalk between points that don't have obstacles inbetween, that's far more reliable than using a path. Blindwalk worked perfectly for me when testing this.

VastlySuperior

2012-09-04 06:20:16

It has blindwalk in for a second failsafe, it does the same with the blindwalk when it activates after as certain time has passed and it has not reached its destination, blindwalk will take over and it happens with the blindwalk also, well it has now been 6 hours back on the old sps, and it has not missed one step on the sps path as yet, while yesterday it failed a lot even when the destination was not far off from one place to the next.

litoris

2012-09-19 15:16:04

Coh3n just merged the pull request, I suppose it will be live in a while.