sdleiF | erutaerC | ||
string name | Name | ||
multiline string genotype RO | Genotype | ||
multiline string info | InfoAdditional info or comments | ||
untyped group RO | creature's PopulationDeprecated. Use population instead. | ||
Population population RO | creature's population | ||
int index RO | current index in populationNote that the index changes depending on the current creature position in the population. Use Creature.uid if you need a permanent identifier that persists through the entire object lifetime. | ||
int num | Ordinal numberActs as a unique identifier, but less strict than "uid". Unlike "uid", "num" can be changed and therefore can be saved and restored, providing persistence and continuity beyond a single application run. "num" is only guaranteed to be unique if it is autogenerated and not changed by the user, otherwise it is user's responsibility to manage the proper values of "num". Autogenerated "num" is always equal to the largest previously used "num" + 1. The largest previously used value is stored in Simulator.last_creature_num and can be changed as well (and is automatically saved and restored as a part of the Simulator state). Limitation: being a 32-bit integer, "num" overflows at about 2 billion counts. See also: uid | ||
int gnum | Generation | ||
int buildproblems | Build problems | ||
XYZ drive | Enforce constant speedMeasured in global coordinates. | ||
XYZ driveLocal | Enforce local constant speedMeasured in local coordinates, that is, with respect to the current orientation of the creature. See also: Creature.orient | ||
XYZ localDrive | Enforce constant speedThis field is now called driveLocal. | ||
Geno geno RO | GenotypeSource genotype for this creature | ||
Model model RO | Source ModelSource Model for this creature | ||
Model liveModel RO | Current ModelA Model object that is a copy of the current (temporary) geometry of this creature | ||
string uid RO | #Unique identifier that is generated on object creation. "uid" is only unique during a single application run. Subsequent runs generate the same sequence of uid values. See also: num | ||
CreatureSignals signals RO | Signal sources | ||
ygrenE | |||
float energ0 | Starting energy | ||
float energy0 | Starting energy | ||
float idleen | Idle energy consumptionThe amount of energy subtracted from the energy of this creature in each simulation step, as in: cr.energy-=cr.idleen; | ||
float energy | Energy | ||
ecnamrofrep tnerruC | |||
int perf0 .. 2 | Performance calculationReplaced by perf_measuring | ||
int perf_measuring0 .. 2 | Performance calculationThe initial value of this property is taken from Population.initial_perf_measuring | ||
int nnenabled0 .. 2 | NN enabledReplaced by nn_active | ||
int nn_active0 .. 2 | NN activeThe initial value of this property is taken from Population.nn_active | ||
int bodysim0 .. 1 (false/true) default=1 | Body simulationReplaced by physics_active | ||
int physics_active0 .. 1 (false/true) default=1 | Body simulation(Physical) body simulation can be disabled for individual objects which makes them immovable. Disabled objects can still participate in collisions depending on their collisions masks. The initial value of this property is taken from Population.initial_physics_active. Bugs: the standard collision handler does not work for disabled objects when ODE simulation is used. It means that these objects won't physically interact with other objects. The custom (scripting) handlers work as expected. | ||
int selfcol0 .. 1 (false/true) | Self-collisionsReplaced by self_collisions | ||
int self_collisions0 .. 1 (false/true) | Self-collisionsEnable/disable detection of self-collisions (within a creature body). They can only occur when using the ODE simulation engine. If enabled, the creature will have its sticks collide during lifespan. The initial value of this property is taken from Population.initial_self_collisions. | ||
int lifespan | LifespanWhile the creature's performance measurement is enabled, the creature's lifespan is incremented in "performance sampling period" intervals. | ||
int steps_after_birth | Simulation steps after birth"Birth" is the moment when the simulation of a creature starts. | ||
int steps_in_lifespan | Simulation steps in lifespan"Lifespan" is the period during simulation of a creature when its performance measurement is enabled. | ||
float distance | DistanceSee http://www.framsticks.com/a/al_params.html#exper-perfcalc | ||
float c_velocity | Recent period velocitySee http://www.framsticks.com/a/al_params.html#exper-perfcalc | ||
float c_vertvelocity | Recent period vertical velocitySee http://www.framsticks.com/a/al_params.html#exper-perfcalc | ||
float c_vertpos | Recent period vertical positionSee http://www.framsticks.com/a/al_params.html#exper-perfcalc | ||
Dictionary data | Custom fields dictionary | ||
untyped user1 | User field 1 | ||
untyped user2 | User field 2 | ||
untyped user3 | User field 3 | ||
ecnamrofrep egarevA | |||
float velocity | Average velocitySee http://www.framsticks.com/a/al_params.html#exper-perfcalc | ||
float vertpos | Average vertical positionSee http://www.framsticks.com/a/al_params.html#exper-perfcalc | ||
float vertvel | Average vertical velocitySee http://www.framsticks.com/a/al_params.html#exper-perfcalc | ||
yrtemoeG | |||
float pos_x RO | Position x(pos_x,pos_y,pos_z) is the point of minimal coordinates ("bottom left corner") of the creature, including imaginary Part sizes (Part.s, usually 1.0). See also: Creature.moveAbs | ||
float pos_y RO | Position ySee Creature.pos_x | ||
float pos_z RO | Position zSee Creature.pos_x | ||
float size_x RO | Bounding box x size(size_x,size_y,size_z) are dimensions of the axis-aligned bounding box of the creature, including the imaginary part sizes (Part.s, usually 1.0). A creature consisting of a single default Part has the size of (2.0,2.0,2.0) - twice the Part.s value (like a sphere diameter is twice its radius). See also: Creature.moveAbs | ||
float size_y RO | Bounding box y sizeSee Creature.size_x | ||
float size_z RO | Bounding box z sizeSee Creature.size_x | ||
float center_x RO | center.xCenter of gravity | ||
float center_y RO | center.yCenter of gravity | ||
float center_z RO | center.zCenter of gravity | ||
XYZ bboxLow RO | Bounding box "low" corner | ||
XYZ bboxHigh RO | Bounding box "high" corner | ||
XYZ bboxCenter RO | Bounding box center | ||
XYZ bboxSize RO | Bounding box size | ||
float bboxGroundOffset RO | Bounding box ground offsetDue to multiple modes of simulation and Part shapes, you need to add this value to the intended creature bottom elevation to get the 'z' coordinate of the bboxLow that places the creature exactly on the specific height level. Example: creature.locationSetBboxLow(10,10,0+creature.bboxGroundOffset); //bottom of the crearture will be at level 0 on a flat ground | ||
XYZ centerOfGravity RO | Center of gravitySee http://www.framsticks.com/a/al_params.html#exper-perfcalc | ||
int numparts RO | Number of body Parts | ||
int numjoints RO | Number of body Joints | ||
int numneurons RO | Number of neurons | ||
int numconnections RO | Number of neural connections | ||
Orient orient RO | OrientationBy convention, the orientation of the creature is equal to the orientation of its first Part. | ||
untyped outdated_neuro_classes RO | Outdated neuro classesNames of the neuron classes that have been modified after this creature was built | ||
int selfmask0 .. 2147483647 default=0 | Collision mask (self)Creature's selfmask is set according to the Creature's Population.selfmask. See Population.selfmask for detailed information about collision handling. | ||
int othermask0 .. 2147483647 default=0 | Collision mask (other)Creature's othermask is set according to the Creature's Population.othermask. See Population.selfmask for detailed information about collision handling. | ||
snoitcnuF | |||
function boundingBoxCollisions(int mask)returns int | Check bounding box collisionsChecks approximate collisions for the selected creature. Returns the collision mask calculated as ( mask & colliding_creatures.othermask ). Usually called with mask=0, which has the special meaning of using the current creature.selmask instead of 0, so that it detects the same type of collisions as the current experiment configuration. Passing non-zero mask value uses it instead of creature.selfmask, allowing you to include or exclude other colliding populations, as if creature.selfmask were modified temporarily. | ||
function checkCollisions(int mask, int accuracy)returns untyped | Check collisionsReturns zero if the creature does not collide with other creatures. Arguments: - mask: if not zero, temporarily replaces creature.selfmask. For details see boundingBoxCollisions() - accuracy: 0 = testing creature bounding boxes 1 = testing creature elements | ||
function getJoint(int index)returns Joint | Get Joint (static Model information) | ||
function getMechJoint(int index)returns MechJoint | Get MechJoint (current properties) | ||
function getMechPart(int index)returns MechPart | Get MechPart (current properties) | ||
function getNeuro(int index)returns Neuro | Get Neuro | ||
function getNeuroDef(int index)returns NeuroDef | Get NeuroDef | ||
function getPart(int index)returns Part | Get Part (static Model information) | ||
function localToWorld(float x, float y, float z)returns XYZ | Return world coordinatesLocal coordinates are measured with respect to the position and orientation of the first Part. | ||
function locationMoveBy(float dx, float dy, float dz)doesn't return a value | Move by a vectorShift the creature by a given vector (in world coordinates). | ||
function locationMoveLocalBy(float dx, float dy, float dz)doesn't return a value | Move by a vector in local coordinatesLocal coordinates are measured with respect to the position and orientation of the first Part. | ||
function locationSetBboxCenter(float x, float y, float z)doesn't return a value | Move bounding box center to absolute locationMoves the creature as determined by the center of the bounding box of a creature. | ||
function locationSetBboxLow(float x, float y, float z)doesn't return a value | Move bounding box corner to absolute locationMoves the creature as determined by the "low" corner (the one with the lower coordinate values) of the bounding box of a creature. | ||
function move(float dx, float dy, float dz)doesn't return a value | Move by a vectorReplaced by locationMoveBy(). | ||
function moveAbs(float x, float y, float z)doesn't return a value | Move to absolute locationReplaced by locationSetBboxLow(). | ||
function moveLocal(float dx, float dy, float dz)doesn't return a value | Move by a vector in local coordinatesReplaced by locationMoveLocalBy | ||
function rotate(float x, float y, float z)doesn't return a value | RotateRotate the creature around X, Y and Z axes. Should only be used immediately after creating a new creature (before the first simulation step is performed for this creature), otherwise further simulation can be disturbed. | ||
function rotateLocal(float x, float y, float z)doesn't return a value | Rotate in local coordinatesRotate the creature around (local) X, Y and Z axes. Should only be used immediately after creating a new creature (before the first simulation step is performed for this creature), otherwise further simulation can be disturbed. | ||
function selfCollisionsCount()returns int | Current self-collisions stateReturns the number of self-collisions detected in the creature. | ||
function selfcolstate()returns int | Self-collisionsReplaced by selfCollisionsCount() | ||
function transferEnergyTo(Creature recipient, float requested_amount_of_energy)returns float | Transfer energyTransfers at most the requested_amount_of_energy from this creature to the recipient. Returns the amount of energy actually transferred. The function will only transfer positive amounts and will not transfer more energy than this creature has, so the function is equivalent to: if (this.energy>0 && requested_amount_of_energy>0) { var amount = Math.min(requested_amount_of_energy, this.energy); recipient.energy += amount; this.energy -= amount; } Calling this function from inside the collision handler to transfer energy between colliding parts automatically adds the relevant MechPart references, as if transferEnergyToPart was called, i.e. Collision.Creature1.transferEnergyTo(Collision.Creature2, e); is equivalent to: Collision.Creature1.transferEnergyToPart(Collision.Part1, Collision.Creature2, Collision.Part2, e); When this behavior is not intended, explicit nulls in transferEnergyToPart() can be used to avoid associating the energy transfer with the currently colliding parts, like this: Collision.Creature1.transferEnergyToPart(null, Collision.Creature2, null, e); | ||
function transferEnergyToPart(MechPart source_part, Creature recipient_creature, MechPart recipient_part, float requested_amount_of_energy)returns float | Transfer energyTransfer energy between specific parts of two creatures. Part arguments are only used for visualization and can be null, which would mean "the entire creature". See also: transferEnergyTo() | ||
function worldToLocal(float x, float y, float z)returns XYZ | Return local coordinatesLocal coordinates are measured with respect to the position and orientation of the first Part. |
Global context | >> | Experiment definition | >> | Visual style definition |