Json:entity:behavior: Difference between revisions

From Vintage Story Wiki
m
no edit summary
(Created page with "<table class="wikitable"> <tr style="background-color: grey;"> <th style="background-color: grey;">Name</th> <th style="background-color: grey;">Explanation</th> <t...")
 
mNo edit summary
 
(11 intermediate revisions by 2 users not shown)
Line 2: Line 2:
   <tr style="background-color: grey;">
   <tr style="background-color: grey;">
     <th style="background-color: grey;">Name</th>
     <th style="background-color: grey;">Name</th>
     <th style="background-color: grey;">Explanation</th>
     <th style="background-color: grey;" width="600">Explanation</th>
<th style="background-color: grey;">Properties</th>
    <th style="background-color: grey;">Properties</th>
    <th style="background-color: grey;">Side</th>
   </tr>
   </tr>
   <tr>
   <tr style="vertical-align: top;">
     <td>'''collectitems'''</td>
     <td><code>collectitems</code></td>
<td></td>
<td>The entity collections items laying around on the ground. Used by player.</td>
<td></td>
<td></td>
<td>Server</td>
   </tr>
   </tr>
   <tr>
   <tr style="vertical-align: top;">
     <td>'''health'''</td>
     <td><code>health</code></td>
<td></td>
<td>Applies custom health to the entity. Means the entity can be hurt as well.</td>
<td></td>
<td>''currenthealth = 20, maxhealth = 20, basemaxhealth = 20''</td>
<td>Server</td>
   </tr>
   </tr>
   <tr>
   <tr style="vertical-align: top;">
     <td>'''hunger'''</td>
     <td><code>hunger</code></td>
<td></td>
<td>Adds saturation and hunger, the entity needs to eat in order to stay alive.</td>
<td></td>
<td>''currentsaturation = 1200, maxsaturation = 1200, saturationlossdelay = 60 * 24, currentfruitLevel = 0, currentvegetableLevel = 0, currentgrainLevel = 0, currentproteinLevel = 0, currentdairyLevel = 0''</td>
<td>Server</td>
   </tr>
   </tr>
   <tr>
   <tr style="vertical-align: top;">
     <td>'''breathe'''</td>
     <td><code>breathe</code></td>
<td></td>
<td>The entity will need to breathe and therefore suffocate in other blocks (for example sand).</td>
<td></td>
<td></td>
<td>Server</td>
   </tr>
   </tr>
   <tr>
   <tr style="vertical-align: top;">
     <td>'''playerphysics'''</td>
     <td><code>playerphysics</code></td>
<td></td>
<td>Makes an entity controllable by a player.</td>
<td></td>
<td>''stepHeight = 0.6''</td>
<td>Universal</td>
   </tr>
   </tr>
   <tr>
   <tr style="vertical-align: top;">
     <td>'''controlledphysics'''</td>
     <td><code>controlledphysics</code></td>
<td></td>
<td>Can be controlled by a player.</td>
<td></td>
<td>''stepHeight = 0.6''</td>
<td>Universal</td>
   </tr>
   </tr>
   <tr>
   <tr style="vertical-align: top;">
     <td>'''taskai'''</td>
     <td><code>taskai</code></td>
<td>Allows you to specify tasks.</td>
<td></td>
<td></td>
<td></td>
<td></td>
   </tr>
   </tr>
   <tr>
   <tr style="vertical-align: top;">
     <td>'''interpolateposition'''</td>
     <td><code>interpolateposition</code></td>
<td></td>
<td>Interpolates entity position and rotate. Smooths out the animations. It's a visual effect, therefore not available on server side.</td>
<td></td>
<td></td>
<td>Client</td>
   </tr>
   </tr>
   <tr>
   <tr style="vertical-align: top;">
     <td>'''despawn'''</td>
     <td><code>despawn</code></td>
<td></td>
<td>The entity will despawn under given circumstances.</td>
<td></td>
<td>''minPlayerDistance, belowLightLevel, minSeconds = 30''</td>
<td>Server</td>
   </tr>
   </tr>
   <tr>
   <tr style="vertical-align: top;">
     <td>'''grow'''</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>Server</td>
   </tr>
   </tr>
   <tr>
   <tr style="vertical-align: top;">
     <td>'''multiply'''</td>
     <td><code>multiply</code></td>
<td></td>
<td>A pack of wolves for example grows in size over time (new babies are born).</td>
<td></td>
<td>''pregnancyDays = 3.0, spawnEntityCode, requiresNearbyEntityCode, requiresNearbyEntityRange = 5, multiplyCooldownDaysMin = 6, multiplyCooldownDaysMax = 12, portionsEatenForMultiply = 3, spawnQuantityMin = 1, spawnQuantityMax = 2, requiresFood = true''</td>
<td>Server</td>
   </tr>
   </tr>
   <tr>
   <tr style="vertical-align: top;">
     <td>'''aimingaccuracy'''</td>
     <td><code>aimingaccuracy</code></td>
<td></td>
<td>Adds aiming inaccuracy when sprinting, jumping, etc.</td>
<td></td>
<td></td>
<td>Universal</td>
   </tr>
   </tr>
   <tr>
   <tr style="vertical-align: top;">
     <td>'''emotionstates'''</td>
     <td><code>emotionstates</code></td>
<td></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>Server</td>
   </tr>
   </tr>
   <tr>
   <tr style="vertical-align: top;">
     <td>'''repulseagents'''</td>
     <td><code>repulseagents</code></td>
<td></td>
<td>Pushes other entities back.</td>
<td></td>
<td></td>
<td>Universal</td>
   </tr>
   </tr>
   <tr>
   <tr style="vertical-align: top;">
     <td>'''tiredness'''</td>
     <td><code>tiredness</code></td>
<td></td>
<td>The entity will get tired over time and needs recover by sleeping in a bed.</td>
<td></td>
<td>''currenttiredness = 0''</td>
<td>Universal</td>
   </tr>
   </tr>
   <tr>
   <tr style="vertical-align: top;">
     <td>'''nametag'''</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>Universal</td>
   </tr>
   </tr>
   <tr>
   <tr style="vertical-align: top;">
     <td>'''placeblock'''</td>
     <td><code>placeblock</code></td>
<td></td>
<td>The entity will place one of the given block codes from time to time.</td>
<td></td>
<td>''minHourDelay = 8 * 24, maxHourDelay = 15*24, blockCodes = []''</td>
<td>Server</td>
   </tr>
   </tr>
   <tr>
   <tr style="vertical-align: top;">
     <td>'''passivephysics'''</td>
     <td><code>passivephysics</code></td>
<td></td>
<td>Adds physics to the entity.</td>
<td></td>
<td>''waterDragFactor = 1, airDragFallingFactor = 1, groundDragFactor = 1, gravityFactor = 1''</td>
<td>Universal</td>
   </tr>
   </tr>
  <tr style="vertical-align: top;">
    <td><code>floatupwhenstuck</code></td>
<td>Float up the entity if it gets stuck in a block.</td>
<td>''onlyWhenDead = false''</td>
<td>Universal</td>
  </tr>floatupwhenstuck
</table>
</table>
Confirmedusers, editor
749

edits