设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 156|回复: 0

[转载发布] Random Dungeon Generator (with demo)

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    58883
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    68848

    灌水之王

    发表于 2026-7-27 09:17:01 | 显示全部楼层 |阅读模式
    Dungeon Generator Script v1.0

    Created by Neon Black


    What is it?
    This script is one I have wanted to do since I started working with VX. It allows a random dungeon to be created from a number of rooms of any size and shape. This allows for more controllable dungeon design.

    How can I use it?
    To use this script, place it under “Materials” but above “Main”. To use a random dungeon, simply use the following script call:


    • create_dungeon(length, alts, width, height)
    After using this call, just transfer to a map tagged with “<random>” and the random dungeon will be created. The 4 arguments of the script call are meant to be numeric and are as follows.


    • length – The total length of the main path of the dungeon. Using a higher number will create a larger dungeon.
    • alts – The max number of treasure paths to create. These paths can be any length between 1 and “length” rooms and will start from any existing room EXCEPT the start and end rooms.
    • width – The total allowed width of the dungeon in rooms. By default a buffer of one room is placed on each edge of the dungeon and includes empty rooms.
    • height – Same as width only vertical.
    Maps must be created with a total of 40 “rooms” that the dungeon selects to draw from. This creates a set of rooms that is 8 wide and 5 tall. Every room must be the same size, but the size of the rooms and the size of the set is pretty much infinite. The first 16 rooms are the standard rooms that will show up based on the random value you set in the config section.

    The next 16 tiles follow the same pattern. These are the “uncommon” tiles that only appear with a certain chance based on the random value set in config.

    The final 8 tiles are the start and end points. The first 4, your start points follow the pattern up, right, down, left. The last 4 are the end points and follow the same pattern.

    The end result map should be something like this:

    Spoiler





    There are 2 types of special events that can be placed on a map. These are as follows:

    • <super> - Any events with this in their name will get placed in the very upper left hand corner of the map. This is useful for parallel processes and other such events.
    • <treasure> - The event with the lowest id and this in it's name will get placed on all tiles in treasure rooms that have an ID of 3.
    Regions are very important for telling the map where certain things should happen. The region tags that are reserved by the generator are 1, 2, 3, 4, 6, and 8.

    Region 3 is used by the generator to determine where to put treasures. When a room is designated as a treasure room (the end of an alt path) it will search the room for a region 3 and place treasure chests on ANY found (see above for how to mark these).

    Regions 1, 2, 4, 6, and 8 are used for the start points. As it is creating the dungeon, it will take the last of these regions that it copies and set it as the start point. As a general rule, only put one of any of these in each of the 4 start rooms. When using region 1, the player's facing direction is determined by the transfer event. If you want the direction to change based on which room the player ends up in, user 2, 4, 6, or 8. These will set the player to face the same direction as the same number on the numpad, for example, region 8 will place the player facing up.

    All other events work normally. When a room is copied over to the newly created map, all events are taken with it and placed in exactly the same spot. The only exceptions are events marked as treasures and events marked as super.

    What does it work with?
    This script may not work with scripts that modify how maps, tilesets, or events work.
    This script adds an additional command to my Basic Console script that allows you to see a map of the dungeon generated. To do this, type “map” in the console screen.

    How can I get the code?
    Version 1.0 (base script, 9.8.2012) is available from my pastebin account here or the demo on my mediafire account here.

    I would like to use this code.

    This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.
    Permissions beyond the scope of this license may be available at http://cphouseset.wordpress.com/liscense-and-terms-of-use/.

    Author’s Disclaimer:
    I had created a similar dungeon generator to this with events in rpg maker 2k3 and it actually worked really well! Of course with scripts it’s a lot more controllable. The main focus of this dungeon generator is to allow large dungeons with multiple “rooms” to be created which allows more control to the shape of dungeons. The result is random dungeons similar to Persona 4. Rather than being small, ugly paths, you can create large, robust rooms, and due to standard and special rooms, you can even have some simple little challenges in some of those rooms. This may be a bit tricky to use, so I included a demo which shows how several aspects of the script work. If you’re having trouble, be sure to check that out. As always, enjoy!


    本贴来自国际rpgmaker官方论坛作者:Neon Black处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/random-dungeon-generator-with-demo.5478/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-17 14:13 , Processed in 0.126546 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表