Modding:Farmhouse Renovations: Difference between revisions
Appearance
imported>BarleyZP add info from Modding:Migrate to Stardew Valley 1.5.5 (main author Pathoschild, with formatting fixes by Margotbean) |
imported>BarleyZP Formatting fixes after migration |
||
| Line 3: | Line 3: | ||
This page explains how to create custom farmhouse renovations. This is an advanced guide for mod developers. | This page explains how to create custom farmhouse renovations. This is an advanced guide for mod developers. | ||
You can add custom [[Farmhouse#Upgrades|farmhouse renovations]] that will be applied automatically when the specified [[Modding:Mail data#Mail flags|mail flag]] is set. This is based on a new map property in the farmhouse map: | |||
You can | |||
{| class="wikitable" | {| class="wikitable" | ||
Revision as of 16:10, 27 March 2025
← Index
This page explains how to create custom farmhouse renovations. This is an advanced guide for mod developers.
You can add custom farmhouse renovations that will be applied automatically when the specified mail flag is set. This is based on a new map property in the farmhouse map:
| valid in | map property | usage | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| farmhouse | AdditionalRenovations <renovation>+
|
A comma-separated list of renovations to apply, each in the form <map patch ID> <required mail flag> <map asset if active> <map asset if inactive> [area rectangle]. Fields:
|
For example, this Content Patcher pack would add a renovation to the fully-upgraded farmhouse based on a custom ExampleAuthor_PineapplesEverywhere_HasRenovation flag. Note that TextOperations is used to avoid overwriting any renovations added by another mod, and {{ModId}} is automatically replaced by Content Patcher to avoid conflicts with other mods.
{
"Format": "2.8.0",
"Changes": [
// add renovation
{
"Action": "EditMap",
"Target": "Maps/FarmHouse2, Maps/FarmHouse2_marriage",
"TextOperations": [
{
"Operation": "Append",
"Target": [ "MapProperties", "AdditionalRenovations" ],
"Value": "{{ModId}}_KitchenUpgrade {{ModId}}_HasRenovation {{ModId}}_Kitchen {{ModId}}_Empty 0 19 3 3",
"Delimiter": "," // if there are already renovations, add a comma before this one
}
]
},
// load renovation map patch
{
"Action": "Load",
"Target": "Maps/{{ModId}}_Kitchen",
"FromFile": "assets/kitchen-upgrade.tmx"
},
// load empty map (applied if renovation is inactive)
{
"Action": "Load",
"Target": "Maps/{{ModId}}_Empty",
"FromFile": "assets/kitchen-upgrade-empty.tmx"
}
]
}