|Search this Thread|
|28th Sep 2017, 4:16 PM||How are NPCs linked to their uniforms? #1|
I'm creating a set of default NPCs and townies, but certain NPC types are linked to specific hairstyles and outfits that I don't want them to wear; I also don't want to create a simple default replacement package, as some of the items (in this instance, butler hair) are used by non-NPCs too. I would like to unlink the NPC from the CAS item, but I can't find any resource that could link the two. Any pointers?
|28th Sep 2017, 4:26 PM||#2|
Some NPCs are linked via the NPC spawning routine - the "Make New NPC" BHAV accepts arguments which include references to a specific outfit or hairstyle the NPC should wear. I don't think this is how it works for all NPCs, though, since those arguments don't appear to have been used in the basegame.
What I lack in decorum, I make up for with an absence of tact.
|28th Sep 2017, 8:18 PM||#3|
My current method is to spawn the NPCs using the NPC and townie maker in the game and replace them with Bodyshop sims via Alt Sim Surgery; when teleported to a lot, they spawn in and wear the everyday Bodyshop outfits fine, but when spawned by the game in the course of their duties as service NPCs, they have their uniforms (and uniform hair) on. It might be possible to override by editing their hidden work outfit category, but I get the feeling they'd just spawn in default items when next they are called to a lot.
|Yesterday, 4:08 PM||#4|
I've seen objects such as "NPC - Template - RepoMan". They seem to control some things about NPCs. There are Init and main functions and stuff.
This globals are used there:
[global 0x01B8] NPC - Put NPC Outfit On Me
[global 0x0137] NPC - Get Outfit GUID for Type in T[0,1] - this one calls Lua script, which is a bummer, unless you know how to read it, but maybe there's a way around it. For example, you could replace certain NPCs functions with custom ones and stick there GUIDs for your desired outfits.
I didn't know outfits could be objects and had GUIDs, but apparently you can find objects like "Outfit_NPC_Clerk Outfit - Template". This one mostly has a bunch of 3D ID referencing files. Presumably they point to real outfits' property sets. Might be your pointers.
|Yesterday, 11:03 PM||#5|
I have seen those template objects, but figured they were holdovers like the Big Boss NPC in the same collection. I'll clone one and see what I can tinker with, thanks a ton!
EDIT: Yep, those outfit templates are where they're stored! It's a simple 3IDR, and I traced them to the default hair and outfits, just like you said. There is also an AGED there that controls age/gender/species/skin color for spawning - could be very useful. Just have to test it out when I have time. Interesting side note: there are files for an NPC paramedic that I've never seen before, would have been a nice feature to have.
|Today, 8:55 AM||#6|
Yeah, I've heard something about there being ambulances with features that didn't make it to the light.