Jump to content

CK Help: check for clothed/naked pc?


GeorgiaCav

Recommended Posts

I'm writing some idle dialogues for some NPC's I'm creating, and I want to make some of the idle comments only trigger if the player is naked, restrained, etc.

 

My question, being a noob to giving NPC's dialogue in the CK, is which condition function do I use, and with what target and settings, to detect whether the player is naked so the comments get triggered only when that happens?

 

I see "GetEquipped" and FormList: Naked List, which I assume is clothing the game considers to be naked. Is there another function for detecting whether the player has *anything* equipped that would be considered clothing?

 

Also: if I want to trigger certain things only when the player is restrained, do I have to load Zaz or DD or other esm's or esp's, or can I do that check using only vanilla esm's? (GetRestrained with target Player, perhaps?)

 

Any help appreciated, and if this is the wrong forum I apologize. 

Link to comment

Sadly a perfect condition function does not exist.

 

But you can try that:

* To check if an actor is "naked" you can use getClothingValue, if it is 0, or really low, you can consider it naked.

 

If you want a condition that relies on Zaz or DD, then you have two options:

(easy): put a dependency on Zaz or DD and use getEquipped. This will create a hard dependency though

(complex): this requires scripting. Create a quest, add a Conditional Property, then add an alias to the player.

In the quest script use a soft dependency to Zaz and DD (if Game.GetModByName("Zaz...")!=-1   zbf zaz = game.getModFromFile(0x12345, "zaz...") )

And in the alias use the events onItemEquipped and onItemRemoved, check if the zaz or DD item is there, and then set the value of your conditional variable.

Then use a condition function based on this conditional property (getVMQuestVariable...)

 

Link to comment

Sadly a perfect condition function does not exist.

 

But you can try that:

* To check if an actor is "naked" you can use getClothingValue, if it is 0, or really low, you can consider it naked.

 

If you want a condition that relies on Zaz or DD, then you have two options:

(easy): put a dependency on Zaz or DD and use getEquipped. This will create a hard dependency though

(complex): this requires scripting. Create a quest, add a Conditional Property, then add an alias to the player.

In the quest script use a soft dependency to Zaz and DD (if Game.GetModByName("Zaz...")!=-1   zbf zaz = game.getModFromFile(0x12345, "zaz...") )

And in the alias use the events onItemEquipped and onItemRemoved, check if the zaz or DD item is there, and then set the value of your conditional variable.

Then use a condition function based on this conditional property (getVMQuestVariable...)

 

Thanks! I'm going to try setting GetClothingValue to check for <1 and see if that works well enough or at all.

 

As for the other thing, looks like it's either no restraint checking or a hard dependency.  :cool:

Link to comment

For the player being naked

Look at the vanilla WICommentNaked quest in the CK.  Under the Quest Data tab there will be a section named Quest Dialogue Conditions.  The ones of interest are "WornHasKeyWord".  If ran on the target (the player) and the value is 0 (zero) then that will tell NPCs the player is 'naked' as the vanilla game interprets it.

 

For the player being restrained

You don't need to make a framework a master file to your mod to use their keywords.  For instance, DD armbinders and Zaz wrist cuffs booth use the keyword 'zbfWornWrist'.  You can add that keyword to the vanilla keywords list in your mod.

Here's how to do it

 

 

Just go to keywords in the Object Window.  Right click and New.  Name the ID zbfWornWrist and use these color values ( R 64, G 0, B 128).  The resulting color should be purple.  Click OK and then save the esp.  You now have a DD/Zaz keyword in your mod without any dependencies.  Other mods (including the framework ones) will interpret your zbfWornWrist keyword as the original and work as intended.  I use this method for modded items I don't want stripped during sex by adding the SexLabNoStrip keyword to my esps.  It works like a charm.

 

 

If you use the new keyword like the vanilla WICommentNaked quest does with "WornHasKeyWord" then if the player is wearing any item that uses the keyword NPCs will recognize it and react (comment, spank, screw, etc.)

Link to comment

For the player being naked

Look at the vanilla WICommentNaked quest in the CK.  Under the Quest Data tab there will be a section named Quest Dialogue Conditions.  The ones of interest are "WornHasKeyWord".  If ran on the target (the player) and the value is 0 (zero) then that will tell NPCs the player is 'naked' as the vanilla game interprets it.

 

For the player being restrained

You don't need to make a framework a master file to your mod to use their keywords.  For instance, DD armbinders and Zaz wrist cuffs booth use the keyword 'zbfWornWrist'.  You can add that keyword to the vanilla keywords list in your mod.

Here's how to do it

 

 

Just go to keywords in the Object Window.  Right click and New.  Name the ID zbfWornWrist and use these color values ( R 64, G 0, B 128).  The resulting color should be purple.  Click OK and then save the esp.  You now have a DD/Zaz keyword in your mod without any dependencies.  Other mods (including the framework ones) will interpret your zbfWornWrist keyword as the original and work as intended.  I use this method for modded items I don't want stripped during sex by adding the SexLabNoStrip keyword to my esps.  It works like a charm.

 

 

If you use the new keyword like the vanilla WICommentNaked quest does with "WornHasKeyWord" then if the player is wearing any item that uses the keyword NPCs will recognize it and react (comment, spank, screw, etc.)

 

WornHasKeyword keywords are ArmorCuirass and ClothingBody; must have a condition for each and both must == 0.

 

The other solution is one of those things that seems so simple once you see it, but I just didn't have the background knowledge and experience of how this stuff works to come up with it. Thank you for your help! Would the same process work for furnitures like crosses, horses, etc.?

Link to comment

Yeah, ArmorCuirass and ClothingNody are the ones.  You can copy those directly from that quest to yours and they will work.  They can also be used as individual dialogue line conditions, just in case you don't want those conditions governing the entire quest.  For the restrained player option it would be the same thing, just swap out ArmorCuirass or ClothingBody with zbfWornWrist and change the value from 0 to 1.  Just be sure all of those are ran on the target, not the subject.

 

No idea about furniture, etc.  Never tried it so let me know how it works out.   :D  And no problem about the help.  I wouldn't have known about the keyword copying thing if I didn't have the nasty habit of PMing modders and asking them questions.  What's the worst that could happen?  They don't answer?  *meh*  Find someone who will.   :P   As long as you do your research and at the very least show effort most modders here will help you.  It's the 'can you make this for me' types that hit brick walls.  ;)

Link to comment

They are 13 keywords for the vanilla (just Skyrim not DLCs) clothes. 2 of them are overlapping in all cases (so you can ignore them.)

But the other ones may happen anytime.

 

The real problem is the custom armors. The usually do not respect the vanilla keywords, so this approach will fail with them.

 

Link to comment

For what GeorgiaCav has laid out my suggestions will work.  No matter what keywords are associated with an item the game looks for two when determining if the player wearing armor or clothing; ArmorCuirass and ClothingBody.  And that is it.  No more, no less.

 

And if equipping an item is forced by a script the NPC will swap out whatever is equipped if it lacks the ArmorCuirass or ClothingBody keywords.  That's why NPCs will change outfits when cells load, fast travelling etc.  They look for the keywords associated with the items in their inventories and equip what has them, ignoring those that don't.

 

As for modders NOT including keywords they should; when I make a mod there are only two considerations.  Does what I'm making break the vanilla game and does it break the framework I might be using.  If the answer is 'no' to both of those then I move forward.  Taking into account what other modders may or may not have done, broken or forgotten is wasted energy.  There are simply too many mods and modders for something like that to be a consideration.  There is no accounting for the bad habits of other modders so there's no reason to worry about it.

Link to comment

Archived

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

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use