Spellforce-Spell-framework
Loading...
Searching...
No Matches
sf_ai_functions.h File Reference

Header file for defining AI-related battle functions for managing spellcasting, NPC behavior, and target actions in the game. More...

#include <stdint.h>
#include <stdbool.h>
#include "./structures/sf_ai_structures.h"
Include dependency graph for sf_ai_functions.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  AiFunctions
 Group of functions related to AI manipulation. More...

Typedefs

typedef SF_SGtFigureAction *(__thiscall * getTargetAction_ptr) (SF_CGdFigure *figure, SF_SGtFigureAction *action, uint16_t figure_id)
 Retrieves the target action for a specific figure.
typedef SF_SGtFigureAction *(__thiscall * getFigureAction_ptr) (SF_CGdFigure *figure, SF_SGtFigureAction *action, uint16_t figure_id, uint8_t action_index)
typedef void(__thiscall * setAICurrentActionRanking_ptr) (SF_CGdBattleDevelopment *_this, int rank)
 Sets the ranking of the current action for AI decision-making.
typedef int(__thiscall * getAICurrentActionRanking_ptr) (SF_CGdBattleDevelopment *_this)
typedef bool(__thiscall * canFigureDoAction_ptr) (SF_CGdBattleDevelopment *_this, SF_SGtFigureAction *action)
typedef void(__thiscall * getActionStats_ptr) (SF_CGdBattleDevelopment *_this, uint16_t *minRange, uint16_t *maxRange, SF_CGdResourceSpell *spellData)
typedef bool(__thiscall * isAIVectorEmpty_ptr) (void *_this)
typedef uint16_t **(__thiscall * getAIVectorFirstElement_ptr) (void *_this, uint16_t **pvalue)
typedef uint16_t **(__thiscall * getAIVectorGetCurrent_ptr) (void *_this, uint16_t **value)
typedef int(__thiscall * getAIVectorLength_ptr) (void *_this)
typedef uint16_t(__thiscall * getCastType_ptr) (void *resource, uint16_t spellID)
typedef void *(__thiscall * AC60AddOrGetEntity_ptr) (void *_autoclass60, uint16_t entity_index)
typedef SF_Coord *(__thiscall * getPositionToCastAlly_ptr) (SF_CGdBattleDevelopment *_this, SF_Coord *param_1, void *std_vector_uint16_t)
typedef SF_Coord *(__thiscall * getPositionToCastEnemy_ptr) (SF_CGdBattleDevelopment *_this, SF_Coord *param_1, void *std_vector_uint16_t)
typedef bool(__thiscall * isUnknownWorldFeature_ptr) (SF_CGdWorldToolBox *, uint16_t figure_index, SF_Coord *param2, SF_Coord *param3, uint32_t param4, SF_Coord *param5, uint16_t param6)

Detailed Description

Header file for defining AI-related battle functions for managing spellcasting, NPC behavior, and target actions in the game.

This file provides the necessary data structures and function declarations used by the AI to interact with the game's entities, actions, and battle mechanics. Functions include getting and setting AI actions, managing AI figures, and handling spell casting behaviors.

Definition in file sf_ai_functions.h.

Typedef Documentation

◆ AC60AddOrGetEntity_ptr

typedef void *(__thiscall * AC60AddOrGetEntity_ptr) (void *_autoclass60, uint16_t entity_index)

Definition at line 67 of file sf_ai_functions.h.

◆ canFigureDoAction_ptr

typedef bool(__thiscall * canFigureDoAction_ptr) (SF_CGdBattleDevelopment *_this, SF_SGtFigureAction *action)

Definition at line 53 of file sf_ai_functions.h.

◆ getActionStats_ptr

typedef void(__thiscall * getActionStats_ptr) (SF_CGdBattleDevelopment *_this, uint16_t *minRange, uint16_t *maxRange, SF_CGdResourceSpell *spellData)

Definition at line 56 of file sf_ai_functions.h.

◆ getAICurrentActionRanking_ptr

typedef int(__thiscall * getAICurrentActionRanking_ptr) (SF_CGdBattleDevelopment *_this)

Definition at line 50 of file sf_ai_functions.h.

◆ getAIVectorFirstElement_ptr

typedef uint16_t **(__thiscall * getAIVectorFirstElement_ptr) (void *_this, uint16_t **pvalue)

Definition at line 61 of file sf_ai_functions.h.

◆ getAIVectorGetCurrent_ptr

typedef uint16_t **(__thiscall * getAIVectorGetCurrent_ptr) (void *_this, uint16_t **value)

Definition at line 63 of file sf_ai_functions.h.

◆ getAIVectorLength_ptr

typedef int(__thiscall * getAIVectorLength_ptr) (void *_this)

Definition at line 64 of file sf_ai_functions.h.

◆ getCastType_ptr

typedef uint16_t(__thiscall * getCastType_ptr) (void *resource, uint16_t spellID)

Definition at line 65 of file sf_ai_functions.h.

◆ getFigureAction_ptr

typedef SF_SGtFigureAction *(__thiscall * getFigureAction_ptr) (SF_CGdFigure *figure, SF_SGtFigureAction *action, uint16_t figure_id, uint8_t action_index)

Definition at line 34 of file sf_ai_functions.h.

◆ getPositionToCastAlly_ptr

typedef SF_Coord *(__thiscall * getPositionToCastAlly_ptr) (SF_CGdBattleDevelopment *_this, SF_Coord *param_1, void *std_vector_uint16_t)

Definition at line 70 of file sf_ai_functions.h.

◆ getPositionToCastEnemy_ptr

typedef SF_Coord *(__thiscall * getPositionToCastEnemy_ptr) (SF_CGdBattleDevelopment *_this, SF_Coord *param_1, void *std_vector_uint16_t)

Definition at line 73 of file sf_ai_functions.h.

◆ getTargetAction_ptr

typedef SF_SGtFigureAction *(__thiscall * getTargetAction_ptr) (SF_CGdFigure *figure, SF_SGtFigureAction *action, uint16_t figure_id)

Retrieves the target action for a specific figure.

This function determines the action a figure should perform based on the target it is currently focused on. The figure's action is retrieved from the action list and returned.

Parameters
figurePointer to the figure that will perform the action.
actionPointer to an action structure where the action details will be stored.
figure_idID of the figure whose action is being queried.
Returns
SF_SGtFigureAction* A pointer to the action that the figure should perform.

Definition at line 30 of file sf_ai_functions.h.

◆ isAIVectorEmpty_ptr

typedef bool(__thiscall * isAIVectorEmpty_ptr) (void *_this)

Definition at line 59 of file sf_ai_functions.h.

◆ isUnknownWorldFeature_ptr

typedef bool(__thiscall * isUnknownWorldFeature_ptr) (SF_CGdWorldToolBox *, uint16_t figure_index, SF_Coord *param2, SF_Coord *param3, uint32_t param4, SF_Coord *param5, uint16_t param6)

Definition at line 77 of file sf_ai_functions.h.

◆ setAICurrentActionRanking_ptr

typedef void(__thiscall * setAICurrentActionRanking_ptr) (SF_CGdBattleDevelopment *_this, int rank)

Sets the ranking of the current action for AI decision-making.

This function assigns a ranking value to the AI's current action, which influences the AI's decision-making process for which action to perform next based on its priorities and the battle situation.

Parameters
_thisPointer to the AI battle development structure.
rankThe ranking value to assign to the current action. Higher values indicate higher priority.

Definition at line 47 of file sf_ai_functions.h.