Jump to content

Sesoad

Members
  • Posts

    21
  • Joined

  • Last visited

Posts posted by Sesoad

  1.  

    Hey, yes it should still work if they're armor properties, and yes the spells should be made in the creation kit. Also one tweak to the weapon script:

     

     

     

    Scriptname MyModWeaponScript extends ObjectReference 
    
    Spell Property CheckWeaponDrawnSpell Auto ;The spell we just made
    
    Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)
        If (akOldContainer as Actor) && (akoldContainer.GetItemCount(Self.GetBaseObject()) == 0)  ;if removed from an actor
            (akOldContainer as Actor).RemoveSpell(CheckWeaponDrawnSpell)
        Endif
        
        If akNewContainer as Actor ;if weapon is added to an actor 
            (akNewContainer as Actor).AddSpell(CheckWeaponDrawnSpell, false) ;add weapon drawn check spell to actor silently 
        Endif 
    EndEvent 

     

    It took me a while, but thanks to your help and your advices, I managed to make it work for hotkey, and kinda for iequip too ! Thanks a lot for your help !

  2. Without testing anything here and just taken a blind stab at it. Considering you do have it working in one case ... I'd say the "problem" is to do with the actionType calls.

    Yeah it seems the actiontype is not recognized by the hotkeys or it is but only sometimes, don't really know why

     

     

    It seems like the event OnActorAction isn't firing when switching with the favorites menu, or iequip, and also looks like the script using OnUpdate polling, which generally I try to avoid because it's bad for performance. A way to get around this, is to make a spell ability that has the condition IsWeaponOut == 2 on the magic effect.

     

    First make a new magic effect. Archetype: Script, Casting Type: Constant Effect, Delivery: Self

    Check the boxes Not Hit Event, No Hit Effect, Painless and Hide in UI.

    Then Compile and add this script to the magic effect:

     

     

    Scriptname MyModWeaponDrawnCheckScript extends ActiveMagicEffect 
    
    
    Weapon Property WeapOut Auto 
    Weapon Property WeapSheathed Auto 
    
    
    Event OnEffectStart(Actor akTarget, Actor akCaster) ;Effect starts when actors weapon is out 
        If akTarget.IsEquipped(WeapSheathed)
            akTarget.EquipItem(WeapOut,false,true)
        Endif 
    EndEvent 
    
    
    Event OnEffectFinish(Actor akTarget, Actor akCaster) ;Effect stops when actor sheaths weapon
        If akTarget.IsEquipped(WeapOut)
            akTarget.EquipItem(WeapSheathed,false,true)
        Endif 
    EndEvent 

     

     

    Name the script something unique

    Then make a new spell. Type: Ability, Casting: Constant Effect, Delivery: Self and put the magic effect you just made on it with the condition IsWeaponOut == 2 so the effect is only active if the actors weapon is drawn.

     

    Then put this script on the weapon:

     

     

    Scriptname MyModWeaponScript extends ObjectReference 
    
    
    Spell Property CheckWeaponDrawnSpell Auto ;The spell we just made
    
    
    Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)
        If akOldContainer as Actor ;if removed from an actor 
            (akOldContainer as Actor).RemoveSpell(CheckWeaponDrawnSpell)
        Endif
        
        If akNewContainer as Actor ;if weapon is added to an actor 
            (akNewContainer as Actor).AddSpell(CheckWeaponDrawnSpell, false) ;add weapon drawn check spell to actor silently 
        Endif 
    EndEvent 

     

     

     

    The script will add the check weapon drawn spell to the actor whenever it's added to an actors inventory.

     

    Sorry I haven't posted the full script, would that still work if the weapout and weapsheathed properties are both armor and not weapon ?

    Also do the spell needs to be created through creation kit ?

     

     

    Scriptname HDTWeapon_Draw_n_Sheathe extends activemagiceffect
    ; Unsheathed version
    Armor Property WeapOut Auto
    ; Sheathed version
    Armor Property WeapSheathed Auto
    Actor property MyOwner Auto
    Event OnEffectStart(Actor akTarget, Actor akCaster)
    if akTarget == game.getplayer()
    ; this event is supposed to work for player
    ; draw begin
    RegisterForActorAction(7)
    ; Sheathe End
    RegisterForActorAction(10)
    else
    ; NPC equipped this weapon
    MyOwner = akTarget
    registerforupdate(0.5)
    endif
    endevent
    Event OnEffectFinish(Actor akTarget, Actor akCaster)
    UnRegisterforupdate()
    UnRegisterForActorAction(7)
    UnRegisterForActorAction(10)
    endevent
    ; this event only works for player
    Event OnActorAction(int actionType, Actor akActor, Form source, int slot)
    debug.notification("action")
    if actionType == 7
    if akActor == Game.GetPlayer()
    game.getplayer().EquipItem(WeapOut,false,true)
    endif
    endif
    if actionType == 10
    if akActor == Game.GetPlayer()
    game.getplayer().EquipItem(WeapSheathed,false,true)
    endif
    endif
    endevent
    Event OnUpdate()
    debug.notification("update")
    if MyOwner.IsWeaponDrawn() && MyOwner.IsEquipped(WeapSheathed)
    MyOwner.EquipItem(WeapOut,false,true)
    endif
    if ( MyOwner.IsWeaponDrawn() == false ) && MyOwner.IsEquipped(WeapOut)
    MyOwner.EquipItem(WeapSheathed,false,true)
    endif
    endevent

    also I found the same script on google, don't know if the author of the mod based his mod off this script or if he is the same person but he uses 2 armors version for his hdt sheathed and drawn weapon https://www.loverslab.com/topic/39329-wip-a-multitail-whip-as-a-weapon-with-havoc-physics/
  3. So I'm trying to modify a mod with an open source, the mod either has the mod's sword sheathed or drawn depending on the situation, so if I just draw and sheathe using the r key it works, but if i'm using hotkey, like switching from spell / another weapon to this sword using a number hotkey from favorite menu for example, it doesn't appear and with iequip or skyrimsouls neither, is there a function that lets you know when you're switching weapon with the hotkey ? currently it looks like that

    Event OnActorAction(int actionType, Actor akActor, Form source, int slot)
    debug.notification("action")
    if actionType == 7
    if akActor == Game.GetPlayer()
    game.getplayer().EquipItem(WeapOut,false,true)
    endif
    endif
    if actionType == 10
    if akActor == Game.GetPlayer()
    game.getplayer().EquipItem(WeapSheathed,false,true)
    endif
    endif
    endevent
    Event OnUpdate()
    debug.notification("update")
    if MyOwner.IsWeaponDrawn() && MyOwner.IsEquipped(WeapSheathed)
    MyOwner.EquipItem(WeapOut,false,true)
    endif
    if ( MyOwner.IsWeaponDrawn() == false ) && MyOwner.IsEquipped(WeapOut)
    MyOwner.EquipItem(WeapSheathed,false,true)
    endif
    endevent
  4. i don't know why, but the left hand spell works, with the right hand. The last round of testing she used bound sword a good amount, i have only seen her use it with one enemy once. I updated MFP with an optional file, that has Heather using bound sword. tested in 3 locations at that had enemies and she used it all three times. I might go back later and tinker with that battle style some more.maybe. i still think its in the battle style.

    Welp that's a bummer, mine doesn't work at all :(

    What do you use as follower system ?

  5.  

    funny thing is i had giving heather bound sword left hand, but when i went into game she used it in right hand. I'm going do a quick test, then update MFP mod with Heather having/using Bound Sword spell. Did you give her right hand bound sword?

     

    Tes5edit is how i added master to follower mod, make sure mod becoming master loads above/before dependent mod, load mods in tes5edit and right click other mod, in pop up window click add masters.

    Actually I tried everything (normal and right-hand) except left hand haha

    Yeah I tried using tesVedit but the thing is after I load the files on CK and save, the added master disappears so it returns to before I used tesv

     

    Doesn't work either with left hand sighhh

    You sure she summon the sword through bound spell and not from her item equipment ?

  6. funny thing is i had giving heather bound sword left hand, but when i went into game she used it in right hand. I'm going do a quick test, then update MFP mod with Heather having/using Bound Sword spell. Did you give her right hand bound sword?

     

    Tes5edit is how i added master to follower mod, make sure mod becoming master loads above/before dependent mod, load mods in tes5edit and right click other mod, in pop up window click add masters.

    Actually I tried everything (normal and right-hand) except left hand haha

    Yeah I tried using tesVedit but the thing is after I load the files on CK and save, the added master disappears so it returns to before I used tesv

  7. i just literally added bound sword spell to one of my followers and after killing mudcrab with ice spike i took her to see some forsworn and she used bound sword w/ ice spike in other hand.

     

    her level starts at 30min, She has 1500 extra magicka, her class is a slightly modified Combat Mage Elemental

     

    and possible the deal breaker, her combat class is csWarlock

     

     

    the follower with modified combat mage elemental class and csWarlock battle class is Heather from this mod https://www.nexusmods.com/skyrim/mods/92536 I am very confident that the only other changes that had been made to Heather on my end would be her outfit, you can peek under Heathers hood, she uses bound sword with ease, only added bound sword to her, and she used it as soon as she had multiply enemies to fight

    Thanks I'll try that out. You think it works on other class than csWarlock ?

    just for fun and poop and stuff, i installed the soul eater mod, added it as a master to More Followers Please mod, Traded Heathers new bound sword spell for soul eater, she used it just fine. My guess is its her combat class.

    qLstWei.jpg

     

    It's not this weap. Sorry, I didn't specify the exact mod, it comes from colorful magic mod actually. How did you add it as master by the way ? And did you use left/right hand bound or normal one ?

  8. Scripts? You speak python?

     

    What is the followers class? A combat1h wont use spells. Make sure the class is right. I'm on phone, open CK and click on follower in actors tab, the page next to traits, is where you find class setting. Tes5edit has it to, on phone and can't conjure that for you now

    No, I'm speaking about papyrus.

    She's a human magic, doesn't have any problem using any spell that isn't bound weapon.

  9. If you successful gave her spell and she not using it then make sure her level is at least 20, and give her more Magicka.

    No, that's not what I meant. I know she has already more than needed magicka and her skill in conjuration is max level already. The thing is that her AI doesn't let her use the spell so I wanted someone that knows about CK or scripts to tell me if they knew a way or a script to make her use bound weaps.

  10. Hi guys, I wanna give my follower a bound spell from another mod called soul eater, But I don't actually know what I'm supposed to do, if I need to put a script, and how / what script I should put, anyone knows how to do that kind of stuff ? And the problem isn't giving my follower the bound spell but more about making her use the bound spell, thanks in advance for help

  11. Hey! I just installed Skytweaks, and it seems really good, but i gotta have to run the intro again since it's a new game, and the game suddenly pauses itselfs when i alt tab whereas it didn't before skytweaks, so can someone using the mod tell me how to turn the option of pausing off ? Thanks you !

    Edit: It was in ini lol i'm stupid

  12. Hello, i'm having a problem with the custom follower I made, it has a body and face color mismatch, the body's color is right but the face is wrong, I did the Ctrl + F4 Thing and created her facegen etc, but the color mismatch remains, already had this problem before and solved it but it's been so long I don't remember how i did solve it, and I wanted to change her messed up chin today so I had to redo the facegen part and now it's come to this, if someone can help me it would be nice, thanks in advance

×
×
  • Create New...