Pet Command 
Set some AI blackboard commands in response to receiving instructions This is abstract and should be extended for actual behaviour
Vars | |
| callout_type | Callout that triggers this command |
|---|---|
| command_desc | Description to display in radial menu |
| command_name | Unique name used for radial selection, should not be shared with other commands on one mob |
| hidden | If true, command will not appear in radial menu and can only be accessed through speech |
| old_mouse_override_icon | Mouse pointer in use before the radial target prompt |
| radial_commander | Friend currently selecting a target through this command's radial menu |
| radial_icon | Icon to display in radial menu |
| radial_icon_state | Icon state to display in radial menu |
| requires_pointing | does this pet command need a point to activate? |
| sense_radius | How close a mob needs to be to a target to respond to a command |
| speech_commands | Speech strings to listen out for |
| targeting_strategy_key | Blackboard key for targeting strategy, this is likely going to need it |
| weak_parent | Weak reference to who follows this command |
Procs | |
| add_new_friend | Register a new guy we want to listen to |
| command_ended | Called when this command is replaced by another command or otherwise deactivated. Extend to add cleanup logic. |
| execute_action | Execute an AI action on the provided controller, what we should actually do when this command is active. This should basically always be called from a planning subtree which passes its own controller. Return SUBTREE_RETURN_FINISH_PLANNING to pass that instruction on to the controller, or don't if you don't want that. |
| find_command_in_text | Returns true if we find any of our spoken commands in the text. if check_verbosity is true, skip the match if there spoken_text is way longer than the match |
| finish_command | Report that an immediate command action has completed if this command is still active. |
| look_for_target | Target the pointed atom for actions |
| on_target_set | Target the pointed atom for actions |
| provide_radial_data | Provide information about how to display this command in a radial menu |
| refuse_target | Show a short balloon when a command rejects a supplied target. |
| remove_friend | Stop listening to a guy |
| respond_to_callout | Respond to a callout |
| respond_to_command | Respond to something that one of our friends has asked us to do |
| set_command_active | Activate the command, extend to add visible messages and the like |
| set_command_target | Store the target for the AI blackboard |
| try_activate_command | Apply a command state if conditions are right, return command if successful |
| valid_callout_target | Does this callout with this target trigger this command? |
Var Details
callout_type 
Callout that triggers this command
command_desc 
Description to display in radial menu
command_name 
Unique name used for radial selection, should not be shared with other commands on one mob
hidden 
If true, command will not appear in radial menu and can only be accessed through speech
old_mouse_override_icon 
Mouse pointer in use before the radial target prompt
radial_commander 
Friend currently selecting a target through this command's radial menu
radial_icon 
Icon to display in radial menu
radial_icon_state 
Icon state to display in radial menu
requires_pointing 
does this pet command need a point to activate?
sense_radius 
How close a mob needs to be to a target to respond to a command
speech_commands 
Speech strings to listen out for
targeting_strategy_key 
Blackboard key for targeting strategy, this is likely going to need it
weak_parent 
Weak reference to who follows this command
Proc Details
add_new_friend
Register a new guy we want to listen to
command_ended
Called when this command is replaced by another command or otherwise deactivated. Extend to add cleanup logic.
execute_action
Execute an AI action on the provided controller, what we should actually do when this command is active. This should basically always be called from a planning subtree which passes its own controller. Return SUBTREE_RETURN_FINISH_PLANNING to pass that instruction on to the controller, or don't if you don't want that.
find_command_in_text
Returns true if we find any of our spoken commands in the text. if check_verbosity is true, skip the match if there spoken_text is way longer than the match
finish_command
Report that an immediate command action has completed if this command is still active.
look_for_target
Target the pointed atom for actions
on_target_set
Target the pointed atom for actions
provide_radial_data
Provide information about how to display this command in a radial menu
refuse_target
Show a short balloon when a command rejects a supplied target.
remove_friend
Stop listening to a guy
respond_to_callout
Respond to a callout
respond_to_command
Respond to something that one of our friends has asked us to do
set_command_active
Activate the command, extend to add visible messages and the like
set_command_target
Store the target for the AI blackboard
try_activate_command
Apply a command state if conditions are right, return command if successful
valid_callout_target
Does this callout with this target trigger this command?