Random Maps is certainly 'not' an easy script. I would rate this system as an ADVANCED user's system not recommended for beginners at the use of RGSS scripts. But... I will try to describe a few things.
Oh, and that @>Control Variables: [0001] = 9 stuff in the demo? That was lifted directly from Tonbi's original 'Japanese' Random Map demo. The first value set the ID number of a map (each map has an ID number, not just a name, and the two others are the X/Y coordinates. He just randomized where you get teleported in there.
Now first... The name of the map.
When I had (in the directions) to enter the name as 'mapname,random,YYY,ZZZ', the first part is just the map name, the second word HAS to be random, the YYY indicates how many sets of tiles you use (mainly just '1') and the ZZZ indicates how many random objects from the tiles can be in your way.
When I said 'how many sets of tiles', I mean how many tiles like, a set that draws cave patterns with walls, ceilings and floors, and another set that draws waterways, shores and the like. You can make (for an example) an random underground cave with a running river if you so desire. But it is complicated.
The tiles you draw in the upper left corner of the map 'ARE' the tileset the generator uses. Again... the first tile is the floor. The next four drawn right below will be used to generate the ceiling corners, the nine right after it draws the ceiling ledges, and then you have the walls.
Code:
# +---+
# | | <----- Floor Tile
# +---+---+
# |/ \|
# | | <--- Ceilings (corners)
# |\ /|
# +---+---+---+
# | /-------\ |
# || +---+ ||
# || | | || <---Ceiling (visible ledge borders w/ center ceiling tile)
# || +---+ ||
# | \-------/ |
# +---+---+---+
# | |
# | | <---Walls
# | |
# +---+---+---+
So you really just draw 'a bunch of tiles' in this pattern and the generator grabs 'em and uses them. IF... you are only using one set of tiles (like a cave), you can just draw these and set that YYY value to 1. As an example, you must also name the map like this:
My Cave, Random, 1, 0
This would name the cave '
My Cave', set it to be a
Random map, uses only one set of tiles in that upper corner (
1) , and no obstacles in the way (
0).
BUT....
You do want to specify at least some areas in the map where your character can walk. If you didn't, teleporting your players into a map can be a pain. They could teleport into a wall and that isn't good. So... you have to define an area or two that allows a player to walk.
Simple. Use an event with the word 'Relay' in the event's name or in a comment in the event's coding.
Wherever you place an event with the 'Relay' name is an area in your random map that will be walkable. By placing a series of 'Relay' events from one end of a map to another, you can make a walkable passage... of sorts. It'll still try to make the passages random, but it works fine.
And if you wanted to make an exit to your map in a specific place, use the word 'Fixed' in the map event's name so it will move to the closest available 'walkable' space in your map. OR... use the word 'Wall' or 'P-Wall' in a comment within the map event to move your teleport event into a wall. Good for cave exits.
I can't really go into exact details, and I have dialup at home so a Vid is right out of the question. I kinda gave the basics, so I'll have to leave it up to the end-user to figure out all the extra nuances of the system.
But it can be a real cool tool just to make random maps. :cheery: