Welcome to the Creatures Wiki! Log in and join the community.


From Creatures Wiki
Jump to navigation Jump to search

HIST COUN is a CAOS command that returns the number of life events for a creature with a given moniker.


Syntax: HIST COUN moniker(str)

Returns 0 if there are no life events or the moniker doesn't exist. Otherwise, returns the number of life events experienced by the creature with moniker.


The Creature History uses it to find the last life event of creatures who are no longer alive but have not gained a death event for whatever reason, in order to retrieve their last known age:

*where ov01 is the moniker of the selected creature
* death event age if there is one
setv va03 hist finr ov01 7 -1
doif va03 = -1
	* last event otherwise
	setv va03 hist coun ov01
	subv va03 1
setv va01 hist tage ov01 va03
setv va10 hist cage ov01 va03