Modding:Entity Json Properties: Difference between revisions

From Vintage Story Wiki
no edit summary
No edit summary
No edit summary
Line 530: Line 530:
     <td scope="row"><div class="tt" data-tt-id="p_behaviors_client_info" data-tt-parent="p_behaviors_client" data-invisible="true"></div></td>
     <td scope="row"><div class="tt" data-tt-id="p_behaviors_client_info" data-tt-parent="p_behaviors_client" data-invisible="true"></div></td>
     <td colspan="3">
     <td colspan="3">
<table class="wikitable">
{{:json:entity:behavior}}
  <tr style="background-color: grey;">
</td>
    <th style="background-color: grey;">Name</th>
    <th style="background-color: grey;">Explanation</th>
<th style="background-color: grey;">Properties</th>
   </tr>
   </tr>
   <tr>
   <tr>
     <td>'''collectitems'''</td>
     <td scope="row"><div class="tt" data-tt-id="p_animations" data-tt-parent="root">Animations</div></td>
<td></td>
    <td>array of object</td>
<td></td>
    <td></td>
    <td>WIP</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td>'''health'''</td>
     <td scope="row"><div class="tt" data-tt-id="p_animations_info" data-tt-parent="p_animations" data-invisible="true"></div></td>
<td></td>
    <td colspan="3">
<td></td>
Coming soon ...
</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td>'''hunger'''</td>
     <td colspan="4" style='font-size: 14pt; border-bottom: 2pt solid black; padding-left: 100px;'><b>}</b></td>
<td></td>
<td></td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td>'''breathe'''</td>
     <td colspan="4" style='font-size: 14pt; border-bottom: 2pt solid black; padding-left: 100px;'><b>server: {</b></td>
<td></td>
<td></td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td>'''playerphysics'''</td>
     <td scope="row"><div class="tt" data-tt-id="p_attributes_server" data-tt-parent="root">Attributes</div></td>
<td></td>
    <td>key: string, value: object</td>
<td></td>
    <td>-</td>
    <td>Custom Attributes associated with this entity only known by the server. They will not be send to the client.</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td>'''controlledphysics'''</td>
     <td scope="row"><div class="tt" data-tt-id="p_attributes_server_info" data-tt-parent="p_attributes_server" data-invisible="true"></div></td>
<td></td>
    <td colspan="3">
<td></td>
Extra attributes added to the entity for server use only. Those are final and cannot be modified. It's a good way to keep things organized and and modifiable. These can be used by behaviors or the entity class:
<syntaxhighlight lang="json">
    attributes: {
"attackPower": 10
},
</syntaxhighlight>
</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td>'''taskai'''</td>
     <td scope="row"><div class="tt" data-tt-id="p_behaviors_server" data-tt-parent="root">Behaviors</div></td>
<td></td>
    <td>array of object</td>
<td></td>
    <td></td>
    <td>A behavior adds custom abilities to the entity.</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td>'''interpolateposition'''</td>
     <td scope="row"><div class="tt" data-tt-id="p_behaviors_server_info" data-tt-parent="p_behaviors_server" data-invisible="true"></div></td>
<td></td>
    <td colspan="3">
<td></td>
{{:json:entity:behavior}}
</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td>'''despawn'''</td>
     <td scope="row"><div class="tt" data-tt-id="p_spawnconditions" data-tt-parent="root">SpawnConditions</div></td>
<td></td>
     <td>object</td>
<td></td>
     <td>-</td>
  </tr>
     <td>Specifies the circumstances of the entity spawn.</td>
  <tr>
     <td>'''grow'''</td>
<td></td>
<td></td>
  </tr>
  <tr>
     <td>'''multiply'''</td>
<td></td>
<td></td>
  </tr>
  <tr>
     <td>'''aimingaccuracy'''</td>
<td></td>
<td></td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td>'''emotionstates'''</td>
     <td scope="row"><div class="tt" data-tt-id="p_spawnconditions_runtime" data-tt-parent="p_spawnconditions">Runtime</div></td>
<td></td>
    <td>object</td>
<td></td>
    <td></td>
    <td></td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td>'''repulseagents'''</td>
     <td scope="row"><div class="tt" data-tt-id="p_spawnconditions_runtime_group" data-tt-parent="p_spawnconditions_runtime">Group</div></td>
<td></td>
    <td>string</td>
<td></td>
    <td></td>
    <td></td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td>'''tiredness'''</td>
     <td scope="row"><div class="tt" data-tt-id="p_spawnconditions_runtime_minlightlevel" data-tt-parent="p_spawnconditions_runtime">MinLightLevel</div></td>
<td></td>
    <td>integer</td>
<td></td>
    <td>0</td>
    <td></td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td>'''nametag'''</td>
     <td scope="row"><div class="tt" data-tt-id="p_spawnconditions_runtime_maxlightlevel" data-tt-parent="p_spawnconditions_runtime">MaxLightLevel</div></td>
<td></td>
    <td>integer</td>
<td></td>
    <td>32</td>
    <td></td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td>'''placeblock'''</td>
     <td scope="row"><div class="tt" data-tt-id="p_spawnconditions_runtime_lightleveltype" data-tt-parent="p_spawnconditions_runtime" data-hide="true">LightLevelType</div></td>
<td></td>
    <td>string</td>
<td></td>
    <td>&quot;MaxLight&quot;</td>
    <td></td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td>'''passivephysics'''</td>
     <td scope="row"><div class="tt" data-tt-id="p_spawnconditions_runtime_group_onlyblocklight" data-tt-parent="p_spawnconditions_runtime_lightleveltype">OnlyBlockLight</div></td>
<td></td>
    <td></td>
<td></td>
    <td></td>
  </tr>
    <td>Will get you just the block light</td>
</table>
</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td colspan="4" style='font-size: 14pt; border-bottom: 2pt solid black; padding-left: 100px;'><b>}</b></td>
     <td scope="row"><div class="tt" data-tt-id="p_spawnconditions_runtime_group_onlysunLight" data-tt-parent="p_spawnconditions_runtime_lightleveltype">OnlySunLight</div></td>
    <td></td>
    <td></td>
    <td>Will get you just the sun light unaffected by the day/night cycle</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td colspan="4" style='font-size: 14pt; border-bottom: 2pt solid black; padding-left: 100px;'><b>server: {</b></td>
     <td scope="row"><div class="tt" data-tt-id="p_spawnconditions_runtime_group_maxlight" data-tt-parent="p_spawnconditions_runtime_lightleveltype">MaxLight</div></td>
    <td></td>
    <td></td>
    <td>Will get you max(onlysunlight, onlyblocklight)</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_attributes_server" data-tt-parent="root">Attributes</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_spawnconditions_runtime_group_maxtimeofdaylight" data-tt-parent="p_spawnconditions_runtime_lightleveltype">MaxTimeOfDayLight</div></td>
     <td>key: string, value: object</td>
     <td></td>
     <td>-</td>
     <td></td>
    <td>Custom Attributes associated with this entity only known by the server. They will not be send to the client.</td>
     <td>Will get you max(sunlight * sunbrightness, blocklight)</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_attributes_server_info" data-tt-parent="p_attributes_server" data-invisible="true"></div></td>
     <td colspan="3">
Extra attributes added to the entity for server use only. Those are final and cannot be modified. It's a good way to keep things organized and and modifiable. These can be used by behaviors or the entity class:
<syntaxhighlight lang="json">
    attributes: {
"attackPower": 10
},
</syntaxhighlight>
</td>
   </tr>
   </tr>
       
   <tr>
   <tr>
     <td colspan="4" style='font-size: 14pt; border-bottom: 2pt solid black; padding-left: 100px;'><b>}</b></td>
     <td colspan="4" style='font-size: 14pt; border-bottom: 2pt solid black; padding-left: 100px;'><b>}</b></td>
Confirmedusers, editor, Administrators
886

edits