Jump to content

Elias555

Members
  • Posts

    792
  • Joined

  • Last visited

Posts posted by Elias555

  1.  

    The mod is currently only planned for Skyrim SE, since i don't own the original anymore =P. Btw, i don't want to come off harsh here, but try to only apply if you plan on finishing the project, i had spent the last 4 years working day and night (until i nearly passed out) trying to get my creations out there, but then none of them ever did because the voice actors left mid production for one reason or another. Everyone has their lives to tend to, i get it, but if you expect stuff like that to happen, don't apply for large roles.

    I strongly suggest you have all the lines completed and the entire script given to the VA so they can be done with the work in one sitting. Don't keep adding things after they've finished with the expectation that they'll still be there. Make sure you're happy with the script and you don't plan to add anything else!

  2. I'm making an enhance shield spell, similar to the enhanced weapon archetype but I've run into some trouble.

     

    This script applies the enchantment to the current equipped shield. It's in the magic effect.

    Problems:

    Doesn't re-equip the shield once the spell runs out.

    Enchantment shader only plays while in an inventory or on the floor.

     

     

     

    Scriptname _AceTestingScript extends ActiveMagicEffect
    
    Enchantment Property MyEnchantment Auto
    
    Armor EquippedShield
    Armor BaseShield
    
    Event OnEffectStart(Actor akCaster, Actor akTarget)
    
        WornObject.SetEnchantment(Game.GetPlayer(), 0, 0x00000200, MyEnchantment, 1000)
        BaseShield = Game.GetPlayer().GetEquippedShield()
        EquippedShield = Game.GetPlayer().GetEquippedShield()
        Game.GetPlayer().UnequipItemEX(EquippedShield, 2, False)
    
    EndEvent
    
    
    
    Event OnEffectFinish(Actor akCaster, Actor akTarget)
    
        Game.GetPlayer().RemoveItem(EquippedShield, 1, True)
        Armor ReplacementShield = Game.GetPlayer().Additem(BaseShield, 1, True)
        Game.GetPlayer().EquipItemEX(ReplacementShield, 2, False) ;NOT WORKING
    
    EndEvent

     

     

     

    This magic effect is responsible for removing the enhanced shield effect if the player decides to unequip the shield before the spell ends.

    Problems:

    Switching to a spell or dropping the weapon doesn't count as unequipping

    It has a while loop.

     

     

     

    Scriptname _AceTestingScript2 extends ActiveMagicEffect
    
    Armor BaseShield
    
    Event OnEffectStart(Actor akCaster, Actor akTarget)
    
        BaseShield = Game.GetPlayer().GetEquippedShield()
        Armor EquippedShield = Game.GetPlayer().GetEquippedShield()
        
        While Game.GetPlayer().GetEquippedShield() == EquippedShield
    
            Debug.Notification("shield is equipped")
    
            If Game.GetPlayer().GetEquippedShield() != EquippedShield
    
                Game.GetPlayer().RemoveItem(EquippedShield, 1)
                Game.GetPlayer().Additem(BaseShield, 1)
    
            EndIf
    
        EndWhile
    
    EndEvent

     

     

     

    I've been struggling with this for a while now and I'm willing to give my left nut for the solutions. ANY help is appreciated.

  3.  

    In the enchantment. Open each of the effects and add the condition to each. Play around with it and see if the condition changes anything.

    How can he use that function when it only checks the type of weapon equipped in each hand, not what the actual weapon form is? If Aslan's weapon is in left hand and another weapon of the same type is in the other hand, then both magic effects will apply when only the left-hand-effect should. Or am I missing something?

     

    My thinking is to add a layer to the checks starting with that one. If it worked we could continue adding conditions.

  4. why the while instead of running that oneffectfinish?

    This is in the enchantment effect script, the effect will never finish.

    I need to make a few changes to your script to get it to compile. Give me a sec.

     

    Okay, I see what was wrong now. I shouldn't have combined your script with mine like that. This works to 'remove' the enchantment if unquipped but not if player equips something else. I also don't like that there's a while loop.

     

     

    Scriptname _AceTestingScript2 extends ActiveMagicEffect
    
    Armor BaseShield 
    
    Event OnEffectStart(Actor akCaster, Actor akTarget)
    
    	BaseShield = Game.GetPlayer().GetEquippedShield()
    	Armor EquippedShield = Game.GetPlayer().GetEquippedShield()
    	
    	While Game.GetPlayer().GetEquippedShield() == EquippedShield
    
    		Debug.Notification("shield is equipped")
    
    		If Game.GetPlayer().GetEquippedShield() != EquippedShield
    
    			Game.GetPlayer().RemoveItem(EquippedShield, 1)
    			Game.GetPlayer().Additem(BaseShield, 1)
    
    		EndIf
    
    	EndWhile 
    
    EndEvent
    

     

     

     

    Now here's the first script, the applier. When the spell is finished the swap is made but I can't get the shield to re-quip.

     

     

    Scriptname _AceTestingScript extends ActiveMagicEffect
      
    Enchantment Property MyEnchantment Auto
    
    Armor EquippedShield
    Armor BaseShield
    
    Event OnEffectStart(Actor akCaster, Actor akTarget)
    
    	WornObject.SetEnchantment(Game.GetPlayer(), 0, 0x00000200, MyEnchantment, 1000)
    	BaseShield = Game.GetPlayer().GetEquippedShield()
    	EquippedShield = Game.GetPlayer().GetEquippedShield()
    	Game.GetPlayer().UnequipItemEX(EquippedShield, 2, False)
    
    EndEvent
    
    
    
    Event OnEffectFinish(Actor akCaster, Actor akTarget)
    
    	Game.GetPlayer().RemoveItem(EquippedShield, 1, True)
    	Armor ReplacementShield = Game.GetPlayer().Additem(BaseShield, 1, True)
    	Game.GetPlayer().EquipItemEX(ReplacementShield, 2, False) ;NOT WORKING
    
    EndEvent
    

     

     

    STILL NO VISUALS!

  5. I tried both and that was the last thing I tried so I posted that but neither worked.

    Passing none compiles but causes CTD. You can't enchant an already enchanted item, so a blank enchantment won't work.

     

    Edit: I think I'm getting somewhere with this. It gets removed but not replaced at all. I did make sure to have the AddItem first.

    Scriptname _AceTestingScript2 extends ActiveMagicEffect
    
    
    Armor EquippedShield
    
    Event OnEffectStart(Actor akCaster, Actor akTarget)
    
    	EquippedShield = Game.GetPlayer().GetEquippedShield()
    	Armor BaseShield =  Game.GetPlayer().GetBaseObject() as Armor ;ObjectReference BaseShield =  Game.GetPlayer().GetBaseObject() as ObjectReference
    
    	While Game.GetPlayer().GetEquippedShield() == EquippedShield
    	
    		Debug.Notification("shield is equipped")
    
    	If Game.GetPlayer().GetEquippedShield() != EquippedShield
    	
    		Game.GetPlayer().Additem(BaseShield, 1)
    		Game.GetPlayer().RemoveItem(EquippedShield, 1)
    
    	EndIf
    
    	EndWhile 
    
    EndEvent
    
    

    BaseShield returns with None. Damn, I really thought that was going to work.

  6. The enchantment runs on the player so you get events from the player actor not the item it belongs to.

    What, how? A quest alias?

    Any ideas on how to get rid of the enchantment when the spell ends? I was hoping that I could make a switch but If you or anyone know a better method I'd like to know.

  7.  

    When using EquipItem to equip a custom player-enchanted item to any actor, a bug will prevent the magic effects of that enchantment from taking effect.

    WHY! Is there a workaround?

    There's no RemoveEnchantment function either. What have I got myself into?

    Scriptname _AceTestingScript extends ActiveMagicEffect
      
    Enchantment Property MyEnchantment Auto
    
    Event OnEffectStart(Actor akCaster, Actor akTarget)
    
    	WornObject.SetEnchantment(Game.GetPlayer(), 0, 0x00000200, MyEnchantment, 1000)
    	Armor EquippedShield = Game.GetPlayer().GetEquippedShield()
    	Game.GetPlayer().UnequipItemEX(EquippedShield, 2, False)
    
    EndEvent
    

    Just found UnEquipItemEx. Not sure how it works because it's not unequiping the shield but it is 'refreshing' the enchantment so now it functions again! Still no visual or method to remove the enchantment.

     

     

    For disenchanting I tried attaching this script to the enchantment but nothing fires.

    Scriptname _AceTestScript2 extends ObjectReference 
    
    Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)
    
    Armor SelfShield = Self.GetBaseObject() as Armor
    
      if akNewContainer && !akOldContainer
    
    	akNewContainer.Additem(SelfShield, 1)
    	akNewContainer.RemoveItem(Self, 1)
    
      EndIf
    
    EndEvent
    
    Event OnEquipped(Actor akActor)
    
        Debug.Notification("We were equipped by the player!")
    
    EndEvent
    
  8. Perfect, thank you! I went with the second one and it applies the enchantment only to the particular shield. Same visual problem, but I'm glad that part's finally done.

     

    Edit: I now have to manually unequip and re-equip for the enchantment to take place. This doesn't work for some reason. fml.

    Scriptname _AceTestingScript extends ActiveMagicEffect
     
    Enchantment Property MyEnchantment Auto
    
    Event OnEffectStart(Actor akCaster, Actor akTarget)
    
        WornObject.SetEnchantment(Game.GetPlayer(), 0, 0x00000200, MyEnchantment, 1000)
        Armor EquippedShield = Game.GetPlayer().GetEquippedShield()
        Utility.Wait(0.1)
        Game.GetPlayer().UnequipItem(EquippedShield, False, False)
        Game.GetPlayer().EquipItem(EquippedShield, False, False)
    
    EndEvent
    
  9. I don't get it. SetEnchantment already exists and it functions here:

    	Armor EquippedShield = Game.GetPlayer().GetEquippedShield()
    	EquippedShield.SetEnchantment(MyEnchantment)
    

    How can you have two functions with the same name? It compiles when I make it an event, but this doesn't:

    Scriptname _AceTestingScript extends ActiveMagicEffect
      
    
    Enchantment Property MyEnchantment Auto
    
    Event OnEffectStart(Actor akCaster, Actor akTarget)
    
    	SetEnchantment(Game.GetPlayer(), 0, 0x00000200, MyEnchantment)
    
    EndEvent
    

    Error: SetEnchantment is not a function or does not exist. I tried kSlotMask39 as well it and "variable kSlotMask39 is undefined".

  10. Yeah, tried a different shader and the same thing, works in the inventory or on the ground but not when held.

    I have no idea how to use SetEnchantment event without an example.

    Event SetEnchantment(Actor akActor, Int handSlot, Int slotMask, Enchantment source, Float maxCharge)
    
        int kSlotMask39 ;shield
        akActor = Game.GetPlayer()
        slotMask = kSlotMask39
    
    EndEvent
  11. Alright, I got the effect to apply but not visually. It applies to all shields with the same base object and I don't know how to make it only the object reference in the players hands. I also need a way to remove the enchantment if the player decides to drop the weapon. Anyway, one thing at a time. Visuals don't appear on the shield while it's equipped on the player but appears when in containers, inventory, on the floor.

    Scriptname _AceTestingScript extends ActiveMagicEffect
      
    Enchantment Property MyEnchantment Auto
    
    Event OnEffectStart(Actor akCaster, Actor akTarget)
    
        Armor EquippedShield = Game.GetPlayer().GetEquippedShield()
        EquippedShield.SetEnchantment(MyEnchantment)
        Game.GetPlayer().UnequipItem(EquippedShield, False, True)
        Game.GetPlayer().EquipItem(EquippedShield, False, True)
    
    EndEvent
    
    

    Edit: I had thought of adding a check to make sure the player has the shield equipped but

     

    GetEquipped condition does not work for items in the left hand.

     

    I still don't get why the enchantment shader wouldn't work. It's the same shader I'm using for a weapon enchantment.

×
×
  • Create New...