subsystems
ARES System Manual: Subsystems

The default definitions are as follows:

base (30 W): no intrinsic functions; required for all other subsystems
video (20 W): ability to parse video signals; required for hud and optics; requires base
lidar (10 W): ability to judge distances; requires base; required for teleport
hud (5 W): ability to see the ARES HUD; requires video and base
optics (50 W): ability to see visible light; requires video and base
hearing (10 W): ability to receive incoming chat messages; requires base
identify (20 W): ability to see names and hovertext; requires base and optics
radio (30 W): no intrinsic functions; required for location, teleport, receive, transmit, and wifi; requires base
location (5 W): ability to see map location; required for teleport; requires base and radio
teleport (120 W): ability to teleport or be teleported; requires base, lidar, radio, and location
receive (10 W): ability to receive IMs; requires base and radio
transmit (10 W): ability to send IMs; requires base and radio
wifi (10 W): ability to connect to remote devices; requires base and radio
motors (60 W): ability to touch nearby objects; required for movement subsystems (locomotion, athletics, flight, reach), speech, and amplifier; requires base
locomotion (40 W): ability to walk and sit; required for athletics and flight; requires base and motors
athletics (30 W): ability to run and jump; requires base, motors, and locomotion
flight (50 W): ability to fly; requires base, motors, and locomotion
reach (20 W): ability to touch objects more than 2.5 m away; requires base and motors
voice (20 W): ability to talk (at a whisper); required for speech, amplifier, and mind; requires base
speech (20 W): ability to talk (at normal volume); requires base, motors, and voice
amplifier (30 W): ability to shout; requires base, motors, voice, and speech
mind (70 W): ability to speak messages other than those defined by persona; requires base and voice

If the optics subsystem is disabled but video and lidar are enabled, the unit's video feed will present LiDAR data, showing nearby objects in white and the distance in black.

Various system functions will draw further power; by default these costs are:

- Flying: 500 W
- Jumping: 500 J
- Walking: 200 W
- Running: 500 W (Walking + 300 W)
- Cooling: up to 100 W

These costs are defined in the status section.

Certain power costs cannot be redefined. These are:

    - Teleporting expends anywhere from 12 kJ to 240 kJ from a dedicated capacitor, which must be fully recharged between teleports.
    - The CPU draws 2 J for every microsecond of script time used by ARES. This replaces Companion's behavior of charging per character when speaking.
    - Reclamation (resurrection) always costs 10000 J.
    - Autorepair costs 1000 W.


Custom Subsystems

To create or modify a subsystem, it is best to make a fresh copy of the power.db notecard from ARES user memory and then edit it. When you are done making changes, load it with db load <filename>.db.

Each subsystem has 5 parts: name, notify, req, rlv, and draw.

The name should be a single word in lower-case letters.
The req field is a JSON array (e.g. [1,2,3]) that indicates which other subsystems this one requires. If any of them are off or disabled, this subsystem will also be disabled. If no requirements exist, specify [].
The notify field indicates the ways in which the system's scripts should be affected. A single subsystem may contain multiple notify directives, as can be seen in the EPS definition at the bottom of power.db.
The rlv field indicates the RLV messages that should be enforced when the subsystem is off. All subsystems are disabled when the unit is off. A reference for RLV is available at https://wiki.secondlife.com/wiki/LSL_Protocol/RestrainedLoveAPI.
The draw field indicates the cost in watts of the subsystem.

In the notify and rlv fields above, ? is automatically replaced with n or y.

All subsystems listed in req should have numbers smaller than the current subsystem. power.subsystem.0.req [1] will not work properly.

Finally, you will need to add a menu item for your subsystem, and reset the _power script. See the m:power section of the menu.db file for the format to follow.

The EPS (emergency power system) is a special subsystem activated when the unit is powered down. Its implementation is similar to the others, but it is loaded separately by _power as needed.


Caveats

The overlay images shown when the unit cannot see or is powered down cannot currently be customized.

The teleport subsystem should not be renamed, or it will not be disabled properly after an externally-powered teleport (i.e., Stargating).

A special exception is made for the sendchat RLV restriction. If rlv for a subsystem uses it, then that subsystem cannot contain any other RLV commands. However, multiple subsystems may use it.

The various notify directives do the following when disabled:

- _input voice ? prevents the unit from speaking.
- _input mind ? limits the unit to pre-set '.' messages from the persona (see persona)
- _input speech ? limits the unit to whispering.
- _input amplifier ? prevents the unit from shouting (with the 's ' prefix; see input)
- _input hearing ? prevents the unit from hearing.
- _power wifi ? prevents remote devices (including menus) from working.
- _power locomotion ? prevents the unit from moving and from standing up if already sitting.
- _power lidar ? enables distance mapping if optics are disabled.
- _power optics ? disables normal vision.
- _power hud ? hides the HUD.
- _power motors ? plays the s_frozen animation.
- nav teleport ? prevents teleporting to bookmarks (see nav)
- nav location ? prevents all navigation.