Navigation: AlienAPI Basics > Command Tags > Telling AstroSynthesis about the plug-in |
|
When AstroSynthesis loads, it looks at the various command tags set within each plug-in. These tags tell the program what type plug-in the script represents and various bits of data about the plug-in.
Command tags are simply formatted lines put into the script. They are preceded with '#' symbols. Here's some examples:
#plugin Quick Generate
#author NBOS
#desc Generates random systems until the Escape key is pressed
#button ExampleStuff\QuickGenerate.bmp
There are several different types of plug-ins. Scripts need to have command tags telling the program that the script is one of the available types, or the plug-in won't be loaded. The types are:
• | Program Feature. These plug-ins add menu items to the program, essentially creating a new feature in the program. Feature plug-ins are defined with the #plugin tag. |
• | Pop-up Menu Feature. These plug-ins add an item to the pop-up menu that is displayed when a body is right-clicked. These are defined with the #popmenu tag. |
• | Generator plug-in. These are System Generator plug-ins. They work like normal Program Feature plug-ins, but are automatically placed on the File - New menu. These are defined with the #generator tag. |
• | Body Generator. These are system generator plug-ins that are made available on the New System window. These are used to generate single systems, not entire sectors. Defined with the #bodygen tag. |
• | File Handler. These plug-ins allow script creators to tell AstroSynthesis how to open files other than the normal '.sector' file. These plug-ins are defined with the #filehandler tag. |