View Full Version : Tutorial: Making a better interaction - Entries, exits, skills and motives
Echo
3rd Mar 2007, 12:05 PM
Making a better interaction - Entries, exits, skills and motives
This tutorial is, loosely, a sequel to the "Making Your First Custom BHAV" (http://www.modthesims2.com/member/showthread.php?t=142907) tutorial already posted. I very strongly recommend attempting that tutorial before trying to do anything here.
The tutorial does assume strong familiarity with SimPE, and a general understanding of BHAVs. If you got through the first tutorial then spent a few hours playing around on your own, you should be able to do this.
The tutorial covers standard entries and exists, and the proper way to make sims earn skills and build motives in interactions.
A pdf version is attached to this post in "interaction2.zip", as is a package file ("echo-tutorial-2.zip") containing the end product for comparisons. If you cannot read pdf files for some reason, there is an straight HTML version available online here (http://www.eternal-echo.net/sims/tutorials/interactions2/).
If you have a question about something in the tutorial which nobody has asked yet, then please post your question here so everyone can benefit from the answer. When posting questions, please attach everything which could be helpful to me in diagnosing the problem. That includes the package you're working on, and any error logs that you game has produced while running it.
Good luck with the tutorial, and if you have any suggestions, corrections or other feedback, then please share them with me. If nothing else, I can try to integrate it into whichever tutorial I attempt next. Enjoy!
solfal
14th Mar 2007, 09:13 PM
Thank you so much Echo!
I hope I will have the time to try it this weekend. As always it is very well explained. You make such great turorials :gjob:
solfal
17th Mar 2007, 05:16 PM
I had so much fun testing this and my little toddler did gain skills just fine. (still looking for the value to gain logic skill)
The dialog box showed up but there was tree of them in a row, next time I tested there were four and last time there were nine dialog boxes. Seems they are stored somehow but I donīt understand where?
Great tutorial, so easy to follow!
Echo
18th Mar 2007, 04:12 AM
Hi Solfal,
The values for different skills are all listed here, if it's any help:
http://www.modthesims2.com/showthread.php?t=187257
I'll take a look at the object in game soon, but just from a quick check in SimPE I can see one thing which doesn't look quite right... In your loop, you cycle right back to the "Standard Entry", then re-run the "skill start". Those two commands should happen before the loop starts, because you only want to enter and start once at the start, then loop the animations, then stop and exit at the end. You've got the stop and exit correct at the end, you just have to set the loop to jump back to the node after the "Skill - Start". :)
solfal
18th Mar 2007, 11:08 AM
Thank you so much Echo!
I feel so stupid. It was very clear in the tutorial that you sholdnīt include the skill start in the loop and still I did. (The skill point were earned very fast because of this!)
When I changed that it workes perfectly. I am so happy to be able to do this. :D
The information about the different skills is great. Thank you for the link.
Echo
18th Mar 2007, 11:56 AM
No probs, glad that solved the problem! And it's an easy mistake to make, I've done similar in the past and ended up with all sorts of things happening way too quickly. :) You'll have to point me in the right direction when you've got it all working, it looks cute!
solfal
19th Mar 2007, 09:42 PM
I am so proud of your interest in my little toy so I decided to uppload one version here and one at TSR.
I did spend two days trying to understand why I got an error when two toddlers tried to play with it at the same time. When I had changed almost everything I realised I had to set the first "go to routing slot" to falce target return falce instead of error. Easy fix when I finally discovered it :lol:
janusmaguszeal
20th Mar 2007, 10:16 AM
Hey, I'm an ametuer programmer with a Sims passion and I've just recently (like today) been reawaken to The Sims and want to try my programming skills with The Sims 2 now. :) Unfortunately I'm at work right now so I can't see any of these downloads at the time. I just wanted to know before I get started: do these tutorials cover how to edit interactions with other sims? Such as, you know, slap and hug and what have you. See I'm trying to add some interactions which may be innappropriate to discuss but for all intent and purposses will hopefully make my sims' lives a little more real. One, for example, would be teenage and young adult woohooing and some interactions with ghost sims.
So to go back to my question (I know, I like to talk :P): can I edit bhavs that deal with sim-to-sim interactions? Or am I just talking gibberish and should just learn patience and explore these downloads when I get home? (I can't help it, I'm so excited) :P
Thanks
JohnBrehaut1
20th Mar 2007, 01:20 PM
janusmaguszeal, Yes it is possible to make sim-to-sim interactions, though this tutorial does not specifically deal with it, but it will definately help with the social interaction, because it uses entries and exits. :)
Echo
30th Mar 2007, 01:58 AM
Solfal - The boat is so cute! Thank you for sharing it here so I can play with it! :D
Janus - sorry for the slow response, I've been unable to use a computer for several days. As John pointed out, what you have described is certainly possible. This tutorial and its predecessors focus primarily on sim-object interactions, as they are considerably easier to make and understand, but the basic principle is the same. If you make it through these tutorials okay, then do a search on Social Plugin objects. They're the mechanism that allows modders to add new sim-sim interactions. But I'd strongly recommend working through sim-object interactions first, since they're much more straightforward!
Dr Pixel
13th Apr 2007, 06:27 PM
Another great tutorial, Echo.
I had the same problem with the slot error - it's something to check if your object has a slot that you are using.
My object was originally cloned from a stereo, and I used the "Repair" slot
Maxis seemed to set these to "error" instead of "false" - or maybe I accidentally did that somewhere along the line...
I also found it was possible to leave in the regular radio functions (dance and Work Out) since they don't use a slot. I did have to make the skill message suitable for both Work Out and Mechanical Skill since I didn't see any way to separate the messages - both skills use the same message when a point is gained, so I just made it say (Sim's name) has gained a skill point, leaving out the skill name.
I also wanted the catalog description to come up correctly with both
+ Body and
+ Mechanical
I did manage this, by playing with the ratingSkillFlags setting in the Object Data section in SimPE - but I had to do it by trial and error since I didn't know how to correctly combine the numbers. Is there a listing of these somewhere?
Echo
14th Apr 2007, 07:46 AM
The slot error is unusual - none of the code in this tutorial actually touches slots at all... Or was it something else which you were changing?
It should be possible to separate the messages for skill gain, but it's not immediately obvious how.
The easiest way I can think of to do it would be to create an attribute called, say, "Current Skill". When you start an interaction which is building body skill, set that attribute to 0x0. When you start an interaction which is building mechanical skill, set that attribute to 0x1. Now, go to the text list with the dialog text in it, and enter in your alternative dialog message in an empty line.
Now, in the CT function, put a check right before the "dialog" command. If the attribute is set to 0x1, then run the existing dialog command. If not, then run a different dialog command. You'll need to make the new dialog command identical to the existing one to start with. Then, if you use the instruction wizard on that command, there's a box labelled "Message". Use that to point to your newly added message. Voila! Should work. :)
Alas, I don't have a list of the ratingSkillFlags, but I can tell you that it is a flag field. That means that the best way to edit it is to go into "binary" mode. In that mode, each digit in the field represents one skill type. If the digit is 1, it lists that skill. If the digit is 0, it doesn't list that skill.
I might put together a list later and add it to the tutorial, but no promises. ;)
ThomasRiordan
4th May 2007, 10:07 PM
Echo, I'm having a bit of a problem with the personality bonuses part of the tutorial. Where you say put 0x02EE the current version of the PJSE instruction wizard will only accept 4 entries 0x02. Is this alright or is there a way to get it to enter correctly?
Echo
5th May 2007, 12:30 AM
Well that's weird... I might have to run that by Peter Jones, see if there's a reason it was changed. In any case, you can enter the parameters directly thus:
07 06 00 07 EE 02 00 00
00 00 00 00 01 00 00 00
And if you want there are details on how to translate the list of parameters into the operands here:
http://www.modthesims2.com/showthread.php?t=212101
under the "Passing variables to functions" section. :)
ThomasRiordan
5th May 2007, 09:04 PM
Okay, thanks. And thanks for the link to the Data Types information. That'll probably come in handy in the future.
BTW is there a list of the literal codes for the personalities somewhere. I need to have the active personally get a skill boost on my object and I'm assuming it's somewhere within the 0x1-0x9 range at least, but a list would save alot of trial and error.
rebecah
17th May 2007, 05:51 PM
Thanks you so much for this tutorial Echo. You are so good at writing very easy to understand tutorials.
I think it'd be very helpful if this was listed in the wiki listing. With something to the effect that it teaches us how to make our items give skill points. I tried to figure out for a couple of days why the ct skill gain dialog wasn't using the correct terms. I had an idea that it was in the STR but just couldn't find it. You really saved me with this tutorial.
If you have a the time I'd love to see a tutorial on object placement. I'm tring to find out how to set something on water and Numenor info doesn't include it.
Your tutorials have been so helpful to me, with pics and examples you makes it so much easier to learn.
Thanks so very much!
Echo
18th May 2007, 11:21 AM
Thank you for the lovely comments, they're much appreciated!
As for making something placeable on water, just add one of these commands to your init function:
[prim 0x0002] Expression (My 0x002A (placement flags) Set Flag flag# Literal 0x000F (allow on water surface))
or
[prim 0x0002] Expression (My 0x002A (placement flags) Set Flag flag# Literal 0x0003 (allow under water))
rebecah
18th May 2007, 02:49 PM
Thanks so much Echo.
FennShysa
19th Jul 2007, 08:35 PM
I did manage this, by playing with the ratingSkillFlags setting in the Object Data section in SimPE - but I had to do it by trial and error since I didn't know how to correctly combine the numbers. Is there a listing of these somewhere?
The skill flags are:
Cleaning 0080
Cooking 0001
Charisma 0020
Mechanical 0002
Creativity 0010
Body 0008
Logic 0004
To get more than one to show up at the same time you have to add them together in hex. So "+Mechanical, +Body" would be 000A. "+Mechanical, +Body, +Creativity" would be 001A.
Given that it's been a few months, I'm sure you have already figured that out, but someone else might be looking for the answer too.
wndy26
12th Aug 2007, 05:11 AM
Echo - Thanks for some really super tutorials! I love this series you have made and am learning tons!
I am working through this tutorial and I have a small question. I have gotten all the way to where the dialog box comes up and decided to test that. It worked great but I noticed that the thought bubbles were not appearing above my dollies head like happens when you skill charisma with the mirror. I skimmed through the rest of the tutorial but didn't see that part included. Is it just my game not showing them up or do these need to be added seperately? Just curious.
Once I get finished with this tutorial I plan on working on skilling paintings for a gallery/art school and would like to have paintings appear above the dollies head such that it looks as though they are commenting on the paintings while learning charisma. Is this something that is possible to do? I have more questions regarding my skilling paintings but will hold off on that till I am through with these tuts....in case my questions are answered there.
Echo
12th Aug 2007, 05:27 AM
The though bubbles are created completely independently to the skill point code. It's a bit like setting up the animations sims play which they're skilling - you have to specify which animations to play and when/how to play them, they don't start with the skill code itself.
It is possible to start these bubbles using BHAVs, but I don't think there are any tutorials covering it at present. If you want to have them, your best option is to look for some code already in the game which does this, then try and copy it in your new function. :)
wndy26
12th Aug 2007, 08:34 AM
Thanks Echo...I may just try that...I am finished with the tutorial now and have started working on my first painting. So far I have gotten everything the way I want it but I was wondering how to increase an interest while skilling. I figure it probably includes a My person data statement somewhere in the skilling loop. Am I even close?
Echo
12th Aug 2007, 09:04 AM
Probably, yep. ;) Haven't tried it myself, but the interests are certainly all stored in "Person data".
wndy26
12th Aug 2007, 09:09 AM
ok...I tested my new painting and it worked sort of. The view option was left alone and it works no problem. The sketch menu item just does view for now. So far I only have the study option with the charisma skill and culture interest increased working the first time through but why does it not work a second time the sim tries to use it. Any ideas?
Echo
12th Aug 2007, 09:18 AM
Not without seeing it, no. ;) Post it here perhaps?
wndy26
12th Aug 2007, 09:45 AM
Its ok...I figured it out...I didn't have one of my true/false settings correct and it just wouldn't exit the skill. Also, I decided since I am going to have several paintings that increase interest in culture to only have it increase the interest once so I pulled it out of the loop.
Echo...if your still there...do u know which animation set I would need to use that would mimic either the reviewer writing in her notebook or the stocker restocking? For my sketch menu I want the animation to appear as though the sim is writing in a notebook constantly. at first I was going to use the clipboard one but that didn't quite work very well because when the sim uses the clipboard it stops for the window to open to change the prices.
Echo
12th Aug 2007, 10:05 AM
You could try the newspaper ones for the crosswords. They write a bit, look ponderous for a bit, write a bit, and so on. Could work?
wndy26
12th Aug 2007, 10:34 AM
I will try that and see how it goes. I am sorry to bug you again with more questions. LOL My painting will have two different skilling options, will I need two different CT functions using the same text list with a different text message added to it? Also how do I reference which text list message I need to use? Would that be under the operands?
Echo
12th Aug 2007, 11:15 AM
Questions are always welcome. :)
You can't have two CT functions with the same name in the same object, the game won't know which one to run so you'll most likely get the same one every time. If you want to have different skills in the same object, then you need to edit your object somehow to be able to tell which skill you're building at any given time (possibly using an attribute?), then use that to direct it to use a different line in the text list.
You can change which line in the text list gets used by changing one of the operands. I think it's probably the third one on the top row. Try changing it to a different number and it should change the text that shows up in the description of the command.
wndy26
12th Aug 2007, 11:27 AM
Thanks!!! That helps tremendously! I am off to try it out!
wndy26
12th Aug 2007, 12:32 PM
ok...from what I gather, I need to differientiate between which two skills is currently being used. This should be done in the CT Skill Gain Dialog. I have downloaded and looked at the CT Skill Gain Dialog in Numenor's ZX Spectrum computer but am not sure about some of the coding within it. Attached is a screen shot of the CT Skill Gain Dialog nodes. Lines 4 and 6 show a constant 0x011B:0x06 and 0x11b:0x04 respectively. Can you explain what this does in some way and what the hex codes represent? His ZX Spectrum package can be found at http://www.modthesims2.com/showthread.php?t=237328 (http://)
Thank you Echo...again for all your help. I know once I can get through one of these skilling pictures I will be able to do the rest quite easily since they are basically all the same, just different size canvases.
Echo
12th Aug 2007, 02:04 PM
Well spotted. :) 0x011B is the global BCON which points to the different skill types. There's a list of the skill types here for lookups:
http://www.modthesims2.com/showthread.php?t=187257
From that code it looks like parameter 0x01 of that CT function holds the type of skill being earned, so if you compare that to the list of skills that can be built, you can run whichever dialog you want to run.
This will only work if there is only one dialog message per skill type (so you can't have two interactions producing different dialogs if they're both building the same skill) but I assume that's not an issue in this case?
And thank you for taking the time to read the tutorials, and do a bit of investigation on your own, and ask clear and well thought out questions. :D
Numenor
12th Aug 2007, 02:35 PM
I managed to make my Spectrum issue two different Dialogs, connected to the two skills that are built at the same time; but I had to transfor the "CT - Skill Gain Dialog" from a Call Tree called by semiglobals to an ordinary function, called from within local BHAVs (so to pass the correct parameters, and force it to display the desired Dialog).
As for the explanations of many semiglobal BCONs, I find extremely useful the TRCN labels provided by these add-on packages (http://simpeforum.ambertation.de/sims2/TRCN-and-TPRP-packages-for-PJSE); once installed, SimPE will display the name of the known BCONs directly in the BHAV editor (something like "BCON 0x011B:0x00 (Cleaning)" instead of the standard "BCON 0x011B:0x00".
wndy26
12th Aug 2007, 02:38 PM
Thank you Echo!!! I was close but not as close until you posted this message. Can you look again at the screen shot and explain what line 3 is doing when it references the Stack Objects neighbor ID? I don't quite understand what that means and if it will apply to my object/skills.
Thanks Numenor, I will download those addon packages for simpe first thing this evening after I get off work. I really appreciate all that you guys do for us newbies! And SimPE totally rocks for modding! I am very impressed with the ease of use once working through Echo's tutorials and reading all the info about SimAntics. Its all been very helpful. You all deserve a big parade/party and tons of cheering and thanks!
Echo & Numenor,
Thought I would attach my package file so you could take a look at what I have gotten so far. You will notice that the sketch interaction still has the same animation as the study interaction - this will change once I figure out which animation I want to put there. I was also thinking of adding more talk animations to the study interaction loop so that there is variety in the conversation. Please give me your feedback and tell me what you think thus far. How simple will this be to transfer to other paintings? I realize that there are a few codes that will change due to going from multi-tile paintings to single tile paintings - thanks to Echo's wonderful tuts. Any other suggestions I haven't thought of for improving it? I still have to put my Carrivagio paintings in, but that is the easy part so I figured I would leave that for last.
Thanks again for all your help. I am gonna stop working for now and head to bed...gotta be at work in about 7 hours and haven't had any sleep since yesterday around 1 pm. hehe...I am totally addicted to learning how to do this!
(Edited by Numenor: if possible, it's always better to edit your previous post, instead of posting three times in a row... :) )
Numenor
12th Aug 2007, 05:44 PM
I will examine the package later on. In the meantime, let me explain that Line 3.
Sims are identified by the game with TWO different unique numbers: The Object ID (aka "ID" or "SimID") and the Neighbor ID (aka "nID"). The difference is that the Object ID might change, when you reload the game; but the nID never changes, so it's a good method to identify the sims on the long run.
Line 3 stores the nID of the programmer into Local1; this is required by the following Dialog, because the text displayed in the dialog must contain the sim's name.
That "$NeighborLocal:1" that you read in lines 5 and 7 is automatically replaced by the game with the name of the sim identified by the nID contained in Local1 (the same Local1 that we have set in Line 3).
If you are curious about the variables that can be used in the Dialog texts, read HERE (http://www.modthesims2.com/showthread.php?t=140309).
EDIT - About your package.
You want to know the truth? I still haven't discovered where on earth the "CT - Skill Gain Dialog" is called :P -
In my ZX, it's true, I had to solve the main problem of managing two skills at once, and then I decided to rewrite entirely the skill gain routine. But even with one skill only, at first I was having big problems: no matter how I modified the CT, the game always called the default dialogs, and not my custom ones.
But I know for sure that replacing a normal CT with the one extracted from the ZX wouldn't work anyway, because the ZX one needs some parameter to be passed to it; and you can't force a (semi)global BHAV to pass the right parameters to your private CT: you must import the (semi)global into your package and modify it.
In particular, the skills work this way (this is just a rough representation):
1) Your package contain a BHAV for the "Study" interaction; this BHAV contains a call to the Global "Skill - Start".
2) The Global "Skill - Start" creates a specific controller, the "Skill Tracker", that immediately starts executing its own internal BHAVs
3) The Skill Tracker autonomously keeps track of the progress, manages the gauge over the sim's head and issues the Dialogs when a skill gain occurs.
This means that there isn't a simple semiglobal that you can import into your package and modify, so to force it to issue your dialogs.
Or better: no matter how intricate the BHAV logic is, a call to the "CT - Skill Gain Dialog" should execute your modified CT; there is no reason why your modified CT shouldn't be executed; but nevertheless, I never succeeded in forcing the Skill Tracker to execute my CT...
Perhaps Echo can shed some light :P -
PS: It's "Caravaggio", not "Carravagio" nor "Carrivagio" :) Please excuse my Italian pride :lol:
wndy26
12th Aug 2007, 09:18 PM
Thanks for all the explanations Numenor! I have to admit, I am a terrible speller! I will fix my mistake asap. Thanks for explaining line 3. It makes much more sense now. I never was able to figure out how the CT is called either. I looked and looked but never once saw reference to it from within the BHAV's I had. But it did manage to work and called upon the correct text for each skill. Did that part work ok for you in my package? For the life of me, the only thing I can figure is that the CT is called from something like you mentioned - a global skill tracker. That makes the most sense to me and would atleast give some sort of explanation as to why we can't really trace it to our BHAV's.
Thanks for looking at my work!
Update: Well, I found the animation I want to use - it was echo's suggestion - the crossword animation. And I set it up without a hitch...they look like they are actually writing - except one thing...they have nothing to write on. LOL...they are just writing in mid-air! Would the item they need to be holding be considered an o- animation, o2a- animation, or an a2o- animation. I think I found ones for a clipboard and a notebook and plan to try those...if you have any other suggestions, please let me know. TY TY TY
Echo
13th Aug 2007, 12:19 PM
To get a prop in the sim's hand, you need to run a "create new object instance" command. They show up in dozens of objects, basically any time a sim holds something in their hands. See if you can find the code to spawn a book or some such, then steal that. :)
The "CT - Skill Gain Dialog" is called from "Function - Main - On Skilll Gain" in the "Skill Tracker" object which gets spawned when you run "Skill - Start". As for why your CT function wasn't getting called Numenor... That's certainly odd! I've never had that issue certainly. I assume you did pass in the correct object id in parameter 3 of "Skill - Start"? To actually run the CT function, the skill tracker sets the stack object to the object you've passed in there, then calls the CT function by name every time the skill meter flips.
wndy26
13th Aug 2007, 06:36 PM
Thanks for the help Echo...I was looking at the primitive - Create New Object Instance - it looks as though I will need the GUID of the object I am going to create. Is that right? That would mean I need to locate the book or clipboard object and get the GUID. I also saw a CT - Animate - Pose Book in Hand line within the book case object's Call Named Tree prim string set that was under Text Lists. I haven't yet found that as a BHAV in any objects thus far. How does one go about using this?
Update: I managed to get the book to spawn using the Create New Object Instance but it shows up on the floor and not in their hands...I am sure that I will need to figure out how to use the CT - Animate - Pose Book In Hand line..but I am not sure how to do that...I will keep working on it...in the mean time...if anyone has any tips to further me along I will be extremely greatful!!!
Update 2: I figured out how to get it in their hand and how to make it disappear but am still trying to figure out how to get them to open the book. I am sure I will get it. Maybe the next time I will post it will be working as intended!!! I really feel so close now!
Update 3: I had so hoped to be able to figure this out on my own. :rolleyes: Unfortunate I am really stuck. I have spent the last 2 hours trying many different things and getting no where. So I am going to upload what I have at the help forum and hope that someone can help me figure it out. Thanks Echo and Numenor for all you have already done to get me this far. I couldn't have gotten it without you two.
Final Update: I figured it out! Woot Me! I have a few small bugs to work out like the finger sticking through the book when its opened...but the book opens and it appears as though the sim is writing in the book. Once I get the recoloring done I will post it. Thanks Echo and Numenor - the thing that helped me most with animating the book to open was the bhav guide .pdf file I got off this site. Amazing!!!
solfal
22nd Sep 2007, 06:43 PM
I have made a working climb toy for toddlers ( I guess I have to do something about the idle, so they wont idle forever if something goes wrong. I wanted several toddlers to be able to use it at the same time)
I thought it would be nice to make it usable by childs too and build it the same way as I did with the toddler animation. But the child only accept to be "snap into" slot 0. The other container slots doesnīt work, even if I do exactly as I did with the toddler. When I look at other object it seems the childs have something like "[prim 0x0002] Expression (Stack Object ID 0x0000 := Stack Object's 0x0013 (lead tile object ID))" before the snap into comand, I tried this but it doesnīt work. (I have no clue what that expression means!)
Echo
23rd Sep 2007, 11:10 AM
If you have an object with multiple tiles, you'll always want to put the "Stack Object ID := Stack Object's lead tile object ID" line in before you point to slots.
Remember that the slot file is linked to the rest of the object via its OBJD, but if you have multiple tiles you have multiple OBJDs. What you want to do is make sure that (a) only the lead tile is pointing you your slots file and none of the other tiles are, and (b) make sure that, regardless of which OBJD your code has stored by default in the Stack Object, you change the SO to point to the object's lead object ID. Then you'll always end up pointing to the OBJD which is pointing to the SLOT which you're expecting. That's what the "expression" command above is there for.
As for why toddlers would work and children wouldn't... Not certain from this quick look, but a couple of things to check. You've got the support strength in the init set to 0x96... Try setting that to something bigger - maybe copy the value from a regular chair. If the support strength isn't high enough for a child then you'll get an error when I child tries to enter it.
If those things don't fix the problem let me know and I'll try and get it running in my game. :)
solfal
23rd Sep 2007, 07:31 PM
Thank you Echo! Great to know. I realise I have only worked with slots one one tiled objects before. This one was one-tile when I made the toddler interaction and after that I made it two tiles. Then I tried to add the child animation.
I made the changes you suggested. I didnīt find any support strength in the chair init but I changed it to 500 decimal as I found that value in another object.
It still does work for toddlers and not for childs.
(The child interaktion will look odd as I have tried the different slots to se if any others works as the 0 slot does)
I would be very greatfull if you have the time to take a look at it. :D
Echo
24th Sep 2007, 11:52 AM
Okay, still haven't been able to check it in game, but I did notice something which is quite likely to be causing you issues. Only container slot 0 has its i7 value set to 7, the rest are set to 5. 5 means "Placeable on Sims", which does include toddlers since they can be carried by other sims. Children, however, cannot be carried by other sims, so they need to have the value set to 7 (the somewhat curiously named "Allow Sitting", which basically means that it can contain a sim). :) Toddlers should be able to fit in "Allow sitting" slots too, so just change the i7 field in all your container slots to 7 and hopefully the problem will go away.
solfal
25th Sep 2007, 06:40 PM
Thank you so much Echo!
I finally had the time to test this and it workes!!!
When I added the extra slots I was a little confused about one slot having the 5 and one the 7 value, but tested with the 5 value, and when it worked, thought it must have been the right one and then forgot about it! Stupid me, but I am so happy it workes!
$RaMRoM$
14th Mar 2008, 01:45 PM
Hi echo!
Thanks, I did this tutorial, and i had one problem, but then i fixed it using your version of the package, i compared everything, and the animation operands had a mistake, but know its perfect and it works, thanks echo!
Echo
14th Mar 2008, 11:48 PM
Congrats! You're certainly getting through the tutorials pretty well!
Richi3frog
18th Sep 2008, 02:35 AM
Thanks for this tutorial, I could finally make my Sims earn Logic skill while practicing with the game console.
However if I want a Sims to earn a badge instead of a skill. What should I do? What I'm trying to make is to modify the hydroponics garden so it builds Gardening badge instead of Creativity skill. I found out that badges are handled in a more complex way than skills. By now, when my Sims get to tend the garden they just route to it and stop. Thanks in advance, these tutorials are great!
Echo
18th Sep 2008, 10:51 AM
Yeah, badges are quite different to skills. Your best bet would be to open up one of the crafting stations, then pulling in the relevant "CraftingGlobals" semi-globals. There's one for "Badge Tracking - Start" which looks like it might be what you're after?
NixNivis
30th Jun 2011, 08:10 PM
I realise it's been over two years since this thread had any activity, but I hope it's still all right to post here.
I have managed to successfully make a skilling object following this and the "Making your First Custom BHAV" tut. It's a statue (that right now bears a striking resemblance to "The Measure of the Sim") that let's Sims gain logic by contemplating the teachings of Surak, the Father of Vulcan logic - i.e. by gesturing at the statue. ;) So far, so good, but in addition to gaining logic, I'd like adult Sims with high-ish logic skill to be able to teach children/low-logic Sims, and that these Sims should be able to ask the high-logic Sim for lessons. That part has not been successful, and that's where I need help. :(
I've pinched the teach/ask to be taught BHAVs and guardians from the teleprompter, and I've got it so far that an adult (but not a child - this is on purpose) with high logic gets the option to teach child and low-logic Sims, and they get the option to ask the high-logic Sim for lessons. The Sims have their little ask/agree talk... and then nothing else happens for the teaching Sim, the action just drops out of the queue. The Sim being taught does start to gesture at statue - only in the queue it looks like the regular "contemplate statue" interaction, and not as if the Sim is being taught.
I do not get any errors - which frustrates me no end, because then at least I'd have an idea of where to look for problems. As it is, I've picked apart the teach/be taught BHAVs for every single career reward that has them, and I've tried picking Leesester's brain apart as well, but I can't for the life of me figure out what I'm missing. Any help anybody can offer would be greatly appreciated!
The object can be found under Hobbies -> Knowledge.
maybesomethingdunno
1st Jul 2011, 05:25 AM
Hi NixNivis :)
I've taken a (very) quick glance at your object and the podium. In the podium's "Interaction - Practice Speech" bhav, there is a BHAV ("[global 0x021B] Teach - Interrupt?") which seems to reference a "Social - Teach" controller (GUID 0xAC1854A3). The controller seems to store the IDs for the Teacher and Student and may manage other aspects of the Teacher-Student interaction. You might try adding the global 0x021B "Teach - Interrupt?" BHAV into your interaction's loop and see if that makes things better?
It's possible that there are no errors due to the interaction failing in some way that is not issuing an error (e.g. if no value is being passed into the BHAV, then Param 0x0000 may not have a value possibly making "Verify - Person ID (1 arg: Person ID=Param 0x0000)" fail and return False...which would end your "Ask to Teach/Be Taught" BHAVs). (If you haven't checked out this thread (http://www.modthesims.info/showthread.php?t=212101), it's a good read. :) )
You can pinpoint where an interaction is "falling through" or prematurely ending by setting nodes to return Error. When you get an "Undefined Transition" error (the result of the BHAV following the path pointed to a return of Error), you can check the error log and verify the node and its location in the interaction.
Echo
1st Jul 2011, 10:13 AM
Heya NixNivis!
Of course, you would choose to port the teaching behaviour across to a non-teaching object, rather than port the mesh into a teaching object! ;)
The main problem is that you're missing at least one interaction. The objects which are enabled for teaching all have the following interactions (or something similar):
Ask to teach
Ask to be taught
Be teacher
Be taught
The last two are normally hidden from the pie menu, but they are still there. In the "Ask to be taught" BHAV, line 0x2, the object sets up a new teaching social-object, passing through the ID of the interaction to call on the current object (That's in parameter 2 of "Teach - Init"). In this case, you've sent through the value "2". If you look in your TTAB, you'll find that the interaction with the number "2" is the "Contemplate..." option. That's why your sims agree to teach, then go straight to contemplating.
What you need to do is import some teach/be taught BHAVs, and hook those into the pie menu (with a Guardian BHAV set to "Hide" so that it doesn't actually *appear* when a player clicks on it). Then, change the "Teach - Init" in both teacher and student "ask" BHAVs to point to that one.
NixNivis
1st Jul 2011, 07:33 PM
Thanks for the quick repsonses, both of you! And Echo, why do something the easy way when you can do it the hard way? ;)
IT WORKS!!! :D I was indeed missing an interaction, but not the one you think. :)
With the exception of the biotech station (i.e. a multi-tile object that does funky stuff like generating vials *shivers*), none of the career rewards I looked at had an equivalent of be teacher/pupil, but just the regular teach/be taught ones, and this confused me thoroughly at first. :wtf: BUT, then I remembered what Echo had said about the pie menus and that parameter in the "Teach - Init", so I had a look at those objects again - and paid a bit more attention this time. :rolleyes: It turns out all of them has two versions of their main interaction ("contemplate statue" in my case), one "normal" and one hidden, and the hidden one also had "nest" checked in the TTAB. And that second "Teach - Init" parameter? Was referring to the hidden interaction in all of the objects I checked.
So, I added another "contemplate statue" interaction, hid it from the pie menu and checked "nest", and made that "Teach - Init" parameter refer to this interaction... and now it works! Pupil is being properly taught, and teacher is teaching, and fun is being had by all! :rofl:
Thank you SO much for your help!! :beer:
vBulletin v3.0.14, Copyright ©2000-2013, Jelsoft Enterprises Ltd.