MythicMobs NPC
概要
MythicMobs NPC は、MythicMobs のモブを、TypeWriter の NPC に変えます。モブ、そのモデル、スキルの設計はこれまでどおり MythicMobs で行い、その後、Web パネルから、NPC definition(NPC が何であるか)と NPC instance(どこに立ち、誰に見えるか)として、ワールドに配置します。
NPC は、頭上に名前を表示したり、クエストマーカーを表示したり、プレイヤーが右クリックしたときにダイアログを開始したり、アクションで非表示や表示にされたり、アニメーションを再生したり、シネマティックに登場したりできます。BetterModel または ModelEngine のモデルに対応しています。
この拡張機能は Paper で動作します。デフォルトでは、各プレイヤーが NPC の自分専用のコピーを持ちます(ticking はオフ)。そのため、1 人のプレイヤーのシネマティックや非表示アクションが、他のプレイヤーに影響することはありません。歩き回れる、サーバー側の実際のモブにするには、ticking をオンにします。
機能
- NPC definition と instance — MythicMob の NPC を一度定義すれば、共有、プレイヤーごと、グループごとのオーディエンスで、好きなだけ配置できます。
- ネームタグとクエストマーカー — 浮かぶ名前と、NPC がプレイヤーに対して目標やダイアログを持っているときの、
❗、❓、💬のマーカー。 - インタラクションイベント — 右クリックでダイアログを開始します(スニークによる絞り込み可)。どちらの方向の打撃にも対応するイベントもあります。
- クエスト目標 — NPC とやり取りする、MythicMobs のモブからアイテムを入手する、またはモブとのやり取りの回数を数える。
- ファクトと変数 — 存在、距離、可視性、体力、脅威テーブル、アニメーション、レベル、パワー、派閥、スタンス、そして任意の MythicMobs 変数。
- 表示、非表示、アニメーション — NPC を表示または非表示にし、ModelEngine や BetterModel のアニメーションを再生または停止するアクション。
- シネマティック — NPC に注目するカメラ、モデルのボーンに取り付けたカメラ、記録されたテープで動く NPC、指定位置で発動する MythicMobs のスキル。
- カメラと注視の拘束 — インタラクション中、プレイヤーに NPC、または指定した種類の最も近いモブを見させます。
- スタンス — 昼と夜の待機と歩行のスタンスに加え、インタラクション、攻撃などのスタンス。ModelEngine または BetterModel を通じて動作します。
インストール
- サーバーに MythicMobs と PacketEvents をインストールします。
- TypeWriter で、公式の Entity、Basic、Quest、Road Network の拡張機能がインストールされていることを確認します。このビルドは、Quest と Road Network を依存関係として宣言し、実行時に Entity と Basic の拡張機能を使います。
- 任意: 3D モデルを使うには、BetterModel または ModelEngine をインストールします。BetterModel が先に確認され、BetterModel がない場合は ModelEngine が使われます。統合版のプレイヤーにボーンカメラを見せる必要がある場合は、Geyser をインストールします。
- ストアから拡張機能を入手し(上のサマリーパネルのボタンを参照)、JAR を
plugins/Typewriter/extensions/に置きます。 - サーバーを再起動します。コンソールに
MythicmobsNPCExtension has been successfully initializedと表示されます。 - MythicMobs でモブを作成します(モデルもそこで関連付けます)。拡張機能はモブをスポーンして表示しますが、モデルの作成や変更は行いません。
はじめに
プレイヤーが右クリックするとダイアログを開始する鍛冶屋を配置します。
- MythicMobs で、内部名が
Blacksmithのモブを作成し(モデルを使う場合は、それも設定して)、MythicMobs をリロードします。 - TypeWriter の Web パネルで static ページを開き、MythicMob NPC Definition を追加します。
displayNameに、頭上に表示する名前を、mobTypeにBlacksmithを設定します。 - MythicMob NPC Instance を追加します。
definitionを、その definition にリンクし、spawnLocation(向きを含む)を、NPC が立つ場所に設定します。 - MythicMob NPC Interact Event を追加します。
definitionを同じ definition にリンクし、shiftTypeはANYのままにします。 - その
triggersに、sequence ページにあるダイアログエントリ(たとえば、セリフのダイアログ)をリンクします。 - パブリッシュして、NPC を右クリックします。話しかけられるプレイヤーには、NPC の上に
💬マーカーが表示されます。
クエストの目標にするには、entity に definition を設定した Interact MythicMob NPC Objective を追加します。マーカーが ❓(クエストが追跡中の場合は ❗)になり、NPC に向かう経路の表示が現れます。
静的な NPC では ticking をオフのままにします。各プレイヤーが自分専用のコピーを見ることになり、これはシネマティックやプレイヤーごとの可視性に必要です。モブがサーバー上で動いたり戦ったりしなければならない場合にのみオンにし、AI が有効なままになるよう、clientSideRadius を 0 より大きく設定してください。
仕組み
definition は、NPC が何であるかを保持します。モブタイプ、名前、ネームタグのオプション、ticking モード、すべての instance に適用されるエンティティデータです。instance は、立っている場所、自身のエンティティデータ、任意の activity(たとえば Road Network の経路)、そして group を保持します。
ファクト、変数、表示と非表示のアクション、カメラのエントリはすべて、instance を参照します。これらは、instance のスポーン地点から検索半径内(デフォルトは 5 ブロック。ターゲットの radius で設定)にある、definition のモブタイプの稼働中のモブを探します。
設定
エントリのフィールドではないテキストとオフセットは、TypeWriter のスニペットです。plugins/Typewriter/snippets で編集します。
| スニペット | デフォルト | 用途 |
|---|---|---|
objective.entity.indicator.tracked | <gold><b>❗ | NPC が、追跡中のクエストの対象であるときのマーカー。 |
objective.entity.indicator.normal | <blue><b>❓ | NPC が、アクティブな目標の対象であるときのマーカー。 |
objective.entity.indicator.dialogue | <white><b>💬 | NPC に、利用可能なインタラクションがあるときのマーカー。 |
entity.nameplate | <other>、続いて <reset><display_name> | ネームタグのレイアウト。<other> は、エンティティデータの行です。 |
entity.name.color | #40000000 | ネームタグとマーカーの背景色。 |
quest.objective.interact_mythicmob_npc | Interact with <entity> | インタラクト目標のデフォルトのテキスト。 |
advancedQuest.display | <display> (<current>/<required>)(グレー系) | カウント系の目標(ルート、スキル)の進行中の行。プレースホルダー: <display>(目標の display テキスト)、<current>、<required>。このキーは他の BTC の目標系エクステンションと共有されているため、1 回の編集ですべてのスタイルが変わります。 |
advancedQuest.completed | ✔、続いて取り消し線付きの <display> と (<current>/<required>) | amount に達したときの同じ行。プレースホルダーも同じです。 |
mythicmob_npc_look_at_interaction_bound.look_back_delay | 500 | 注視の拘束がプレイヤーを元に向き直らせるまでに、プレイヤーが目をそらせるミリ秒数。 |
mythicmob_type_look_at_interaction_bound.look_back_delay | 500 | 同上。モブタイプによる注視の拘束の場合。 |
エントリ
38 件のエントリー(拡張機能のソースから生成)。
アクション4
- Mythicmob NPC HideHide a MythicMob NPC
- Mythicmob NPC Play AnimationPlays a ModelEngine animation on a MythicMob NPC
- Mythicmob NPC ShowShow a MythicMob NPC
- Mythicmob NPC Stop AnimationStops a ModelEngine animation on a MythicMob NPC
イベント3
- Mythicmob NPC HitWhen a MythicMob NPC is hit or hits a player
- Mythicmob NPC InteractWhen the player clicks on a MythicMob NPC
- On Mythic Mob LootWhen a player loots an item from a MythicMob
目標3
- Interact Mythicmob NPC ObjectiveInteract with a MythicMob NPC
- Mythicmob Loot ObjectiveAn objective to loot specific items from MythicMobs mobs
- Mythicmob Skill ObjectiveMythicMob Skill Objective
ファクト6
- Mythicmob NPC Animation Playing FactReturns 1 when the specified ModelEngine animation is playing
- Mythicmob NPC Distance FactReturns the distance between the player and the MythicMobs NPC
- Mythicmob NPC Health Percentage FactReturns the NPC's current health percentage
- Mythicmob NPC Presence FactReturns 1 when the MythicMobs NPC is currently spawned
- Mythicmob NPC Threat Table Size FactReturns the size of the MythicMobs threat table
- Mythicmob NPC Visibility FactReturns 1 if the player can currently see the MythicMobs NPC
シネマティック4
- Mythicmob NPC Bone Camera CinematicAttach the cinematic camera to a bone of a MythicMob NPC's model
- Mythicmob NPC Camera CinematicFocus on a MythicMob NPC during a cinematic
- Mythicmob NPC Entity CinematicUse an animated MythicMob NPC in a cinematic
- Mythicmob NPC Skill CinematicTrigger a MythicSkill at a specific position during a cinematic
エンティティ2
- Mythicmob NPC DefinitionA MythicMob that can be used as an NPC
- Mythicmob NPC InstanceAn instance of a MythicMob NPC
エンティティデータ4
- Modelengine Stance DataModelEngine stance configuration for day/night animations
- Mythicmob NPC AttachmentReplace a bone of a MythicMob NPC model with one from another model
- Mythicmob NPC Bone VisibilityControl MythicMob NPC bone visibility with criteria
- Mythicmob Speed DataChange the walking speed of a MythicMob
インタラクション境界3
- Mythicmob Look at Interaction BoundAn interaction which forces the player to look at the nearest MythicMob of a specific type
- Mythicmob NPC Camera BoundA camera bound that focuses on a MythicMob NPC with custom focus offset
- Mythicmob NPC Look at Interaction BoundAn interaction which forces the player to look at a MythicMob NPC
変数9
- Mythicmob NPC Active Animations VariableReturns the active ModelEngine animations for the MythicMobs NPC
- Mythicmob NPC Faction VariableReturns the MythicMobs NPC faction
- Mythicmob NPC Health Percentage VariableReturns the current health percentage of the MythicMobs NPC
- Mythicmob NPC Health VariableReturns the current health of the MythicMobs NPC
- Mythicmob NPC Level VariableReturns the MythicMobs NPC level
- Mythicmob NPC Max Health VariableReturns the maximum health of the MythicMobs NPC
- Mythicmob NPC Power VariableReturns the MythicMobs NPC power
- Mythicmob NPC Stance VariableReturns the current stance applied to the MythicMobs NPC
- Mythicmob NPC VariableReads a MythicMobs variable from the active NPC
トラブルシューティング
NPC がまったく表示されない。 mobType が MythicMobs のモブ名でない場合、またはスポーンに失敗した場合、コンソールに Could not spawn MythicMob NPC '<type>' at <location> と出力されます。mobType は、MythicMobs と同じ大文字と小文字の区別での、モブの内部名です。MythicMobs がそのモブを読み込んでいること、spawnLocation のチャンクが読み込めることを確認してください。
拡張機能が、MythicMobs がないと警告する。 起動時に、ログに MythicMobs plugin not found! This extension requires MythicMobs to function properly. と出ます。MythicMobs をインストールして、再起動してください。
ファクトと変数が常にデフォルト値を返す。 これらは、instance のスポーン地点の近くにある稼働中のモブを解決します。NPC が radius(デフォルトは 5 ブロック)より遠くに移動した場合、またはモブタイプが異なる場合は、何も一致せず、ファクトは 0 を返します。target の radius を大きくしてください。
クリックしてもダイアログが始まらない。 インタラクトイベントは、MythicMob NPC Instance によって配置された NPC にのみ反応し、definition は、その instance の definition でなければなりません。interactionType はクリックの種類を選びます: RIGHT_CLICK、LEFT_CLICK、ALL。バージョン 4.9.1 より前は右クリックしか処理されず、Paper 26.x ではその右クリックさえ処理されませんでした。拡張機能を更新してください。
プレイヤー同士が NPC を共有しない。 ticking がオフで、instance に group がない場合、すべてのプレイヤーが自分専用のコピーを持つため、1 人のプレイヤーの非表示アクションやシネマティックは、他の人に影響しません。パーティやギルド内で NPC を共有するには、instance に group を設定してください。
ボーンが非表示にならない、またはアタッチされない。 Bone Visibility Data と Attachment Data は、モデルが存在した時点で、またリスポーンのたびに、ticking のオン・オフを問わずモデルに適用されます。モデルが知らないボーン名またはモデル名はスキップされ、コンソールに記録されます。名前をモデルと照らし合わせて確認してください。
ボーンカメラに何も映らない、またはプレイヤーが通常の視点のままになる。 boneName がモデルに存在し、そのプレイヤーに対してモブがスポーンされている必要があります。Entity Cinematic では、カメラがそのモブを正確に追うように、entityCinematic を使います。カメラはプレイヤーの目の位置から始まり、モデルが見つかり次第、ボーンにスナップします。
プレイヤーやカメラが NPC に近づくとモデルがちらつく。 原因は ModelEngine のカリングです。ModelEngine はモデルの足元を基準に、モデルがプレイヤーの背後にあるか(backcull)、ブロックに隠れているか(blockedcull)を判定するため、近距離では誤ってモデルを非表示にし、また表示し直します。バージョン 4.9.1 以降、拡張機能は ModelEngine モデルを検出した時点ですべての NPC でこの 2 つのカリングを無効にするため、設定は不要です。それでもちらつく場合は、コンソールに ModelEngine exposes no back/blocked cull setter という警告が出ていないか確認してください。これは、お使いの ModelEngine のバージョンでは拡張機能がこの設定を変更できないことを意味します。その場合は、MythicMobs の mob のスキルで model メカニクスの後に cullconfig{backcull=false;blockedcull=false} @self ~onSpawn を追加し、NPC を再スポーンさせてください。BetterModel のモデルは影響を受けません。
関連する拡張機能
- MythicMobs — 通常の MythicMobs のモブ向けの、スポーン、スキル、討伐のエントリ。
- BetterModel — BetterModel のモデルを NPC として使います。シネマティックの方式は同じです。