< Back to Contents

Installing Plugins

In order to install new plugins, you will need to understand the basics of FloodScript. If you wrote the plugin, you're obviously on your own. If you're using a plugin written by someone else or reconfiguring a plugin that came with FloodGrapher, you may be able to find easier instructions to install it somewhere (with it or on the wiki maybe).

Editing floodscript.ini to configure File formats and GUI plugins

You can add plugins to the grapher by editing kawigi/resource/floodscript.ini. For GUI plugins, simply add a line that says plugin=<package>.<classname>(<parameters>). The parameters may be unnecessary (just leave off the parentheses completely), or they may be crucial. If you're not sure what parameters the plugin takes, you might be able to peak at the source to see what the constructor requires. Note that if it requires a FloodGrapherGUI or anything like it, you can just use the this reference.

For file format plugins, just add a line that says fileformat=<package>.<classname>. Most file format plugins won't require plugins, but if they do, you can also put them in using parentheses and a list according to the FloodScript specification.

Using the Plugin Manager to configure file formats and GUI plugins

If you have the plugin manager configured on FloodGrapher, you can open FloodGrapher and click on the "Plugins" tab to use the plugin manager. There are two areas there, one for file formats and one for GUI plugins. To add either one, click on the Add button under the appropriate section, and type the FloodScript constructor for the desired object. For most file formats, this will just be the fully qualified classname (i.e. - with the package name), for most GUI plugins, this will be the fully qualified classname followed by (this). Generally a quick scan over the plugin class will tell you what you need.

Editing robot.ini to configure movements, power management, or segmentations

To change the movement used by FloodGrapher, you can change the line that starts with movement= to use the class and parameters that you want. Note that some movements take a distancing algorithm as a parameter. For instance, the following algorithm will make FloodGrapher use dynamic distancing - attempting to find its best distance from you:

	movement=kawigi.tools.parts.FloodMovement(kawigi.tools.parts.DynamicDistancing)

You could tell FloodGrapher to stay at a preferred distance of 400 to 600 using this line:

	movement=kawigi.tools.parts.FloodMovement(kawigi.tools.parts.StaticDistancing([d400],[d600])

Likewise, if you wanted FloodGrapher to just stand still, you can set it to kawigi.tools.parts.StationaryMovement with no parameters.

Different power-management schemes can be added by similarly changing the the powermanagement= line. Please only specify one movement and one powermanagement, or FloodGrapher may crash.

To add or change segmentations, just add lines to robot.ini that start with segmentation= and then the FloodScript constructors of all the needed objects. FloodGrapher will save the segmentations (they should all be Serializable) in its data file, so files with various segmentation schemes can easily be opened by the graphing utility.