Quick Reply
Search this Thread
Field Researcher
Original Poster
#1 Old 16th Jan 2006 at 12:47 PM
Default NPC Type in the SDSC
I had a look at the Wiki for this variable.

There's no values identified. So here's my questions -

1. Has anyone investigated how this variable is used? (I don't want to recreate someone else's work).

2. Will changing this value make a NPC into a townie or vice versa?

3. Do the Values relate to each NPC Type, or families of types?

4. What other values determine the NPC, and behaviour of. (It's not hard-coded into their BHAV file when it's generated is it? *puppy eyes*)

I notice that townies, have values of 0X000, but so does the pollination tech - who isn't a townie per se, but a non-interactive NPC (i.e. not an NPC that can become a player sim).

I'm assuming the Family ID determines whether they're townies or not - belonging to 0x7FFF or 0X0000

Other values that I've looked at:

Santa 0X0020
Therapist 0x0020 (Which suggests that there is something else that defines the type of NPC)
Both Santa and the Therapist belong to the same family.

Reaper 0x000F

NY Toddler 0X0000
Father Time 0x0000
Mrs Crumplebottom 0x0000
Hula Dancer 0x0000

Criminal 0x0004
Maid 0x0013
Newspaper Delivery 0X0016
Nanny 0x0024
Social Worker 0x001E

Taxi Driver 0x0005
Bus Driver 0x0005
Is this because they don't discriminate between vehicles?

And are the above values consistent in all neighborhoods?

Kiri

Simthing for everyone

"No Boom Today. Boom Tomorrow. Always Boom Tomorrow" - Ivanova (B5)
Having trouble with the Graphics card and Sims2? Feel free to pm me here, or in this forum at Leefish Sims 2 Graphic Cards
Field Researcher
#2 Old 16th Jan 2006 at 4:52 PM
What is a SDSC?

1. It's used to distinguish npcs of certain types from npcs of other types.

2. No. We have to change their family number to make them into townies.

3. It relates to each npc type.

4. Most of them are made from templates and those templates contains this npc type in the init file. But.. this type is not necessary. It makes things more easy, but it's not indispensable. You can clone each template and look over it.

Townies are... simliar to normal cas sims, but they have townies' family number, and they are created automatically. Overall they are very similar to normal sims. They are not like npcs.

Regarding the npc type, here's what I've got now. It corresponds to const 0x132.
Screenshots
Field Researcher
#3 Old 16th Jan 2006 at 5:05 PM
And it looks like taxi, schoold bus, wedding limo drivers are all school bus drivers.
Field Researcher
Original Poster
#4 Old 17th Jan 2006 at 2:42 AM
Coolness - thanks Christianlov!

Let me just explain what I understand, and see if it makes sense.

The NPC Type identifies, but not defines an NPC. Because the NPC is defined from the template it is created from.

The implication of that, is that you can't create an NPC from a CAS Sim, except by replacing the Clothing/face of an existing NPC.

We can however rely on the NPC type to identify which NPC we're replacing.

Is that right?

Many, Many thanks for the list - that's a big help! And also for your help with this.

Kiri

Simthing for everyone

"No Boom Today. Boom Tomorrow. Always Boom Tomorrow" - Ivanova (B5)
Having trouble with the Graphics card and Sims2? Feel free to pm me here, or in this forum at Leefish Sims 2 Graphic Cards
Slippery When Wet
#5 Old 17th Jan 2006 at 5:06 AM
Christianlov: Thanks for that list.
I had a similar list but not as complete. On mine I had type 03 as Pilots, not Boss.
I can't remember now if I peeked into the helicopters to check the blue shirts or not.
So perhaps the bus drivers are also qualified pilots?

Kiri: Chris is the expert on this, but from what I understand you can create an NPC from a CAS.
1/ You'd change their 'NPC type' and their 'family instance' in SDSC.
2/ Then go to FAMI and add them to the family list.
3/ Open the Sims Character file (N00?_User?????) and replace the BHAVs there with the ones from the corresponding template.
3a/ There may be more stuff that needs changing here, not sure.

When you move in an existing NPC to a lot, the only change I've noticed is the family instance. So for those that still 'half-act' like NPCs, you could probably do a similar change to fix them.

These are the special family instances.
0 - Dead
7ffc - downtownies
7ffd - kids taken by social worker
7ffe - townies
7fff - NPCs
Field Researcher
#6 Old 17th Jan 2006 at 11:58 AM Last edited by christianlov : 17th Jan 2006 at 12:05 PM.
I am not an expert.. I am just learning as a hobby..

tunaisafish(Jason) is an expert...

Methinks...

0x132:07 is boss and helicopter pilots also seem to be drivers. But I am not sure...
Field Researcher
Original Poster
#7 Old 18th Jan 2006 at 2:56 AM
I think you both are experts - learning as a hobby is what we're all doing.

Tunafish - with creating an NPC from CAS.

It would be a case of swapping over the things from the template yes?

Next question... what would happen if we created a New NPC template? What would I need to do to trigger it off... and would it be possible to create an object that would do it, if it didn't get automagically?

Kiri

Simthing for everyone

"No Boom Today. Boom Tomorrow. Always Boom Tomorrow" - Ivanova (B5)
Having trouble with the Graphics card and Sims2? Feel free to pm me here, or in this forum at Leefish Sims 2 Graphic Cards
Field Researcher
#8 Old 18th Jan 2006 at 4:42 AM
Quote: Originally posted by celebkiriedhel
Next question... what would happen if we created a New NPC template? What would I need to do to trigger it off... and would it be possible to create an object that would do it, if it didn't get automagically?

Kiri


Let's say you made a new template.

uhm.. you need an object which creates a new npc based on that template.

There is a primitive named make new character. You can run that primitive to create a new npc. You may need to refer to some maxis objects like npc pool.

Then you can give family number to the newly created npc, and so on, then you can spawn it.
Slippery When Wet
#9 Old 18th Jan 2006 at 8:01 AM
Kiri,
Just looked at an NPC's Character file and step 3a is going to have quiet a bit to it.
There's stuff from the template that would be unchanged, such as the BHAV, BCON, STR#, TTAs. Although you would need to fix the group numbers for each resource.
However, the init BHAV part would not be run. So depending on the NPC type you'd need to find out what goes on here and tweak the values manually. I know it's possible But for all practical purposes it would be far easier to makeover an existing NPC as you suggested.

Christianlov said "Let's say you made a new template. "
lol, easier said than done
Take a look at his All-In-One-NPC and Nanny project. My game would not be complete without them.
Field Researcher
Original Poster
#10 Old 18th Jan 2006 at 12:09 PM Last edited by celebkiriedhel : 18th Jan 2006 at 12:18 PM. Reason: just went and got the all-in-one-NPC downloads...
Lol - coolness - I haven't seen that.

OK. Continuing with the let's pretend.

From a changing a NPC's looks - we'd be better off, updating an existing NPC, or amending the mesh/texture that an existing template points to.

If we wanted to create a new type of NPC. Say for eg. a butler, that would work together with other hacks around, then we'd need to

1. Create an object (for an example, a packing box) that would call the primitive "Make New Character" on click-demand

Alternative Thought: Could we create a phone plug-in that would do the same thing? I know it was possible to create phone plug-ins for Sims1. Do you know if the coding of the phone is similiar?

2. Create an NPC Template with the
new GUID
new BHAVs and BCONs (and associated behaviour stuff)
new GMDCs and TXTRs (and associated mesh stuff),

3. Is there anything else we'd have to add?

Where all these thoughts are coming from... in a medieval, or at least non-modern society there was a number of npc's that did things that we don't have now - minstrels, jesters, butlers, etc, etc.

What would be very cool would be the ability to summon an npc, that fulfilled these functions - and maybe have a bell, or a bell pull, or something that had some phone fuctions that allowed the summoning of NPCs. (Costing simoleons to do so of course). And of course, have them in clothing similiar to what you'd expect from those people.

I'm assuming we can't generate new animations yet.

I'm in the fantasizing, wondering if it's possible stage of the idea. Assuming that it is possible, I'm expecting that the next stage will be getting down and dirty with the code.

Christian - is it ok, with your all-in-one NPC project - to pull it apart and ask questions on the off-chance that I may hope to one day understand it?

Kiri

edit: Wowsers! I just went and had a look at your all-in-one-NPC project. It's given me a lot to think about. I can come back and talk to you about it, I hope? I think it'll be a couple of days for me to get through all of that.

Simthing for everyone

"No Boom Today. Boom Tomorrow. Always Boom Tomorrow" - Ivanova (B5)
Having trouble with the Graphics card and Sims2? Feel free to pm me here, or in this forum at Leefish Sims 2 Graphic Cards
Field Researcher
#11 Old 20th Jan 2006 at 7:19 AM
In my opinion, you had better refer to Maxis objects, not amateur mods like mine. Maxis BHAVs and objects will be good examples and textbooks. I would like to recommend that you clone Maxis templates and objects to collect resources and look over them. It may take some time, but I think this is a starting point.
Back to top