# 'module' defines the module and its name

module "BOO EDITOR V.1.0" {
   # The following descriptions will be attached with the module.
   # They will be displayed when the module is started or when
   # the users request.

   desc "Team member editor for BOO 1.0, by Mage Merlin"
   desc " "
   desc "This is an editor for changing member data in the game BOO."
   desc "It will let you change data for each member of your team."
   desc "You can change their names, sexes, races, and golds they own."

   # This is a 'relative' record which means it will be applied on
   # several sets of data.

   relative "Member Data" {
	 # The following descriptions will be attached to the recrod.

	 desc "This record contains the name, sex, and race of the"
	 desc "character, and the amount of golds the character has."

	 # Now define the offset of the first record to the begin
	 # of the file, size of the record (and each data set), and
	 # the number of sets.
	 # Here it says the first data set using this record is at
	 # offset 0x100 (256), with a size of 40 bytes, and there
	 # are 4 continuous data sets starting from that offset.

	 recloc 0x100 40 4

	 # this is the defintion for a field

	 field "Name" {
	    # following descriptions will be attached to the field

	    desc "The name of the character.  16 characters long."

	    # Here it defines the location and size of data in the
	    # game file.  It says that data located at offset 0 of
	    # the record (data set) as a size of 16 bytes long string

	    data 0 16 ascii

	    # Now it defines the display of the field in the entry
	    # form.  It is in page 0, The label of the field "Name"
	    # is at row 3, column 5.  The entry would be at row 3,
	    # column 12 as a 16 characters ASCII string.

         entry 0 3 5 3 12 16 asc
	 }

      field "Sex" {
         # descriptions for the field.

         desc "Sex of the character."
	    desc " "
         desc "M - Male.  F - Female.  N - Neutral."

	    # data located at offset 18 of the record, 1 bytes long and
	    # interpreted as an ascii character.

	    data 18 1 ascii

	    # label at page 0, row 4, column 5
	    # entry at row 4, column 12, 1 byte ascii

	    entry 0 4 5 4 12 1 asc
	 }
	 field "Race" {
	    # descriptions for the field.

	    desc "The race of the character.  Data is BCD with 1 byte long."
	    desc " "
	    desc "10 - Human   11 - Orc   12 - Dwarf   13 - Werewolf."

	    # data located at offset 19 of the record, 1 byte long,
	    # as a BCD number.  Note: every byte of BCD can hold 2 digits.

	    data 19 1 bcd

	    # label at page 0, row 5, column 5
	    # entry at row 5, column 12, 2 digits decimal

	    entry 0 5 5 5 12 2 dec
	 }
	 field "Golds" {
	    # descriptions for the field.

	    desc "The amount of golds the member has."

	    # data located at offset 20 of the record. 2 byte integer.

	    data 20 2 word

	    # label at page 0, row 6, column 5
	    # entry at row 6, column 12, 5 digits decimal

         entry 0 6 5 6 12 5 dec
      }
   }
}
