Fix: Prefix confusion, overwriting params#33
Open
Silence-112 wants to merge 1 commit intoLand-Strider:mainfrom
Open
Fix: Prefix confusion, overwriting params#33Silence-112 wants to merge 1 commit intoLand-Strider:mainfrom
Silence-112 wants to merge 1 commit intoLand-Strider:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(In regards to this conversation)
To explain the big issue and the one that honestly happens to the best of us:
When the prefix isn't changed, your ADDON compiles to
A3A_coresince PREFIX wasn't changed. This now becomes your CfgPatches entry prefix for your core and scrt addons (PREFIX_COMPONENT).So when you tell the game to load your ADDON (
A3A_core) afterA3A_core... it doesn't have a clue what to do. By changing the PREFIX toA3APCF, this makes your CfgPatches entries becomeA3APCF_component, e.gA3APFC_core. Now, the game knows to load your addon after the originalA3A_core. Normally this isn't an issue, till you start overwriting certain things - like in this case,maxConstructions.Does this change have unintended consequences? Possibly, but it fixes your param issue
For the config part:
This one is a minor nitpick and doesn't actually cause any issues iirc
When we create a new class, but define it as
class Whatever {};instead ofclass Whatever;it can confuse the engine sometimes. In this instance I don't think it does, though it's a fair thing to note and try to avoid. Have a read of this if you haven't already