BigKevSexyMan Posted December 6, 2012 Share Posted December 6, 2012 (edited) Yeah, I'm currently doing a shield enchantments mod, and this was the first problem I came across. I guess I could show you my script and method for implementing the "ISBlocking" condition via a script in a magic effect that will translate across disenchanting and enchanting. First thing you'll need is an initializer magic effect. You'll have no effects or anything. This initializer is of contant effect, self, and is a script archetype. Now, add this script to the initializer: Scriptname _BKSM_ShieldBlockEffect extends activemagiceffect String AnimationEnter = "blockStartOut" String AnimationExit = "blockStop" SPELL Property AbilityAdded Auto Event OnAnimationEvent(ObjectReference akSource, string asEventName) if (asEventName == AnimationEnter) Debug.Notification("Spell Casted") AbilityAdded.Cast(akSource, akSource ) endif if (asEventName == AnimationExit) Debug.Notification("Spell Removed") (akSource as Actor).DispelSpell(AbilityAdded) akSource.InterruptCast() endif EndEvent Event OnEffectStart(Actor akTarget, Actor akCaster) RegisterForAnimationEvent(akTarget, AnimationEnter) RegisterForAnimationEvent(akTarget, AnimationExit) Debug.Notification("effect registered") EndEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) UnregisterForAnimationEvent(akTarget, AnimationEnter) UnregisterForAnimationEvent(akTarget, AnimationExit) Debug.Notification("effect unregistered") EndEvent Next, make a Spell that essentially casts the ward on the magnitude you want. Next, go back to your initializer open the script properties. Select the ward spell you just made. Finally, make the enchantment and give it the initializer magic effect. Edited December 6, 2012 by BigKevSexyMan Link to comment Share on other sites More sharing options...
FJMS1988 Posted December 7, 2012 Author Share Posted December 7, 2012 I have written the script but the problem remains and I really don't know where it comes from. Anyway I attach here the file if you want to check it please. The Shield is called "ArmorGlassShieldSpellBreaker", the Enchantment is "DA13SpellBreakerEnchNew", the Magic Effect is "DA13SpellbreakerwardEffectNew", and the Spell I have written for the Magic Effect is "SpellBreakerWard". The shield is placed on Dragonsreach, near the bed where Farengar sleeps, and it is a Glass shield. You will find probably something in spanish, this is because I am spanish and it is by the moment the language I am using with the Creation Kit (if I fix this problem I will probably upload a mod and I will make an english version too). Link to comment Share on other sites More sharing options...
Dart98Rock Posted December 7, 2012 Share Posted December 7, 2012 I recreated it, and tried your .esp file to no avail. I messed with how it's cast, renaming, different properties in the condition window nothing helped. What BigKevSexyMan said makes sense, that condition isn't transferring over with the enchantment. From what little I know about scripting, his script looks good, but still didn't change the problem. I am unable at the moment to mess with the scripts, every time I tried to add the script I got CTD. The only thing I can think of is, at least for the time being, put the enchantment on the shield you want via the Creation Kit, and just keep that shield. I will keep messing with it, and hopefully some random thing I tweak will fix it, or BigKevSexyMan might be able to give you a better answer then mine. Link to comment Share on other sites More sharing options...
BigKevSexyMan Posted December 7, 2012 Share Posted December 7, 2012 The script you were using wasn't included in that .rar. I'm assuming that you were using my script there though. But there's a couple crucial things you have to do on your end. 1) The magic effect that you are putting under your enchantments must have NO VISUAL EFFECTS. It shouldn't have any sounds in it, and it definitely shouldn't modify any values(Change Effect Archetype to "Script"). The purpose of the magic effect is to simply cast the spell you created when the user raises his shield. It's the spell that will give you the visual effects and stats that you desire. Also, recopy my script. I noticed a small little bug in it and I edited it. So, just in case you copied the wrong script, I want you to recopy the correct version. So, the order of association that you'll be following goes like this: Armor -> Enchantment -> Initializer Magic Effect -> Casting Script -> Ward Spell -> Ward Magic effect Link to comment Share on other sites More sharing options...
FJMS1988 Posted December 7, 2012 Author Share Posted December 7, 2012 Ok, the Initializer Magic Effect has now no visual effects, the casting script has a spell with the SpellBreaker Magic Effect, but noy there is no animation, even when I block... the spell is casted when I block but there are no visual effects. Link to comment Share on other sites More sharing options...
BigKevSexyMan Posted December 7, 2012 Share Posted December 7, 2012 Does the spell have any visual effects? Also, you made sure to double click the script and give it the spell you desire, right? One more thing, while you are blocking, open up your powers menu and see if the Spell Breaker Magic Effect is there(assuming you don't have "hide in ui" selected) Link to comment Share on other sites More sharing options...
blazie151 Posted January 7, 2013 Share Posted January 7, 2013 Found your problem while I was also recreating the spell breaker. I found out something interesting; whenever you apply a condition to an enchantment, it only affects items pre-made in the creation with that enchantment. Once in game, the enchanting process only applies the magic effect to an item, not the full blown enchantment with conditions, so the effect effectively loses its requirements. This is what's happening. The spellbreaker ward magic effect is applied to the shield instead of the enchantment where the conditions are, so it becomes a permanent effect instead of properly toggling. Top it off, the magic effect conditions only apply on equip, so if you added isblocking to it, it would only work if the character was blocking when they equipped the item, and would not toggle when blocking. I'm currently trying to find a work-around, like I did with the Harkon's Sword enchantment, and Valdr's Lucky Dagger. My mod is on this site if you want to check it out and look at how I made some of the enchantments actually work properly. All formIDs modified begin with "unlock" so you can peer through it pretty quick. I'll figure out a workaround for this spellbreaker enchantment soon and it'll be working too. Link to comment Share on other sites More sharing options...
blazie151 Posted January 7, 2013 Share Posted January 7, 2013 (edited) I have the spellbreaker enchantment working properly in my mod. You can download it and get the desired effect you wanted. it was a bit of a pain to get going, really had to think out of the box on that one. Also, I am not using a script to make it work properly. What I did was make an ability that applied the ward while the player is blocking, then activated and deactivated the ability with a perk that was tied to the magic effect. For some reason the ability wouldn't apply to the player on the equip ability section while editing a magic effect while the casting is concentration and self, but the perk section would work fine. Interestingly, while I was making the Valdr's lucky dagger enchantment, I noticed that the equip ability section works but not the perk section when the casting type is fire and forget plus target. Ps, sry for the double post, iPhone doesn't have an edit button on this forum for some reason. It also didn't show me page 2, so when I made my first post I disnt realize you guys got a script going. Personally, I don't like using scripts very often as it makes mods harder to install and uninstall for users that aren't using a mod manager. Edited January 7, 2013 by blazie151 Link to comment Share on other sites More sharing options...
NexDavey Posted March 14, 2014 Share Posted March 14, 2014 It would be cool if you could add the enchantment to a two handed sword when you block Link to comment Share on other sites More sharing options...
ghosu Posted March 14, 2014 Share Posted March 14, 2014 It would be cool if you could add the enchantment to a two handed sword when you blockhttp://www.nexusmods.com/skyrim/mods/48080/? Link to comment Share on other sites More sharing options...
Recommended Posts