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

ACE No Med scripted damage compatibilities #140

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

Conversation

Alien314
Copy link
Collaborator

@Alien314 Alien314 commented Dec 2, 2024

Adds compatibility pbos for ACE Fire, Overpressure, and Vehicle Damage, overwriting functions that use setDamage to use diw_armor_plates_main_fnc_receiveDamage instead when armor plates system is enabled, and adding compatibility settings to tweak damage.

@Alien314 Alien314 linked an issue Dec 2, 2024 that may be closed by this pull request
@@ -0,0 +1 @@
[QPATHTOF(functions\fnc_burnSimulation.sqf), QUOTE(DOUBLES(REPLACEMOD,fnc_burnSimulation))] call CBA_fnc_compileFunction;
Copy link
Owner

Choose a reason for hiding this comment

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

what is going on here, why not just use the normal prep macro?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Replaces an ace function, using the normal prep would just create a new one not used by ace.

Copy link
Owner

Choose a reason for hiding this comment

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

is this file really needed if ace mode handles ace damage already?

#include "script_component.hpp"
ADDON = false;

GVAR(aceMedicalLoaded) = isClass(configFile >> "CfgPatches" >> "ace_medical_engine");
Copy link
Owner

Choose a reason for hiding this comment

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

can also exit out early if ace is loaded, as that is already handled by ace itself

};

#include "XEH_PREP.hpp"
call compile preprocessFileLineNumbers format["%1\XEH_preInit.sqf",REPLACEPATH];
Copy link
Owner

Choose a reason for hiding this comment

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

Why do you need to run the ace fire pre init here? Shouldn't it run on its own?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The config.cpp replaces ace fire's preInit and preStart, and this is specifically replacing a function that would otherwise be locked by cba_compile_function in ace's preStart.
CBATeam/CBA_A3#788 (comment)

INFO("PreStart: Disabled --> old ACE medical loaded");
};
#include "XEH_PREP.hpp"
call compile preprocessFileLineNumbers format["%1\XEH_preStart.sqf",REPLACEPATH];
Copy link
Owner

Choose a reason for hiding this comment

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

Same question here, doesn't this run on its own.

#define PATCH_SKIP "ACE Fire"
#endif

#ifndef PATCH_SKIP
Copy link
Owner

Choose a reason for hiding this comment

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

why not just use the else case here, ace fire not loaded will just skip this config completely, including the pre init and pre start eventhandlers

Copy link
Owner

Choose a reason for hiding this comment

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

more clarification, when this is added in the cfgpatches child skipWhenMissingDependencies = 1;

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's how ACE has their "No Medical" medical skip set up, so I was just copying that.

Copy link
Owner

Choose a reason for hiding this comment

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

Just putting the comment here so it has a focused discussion.

I looked into the ace code to check what is going on. Yeah you need to overwrite and replace the functions, which i frankly do not really like, yet there is no other option right now other than doing some execNextFrame fuckery, which is also fairly ugly.

I will test those changes once i get the chance, but i also would suggest that ACE should get some PR to allow easier handling of these things. So this compats are a lot easier and clearer. I might get on that as well once i get some free time.

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.

ACE - No Medical Overpressure Compatibility
2 participants