Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event feature requests #15

Open
alandtse opened this issue Oct 14, 2022 · 4 comments
Open

Event feature requests #15

alandtse opened this issue Oct 14, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@alandtse
Copy link
Contributor

alandtse commented Oct 14, 2022

Just putting up a list to track some event requests I've seen from the ENB modding channel. Will see what I can implement and what has already been done. I've asked the requestors to prioritize it too so will update to an ordered list if i get that info.

  • OnRagdollBegin(ObjectReference akActionRef) <- For detecting Ragdolling
  • OnRagdollFinish(ObjectReference akActionRef)
  • OnTriggerEnterCooldown(ObjectReference akActionRef, Float fCooldown) <- Hard coded re-use cooldown
  • OnTriggerLeaveCooldown(ObjectReference akActionRef, Float fCooldown)
  • OnTriggerEnterActor(ObjectReference akActionRef) <- Triggers but for actors only
  • OnTriggerLeaveActor(ObjectReference akActionRef)
  • OnStateChange(String sInitalState, String sDestinationState) <- Do something between states
  • OnActivationEnd(ObjectReference akActivator, Actor akActionRef) <- When an actor finishes activating something
  • OnMovementEnd(ObjectReference akActionRef) <- When an actor stops moving
  • OnObjectEnabled(ObjectReference Ref) <- Fires when an object is enabled
  • OnObjectDisabled(ObjectReference Ref) <- Fires when an object is disabled
  • OnMount(ObjectReference akActionRef) <- Fires when mounting a Horse
  • OnUndetected(ObjectReference akActionRef) <- Fires when eye crosshair is fully closed
  • OnDetected(ObjectReference akActionRef) <- Fires when eye crosshair starts to open
  • OnArrested(ObjectReference akActionRef) <- Fires when Player gets "You've committed crimes against Skyrim and her people"
  • OnPerkAdded(ObjectReference akActionRef, Perk pPerk) <- Fires when a new perk is added
  • OnPerkRemoved(ObjectReference akActionRef, Perk pPerk) <- Fires when a perk is removed
  • OnHealthFull(ObjectReference akActionRef) <- Fires when health reaches 100%
  • OnHealthPercentage(ObjectReference akActionRef, Int iPercentage) <- Fires when health reaches a certain amount
  • OnCollision(ObjectReference Ref1, ObjectReference Ref2) <- Fires when an object collides with another object
  • OnMagickaPercentage(ObjectReference akActionRef, Int iPercentage) <- Fires when magicka reaches a certain amount
  • OnStaminaPercentage(ObjectReference akActionRef, Int iPercentage) <- Fires when stamina reaches a certain amount

Health looks like a single event could handle it but it may get spammy.

@powerof3 powerof3 added the enhancement New feature or request label Oct 14, 2022
@osmelmc
Copy link

osmelmc commented Oct 31, 2022

Just one suggestion here:

The event suggested to check values like the OnHealthPercentage, OnMagickaPercentage and OnStaminaPercentage. Should come in couples and Registered for a single use.

Something like RegisterForSingleEventActorVariableLowerThan(ObjectReference akActionRef, string asActorVariable, float afValueRef)

RegisterForSingleEventActorVariableHigherThan(ObjectReference akActionRef, string asActorVariable, float afValueRef)

@zax-ftw
Copy link

zax-ftw commented Apr 13, 2023

If I may suggest one more, inspired by Fallout4 events:

Event OnEnterFurniture(Actor akActor) // the actor entering this furniture
Event OnExitFurniture(Actor akActor)

Function RegisterForFurniture...(Form akForm) global native

Doesn't require hooking because vanilla dispatcher exists.

@meatdeath1
Copy link

meatdeath1 commented Aug 7, 2023

Function RegisterActorValueChange(Actor akActor, string akValueName)
Function UnRegisterActorValueChange(Actor akActor, string akValueName)

Event OnActorValueChange(string akValueName, float akOldValue, float akNewValue)

This would be great for tracking certain actor values, which could help a lot of modders. For instance, most UI modders use RegisterForUpdate -> UI.InvokeFloat as a tool to update values on their interface. RegisterForUpdate is laggy by itself, not to mention a bazillion of unnecessary script calls each second. Would be cool if you could add tracking an actor value change in some way. Cheers!

@JamesCPosey
Copy link

Slight modification to ShoutAttack
Function RegisterForShoutAttack(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForShoutAttack(ActiveMagicEffect akActiveEffect) global native

Event OnPlayerShoutAttack(Shout akShout, Int kSpell)
EndEvent

This would be great to check which level of a shout the player uses, since there does not seem to be any other way to determine which level of a shout that the player is using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants