Simblesse Oblige Forum Index Simblesse Oblige
Forums for serious Simmers to share knowledge about The Sims 1
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Adding code to sims?

 
Post new topic   Reply to topic    Simblesse Oblige Forum Index -> Hacker's Hideout
View previous topic :: View next topic  
Author Message
DamonDamore
Moderator
Moderator


Joined: 26 Mar 2007
Posts: 2656

PostPosted: Mon Sep 03, 2012 9:31 pm    Post subject: Adding code to sims? Reply with quote

So, I had this idea from another thread. Sims are basically objects like anything else, albeit very complex objects.

NPCs are a lot like normal sims, just with extra code (mostly. I know some NPCs are truly special).

I was wondering if you could add new code to say, a saved townie (the ones that don't randomly vanish when you close the game).

My idea is to make townie versions of NPCs and add a line of code that prevents them from coming on a lot where their NPC version already is, and instructs them to leave ASAP if the NPC version shows up (This favors the NPC being an NPC, so that if you invite Townie!Maid over you won't have a doppelgänger OR Brigit refusing to show up or work).

_________________
Feel free to PM me. If you've already posed in a thread feel free to link me. Sometimes I miss posts in threads for whatever reason. :)
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
apathetic lizardman
Member
Member


Joined: 10 Feb 2011
Posts: 100

PostPosted: Sat Nov 17, 2012 8:01 pm    Post subject: Reply with quote

It should be pretty trivial to add new functionality to specific Sims, just change their OBJD/OBJf resource's "main" tree from the generic person main in PersonGlobals to a custom one. You might also be able to add custom interactions by modifying their TTAB resource, though I haven't tested this, and it's possible that having TTAB interactions overrides the default "persontype = 0" social interactions.

It's also possible to turn some NPCs into interactable Sims by setting their "person type" to 0. Gnohmon did this with liugnoservo.

_________________
http://www.yiffu.me/lizardmansims
Back to top
View user's profile Send private message Visit poster's website
André
Member
Member


Joined: 18 Dec 2010
Posts: 613
Location: Brasil

PostPosted: Mon Nov 19, 2012 2:53 pm    Post subject: Reply with quote

So if I change the "person type" to 0, I can interact with NPCs like normal Sims?
Back to top
View user's profile Send private message MSN Messenger
apathetic lizardman
Member
Member


Joined: 10 Feb 2011
Posts: 100

PostPosted: Sun Dec 02, 2012 2:03 pm    Post subject: Reply with quote

André wrote:
So if I change the "person type" to 0, I can interact with NPCs like normal Sims?


It depends on the NPC. Try experimenting with it.

_________________
http://www.yiffu.me/lizardmansims
Back to top
View user's profile Send private message Visit poster's website
André
Member
Member


Joined: 18 Dec 2010
Posts: 613
Location: Brasil

PostPosted: Thu Dec 06, 2012 4:03 pm    Post subject: Reply with quote

Well, I could not find the "Person type", where is it?

A while ago I added TTAB interactions for some NPC like the maid, iceman, butler, etc.. Now you can talk to them, tell jokes, dance, etc.
Back to top
View user's profile Send private message MSN Messenger
peter9g
Member
Member


Joined: 03 Sep 2006
Posts: 507

PostPosted: Sat Dec 08, 2012 5:02 pm    Post subject: Reply with quote

For the maid the person type is set in the init BHAV 4097
Code:

[ 0] : 20 6A: FD  1: FF FF: FF FF: FF FF: FF FF:   SemiGlobal BHAV [8298]
// PersonGlobals
[ 1] : 10  4: FD  2: FF FF: FF FF: FF FF: FF FF:   BHAV [4100] init traits
[ 2] :  0  2: FD  3:  0 20: 42  2:  5  0: 1A 12:   Assign To:
[..]                                      my person data Person Type
[..]                                      Constant Value from global.iff
[..]                                   // BCON 260, 2 [Person Types]
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Simblesse Oblige Forum Index -> Hacker's Hideout All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group