Jump to content

[CK help?] "enchantment conditions" don't stick when encha


Recommended Posts

I need some help solving an enchantment issue. Creating one that uses conditions specifically.

 

I was working on the Spellbreaker enchantment and trying to make it into an enchantment that works on regular armor/shields/etc...

i.e. You can use it to enchant your armor or shields at an enchantment workbench. (so far, I can see why no-one has done this yet)

 

The only problem is that the 'conditions' for the enchantments don't apply after you enchant an item (in-game) with the effect.

- If I set the "isblocking" condition to 1, the enchantment/effect is always on.

- If I set the "isblocking" condition to 0, the enchantment/effect is always off.

http://i.imgur.com/k7Rix.jpg

 

 

 

Also, I tried adding the "isblocking" condition to the magic effect instead of the enchantment, but it does the same thing mentioned above.

 

So what i'm guessing is that, for some reason, after an item has been enchanted with an effect (in game), the conditions for the enchantment go out the window.

And as far as I can tell, this is the only thing preventing making Spellbreaker "disenchantable" and having it work properly.

 

SO: Does anyone know a way around this? or how to fix it?

Or is this just one of those quirks in the game and is not possible?

 

***SIDE NOTE***

 

if you apply the spellbreaker enchantment to any other item using the CK, (go to 'Enchanting' in the object's menu, and select "DA13SpellBreakerEnch") it works fine. There are no scripts, quests, etc. attached to the shield that would effect the enchantment; or vice-versa.

 

I also did a quick look-through of the CK wiki on scripting and didn't see an "isblocking" script or something along those lines I could use. - maybe I missed something, but I couldn't find anything useful.

Link to comment
Share on other sites

Without looking at this through the CK I would suggest creating an additional effect and a spell.

Lets call your current effect BlockEffect now the two new ones would be BlockSpellInit and BlockSpell.

Once you have created both the two new items assign BlockEffect to BlockSpell and assign BlockSpellInit to the

enchantment. Now in the BlockEffectInit form set it to be Script type and add a new script. Then add something similar

to this

 

Spell property BlockSpell auto ;Assign your BlockSpell through the properties to this

Event OnEffectStart(Actor akTarget, Actor akCaster)

if !(akTarget == Game.getPlayer())
	return
endif

if (GetAnimationVariableInt("iBlockState") == 1) ;This checks the animation state of your character
	BlockSpell.Cast(Game.getPlayer()) ;If you are blocking then the BlockSpell is cast.
endif
EndEvent

 

I used this Page for the 'GetAnimationVariableInt Function.

Like I said I cant test this myself but it should be a start at least.

Link to comment
Share on other sites

Thanks for that! I'll look into it.

I was honestly hoping to avoid scripting. But it was probably unavoidable anyways. Steam's workshop got funky on me last time I tried to upload any loose files with the .esp.

If I get this to work, maybe this will be just Nexus exclusive.

Link to comment
Share on other sites

Without looking at this through the CK I would suggest creating an additional effect and a spell.

Lets call your current effect BlockEffect now the two new ones would be BlockSpellInit and BlockSpell.

Once you have created both the two new items assign BlockEffect to BlockSpell and assign BlockSpellInit to the

enchantment. Now in the BlockEffectInit form set it to be Script type and add a new script. Then add something similar

to this...

 

Just went over everything again, and I might be reading how you described it wrong, but just so that we are both on the same page...

 

This is the magic effect, where the script goes.

(script controls magic effect)

http://i.imgur.com/XsO8Ul.jpg

 

Then the magic effect goes into the enchantment, here:

(magic effect controls enchantment. Enchantments can contain multiple effects.)

http://i.imgur.com/iUyJkl.jpg

 

Conditions for the effect to be active go here:

(after adding to the enchantment)

http://i.imgur.com/k7Rixl.jpg

 

Then, during in-game enchanting, the enchantment goes here:

http://i.imgur.com/7xeOPl.jpg

 

 

And what you are saying is that create a [new spell], and a [new effect with a script].

Then the current effect applies to the new spell

Then the new spell applies to the script which is in the new effect,

which applies to the enchantment.

??

 

So far, I've tried this and it doesn't work.

I don't think I need a script that activates/deactivates a spell while blocking, but a script that activates/deactivates the effect while blocking.

Also, Enchantments are essentially spells that are always active on armor.

I've also noticed some scripts not working after enchanting an item in-game as well.

And if you are out of ideas, that's fine. I've been trying to get this to work for a while now with no luck. I think I'll just chalk this up to a game/CK error that can't be fixed with a simple script.

Link to comment
Share on other sites

Ill try to explain it a little clearer:

 

Ive modified the code slightly to work better:

 

Spell property BlockSpell auto ;Assign your BlockSpell through the properties to this 

Event OnEffectStart(Actor akTarget, Actor akCaster) 

       if !(akTarget == Game.getPlayer()) 
               return 
       endif 

       registerForUpdate(0.1) ;sets up an Update cycle every 0.1 seconds.
EndEvent

Event OnUpdate() This checks the animation state of your character every 0.1 seconds
     if (GetAnimationVariableInt("iBlockState") == 1) 
               BlockSpell.Cast(Game.getPlayer()) ;If you are blocking then the BlockSpell is cast. 
     elseif (GetAnimationVariableInt("iBlockState") == 0) 
               Game.getPlayer().DispelSpell(BlockSpell);Dispels the spell once you stop blocking
      endif
endEvent

Event OnEffectFinish(Actor akTarget, Actor akCaster)  ;Called when the the enchanted item is removed as the effect ends 
       if !(akTarget == Game.getPlayer()) 
               return 
       endif 
        
       Game.getPlayer().DispelSpell(BlockSpell) ;Dispels the spell from the player once you have removed the item      
       unRegisterForUpdate() ;Stops the update cycle to free up assets.
EndEvent

 

First you should create the items in this order: (Make sure that both the effects, the spell and enchantment are set to casting type - fire and forget and delivery - self

1) Create the magic effect that you want to apply when the player is blocking.

2) Create the spell for the previous magic effect, assign the previous magic effect and set duration to something overly high

3) Create the magic effect for the script and then assign the script mentioned previously (this should have an effect archetype of script)

4)Create the enchantment you wish you assign to the item. This should have the previous 'script' magic effect assigned.

5)Create item and assign the enchantment.

 

Now what you will want to happen when you equip the item is as follows:

1)The enchantments magic effect kicks in which begins the script, which is checking if the player is blocking

2)If the player blocks then the spell is cast on the player which gives him the desired effect

3)The player stops blocking so the spell and its effects are removed from the player

4)The player removes the item which ends the script checking for blocking and dispels the spell if it still in effect.

 

Hope this explains things a litle clearer.

Link to comment
Share on other sites

...Hope this explains things a litle clearer.

 

That cleared everything up. Unfortunately, the enchantment still doesn't work. I was almost positive it would this time.

 

I did some testing with some items that actually had these effects plugged in through the CK before enchanting in-game; turns out they work just fine. :thumbsup: I think the problem is that the enchantment system breaks some scripts in the process of enchanting an item, which brings us back to square one. :down:

 

There's little stuff like this everywhere in the CK and Skyrim.

 

Like how the "fortify shout" enchantment has to be set at [00.20] to give 20%, but shows up as 0 in game, while everything else is at values above 1.

Or like how the tree in Windhelm doesn't dissappear or change after completing the quest unless you use the command console

Or how the quest involving Northwatch Keep is still bugged (and a bunch of other quests as well, even with update 1.5)

There's even stuff in the CK that isn't even used in-game, by NPC's or otherwise.

and so on...

 

And as much as I want this to work, I don't really feel like an overhaul on the enchantment system.

 

Anyways... Thanks for the help! I really appreciated it! :biggrin:

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...