CAOS-Programmierung: Befehlsgruppen: History

History

HIST CAGE (integer) moniker (string) event_no (integer)

Returns the life stage of the creature when the given life event happened.

HIST COUN (integer) moniker (string)

Returns the number of life events that there are for the given moniker. Returns 0 of there are no events, or the moniker doesn't exist.

HIST CROS (integer) moniker (string)

Returns the number of crossover points when the genome was made by splicing its parents genomes.

HIST EVNT (command) moniker (string) event_type (integer) related_moniker_1 (string) related_moniker_2 (string)

Triggers a life event of the given type. Some events are triggered automatically by the engine, some events need triggering from CAOS, others are  
custom events that you can use for your own purposes. See HIST TYPE for details of the event numbers. All new events made call the Life Event script.

HIST FIND (integer) moniker (string) event_type (integer) from_index (integer)

Searches for a life event of a certain HIST TYPE for the given moniker. The search begins at the life event after the from index. Specify -1 to find  
the first event. Returns the event number, or -1 if there is no matching event.

HIST FINR (integer) moniker (string) event_type (integer) from_index (integer)

Reverse searches for a life event of a certain HIST TYPE for the given moniker. The search begins at the life event before the from index. Specify -1 
to find the last event. Returns the event number, or -1 if there is no matching event.

HIST FOTO (string) moniker (string) event_no (integer)

For the given life event, returns the filename of the associated photograph, or an empty string if there is no photo.

HIST FOTO (command) moniker (string) event_no (integer) new_value (string)

For the given life event, sets the associated photograph. Use SNAP to take the photograph first.
If there was already a photograph for the event, then it is automatically marked for the attic as in LOFT, and overwritten with the new photo. Hence  
you can use an empty string to clear a photo. If HIST WIPE is used to clear the event, the photo is similarly stored in the attic.
It is considered an error to send a photograph that is in use (unless cloned with TINT) to the attic. If this happens, you will get a runtime error.  
You should either be confident that no agents are using the photo, or call LOFT first to test if they are.

HIST GEND (integer) moniker (string)

Returns the sex that the creature with the given moniker has or had. 1 for male, 2 for female. If the creature hasn't been born yet, returns -1.

HIST GNUS (integer) moniker (string)

Returns the genus of the moniker. This is 1 for Norn, 2 for Grendel, 3 for Ettin by convention.

HIST MON1 (string) moniker (string) event_no (integer)

For the given life event, returns the first associated moniker.

HIST MON2 (string) moniker (string) event_no (integer)

For the given life event, returns the second associated moniker.

HIST MUTE (integer) moniker (string)

Returns the number of point mutations the genome received during crossover from its parents.

HIST NAME (string) moniker (string) Returns the name of the creature with the given moniker.

HIST NAME (command) moniker (string) new_name (string)

Renames the creature with the given moniker.

HIST NETU (string) moniker (string) event_no (integer)

Returns the network identifier of the user when the given life event happened.

HIST NEXT (string) moniker (string)

Returns the next moniker which has a history, or an empty string if we're at the end already. If the specified moniker is an empty string or doesn't 
have a history, then the first moniker with a history entry is returned, or an empty string if there isn't one.

HIST PREV (string) moniker (string)

Returns the previous moniker which has a history. If the specified moniker is an empty string or doesn't have a history, then the last moniker with a 
history entry is returned, or an empty string if there isn't one.

HIST RTIM (integer) moniker (string) event_no (integer)

Returns the real world time when the given life event happened. This is measured in seconds since midnight, 1 January 1970 in UTC. To display, use 
RTIF.

HIST TAGE (integer) moniker (string) event_no (integer)

Returns the age in ticks of the creature when the given life event happened to it. If the creature was not in the world, wasn't born yet, or was fully 
dead, then -1 is returned. If the creature was dead, but its body still in the world, then its age on death is returned. See also TAGE.

HIST TYPE (integer) moniker (string) event_no (integer)

For the given life event, returns its type.
All histories begin with one of the following four events. You can read the associated monikers with HIST MON1 and HIST MON2.
0 Conceived - a natural start to life, associated monikers are the mother's and father's
1 Spliced - created using GENE CROS to crossover the two associated monikers
2 Engineered - from a human made genome with GENE LOAD, the first associated moniker is blank, and the second is the filename
14 Cloned - such as when importing a creature that already exists in the world and reallocating the new moniker, when TWINing or GENE CLONing;  
associated moniker is who we were cloned from
The following events happen during a creature's life:
3 Born - triggered by the BORN command, associated monikers are the parents.
4 Aged - reached the next life stage, either naturally from the ageing loci or with AGES
5 Exported - emmigrated to another world
6 Imported - immigrated back again
7 Died - triggered naturally with the death trigger locus, or by the DEAD command
8 Became pregnant - the first associated moniker is the child, and the second the father
9 Impregnated - first associated moniker is the child, second the mother
10 Child born - first moniker is the child, second the other parent
15 Clone source - someone was cloned from you, first moniker is whom
16 Warped out - exported through a worm hole with NET: EXPO
17 Warped in - imported through a worm hole
These events aren't triggered by the engine, but reserved for CAOS to use with these numbers:
11 Laid by mother
12 Laid an egg
13 Photographed
Other numbers can also be used for custom life events. Start with numbers 100 and above, as events below that are reserved for the engine. You send 
your own events using HIST EVNT.

HIST UTXT (command) moniker (string) event_no (integer) new_value (string)

For the given life event, sets the user text.

HIST UTXT (string) moniker (string) event_no (integer)

For the given life event, returns the user text.

HIST VARI (integer) moniker (string)

Returns the variant that the creature with the given moniker has or had. If the creature hasn't been born yet, returns -1.

HIST WIPE (command) moniker (string)

Purge the creature history for the given moniker. Only applies if the genome isn't referenced by any slot, and the creature is fully dead or exported. 
Use OOWW to test this first.

HIST WNAM (string) moniker (string) event_no (integer)

Returns the name of the world the given life event happened in.

HIST WTIK (integer) moniker (string) event_no (integer)

Returns the world tick when the life event happened, for the world that the event happened in.

HIST WUID (string) moniker (string) event_no (integer)

Returns the unique identifier of the world the given life event happened in.

HIST WVET (integer) moniker (string)

Returns 1 if the Creature is a warp hole veteran, 0 otherwise. The creature is a veteran if they have ever been exported with NET: EXPO. They must 
have been the main exported creature - warping as an embryo doesn't make you a veteran.

OOWW (integer) moniker (string)

Returns the status of the moniker.
0 - never existed, or history purged
1 - genome referenced by a slot, for example an egg
2 - creature made with NEW: CREA
3 - creature properly BORN
4 - out of world, exported
5 - dead, body still exists
6 - dead, body KILLed
7 - unreferenced genome