Save-Point
Random Map Generator Script - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Material Development (https://www.save-point.org/forum-8.html)
+--- Forum: Scripts Database (https://www.save-point.org/forum-39.html)
+--- Thread: Random Map Generator Script (/thread-1641.html)

Pages: 1 2 3 4


Random Map Generator Script - Tonbi - 11-21-2009

Random Map Generator Script
Version: 0.80
by Tonbi
Translated from Chinese (according to Google Translate anyway)


Introduction
This script automatically creates random maps.


Demo
Random Map Demo


Script
English Translated Version
Original Chinese Version


Instructions
The original version was lacking in instructions. With a lot of patience, I added them into the English Translated version of the script.


Notes
This was seriously complex to translate. Cogwheel and ParaDog scripts were far easier.


Compatibility
Designed for use with RPGMaker XP / RGSS, and rewrites some default RGSS code. It might not work with other map/movement systems without some editing.


Random Map Generator Script - ShadowIce - 01-31-2010

How EXACTLY do you use this?

It creates a random map, but it's EXTREMELY complex to use. Even in English translation X_X


Random Map Generator Script - DerVVulfman - 01-31-2010

Tell me about it. Seriously, if you compare my translation to the original Japanese version you may note plenty more instructions that Tonbi left out.

Let's say you wanna make an earth cave random map. You draw some tiles into the upper-left corner of the map... one for the floor, some for walls and such, and of course random obstacles. They gotta be in a certain layout though as I described in the script.

And you can place map events here and there to help create 'anchor' points where it knows to draw sections of passages and so on so you can have a little control in the maps... like if you want a cave entrance in a fixed position.

On a kewl note, it works with Charlie Fleed's Auto Populate script. Winking


Random Map Generator Script - ShadowIce - 02-01-2010

That still doesn't explain much.

Like maybe you could release a

step-by-step tutorial how to do it.

or perhaps an HD quality movie

with you doing it STEP-BY-STEP

It would be GREATLY appreciated!

I've waited 8 years for a script of this calibur!
Could you include in the video how EXACTLY to SAVE your maps to either another folder, or for later use inside the Data folder? I really appreciate all of your help!

If not a video or tutorial, could you at least please explain what

@>Control Variables: [0001] = 9
@>Control Variables: [0002] = Random No. (0...200)
@>Control Variables: [0003] = Random No. (0...200)
@>Transfer Player:Variable [0001][0002][0003]

does, and how EXACTLY to change these so they warp me

to MY map and not a default pre-made?


Random Map Generator Script - DerVVulfman - 02-02-2010

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:


Random Map Generator Script - -Luke- - 03-13-2010

So how do you use the maps that you create?


Random Map Generator Script - DerVVulfman - 03-13-2010

Well, you can set up your game to generate random maps in-game, but while the map stays generated and won't change while you are in the randomly created dungeon... it will change once you exit that dungeon and attempt to return.

However, you can use the system to create a random map tool. Just create a project and paste this into it. Then just generate a map. After generating the map, you can paste the resulting map into your real project.


Random Map Generator Script - jubhub731 - 03-13-2010

Man this works great for making maps ! Its sad though that a random generator can make better maps then me Sarcasm + Confused[/size]


Random Map Generator Script - omgitsdan - 03-17-2010

Hmmm, Cant get any of the links to work. Can someone please post me the original english script please Laughing + Tongue sticking out


Random Map Generator Script - EJlol - 03-17-2010

links work here?