osrs-wiki / osrs-wiki-maps

OSRS Wiki Maps: A set of tools for generating map images for the OSRS wiki.
https://oldschool.runescape.wiki/w/RuneScape:Map
GNU General Public License v3.0
3 stars 2 forks source link

Add support for generating world map definitions #2

Open allenkinzalow opened 7 months ago

allenkinzalow commented 7 months ago

RuneLite recently introduced a WorldMapDataLoader for loading a ZoneDefinition and MapSquareDefinition. These should be used to generate the worldMapDefinitions.json file that stitch.py relies on. Additionally, the hard coded definitions in stitch.py should be removed.

samszotkowski commented 6 months ago

I don't think ZoneDefinition and MapSquareDefinition are suitable for doing what we need. WorldMapCompositeLoader and WorldMapLoader both look at cache index 19, but the former looks at archive "compositemap" and the latter looks at "details" archive. Pretty sure these data are for different uses, and we need "details" as we have been using in the past.

RuneLite has just added back WorldMapDefinition and WorldMapLoader and everything we need, incorporating a minor change that was necessary for them to work as they should.

Pull request https://github.com/osrs-wiki/osrs-wiki-maps/pull/4

samszotkowski commented 6 months ago

I take it all back, I think we figured it out. The confusion was that source actually meant display and vice versa in the zone and map square definitions. Unfortunately WorldMapCompositeDefinition doesn't contain the names of each map id so we still need the old definitions to be complete, but the WMCDs are more conveniently formatted for our purposes otherwise.