GDF3 File and Data Specifications for GCA4
Root FileSpec Page
GCA Site
Home | Docs & Help Page

Commands

Commands allow you to instruct GCA to do something to the data being loaded from data files, from within a data file.

Commands always begin a new line, and always begin with a # sign, unless they fall within a command block, in which case the leading # is optional.

Contents

#Changes
#Clone
#Delete
#End
#MergeTags
#ReplaceTags

Not yet done:

#DeleteCat
#DeleteAllCats

Templates

The documentation below uses templates to demonstrate the structure of the various #commands. The templates are meant to provide a quick way to see how the commands may be formatted. Trying to do this, however, is not always easy, and we have made some formatting decisions that may take some getting used to. So here's an explanation of how things work.


 

#Changes

Description:

This command designates the beginning of a command block.

Template:

#Changes

Detail:

This command simply tells GCA that all the lines following, until the end of the block, are a part of the command block.


 

#Clone

Description:

This command allows you to clone an existing data file item (one already loaded), creating a new one that shares all the same tag data, but with a different name.

Template:

#Clone item as newitem

Detail:

The item placeholder holds the name of the item being cloned. This name should include the prefix tag for the item. If the item is not found, the command will fail.

The newitem placeholder holds the name of the new item being created from the cloned one. This name should also include the prefix tag for the item.

You may only perform one clone operation per #Clone command. If the target name (the new item being created) already exists, the clone operation will fail.

Examples:  
Example:

#clone SK:Alpha as SK:Alpha (Charlie)

This is pretty straight-forward. A skill named Alpha is cloned, creating a skill named Alpha with a name extension of Charlie.


 

#Delete

Description:

This command allows you to delete an item from the list of loaded items. #Delete will have no affect on any items that may be loaded after the command is processed. #Delete will delete only a single item.

Template:

#Delete item

Detail:

The item placeholder holds the name of the item to be deleted. This name should include the prefix tag for the item. If the item is not found, the command will fail.

You may only perform one delete operation per #Delete command.

Examples:  
Example:

#delete SK:Alpha (Charlie)

This is pretty straight-forward. A skill named Alpha, with the name extension of Charlie, is deleted.


 

#End

Description:

This command designates the end of a command block.

Template:

#End

Detail:

This command simply tells GCA that the command block has ended.


 

#MergeTags

Description:

This command allows you to merge new tag data with that of an existing item. This is a handy way to update items that exist in previously loaded data files, without having to complete redefine the item in the new data file.

Template:

#MergeTags in [all] item with taglist [, in [all] item with taglist ]

Detail:

The item placeholder holds the name of the item whose tags are to be merged with. This name should include the prefix tag for the item. If the item is not found, the command will fail.

The taglist placeholder holds the list of tags whose data you wish to merge with the target item. In cases where the item already has existing tags of the same types, the data from taglist items will be appended to the data in the existing tags (although it won't be added if doing so would duplicate data).

The optional all keyword must follow the in keyword and precede item. If this keyword is used, GCA will try to find all occurances of the item (that is, any that may also include name extensions) and make the directed changes to all items found.

You may perform many different MergeTags operations on a single line, but each must be separated by a comma and use the in keyword, and each tag list must be separated from its particular target by the with keyword. You must remember to include the spaces around the with and in keywords.

If the item or the taglist contains the letter combinations of "in " or " with " (that's in followed by a space, or with preceded and followed by a space), then it must be enclosed within quotes, otherwise quotes aren't necessary around them.

Examples:  
Example:

#MergeTags in SK:Alpha with page(home rules)

This simply inserts the 'home rules' text into the page() tag of the Alpha skill item.


 

#ReplaceTags

Description:

This command allows you to replace an existing item's tag data with new data. This is a handy way to correct or alter items that exist in previously loaded data files, without having to completely redefine them in the new data file.

Template:

#ReplaceTags in [all] item with taglist [, in [all] item with taglist ]

Detail:

The item placeholder holds the name of the item whose tags are to be replaced. This name should include the prefix tag for the item. If the item is not found, the command will fail.

The taglist placeholder holds the list of tags whose data will replace that in the target item. In cases where the item already has existing tags of the same types, the data from taglist items will completely replace that of the existing tags. In cases where no such tags exist, the new tags will be added to the target item.

The optional all keyword must follow the in keyword and precede item. If this keyword is used, GCA will try to find all occurances of the item (that is, any that may also include name extensions) and make the directed changes to all items found.

You may perform many different ReplaceTags operations on a single line, but each must be separated by a comma and use the in keyword, and each tag list must be separated from its particular target by the with keyword. You must remember to include the spaces around the with and in keywords.

If the item or the taglist contains the letter combinations of "in " or " with " (that's in followed by a space, or with preceded and followed by a space), then it must be enclosed within quotes, otherwise quotes aren't necessary around them.

Examples:  
Example:

#ReplaceTags in SK:Alpha with page(home rules)

This replaces any existing page() tag data in the Alpha skill item with the 'home rules' data.


This document last updated July 25, 2007. Copyright © 2004, 2007 Armin D. Sykes. All rights reserved.