Difference between revisions of "Modding:Content Patcher"

From Stardew Valley Wiki
Jump to navigation Jump to search
(expand & update intro)
Line 1: Line 1:
 
{{/header}}
 
{{/header}}
  
'''{{nexus mod|1915|Content Patcher}}''' is a SMAPI mod which lets you change the game's images, dialogue, data, etc without replacing XNB files. No programming is needed.
+
Do you want to create Content Patcher packs for Stardew Valley? This guide is for you! '''For using mods, see [[Modding:Player Guide/Getting Started|Modding:Player Guide]].'''
  
==FAQs==
+
==Intro==
===How does it work?===
+
===What is Content Patcher?===
With Content Patcher, you create a [[Modding:Content packs|content pack]] which contains your changes and a JSON file (that's just a text format). Players install it by unzipping it into <tt>Mods</tt>, just like a SMAPI mod. Just by editing the JSON file, you can...
+
{{nexus mod|1915|Content Patcher}} is a SMAPI mod which lets you change the game assets (images, dialogue, data, and maps) without replacing game files or writing code. You use it by creating a content pack (basically a folder with certain files) with a couple of JSON files. Just by editing a JSON file, you can...
  
 
* replace one image file;
 
* replace one image file;
 
* make seasonal changes;
 
* make seasonal changes;
 
* make dialogue that changes based on the weather, date, your relationships with other NPCs, etc;
 
* make dialogue that changes based on the weather, date, your relationships with other NPCs, etc;
* make very specific changes (like coffee is more expensive in winter when it's snowing on the weekend);
+
* make very specific changes (like coffee is more expensive on winter weekends when it's snowing after you've completed the JojaMart);
 
* and much more.
 
* and much more.
 
===Content Patcher vs XNB mods===
 
If you're familiar with creating XNB mods, Content Patcher supports everything XNB mods supported. Here's a quick comparison:
 
 
{| class="wikitable"
 
|-
 
!
 
! XNB mod
 
! Content Patcher
 
|-
 
| easy to create
 
| ✘ need to unpack/repack files
 
| ✓ edit JSON files
 
|-
 
| easy to install
 
| ✘ different for every mod
 
| ✓ drop into <tt>Mods</tt>
 
|-
 
| easy to uninstall
 
| ✘ manually restore files
 
| ✓ remove from Mods
 
|-
 
| update checks
 
| ✘ no
 
| ✓ yes (via SMAPI)
 
|-
 
| compatibility checks
 
| ✘ no
 
| ✓ yes (via SMAPI DB)
 
|-
 
| mod compatibility
 
| ✘ very poor
 
| (each file can only be changed by one mod)
 
|-
 
| ✓ high
 
| (mods only conflict if they edit the same part of a file)
 
| game compatibility
 
|-
 
| ✘ break in most updates
 
| ✓ only affected if the part they edited changes
 
|-
 
| easy to troubleshoot
 
| ✘ no record of changes
 
| ✓ SMAPI log + Content Patcher validation
 
|}
 
  
 
===Content Patcher vs other mods===
 
===Content Patcher vs other mods===
Content Patcher supports all game assets with some very powerful features, but it's a generalist
+
Content Patcher supports all game assets with some very powerful features, but it's a general framework. More specialised frameworks might be better for specific things. You should consider whether one of these would work for you:
framework. More specialised frameworks might be better for specific things. You should consider
 
whether one of these would work for you:
 
  
* {{nexus mod|2270|Advanced Location Loader}} to add and edit maps.
+
* {{nexus mod|2270|Advanced Location Loader}} for complex changes to maps. (For simple changes, see ''[[/Edit maps|edit maps]]''.)
 
* {{nexus mod|991|Custom Farming Redux}} to add machines.
 
* {{nexus mod|991|Custom Farming Redux}} to add machines.
 
* {{nexus mod|1254|Custom Furniture}} to add furniture.
 
* {{nexus mod|1254|Custom Furniture}} to add furniture.
* {{nexus mod|1607|CustomNPC}} to add NPCs.
 
 
* {{nexus mod|2416|Custom Shirts}} to add shirts.
 
* {{nexus mod|2416|Custom Shirts}} to add shirts.
* {{nexus mod|1720|Json Assets}} to add items and fruit trees.
+
* {{nexus mod|1720|Json Assets}} to add items, crafting recipes, crops, fruit trees, hats, and weapons.
 +
 
 +
(For a comparison with legacy XNB mods, see ''[[Modding:Using XNB mods|using XNB mods]]''.)
 +
 
 +
===Content Patcher vs SMAPI===
 +
SMAPI is the modding API used to add mods to the game (Content Patcher itself is a SMAPI mod). If the mod you want to create is possible with Content Patcher, that's recommended since it's easier to maintain and update. However, you can also program a mod using SMAPI directly if you want; see [[Modding:Modder Guide/Get Started|creating SMAPI mods]] for more info.
  
 
{{modding guide footer
 
{{modding guide footer

Revision as of 18:09, 24 September 2019

Creating Content Patcher packs SMAPI mascot.png

Modding:Index

Do you want to create Content Patcher packs for Stardew Valley? This guide is for you! For using mods, see Modding:Player Guide.

Intro

What is Content Patcher?

Content Patcher is a SMAPI mod which lets you change the game assets (images, dialogue, data, and maps) without replacing game files or writing code. You use it by creating a content pack (basically a folder with certain files) with a couple of JSON files. Just by editing a JSON file, you can...

  • replace one image file;
  • make seasonal changes;
  • make dialogue that changes based on the weather, date, your relationships with other NPCs, etc;
  • make very specific changes (like coffee is more expensive on winter weekends when it's snowing after you've completed the JojaMart);
  • and much more.

Content Patcher vs other mods

Content Patcher supports all game assets with some very powerful features, but it's a general framework. More specialised frameworks might be better for specific things. You should consider whether one of these would work for you:

(For a comparison with legacy XNB mods, see using XNB mods.)

Content Patcher vs SMAPI

SMAPI is the modding API used to add mods to the game (Content Patcher itself is a SMAPI mod). If the mod you want to create is possible with Content Patcher, that's recommended since it's easier to maintain and update. However, you can also program a mod using SMAPI directly if you want; see creating SMAPI mods for more info.