SRL Archive - MSI Suggestions

NEED YOUR HELP: TBoxes for TLocations


Coh3n

2011-07-21 10:16:41

I've been meaning to do this for a long time, but I've just had too many other things to do. So, I was hoping you guys could pool together and do a few of MSI's locations. Basically we just need a TBox for Tiles and a TBox for SPS coords. I would rather not use a TileToSPS conversion method as it isn't 100% accurate. The TLocation record has had a complete over-haul that will allow us to be much more specific when it comes to camera and compass angles. This means that the new trees will be working 100% when this update is made.

The new TLocation type:

(*
TLocation
~~~~~~~~~

A record that stores all the properties of the different MSI player locations.
Used in several areas throughout the include such as reloacting, player setup,
and confirming player locations.
*)
type
TSubLoc = record
name: string;
tileBox, spsBox: TBox;
compass: variant;
camera: boolean;
objects: TIntegerArray;
end;
TSubLocArray = array of TSubLoc;

TLocation = record
name: string;
constant: integer;
atBank: boolean;
subLocs: TSubLocArray;
deathPath: TPath;
end;
TLocationArray = array of TLocation;

The boxes should be INSIDE the bank. They're going to be used for relocating and checking the player's location after walking. For example, the box for Draynor Bank can look something like this:


The bank booth should be visible from ANYWHERE inside the box. If it's a non-bank location, at least one of the objects should be visible from ANYWHERE inside the box. If it's a non-bank location that's in a building, the box should be inside the building. Pretty straight forward, no? Also, if there are trees, for example, that are pretty spread out, create a new TSubLoc for each tree! :)

So, any help in this area will be greatly appreciated! Take a look at Locations.simba for examples of the formatting. You'll also notice that some attributes are set automatically at the end of MSI_LoadLocation, so be aware of that. Also, don't worry about the "camera" attribute right now.

E: Thanks to Yago, most locations are done! These are the locations that need to be updated:

Locations that need more subLocs:
E2: Every location now needs to be tested. Here are the ones left:

LOC_FW_MINE
Thanks in advance,
The MSI Team

Yago

2011-07-22 16:08:18

I'll start working on this… if no one else is.

Edit: What should the minimum and max length and width be?

Edit2: Do you mean ANYWHERE or EVERYWHERE? SO far im taking it as everywhere

Edit3: If its everywhere then that sort of impossible since some places aren't squares or rectangles…

Coh3n

2011-07-22 21:02:43

How it's going to work is it will check to see if the player's position is inside the location's box. You should be able to make a square/rectangle work for every location. As long as the objects can be seen from anywhere in the box it should be fine. The only real ones that need to be very accurate are ones inside buildings.

Yago

2011-07-23 12:26:29

Does every object(rock or tree) in that location need to be seen from inside the box or just like one…

For example, I make a port sarim box for willows…. Do I only make a box around 1 tree or all the willow trees?

If its all the trees then there will be a problem because some areas aren't perfectly square/rectangular…

Coh3n

2011-07-23 14:29:24

From: Yago
Does every object(rock or tree) in that location need to be seen from inside the box or just like one…

For example, I make a port sarim box for willows…. Do I only make a box around 1 tree or all the willow trees?

If its all the trees then there will be a problem because some areas aren't perfectly square/rectangular…
No not all the trees need to be visible in the main screen, but if possible, that would be better. I think you're thinking it needs to be more perfect then needed. Yeah, it should be pretty accurate inside buildings, which makes sense, but for other locations, it doesn't have to be perfect.

Here's what I would do for PS Willows:


It's going to click in the middle of the box so it doesn't matter if it overlaps the fence.

Yago

2011-07-23 21:28:33

From: Coh3n
No not all the trees need to be visible in the main screen, but if possible, that would be better. I think you're thinking it needs to be more perfect then needed. Yeah, it should be pretty accurate inside buildings, which makes sense, but for other locations, it doesn't have to be perfect.

Here's what I would do for PS Willows:


It's going to click in the middle of the box so it doesn't matter if it overlaps the fence.


Oh great I was thinking that from anywhere inside the box you should be able to see script objects…

I'm making this more complicated then it really is… lol

Any functions you need me to create with this?

Also, clicking in the middle of the box would be bot-like, but I guess there's randomness…

I thought you would be using this for deathwalk lol…

Coh3n

2011-07-24 16:48:56

No, it'll be used in MSI_AtLocation and Relocating. No functions need to be made, and it won't be anymore bot-like that it is right now. It's not going to click the exact middle of the box. :p There will be a tolerance.

Yago

2011-07-24 21:17:05

Cool… I'll push my work when its done… I won't be able to do some locations though like mining guild, etc…

Coh3n

2011-07-24 21:24:29

From: Yago
Cool… I'll push my work when its done… I won't be able to do some locations though like mining guild, etc…

Okay. I should also tell you that some locations may need more than one box. Locations like Draynor Yews, Rimmington Yews, etc. Basically any location that has multiple relocation points.

I'll have to do some more work than I thought because I think the points are also used in path walking.

Yago

2011-07-26 18:20:14

I got confused with the whole Refboxes thing so I left it plain and simple… I pushed the work I did…

Coh3n

2011-07-26 19:17:11

From: Yago
I got confused with the whole Refboxes thing so I left it plain and simple… I pushed the work I did…
Thanks. I'm getting my wisdom teeth removed in the morning so I don't know exactly how I'm going to feel for the next few days. I plan on creating a new branch to implement/test this as soon as I can, just so you know. I really want to get a lot of testing for this because, like I told you, it could really mess up the core of MSI.

Also updated the first post so someone can do the member's locations + guild.

Yago

2011-07-27 10:29:54

I figured in some places I might be 1-2 tiles off… Or maybe you might like the box to be bigger/smaller… We're gonna need a lot of feedback on this one.

Coh3n

2011-07-27 15:15:56

From: Yago
I figured in some places I might be 1-2 tiles off… Or maybe you might like the box to be bigger/smaller… We're gonna need a lot of feedback on this one.
Yeah, when I get it implemented, I'll debug the box so we'll be able to see how it works. The only function I can think of right now that would need to be edited is MSI_AtLocation. Things may get more complicated then I think (they always do :p), but maybe not.

Coh3n

2011-07-30 22:15:00

Okay, so thanks Yago for getting most of the locations. I haven't checked exactly which ones we still need done, but I've started a new branch here. Hopefully by next week it'll be at a testing stage.

Yago

2011-07-31 18:20:55

Guild miner and members locs such as catherby and more places

Coh3n

2011-08-01 14:39:06

From: Yago
Guild miner and members locs such as catherby and more places
Okay, so Guild Miner and all RS Member's locations?

Yago

2011-08-01 16:18:14

From: Coh3n
Okay, so Guild Miner and all RS Member's locations?


I believe so. I'm not a mem so I had no idea and google wasn't too friendly with me.

Coh3n

2011-08-01 18:44:58

Okay, if someone has a members account I can borrow I can get those locations tomorrow.

Coh3n

2011-08-02 13:43:42

Bump! I've updated the locations list in the first post to the ones that we need done. It takes < 5 minutes to do them all, so don't hesitate to help out. :p

Yago, since you asked, there's a list of the functions so far that need to be changed for this system:
  • The "Tiles", "Points", and "MinDistance" fields in the TLocation type can be removed.
  • A function to convert a tile box to an SPS coord box needs to be written, and called to set an "SPSBoxes" field for TLocation. Check out MSI_ConvertTPA in Manipulation.simba.
  • TLocation's "Areas" should be renamed to "TileBoxes".
  • MSI_AtLocation and MSI_Relocate need to be modified to use "TileBoxes" and "SPSBoxes" rather than "Tiles", "Points", and "MinDistance".
  • MSI_PointOnMM will probably need to be changed to MSI_LocOnMM and return true if any point in any of the location's boxes appears on the minimap.
Lol, the list turned out larger than I thought. Feel free to do all or none, and remember I'm always here to help. :)

Cheers,
Cohen

Yago

2011-08-02 14:34:43

Thanks. Ill take what i can and probably start working in a few days… If you start earlier let me know so we dont overlap

Coh3n

2011-08-02 14:46:14

From: Yago
Thanks. Ill take what i can and probably start working in a few days… If you start earlier let me know so we dont overlap
I will, but if I forget, just make sure to pull from this branch before making any changes.

Yago

2011-08-02 14:52:23

From: Coh3n
I will, but if I forget, just make sure to pull from this branch before making any changes.


Ok great

Coh3n

2011-08-15 02:17:31

Quick update on this: It turned in to a bigger project than expected, and we've completely rewritten the TLocation type. It now has "SubLocs" which each has its own box. I'm going to update the first post with my notes while I was formatting the new records. NCDS is going to take care of the function updating, but we still need to update some TLocation records.

E: First post updated. :)

E2: BUMP!

NCDS

2011-08-25 00:56:43

Updated the list. Only a few more to go!

NCDS

2011-09-01 22:56:28

Removed a couple from the list.

Come on people, these are easy to test!!! Then just let us know how it's working or what needs to be changed. :)

Coh3n

2011-09-14 20:55:48

Finished off Varrock locations with the exception of IVY (an entire record needs to be made). I also added SCRIPT_GE_OAKS.

E: Finished off all Rimmington locations.

E2: Finished a lot of F2P locations.

E3: This is now done, the update thread can be found here.