Json:entity:behavior: Difference between revisions

From Vintage Story Wiki
No edit summary
No edit summary
Line 56: Line 56:
   <tr style="vertical-align: top;">
   <tr style="vertical-align: top;">
     <td><code>despawn</code></td>
     <td><code>despawn</code></td>
<td></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>
Line 62: Line 62:
   <tr style="vertical-align: top;">
   <tr style="vertical-align: top;">
     <td><code>grow</code></td>
     <td><code>grow</code></td>
<td></td>
<td>The entity will grow and eventually turn into one of its adults.</td>
<td></td>
<td>hoursToGrow = 96, adultEntityCodes = [], </td>
<td></td>
<td>Server</td>
   </tr>
   </tr>
   <tr style="vertical-align: top;">
   <tr style="vertical-align: top;">
     <td><code>multiply</code></td>
     <td><code>multiply</code></td>
<td></td>
<td></td>
<td></td>
<td>pregnancyDays = 3.0, spawnEntityCode, requiresNearbyEntityCode, requiresNearbyEntityRange = 5,
<td></td>
multiplyCooldownDaysMin = 6, multiplyCooldownDaysMax = 12, portionsEatenForMultiply = 3, spawnQuantityMin = 1, spawnQuantityMax = 2,
requiresFood = true</td>
<td>Server</td>
   </tr>
   </tr>
   <tr style="vertical-align: top;">
   <tr style="vertical-align: top;">
Line 76: Line 78:
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>Universal</td>
   </tr>
   </tr>
   <tr style="vertical-align: top;">
   <tr style="vertical-align: top;">
     <td><code>emotionstates</code></td>
     <td><code>emotionstates</code></td>
<td>Adds emotion states with a given chance. As an example, it can be used to make an animal "hungry" (aggressive) and "saturated" (passive).</td>
<td></td>
<td></td>
<td></td>
<td>Server</td>
<td></td>
   </tr>
   </tr>
   <tr style="vertical-align: top;">
   <tr style="vertical-align: top;">
Line 88: Line 90:
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>Universal</td>
   </tr>
   </tr>
   <tr style="vertical-align: top;">
   <tr style="vertical-align: top;">
     <td><code>tiredness</code></td>
     <td><code>tiredness</code></td>
<td></td>
<td></td>
<td></td>
<td>currenttiredness = 0</td>
<td></td>
<td>Universal</td>
   </tr>
   </tr>
   <tr style="vertical-align: top;">
   <tr style="vertical-align: top;">
     <td><code>nametag</code></td>
     <td><code>nametag</code></td>
<td></td>
<td>Adds a name tag to the entity which will be displayed above the entity.</td>
<td></td>
<td>selectFromRandomName</td>
<td></td>
<td>Universal</td>
   </tr>
   </tr>
   <tr style="vertical-align: top;">
   <tr style="vertical-align: top;">
     <td><code>placeblock</code></td>
     <td><code>placeblock</code></td>
<td></td>
<td></td>
<td></td>
<td>minHourDelay = 8 * 24, maxHourDelay = 15*24, blockCodes = []</td>
<td></td>
<td>Server</td>
   </tr>
   </tr>
   <tr style="vertical-align: top;">
   <tr style="vertical-align: top;">
     <td><code>passivephysics</code></td>
     <td><code>passivephysics</code></td>
<td></td>
<td></td>
<td></td>
<td>waterDragFactor = 1, airDragFallingFactor = 1, groundDragFactor = 1, gravityFactor = 1</td>
<td></td>
<td>Universal</td>
   </tr>
   </tr>
</table>
</table>

Revision as of 13:33, 16 November 2018

Name Explanation Properties Side
collectitems The entity collections items laying around on the ground. Used by player Server
health Applies custom health to the entity. Means the entity can be hurt as well. currenthealth = 20, maxhealth = 20, basemaxhealth = 20 Server
hunger Adds saturation and hunger, the entity needs to eat in order to stay alive. currentsaturation = 1200, maxsaturation = 1200, saturationlossdelay = 60 * 24, currentfruitLevel = 0, currentvegetableLevel = 0, currentgrainLevel = 0, currentproteinLevel = 0, currentdairyLevel = 0 Server
breathe The entity will need to breathe and therefore suffocate in other blocks (for example sand). Server
playerphysics stepHeight = 0.6 Universal
controlledphysics stepHeight = 0.6 Universal
taskai
interpolateposition Interpolates entity position and rotate. Smooths out the animations. It's a visual effect, therefore not available on server side. Client
despawn The entity will despawn under given circumstances. minPlayerDistance, belowLightLevel, minSeconds = 30 Server
grow The entity will grow and eventually turn into one of its adults. hoursToGrow = 96, adultEntityCodes = [], Server
multiply pregnancyDays = 3.0, spawnEntityCode, requiresNearbyEntityCode, requiresNearbyEntityRange = 5,

multiplyCooldownDaysMin = 6, multiplyCooldownDaysMax = 12, portionsEatenForMultiply = 3, spawnQuantityMin = 1, spawnQuantityMax = 2,

requiresFood = true
Server
aimingaccuracy Universal
emotionstates Adds emotion states with a given chance. As an example, it can be used to make an animal "hungry" (aggressive) and "saturated" (passive). Server
repulseagents Universal
tiredness currenttiredness = 0 Universal
nametag Adds a name tag to the entity which will be displayed above the entity. selectFromRandomName Universal
placeblock minHourDelay = 8 * 24, maxHourDelay = 15*24, blockCodes = [] Server
passivephysics waterDragFactor = 1, airDragFallingFactor = 1, groundDragFactor = 1, gravityFactor = 1 Universal