Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Random Map Generator Script
#5
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:
Reply }


Messages In This Thread
Random Map Generator Script - by Tonbi - 11-21-2009, 05:14 AM
RE: Random Map Generator Script - by ShadowIce - 01-26-2014, 01:25 AM
RE: Random Map Generator Script - by ShadowIce - 01-26-2014, 04:00 AM
RE: Random Map Generator Script - by DerVVulfman - 01-26-2014, 05:13 AM
RE: Random Map Generator Script - by DerVVulfman - 01-26-2014, 08:11 PM
RE: Random Map Generator Script - by DerVVulfman - 02-02-2014, 04:33 AM
RE: Random Map Generator Script - by ShadowIce - 02-02-2014, 08:19 PM
RE: Random Map Generator Script - by ShadowIce - 02-03-2014, 04:14 AM
RE: Random Map Generator Script - by DerVVulfman - 02-03-2014, 04:25 AM
RE: Random Map Generator Script - by ShadowIce - 02-03-2014, 04:32 AM
RE: Random Map Generator Script - by DerVVulfman - 02-03-2014, 04:56 AM
RE: Random Map Generator Script - by ShadowIce - 02-03-2014, 08:08 PM
RE: Random Map Generator Script - by DerVVulfman - 02-06-2014, 05:22 AM
RE: Random Map Generator Script - by ShadowIce - 02-13-2014, 06:47 PM
Random Map Generator Script - by ShadowIce - 01-31-2010, 09:57 PM
Random Map Generator Script - by DerVVulfman - 01-31-2010, 10:36 PM
Random Map Generator Script - by ShadowIce - 02-01-2010, 06:45 PM
Random Map Generator Script - by DerVVulfman - 02-02-2010, 01:24 AM
Random Map Generator Script - by -Luke- - 03-13-2010, 08:08 PM
Random Map Generator Script - by DerVVulfman - 03-13-2010, 10:00 PM
Random Map Generator Script - by jubhub731 - 03-13-2010, 11:23 PM
Random Map Generator Script - by omgitsdan - 03-17-2010, 01:39 PM
Random Map Generator Script - by EJlol - 03-17-2010, 11:59 PM
Random Map Generator Script - by DerVVulfman - 03-18-2010, 04:20 AM
Random Map Generator Script - by Ace - 03-18-2010, 10:42 AM
Random Map Generator Script - by ShadowIce - 04-19-2010, 11:40 PM
Random Map Generator Script - by DerVVulfman - 04-20-2010, 03:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Random Move Type kyonides 1 367 01-01-2024, 03:15 AM
Last Post: kyonides
   Text Scroll Script - Enhanced DerVVulfman 23 29,912 02-18-2021, 04:16 AM
Last Post: DerVVulfman
   Variable Extraction Generator DerVVulfman 0 2,556 07-20-2020, 06:58 PM
Last Post: DerVVulfman
   Switch Extraction Generator DerVVulfman 1 3,065 06-19-2020, 03:43 AM
Last Post: DerVVulfman
   Cursor Script Selwyn 7 13,216 09-28-2019, 02:13 PM
Last Post: DerVVulfman
   ACBS FIX SCRIPT #2: Advanced Cry Correction DerVVulfman 1 3,981 08-09-2019, 03:42 PM
Last Post: aeliath
   ACBS FIX SCRIPT #1: Victory Cries Patch DerVVulfman 1 3,955 08-08-2019, 02:53 PM
Last Post: aeliath
   Archived Script Listings DerVVulfman 9 33,896 01-08-2019, 04:27 AM
Last Post: DerVVulfman
   Spritesheet Generator Conversion Script DerVVulfman 0 3,641 11-21-2018, 04:48 AM
Last Post: DerVVulfman
   Neo Mode 7 Script by MGCaladtogel MGC 59 111,818 09-29-2017, 03:48 AM
Last Post: DerVVulfman



Users browsing this thread: