Changes

Jump to navigation Jump to search
→‎For Content Patcher packs: + Custom renovations, mail formatting, and EntryLocation property in today's 1.5.5 build
Line 318: Line 318:  
| The index of the spouse room within the map file, to allow multiple spouse rooms in the same file. Each spouse room is 6 tiles across by 9 tiles down, starting with index 0 in the top-left corner. You can have any number of rows and columns (the index will wrap at the end of the row), as long as they fit an integer number of spouse rooms.
 
| The index of the spouse room within the map file, to allow multiple spouse rooms in the same file. Each spouse room is 6 tiles across by 9 tiles down, starting with index 0 in the top-left corner. You can have any number of rows and columns (the index will wrap at the end of the row), as long as they fit an integer number of spouse rooms.
 
|}
 
|}
 +
 +
===Custom farmhouse renovations===
 +
You can now 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:
 +
 +
{| class="wikitable"
 +
|-
 +
! valid in
 +
! map property
 +
! usage
 +
|-
 +
| farmhouse
 +
| <tt>AdditionalRenovations {{t|renovation}}+</tt>
 +
| A comma-separated list of renovations to apply, each in the form <tt>{{t|map patch ID}} {{t|required mail flag}} {{t|map asset if active}} {{t|map asset if inactive}} {{o|area rectangle}}</tt>. Fields:
 +
{| class="wikitable"
 +
|-
 +
! field
 +
! effect
 +
|-
 +
| <tt>map patch ID</tt>
 +
| A unique ID for the patch being applied. This is usually similar to the renovation name, but can be any unique value. If a renovation applies multiple map patches, each one must have unique ID.
 +
|-
 +
| <tt>required mail flag</tt>
 +
| The [[Modding:Mail data#Mail flags|mail flag]] that is checked on the house's owner  to decide whether the patch should be applied.
 +
|-
 +
| <tt>map asset if active</tt>
 +
| The asset name for the map applied when the mail flag is set, relative to the <tt>Maps</tt> folder.
 +
|-
 +
| <tt>map asset if inactive</tt>
 +
| The asset name for the map applied when the mail flag is not set, relative to the <tt>Maps</tt> folder.
 +
|-
 +
| <tt>area rectangle</tt>
 +
| ''(Optional)'' The tile area in the map to patch, specified as <tt>{{t|X}} {{t|Y}} {{t|width}} {{t|height}}</tt>. If {{t|X}} isn't set, this defaults to the top-left corner of the map. If it is, you must specify all four values.
 +
|}
 +
|}
 +
 +
For example, this Content Patcher pack would add a renovation to the fully-upgraded farmhouse based on a custom <tt>Pathoschild_PineapplesEverywhere_HasRenovation</tt> flag. Note that <tt>TextOperations</tt> is used to avoid overwriting any renovations added by another mod, and <tt>Pathoschild_PineapplesEverywhere_</tt> is a unique prefix for the hypothetical mod to avoid conflicts with other mods.
 +
{{#tag:syntaxhighlight|
 +
{
 +
    "Format": "{{Content Patcher version}}",
 +
    "Changes": [
 +
        // add renovation
 +
        {
 +
            "Action": "EditMap",
 +
            "Target": "Maps/FarmHouse2, Maps/FarmHouse2_marriage",
 +
            "TextOperations": [
 +
                {
 +
                    "Operation": "Append",
 +
                    "Target": [ "MapProperties", "AdditionalRenovations" ],
 +
                    "Value": "Pathoschild_PineapplesEverywhere_KitchenUpgrade Pathoschild_PineapplesEverywhere_HasRenovation Pathoschild_PineapplesEverywhere_Kitchen Pathoschild_PineapplesEverywhere_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/Pathoschild_PineapplesEverywhere_Kitchen",
 +
            "FromFile": "assets/kitchen-upgrade.tmx"
 +
        },
 +
 +
        // load empty map (applied if renovation is inactive)
 +
        {
 +
            "Action": "Load",
 +
            "Target": "Maps/Pathoschild_PineapplesEverywhere_Empty",
 +
            "FromFile": "assets/kitchen-upgrade-empty.tmx"
 +
        }
 +
    ]
 +
}|lang=javascript}}
    
===Custom floors/walls===
 
===Custom floors/walls===
Line 410: Line 479:     
===Map property changes===
 
===Map property changes===
Stardew Valley 1.5.5 adds several map properties:
+
Stardew Valley 1.5.5 adds several map properties (in addition to those listed in their own sections):
    
{| class="wikitable"
 
{| class="wikitable"
Line 417: Line 486:  
! map property
 
! map property
 
! usage
 
! usage
 +
|-
 +
| ''any''
 +
| <tt>ForceAllowTreePlanting T</tt>
 +
| Whether to allow planting trees (both wild and fruit) in this location, even if it normally wouldn't be allowed.
 +
|-
 +
| ''any''
 +
| <tt>IsFarm T</tt>
 +
| Whether to mark the location as a farm. This only affects generic location/interaction logic which checks the in-code <code>location.IsFarm</code> property; logic hardcoded into the game's <code>Farm</code> class (e.g. farm animals, pets, crows/scarecrows, greenhouse, farm buildings, etc) is still limited to the actual farm.
 +
|-
 +
| ''any''
 +
| <tt>IsGreenhouse T</tt>
 +
| Whether to mark the location as a greenhouse.
 
|-
 
|-
 
| farm
 
| farm
Line 441: Line 522:  
| <tt>FarmOceanCrabPotOverride T</tt>
 
| <tt>FarmOceanCrabPotOverride T</tt>
 
| Whether crab pots on the farm should catch ocean fish.
 
| Whether crab pots on the farm should catch ocean fish.
|-
  −
| ''any''
  −
| <tt>ForceAllowTreePlanting T</tt>
  −
| Whether to allow planting trees (both wild and fruit) in this location, even if it normally wouldn't be allowed.
  −
|-
  −
| ''any''
  −
| <tt>IsFarm T</tt>
  −
| Whether to mark the location as a farm. This only affects generic location/interaction logic which checks the in-code <code>location.IsFarm</code> property; logic hardcoded into the game's <code>Farm</code> class (e.g. farm animals, pets, crows/scarecrows, greenhouse, farm buildings, etc) is still limited to the actual farm.
  −
|-
  −
| ''any''
  −
| <tt>IsGreenhouse T</tt>
  −
| Whether to mark the location as a greenhouse.
   
|-
 
|-
 
| farm
 
| farm
Line 465: Line 534:  
| <tt>SpawnMountainFarmOreRect {{t|tile X}} {{t|tile Y}} {{t|tile width}} {{t|tile height}}</tt>
 
| <tt>SpawnMountainFarmOreRect {{t|tile X}} {{t|tile Y}} {{t|tile width}} {{t|tile height}}</tt>
 
| The tile area on the farm map where ores should randomly spawn (like the [[Farm Maps|vanilla hilltop farm]]). Ores will only spawn on tiles which have the <tt>Type Dirt</tt> tile property and are clear for object placement.
 
| The tile area on the farm map where ores should randomly spawn (like the [[Farm Maps|vanilla hilltop farm]]). Ores will only spawn on tiles which have the <tt>Type Dirt</tt> tile property and are clear for object placement.
 +
|-
 +
| farmhouse
 +
| <tt>EntryLocation {{t|tile X}} {{t|tile Y}}</tt>
 +
| Sets the tile on which the player appears when they warp into the farmhouse.
 
|}
 
|}
   Line 552: Line 625:  
<li>Added [[Modding:Event data#Event preconditions|event preconditions]] to check whether the local player has a roommate (<tt>R</tt>) or doesn't have a roommate (<tt>Rf</tt>). This can be combined with <tt>O {{t|NPC name}}</tt> to check for a specific roommate, like <tt>R/O Abigail</tt>.</li>
 
<li>Added [[Modding:Event data#Event preconditions|event preconditions]] to check whether the local player has a roommate (<tt>R</tt>) or doesn't have a roommate (<tt>Rf</tt>). This can be combined with <tt>O {{t|NPC name}}</tt> to check for a specific roommate, like <tt>R/O Abigail</tt>.</li>
 
</ul>
 
</ul>
 +
 +
===Custom mail formatting===
 +
You can now customize [[Modding:Mail data|mail]] and [[Secret Notes|secret notes]] by including three custom commands in the letter text (including the <tt>[]</tt> characters):
 +
{| class="wikitable"
 +
|-
 +
! command
 +
! effect
 +
|-
 +
| <tt>[letterbg {{t|index}}]</tt>
 +
| Changes the default letter background to a vanilla background from <tt>LooseSprites/letterBG</tt>. The index can be 0 (default letter), 1 (Sandy's lined paper), 2 (Wizard style), or 3 (Krobus style). This will also set the default text color for that style, unless overridden by <tt>textcolor</tt>.
 +
|-
 +
| <tt>[letterbg {{t|asset name}} {{t|index}}]</tt>
 +
| Changes the default letter background to the given texture. The asset name should match a texture containing two rows: one with 320x180 pixel letter background images, and one with 24x24 pixel button backgrounds shown behind attached items. The index is the sprite to use from those rows, starting at 0 for the first one.
 +
 +
'''Bug:''' this will also set the default text color for that index in <tt>LooseSprites/letterBG</tt>, unless overridden by <tt>textcolor</tt>.
 +
|-
 +
| <tt>[textcolor {{t|color}}]</tt>
 +
| Changes the letter text color. The valid colors are <tt>black</tt>, <tt>blue</tt>, <tt>cyan</tt>, <tt>gray</tt>, <tt>green</tt>, <tt>orange</tt>, <tt>purple</tt>, <tt>red</tt>, and <tt>white</tt>.
 +
|}
    
===Custom scarecrows===
 
===Custom scarecrows===
translators
8,403

edits

Navigation menu