Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Theorist
Original Poster
#1 Old 11th Oct 2023 at 6:31 AM
Default How can I assign a specific job to a specific NPC?
I'm back to playing Sims 4 after a nearly 6-year hiatus. I love that they've added per household customization of Neighborhood Stories, so now I no longer need the no culling mod I used to use. However, I failed to protect some of the premade NPCs from Accidental Death and have lost them. I didn't realize role sims weren't immune to the culling. I've exported them from a fresh new game and imported them back into my save, but I can't seem to assign them to their intended jobs. First ones I'm trying to fix are the ones from Moonwood Mills. Celene López is supposed to be the bartender at Grimtooth Bar and Wolfgang Wilder the librarian.

I've tried:
  • First thing I tried was just deleting the current computer generated NPC. No go, it just generated a new one instead of picking the appropriate ones.
  • careers.add_career career_Adult_NPC_Bartender and careers.add_career Adult_NPC_Librarian. I can see it added the careers to them when I select them using MCCC, but deleting the current NPC just generates a new one.
  • Looked all over MCCC, but didn't find any option in the menus to do this.
  • NPCC v1.38b. Lets me pick Celene López, make her a bartender, and choose the Grimtooth Bar, but doesn't actually work. Deleting the current bartender just generated a new one. I didn't find any option for Librarian in there at all.
  • Zero's Assign NPC mod and all the extras. Neither Celene López nor Wolfgang Wilder show up in the mailbox list as selectable sims. I did try deleting the current bartender, and it prevented a new one from being generated, but nobody came to run the bar.

Not sure what else to try, but there's a bunch more after this I'd like to fix.

Resident wet blanket.
Advertisement
Scholar
#2 Old 11th Oct 2023 at 8:25 AM
Some NPCs also need a hidden trait, or they be ignored so if you want to make a sim a Butler, make the sim active and playable, and you would need to enter two cheats:

Code:
careers.add_career Butler
traits.equip_trait isButler


Then make them inactive and whatever you do, don't make them playable again or they will lose their careers.
Theorist
Original Poster
#3 Old 12th Oct 2023 at 3:02 AM
Thanks, I did find the trait isButler, but there's no trait for isLibrarian, isMixologist, or isBartender. I used MCCC to search for other traits containing the words librarian, library, or bartender and come up with nada. For mixologist, it did find a trait "Mixologist Certification", but adding that to Celene López didn't make any difference.

Resident wet blanket.
Scholar
#4 Old 12th Oct 2023 at 6:47 AM
I would use ShowSimInfo

Find a real NPC first, like a librarian, SSI gives you more detail and find if it has any hidden traits you must also apply, if not then idk maybe the game also wants a certain visible trait or skill-points.

I did have a lot of trouble making a Father Winter, that also required 2 cheats and some tweaking, haven't ever tried a librarian. But it appears that only needs 1 cheat, here is a good list here.

Good luck!
Smeg Head
#5 Old 12th Oct 2023 at 10:35 PM
The simfilter xml file for this job type does not require any specific traits, - not even to be a werewolf. But is has some requirements. That your intended bar worker sim lives in the region. Is not at all famous. Mixology skill of at least three points. And the one that's been tripping you up, that they be in the "career_Adult_NPC_Bartender_WolfTown" A job that is locked off from players giving it to sims, hence the game forcefully spawning new sim each time.

Though the career_Adult_NPC_Bartender_WolfTown xml can be edited so that the job will be available on the normal jobs list that players can give to sims by just removing the single line of code that otherwise blocks it. Though the usual problem with issuing a locked off NPC job to sims you intend to regularly play is more trouble than it's worth. The job is on call 24/7 - given a player can go to bar anytime - so playing such an employed sim they will always be more and more miserable for constantly missing work and if you try to be compassionate and send them to work they will never come home again, as the work shift is infinite. Though if you never intend to play sim, then job is fine.

And living in the region does not necessarily mean they actually permanently inhabit a house. Certainly they start off life in a residential house, but making them homeless afterwards also serves the requirement of living in the region. Normally, anyway, where worker NPCs are concerned. No point keeping them in a house they're going to hate living in because it's not the 24/7 work venue they eternally want to be at.

"Become a government informer. Betray your family and friends. Fabulous prizes to be won!" Red Dwarf - Back to Reality.

Find all my TS4 mods and lots here: Main Website - simsasylum.com My Section - coolspear's Mods & Lots
Theorist
Original Poster
#6 Old 13th Oct 2023 at 2:14 AM
Ah, thanks @coolspear1. That makes a lot of sense why it always generates a new werewolf sim for the job rather than using an existing sim. That also explains why no mod was able to work.
I don't intend to make the sim playable so I'm okay with them doing their intended jobs in the WolfTown. I've got her and Wolfgang Wilder in the townie pool.

It looks like for the non-WolfTown sims, my job turned out to be much easier. It looks like the rest got to keep any hidden traits they had when restored from the library. Simply deleting the computer-generated teacher from the high school was all it took for Rita Coombes to get her teaching job back (and she does have a hidden trait as @Citysim mentioned). Also the game already killed off the replacement ThrifTea owner on its own, so my next visit there, Eloise Hiddlestix was automatically given the role.

Resident wet blanket.
Theorist
Original Poster
#7 Old 13th Oct 2023 at 4:21 PM
I managed to get Celene López her job back, but I didn't know the first thing about TS4 modding and never even used Sim4Studio before. Ended up just changing random stuff and experimenting without knowing how anything works, so the fact it worked was probably a happy accident, lol!

I compared career_Adult_NPC_Bartender_WolfTown xml to career_Adult_NPC_Bartender. The only line different was near the top:
<SimData version="0x00000101" u="0x0000003F">
In the regular bartender career, the u="0x00000000".
I changed it to match the regular career_Adult_NPC_Bartender. Then in the cheats textbox, I entered:
careers.add_career career_Adult_NPC_Bartender_WolfTown [simid]
That actually did add the Mixologist career to her. Not sure if it would have done that whether I changed the u parameter or not. This didn't actually work though, it still created a new one.

2nd experiment, I tried removing the entire <V t="lives_in_region"> block from career_Adult_NPC_Bartender_WolfTown simfilter in the hopes that would get rid of any location requirements. Now it quit generating new bartenders. Instead, it would pull in existing random sims from anywhere, including ones in towns.

3rd experiment, I added the <V t="lives_in_region"> back in, but removed the <V n="street_for_creation" t="enabled"> block. It looked like maybe that block is what allows for creating new sims, and indeed that seemed to be the case. I also noticed in MCCC, Celene López location was just Homeless, but all the randos from my 2nd experiment had "Homeless (neighborhood)" where neighborhood was their neighborhood. When I'd put these sims back in, I'd put them on an empty lot in their appropriate neighborhoods and then evicted them, but that didn't seem to work on all of them. It definitely didn't work on any of the Moonwood Mill sims, but the Sulani ones I checked, it did work. Weird! Anyway, seeing Celene was missing the neighborhood, I put her in an empty lot. Then went back in. She still wasn't made Mixologist. Thinking maybe the Sim Filter wants to choose its own sims to assign a job, I did careers.remove_career career_Adult_NPC_Bartender_WolfTown [simid] on her to get rid of the job assignment from the first experiment. Then I re-entered the lot and BAM! She was made the Mixologist of WolfTown!
I have since evicted her back into the townie pool, and she's stayed the mixologist and her location is now "Homeless (Moonwood Mills)". Looks like with all that work, she's finally fixed. I went ahead and put all the townies back in the empty lot, let the game run for a few seconds, and then went back to evict them. It seems letting the game run for a few seconds after putting them on a lot is the reliable way of making sure they're associated with the neighborhood before evicting them.

Now to work on Wolfgang Wilder, there's no special role for him. Looks like it just uses career_Adult_NPC_Librarian, but the simfilter has the same restrictions for resident. I made the same edits, removing the <V n="street_for_creation" t="enabled"> block. No go, doesn't assign him. I've tried him in the empty lot, "Homeless (Moonwood Mills)". I tried adding and removing career_Adult_NPC_Librarian from him, still no go. He has all the requirements, but it's just leaving the role empty. No happy accidents on this one.

Definitely not worth the time to fix them, but it's become kind of an obsession.

Resident wet blanket.
Lab Assistant
#8 Old 13th Oct 2023 at 5:42 PM
Gauntlet101010 on Curseforge may have a mod you might be interested in.
Back to top