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

Add Vehicle Damage (ACE2 port) & Enhance Cook-Off #7565

Merged
merged 60 commits into from
Oct 14, 2021

Conversation

TheCandianVendingMachine
Copy link
Contributor

@TheCandianVendingMachine TheCandianVendingMachine commented Mar 1, 2020

When merged this pull request will:

  • Port over ACE 2 Vehicle Damage
  • Remove vehicle damage from cookOff module
  • Enhance cook-off effects

Some magic numbers exist, most of them are either direct ports from ACE 2 or I just forgot to remove them. Most of them are there for calculations however and are static anyhow.

A bunch of config entries get added through this. Most of them are required or else you get a very subpar implementation

It should work automatically with most mod vehicles with some alright default settings

In testing it seems to work reliably with no unreasonable lack of vehicle damage occurring, however I need to test with mod vehicles to ensure cross compatibility with minimal effort. The only config changes are to define ERA and SLAT hitpoints as well as giving custom burn chances for hits to certain areas. Ammo also needs to have an incendiary value defined if it is indeed incendiary

Todo:

  • Test in multiplayer - Result: all effects are global and no effects are duplicated. G2G
  • Test with various mod vehicles - Result: Tested with RHS against RHS, Vanilla against RHS, and RHS against vanilla. All interactions are as expected. Even CUP seems to work out of the box (mostly). G2G
  • Test in a large scale environment
  • Polishing

Video of it in action

Infantry on fire after cookoff

Requires #8245

addons/cookoff/XEH_postInit.sqf Show resolved Hide resolved
addons/cookoff/XEH_postInit.sqf Outdated Show resolved Hide resolved
addons/cookoff/functions/fnc_cookOff.sqf Outdated Show resolved Hide resolved
addons/cookoff/functions/fnc_cookOff.sqf Outdated Show resolved Hide resolved
addons/cookoff/functions/fnc_cookOffEffect.sqf Outdated Show resolved Hide resolved
addons/vehicleDamage/functions/fnc_processHit.sqf Outdated Show resolved Hide resolved
addons/vehicleDamage/functions/fnc_processHit.sqf Outdated Show resolved Hide resolved
addons/vehicleDamage/functions/fnc_processHit.sqf Outdated Show resolved Hide resolved
addons/vehicleDamage/functions/fnc_processHit.sqf Outdated Show resolved Hide resolved
addons/vehicleDamage/functions/fnc_processHit.sqf Outdated Show resolved Hide resolved
@TheCandianVendingMachine
Copy link
Contributor Author

with this latest commit idk if that's how I'm "supposed" to do required addons. I just added every config that I touched

@Whigital
Copy link
Contributor

Whigital commented Mar 4, 2020

I'm no expert, so correct me if i'm wrong, but the required vanilla A3 CfgPatches (A3_Data_F_Enoch_Loadorder and A3_Data_F_Mod_Loadorder) are implicitly added through cba_common -> cba_main -> ace_main -> ace_common.

So only ace modules that this is dependent on needs to be in there ....

Copy link
Contributor

@shukari shukari left a comment

Choose a reason for hiding this comment

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

some german translations
@bux can you check it

<Project name="ACE">
<Package name="Fire">
<Key ID="STR_ACE_fire_category_displayName">
<English>ACE Fire</English>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<English>ACE Fire</English>
<English>ACE Fire</English>
<German>ACE Feuer</German>

<English>ACE Fire</English>
</Key>
<Key ID="STR_ACE_fire_Actions_PatDown">
<English>Pat Down Fire</English>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<English>Pat Down Fire</English>
<English>Pat Down Fire</English>
<German>Feuer ausklopfen</German>

<English>Pat Down Fire</English>
</Key>
<Key ID="STR_ACE_fire_Actions_PerformingPatDown">
<English>Patting Down Fire</English>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<English>Patting Down Fire</English>
<English>Patting Down Fire</English>
<German>Feuer ausklopfen</German>

<English>Patting Down Fire</English>
</Key>
<Key ID="STR_ACE_fire_setting_enable">
<English>Enable</English>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<English>Enable</English>
<English>Enable</English>
<German>Aktivieren</German>

addons/fire/stringtable.xml Outdated Show resolved Hide resolved
<Project name="ACE">
<Package name="vehicledamage">
<Key ID="STR_ACE_vehicledamage_category_displayName">
<English>ACE Advanced Vehicle Damage</English>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<English>ACE Advanced Vehicle Damage</English>
<English>ACE Advanced Vehicle Damage</English>
<German>ACE Erweiterter Fahrzeugschaden</German>

<English>ACE Advanced Vehicle Damage</English>
</Key>
<Key ID="STR_ACE_vehicledamage_setting_enable">
<English>Enable</English>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<English>Enable</English>
<English>Enable</English>
<German>Aktivieren</German>

<English>Enable</English>
</Key>
<Key ID="STR_ACE_vehicledamage_setting_description">
<English>Enable/Disable advanced vehicle damage</English>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<English>Enable/Disable advanced vehicle damage</English>
<English>Enable/Disable advanced vehicle damage</English>
<German>Aktiviert/Deaktiviert das erweiterte Fahrzeugschadenssystem</German>

<English>Enable/Disable advanced vehicle damage</English>
</Key>
<Key ID="STR_ACE_vehicledamage_carDamage_setting_description">
<English>Enable/Disable advanced car damage (Experimental)</English>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<English>Enable/Disable advanced car damage (Experimental)</English>
<English>Enable/Disable advanced car damage (Experimental)</English>
<German>Aktiviert/Deaktiviert das erweiterte Autoschadenssystem (Experimentell)</German>

<English>Enable/Disable advanced car damage (Experimental)</English>
</Key>
<Key ID="STR_ACE_vehicledamage_carDamage_setting_enable">
<English>Enable/Disable advanced Car Damage</English>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<English>Enable/Disable advanced Car Damage</English>
<English>Enable/Disable advanced Car Damage</English>
<German>Aktiviert/Deaktiviert das erweiterte Autoschadenssystem</German>

@jonpas
Copy link
Member

jonpas commented Apr 20, 2021

Need to fix merge conflicts.

@nomisum
Copy link
Contributor

nomisum commented Apr 24, 2021

We had 2 games now with the following issue occuring:

Crew gets heavily injured or even killed by light collisions of vehicle with tree.

@TheCandianVendingMachine TheCandianVendingMachine changed the title Add Vehicle Damage (ACE2 port), Fire & Enhance Cook-Off Add Vehicle Damage (ACE2 port) & Enhance Cook-Off May 6, 2021
@TheCandianVendingMachine
Copy link
Contributor Author

Can't reproduce

@nomisum
Copy link
Contributor

nomisum commented May 6, 2021

Can't reproduce

Hmmmm... I will try to find out more details. Possibly GM/Weferlingen related or sth.

could not repro either :(

@SzwedzikPL
Copy link
Contributor

I've played small dedicated MP game with it with CUP and GM without any issues. Looked like everything worked as intended.

Played it on master 76676ee + this PR.

@nomisum
Copy link
Contributor

nomisum commented May 30, 2021

Longing for this to be merged. Its optional anyway so no big risk 😅

@PabstMirror PabstMirror changed the base branch from master to BFT July 2, 2021 03:13
@PabstMirror PabstMirror changed the base branch from BFT to master July 2, 2021 03:14

| Arguments | Type | Optional (default value)
---| --------- | ---- | ------------------------
0 | Fire source ID | Any | Required
Copy link
Contributor

@rautamiekka rautamiekka Jul 2, 2021

Choose a reason for hiding this comment

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

There seems to be a typo somewhere in the 1.1 Adding a new fire source cuz everything since is broken.

@TheCandianVendingMachine
Copy link
Contributor Author

Wouldn't these statements make more sense (just like it's generally adviced) to check _mass == 0 once, then branch out into the isClass checks ?

if (_mass == 0) then {
    if (isClass (_config >> "itemInfo")) then {
        _mass = getNumber (_config >> "itemInfo" >> "mass");
    };

    if (isClass (_config >> "WeaponSlotsInfo")) then {
        _mass = getNumber (_config >> "WeaponSlotsInfo" >> "mass");
    };
};

Couldn't find if elseif exists.

I don't think you are on the right PR

@jonpas
Copy link
Member

jonpas commented Oct 12, 2021

@shukari can you PR translations separately? GitHub considers them outdated as that file got changed, plus Fire is split into a separate component now.

Copy link
Member

@jonpas jonpas left a comment

Choose a reason for hiding this comment

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

Has been playtested for over a year at @PabstMirror's and @TheCandianVendingMachine's group.

@shukari
Copy link
Contributor

shukari commented Oct 12, 2021

Yeah no problem

pterolatypus added a commit to pterolatypus/ACE3 that referenced this pull request Oct 12, 2021
jonpas added a commit to Theseus-Aegis/ACE3 that referenced this pull request Oct 13, 2021
@jonpas jonpas added kind/feature Release Notes: **ADDED:** and removed kind/added feature labels Oct 14, 2021
@PabstMirror PabstMirror merged commit c4156a6 into acemod:master Oct 14, 2021
pterolatypus added a commit to pterolatypus/ACE3 that referenced this pull request Oct 14, 2021
AndreasBrostrom pushed a commit to AndreasBrostrom/ACE3 that referenced this pull request Dec 3, 2021
* Initital port of ACE2 Vehicle Damage

* Add fire damage and burning people

* Migrate vehicle damge stuff from cookoff. Change cookoff function to enhance effect.

* Minor tweaks

* Add incendiary values to all applicable ammunition. Add engine fire/smoke if hit enough

* Handle car damage more elegantly.

* Added ability to create fire sources arbitrarily

* tweaks

* Add chance to detonate after cookoff

* disable compile cache

* Move blown-off turret config to vehicle damage. Add settings inititalized EH for initializing off settings

* tabs->spaces

* Various code improvements

* Change to count loop for deleting effects

* update addon requirements

* remove vanilla config requirements

* Add RHS compatability

* RHS compat. Various QOL fixes/changes

* Various tweaks to compats and code.

* High-Explosive damage tweak

* Change how penetration is calculated for parts

* Fix RHS compat

* Create setting for flare effect

* increase burning scream sounds

* swap out file name for snake_case

* move incendiary values out of vehicle damage. remove medical dependency

* vehicle_dammage - update all refs to snake

* sqf fixes

* fix fire string package caps

* fix pboprefix

* Default setting to on

* Add variables to enable/disable ring fire to avoid goofy looking vehicles. Enhance how particles are cleaned up. Remove advanced penetration simulation. Change how fire intensity is calculated. Add setting to "disable" vehicle after cookoff

* Fix bug where event handler wasn't giving the damage last.

* change to snake

* fix build errors

* Fix UBC

* Fix Order of Operations

* avoid O^2 events

* Make sure that no damage processing happens on dead units

* Change some if statements

* Keep track of player's death to stop various things

* add quotes to right middle wheen

* Add VD documentation

* fire docs

* Code quality fixes

* Clarify documentation

* define IDD

* switch global -> server

* Add newline between header and first code statement

* stop the dead from suffering

Its hard to tell when a unit is dead or in spectator, so check the config of the unit to determine it.

* Add settings to disable cook-off effects

* Delete effects if vehicle is deleted before cookoff occurs. Don't cookoff player ammo. Throw weapon better

* Move fire into own PR

* fix tabs and macro

* Shuffle crew indices so that a random person is first on the list to be injured each time

* fix effects not clearing

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Release Notes: **ADDED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.