Jump to content

[WIP] Weapon Addition and Replacement Suite (WARS)


antistar

Recommended Posts

Hello

 

I couldn't help but notice your 'planned mod features' box mentions you'd like to have weapon skill perks affect recoil values and that you'd like suggestions on how it could be done.

 

I recently uploaded a mod that makes power armor remove recoil, sway, and (optionally) accuracy decrease from firing (crosshair widening) when the player is in power armor.

 

I used scripts to attach or remove objectmods to weapons when they where equipped, on condition that the player was in power armor and the weapon was a gun.

 

I also uploaded the script I used as a modder's resource if you'd like to take a look. I've attached a txt file to this post containing an annotated and clean version of the script I used.

 

I'll admit that I was new to modding and scripting before I did this so it may be a bit sub-optimal. But I spent a lot of time getting over weird 'features' and proofing it against stuff that could go wrong.

 

The mod is called Power Armor Gun Handling and Heavy Heavy Weapons

 

I made a

 

I was thinking about making a mod to make perks affect aim models of guns myself a while ago, using scripts to apply objectmods.

 

The thing is you can only affect aim model values with ADD, MUL+ADD, and SET operators which limits you.

 

The mod I made uses SET to set recoil min and max values to 0, set aimstability so high scopes can't reduce it below 1, hence removing sway, and setting aim cone increase per shot to 0.

 

But if you wanted to make perks affect recoil values you may have to limit the power of objectmods you can craft at the bench or very carefully calculate exact values.

 

For example:

 

You make a stock objectmod made at a bench that reduces recoil by 50% by using the MUL+ADD operator with a float value of -0.5 on aimmodelrecoilmindegreespershot or aimmodelmaxdegreespershot

 

But then the player has rank 5 of rifleman that reduces recoil by 50% by using the MUL+ADD operator with a float value of -0.5 on aimmodelrecoilmindegreespershot or aimmodelmaxdegreespershot

 

The end result is a weapon that has 0 recoil, and you can actually make the weapon recoil downwards if you go below 0. The problem is some guns can have -75% reduction and some only 25% reduction.

 

If you want to use ADD or SET operators you may have to very carefully calculate exact values which would be a ridiculous hassle and maybe make a different set of rules for each individual gun.

 

So I'd suggest you set yourself a rule for bench-crafted objectmods such as stocks or muzzle brakes to never make recoil values go below 0.5. I.e. stock and muzzle do MUL+ADD -0.25 each.

 

The way I planned to make a mod wherein perks affect aim model values was to have each perk give a hidden actorvalue, which is already done for some perks in the vanilla game. So rank 1 gives the perk actor value of 1 and rank 5 gives the actor value of 5 etc.

 

You could then have a script listening for the onequip event which checks if it was a pistol, rifle, heavy, or automatic equipped then checks for the perk-added actorvalues. Once the actor value is found it could apply an objectmod specific to that perk. For example if rank 3 is detected it attaches an objectmod that applies MUL+ADD -0.3 on the weapon's recoil values etc.

 

Then you could also add a consistency checker. Each objectmod also gives the player a hidden actor value. The script could check if the perk actor value equals the objectmod actor value. If it does then nothing is to be done. If not, then the weapon needs to be updated and modded to have the objectmod appropriate for the perk rank.

 

I'm pretty sure NPCs don't use recoil or stability values in their accuracy calculation so it should be safe from a player dropping it to an NPC to give them a modded gun.

 

It shouldn't conflict with ammo-switching or under-barrel attachment switching as they probably use hotkeys to attach an objectmod and the player will do that after the OnEquip script has finished apply the perk-appropriate objectmod.

 

Sorry for the text wall, hope this helps.

 

Edit: butchered links soz

Edited by jloz94
Link to comment
Share on other sites

  • Replies 2.7k
  • Created
  • Last Reply

Top Posters In This Topic

Well hey, thanks for all that. :) I'd actually noticed your mod pop up and planned to have a bit of a look at it, for the same reason you posted about it.

 

I'd wondered a while ago if it might be possible to set something up in the way you describe, but the complexity of it made me baulk at actually trying to hack together a script - and I just couldn't spare the time with all the other work that needed doing. (Also I hate scripting and avoid it if I can. ;))

 

As it happens though I was just saying recently that AmmoTweaks will apparently have a built-in method of altering recoil via perks. Since I'm already planning to use AmmoTweaks for WARS, it makes sense to use its method.

 

I really appreciate all the info and the commented source script, though; that sort of thing is all very useful. In the past I've considered trying something similar to your mod - having power armour improve weapon handling - but again, with AmmoTweaks, that may end up being more part of the STR requirement system. Wearing power armour does increase your character's STR, after all.

Link to comment
Share on other sites

 

that may end up being more part of the STR requirement system. Wearing power armour does increase your character's STR, after all.

 

There are things that power armor can do that maxing strength can not though such as negating fall damage so the precedent for further improving handling when in power armor could be there.

Link to comment
Share on other sites

Yeah, it could go either way, I think - and like I said, I have considered doing something like that with power armour. Currently I think that rolling it into STR requirements generally might be a simpler and more elegant solution, though.

 

 

As kind of an aside, I was watching some of the recent footage of Fallout 76 and noticed that they seem to have improved some of the weapon behaviour a bit over FO4. E.g. they've actually included a pump-action shotgun this time, and it appears to even have (more or less?) correct round-by-round reloading behaviour. It shouldn't be notable and it's something they should have done a decade ago, but hey; I'm glad to see it. I mean I'd be even happier if the shotgun in question wasn't still back-to-front, but it's something. (I wonder if we'd be able to just flip the mesh and move the casing node in the nif file to fix that - regardless of if/when BGS work out modding for FO76.)

 

I also noticed that with the Pipe Revolver, you could see which rounds had already been fired by their indented primers. It's the kind of attention to detail I hadn't really expected.

 

 

Edit: I was getting this feeling about the Pipe Revolver, so I just checked and that effect with the primers is in FO4 too. I guess that shows how little time I spent with the pipe weapons in FO4. ;)

 

I wonder how it works, exactly... Something to do with its animations, maybe.

Edited by antistar
Link to comment
Share on other sites

Granted though, it's not the first time a Fallout game featured a correct round-by-round reloading behavior. Fallout New Vegas had that with many of the weapons in it. Then again, Fallout New Vegas wasn't made by Bethesda Game Studios. Instead it was made by a team of developers that actually knew what the f*#@ they were doing.

Link to comment
Share on other sites

Yeah, it wouldn't be an exaggeration to say that frustration with BGS not taking... anything, really - from New Vegas' mechanics when making FO4 is a big part of why I'm making WARS (and PEACE).

 

 

As an update:

 

I'm practically dreaming about animating here; that's all I've been working on. Before tackling the really hard stuff (i.e. the reloads) I decided to get a bit more practice in by doing the animations for the Skorpion. So now - barring the reloads and the equip - all the Skorpion animations are done. Well, I'll need to do alternate grip versions of all those animations too admittedly, since the grip is different when the drum mag is attached. Alternate grip versions aren't too difficult, though - it's mostly just copy-pasting and then a little tweaking, effectively - it's just somewhat tedious.

 

I'm working on the Thompson reload animations now. The 100 rd drum reload is done, along with the vertical foregrip version of the 50 rd drum reload. Next is the vertical foregrip 100 rd reload, and then - finally - the stick mag reloads. And that'll be it for the Thompson! I'll put up a video once it's all done.

 

Following that I'll finish off the Skorpion animations, and then do the M79 grenade launcher, probably. (It's currently using the double-barrel shotgun animations, for anyone who doesn't know.)

Link to comment
Share on other sites

Previously I was... maybe not happy, but okay with using the double-barrel animations for the M79 if no-one was able to do a proper set for it, but now that I've started doing some myself, I'm hopeful that it shouldn't be too much trouble for me to do.

 

The double-barrel animations aren't too bad for it, though the grip isn't quite in the right place and clips a bit, and the reload in particular is a little robotic. The main problem though is that the reload has the shell/s eject automatically when the weapon is broken open, rather than having to be pulled out manually. Also it doesn't support having a loaded round going in, and an empty shell coming out; it's all or nothing.

 

Also, the third-person is actually different to the first-person reload in that each (shotgun) shell is loaded individually rather than both at once - which looks pretty odd with the single-shot M79, of course. (It looks like the character drops a new shell in and then mimes dropping an invisible second shell into an invisible second barrel.)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...