Skip to content

Fix: Prefix confusion, overwriting params#33

Open
Silence-112 wants to merge 1 commit intoLand-Strider:mainfrom
Silence-112:main
Open

Fix: Prefix confusion, overwriting params#33
Silence-112 wants to merge 1 commit intoLand-Strider:mainfrom
Silence-112:main

Conversation

@Silence-112
Copy link
Copy Markdown

@Silence-112 Silence-112 commented Mar 26, 2026

(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_core since 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) after A3A_core... it doesn't have a clue what to do. By changing the PREFIX to A3APCF, this makes your CfgPatches entries become A3APCF_component, e.g A3APFC_core. Now, the game knows to load your addon after the original A3A_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 of class 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

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.

1 participant