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

[转载发布] [SB] StormBeard - Random Dungeon Generator

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

    连续签到: 2 天

    [LV.7]常住居民III

    8038

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 5 天前 | 显示全部楼层 |阅读模式
    Stormbeard's Random Dungeon Generator v0.01

    Intro:
    -----------------------------


    This is a plugin that will randomly generate a dungeon map and provide ways to
    control things like how many levels, bosses, treasure, and troops.

    The flow of the map will be the player is ported into a random location and
    then must defeat a boss monster in order to open a portal that will spawn
    elsewhere in the dungeon where the player will either progress deeper into the
    dungeon or be ported to a user specified map.














    Dependencies:
    -----------------------------


    This plugin also has dependencies on Yanfly's Event Chase Player plugin and it
    must be included in the project.

    http://yanfly.moe/2015/10/21/yep-20-event-chase-player/



    Default Settings:
    -----------------------------


    The default settings will control how the dungeon is built and populated


    Current Depth - Starting level of the dungeon to port to [usually 1]

    Max Depth - How many total levels is the dungeon before porting to specified map

    Switch Gate - A dedicated global switch # the plugin needs for gate management

    Switch Boss - A dedicated global switch # the plugin needs for boss management

    Dungeon Width - Tile width of the dungeon

    Dungeon Height - Tile height of the dungeon

    Dungeon Fullness - Ratio to control amount of walkable space

    Room Size - Ratio to control the size of rooms

    Random Encounters - Controls on map or random encounter for monsters

    Monster Density - For random this is number of steps, for on map it roughly how many square tiles per monster

    Chest Density - How many square tiles per chest

    Tileset ID - The ID of what tileset you've configure for the plugin

    BGM - Background music name



    Calling a Dungeon
    -----------------------------


    Using the Plugin Command event you can enter a string like below to call a dungeon::

    procgen mapgen dungeonname:dungeon1 outx:4 outy:6 outid:4

    Breaking down the pieces of the command it looks like:

    procgen - Name of the plugin, required [this never changes]

    mapgen - Type of dungeon generation [currently only mapgen supported, more coming soon], required

    dungeonname:XXX - Name of the dungeon, this allows you to have multiple different dungeons, required

    outX:X outY:X outid:X - The output coordinates and mapID to send the player at the completion of the dungeon, required


    This is a list of optional parameter mappings you can use to override the global defaults from the plugin manager to help customize every dungeon the way you want it:


    Plugin Command - Default Setting

    start:X - Current Depth

    max:X - Max Depth

    gateswitch:X - Switch Gate

    bossswitch:X - Switch Boss

    w:X - Dungeon Width

    h:X - Dungeon Height

    fullness:X - Dungeon Fullness

    roomsize:X - Room Size

    userandom:X - Random Encounters

    encounterrate:X - Monster Density

    chestrate:X - Chest Density

    tilseset:X - Tileset ID

    bgm:X - BGM



    So other examples:

    A dungeon 100 tiles in height with more chests and defaults:
    procgen mapgen dungeonname:dungeon1 outx:4 outy:6 outid:4 h:100 chestrate:500

    A dungeon with less walkable space and defaults:
    procgen mapgen dungeonname:dungeon1 outx:4 outy:6 outid:4 fullness:.4


    A dungeon 3 levels deep using tileset 8 and defaults:
    procgen mapgen dungeonname:dungeon1 outx:4 outy:6 outid:4 max:3 tileset:8



    Adding Bosses and Monsters:
    ------------------------------------


    To control what encounters a player will receive on a level you must pick a troop and give it a custom name like the following:

    procgen:dungeon1:troop:1:3:Monster:2:1:0:Bat*2

    The command is broken down as follows:

    procgen - never changes and should always be there

    dungeon1 - You would replace this with your dungeonname param from the Plugin Command

    troop - there are 2 values here, "troop" or "boss", troops are roaming monsters while boss will be a level boss for a floor

    1:3 - this is the start level and end level of the dungeon a troop/boss is eligible for, ex if this was a 5 floor dungeon this troop would not appear on floors 4 or 5, if the value was 1:1 it would not appear on floors 2, 3, 4, or 5

    Monster - This is the name of the character's sheet for the on map sprite

    2:1:0 - direction, pattern, and character index of an on map monster - this controls which sprite of the sheet to use, I will explain this below [Coming Soon]

    Bat*2 - A name you choose to identify the troop, nothing to do with the plugin



    Some examples you can use to get started:

    procgen:dungeon1:troop:1:2:Monster:2:1:0:troop1 [Will show a bat on map]

    procgen:dungeon1:troop:1:3:Monster:2:1:1:troop2 [Will show a slime on map]

    procgen:dungeon1:boss:1:2:$BigMonster1:6:1:0:boss1 [Will use a big monster at the boss]

    procgen:dungeon1:boss:3:3:$BigMonster1:2:1:0:boss2 [Will use a different big monster as the boss]

    The above assumes you have the default resources in your game, if you apply this to 4 troops the experience would be in a 3 floor dungeon you would fight a mix of bat and slimes on floors 1 and 2 and fight boss 1 on both floors 1 and 2 on floor 3 you would only fight slime on the map and fight boss 2 at the end.

    One important note is that if you do not use on map monster's these value for troops are irrelevant and you can set anything you would like there, but for bosses is still important as they always appear on map.






    Adding Treasure:
    -----------------------------


    In the notes section of any item, armor, or weapon you can add a tag like the following to add it to the dungeon:

    <procgen 1:3:dungeon1 >

    A breakdown of the tag is:

    <procgen - always needed

    1:3:dungeon1 - the start floor and end floor where the item can appear, and the dungeonname from the Plugin Command the item is tied to

    > - always needed


    So ex putting the above on a potion in a 5 floor dungeon the potion would have a chance to appear on floors 1, 2, 3 but not on floors 4 or 5.

    Currently to distribute treasure the plugin will look at how many possible chest for the map level, then look at what items are available on the current floor. Each notetag is only good for 1 occurrence of an item on any given floor, so ex if you put:

    <procgen 1:3:dungeon1 >
    <procgen 1:1:dungeon1 >
    <procgen 1:1:dungeon1 >

    All on the potion item, it would mean that in a dungeon you could possibly collect up to 3 potions on floor 1, and possibly collect one potion each on both floors 2 and 3.

    if you just had:

    <procgen 1:3:dungeon1 >

    and the player collects a potion on floor 1, there is still a possibility that the player will collect another potion on both floor's 2 and 3, meaning that each notetag does not map to being just 1 item received.


    One other item to note is that currently the plugin will also add 1 gold chest to the pool of available treasure for each map level. It calculates the average gold value of all possible items that could be received on that level to determine value. So ex if you have 3 items note tagged for a level the gold chest will function as a 4th available item, so if you want to ensure a player gets all available items on any given level make sure you change you chest density for 1 more chest than you notetags. The other part of this to note is that if you put something like only 1 very expensive item on a level that there will be a corresponding large chest of gold as the only item available to average off of is that very expensive item. The gold chest system is something that is actively being worked on and any recommendations are welcome.



    Tilesets:
    -----------------------------


    In the script link below there are also 3 example tilesets based off the games default tilesets for reference on how to make your own.

    Insert the tileset you want to try into your img/tilesets folder then in the DB setup add a new tileset and add one of the included tilesets as A1, A2, A4, and B (one tileset for all those options)

    In the tileset passability options you will want to set all passability to "X" other than the pathway tiles and the 2 ground cover sprites in each set, here is an example from the winter set:




    The positioning will be the same for each tileset if there is any confusion about what counts as ground cover and pathways.

    If anyone makes any new tilesets they want to share back let me know and I will add them to the project. [Not a great tileset combo guy here, so apologies in advance]

    *When I get the Demo up I recommend looking there for any help you need here


    Script Link:
    ---------------------------


    https://gitlab.com/sb-rpgmv-plugins/randomdungeon

    Demo Link:
    --------------------------


    (Coming Soon)

    Usage:
    --------------------------

    You have my permission to use this in any and all projects assuming you adhere to the following:

    1 - Credit Stormbeard in your project
    2 - Contact me to let me know that it was used and where the project is available


    Coming Soon/Next:
    -----------------------------


    *Generating the map ina more cavelike way vs corridors and rooms
    *Refining the gold chest system
    *Code Cleanup
    *Simplifying inputs for troops
    *Refining the item placement/generation system
    *Requests from comments


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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-1 10:45 , Processed in 0.073194 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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