Jump to content

A19 NPCs DMT Mod


xyth

Recommended Posts

Dumb question but we believe we have followed the DMT install instructions and then downloaded the pre-reqs for this mod, but all of the NPCs are invisible when spawned in game.  We hear them and see the interface to speak with them or kill them but aren't able to actually see or interact with them.  What is the obvious thing(s) we are missing?  Thank you in advance for the help.

 

7d2d A19.2

DMT 2.2.7569.26209

0-SpherellCore, Sherell NPC Dialog Windows, 0-CreaturePackHumans, 

no other mods attempted before

clean install of latest release downloaded

 

Attached is screenshot of DMT compile without errors and what is chosen.

 

Capture.JPG

Link to comment
Share on other sites

2 hours ago, Lostyouthkhat said:

Got an idea why german shephards still arent visible and the wolfhound doesnt have a conversation option?

Yup.  I pushed the fix for the Wolfhound.  The fix for the German Shepherd requires an update to SphereII's core.  He is waiting for the final changes to the core that is being tested and used in WinterWeen, then he will push that to the public version of the core.  Until then, dont try to spawn it.

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...

Hey Xyth hope your keeping well.

 

I just reinstalled everything and started playing again. Thanks for adding in some new NPCs.

 

Got a small issue though,off behavior from NPCs.And i only notice this when they are hired.....They will not aggro any zombies(vanilla tested). They will only aggro if they have first been attacked by a zombie. Even after that,maybe a few minutes of playing later,and they forget they are supposed to fight them.Zombies can be close,and i the player attacking them,yet NPCs who are hired simply ignore their presence until hit by a zombie.

 

Tested on almost all npc s that you can hire. While they are not hired they seem ok(i think) can hear them shooting in the distance.

 

I didnt edit any .xml file. I then tried to edit the faction of all NPCs to whitriver from "redteam" etc etc.Still didnt work.

On Alpha 19.3 single player. Also tested on Alpha 19.2 and same issue.

Edited by Redarmy45 (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...
6 hours ago, Redarmy45 said:

Hey i managed to tweak NPCs and make them aggressive initially to zeds via the entity classes xml.

 

Things seem quiet Xyth ,is this mod finished or will there be future updates?

 

Can you post exactly what you did to fix this? I'm working on it myself.

 

And I hope it's not finished, I'm just getting back into using it. :)

Link to comment
Share on other sites

5 hours ago, khzmusik said:

 

Can you post exactly what you did to fix this? I'm working on it myself.

 

And I hope it's not finished, I'm just getting back into using it. :)

Sure,head on into the NPC PACK HUMANS folderopen up entity classes.XML with Notepad++

 

There will be a few instances of the following lines:

 

<property name="AITarget-1" value=
            <property name="AITarget-2" value=
            <property name="AITarget-3" value=
            <property name="AITarget-4" value=

 

you need to edit them to read this:

 

<property name="AITarget-1" value="SetAsTargetNearestEnemySDX, Mods" data="class=EntityAlive,80"/>  
            <property name="AITarget-2" value="SetAsTargetIfLeaderAttackedSDX, Mods" data="class=EntityAlive"/> 
            <property name="AITarget-3" value="SetAsTargetNearestEnemySDX, Mods" data="class=EntityAlive,80"/> 
            <property name="AITarget-4" value="SetAsTargetIfHurtSDX, Mods" data="class=EntityAlive"/>

 

This essentially makes NPC prioritize setting a nearest target first and attacking,instead of its default behavior which used to read <property name="AITarget-1" value="SetAsTargetIfHurtSDX, Mods" data="class=EntityAlive"/>

 

Which caused them to need to be attacked first in order to aggro.Problem with this was that NPC aggro was cooling down after a while and they needed top be attacked again in order to become aggro.

 

Value 3 and 1 are the same and probably do not need to both be there but i find it ensures NPCs will carry out the attack. Xyth can clean it up and tell you how better to impliment it but for now this works

 

 

Link to comment
Share on other sites

35 minutes ago, Redarmy45 said:

you need to edit them to read this:

 

<property name="AITarget-1" value="SetAsTargetNearestEnemySDX, Mods" data="class=EntityAlive,80"/>  
            <property name="AITarget-2" value="SetAsTargetIfLeaderAttackedSDX, Mods" data="class=EntityAlive"/> 
            <property name="AITarget-3" value="SetAsTargetNearestEnemySDX, Mods" data="class=EntityAlive,80"/> 
            <property name="AITarget-4" value="SetAsTargetIfHurtSDX, Mods" data="class=EntityAlive"/>

 

 

Interesting. I'll have to dig deeper to figure out why that works.

 

I spent my entire day neck-deep in the C# code, figuring out exactly how this all worked. And from what I can tell, the number ("N") in "AITarget-N" (and also "AITask-N") is the priority. Higher priorities will take precedence over lower priorities.

 

From comments in the code, the blank task is there to ensure that the unspecified "AITarget-N" properties aren't inherited from the parent XML class.

 

So, your change is to make the "SetAsTargetIfHurtSDX" task take precedence over the "SetAsTargetNearestEnemySDX" and "SetAsTargetIfLeaderAttackedSDX" tasks. (You also inherited all the "AITarget-N" properties where "N" was higher than 4, but I don't think there are any in the base class, so I don't think that makes a difference.)

 

At least that's what I think, from looking at the decompiled C# code, but it's not exactly clear. I still have a whole lot to learn about TFP AI, and none of it is exactly straightforward.

Link to comment
Share on other sites

21 hours ago, Redarmy45 said:

Sure,head on into the NPC PACK HUMANS folderopen up entity classes.XML with Notepad++

 

There will be a few instances of the following lines:

 

<property name="AITarget-1" value=
            <property name="AITarget-2" value=
            <property name="AITarget-3" value=
            <property name="AITarget-4" value=

 

you need to edit them to read this:

 

<property name="AITarget-1" value="SetAsTargetNearestEnemySDX, Mods" data="class=EntityAlive,80"/>  
            <property name="AITarget-2" value="SetAsTargetIfLeaderAttackedSDX, Mods" data="class=EntityAlive"/> 
            <property name="AITarget-3" value="SetAsTargetNearestEnemySDX, Mods" data="class=EntityAlive,80"/> 
            <property name="AITarget-4" value="SetAsTargetIfHurtSDX, Mods" data="class=EntityAlive"/>

 

This essentially makes NPC prioritize setting a nearest target first and attacking,instead of its default behavior which used to read <property name="AITarget-1" value="SetAsTargetIfHurtSDX, Mods" data="class=EntityAlive"/>

 

Which caused them to need to be attacked first in order to aggro.Problem with this was that NPC aggro was cooling down after a while and they needed top be attacked again in order to become aggro.

 

Value 3 and 1 are the same and probably do not need to both be there but i find it ensures NPCs will carry out the attack. Xyth can clean it up and tell you how better to impliment it but for now this works

 

 

 

I just tried this again tonight, and unfortunately, it seems to cause an even worse bug. This code breaks commands for hired NPCs, such as the "Follow" command - they simply won't do them after these changes.

 

At least, that's what I found. Are you still able to hire NPCs and get them to follow you?

Link to comment
Share on other sites

10 hours ago, khzmusik said:

 

I just tried this again tonight, and unfortunately, it seems to cause an even worse bug. This code breaks commands for hired NPCs, such as the "Follow" command - they simply won't do them after these changes.

 

At least, that's what I found. Are you still able to hire NPCs and get them to follow you?

are you up to date with all required mods? mine is working fine.They follow. only issue(not really a bug) is that they dont follow upon reloading a game,u must tell them again to follow.

Link to comment
Share on other sites

  • 2 weeks later...
On 2/15/2021 at 9:01 PM, Redarmy45 said:

are you up to date with all required mods? mine is working fine.They follow. only issue(not really a bug) is that they dont follow upon reloading a game,u must tell them again to follow.

I got another bug maybe,when I reload the game my npc act like a zombie. why(´;︵;`)

Link to comment
Share on other sites

22 hours ago, yujiansquall said:

I got another bug maybe,when I reload the game my npc act like a zombie. why(´;︵;`)

He likely got infected and is turning into a zombie.  There is a cure for that which is a rare drop.  That is in the effectspack if you loaded that.

 

Link to comment
Share on other sites

10 hours ago, MandyCMoore said:

I have a quick question. On my single player world the NPCs do fine when I hire them, but on my server they don't stay hired. We have to rehire them every time we log back in. Anyone have any suggestions for a fix? Thanks!

That bug has been reported but seem intermittent.  Its a code issue we have to resolve apparently.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...