Welcome to Mod The Sims.
Have an account? Sign in:
User Name:  
Password:  
If you don't have an account, why not
sign up now? It's free!
Other sites: · Yearbook
Tutorial: Making Your First Custom BHAV

Reply
 
Old 25th Mar 2006, 01:10 PM DefaultTutorial: Making Your First Custom BHAV # 1
Echo
Original Poster

Drive-by modder
     



Join Date: Dec 2004
Posts: 3,281
Thanks: 34481 in 49 Posts

View My Journal


This tutorial steps you through the process of adding a completely new behaviour to an object. It assumes no prior experience with BHAV programming, (or any programming really, although it would certainly give you a head start,) although it does assume reasonable familiarity with the SimPE program. The steps describe the full process, from adding a new item to the pie menu, having the sim walk to your object, manipulating the sim's motives and statistics, having the sim perform actions, adding randomization and decision based paths, safely looping the interaction, and adding guards to limit its use. It aims to explain the concepts and basic steps in a generic way with practical examples, in order to provide the ability to make lots of different sorts of behaviours.

It is made and tested with SimPE 0.56, and is heavily illustrated.

The attached file "Custom Interaction Tutorial.zip" is the PDF version of the tutorial. If you cannot view PDF files, an HTML version of the same tutorial is available at my website here. A copy of the object that was created in this project ("echo-tutorial.zip") is also attached, so you can compare with your own work.

As stated in the tutorial, you are welcome to post any questions you have about the material here. If you are having trouble completing a step, please post the troublesome object along with your detailed description of the problem, so I can find the problem more efficiently (and with less guesswork).
Download - please read all instructions before downloading any files!
Downloads are not available to guests. Please login.
Downloads are not available to guests. Please login.
Last edited by Echo : 17th Apr 2007 at 12:17 PM.
Reply With Quote
Old 7th Apr 2006, 05:05 PM # 2
SuperFly
Consciously Undead
    

Join Date: Jun 2005
Posts: 699
Thanks: 9922 in 47 Posts


I've been having a problem with the first step- I import the semi-globals, change the groups, then add in a new string. I commit and save, but then in Pie Menu Functions, the new string does not appear. I've tried commiting, saving, and then closing then reopening the package, but to no avail- what could the problem be?

Thanks,

SuperFly

If you're not part of the solution, you're part of the precipitate
Reply With Quote
Old 8th Apr 2006, 02:28 AM # 3
Echo
Original Poster

Drive-by modder
     



Join Date: Dec 2004
Posts: 3,281
Thanks: 34481 in 49 Posts

View My Journal


Could you post the object? It makes diagnosing a whole lot easier!

When you went to the pie menu functions, did you follow this part:

Quote:
Click on the "view" option, and press the "Add" button. An exact copy of the "View" option will be added onto the end of the list. Make sure this copy is selected.

Across to the right you should see a drop down list labeled "Pie String ID". Click on this, and you should get a list of all the lines in the "Pie Menu Strings" file. Find the one you just added, and select it. The name of the interaction on the left should change to match it.


Failing that, take a look at the instance numbers of the Menu Strings and Menu Functions - they should match?
Reply With Quote
Old 8th Apr 2006, 08:16 PM # 4
SuperFly
Consciously Undead
    

Join Date: Jun 2005
Posts: 699
Thanks: 9922 in 47 Posts


Ahh, that fixed the problem- thanks Echo

If you're not part of the solution, you're part of the precipitate
Reply With Quote
Old 13th Apr 2006, 08:29 PM DefaultThis is fantastic! # 5
dragonarts
Lab Assistant
 

Join Date: Nov 2005
Posts: 158
Thanks: 3784 in 14 Posts

View My Journal


Echo, this is without doubt one of the best tutorials available! I have wanted to work on BHAV's ever since I made my fist objects recolor, and just couldn't figure it out. Now, thanks to you, I CAN! The attached pic is of my custom painting, done by this tutorial, with one of my sims dancing in front of it.

I haven't even finished the tut yet. I only have gone as far as putting the hula dance in the list of BHAV's, but I'm so excited I just couldn't wait to thank you. As you may be able to see looking at the pic, I went ahead and maxed out all the motives with my painting. also, it's using a custom mesh and texture file. The painting really is from a painting, one of my own watercolors.

Now all I have to do is finish the tut, tweak this object so it works just how I envisioned it, and offer it up here. Then go on and do the "magic" system I've been dreaming of since I started. I'd like to figure out how to make it a skilling system like from your Harry Potter magic skilling system. I've got so many ideas! *brain starts to overheat* Don't know if I can figure that out, but I want to try so much.
Screenshots
Click image for larger version

Name:  FairiesDancepic.jpg
Views: 0
Size:  103.4 KB  

“Meddle not in the affairs of the dragon; for you are crunchy and taste good with ketchup.”
-unknown
Reply With Quote
Old 14th Apr 2006, 03:10 AM # 6
Echo
Original Poster

Drive-by modder
     



Join Date: Dec 2004
Posts: 3,281
Thanks: 34481 in 49 Posts

View My Journal


Looks pretty much perfect to me! Very cool!

There's not much in the tutorial about proper skilling (it was on the original draft, but the explainations were getting quite complicated and, well, the tutorial was already pretty long) but if you get to the end and decide you want to use the magic-skilling system let me know and I'll give you a quick rundown on how to make your object use the hidden magic skill. If you were wanting to create your own hidden skill I can probably help with that too, although it's a little more complicated.

PS - The painting's gorgeous! My paintings tend to come out looking a lot like that Llama painting sims with very low creativity skill make, so I'm in awe.
Reply With Quote
Old 14th Apr 2006, 04:03 AM # 7
dragonarts
Lab Assistant
 

Join Date: Nov 2005
Posts: 158
Thanks: 3784 in 14 Posts

View My Journal


The corners of the texture got messed up when I resized the new mesh, so I have to redo the UV map and fix it. Won't take long... And I wanted to give more options than just maxing all the stats at once.

As for the skilling, I think the magic skill would work nicely, but the type of effects are very different. Actually, I'm not totally sure modding can accomplish everything I want to have happen, but I'm sure I can get some of it in place.

What I have in mind is, well... big. A whole system. I developed a type of powers for a book I mostly got written, and then developed the system of powers into a Dungeon and Dragons class for my son to use. (he likes to play) If you've read any of my threads, and seen the Kii skins you've seen a tiny bit of what I've developed. Not that these powers would be limited to my custom skins. But there are 8 "realms", and each realm has 4 aspects. Even if I give each aspect of each realm only one effect, that's still 32 powers. And eally, they should each have at least 3 or 4. So that would be... um... lots of things to have happen. I haven't got all the effects worked out on paper yet. If I use the magic skilling, then powers would build, as skill builds. Aspects could stack, but you still have 8 realms.

Yes, I really appreciate your offer to help. I'll probably come begging. Thanks.

“Meddle not in the affairs of the dragon; for you are crunchy and taste good with ketchup.”
-unknown
Last edited by dragonarts : 14th Apr 2006 at 08:35 PM.
Reply With Quote
Old 17th Apr 2006, 03:07 PM # 8
Edootjuh
Lab Assistant

Join Date: Jan 2006
Posts: 49


Finally, set the value in the "Guardian BHAV" to 0x0. The purpose for this box will be described a little later, but for now, just set it to 0.


Finally, look at the fields for "Action BHAV" and "Guardian BHAV".
??????

The best Sims2 fansite! (Yes, it's even better that MTS2 :-D)
Reply With Quote
Old 19th Apr 2006, 10:32 AM # 9
Echo
Original Poster

Drive-by modder
     



Join Date: Dec 2004
Posts: 3,281
Thanks: 34481 in 49 Posts

View My Journal


Hmm... I do tend to overuse the word "finally" when I forget to proof read. The second is just for consolidation - you don't have to do anything, it's just interesting to look at given what you've just learned.
Reply With Quote
Old 20th Apr 2006, 07:48 AM # 10
Edootjuh
Lab Assistant

Join Date: Jan 2006
Posts: 49


I think this tutorial should be sticky, it really helped me out

The best Sims2 fansite! (Yes, it's even better that MTS2 :-D)
Reply With Quote
Old 20th Apr 2006, 04:23 PM # 11
dragonarts
Lab Assistant
 

Join Date: Nov 2005
Posts: 158
Thanks: 3784 in 14 Posts

View My Journal


I subscribed to the thread so I can always find it. But I agree that making this a sticky would be good. Maybe the Powes That Be here will do that soon. This is a GREAT tutorial.
Reply With Quote
Old 22nd Apr 2006, 02:14 AM # 12
Morague
Space Pony
   

Join Date: Sep 2004
Posts: 433
Thanks: 23601 in 45 Posts


Echo,

Thank you for a very well written, easy to follow tutorial that explains how to do things!

I still have much to learn but I keep plugging away at it. Eventually I'll get there
Reply With Quote
Old 27th Apr 2006, 07:14 PM # 13
joe698
Test Subject

Join Date: Jan 2006
Posts: 10


thanks LOADS!!!this is a great tutorial
Reply With Quote
Old 28th Apr 2006, 12:44 AM DefaultSuper # 14
Guest

Posts: n/a


exellent.
thank's.
Reply With Quote
Old 28th Apr 2006, 12:59 AM # 15
CynicalChick
Deviant Savant
   

Join Date: Oct 2004
Posts: 3,789
Thanks: 5360 in 58 Posts


This is great. Thanks for putting it into such an easy to use format. I'm having much fun with it
Reply With Quote
Old 10th May 2006, 08:14 PM # 16
peregrine
Test Subject

Join Date: Apr 2006
Posts: 10


Thank you very much for going to all this trouble. I've done only a very little of this sort of thing before but using trial and error. This is very well written and very accessible, and beautifully presented.

What I would like to know is what do you do if you are using an object which has no pie menu strings/functions in the cloned package NOR in the globals, for instance, plantglobals. I wonder if you could help?
Last edited by peregrine : 10th May 2006 at 10:49 PM.
Reply With Quote
Old 13th May 2006, 11:24 AM # 17
Echo
Original Poster

Drive-by modder
     



Join Date: Dec 2004
Posts: 3,281
Thanks: 34481 in 49 Posts

View My Journal


You can import pie menu strings and function tables from a different object or semi-global group. Just make sure, firstly, that they both have the same instance ID. Then, go into your OBJd file, open the "Raw data" tab, and find the line that says "Interaction Table ID". Set that value to the instance ID of the pie menu files. If all goes well, you should now have a pie menu again.
Reply With Quote
Old 19th May 2006, 01:55 PM # 18
peregrine
Test Subject

Join Date: Apr 2006
Posts: 10


Thank you Echo. Apologies for the delay in reading your post. Have followed your advice and it all works fine.
Having been working through your tutorial again I am really impressed by how clear and helpful it is, and how the explanations manage to lead one on to new and different areas of experimentation. You have a real gift for communication. Thanks so much for doing this.
Reply With Quote
Old 13th Jun 2006, 06:27 PM # 19
blobomotz
Test Subject

Join Date: May 2006
Posts: 5


Hello

Thx a lot for this tutorial !! The light come

But ... (an answer = 2 questions) ... i see items with sub-level menu choice .
I read some with SimPE but i don't really undestand the logical way.

With this sub-level menu choice ... that's an explosion of possibility. can you explain the basis of this concept ?

Any way, your tutorial have answer too many question and thanks again and again
Reply With Quote
Old 14th Jun 2006, 11:36 AM # 20
Echo
Original Poster

Drive-by modder
     



Join Date: Dec 2004
Posts: 3,281
Thanks: 34481 in 49 Posts

View My Journal


When you say sub menu, I assume you're talking about when you click on an item in the pie menu, and a second pie menu expands around that? Actually, that's fairly simple to do. In the pie menu strings, you can enter lines like:
Study.../Cooking
Study.../Mechanical
Study.../Cleaning
(pulled from the Bookshelf)
the .../ seperates the menu from the sub-menu. So when that shows up in game, there's a pie menu item called "study", and when you click on that a second level menu opens up with "cooking", "mechanical" and "cleaning" in it. Because each of these is on their own line in the Pie Menu Strings, you can give them each their own line in Pie Menu Functions, and point them to different BHAVs.
Reply With Quote
Old 14th Jun 2006, 03:34 PM # 21
blobomotz
Test Subject

Join Date: May 2006
Posts: 5


GREAT Thank you very much !!!

Your explanation and somes item download ... i undersstand

It's a good day !

Thank you again, you are great
Reply With Quote
Old 14th Jul 2006, 08:15 PM # 22
seresv
Lab Assistant
 

Join Date: Oct 2004
Posts: 68
Thanks: 6 in 1 Posts


Echo u r awesome for making this tutorial.
Reply With Quote
Old 18th Jul 2006, 03:19 AM # 23
gelydh
Test Subject

Join Date: Jan 2006
Posts: 3


I'm not sure if this is even worth asking, but I suppose it wouldn't hurt to do so.

I've been using this tutorial to extract animations into a painting for picture/posing purposes and in doing so have come across a good deal of animations that turn up this error (with testingcheatsenabled turned on, otherwise the animations simply doesn't run). The error isn't too surprising since (I assume) it's telling me that it needs a certain bone from another object/Sim to work. However, there are similar animations that work fine.

A good example would the photobooth animations. All of them (normal, goofy, romantic, solo and duet) can be extracted and work perfectly EXCEPT for several of the 'romantic-couple' photobooth poses (there are four poses each for solo, Sim A, and Sim B). I suppose I'm asking why exactly this isn't occurring for all animations that have to do with an object or another Sim. Many 'social' animations (or, animations that involve two Sims) also do this, where one (the 'initiator' or the 'receiver' animation) will work, while the other won't. There's also no set pattern that I've been able to discern with this; sometimes the initiator animations will fail and sometimes the receiver.

Is there a workaround to force these animations into running? Is there something missing from the 'non-working' animations? I'm not really expecting a solution, just information or some input.

Went over the sea, what did I find?
A thousand crystal towers, a hundred emerald cities.
Reply With Quote
Old 18th Jul 2006, 11:28 AM # 24
Echo
Original Poster

Drive-by modder
     



Join Date: Dec 2004
Posts: 3,281
Thanks: 34481 in 49 Posts

View My Journal


While it's hard to come up with a hard-and-fast rule for IK animations, they tend to be animations where bones in two objects/sims have to touch one another at a particular time. This isn't always true, but tends to be the pattern. A lot of the social interactions don't have to match up perfectly, or force two objects to touch each other - in these cases, no one is going to notice if one sim's animation is slightly out of sync with another. That's why they don't all end up being IK.

As for a workaround? If there is I don't know of it. The best solution I've been able to come up with was to spawn a transparent clone of the IK object and use that - but that's vastly impractical!
Reply With Quote
Old 19th Jul 2006, 11:23 AM # 25
Max3D
Field Researcher
 

Join Date: Sep 2004
Posts: 273
Thanks: 8 in 1 Posts


i think this is one of the most instresing and helpfull tut on bhav... really thnx

about skilling, i wish to see how my sim are learning, i'm talk about the "skill meter"
i've tryed to read the int from the bookcase semi-global....
but i didn't find anythink about "meter" can you help me ?
Reply With Quote
Reply


Section jump:


All times are GMT +1. The time now is 12:01 AM.

Style: More Options

Powered by: vBulletin Version 3.0.14
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
This site is not endorsed by or affiliated with Electronic Arts, or its licensors. Trademarks are the property of their respective owners. Game content and materials copyright Electronic Arts Inc. and its licensors. All Rights Reserved. MTS/MTS2 v2.9 based on vBulletin 3.0.14 with multiple hacks. ModTheSims, ModTheSims2 and MTS2 © 2004-2009. Hosted by LayeredTech.
You are being served by www.modthesims.info powered by sheer black boyshorts with red lace and a hot pink lacy bra top thing