Skip to content

Map Porter & Patcher

TheKillerey edited this page Apr 13, 2026 · 1 revision

Map Porter & Patcher

Two tools for transferring map assets between seasonal slots and applying binary patches.


Map Porter

Location: League Tools tab → Map Porter

The Map Porter copies a source map's content onto a target map slot so the game loads your custom content instead of the original.

What It Does

  1. Merges materials.bin — takes all entries from source, swaps the mapContainer to target's identity
  2. Copies .mapgeo — renames the geometry file to the target slot name
  3. Patches map11.bin (optional) — replaces target MapSkin fields with source settings

Setup

Field Description
Source Mapgeo The custom map's .mapgeo file
Source Materials The custom map's .materials.bin (or use .materials.prey)
Materials.prey Alternative: a .materials.prey diff file (see Prey Format)
Target Materials The target slot's .materials.bin (the file you're replacing in-game)
map11.bin Optional: the target's map11.bin for MapSkin patching
Output Directory Where to write the ported files

Porting Modes

Traditional Mode (Source Materials)

Uses the full source .materials.bin:

  • ALL source entries kept in original order
  • Target-only entries appended (so target mapContainer references resolve)
  • mapContainer swapped from target
  • Character skin paths patched in target-only MPC entries
  • mapContainer chunks merged (source overrides shared keys, source-only added)

Prey Mode (Materials.prey)

Uses a .materials.prey diff file:

  • Only custom/modified entries injected into target
  • Target's existing entries preserved
  • mapContainer chunks merged
  • Smaller, more targeted changes

Materials Merge Details

The merge algorithm:

  1. Start with all source entries in their original order.
  2. Find entries in target that don't exist in source (target-only).
  3. Append target-only entries — they're needed because the swapped mapContainer references them.
  4. For target-only MPC entries: patch character skin paths to match source skin numbers.
  5. Replace the mapContainer entry with target's (preserving map identity).
  6. Merge mapContainer chunks: shared keys get source values, source-only keys appended.
  7. Merge linked_files lists.
  8. Defensive pass: inject any missing StaticMaterialDef entries that the source mapgeo references.

map11.bin Patching

When a map11.bin is provided:

  1. Finds the source MapSkin (by geometry-path matching).
  2. Finds all target MapSkins.
  3. Deep-copies all fields from source onto each target MapSkin.
  4. Preserves the target's name and geometry-path fields (so the game recognises the slot).
  5. Result: target MapSkins get the source's particles, VFX links, grass tint, skin overrides.

Music Override Swap (Optional)

Enable Swap Music to swap condition links between source and target music overrides. This makes the source map's music banks activate when the target season is active.

Running the Porter

  1. Fill in all required fields.
  2. Click Port Map.
  3. Output files are written to the output directory.
  4. Copy output files to your modding project or game directory.

Console Output

The porter prints a detailed report:

[Map Porter] Map Porter: porting 'milkshake_srs' → 'sodapop_srs'
[Map Porter] Materials.bin: 648 entries, mapContainer swapped
[Map Porter]   • Added 45 target-only entries
[Map Porter]   • Patched 12 character skin paths in target-only MPCs
[Map Porter]   • mapContainer chunks: 8 redirected to source, 3 source-only added
[Map Porter]   • StaticMaterialDef: 524
[Map Porter]   • VfxSystemDefinitionData: 67
[Map Porter] map11.bin: patched 2 MapSkin(s) with 'Milkshake_SRS' settings
[Map Porter] Mapgeo: copied 'milkshake_srs.mapgeo' → 'sodapop_srs.mapgeo'

Materials.prey Export

Location: League Tools tab → Materials.prey Export (below Map Porter)

Export the differences between a source map and a base map as a .materials.prey file.

Workflow

  1. Set Source Materials — the custom map's .materials.bin.
  2. Set Base Materials — the vanilla/base .materials.bin to compare against.
  3. Click Analyze to see category counts (added + modified per category).
  4. Toggle categories on/off.
  5. Set output path.
  6. Click Export .materials.prey.

Analysis

The analyzer compares source vs base by path_hash:

  • Added: entries in source but not in base
  • Modified: entries in both but with different content

Results are shown per-category with counts.


Map Patcher

Location: League Tools tab → Map Patcher

The Map Patcher creates and applies binary diffs to .mapgeo files. Useful for distributing small patches without shipping the entire map file.

Creating a Diff

  1. Click Pick File to select your modified .mapgeo.
  2. Click Download from CDragon to fetch the original version from CommunityDragon.
  3. Click Create Diff — generates a binary diff file.

Applying a Diff

  1. Click Pick File to select the target .mapgeo.
  2. Provide the diff file.
  3. Click Apply Diff (Make Backup) — applies the diff with automatic backup.

One-Click Patch

Click Patch All Steps to:

  1. Download the reference from CDragon
  2. Create the diff
  3. Apply it with backup

All in one operation.


Code Examples

Merge two materials.bin files programmatically

from MapgeoAddon import map_porter

result = map_porter.merge_materials_bin(
    source_materials_path="milkshake_srs.materials.bin",
    target_materials_path="sodapop_srs.materials.bin",
    output_path="output/sodapop_srs.materials.bin",
)
print(f"Total entries: {result['total_entries']}")
print(f"mapContainer swapped: {result['mc_swapped']}")
print(f"Target-only added: {result['target_only_added']}")
print(f"Skin path replacements: {result['skin_replacements']}")

Patch map11.bin

from MapgeoAddon import map_porter

result = map_porter.merge_map11_bin(
    map11_path="map11.bin",
    source_map_name="milkshake_srs",
    target_map_name="sodapop_srs",
    output_path="output/map11.bin",
    swap_music=True,
)
print(f"Patched skins: {result['patched_skins']}")
print(f"Music swap: {result['music_swap']}")

Export a materials.prey diff

from MapgeoAddon import map_porter

result = map_porter.export_materials_prey(
    source_path="milkshake_srs.materials.bin",
    base_path="sodapop_srs.materials.bin",
    output_path="milkshake.materials.prey",
)
print(f"Exported {result['total_entries']} custom entries")
print(f"Categories: {result['categories']}")

Clone this wiki locally