The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Tutorials and Eventing => Topic started by: TwilightPrince1002 on March 12, 2010, 08:37:02 AM

Title: World Map Item?
Post by: TwilightPrince1002 on March 12, 2010, 08:37:02 AM
Considering I am making a world map on my RPG that is the max size you can make an individual map (which is 500 x 500), I would think people might get lost on it pretty easily.

With that in mind, is there a way to create a sort of World Map item that would allow you to see a map of the place and pinpoint your location?

If it's a script, then I don't think I can use it, since I'm working with RPG Maker 2000, and I'd rather not start over on 2003, what with me having a very good chunk of my game already done (about 1/8th, give or take).

Thanks for any help/suggestions.
Title: Re: World Map Item?
Post by: modern algebra on March 12, 2010, 01:05:08 PM
It's not a very hard thing to do, though you'll need to screenshot the whole map and then probably shrink it down to fit. After that, you can just use variables to track the player's position. I might write a tutorial in a little bit.
Title: Re: World Map Item?
Post by: Grafikal on March 12, 2010, 05:14:57 PM
See if you can adapt this to 2k. The differences would be, you don't need to update the script fix, since there's no scripts, the commands might be called something different but they do the same thing, resize the screenshot of your map to fit your whole window instead a small box like a 'mini map', make the map appear via a button you press instead of showing up automatically. By making a button, the player can just press that button while on the world map at any time to pull up the fullscreen map and check their position on it. You can do a lot of addons with this.

http://rmrk.net/index.php/topic,28850.0.html

I'm sure MA could make a better tutorial suited for 2k though.
Title: Re: World Map Item?
Post by: madriel222 on March 12, 2010, 05:42:15 PM
Parallel Process, Below Hero

1. Variable Oper [0001:HeroX] Set, Hero X Coordinate
2. Variable Oper [0002:HeroY] Set, Hero Y Coordinate
3. Variable Oper [0001:HeroX] *, 8
4. Variable Oper [0001:HeroX] /, 15
5. Variable Oper [0001:HeroX] +, 235
6. Variable Oper [0002:HeroY] *, 8
7. Variable Oper [0002:HeroY] /, 15
8. Variable Oper [0002:HeroY] +, 155
9. Show Picture: 2, Cursor, (V[0001],V[0002])
10. Show Picture: 1, Map, (275,193)
11. Loop
     11a. Variable Oper [0001:HeroX] Set, Hero X Coordinate
     11b. Variable Oper [0002:HeroY] Set, Hero Y Coordinate
     11c. Variable Oper [0001:HeroX] *, 8
     11d. Variable Oper [0001:HeroX] /, 15
     11e. Variable Oper [0001:HeroX] +, 235
     11f. Variable Oper [0002:HeroY] *, 8
     11g. Variable Oper [0002:HeroY] /, 15
     11h. Variable Oper [0002:HeroY] +, 155
     11i. Move Picture, 2, (V[0001],V[0002]), 0.0 Sec (Wait)
12. End Loop


The code and numbers above show a mini-map for a 150x150 world map on the bottom right part of the screen with a moving cursor that goes where the player goes.  The code relies on the mini-map being 1/8 of the original size of your map, but you can adjust that to fit your needs.  I'll break it down, line by line, what's going on.

1-2. Figuring out where your hero is.
3-4. These are your scale numbers.  They work with my numbers because my map is 1/8 the size of the actual map.  You'll need to tweak these if you want a smaller/larger mini-map.
5. This moves the map and cursor over to the right. Numbers less than 160 will move it to the left side instead.
6-7. Scale numbers, just this time for the Y coordinate.  Since you're working with a square map, these numbers should be the same as whatever you're using for the X coordinate.
8. This moves the map and cursor down toward the bottom of the screen. Numbers less than 120 will move it up instead.
9. Shows the cursor at the coordinates we just calculated.
10. Shows the map at a fixed location, change this to taste.
11. Starts a loop, so your processes can be continually updates (i.e. cursor moves with the hero).
11a-h. Just a repeat of your code above to update where the cursor is.
11i. Moves the picture instead of showing it this time.
12. Ends your loop, pretty self explanatory.

This is what the final product looks like with the numbers I used:

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fwww.angel-spire.com%2Fforum%2Fuploads%2FIMG2-1185733775.png&hash=3f82e72032b5715d3bb8feacb018592da2d5181f)

Hope that helps.