Jump to content

[WIP] Weapon Addition and Replacement Suite (WARS)


antistar

Recommended Posts

I can't remember if I've mentioned it before, but off and on during WARS' development I've run into a... probably more of a quirk than an outright bug in FO4, where complex levelled lists that are specifically in the inventory of a high number of NPCs will cause the game to take a long time to load.

 

Early on I was trying a system where any weapon could spawn at any level, but higher-tier weapons were very rare at lower levels - and it would gradually change as you went up in levels until it was more the other way around and low-tier weapons were now rare. The system worked in testing until I actually implemented it so that Raiders would spawn like that, and suddenly... I thought I was hitting an infinite-loading bug. In actuality it was still loading... it was just that it took it 7-8 minutes to do so.

 

So I had to scrap that system. And overhaul later systems too, which is always tedious and time-consuming.

 

More recently, the load-times have crept up again, because while in vanilla the weapon spawning on NPCs is pretty simple - usually a single weapon which is maybe up to a few nested levelled lists deep - it has to be more complex in WARS in order to support:

 

- NPCs often having primary, secondary and melee weapons.

- Multiple ammo sub-types, with higher-level NPCs having more ammo.

- NPCs spawning with more or less ammo depending on whether a weapon they're carrying is a primary or secondary, or perhaps semi/manual/etc or full-auto, etc.

- NPCs spawning with the appropriate number and type of magazines for their weapon/s.

 

 

So for a while now my load times (just for jumping straight from the main menu to QASmoke to do some testing) have been gradually creeping up until they were getting close to the three minute mark, which is a real pain at the times when you're in a "loading, testing, quitting out, tweaking, loading, testing, etc, etc" loop to get something working properly. I also didn't want to eventually inflict load-times like that on users, so it's something I've been trying to puzzle out for a while now.

 

Fortunately then I fixed it yesterday! Based on testing so far, anyway. It was a bit of a weird solution that I didn't expect to actually work. There are 40-50 (almost all vanilla) levelled lists that determine what the vast majority of NPCs spawn with, in terms of weapons. These are the lists that I added WARS' "Loadout" levelled lists to, and when I cleared them out, it fixed the load-times.

 

Leaving them blank was no good of course, so I added the contents of those 40-50 lists back in via a script that runs once. (The same script used by the main DLCs to do this kind of thing.) I was expecting the game to load fine the first time, but then go back to taking nearly three minutes to load a save that had been made once that script had run, but that didn't happen. The load-times stayed fixed, instead taking ~30 seconds to load into QASmoke. (This is with a regular hard drive - not an SSD.)

 

 

So that's a relief. Kind of weird, though; and it points to it being an odd quirk in FO4. Almost like it's enumerating everything all NPCs could possibly spawn with when it loads, despite it obviously not needing all that all the time - but then not doing that when the info is in a save-file rather than the plugins? I don't know. At least it seems like it's fixed.

 

 

TL;DR - I reduced load-times from ~3 minutes to ~30 seconds. Phew.

Link to comment
Share on other sites

  • Replies 2.7k
  • Created
  • Last Reply

Top Posters In This Topic

Thats...Weird, you would think the devs would make use of scripts to avoid this kind of issue, specially because they have access to the game code and can verify that during a debug, I'm starting to doubt the hability of Bethesda's QA team, since in all places that I work, the QA team always execute stress tests.

Link to comment
Share on other sites

It may be that they did, but found that it was performing well enough for their purposes. In contrast, my purposes are a bit different, and so this problem turned up. ;)

 

 

Incidentally, in my last lot of testing (the Harpoon Gun is done now), I found that QASmoke was taking 25 seconds to load now - even better than I thought.

Link to comment
Share on other sites

Hey there Antistar. How's it going so far with the WAR and PEACE Projects? I know that it's definite looking great, even in latest progress to showcase latest features of wip is great. I don't know remember if I did mention it last time or not for question related to WARS project, but would the WAR project would have an optional of making a patch that would be compatible to the Tactical Reload Mod (that would support WAR's weapon )in the future time, after the public release (in the future time)?

Link to comment
Share on other sites

Hey - they're coming along well. I made a couple of minor additions to PEACE the other day; configurable sleep healing in Survival Mode, with Endurance influencing HP and limb condition restoration per hour. Plus the return of the My First Infirmary and Auto-Doc as new settlement objects.

In WARS, there's only five weapons left to do the ammo-swapping, condition, etc stuff for now:

Fat Man
Flamer
Plasma Gun
Tesla Rifle
Gamma Gun

So that shouldn't take too long. I still need to have another look at the HP/DR/ER values for some creature types, like I mentioned in an earlier post. Plus there's finishing writing the tutorial, and maybe starting the "WARS - Lend-Lease" patch with support for a couple of third-party weapon mods. Not that much to do before finally starting my test play-through, though.


I do want to have support at some point for Tactical Reload - or Extended Weapon Systems, which looks similar. It might depend on if one works with WARS and the other doesn't? E.g. the Tactical Reload Nexus page mentions having to leave out the ReloadStart annotation for the "reserve" reload animation, and I don't actually know if that means the ReloadStateEnter event doesn't get sent? The WARS/AmmoTweaks weapon manager script does use that event, so...

 

Anyway, that's a little hypothetical for now, since it'd obviously rely on me getting time to make a bunch of reload animation variants. Hopefully each one wouldn't be too much work if I'm basically just taking the existing animation and removing the "work the action" bit, but there are a lot of reloads to cover.

Link to comment
Share on other sites

I've been looking forward to the day these mods release the way a dog waits for his kid to come home from school. And it sounds like that proverbial school bus is getting closer and closer! Really looking forward to seeing them land!

Link to comment
Share on other sites

Yeah, I've been thinking that I'll probably record some clips when I get into some good fights while doing my playthrough test of WARS and PEACE. Some aspects of the mod may not come across as well in short clips (e.g. longer-term impacts of crafting and logistics stuff), but others obviously will.

 

Having said that though, once I've put together a big ammo/weapons factory, I'll have to show that off in a video or two. WARS does a lot with factory machines.

 

In the meantime, the closest to a natural gameplay video so far is probably this one showing off the 12 gauge ammo sub-types.

Link to comment
Share on other sites

Yeah, I've been thinking that I'll probably record some clips when I get into some good fights while doing my playthrough test of WARS and PEACE. Some aspects of the mod may not come across as well in short clips (e.g. longer-term impacts of crafting and logistics stuff), but others obviously will.

 

Having said that though, once I've put together a big ammo/weapons factory, I'll have to show that off in a video or two. WARS does a lot with factory machines.

 

In the meantime, the closest to a natural gameplay video so far is probably this one showing off the 12 gauge ammo sub-types.

Does this mean you've started your qa playthrough.

 

Tempering excitement

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...