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

[A20] khzmusik's Modlets

Just added another modlet: Human Faction Reputation and Quests.

This adds a "reputation" system to the game, where the player can gain or lose reputation with the human NPC factions. The two ways a player can change their reputation is by killing NPCs, or by doing faction-specific quests that you get from the traders.

There are quests that require human POIs, but those aren't added to the trader quest list yet. There aren't enough POIs to support them. I'm hoping that will change in the near future.

@bdubyah I know you were curious about doing something like this. Feel free to use this modlet, it should hopefully save you a lot of work. (You might even have enough human POIs to support the POI quests.)

Details about all of this are in the first post, or for technical details, here is link to the README:

https://gitlab.com/karlgiesing/7d2d-a20-modlets/-/blob/main/1-khzmusik_Human_Factions_Reputation_Quests/README.md
Nice. :) Sounds like an awesome addition. Been on a bit of a hiatus at the moment, but will definitely take a look once I'm back at it, whenever that is. Lol.

 
khzmusik said:
You're very welcome.

I just uploaded the A20 version. This version will work with modlets (like NPC core) that change the dialog windows. Unfortunately, in this case, you'll get warnings in the console about XPath not applying, but those can be ignored (it's intentional behavior).


Just FYI, we were having issues on our server with traders only giving low tier quests.  We were seeing mostly tier 1s with maybe a tier 2 thrown in.  And there wasn't an option to change tiers.  I removed the trader lore modlet and immediately began being offered tier 4 quests.  Not sure if that's a feature, but it felt like a bug, so I wanted to let you know.  I removed the mod for now so don't rush to fix it for me.

 
Just FYI, we were having issues on our server with traders only giving low tier quests.  We were seeing mostly tier 1s with maybe a tier 2 thrown in.  And there wasn't an option to change tiers.  I removed the trader lore modlet and immediately began being offered tier 4 quests.  Not sure if that's a feature, but it felt like a bug, so I wanted to let you know.  I removed the mod for now so don't rush to fix it for me.


I'll definitely look into that. The traders should be giving the same quests they always have. Hopefully it's something simple.

 
I'll definitely look into that. The traders should be giving the same quests they always have. Hopefully it's something simple.


I'm not sure if I'd call it "simple" so much as "a dumb mistake."

I was so focused on porting over the "lore" parts of the dialogs, that I forgot to even consider the vanilla parts of the dialogs. Specifically, the parts TFP added in A20 so that players could go back to previous tiers.

I just pushed changes so it should all work now. I also bumped the version to 2.0.0 since it's no longer compatible with A19.

In my tests, I was not required to start an entirely new game save, but I was required to restart the game (so if this is on a server, you'll have to restart the server at minimum). However, I can't guarantee that your experience will match my tests, so if it's at all practical, I'd recommend starting a new game save.

Sorry about that.

On a different subject, I'm pretty close to porting over the "Slow Build" modlet from A19. It should be ready soon, probably tomorrow evening.

 
I just updated the Slow Build modlet for A20.

It deliberately slows down building (and crafting to some degree). It's designed for people who want to favor renovation over building from scratch, or for people who want their inventory management to be a little more challenging. Frames (and blocks and ladders) now require nails to craft, so it also discourages nerd polling somewhat.

It is very similar to the A19 version, but with a couple additional features (or "features"). In A19, I did not reduce the stack sizes of building-related resources; the A20 version does. There are also a couple of QoL improvements (updated localizations, the "gather nails" objective added to the "Build a base" starter quest, etc).

Hope you enjoy it!

 
Mostly Dead

  • Skill points are reset (not removed), and books that were read are forgotten.


Pardon my ignorance, but does this mean that you get your points back to spend again? If so, is there a way to completely remove all of the dead player's skill points instead, so that they have to re-build from scratch?

 
Pardon my ignorance, but does this mean that you get your points back to spend again? If so, is there a way to completely remove all of the dead player's skill points instead, so that they have to re-build from scratch?


Yes, you still have your skill points, and you're at the same level, so you can spend skill points again. That was intentional; "mostly dead" is supposed to make you start as if you were a new character who had been playing in the same world as your original character. Similar to how State of Decay works (but obviously you can't do the exact same thing in 7D2D).

That particular feature uses the same mechanics as the vanilla "fergit'n elixir." 

The modlet doesn't have any feature to discard your skill points. I didn't put one in, because in the past, Khaine had an almost-identical "hardcore" modlet that was meant for "dead is dead" play styles. (In fact my modlet was originally a modified version of his.)

But, it looks like he never updated his modlet for A20, so at this point I assume he has no intention of keeping it going.

I will add in that feature - it shouldn't be too difficult - but it will be disabled by default. I'll include instructions about how to enable it, which shouldn't involve more than some light XML editing.

EDIT: It might be easier for the end user to just make a separate XML modlet that changes "Mostly Dead" to "Dead Is Dead". I'll still add the instructions though.

 
Last edited by a moderator:
Pardon my ignorance, but does this mean that you get your points back to spend again? If so, is there a way to completely remove all of the dead player's skill points instead, so that they have to re-build from scratch?


I just updated the Mostly Dead modlet to version 3.0.0, and it now truly supports "Permadeath" play styles through XML edits. While doing so, I noticed that the previous Mostly Dead version had a whole lot wrong with it - to the degree that I don't know if anyone even used it. So there are also many, many other fixes, balancing improvements, etc.

I also made a separate modlet, Mostly Dead: Permadeath, which makes those XML edits for you. (You'll still need the Mostly Dead modlet.)

Please note that updating to 3.0.0 is not save game safe. If you already started a "mostly dead" game, you shouldn't update, you should start a new game. Otherwise you'll lose all your progression and skill points.

If by some chance you start with Mostly Dead 3.0.0, and decide to move to Permadeath afterwards, that should be save game safe. At least it was when I tried it.

Hope you like it!

 
I just added a new modlet for NPC Core NPCs.

This modlet introduces weapon-specific NPC Loot Bags. They have a chance to drop a weapon, ammo, or parts for that weapon. Each loot bag also has a chance to drop food, drink, and/or medical items.

I also created loot bags for NPC Core Mechs. They come in two flavors: ranged (which use a "hidden pistol" to deal with built-in guns), or melee. All mechs drop non-organic parts such as oil, springs, headlights, etc. They have a relatively large chance to drop robotics parts, and a small chance to drop rare items like forged steel, engines, batteries, or wheels. The ranged Mechs also drop 9mm ammo, and may drop 9mm parts.

Weapon quality, ammo counts, and item tier probabilities are tied to loot stage.

If you have any NPC Packs installed, from anyone, those NPCs should automatically drop the loot bags with no modifications necessary to those NPCs. (This is because my modlet name is prefixed with "3" so it will load after the NPC Packs, and it targets entities that extend the NPC Core templates, not just by entity name.)

Details are in the README:
https://gitlab.com/karlgiesing/7d2d-a20-modlets/-/blob/main/3-XNPCCore_khzmusik_Loot_Bags/README.md

I hope you enjoy it.

 
Hello khzmusiks! 👋
Omg you did the factions and quests mod a month ago you are amazing probably one of the best mods in 7 days.

Have you thought about uploading the mod to nexus to get more feedback? 

 
Souhank said:
Hello khzmusiks! 👋
Omg you did the factions and quests mod a month ago you are amazing probably one of the best mods in 7 days.

Have you thought about uploading the mod to nexus to get more feedback? 


Thanks! Though, to make sure you know, the quests that go to POIs aren't enabled, because there aren't enough POIs to support them. That's what I'm working on now, in fact.

In the past I stayed away from Nexus, for a couple reasons - the users aren't used to how 7D2D mods work, they'd try to use the Nexus mod launcher which is iffy on 7D2D support (it didn't support Harmony/C# mods), it would be splitting my time between different platforms, etc. But I don't know how valid those reasons are with A20, since you can now install C# mods the same as XPath/XML mods.

So, maybe I should look into that again, when I have time.

EDIT: I just remembered one reason I don't use it right now. A whole lot of my modlets depend upon other modlets to work (particularly SCore and/or NPCCore). Those aren't on Nexus, so in order to use any of those modlets, people would have to come to these forums anyway.

 
Last edited by a moderator:
I wish I had time to give you feedback, I think this is the real future of 7 days in the next alphas, and you are right with the nexus users.

I'll try to stay tuned
I hope everything goes well with you and your project! 😉

 
Last edited by a moderator:
Apologies, I meant to talk about this days ago, but I got distracted by other things.

For any of my NPC Pack enemies (Whisperers, Rogues, or Psychos) I supplied "basic" and "advanced" versions. The "advanced" versions can be interacted with, hired if your standing with their faction is good enough, etc. The "basic" versions don't have those options, but can be spawned into hordes (blood moon hordes or wandering hordes).

Both versions can be spawned into sleeper volumes without errors, but since I assumed most people wanted basic versions, the "basic" versions are the ones that spawned. But POI designers don't just use sleeper volumes, they also use SCore "PathingCube" blocks that can make the NPCs stay at their position (for e.g. ranged NPCs acting as sentries).

The "basic" NPCs did not obey those blocks... until now. I contributed changes to SCore so that even the "basic" NPCs can obey orders given by the SCore "PathingCube" blocks.

If you are a POI designer, or even someone who downloaded NPC POIs,  and want all NPCs to obey those blocks, you will need a recent version of SCore, There should be no issues with upgrading, other than the changes I mentioned SCore should have the same behavior it always had.

I know this is kind of a niche interest at this stage, but I wanted to let everyone know. Thanks for listening. 

 
Last edited by a moderator:
Yeah i stopped in to comment that i love this new addition and have had a lot of fun testing a new NPC poi since that change. This definitely altered the feel of some of the npc's i encounter. One thing i noticed was I had too many npc's of different factions spawning in the POI i was testing. I'm assuming i'd need to alter the sleeper groups used in the POI to pick one faction for the POI to get that problem resolved right?

Clarification: Altered feel, so before i know that i setup a variant of barn02 to have goblins spawn and didn't realize the pathing cubes didn't work on the basic entities i was setting to spawn. So they would wander immediately on getting close to the poi, but now they actually hold their ground and make it hard to approach the quest start point. Such an excellent feature.

 
Last edited by a moderator:
Bro, I have enjoyed playing all the creature packs with A19. Even the fantasy one. Now since you have made so many changes to these entities, what is the actual in game behaviour changes these characters show ? I am not talking about hiring the NPCs.

If you could spare some time.

 
One thing i noticed was I had too many npc's of different factions spawning in the POI i was testing. I'm assuming i'd need to alter the sleeper groups used in the POI to pick one faction for the POI to get that problem resolved right?


Glad you like it. I didn't even think about the fantasy enemies (like goblins), though thinking about it, it's no surprise they use the same "blood moon" NPC templates.

For the different factions spawning into the POI, there are actually two things to consider: 1) what sleeper volumes the POI designer used, and 2) which NPCs are set to spawn into them in the various NPC Packs.

Here's what I suspect is happening. In NPC Core, there are a couple "generic" enemy gamestage groups (they're called "Group NPC Enemy" in the UI). They're meant to spawn any NPC that is an enemy of the player, so if the NPC pack contains non-friendly NPCs, it will (correctly) add the NPCs to those groups.

However, just because the NPCs are enemies of the player, does not mean they are friendly to each other. Bandits, Whisperers, fantasy, and mechs all hate anyone in a different faction and will attack the others.

If I'm right, then my advice is to make the POI specific to just one faction, just as you suggested. If it's not your POI, and you're just testing it, then maybe that's not possible.

There are other options. You can modify which entities spawn into the relevant entity groups (in entitygroups.xml). Or, if you want all enemies to be enemies only of the player and not each other, you could modify the faction relationships so they are "neutral" to each other (in npc.xml). Or, you could just make them all the same faction, like "bandits" or something (in the various NPC packs' entityclasses.xml files).

Now since you have made so many changes to these entities, what is the actual in game behaviour changes these characters show ? I am not talking about hiring the NPCs.


I assume you are asking about the recent changes I contributed to SCore? Those relate to the SCore "EntityEnemySDX" C# class.

For a bit of explanation, most NPCs use the SCore "EntityAliveSDX" C# class. That class is actually a subclass of the vanilla trader C# class - the code to talk to NPCs is in the trader, as is code to give quests, and a few other features needed by NPCs.

That class is well-developed, well-tested, and kind of the "official" class to use. Most NPC packs use that class even for their "basic" characters, ones you can't talk to.

But, entities of that class can't be spawned into hordes - neither wandering hordes nor blood moon hordes. Anything spawned by the vanilla game's horde spawner system must use a C# class that descends from the vanilla "EntityEnemy" class, which (unsurprisingly) traders do not. (You also can't spawn vanilla non-enemy animals for the same reason.)

That's what "EntityEnemySDX" is for - specifically to spawn into hordes. But since it's designed for entities that only do that, it has far fewer features, and it's far less tested.

I started using that class for my "basic" Whisperers, since I specifically wanted them to show up in wandering hordes. It worked OK so I also used that class for my "basic" Rogues and Psychos bandits.

It's only when I started spawning them into sleeper volumes that I saw problems.

First, they didn't have the code to obey the different rules about waking them up in different sleeper volumes. Those are the rules that I modify in my "Variable NPC Sleepers" modlet so that NPCs don't always wake up fully aware as soon as they're spawned into a sleeper volume. (The different behavior is in SCore, I basically just change a couple of feature flags in XML.)

Next, they didn't have the code to obey commands (which makes sense because they can't be talked with, so players can't give them commands). POI designers often use SCore "PathingCube" blocks to give commands to NPCs, mainly to make sentries stay in place.

SphereII was kind enough to let me submit code that fixes these issues. Those are the changes I did recently.

Unless you're asking, just in general, about how NPC AI works in A20 vs. how it worked in A19?

If so that's a huge topic. For starters, A20 NPCs use Utility AI (UAI), but in A19, they used the same Entity AI (EAI) used in vanilla. The limitations of EAI are what prompted Xyth and SphereII to switch to UAI, which was already in the game but in an unfinished state.

If you want to read about UAI, then I took notes as I learned about it:

https://gitlab.com/karlgiesing/7d2d-a20-modlets/-/blob/main/Notes/UtilityAINotes.md

I also contributed "Filters" which can filter out which entities are considered for packages or actions, and make UAI much more efficient (otherwise your average computer would struggle with more than a couple NPCs at a time).

Once you understand all that, then you can look at the XML in then NPC Core utilityai.xml file, and you should be able to understand how it all works.

Hope that's helpful.

 
Last edited by a moderator:
Hello @khzmusik

I would like to use your Rogues & Psychos and Whisperers-AddOn on my server.

First time handling those things, so bare with me.. ^^

If i want to use those 3 factions with the standard system and dont want any other custom NPCs to spawn (just psychos, rogues, whisperers) do i need to do any settings on SCore or NPCCore or your mods?

Or just install all those and go for it?
 

 
Back
Top