Changes

Jump to navigation Jump to search
document build-anywhere change
Line 53: Line 53:     
You can also implement your own custom effects in code by checking if the buff is active, like <code>Game1.player.hasBuff("Example.ModId/ZoomZoom")</code>.
 
You can also implement your own custom effects in code by checking if the buff is active, like <code>Game1.player.hasBuff("Example.ModId/ZoomZoom")</code>.
 +
 +
===Build anywhere===
 +
Buildings and animals are no longer hardcoded to the [[farm]] location; you can add the new <code>CanBuildHere: T</code> [[Modding:Maps|map property]] to any location to constructing buildings there. The game will adjust accordingly (e.g. Robin will let you choose where to construct the building).
    
===Custom items===
 
===Custom items===
Line 1,297: Line 1,300:  
===[[Modding:Maps|Map/tile property]] changes===
 
===[[Modding:Maps|Map/tile property]] changes===
 
<ul>
 
<ul>
 +
<li>Added new map properties:
 +
{| class="wikitable"
 +
|-
 +
! property
 +
! explanation
 +
|-
 +
| <samp>CanBuild T</samp><br />''(valid in any outdoor location)''
 +
| Whether to allow constructing buildings in this location. The game will adjust automatically to account for it (e.g. Robin will let you choose where to build). See [[#Build anywhere|''build anywhere'' in what's new]].
 +
|}</li>
 
<li>Added new <samp>Action</samp> tile properties:
 
<li>Added new <samp>Action</samp> tile properties:
 
{| class="wikitable"
 
{| class="wikitable"
Line 1,377: Line 1,389:  
* When referencing numeric IDs, you usually just need to convert them into a string (like <code>Game1.player.hasBuff("1590166")</code> or <code>Game1.player.eventsSeen.Contains("1590166")</code>).
 
* When referencing numeric IDs, you usually just need to convert them into a string (like <code>Game1.player.hasBuff("1590166")</code> or <code>Game1.player.eventsSeen.Contains("1590166")</code>).
 
* When creating buffs, see [[#buff overhaul|buff overhaul]] for how to create buffs now.
 
* When creating buffs, see [[#buff overhaul|buff overhaul]] for how to create buffs now.
 +
 +
===<samp>BuildableGameLocation</samp> and <samp>IAnimalLocation</samp> obsolete===
 +
: ''See also: [[#Build anywhere|build anywhere in what's new]].''
 +
 +
Since all locations now allow buildings and animals, mod code which handles <samp>BuildableGameLocation</samp> and <samp>IAnimalLocation</samp> won't detect all buildable locations. You can replace them with <samp>location.IsBuildableLocation()</samp> (or just access <samp>location.buildings</samp> directly) and <samp>location.animals.Any()</samp> instead.
    
===Player changes===
 
===Player changes===
translators
8,447

edits

Navigation menu