bot_army v1.0.0 mix bots.extract_actions View Source

Generates "custom action nodes" for the behavior tree editor.

This will scan all actions defined in the supplied actions-dir directory to build a json representation. If you provide a bt-json-file, it will insert the generated nodes into the custom_nodes section (replacing any existing nodes!), otherwise it will print the json to screen for you to copy and paste via the "Project > Import > Nodes as JSON" menu option (this appends to existing custom nodes).

Parameters:

  • actions-dir - [required] Path to the directory containing all of your actions.
  • module-base - [optional] If all of your actions start with a common prefix (Ex: MyProject.Actions), you can include this parameter to strip that prefix, making it easier to read the nodes in the visual editor. Be sure to include the module_base option in BotArmy.BTParser.parse!/2 to ensure the stripped base gets re-appended.
  • bt-json-file - [optional] Location of behavior tree editor project file.

Link to this section Summary

Functions

A task needs to implement run which receives a list of command line args.

Link to this section Functions

A task needs to implement run which receives a list of command line args.

Callback implementation for Mix.Task.run/1.