List of server commands/entity: Difference between revisions

From Vintage Story Wiki
(Marked this version for translation)
Tags: Mobile edit Mobile web edit
(Updated to 1.18)
Line 4: Line 4:
<!--T:1-->
<!--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 [subcommand]</code><br /> Issue commands on existing entities
**<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 /> Start 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 setgen</code><br /> Set entity generation.
**<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.
 
<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.
 
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>.
 
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.
</onlyinclude>
</onlyinclude>


<!--T:2-->
<!--T:2-->
[[List of server commands]]
[[List of server commands]]
</translate>
</translate>

Revision as of 13:04, 9 April 2023

Other languages:


  • /entity [subcommand]
    Spawn, remove, and count entities (item drops, creatures, etc).
    • /entity cmd [subcommand]
      Issue commands on existing entities
      • /entity cmd stopanim
        Stop an entity animation.
      • /entity cmd stoptask
        Start an ai task.
      • /entity cmd setattr
        Set entity attributes.
      • /entity cmd setgen
        Set entity generation.
      • /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