Looking for some LUA tutorial to create a Depth of Field Toggler addon

Highlor3
Highlor3
✭✭✭✭
I like ESO's Depth of Field while in dialogue, but don't like it on the scenery while adventuring.
So, anyone knows a good place to get some tutorials on how to create a "simple" addon like that?
I've been wanting to create this auto-toggle, so it can activate the DoF only during conversations, by auto enabling/disabling it when we enter/leave the dialogue screen.
Edited by Highlor3 on October 19, 2017 5:34AM
[PC-NA] CP 960+
Rodbertus Quercus, Imperial, Dragonknight [EP]
Robert Bethencourt, Breton, Templar [DC]
Karlindah Telvanni, Dunmer, Sorcerer [AD]
Raises-Her-Rear, Argonian, Nightblade [EP]
Limeril Bravewind, Altmer, Warden [AD]
Isilarelen, Dunmer, Dragonknight [EP]
Elindael, Bosmer, Warden [AD]
Hrodberaht Bright-Fame, "Nordguard", Warden [EP]
Ra'Kham, Khajiit, Nightblade [DC]
Brazilia gra-Bagol, Orsimer, Dragonknight [EP]
Nirrah al-Hegathe, Redguard, Necromancer [DC]
Theodora Quercus, Imperial, Templar [DC]
[REDACTED], Redguard, Sorcerer [DC] (Coming soon!)
[PC-EU] No CP
Adaltos Indoril, Dunmer, Templar [EP]
Geralt of Evermore, Breton, Nightblade [DC]
Feainneweedd, Altmer, Sorcerer [AD]
  • Drummerx04
    Drummerx04
    ✭✭✭✭✭
    Highlor3 wrote: »
    I like ESO's Depth of Field while in dialogue, but don't like it on the scenery while adventuring.
    So, anyone knows a good place to get some tutorials on how to create a "simple" addon like that?
    I've been wanting to create this auto-toggle, so it can activate the DoF only during conversations, by auto enabling/disabling it when we enter/leave the dialogue screen.

    A full tutorial would be a bit redundant, the circonian stamina bar tutorial gives the basics for creating an addon. After that you just need to find the specific API calls you are looking for. Specifically you need to know the EVENT types for the thing you are worried about (entering/exiting dialog) and how to actually change the setting. I did a little poking around, and I found this which may help you.

    Events that are probably related to the dialog interactions with this game:
    EVENT_CHATTER_BEGIN (number eventCode, number optionCount)
    EVENT_CHATTER_END (number eventCode)
    

    Function to change base game settings:
    SetSetting(SETTING_TYPE_GRAPHICS, SI_GRAPHICS_OPTIONS_VIDEO_DEPTH_OF_FIELD, string value, number SetOptions setOptions)
    

    Function to figure out what your value string should be
    GetSetting(SETTING_TYPE_GRAPHICS, SI_GRAPHICS_OPTIONS_VIDEO_DEPTH_OF_FIELD)
    

    I pulled most of this up in a few minutes of poking around, so I didn't really fact check everything. If the events I provided are actually correct, then your Addon can be as short as registering two events, where one event is hard coded to turn depth on and the other hard coded to turn it off. Probably < 10 lines of code.
    PC/NA - Nightfighters, Raid Leader and Officer
    Lilith Arujo - DC sorc tank/dps/healer - Dro-m'Athra Destroyer, Gryphon Heart, Grand Warlord
    Lilith Tortorici - DC templar trials healer

    Notable Completions:
    vAS (72k), vMoL HM (160k), vAA HM (135k), vHRC HM, vSO HM (141k), vHoF HM (168k), vCR+3(129k), vDSA 45k, vMA 591k

    Original Addons:
    Lilith's Group Manager
    Lilith's Lazy Hacks - Auto Recharge/Repair
    Bot Scanner 2000
    Lilith's Command History
    Maintained Addons:
    Kill Counter
Sign In or Register to comment.