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!
Test Subject
Original Poster
#1 Old 26th Aug 2011 at 12:12 AM
Default How to make social interactions/ sim pie menu?
I was wondering how do you make a custom social interaction? for example an interaction that could make plantsims feed off of people for an increased water motive. i tried reading the thread about this with cloning the social download test but i didnt understand it. ive made a modded painting that increases motives/ animates sim, if that helps and im familiar with simpe. please help me out?
Advertisement
*shrugs*
retired moderator
#2 Old 27th Aug 2011 at 4:48 AM
Check out this thread, specifically Echo's post.

Quote: Originally posted by Echo
The second piece of advice I'd give is not to use the Social Download Test. I know that's what the thread tells you to use, but it's buggy and in need of some serious pruning before its usable. Instead, you might find it easier to take one of the social objects already available for download and reverse engineer that instead. You're welcome to use the ones here: http://modthesims.info/d/258224 (if you're changing it significantly, no credit is required). It has self-interactions and multiple-sim interactions so it should cover most of what you need.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Test Subject
Original Poster
#3 Old 27th Aug 2011 at 8:46 PM
Quote: Originally posted by maybesomethingdunno
Check out this thread, specifically Echo's post.


thanx man i been workin on one for like 3 hours now idk if itll work but ill try it out n see
Test Subject
Original Poster
#4 Old 28th Aug 2011 at 4:50 PM
Quote: Originally posted by deathealer
thanx man i been workin on one for like 3 hours now idk if itll work but ill try it out n see


hey man my object aint workin can you take a look at it?
Attached files:
File Type: zip  deathdealers-vampire-interaction.zip (2.6 KB, 36 downloads) - View custom content
*shrugs*
retired moderator
#5 Old 29th Aug 2011 at 4:27 AM
Okay. I have not tested this in game. But for starters, you have three BHAVs with the same Instance number. That's certainly not good. The Instance number is how the game know what is what. If they all have the same number, how is the game going to know which one is the one you want? The True Target for your "CT - Object Menu" and "CT - Object Menu Command" BHAVs point to nonexistent nodes. That also can't be good. I am not certain if the init in the OBJF should be pointing to the "CT - Object Menu" BHAV...was that a change you made or was it already pointing to that BHAV? It is possible that is because of the Instance number conflict.


Looking ahead, I see [global 0x048F] Vampire - Is Sim a Vampire? (1 arg: Sim ID=Stack Object's attribute 0x0000 ("Person A")) in your "Interaction - Person A" BHAV. I don't think that is going to work unless the value of the Stack Object's "Person A" attribute is a Sim ID. However that is not even the right check for a Plant Sim. You would need to check to see if the Stack Object's person data PersonData Flags 1 has a particular flag set...in particular Const 0x0119:0x2A ("Is Plantman?" Value: 0x0009). In addition to changing it to alter the water motive, you will also need to get rid of the Vampire transformation code and anything related to the "Grand Vampire" NPC. By the looks of things, it does not seem like you have done much in terms of altering what the interaction actually does, correct?

Personally, I really think Echo's Sim Sourcery mod would be a better base as it would seem to be easier to modify (less leftover EA stuff to get rid of) and it would minimize the chance of errors should your Social object have been improperly cloned.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Test Subject
Original Poster
#6 Old 30th Aug 2011 at 1:36 AM
Quote: Originally posted by maybesomethingdunno
Okay. I have not tested this in game. But for starters, you have three BHAVs with the same Instance number. That's certainly not good. The Instance number is how the game know what is what. If they all have the same number, how is the game going to know which one is the one you want? The True Target for your "CT - Object Menu" and "CT - Object Menu Command" BHAVs point to nonexistent nodes. That also can't be good. I am not certain if the init in the OBJF should be pointing to the "CT - Object Menu" BHAV...was that a change you made or was it already pointing to that BHAV? It is possible that is because of the Instance number conflict.


Looking ahead, I see [global 0x048F] Vampire - Is Sim a Vampire? (1 arg: Sim ID=Stack Object's attribute 0x0000 ("Person A")) in your "Interaction - Person A" BHAV. I don't think that is going to work unless the value of the Stack Object's "Person A" attribute is a Sim ID. However that is not even the right check for a Plant Sim. You would need to check to see if the Stack Object's person data PersonData Flags 1 has a particular flag set...in particular Const 0x0119:0x2A ("Is Plantman?" Value: 0x0009). In addition to changing it to alter the water motive, you will also need to get rid of the Vampire transformation code and anything related to the "Grand Vampire" NPC. By the looks of things, it does not seem like you have done much in terms of altering what the interaction actually does, correct?

Personally, I really think Echo's Sim Sourcery mod would be a better base as it would seem to be easier to modify (less leftover EA stuff to get rid of) and it would minimize the chance of errors should your Social object have been improperly cloned.


i knew i had a TON of problems with that first one but i did just try to to use echo's magic wand mod i think it was from the link that you gave me a few posts back, and it did not work. but i am trying to make an interaction where a sim could "feed" off another sim for increased motives. i deleted all the crap involving the magic wand except for a person and a person b. i then added the animation, renamed(pie menu strings etc.), and messed with OBJD. i tried it and no interaction. i checked off what you said about my previous one and all was right but still no effect. am i using the right mod, or am i doing something wrong? i will post it if you would like to check it.
Test Subject
Original Poster
#7 Old 30th Aug 2011 at 1:51 AM
Quote: Originally posted by deathealer
i knew i had a TON of problems with that first one but i did just try to to use echo's magic wand mod i think it was from the link that you gave me a few posts back, and it did not work. but i am trying to make an interaction where a sim could "feed" off another sim for increased motives. i deleted all the crap involving the magic wand except for a person and a person b. i then added the animation, renamed(pie menu strings etc.), and messed with OBJD. i tried it and no interaction. i checked off what you said about my previous one and all was right but still no effect. am i using the right mod, or am i doing something wrong? i will post it if you would like to check it.


here it is i was using the right mod but i had no effect. im thinking maybe an error with the pie menu because the feed interaction doesnt show up in the pie menu.
Attached files:
File Type: zip  deathdealers-vampire-interaction.zip (8.0 KB, 17 downloads) - View custom content
*shrugs*
retired moderator
#8 Old 30th Aug 2011 at 4:52 AM
It's not showing up because there is nothing to tell it to show up. Your object is actually going to be an off-world object. It will be somewhere floating in the Sim ether. If it were an object which could be placed on the ground or on a table, you could simply click on it and you would see the pie menus on the object itself. What you need is the social plugin to add the pie menus onto the Sims.

In Echo's mod, it is the "echo_magicwand_spellset.package" file. In it, there will be two BHAVs: "CT - Object Menu" which should act as the Guardian function for the interaction(s) and "CT - Object Menu Command" which will decide what actions will be pushed onto the Sim. Take note of the value of the Temp and the subsequent "Add/Change the Action String" nodes inside the "CT - Object Menu" BHAV. If I recall correctly, there should be a correlation with a Param (Param 0?) in the "CT - Object Menu Command" BHAV which typically used as a means of checking what interaction should be pushed. You should see a node in the "CT - Object Menu Command" BHAV which spawns a new instance of an object (using its GUID) that will be your social whose interactions can be referenced and pushed onto a Sim.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Test Subject
#9 Old 1st Sep 2011 at 3:00 AM Last edited by xSkyBirdx : 1st Sep 2011 at 10:32 PM.
Ok there was some good info in this thread that helped me understand some stuff but I'm still really confused because I don't even know where to start and I can't find this info ANYWHERE...

If I want to add a new social interaction, what files do I need to include in the package, exactly? When I tried to do this, I first cloned that Social Download Test OBJD thing that now I don't think I am even supposed to use. Then I made a Pie Menu Function TTAB and in the Plugin View thing it needed a Pie String ID, an Action BHAV, and a guardian BHAV. I made a Pie Menu String TTAs and then selected it as the option in the TTAB thing and I imported clones of BHAVs from an interaction similar to the one I'm trying to make and set those to be the action and guardian BHAVs for the TAB thing.

So I thought since it had a name and a guardian and an action it would show up in the pie menu now and then I could edit the BHAVs from there, but I am obviously not doing it right because that didn't work at all. How do I even set this up so that it will be in the pie menu, like what are the bare minimum of the files I need and how do I make sure they are all set up and connected right so that I can use the interaction in the game and change what it does by editing the BHAV stuff?

Yeah I know this is probably a stupid question but I have no idea what I'm doing here trying to set this up Can someone please point me in the right direction?

PS: Also I had another question.. I think that when I make new things I'm supposed give them unique instances so they don't overwrite/conflict with other stuff but how do get the instance and if I just pick something random how do I know that it isn't already used? Is there like a system or a way to figure out how to change that? I never really got what to do when the tutorials told me to give it a unique instance... :/

Edit for more info: Right now when I put the package in my downloads it bugs the game out, the sims just keep resetting and can't do anything. So I think maybe I accidentally overwrote something important? (see the question in the PS... :/)
Test Subject
Original Poster
#10 Old 2nd Sep 2011 at 1:40 AM
Quote: Originally posted by maybesomethingdunno
It's not showing up because there is nothing to tell it to show up. Your object is actually going to be an off-world object. It will be somewhere floating in the Sim ether. If it were an object which could be placed on the ground or on a table, you could simply click on it and you would see the pie menus on the object itself. What you need is the social plugin to add the pie menus onto the Sims.

In Echo's mod, it is the "echo_magicwand_spellset.package" file. In it, there will be two BHAVs: "CT - Object Menu" which should act as the Guardian function for the interaction(s) and "CT - Object Menu Command" which will decide what actions will be pushed onto the Sim. Take note of the value of the Temp and the subsequent "Add/Change the Action String" nodes inside the "CT - Object Menu" BHAV. If I recall correctly, there should be a correlation with a Param (Param 0?) in the "CT - Object Menu Command" BHAV which typically used as a means of checking what interaction should be pushed. You should see a node in the "CT - Object Menu Command" BHAV which spawns a new instance of an object (using its GUID) that will be your social whose interactions can be referenced and pushed onto a Sim.


hey man same problem, did what you told me but what do i do from here? i extracted and imported the Launch Social BHAV form echo's thing as well as the CT menus. So what do need to do to finish it up?
Attached files:
File Type: zip  deathdealers-vampire-interaction.zip (8.5 KB, 12 downloads) - View custom content
Test Subject
Original Poster
#11 Old 2nd Sep 2011 at 1:41 AM
Quote: Originally posted by xSkyBirdx
Ok there was some good info in this thread that helped me understand some stuff but I'm still really confused because I don't even know where to start and I can't find this info ANYWHERE...

If I want to add a new social interaction, what files do I need to include in the package, exactly? When I tried to do this, I first cloned that Social Download Test OBJD thing that now I don't think I am even supposed to use. Then I made a Pie Menu Function TTAB and in the Plugin View thing it needed a Pie String ID, an Action BHAV, and a guardian BHAV. I made a Pie Menu String TTAs and then selected it as the option in the TTAB thing and I imported clones of BHAVs from an interaction similar to the one I'm trying to make and set those to be the action and guardian BHAVs for the TAB thing.

So I thought since it had a name and a guardian and an action it would show up in the pie menu now and then I could edit the BHAVs from there, but I am obviously not doing it right because that didn't work at all. How do I even set this up so that it will be in the pie menu, like what are the bare minimum of the files I need and how do I make sure they are all set up and connected right so that I can use the interaction in the game and change what it does by editing the BHAV stuff?

Yeah I know this is probably a stupid question but I have no idea what I'm doing here trying to set this up Can someone please point me in the right direction?

PS: Also I had another question.. I think that when I make new things I'm supposed give them unique instances so they don't overwrite/conflict with other stuff but how do get the instance and if I just pick something random how do I know that it isn't already used? Is there like a system or a way to figure out how to change that? I never really got what to do when the tutorials told me to give it a unique instance... :/

Edit for more info: Right now when I put the package in my downloads it bugs the game out, the sims just keep resetting and can't do anything. So I think maybe I accidentally overwrote something important? (see the question in the PS... :/)


hey mate, i'm no expert but pm me so i dont have to write a long freakin post. but like i said i'm no expert, i can try to help you but i'm learnin too.
*shrugs*
retired moderator
#12 Old 2nd Sep 2011 at 6:00 AM
deathealer: I don't have time tonight to look at the file. My time has become sadly limited lately. But you probably should have 2 package files: one which contains the Person A/Person B interaction and the other which adds the pie menu and spawns and then pushes the interaction. Don't try to import everything into the same package. What you described sounds like the problem in the thread I linked to in Post #2.

xSkyBirdx: Have you worked with BHAVs before? If not, you really should complete this tutorial first. Wiki entry about SimPE Resources Editing: Instances. Two separate packages can have a resource of the same instance. So two package files can each have a BHAV of instance value of 0x1005, but there cannot be two BHAVs of instance value of 0x1005 in the same package file. As far as I know, they can be completely arbitrary, but what matters is that they are unique within the package and that they remain within the appropriate range. I think it would be easier to make a proper clone of a mod than to completely Frankenstein-it together. More often than not, it is better to start with a base object/mod which is most like your goal than to start from scratch. It would be hard to diagnose your mod's problem without looking at it. All I can do is to refer you back to the advice previously given in this thread and the one I linked to in Post #2.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Test Subject
Original Poster
#13 Old 4th Sep 2011 at 1:09 AM
Quote: Originally posted by maybesomethingdunno
deathealer: I don't have time tonight to look at the file. My time has become sadly limited lately. But you probably should have 2 package files: one which contains the Person A/Person B interaction and the other which adds the pie menu and spawns and then pushes the interaction. Don't try to import everything into the same package. What you described sounds like the problem in the thread I linked to in Post #2.

xSkyBirdx: Have you worked with BHAVs before? If not, you really should complete this tutorial first. Wiki entry about SimPE Resources Editing: Instances. Two separate packages can have a resource of the same instance. So two package files can each have a BHAV of instance value of 0x1005, but there cannot be two BHAVs of instance value of 0x1005 in the same package file. As far as I know, they can be completely arbitrary, but what matters is that they are unique within the package and that they remain within the appropriate range. I think it would be easier to make a proper clone of a mod than to completely Frankenstein-it together. More often than not, it is better to start with a base object/mod which is most like your goal than to start from scratch. It would be hard to diagnose your mod's problem without looking at it. All I can do is to refer you back to the advice previously given in this thread and the one I linked to in Post #2.


i made 2 pkg files, one with just 2 bhavs: the person a and person b with interactions in both; and the other with 3 but with ct object menu, ct object menu command, and function init(category 56?). i tried to use another thread with some VERY specific instructions but still no help. whenever you have time just take a look at them, because i am very patient and youve helped me a lot. so here they are, i think im somewhat close.
Attached files:
File Type: zip  deathdealers-vampire-interaction.zip (15.4 KB, 15 downloads) - View custom content
*shrugs*
retired moderator
#14 Old 5th Sep 2011 at 2:15 AM
Let me start off by apologize in advance for this wall of text....

It seems you merely duplicated the Social object to try to create the social plugin object. You will need to at least import the "Function - Main" and "Function - Init" BHAVs from Echo's social plugin into your "VampIntCT" package and update the "action BHAV" fields of the "main" and "init" lines in its OBJF to point to them.

In the "CT - Object Menu" BHAV of your "VampIntCT" package, the "False Target" path for node 3 ("[prim 0x0002] Expression (Param 0x0000 == My 0x000B (object id))") points to a nonexistent node. Nodes should always either point to an existing node or return a value (e.g. True, False, or Error).

Node 4 ("[prim 0x0033] Manage Inventory (Set To Next Token Of GUID, token: GUID 0x00000980, ......") is looking into the Sim's inventory for Echo's wand so this node should be removed unless you want the presence of a wand in the inventory as a requirement. The interaction is returning false and thus concluding if a wand is not present. (If you have "Special Buttons" checked, use the "Pescado's Delete" button when deleting a node to keep the links between nodes from breaking, resulting in nodes leading to nonexistent nodes.)

Nodes 5 and 7 also have broken references for either the True or False Target paths. Node 7 should return True for its True Target Path. I believe nodes 2 and 5 are unnecessary because they are remnants of Echo's mod which refer to the Magic Skill and I think Node 3's returns path is wrong for reasons I am about to explain.

But first, I'm going to take a brief and incomplete walk through Echo's "CT - Object Menu" and explain what is going on because I think it will help you. Hopefully, I won't make too many mistakes. Echo created Labels which, as the name implies, adds helpful information in the "Instruction Settings" area. This enables a person to clarify what a particular variable represents. So instead of simply "Local 0x0005 := Literal 0", you can have "Local 0x0005 (Number of Eggs remaining in the basket) := Literal 0".

It seems Param 0 is the Target Sim and Param 1 is whether or not the action is autonomous.

Node 0: [prim 0x0002] Expression (Param 0x0001 (Autonomous? (1=true)) == Literal 0x0000). Checks to see if the interaction was autonomous.

Node 1: [[prim 0x0002] Expression (My person data 0x003A (Person Age) > Const 0x0110:0x01 ("Child" Value: 0x0003))]. Checks to see if the castor (Active Sim) is older than the child stage.

Node 2: [private 0x1012] Magic - Get Skill Level (1 arg: Subject Neighbour ID=My person data 0x001F (neighbor id)). This a custom BHAV by Echo which returns the castor's Magic skill level as Temp 0.

Node 3: [prim 0x0002] Expression (Local 0x0002 (Caster's magic skill) := Temp 0x0000). Sets the Magic skill as Local 2. Any future evaluations of Local 2 (e.g. is Local 2 greater than or equal to X?) is a check to see if the Sim's skill level is high enough. This is why I don't think those nodes dealing with Local 2 are necessary in your package.

Node 4: [prim 0x0002] Expression (Param 0x0000 (Target Sim) == My 0x000B (object id)). This checks to see if the Target Sim was the Active Sim. If true, the action is a self-interaction such as the "Primp" or "Do Yoga". Your mod only proceeds if this is true and follows a broken False path if it is not (which would be the case if a second Sim is the Target Sim).

Since we are not working with self-interactions, I will following the False Target of Echo's Node 4.

Node C: [prim 0x0002] Expression (Local 0x0000 (Local 0) := Stack Object ID 0x0000). Remember that logic puzzle about a man having to carry a cabbage, a goat, and a wolf across a river in a boat which can only hold him and one other at a time? The man can't leave the wolf alone with the goat and he can't leave the goat alone with the cabbage. If he does, either the goat or the cabbage will be eaten when he's not looking. Sometimes we must juggle values in a similar way to keep from losing a value. Here we are storing the Stack Object as Local 0 because the Stack Object is about to change and we will want to be able to recover the original Stack Object.

Node D: [prim 0x0002] Expression (Stack Object ID 0x0000 := Param 0x0000 (Target Sim)). Sets the Stack Object to the Target Sim.

Node E: [prim 0x0002] Expression (Local 0x0001 (Local 1) := Stack Object's person data 0x003A (Person Age)). Stores the age of the Target Sim (now the Stack Object) as Local 1.

Node F: [prim 0x0002] Expression (Stack Object ID 0x0000 := Local 0x0000 (Local 0)). Returns the Stack Object back to its original value.

Node 10: [prim 0x0002] Expression (Local 0x0001 (Local 1) > Const 0x0110:0x01 ("Child" Value: 0x0003)). This checks to see if the stored age of the Target Sim is above the childhood stage. You will likely want the False Target path to return False, but the True Target path to go to next node.

The rest of the BHAV mainly deals with the Magic skill. For example, if the Magic skill above level 9, then Temp 0 := Literal X and Add/Change the Action String. Else, check to see if it is above level 8 in which case Temp 0 := Literal X+1 and Add/Change the Action String. Else, check to see if it is above level 7, in which case Temp 0 := Literal X+2 and Add/Change the Action String....and so forth.
Quote: Originally posted by Echo
The "Expression (Temp 0x0000 := Literal 0x000X)" calls are there so that, if your "CT - Object Menu" call adds more than one pie menu option, you can tell which one was clicked in you "CT - Object Menu Command" code. Whichever value was in Temp 0 at the time when the "Add/Change the Action String" was called, will end up in param 0x01 of "CT - Object Menu Command"


Which takes us to your "CT - Object Menu Command" BHAV....

Node 0: [prim 0x0002] Expression (Param 0x0001 == Literal 0x0000). Param 1 is whatever Temp 0 was before the "Add/Change the Action String" was called, so Param 1 should be Literal 1 according to your "CT - Object Menu" BHAV.
The way you have it is a little backwards since you know what the value is going to be.
You typically check against known, valid possibilities and leave the "if all else fails" paths to the unanticipated scenarios. (It would be better to say "Is the Param == Known Valid/Possible Value? If so, proceed; else, return false." Instead, you are saying "Param == Known Value to be False/Invalid/Unlikely?").
But technically speaking, this should still work in this particular instance.

Since Literal 1 does not equal Literal 0, the False Target path is taken, leading to a node which spawns a new instance of the social object. We do want the social object created, however this node's True Target does not lead anywhere (there is no node 0x000B) or return anything. Even if it simply returned True, it would create an instance of the social object but then say "okay, I'm done." It would not push any interactions.

You need to import the "Social - Launch Social" BHAV from Echo's social plugin.

After you spawn the social object, you can proceed to the "Social - Launch" BHAV, since you are only adding one interaction (and thus no real need to check the value of Param 1 in the event of additional interactions). The "Social - Launch" BHAV needs 3 values.

Unless, I'm mistaken: the first is Param 0x0000, the second will be the Literal number for the interaction for Sim A (from the Pie Menu functions of the social object), and the third will be the Literal value for Sim B (again from the Pie Menu functions of the social object) which should also happen to be the value of Param 1. Since you are only adding one interaction, there is no real need to check against the value of Param 1 and so you could probably just insert Param 1 directly into the "Social - Launch" BHAV as the third argument.


Whew! There may be mistakes that I didn't catch (in my post or in your packages) but hopefully not. Let's see where this takes us for now.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Test Subject
Original Poster
#15 Old 5th Sep 2011 at 6:23 PM
Quote: Originally posted by maybesomethingdunno
Let me start off by apologize in advance for this wall of text....

It seems you merely duplicated the Social object to try to create the social plugin object. You will need to at least import the "Function - Main" and "Function - Init" BHAVs from Echo's social plugin into your "VampIntCT" package and update the "action BHAV" fields of the "main" and "init" lines in its OBJF to point to them.

In the "CT - Object Menu" BHAV of your "VampIntCT" package, the "False Target" path for node 3 ("[prim 0x0002] Expression (Param 0x0000 == My 0x000B (object id))") points to a nonexistent node. Nodes should always either point to an existing node or return a value (e.g. True, False, or Error).

Node 4 ("[prim 0x0033] Manage Inventory (Set To Next Token Of GUID, token: GUID 0x00000980, ......") is looking into the Sim's inventory for Echo's wand so this node should be removed unless you want the presence of a wand in the inventory as a requirement. The interaction is returning false and thus concluding if a wand is not present. (If you have "Special Buttons" checked, use the "Pescado's Delete" button when deleting a node to keep the links between nodes from breaking, resulting in nodes leading to nonexistent nodes.)

Nodes 5 and 7 also have broken references for either the True or False Target paths. Node 7 should return True for its True Target Path. I believe nodes 2 and 5 are unnecessary because they are remnants of Echo's mod which refer to the Magic Skill and I think Node 3's returns path is wrong for reasons I am about to explain.

But first, I'm going to take a brief and incomplete walk through Echo's "CT - Object Menu" and explain what is going on because I think it will help you. Hopefully, I won't make too many mistakes. Echo created Labels which, as the name implies, adds helpful information in the "Instruction Settings" area. This enables a person to clarify what a particular variable represents. So instead of simply "Local 0x0005 := Literal 0", you can have "Local 0x0005 (Number of Eggs remaining in the basket) := Literal 0".

It seems Param 0 is the Target Sim and Param 1 is whether or not the action is autonomous.

Node 0: [prim 0x0002] Expression (Param 0x0001 (Autonomous? (1=true)) == Literal 0x0000). Checks to see if the interaction was autonomous.

Node 1: [[prim 0x0002] Expression (My person data 0x003A (Person Age) > Const 0x0110:0x01 ("Child" Value: 0x0003))]. Checks to see if the castor (Active Sim) is older than the child stage.

Node 2: [private 0x1012] Magic - Get Skill Level (1 arg: Subject Neighbour ID=My person data 0x001F (neighbor id)). This a custom BHAV by Echo which returns the castor's Magic skill level as Temp 0.

Node 3: [prim 0x0002] Expression (Local 0x0002 (Caster's magic skill) := Temp 0x0000). Sets the Magic skill as Local 2. Any future evaluations of Local 2 (e.g. is Local 2 greater than or equal to X?) is a check to see if the Sim's skill level is high enough. This is why I don't think those nodes dealing with Local 2 are necessary in your package.

Node 4: [prim 0x0002] Expression (Param 0x0000 (Target Sim) == My 0x000B (object id)). This checks to see if the Target Sim was the Active Sim. If true, the action is a self-interaction such as the "Primp" or "Do Yoga". Your mod only proceeds if this is true and follows a broken False path if it is not (which would be the case if a second Sim is the Target Sim).

Since we are not working with self-interactions, I will following the False Target of Echo's Node 4.

Node C: [prim 0x0002] Expression (Local 0x0000 (Local 0) := Stack Object ID 0x0000). Remember that logic puzzle about a man having to carry a cabbage, a goat, and a wolf across a river in a boat which can only hold him and one other at a time? The man can't leave the wolf alone with the goat and he can't leave the goat alone with the cabbage. If he does, either the goat or the cabbage will be eaten when he's not looking. Sometimes we must juggle values in a similar way to keep from losing a value. Here we are storing the Stack Object as Local 0 because the Stack Object is about to change and we will want to be able to recover the original Stack Object.

Node D: [prim 0x0002] Expression (Stack Object ID 0x0000 := Param 0x0000 (Target Sim)). Sets the Stack Object to the Target Sim.

Node E: [prim 0x0002] Expression (Local 0x0001 (Local 1) := Stack Object's person data 0x003A (Person Age)). Stores the age of the Target Sim (now the Stack Object) as Local 1.

Node F: [prim 0x0002] Expression (Stack Object ID 0x0000 := Local 0x0000 (Local 0)). Returns the Stack Object back to its original value.

Node 10: [prim 0x0002] Expression (Local 0x0001 (Local 1) > Const 0x0110:0x01 ("Child" Value: 0x0003)). This checks to see if the stored age of the Target Sim is above the childhood stage. You will likely want the False Target path to return False, but the True Target path to go to next node.

The rest of the BHAV mainly deals with the Magic skill. For example, if the Magic skill above level 9, then Temp 0 := Literal X and Add/Change the Action String. Else, check to see if it is above level 8 in which case Temp 0 := Literal X+1 and Add/Change the Action String. Else, check to see if it is above level 7, in which case Temp 0 := Literal X+2 and Add/Change the Action String....and so forth.


Which takes us to your "CT - Object Menu Command" BHAV....

Node 0: [prim 0x0002] Expression (Param 0x0001 == Literal 0x0000). Param 1 is whatever Temp 0 was before the "Add/Change the Action String" was called, so Param 1 should be Literal 1 according to your "CT - Object Menu" BHAV.
The way you have it is a little backwards since you know what the value is going to be.
You typically check against known, valid possibilities and leave the "if all else fails" paths to the unanticipated scenarios. (It would be better to say "Is the Param == Known Valid/Possible Value? If so, proceed; else, return false." Instead, you are saying "Param == Known Value to be False/Invalid/Unlikely?").
But technically speaking, this should still work in this particular instance.

Since Literal 1 does not equal Literal 0, the False Target path is taken, leading to a node which spawns a new instance of the social object. We do want the social object created, however this node's True Target does not lead anywhere (there is no node 0x000B) or return anything. Even if it simply returned True, it would create an instance of the social object but then say "okay, I'm done." It would not push any interactions.

You need to import the "Social - Launch Social" BHAV from Echo's social plugin.

After you spawn the social object, you can proceed to the "Social - Launch" BHAV, since you are only adding one interaction (and thus no real need to check the value of Param 1 in the event of additional interactions). The "Social - Launch" BHAV needs 3 values.

Unless, I'm mistaken: the first is Param 0x0000, the second will be the Literal number for the interaction for Sim A (from the Pie Menu functions of the social object), and the third will be the Literal value for Sim B (again from the Pie Menu functions of the social object) which should also happen to be the value of Param 1. Since you are only adding one interaction, there is no real need to check against the value of Param 1 and so you could probably just insert Param 1 directly into the "Social - Launch" BHAV as the third argument.


Whew! There may be mistakes that I didn't catch (in my post or in your packages) but hopefully not. Let's see where this takes us for now.


ok i tried my best to do what you described and i thought i had everything somewhat decent until the part with social launch interaction. i could not find the literal number for person A. that and i deleted everything you said unnecessary, so i probably deleted everything to do with echo. so i tried it out and you know what happened or i wouldnt be typing this so what do i do from here?
Attached files:
File Type: zip  deathdealers-vampire-interaction.zip (15.5 KB, 13 downloads) - View custom content
*shrugs*
retired moderator
#16 Old 6th Sep 2011 at 2:27 AM
In your "CT - Object Menu" BHAV, the False Target for node 1 is broken, as it leads to a nonexistent node. Do you see how the red False path line leads to a "?" ? It has that question mark because you have that node pointing to a nonexistent node 0x0009. The node 2 ("Add/Change Action String" BHAV) is orphaned since nothing leads to it. (Node 0 is an exception in that it does not necessarily need to have a node pointing to it since node 0 is automatically run, but if nothing points to a node is has that gray arrow pointing to the node indicating it is orphaned.) I think you may have deleted too much. You need a node which sets Temp 0 as a literal value. From Echo's "CT - Object Menu" BHAV, I would keep node 0 (0x0), 1 (0x1), 4 (0x4), 12 (0xC), 13 (0xD), 14 (0xE), 15 (0xF), and 16 (0x10) to keep the Age-related checks. You don't want the interaction showing up on Sims it shouldn't; the "CT - Object Menu" BHAV works as a Guardian BHAV. Then have the Temp 0 := Literal X and the "Add/Change Action String" node.


In your "CT - Object Menu Command" BHAV, you need the "Create New Object Instance" before the "Social - Launch Social" BHAV. The social object needs to exist before it can be have its interactions pushed onto a Sim. The "Interaction A" and "Interaction B" literals come from the Pie Menu Functions in your social object. "Feed on Sim" is your Interaction A and its literal will be 0x1 because it is 0x1 in the Pie Menu Functions. Likewise, "Be Fed Upon" is your interaction B and its literal value is 0x2 because it is 0x2 in the Pie Menu Functions.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Test Subject
Original Poster
#17 Old 6th Sep 2011 at 3:37 AM
Quote: Originally posted by maybesomethingdunno
In your "CT - Object Menu" BHAV, the False Target for node 1 is broken, as it leads to a nonexistent node. Do you see how the red False path line leads to a "?" ? It has that question mark because you have that node pointing to a nonexistent node 0x0009. The node 2 ("Add/Change Action String" BHAV) is orphaned since nothing leads to it. (Node 0 is an exception in that it does not necessarily need to have a node pointing to it since node 0 is automatically run, but if nothing points to a node is has that gray arrow pointing to the node indicating it is orphaned.) I think you may have deleted too much. You need a node which sets Temp 0 as a literal value. From Echo's "CT - Object Menu" BHAV, I would keep node 0 (0x0), 1 (0x1), 4 (0x4), 12 (0xC), 13 (0xD), 14 (0xE), 15 (0xF), and 16 (0x10) to keep the Age-related checks. You don't want the interaction showing up on Sims it shouldn't; the "CT - Object Menu" BHAV works as a Guardian BHAV. Then have the Temp 0 := Literal X and the "Add/Change Action String" node.


In your "CT - Object Menu Command" BHAV, you need the "Create New Object Instance" before the "Social - Launch Social" BHAV. The social object needs to exist before it can be have its interactions pushed onto a Sim. The "Interaction A" and "Interaction B" literals come from the Pie Menu Functions in your social object. "Feed on Sim" is your Interaction A and its literal will be 0x1 because it is 0x1 in the Pie Menu Functions. Likewise, "Be Fed Upon" is your interaction B and its literal value is 0x2 because it is 0x2 in the Pie Menu Functions.


did everything and i made sure none of the nodes in ANY BHAV had the "?" on it or the orphan thing. i put echo's object menu in there and saved nothing except the 0,1,4,12,13,14,15,16 nodes then added temp 0x0 := literal 0x0( or 0x1, forgot) and the action string. i put in the correct literals for the launch social and put it after create object instance in object menu command. i also changed the social launch social by making it the same thing as the one in ct command. i think thats all i did and still no working. if it helps it might be the ct object menu. but here they are. P.S. thanks for replying so quick. i posted, waited, and got my answer hahaha. but thanks.
Attached files:
File Type: zip  deathdealers-vampire-interaction.zip (15.6 KB, 11 downloads) - View custom content
*shrugs*
retired moderator
#18 Old 6th Sep 2011 at 5:19 AM
For what it is worth, I set Node 2 in your "CT - Object Menu" BHAV to have the True Target return False (so it shouldn't appear on the Active Sim as a self-interaction) and I let the False target proceed to the next node. Then I had Node 8 set Temp 0 := Literal 1 just in case.

In your "CT - Object Menu Command", I selected Node 0 and clicked on the "Insert via True" button. Then reselected Node 0 and changed it to be [prim 0x0002] Expression (Param 0x0001 == Literal 0x0001) with the True Target path proceeding to Node 1 and the False Target path returning False. Again, this was just a precaution.

In your OBJF, I removed the Action BHAVs for the Goal Check and Reaction Handler lines since I don't think those are necessary (I didn't see them in Echo's mod).

Then I noticed something major. Both of your packages have the same GUID in their OBJDs, meaning they conflict with each other. Rather than having to update the BHAV which spawns the social object, I merely changed the GUID in the OBJD for the social plugin. Then the interaction showed up for me in-game. The Sim routed, but I got "IK target animation cannot find bone on other object" error on the node which plays the Sim animation.

According to the Wiki, this means that the animation played by that node requires a specific cObjectGraphNode name to be defined in the CRES of the Stack Object, which in this case would be the social object. I don't know why it is giving this error since the operands on the node seem to be correct and I do not see a CRES in either the social object or the social plugin. Hopefully Echo will chime in and clear up any confusion.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Test Subject
Original Poster
#19 Old 8th Sep 2011 at 12:14 AM
Quote: Originally posted by maybesomethingdunno
For what it is worth, I set Node 2 in your "CT - Object Menu" BHAV to have the True Target return False (so it shouldn't appear on the Active Sim as a self-interaction) and I let the False target proceed to the next node. Then I had Node 8 set Temp 0 := Literal 1 just in case.

In your "CT - Object Menu Command", I selected Node 0 and clicked on the "Insert via True" button. Then reselected Node 0 and changed it to be [prim 0x0002] Expression (Param 0x0001 == Literal 0x0001) with the True Target path proceeding to Node 1 and the False Target path returning False. Again, this was just a precaution.

In your OBJF, I removed the Action BHAVs for the Goal Check and Reaction Handler lines since I don't think those are necessary (I didn't see them in Echo's mod).

Then I noticed something major. Both of your packages have the same GUID in their OBJDs, meaning they conflict with each other. Rather than having to update the BHAV which spawns the social object, I merely changed the GUID in the OBJD for the social plugin. Then the interaction showed up for me in-game. The Sim routed, but I got "IK target animation cannot find bone on other object" error on the node which plays the Sim animation.

According to the Wiki, this means that the animation played by that node requires a specific cObjectGraphNode name to be defined in the CRES of the Stack Object, which in this case would be the social object. I don't know why it is giving this error since the operands on the node seem to be correct and I do not see a CRES in either the social object or the social plugin. Hopefully Echo will chime in and clear up any confusion.


i tried it and i couldnt get it to show up in game so could you maybe post those files up for me please?
Test Subject
#20 Old 8th Sep 2011 at 1:31 AM Last edited by xSkyBirdx : 9th Sep 2011 at 2:48 AM.
EDIT:
MSD, you were right, there was no way I was going to be able to make this from scratch; turns out I was way off with my first attempt lol. So I started with Echo's mod like you suggested and it took me a while, but I finally the pie menu to show up. Thanks again MSD; theres no way I would have been able to do this without your help and I really appreciate your patience and detailed explanations! :DD And Death, thanks to you too because I had to use the package you uploaded to figure out what the CT- Object Menu Command was supposed to look like.

But now onto the next problem. I found the BHAVs for savage in the EA code and I imported them into mine. I fixed all the places where it said unknown BHAV by importing the missing ones from the EA code, but still no luck. The interactions show up but neither sim does anything. I haven't even editted the BHAVs yet, so I don't know why they don't work... Anyone have an idea of what I'm doing wrong?

By the way: Before I imported the savage BHAVs, I just had some interaction BHAVs left over from echo's mod. When I tested it with those BHAVs, one of the sims just stood there (I had deleted references to wand animations) and the other was killed by flies (ie, it worked). So, it seemed like the CT stuff was fine... just some info in case it could help you figure out the problem.

UPDATE: I did find and fix a mistake. It still doesn't work, but it probably would have caused problems (there was one unknown BHAV that I didn't fix yet). I uploaded the newer one so you can test with that instead.
Attached files:
File Type: rar  xSkyBirdxWerewolfAttack.rar (9.0 KB, 11 downloads) - View custom content
Description: (OLD FILES- DON'T DOWNLOAD THESE)
File Type: rar  xSkyBirdxWerewolfAttackUPDATED.rar (9.3 KB, 14 downloads) - View custom content
Description: (UPDATED FILES)
Test Subject
Original Poster
#21 Old 8th Sep 2011 at 10:52 PM
Quote: Originally posted by xSkyBirdx
EDIT:
MSD, you were right, there was no way I was going to be able to make this from scratch; turns out I was way off with my first attempt lol. So I started with Echo's mod like you suggested and it took me a while, but I finally the pie menu to show up. Thanks again MSD; theres no way I would have been able to do this without your help and I really appreciate your patience and detailed explanations! :DD And Death, thanks to you too because I had to use the package you uploaded to figure out what the CT- Object Menu Command was supposed to look like.

But now onto the next problem. I found the BHAVs for savage in the EA code and I imported them into mine. I fixed all the places where it said unknown BHAV by importing the missing ones from the EA code, but still no luck. The interactions show up but neither sim does anything. I haven't even editted the BHAVs yet, so I don't know why they don't work... Anyone have an idea of what I'm doing wrong?

By the way: Before I imported the savage BHAVs, I just had some interaction BHAVs left over from echo's mod. When I tested it with those BHAVs, one of the sims just stood there (I had deleted references to wand animations) and the other was killed by flies. So, it seemed like the CT stuff was working fine... just some info in case it could help you figure out the problem.


did you just use echo's spellset pkg and make it look similar to mine? because mine doesnt work, i extracted your social launch social bhav into mine because it was the same as echo's and it did nothing. so would you like to take a look at mine, because i can fix your interaction problem if you can fix my CT problem. it's a mmutual relationship deal
Test Subject
#22 Old 9th Sep 2011 at 12:19 AM Last edited by xSkyBirdx : 9th Sep 2011 at 3:00 AM.
Alright, I downloaded your file and I did all the things that MSD said to do and in my game it showed up in the pie menu, but then the same thing happened that MSD said. Here is the package after I edited it.

I only changed one of the GUIDs and I just made it one number higher, so your package might still end up conflicting with Echo's original mod or someone elses. To be sure, you should probably click the OBJD in each of the packages and go into plugin view and then click on "get GUID" and type your user, pw, and the name of the object and then do register. It will make sure that your GUIDs aren't the same as anyone else's so they don't conflict.

Also, if you want the interaction to only show up for plantsims, here is what you do. In your "CT- Object Menu," go to the node right before the last one (#8) and click insert via true. Make it into the BHAV that tests whether your sim is a plant sim. It's probably in globals somewhere; thats where the werewolf one was when I was making mine. I didn't do it for you because I didn't know if you saved that until last on purpose so it would be easier to test or something.

Hopefully that will be some help for you and sorry I have no idea how to make them animate right (obviously, since mine doesn't work either)

EDIT: Also, if you are trying to figure out what's wrong with mine, use the updated files I just uploaded (in my last post), because I fixed something else that was probably a piece of the problem.
Attached files:
File Type: rar  MTS_deathealer_1231147_deathdealers-vampire-interaction.rar (12.4 KB, 15 downloads) - View custom content
Test Subject
Original Poster
#23 Old 10th Sep 2011 at 9:26 PM Last edited by deathealer : 10th Sep 2011 at 11:14 PM.
Quote: Originally posted by xSkyBirdx
Alright, I downloaded your file and I did all the things that MSD said to do and in my game it showed up in the pie menu, but then the same thing happened that MSD said. Here is the package after I edited it.

I only changed one of the GUIDs and I just made it one number higher, so your package might still end up conflicting with Echo's original mod or someone elses. To be sure, you should probably click the OBJD in each of the packages and go into plugin view and then click on "get GUID" and type your user, pw, and the name of the object and then do register. It will make sure that your GUIDs aren't the same as anyone else's so they don't conflict.

Also, if you want the interaction to only show up for plantsims, here is what you do. In your "CT- Object Menu," go to the node right before the last one (#8) and click insert via true. Make it into the BHAV that tests whether your sim is a plant sim. It's probably in globals somewhere; thats where the werewolf one was when I was making mine. I didn't do it for you because I didn't know if you saved that until last on purpose so it would be easier to test or something.

Hopefully that will be some help for you and sorry I have no idea how to make them animate right (obviously, since mine doesn't work either)

EDIT: Also, if you are trying to figure out what's wrong with mine, use the updated files I just uploaded (in my last post), because I fixed something else that was probably a piece of the problem.


Skybird, i appreciate your help a TON i can't thank you enough. but if you don't mind me asking, what was i doing wrong on mine?(what did you change to fix it?) but anyway i'm trying my best to get the animations working on mine as we speak so when i geet mine working maybe i can make you a file that you can just change the animation on. b ut were you trying the "savage" anim? cuz i was trying the bite neck/kiss of the vampire anim and i thought this: in game, they can only bite with a high enough social right? so maybe i need to add something else to the interaction BHAVS. but i don't know on that part. but i'll let you know when i finish.(might try echo's with editing)

UPDATE:

SkyBird: i'm clueless mate, i looked over several files with both interactions person A + B and couldn't find anything. i tried extractiong and adding several as well and no help. i sent Echo, yeah that famous person, a PM for some help because i did everything i could do. sorry i let you down man i thought i had it covered...
Test Subject
Original Poster
#24 Old 10th Sep 2011 at 11:16 PM
here is my file if you wanna look at it and make some changes SkyBird (or Echo if you read my PM). Good luck mate.
Attached files:
File Type: zip  deathdealers-vampire-interaction.zip (7.9 KB, 13 downloads) - View custom content
Test Subject
#25 Old 10th Sep 2011 at 11:46 PM
Did you figure out how to get the anims to work right?
Page 1 of 3
Back to top