Page 1 of 1

[Help]Live map calculations

Posted: Mon Jan 18, 2010 10:05 am
by Spyder
I'm trying to get the live maps working with the Gracia Final map, but I'm running into an obstacle.
How do I calculate this, and what do the values mean? Does it have to do something with the image dimensions? What do they represent?

Code: Select all

  $x=116+([x coordinate]+107823)/200;  $y=2580+([y coordinate]-255420 )/200;

Re: [Help]Live map calculations

Posted: Mon Jan 18, 2010 10:44 am
by janiii
this is for gracia epilogue:
- each region block is 32768 coords wide and tall
- you have -10 x-blocks and +7 x-blocks on the x-axis from the 0 0 point in game
- you have -8 y-blocks and +8 y-blocks on the y-axis from the 0 0 point in game
- you have a map, x px wide and y pixel tall

- how many coords wide and tall is the lineage game map -> count the blocks and multiply by 32768
- how wide and tall is your image -> calculate the ratio between game coords and image size (game coords per pixel)
- coord - minimum coord (=how many game coords is from minimum to current) divided by the ratio

Image

Re: [Help]Live map calculations

Posted: Mon Jan 18, 2010 11:58 am
by Spyder
Thank you for the explanation, it's all clear now :)