Bot System: Difference between revisions

From Vintage Story Wiki
m (Double checked information and added version)
(Marked this version for translation)
 
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<languages/>
{{GameVersion|1.15}}
{{GameVersion|1.15}}
__TOC__
__TOC__
<translate>
<!--T:10-->
Vintage Story comes with some rudimentary interface to control creatures and humanoids through commands, which is mostly aimed for video recordings. Here's how to use it:
Vintage Story comes with some rudimentary interface to control creatures and humanoids through commands, which is mostly aimed for video recordings. Here's how to use it:


== Spawn in a bot ==
== Spawn in a bot == <!--T:11-->
 
<!--T:3-->
Only some creatures are supported, here's a list
Only some creatures are supported, here's a list
* /entity spawn playerbot
* <code>/entity spawn playerbot</code>
* /entity spawn animalbot-wolf-male
* <code>/entity spawn animalbot-wolf-male</code>
* /entity spawn animalbot-hyena-male
* <code>/entity spawn animalbot-hyena-male</code>
* /entity spawn animalbot-hyena-female
* <code>/entity spawn animalbot-hyena-female</code>
* /entity spawn animalbot-hyena-pup
* <code>/entity spawn animalbot-hyena-pup</code>
* /entity spawn animalbot-chicken-hen
* <code>/entity spawn animalbot-chicken-hen</code>
* /entity spawn animalbot-chicken-rooster
* <code>/entity spawn animalbot-chicken-rooster</code>
* /entity spawn animalbot-chicken-baby
* <code>/entity spawn animalbot-chicken-baby</code>
* /entity spawn animalbot-sheep-bighorn-male
* <code>/entity spawn animalbot-sheep-bighorn-male</code>
* /entity spawn animalbot-sheep-bighorn-female
* <code>/entity spawn animalbot-sheep-bighorn-female</code>
* /entity spawn animalbot-sheep-bighorn-lamb
* <code>/entity spawn animalbot-sheep-bighorn-lamb</code>
* /entity spawn animalbot-locust-corrupt
* <code>/entity spawn animalbot-locust-corrupt</code>
* /entity spawn animalbot-hare-female-lightgrey
* <code>/entity spawn animalbot-hare-female-lightgrey</code>
* /entity spawn animalbot-piglet
* <code>/entity spawn animalbot-piglet</code>
* /entity spawn animalbot-drifter-normal
* <code>/entity spawn animalbot-drifter-normal</code>
* /entity spawn animalbot-drifter-corrupt
* <code>/entity spawn animalbot-drifter-corrupt</code>
* /entity spawn animalbot-drifter-nightmare
* <code>/entity spawn animalbot-drifter-nightmare</code>


== Select a bot ==
== Select a bot == <!--T:12-->
 
<!--T:4-->
Right click the creature to select it. You can now tell it to execute commands or define a list of commands to execute in a loop
Right click the creature to select it. You can now tell it to execute commands or define a list of commands to execute in a loop


== Instruct the bot ==
== Instruct the bot == <!--T:5-->


Legend: ''flexiblepos'' means either x y z coordinates as defined in the coordinate hud, absolute coordinates through =x =y =z or coordinates relative to the player with ~x ~y ~z, you can also do ~ ~ ~ do use exactly the players position.<br>
<!--T:6-->
Legend: ''flexiblepos'' means either [x y z] coordinates as defined in the coordinate hud, absolute coordinates through [=x =y =z] or coordinates relative to the player with [~x ~y ~z], you can also do [~ ~ ~] do use exactly the players position.<br>


=== Immediate ===
=== Immediate === <!--T:13-->
 
<!--T:7-->
Type one of either commands to execute a command right away
Type one of either commands to execute a command right away
* <code>/npc exec tp ''flexiblepos''</code> teleport to given position
* <code>/npc exec tp ''flexiblepos''</code> teleport to given position
* <code>/npc exec lookat rad</code> look in given direction in radians (0..2PI)
* <code>/npc exec lookat [rad]</code> look in given direction in radians (90° = 1.57, 180° = 3.14, etc.)
* <code>/npc exec goto ''flexiblepos'' animcode speed [animspeed]</code> walk to given position with given animation, given speed (normal walking speed is about 0.02) and given animation speed (default 1)
* <code>/npc exec goto ''flexiblepos'' animcode speed [animspeed]</code> walk to given position with given animation, given speed (normal walking speed is about 0.02) and given animation speed (default 1)
* <code>/npc exec playanim animcode</code> players given animation. Valid ones for animals, if supported by the respective animal: hurt, die, eat, walk, cry, shamble, lowshamble, sleep, sit, listen, hide, idletwitch, drill
* <code>/npc exec playanim animcode</code> players given animation. Valid ones for animals, if supported by the respective animal: hurt, die, eat, walk, cry, shamble, lowshamble, sleep, sit, listen, hide, idletwitch, drill


=== Queued ===
=== Queued === <!--T:14-->
 
<!--T:8-->
If you want to bot to run or remember a list of commands replace "exec" with "enq" to enqueue commands:
If you want to bot to run or remember a list of commands replace "exec" with "enq" to enqueue commands:
* <code>/npc enq [tp|lookat|goto|playanim] (see args above)</code>
* <code>/npc enq [tp|lookat|goto|playanim] (see args above)</code>
* <code>/npc start</code> to start command list
* <code>/npc start</code> to start command list
* <code>/npc stop</code> to stop  
* <code>/npc stop</code> to stop  
* <code>/npc loop</code> to make the bot endlessly loop through his list of commands
* <code>/npc loop</code> to make the bot endlessly loop through its list of commands
* <code>/npc clear</code> will clear the command list
* <code>/npc clear</code> will clear the command list
* <code>/npc list</code> show list of queued commands
* <code>/npc list</code> show list of queued commands
* <code>/npc remove [index]</code> remove command of given index as shown in /npc list
* <code>/npc remove [index]</code> remove command of given index as shown in /npc list
* <code>/npc upd</code> allows you do modify some commands
* <code>/npc upd</code> allows you do modify some commands
</translate>


{{Navbox/modding|Vintage Story}}
{{Game navbox}}

Latest revision as of 09:57, 7 April 2024

Other languages:

This page was last verified for Vintage Story version 1.15.

Vintage Story comes with some rudimentary interface to control creatures and humanoids through commands, which is mostly aimed for video recordings. Here's how to use it:

Spawn in a bot

Only some creatures are supported, here's a list

  • /entity spawn playerbot
  • /entity spawn animalbot-wolf-male
  • /entity spawn animalbot-hyena-male
  • /entity spawn animalbot-hyena-female
  • /entity spawn animalbot-hyena-pup
  • /entity spawn animalbot-chicken-hen
  • /entity spawn animalbot-chicken-rooster
  • /entity spawn animalbot-chicken-baby
  • /entity spawn animalbot-sheep-bighorn-male
  • /entity spawn animalbot-sheep-bighorn-female
  • /entity spawn animalbot-sheep-bighorn-lamb
  • /entity spawn animalbot-locust-corrupt
  • /entity spawn animalbot-hare-female-lightgrey
  • /entity spawn animalbot-piglet
  • /entity spawn animalbot-drifter-normal
  • /entity spawn animalbot-drifter-corrupt
  • /entity spawn animalbot-drifter-nightmare

Select a bot

Right click the creature to select it. You can now tell it to execute commands or define a list of commands to execute in a loop

Instruct the bot

Legend: flexiblepos means either [x y z] coordinates as defined in the coordinate hud, absolute coordinates through [=x =y =z] or coordinates relative to the player with [~x ~y ~z], you can also do [~ ~ ~] do use exactly the players position.

Immediate

Type one of either commands to execute a command right away

  • /npc exec tp flexiblepos teleport to given position
  • /npc exec lookat [rad] look in given direction in radians (90° = 1.57, 180° = 3.14, etc.)
  • /npc exec goto flexiblepos animcode speed [animspeed] walk to given position with given animation, given speed (normal walking speed is about 0.02) and given animation speed (default 1)
  • /npc exec playanim animcode players given animation. Valid ones for animals, if supported by the respective animal: hurt, die, eat, walk, cry, shamble, lowshamble, sleep, sit, listen, hide, idletwitch, drill

Queued

If you want to bot to run or remember a list of commands replace "exec" with "enq" to enqueue commands:

  • /npc enq [tp|lookat|goto|playanim] (see args above)
  • /npc start to start command list
  • /npc stop to stop
  • /npc loop to make the bot endlessly loop through its list of commands
  • /npc clear will clear the command list
  • /npc list show list of queued commands
  • /npc remove [index] remove command of given index as shown in /npc list
  • /npc upd allows you do modify some commands


Wiki Navigation
Vintage Story Guides[[::Category:Guides| ]]Frequently Asked Questions Soundtrack Versions Controls
Game systems Crafting Knapping Clay forming Smithing Cooking Temperature Hunger Mining Temporal stability Mechanical power Trading Farming Animal husbandry
World World generation Biomes Weather Temporal storms
Items Tools Weapons Armor Clothing Bags Materials Food
Blocks Terrain Plants Decorative Lighting Functional Ore
Entities Hostile entities Animals NPCs Players
Miscellaneous List of client commands List of server commands Creative Starter Guide Bot System WorldEdit Cinematic Camera Adjustable FPS Video Recording ServerBlockTicking