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

RTYP

From Creatures Wiki
(Redirected from Rtyp)
Jump to navigation Jump to search

RTYP is a CAOS command and function to set or output the type of a room.

Usage[edit]

Command[edit]

Syntax: RTYP room_id(integer) room_type(integer)

Sets the given room's type to the one specified. For C3/DS, this should be in the range of 0-10.

Function[edit]

Syntax: RTYP room_id(integer)

This returns the given room's type as an integer. For C3/DS, this will be in the range of 0-10.

Example[edit]

This command is seen in the install scripts for metarooms to set the type for each defined room.

As a function, it is often used to make sure that plants and critters are restricted to reasonable habitats, so that plants don't start growing on metal walkways, terrestrial animals can't thrive underwater, fish die when brought to dry land, etc. For example, when bramboo fruit checks to see if it can make a new plant, one of the things it checks for is whether it's sitting on soil of some kind:

doif rtyp room targ = 5 or rtyp room targ = 6 or rtyp room targ = 7
	setv va15 1
else
	setv va15 0
endi

C3/DS Room Types[edit]

Number Name Description
0 Atmosphere Heat and light travel well, nutrients and water do not.
1 Wooden Walkway Insulates against heat, but permits water to drip through.
2 Concrete Walkway Less permeable to more CA than a wooden walkway.
3 Indoor Concrete
4 Outdoor Concrete
5 Normal Soil Fairly permeable to most CA.
6 Boggy Soil Retains more moisture than normal soil.
7 Drained Soil Loses more moisture than normal soil.
8 Fresh Water Restrictive to heat.
9 Salt Water Restrictive to heat.
10 Ettin Home Loses the smell of machinery.