Skip to content

Let mods intercept XNB content load #255

@Pathoschild

Description

@Pathoschild

Let mods override data loaded from the game's *.xnb data files. This could be used to edit data (e.g. add a new crop or change an item price), patch custom sprites into a spritesheet, and do interesting things like seasonal or contextual textures.

(Split from #173.)

Rationale

Mods which change images or content currently overwrite the game's *.xnb data files. These mods have major disadvantages:

  • In SDV 1.2+, many of the XNBs have a different version for each language. That means XNB mods will only work when the language is set to English, unless they create a separate XNB replacement file for each language even for language-agnostic changes (like prices).
  • XNB mods are hard to manage (since you need to keep track of which files were changed by which mod) and uninstall (since you need to recover the original game files).
  • XNB mods conflict if they change the same file (which is common).
  • XNB mods can't patch a file (only fully replace it), which exacerbates the previous point.
  • XNB mods have no standard install process.

Use cases

These are the possible use cases for mods which override content:

use case support in
add new entries to data content
(new crops, NPCs, items, etc)
✓ 2.0
edit or replace entries in data content
(edit crop seasons, item prices, etc)
✓ 2.0
patch image data
(edit existing sprites, add new sprites)
✓ 2.0
add tilesheets to use in custom maps ✓ 2.0
edit map data
(edit layout, add new logic, create new areas, etc)
✘ edit maps after they're loaded

Metadata

Metadata

Assignees

Labels

enhancementThis is a general improvement that can be addressed with specific development changes.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions