Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Instructor
#26 Old 12th Aug 2007 at 9: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.
Advertisement
Retired Duck
retired moderator
Original Poster
#27 Old 12th Aug 2007 at 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?
Instructor
#28 Old 12th Aug 2007 at 10:34 AM Last edited by wndy26 : 12th Aug 2007 at 10:37 AM. Reason: mistake in text.
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?
Retired Duck
retired moderator
Original Poster
#29 Old 12th Aug 2007 at 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.
Instructor
#30 Old 12th Aug 2007 at 11:27 AM
Thanks!!! That helps tremendously! I am off to try it out!
Instructor
#31 Old 12th Aug 2007 at 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

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.
Screenshots
Retired Duck
retired moderator
Original Poster
#32 Old 12th Aug 2007 at 2: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
The ModFather
retired moderator
#33 Old 12th Aug 2007 at 2: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; 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".

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.
Instructor
#34 Old 12th Aug 2007 at 2:38 PM Last edited by Numenor : 12th Aug 2007 at 6:17 PM. Reason: Merged posts: 1738750, 1738756, 1738772
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... )
The ModFather
retired moderator
#35 Old 12th Aug 2007 at 5:44 PM Last edited by Numenor : 12th Aug 2007 at 6:09 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.


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 -
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 -


PS: It's "Caravaggio", not "Carravagio" nor "Carrivagio" Please excuse my Italian pride

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.
Instructor
#36 Old 12th Aug 2007 at 9:18 PM Last edited by wndy26 : 13th Aug 2007 at 1:48 AM. Reason: Double posting...lol
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
Retired Duck
retired moderator
Original Poster
#37 Old 13th Aug 2007 at 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.
Instructor
#38 Old 13th Aug 2007 at 6:36 PM Last edited by wndy26 : 14th Aug 2007 at 9:42 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. 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!!!
Lab Assistant
#39 Old 22nd Sep 2007 at 6: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!)
Attached files:
File Type: rar  Solfal ToddlerClimb0605.rar (72.7 KB, 13 downloads) - View custom content
Retired Duck
retired moderator
Original Poster
#40 Old 23rd Sep 2007 at 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.
Lab Assistant
#41 Old 23rd Sep 2007 at 7: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
Attached files:
File Type: rar  Solfal ToddlerClimb0605.rar (72.7 KB, 15 downloads) - View custom content
Retired Duck
retired moderator
Original Poster
#42 Old 24th Sep 2007 at 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.
Lab Assistant
#43 Old 25th Sep 2007 at 6: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!
Instructor
#44 Old 14th Mar 2008 at 1: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!
Retired Duck
retired moderator
Original Poster
#45 Old 14th Mar 2008 at 11:48 PM
Congrats! You're certainly getting through the tutorials pretty well!
Lab Assistant
#46 Old 18th Sep 2008 at 2: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!
Attached files:
File Type: zip  Hydroponic.zip (171.9 KB, 11 downloads) - View custom content

Visit my new site: Sims MX
Retired Duck
retired moderator
Original Poster
#47 Old 18th Sep 2008 at 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?
Gone Fishin'
retired moderator
#48 Old 30th Jun 2011 at 8:10 PM Last edited by NixNivis : 8th Sep 2011 at 1:12 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.
*shrugs*
retired moderator
#49 Old 1st Jul 2011 at 5: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, 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.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Retired Duck
retired moderator
Original Poster
#50 Old 1st Jul 2011 at 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.
Page 2 of 3
Back to top