Jump to content

how to make a strip script


CyranGE

Recommended Posts

Hello, I edited an existing house mod, and it is perfect except the bathroom dont have a strip function, can anyone teacch me how to edit and/or make and/or transfer a script to my mod?

by strip mod I mean, when an NPC enter the pool area/bathroom they will automatically strip :)

Edited by CyranGE
Link to comment
Share on other sites

It's been a long time since I got mine working, so I don't remember everything, but it is included in my mod, Dragons Keep, so you should be able to copy the source script, etc. & add them into your mod.

 

When I did it, I looked at house mods that had it included to get an idea, such as Mammoth Manor, along.with a tutorial & DL version of a similar script, Bathing Suit in a pool Script and files by Jet4571.

 

Hope that helps.

Link to comment
Share on other sites

I forget where I got this but here goes:

 

1 - Create a new magic effect and call it LVENakedEffect change the following:

Effect Archetype: Script
Casting Type: Constant Effect
Assoc. Item 1: None
FX Persist: (check this box)
Hide in UI: (check this box)

Now when those are right hit ok, Then edit the object to pull up the same window you just hit ok on. You should now be able to add scripts so click "add" at
the bottom right and create a new script called "LVEnakedeffectscript" and add the following as its source

__________________________________________________________________
Scriptname LVEnakedeffectscript extends activemagiceffect

armor property JewelryRingGold auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
;debug.notification("effect script: adding effect")
akTarget.unequipall()
endEvent

Event OnEffectFinish(Actor akTarget, Actor akCaster)
;debug.notification("effect script: removing effect")
akTarget.additem(jewelryringgold,1,true)
akTarget.equipitem(jewelryringgold,false,true)
akTarget.removeitem(jewelryringgold,1,true)
endEvent
__________________________________________________________________
Make sure you auto-fill it's properties as well.(edit the script source and save it again, this should enable you to use auto-fill.)


2 - Go to spells and make a new spell called "LVENakedSpell" then change the following:
Casting: Constant Effect
Ignore resistance: (check this box)
Auto-Calculate: (uncheck this box)
then add a new effect and make that effect "LVENakedEffect" and set it's duration to a very long time, like 10000 seconds. Hit ok on this window and on the spell window.


3 - add a "defaultActivateSelfTRIG" object to each location you want people to take off their clothes. Edit each instance and remove the default script. Then create
a new script, call it LVENakedActivator then add this code as it's source.

__________________________________________________________________
Scriptname LVENakedActivator extends ObjectReference

spell property LVENakedSpell auto

Event OnTriggerEnter(ObjectReference triggerRef)
;debug.notification("found something!")
Actor akactionRef = triggerRef as Actor
if (akActionRef != game.getplayer() && !akActionRef.isincombat())
;debug.notification("effect applied")
LVENakedSpell.cast(akactionref,akactionref)
endif
endEvent

Event OnTriggerLeave(ObjectReference triggerRef)
Actor akactionRef = triggerRef as Actor
if (akActionRef != game.getplayer())
;debug.notification("effect removed")
akActionRef.dispelspell(LVENakedSpell)
endif
endEvent
__________________________________________________________________
make sure to auto fill the properties of each instance.

Link to comment
Share on other sites

  • 9 months later...

I forget where I got this but here goes:

 

1 - Create a new magic effect and call it LVENakedEffect change the following:

 

Effect Archetype: Script

Casting Type: Constant Effect

Assoc. Item 1: None

FX Persist: (check this box)

Hide in UI: (check this box)

 

Now when those are right hit ok, Then edit the object to pull up the same window you just hit ok on. You should now be able to add scripts so click "add" at

the bottom right and create a new script called "LVEnakedeffectscript" and add the following as its source

 

__________________________________________________________________

Scriptname LVEnakedeffectscript extends activemagiceffect

 

armor property JewelryRingGold auto

 

Event OnEffectStart(Actor akTarget, Actor akCaster)

;debug.notification("effect script: adding effect")

akTarget.unequipall()

endEvent

 

Event OnEffectFinish(Actor akTarget, Actor akCaster)

;debug.notification("effect script: removing effect")

akTarget.additem(jewelryringgold,1,true)

akTarget.equipitem(jewelryringgold,false,true)

akTarget.removeitem(jewelryringgold,1,true)

endEvent

__________________________________________________________________

Make sure you auto-fill it's properties as well.(edit the script source and save it again, this should enable you to use auto-fill.)

 

 

2 - Go to spells and make a new spell called "LVENakedSpell" then change the following:

Casting: Constant Effect

Ignore resistance: (check this box)

Auto-Calculate: (uncheck this box)

then add a new effect and make that effect "LVENakedEffect" and set it's duration to a very long time, like 10000 seconds. Hit ok on this window and on the spell window.

 

 

3 - add a "defaultActivateSelfTRIG" object to each location you want people to take off their clothes. Edit each instance and remove the default script. Then create

a new script, call it LVENakedActivator then add this code as it's source.

 

__________________________________________________________________

Scriptname LVENakedActivator extends ObjectReference

 

spell property LVENakedSpell auto

 

Event OnTriggerEnter(ObjectReference triggerRef)

;debug.notification("found something!")

Actor akactionRef = triggerRef as Actor

if (akActionRef != game.getplayer() && !akActionRef.isincombat())

;debug.notification("effect applied")

LVENakedSpell.cast(akactionref,akactionref)

endif

endEvent

 

Event OnTriggerLeave(ObjectReference triggerRef)

Actor akactionRef = triggerRef as Actor

if (akActionRef != game.getplayer())

;debug.notification("effect removed")

akActionRef.dispelspell(LVENakedSpell)

endif

endEvent

__________________________________________________________________

make sure to auto fill the properties of each instance.

Hi there. I've followed this vebatim with the exception of the name, instead is LVE I've gone with DD in all instances. As far as I can tell this shouldn't make any difference. For some reason though, it doesn't want to work for me. My character enters the areas as clad as ever. Is anything missing from this discription by any chance?

Link to comment
Share on other sites

  • 4 years later...

 

I forget where I got this but here goes:

 

1 - Create a new magic effect and call it LVENakedEffect change the following:

 

Effect Archetype: Script

Casting Type: Constant Effect

Assoc. Item 1: None

FX Persist: (check this box)

Hide in UI: (check this box)

 

Now when those are right hit ok, Then edit the object to pull up the same window you just hit ok on. You should now be able to add scripts so click "add" at

the bottom right and create a new script called "LVEnakedeffectscript" and add the following as its source

 

__________________________________________________________________

Scriptname LVEnakedeffectscript extends activemagiceffect

 

armor property JewelryRingGold auto

 

Event OnEffectStart(Actor akTarget, Actor akCaster)

;debug.notification("effect script: adding effect")

akTarget.unequipall()

endEvent

 

Event OnEffectFinish(Actor akTarget, Actor akCaster)

;debug.notification("effect script: removing effect")

akTarget.additem(jewelryringgold,1,true)

akTarget.equipitem(jewelryringgold,false,true)

akTarget.removeitem(jewelryringgold,1,true)

endEvent

__________________________________________________________________

Make sure you auto-fill it's properties as well.(edit the script source and save it again, this should enable you to use auto-fill.)

 

 

2 - Go to spells and make a new spell called "LVENakedSpell" then change the following:

Casting: Constant Effect

Ignore resistance: (check this box)

Auto-Calculate: (uncheck this box)

then add a new effect and make that effect "LVENakedEffect" and set it's duration to a very long time, like 10000 seconds. Hit ok on this window and on the spell window.

 

 

3 - add a "defaultActivateSelfTRIG" object to each location you want people to take off their clothes. Edit each instance and remove the default script. Then create

a new script, call it LVENakedActivator then add this code as it's source.

 

__________________________________________________________________

Scriptname LVENakedActivator extends ObjectReference

 

spell property LVENakedSpell auto

 

Event OnTriggerEnter(ObjectReference triggerRef)

;debug.notification("found something!")

Actor akactionRef = triggerRef as Actor

if (akActionRef != game.getplayer() && !akActionRef.isincombat())

;debug.notification("effect applied")

LVENakedSpell.cast(akactionref,akactionref)

endif

endEvent

 

Event OnTriggerLeave(ObjectReference triggerRef)

Actor akactionRef = triggerRef as Actor

if (akActionRef != game.getplayer())

;debug.notification("effect removed")

akActionRef.dispelspell(LVENakedSpell)

endif

endEvent

__________________________________________________________________

make sure to auto fill the properties of each instance.

Hi there. I've followed this vebatim with the exception of the name, instead is LVE I've gone with DD in all instances. As far as I can tell this shouldn't make any difference. For some reason though, it doesn't want to work for me. My character enters the areas as clad as ever. Is anything missing from this discription by any chance?

 

Hey I just made this work in Skyrim SE, and essentially it works the same way. I had a couple of mistakes at first but you have to be careful to follow each instruction and make sure that whatever you name your spells and effects is updated in the script part as well. For example, the fact that you used "DD" instead of "LVE" needs to be updated in the block of code you are adding to the scripts. Also make sure you edit the magic effect part as well as the object activator.

 

I missed the part at first where you are supposed to add a script block to the magic effect as well as the script activator.

Link to comment
Share on other sites

  • 4 months later...

I forget where I got this but here goes:

 

1 - Create a new magic effect and call it LVENakedEffect change the following:

 

Effect Archetype: Script

Casting Type: Constant Effect

Assoc. Item 1: None

FX Persist: (check this box)

Hide in UI: (check this box)

 

Now when those are right hit ok, Then edit the object to pull up the same window you just hit ok on. You should now be able to add scripts so click "add" at

the bottom right and create a new script called "LVEnakedeffectscript" and add the following as its source

 

__________________________________________________________________

Scriptname LVEnakedeffectscript extends activemagiceffect

 

armor property JewelryRingGold auto

 

Event OnEffectStart(Actor akTarget, Actor akCaster)

;debug.notification("effect script: adding effect")

akTarget.unequipall()

endEvent

 

Event OnEffectFinish(Actor akTarget, Actor akCaster)

;debug.notification("effect script: removing effect")

akTarget.additem(jewelryringgold,1,true)

akTarget.equipitem(jewelryringgold,false,true)

akTarget.removeitem(jewelryringgold,1,true)

endEvent

__________________________________________________________________

Make sure you auto-fill it's properties as well.(edit the script source and save it again, this should enable you to use auto-fill.)

 

 

2 - Go to spells and make a new spell called "LVENakedSpell" then change the following:

Casting: Constant Effect

Ignore resistance: (check this box)

Auto-Calculate: (uncheck this box)

then add a new effect and make that effect "LVENakedEffect" and set it's duration to a very long time, like 10000 seconds. Hit ok on this window and on the spell window.

 

 

3 - add a "defaultActivateSelfTRIG" object to each location you want people to take off their clothes. Edit each instance and remove the default script. Then create

a new script, call it LVENakedActivator then add this code as it's source.

 

__________________________________________________________________

Scriptname LVENakedActivator extends ObjectReference

 

spell property LVENakedSpell auto

 

Event OnTriggerEnter(ObjectReference triggerRef)

;debug.notification("found something!")

Actor akactionRef = triggerRef as Actor

if (akActionRef != game.getplayer() && !akActionRef.isincombat())

;debug.notification("effect applied")

LVENakedSpell.cast(akactionref,akactionref)

endif

endEvent

 

Event OnTriggerLeave(ObjectReference triggerRef)

Actor akactionRef = triggerRef as Actor

if (akActionRef != game.getplayer())

;debug.notification("effect removed")

akActionRef.dispelspell(LVENakedSpell)

endif

endEvent

__________________________________________________________________

make sure to auto fill the properties of each instance.

 

 

In following these instructions, I'm running into an issue- neither of the scripts will auto-fill the properties. I've taken the normal steps- resaving and recompiling the scripts, restarting CK. Any ideas what the reason might be? Even if someone can give me pointers on how to set them manually, I think that would help.

 

Thank you for the help.

Link to comment
Share on other sites

I struggled trying to get auto strip to work for a long time . After seeing this post from jpitner I used a mod from the Nexus called 'Springwood Estate - Player Home' . I checked the following items carefully - Activation Trigger , Spell . Magic Effect and Armor (Gold Ring) . Auto fill didn't work for me either but if you have all the correct values in place then it will appear in the drop down menus . If it appears to not work try getting the npc to enter and leave the trigger area a couple of times . I know very little about scripting but this is how I got it to work . I am still trying to figure out hope to auto strip player . Hope this helps .

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...