ai_node

Vars | |
adjacent_nodes | Assoc list of adjacent landmark nodes by dir |
---|---|
id_counter | static id counter for all nodes |
unique_id | A unique id for this node |
weights | List of weights for scoring stuff happening here; ultilizes "identifiers" to differentiate different kinds of AI types looking at the same node. |
Procs | |
get_best_adj_node | A proc that gets the "best" adjacent node in src based on score The score is calculated by what weights are inside of the list/weight_modifiers The highest number after multiplying each list/weight by the ones in the above parameter will be the node that's chosen; any nodes that have the same score won't override that node Generally the number that the weight has before being multiplied by weight modifiers is the "user friendly" edition; NODE_LAST_VISITED represents in deciseconds the time before the node has been visited by a particular thing, while something like NODE_ENEMY_COUNT represents the amount of enemies Parameter call example GetBestAdjNode(list(NODE_LAST_VISITED = -1), IDENTIFIER_XENO) Returns an adjacent node that was last visited; when a AI chose to visit a node, it will set NODE_LAST_VISITED to world.time |
increment_weight | Adds to the specific weight of a specific identifier of this node |
is_in_line_of_sight | Returns true if the turf in argument is in line of sight |
make_adjacents | Clears the adjacencies of src and repopulates it, it will consider nodes "adjacent" to src should it be less 15 turfs away |
serialize | Serialize nodes information |
set_weight | Sets the specific weight of a specific identifier of this node |
Var Details
adjacent_nodes

Assoc list of adjacent landmark nodes by dir
id_counter

static id counter for all nodes
unique_id

A unique id for this node
weights

List of weights for scoring stuff happening here; ultilizes "identifiers" to differentiate different kinds of AI types looking at the same node.
Proc Details
get_best_adj_node
A proc that gets the "best" adjacent node in src based on score The score is calculated by what weights are inside of the list/weight_modifiers The highest number after multiplying each list/weight by the ones in the above parameter will be the node that's chosen; any nodes that have the same score won't override that node Generally the number that the weight has before being multiplied by weight modifiers is the "user friendly" edition; NODE_LAST_VISITED represents in deciseconds the time before the node has been visited by a particular thing, while something like NODE_ENEMY_COUNT represents the amount of enemies Parameter call example GetBestAdjNode(list(NODE_LAST_VISITED = -1), IDENTIFIER_XENO) Returns an adjacent node that was last visited; when a AI chose to visit a node, it will set NODE_LAST_VISITED to world.time
increment_weight
Adds to the specific weight of a specific identifier of this node
is_in_line_of_sight
Returns true if the turf in argument is in line of sight
make_adjacents
Clears the adjacencies of src and repopulates it, it will consider nodes "adjacent" to src should it be less 15 turfs away
serialize
Serialize nodes information
set_weight
Sets the specific weight of a specific identifier of this node