Modules

1.1.0.5

Flowgraph Plugin System


Quick Links:
About
Creating a Module
Saving a Module
Calling a Module from Flowgraph



About

A Module is an exported Flowgraph that can be loaded and called from another Flowgraph at any point during the game session. Any Flowgraph can be converted to a Module simply by exporting the Flowgraph to its Xml format using the "Save" option in the Flowgraph Editor.

The advantages of using Modules in your Mod:



Creating a Module

A Module is just a special flavor of a Flowgraph. This means ANY Flowgraph can become a Module with a few simple modifications made to it. So pick your favorite Flowgraph that you want to turn into a Module, or create a simple one to work with.



The first thing you will need to do is place a Module:Start Node. This acts as the starting point for your Module when it is called. It also carries over any input sent from the Caller Node. (More on this later.)

Module_Start.JPEG

Module:Start Node

Outputs:



After you have placed the Starting point, you may want to place an Ending point by using the Module:Return Node. Note that this set is not required. When a Module returns, it is unloaded and stops executing. If you want your Module to always remain executing while the level is being played, then don't return from it! Returning from a Module does allow you to pass optional data back to the Caller.

Module_Return.JPEG

Module:Return Node

Inputs:



Saving a Module

To save your Flowgraph so that it can be used as a Module, all you need to do is bring up your Flowgraph in the Flowgraph Editor, and select Save from the File Menu. There are multiple locations where you should save the Flowgraph, depending on how you want to use it in your Mod:

Where MYMOD is your Mod Folder...

When loading a Module, the system will first check the current level's Modules folder. If the Module is not found there, it will then look in the Global Modules folder. This gives you the potential to overwrite a Global Module with a Level-Specific Module if you wish.



Calling a Module from Flowgraph

So now we have this Module ready to be used in our level. To call the Module, all we need to do is use the Module:Call Node.

Module_Call.JPEG

Module:Call Node

Inputs:

Outputs:



Generated on Tue May 12 16:08:15 2009 for FlowGraph Plugin System for Crysis-Wars by  doxygen 1.5.9