c2ephp

CreatureHistoryEvent Class Reference

Class to represent events in a creature's life. More...

List of all members.

Public Member Functions

 CreatureHistoryEvent ($eventtype, $worldtime, $creatureage, $timestamp, $lifestage, $moniker1, $moniker2, $usertext, $photograph, $worldname, $worldUID)
 Instantiates a new CreatureHistoryEvent.
 AddDSInfo ($DSUserID, $unknown1, $unknown2)
 Add DS-specific information to the CreatureHistoryEvent.
 Compile ($format)
 Compiles the data into the correct format for the game specified.
 GetEventType ()
 Accessor method for event type.
 GetWorldTime ()
 Accessor method for world time.
 GetCreatureAge ()
 Accessor method for creature age.
 GetTimestamp ()
 Accessor method for timestamp.
 GetLifeStage ()
 Accessor method for life stage.
 GetMoniker1 ()
 Accessor method for moniker 1.
 GetMoniker2 ()
 Accessor method for moniker 2.
 GetUserText ()
 Accessor method for user text.
 GetPhotograph ()
 Accessor method for photograph.
 GetWorldName ()
 Accessor method for world name.
 GetWorldUID ()
 Accessor method for world name.

Related Functions

(Note that these are not member functions.)
Event Numbers

All creatures are either CONCEIVED, SPLICED, ENGINEERED, or IAMCLONED.
Then CONCEIVED creatures are MUMLAIDMYEGG.
Then they are HATCHED except maybe ENGINEERED creatures.
Then they have a PHOTOTAKEN.
Then there's not a specific order of events that always happen

  • they go on and live their own lives ;)
enum  CREATUREHISTORY_EVENT_CONCEIVED
enum  CREATUREHISTORY_EVENT_SPLICED
enum  CREATUREHISTORY_EVENT_ENGINEERED
enum  CREATUREHISTORY_EVENT_HATCHED
enum  CREATUREHISTORY_EVENT_AGED
enum  CREATUREHISTORY_EVENT_EXPORTED
enum  CREATUREHISTORY_EVENT_IMPORTED
enum  CREATUREHISTORY_EVENT_DIED
enum  CREATUREHISTORY_EVENT_BECAMEPREGNANT
enum  CREATUREHISTORY_EVENT_IMPREGNATED
enum  CREATUREHISTORY_EVENT_CHILDBORN
enum  CREATUREHISTORY_EVENT_MUMLAIDMYEGG
enum  CREATUREHISTORY_EVENT_LAIDEGG
enum  CREATUREHISTORY_EVENT_PHOTOTAKEN
enum  CREATUREHISTORY_EVENT_IAMCLONED
enum  CREATUREHISTORY_EVENT_CLONEDME
enum  CREATUREHISTORY_EVENT_WARPEDOUT
enum  CREATUREHISTORY_EVENT_WARPEDIN

Detailed Description

Class to represent events in a creature's life.

Definition at line 84 of file CreatureHistoryEvent.php.


Member Function Documentation

CreatureHistoryEvent::AddDSInfo ( DSUserID,
unknown1,
unknown2 
)

Add DS-specific information to the CreatureHistoryEvent.

Parameters:
$DSUserIDThe UID of the Docking Station user whose world the creature was in at the time of the event
$unknown1I don't know! But it comes right after the DSUID in the GLST format.
$unknown2I don't know! But it comes right after unknown1.

Definition at line 149 of file CreatureHistoryEvent.php.

CreatureHistoryEvent::Compile ( format)

Compiles the data into the correct format for the game specified.

This is called automatically by CreatureHistory, most users should have no need to use this function themselves.

Parameters:
$formatWhich game to compile it for (a GLST_FORMAT_* constant)
Returns:
A binary string containing GLST data ready to be put into a GLST history.

Definition at line 163 of file CreatureHistoryEvent.php.

CreatureHistoryEvent::CreatureHistoryEvent ( eventtype,
worldtime,
creatureage,
timestamp,
lifestage,
moniker1,
moniker2,
usertext,
photograph,
worldname,
worldUID 
)

Instantiates a new CreatureHistoryEvent.

See also:
GetMoniker1(), GetMoniker2(), GetUserText, GetPhotograph()
Parameters:
$eventtypeThe event number as defined by the CREATUREHISTORY_EVENT_* constants.
$worldtimeThe world's age in ticks at the time of this event.
$creatureageThe age of the creature in ticks at the time of this event
$timestampThe time of this event as a unix timestamp. (number of seconds passed since 1st Jan, 1970)
$lifestageThe lifestage this creature had achieved at the time of this event.
$moniker1The first moniker associated with this event.
$moniker2The second moniker associated with this event.
$usertextThe user text assosciated with this event.
$photographThe photograph associated with this event.
$worldnameThe name of the world the creature was inhabiting at the time of this event
$worldUIDThe UID of the world the creature was inhabiting at the the time of this event

Definition at line 129 of file CreatureHistoryEvent.php.

CreatureHistoryEvent::GetCreatureAge ( )

Accessor method for creature age.

Returns:
The age of the creature, in ticks, when this event happened

Definition at line 197 of file CreatureHistoryEvent.php.

CreatureHistoryEvent::GetEventType ( )

Accessor method for event type.

Returns:
The event type as a CREATUREHISTORY_EVENT_* constant.

Definition at line 182 of file CreatureHistoryEvent.php.

CreatureHistoryEvent::GetLifeStage ( )

Accessor method for life stage.

Returns:
The creature's life stage (an integer, 0-6 I think. 0xFF means unborn.)
TODO: Make a set of constants for this.

Definition at line 215 of file CreatureHistoryEvent.php.

CreatureHistoryEvent::GetMoniker1 ( )

Accessor method for moniker 1.

Moniker 1 is the first moniker associated with this event. In conception and splicing, it is one of the parent creatures.
In cloning, it is the parent/child's moniker. Whichever is not the current creature.
In laying an egg, it is the moniker of the egg laid.
In becoming pregnant, it's the creature that made this one pregnant
In making another pregnant, it's the pregnant creature.
In a child being born, it's the other parent of the child

Returns:
The first moniker associated with this event

Definition at line 233 of file CreatureHistoryEvent.php.

CreatureHistoryEvent::GetMoniker2 ( )

Accessor method for moniker 2.

Moniker 2 is the second moniker associated with this event.
In conception and splicing, it is one of the conceiving creatures.
In becoming pregnant, it's the child's moniker
In making another pregnant, it's the child's moniker
In a child being born, it's the child's moniker

Returns:
The first moniker associated with this event

Definition at line 247 of file CreatureHistoryEvent.php.

CreatureHistoryEvent::GetPhotograph ( )

Accessor method for photograph.

Gets the name of the PHOT block containing the S16File of the photograph for this event.
In theory this can be used on any event without messing anything up, and would be readable via CAOS. See http://nornalbion.github.com/c2ephp/caos-guide.html#HIST%20FOTO for more on reading history with CAOS.
In pratice (i.e. in all GLST blocks I've seen) this is only used on photo-taken events.

Returns:
The identifier of the photograph (in the format mymoniker-photonumber)

Definition at line 280 of file CreatureHistoryEvent.php.

CreatureHistoryEvent::GetTimestamp ( )

Accessor method for timestamp.

Returns:
The unix timestamp of the time at which this event occurred

Definition at line 205 of file CreatureHistoryEvent.php.

CreatureHistoryEvent::GetUserText ( )

Accessor method for user text.

In theory user text can be used on any event without messing it up (and it would be readable via CAOS) See http://nornalbion.github.com/c2ephp/caos-guide.html#HIST%20FOTO for more on reading history with CAOS.
In practice, this is only used by either the first event or the hatched event (I forget which) and is used to mean the text that the user enters to describe this creature in the creature info dialog.

Returns:
The user text associated with this event.

Definition at line 263 of file CreatureHistoryEvent.php.

CreatureHistoryEvent::GetWorldName ( )

Accessor method for world name.

Returns:
The name of the world this creature was in during this event

Definition at line 287 of file CreatureHistoryEvent.php.

CreatureHistoryEvent::GetWorldTime ( )

Accessor method for world time.

Returns:
The age of the world, in ticks, when this event occurred.

Definition at line 190 of file CreatureHistoryEvent.php.

CreatureHistoryEvent::GetWorldUID ( )

Accessor method for world name.

Returns:
The name of the world this creature was in during this event

Definition at line 295 of file CreatureHistoryEvent.php.


Friends And Related Function Documentation

CreatureHistoryEvent::GetLifestage will tell you what lifestage I am now.

Value: 4

Definition at line 33 of file CreatureHistoryEvent.php.

I became pregnant.
Value: 8

Definition at line 45 of file CreatureHistoryEvent.php.

My child hatched from its egg!
Value: 10

Definition at line 51 of file CreatureHistoryEvent.php.

Another creature was made by cloning me.
This happens when you export a creature then import it more than once.
Value: 15

Definition at line 73 of file CreatureHistoryEvent.php.

I was conceived by kisspopping or artificial insemination.
Value: 0

Definition at line 18 of file CreatureHistoryEvent.php.

My journey through life ended.
Value: 7

Definition at line 42 of file CreatureHistoryEvent.php.

I was created by someone with a genetics kit
Value: 2

Definition at line 24 of file CreatureHistoryEvent.php.

I was exported from this world
Value: 5

Definition at line 36 of file CreatureHistoryEvent.php.

I hatched out of my egg.
Value: 3

Definition at line 27 of file CreatureHistoryEvent.php.

I was made by cloning another creature
This happens when you export a creature then import it more than once.
Value: 14

Definition at line 67 of file CreatureHistoryEvent.php.

I joined this world
Value: 6

Definition at line 39 of file CreatureHistoryEvent.php.

I made someone else pregnant.
Value: 9

Definition at line 48 of file CreatureHistoryEvent.php.

I laid an egg I was carrying.
Value: 12

Definition at line 57 of file CreatureHistoryEvent.php.

My mum laid my egg.
Value: 11

Definition at line 54 of file CreatureHistoryEvent.php.

A photo was taken of me.
Value: 13

Definition at line 60 of file CreatureHistoryEvent.php.

I was spliced from two other creatures
Value: 1

Definition at line 21 of file CreatureHistoryEvent.php.

I entered this world through the warp
Value: 17

Definition at line 79 of file CreatureHistoryEvent.php.

I left this world through the warp
Value: 16

Definition at line 76 of file CreatureHistoryEvent.php.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Enumerations