

A library mod that aims to provide mod developers a centralised interface for adding, changing, or removing Do Action conditions.
Usage:
mm_recomp_do_action_helper as a dependency in mod.toml.#include "DAH_header.h" to your mod's source file.CONDITION_PARAMETERS be the parameters and set the Do Action with *doAction = DO_ACTION_XXXX;. Have the function return true if don't want other conditions to be checked, return false if you do. Here's an example:bool Attack_Drop(CONDITION_PARAMETERS) {
Actor* heldActor = this->heldActor;
if ((this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) && (this->getItemId == GI_NONE) &&
(heldActor != NULL)) {
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (heldActor->id == ACTOR_EN_NIW)) {
*doAction = DO_ACTION_DROP;
return true;
}
}
return false;
}
DAH_ON_INIT to register your Do Action conditions using DoActionHelper_RegisterAction. Make sure your name argument is 32 characters or less (including NULL terminator). Here's an example:DAH_ON_INIT void DAH_on_init() {
DoActionHelper_RegisterAction(ACTION, Action_Drop_Replace, 146, "Modern Throwing");
DoActionHelper_RegisterAction(ATTACK_GORON, Attack_Drop, 32, "Modern Throwing");
DoActionHelper_RegisterAction(ATTACK_ZORA, Attack_Drop, 32, "Modern Throwing");
DoActionHelper_RegisterAction(ATTACK_DEKU, Attack_Drop, 32, "Modern Throwing");
DoActionHelper_RegisterAction(ATTACK_HUMAN, Attack_Drop, 32, "Modern Throwing");
}
Notes:
Requires Notifications.