Line 4: |
Line 4: |
| | | |
| ==Raw data== | | ==Raw data== |
− | Fruit tree data is stored in <samp>Content\Data\fruitTrees.xnb</samp>, which can be [[Modding:Editing XNB files#unpacking|unpacked for editing]]. Here's the raw data as of {{version|1.5.1}} for reference: | + | Fruit tree data is stored in <samp>Content\Data\FruitTrees.xnb</samp>, which can be [[Modding:Editing XNB files#unpacking|unpacked for editing]]. Here's the raw data as of {{version|1.6.8}} for reference: |
| | | |
| {{collapse|Data|content=<syntaxhighlight lang="json"> | | {{collapse|Data|content=<syntaxhighlight lang="json"> |
| { | | { |
− | "628": "0/spring/638/1700", | + | "628": { |
− | "629": "1/spring/634/1000", | + | "PlantableLocationRules": null, |
− | "630": "2/summer/635/2000", | + | "DisplayName": "[LocalizedText Strings\\Objects:Cherry_Name]", |
− | "631": "3/summer/636/3000", | + | "Seasons": [ |
− | "632": "4/fall/637/3000", | + | "Spring" |
− | "633": "5/fall/613/2000", | + | ], |
− | "69": "7/island/91/2000", | + | "Fruit": [ |
− | "835": "8/island/834/2000" | + | { |
| + | "Season": null, |
| + | "Chance": 1.0, |
| + | "Condition": null, |
| + | "Id": "Default", |
| + | "ItemId": "(O)638", |
| + | "RandomItemId": null, |
| + | "MaxItems": null, |
| + | "MinStack": -1, |
| + | "MaxStack": -1, |
| + | "Quality": -1, |
| + | "ObjectInternalName": null, |
| + | "ObjectDisplayName": null, |
| + | "ToolUpgradeLevel": -1, |
| + | "IsRecipe": false, |
| + | "StackModifiers": null, |
| + | "StackModifierMode": "Stack", |
| + | "QualityModifiers": null, |
| + | "QualityModifierMode": "Stack", |
| + | "ModData": null, |
| + | "PerItemCondition": null |
| + | } |
| + | ], |
| + | "Texture": "TileSheets\\fruitTrees", |
| + | "TextureSpriteRow": 0, |
| + | "CustomFields": null |
| + | }, |
| + | "629": { |
| + | "PlantableLocationRules": null, |
| + | "DisplayName": "[LocalizedText Strings\\Objects:Apricot_Name]", |
| + | "Seasons": [ |
| + | "Spring" |
| + | ], |
| + | "Fruit": [ |
| + | { |
| + | "Season": null, |
| + | "Chance": 1.0, |
| + | "Condition": null, |
| + | "Id": "Default", |
| + | "ItemId": "(O)634", |
| + | "RandomItemId": null, |
| + | "MaxItems": null, |
| + | "MinStack": -1, |
| + | "MaxStack": -1, |
| + | "Quality": -1, |
| + | "ObjectInternalName": null, |
| + | "ObjectDisplayName": null, |
| + | "ToolUpgradeLevel": -1, |
| + | "IsRecipe": false, |
| + | "StackModifiers": null, |
| + | "StackModifierMode": "Stack", |
| + | "QualityModifiers": null, |
| + | "QualityModifierMode": "Stack", |
| + | "ModData": null, |
| + | "PerItemCondition": null |
| + | } |
| + | ], |
| + | "Texture": "TileSheets\\fruitTrees", |
| + | "TextureSpriteRow": 1, |
| + | "CustomFields": null |
| + | }, |
| + | "630": { |
| + | "PlantableLocationRules": null, |
| + | "DisplayName": "[LocalizedText Strings\\Objects:Orange_Name]", |
| + | "Seasons": [ |
| + | "Summer" |
| + | ], |
| + | "Fruit": [ |
| + | { |
| + | "Season": null, |
| + | "Chance": 1.0, |
| + | "Condition": null, |
| + | "Id": "Default", |
| + | "ItemId": "(O)635", |
| + | "RandomItemId": null, |
| + | "MaxItems": null, |
| + | "MinStack": -1, |
| + | "MaxStack": -1, |
| + | "Quality": -1, |
| + | "ObjectInternalName": null, |
| + | "ObjectDisplayName": null, |
| + | "ToolUpgradeLevel": -1, |
| + | "IsRecipe": false, |
| + | "StackModifiers": null, |
| + | "StackModifierMode": "Stack", |
| + | "QualityModifiers": null, |
| + | "QualityModifierMode": "Stack", |
| + | "ModData": null, |
| + | "PerItemCondition": null |
| + | } |
| + | ], |
| + | "Texture": "TileSheets\\fruitTrees", |
| + | "TextureSpriteRow": 2, |
| + | "CustomFields": null |
| + | }, |
| + | "631": { |
| + | "PlantableLocationRules": null, |
| + | "DisplayName": "[LocalizedText Strings\\Objects:Peach_Name]", |
| + | "Seasons": [ |
| + | "Summer" |
| + | ], |
| + | "Fruit": [ |
| + | { |
| + | "Season": null, |
| + | "Chance": 1.0, |
| + | "Condition": null, |
| + | "Id": "Default", |
| + | "ItemId": "(O)636", |
| + | "RandomItemId": null, |
| + | "MaxItems": null, |
| + | "MinStack": -1, |
| + | "MaxStack": -1, |
| + | "Quality": -1, |
| + | "ObjectInternalName": null, |
| + | "ObjectDisplayName": null, |
| + | "ToolUpgradeLevel": -1, |
| + | "IsRecipe": false, |
| + | "StackModifiers": null, |
| + | "StackModifierMode": "Stack", |
| + | "QualityModifiers": null, |
| + | "QualityModifierMode": "Stack", |
| + | "ModData": null, |
| + | "PerItemCondition": null |
| + | } |
| + | ], |
| + | "Texture": "TileSheets\\fruitTrees", |
| + | "TextureSpriteRow": 3, |
| + | "CustomFields": null |
| + | }, |
| + | "632": { |
| + | "PlantableLocationRules": null, |
| + | "DisplayName": "[LocalizedText Strings\\Objects:Pomegranate_Name]", |
| + | "Seasons": [ |
| + | "Fall" |
| + | ], |
| + | "Fruit": [ |
| + | { |
| + | "Season": null, |
| + | "Chance": 1.0, |
| + | "Condition": null, |
| + | "Id": "Default", |
| + | "ItemId": "(O)637", |
| + | "RandomItemId": null, |
| + | "MaxItems": null, |
| + | "MinStack": -1, |
| + | "MaxStack": -1, |
| + | "Quality": -1, |
| + | "ObjectInternalName": null, |
| + | "ObjectDisplayName": null, |
| + | "ToolUpgradeLevel": -1, |
| + | "IsRecipe": false, |
| + | "StackModifiers": null, |
| + | "StackModifierMode": "Stack", |
| + | "QualityModifiers": null, |
| + | "QualityModifierMode": "Stack", |
| + | "ModData": null, |
| + | "PerItemCondition": null |
| + | } |
| + | ], |
| + | "Texture": "TileSheets\\fruitTrees", |
| + | "TextureSpriteRow": 4, |
| + | "CustomFields": null |
| + | }, |
| + | "633": { |
| + | "PlantableLocationRules": null, |
| + | "DisplayName": "[LocalizedText Strings\\Objects:Apple_Name]", |
| + | "Seasons": [ |
| + | "Fall" |
| + | ], |
| + | "Fruit": [ |
| + | { |
| + | "Season": null, |
| + | "Chance": 1.0, |
| + | "Condition": null, |
| + | "Id": "Default", |
| + | "ItemId": "(O)613", |
| + | "RandomItemId": null, |
| + | "MaxItems": null, |
| + | "MinStack": -1, |
| + | "MaxStack": -1, |
| + | "Quality": -1, |
| + | "ObjectInternalName": null, |
| + | "ObjectDisplayName": null, |
| + | "ToolUpgradeLevel": -1, |
| + | "IsRecipe": false, |
| + | "StackModifiers": null, |
| + | "StackModifierMode": "Stack", |
| + | "QualityModifiers": null, |
| + | "QualityModifierMode": "Stack", |
| + | "ModData": null, |
| + | "PerItemCondition": null |
| + | } |
| + | ], |
| + | "Texture": "TileSheets\\fruitTrees", |
| + | "TextureSpriteRow": 5, |
| + | "CustomFields": null |
| + | }, |
| + | "69": { |
| + | "PlantableLocationRules": null, |
| + | "DisplayName": "[LocalizedText Strings\\Objects:Banana_Name]", |
| + | "Seasons": [ |
| + | "Summer" |
| + | ], |
| + | "Fruit": [ |
| + | { |
| + | "Season": null, |
| + | "Chance": 1.0, |
| + | "Condition": null, |
| + | "Id": "Default", |
| + | "ItemId": "(O)91", |
| + | "RandomItemId": null, |
| + | "MaxItems": null, |
| + | "MinStack": -1, |
| + | "MaxStack": -1, |
| + | "Quality": -1, |
| + | "ObjectInternalName": null, |
| + | "ObjectDisplayName": null, |
| + | "ToolUpgradeLevel": -1, |
| + | "IsRecipe": false, |
| + | "StackModifiers": null, |
| + | "StackModifierMode": "Stack", |
| + | "QualityModifiers": null, |
| + | "QualityModifierMode": "Stack", |
| + | "ModData": null, |
| + | "PerItemCondition": null |
| + | } |
| + | ], |
| + | "Texture": "TileSheets\\fruitTrees", |
| + | "TextureSpriteRow": 7, |
| + | "CustomFields": null |
| + | }, |
| + | "835": { |
| + | "PlantableLocationRules": null, |
| + | "DisplayName": "[LocalizedText Strings\\Objects:Mango_Name]", |
| + | "Seasons": [ |
| + | "Summer" |
| + | ], |
| + | "Fruit": [ |
| + | { |
| + | "Season": null, |
| + | "Chance": 1.0, |
| + | "Condition": null, |
| + | "Id": "Default", |
| + | "ItemId": "(O)834", |
| + | "RandomItemId": null, |
| + | "MaxItems": null, |
| + | "MinStack": -1, |
| + | "MaxStack": -1, |
| + | "Quality": -1, |
| + | "ObjectInternalName": null, |
| + | "ObjectDisplayName": null, |
| + | "ToolUpgradeLevel": -1, |
| + | "IsRecipe": false, |
| + | "StackModifiers": null, |
| + | "StackModifierMode": "Stack", |
| + | "QualityModifiers": null, |
| + | "QualityModifierMode": "Stack", |
| + | "ModData": null, |
| + | "PerItemCondition": null |
| + | } |
| + | ], |
| + | "Texture": "TileSheets\\fruitTrees", |
| + | "TextureSpriteRow": 8, |
| + | "CustomFields": null |
| + | } |
| } | | } |
| </syntaxhighlight>}} | | </syntaxhighlight>}} |
| | | |
| ====Data format==== | | ====Data format==== |
− | You can now add custom [[Fruit Trees|fruit trees]] by editing the revamped <samp>Data/fruitTrees</samp> asset. This consists of a string → model lookup, where...
| + | The <samp>Data/FruitTrees</samp> asset consists of a string → model lookup, where... |
− | * The key is the [[#Custom items|unqualified item ID]] for the sapling item in <samp>Data/Objects</samp>. | + | * The key is the unqualified item it for the sapling item in <samp>Data/Objects</samp>. |
| * The value is a model with the fields listed below. | | * The value is a model with the fields listed below. |
| | | |
Line 98: |
Line 362: |
| |- | | |- |
| | <samp>CustomFields</samp> | | | <samp>CustomFields</samp> |
− | | The [[#Custom data fields|custom fields]] for this entry. | + | | The [[Modding:Common_data_field_types#Custom_fields|custom fields]] for this entry. |
| |} | | |} |
| | | |
− | For example, this content pack adds a custom fruit tree, including [[#Custom items|custom items]] for the sapling and fruit: | + | For example, this content pack adds a custom fruit tree, including [[Modding:Items|custom items]] for the sapling and fruit: |
| | | |
| {{#tag:syntaxhighlight|<nowiki> | | {{#tag:syntaxhighlight|<nowiki> |
Line 176: |
Line 440: |
| * Spawn them on [[Modding:Maps|map tiles]] when the location is created, using the new <samp>SpawnTree: fruit {{t|tree ID}} {{o|growth stage on location created}} {{o|growth stage on day-update regrowth}}</samp> tile property. This must be added on the <samp>Paths</samp> layer, which must also have tile index 34 from the <samp>paths</samp> tilesheet. | | * Spawn them on [[Modding:Maps|map tiles]] when the location is created, using the new <samp>SpawnTree: fruit {{t|tree ID}} {{o|growth stage on location created}} {{o|growth stage on day-update regrowth}}</samp> tile property. This must be added on the <samp>Paths</samp> layer, which must also have tile index 34 from the <samp>paths</samp> tilesheet. |
| * Or give the player a seed item in the usual ways (e.g. from [[#Custom shops|a shop]], [[Modding:Mail data|mail letter]], etc). | | * Or give the player a seed item in the usual ways (e.g. from [[#Custom shops|a shop]], [[Modding:Mail data|mail letter]], etc). |
| + | |
| + | [[Category:Modding]] |