Changes

Jump to navigation Jump to search
move fruit tree info into its own section, fix link
Line 227: Line 227:  
}</nowiki>|lang=javascript}}
 
}</nowiki>|lang=javascript}}
   −
Most item data assets work just like <samp>Data/ObjectInformation</samp>.
+
Most item data assets work just like <samp>Data/ObjectInformation</samp>. For fruit trees, see [[#Custom fruit trees|custom fruit trees]].
 
  −
====Fruit trees====
  −
Fruit trees are a bit different since they have three separate entities (the sapling item, the fruit tree itself, and the fruit item it produces). Note that the key in <samp>Data/FruitTrees</samp> is the sapling's item ID, and the value references the fruit's item ID.
  −
 
  −
{{#tag:syntaxhighlight|<nowiki>
  −
{
  −
    "Format": "</nowiki>{{Content Patcher version}}<nowiki>",
  −
    "Changes": [
  −
        // add fruit + sapling items
  −
        // note: sapling must have an edibility under 0 (usually -300) to be plantable
  −
        {
  −
            "Action": "EditData",
  −
            "Target": "Data/ObjectInformation",
  −
            "Entries": {
  −
                "Example.ModId_Pufferfruit": "Pufferfruit/1200/100/Basic -6/Pufferfruit/An example fruit item.////1/Mods\\Example.ModId\\Objects",
  −
                "Example.ModId_Puffersapling": "Puffersapling/1200/-300/Basic -74/Puffersapling/An example tree sapling.////2/Mods\\Example.ModId\\Objects"
  −
            }
  −
        },
  −
 
  −
        // add fruit tree
  −
        {
  −
            "Action": "EditData",
  −
            "Target": "Data/FruitTrees",
  −
            "Entries": {
  −
                "Example.ModId_Puffersapling": "0/spring/Example.ModId_Pufferfruit/0/Mods\\Example.ModId\\FruitTrees"
  −
            }
  −
        },
  −
 
  −
        // add images
  −
        {
  −
            "Action": "Load",
  −
            "Target": "Mods/Example.ModId/FruitTrees, Mods/Example.ModId/Objects",
  −
            "FromFile": "assets/{{TargetWithoutPath}}.png" // assets/FruitTrees.png, assets/Objects.png
  −
        },
  −
    ]
  −
}</nowiki>|lang=javascript}}
      
====Tools====
 
====Tools====
Line 574: Line 538:     
==Custom fruit trees==
 
==Custom fruit trees==
See [[#Custom items|''custom items'']] above, which covers fruit trees too.
+
Fruit trees are a bit different since they have three separate entities (the sapling item, the fruit tree itself, and the fruit item it produces). Note that the key in <samp>Data/FruitTrees</samp> is the sapling's item ID, and the value references the fruit's item ID.
 +
 
 +
{{#tag:syntaxhighlight|<nowiki>
 +
{
 +
    "Format": "</nowiki>{{Content Patcher version}}<nowiki>",
 +
    "Changes": [
 +
        // add fruit + sapling items
 +
        // note: sapling must have an edibility under 0 (usually -300) to be plantable
 +
        {
 +
            "Action": "EditData",
 +
            "Target": "Data/ObjectInformation",
 +
            "Entries": {
 +
                "Example.ModId_Pufferfruit": "Pufferfruit/1200/100/Basic -6/Pufferfruit/An example fruit item.////1/Mods\\Example.ModId\\Objects",
 +
                "Example.ModId_Puffersapling": "Puffersapling/1200/-300/Basic -74/Puffersapling/An example tree sapling.////2/Mods\\Example.ModId\\Objects"
 +
            }
 +
        },
 +
 
 +
        // add fruit tree
 +
        {
 +
            "Action": "EditData",
 +
            "Target": "Data/FruitTrees",
 +
            "Entries": {
 +
                "Example.ModId_Puffersapling": "0/spring/Example.ModId_Pufferfruit/0/Mods\\Example.ModId\\FruitTrees"
 +
            }
 +
        },
 +
 
 +
        // add images
 +
        {
 +
            "Action": "Load",
 +
            "Target": "Mods/Example.ModId/FruitTrees, Mods/Example.ModId/Objects",
 +
            "FromFile": "assets/{{TargetWithoutPath}}.png" // assets/FruitTrees.png, assets/Objects.png
 +
        },
 +
    ]
 +
}</nowiki>|lang=javascript}}
    
==Custom wild trees==
 
==Custom wild trees==
Line 1,116: Line 1,113:  
|-
 
|-
 
| <samp>Maps/paths</samp>
 
| <samp>Maps/paths</samp>
| added icon for [[#Custom wild tree|custom wild tree spawn]]
+
| added icon for [[#Custom wild trees|custom wild tree spawn]]
 
|
 
|
 
|
 
|
translators
8,446

edits

Navigation menu