xyth Posted February 26, 2023 Author Share Posted February 26, 2023 Minor update to the NPCCOre. It just edits xml so vanilla entities will fight back when hurt by EntityEnemySDX NPCs. Few if any modders will be impacted by this change, and it is save game safe. Also refreshed the SCore.zip found in my repo. Link to comment Share on other sites More sharing options...
Josephz Posted March 3, 2023 Share Posted March 3, 2023 How can I reuse an asset from a previous mod? ie. Myzombiemod1 has the assets Myzombiemod2 is a separate optional mod but it needs to reuse the assets from the first. I assume I need to change the model path, but I don't know what to. #@modfolder isnt working for me. Link to comment Share on other sites More sharing options...
khzmusik Posted March 4, 2023 Share Posted March 4, 2023 (edited) 5 hours ago, Josephz said: How can I reuse an asset from a previous mod? ie. Myzombiemod1 has the assets Myzombiemod2 is a separate optional mod but it needs to reuse the assets from the first. I assume I need to change the model path, but I don't know what to. #@modfolder isnt working for me. I don't know if this still works in A20, but in A19 you could use this format: #@modfolder(OTHER MOD NAME):Resources/UNITY_FILENAME.unity3d?UNITY_PREFAB_NAME So for example, if you wanted to use the Harley asset from the NPC Core mod, you could reference it like so: #@modfolder(0-XNPCCore):Resources/XythNPCs.unity3d?Quinn_X However - if you want to re-use the assets from one entity to another, you should probably just extend that entity. The "Mesh" property already extends, so you wouldn't need to provide it later. (AFAIK the "Tags" property is the only one that doesn't extend and must be provided... but there might be other properties that I don't know about.) For an example of this, see how the NPC Core "npcHarleyBMEmptyHand" entity extends the "npcHarleyEmptyHand" entity. Edited March 4, 2023 by khzmusik (see edit history) Link to comment Share on other sites More sharing options...
Josephz Posted March 4, 2023 Share Posted March 4, 2023 1 hour ago, khzmusik said: I don't know if this still works in A20, but in A19 you could use this format: #@modfolder(OTHER MOD NAME):Resources/UNITY_FILENAME.unity3d?UNITY_PREFAB_NAME So for example, if you wanted to use the Harley asset from the NPC Core mod, you could reference it like so: #@modfolder(0-XNPCCore):Resources/XythNPCs.unity3d?Quinn_X However - if you want to re-use the assets from one entity to another, you should probably just extend that entity. The "Mesh" property already extends, so you wouldn't need to provide it later. (AFAIK the "Tags" property is the only one that doesn't extend and must be provided... but there might be other properties that I don't know about.) For an example of this, see how the NPC Core "npcHarleyBMEmptyHand" entity extends the "npcHarleyEmptyHand" entity. Thanks so much ! this worked great. Just want to clarify that "mod name" is not the same as the name of the folder the mod is in. Link to comment Share on other sites More sharing options...
MandyCMoore Posted March 7, 2023 Share Posted March 7, 2023 I currently have 2 7DTD series I am working on, both of which have the NPCs & all enemies on. I want to start a series that's a little different though. In this one I only want NPCs, no zombies & such. More of a situation where let's say the zombies have died off & the only threats left are the people & of course hunger & such. Is there a way to have the NPCs spawn with zombies turned off? Thanks! Link to comment Share on other sites More sharing options...
khzmusik Posted March 7, 2023 Share Posted March 7, 2023 (edited) 2 hours ago, MandyCMoore said: I currently have 2 7DTD series I am working on, both of which have the NPCs & all enemies on. I want to start a series that's a little different though. In this one I only want NPCs, no zombies & such. More of a situation where let's say the zombies have died off & the only threats left are the people & of course hunger & such. Is there a way to have the NPCs spawn with zombies turned off? Thanks! It can be done, but it is a long process. If you're not interested in learning how to create your own modlet, and spending a couple of days (or more) to create it, then the rest of this post probably won't interest you. It's basically a two step process: Spawn human NPCs into all the entity groups used for zombies Remove the zombies from those same entity groups But there are a number of catches. The first issue is hordes (blood moon hordes, wandering hordes). The horde spawner can only spawn entities that descend from the C# EntityEnemy class. If you try to spawn other entities, the game will spam red errors in the console and nothing will spawn. There are templates in NPC Core which use a custom SCore C# class that descends from EntityEnemy. But most NPC Pack authors don't use them, because that class lacks all but the most basic features. To my knowledge, my Whisperers and Rogues and Psychos packs are the only ones that do use those templates. So you would need to put only those entities into the entity groups used for hordes. This doesn't apply to the entity groups used to spawn entities into biomes, nor to the entity groups used to spawn entities into POIs. All of those should be able to support all NPCs. I don't know if this applies to "scout" spawn groups - the ones that spawn entities in response to a screamer. And that brings us to the next catch. If you want to get rid of screamers, I think that you can replace the screamer entity in the "zombieScreamer", "zombieScreamerFeral", and "zombieScreamerRadiated" entity groups with this: <entity name="none" /> But I haven't tried it myself. It's possible that screamers are hard-coded to spawn when the heat map reaches a certain point. (Hopefully not but I don't know.) The next issue is balance. If you just add in NPCs without any probabilities, things will be completely unbalanced. You want to spawn tougher NPCs with probabilities that increase with gamestage, and weaker NPCs with probabilities that decrease with gamestage. There are a number of ways you could do this: Match NPCs to vanilla zombies in terms of "difficulty," then insert the NPCs after those zombies at the same probability level (so, target probabilities containing "0.1", probabilities containing "0.2", etc.) and remove the zombies afterwards. Look in my NPC packs, and copy what is there for entity groups used to spawn NPCs into NPC POIs ("npcBanditsAll", etc). For other packs I would recommend my "Progression" series of modlets (since the ones in the other NPC packs aren't gamestaged). But there are only six group stages used in NPC POIs, and vanilla uses a lot more than that (e.g. blood moons use over 300 gamestaged entity groups). In each of my NPC packs (and also the "Progression" modlets), there is a "Scripts" directory, containing JavaScript files that I used to populate the entity groups. If you know how to code, you could modify those to automatically generate other entity group lists. (If you need help feel free to PM me.) ...Like I said, it is not easy. But if you still want to do it, I hope this helps. Edited March 7, 2023 by khzmusik (see edit history) 1 Link to comment Share on other sites More sharing options...
Guppycur Posted March 7, 2023 Share Posted March 7, 2023 You can also just make "evil" copies for the bloodmoons, or find a way to disable them entirely. That way, it appears the npc's turn viscous during the horde night. 1 Link to comment Share on other sites More sharing options...
MandyCMoore Posted March 7, 2023 Share Posted March 7, 2023 3 hours ago, khzmusik said: It can be done, but it is a long process. If you're not interested in learning how to create your own modlet, and spending a couple of days (or more) to create it, then the rest of this post probably won't interest you. It's basically a two step process: Spawn human NPCs into all the entity groups used for zombies Remove the zombies from those same entity groups But there are a number of catches. The first issue is hordes (blood moon hordes, wandering hordes). The horde spawner can only spawn entities that descend from the C# EntityEnemy class. If you try to spawn other entities, the game will spam red errors in the console and nothing will spawn. There are templates in NPC Core which use a custom SCore C# class that descends from EntityEnemy. But most NPC Pack authors don't use them, because that class lacks all but the most basic features. To my knowledge, my Whisperers and Rogues and Psychos packs are the only ones that do use those templates. So you would need to put only those entities into the entity groups used for hordes. This doesn't apply to the entity groups used to spawn entities into biomes, nor to the entity groups used to spawn entities into POIs. All of those should be able to support all NPCs. I don't know if this applies to "scout" spawn groups - the ones that spawn entities in response to a screamer. And that brings us to the next catch. If you want to get rid of screamers, I think that you can replace the screamer entity in the "zombieScreamer", "zombieScreamerFeral", and "zombieScreamerRadiated" entity groups with this: <entity name="none" /> But I haven't tried it myself. It's possible that screamers are hard-coded to spawn when the heat map reaches a certain point. (Hopefully not but I don't know.) The next issue is balance. If you just add in NPCs without any probabilities, things will be completely unbalanced. You want to spawn tougher NPCs with probabilities that increase with gamestage, and weaker NPCs with probabilities that decrease with gamestage. There are a number of ways you could do this: Match NPCs to vanilla zombies in terms of "difficulty," then insert the NPCs after those zombies at the same probability level (so, target probabilities containing "0.1", probabilities containing "0.2", etc.) and remove the zombies afterwards. Look in my NPC packs, and copy what is there for entity groups used to spawn NPCs into NPC POIs ("npcBanditsAll", etc). For other packs I would recommend my "Progression" series of modlets (since the ones in the other NPC packs aren't gamestaged). But there are only six group stages used in NPC POIs, and vanilla uses a lot more than that (e.g. blood moons use over 300 gamestaged entity groups). In each of my NPC packs (and also the "Progression" modlets), there is a "Scripts" directory, containing JavaScript files that I used to populate the entity groups. If you know how to code, you could modify those to automatically generate other entity group lists. (If you need help feel free to PM me.) ...Like I said, it is not easy. But if you still want to do it, I hope this helps. I would love to do this. Some of it seems a little confusing right now, but that could be because I haven't had any sleep. Lol. I will sit down & go through this after a nap, & I am definitely going to give it a try. I may have questions, but I swear, I will try to keep them to a minimum. I am excited to try this. Thank you!!! 3 minutes ago, Guppycur said: You can also just make "evil" copies for the bloodmoons, or find a way to disable them entirely. That way, it appears the npc's turn viscous during the horde night. Oh, I like that idea! Thank you!. I intended to do this for my own personal use, but I wonder if anyone else might be interested in trying the game this way. Well, first things first, have to make the modlet. Thank you so much! Link to comment Share on other sites More sharing options...
khzmusik Posted March 7, 2023 Share Posted March 7, 2023 (edited) 1 hour ago, Guppycur said: You can also just make "evil" copies for the bloodmoons, or find a way to disable them entirely. That way, it appears the npc's turn viscous during the horde night. They don't even need to be "evil." "EntityEnemy" is just the name of the C# class, the entities themselves could be of any faction. For example, let's say you want to have versions of Darkstar Dragon's SoldierPack that can spawn into wandering hordes. You can create a new entity that extends the "basic" SoldierPack entity, but use the SCore "EntityEnemySDX" class. Like so: <entity_class name="survivorBMSoldier1RocketL" extends="survivorSoldier1RocketL"> <!-- Tags don't extend, but everything else should --> <property name="Tags" value="UMA2,entity,male,npc,ranged" /> <property name="Class" value="EntityEnemySDX, SCore" /> </entity_class> If you're doing this with an "advanced" NPC (like the nurse) then you'll also need to change the entity class to not use any of the advanced features: <entity_class name="npcBMNurseClub" extends="npcNurseClub"> <!-- Tags don't extend, but everything else should --> <property name="Tags" value="entity,female,npc,melee,cp,DRMid" /> <property name="Class" value="EntityEnemySDX, SCore" /> <!-- "Advanced" features to turn off --> <property name="Hirable" value="false" /> <property name="LootListAlive" value="" /> <property name="NPCID" value="" /> <!-- The second AI package is determined by weapon type - see line 4240 in NPC Core entityclasses.xml --> <property name="AIPackages" value="NPCModBasicMeleeNoChat, NPCModNPCMeleeBasic" /> </entity_class> I might have missed a couple properties, but you get the general idea. Those new entities will still be of the same faction, so they won't be hostile to players, but they'll still spawn into hordes. Of course... you can also make them "evil." Just set their "Faction" property to "bandits" (or another hostile faction like "whisperers" - or even "undead"). Those factions are in npc.xml - "bandits" and "undead" are vanilla factions, "whisperers" is from NPC Core. Edited March 7, 2023 by khzmusik (see edit history) Link to comment Share on other sites More sharing options...
Pantstain Posted March 12, 2023 Share Posted March 12, 2023 (edited) having some issues....ive gotten multiple different models implementing into my 7dtd using the tutorial and the videos on youtube....but im not getting any footstep sounds on any of my custom zombies. the script puts the footsteps as a child of hips intead of origin...but ive tried moving and and leaving it with same result....anyone have any idea? can upload xmls or whatever if anyone wants to look Edited March 13, 2023 by Pantstain (see edit history) Link to comment Share on other sites More sharing options...
xyth Posted March 15, 2023 Author Share Posted March 15, 2023 Footstep sounds are added by the SCore code. If you are using SCore then check for errors in your log. Link to comment Share on other sites More sharing options...
Pantstain Posted March 15, 2023 Share Posted March 15, 2023 tyvm! Link to comment Share on other sites More sharing options...
LuffMuffin Posted March 24, 2023 Share Posted March 24, 2023 Hey, anyone ever have a problem where instead of weapons, all the NPC's are holding jars? and some wont obey commands? Link to comment Share on other sites More sharing options...
MarissaX Posted March 25, 2023 Share Posted March 25, 2023 (edited) Hi - I'm playing with the NPCMod and Telrics Horses and my hired npcs automatically attack the horses. Is there any way to change this? Thanks! (Love the NPCMod, by the way, I don't think I want to play 7 Days without it anymore...!) Edited March 25, 2023 by MarissaX (see edit history) Link to comment Share on other sites More sharing options...
Guppycur Posted March 25, 2023 Share Posted March 25, 2023 Change the faction of the horse to one that the NPCs don't attack? Link to comment Share on other sites More sharing options...
khzmusik Posted March 25, 2023 Share Posted March 25, 2023 (edited) 1 hour ago, Guppycur said: Change the faction of the horse to one that the NPCs don't attack? This is indeed the issue, but it is caused by NPC Core. Telric's horses extend "animalTemplateHostile". In vanilla, that template uses the "animals" faction, which has a "neutral" relationship to everything (including the player). However, NPC Core changes the faction of "animalTemplateHostile" to the NPC Core faction "aggressiveanimalsmedium", and that has a "hate" relationship with all non-animals except traders (including the player). When your NPCs are hired, they use your faction rather than their own. So they look at the horse's faction, see that it is hostile to their leader (you), and attack it. (They should attack if not hired as well, since all human factions have a "hate" relationship with "aggressiveanimalsmedium" too.) If you want to make the horses once again use the vanilla "animals" faction, add this XML to the horse entity classes: <property name="Faction" value="animals"/> You could also use one of the NPC Core animal factions, probably "passiveanimalslarge". Edited March 25, 2023 by khzmusik (see edit history) 1 Link to comment Share on other sites More sharing options...
Darco Mauria Posted March 26, 2023 Share Posted March 26, 2023 Hi! First of all, thank you for this marvelous project! Can you help me with a problem? I want to change the inventory capacity for the NCP hired. I modified the xml entity_classes adding the "BagSize" passive propriety, but nothing changed... What do you recommend me to do? Thank you for your time ^^ Link to comment Share on other sites More sharing options...
Paixetamour Posted March 26, 2023 Share Posted March 26, 2023 Hello i mixed many quest and trader mods together to overhaul the trader, missions etc. All of the mods im using currently seems stable and working well together but i have a small problem with npc mod. I dont like the new smx ''NPC Dialog Windows'' and its not compatible with trader mods i currently have. Once i remove ''XUi'' folder from the ''0_XNPCCore'' the broken trader dialogue window is working normally. But i cant hire friendly npcs anymore. The hire option dont pop up anymore since i removed the ''XUi''. For short im asking is it possible to remove the new dialog windows and use the vanilla ui, but also able to hire the npcs normally ? I have many so many mods but only trader related are; Traders have More Quest aka ''AdventureQuest''.,SimulQuests, No Repeat Pois. Those mods are imcompatible with npc mods new dialogue window. As i said removing the XUi fixes the trader menus but i cant hire the friendly npcs anymore. Link to comment Share on other sites More sharing options...
usermanagerservice Posted March 28, 2023 Share Posted March 28, 2023 Hello, latest game version from steam. Only core mods and red errors while creating world. Link to photo with logs here: https://imgur.com/9PO7pQ4https://imgur.com/a/UAPVPt6 Link to comment Share on other sites More sharing options...
Guppycur Posted March 29, 2023 Share Posted March 29, 2023 Photo is useless. The log itself is helpful. Link to comment Share on other sites More sharing options...
usermanagerservice Posted March 29, 2023 Share Posted March 29, 2023 8 hours ago, Guppycur said: Photo is useless. The log itself is helpful. I uploaded logs here because when I pasted here in the code my browser frozen. Log is 35 mb weight. Sorry for problems. Link to logs: https://easyupload.io/j0p2x1 Link to comment Share on other sites More sharing options...
Guppycur Posted March 29, 2023 Share Posted March 29, 2023 You do not have score loaded. Link to comment Share on other sites More sharing options...
usermanagerservice Posted March 30, 2023 Share Posted March 30, 2023 (edited) 15 hours ago, Guppycur said: You do not have score loaded. I have it in my folder... https://imgur.com/a/bke7Oh9 NEVERMIND EAC was turned on and it gave errors. Edited March 30, 2023 by usermanagerservice fixed (see edit history) Link to comment Share on other sites More sharing options...
Paixetamour Posted March 30, 2023 Share Posted March 30, 2023 Hopefully i will get an reply to my comment up there soon. I have been waiting to countine my playthrough. Link to comment Share on other sites More sharing options...
BFT2020 Posted March 30, 2023 Share Posted March 30, 2023 59 minutes ago, Paixetamour said: Hopefully i will get an reply to my comment up there soon. I have been waiting to countine my playthrough. You need to create a patch modlet to get all the mods to work together correctly (from what you described). Removing the XUI folder from the mod broke the mod, which is why you can't hire friendly NPCs anymore. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now