c2ephp
|
Class to represent events in a creature's life. More...
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.
| |
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 |
Class to represent events in a creature's life.
Definition at line 84 of file CreatureHistoryEvent.php.
CreatureHistoryEvent::AddDSInfo | ( | $ | DSUserID, |
$ | unknown1, | ||
$ | unknown2 | ||
) |
Add DS-specific information to the CreatureHistoryEvent.
$DSUserID | The UID of the Docking Station user whose world the creature was in at the time of the event |
$unknown1 | I don't know! But it comes right after the DSUID in the GLST format. |
$unknown2 | I 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.
$format | Which game to compile it for (a GLST_FORMAT_* constant) |
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.
$eventtype | The event number as defined by the CREATUREHISTORY_EVENT_* constants. |
$worldtime | The world's age in ticks at the time of this event. |
$creatureage | The age of the creature in ticks at the time of this event |
$timestamp | The time of this event as a unix timestamp. (number of seconds passed since 1st Jan, 1970) |
$lifestage | The lifestage this creature had achieved at the time of this event. |
$moniker1 | The first moniker associated with this event. |
$moniker2 | The second moniker associated with this event. |
$usertext | The user text assosciated with this event. |
$photograph | The photograph associated with this event. |
$worldname | The name of the world the creature was inhabiting at the time of this event |
$worldUID | The 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.
Definition at line 197 of file CreatureHistoryEvent.php.
CreatureHistoryEvent::GetEventType | ( | ) |
Accessor method for event type.
Definition at line 182 of file CreatureHistoryEvent.php.
CreatureHistoryEvent::GetLifeStage | ( | ) |
Accessor method for life stage.
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
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
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.
Definition at line 280 of file CreatureHistoryEvent.php.
CreatureHistoryEvent::GetTimestamp | ( | ) |
Accessor method for timestamp.
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.
Definition at line 263 of file CreatureHistoryEvent.php.
CreatureHistoryEvent::GetWorldName | ( | ) |
Accessor method for world name.
Definition at line 287 of file CreatureHistoryEvent.php.
CreatureHistoryEvent::GetWorldTime | ( | ) |
Accessor method for world time.
Definition at line 190 of file CreatureHistoryEvent.php.
CreatureHistoryEvent::GetWorldUID | ( | ) |
Accessor method for world name.
Definition at line 295 of file CreatureHistoryEvent.php.
enum CREATUREHISTORY_EVENT_AGED [related] |
CreatureHistoryEvent::GetLifestage will tell you what lifestage I am now.
Value: 4
Definition at line 33 of file CreatureHistoryEvent.php.
enum CREATUREHISTORY_EVENT_BECAMEPREGNANT [related] |
I became pregnant.
Value: 8
Definition at line 45 of file CreatureHistoryEvent.php.
enum CREATUREHISTORY_EVENT_CHILDBORN [related] |
My child hatched from its egg!
Value: 10
Definition at line 51 of file CreatureHistoryEvent.php.
enum CREATUREHISTORY_EVENT_CLONEDME [related] |
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.
enum CREATUREHISTORY_EVENT_CONCEIVED [related] |
I was conceived by kisspopping or artificial insemination.
Value: 0
Definition at line 18 of file CreatureHistoryEvent.php.
enum CREATUREHISTORY_EVENT_DIED [related] |
My journey through life ended.
Value: 7
Definition at line 42 of file CreatureHistoryEvent.php.
enum CREATUREHISTORY_EVENT_ENGINEERED [related] |
I was created by someone with a genetics kit
Value: 2
Definition at line 24 of file CreatureHistoryEvent.php.
enum CREATUREHISTORY_EVENT_EXPORTED [related] |
I was exported from this world
Value: 5
Definition at line 36 of file CreatureHistoryEvent.php.
enum CREATUREHISTORY_EVENT_HATCHED [related] |
I hatched out of my egg.
Value: 3
Definition at line 27 of file CreatureHistoryEvent.php.
enum CREATUREHISTORY_EVENT_IAMCLONED [related] |
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.
enum CREATUREHISTORY_EVENT_IMPORTED [related] |
I joined this world
Value: 6
Definition at line 39 of file CreatureHistoryEvent.php.
enum CREATUREHISTORY_EVENT_IMPREGNATED [related] |
I made someone else pregnant.
Value: 9
Definition at line 48 of file CreatureHistoryEvent.php.
enum CREATUREHISTORY_EVENT_LAIDEGG [related] |
I laid an egg I was carrying.
Value: 12
Definition at line 57 of file CreatureHistoryEvent.php.
enum CREATUREHISTORY_EVENT_MUMLAIDMYEGG [related] |
My mum laid my egg.
Value: 11
Definition at line 54 of file CreatureHistoryEvent.php.
enum CREATUREHISTORY_EVENT_PHOTOTAKEN [related] |
A photo was taken of me.
Value: 13
Definition at line 60 of file CreatureHistoryEvent.php.
enum CREATUREHISTORY_EVENT_SPLICED [related] |
I was spliced from two other creatures
Value: 1
Definition at line 21 of file CreatureHistoryEvent.php.
enum CREATUREHISTORY_EVENT_WARPEDIN [related] |
I entered this world through the warp
Value: 17
Definition at line 79 of file CreatureHistoryEvent.php.
enum CREATUREHISTORY_EVENT_WARPEDOUT [related] |
I left this world through the warp
Value: 16
Definition at line 76 of file CreatureHistoryEvent.php.