Kartik Scripts

Merging & Resolving Conflicts

When two or more resources stream the same map file (like a .ymap, .ytyp, .ybn, or .ydr), Conflict Resolver doesn't just blindly delete one. It first looks at what is actually inside each copy, then picks the safest way to resolve it.

This page explains, in plain terms, how that decision is made and what happens when you click Fix.


The Simple Idea

Whenever the tool finds duplicate map files, it asks two questions:

  1. Are the copies the same, or different?
  2. If they're different, can they be safely combined, or does a human need to choose?

Based on the answer, it takes one of three paths:

PathWhat happensWhen it's used
✅ Auto CleanThe extra copy is removed automaticallyThe copies are identical, or one is just an unneeded override of a base-game file
🔀 Auto MergeThe copies are combined into one file that keeps everything from bothThe maps edit different areas, or a base-game version is available to compare against
✋ Keep One (Manual)You choose which copy to keepThe copies edit the same spot in different ways, or combining them could break the game

The tool always defaults to the safe option. If it can't be 100% sure a merge is safe, it stops and asks you to pick.


✅ Auto Clean (Safe Deletes)

Some duplicates are safe to remove with no thought required:

  • Identical copies – Two resources stream the exact same file, byte for byte. Keeping one is enough; the rest are removed.
  • Base-game overrides – A resource ships a copy of a stock game file that isn't actually changed. It's just extra weight, so it's cleared out.

These happen automatically when you run a fix, nothing is lost.


🔀 Auto Merge (Combining Two Maps)

This is where the tool shines. If two map files touch different parts of the world, there's no reason to lose either one, so they get combined into a single file that contains all the props and placements from both.

Merging is used when:

  • The two maps edit separate or neighbouring areas (nothing overlaps, so nothing conflicts).
  • A base-game version of the file is available to compare against. With that reference, the tool can tell exactly what each map added or removed and safely reconcile them, even if they're close together. This reference is optional and off by default; see Configuration to enable it and unlock the extra automatic merges.

.ytyp definition files are also merged automatically when the difference is just renamed or removed entries (nothing that would break other resources).

Result: One clean file that behaves as if both maps were loaded, without the flickering, missing collisions, or wasted memory that duplicates cause.


✋ Keep One (When a Human Should Decide)

Sometimes combining two files is genuinely risky, and the tool will not do it for you. Instead it flags the conflict and asks you to keep one copy. This happens when:

  • Two designs for the same spot – Both maps redecorate the same area in different ways. There's no "correct" merge, it's a creative choice, so you pick the one you want.
  • Linked detail (LOD) props – The map uses parent/child links for distant/close versions of props. Merging these can crash the game, so the tool never touches them automatically.
  • Different collision or terrain geometry – Two .ybn (collision) or .ydr (terrain) files share a name but hold different shapes. Blindly combining collision meshes recreates the classic invisible wall / double-wall bug, so these are always kept one-by-one.
  • A file couldn’t be read – If a map is encrypted or can’t be decoded, the tool won’t guess. It leaves it for you. See Protected Resources.

In all these cases you'll see a short reason in the UI explaining why it needs your input, and you simply choose which path to keep.


💾 What Happens to the "Losing" Copies

When a conflict is resolved, the copies that aren't the winner are handled in one of two ways. This is controlled by a single server setting:

# server.cfg
setr conflictresolver:distribute writeAll   # default
ModeBehaviour
writeAll (default)Every duplicate copy is overwritten with the winning file's contents, so no matter which resource the game loads first, it always gets the same correct result. Nothing is deleted.
keepOneThe extra copies are deleted entirely, leaving a single file. This gives the cleanest stream folder, but removes the redundant files.

Both modes are safe and reversible, every fix creates a backup first (see the Backup Manager). If you're unsure, leave it on the default writeAll.

Note: When you manually pick a file to keep from the UI, the tool always deletes the others so your choice is respected exactly.


Quick Summary

  • Identical files → cleaned up automatically.
  • Different areas → merged into one file that keeps everything.
  • Same area, different designs → you choose which to keep.
  • Anything risky (LOD, collision, terrain, unreadable) → left for you, with a reason shown.
  • Every fix is backed up first, so you can always roll back.

For a deeper technical explanation of each conflict type, see Understanding Conflicts. For step-by-step usage, see Usage & Controls.

On this page