-
Notifications
You must be signed in to change notification settings - Fork 11
Life Structure
Luke M. edited this page Jul 3, 2013
·
4 revisions
There are three main files attached to Life entities:
-
.XML
- Defines some basic metadata, like name and species, in addition to its skeletal structure. -
.JSON
- The "compiled" version of the .XML file. The engine understands this better than the XML format. -
.DAT
- Controls the entity's behaviors in a variety of situations. Also referred to as "raw script."
Create a new file in data/life
using the .xml
extension. Name it as you which; we'll use it later when adding the new entity to the spawn list. Create another file in the same directory with the same name, this time with the .dat
extension.
Copy the following into your newly-created .xml
file: https://gist.github.com/flags/5922560
Anything before the <body>
helps give the engine some idea of what the entity looks like (in addition to some metadata) before we define the skeleton itself. The tags are as follows:
-
name
- Name of this entity.$FIRST_AND_LAST_NAME_FROM_SPECIES
can be used to randomly assign a name based on species. -
species
- Species for this entity.human
,dog
, etc. You can define your own. -
type
- Unused (for now.) Vague classification for the entity.humanoid
,animal
, etc. -
flags
- SeeEntity Flags
below. -
vars
- For assigning variables mentioned inflags
-
icon
- Visual representation of the entity.
-
LEGS
- List of limbs that the entity will walk on. If there are multiple limbs PER leg, list the first one only. -
ARMS
- Same as legs. -
HANDS
- Same as legs. -
HUNGER
- Entity is affected by hunger. You will need to sethunger_max=
and then definehunger=hunger_max
. -
THIRST
- Same as hunger. You will need to setthirst_max=
and then definethirst=thirst_max
. -
CAN_SEE
- Self-explanatory. Make sure to includesight
in a limb'sAFFECTS
array if you want the entity's sight to be affected by injuries to that limb. You must also setvision_max=
. -
MELEE
- List of limbs that can be used during melee combat.
-
SKIN
- Self-explanatory. -
MUSCLE
- Self-explanatory. -
BONE
- Self-explanatory. -
CRUCIAL
- Houses a major artery.