Changes

update for build 23254 (removed plantable_* context tags in favor of new planting rules, renamed locationContext.DefaultValidPlantableLocations to PlantableLocations)
Line 2,117: Line 2,117:  
| <samp>not_placeable</samp><br /><samp>placeable</samp>
 
| <samp>not_placeable</samp><br /><samp>placeable</samp>
 
| Sets whether the item can be placed on the ground.
 
| Sets whether the item can be placed on the ground.
|-
  −
| <samp>not_plantable_context_{{t|context ID}}</samp><br /><samp>not_plantable_location_{{t|location name}}</samp><br /><samp>plantable_context_{{t|context ID}}</samp><br /><samp>plantable_greenhouse</samp><br /><samp>plantable_location_{{t|location name}}</samp>
  −
| See [[#Custom planting restrictions|''custom planting restrictions'']].
   
|-
 
|-
 
| <samp>prevent_loss_on_death</samp>
 
| <samp>prevent_loss_on_death</samp>
Line 2,751: Line 2,748:  
! effect
 
! effect
 
|-
 
|-
| <samp>DefaultValidPlantableLocations</samp>
+
| <samp>PlantableLocations</samp>
| ''(Optional)'' The internal names of the locations where crops can be planted and grown by default (see also [[#Custom planting restrictions|custom planting restrictions]]).
+
| ''(Optional)'' The internal names of the locations where crops can be planted and grown, unless overridden by planting rules in their data.
 
|-
 
|-
 
| <samp>AllowRainTotem</samp>
 
| <samp>AllowRainTotem</samp>
Line 3,248: Line 3,245:     
If the NPC is married to a player, they'll add a <samp>marriage_</samp> prefix to the keys (like <samp>marriage_{{t|festival ID}}_{{t|festival day}}</samp>) and ignore any entry without the prefix.
 
If the NPC is married to a player, they'll add a <samp>marriage_</samp> prefix to the keys (like <samp>marriage_{{t|festival ID}}_{{t|festival day}}</samp>) and ignore any entry without the prefix.
  −
===Custom planting restrictions===
  −
You can now add [[Modding:Items#Context tags|context tags]] to a [[crops|crop seed]], [[Fruit Trees|fruit tree sapling]], or [[trees|wild tree seed]] to restrict where it can be planted. This is based on these tags:
  −
  −
{| class="wikitable"
  −
|-
  −
! tag
  −
! effect
  −
|-
  −
| <samp>plantable_greenhouse</samp>
  −
| Can always be planted in a [[greenhouse]] (''i.e.,'' locations with <samp>IsGreenhouse</samp>), regardless of any other context tag.
  −
|-
  −
| <samp>plantable_location_{{t|location name}}</samp><br /><samp>not_plantable_location_{{t|location name}}</samp>
  −
| Must or must not be planted in one of these locations. This must be the internal location name (as shown by {{nexus mod|679|Debug Mode}}), lowercase and with any spaces replaced with underscores.
  −
|-
  −
| <samp>plantable_context_{{t|context ID}}</samp><br /><samp>not_plantable_context_{{t|context ID}}</samp>
  −
| Must or must not be planted in one of these [[#Custom location contexts|location contexts]]. The context ID must be lowercase, with any spaces replaced with underscores.
  −
|}
  −
  −
When multiple tags are specified, they're applied in this precedence order:
  −
  −
{| class="wikitable"
  −
|-
  −
! precedence
  −
! rule
  −
! result
  −
|-
  −
| 1
  −
| <samp>plantable_greenhouse</samp> matches
  −
| plantable
  −
|-
  −
| 2
  −
| <samp>plantable_location_*</samp> matches
  −
| plantable
  −
|-
  −
| 2
  −
| <samp>not_plantable_location_*</samp> matches<br />''or'' <samp>not_plantable_context_*</samp> matches
  −
| not plantable
  −
|-
  −
| 3
  −
| <samp>plantable_context_*</samp> or <samp>plantable_location_*</samp> specified but didn't match<br /><small>(<samp>not_*</samp> doesn't affect this rule)
  −
| not plantable
  −
|-
  −
| 4
  −
| current location listed in the context's <samp>DefaultValidPlantableLocations</samp> field
  −
| plantable
  −
|-
  −
| 5
  −
| colspan="2"| ''defaults to normal planting logic''
  −
|}
  −
  −
For example:
  −
{| class="wikitable"
  −
|-
  −
! tags
  −
! effect
  −
! plantable
  −
! reason
  −
|-
  −
|rowspan="4"| ''none''
  −
| [[The Farm|Farm]]
  −
| ☑ plantable
  −
|rowspan="4"| default behavior
  −
|-
  −
| [[Greenhouse]]
  −
| ☑ plantable
  −
|-
  −
| location listed in its context's <samp>DefaultValidPlantableLocations</samp>
  −
| ☑ plantable
  −
|-
  −
| [[Bus Stop]]
  −
| ☐
  −
|-
  −
|rowspan="2"| <samp>plantable_greenhouse, not_plantable_context_default</samp>
  −
| [[The Farm|Farm]]
  −
| ☐
  −
| matches <samp>not_plantable_context_default</samp>
  −
|-
  −
| [[Greenhouse]]
  −
| ☑ plantable
  −
| overridden by <samp>plantable_greenhouse</samp>
  −
|-
  −
|rowspan="3"| <samp>plantable_location_islandwest</samp>
  −
| [[Ginger Island|Island West]]
  −
| ☑ plantable
  −
| matches <samp>plantable_location_islandwest</samp></samp>
  −
|-
  −
| [[Ginger Island|Island South]]
  −
| ☐
  −
|rowspan="2"| doesn't match <samp>plantable_location_islandwest</samp></samp>
  −
|-
  −
| [[The Farm|Farm]]
  −
| ☐
  −
|-
  −
|rowspan="3"| <samp>plantable_context_island</samp>
  −
| [[Ginger Island|Island West]]
  −
| ☑ plantable
  −
|rowspan="2"| matches <samp>plantable_context_island</samp>
  −
|-
  −
| [[Ginger Island|Island South]]
  −
| ☑ plantable
  −
|-
  −
| [[The Farm|Farm]]
  −
| ☐
  −
| doesn't match <samp>plantable_context_island</samp>
  −
|-
  −
|rowspan="3"| <samp>not_plantable_context_island</samp>
  −
| [[Ginger Island|Island West]]
  −
| ☐
  −
|rowspan="2"| matches <samp>not_plantable_context_island</samp>
  −
|-
  −
| [[Ginger Island|Island South]]
  −
| ☐
  −
|-
  −
| [[The Farm|Farm]]
  −
| ☑ plantable
  −
| default behavior
  −
|-
  −
|rowspan="3"| <samp>plantable_location_town, plantable_location_mountain</samp>
  −
| [[Pelican Town|Town]]
  −
| ☑ plantable
  −
| matches <samp>plantable_location_town</samp>
  −
|-
  −
| [[The Mountain|Mountain]]
  −
| ☑ plantable
  −
| matches <samp>plantable_location_mountain</samp>
  −
|-
  −
| [[The Farm|Farm]]
  −
| ☐
  −
| doesn't match any <samp>plantable_location_*</samp> tags
  −
|}
      
===Custom weather===
 
===Custom weather===
Line 3,453: Line 3,319:  
|-
 
|-
 
| <samp>AllowGiantCrops T</samp>
 
| <samp>AllowGiantCrops T</samp>
| If set with any non-blank value, [[Crops#Giant Crops|giant crops]] can grow in this location. (To plant the crop itself, you'll need [[#Custom planting restrictions|custom planting restrictions]] or the [[#Custom location contexts|<samp>DefaultValidPlantableLocations</samp> context field]].)
+
| If set with any non-blank value, [[Crops#Giant Crops|giant crops]] can grow in this location (if crops are also allowed per the [[#Custom crops|crop data]] or [[#Custom location contexts|<samp>PlantableLocations</samp> context field]]).
 
|}
 
|}
  
translators
8,447

edits