脚本方块
本模组添加了多种旨在帮助构建冒险地图和地牢的方块。
重要提示
本模组目前处于 Alpha(测试)阶段,这意味着:
- 并非所有功能都已实现。
- 现有功能可能尚未定型。
- 可能会发生破坏性变更。
- 现有功能可能会被移除。
- 请预期会出现 Bug 和崩溃。
- 文档非常简略。
- 使用本模组时,请备份你的世界存档。
功能
本模组实现了许多不同的功能,此处仅提供简短且不完整的概述。
所有详细信息将在 Wiki 中解释(尚未编写)。
脚本方块
基本理念是在地牢的可见部分之外构建一个“脚本”。
存在能够检测玩家、可交互的方块等,它们都会“触发”一个可配置的方块位置。
随后是当被“触发”时具有功能的方块,例如生物生成器、改变状态的方块、消息发送器、拼图放置器、进度授予器等。
还有计数器、延迟器和中继器等实用方块。
这些方块专为在拼图结构中使用而设计。
它们可以通过游戏内 UI 进行配置,类似于现有的拼图方块。
对话
对话由数据驱动,可通过“对话方块”引用。
每个对话都是一个字符串列表和一个答案列表。当玩家选择答案时,可以发生以下几种情况:
- 打开另一个对话
- 授予一项进度
- 生成战利品表并将物品给予玩家
- 向玩家发送一条消息
- 触发位于可配置位置的方块(参见脚本方块)
- 与位于可配置位置的方块进行交互(类似于右键点击)
答案可以通过进度来(解锁/锁定),并且可以设定物品消耗。
商店
商店由数据驱动,可通过特殊方块引用。
商店可以包含多个交易,这些交易可以通过进度来(解锁/锁定)。
交易提供一组物品堆叠作为报价,并以一组物品堆叠作为价格。
使用中继方块
与这些方块交互时,它们会将交互传递给另一个方块。
目前它们以所有现有的门和陷阱门的形式出现。
传送方块和地点
传送方块可以将玩家以及可选地将玩家的队伍传送至某个维度中的位置。
该位置可以进行配置:
- 玩家的出生点或世界出生点。
- 特定维度中的特定位置,由另一个传送方块设置。
- “地点”。
地点由数据驱动。它们引用一个结构和一个“控制方块位置”。
必须配置该结构,使得位于“控制方块位置”的方块是一个“地点控制方块”。
“地点控制方块”告知传送目标位置。
地点可以通过进度来(解锁/锁定),并且可以设定物品消耗。
它们可以是公开的,也可以是玩家专属的。
公开地点位于主世界。私人地点位于“player_locations_dimension”中。每个玩家都有一个这样的维度,当玩家进入世界时会动态生成。
房屋
房屋方块有一个所有者和一个影响区域(AOI)。
在 AOI 内,只有所有者可以放置、破坏或与方块交互。即使在冒险模式下,玩家也可以在此处破坏或放置方块。
所有者可以将其他玩家添加到不同的列表中,从而赋予他们在 AOI 中的各种权利,如放置、破坏或与方块交互。
房屋方块有两种不同的模式来确定其所有者。
- 交互方式:通过与房屋方块交互来设置所有者。所有者可以撤销对房屋方块的所有权。
- 维度方式:当房屋方块放置在“player_locations_dimension”中时,拥有该维度的玩家也拥有该房屋方块
Script Blocks
This mod adds multiple blocks designed to help building adventure maps and dungeons.
Important
This mod is currently in its alpha stage, which means:
- Not all features are implemented.
- Existing features may not be in their final form.
- Breaking changes can happen.
- Existing features may be removed.
- Expect bugs and crashes.
- Documentation is very minimal.
- Back up your worlds when using this mod.
Features
This mod implements a lot of different features, I will give a short and incomplete overview here.
All details will be explained in the wiki (not yet written).
Script Blocks
The basic idea is to build a "script" outside the visible parts of the dungeon.
There are blocks that can detect a player, interactable blocks, etc., which all "trigger" a configurable block position.
Then there are blocks which have functionality when they are "triggered", like mob spawners, blocks which change state, message sender, jigsaw placer, advancement giver, etc.
There are also utility blocks like counter, delay and relay blocks.
The blocks are designed to be used in jigsaw structures.
They are configurable via an in game UI, like the existing jigsaw blocks.
Dialogues
Dialogues are data driven and can be referenced via the 'dialogue block'.
Each dialogue is a list of strings and a list of answers. When the player chooses an answer, several things can happen:
- another dialogue opens
- an advancement is granted
- a loot table is generated and the items given to the player
- a message is send to the player
- a block at a configurable position is triggered (refer to Script Blocks)
- a block at a configurable position is interacted with (similar to a right-click)
An answer can be (un)locked via an advancement and can have an item cost.
Shops
Shops are data driven and can be referenced via special blocks.
A shop can have multiple deals, which can be (un)locked via advancements.
A deal has an item stack as offer and a list of item stacks as price.
Use Relay Blocks
When interacting with these blocks, they relay the interaction to another block.
For now they come in the form of all existing doors and trapdoors.
Teleporter blocks and locations
Teleporter blocks can teleport the player and optionally the players party to a position in a dimension.
The position can be configured:
- the players spawn point or the world spawn.
- a specific position in a specific dimension set by another teleporter block.
- a 'location'.
Locations are data driven. They reference a structure and a 'control block position'.
The structure must be configured, so that the block at the 'control block position' is a 'location control block'.
The 'location control block' tells the teleporter the teleport target position.
Locations can be (un)locked by advancements and can have an item cost.
They can either be public or player specific.
Public locations are located in the overworld. Private locations are located in a 'player_locations_dimension'. Each player has one, they are dynamically generated for each player entering the world.
Housing
A housing block has an owner and an area of influence (AOI).
In the AOI only the owner can place, break or interact with blocks. Even players in adventure mode can break or place blocks here.
The owner can add other players to different lists, which grants them various rights in the AOI, like placing, breaking or interacting with blocks.
Housing blocks have two different modi to determine their owner.
- Interaction, the owner can be set by interacting with the housing block. The owner can revoke ownership of the housing block.
- Dimension, when the housing block is placed in a 'player_locations_dimension', the player owning the dimension also owns the housing block
评论 0
登录后参与评分
还没有评论,来抢沙发吧