Silhouette8 Posted October 22, 2018 Share Posted October 22, 2018 Hey, Iâm a very new modder, and Iâm looking for help, I want to create a Mod where a custom race where unarmed attacks can cause stagger half the time, and unarmed power attacks cause knockdown, does anyone have any idea on how to do this? Link to comment Share on other sites More sharing options...
SeraphimKensai Posted October 22, 2018 Share Posted October 22, 2018 You would make a script to allow you to do so. Check out Animation events on creation kit.com to determine how to have the script realize your attacks change. Link to comment Share on other sites More sharing options...
Silhouette8 Posted October 23, 2018 Author Share Posted October 23, 2018 Iâve been looking all over but nothing seems to work, Iâve made around 7 effects, multiple spells and lots of races, if someone could point me in the right direction(AKA how to start the effect/spell scripting) Link to comment Share on other sites More sharing options...
ActiveMagicEffect88 Posted October 23, 2018 Share Posted October 23, 2018 (edited) You need a perk that applies spell on hit. 1. Create a spell with its magic effect. Set them into "fire and forget" and "contact". Then...Set the "Effect Archetype" into "Stagger" in the magic effect.Set the Magnitude in the spell, ranging from 0.75~1.50 2. Then create a perk. Right Click and hit "New" in its perk entries.Then Choose the entry point as "Apply Combat Hit Spell". Here we will choose the StaggerSpell as the chosen spell. 3. Set the perk condition so it look like these:GetEquippedItemType Left == 0.0000 ANDGetEquippedItemType Right == 0.0000Yep, the condition is two of 'em. AFAIK this is also more safer way than using GetEquipped. 4. Attach the perk into the player. Directly, with script, quest alias; anything how you want it. 5. You're done. Maybe. Let us know if it's not working. Cheers~ Edited: fixing some typos. Edited October 23, 2018 by Flamekun Link to comment Share on other sites More sharing options...
Silhouette8 Posted October 23, 2018 Author Share Posted October 23, 2018 You need a perk that applies spell on hit. 1. Create a spell with its magic effect. Set them into "fire and forget" and "contact". Then...Set the "Effect Archetype" into "Stagger" in the magic effect.Set the Magnitude in the spell, ranging from 0.75~1.50 2. Then create a perk. Right Click and hit "New" in its perk entries.Then Choose the entry point as "Apply Combat Hit Spell". Here we will choose the StaggerSpell as the chosen spell. 3. Set the perk condition so it look like these:GetEquippedItemType Left == 0.0000 ANDGetEquippedItemType Right == 0.0000Yep, the condition is two of 'em. AFAIK this is also more safer way than using GetEquipped. 4. Attach the perk into the player. Directly, with script, quest alias; anything how you want it. 5. You're done. Maybe. Let us know if it's not working. Cheers~ Edited: fixing some typos.Thanks for this, but i've got a few questions (sorry) how would i add the perk console command-wise and would a similar path be taken for a paralyze spell? Link to comment Share on other sites More sharing options...
ActiveMagicEffect88 Posted October 24, 2018 Share Posted October 24, 2018 Just simply type player.addperk <perkID> in the console command. And yes, it would work for paralysis too............ until we've realized that ability will trigger every single time the character punches, making the character pretty much Saitama-ish (I mean, OP). In this case, let's go back into the ability again -> 1. Create another ability with it's magic effect.Let's go with the same "fire and forget" and "contact" procedure.In the spell, set the magnitude to 0.In the magic effect, we set the effect archetype into script. (Value modifier with NONE is okay, too, if it doesn't invoke anything.) 2. Attach that ability into the perk. 3. Create this script, then attach it into the new ability. Scriptname YourScriptNameHere extends ActiveMagicEffect Spell property SaidStaggerSpell auto Event OnEffectStart(Actor akTarget, Actor akCaster) int i = Utility.RandomInt(1,100) int chance = 50 ;you may change this later. if i <= chance akCaster.DoCombatSpellApply(SaidStaggerSpell.akTarget) endif EndEvent Don't forget to set the property of the script into the stagger spell we created here first time. This also same goes for the paralysis spell, should you want to make the paralysis spell. Scriptname YourScriptNameHereToo extends ActiveMagicEffect Keyword property ImmuneParalysis auto Spell property SaidParalysisSpell auto Event OnEffectStart(Actor akTarget, Actor akCaster) if !akTarget.HasKeyword(ImmuneParalysis) int i = Utility.RandomInt(1,100) int chance = 35 ;you may change this later. if i <= chance akCaster.DoCombatSpellApply(SaidParalysisSpell.akTarget) akCaster.PushActorAway(akTarget, 0.0) endif endif EndEvent Link to comment Share on other sites More sharing options...
Silhouette8 Posted October 24, 2018 Author Share Posted October 24, 2018 Just simply type player.addperk <perkID> in the console command. And yes, it would work for paralysis too............ until we've realized that ability will trigger every single time the character punches, making the character pretty much Saitama-ish (I mean, OP). In this case, let's go back into the ability again -> 1. Create another ability with it's magic effect.Let's go with the same "fire and forget" and "contact" procedure.In the spell, set the magnitude to 0.In the magic effect, we set the effect archetype into script. (Value modifier with NONE is okay, too, if it doesn't invoke anything.) 2. Attach that ability into the perk. 3. Create this script, then attach it into the new ability. Scriptname YourScriptNameHere extends ActiveMagicEffect Spell property SaidStaggerSpell auto Event OnEffectStart(Actor akTarget, Actor akCaster) int i = Utility.RandomInt(1,100) int chance = 50 ;you may change this later. if i <= chance akCaster.DoCombatSpellApply(SaidStaggerSpell.akTarget) endif EndEvent Don't forget to set the property of the script into the stagger spell we created here first time. This also same goes for the paralysis spell, should you want to make the paralysis spell. Scriptname YourScriptNameHereToo extends ActiveMagicEffect Keyword property ImmuneParalysis auto Spell property SaidParalysisSpell auto Event OnEffectStart(Actor akTarget, Actor akCaster) if !akTarget.HasKeyword(ImmuneParalysis) int i = Utility.RandomInt(1,100) int chance = 35 ;you may change this later. if i <= chance akCaster.DoCombatSpellApply(SaidParalysisSpell.akTarget) akCaster.PushActorAway(akTarget, 0.0) endif endif EndEvent I'm very sorry but im still having trouble, i did everything you said, made a stagger magic effect, bound it on hit to a spell, then made a perk that would place the spell on contact, and it still won't work!? Link to comment Share on other sites More sharing options...
ActiveMagicEffect88 Posted October 26, 2018 Share Posted October 26, 2018 (edited) Did you register those script properties in CK (so the icon isn't just "+" but a "+ with pencil")? You need to register it in CK otherwise it wouldn't work. Edited October 26, 2018 by Flamekun Link to comment Share on other sites More sharing options...
clioshand Posted February 24, 2021 Share Posted February 24, 2021 Necro for those trying to do the same thing: Unarmed attacks aren't weapons, so apply combat hit spell does not work. You need to either design around equipping a "fist weapon" or attach the spell directly in the attack data in the race records to make it stick. Link to comment Share on other sites More sharing options...
Recommended Posts