ACE3 icon indicating copy to clipboard operation
ACE3 copied to clipboard

CSW - Add CSW ammo handling to wheeled vehicles

Open killerswin2 opened this issue 3 years ago • 19 comments

When merged this pull request will:

  • Add ammo handling to the vehicle's interaction menu
  • Adds a few more ammo types that these vehicles require
  • This support was extended to SOG and RHS compats. I would do more but I don't own any other CDLCs
  • The new csw turrents all got custom load and unload times.
  • magazine locations were left on the vehicle, but they can be moved else were if someone has the time to find the correct name selections for about 75 objects (<- maybe someone who has a lot more free time then me)
  • stringTables where added, translations will be needed later
  • SOG got two more ui pictures, one for zpu and one for m40 ammo
  • RHS slap ammo was added to CSW but only the 400 count for crows weapon systems

Videos of use https://youtu.be/biR3zFmbXpU

November 1st 2022 Update Video https://youtu.be/mUeDi7owfO4

killerswin2 avatar Oct 27 '22 22:10 killerswin2

ARMA3 rhsafrf rhsgref rhssaf rhsusaf sog here are svgs of the inheritance that I used

killerswin2 avatar Oct 27 '22 22:10 killerswin2

All the cDLC's have a compatibility data mod in the Workshop for those who don't have the cDLC, the diff being it's only good for joining the multiplayer and checking the stuff out in Arsenal, if the descriptions can be trusted.

rautamiekka avatar Oct 28 '22 00:10 rautamiekka

yeah I'm a bit iffy on compatibility data, the only one that I trust is the sog one.

killerswin2 avatar Oct 28 '22 00:10 killerswin2

Without code changes this is dirty implementation.

Reload should be only from turret seat. On some vehicles only turned out. In your video at 1:03 SPG auto reloaded. As I understand ammo not removed/unloaded from turret on spawn. I think vehicle inventory can not be used for loading/unloading mags in this implementation. Will work only from/to backpack?

Also in theory some mags should be interchangeable between vehicle and player's weapon. For example M240.

severgun avatar Nov 01 '22 14:11 severgun

I think vehicle inventory can not be used for loading/unloading mags in this implementation. Will work only from/to backpack?

bd396d1 Added support for getting ammo out of the vehicle, but originally this work already if you had ammo in the vehicle because CWS uses nearestSupplies for searching. [PR here] (https://github.com/acemod/ACE3/pull/8776)

Also in theory some mags should be interchangeable between vehicle and player's weapon. For example M240.

m240 is defined that way. https://github.com/acemod/ACE3/blob/a088e717af24b8988f7b1c41e713030b9d0b8cac/optionals/compat_rhs_usf3/CfgMagazineGroups.hpp#L27 There is actually multiple of those in the magazinegroups.

Reload should be only from turret seat. On some vehicles only turned out.

I disagree on that idea. If the weapon is out in the open and I can see it and physically touch it then why should I not be able to operate it like a regular static weapon. The difference is that one weapon is attached to wheel while the other is not.

In your video at 1:03 SPG auto reloaded

Turrets auto reload when empty or unload. I believe that is a base game feature.

killerswin2 avatar Nov 02 '22 00:11 killerswin2

I disagree on that idea. If the weapon is out in the open and I can see it and physically touch it then why should I not be able to operate it like a regular static weapon. The difference is that one weapon is attached to wheel while the other is not.

IRL you can't reach a gun from ground on any vehicle. Even on pickup. Also IRL some weapons only reachable from certain(not always gunner) seats. Reload from anywhere feels like exploit.

ammo handling to wheeled vehicles

What is wrong with tracked?

severgun avatar Nov 07 '22 10:11 severgun

My intent was just Wheeled vehicles. I don't have plans to expand this pr. It's already big enough for review.

killerswin2 avatar Nov 11 '22 21:11 killerswin2

imo I don't like the mix of the vanilla system of storing extra ammo. Spawning a vehicle with 3 extra mags, but only being able to unload them and never reload feels really weird to me. I think it'd be better to have a onInit handler that removes all the compatible default ammo and switch them to CSW mags in the inventory whenever the system is enabled.

BrettMayson avatar Jun 20 '23 17:06 BrettMayson

That's a genius idea!

killerswin2 avatar Jun 20 '23 17:06 killerswin2

imo I don't like the mix of the vanilla system of storing extra ammo. Spawning a vehicle with 3 extra mags, but only being able to unload them and never reload feels really weird to me. I think it'd be better to have a onInit handler that removes all the compatible default ammo and switch them to CSW mags in the inventory whenever the system is enabled.

Moving the magazines to inventory may break loadouts for existing missions.

Drofseh avatar Jun 20 '23 19:06 Drofseh

Moving the magazines to inventory may break loadouts for existing missions.

Was there not a way to go over the cargo space limit?

BrettMayson avatar Jun 20 '23 19:06 BrettMayson

yeah, I know addItemCargoGlobal will do that

killerswin2 avatar Jun 20 '23 19:06 killerswin2

Moving the magazines to inventory may break loadouts for existing missions.

Was there not a way to go over the cargo space limit?

addItemCargoGlobal will do it as killerswin2 says, but that's still problematic as a full inventory prevents players from putting things into the inventory during gameplay.

For example, if the vehicle has a toolkit and is overfilled with CSW ammo, I take the toolkit to repair the vehicle, now I cannot put the toolkit back in the vehicle.

Drofseh avatar Jun 20 '23 22:06 Drofseh

setMaxLoad to compensate for the additional items?

Still preferable to the current mix of vanilla and inventory

BrettMayson avatar Jun 20 '23 23:06 BrettMayson

setMaxLoad to compensate for the additional items?

Still preferable to the current mix of vanilla and inventory

That could work, get normal inventory capacity, get mass of all vehicle magazines, setMaxLoad to the total, add the vehicle magazines

Drofseh avatar Jun 21 '23 04:06 Drofseh

Alright, implemented. It's a option. If players don't want it they can have it turned off.

killerswin2 avatar Jun 22 '23 20:06 killerswin2

Linking a belt from a vehicle inventory deletes the magazine and breaks the link condition.

LinkIsGrim avatar Jun 26 '23 22:06 LinkIsGrim

I don't have any time to do this pr for the next three weeks.

killerswin2 avatar Jun 29 '23 00:06 killerswin2

someone else, will have to implement changes and bring this up to standards

killerswin2 avatar Jun 29 '23 00:06 killerswin2

We'll get to this.

LinkIsGrim avatar Apr 14 '24 15:04 LinkIsGrim