Json:entity:behavior: Difference between revisions

From Vintage Story Wiki
no edit summary
No edit summary
No edit summary
Line 15: Line 15:
     <td><code>health</code></td>
     <td><code>health</code></td>
<td>Applies custom health to the entity. Means the entity can be hurt as well.</td>
<td>Applies custom health to the entity. Means the entity can be hurt as well.</td>
<td>currenthealth = 20, maxhealth = 20, basemaxhealth = 20</td>
<td>''currenthealth = 20, maxhealth = 20, basemaxhealth = 20''</td>
<td>Server</td>
<td>Server</td>
   </tr>
   </tr>
Line 21: Line 21:
     <td><code>hunger</code></td>
     <td><code>hunger</code></td>
<td>Adds saturation and hunger, the entity needs to eat in order to stay alive.</td>
<td>Adds saturation and hunger, the entity needs to eat in order to stay alive.</td>
<td>currentsaturation = 1200, maxsaturation = 1200, saturationlossdelay = 60 * 24,
<td>''currentsaturation = 1200, maxsaturation = 1200, saturationlossdelay = 60 * 24, currentfruitLevel = 0, currentvegetableLevel = 0, currentgrainLevel = 0, currentproteinLevel = 0, currentdairyLevel = 0''</td>
currentfruitLevel = 0, currentvegetableLevel = 0, currentgrainLevel = 0,
currentproteinLevel = 0, currentdairyLevel = 0</td>
<td>Server</td>
<td>Server</td>
   </tr>
   </tr>
Line 35: Line 33:
     <td><code>playerphysics</code></td>
     <td><code>playerphysics</code></td>
<td>Makes an entity controllable by a player.</td>
<td>Makes an entity controllable by a player.</td>
<td>stepHeight = 0.6</td>
<td>''stepHeight = 0.6''</td>
<td>Universal</td>
<td>Universal</td>
   </tr>
   </tr>
Line 41: Line 39:
     <td><code>controlledphysics</code></td>
     <td><code>controlledphysics</code></td>
<td>Can be controlled by a player.</td>
<td>Can be controlled by a player.</td>
<td>stepHeight = 0.6</td>
<td>''stepHeight = 0.6''</td>
<td>Universal</td>
<td>Universal</td>
   </tr>
   </tr>
Line 59: Line 57:
     <td><code>despawn</code></td>
     <td><code>despawn</code></td>
<td>The entity will despawn under given circumstances.</td>
<td>The entity will despawn under given circumstances.</td>
<td>minPlayerDistance, belowLightLevel, minSeconds = 30</td>
<td>''minPlayerDistance, belowLightLevel, minSeconds = 30''</td>
<td>Server</td>
<td>Server</td>
   </tr>
   </tr>
Line 65: Line 63:
     <td><code>grow</code></td>
     <td><code>grow</code></td>
<td>The entity will grow and eventually turn into one of its adults.</td>
<td>The entity will grow and eventually turn into one of its adults.</td>
<td>hoursToGrow = 96, adultEntityCodes = [], </td>
<td>''hoursToGrow = 96, adultEntityCodes = []''</td>
<td>Server</td>
<td>Server</td>
   </tr>
   </tr>
Line 71: Line 69:
     <td><code>multiply</code></td>
     <td><code>multiply</code></td>
<td>A pack of wolves for example grows in size over time (new babies are born).</td>
<td>A pack of wolves for example grows in size over time (new babies are born).</td>
<td>pregnancyDays = 3.0, spawnEntityCode, requiresNearbyEntityCode, requiresNearbyEntityRange = 5,
<td>''pregnancyDays = 3.0, spawnEntityCode, requiresNearbyEntityCode, requiresNearbyEntityRange = 5, multiplyCooldownDaysMin = 6, multiplyCooldownDaysMax = 12, portionsEatenForMultiply = 3, spawnQuantityMin = 1, spawnQuantityMax = 2, requiresFood = true''</td>
multiplyCooldownDaysMin = 6, multiplyCooldownDaysMax = 12, portionsEatenForMultiply = 3, spawnQuantityMin = 1, spawnQuantityMax = 2,
requiresFood = true</td>
<td>Server</td>
<td>Server</td>
   </tr>
   </tr>
Line 90: Line 86:
   <tr style="vertical-align: top;">
   <tr style="vertical-align: top;">
     <td><code>repulseagents</code></td>
     <td><code>repulseagents</code></td>
<td></td>
<td>Pushes other entities back.</td>
<td></td>
<td></td>
<td>Universal</td>
<td>Universal</td>
Line 97: Line 93:
     <td><code>tiredness</code></td>
     <td><code>tiredness</code></td>
<td>The entity will get tired over time and needs recover by sleeping in a bed.</td>
<td>The entity will get tired over time and needs recover by sleeping in a bed.</td>
<td>currenttiredness = 0</td>
<td>''currenttiredness = 0''</td>
<td>Universal</td>
<td>Universal</td>
   </tr>
   </tr>
Line 103: Line 99:
     <td><code>nametag</code></td>
     <td><code>nametag</code></td>
<td>Adds a name tag to the entity which will be displayed above the entity.</td>
<td>Adds a name tag to the entity which will be displayed above the entity.</td>
<td>selectFromRandomName</td>
<td>''selectFromRandomName''</td>
<td>Universal</td>
<td>Universal</td>
   </tr>
   </tr>
Line 109: Line 105:
     <td><code>placeblock</code></td>
     <td><code>placeblock</code></td>
<td>The entity will place one of the given block codes from time to time.</td>
<td>The entity will place one of the given block codes from time to time.</td>
<td>minHourDelay = 8 * 24, maxHourDelay = 15*24, blockCodes = []</td>
<td>''minHourDelay = 8 * 24, maxHourDelay = 15*24, blockCodes = []''</td>
<td>Server</td>
<td>Server</td>
   </tr>
   </tr>
Line 115: Line 111:
     <td><code>passivephysics</code></td>
     <td><code>passivephysics</code></td>
<td>Adds physics to the entity.</td>
<td>Adds physics to the entity.</td>
<td>waterDragFactor = 1, airDragFallingFactor = 1, groundDragFactor = 1, gravityFactor = 1</td>
<td>''waterDragFactor = 1, airDragFallingFactor = 1, groundDragFactor = 1, gravityFactor = 1''</td>
<td>Universal</td>
<td>Universal</td>
   </tr>
   </tr>
</table>
</table>
Confirmedusers, editor, Administrators
886

edits