Skip to main content

Action Bar: JsonPatch no longer applies

Mod: Action Bar (CurseForge ID 1778230, ActionBar_A7B4C921)

What happens​

The game's mod check reports a Data Error for this mod, and the patch file is not applied:

> Data Error
* All patches failed (Action_Interaction/non_ufs/JsonPatch/Action_Interaction_patch.json): first failure at index 0: Method='Override' Query='Action_Interaction[ID=Self_SLM_Read_Newspaper_Sit_Stage01].Actions[Command=PlayLoopAnim].Command'

Why​

Both patches in non_ufs/JsonPatch/Action_Interaction_patch.json find the action to change by Command=PlayLoopAnim:

"Query": "Action_Interaction[ID=Self_SLM_Read_Newspaper_Sit_Stage01].Actions[Command=PlayLoopAnim].Command",
"Value": "PlayAnim"
"Query": "Action_Interaction[ID=Object_Stand_Read_Newspaper].Actions[Command=PlayLoopAnim].Command",
"Value": "PlayAnim"

A game update converted these newspaper-reading actions from PlayLoopAnim to PlayAnimTime. No action matches Command=PlayLoopAnim any more, so both patches fail.

Why the game changed​

Repeating animations used to be measured by loop count (PlayLoopAnim). They are now measured by game time in minutes (PlayAnimTime).

A loop count takes a different amount of game time depending on the day-length option. With a longer day, the same number of loops covers less game time, so the Zoi repeated the action more often over a day. With PlayAnimTime, F1 is the duration in game minutes. For example, F1 = 30 means the action lasts 30 game minutes, whatever the day-length option is.

Current game data for the two rows:

RowCommandS1 (animation)F1 (game minutes)
Self_SLM_Read_Newspaper_Sit_Stage01PlayAnimTimeSelf_SLM_Read_Newspaper_Sit_Stage0130
Object_Stand_Read_NewspaperPlayAnimTimeObject_Stand_Read_Newspaper10

How to fix​

1. Check whether the patch is still needed​

PlayAnimTime no longer loops by count. It plays the animation for F1 game minutes and then ends. If your goal was to stop the reading animation from repeating too long, the game now handles that, and you may be able to remove this patch.

If you only want a shorter or longer reading time, override F1 instead of the command. The value is in game minutes and works the same under every day-length option:

{
"Method": "Override",
"Query": "Action_Interaction[ID=Self_SLM_Read_Newspaper_Sit_Stage01].Actions[Command=PlayAnimTime].F1",
"Value": 15,
"Enabled": true
}

Switching to PlayAnim plays the animation once for its own length. The game time that covers still depends on the day-length option, which is the problem PlayAnimTime was introduced to fix.

2. If you still want PlayAnim, update the query​

Select the action by its animation (S1) instead of by Command. This keeps the patch working even if the command changes again:

{
"Method": "Override",
"Query": "Action_Interaction[ID=Self_SLM_Read_Newspaper_Sit_Stage01].Actions[S1=Self_SLM_Read_Newspaper_Sit_Stage01].Command",
"Value": "PlayAnim",
"Enabled": true
},
{
"Method": "Override",
"Query": "Action_Interaction[ID=Object_Stand_Read_Newspaper].Actions[S1=Object_Stand_Read_Newspaper].Command",
"Value": "PlayAnim",
"Enabled": true
}

You can also simply replace Command=PlayLoopAnim with Command=PlayAnimTime.

Then test both newspaper interactions in game, sitting and standing, and confirm the animation plays the way you want.