Do Action Helper

v1.0.1·Updated 2025-05-24

A library mod that helps mod developers create and manage Do Action conditions

About this mod Author’s original text

Majora's Mask: Recompiled Do Action Helper

A library mod that aims to provide mod developers a centralised interface for adding, changing, or removing Do Action conditions.

Usage:

  • Download the header and place it in your mods include folder.
  • Add mm_recomp_do_action_helper as a dependency in mod.toml.
  • Add #include "DAH_header.h" to your mod's source file.
  • Create your condition. Have 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;

}

  • Use 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:

  • The priorities of vanilla conditions can be seen in the source code.
  • You should check which priorities other mods use when they register conditions to prevent conflicts and make sure your condition is checked before or after other mods.

Requires Notifications.

Install & use Install: follow the bundled instructions

  1. Unzip the archive from playbuff and read the bundled readme / instructions first.
  2. Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
  3. For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
  4. Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.

Install locations vary a lot between mods — the bundled readme is the most reliable guide.

Dependencies

Install these first, or the mod will not work:

ProxyMM-Notifications

File & checksum

Filename
Do_Action_Helper-1.0.1.zip
File size
385.2 KiB