Hooks

OIF rely heavily on hooks to provide you with more options, almost all hooks contain a data value, the changes made to it will be propagated forward to wathever happens next.

After Melee Preparation

Hooks.on('oifWeaponMeleePostPrepare', (data) => {});

This hook fires after the data that will be used on the melee animation gets prepared, and before the animation gets played.


After Melee Hit Animation

Hooks.on('oifWeaponMeleeHitPostAnimation', (data) => {});

This hook fires after the melee hit animation is played, and before interaction and sound.

After Melee Hit Interaction

Hooks.on('oifWeaponMeleeHitPostInteraction', (data) => {});

This hook fires after the melee hit interaction.

After Melee Hit Sound (currently not implemented)

Hooks.on('oifWeaponMeleeHitPostSound', (data) => {});

This hook fires after the melee hit sound.


After Melee Throw Animation

Hooks.on('oifWeaponMeleeThrowPostAnimation', (data) => {});

This hook fires after the melee throw animation is played, and before the interaction and sound.

After Melee Throw Interaction

Hooks.on('oifWeaponMeleeThrowPostInteraction', (data) => {});

This hook fires after the melee throw interaction.

After Melee Throw Sound (currently not implemented)

Hooks.on('oifWeaponMeleeThrowPostSound', (data) => {});

This hook fires after the melee throw sound.


After Ranged Preparation

Hooks.on('oifWeaponRangedPostPrepare', (data) => {});

This hook firest after the data that will be used on the ranged animation gets prepared, and before the animation gets played.


After Ranged Animation

Hooks.on('oifWeaponRangedPostPrepare', (data) => {});

This hook fires after the ranged animation is played, and before the interaction and sound.

After Ranged Interaction

Hooks.on('oifWeaponRangedPostInteraction', (data) => {});

This hook fires after the ranged interaction.

After Ranged Sound (currently not implemented)

Hooks.on('oifWeaponRangedPostSound', (data) => {});

This hook fires after the ranged sound.


After Lighting Preparation

Hooks.on('oifItemLightingPostPrepare', (data) => {});

This hook fires after the data that will be used on the lighting automation gets prepared, before it gets applied and before the sound.


After Lighting Light Apply

Hooks.on('oifItemLightingLightPostApply', (data) => {});

This hook fires after the lighting light gets applied.

After Lighting Light Sound (currently not implemented)

Hooks.on('oifItemLightingLightPostSound', (data) => {});

This hook firest after the lighting light sound gets played.


After Lighting Extinguish Apply

Hooks.on('oifItemLightingExtinguishPostApply', (data) => {})

This hook fires after the lighting extinguish gets applied.

After Lighting Extinguish Sound (currently not implemented)

Hooks.on('oifItemLightingExtinguishPostSound', (data) => {})

This hook fires after the lighting extinguish sound gets played.