Jump to content

Photo

How to make the player deal 0 damage creation kit Slyrim SE

creation kit script enchantment skyrim se mod

  • Please log in to reply
7 replies to this topic

#1
WondraBox

WondraBox

    Newbie

  • Members
  • Pip
  • 12 posts

I am trying to make a mod where I need to have the player unable to harm anything while wearing a piece of armor. Its basically an enchantment I want to make without going into too much detail of what its for. I have been trying the different damage modifiers in the creation kit but none of them subtract damage, only add to it. I have also tried the etherealize effect arch type under magic effects but that didnt work either. I tried messing with making a custom perk in a magic effect then placing it on an enchantment and still nothing. I have been at this for hours. i believe the only way to do it is through scripting. I know basic scripting but really have never scripted anything in papyrus.  Would anyone have any ideas?  



#2
maxarturo

maxarturo

    Faithful poster

  • Members
  • PipPipPipPip
  • 1,740 posts
A quick and simple way to do this is to put a simple script on the armor.
Spoiler
 
* There are also other ways you can do this.


#3
WondraBox

WondraBox

    Newbie

  • Members
  • Pip
  • 12 posts

Would that not allow the player to move? I still need them to be able to move, just not be able to do any damage with weapons, spells, or melee.



#4
maxarturo

maxarturo

    Faithful poster

  • Members
  • PipPipPipPip
  • 1,740 posts

The player retains full control while wearing your armor but he can't do combat unless he unequips it.

* As long as this line:

Game.DisablePlayerControls(0, 1, 0, 0, 0, 0, 0)
DOES NOT CHANGE !.

 

* This is the simplest way to do this.

 

SSE forum link bellow:

https://forums.nexus...it-and-modders/

 

I hope it helps.


Edited by maxarturo, 03 July 2020 - 04:32 PM.


#5
WondraBox

WondraBox

    Newbie

  • Members
  • Pip
  • 12 posts

Sorry for not getting back to you, I had things come up over the past couple of days. I am going to try this right now and let you know how it works. thank you!



#6
WondraBox

WondraBox

    Newbie

  • Members
  • Pip
  • 12 posts

So I copied the script exactly as you wrote it into a new magic effect. I made sure that it was script, on self, constant effect, compiled it, and it did not work. I then tried adding some properties to the script, even though I have no idea what i am doing in that sense. I tried making a property that made it so it would run on the player, but still did not work. I can still do damage to NPC's.



#7
maxarturo

maxarturo

    Faithful poster

  • Members
  • PipPipPipPip
  • 1,740 posts
"So I copied the script exactly as you wrote it into a new magic effect"
What...??
 
I clearly dictated to :
"A quick and simple way to do this is to put a simple script on the armor."
I didn't said anything about a "Magic Effect", you can do this with a magic effect but requires a different approach.
 
Open your armor in CK, the armor's property window and place the script there, it should extend "ObjectReference".


#8
WondraBox

WondraBox

    Newbie

  • Members
  • Pip
  • 12 posts

SOLVED!

I figured it out! I found someone else's script that did something similar, and kind of mixed it with the code you posted. It was a lot of trial and error, but It now works! Thank you for your help!

and for anyone who wants to use it here is the code and it is set up as a magic effect script so that it can be applied to an armor piece and disenchanted so you can put it on other items:



Scriptname PlayerDealsNoDamage extends activemagiceffect  


Bool Property Fighting = false auto


EVENT OnEffectStart(Actor akTarget, Actor akCaster)    
    Game.DisablePlayerControls(Fighting)
    Game.EnablePlayerControls(true, false, true, true, true, true, true, true)


ENDEVENT

EVENT OnEffectFinish(Actor akTarget, Actor akCaster)
    Game.EnablePlayerControls(true, true, true, true, true, true, true, true)

ENDEVENT


Edited by WondraBox, 05 July 2020 - 02:22 PM.






Also tagged with one or more of these keywords: creation kit, script, enchantment, skyrim se, mod

Page loaded in: 1.055 seconds