-
Posts
1477 -
Joined
-
Last visited
Nexus Mods Profile
About dylbill
Profile Fields
-
Country
United States
dylbill's Achievements
-
Here is an example for animation events. Listen for when the staff is equipped, find which hand it's equipped in then register for the appropriate animation event. Also unregister for the event when the staff is unequipped. Here's all the animation events fyi. https://ck.uesp.net/wiki/Animation_Events Event Oninit() RegisterForAnimationEvent(PlayerRef, "MRh_SpellFire_Event") ;for right hand RegisterForAnimationEvent(PlayerRef, "MLh_SpellFire_Event") ;for left hand EndEvent Event OnAnimationEvent(ObjectReference akSource, string asEventName) Debug.MessageBox("akSource = " + akSource + \ "\nEvent = " + asEventName) EndEvent
-
Are you using SKSE? If so you can use my mod Dylbill's Papyrus Functions which includes DbSkseEvents. https://www.nexusmods.com/skyrimspecialedition/mods/65410?tab=posts&jump_to_comment=147667121 Something like this: Enchantment Property StaffEnchFireball Auto weapon property StaffFireball auto Event Oninit() PlayerRef.AddItem(StaffFireball) PlayerRef.EquipItem(StaffFireball) DbSkseEvents.RegisterFormForGlobalEvent("OnActorSpellFireGlobal", Self, StaffFireball, 1) ;compare StaffFireball with 'Source'. Register for when any actor fires a spell from the StaffFireball. DbSkseEvents.RegisterFormForGlobalEvent("OnHitGlobal", Self, StaffEnchFireball, 2) ;compare StaffEnchFireball with 'Source'. Register for when anything is hit with a StaffEnchFireball enchantment. EndEvent Event OnActorSpellFireGlobal(Actor Caster, Form Source, int slot) Debug.MessageBox("Caster = " + Caster.getDisplayName() + " " + Caster + "\nSource = " + Source.GetName() + " " + Source + "\nslot = " + slot) Endevent Event OnHitGlobal(ObjectReference Attacker, ObjectReference Target, Form Source, Ammo akAmmo, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) Debug.MessageBox("Attacker = " + Attacker.getDisplayName() + " " + Attacker + "\nTarget = " + Target.GetDisplayName() + " " + Target + "\nSource = " + \ Source.GetName() + " " + Source + "\nAmmo = " + akAmmo.getName() + " " + akAmmo + "\nProjectile = " + akProjectile.getName() + " " + akProjectile) EndEvent If you're not using skse, it may be possible to use an animation event.
-
This is how I do it in one of my mods. It's not perfect because it won't trigger if a script is causing the player to fast travel, only when the player fast travels from the map menu. This one also listens for the loading menu. Maybe doing something like this in conjunction with OnLocationChange as Sphered suggested will get it done. Requires SKSE. Actor Property pPlayerRef Auto Cell CurrentCell Event OnInit() RegisterforMenu("MapMenu") RegisterForMenu("Loading Menu") EndEvent Event OnMenuOpen(String menuName) if menuName == "MapMenu" CurrentCell = pPlayerRef.GetParentCell() Endif EndEvent Event OnMenuClose(String menuName) Utility.Wait(1) if menuName == "MapMenu" If pPlayerRef.GetParentCell() != CurrentCell SendModEvent("SCC_OnFastTravelEvent") Endif Elseif menuName == "Loading Menu" SendModEvent("SCC_OnLoadMenuExitEvent") Endif EndEvent
-
You can try something like this: Function disableObject(form akBaseObject) ObjectReference ref = Game.FindClosestReferenceOfTypeFromRef(akBaseObject, Game.GetPlayer(), 9000.0) if ref ;reference was found ref.disable() Endif Endfunction
- 1 reply
-
- 1
-
Conditional UI/Swapping files using Papyrus
dylbill replied to theblackpixel's topic in Skyrim's Creation Kit and Modders
Skse has OpenCustomMenu and CloseCustomMenu funtions in UI.psc A lot of menu resources use these, including my mod Extended Vanilla Menus https://www.nexusmods.com/skyrimspecialedition/mods/67946 -
How Do I Identify a Mod?
dylbill replied to Shadeybladey's topic in Skyrim's Creation Kit and Modders
Console Tweaks will work on SLE but the console command ShowScriptForms will only work on SSE cause it requires DbSkseFunctions.psc from my mod Dylbill's Papyrus Functions. Also it will print the info to the console, not log it. -
How Do I Identify a Mod?
dylbill replied to Shadeybladey's topic in Skyrim's Creation Kit and Modders
Actually I thought it would be easier to use this as a console command, so I added the command ShowScriptForms to my mod Console Tweaks which you can find here: https://www.nexusmods.com/skyrimspecialedition/mods/69244 Install the mod, then enter the console command "ShowScriptForms _de_woodharvestscript" to display all forms with the script attached and their mod origins -
How Do I Identify a Mod?
dylbill replied to Shadeybladey's topic in Skyrim's Creation Kit and Modders
Are you able to compile and run scripts in your game? If so you can use my mod Dylbills Papyrus Functions: https://www.nexusmods.com/skyrimspecialedition/mods/65410?tab=description which has 2 functions that will help. GetAllFormsWithScriptAttached and GetModOriginName Here's an example script that will log all forms with the _de_woodharvestscript script attached Event OnInit() LogScriptForms("_de_woodharvestscript") EndEvent Function LogScriptForms(string akScriptName) Form[] akForms = DbSkseFunctions.GetAllFormsWithScriptAttached(akScriptName) Debug.trace("printing " + akForms.length + " forms for " + akScriptName) int i = 0 while i < akForms.length if akForms[i] Debug.trace("\n" + i + ": ") ObjectReference ref = akForms[i] as ObjectReference if ref Form bas = ref.GetBaseObject() Debug.trace("refr: " + ref + " mod: " + DbMiscFunctions.GetModOriginName(ref)) Debug.trace("base: " + bas + " mod: " + DbMiscFunctions.GetModOriginName(bas)) else Debug.trace("form: " + akForms[i] + " mod: " + DbMiscFunctions.GetModOriginName(akForms[i])) Endif EndIf i += 1 EndWhile Debug.Notification("done logging") EndFunction This of course is assuming the mod that the script comes from is active in your game -
[Skyrim SE] Custom MapMarker Icon
dylbill replied to Tiziano74's topic in Skyrim's Creation Kit and Modders
You can use the mod CoMap: https://www.nexusmods.com/skyrimspecialedition/mods/56123- 1 reply
-
- 1
-
You can use my mod Dylbills Papyrus Functions which includes DbSkseEvents. https://www.nexusmods.com/skyrimspecialedition/mods/65410 Example, assuming your script is attached to a form. Event OnInit() DbSkseEvents.RegisterFormForGlobalEvent("OnItemCraftedGlobal", self) EndEvent ;must re register on load game Event OnLoadGameGlobal() DbSkseEvents.RegisterFormForGlobalEvent("OnItemCraftedGlobal", self) EndEvent Event OnItemCraftedGlobal(Form itemCrafted, ObjectReference benchRef, int count, int workBenchType, string benchSkill) if benchSkill == "enchanting" Debug.MessageBox(itemCrafted.GetName() + " enchanted") Endif EndEvent
-
Adding skill expirience scripting help
dylbill replied to Gplayerholyknight's topic in Skyrim's Creation Kit and Modders
Put in debug.messagebox or notification to see when the script is firing. You also have it set so it only works if getting hit by the player. -
Short answer, yes, this is possible. I'd need more specifics though to be able to give better advice though. One trick I like to do with magic effects is to put two scripts on the magic effect. One that extends ActiveMagicEffect and one that extends MagicEffect. ActiveMagicEffect is a new script object that is created every time the effect starts while the MagicEffect is seperate and sits on the base object. It's similar to say having 2 scripts on a misc object. One that extends MiscObject and one that extends ObjectReference. Example, 2 scripts attached to the magic effect form in the creation kit. First script: scriptname TM_MagicEffectScript extends MagicEffect Function SomeFunction() EndFunction Second script: Scriptname TM_ActiveMagicEffectScript extends ActiveMagicEffect Event OnEffectStart(Actor akTarget, Actor akCaster) ;get the TM_MagicEffectScript attached to this activeMagicEffect's baseObject (which is a magicEffect form) TM_MagicEffectScript scriptRef = GetBaseObject() as TM_MagicEffectScript ;if the TM_MagicEffectScript ref was found if scriptRef scriptRef.SomeFunction() Endif EndEvent
-
How to develop custom UI window?
dylbill replied to Freemort's topic in Skyrim's Creation Kit and Modders
Probably ActionScript 2.0 as that's what Skyrim uses natively. If you have Adobe Flash cs4 or cs6 I would use that. Otherwise you could theoretically do it with an skse plugin. The wheeler mod does this and source is provided on github. https://www.nexusmods.com/skyrimspecialedition/mods/97345- 1 reply
-
- 1