-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for cyclopedia map #52
Comments
Woah, that's an awesome Cyclopedia map -- nice work! I believe you're looking for this: https://github.com/tibiamaps/tibia-maps-script/blob/main/src/colors.mjs Context: our Feel free to tell me more about what you're trying to do -- maybe I can help you better then. |
cc @muriloricci who I believe also maintains a Cyclopedia export |
I don't but that's a cool idea, indeed. :) |
Thanks, @elkolorado has been working on the cyclopedia map, there are scripts available here: https://github.com/elkolorado/Tibia-Satellite-Cyclopedia-Map-Export that has been used to create this map. I was thinking if it would be easier to create images of equal size as the tibia-map-data/mapper images are as well as translating coordinates for their names. Could maybe use this https://github.com/elkolorado/Tibia-Satellite-Cyclopedia-Map-Export/blob/main/utils/leaftlet-gen.py And translate image names from https://github.com/elkolorado/tibialibraries/tree/master/cyclopediamap/layered i.e.
into tibiamaps leaflets:
However, i'm not really sure what solution would be best, I counted more than 256 colors (might need to verify) in the cyclopedia map which might become an issue for colors.mjs, however i'm not sure how that part works. The scripts that @elkolorado has made can be used to create updated maps as well, so might be worth looking into a solution that ties into that. As for what I'm doing is trying to create leaflets of correct color so that i can browse this map on layer 7 (switching with same functionality as P keyboard button). I would in turn use self-hosted leaflets, unless we add support for it in tibia-map-data that's published to github pages. |
hey, when I've created the script I've also raised it here tibiamaps/tibia-map-data#283, as potential to PR it into @mathiasbynens tibiamaps. I think idea of @s2ward is so he can utilize tibia coords system over the satellite map, therefore idea of adding the satelite map as separate layer to existing tibiopedia maps. It could be tricky, as satellite maps in tibia are generated per floor, where as merged result - or so to say how we see it ingame, is a result of shifting the layers of satellite map to achieve the isometric look. Therefore on example leaflet viewer I created, I only utilized separate floors, or all at once, since I failed with dynamic floor (ex. floor 7 and 5) together, and applying the offest with leaflet. Instead I just merged all floors at first with offset, and then cut them ready for leaflet. |
I think this can be done. Change the file name format here: https://github.com/elkolorado/Tibia-Satellite-Cyclopedia-Map-Export/blob/4848fdac05711d03e24d676713672e4fdb182379/utils/leaftlet-gen.py#L95 to use |
Ok, basically I got it working. Thank you so much for the pointers. https://github.com/s2ward/magic-web It can be seen live here https://magic-web.talesoftibia.com/#32928,31928,7:0 I explain the process here: It's beautiful, and should be quite straight forward to automate with github workflows. |
To bug you once again, (however i feel it would need to be sorted for implementation if you/we decide to add the cyclopedia map to tibiamaps.io) How should we handle zoom level between layers now that the picture is about (exactly?) twice as big? when switching to lower or higher layers (e.g. layer 7 to layer 8) you will see that the crosshair points to a position that is one zoom level wrong. It's as if the cyclopedia map needs to be zoomed to 128 instead of 256. Line 85 in 5c04720
Do you have any idea on how to approach this? If it's of any help, the cyclopedia map (map_merged.png) when chunked into 256x256 is 288 chunks .
I've tried tweaking the knobs (256 -> 512 or 128) but it always results in a black screen on floor 7. Only 256 seems to be accepted @ #L85 Can we handle this in code or do we have to chunk the cyclopedia map differently? |
This exists: https://github.com/elkolorado/tibialibraries/blob/master/cyclopediamap/map_merged.png
I tried using https://github.com/tibiamaps/tibia-maps-script with this https://github.com/tibiamaps/tibia-map-data/blob/main/scripts/build.sh however it raises couple hundred million assertion fails due to unrecognized colors in the cyclopedia image, resulting in no or minimal output.
Would be beautiful to be able to toggle between them, and something i was trying to develop on for a forked project but the rabbit hole went too deep for my non-existent nodejs skills.
The text was updated successfully, but these errors were encountered: