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!
Quick Reply
Search this Thread
Mad Poster
Original Poster
#1 Old 30th May 2012 at 5:14 PM
Default Help to add something to an object
I'm not sure if this is the right forum as this is not my creation, but I want to know if it's possible to alter some things on it and I was hoping that someone could help.

I downloaded this:

http://www.simwardrobe.com/

I can't link directly to the file, it's under Sims 2/Objects/Business Facilitators/Vocational Training Controller

I was delighted when I found this as I wanted to have a Professor type Sim who could give lectures/teach, but the podium doesn't have all the skills on it. How easy would it be to add other skills?

Also, would it be possible to add Hobbies to it so you could lecture on Arts and Crafts or Film and Literature and increase the pupils' hobby enthusiasm? Or would that be too difficult?

Thanks for any help.
Advertisement
*shrugs*
retired moderator
#2 Old 1st Jun 2012 at 1:06 AM
Hi Charity322. Yes, it should be possible. How easy it might be depends upon your level of modding though.

If you have never worked with BHAVs, I would recommend starting with Echo's Making Your First Custom BHAV tutorial. Once you are more familiar with the process, you can move onto her Making a better interaction - Entries, exits, skills and motives tutorial.

What additional skills were you wanting to add? You can view skill IDs here for the Global BHAV 0x01D7 ("Skill - Start").

The hobby enthusiasm might be a bit different. I have not really looked into how hobby enthusiasm is handled. Don't quote me on this; but from what I can tell, the hobby enthusiasm is not really a skill per se. You may have to create your own a skilling loop which has a line:
[prim 0x0002] Expression (My person data 0x00CD (HobbyEnthusiasm2-Arts) += SKILL INCREMENT AMOUNT)

There are some Global BHAVs which manage the Overhead Meter, but I'm not sure if they could be used for hobby enthusiasm. That said, if the "Study/Do Homework" interaction for the Vocational Training podium's students is already handled (i.e. the Skilling meter is like the one used for percent completion of school homework and not representative of the skill level) then you may not need to worry about that.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Mad Poster
Original Poster
#3 Old 2nd Jun 2012 at 4:41 PM
I'm pretty much at the bottom of the modding ladder. The only things I've done are recolours.

I wanted to add skills like creativity and logic. Is that just a matter of copying the BHAVs for another skill and changing the number? The Vocational Controller seems to have 3 separate parts to it as well and I'm not sure if I need to change something in each part or just one?

I have no idea what to do with the hobby stuff; the controller seems to use the normal skilling meter, not the homework one, so I guess a fair few changes would have to be made. Maybe there's a reason hobbies weren't originally included lol.
*shrugs*
retired moderator
#4 Old 10th Jun 2012 at 1:32 AM
It may be fairly easy to replace an existing Skilling interaction for another (i.e. the podium teaches Skill X and you want to change it to Y instead of X), since that would likely require simply changing the Skill ID in the BHAV and updating any reference in the text (e.g. "Learn/Teach X" to "Learn/Teach Y"). But you probably will have a better success if you start with the tutorials first and work your way towards this.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Mad Poster
Original Poster
#5 Old 10th Jul 2012 at 4:37 PM
OK, I'm giving this a go, but the controller is very complicated and I was wondering if someone more knowledgeable than me could open it up in SimPE and tell me why there are three separate parts to it and if I need to change things in each part or just one of them?

Also, is it just the BHAVs that I need to make new ones of or is there something else I need to change to make it recognise new skills?

Thanks for any help.
Mad Poster
Original Poster
#6 Old 20th Nov 2012 at 12:57 PM
Quote: Originally posted by Charity322
OK, I'm giving this a go, but the controller is very complicated and I was wondering if someone more knowledgeable than me could open it up in SimPE and tell me why there are three separate parts to it and if I need to change things in each part or just one of them?

Also, is it just the BHAVs that I need to make new ones of or is there something else I need to change to make it recognise new skills?

Thanks for any help.


I've been trying this but I can't seem to make heads or tails of it.

Is there anyone that's willing to help me out, please?
*shrugs*
retired moderator
#7 Old 22nd Nov 2012 at 8:23 PM
Part One is the podium object for the lecturer.
Part Two appears to be the homework/assignment for the students.
Part Three appears to be a Skill tracker for the students.


If it helps, imagine the podium as being like a conductor in an orchestra. It leads the musicians with their instruments (the students and the homework object). Through the use of attributes, one can send and/or receive information to/from the other. Here's where my illustration becomes fuzzy. The Skill tracker could perhaps be thought of some kind of inner-working inside the instrument/musician or homework/student. There may be a similar exchange of information via attributes.

I don't know for certain, but you may only need to work with Part 1 and Part 2 which seems to manage the class, subject being taught, and the students' studying.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Mad Poster
Original Poster
#8 Old 1st Dec 2012 at 10:09 AM
Quote: Originally posted by maybesomethingdunno
Part One is the podium object for the lecturer.
Part Two appears to be the homework/assignment for the students.
Part Three appears to be a Skill tracker for the students.


If it helps, imagine the podium as being like a conductor in an orchestra. It leads the musicians with their instruments (the students and the homework object). Through the use of attributes, one can send and/or receive information to/from the other. Here's where my illustration becomes fuzzy. The Skill tracker could perhaps be thought of some kind of inner-working inside the instrument/musician or homework/student. There may be a similar exchange of information via attributes.

I don't know for certain, but you may only need to work with Part 1 and Part 2 which seems to manage the class, subject being taught, and the students' studying.


Firstly, thanks for all your help!

I have successfully managed to clone the Cooking skill interaction so it ... also teaches cooking lol. I'm having trouble figuring out where I change the skill so it does Creativity instead of Cooking.



There's this BHAV on the podium, which also links to this BHAV.



Then, there's this BHAV on the homework.



Can you tell where I'm supposed to change the skill taught/studied from cooking to creativity (I think these are the only ones where it needs to be changed)?

I was using the Skill IDs link further up this thread, but none of the numbers seemed to match.
*shrugs*
retired moderator
#9 Old 1st Dec 2012 at 10:22 PM
In the Part 2 file, check out the "SW - Sub - Study Subject Loop" and then the "SW - Study Non-Badge Skills" BHAVs.

The "SW - Study Non-Badge Skills" BHAV has a "SW - Get Subject Being Taught In T[0]" node that (as its name suggests) sets Temp 0 as the "Subject Being Taught" attribute value set via the Part 1 file. It then sets a Local variable to have the Temp's value and then goes through, checking against the Local's value:

Does it equal 1? If so, then go to the "Study Mechanical Start " node
Else, does it equal 2? If so, then go to the "Study Cooking Start " node
Else, does it equal 3? If so, then go to the "Study Cleaning Start " node
Else, return False since the value fails all these checks.


In the "Select Subject Creativity" BHAV in your screenshot, you have the "Subject Being Taught" attribute as having a value of Literal 2. When the "SW - Study Non-Badge Skills" BHAV gets to the aforementioned "Does it equal 2? " check, it will go to the "Study Cooking Start" node. So you will need to set the attribute value to something else...let's say Literal 4. (Make sure the value doesn't conflict with those used in the "SW - Study Badge Skills" BHAV.)

But then instead of having the "SW - Study Non-Badge Skills" BHAV return False if the value fails all these checks set it to your "SW - Study Creativity Start" BHAV.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Mad Poster
Original Poster
#10 Old 2nd Dec 2012 at 3:21 AM
Quote: Originally posted by maybesomethingdunno
But then instead of having the "SW - Study Non-Badge Skills" BHAV return False if the value fails all these checks set it to your "SW - Study Creativity Start" BHAV.


My SW - Study Creativity Start BHAV is a clone of the cooking one at the moment though. How do I make it teach Creativity instead of Cooking?
*shrugs*
retired moderator
#11 Old 2nd Dec 2012 at 3:57 AM
In your "SW - Study Creativity Start" BHAV, the last node ("[private 0x1074] SW - Skill - Start") accepts 4 parameters. The first parameter is the skill, so change it so that it is passing the value that represents Creativity.


[private 0x1074] SW - Skill - Start (4 args: Const 0x011B:0x04 ("Creativity" Value: 0x000F), Temp 0x0000, Stack Object ID 0x0000, Stack Object ID 0x0000)

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Mad Poster
Original Poster
#12 Old 2nd Dec 2012 at 7:53 AM
Quote: Originally posted by maybesomethingdunno
In your "SW - Study Creativity Start" BHAV, the last node ("[private 0x1074] SW - Skill - Start") accepts 4 parameters. The first parameter is the skill, so change it so that it is passing the value that represents Creativity.


[private 0x1074] SW - Skill - Start (4 args: Const 0x011B:0x04 ("Creativity" Value: 0x000F), Temp 0x0000, Stack Object ID 0x0000, Stack Object ID 0x0000)


Thanks. Ok, one more question. How do I change that? I'm not getting an edit option.
*shrugs*
retired moderator
#13 Old 2nd Dec 2012 at 6:26 PM Last edited by maybesomethingdunno : 2nd Dec 2012 at 6:40 PM.
Open the Part 2 file, find your "SW - Study Creativity Start" BHAV", and then select the "SW - Skill - Start" node. Click the little button with the tools on it to open the Pop-up Wizard (it's the little button next to the button with the " and the X).

This picture uses a different BHAV with different parameters, but I hope it demonstrates what I mean.



Select the "New-format" radio button and then use the dropdown(s). Don't worry about the ones next to any that say "Unused."



If you clicked the "view BHAV" link, you only get a read-only view of said BHAV; you won't be able to Commit changes to it. You must actually open the BHAV you want to edit.


Here's some general things that have come to my mind that I'll mention so I'll sleep better tonight.

1) Since you've added a BHAV, make sure it doesn't have the same Instance number as any other BHAV in the package.
2) If you check the "Special Buttons" checkbox, you'll get the buttons you see in my screenshot.

"Insert via True" and "Insert via False" adds a BHAV node from the currently selected node.
For example, in a BHAV, the node 0x8 may be [global 0x016E] Idle - Hours (1 arg: Hours=0x0000). If I have that node selected and click "Insert via True", it will create another node: node 0x9 ([global 0x016E] Idle - Hours (1 arg: Hours=0x0000)) that is already linked to node 0x8's Return True path.

The "Delete to End" button deletes the current node and all subsequent nodes down the BHAV. Note that it can break paths. If the Return False path node 0x0 points to node 0x9 but you clicked "Delete to End" on node 0x5, the Return False path for node 0x0 will still point to the (now) non-existent 0x9 node.

The "Pescado's Delete" button only deletes the currently selected node and better maintains node connections. For example, if node 0x1 linked to node 0x2 which linked to node 0x3 and you use "Pescado's Delete" on node 0x2, it will automatically link 0x1 to node 0x3 (which is actually now node 0x2).

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Mad Poster
Original Poster
#14 Old 3rd Dec 2012 at 6:26 AM
Ok, this is what I've got so far.

I've got the lecturer trying to teach the subject, but the students aren't starting to learn the skill. I'm not sure what I've done wrong, so any help would be appreciated.
Attached files:
File Type: rar  SW-Vocational-Training-Controller.rar (245.6 KB, 14 downloads) - View custom content
*shrugs*
retired moderator
#15 Old 5th Dec 2012 at 3:45 AM
In your Controller Part 1 file, you have an instance conflict; both the "SW - Interaction - Report Settings" BHAV and the "SW - Interaction - Select Subject Creativity" BHAV have an instance value of 0x0000104B. I would change the "SW - Interaction - Select Subject Creativity" BHAV instance to 0x0000104C. Be sure to update your Pie Menu Function.

Then in Part 2, in your "SW - Study Non-Badge Skills", no nodes lead to your 0x19 or 0x1A nodes, so they are never executed. Select node 0x7 ([prim 0x0002] Expression (Local 0x0001 == Literal 0x0003)) and set its False Target to be 0x19.

You're also going to get an "Stack number out of range." error. In your "SW - Skill - Start" BHAV (still in Part 2 file), you need to change the True Target path for node 0xA ([prim 0x0002] Expression (Temp 0x0003 := Param 0x0003)) to point back to 0xB. You don't need the node 0xE ([prim 0x0002] Expression (Temp 0x0004 := Param 0x0004)); in fact, that's what will cause the error. The Arg Count for the BHAV is 4; you are only passing 4 values to this this BHAV when you use the "SW - Skill - Start (4 args:
Const 0x011B:0x04 ("Creativity" Value: 0x000F), Temp 0x0000, Stack Object ID 0x0000, Stack Object ID 0x0000)" node in your "SW - Study Creativity Start" BHAV.

Param 0 refers to Const value, Param 1 refers to the Temp, Param 2 and Param 3 are the Stack Object ID being passed in. When the game sees Param 4; it doesn't know what that is.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Mad Poster
Original Poster
#16 Old 5th Dec 2012 at 4:22 AM
Quote: Originally posted by maybesomethingdunno
Param 0 refers to Const value, Param 1 refers to the Temp, Param 2 and Param 3 are the Stack Object ID being passed in. When the game sees Param 4; it doesn't know what that is.


That makes two of us. XD Params 1-3 seemed to be matched with each skill, so I thought skill 4 needed a param 4 to go with it as I had absolutely nfi what the params did. I think I'll go back and start again, as I have recollections of adding another param to more than one BHAV and I've probably borked it rather talentedly lol.

Thanks!
*shrugs*
retired moderator
#17 Old 5th Dec 2012 at 4:48 AM
The Params correspond to the arguments in the function call, not the skills. It just so happens that the first parameter is the value of the skill.

The Param index starts at zero. So the first parameter is Param 0, the second parameter is Param 1, and so forth....

I highly recommend you read Data Types for Simantics Users. It will better explain parameters and passing values to other functions.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Mad Poster
Original Poster
#18 Old 5th Dec 2012 at 9:38 AM
Alright, I've got almost everything working. The students are studying, the instructor is teaching - but they're still learning cooking. DX



I checked all the stuff you mentioned and it says that it's teaching Creativity, but it's not.

What have I screwed up?
*shrugs*
retired moderator
#19 Old 5th Dec 2012 at 10:40 PM
Could you post your updated files so I can see exactly what you've done?

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Mad Poster
Original Poster
#20 Old 6th Dec 2012 at 2:12 AM
Done, thanks.
Attached files:
File Type: rar  SW-Vocational-Training-Controller.rar (245.5 KB, 17 downloads) - View custom content
*shrugs*
retired moderator
#21 Old 8th Dec 2012 at 8:39 PM
In your Part 1 file, your "SW - Interaction - Select Subject Creativity" BHAV and your "SW - Interaction - Select Subject Cooking" BHAV are setting the attribute to have a value of Literal 2. In your your "SW - Interaction - Select Subject Creativity" BHAV, change it to be [prim 0x0002] Expression (Stack Object's attribute 0x0003 ("Subject Being Taught") := Literal 0x0004).

Then, in the "SW - Can The Instructor Teach This Subject?" BHAV (also in the Part 1 file), you'll need to account for this additional value. The value is stored in Local 0x0001 and then its value is compared.
Node 7: [prim 0x0002] Expression (Local 0x0001 == Literal 0x0003) True Target:0x0008 False Target: 0x0009
Node 8: [prim 0x0002] Expression (Stack Object's person data 0x0009 (Cleaning Skill) >= Literal 0x03E8) True Target:Return True False Target: 0x001E
Node 9: [prim 0x0002] Expression (Local 0x0001 == Literal 0x0010) True Target:0x000A False Target: 0x000C [Here is where is where the Skills end and the Badges begin.]

You notice that it skips from checking if the value is a Literal value of 3 (hexadecimal value of 0x0003) to checking if the value is a Literal value of 16 (hexadecimal 0x0010) in node 9. The BHAV will return False for any unexpected value of Local 0x0001, meaning that the Instructor will not start teaching the skill even though it may be an option. So you will need to add a check for it is equal to Literal 0x0004 (and if you so desire) add the skill level check for creativity.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Mad Poster
Original Poster
#22 Old 9th Dec 2012 at 5:42 AM
Quote: Originally posted by maybesomethingdunno
In your Part 1 file, your "SW - Interaction - Select Subject Creativity" BHAV and your "SW - Interaction - Select Subject Cooking" BHAV are setting the attribute to have a value of Literal 2. In your your "SW - Interaction - Select Subject Creativity" BHAV, change it to be [prim 0x0002] Expression (Stack Object's attribute 0x0003 ("Subject Being Taught") := Literal 0x0004).

Then, in the "SW - Can The Instructor Teach This Subject?" BHAV (also in the Part 1 file), you'll need to account for this additional value. The value is stored in Local 0x0001 and then its value is compared.
Node 7: [prim 0x0002] Expression (Local 0x0001 == Literal 0x0003) True Target:0x0008 False Target: 0x0009
Node 8: [prim 0x0002] Expression (Stack Object's person data 0x0009 (Cleaning Skill) >= Literal 0x03E8) True Target:Return True False Target: 0x001E
Node 9: [prim 0x0002] Expression (Local 0x0001 == Literal 0x0010) True Target:0x000A False Target: 0x000C [Here is where is where the Skills end and the Badges begin.]

You notice that it skips from checking if the value is a Literal value of 3 (hexadecimal value of 0x0003) to checking if the value is a Literal value of 16 (hexadecimal 0x0010) in node 9. The BHAV will return False for any unexpected value of Local 0x0001, meaning that the Instructor will not start teaching the skill even though it may be an option. So you will need to add a check for it is equal to Literal 0x0004 (and if you so desire) add the skill level check for creativity.


Okay, I did it! Thanks heaps! I managed to make it teach Creativity. Thanks heaps again.

I've tried to replicate it for the other skills: charisma, body, logic, but now they teach creativity. I thought I'd set it up to teach the individual skill, so I must have gone wrong somewhere (again).

Hopefully this should be my last screw up. DX

And how do you make it stop giving the instructor automatic charisma just for teaching?
Attached files:
File Type: rar  SW-Vocational-Training-Controller.rar (248.5 KB, 23 downloads) - View custom content
*shrugs*
retired moderator
#23 Old 12th Dec 2012 at 2:12 AM Last edited by maybesomethingdunno : 12th Dec 2012 at 2:57 AM.
In your "SW - Study Non-Badge Skills" BHAV in the Part 2 file, you need to mimic the preceding evaluation of Local 0x0001.

You have
0x7 [prim 0x0002] Expression (Local 0x0001 == Literal 0x0003) T: 0x8 F: 0x19
0x8 [private 0x1082] SW - Study Cleaning Start (no args) T: 0x9 F: Error
.
.
.
0x19 [private 0x1090] SW - Study Creativity Start (no args) T: 0x9 F: 0x1A
0x1A [private 0x1091] SW - Study Body Start (no args) T: 0x9 F: 0x1B
0x1B [private 0x1092] SW - Study Charisma Start (no args) T: 0x9 F: 0x1B
0x1C [private 0x1093] SW - Study Logic Start (no args) T: 0x9 F: Error


You have one Skill leading to the next along their False paths, which is probably not what you want. Your node 0x7's logic is this: "If Local 0x1 (the Subject) does not equal 3 (Cleaning), then go the node that gives the command to Start Teaching Creativity."

You need to add more evaluations of Local 0x0001 and traverse nodes accordingly. Since (at the time) you were only adding one additional skill (Creativity), it didn't really matter what the actual value of Local 0x01. As long as it did not meet the criteria of the previous evaluations (Does it equal 0? Does it equal 1? And so forth....), it would then go down a "Catch-all" path that led to the "Start Teaching Creativity" node. Since there are more outcomes, we need to know more.

If Local 0x1 does not equal 3, what then? Perform more evaluations.


Does it equal 4? If so, go to the "SW - Study Creativity Start " node
Else, let's see if it equals 5. Does it? If so, go to the "SW - Study Body Start" node.
Else, does it equal 6? If so, go to the "SW - Study Charisma Start" node.
Else, well, if it doesn't equal a value by now, the only skill left is Logic, right? So just have it point to the "SW - Study Logic Start" node.

Note that, like before, this serves as a "Catch-all" path. The "SW - Sub - Study Subject Loop" BHAV has a comparison for the value: if it's less than 16 (0x0010 in hexadecimal), go to the "SW - Study Non-Badge Skills" BHAV....Else, go to the "SW - Study Badge Skills" BHAV. Unless you are going to add values for 8 and up ( < 16) for any further interactions, this should be okay.

All the "SW - Study WHATEVER Start" nodes seem like their True Target paths should point to the 0x9 "Wait For Notify" node and their False Target paths should return Error.



ETA: To stop the teacher from gaining Charisma, check out the "Interaction - Teach Selected Subject" BHAV in the Part 1 file. You will need to redirect the path of code execution so that the Sim does not start skilling.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Mad Poster
Original Poster
#24 Old 14th Dec 2012 at 1:39 PM Last edited by HugeLunatic : 17th Dec 2013 at 1:32 PM.
Done!

Thank you so much for sticking with me while I bumbled my way through this and for being so patient! If I could then I would totally send you cookies!

After all that effort I think I'll give up on the hobbies, as I'm guessing it's not just a case of simply adding them. I haz my skills; I iz happy. XD

Thank you again!!

I'll upload the finished files here in case anyone else ever wants to use them. I managed to remove the charisma boost for teaching, as well, but it wouldn't be hard to readd that if someone wanted it. I just skipped one line in the 'Interaction - Teach Selected Subject' BHAV.
Mad Poster
Original Poster
#25 Old 17th Dec 2013 at 5:26 AM Last edited by HugeLunatic : 17th Dec 2013 at 1:32 PM.
Someone asked me to reupload the finished product here as the old link wasn't working anymore.

Does anyone know if Paladin would allow this to be properly uploaded? Looking back over all the stuff I had to learn it seems a shame not to do a proper upload, but I thought I remembered him not allowing changing of his stuff.
Page 1 of 2
Back to top