List of server commands/entity: Difference between revisions

From Vintage Story Wiki
No edit summary
Tags: Mobile edit Mobile web edit
m (Updated the /entity cmd section with further information and corrected how it works. Need to check this for the other subcommands though.)
 
(6 intermediate revisions by 3 users not shown)
Line 2: Line 2:


<translate>
<translate>
<!--T:1-->
<onlyinclude>
<onlyinclude>
*<code>/entity [spawn|countbytype|removebytype|countbyclass|removebyclass|listnearest|debug|removebyid]</code><br /> Spawn, remove, and count entities (item drops, creatures, etc).
*<code>/entity [subcommand]</code><br /> Spawn, remove, and count entities (item drops, creatures, etc).
**<code>/entity spawn [entitytype]</code><br /> Spawn an entity by type. Valid types can be found in the survival mod assets folder /entities.
**<code>/entity cmd ''entityFilter[]'' [subcommand]</code><br /> Issue commands on existing entities. Requires a single entity filter from <code>s[]</code> (self), <code>l[]</code> (entity looked on), <code>p[]</code> (all players) or <code>e[]</code> (all entities). The square brackets take additional filters (optional), i.e. <code>e[type=gazelle,range=3,alive=true]</code>
**<code>/entity countbytype [entitytype]</code><br /> Count how many entities of a given type exist. <code>entitytype</code> can use wildcards, eg <code>drifter-*</code> counts drifters of any type.
***<code>/entity cmd stopanim</code><br /> Stop an entity animation.
**<code>/entity removebytype [entitytype]</code><br /> Remove all entities of a given type. <code>entitytype</code> can use wildcards.
***<code>/entity cmd stoptask</code><br /> Stop an AI task.
**<code>/entity remove [entitytype]</code><br /> Short hand for /entity removebytype
***<code>/entity cmd setattr</code><br /> Set entity attributes.
**<code>/entity countbyclass [entityclass]</code><br /> Count how many entities of a given class, such as <code>EntityItem</code> or <code>EntityAgent</code>, exist.
***<code>/entity cmd ''entityFilter[]'' setgen ''number''</code><br /> Set entity generation, i.e. <code>/entity cmd l[] setgen 10</code> (sets the generation of the looked at entity to 10).
**<code>/entity countg </code><br /> List a summary of all nearby entities, grouped by the first code part (wolf, sheep, etc)
***<code>/entity cmd setlact</code><br /> Set entity lactating.
**<code>/entity removebyclass [entityclass]</code><br /> Remove all entities of a given class.
***<code>/entity cmd move</code><br /> Move a creature.
**<code>/entity listnearest [x y z] (ver-range) (hor-range)</code><br /> Show a summary of all nearby entities at given range. If x/y/z coords are not supplied, the current player position is taken
***<code>/entity cmd kill</code><br /> Kill a creature.
***<code>/entity cmd wipeall</code><br /> Removes all entities except players from all loaded chunks.
**<code>/entity debug [0|1]</code><br /> Enable entity debug mode, this will send continous debug information to all connected clients, which are displayed above the entity if the client used the command '''.clientConfig showEntitydebuginfo 1'''
**<code>/entity debug [0|1]</code><br /> Enable entity debug mode, this will send continous debug information to all connected clients, which are displayed above the entity if the client used the command '''.clientConfig showEntitydebuginfo 1'''
**<code>/entity removebyid [entityid]</code><br /> Used to remove one specific entity.  Find the entity id by using ".clientConfig showEntityDebuginfo".  Useful for removing a specific trader permanently, for instance.
**<code>/entity spawndebug [0|1]</code><br /> Enable entity spawn debug mode.
**<code>/entity count [<i>entityfilter</i>]</code><br /> Count entities by code/filter and show a summary.
**<code>/entity countg [<i>entityfilter</i>]</code><br /> Count entities by code/filter and show a summary grouped by first code part.
**<code>/entity spawnat [entitytype] [amount] [position] [radius]</code><br /> Spawn an entity by type at given position, within a given radius. Valid types can be found in the survival mod assets folder /entities.
**<code>/entity remove [<i>entityfilter</i>]</code><br /> Remove selected creatures.
 
<!--T:3-->
<i>entity filter</i> is either a player name, or else one of the following selection codes:
* <code>s[]</code> for self.
* <code>l[]</code> for the entity currently looked at.
* <code>p[]</code> for all players.
* <code>e[]</code> for all entities.
 
<!--T:4-->
Inside the square brackets, one or more filters can be added, to be more selective.  Filters include name, type, class, alive, rangeFor example, <code>e[type=gazelle,range=3,alive=true]</code>.
 
<!--T:5-->
The filters minx/miny/minz/maxx/maxy/maxz can also be used to specify a volume to search, coordinates are relative to the command caller's position.
 
<!--T:6-->
Find the entity id by using '''.clientConfig showEntityDebuginfo'''.  Useful for removing a specific trader permanently, for instance.
 
<!--T:7-->
This argument may be omitted if the remainder of the command makes sense, in which case it will be interpreted as self.
</onlyinclude>
</onlyinclude>


 
<!--T:2-->
[[List of client commands]]
{{ll|List of server commands|List of server commands}}
</translate>
</translate>

Latest revision as of 18:05, 6 August 2023

Other languages:


  • /entity [subcommand]
    Spawn, remove, and count entities (item drops, creatures, etc).
    • /entity cmd entityFilter[] [subcommand]
      Issue commands on existing entities. Requires a single entity filter from s[] (self), l[] (entity looked on), p[] (all players) or e[] (all entities). The square brackets take additional filters (optional), i.e. e[type=gazelle,range=3,alive=true]
      • /entity cmd stopanim
        Stop an entity animation.
      • /entity cmd stoptask
        Stop an AI task.
      • /entity cmd setattr
        Set entity attributes.
      • /entity cmd entityFilter[] setgen number
        Set entity generation, i.e. /entity cmd l[] setgen 10 (sets the generation of the looked at entity to 10).
      • /entity cmd setlact
        Set entity lactating.
      • /entity cmd move
        Move a creature.
      • /entity cmd kill
        Kill a creature.
      • /entity cmd wipeall
        Removes all entities except players from all loaded chunks.
    • /entity debug [0|1]
      Enable entity debug mode, this will send continous debug information to all connected clients, which are displayed above the entity if the client used the command .clientConfig showEntitydebuginfo 1
    • /entity spawndebug [0|1]
      Enable entity spawn debug mode.
    • /entity count [entityfilter]
      Count entities by code/filter and show a summary.
    • /entity countg [entityfilter]
      Count entities by code/filter and show a summary grouped by first code part.
    • /entity spawnat [entitytype] [amount] [position] [radius]
      Spawn an entity by type at given position, within a given radius. Valid types can be found in the survival mod assets folder /entities.
    • /entity remove [entityfilter]
      Remove selected creatures.

entity filter is either a player name, or else one of the following selection codes:

  • s[] for self.
  • l[] for the entity currently looked at.
  • p[] for all players.
  • e[] for all entities.

Inside the square brackets, one or more filters can be added, to be more selective. Filters include name, type, class, alive, range. For example, e[type=gazelle,range=3,alive=true].

The filters minx/miny/minz/maxx/maxy/maxz can also be used to specify a volume to search, coordinates are relative to the command caller's position.

Find the entity id by using .clientConfig showEntityDebuginfo. Useful for removing a specific trader permanently, for instance.

This argument may be omitted if the remainder of the command makes sense, in which case it will be interpreted as self.


List of server commands