Skip to content

Conversation

@Caball009
Copy link

@Caball009 Caball009 commented Jan 4, 2026

Implemented an override system for the ArmorStore like the ThingFactory to avoid potential mismatches because the original ArmorTemplate data is overwritten and not restored.

TODO:

  • Make implementation / code resemble that of the ThingFactory as much as possible.
  • Replicate in Generals.

…om maps to avoid CRC mismatch in the next multiplayer game session
@Caball009 Caball009 added Bug Something is not working right, typically is user facing Major Severity: Minor < Major < Critical < Blocker Stability Concerns stability of the runtime labels Jan 4, 2026
@Caball009 Caball009 marked this pull request as ready for review January 5, 2026 20:14
@Mauller
Copy link

Mauller commented Jan 6, 2026

I guess we can do something similar for weapon templates as well?

const NameKeyType key = TheNameKeyGenerator->nameToKey(name);

// TheSuperHackers @bugfix Caball009 04/01/2025 Avoid mismatches by creating overrides instead of overwriting the default data.
// The code resembles the code of the ThingFactory.
Copy link

Choose a reason for hiding this comment

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

Not directly related:

Can we perhaps make a change to streamline the override code between classes and then provide some code to avoid this boiler plate code in each of these classes that do overrides? Perhaps some template functions that help set it up.

Copy link
Author

Choose a reason for hiding this comment

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

I was also thinking along those lines. I figured I'd start with the simplest of the classes that need overrides to see what it's required and what the review comments would be.

@Mauller I'll see if I can find a way to reuse the same code for all these INI parsers that require overrides.

Copy link

Choose a reason for hiding this comment

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

Ok how do you wish to proceed with this matter?

Possible strategy:

  1. Clean up all existing INI override code and streamline their implementions
  2. Provide helper code for all INI override boiler plate code and place them in EA code
  3. Add INI overrides with helper code to all remaining classes that need INI overrides (very complex)

Copy link
Author

@Caball009 Caball009 Jan 8, 2026

Choose a reason for hiding this comment

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

I've started with this. I need to check out all INI overrides, though, because some classes do stuff that others don't.

I think I can show the code I'm working on in a couple of days.

Copy link
Author

Choose a reason for hiding this comment

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

@xezon #2083 I'm thinking of streamlining it like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something is not working right, typically is user facing Major Severity: Minor < Major < Critical < Blocker Stability Concerns stability of the runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mismatch in ArmorTemplate data after playing a map with map.ini with changes to the armor templates

3 participants