SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
Back to NxLabs

NxLabs / Vintage Story

Flee Exhaustion

IBy Isif

Entities run at slower speeds when they are hurt.

Description

The speed of a fleeing creature is reduced to the percentage of how much health it has remaining. Licensed with the MIT License.

Configuration

The server config is in the ModConfig fleeexhaustion-server.json. ExhaustStrength is a float which changes how strong the effect is. Default is 1 (100%).

Mod Integration

This mod adds two new configuration options to the fleeentity AI task:

<table style="border-collapse: collapse; width: 100%; height: 59px;" border="1"> <tbody> <tr style="height: 19px;"> <td style="width: 8.24206%; height: 19px;">Key</td> <td style="width: 5.01091%; height: 19px;">Type</td> <td style="width: 61.747%; height: 19px;">Description</td> <td style="width: 25%; height: 19px;">Default value</td> </tr> <tr style="height: 20px;"> <td style="width: 8.24206%; height: 20px;">minmovespeed</td> <td style="width: 5.01091%; height: 20px;">Float</td> <td style="width: 61.747%; height: 20px;">The lowest speed possible for this entity to run at.</td> <td style="width: 25%; height: 20px;">movespeed divided by 2</td> </tr> <tr style="height: 20px;"> <td style="width: 8.24206%; height: 20px;">exhausts</td> <td style="width: 5.01091%; height: 20px;">Boolean</td> <td style="width: 61.747%; height: 20px;">Whether this entity is affected by this mod.</td> <td style="width: 25%; height: 20px;">true</td> </tr> </tbody> </table>

Consider the following JSON patch:

<pre>{ "file": "game:entities/land/gazelle", "op": "add", "path": "/server/behaviors/9/aitasks/0/exhausts", "value": false }</pre>

This example patch would cause gazelles to not be slowed, regardless of their health status.

Debug info

If entity debug info is enabled on both the server and the client:

/entity debug on

.clientconfig showentitydebuginfo True

the following debug attributes may be visible if the entity is exhaustible:

<table style="border-collapse: collapse; width: 100%; height: 40px;" border="1"> <tbody> <tr style="height: 20px;"> <td style="width: 8.98138%; height: 20px;">Key</td> <td style="width: 91.0186%; height: 20px;">Description</td> </tr> <tr style="height: 20px;"> <td style="width: 8.98138%; height: 20px;">movespeed</td> <td style="width: 91.0186%; height: 20px;">The speed at which the entity currently flees at.</td> </tr> <tr> <td style="width: 8.98138%;">minspeed</td> <td style="width: 91.0186%;">The minimum move speed configured for this entity.</td> </tr> <tr> <td style="width: 8.98138%;">exhauststrength</td> <td style="width: 91.0186%;">What the move speed ends up being multiplied by when accounting for the exhaustStrength world config. Equivalent to the reciprocal of this config value.</td> </tr> </tbody> </table>

Download

No download link is available for this entry right now.

Ratings & reviews

No ratings yet

Sign in to leave a rating or comment.