Help with Evented Minimap

Good Morning / Day / Afternoon / Evening everyone.

I am in need of a little assistance. This time with events.

You see I managed to program this minimap


cursor.png

aa.png

19.05.2020_23.01.01_REC.png

19.05.2020_23.18.06_REC.png


my only problems with this are the following:

1. The minimap is too big and it covers more than half the screen
2. The cursor does work, but when I try to resize the minimap, the cursor goes outside the minimap... (because yes it does follow player x and player y with variables.

I want to place the minimap on the lower right corner of the screen, but I also would like to center the cursor there as well... essencially recreating the minimap in the Final Fantasy games

19.05.2020_15.23.56_REC.png




Can anyone please lend me some assistance?

my map size is 200x200 tiles, if that helps.
I would do something like this:
Untitled-3.png

You get the player's map X and divide it by the map width, then multiply it by the width of the minimap picture (e.g. in my example, that's 400 pixels). Then you get the player's map Y and divide it by the map height, then multiply it by the height of the minimap picture.

EDIT: This is if the map stays in the top-left corner. If you shift the map around, you need to add the position of the minimap picture to those variables, like so:
Untitled-3.png
Thank you very much for this!

Original thread: https://forums.rpgmakerweb.com/threads/help-with-evented-minimap.121787/