Jump to content

[WIP] Weapon Addition and Replacement Suite (WARS)


antistar

Recommended Posts

  • Replies 2.7k
  • Created
  • Last Reply

Top Posters In This Topic

Here's a video showing what I was talking about earlier with the cannonball ammo types:

 

- Cannonball ammo type testing

 

 

And just for reference again, those ammo types are:

 

- Solid: A solid steel ball. Packs a real wallop if you can hit something with it. Can be recovered after firing, but obviously doesn't have propellant at that point.
- Canister: Basically a giant buckshot shell. Turns the Swivel Gun into a giant shotgun. (Similar to grapeshot.)
- Explosive: A classic fuzed shell. Does impact damage, but bounces off and then explodes after a couple of seconds.
- Shrapnel: Like the explosive shell, but it also puts out a shower of lead balls in all directions.
- Carcass: Also like the explosive shell, but it explodes in a cloud of poisonous smoke. (Poison damage over time.)

 

This is using AmmoTweaks v1 to handle the ammo swapping; very preliminary support at this stage. There's a bunch of changes I'll need to make to the scripts so it works more the way I want/need it to in WARS.

Link to comment
Share on other sites

Thanks - and funny you should mention mustard gas, because I've seen carcass rounds described as "an early chemical weapon".

 

These projectiles and explosions were fun to make. It feels like a reasonable amount of work went into them, but a lot of that was working out how to work with projectiles and explosions generally - so it needed to happen for the sake of the rest of the projectile/explosion work I'll be doing anyway.

 

E.g. it took a while to work out why the shrapnel round was instantly killing the player if the shrapnel explosion originated at (or below, as it turned out) a point level with the player's feet. It turned out to be a weird vanilla bug; the same one that this mod fixes (or works around, really) for the Fatman MIRV.

 

I'm glad I was able to find that solution finally, because otherwise I wouldn't have been able to keep the ballistic arc on the shrapnel pieces - and I think those pieces raining down a little after an explosion is a cool effect.

Link to comment
Share on other sites

  • 2 weeks later...

As an update on what I've done so far with the AmmoTweaks v1 (ATv1) integration:

 

I'm editing a lot of the ATv1 scripts, as mentioned above. E.g. ATv1 includes an extensive scripted approach to adding its new ammo types (and other items) to the game world, which I needed to clear out because WARS already does that with its own items. (Otherwise it'd clash horribly, of course.)

 

In ATv1, ammo switching works in a (looped) chain, always switching to the next ammo sub-type in the chain, even if you don't currently have any of that ammo. Not great in a firefight! I changed that so that it only switches to the next ammo sub-type that you have in your inventory. (Pretty sure isathar made the same change in TweaksFramework ages ago, because I remember mentioning it.)

 

 

ATv1 has an unfinished script for weapon repair kits, which I finished up and expanded on. That included fixing a bug (that also affected repairing weapons at the workbench) where the first repair of a weapon would consume the kit/components, but not actually work. Took me a while to work that one out.

 

I also made simple cleaning kit (for ranged weapons) and repair kit (for melee weapons) models using vanilla assets, and made the act of cleaning/repairing a weapon pass in-game time, like with the "These Things Take Time" feature in PEACE. Fifteen minutes by default, but configurable in the MCM menu. That's per condition level though:

 

Ranged:

- Filthy

- Very Dirty

- Dirty

- Clean

- Pristine

 

Melee:

- Broken

- Weathered

- Worn

- Good

- Reinforced

 

... So an absolutely filthy gun might take an hour to clean. ;)

 

Right now I've got it worked out that cleaning/repairing a weapon at a workbench takes progressively less components as you go up the condition levels (so if you can keep it in good condition, it's more efficient), while crafting each cleaning/repair kit takes the same components as going from Filthy->Very Dirty or Broken->Weathered. They're very convenient to take with you, but less efficient.

 

The idea is that firing a ranged weapon when it's really dirty will have a chance to damage the weapon permanently, stepping down a receiver quality level. (Those levels being Awful, Poor, Average, Good, Perfect in WARS.) Then you'd need to swap out the receiver at a workbench to repair that damage. I still need to script this part, though.

 

 

Next up I'll be working on getting fire mode switching and launcher mode toggling in there. ATv1 doesn't have systems for those, so I'll work from the ammo-switching system it's got as a base, and add my own in. (One keybind for each of those three things is the plan; basically as in STALKER.)

 

I think the way these systems interact will make this a little complicated, but I think I know how I'll do it.

Link to comment
Share on other sites

  • 2 weeks later...

People who have been following the development of WARS for a while (... I appreciate your patience) may remember me lamenting that there was no way to have perks influence weapon recoil, since it would make a good substitute for the weapon skill perks magically making bullets hit harder. (Gunslinger, Commando, etc.)

 

I think the idea of using a script to dynamically attach hidden omods (that apply the recoil changes) to weapons based on the character's perks came up a while ago too, but I always thought it would be too unwieldy.

 

Once I really got stuck into editing and expanding the AmmoTweaks v1 scripts though, I realised that it might not be such a bad approach after all - so I went ahead and did it! It was still difficult to get it working (not least because of a simple logic error I made that sent me on a wild goose chase for hours trying to work out why it wasn't working, until I eventually noticed that... PEBCAK, basically), but I finally got there.

 

So now each rank of a weapon skill perk reduces recoil for that weapon type by 5%. I also tied Strength requirements into this system, so if you don't meet the STR REQ for a weapon, it will have +100% recoil. (Along with some other effects, probably - like reduced movement speed.)

Link to comment
Share on other sites

So now each rank of a weapon skill perk reduces recoil for that weapon type by 5%. I also tied Strength requirements into this system, so if you don't meet the STR REQ for a weapon, it will have +100% recoil. (Along with some other effects, probably - like reduced movement speed.)

 

Sounds fair. Questions:

 

a)How many skill perk rank will there be?

 

b)How will that affect NPCs? Will we still have scrubby thin raiders running around with gatling guns?

 

c) How will the purchase of nuclear submarines by Australia affect the overall mating behavior of native saltwater crocodiles? :devil:

Link to comment
Share on other sites

a) I didn't change this compared to vanilla, so there are five ranks for each weapon skill perk - except for Science!, which in WARS is the weapon skill perk for Energy weapons. It only has four ranks - but most Energy weapons don't have recoil in WARS (only Plasma weapons do, off the top of my head), so...

 

Actually, I'll paste in the info on the weapon skill perks from the draft readme, for reference:

 

 

Heavy Gunner
- Ranged and Explosive damage bonuses removed for all ranks.
- Each rank increases hip-fire accuracy by a cumulative 5%, up to a max of 25% at rank 5.
- Each rank decreases recoil by a cumulative 5%, up to a max of 25% at rank 5.
- Unchanged: Chance to stagger enemies.

 

Rifleman
- Now only affects manually-operated (revolver and bolt/pump/lever/break-action) rifle-sized ballistic weapons. (Including the Gauss Rifle.)
- Armour penetration and damage bonuses removed for all ranks.
- Each rank increases hip-fire accuracy by a cumulative 5%, up to a max of 25% at rank 5.
- Each rank decreases recoil by a cumulative 5%, up to a max of 25% at rank 5.
- Unchanged: Chance to cripple enemies.

 

Science!
- This is now the weapon skill perk for all Energy weapons (barring Heavy weapons).
--- Ranks 1-4 increase hip-fire accuracy.
--- Each rank decreases recoil by a cumulative 5%, up to a max of 20% at rank 4.
--- Rank 3 gives a 1% chance to knock opponents down (by "overwhelming their senses"). Rank 4 increases this chance to a total of 3%.
- Unchanged: Ranks 1-4 unlock high-tech crafting recipes.

 

Gunslinger
- Now affects all pistol-sized ballistic weapons (full-auto or otherwise).
- Damage bonuses removed for all ranks.
- Rank 2 and 3 range bonuses removed.
- Each rank increases hip-fire accuracy by a cumulative 5%, up to a max of 25% at rank 5.
- Each rank decreases recoil by a cumulative 5%, up to a max of 25% at rank 5.
- Unchanged: Chance to disarm and cripple enemies.

Commando
- Now affects all semi/burst/full-auto rifle-sized ballistic weapons.
- Damage bonuses removed for all ranks.
- Each rank increases hip-fire accuracy by a cumulative 5%, up to a max of 25% at rank 5.
- Each rank decreases recoil by a cumulative 5%, up to a max of 25% at rank 5.
- Unchanged: Chance to stagger enemies.

 

 

 

b) Currently I've got this "recoil control" system set to be player-only, as an optimisation effort. Part of the script actually detects when the weapon has been equipped by an NPC and checks to see if it's got a "recoil control" omod attached, and removes it if so. (Which should only come up if an NPC equips a weapon that the player has been using.)

 

The recoil control function in the script only runs on equip and is pretty fast, so it might not be an issue to have it run on NPCs, but it does loop through a struct, counting up the number of relevant perk ranks the actor has. I didn't think that having these different recoil control values on NPCs would be noticeable enough for it to be worth having a script function like that running every time an NPC somewhere near you equips a weapon.

 

Having said all that, WARS changes who spawns with what kind of weapon, so you're mostly not going to be seeing things like miniguns and gatling lasers on anyone that isn't a super mutant or in power armour. And if you do, they'll be subject to other, more noticeable penalties if they don't meet the STR REQ, like decreased movement speed.

 

 

c) Crocodiles famously reached a peak of evolution many millions of years ago and haven't really needed to change ever since, so I expect they won't care. :wink:

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...