SRL Archive - MSI Archives

[BUG] Player searches for trees when in bank


Coh3n

2010-06-29 19:44:27

Hey guys,

I got another 20 hour report today, but when I turned on my computer, I found the current player hovering over some plants at the bank. Now, I have absolutely no idea what could have caused this problem because the script ran fine for 20h, and the most recent progress report had the correct location for the current player.

A few possible things could have happened:
  • The script thought the player's location was LOC_VE_TREES when it was LOC_VE_BANK.
  • For some reason, the walking function returned true before actually walking to the trees. Which, logically, would place the problem somewhere in Walking_Reflection.

I'm going to try to take a look, but I have a lot going on right now, so I'm pretty busy. :p

Good luck,
Coh3n

Sir R. M8gic1an

2010-06-29 19:46:39

Easy fix, which should be there anyway as a failsafe.

function IsAtLoc(Loc: integer): boolean;
function ReCenter(loc: integer): boolean;

~RM

Coh3n

2010-06-29 19:48:40

From: Rasta Magician
Easy fix, which should be there anyway as a failsafe.

function IsAtLoc(Loc: integer): boolean;
function ReCenter(loc: integer): boolean;

~RM

Good idea, and I already wrote a MSI_Relocate in Walking_Reflection, so we can use it in this case.

E: A TLocation type may be necessary to hold a relocation tile for certain locations.

Sir R. M8gic1an

2010-06-29 19:53:28

From: Coh3n
Good idea, and I already wrote a MSI_Relocate in Walking_Reflection, so we can use it in this case.

E: A TLocation type may be necessary to hold a relocation tile for certain locations.


Sounds good. Also needs to be able to hold relocation info for color.

~RM

Coh3n

2010-06-29 20:01:10

From: Rasta Magician
Sounds good. Also needs to be able to hold relocation info for color.

~RM


type
TLocation = record;
LocName: string;
LocConstant: integer;
PointRef: TPoint;
PointCol: integer; //the constant index used for the walking
end;

Sir R. M8gic1an

2010-06-29 20:04:00

Looks good.

We might want to have pointRef be a constant too, in case we have several relocation points (mines), as that would allow us to use a function to relocate, rather than always a tile ;)

Also, helps with modularity, as it keeps the ref & color relocating at the same level.

~RM

Coh3n

2010-06-29 21:57:06

From: Rasta Magician
Looks good.

We might want to have pointRef be a constant too, in case we have several relocation points (mines), as that would allow us to use a function to relocate, rather than always a tile ;)

Also, helps with modularity, as it keeps the ref & color relocating at the same level.

~RM

I don't know how well colour relocating would work to be honest because colour walking usually relies on looking in a specific location. If the player gets lost for some reason they could be anywhere which would make colour relocating very inaccurate (unless we used DTMs of symbol finding I guess). Now may be a good time to take a look at marpis' TMMLocation and FindMMLocation functions (would require reverting to an earlier revision).

Sir R. M8gic1an

2010-06-30 09:04:33

Color relocating is more like 'recentering'. Very easy to do. Usually you'll just recenter to a symbol, or an agglomerate of trees or something like this. ;)

~RM

Coh3n

2010-06-30 18:14:36

From: Rasta Magician
Color relocating is more like 'recentering'. Very easy to do. Usually you'll just recenter to a symbol, or an agglomerate of trees or something like this. ;)

~RM

Yeah, I was thinking more about radialWalking, etc. which wouldn't work very well. As long as there's something distinct to search for, it should work.

NCDS

2010-07-01 19:36:27

From: Coh3n
Yeah, I was thinking more about radialWalking, etc. which wouldn't work very well. As long as there's something distinct to search for, it should work.


There's almost always something on the MM to relocate with color. Even if the "thing" is only used as a reference point and you click 30 or so pixels away from it to stay on track.

I'm sure we can make something work :rolleyes:

Coh3n

2010-07-01 23:36:08

From: NCDS
There's almost always something on the MM to relocate with color. Even if the "thing" is only used as a reference point and you click 30 or so pixels away from it to stay on track.

I'm sure we can make something work :rolleyes:

Yeah. :)

I already have a few ideas floating around. Once I get the structure of the core written, I'll start a thread for planning the relocation functions, etc. This is going to be a fun weekend. :rolleyes: