Line 1,058: |
Line 1,058: |
| '''Note:''' an unlike the previous <samp>Data/fruitTrees</samp> format, | | '''Note:''' an unlike the previous <samp>Data/fruitTrees</samp> format, |
| |- | | |- |
− | | <samp>FruitId</samp> | + | | <samp>Fruit</samp> |
− | | The '''unqualified''' object ID for the fruit it produces. | + | | The fruit items to add to the tree each day while the tree is in-season. The first matching fruit (if any) is selected each day. |
| + | |
| + | This consists of a list of models with these fields: |
| + | {| class="wikitable" |
| + | |- |
| + | ! field |
| + | ! effect |
| + | |- |
| + | | ''common fields'' |
| + | | See [[#Item spawn fields|item spawn fields]] for the generic item fields supported for fruit items. |
| + | |
| + | If set to an [[#Item queries|item query]] which returns multiple items, one of them will be selected at random. |
| + | |- |
| + | | <samp>Season</samp> |
| + | | ''(Optional)'' If set, the group only applies if the tree's location is in this season. |
| + | |- |
| + | | <samp>Chance</samp> |
| + | | ''(Optional)'' The probability that this entry is selected, as a value between 0 (never drops) and 1 (always drops). Default 1 (100% chance). |
| + | |} |
| |- | | |- |
| | <samp>Texture</samp> | | | <samp>Texture</samp> |
Line 1,094: |
Line 1,112: |
| "DisplayName": "[DataString Data\ObjectInformation Example.ModId_Pufferfruit 4]", // field 4 (display name) for our fruit item | | "DisplayName": "[DataString Data\ObjectInformation Example.ModId_Pufferfruit 4]", // field 4 (display name) for our fruit item |
| "Season": "spring", | | "Season": "spring", |
− | "FruitId": "Example.ModId_Pufferfruit", | + | "Fruit": [ |
| + | { |
| + | "Id": "Example.ModId_Pufferfruit", |
| + | "ItemId": "Example.ModId_Pufferfruit" |
| + | } |
| + | ], |
| "Texture": "Mods\\Example.ModId\\FruitTrees", | | "Texture": "Mods\\Example.ModId\\FruitTrees", |
| "TextureSpriteRow": 0 | | "TextureSpriteRow": 0 |
Line 1,113: |
Line 1,136: |
| | | |
| ====Fruit items==== | | ====Fruit items==== |
− | The <samp>fruitsOnTree</samp> field was previously the number of fruit on the tree. It's now a list of fruit items instead, so C# mods can make the same fruit tree produce different fruit.
| + | For C# mods, the <samp>fruitsOnTree</samp> field (number of fruit on the tree) has been replaced by <samp>fruitObjectsOnTree</samp> (list of fruit items). |
| | | |
| ===Custom tools=== | | ===Custom tools=== |