Jump to content

shaynethecoker

Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by shaynethecoker

  1. a) your OnUpdate event does nothing but waste CPU cycles. It serves no purpose.

    b) when the magic effect finishes the script will automatically unregister for any updates regardless.

    c) Magic Effects should automatically dispel on death unless you ticked "no death dispel" on the effect form in the CK.

     

    This should work equally well:

     

    Scriptname CastSpellOnDying extends activemagiceffect  
    
    Spell property SpellRef auto
    
    Actor Caster
    
    Event OnEffectStart(Actor akTarget, Actor akCaster)
    	Caster = akCaster
    EndEvent
    
    Event OnDying(Actor akKiller)
    	Debug.Notification("Ouch!")
    	SpellRef.Cast(Caster, Caster)
    	Debug.Trace("Spell " + SpellRef + "supposedly cast on " + Caster)
    EndEvent
    

     

     

    Thank you. There isn't any updating variable to keep track of, so yes it makes sense that the update cycle is superfluous. I will try using Caster = akCaster again, wasn't working before so I set the value to equal the player just to test that my intended spell effect would work.

     

     

     

    You really should tick "no death dispel" even if you do intend it to go away on death (and even if it is an ability). Instead, just put Dispel() into your script. Otherwise you get a race condition and unreliable behaviour.

     

    OnDeath() is a fairly bugged event, always use OnDying() instead.

     

     

    I do have "no death dispel" ticked since I noticed it was a fairly consistent workaround to bugs in various tutorials. Also, yeah OnDeath() doesn't seem to work at all for this, so OnDying() it is.

  2. Scriptname CastSpellOnDying extends activemagiceffect  
    
    Spell property SpellRef auto
    
    Actor Caster
    
    Event OnEffectStart(Actor akTarget, Actor akCaster)
    	RegisterForSingleUpdate(0.25)
    EndEvent
    
    Event OnUpdate()
    	RegisterForSingleUpdate(0.25)
    EndEvent
    
    Event OnDying(Actor akKiller)
    	Caster = Game.GetPlayer()
    	Debug.Notification("Ouch!")
    	SpellRef.Cast(Caster, Caster)
    	Debug.Trace("Spell " + SpellRef + "supposedly cast on " + Caster)
    EndEvent
    
    Event OnDeath(Actor akKiller)
    	Self.Dispel()
    	Debug.Trace("Effect suspended, unregistering for update")
    	UnregisterForUpdate()
    EndEvent
    
    Event OnEffectFinish(Actor akTarget, Actor akCaster)
    	Debug.Trace("Effect suspended, unregistering for update")
    	UnregisterForUpdate()
    EndEvent 

    This works in-game. Very basic. Working on giving it some conditionals to give it some added utility and bug checking.

  3. I think you need to dynamically add a script to your target and run the OnDeath event there. Don't think OnDeath event works from a magic effect script.

    http://www.creationkit.com/Dynamically_Attaching_Scripts

     

    This is probably what I'm looking for, thank you. The Soul Tear script from the Dawnguard dlc does use the OnDeath command within the context of an activemagiceffect, which is what I was basing this off of, but I don't think I can use it the way that I hoped. Again thank you for the link, I am new to scripting and I think this page will be very helpful. Couldn't find it when I was looking through the wiki earlier.

  4. Hi all.

     

    I am trying to script a simple spell that casts another spell on the player if the target dies during its effect. So far I have:

    Scriptname CastSpellOnDying extends activemagiceffect  
    
    Spell property SpellRef auto
    
    actor CasterActor
    
    Event OnDeath(Actor Killer)
        Debug.Notification("Ouch!")
        SpellRef.cast(CasterActor, CasterActor)
    EndEvent

    When I attached this to my spell and kill the target in-game nothing happens, the debug message doesn't even pop up. Can anyone point out where my errors are?

     

    Thanks

  5. I have a couple questions regarding scripting for a mod I'm working on.

     

    A) Is it possible to add quest status to an item via in game scripts? IE Place a non-quest item in a container, scripted event associates item with the quest at hand. Would Script Extenders be able to do this if vanilla can't?

     

    B) Is it possible to make a spell (lesser power) that changes player animations for its? IE cast spell, use different movement anims for a set time, return to normal movement anims.

     

    Thanks for any help.

  6. Ever since Bethesda showed off their game jam at DICE (and before that, there had been speculation before the game's release), I've been thinking about spell combinations. The more I thought about it, the more elegant it seemed, the more I wanted to see it done, and done properly. Not just from a gameplay perspective mind you, but from a lore perspective. These combinations fill something that I consider to be lacking from the game: Mysticism.

     

    For those of you not familiar with the previous two games (which is very few I hope), Mysticism magic has always been something of a mystery and a controversy within the Elder Scrolls. Even within the game lore, no one was ever quite sure how the magic worked, or if it should be considered its own type of magic at all. Nothing demonstrates this better than the fact that it has been removed from Skyrim entirely; however, between previous games saw large numbers of spells jump between it and other schools, and both in Oblivion and Morrowind you could find in-game books pondering its odd properties and debating over how to classify it and its various spells.

     

    This is where spell combining comes in. Mysticism never really was its own type of magic. It was rather the unique results of combining different schools.

    From a modding perspective, this presents a logical framework and lays down the laws that will govern the art.

     

    A brief overview of the mod as I plan to do it:

     

    Add several unique spells

    • some returning from previous games
    • some unique spells (or returning w/ a twist)
    • useful but never over-powered

    Add new spellcasting mechanic

    • combine the properties of two spells, one cast from each hand at the same time
    • ALWAYS made up of spells from different schools
      (if a spell is WHOLLY governed by one school, it should just fall under that school)
    • costs based on component spells*
    • perks and ease casting (more on this later) based on governing schools*
      *can be overridden by nature of result

    Add a layer of fun and challenge

    • only have to learn the components to cast the combination, but don't expect it to come easy
    • some combinations are more powerful then their components, and some less
      costs will reflect this
    • based off dual-casting so combos will take longer, but are affected by (potentially) double the perks
    • miscasting under certain circumstances
    • miscast chance based off of skill in both governing schools

     

    This is designed to add the magic system, offering more freedom but also more challenge. It's magic combat along the same lines as what Duel or Deadly Combat do for the melee combat system, or Arrow Tweaks does for marksman. It is my intention to make the gameplay both streamlined and nuanced. If the system seems a little cumbersome, then you don't have to use it.

     

    Here's a working list of all the new and returning spells:

    • Reflect, Elemental Shield, Force, Soul Arrow, Elemental Weapon,
      Holy Weapon, Drain (Health, Stamina and Magicka versions), Sound, Silence,
      Feather, Dequip, and POSSIBLY Mark/Recall, Divine Intervention,
      Bound Shield/Armor (though aside from aesthetics there's not really a point)

    Note that some spells will have different versions based on the components, ex. a spell based off a destructive element could have a spray or a projectile version.

    The names purposely don't always do their effects justice.

     

    Also, I've done some work trying to balance the whole thing and give each school combination at least one spell. There will be a book in-game that backs up the lore and teaches some combos, but I'm not going to tell most of the recipes outright ( A. I'm still working on them, B. the idea is to experiment and find them out, and C. some should be obvious and easy to obtain... others not so much). However, there shouldn't be any harm telling players where to start, so here's the working list of component spells:

     

    Alteration

    • light spells
    • telekinesis
    • paralyze

    Conjuration

    • bound weapon
    • soul trap
    • conjure familiar

    Destruction

    • elemental spray/projectile
    • elemental rune

    Illusion

    • invisibility
    • influence spells
    • muffle

    Restoration

    • heal
    • ward
    • turn undead

     

    Keep in mind that this is still in the planning stage. I'm working on adding the spells to the game and making sure they work, then I'll work on the actual combinations.

    Stay tuned.

×
×
  • Create New...