Nexo
概要
Nexo は、カスタムのアイテム、ブロック、家具をサーバーに追加します。この拡張機能は、それらを TypeWriter に取り込みます。クエストでカスタム鉱石を壊させたり家具を置かせたりでき、プレイヤーがブロックを叩いたときにシーケンスを開始でき、criteria でプレイヤーが持っているものや見ているものを確認できます。
すべては、Nexo のアイテム ID(たとえば ruby_ore や oak_chair)で指定します。コンテンツは、これまでどおり Nexo で定義します。この拡張機能は、それを読み取って反応するだけです。
機能
- ブロックのイベント — カスタムブロックの、破壊、設置、インタラクト、ダメージ(プレイヤーが採掘を開始)、戦利品のドロップ。
- 家具のイベント — 家具の、破壊、設置、インタラクト、ダメージ。BetterModel ID による絞り込みは任意です。
- カウントする目標 — カスタムブロックや家具の破壊や設置を、クエストの目標にできます。
- アイテムのインベントリツール — Nexo のアイテムを与えたり削除したりし、拾う、捨てる、消費するに反応します。
- アイテムのファクト — 手に持っているアイテム、アイテム数、手に持っているアイテムが特定のメカニックを使っているか。
- ワールドのファクト — 見ている、または立っているブロック、見ている家具、家具の明るさの状態、ブロックを壊すのに必要な時間。
- 変数 — 手に持っているアイテムと、視界にあるブロックや家具の ID とプロパティ、さらにレジストリとタグの一覧。
- サウンドエントリ — TypeWriter がサウンドを求めるあらゆる場所で、Nexo のサウンド ID を使えます。
インストール
- サーバーに Nexo をインストールします。これがないと、この拡張機能は読み込まれません。
- TypeWriter の Quest と Basic の拡張機能がインストールされていることを確認します。
- ストアから拡張機能をダウンロードし(上のパネルのボタンを参照)、JAR を
plugins/Typewriter/extensions/に置きます。 - サーバーを再起動します。
はじめに
この手順では、プレイヤーがカスタムブロックを右クリックしたときにシーケンスを開始し、クエストのために家具を数えます。
- sequence ページで、Nexo Block Interact イベントを追加します。
blockIdに Nexo のブロック ID を設定し、actionをRIGHT_CLICKにして、triggersを、実行したいエントリ(たとえばダイアログ)にリンクします。- カウントするタスクでは、クエストと進行状況のファクトを作成し、Place Furniture 目標を追加します。
quest、factを設定し、itemに家具の ID、amountに5を設定します。displayにトラッカーの行を入力し、必要に応じてonCompleteを報酬のシーケンスにリンクします。- Publish して、クエストがアクティブなプレイヤーでテストします。
Registry IDs 変数は、Nexo が読み込んだすべてのアイテム、ブロック、家具の ID を一覧表示します。Tag Items 変数は、Nexo のタグに含まれるアイテムを一覧表示します。
仕組み
イベントは、起きたことを、トリガーされたエントリに渡します。ブロックや家具の ID、その位置、そして家具の場合は BetterModel ID です。戦利品ドロップのイベントは、ドロップされたスタック数とアイテム数も渡します。
目標は、各位置をプレイヤーごとに 1 回だけカウントするため、同じ場所で再び設置や破壊をしても、加算されません。カウントされるのは、プレイヤーがリンクされたクエストをアクティブにしている間だけです。キャンセルされた行動は無視されます。
家具のイベントと目標の betterModelId フィルターは、Nexo の設定にある家具の bettermodel_id キーに一致します。無視するには、空のままにします。
設定
クエストトラッカーの目標の行は、TypeWriter の 2 つのスニペットから作られます。
| スニペット | デフォルト |
|---|---|
advancedQuest.display | <display> <dark_gray>(<gray><current><dark_gray>/<gray><required><dark_gray>) |
advancedQuest.completed | <green>✔</green> <st><display></st> <dark_gray>(<gray><current><dark_gray>/<gray><required><dark_gray>) |
エントリ
35 件のエントリー(拡張機能のソースから生成)。
アクション2
- Nexo Give Item ActionGive a Nexo item to the player
- Nexo Remove Item ActionRemove a Nexo item from the player
イベント12
- Nexo on Customblock Break EventTriggers when a Nexo custom block is broken
- Nexo on Customblock Damage EventTriggers when a player starts breaking a Nexo custom block
- Nexo on Customblock Drop Loot EventTriggers when a Nexo custom block drops loot
- Nexo on Customblock Interact EventTriggers when a Nexo custom block is interacted with
- Nexo on Customblock Place EventTriggers when a Nexo custom block is placed
- Nexo on Furniture Break EventTriggers when a Nexo furniture is broken
- Nexo on Furniture Damage EventTriggers when a player hits a Nexo furniture
- Nexo on Furniture Interact EventTriggers when a Nexo furniture is interacted with
- Nexo on Furniture Place EventTriggers when a Nexo furniture is placed
- Nexo on Item Consume EventTriggers when the player consumes a Nexo item
- Nexo on Item Drop EventTriggers when the player drops a Nexo item
- Nexo on Item Pickup EventTriggers when the player picks up a Nexo item
目標4
- Nexo Break Customblock ObjectiveAn objective to break Nexo custom blocks
- Nexo Break Furniture ObjectiveAn objective to break Nexo furniture
- Nexo Place Customblock ObjectiveAn objective to place Nexo custom blocks
- Nexo Place Furniture ObjectiveAn objective to place Nexo furniture
ファクト8
- Nexo Break Time FactTicks this player needs to break the Nexo block they are looking at
- Nexo Furniture Light State FactWhether the Nexo furniture the player looks at is lit
- Nexo Holding Item FactWhether the player is holding a Nexo item
- Nexo Item Count FactHow many of a Nexo item the player carries
- Nexo Item Has Mechanic FactWhether the held Nexo item uses a given mechanic
- Nexo Looking at Block FactWhether the player is looking at a Nexo custom block
- Nexo Looking at Furniture FactWhether the player is looking at Nexo furniture
- Nexo Standing on Block FactWhether the player is standing on a Nexo custom block
変数8
- Nexo Furniture Property VariableA property of the Nexo furniture the player is looking at
- Nexo Item in Hand ID VariableThe Nexo ID of the item the player holds
- Nexo Item Property VariableA property of the Nexo item the player holds
- Nexo Looking at Block ID VariableThe Nexo ID of the block the player is looking at
- Nexo Looking at Furniture ID VariableThe Nexo ID of the furniture the player is looking at
- Nexo Registry Ids VariableThe list of IDs Nexo has loaded
- Nexo Standing on Block ID VariableThe Nexo ID of the block the player stands on
- Nexo Tag Items VariableThe Nexo items carrying a given tag
サウンド1
- Nexo SoundNexo Sound
トラブルシューティング
拡張機能がパネルに表示されない。 Nexo がインストールされていないか、有効になっていません。すべてのエントリが Nexo の API を呼び出すため、プラグインがないと拡張機能は読み込まれません。
イベントがまったく発火しない。 Nexo のアイテム ID を、正確に指定してください(ruby_ore)。空の ID はすべてに一致します。location を入力した場合は、そのブロック位置だけが一致します。別のプラグインによってキャンセルされたイベントは、無視されます。家具の場合、betterModelId が、家具の bettermodel_id と一致していないと、イベントはブロックされます。
目標が進まない。 プレイヤーがリンクされたクエストをアクティブにしていて、fact が設定されている必要があります。各ブロック位置は、プレイヤーごとに 1 回しかカウントされません。
レジストリやタグの変数が空になる。 Nexo は、バックグラウンドでアイテムを読み込みます。これらの変数は、Nexo の読み込みが完了するまで何も返さないため、サーバーの起動中には読み取らないでください。
ファクトが常に 0 を返す。 アイテムやブロックが、Nexo のものではありません。ブロックのファクトは、range ブロック(デフォルトは 5)以内の最初のブロックをチェックします。破壊時間のファクトは、対象のブロックが Nexo によって壊せない場合、0 を返します。メカニックのファクトには、Nexo のメカニック ID が正確に必要です。
Give Item が何も与えない。 itemId が Nexo に認識されていないため、アイテムが作られません。入りきらない分は、dropOverflow がオフでない限り、プレイヤーの足元にドロップされます。
関連する拡張機能
- ItemsAdder と Craft Engine — 他のカスタムコンテンツプラグイン向けの、同じ連携。