Jump to content

NPC Stats (for Diversive Bodies)


Recommended Posts

View File

As wdaigle found out, the engine doesn't really like having S.P.E.C.I.A.L. on every NPC:

Quote

Here's what I just tested. A major hesitation occurs a minute after you greet dogmeat; right before the molerats appear.  So, I loaded a save at Vault 111 and went directly to Red Rocket 3 times in a row.

 

Here are the results:

1 - Both mods running: Massive hesitation, 10 full seconds, then another few, then another few

2 - NPC Stats alone: Massive hesitation, 10 full seconds, then another few, then another few

3 - Diverse Bodies alone: zero hesitation through entire encounter

 

So, empirically, the slowdown is not Diverse Bodies interacting with NPC Stats, but the game engine interacting with NPC Stats.

 

Use at your own risk!

 

 

 

Ever used Diversive Bodies and wondered why everybody looks kinda the same?
Ever turned Diversive Bodies up to eleven to see some change and than cursed 'cause your Companions look ... well ... ridiculous?

 

Than this mod is for you!

 

Diversive Bodies uses S.P.E.C.I.A.L. statistics to morph the bodies. Problem is, only the PC and the Companions have stats (and some combatants and some jokes --> Mama Murphy has 15 STR). So I carefully examined the living conditions and social status of every NPC and ... Yeah, I just threw some D10 :classic_biggrin: Now every body is S.P.E.C.I.A.L.

 

Do I need Diversive Bodies for this one?
Not really. But afaik nothing else uses S.P.E.C.I.A.L., so I don't see any reason to use this without it.
You will need all DLCs though.

 

Are the any compatibility issues?
Sure. Anythings that overwrites NPCs is incompatible, but a merged patch helps greatly :classic_wink:

 

Will you do ...?
No. It took me over a week of dice throwing to get everybody. I am not doing that again. You can easily do it in FO4Edit, though. The stats are in the NPC you want to change under PRPS-Properties.

 

The archive also contains patches for NPC heavy mods I use. These are:
* Tales From The Commonwealth (3DNPC FO4)
* Ad Victoriam - A Brotherhood of Steel Overhaul
* Better Settlers
* Combat Zone Overhaul
* Gunners Overhaul
* My Minuteman
* Raider Overhaul

* Loving Curie (thx kirk777)

* Wasteland Heroines (without companions) (thx kirk777)

 


  • Submitter
  • Submitted
    11/04/2017
  • Category
  • Requires
    Fallout 4 + DLCs

 

Link to comment

first: you realy created S.P.E.C.I.A.L stats for all named npc's in game manualy? respect man, that was surely a lot of work.

 

second: can you create an option (maybe in an mcm menu) to change the stats of an npc manualy? i remember a mod for skyrim (randomized npc or something like that) that has an mcm option to change certain npc's. something similar would be cool for this mod too.

Link to comment

First: Thanks! My right hand still has nightmares ;)

 

Second: No. These are all variables inside the .esp. Best thing I could think of would be a script for FO4Edit. Something like "When stat=0 replace by a random number between 1 and 10". But I'm no coder. I even had difficulty editing my Conky-scripts, and those where commented.

Link to comment
  • 2 months later...

Recently, I bought a new fast PC and, though fast, there's a major slowdown when I enter new areas of the maps.  So, I disabled and re--enabled mods to narrow down while ones were causing the issue.  Turns out there were two mods causing this slowdown.  One of them is NPC Stats. 

 

Is there any way you can make this run like Diverse Bodies.  He says that it's performance friendly and runs in the background.  Yours seems to do all its work upon entering a new area.  It basically stops my game for a couple seconds while it runs.

 

I only use NPC Stats - Vanilla.

Link to comment

Yeah, I experience that too. But I only provide the numbers, I have no idea about the calculations involved. In my old game, before I made NPC Stats, I still experienced some hiccups and part of the reason I made this was that that there wasn't enough difference to justify those.

 

I have the same hiccups in Skyrim with Everybody's Different installed. So my guess is the engine doesn't really like dynamically changing appearances? In the end I believe modding is a trade-off game. What do you want to achieve? What are you willing to sacrifice? And my mod is all but essential, so feel free to drop it at a moments notice.

 

Out of curiosity: What was the second mod, that caused the hiccups?

Link to comment
4 hours ago, trippleT said:

Yeah, I experience that too. But I only provide the numbers, I have no idea about the calculations involved. In my old game, before I made NPC Stats, I still experienced some hiccups and part of the reason I made this was that that there wasn't enough difference to justify those.

 

I have the same hiccups in Skyrim with Everybody's Different installed. So my guess is the engine doesn't really like dynamically changing appearances? In the end I believe modding is a trade-off game. What do you want to achieve? What are you willing to sacrifice? And my mod is all but essential, so feel free to drop it at a moments notice.

 

Out of curiosity: What was the second mod, that caused the hiccups?

"Lots More Settlers and Enemies"  was the other mod.

 

I'm curious because I have Diverse Bodies running (I'm not at the point where I've really noticed anything... I need to pay more attention) and it tells me that it has updated 100 NPCs so far.  So, whatever it's doing, doesn't seem to be causing a hiccup.  I don't know if he sets a timer and updates one at a time and you're trying to update a ton at once, or what's going on.  I know your mod has to get out ahead of his, so maybe that's not possible.  Maybe he needs to integrate yours into his so when he goes to adjust an NPC he can use your numbers.  Just sayin'. 

 

Love the concept and appreciate the work you did.  Problem is... with my old PC a hiccup was nothing; everything hiccup'd, so I hardly noticed.  :open_mouth: With this new PC, everything is 60 fps until a script stops it for a second or two.  So, it's too jarring now.  :smile: 

Link to comment

I have an Intel i7 (3,4GHz) with 16GB and a nVidia 980; about 4 years old. And I think I remember some hiccups with just DB in big settlements and around Diamond City. That was middle game with ~240 diversified. Though I tend to turn graphics up to around 50 fps ;)

 

btw, vinfamy was so nice and included the sourcecode in his mod. So you could look around for a timer or something. If you understand code without comments (I don't :frown: )

 

Link to comment
On ‎1‎/‎15‎/‎2018 at 7:27 AM, trippleT said:

I have an Intel i7 (3,4GHz) with 16GB and a nVidia 980; about 4 years old. And I think I remember some hiccups with just DB in big settlements and around Diamond City. That was middle game with ~240 diversified. Though I tend to turn graphics up to around 50 fps ;)

 

btw, vinfamy was so nice and included the sourcecode in his mod. So you could look around for a timer or something. If you understand code without comments (I don't :frown: )

 

I looked at it.

 

Here's what's happening.

 

The script is called by the ESM for each NPC.  I can't see if gathering the list of NPCs in the ESM has any performance tweaks.  It's probably a built-in function and why you might have a bump on entering a high traffic area. 

 

However, the script itself adjusts all 124 sliders on a female and then applies the morph.  The trick is that the adjusting of the sliders and the morph all have a utility.Wait(0.1) after it.  So, this means that the script takes 12.5 seconds (plus the time to actually move the sliders and do the morph) to adjust each NPC.

 

It also displays a message for every 20 it does.  So, if it's doing it serially, that would come to over 4 real-time minutes for each 20 NPCs.  That sounds about right from my in-game experience.

 

Now, what about NPC Stats?

 

Well, he's using the stats to figure out what to do with the sliders.  So, yeah, you have to get those stats in BEFORE he starts moving the sliders around. 

 

If you can't integrate maybe you could try this...

 

If you put a utility.Wait(0.1) in between each of your stat updates, then you would take 0.7 seconds per NPC (assuming 7 stats being updated).  So, 20 NPCs would take 14 seconds (plus update time). 

 

You might miss getting the numbers updated in time for his first few sliders, but you'd have him covered the rest of the way and, ideally, no hiccup.

 

What do you think?

Link to comment
22 hours ago, wdaigle said:

Now, what about NPC Stats?

 

Well, he's using the stats to figure out what to do with the sliders.  So, yeah, you have to get those stats in BEFORE he starts moving the sliders around. 

 

If you can't integrate maybe you could try this...

 

If you put a utility.Wait(0.1) in between each of your stat updates, then you would take 0.7 seconds per NPC (assuming 7 stats being updated).  So, 20 NPCs would take 14 seconds (plus update time). 

Well, my mod is not dynamic, it's static. No scripts, no updates. Just some "hardcoded" numbers inside the .esp. I override the PRPS-Properties sections of the NPCs directly (You can look it up in FO4Edit). That is also why every mod that alters an NPC will conflict with mine. Since the .esps are all loaded at the start of the game, there shouldn't be any update time. Right? Maybe vinfamys script runs slower when there is more than a bunch of zeros to calculate for some strange reason??

(If my assumption of you thinking my mod is way more advanced than it actually is please ignore what I just wrote.)

Link to comment
5 hours ago, trippleT said:

Well, my mod is not dynamic, it's static. No scripts, no updates. Just some "hardcoded" numbers inside the .esp. I override the PRPS-Properties sections of the NPCs directly (You can look it up in FO4Edit). That is also why every mod that alters an NPC will conflict with mine. Since the .esps are all loaded at the start of the game, there shouldn't be any update time. Right? Maybe vinfamys script runs slower when there is more than a bunch of zeros to calculate for some strange reason??

(If my assumption of you thinking my mod is way more advanced than it actually is please ignore what I just wrote.)

I was thinking you were doing more than you are.  I made some Skyrim mods a long time ago so I think I now understand what you're doing.

 

Pleased don't shoot the messenger :smile: but...  

 

Here's what I just tested. A major hesitation occurs a minute after you greet dogmeat; right before the molerats appear.  So, I loaded a save at Vault 111 and went directly to Red Rocket 3 times in a row.

 

Here are the results:

1 - Both mods running: Massive hesitation, 10 full seconds, then another few, then another few

2 - NPC Stats alone: Massive hesitation, 10 full seconds, then another few, then another few

3 - Diverse Bodies alone: zero hesitation through entire encounter

 

So, empirically, the slowdown is not Diverse Bodies interacting with NPC Stats, but the game engine interacting with NPC Stats.

Link to comment
11 hours ago, wdaigle said:

Pleased don't shoot the messenger :smile: but...

Who would do such a thing?

 

11 hours ago, wdaigle said:

So, empirically, the slowdown is not Diverse Bodies interacting with NPC Stats, but the game engine interacting with NPC Stats.

And here I was wandering why the variables were all zero. Good to know, I will put that on the modpage. :thumbsup:

 

And I really admire your dedication.

Link to comment
  • 8 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use