Short answer - can't be solved. In the earlier days, i found mob count at ML library very interesting, so i tried to find a way to count mob spawn. Good news : wz files tell about the "spawn point" Bad news : nothing about spawn mechanism Spawn point: tells about location of spawn tells about whether is npc/mob/etc... tells about which mob id to spawn So, what i did is just put the total count of "spawn point". And found the number tally with ML lib. yeahhh. Only to be disappeared thats not the actual case how mob is spawn in game. Even tho it's not 100% accurate, some players might find it useful, so i just leave it like that. So, my observation/assumption about "mob spawn mechanism" : it is totally at server side, therefore not exposed to players it should have a maximum number - No mobs will be spawn after reaching this number mob spawn is totally random within maximum number
I have a question: Why doesn't the API for a map return the canvas? For example: https://royals-library.netlify.app/api/v1/map?id=211000000 returns: Code: { "id": 211000000, "mapCategory": "ossyria", "streetName": "El Nath", "mapName": "El Nath", "myMapCateogry": "ElNath", "imgURL": "https://royals-library.netlify.app/images/maps/211000000.png", "HDImgURL": "https://maplestory.io/api/GMS/83/map/211000000/render", ... ... But the UI shows a canvas option with this image: Code: blob:https://royals-library.netlify.app/bf3bf3da-5e8a-401f-8bf2-ccdca2fbd167 it looks much more detailed and also has the NPC/portal drawn, which is better in my opinion. Also, if all the data is available on your end locally, then there would be no need for a maplestory.io render, since you're already giving the `imgURL` which is just a minimap and very low res. If you could expose that canvas image that would be great! thank you for the great work.
Thanks for liking it. But bad news is, i could not find a way to export HD map from Royals game client. So technically, unofficial library did not store any "HD" image, thus not capable to directly send a imgURL of HD version. So, where do HD Canvas Maps come from ? short answer: they are rendered real time at your browser i stored the "ladder", "bricks", "tree", "pile", "snail", "pig", "npc", and whatnot, inside a CDN. Your browser (chrome probably) would download each of those small puzzles, and put them together, thru some mathematical geomtry computation the final HD png image is stored as blob object within your browser, and only within your browser as temporary cache till you clean them up also, everytime u refresh the page, the blob would be different so, your friend and i can't really view the image of "blob:https://royals-library.netlify.app/bf3bf3da-5e8a-401f-8bf2-ccdca2fbd167" good news is, you can save the blob image to your device Can API map return the "HD" version ? I'm afraid not... In fact, i didn't explore this further, but expect it would be request timeout due to long map rendering time at Netlify Function Second concern is bandwith... foresee would double the bandwith usage, because of downloading each map element and send back the complete rendered map, which happened for each API call
this is very cool. Can you explain how you build the portals and npcs on top of this image? Do you have some sort of coordinates of all of maps npcs and portals? I'm working on a path finder website for the game. I downloaded all of the maps locally to my repo and serve it using github pages (SPA). I use a simple BFS that searches the path from map A to map B and shows the best route there, so as part of it I show the maps you need to travel to. It would be cool if I could show `HDImgURL` and draw the portals like you do. By the way it's just a hobby project I picked up since starting to play a while ago, the code is on GH and public so letting you know just in case
I couldn't recall much from my deep memory. But i roughly remember, a map.json from would consists of "layers", eg. layer 1,2,3,4,5,6,7... at max 9 iirc, and some map center coordinate (x and y). So, yes, coordinates are within the map.json. Then each layer would have many items, each item: - has a type of : "obj", "tile", "mob" , "npc", or "reactor" or "portal" - has a relative coordinate to the map center e.g dx,dy - then each item would have its own relative coordinate2, dx2, dy2 - the final coordinate for this item is like x = mapX + dx + dx2, (i let chatGPT diagnozed it for me, so i suck at this) - then u render them in order of layers, layer 1 render first, then layer 2, and so on - within layer, u render the obj, then tile, then mob, then npc , then reactor then portal - lastly convert the rendered canvas into blob object *render here refers to fetch the image.png from CDN and plot it to web Canvas You can refer to src/pages/map/RenderedMap.jsx from the repo, its public. Feeding it to Chatgpt to get explaination would be better!