• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

NPCMod and Addons

Been playing this game for years but only recently got into modding it, and I just wanted to say that the work you guys have done with this mod is incredible! ❤️

I was wondering if there is perhaps a way to set it up so that NPCs can spawn with their faction randomly chosen between a selection of values (without having to make new entities)? I've been using khzmusik's lovely Civilians add-on, and I thought it'd make for interesting situations if the player couldn't immediately tell whether they will be friendly or hostile on approach.

I tried <property name="Faction" value="whiteriver,bandits" /> , thinking that would work (still very new to all this XML/XPath stuff), but it just made them not spawn and give a null reference error in the console instead. 

 
has there been any work to make this work with Undead Legacy?  this would be a great pairing.

Thanks for reading
no, not compatible at this time

Been playing this game for years but only recently got into modding it, and I just wanted to say that the work you guys have done with this mod is incredible! ❤️

I was wondering if there is perhaps a way to set it up so that NPCs can spawn with their faction randomly chosen between a selection of values (without having to make new entities)? I've been using khzmusik's lovely Civilians add-on, and I thought it'd make for interesting situations if the player couldn't immediately tell whether they will be friendly or hostile on approach.

I tried <property name="Faction" value="whiteriver,bandits" /> , thinking that would work (still very new to all this XML/XPath stuff), but it just made them not spawn and give a null reference error in the console instead. 
only accepts one faction value

 
Been playing this game for years but only recently got into modding it, and I just wanted to say that the work you guys have done with this mod is incredible! ❤️

I was wondering if there is perhaps a way to set it up so that NPCs can spawn with their faction randomly chosen between a selection of values (without having to make new entities)? I've been using khzmusik's lovely Civilians add-on, and I thought it'd make for interesting situations if the player couldn't immediately tell whether they will be friendly or hostile on approach.

I tried <property name="Faction" value="whiteriver,bandits" /> , thinking that would work (still very new to all this XML/XPath stuff), but it just made them not spawn and give a null reference error in the console instead. 


Each entity can have only one faction, that property does not accept a list.

What you want can be done, but it's not easy. It would involve creating new entity classes for every single NPC you want duplicated (including weapon variations), and then adding those NPCs to spawn in the game.

Let's say you wanted to make unfriendly versions of my "Male Cowboy" civilian NPC. I am going to assume you want them to be of the "bandits" faction (not one of the other unfriendly factions like "whisperers").

The first thing to do is to make bandit versions of the character and weapon type. Example:

<entity_class name="npcBanditMaleCowboyKhzClub" extends="npcMaleCowboyKhzClub">
<property name="Tags" value="entity,male,npc,melee,bandit" />
<property name="Faction" value="bandits" />
</entity_class>
<entity_class name="npcBanditMaleCowboyKhzKnife" extends="npcMaleCowboyKhzKnife">
<property name="Tags" value="entity,male,npc,melee,bandit" />
<property name="Faction" value="bandits" />
</entity_class>
<!-- ...etc. for all weapon types -->




The "Tags" property doesn't extend so you need to specify it, and you need to change the "Faction" property value to whatever faction you want the NPCs to be. I'm pretty sure that's all you need to change to get things working.

The next step is to get them to spawn into the world. In general there are two ways NPCs can spawn:

  1. In the world, outside of POIs. This is controlled by the biome spawn groups.
  2. In NPC specific POIs. This isn't widely used yet but will be in the near future when people start making POIs that are dedicated to NPCs.
In both cases, spawning is controlled in the "entitygroups.xml" file.

For biome spawning, I suggest just copying-and-pasting the XPath that puts the NPCs into the "ZombiesAll", "ZombiesNight", and "SnowZombies" entity groups. You can mess around with other groups later once everything is working, if you want.

For POI spawning, I suggest copying the XPath that puts the NPCs into the various "npcWhiteriver" and "npcFreindly" groups, except that you should instead put them into the equivalent "npcBandits" and "npcEnemy" groups.

There is a catch: the Civilian NPCs (and in general other folks' friendly NPCs) can be interacted with and hired, and that means they can't be spawned into horde groups (wandering hordes or blood moon hordes). It's possible to modify them so they can be spawned into these groups without throwing errors, but that's more complicated. I can tell you how to do that if you want.

Hope that helps.

FWIW, I do plan to make a "Rogues" pack that has more "normal looking" unfriendly NPCs. They will still be distinct, but perhaps not so obviously "bad" as other NPC bandit packs. (There will also be others that are more obviously "bad" though.) I still have a lot more to do before I get to that - mainly making NPC POIs - but it's on the roadmap.

 
Last edited by a moderator:
. . .
Hope that helps.
. . .


Thank you so much for the in-depth response, it does help a lot!

Very much looking forward to seeing the results of your other projects as well. Once I start getting into POI stuff (which I am also interested in doing), I hope to be able to craft something NPC-suitable too.

 
On 2022/1/8 at 午前5時35分, xyth said:


 現在の安定バージョン:20.4.01.03

現在の実験バージョン:利用できません



NPCModは、コミュニティの改造プロジェクトです。  最初はA16でSphereiiとXythによって開始されましたが、チームはアルファごとにサイズが大きくなり続けています。  このプロジェクトの目標は、モッダーが高機能キャラクターをモッズに追加するために再利用できる「コア」機能とテンプレートを提供することです。  2つのコアモッドレットがあり、このモッドが機能するには両方が必要です。  0-SCoreモドレットにはC#コードが含まれ、0-XNPCCoreにはxmlとテンプレートが含まれます。 

設計上、このmodは拡張パックによる拡張を促進します。  エンティティタイプに焦点を当てたキャラクターパック(たとえば、1ソルジャーパックや1スパイダーパック)は、0-XNPCCoreに新しいキャラクターを追加します。2ソルジャーファクションパックは、1ソルジャーパックに異なるファクションを追加し、同じソルジャーモデルを再利用する場合があります。   シーケンス0-、1-、-2などは、プレフィックスが小さい別のmodletに依存していることを示します。他のキャラクターモッダーは、CompoPackと呼ばれるPOI(Buildings)コレクションと同じように、このmodパックを活用する追加のキャラクターを提供することを約束しています。このコミュニティチームに参加したい場合、または貢献できる機能やキャラクターがあれば、ぜひご連絡ください。

特徴:

  • このmodには、modsコントローラーとテンプレートおよびスクリプトを含むUnityチュートリアルプロジェクト(別売り)が含まれているため、新しいキャラクターを簡単に作成できます。
  • NPCキャラクターは、すべてのバニラキャラクター機能をサポートしています。これらには、ヒューマノイドのリギング、ルートモーションのアニメーション、車両との衝突、ぼろきれ、何百ものアニメーション化された反応(ヒット位置、足を引きずるなどを含む)、手足の斬首および流血が含まれます。 これらは、さらに多様性を提供するためにxmlで再テクスチャ化することもできます。いくつかの例外があります。特に、通常ラグドールを持たない動物には例外があります。
  • NPCは、UAIと呼ばれる新しい人工知能システムを使用します。   ゾンビAI(EAI)とは異なり、このシステムでは、考慮事項に基づいた高度なタスクとリアルタイムの意思決定が可能です。  NPCは攻撃、実行、略奪、追跡、最適化された武器範囲へのバックアップを行う必要がありますか?  すべてのタスクと考慮事項。
  • すべてのPOIボリュームプロパティを尊重し、POIで寝台車として非常にうまく機能します。 
  • 血の月を攻撃するように設定できます!
  • xmlを編集するだけで、バニラまたはカスタム武器でスポーンします。
  • 雇うことができ、忠実な仲間になり、あなたの冒険と挑戦を共有することができます。
  • 雇われたNPCはフォローして滞在するように命じることができ、略奪や警備などの新機能が間もなく登場します。
  • デュークスは受け入れませんが、動物を雇うこともできます。  肉を試してみてください。
  • NPCには派閥があります。あなたのような人もいれば、そうでない人もいます。  盗賊に注意してください!
  • 敵対的なNPCには追加のAIがあるため、ゾンビができる以上にあなたを追い詰めるでしょう、警告してください!
  • NPCを失うことはもうありません。  あなたが死んだとき、彼らは立ち往生したり、遠すぎたり、構成されている場合はあなたの寝袋にテレポートします。 
  • 彼らはあなたを歩いて追いかけ、あなたが車に乗り込むと、あなたが車を降りると隠れて再び現れます。
  • 彼らは安全なときに自分自身を癒すことができ、他の人を癒して修復することができるキャラクターのためのメディックパッケージがあります。
  • メンテナンスが少なく、これらの人々に餌をやったり水をやったりする必要はありませんが、それは後で利用できる可能性のある機能です。
  • チャットや放浪中のリアルなアイドルアニメーションが追加され、没入感が向上しました。  初期リリース後にさらに多くが追加されます。 
  • プレイヤー/リーダーがしゃがむとき、NPCもしゃがみます
  • スケーラブルなモジュラーアーキテクチャであるため、キャラクターの拡張と新しい動作ははるかに簡単です。
  • NPCごとにカスタマイズ可能なパスが利用可能になりますが、実装の詳細はまだ利用できません。  乞うご期待。
NPCコントロール:

雇われたNPCをグループとして制御する巧妙なプレイヤーコマンドがあります。作成メニューにNPCと入力すると、これらのコマンドを作成できます。

             チュートリアルビデオ:    NPCMod:プレイヤーアクションによる雇用されたNPCの制御-YouTube
現在3つのコマンドがあります:

  • モード:このコマンドは、さまざまな制御モードを切り替えます。
  • ハンティング(デフォルト):このモードでは、NPCは、自分自身または自分に対して敵対的であると見なしたものを自動的にターゲットにします。滞在してフォローする以外に、彼らの行動を制御することはできません。
  • フルコントロール:このモードでは、NPCは自動的に何もターゲットにしません。すべての敵対者が脅威であるかのように動作し、怪我をした場合、または脅威の1つを攻撃し始めた場合にのみ関与します。
  • 停止:このコマンドはトグルであり、フルコントロールと組み合わせると、NPCがターゲットへの攻撃を停止または再開します。これは、あなたやあなたのNPCが遭遇を生き残れないと感じ、遭遇を完全に回避できるように彼らに単にあなたをフォローしてもらいたい場合に特に役立ちます。また、ターゲットを使わずに旅行したい場合にも便利です。
  • ヘルプ:このコマンドは、フルコントロールを使用していて、NPCが20メートル以内のターゲットと交戦する場合に役立ちます。遠隔武器がない場合は、ダメージを受けたり敵を攻撃したりすることなく、NPCに助けてもらうことができます。


FAQの

  • CreaturePacksとNPCmodはどうなりましたか?  


    それらは統合され、結合され、廃止されました。コードをゲームでネイティブにロードできるようになったので、これら2つを分離しておく理由はありませんでした。このバージョンは、ロードと保守が簡単で、どちらよりも多くの機能を備えています。

[*]EACを有効にしてこれを実行できますか?いいえ、EACをオフにする必要があります。

[*]自分のキャラクターを追加する方法を学ぶことはできますか?  

  • 確かに、キャラクターを作ることを学ぶのはかつてないほど簡単でした。プロセスを簡素化するために多くの作業が行われ、スクリプトでほとんどの作業を実行できるようになりました。支援できるビデオがあります。

[*]より多くの機能について素晴らしいアイデアがありますが、どこで提案できますか?

  • このスレッドは機能するか、NPC-modチャネルのGuppyの改造フォーラムで動作します

[*]バグを見つけました!どこに投稿しますか?

  • 以下にあるバグフォームで要求された情報を提供し、ここに投稿するか、npc-mod-bugレポートの下のGuppyの改造Discordに投稿してください

[*]これは専用サーバーで機能しますか?

  • 現在のバージョンはdediで十分にテストされているはずです。すべてのmod、コア、および拡張パックは、DediフォルダーとすべてのクライアントModsフォルダーの両方にロードする必要があります。

[*]良い質問がありますか?多分あなたはそれがすぐにここにリストされるのを見るでしょう!





既知の問題点: 

  • スコアまたはNPCCoreを更新する場合は、常に新しいゲームを使用してください。  既存のゲームのコアを更新すると、奇妙なことが起こる可能性があります。 
  • UIには作業が必要であり、テキストが重複しています。Sirillionはそれを更新することを志願しました。  
  • 雇われたNPCは攻撃的な動物のリロイジェンキンスかもしれません、より多くのコントロールを得るためにコマンドインターフェースを使用してください。
  • 芝生のクローラーの近接NPC検出は、遠隔攻撃ほど良くはありませんが、機能します。  
  • 遠隔NPCは、他の場合と同様にヒットできない場合があります。  パターンが表示された場合はお知らせください。 デバフが蓄積している可能性があります。 
  • これは非常に新しいmodであり、まだ発見されていないバグを予期しているので、それらを報告してください。


バグ報告フォーム

概要:(バグの簡単な説明)

ゲームバージョン:(A20 bxxx)

プラットフォーム:(PC / Mac)

ビデオ設定:(低/中/高/超/カスタム(カスタムには多くの組み合わせがあるため、バグに関連すると思われる設定をリストしてください))

ゲームモード:(MPホスト/MPクライアント/SP / Dedi上のクライアント)

新しいゲームを始めましたか?(はい/いいえ)注:新しいゲームで問題を再テストするまで、バグレポートを送信しないでください。  

ファイルを検証しましたか?(はい・いいえ)

他のMODを使用していますか?(はい/いいえ)注:新しいゲームにMODをロードせずに再テストしてください。

EACオフ?注:オフにする必要があります。

バグの説明:

バグを再現するための詳細な手順:

実際の結果:(何が起こっているかの説明)

期待される結果:(発生すると予想されること)

インストール:

EACをオフにしてください!

オプション1:  以下のリンクを使用して0-XNPCCore.zipとSCoreをダウンロードします。ダウンロードが0-XNPCCore.zipのような.zipまたは.7zファイルの場合は、その圧縮ファイルを解凍し、その中にあるmodをModsフォルダーに配置します。  SCoreは圧縮されていないため、そのフォルダーを直接ダウンロードします。  次に、必要な数の拡張パックをロードし、必要に応じてファイルを解凍します。  専用サーバーを使用している場合は、両方のCoremodletをdediserverModsフォルダーにロードする必要もあります。したがって、クライアント側のModsフォルダーとサーバーのModsフォルダーの両方にコピーします。

オプション2:  modlauncherを使用して2つのコアをロードします。これがあなたが始めるのに役立つビデオです:  

Please tell me how to fix it. a20 New Bug Drink Fighters https://youtu.be/bx5s1XlhuCs

 
Please tell me how to fix it. a20 New Bug Drink Fighters https://youtu.be/bx5s1XlhuCs
The Wasteland Mod is also being used and the Wasteland Raiders are holding water glasses. I wonder what other selection of mods you are using.

This is not something specifically related to the NPCMod and Wasteland Mod as they work very well together. I wonder if something else you have added to the Mods folder is the culprit. Maybe you can remove other mods one by one to find any conflict. That is the best way to find the cause and fix it.

 
Slowly building content for the Oakraven Modpack with a nice selection of NPCMod Zombie packs and Darkstardragon's Survivorz. It'll be quite a nice expansion to regular gameplay and more like a DLC than anything.

20220616034221_1.jpg

 
Last edited:
Is there an active tutorial on how to do this with animals? I find it amazingly strange that all the video tutorials I have watch state they might show you how its done but they never do. I also watch xyths tutorials and he goes over how to do it with NPC humans but never with animals .. is this because starvation mod has a release and they dont want everyone to have that ability?  I also went to Xyths git hub and the project files have been removed with the exception of the scripts... why has this happened? again did someone complain because they want their mods to be exclusive? I am not understanding. Personally I would love to have the ability to make these changes but i would never ever play on someone elses sever using the other mods (starvation mods or anything else out there) just a preference. I appreciate what modders have done but I prefer to learn and make my own. Any help would be greatly appreciated .. thank you

 
Is there an active tutorial on how to do this with animals? I find it amazingly strange that all the video tutorials I have watch state they might show you how its done but they never do. I also watch xyths tutorials and he goes over how to do it with NPC humans but never with animals .. is this because starvation mod has a release and they dont want everyone to have that ability?  I also went to Xyths git hub and the project files have been removed with the exception of the scripts... why has this happened? again did someone complain because they want their mods to be exclusive? I am not understanding. Personally I would love to have the ability to make these changes but i would never ever play on someone elses sever using the other mods (starvation mods or anything else out there) just a preference. I appreciate what modders have done but I prefer to learn and make my own. Any help would be greatly appreciated .. thank you
not sure what the reference to starvation means, it hasnt been updated in at a bunch of alphas and has nothing to do with npc mod

as for videos that are applicable to getting animal type entities in game xyths legacy to mecanim video(s) go through the process and this one i did a long time ago would also help





 
5 hours ago, drkstardragon said:

not sure what the reference to starvation means, it hasnt been updated in at a bunch of alphas and has nothing to do with npc mod

as for videos that are applicable to getting animal type entities in game xyths legacy to mecanim video(s) go through the process and this one i did a long time ago would also help

thanks so much for the help on this... I think I have it all figured out.. I just need more insight on the tags but Im going to watch Xyths video again to get that part down.. Thanks again

 
That should not happen often.  The SCore code attempts to reduce the occurrence.  The charactercontroller collider for some characters might be large and pathing gets confused.   No doubt this will be improved in A21 and having access to more NPC code.

 
I thought maybe ocbmaurices crooked deco mod might be causing the issue since it changes the tree's appearance (not sure if changes the meshes ) but I have noticed this alot lately.

 
Could be another mod like you mentioned.   You can test with just the NPCCore and SCore mods to be sure.

 
A small modlet for the NPCMod Addon collection.

2-SummonFoxFriend

https://github.com/arramus/A20-NPCMod/raw/main/2-SummonFoxFriend.zip

This modlet allows players to purchase a Fox Friend from the Trader in the secret stash area. It will be accessible at low level Barter Skill but more accessible as the Skill increases.

It works like this:

1. Purchase your 'puppy' from the Trader in the Secret Stash area. At Skill level 3 the cost was 1020 Dukes.

20220627001122_1.jpg

2. Read the 'quest'.

20220626021444_1.jpg

3. Accept the quest after moving to a more open area.

20220626021925_1.jpg

4. A Fox Friend will appear very close to you and 20 meat will be placed in your inventory. If there are hostiles in the area, it will run away.

20220626021937_1.jpg

5. Your last action is to 'tame' the Fox Friend to become your companion by feeding the Fox Friend the 20 meat.

20220626022128_1.jpg

They work very well together in a pack. ^^

20220626233732_1.jpg

This modlet serves a few purposes:

- Very easy to edit and customise for other NPCs.

- Provides a way to 'respawn' any lost hired NPCs if Admin are not around and going to look for a replacement in the Biomes is not an option.

- Gives an additional dynamic to how we can integrate the NPCs in a more controllable manner.

- Having a pack of foxes is like unlimited ammo in a SMG and pretty much hold the hostile in place.

With the fox's looting function turned on as well, your investment will continue 'giving'.

 
Arramus - could we have a Dire Wolf version? - just for a little added meanness towards our Zombie friends? 😉

 
Arramus - could we have a Dire Wolf version? - just for a little added meanness towards our Zombie friends? 😉
npc mod is not likely to see any more additions this alpha, more animal pets will be added in a21 as there seems to be a shortage of those types of companions in a20 ie. will revisit the dogs pack that was in a19 but missing from this version

 
Back
Top