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

[Suggestion] Author Control #1

Open
BellCubeDev opened this issue Feb 13, 2023 · 0 comments
Open

[Suggestion] Author Control #1

BellCubeDev opened this issue Feb 13, 2023 · 0 comments

Comments

@BellCubeDev
Copy link

BellCubeDev commented Feb 13, 2023

Now that Rich Presence is going strong, I'd love to see additional control for mod authors. Some ideas:

JSON or INI File

To control presence under different conditions. Loaded like a BSA.

Examples

; This use case works well since the player is trapped for the Clockwork questline

; EDID~STAGE/RANGE
[CLWStory01Quest~20-999]
icon=Pass
explore=Traversing the Velothi Mountain Tunnels

[CLWStory02Quest~10-999]
icon=SolitudeCastle
explore=Trapped in Clockwork Castle
; Cell/Location
[RiftenThievesGuildHeadquarters]
lockpicking=Training Lockpicking in {location}

Papyrus API

To let us override presence at will

Example

Actor property PlayerREF  auto

event onActivate(ObjectReference akActionRef)
    registerForAnimationEvent(PlayerREF, "IdleFurnitureStart")
    registerForAnimationEvent(PlayerREF, "IdleFurnitureExit")
endEvent

event onAnimationEvent(ObjectReference akSource, string asEventName)
    if akSource != PlayerREF
        return
    endIf

    unregisterForAnimationEvent(PlayerREF, asEventName)

    If asEventName == "IdleFurnitureStart"
        if !RichPreaence.isIconSet() && !RichPreaence.isTextSet()
            RichPresence.SetIcon("camp")
            RichPresence.SetText("Fishing {relative} {location}") ; e.g. "Fishing near Riverwood"
        endIf

    elseIf asEventName == "IdleFurnitureExit"
        RichPresence.ClearIcon()
        RichPresence.ClearText()

    EndIf
EndEvent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant