Jump to content

Search the Community

Showing results for tags 'handlers'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community
  • Skyrim
  • Fallout 4
  • Oblivion
  • Fallout 3 / New Vegas
  • The Sims 4
  • The Sims 3
  • Other Games
  • General Discussions
  • Skyrim Ladies's Screenshots
  • NSFW Skyrim & Fallout's NSFW Softcore Area
  • NSFW Skyrim & Fallout's NSFW Hardcore Area
  • The Spooky Supernatural's The Spooky Supernatural Screenies
  • The Lore(ish) Club's Lore(ish) Screenshots
  • The Lore(ish) Club's Lore(ish) Discussion
  • The Lore(ish) Club's Lore(ish) Stories
  • Quality Lovers Club's 3D Artworks & Videos
  • Quality Lovers Club's 2D Artworks & Videos
  • Quality Lovers Club's Music & sounds works
  • LGBT Community's General Discussion
  • LGBT Community's Uhh... Stuff.
  • LGBT Community's Sexy Gaming Girls
  • LGBT Community's Sexy Gaming Guys
  • LGBT Community's Sexy Gaming Characters (Everything In-between)
  • LGBT Community's Nothing to see here...
  • Club 34's Discussion
  • Club 34's Gallery
  • Misfit Toyz's Club Rules
  • Misfit Toyz's Discussion
  • Misfit Toyz's Ren'py Games
  • Misfit Toyz's Unreal Engine Games
  • Little Ladies's Club Rules
  • Little Ladies's Discussion
  • Little Ladies's Anime and Manga
  • Little Ladies's Gallery
  • Communauté Francophone's Galleries d'images
  • Communauté Francophone's Taverne
  • Communauté Francophone's Général
  • Communauté Francophone's Support Technique
  • BDSM CLUB's Question asking about BDSM
  • BDSM CLUB's Member Introduction & Questions for Specific Members
  • BDSM CLUB's General Discussion
  • BDSM CLUB's Lessons about BDSM
  • SIMS 4 CLUB's General Discussions
  • Starbound Club's Mods Ideas
  • Starbound Club's General Discussion
  • Pregnancy Club's Topics
  • BULLET CLUB's NJPW - Spot
  • BULLET CLUB's WWE - Spot
  • BULLET CLUB's ROH - Spot
  • BULLET CLUB's iMPACT - Spot
  • BULLET CLUB's Lucha Underground - Spot
  • The Erectoral Collage's General Discussion
  • The Erectoral Collage's Modding
  • The Erectoral Collage's MMOs
  • The Erectoral Collage's Art
  • The Erectoral Collage's Screenshots/Machinima
  • Beast Fucker's Art
  • Beast Fucker's Beast Fucking Pictures
  • Fetish Club's Name your fetish!
  • Fetish Club's Screenshots
  • Wasteland Wonders's General Area
  • LoversLab Furries's Chat
  • Music Lovers Club's General Discussion Thread
  • Music Lovers Club's The 70s
  • Music Lovers Club's The 80s
  • Music Lovers Club's The 90s
  • Music Lovers Club's The 2Ks
  • Music Lovers Club's The 2010s
  • Music Lovers Club's Older Music Area
  • Music Lovers Club's Scores
  • Futanari Paradise's Forum
  • BodySlide Lovers's Club forum
  • Fantasy Factory Deva's's Sim Of The Day
  • Amber's Play Room's Talk about stuff
  • Amber's Play Room's Request Box
  • Amber's Play Room's C:/Program Files/BethesdaSoftworks
  • Amber's Play Room's C:/Program Files/Steam
  • Amber's Play Room's Skill Set: Mercs wanted!
  • Amber's Play Room's Raul's Noodles
  • lore-friendly RP (18+)'s OC's (non-adult)
  • lore-friendly RP (18+)'s OC's (adult)
  • lore-friendly RP (18+)'s RP's (Adult and non-adult)
  • The Dark Humor Club's The Dark Joke Thread
  • The Dark Humor Club's The Meme Thread
  • The Dark Humor Club's Our Black Souls
  • The Dark Humor Club's The World Is Not Always So Dark
  • Alternative and proud's Introductions
  • Alternative and proud's Roleplay
  • Alternative and proud's Gallary
  • Paradox Grand Strategists's Crusader Kings 2
  • Vampire Succubus Playstyle Club's Rules
  • Vampire Succubus Playstyle Club's Welcome
  • Vampire Succubus Playstyle Club's This is what we are doing here
  • M/FF, F/MM or three way sex lovers's Pictures
  • M/FF, F/MM or three way sex lovers's Stories and fantasies
  • Hardcore Hentai's Topics
  • Comunidad de Habla Hispana de Loverslab's Enlaces
  • Comunidad de Habla Hispana de Loverslab's Pedidos
  • Comunidad de Habla Hispana de Loverslab's Comentarios
  • Comunidad de Habla Hispana de Loverslab's Utilidades
  • Comunidad de Habla Hispana de Loverslab's Capturas-Screenshots
  • Comunidad de Habla Hispana de Loverslab's ¿Quién soy?
  • Comunidad de Habla Hispana de Loverslab's Guías y Tutoriales
  • Sims XXXX Stories's Organic Stories
  • Sims XXXX Stories's Taboo Stories - Brother and Sister
  • Sims XXXX Stories's Taboo Stories - Other Stories
  • Sims XXXX Stories's Self Help Stories
  • Sims XXXX Stories's Pictures
  • Sims XXXX Stories's Taboo Stories - Mother and Son
  • Belgique francophone : Wallonie's Bienvenue à tout les nouveaux membres!
  • Belgique francophone : Wallonie's Informations
  • Uastheone's Looking for adult codec in the process.
  • Uastheone's Intel 2020 inbounds
  • Uastheone's Have a excellent year of the RAT
  • Uastheone's Still Rocking 2020
  • Uastheone's Nature
  • otakus of loverslab's Anime discussions
  • otakus of loverslab's Adult anime & Hentai discussions
  • otakus of loverslab's None-adult gaming discussions
  • otakus of loverslab's Adult games & hentai games
  • otakus of loverslab's Manga none-hentai only
  • otakus of loverslab's Hentai manga & doujinshi
  • otakus of loverslab's Mods requests
  • otakus of loverslab's Release dates of games,anime & manga including adult games,hentai games,hentai,hentai manga,doujinshi
  • Storytellers Club's Guides and Tutorials
  • Storytellers Club's Skyrim Stories
  • Storytellers Club's General Discussions
  • Workshop Skyrim's Before installing skyrim 32bit
  • Workshop Skyrim's Basic Tools to install
  • Workshop Skyrim's Internal Tools for skyrim
  • Workshop Skyrim's Modding tools
  • Workshop Skyrim's problems/solutions
  • Skyrim's NPC's, Followers, and Mysteries's How to make the game more dynamic
  • Skyrim's NPC's, Followers, and Mysteries's Holidays
  • Skyrim's NPC's, Followers, and Mysteries's Milfs. and Gilfs of Skyrim
  • Skyrim's NPC's, Followers, and Mysteries's Stories
  • Skyrim's NPC's, Followers, and Mysteries's Followers
  • Skyrim's NPC's, Followers, and Mysteries's NPCS
  • Skyrim's NPC's, Followers, and Mysteries's Mysteries
  • Skyrim's NPC's, Followers, and Mysteries's Bandits
  • Footfetish Club's Topics
  • Skyrim Adventures Club's General
  • Skyrim Adventures Club's Rules
  • Saika Skyrim's Skyrim Mods
  • Saika Skyrim's Skyrim SE Mods
  • Saika Skyrim's ENB
  • Saika Skyrim's Skyrim LL
  • The Pink Place's Culb business
  • The Pink Place's Support Chat
  • The Pink Place's Off Topic
  • The Pink Place's Adult section
  • Pussy Saga Club's Topics
  • Wicked Sims's Animations/Mods
  • Wicked Sims's Wicked Stories
  • Wicked Sims's Welcome Wagon
  • Busty Ladies Lovers Club's General
  • Inflation / Weight Gain Fans's Fallout 4 WG/INF screenshots
  • Inflation / Weight Gain Fans's Skyrim WG/INF screenshots
  • Fallout 4 Player Character's My FO4 Char
  • The Mashup Club's Discussions
  • The Mashup Club's Bodyslide/Outfit Studio Tutorials
  • The Mashup Club's Armor Mashups
  • Incest Family's Topics
  • Vaginal Play's vaginal
  • TK17's General
  • TK17's Help
  • TK17's Game
  • TK17's Media
  • TK17's International
  • Cuckold Fantasies's Cuckold ideas
  • Cuckold Fantasies's General Discussion
  • Skyrim Bondage & Slavery's Chat
  • Femboy Lovers's Topics
  • Darkwood Modding Hut's Topics
  • Sims 4 Strip Clubs's Clothes
  • Sims 4 Strip Clubs's Animations
  • Sims 4 Strip Clubs's Objects
  • Sims 4 Strip Clubs's Lots
  • Sims 4 Strip Clubs's Offtopic
  • Skyrim : My mods and variations's Voices
  • Skyrim : My mods and variations's Video animations
  • Skyrim : My mods and variations's Update my Blog : News
  • Skyrim : My mods and variations's Tutorila TES5Edit
  • Skyrim : My mods and variations's Tutorial Nifskope
  • Anuketh Mods's Topics
  • Anuketh Mods's Soft NSFW
  • Anuketh Mods's Normal NSFW
  • Anuketh Mods's Resources
  • San's Lesbian Corner's Hentai! Yuri!
  • San's Lesbian Corner's Lesbian pr0n
  • San's Lesbian Corner's Fantas..oh...ooh f*uck thats hawt~
  • San's Lesbian Corner's Coffee Table
  • San's Lesbian Corner's !!>>RULES<<!! and some ( . Y . )
  • Skyrim Male Appreciation Society.'s General Discussion
  • Conan Exiles 18+'s Topics

Categories

  • Skyrim
    • SexLab Framework LE
    • Adult Mods
    • Regular Mods
  • Skyrim: Special Edition
    • SexLab Framework SE
    • Adult Mods
    • Regular Mods
  • Fallout 4
    • Advanced Animation Framework
    • Adult Mods
    • Regular Mods
  • Oblivion
  • Fallout 3 / New Vegas
  • The Sims 4
  • The Sims 3
  • Other
  • Skyrim Ladies's Files
  • Misfit Toyz's Files - TES & Fallout
  • Misfit Toyz's Mods - Other
  • Little Ladies's Download
  • Communauté Francophone's Traductions (Mods)
  • Pregnancy Club's Files
  • Fetish Club's Ideas & Mods!
  • LoversLab Furries's Club Mods
  • BodySlide Lovers's Share your presets
  • Amber's Play Room's [FILES]
  • Hardcore Hentai's Files
  • Comunidad de Habla Hispana de Loverslab's Archivos
  • Uastheone's Files
  • Footfetish Club's Files
  • The Skyrim Priestess of Love's My character Lilu
  • Incest Family's Files
  • TK17's Utillities
  • TK17's Models
  • TK17's Poses
  • TK17's Addons
  • TK17's Textures
  • Cuckold Fantasies's Cuckold Mods
  • Skyrim Bondage & Slavery's Mods
  • Femboy Lovers's Gallery
  • V89's Niagara_Violet89
  • Skyrim Male Appreciation Society.'s Downloads

Blogs

There are no results to display.

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Twitter


Discord


Skype


Instagram


Snapchat


Kik


Website


Location


Interests


Bio

Found 1 result

  1. Req knowledge: UDFs, blocktypes, forms and refs, advanced use: arrays Also required: NVSE 4.6+ 1. Why? 2. Standard events, handling them, parameters. 3. Using the standard parameters as filters 4. Removing event handlers 5. NVSE events 6. User-defined events 1. Why? As a modder there are certain things that you know aren’t impossible, but you’d rather not do them because it causes conflicts and other problems. How would you go about: altering a ‘personal hygiene’ variable every time someone activates a sink, tub or toilet? playing a woozy double vision image space modifier every time the player consumes booze? playing a wolf whistle sound every time an actor unequips their clothing? playing the theme from The Good, the Bad and the Ugly every time you equip a revolver? setting a chance of a booby trap materializing and going off if certain locked doors are opened by the player? monitoring changes in an actor’s AI packages, so that you can force them to stick to the one they’re supposed to follow? marking each item that is dropped from player inventory in a particular cell for deletion, to avoid savegame bloat, or to mimic things getting picked up because you’re not around to watch over them? having people say custom dialog whenever they hit other people with a particular weapon or weapon type? The only way I can see so far of doing any of those is attaching an object script to an item, with a one-frame blocktype like OnActivate, On(Actor)Equip, OnOpen, OnPackageChange, OnDrop or OnHit(With) signaling that these events happen so you can do something about it. The problem there is you can’t just go around attaching object scripts to vanilla forms without inviting conflicts with other mods changing anything about those forms, and creating a need for separate patch mods resolving those conflicts. FNV already has a significantly reduced maximum number of mods that can be loaded compared to other Beth games, and if a large portion of those are simple patches, that’s just a waste. Not to mention you have to make those patches, and keep repeating to people reporting problems to install them, in the right order. Another issue is that you’ll usually need to attach the same script to a lot of objects if you want it to work correctly. This means all the base forms for sinks, toilets & tubs for your hygiene mod, or all the revolvers if you wanted to have people say "Yippee-ki-yay, motherfucker" if they hit others with revolvers. And what about mod-added items that could just as easily apply? Would you like to make a patch for each and every revolver mod out there? Not me. A lot of times your script will also fire when it’s not needed: you want your item cleanup script to only work on some actors, or only want to have a chance of booby traps on some door refs while other doors sharing the same base form should be safe. The only way of detecting if the necessary conditions apply is by already running the script, and already inviting the conflicts by simply having it on the form. These headaches are enough to make you want to skip adding some cool functionality altogether sometimes. What if... - we could be notified of anything being activated, opened, dropped, hit, consumed etc without attaching scripts to vanilla forms? - we could filter being notified according to what is being activated or who’s doing the activating, what is being opened or who’s doing the opening, etc? That’d be sweet, huh? It’s exactly what event handlers do. 2. Standard events, handling them, parameters. Event handlers are UDFs that you register with NVSE to be called whenever their associated event happens. These handlers are then set for the rest of the game session; even if you load a different save, they are still valid until you actually restart the game. If I want to be notified whenever anything whatsoever is activated or dropped, for instance, I register an event handler with SetEventHandler every time the game is loaded: SetEventHandler "OnActivate" myActivateEventHandler SetEventHandler "OnDrop" myDropEventHandler and then every time something is about to be activated or dropped, NVSE will call your event handler before proceeding with the activation or dropping. Remember that: certain functions that would work in a regular block will not in their equivalent event handler, because what's about to happen hasn't yet. Using the GetActionRef function in an "OnActivate" handler will probably not return anything - luckily you'll be provided with the same intel via the handler's parameters. In the case of the “OnDrop” event, NVSE will pass along the dropper as first parameter, and the dropped item as second. So your myDropEventHandler needs to be able to capture them, in that order: Scn myDropEventHandler ref rDropper ref rDropped Begin Function {rDropper, rDropped} … End If you don’t have those variables ready to capture the parameters, nvse will report an error. In the case of the “OnActivate” event, you need to remember that the terminology with the OnActivate script block and the activate function in vanilla can be confusing. Light switches, sinks and triggers are found under “activators” in the geck although they always seem to be activated by an actor. While it looks like an actor activates something like a container ref, when you force it via script it’s actually the container ref doing the activating: rContainerRef.activate rActorRef The “OnActivate” event, then, first expects the activator, the thing that looks to be activated, and then the thing or actor that seems to activate it, which you’d be able to retrieve from a regular OnActivate script block with GetActionRef. So let’s put it this way: Scn myActivateEventHandler Ref rActivator ref rActionRef Begin Function {rActivator, rActionRef} … End Most of the standard event handlers, the ones that correspond with regular blocktypes, come with standard parameters like that. They will always be sent, be ready to receive them. (The params don’t have to be called that, of course, the names are just meant to distinguish what they are.) 3. Using the standard parameters as filters These handler parameters can be used as filters, by adding them as parameters to the SetEventHandler function when you register the handler. This makes it so that your event handler is only called in when it’s needed, and you should obviously use such filters as much as possible. Also make sure that whatever they filter on is actually a valid form, otherwise the filtering will bug out and it'll be as if no filter was applied. Because you may choose to only use one filter, or none at all, you need to specifically state on which parameter you’re filtering, the first or the second, and couple them with double colons (like you do with ar_Map): SetEventHandler "OnDrop" myEventHandler "first"::playerref "second"::myCoolgunForm In OBSE, the “first” was called “ref”, and the “second” was called “object”, and this is still possible in NVSE: SetEventHandler "OnDrop" myEventHandler "ref"::playerref "object"::myCoolgunForm However, unlike OBSE, NVSE allows either of those filters to refer to a ref, base form, or even a formlist (!) containing refs and/or base forms and/or more formlists, when applicable. So using “first” and “second” is much less confusing in that regard. So, give or take some scripting in the actual event handler scripts, the problems from the introduction should be a lot less problematic with the following events and filters set: 1. SetEventHandler "OnActivate" myEventHandler "first"::formlistofallsinkforms "second"::playerref 2. SetEventHandler "OnMagicEffectHit" myEventhandler "first"::playerref "second"::ChemIncCHAlcohol 3. SetEventHandler "OnActorUnequip" myEventhandler ; check what’s unequipped with the handler’s parameter 4. SetEventHandler "OnActorEquip" myEventhandler ; check what’s equipped with the handler’s parameter 5. SetEventHandler "OnOpen" myEventHandler "first"::formlistofdoorrefs "second"::playerref 6. SetEventHandler "OnPackageChange" myEventHandler "first"::rActor "second"::rPackage 7. SetEventHandler "OnDrop" myEventHandler "first"::playerref ; check the cell and the dropped item in the handler 8. SetEventHandler "OnHitWith" myEventHandler "second"::myCoolGunorListofGuns For the package monitoring problem, it’s also entirely possible to monitor packages starting, changing and ending in one and the same handler: SetEventHandler "OnPackageStart" myEventHandler "first"::rActor "second"::rPackage SetEventHandler "OnPackageChange" myEventHandler "first"::rActor "second"::rPackage SetEventHandler "OnPackageDone" myEventHandler "first"::rActor "second"::rPackage In this case you can use the GetCurrentEventName function to figure out what event has called your handler: Scn myEventHandler Ref rActor ref rPackage string_var sv_event Begin Function {rActor, rPackage} Let sv_event := GetCurrentEventName if eval sv_event == "OnPackageStart" ; do something elseif eval sv_event == "OnPackageChange" ; do something else endif End 4. Removing event handlers It’s entirely possible that you provide certain settings in your mod that cause an event to no longer apply. Also, event handlers are still valid if you re-load a different save but not re-start the game, so you want to build in some safety by removing a handler if, for instance, that different save hasn't gone through some init yet that the handling needs. To remove a handler you use RemoveEventHandler, with the same syntax as the one you used when you set it: RemoveEventHandler "OnActivate" myEventHandler "first"::rActivator "second"::rActionRef The above will remove the event handler being called when those filters apply. If those are the only ones you set in the first place, you might as well skip the filters: RemoveEventHandler "OnActivate" myEventHandler So yes, you can set and remove an event handler being called under some filters and not others. 5. NVSE events Aside from events related to vanilla blocktypes, you can also register handlers to be called when certain meta-game events happen. This is especially of use for mods that write some type of co-save files etc. (After testing, it seems this is for NVSE plugins only.) 6. User-defined events As if all of that wasn’t cool enough, you can fire off custom events that other people can register to in the same way as they would a standard one, and receive information that you send along with it. This is more naturally of use to modders working on some type of general functionality, wishing to let other modders know that something happened that is of note and non-continuous, something that can classify as an ‘event’. Perhaps you’ve overhauled sneaking and wish to advertise that according to your sneaking mod, the player’s been detected or has successfully hid, whether or not vanilla functions agree. Perhaps your mod needs to go through a series of init scripts before it’s functional and you wish to let dependent mods know that yours is ready for action when it’s done. Perhaps you want your inventory sorter to not only notify others that sorting took place, but also send along information on where everything ended up. Perhaps even you’ve been slaving over a naughty mod that monitors naughty things happening until one of the naughty people involved encounters some type of climactic event and you wish other naughty mods to know this so they can do cool stuff like play appropriate sounds and what not. In each of those cases, all you really need to do is dispatch an event with the DispatchEvent function, which should at least be followed by an event name, optionally a stringmap with intel, and optionally another string overriding the default sender name: DispatchEvent "eventName":string args:stringmap sender:string DispatchEvent "SomeEventName" Array_var ar_mystringmap ; populate ar_mystringmap DispatchEvent "SomeEventName", ar_mystringmap DispatchEvent "SomeEventName", ar_mystringmap, "somestring" And the mods wishing to register a handler to it will do it as normal, with the following limitations: - because there are no standard parameters to use, you can’t use filters when setting handlers for custom events - the only parameter that the handler UDF needs and has to have is an array var that can capture the stringmap that’s always received, even if none was dispatched: SetEventHandler "SomeEventName" myEventHandler Scn MyEventHandler Array_var args Begin Function {args} … End If no stringmap was dispatched, it’ll only contain the 2 standard elements: [eventName] == "SomeEventName" [eventSender] == "SomeSenderString" (usually == "DispatchingMod.esp") The dispatcher can determine “SomeSenderString” by explicitly adding the third optional parameter in the DispatchEvent line. If it’s left blank it’ll be the dispatching mod’s name. If a stringmap was dispatched, the standard elements are added to it. That’s it. Go forward and modify.
×
×
  • Create New...