DarwinBotsManual
Open the app EspañolES

.strbody

Stores energy as body: up to 100 energy per cycle, which turns into 10 body.

Facts

Address
313
Name
.strbody
Kind
Command: the bot writes it and the engine reads it and usually consumes it
Group
Body, energy and state
Written by
Your DNA.
Read by
The engine, in the actions phase of the same cycle: moves that energy into the body, 1 body for every 10 energy. It does not check whether you have enough.
Cleared
The engine, after using it. A negative value is also cleared, with no effect.
Range
−32000 to 32000; only 1 to 100 count (more than 100 counts as 100).
Mutations
picked as a store target

Write how much energy you want to store and the engine converts it in the same cycle: 100 .strbody store subtracts 100 from .nrg and adds 10 to .body. It is the inverse operation of .fdbody. Bots use it so as not to keep all their wealth in energy: body makes the bot bigger and it can be recovered later.

Some details:

' With energy to spare, it stores it in the body
cond
 *.nrg 4000 >
start
 100 .strbody store
stop

This bot drops 100 energy and gains 10 body per cycle as long as it has more than

  1. The complete piggy-bank example, with both orders, is in

Body, energy and state.