跳到正文

RandomRoll

作者:Dvmn2

The datapack creates an animated dice roll.

收藏

截图

介绍

中文介绍正在准备中,下面暂时显示原文。

RandomRoll

A lightweight datapack that adds dice-rolling functionality to Minecraft — perfect for tabletop-style RPG mechanics, DnD-inspired servers, or any world where you need a random roll on demand.

Features

RandomRoll lets you trigger dice rolls either by running a function directly or by placing a specially-tagged item into an item frame — great for building physical “dice” props in your world.

Versions

v1.0.0+

  • Run /function randomroll:roll to roll a d100.
  • Alternatively, give yourself an item with custom data, e.g.:
  /give @s minecraft:apple[minecraft:custom_data={dice:1}]

(the value of dice doesn’t matter here) and place it in an item frame to trigger a d100 roll.

v2.0.0+

  • Added the dice macro, letting you set a custom die size:
  /function randomroll:roll {dice:20}

rolls a d20.

  • Item frame items now respect the die size too:
  /give @s minecraft:apple[minecraft:custom_data={dice:50}]

placed in a frame rolls a d50.

v3.0.0+

  • Added the modifier macro, which adds its meaning (3.1.0+) or the value of a scoreboard objective to the roll result. The scoreboard modifier is pulled from the nearest player without the admin tag:
  /function randomroll:roll {dice:12,modifier:2}

rolls a d12 and adds 2.

  /function randomroll:roll {dice:10,modifier:v1}

rolls a d10 and adds the v1 scoreboard value of the nearest non-admin player.

  • Works the same way with item frames:
  /give @s minecraft:apple[minecraft:custom_data={dice:15,modifier:v1}]

placed in a frame rolls a d15 with the v1 modifier applied.

||
|—|
|Roll Animation|

How to Use

  1. Download the version that fits your needs (or the latest for all features).
  2. Place the datapack in your world’s datapacks folder.
  3. Run /reload or restart the world.
  4. Use /function randomroll:roll (with optional macros) or set up item-frame dice as described above.

RU:

Легкий датапак, который добавляет в Minecraft функцию броска игральных костей — идеально подходит для настольных ролевых игр, серверов в стиле DnD или любого мира, где вам нужен случайный бросок по запросу.

RandomRoll позволяет запускать броски игральных костей либо напрямую, вызывая функцию, либо помещая предмет со специальным custom_data в рамку для предметов — это отличное решение для создания физических «игральных костей» в вашем мире.

v1.0.0+

  • Запустите /function randomroll:roll, чтобы бросить d100.
  • Или создайте предмет с custom_data, например:
  /give @s minecraft:apple[minecraft:custom_data={dice:1}]

(значение dice здесь не имеет значения) и поместите его в рамку для предметов, чтобы запустить бросок d100.

v2.0.0+

  • Добавлен макрос dice, позволяющий задать размер игральных костей.
  /function randomroll:roll {dice:20}

бросает d20.

  • Предметы в рамке теперь тоже учитывают размер кубика:
  /give @s minecraft:apple[minecraft:custom_data={dice:50}]

поместив предмет в рамку, вы бросаете d50.

v3.0.0+

  • Добавлен макрос modifier, который прибавляет к результату броска своё значение (3.1.0+) или значение scoreboard цели. Модификатор берется у ближайшего игрока без тега admin:
  /function randomroll:roll {dice:12,modifier:2}

бросает d12 и прибавляет 2`.

  /function randomroll:roll {dice:10,modifier:v1}

бросает d10 и прибавляет значение v1 с scoreboard ближайшего игрока без тега admin.

  • Работает так же с предметами в рамке:
  /give @s minecraft:apple[minecraft:custom_data={dice:15,modifier:v1}]

поместив предмет в рамку, вы бросаете d15 с применением модификатора v1.

||
|—|
|Анимация броска|

Как использовать

  1. Скачайте версию, которая соответствует вашим потребностям (или последнюю версию со всеми функциями).
  2. Поместите датапак в папку datapacks вашего мира.
  3. Выполните команду /reload или перезапустите мир.
  4. Используйте /function randomroll:roll (с дополнительными макросами) или настройте кубики в рамке для предметов, как описано выше.

常见问题

RandomRoll 支持哪些 Minecraft 版本?

RandomRoll 支持 Minecraft Java 版 1.21.5–26.2,共 11 个版本。下载时注意选择和你游戏版本一致的文件。

RandomRoll 怎么安装?

新建世界时在「数据包」里把下载的 .zip 拖进去;已有的存档,把文件放进存档目录下的 datapacks 文件夹,进游戏输入 /reload 即可生效。服务器同样放在世界目录的 datapacks 里。

评论

登录后评论和评分

Dvmn2 的其他作品

查看全部 →