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

A19/A18 CreaturePacks - A community entity project

Status
Not open for further replies.
Double checking the entitygroups.xml (and your instructions, in case I misread), the JoelTrader is currently commented out. Just to make sure I have it right, it's only the JoelTrader entity I'd need to comment out of the entitygroups.xml? Or do I need to comment out the JoelBandit entity as well?

 
I see lots of Xpath errors in the log so its hard to know whats causing it. The error seems to happen during some NPC interaction so I will do additional testing to see if I can replicate your issue.

 
So it seems there is a vanilla bug (not a modlet bug) where any entity class that extends off of the EntityNPC class (This means bandits, traders and survivors) will cause an NRE when they wander into the protected trader area. This was a known issue for traders, but will also include the bandits and traders. Removing the trader area protection is the known fix but that introduces a small bug where 2 traders might spawn in a trader POI. We will research if there is any other alternate fix but likely we will need to create a code fix and ask TFP to add that to a future vanilla game release.

Zombie and animal characters are unaffected by this bug.

 
Last edited by a moderator:
Pushed version 1.01: Made all bandits, survivors and wandering traders territorial and lowered chase time towards nonplayers to 5 seconds. This will dramatically reduce the ranging of these characters so it then becomes much less likely they will wander into a trading posts protection area. If they do, killing the entity (the console command "killall" works too) will clear the NRE is this rare event should occur.

We are still pursuing other fixes as well.

 
Is there a way to make these entities stay within a certain area? Like a Poi; they would guard and only chase you to the front door then turn around and go back? This would be for setting up bases and patrols I guess, among other things. Never leaving a designated area.

 
Is there a way to make these entities stay within a certain area? Like a Poi; they would guard and only chase you to the front door then turn around and go back? This would be for setting up bases and patrols I guess, among other things. Never leaving a designated area.
Depending on which type of character you are referring to (bandits, survivors, wandering traders), you will probably need the DMT version to give them specific tasks like that.

 
Without DMT you can't "make them stay" within a certain area, but you can strongly encourage them to do so with just xml edits :-)

The territorial AI task is designed to return a character to its starting "area" using its spawn point as a location. This wont return him to the exact spot but he will return to the rough area and remain around there until pulled away. You can remove the breakblock task so the character cant get out of a poi easily. This can be improved by lowering its AI intelligence so it cant find paths out well. You can give them very poor senses so they wont be easily pulled away by chasing targets. You can reduce the chase time as well. There are other xml tricks too, so play with it until you get close to what you want.

 
This can be improved by lowering its AI intelligence so it cant find paths out well. You can give them very poor senses so they wont be easily pulled away by chasing targets. You can reduce the chase time as well.
But doing this could be a problem if he really wanted them to be good guards though.

they would guard and only chase you to the front door then turn around and go back
I mean, if you reduced their intelligence so they wouldn't find paths well and if you gave them poor senses so they wouldn't be easily pulled away by chasing targets, would they still be good as guards at all? Would they still be able to do what he wants them to do? lol

 
SphereII figured out a possible fix, so I am coding up the xml and will push a new version shortly

 
Last edited by a moderator:
Version 1.02 Pushed. The Sphereii method worked great but made the Bandits invulnerable to damage, and that seems a really bad idea, so went old school and made them use the EnemyAnimal class and adjusted targets accordingly. Reduced spawn rates so there are fewer around. Added Icons. The bandits that you can setup to have the game give them weapons were removed from spawning but you can add them back in for testing. The Bandit class provides that weapon spawn, but these guys will NRE if they touch a tradingposts protected area. If you want to use those in your mod, then I recommend you edit all the tradingposts POUI xml to either remove that protection of make it smaller so its inside the walls.

Also, those guys drop their weapons and ammo. The club can be used, but i made the AK47 unusable but it scraps to useful parts. The ammo dropped is unusable unless you were to add that item into each weapons ammotypes.

 
Just started playing with this on my heavily modded 18.3(b3) dedicated server, and it seems to be working pretty good! But, the wandering traders were aggressive and indestructible.

 
Just started playing with this on my heavily modded 18.3(b3) dedicated server, and it seems to be working pretty good! But, the wandering traders were aggressive and indestructible.
Invulnerable wandering traders is a limit in what vanilla code can do. It's noted in xml documentation. They should not be aggressive to players unless they got hurt then they get a little angry. I will fix that in the next release.

 
I have to say, I'm really liking where this is going. I did like your DMT NPCs as well, but the lack of NPC variety was limiting.

I have a couple of general questions:

  1. How will other modders create additional NPCs? Through XML only (similar to UMA) or will they need to create new Unity assets? You mentioned custom weapons through XML, but not things like different clothing, armor, skin color, etc.
  2. Is there a plan for adding these NPCs to POI sleeper volumes (EDIT: for NPC-only POIs)? For instance, a set list of groups and spawners for gamestages.xml and the matching entity groups?
  3. Is this in the Mod Launcher yet? :smile-new:
  4. EDIT: forgot one... Are the characters that are currently in your DMT NPC pack, going to be ported to this mod?


Obviously this is all still pretty new, so if I can offer any help or suggestions, let me know.

 
Last edited by a moderator:
Once the testing shows this is something worth building one I will do some classes or videos on how to build these new entity models. I will likely port over all my existing characters from the bandits, traders and NPC modlets. Likely I will organize this into sub modlets like humanoids, animals, mechs, and fantasy characters. Then moders can just submit the .unity3d files and matching xpath xml for adding into each. These entities work great in pois as sleepers. You can add these to the sleeper gamestage so they appear randomly later in the game or directly add them to specific pois. I may add a sample xpath to add them to gamestages later.

I checked on the mod launcher and the current version is there.

 
Last edited by a moderator:
Once the testing shows this is something worth building one I will do some classes or videos on how to build these new entity models. I will likely port over all my existing characters from the bandits, traders and NPC modlets. Likely I will organize this into sub modlets like humanoids, animals, mechs, and fantasy characters. Then moders can just submit the .unity3d files and matching xpath xml for adding into each. These entities work great in pois as sleepers. You can add these to the sleeper gamestage so they appear randomly later in the game or directly add them to specific pois. I may add a sample xpath to add them to gamestages later.
I checked on the mod launcher and the current version is there.
All of this is good to hear.

But, regarding question 2 - I probably wasn't clear enough, even with the edit. My question was about creating "categories" of sleeper volumes, specifically for POI designers, so they can make a creature-dedicated POI that wouldn't have to be changed if another modder adds different creatures. (By "creature-dedicated" I mean things like a bandit camp, survivor-owned house, bunker guarded by mechs, etc.)

I'm sure you know this, but for the benefit of people who don't, this is what you need to do to create a custom sleeper volume that spawns (certain kinds of) creatures:

  • In gamestages.xml, a named group node, which includes a spawner node, referencing a spawner node (below) by name
  • In gamestages.xml, a named spawner node (usually with "horde" in the name), which includes one or more gamestage nodes, referencing one or more entity groups (below) by name
  • In entitygroups.xml, one or more entitygroup nodes, which includes one or more entity nodes, referencing an entity_class node by name (those are created by the creature designers)


Here is the issue. The POI designers will only see the names of the group node in the UI. So, in order for POI designers to have consistent spawn groups, and for creature designers to add their NPCs to this group, the names of all those nodes should be standardized.

TFP do this by creating "categories" of each. For example, the group nodes have names that describe their general "context" (purpose, or "kind" of POI): "abandoned house," "ghost town," "lab worker," and so forth.

If we all could come up with a standardized name for all of these XML nodes, then creature designers could simply add their creations to the related entitygroup nodes - and they would automatically show up in sleeper volumes of POIs, without either modder even having known about the other.

But, to do this, we'd need input from POI designers, since they'd know best what "kind" of creature they'd want to add to their sleeper volumes. As only one example: if you're converting one of the existing "survivor" POIs to include friendly NPCs, you'd want at least one spawn group for the NPCs in the lookout towers, and a different spawn group for the NPCs hanging out in the tents.

That's probably not something that needs to happen until all these NPCs are stable. But if this is going to be the "semi-official" way to include NPCs (and if you can pull off what you want, I hope it will be), then it will be something we all should start thinking about.

 
Last edited by a moderator:
I agree standards are critical for reuse and scalability, and I appreciate you bringing this one up as I had no idea it will be an issue. We are discussing and vetting standards on this Discord thread. https://discord.gg/DWTnyVh

I encourage anyone interested to share their thoughts there.

 
Status
Not open for further replies.
Back
Top