• Tracker

    Spaces
    Browse
    Statistics
  • /
  • /Reforger Modding
  • /ARMD-14
Back
1

Persistence: a mod's EntityPersistenceConfig can never win a prefab match against a vanilla config

General
1

State

Done
Issue key
ARMD-14
Access
Public
Space
Arma Reforger
Project
Reforger Modding
Creator
aaron_static
Created
Aug 11, 2026
Views
146
Platform
PC Steam
Game Version

1.7.0.54

Modlist

Overthrow

Description
When a mod supplies an `EntityPersistenceConfig` whose rule matches a prefab that a vanilla persistence config also matches, the vanilla config is always selected, regardless of the mod config's `Priority` and regardless of match specificity. This makes it impossible for a mod to adjust how a vanilla-covered prefab persists (e.g. to add a missing serializer), even though the config format looks designed for exactly that.

## Steps to reproduce

1. Create a mod persistence config for `ArsenalBox_Base.et` (or a concrete descendant like `E_ArsenalBox_US.et`) with the same `PrefabPersistenceConfigRule` shape as vanilla's `Storage/Arsenal.conf` plus one extra serializer (`BaseInventoryStorageComponentSerializer`).
2. Register it in the mission's persistence settings; set `Priority` high (tested 30000) and low (tested 1); try both the base prefab and a deeper concrete-prefab match.
3. Spawn the box on a persistent server, save, decode/inspect the save.

## Observed

In every tested combination the box's record lands under the **vanilla** config (vanilla's collection, vanilla's serializer set). The mod config is never selected; `Priority` visibly does not decide the competition, and a more specific prefab match does not either. No log output indicates which config won or why.

Combined with #ARMD-13 (scripted rules never consulted) and the fact that runtime `SetConfig` re-writes make existing records unreadable, there is **no working path** for a mod to alter persistence behaviour of a vanilla-matched prefab.

If this is intended it should fail loudly if a modder tries to insert it's own config over a vanilla one, but currently we have no control over persistence of vanilla objects and are forced to create custom prefabs instead.
Reactions

Activity

    2 months ago
  • aaron_static
    created issue2 months ago
  • about 2 months ago
  • l909
    changed state to
    ASSIGNED
    about 2 months ago
  • about 2 months ago
  • arkensor
    changed state to
    FEEDBACK
    about 2 months ago
  • arkensor
    Moderator
    about 2 months ago
    arkensor
    Moderator
    about 2 months ago

    While there are some edge cases that we are fixing, in general, adding new rules with higher priority should work. Perhaps you had existing save data locally while making the changes? Once registered, an instance remembers which configuration it was created with and keeps it over its lifetime. So if you want to test rule changes, you should first clear local data between runs.

  • arkensor
    changed state to
    DONE
    about 2 months ago
  • aaron_static
    about 2 months ago
    aaron_static
    about 2 months ago

    Yes, there was existing save data, however the entity being tested (Game Master spawn of E_ArsenalBox_US) was freshly spawned with the override config registered before the world loaded, and its record still landed under vanilla's Arsenal.conf collection/serializers in every variant (Priority 30000 and Priority 1 behaved identically, which looks like the mod config was never in the competition at all rather than losing it).

    I will setup another test with no save data to see if it helps

  • arkensor
    Moderator
    about 2 months ago
    arkensor
    Moderator
    about 2 months ago

    In general first priority is checked, no matter what rule type. higher number wins. some vanilal rules have higher than 30k by default. set your test to 9999999 or something to be sure nothing is higher. if two rules have the same prio then prefab wins over component that wins over entity class filter. if they are still the same type they are compared by the individual filter as a final tie breaker. if that is the same the order in which the rules are declared in the config wins.

  • about 2 months ago
  • aaron_static
    about 2 months ago
    aaron_static
    about 2 months ago

    For anyone searching this issue, the magic number is 32500, thats the minimum priority needed to override a vanilla config. This should probably be documented and/or mentioned in code comments because the default priority isnt accessible anywhere, I had to discover this through trial and error

  • arkensor
    Moderator
    about 2 months ago
    arkensor
    Moderator
    about 2 months ago

    The number is not a magic constant from gamecode. It is all configured by the base game config setup. If you want to overrule something you look up the configuration it currently matches under (persistence diag menu shows you the GUID of the rule you can search for in the top left of config viewer) and there you will see the rule type and priority it is assinged.

  • aaron_static(edited)
    about 2 months ago
    aaron_static(edited)
    about 2 months ago

    Well it is a constant, it is the default value of EntityPersistenceConfig.Priority, so if a vanilla config (or modded config I guess) does not define a specific priority that is the one it gets, and since EntityPersistenceConfig is compiled that is not apparent from the code and only becomes apparent via workbench or trial and error

You are not signed in. Please sign in to see more details and to reply.

State

Done
Issue key
ARMD-14
Access
Public
Space
Arma Reforger
Project
Reforger Modding
Creator
aaron_static
Created
Aug 11, 2026
Views
146