Home | Download | Discussion | Help | Site Map | New Posts | Sign in

Latest Site News

2018 MTS Calendar Contest - posted on 12th Nov 2017 at 8:48 PM
Replies: 174 (Who?), Viewed: 95966 times.
Page 1 of 7
The ModFather
staff: retired moderator
Original Poster
#1 Old 15th Dec 2005 at 1:57 AM Last edited by leefish : 17th Jan 2014 at 6:37 PM.
Default Simantics and BHAVs
>>> Modding InfoCenter <<<

A workshop about Simantics and BHAVs

By AdidasSG2


DISCLAIMER: This is NOT a tutorial; it is intended to help average-experienced object creators performing specific tasks, or to give users a deeper in-sight on specific modding-related subjects. So, don't expect to find step-by-step explanations, to be performed "blindly". Please DO NOT REPOST the following info, or part of them, on other sites.


CREDITS: Some of the following information can be found scattered on the various forums, but special credits go to ADIDASSG2 for having collected and organized them, and for having provided a lot of additional info, by experimenting on the various instructions. AdidasSG2 will mantain this thread, adding new information as he gathers them; and will answer to questions about the subject of this article.

-------------------------------------------------------------------------------------

SUMMARY
The BHAVs (Behaviour functions), are for sure the most complex known Sims2 filetype. Oll the functions of an objects, the sims' behaviour, the NPCs activities are coded into BHAVs.

AdidasSG2 has created, and still the work is in progress, an extremely valuable articles about BHAVs and BHAV editing. All of AdidasSG2's articles are posted below, on post #2. Please check beck to see the additions and changes that AdidasSG2 will make to post #2.
These InfoCenter articles are provided in PDF format. To view them, we strongly suggest to download the Foxisoft PFD Viewer: it's free and small, less than 1Mb!



-------------------------------------------------------------------------------------

OTHER USEFUL RESOURCES

Modding InfoCenter Index - Comprehensive list of all the InfoCenter threads
Programmer's Guide to BHAVs - by Echo
Tutorial: Making Your First Custom BHAV - by Echo




-------------------------------------------------------------------------------------




.

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
50 users say thanks for this. (Who?)
Advertisement
Test Subject
#2 Old 17th Dec 2005 at 12:10 AM Last edited by AdidasSG2 : 8th Sep 2006 at 12:10 AM.
BHAV Tutorials
A series of documents that will cover SimAntics BHAV's.
What are they?/How do they work!?/ and much much more!

Learn to understand it's OpCodes and Operands

So get ready to sit down and learn!, and have some fun.

New Addition:

Set To Next

Hmmm...I wonder what I will set to next be?
Download - please read all instructions before downloading any files!
File Type: zip SimAnticsSleepExpression.zip (317.2 KB, 1656 downloads)
File Type: zip SimAnticsCNOIandROI.zip (169.8 KB, 1281 downloads)
File Type: zip SimAnticsIII.zip (721.1 KB, 1407 downloads)
File Type: zip UnderstandSimAntics.zip (176.7 KB, 1701 downloads)
File Type: zip SimAnticPart4.zip (83.2 KB, 1353 downloads)
File Type: zip SimAntics Excel Tables.zip (1.24 MB, 1516 downloads)
File Type: rar SimAnticsPart5DialogandArray.rar (916.6 KB, 1332 downloads)
File Type: zip SimAntics6Lua.zip (717.4 KB, 1238 downloads)
File Type: rar Simantics7ManangeInventory.rar (291.2 KB, 1091 downloads)
File Type: rar SetToNext.rar (234.3 KB, 1080 downloads)
Test Subject
#3 Old 24th Jan 2006 at 11:44 PM
Check it out!
Test Subject
#4 Old 26th Jan 2006 at 11:56 PM
Spread Sheet files listed for those references you cannot find! :-)
Test Subject
DELETED POST
18th Feb 2006 at 6:29 PM
This message has been deleted by cederlina.
Guest
#5 Old 18th Mar 2006 at 2:18 AM
Hey Adidas, EXCELLENT work on these tutorials. I'm an experienced programmer so I was able to pick it up for the most part but thanks to your work in this community, modding sims2 is a joy now! I remember trying to mod the original sims and was fed up with the lack of information, tools and limited things you could do and lost interest being frustrated. Now with your awesome tuts and SimPE, I'm excited to do some cool stuff now!

I followed your burglar alarm tut verbatim but mine never creates the glass of water. The pie is there and I can activate it but it doesnt do anything. I can see the sims twitch though like something happened. Oh well. The part where you hurry through the "- TEST" BHAV part was a bit confusing so I bet I messed up there.
Test Subject
DELETED POST
30th Mar 2006 at 11:01 PM Last edited by AdidasSG2 : 3rd Apr 2006 at 10:31 PM.
This message has been deleted by AdidasSG2.
Texturing God
#6 Old 7th Apr 2006 at 5:04 PM
Thanks Numenor and Adidas for these, they are really, really helpful! :nod:

If you want to get my creations please visit my site. ExnemSims .
Space Pony
#7 Old 13th May 2006 at 2:15 PM
AdidasSG2,

Thank you - these really are excellent. Will you be doing more? I know, tutorials take so long to write up! These have helped me so much. I really appreciate the time & effort you put into this.

Morague
Test Subject
#8 Old 16th May 2006 at 10:59 PM Last edited by KusanagiKei : 16th May 2006 at 11:26 PM.
Great Tutorials AdidasSG2,

I'm sort of new at this modding thing and I'm having troubles creating a phone book service dialog on a T.V. My method of doing it is just by adding a simple behavior with the 0x0024 primative function:
0000000000050B000000140000170000
[prim 0x0024] Dialog (Scope: Private,
Type: Phone Book - Services: "Call %s",
Yes: [none],
No: [none],
Title: "Service Phonebook",
Cancel: [none],
icon: automatic,
wait for user,
block Sim. (Display the phone book dialog for services - uses private string table 147 to get service choices in. Returns index selected in array0 at position 0.))

I'm using a Text Lists to display the strings, like they do with all dialogs, however when I try to run the behavior in the game it just stops the sims and disappears (kind of like a sleep call (0x0000).

Has anybody had any progress in creating their own Phone book - service dialog? Does the Service dialog only specifically work for the phone? Do i need another function to call it up? I'm confused Thanks for any help u guys could give me :D
The ModFather
staff: retired moderator
Original Poster
#9 Old 17th May 2006 at 9:40 AM
When you test new BHAVs, you should play with the testingcheats active, so that when an error occurs, a message will be shown, and a log file will be created.
The log files are located in the document folder, in EA Games\The Sims 2\Logs; they are quite useful because they tell you (more or less) what happened when the sims disappeared.

That said, I'm not expert with this dialog, so I can't help you. But I thought to tell you about the logs, because the error might not be caused by the dialog, but rather by another problem.

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Test Subject
#10 Old 17th May 2006 at 6:29 PM Last edited by KusanagiKei : 17th May 2006 at 11:23 PM.
Thanks for the advice Numenor,
Although I haven't got the dialog to work yet, I have some idea as to what is going on :D
Test Subject
DELETED POST
5th Jun 2006 at 10:38 PM
This message has been deleted by AdidasSG2.
The ModFather
staff: retired moderator
Original Poster
#11 Old 5th Jun 2006 at 11:21 PM
Woot! Woot! Woot!

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Retired Duck
staff: retired moderator
#12 Old 6th Jun 2006 at 1:23 PM
Quote:
Originally Posted by AdidasSG2
Part 6 Is comming....LUA - LUA Scripts and of course Lua Primitive (0x7E)...


I'm certainly looking forward to this! LUA scripts are something I've yet to venture into in the sims... I'm very curious!
Test Subject
DELETED POST
8th Jun 2006 at 10:47 PM
This message has been deleted by AdidasSG2.
The ModFather
staff: retired moderator
Original Poster
#13 Old 9th Jun 2006 at 12:00 AM
41-45 pages?! Oh, my... I didn't expected it any shorter, but I guess I have to take a vacation (from work *and* from modding!) to read it all!

Thanks for the time you spend for these extremely useful guides!

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Test Subject
#14 Old 9th Jun 2006 at 10:35 PM Last edited by AdidasSG2 : 12th Jun 2006 at 10:48 PM.
Lua Is Up and Running! :-)

Sorry All, Had to repost the zip file, you will notice in the original PDF
there is some info missing in the LT. Green shaded section. Sorry about that!

Here is the new one, Full and Uncut!

SimAntics, What would life be without 'em!
Test Subject
#15 Old 14th Jun 2006 at 7:00 PM
I've been following your tutorials, they are excellent, but i have a small question...?

In tutorial two (sleep and expression) on the bottom of pg 7 you have us test out "translating" the Operands. I tried, and i got 08 0000 05 0B 000B
You said that the correct translation should be "Temporary Storage 0x0000 AssignTo: My Object ID" but on the excel spreadsheet (OpCode Expressions) with the data owners it says that 0x0B is "Temporary Storage [temp]"... I follow the rest of it but i don't know where you got "my object id" from. are there more lists than what you have provided? or is that entry wrong? or am i just insane/stupid?
Test Subject
#16 Old 14th Jun 2006 at 9:54 PM Last edited by AdidasSG2 : 19th Jun 2006 at 10:22 PM.
Kais.

I don't think that you are the first one to spot this, I think I may have a typo in there! I am not for sure, I will have to check it out!

I try to catch as many of the mistakes as possible, so I am sure a couple slip thorugh the cracks.

But indeed, the Translation should read:

Temporary Storage 0x0000 := My Object ID

If I have it correct in my mind, which I am not sure,
The operands would then translate to
Temporary Storage (0x08) 0x0000 (0x0000)
:= (0x05) (Assign)
My (0x03) object Id (0x0B)

This is the Actual translation, I checked it out and made sure it's right!

I hope this helps you!

SimAntics, What would life be without 'em!
Test Subject
#17 Old 20th Jun 2006 at 10:14 PM
Problem solved

SimAntics, What would life be without 'em!
Test Subject
#18 Old 27th Jun 2006 at 10:14 PM
Manage Inventory (0x33) Is Comming Soon to a forum near you! :-)

SimAntics, What would life be without 'em!
The ModFather
staff: retired moderator
Original Poster
#19 Old 27th Jun 2006 at 11:49 PM
You always concentrate on the most obscure and less documented instructions... Lucky us!

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Test Subject
#20 Old 30th Jun 2006 at 11:03 PM
I try to hit the one's that are used the most, but documented least to cover those first, also as to help modders get an understanding from the ground up! :-)

SimAntics, What would life be without 'em!
Test Subject
#21 Old 6th Jul 2006 at 10:44 PM
Manage Inventory Now up for Grabs!

SimAntics, What would life be without 'em!
The ModFather
staff: retired moderator
Original Poster
#22 Old 7th Jul 2006 at 12:44 AM
Grabbed!!! Thanks a million, this is a really valuable library where to gather information...

Ehm... I have a question, not related to the already issued guides... It's a quickie (or at least I guess it is) and it doesn't need a guide, actually...

In order to "move" the stack object to a specific object or sim, there are several Global BHAVs like "Verify - Object ID", "Verify - Stack Object ID" etc...; all these BHAVs use the Set to next primitive in a way that I really don't understand...
Well, I must confess that I don't understand most of the possible usages of the Set to Next primitive...

Cane you briefly explain the Set to Next primitive? Or do you think it's a subject that worths a guide?

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Test Subject
#23 Old 12th Jul 2006 at 10:46 PM
Numenor,

Well, well, well...let's just say you already guessed my next topic! :-) Yes! I am going to cover the "Set To Next" primitive in a guide :-}

If I can remember correctly, I think I have approx 10 pgs done so far....still working though! The reason I am covering it next is because I noticed the same thing too, when I was working on a couple of the previous guides already written... You know I have to make sure my sources are correct So when I ran across them, I decided I am going to cover that one after Inventory, becasue I also found a few (Inventories) that use that primitive as well.

So if you think you can wait a little while longer, you will get your answer.

(Now I am getting your curiousity up huh?? :~) )

So I hope this answers your question! And I hope you, and everyone else can hold on to their seats and get ready when it's released!

Thanx soooo much EVERYBODY for the comments! I enjoy them! And yes, you too Numenor ;-)

SimAntics, What would life be without 'em!
The ModFather
staff: retired moderator
Original Poster
#24 Old 12th Jul 2006 at 11:00 PM
I will quietly await until your next release...

Set to Next (Adidas' guide) - True target: Return YEAH!!! - False target: Return BOOOOOHHH!

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Corrosively Delightful
staff: retired moderator
#25 Old 30th Jul 2006 at 12:42 AM
Numenor, you crack me up. :D

Adidas, Thank you soooooo much for the guides. I have been devouring them, but I am not a programmer per se. I wonder if you might include in a future tutorial a short list of definitions into layperson? As simple when you see "stack object" it means X, or stack object's attribute means Y, as a quick example though I know I'm forgetting the ones that really throw me. LOL Just a quick clue-in for the non-programmer. Thanks so much, and it's cool if you haven't the time... I may end up learning programmer speak by the end of your series anyway ! hehe

If you're not having fun, you're not doing it right.
SO much to do and so many other things to distract me.
Page 1 of 7
Back to top