RuntimeOCD

7 days to die runtimeocd

As the game loads XML files from mods, RuntimeOCD obsessively analyzes them to detect potential conflicts between them. Once a conflict is detected, it is logged to the console for troubleshooting, debugging, or reporting purposes. Only the host can see these log entries.
In additon to this, RuntimeOCD patches specific well-defined conflicts on the fly to improve compatibility and/or to prevent the game from displaying specific errors to players when they do not pose any real problems (more info below).

If you are a player, RuntimeOCD is good for you because it makes troubleshooting easier, it helps you detect or at least expect problems earlier, before wasting hours or days playtesting, and it automatically improves compatibility between mods in the few instances it can do so.

If you are a mod author, RuntimeOCD is good for you because it helps you make your mods compatible with other mods, even if you don’t use this mod yourself, because players that do use it will be able to give you more meaningful information when they run into problems.

If you are Byteblazar, RuntimeOCD is bad for you because it gives you more stuff to maintain, it makes some mod authors hate you because players report more problems to them than they used to, and it makes some players hate you because it doesn’t do miracles, and because you are not investing 100% of your time making mods they care more about than this. Also, yOu ArE nOt As CoOl aS YoU tHiNk yOu aRe.

You are still reading. Good. Now, let’s get into the details.

Glossary of pertinent XML lingo

Element: an element as defined in XML.
Type: an element’s XML node name (like block, buff, item, property, enemy, etc). They are called “names” in XML but Byteblazar is calling them “types” here to avoid confusion with the “name” attribute.
Descendant: an element that is a under another element in the XML tree, i.e. the child of another element, or the child of a child, etc. An Ancestor would be the inverse.
Sibling: an element that has the same parent element as another element.

This whole thing is an element:
   <type attribute="value">
      content
   </type>

   These are four elements:
   <Rick_Sanchez>
      <Beth_Sanchez>
          <Summer_Smith/>
          <Morty_Smith/>
      </Beth_Sanchez>
   </Rick_Sanchez>

Morty and Summer are Beth’s children, and Beth is Rick’s child, therefore Morty, Summer and Beth are Rick’s descendants. Summer and Morty are both Beth’s children, so they are siblings (at least in this universe…)

Conflict Detection

Following are the different types of conflicts logged, ordered from highest to lowest severity.

IMPORTANT: Note that not ALL conflicts detected by RuntimeOCD are necessarily harmful and some may even be intentional (i.e. not real conflicts). As a rule of thumb, you can safely ignore most “conflicts” caused by mods that are meant to patch other mods, because that’s their whole purpose, but when mods make very general changes that inadvertently affect other mods, that’s when you may want to pay attention and learn to expect the unexpected.

Category: Removal (R)
Operation(s): remove
Description: When Mod B directly or indirectly removes an element that was added or modified by Mod A.
Severity: High. When a mod removes other mods’ elements without really caring what the other mods in question are for, that is very likely to spell trouble.
Visualization:

7 days to die runtimeocd additional screenshot 1
Rude.

Category: Element Override (EO)
Operation(s): set
Description: When Mod B directly or indirectly overwrites an element that was added or modified by Mod A.
Severity: High. Same as removals, this *can be done safely, but when not, it’s very likely to spell trouble. But hey, at least this one leaves something behind.
Visualization:

Mod B clearly needs Jesus.

Category: Sibling Collision (SC)
Operation(s): append, prepend, insertBefore, insertAfter
Description: When siblings body-slam each other. Also, when Mod B adds an element (B) as a sibling of another element (A) (added or modified directly by Mod A) that is of the same type and has the same name attribute as the new element (B).
Severity: Medium. Having your sibling be a namesake can be ok, or not, depending on the laws of your country, this is, the type of element in question, because the game treats each one differently. Probably for most types, the game will throw an error of its own, but for some it just silently keeps the last-added namesake and drops the previous ones, which can lead to unexpected behavior from a player’s standpoint, thus, RuntimeOCD will whine about all of these.
Visualization:

Who is Mod B? Whoever arrived last.

Category: Attribute Override (AO)
Operation(s): set, setattribute, removeattribute
Description: When Mod B modifies or removes attributes of an element that was added or modified directly by Mod A.
Severity: Medium. When not done on purpose, it’s about as likely to be a conflict as it is to be a feature. It all depends on what the mods in question do, but the potential for problems is not as significant as with removals or element overrides, because at least this does not directly affect descendants of the target element.
Visualization:

… I’m sure Mod A will miss them.

Category: Forced Parenthood (FP)
Operations: append, prepend, insertAfter, insertBefore
Description: When Mod B, well… gives Mod A potentially unwanted offspring. This is when it adds a child to an element that was added or modified directly by Mod A. This is actually when any descendants are added, not just children, but Byteblazar thought “Forced Ancestry” was not quite as amusing.
Severity: Low. Despite the name of the category, this is generally not likely to cause problems, as much as unexpected behavior, but it’s included because more info = more power to you.
Visualization:

Admit it: you were expecting this one to be NSFW, weren’t you?

He think by now we can all agree Mod B is a B. To all of you mod authors reading this: please try not to make Mod Bs. Everyone will thank you for it.

Conflict Resolution

As stated above, RuntimeOCD also patches general, well-defined conflicts on the fly. As of right now it’s actually only one such conflict, but he said that in plural because more will likely be patched in the future if he find safe ways to implement fixes for them.

This particular conflict occurs when two or more mods attempt to add a BuffsWhenWalkedOn property to the same block. BuffsWhenWalkedOn tells the game to trigger buffs as players stand on a particular kind of block. In such scenarios, RuntimeOCD combines the BuffsWhenWalkedOn properties from such mods so that walking on the target blocks triggers all effects simultaneously.

RuntimeOCD also prevents the game from throwing an error when mods try to add challenge categories that already exist. This will allow modders to spread challenge groups from the same category among many of their mods without having to create separate patches or use long and complicated conditional operations in XML (which nobody uses anyway), and will allow players to then mix and match mods without having to install patches for their specific combination of mods solely to avoid seeing these pointless challenge-related errors when loading.

Why this mod?

This started as a side project after multiple people mentioned compatibility issues between one of Byteblazar’s mods and other mods, even though he wrote that mod with compatibility in mind from the start. While the XML way of modding this game is fantastic in multiple ways, solving compatibility issues soon becomes a competition of whose mod loads last, which involves naming folders with more and more Zs at the start. So, instead of simply solving the specific issue at hand and getting back to working on his other projects, he created this, which is still far from perfect and not a silver bullet by any means, but hopefully good enough to make a difference for everyone.

Screenshots

7 days to die runtimeocd additional screenshot 2

7 days to die runtimeocd additional screenshot 3

This one was of course taken while hosting from the game itself (not a dedicated server)

7 days to die runtimeocd additional screenshot 4

DOWNLOAD (13 KB)

If you appreciate Byteblazar’ work and you want to show support, use this donate link.

The forum topic of the mod is here.

Credits: Byteblazar

Share this with your friends:
Subscribe
Notify of
guest

If you have any questions or have any problems/bugs, please use the support link (Discord, Forum Topic, GitHub Issues, etc.) in the post. If there is no support link in the post, please use the comments section.

0 Comments
Inline Feedbacks
View all comments