Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

A change of clothes


vometia
 Share

Recommended Posts

This is one of those minor niggles that eventually becomes a major niggle: just because I'm conscious of it, I get to the point where I can't not notice. It applies to most games, though I'm thinking of Oblivion specifically, which is that NPCs wear the same clothes day after day, forever, and even during the night. It'd be nice to get them to change their clothes occasionally, but even when using levelled lists, sometimes it's a bit too occasional if you don't fail to see them for a complete respawn period (and keeping multiple items in their inventory in the hope that something different will be equipped is another headache in itself: I think best summed up by the well-known complaint "why on earth has the Bruma statue decided to wear that?!")

I was mulling over a more effective approach. I'd thought about scanning their inventory and if there are multiple items for any given slot, choosing one at random and equipping it; or having a number of chests for each NPC in question, each containing a complete wardrobe; or a whole bunch of other ideas that required knowledge of OBSE scripting way above what I currently have, that may be unpleasantly complicated or would be hideously slow and inefficient. Most likely "all of the above".

One idea that sort of works inasmuch as it handily circumvents the respawn time is a slight imposition on their sleep package (which can be done several ways: the one I chose was to add a quest script to their bed, which was also usefully generic) which added and then equipped some nightwear that occupies all their wearable item slots, then when they wake, removing it (while still equipped), which forces them to reevaluate their equipped attire. This also has the advantage that choosing and equipping their daywear is done with no further intervention on my part. But it still seems rather clumsy and not especially configurable.

I can't imagine I'm the first one to puzzle over this, but I can imagine that somebody else has looked at the problem and come up with a much more simple and elegant solution than my convoluted ideas. So does anybody know of one...?

Link to comment
Share on other sites

Quote from that mod ".....to over 790 Vanilla Npc in game."

Heh, this is what I first thought when reading this idea. It's a huge undertaking for a minor game effect. He uses a leveled list which sounds more efficient to me than adding a script to hundreds of NPC's to choose random clothes from inventory. That mod looks pretty cool. :heyyou:

Link to comment
Share on other sites

Interesting mod, and may save a lot of legwork on the choice aspect, but I notice the key phrase "every few days", so it still has the problem that the only time they'll "re-dress" is if you haven't been in the same cell for the minimum respawn time.

Maybe I should hone my "nightclothes" procedure a little: after all, it does actually work (though some effort may be required to avoid conflicts with the likes of See You Sleep). I think I just lack confidence in some of my own creations, especially as I find things like quests seem a little vague and ambiguous for my liking since I don't have a lot of experience using them; or rather not a lot of experience using them successfully. :lol: But it does solve two problems in one swell foop: it stops NPCs sleeping in their clothes since I made a few items of not terribly impressive looking nightwear (I've included a picture for the morbidly curious... spot the lazy arse badly cropping some of the existing clothes and even more artlessly recolouring them!) which occupies the torso, legs, feet and hand slots and as a result forces the equipping of new clothes once it's deleted from their inventory the next morning. I'm not entirely sure what happens if they equip clothes from levelled lists, though: I assume what usually happens after a respawn period, although I suppose there's a risk that their inventory will eventually fill up with unwashed clothes.

med_gallery_3_4_33022.jpg

Ineptly made night clothes: spot the former "Russet Felt Outfit", amazing what a pair of garden shears and a bottle of bleach can do. :heyyou:

Link to comment
Share on other sites

:heyyou: You made a nightie! Vometia, I think it's cute. Most of my characters wear the super ugly Short Britches and a lowerclass blouse of some sort to bed. But now you've inspired me. I may retex the fishing waders to look like rosebud print flannel, in homage to my favorite onesie from childhood.

No, I am not embarassed to have that known about me, thanks. :lol:

Link to comment
Share on other sites

The black version I did later is better: I hesitate to use any word that suggests "alluring", but at least it doesn't look like a tea-towel. :heyyou:

I'm not entirely sure what a onesie is, and may need further information before I feel I can properly point and snigger. Says the one who just posted the above picture!

Link to comment
Share on other sites

Oh yeah, while I was going on about tea-towels I forgot the actual reason I replied, which is that I can package them into an OMOD if you're interested. The female versions use Robert's body, but since both male and female versions are all-in-one outfits it hopefully doesn't make too much difference.

I've done "dark" and "light" versions; I've mentioned the female alternative already, the "light" male version is a sort of mildly unpleasant sky blue colour.

Link to comment
Share on other sites

Here's a modernish onesy, but it should illustrate the idea just fine.

Mmm, cozy! :wub:

Oh, now I understand. I suddenly feel curiously reticent about the subject of nightclothes. :heyyou: Except to say that it's a shame that headgear prevents the existence of hair and ears in Oblivion because a nice floppy night-cap (you know, like the Santa hats only not red) would be awesome. :lol:

Edit: and while I'm offering to make my nightie/dubious silk pyjamas available, I'll also help myself to your onesie if it happens!

Link to comment
Share on other sites

The night cap would be possible with ears and hair, but you'd need to make multiple versions for different hair styles and races that have different ears :heyyou:, The reason is you'd need to import and attach them to the hat model.

Edit: Maybe setting the hat up to take the Tail or Amulet slot mught avoid such an issue.

Link to comment
Share on other sites

Edit: Maybe setting the hat up to take the Tail or Amulet slot mught avoid such an issue.

I was thinking that might cause problems because I don't think those slots take "conformulated" items (though I may be wrong) but the usual approach seems to be to make the headgear in question slightly oversize; and a night hat is something where that would probably work quite well without it potentially looking a bit odd.

Of course that opens up a whole new can of worms which is if I can get the pointy bit (especially if a pom-pom is included!) to be influenced by gravity instead of being rigid. Could be an interesting sideline, though I suspect "interesting" may quickly become "frustrating". :heyyou:

Link to comment
Share on other sites

The things I can think of offhand that used tail or amulet slots (such as KD circlets etc) had to come in "regular" and "large" sizes to get around the problem of the lack of conformulation, though that's quite some time ago so things might've moved on since then; other jewellery e.g. earrings I think is normally stapled to the hair or ear meshes in order to work (I've used the former successfully). But a nightcap using the tail or amulet slot where a larger size wouldn't look incongruous wouldn't really need conformulation anyway; in fact for that matter I may even be able to make it part of the overall outfit without even using one of those slots as long as the weighting is correct, though I have to admit that the very idea of weight-painting beyond "bone weight copy" tends to make me go a funny colour.

As far as gravity is concerned, I'm pretty sure it's been done in other mods. But I suspect that I really shouldn't be encouraged to pursue that sort of thing as nothing good will come of it, unless large quantities of moaning and swearing have recently been recategorised as "good". :heyyou:

Link to comment
Share on other sites

Thanks! That gives me a lot of new angles on it; I'll have a thorough read of that when I'm more awake.

I eschewed OBSE for an awful long time having some wrong-headed ideas about using the most standard of all the tools available, even as a serial non-releaser. I think it's time to put that idea to bed, though.

Link to comment
Share on other sites

I've decided to give this another bash in... um... earnest? Something like that anyway.

I think there's two concerns of mine at this point. The first is the efficiency of the script that deals with changing in and out of nightwear, and the other is trying to get the PC to wear something different; because it seems my memory of how well this worked has failed me (how unusual!).

Starting with the latter point, can I get my NPCs to change their clothes when they wake up? Can I - er, "no", is the answer. I could've sworn that they'd pick something random from their inventory or that a levelled list would be recalculated, but sadly, neither happens. As ever, I can make no sense of why NPCs choose the items they do (my best guess is that they choose the first or last item found in their inventory that suits that particular slot which is why it only rarely changes) and it seems that my understanding of the mechanism of how levelled lists populate an inventory was incorrect. Or "sucked" to use the technical parlance.

If anybody knows a way of doing this without scripting it for each NPC I'd be curious to know: something like the nonexistent function "ResetInventory" would be perfect, except that it seems to not exist.

Second is my chunk of code. It's fairly simple, but I'm concerned about anything that says "gamemode" that runs on potentially dozens or even hundreds of NPCs. I think I'm more cautious about it than I really need to be, but I think it's better to be aware of something that might cause a huge slowdown or the AI lockup problem than just blindly plough ahead with no thought about the consequences.

The second part of where my memory failed me was thinking I'd attached a quest script to the bed, which now seems unlikely as I can't persuade the onactivate block to do anything when an NPC uses it. So that leaves me with a script that I can attach to the NPC themselves, either directly or via a quest, though I'm not sure that a separate quest (even if it's just a placeholder for the script) for every NPC is a good idea either. Apart from that, the pros and cons are, an object script runs more instantly so they'll have a change of clothes at the correct time; a quest-based script has a delay of a few seconds (or whatever it's set to) but in theory uses less resources. I'm inclined to think it doesn't matter much anyway since the priority of an object script in an unloaded cell is reduced so much that it's not like I'm going to have every occurrence running every frame. I hope.

I've included the script anyway to see if anyone has a serious "don't do that" comment; I'm afraid it's uncommented, but it's fairly straightforward (it uses "getsleeping" as its basis: my previous attempt to use "getcurrentaiprocedure" was incorrect as it turns out since it returns "sleep" even when they're still travelling to their bed, which could be some way off. Its useful values to me are 2, getting into bed, 0, not sleeping, and 3, sleeping). It could do with some polish, but it works well enough.

scn vssSleepScript


ref nightwear

short stage

short count

short package

short current


begin gamemode

	set current to getsleeping

	if (package == current) || (current == 4)

		return

	endif


	if (current == 2) || (current == 3)

		if (stage == 0)

			if (getrandompercent < 50)

				set nightwear to vssnightweardk

			else

				set nightwear to vssnightwearlt

			endif

			additem nightwear 1

			set stage to 1

		elseif (stage == 1)

			set stage to 0 ; in case of interruption

			if (nightwear != 0)

				if (getitemcount nightwear != 0)

					equipitem nightwear

					set stage to 2

				endif

			endif

		elseif (stage == 2)

			set package to current

		endif

	elseif (current == 0)

		set count to getitemcount vssnightweardk

		if (count > 0)

			removeitem vssnightweardk count

		endif

		set count to getitemcount vssnightwearlt

		if (count > 0)

			removeitem vssnightwearlt count

		endif

		set stage to 0

		set nightwear to 0

		set package to current

	endif

end

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...