Chunky Dungeons!!!
Chunky Dungeons 是一款旨在轻松创建无限生成的地牢的插件。它通过使用用户保存的房间,以有序的方式填充 Minecraft 的子区块(subchunks)来实现这一功能。
请注意,此插件未经其他版本测试,但可能仍然有效。
特性:
- 房间保存
- 容器保存
- 随机战利品表
- 无限地牢生成
- 有限*地牢生成
- 房间旋转
- 连接逻辑
*有限模式存在故障
使用方法
房间保存:
在子区块中(使用 F3+G 时蓝色和粉色线条之间的区域)按 desired 建造一个房间后
您可以使用命令 /chunkydungeons saveroom <folder> <roomid> <rarityweight> <connectingdirections>
- Folder: 文件保存的位置。同时也决定了地牢从何处生成。
- Room ID: 房间的文件名。
- Rarity Weight: 一个数字,用于确定相对于其他房间的生成概率。
- Connecting Directions: 由 0/1 组成的二进制字符串,定义某一面是否为连接器(生成时连接器必须连接到另一个连接器)。对应 NESW 罗盘方向。例如,如果您保存的房间向北和东开放,则应输入
1100。
命令使用示例:/chunkydungeons saveroom TestDungeon Test 1 1010
地牢生成:
保存房间后,要生成地牢,您可以运行 /chunkydungeons createdungeon <infinite|#numberofrooms> <sourcefolder> [dungeonID]
- Infinite / Number of Rooms: 可以输入
infinite,使其在加载时持续扩展;或者指定一个房间数量。有限模式的行为可能不符合预期。如果设置为 1,它将生成 1 个房间。如果设置更多,它会在检查是否达到设定的房间数量之前填满整个渲染距离,然后停止。
- Source Folder: 生成时从中提取房间的来源文件夹。
- Dungeon ID: 仅适用于无限模式,为地牢文件指定特定名称。
战利品表
要使用战利品表,您首先必须使用 /chunkydungeons loottable create <id> <filledSlotChancePercent> 定义一个。
- ID: 战利品表的名称
- Filled Slot Chance Percent: 一个 0-100 的数字,决定将填充多少个槽位
然后,您可以保存包含容器的房间,并将容器命名为战利品表 ID,它们将在生成时带有该战利品表的内容。
要向战利品表添加物品,您必须手持该物品(单个物品,因为它检测堆叠大小)并使用
/chunkydungeons loottable addto <ID> <rarityWeight> <maxStack?>
- ID: 要添加到的战利品表。
- Rarity Weight: 一个数字,用于确定相对于其他物品的生成概率。
- Max Stack: 每次选择时随机选择一个值(1 到该数字之间),作为堆叠大小。
要检查战利品表,您可以运行
/chunkydungeons lootcheck <ID>,这会在您的位置放置一个包含该 ID 战利品的箱子。
注意: 战利品表仅在空箱子槽位中生成,允许您在箱子中同时拥有特定物品和随机战利品。
文件
每个房间、地牢和战利品表都保存到文件中,这些文件应该易于修改和删除。要停止无限地牢,您可以使用 /chunkydungeon stopsession <dungeonID> 或直接删除文件。
玩得开心!
剧透
我是为了我自己的 Minecraft 服务器按照我的规格和需求创建的这个插件。我不太可能会有进一步的发展。
此外,代码主要是用 AI 编写的,但我进行了严格的测试并进行了迭代。AI 只是为了加快速度并确保语法正确。~~~~
Chunky Dungeons!!!
Chunky Dungeons is a plugin designed to easily create infinitely generating dungeons. It works by filling in Minecraft's subchunks in an orderly way using user-saved rooms.
FYI, this plugin is untested on other versions, but might still work.
Features:
- Room saving
- Container saving
- Randomized loot tables
- Infinte Dungeon generation
- Finite* Dungeon generation
- Room rotation
- Connector logic
*Finite is broken
Usage
Room saving:
After building a room as desired in a subchunk (the area between the blue and pink lines when using F3+G)
You can use the command /chunkydungeons saveroom <folder> <roomid> <rarityweight> <connectingdirections>
- Folder: The place for the file to save. Also determines where dungeons generate from.
- Room ID: The file name for the room.
- Rarity Weight: A number that determines how likely it is to generate in respect to other rooms.
- Connecting Directions: A line of binary 0/1 that defines if a side is a connector or not (connectors must connect to connectors when generating). Corresponds to NESW compass directions. For example, if the room you are saving opens to the North and East, you would put 1100.
Exaple of command usage: /chunkydungeons saveroom TestDungeon Test 1 1010
Dungeon Generating:
After saving rooms, to generate a dungeon, you can run /chunkydungeons createdungeon <infinite|#numberofrooms> <sourcefolder> [dungeonID]
- Infinite / Number of Rooms: either put infinite, where it will continue expanding as loaded in, or designate a number of rooms. Finite dungeons will not behave as expected. If you set it to 1, it will generate 1 room. If you set it to more, it will fill your entire render distance before checking to see if it hit the number of rooms and then stop when it does.
- Source Folder: Where to pull rooms from for generating.
- Dungeon ID: only for infite, gives the dungeon file a specific name.
Loot Tables
To use a loot table, you first must define one using /chunkydungeons loottable create <id> <filledSlotChancePercent>
- ID: Name of the loot table
- Filled Slot Chance Percent: A number 0-100 that determines how many slots will be filled
Then you can save rooms with containers in them that are named the loot table ID, and they will generate with the loot table.
To add an item to a loot table you must hold it in your hand (single item, as it detects stack size) and use /chunkydungeons loottable addto <ID> <rarityWeight> <maxStack?>
- ID: the loot table to add to.
- Rarity Weight: A number that determines how likely it is to generate in respect to other items.
- Max Stack: It chooses randomly (1 - this number) each time it is chosen, for the stack size.
To check a loot table you can run /chunkydungeons lootcheck <ID> which places a chest with the loot for ID at your location.
Note: Loot tables only generate in empty chest slots, allowing you to have specific items in chests along with the randomized loot.
Files
Each room, dungeon, and loot table is saved to a file that should all be easy to modify and delete. To stop an infinite dungeon you can either use /chunkydungeon stopsession <dungeonID> or simply delete the file yourself.
Have fun!
Spoiler
I created this for my own Minecraft Server to my specifications and needs. It is unlikely I will have much further development.
Also, it was very much coded with AI, but I did rigorous testing and iterated it. The AI was just to speed things up and make everything okay syntax-wise.~~~~
评论 0
登录后参与评分
还没有评论,来抢沙发吧