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 'name' value to all CfgPatches #365

Merged
merged 1 commit into from
Jun 6, 2016
Merged

Add 'name' value to all CfgPatches #365

merged 1 commit into from
Jun 6, 2016

Conversation

commy2
Copy link
Contributor

@commy2 commy2 commented Jun 5, 2016

See: https://community.bistudio.com/wiki/CfgPatches

  • also fixes certain objects placed in 3DEN causing the mission to require CBA due to use touching the class by adding XEH classes.
  • also uses the new "name" instead of the configs classname in the help module (if present)

@commy2 commy2 added the WIP label Jun 5, 2016
@commy2
Copy link
Contributor Author

commy2 commented Jun 5, 2016

This is used in that required-addons-for-this-mission-feature (CfgPatches rework) from 1.60
http://i.imgur.com/tjVRo0W.png

Unfortunately the game uses configSourceMod to detect the origin of a class instead of units[], which means that every class where we fix for example class EventHandlers is detected as CBA-only class.
That is annoying and I'm searching for a work around, but I'm not sure I can fix that.

I'm not sure why they use that backwards method, when they have unitAddons

unitAddons "C_Driver_1_F"
-> ["A3_Characters_F"]

configSourceMod ("C_Driver_1_F" call CBA_fnc_getObjectConfig)
-> "CBA_A3"

configSourceModList ("C_Driver_1_F" call CBA_fnc_getObjectConfig)
-> ["kart","CBA_A3"]

@@ -2,6 +2,9 @@
#ifndef EH_DEBUG_ENABLED
class CfgPatches {
class cba_diagnostics_xeh_disabled {
author = "$STR_CBA_Author";
name = "$STR_CBA_Optional_Component";
Copy link
Member

Choose a reason for hiding this comment

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

ECSTRING(Optional,Component)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wouldn't that imply that "Optional" is a component?

Copy link
Member

Choose a reason for hiding this comment

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

It would expand to the above. Not sure about semantics, if you are worried people might be looking for "optional" component then it might be best to leave it like that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added it everywhere I can, but there are some PBOs that don't or can't include the script_mod

@jonpas
Copy link
Member

jonpas commented Jun 5, 2016

Make a ticket on A3 feedback tracker about it?

@commy2
Copy link
Contributor Author

commy2 commented Jun 5, 2016

I actually found a funny way to solve this. You can add the addonRootClass which is supposed to be used in secondary configs in a component.

By adding:
addonRootClass = "A3_Characters_F"

That particular unit no longer requires "CBA - XEH". The problem is, that you can obviously only add one addonRootClass per component.

In 3DEN the unit is still shown with the CBA icon, but that has been the case before too.

@commy2
Copy link
Contributor Author

commy2 commented Jun 5, 2016

NVM. Actually addonRootClass pushes every redefined class to the linked component. I'm going with A3_Characters_F since logic implies that at least one soldier has to exist in a mission anyway, right?

@commy2 commy2 added this to the 2.4.1 milestone Jun 5, 2016
@Killswitch00 Killswitch00 merged commit 446455d into master Jun 6, 2016
@thojkooi thojkooi deleted the component_names branch June 16, 2016 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants