Jump to content

Adding script to mod


iggypop1

Recommended Posts

Posted

In the screenshots they are already undressed, huh? 

 

To create a system like that my approach would be to put a Triggerbox onto the bath areas and attach a Script to that. Place a map marker out of bounds and everytime an Actor moves into the triggerbox, you create a chest on that marker and move all this actors items into this chest. Make sure to somehow mark the chest to belong to this NPC so that when that NPC walks out of the triggerbox, the game can find that chest again and move all of the chests Items back into the NPCs Inventory

This System works for NPCs & Player, the only thing you need to be aware of when working with the Player is that they have no AI to autoequip stuff when its added to their Inventory, so you also need to save the Players outfit and reequip that when they leave the box. It should work for an infinite number of Actors though

 

Theres probably an easier way to do it since Nexus modders never seem to make a system that works for the player too.. or maybe its just too much for them to handle, no clue

But that way would require the CK since map editing in xEdit isnt exactly.. easy. Also its probably nothing I would have a beginner handle. Its not complicated but not exactly on a tutorial level either I guess (which is why I assume theres an easier method)

Posted

It's doable, if a bit of a fuss.

 

Easiest thing by far is if you have an NPC that already has a suitable script. Then you can just copy/paste across. You're looking for the VMAD entry. (This is zEdit rather than xEdit, but it's close enough...)

 

image.png

 

That's a script attached to an NPC in my current project. You can see the script name and the script properties. Ideally you want a donor NPC with just the script you need and no Object properties, or at least none that need changing. Then you can just copy the VMAD section and paste it into the new NPC.

 

That's if the target NPC has no scripts already. If not you'll need to add a new slot to the Scripts arraym and then paste the script (not the VMAD this time) into the new slot.

 

Also, beware of trying to set up object  properties from xEdit or zEdit. I've had them set up so they looked perfect, but they didn't start working until I'd set them from the CK. You can probably change what an existing prop points to without problems, but it's a tricky area and best avoided if you can.

 

If you don't have a suitable script, you'll need to compile papyrus without the CK. Which is doable, but that's a whole 'nother conversation.

 

 

Posted
24 minutes ago, DocClox said:

It's doable, if a bit of a fuss.

 

Easiest thing by far is if you have an NPC that already has a suitable script. Then you can just copy/paste across. You're looking for the VMAD entry. (This is zEdit rather than xEdit, but it's close enough...)

 

image.png

 

That's a script attached to an NPC in my current project. You can see the script name and the script properties. Ideally you want a donor NPC with just the script you need and no Object properties, or at least none that need changing. Then you can just copy the VMAD section and paste it into the new NPC.

 

That's if the target NPC has no scripts already. If not you'll need to add a new slot to the Scripts arraym and then paste the script (not the VMAD this time) into the new slot.

 

Also, beware of trying to set up object  properties from xEdit or zEdit. I've had them set up so they looked perfect, but they didn't start working until I'd set them from the CK. You can probably change what an existing prop points to without problems, but it's a tricky area and best avoided if you can.

 

If you don't have a suitable script, you'll need to compile papyrus without the CK. Which is doable, but that's a whole 'nother conversation.

 

 

The thing is its a bathing mod(wich contains naked NPCs as props) and i would like the pools/water area as a general stripzone as in the mod https://www.nexusmods.com/skyrim/mods/11427 So my  followers can autoenjoy as well as my PC

So attaching script to zones is prob out of my league?

 

Thank you for response anyway

Posted
41 minutes ago, Scrab said:

In the screenshots they are already undressed, huh? 

 

To create a system like that my approach would be to put a Triggerbox onto the bath areas and attach a Script to that. Place a map marker out of bounds and everytime an Actor moves into the triggerbox, you create a chest on that marker and move all this actors items into this chest. Make sure to somehow mark the chest to belong to this NPC so that when that NPC walks out of the triggerbox, the game can find that chest again and move all of the chests Items back into the NPCs Inventory

This System works for NPCs & Player, the only thing you need to be aware of when working with the Player is that they have no AI to autoequip stuff when its added to their Inventory, so you also need to save the Players outfit and reequip that when they leave the box. It should work for an infinite number of Actors though

 

Theres probably an easier way to do it since Nexus modders never seem to make a system that works for the player too.. or maybe its just too much for them to handle, no clue

But that way would require the CK since map editing in xEdit isnt exactly.. easy. Also its probably nothing I would have a beginner handle. Its not complicated but not exactly on a tutorial level either I guess (which is why I assume theres an easier method)

 

41 minutes ago, Scrab said:

In the screenshots they are already undressed, huh? 

 

To create a system like that my approach would be to put a Triggerbox onto the bath areas and attach a Script to that. Place a map marker out of bounds and everytime an Actor moves into the triggerbox, you create a chest on that marker and move all this actors items into this chest. Make sure to somehow mark the chest to belong to this NPC so that when that NPC walks out of the triggerbox, the game can find that chest again and move all of the chests Items back into the NPCs Inventory

This System works for NPCs & Player, the only thing you need to be aware of when working with the Player is that they have no AI to autoequip stuff when its added to their Inventory, so you also need to save the Players outfit and reequip that when they leave the box. It should work for an infinite number of Actors though

 

Theres probably an easier way to do it since Nexus modders never seem to make a system that works for the player too.. or maybe its just too much for them to handle, no clue

But that way would require the CK since map editing in xEdit isnt exactly.. easy. Also its probably nothing I would have a beginner handle. Its not complicated but not exactly on a tutorial level either I guess (which is why I assume theres an easier method)

Here in this mod it works for PC and NPCs ??https://www.nexusmods.com/skyrim/mods/11427 My vain idea was that i could just drag the stripscript part over in TESEdit, but hm the mod introduses a lot of locationized baths/pools.......

Posted

You could set up a OnCellAttach event or similar for them, and then strip them if they were in the pool room.

 

Probably still more trouble than its worth with xedit, but that's how I'd approach it.

 

Have you considered just getting the CK?

Posted
30 minutes ago, iggypop1 said:

Here in this mod it works for PC and NPCs

Well, I guess there are mods that do it over on Nexus then :)

Though the mod you link doesnt include sourcefiles (Why I dont respect Nexus modders 101) so that wont really help you as none of us can tell you which Script you need to make it work and if they work properly if used somewhere else 

 

OnCellAttach() would also have the issue of it having to be applied to every Actor in that ever wanted to use this Feature as that Event only fires for an specific Actor or Alias. For Aliases you needed to run Scans which is overkill for this sort of thing

 

 

Your best bet seems to be to go on it from scratch

 

Posted
1 hour ago, DocClox said:

You could set up a OnCellAttach event or similar for them, and then strip them if they were in the pool room.

 

Probably still more trouble than its worth with xedit, but that's how I'd approach it.

 

Have you considered just getting the CK?

Yes need to learn how to use the CK....some years ago i managed to make a couple of TwinFollowers but i forgot every thing so ok start from scratch

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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