Open OlZe opened 2 years ago
I can't find a way to contact you, so I'm trying this way.
If you want a more chat-like conversation with me (Skretzo#1303) then Discord private messages is a good place.
what was your method to get a collision map which covers the entire osrs map?
TL;DR: I run some sloppy code on some map data by Mejrs to find walls and fully blocked tiles, but the proper way is to generate it directly from the game cache files.
I will now briefly explain 3 methods to generate a collision map of OSRS with some pros and cons:
1) The future method of the shortest-path plugin 2) My snapshot method 3) The proper snapshot method
If your project is more about pathfinding and less about collision maps then I would recommend you check out the OSRS Wiki Pathfinding project. I am not sure what kind of state that project is in, but wiki admin Cook Me Plox will probably answer questions about that project and graph theory (or anything technical about OSRS really) if that is your cup of tea :)
A follow up to 3) Generating a collision map from the cache
:
I have now modified the MapImageDumper in RuneLite to create a Collision Map Dumper.
Download a cache and XTEA keys from a specific point in time (e.g. latest) from https://archive.openrs2.org/caches.
Replace all instances of the words mapsquare
with region
and key
with keys
in the keys.json
file.
Run the CollisionMapDumper with program arguments --cachedir "input-path" --xteapath "keys.json" --outputdir "output-path"
.
Finally, I recommend removing empty collision maps which are typically inaccessible mapsquares out in the ocean or the void that are filled with only nomove tiles. This is about 600 mapsquares or so of the current total of roughly 2100 mapsquares.
A follow up to
3) Generating a collision map from the cache
:I have now modified the MapImageDumper in RuneLite to create a Collision Map Dumper.
1. Download a cache and XTEA keys from a specific point in time (e.g. latest) from https://archive.openrs2.org/caches. 2. Replace all instances of the words `mapsquare` with `region` and `key` with `keys` in the `keys.json` file. 3. Run the [CollisionMapDumper](https://github.com/Skretzo/runelite/blob/f5a286d71c8a7e083accc2035078cc1b738a86b9/cache/src/main/java/net/runelite/cache/CollisionMapDumper.java#L88) with program arguments `--cachedir "input-path" --xteapath "keys.json" --outputdir "output-path"`. 4. Finally, I recommend removing empty collision maps which are typically inaccessible mapsquares out in the ocean or the void that are filled with only nomove tiles. This is about 600 mapsquares or so of the current total of roughly 2100 mapsquares.
Just learning all the stuff and how items are working.
Did you had the issues to run the dumper?
[main] INFO net.runelite.cache.util.XteaKeyManager - Loaded 1772 keys
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "net.runelite.cache.fs.Index.getArchive(int)" because "index" is null
at net.runelite.cache.ObjectManager.load(ObjectManager.java:60)
at net.runelite.cache.CollisionMapDumper.load(CollisionMapDumper.java:74)
at net.runelite.cache.CollisionMapDumper.main(CollisionMapDumper.java:125)
It look like this cache file is empty and not existing.
main_file_cache.idx255
Hey,
I can't find a way to contact you, so I'm trying this way.
As part of my bachelor thesis I'm working on a runelite project, which involves pathing around the map. Naturally your shortest-path plugin has been very helpful to me.
As I can tell, the entire Collision Map has been saved in collision-map.zip
Runelite API has the option to give you a collision map, but for the current scene only. So my question is, what was your method to get a collision map which covers the entire osrs map? How do your update the collision-map.zip if the map updates in future?
Thank you very much