Skretzo / shortest-path

Pathfinding for Old School RuneScape
BSD 2-Clause "Simplified" License
14 stars 33 forks source link

Suggestion: Import POH Tele's into Calculations #19

Open SlothDotEXE opened 2 years ago

SlothDotEXE commented 2 years ago

Example - You're in Port Sarim and you set your target to Taverley. You have a Falador Teleport portal inside of your POH.

Expected Result - It tells you to tele POH, then take the Falador Portal, and then run to Taverley, as there's less tiles ran.

Current Result - It tells you to run the entire path, taking agility shortcuts if necessary.

I think this would be a good addition to the plugin as it would enable users an even 'shorter path' to their targets.

Skretzo commented 2 years ago

This is something I want to implement, but it will require a substantial rework of the plugin. Fortunately I have had some help on this, but the work is currently stale.

mikeweyandt commented 11 months ago

This also seems to happen just with teleports in general (unless I have something configured)

i.e. in Port Sarim, target Taverly. It suggests walking all the way versus in theory checking magic level (or POH) for fally tele, then doing that path.

I know this is an old issue, any updates to this or is the stale work in a particular branch?

Skretzo commented 11 months ago

The stale work I mentioned is a plugin rework in a fork by Cyberlarino, that also has a milestone for implementing teleports.

The plugin rework aimed to create a framework more like Quest Helper, which is good, but it also changed the pathfinding algorithm a bit too much for my liking. That plugin rework is also now quite out of date because of many more recent improvements and optimizations to the pathfinding in plugin version 1.10 and 1.11. In the past the plugin would get drastically slower the more transports/shortcuts/teleports were added, but these optimizations should mean that this is no longer a concern.

There is however another "problem" to solve before adding teleports, which is to decide on a good design for letting users choose which teleports to include. Some teleports are quite expensive so a cost threshold should also be included. I am not quite sure how far I want to go with teleports. The shortest path to a given location might just end up being to teleport to the G.E. and buy missing teleports. The biggest task with designing the user interface is making a nice looking swing panel in RuneLite, as I believe the config will not be able to fit all the desired options.

Personally I want to focus on adding all agility shortcuts, doors, boats, minecarts, ... rather than adding teleports, as the world map plugin is already giving the "answer" to the shortest path via teleports by naming most teleport options (although it looks like PoH teleports are actually also missing from the world map plugin...) image

mikeweyandt commented 11 months ago

Yeah, would be interesting to do what quest helper does with items in bank/on you/etc to make those calls. But gotcha, yeah tele does feel more nice to have if all the shortcuts/other things aren't present yet

Infinitay commented 5 days ago

Would it be possible to add extra settings to the plugin that allows a user to specify the various teleport methods they have inside their PoH and to utilize those instead? I know you planned on refactoring and making whole system to handle PoH teleports, but in the meantime what if you were to provide a simple substitute instead? So instead of checking to see if a player has a required spell/item teleport, override it to having the item in your inventory or the spell available if the user marked it as available in their PoH. I hope that makes sense.

Skretzo commented 5 days ago

Would it be possible to add extra settings to the plugin that allows a user to specify the various teleport methods they have inside their PoH and to utilize those instead? I know you planned on refactoring and making whole system to handle PoH teleports, but in the meantime what if you were to provide a simple substitute instead? So instead of checking to see if a player has a required spell/item teleport, override it to having the item in your inventory or the spell available if the user marked it as available in their PoH. I hope that makes sense.

The hard part is not actually to include the teleports, but rather where the teleport portal can be. The PoH is instanced which messes up coordinates and you can place the portal chamber almost anywhere inside your house (even upstairs).

Infinitay commented 5 days ago

Oh right I completely ignored that fact; however, assuming you go down the route I suggested in which PoH will just be a substitute for items/spells, you could just think of it with a weight of one - as if the item or spell is in your inventory. Ignoring the distance of the portals just so we can at the least have basic PoH support. Or if you want, you could assign it a default weight of say 5 or 6 if you either still want it to have a weight or if you want to separate it from actual items/spells.