
Do Action Helper
A library mod that helps mod developers create and manage Do Action conditions
Last updated | a day ago |
Total downloads | 105 |
Total rating | 2 |
Categories | Libraries |
Dependency string | tomtee-Do_Action_Helper-1.0.1 |
Dependants | 1 other package depends on this package |
This mod requires the following mods to function

README
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 inmod.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 returntrue
if don't want other conditions to be checked, returnfalse
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 usingDoActionHelper_RegisterAction
. Make sure yourname
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.