This lets your AI respond with special commands that your game can then understand and execute.


How it works

  1. Defining Actions: You first define all the things your AI can do.
  2. Instructions: You give your AI specific instructions and the provided instructions in the module.
  3. Parsing: When the AI sends a message back, this module looks for those special action commands within the message.
  4. Executing: The module can then run the corresponding functions you defined.

Actions

Actions are defined with:

local Actions = {
	-- Name of the action
	Test = {
		-- Detailed description of the action (So the AI can know what function it has access to)
		Description = 'This is a test function. Usage [Test {number}]',
		
		-- Actual function that fires
		Action = function(params, Context)
			print(Context.Name)
			print(params)
		end,
	},
}

Methods

Properties