Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Casings - Improve Ace Casings to include 40mm casings #9716

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

GabrielPearce
Copy link

adds parameter FxCartridge_40mm to the 40mm classes. (grenadecore)

When merged this pull request will:

  • Describe what this pull request will do

This pull request will enable underbarrel grenade launchers (40mm) to be included in creating casings on the ground.
This is done by two changes.

1.Adding to config.cpp a cfgammo edit that changes the 40mm grenades classes to include a cartridge parameter called "FxCartridge_40mm"

2.editing fnc_createcasing.sqf to include a search for this casing and applying the relevant 3d model for this casing

Each change in a separate line

IMPORTANT

  • If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
  • Development Guidelines are read, understood and applied.
  • Title of this PR uses our standard template Component - Add|Fix|Improve|Change|Make|Remove {changes}.

@GabrielPearce GabrielPearce changed the title Improve Ace Casings to include 40mm casings Casings - Improve Ace Casings to include 40mm casings Jan 7, 2024

class G_40mm_HE: GrenadeBase {
// Override the specific parameters here
cartridge = "FxCartridge_40mm";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class doesn't exist. This will cause issues at some point.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we add a new config
QGVAR(modelPath) = x.p3d

_modelPath = getText (configFile >> "CfgAmmo" >> _ammo >> QGVAR(modelPath));

if (_modelPath == "") then {
    private _cartridge = getText (configFile >> "CfgAmmo" >> _ammo >> "cartridge");
// use cartridge lookup switch...

also, we could move the cartridge->modelPath to be config based instead of the switch?

I'm happy to do the work if this sounds ok

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was doing that exact thing but got ADHD'd.

Also we'd need handling for firing UBGLs in this specific case, as most of those shouldn't drop casings until reload.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could handle shells on reload

["CAManBase", "Reloaded", {
    params ["_unit", "_weapon", "_muzzle", "_newMagazine", "_oldMagazine"];
    if (_unit != ACE_player) exitWith {};
    if (isNil "_oldMagazine") exitWith {};
    // if (!_muzzle isKindOf GL) exitWith {};
    _oldMagazine params ["_mag", "_ammo"];
    if (_ammo != 0) exitWith {};

    systemChat "making shell"; 
    //global event?

}] call CBA_fnc_addClassEventHandler;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At that point, might as well have a mag drop component for spent reloads (this is why dropped work on this)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a good idea, casings make sense and it would be ideal on the point of reload.

Magazines are not typically dropped unless things are really dire so I personally don't think you need to worry about them

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magazines are not typically dropped unless things are really dire so I personally don't think you need to worry about them

Very true, but in Arma they vanish into thin air once you reload your gun and the magazine loaded in the gun is empty (unless you are running the Green Ammo mod). If we were to take grenade casings after reload into account, why not empty magazines? Empty magazines would either need to be returned into the player's inventory or dropped onto the ground.


Going down this route is going to open a can of worms imo. I'm with @LinkIsGrim - this needs to be thought out better and done properly.

Copy link
Author

@GabrielPearce GabrielPearce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is a good idea and improved on my original idea

@acknowledge14
Copy link

Hi, does this excluded caseless grenades (eg. VOG-15) like those fired from GP-25?

@rautamiekka
Copy link
Contributor

Hi, does this excluded caseless grenades (eg. VOG-15) like those fired from GP-25?

It should exclude those since the whole grenade is launched, so there's no case to leave behind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants