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

Difference between revisions of "Catalogue files"

From Creatures Wiki
Jump to navigation Jump to search
(add more complete information)
m
Line 1: Line 1:
Catalogues are a way of storing data about/for an agent in an easy, accessible manner.  
+
Catalogues are a way of storing data about/for an agent in an easy, accessible manner. They were introduced in [[Creatures Adventures]], and are available and used in all [[Creatures Evolution Engine]] games.
  
==Outline==
+
==Format==
A catalogue file is a plain text file with the extension .catalogue in the 'Catalogue' folder of C3 engine games.
 
  
==Format==
+
A catalogue file is a plain text file with the extension .catalogue in the 'Catalogue' folder of a game. They are made up of data, and comments.
A catalogue file is made up of data, and comments.
 
  
 
Data is in the form of a tag name, which identifies the data, and then one or more fields of data associated with that tag.
 
Data is in the form of a tag name, which identifies the data, and then one or more fields of data associated with that tag.

Revision as of 22:10, 30 December 2005

Catalogues are a way of storing data about/for an agent in an easy, accessible manner. They were introduced in Creatures Adventures, and are available and used in all Creatures Evolution Engine games.

Format

A catalogue file is a plain text file with the extension .catalogue in the 'Catalogue' folder of a game. They are made up of data, and comments.

Data is in the form of a tag name, which identifies the data, and then one or more fields of data associated with that tag.

Tags can be made using the TAG syntax, which lets you have as many fields as you wish associated with a tag...

TAG "tagname"
"first field"
"second field"

... or using the ARRAY syntax, which requires you to manually specify the number of fields associated with the tag:

ARRAY "tagname" 2
"first field"
"second field"

If you're replacing an existing tag, such as many of the DS catalogue files do in order to replace C3 data, you need to add OVERRIDE after the TAG or ARRAY command, for example:

TAG OVERRIDE "a tag to replace"
"replaced first field"
"replaced second field"

Comments are lines which begin with '#' or '*', for example:

## This is a comment.

Or the remains of lines after a '#' or '*', for example:

TAG "tagname" # This is a comment.

Distribution

Remember that if you want the .catalogue file distributed it with your agent, you have to include it in your PRAY file with the dependency category specified and the inline FILE command linking it into the agent, or easyPRAY can do it for you.

Agent Help

The most common use of Catalogue files is for writing Agent help for agents. Here's how.

TAG "Agent Help <family> <genus> <species>"
"Agent name"
"Agent description"

Other uses

You can use the catalogue system for other things, such as multi-lingual agents, or arbitrary text or values the agent should read. You can do this with the READ or WILD command. Beware, when you do this, all catalogue files are searched, so name your tags thoughtfully.

An example tag, from Docking Station's misc.catalogue, is "portal misc", used by Agent Help to construct the text displayed while displaying agent help for a portal. The tag in-file is:

TAG "portal misc"
"This warp portal has been identified as: "        

And the CAOS code used to access it is:

 SETS va01 READ "portal misc" 0