Jump to content

[WIP] Automatic NPC Clothes Changing Mod


cherrygalaxy

Recommended Posts

Isn't it fun to download new clothes mods and put them on your character, or your NPCs? Well, I was thinking it would be even more fun if NPCs changed their own clothes. It seems like this would add some more variety and realism to the game.

 

I have been working on what is basically a modder's mod. It is code to allow NPCs to change their own clothes based on what they find in containers in the area. However, it has to be implemented on a container by container basis, so it will be mostly for modders who are building or editing cells.

 

My plan is to do a demo mod on the Bathing Beauties Luxury Suite, though I haven't asked Migal for permission yet. Hopefully this will show other modders just how easy it is to implement, and provide at least one mod where my code is used.

 

When it is complete, I plan on releasing the code for anyone to use or edit freely. I am posting this in advance of completion of the code to gather feedback, and as a placeholder for release of the code/mod.

 

I still have a few open issues that I am working on, and I have posted the most major one in a separate thread, as I feel it is a wider topic than just my mod. Click here for more detail.

 

Features

  • Random equipping of clothes/armor by NPCs.
  • Modders or players can fill up containers with whatever armor or clothing they choose and the NPCs will select from what is in there.
  • Current intended implementation would be introducing new markers in locations for NPCs when they are sandboxing (wandering around) that will make them appear to be searching a container, and their clothes would unequip and they would choose new clothes out of the container.
  • Attempts to equip matching outfits. This is just based on the name of the armor or clothing, nothing fancy.
  • After an NPC uses the container, their outfit will be converted to regular removable/equipable clothes or armor.
  • Random jewelry equipping. Slot checks are done to ensure that jewelry equipping will not cause clothing to be removed.
  • Player characters are explicitly excluded, so player equipment won't suddenly switch if this code is used directly in a container.
  • Would like to have: I want to be able to allow different NPCs to have different bodies but still equip the right clothes. This is what I am posting about in my separate thread, mentioned above.

 

Code Features

  • Easy to use – I have attempted to make this code as easy to implement as I can think of. Even though the code will be open, I have exposed a couple options as Properties, for modders who aren't coders.
  • Modular – hopefully other developers will be able to make uses of pieces of my code. For example, I have code which allows you to peel apart slot masks to determine which slots a piece of armor covers, and detect possible conflicts.
  • Low memory usage – I have attempted to utilize a low amount of memory, where possible. For example I make arrays of FormIDs instead of using the actual objects. This does have some drawbacks and I would be open to changing 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