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

Overpressure - Separate backblast and overpressure range coefficient #10070

Merged
merged 26 commits into from
Jun 20, 2024
Merged

Overpressure - Separate backblast and overpressure range coefficient #10070

merged 26 commits into from
Jun 20, 2024

Conversation

bluefieldcreator
Copy link
Contributor

When merged this pull request will:

  • Allow for backblast and overpressure distances to be configured individually

The original code forced all backblast and overpressure coefs to work together as one, meaning if you wanted the backblast of an RPG but not the overpressure of a tank firing, you just couldnt do it.

Now you can configure each individually through the range slider.

Notes: This is my first PR for SQF code & ACE ever, I'd appreciate all critcisim regarding the code and possible improvements.

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}.

@bluefieldcreator bluefieldcreator marked this pull request as draft June 14, 2024 11:32
@bluefieldcreator bluefieldcreator changed the title Overpressure - Separate backblast and overpressure configurations Overpressure - Improve backblast and overpressure configurations Jun 14, 2024
@bluefieldcreator bluefieldcreator marked this pull request as ready for review June 14, 2024 18:04
@bluefieldcreator
Copy link
Contributor Author

Ready for review.

@bluefieldcreator bluefieldcreator changed the title Overpressure - Improve backblast and overpressure configurations Overpressure - Add backblast configuration Jun 14, 2024
@Drofseh
Copy link
Contributor

Drofseh commented Jun 15, 2024

Extra setting is good, but why move the config lookups?

I would do as follows

fnc_getOverPressureValues

_return = [
    (getNumber (_config >> QGVAR(angle))),
    (getNumber (_config >> QGVAR(range))),
    (getNumber (_config >> QGVAR(damage))),
    (getNumber (_config >> QGVAR(offset)))
];

fnc_firedEHBB

_bbValues params ["_backblastAngle", "_backblastRange", "_backblastDamage", "_offset"];
_backblastRange = _backblastRange * GVAR(backblastDistanceCoefficient);

fnc_firedEHOP

_opValues params ["_dangerZoneAngle", "_dangerZoneRange", "_dangerZoneDamage"];
_dangerZoneRange = _dangerZoneRange * GVAR(overpressureDistanceCoefficient);

@bluefieldcreator
Copy link
Contributor Author

Extra setting is good, but why move the config lookups?

I would do as follows

fnc_getOverPressureValues

_return = [
    (getNumber (_config >> QGVAR(angle))),
    (getNumber (_config >> QGVAR(range))),
    (getNumber (_config >> QGVAR(damage))),
    (getNumber (_config >> QGVAR(offset)))
];

fnc_firedEHBB

_bbValues params ["_backblastAngle", "_backblastRange", "_backblastDamage", "_offset"];
_backblastRange = _backblastRange * GVAR(backblastDistanceCoefficient);

fnc_firedEHOP

_opValues params ["_dangerZoneAngle", "_dangerZoneRange", "_dangerZoneDamage"];
_dangerZoneRange = _dangerZoneRange * GVAR(overpressureDistanceCoefficient);

Exactly what I was trying to do, my brain was quite fried the other day so I just went the hardcoded way. I'll implement this.

@LinkIsGrim
Copy link
Contributor

Probably want to change title to something like "separate backblast and overpressure range coefficient"

LGTM tho

@LinkIsGrim LinkIsGrim added this to the 3.18.0 milestone Jun 15, 2024
@LinkIsGrim LinkIsGrim added the kind/setting Release Notes: **SETTINGS:** label Jun 15, 2024
@bluefieldcreator bluefieldcreator changed the title Overpressure - Add backblast configuration Overpressure - Separate backblast and overpressure range coefficient Jun 15, 2024
@bluefieldcreator
Copy link
Contributor Author

Thanks @LinkIsGrim

LinkIsGrim and others added 2 commits June 16, 2024 14:39
Co-authored-by: Drofseh <[email protected]>
Co-authored-by: Drofseh <[email protected]>
Co-authored-by: johnb432 <[email protected]>
Copy link
Contributor

@PabstMirror PabstMirror left a comment

Choose a reason for hiding this comment

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

  • need to change xeh_postInit (lines 4 and 5)
  • can remove ACE_Settings.hpp

addons/overpressure/initSettings.inc.sqf Outdated Show resolved Hide resolved
addons/overpressure/XEH_postInit.sqf Outdated Show resolved Hide resolved
addons/overpressure/initSettings.inc.sqf Outdated Show resolved Hide resolved
addons/overpressure/initSettings.inc.sqf Outdated Show resolved Hide resolved
addons/overpressure/initSettings.inc.sqf Outdated Show resolved Hide resolved
addons/overpressure/XEH_postInit.sqf Outdated Show resolved Hide resolved
addons/overpressure/XEH_postInit.sqf Show resolved Hide resolved
Co-authored-by: Drofseh <[email protected]>
@bluefieldcreator
Copy link
Contributor Author

Will fix all this later today. Thanks for the reviews.

@bluefieldcreator
Copy link
Contributor Author

Im gonna be honest, no clue what im doing with the stringtables lol

@johnb432
Copy link
Contributor

Im gonna be honest, no clue what im doing with the stringtables lol

I'll try to take care of it.

@johnb432
Copy link
Contributor

Do we want to add separate arsenal stats for overpressure? I imagine it's not necessary, given that infantry weapons usually don't create overpressure - or am I mistaken?

@LinkIsGrim
Copy link
Contributor

They don't

@rautamiekka
Copy link
Contributor

rautamiekka commented Jun 18, 2024

infantry weapons usually don't create overpressure

I know the Barrett 50cal creates some kinda backblast (as you could expect from needing a massive muzzle break and the heavy recoil mitigation for a stupidly powerful ammo like that) but dunno about overpressure nor the force of it. Currently the only indication of it in the game is the dust/sand.

@LinkIsGrim
Copy link
Contributor

infantry weapons usually don't create overpressure

I know the Barrett 50cal creates some kinda backblast (as you could expect from needing a massive muzzle break and the heavy recoil mitigation for a stupidly powerful ammo like that) but dunno about overpressure nor the force of it. Currently the only indication of it in the game is the dust/sand.

Are you sure about that?

@Drofseh
Copy link
Contributor

Drofseh commented Jun 18, 2024

infantry weapons usually don't create overpressure

I know the Barrett 50cal creates some kinda backblast (as you could expect from needing a massive muzzle break and the heavy recoil mitigation for a stupidly powerful ammo like that) but dunno about overpressure nor the force of it. Currently the only indication of it in the game is the dust/sand.

Are you sure about that?

Rifles (especially with aggressive muzzle brakes or porting) can create uncomfortable conditions for those around them, but not to the degree of backblast/overpressure caused by launchers and cannons.

Many shooting ranges have mufflers like these to make shooting nicer for the people at the next station.

https://enoughgun.com/forum/download/file.php?id=4719&sid=c2eede1b5f90baab724bf9b8691273db

@bluefieldcreator
Copy link
Contributor Author

infantry weapons usually don't create overpressure

I know the Barrett 50cal creates some kinda backblast (as you could expect from needing a massive muzzle break and the heavy recoil mitigation for a stupidly powerful ammo like that) but dunno about overpressure nor the force of it. Currently the only indication of it in the game is the dust/sand.

Are you sure about that?

Rifles (especially with aggressive muzzle brakes or porting) can create uncomfortable conditions for those around them, but not to the degree of backblast/overpressure caused by launchers and cannons.

Many shooting ranges have mufflers like these to make shooting nicer for the people at the next station.

https://enoughgun.com/forum/download/file.php?id=4719&sid=c2eede1b5f90baab724bf9b8691273db

It'd be cool, but im not too sure how I'd implement such setting, I am not familiar with the Arma 3 Config system.

On the other hand, I dont think it'd be used much, heavy weapon users do tend to be separated too mcuh for a feature like this to be worth noticing, whilist vehicle ovepressure is very noticeable if you are next to a tank.

@Drofseh
Copy link
Contributor

Drofseh commented Jun 19, 2024

It'd be cool, but im not too sure how I'd implement such setting

I dont think it'd be used much

Don't, it's not worth doing imo. I was just pointing out that rifles can have a certain amount of muzzle blast.

Copy link
Contributor

@johnb432 johnb432 left a comment

Choose a reason for hiding this comment

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

In general looks good to me, but I'd ideally like to see the setting name reverted to what is was previously, instead of replacing it with a new one. Given nobody else from the ACE team has voiced their support for that, we'll leave it as it is atm.

@johnb432 johnb432 merged commit 1439680 into acemod:master Jun 20, 2024
5 checks passed
blake8090 pushed a commit to blake8090/ACE3 that referenced this pull request Aug 18, 2024
…cemod#10070)

* feat: separate overpressure and backblast configurations

* documentation: remove undefined return

* typo: trace macro padding

* refactor: add range<number> return

* refactor: reuse return values for overpressure coef

* refactor: reuse return values for backblast coef

* whitespace

Co-authored-by: Drofseh <[email protected]>

* headers

Co-authored-by: Drofseh <[email protected]>
Co-authored-by: johnb432 <[email protected]>

* feat: change backblast limit to 0

Co-authored-by: PabstMirror <[email protected]>

* remove: deleted ACE_Settings.hpp

* fix: update postInit.sqf event handler to register new GVARs

* fix: remove `ACE_Settings.hpp`

* typo: add spacing

Co-authored-by: Drofseh <[email protected]>

* typo: fix spacing

Co-authored-by: johnb432 <[email protected]>

* feat: switch distanceCoef minimun value to 0

Co-authored-by: johnb432 <[email protected]>

* typo: update the slider checks with new minimuns

temporary solution until i figure out the EH

Co-authored-by: johnb432 <[email protected]>

* feat: new stringable elements

* Update stringtable.xml

* Added translations

* Switched order of settings to match age of settings

* setting require restart, split adding firedEH

* Added notifications about mission restart

---------

Co-authored-by: Grim <[email protected]>
Co-authored-by: Drofseh <[email protected]>
Co-authored-by: johnb432 <[email protected]>
Co-authored-by: PabstMirror <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/setting Release Notes: **SETTINGS:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants