Welcome to
Mod The Sims
Online: 1195
News:
Have an account? Sign in:
pass:
If you don't have an account, why not sign up now? It's free!
Other sites: SimsWiki
Reply  Replies: 5 (Who?), Viewed: 1341 times.
Search this Thread
Old 28th Sep 2017, 4:16 PM DefaultHow are NPCs linked to their uniforms? #1
Qahne
Original Poster

Scholar

Join Date: Jun 2009
Posts: 1,008
Thanks: 2215 in 15 Posts
17 Achievements


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?

Quote:
Originally Posted by jje1000
If this succeeds, then we will have driven a stake through the metaphorical heart of pudding.

♥ Receptacle Refugee ♥
Now also on Tumblr !
Old 28th Sep 2017, 4:26 PM #2
Nysha
Née whiterider



Join Date: Jul 2005
Posts: 19,671
Thanks: 42583 in 92 Posts
36 Achievements

View My Journal


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.
Old 28th Sep 2017, 8:18 PM #3
Qahne
Original Poster

Scholar

Join Date: Jun 2009
Posts: 1,008
Thanks: 2215 in 15 Posts
17 Achievements


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.

Quote:
Originally Posted by jje1000
If this succeeds, then we will have driven a stake through the metaphorical heart of pudding.

♥ Receptacle Refugee ♥
Now also on Tumblr !
Old Yesterday, 4:08 PM #4
Lamare
just a girl

Join Date: Jan 2014
Posts: 631
Thanks: 3335 in 26 Posts
16 Achievements


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.

Assorted mods: Moving out and job options
Apartment rent agreement mod - fresh update
Testers wellcome on Electrical box & Fertile land
Functional sofa bed is ready to be tested as well
Old Yesterday, 11:03 PM #5
Qahne
Original Poster

Scholar

Join Date: Jun 2009
Posts: 1,008
Thanks: 2215 in 15 Posts
17 Achievements


Quote:
Originally Posted by Lamare
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.


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.

Quote:
Originally Posted by jje1000
If this succeeds, then we will have driven a stake through the metaphorical heart of pudding.

♥ Receptacle Refugee ♥
Now also on Tumblr !
Last edited by Qahne : Today at 6:06 AM.
Old Today, 8:55 AM #6
Lamare
just a girl

Join Date: Jan 2014
Posts: 631
Thanks: 3335 in 26 Posts
16 Achievements


Yeah, I've heard something about there being ambulances with features that didn't make it to the light.

Assorted mods: Moving out and job options
Apartment rent agreement mod - fresh update
Testers wellcome on Electrical box & Fertile land
Functional sofa bed is ready to be tested as well
Reply


Section jump:


Powered by MariaDB Some icons by http://dryicons.com.