Mods are now organized as resources. Use the Mods link above to browse for or submit a mod, tool, or prefab.
The TFP Official Modding Forum Policy establishes the rules and guidelines for mod creators and mod users.
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.
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.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.
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!
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!!!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:
But there are a number of catches.
- Spawn human NPCs into all the entity groups used for zombies
- Remove the zombies from those same entity groups
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:
...Like I said, it is not easy. But if you still want to do it, I hope this helps.
- 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.)
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!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.
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.
Change the faction of the horse to one that the NPCs don't attack?