View Full Version : Sim friends on Dialog Boxes.
28th Aug 2011, 6:20 PM
I want to edit a hack that lets you visit other sims, and it uses a dialog box to choose the sim that you want to visit. Is there a way to put a restriction to this and force the dialog box to show only the actual friends (must be above 50 relationship score) of the sim? What i want is to make the sims build a relationship first before they can visit each others houses.
Any idea if this is possible?
29th Aug 2011, 4:32 AM
Without being able to look at the mod, I can't be very specific, but it should be possible.
I imagine that, at some point, there is a BHAV which enters a loop. While in the loop, it cycles through the Sims in the neighborhood, checks to see if the Sim is appropriate to interact with (e.g. not a special NPC or something), and adds their ID to an array (which is just a data structure for holding information). Once it has found everybody that meets the criteria, the loop ends and all the IDs are used to populate the dialog box. You would need to add the relationship check to this loop so that Sims are added if they meet that condition.
Again, without being able to look at the mod, I cannot tell you a specific BHAV to look at.
29th Aug 2011, 12:14 PM
I look into the file and i think the BHAV that fits your description is in the "Visit Sim - Get Address to visit" , i just dont know what to do because the BHAV itself got tons of commands and im completely new to this stuff. :help:
Here's the mod.
30th Aug 2011, 4:19 AM
I'm afraid I cannot be more helpful than this due to time. But I think the "Visit Sim - Load Sim Array" BHAV is where you would need to insert the code. There should be a BHAV in the Globals that can get and set the STR of the Sim into a Temp, which you can then use in a comparison like "Temp 0 >= Literal 50". Click the at little ">" button next to the Opcode box and select "Global" tab in the pop-up box. Find the BHAV and click the "Okay" button to change the currently selected node to that BHAV. The addition probably should be within the Set To Next loop.
30th Aug 2011, 9:12 AM
Alright, got the idea so i think that will be enough, Thanks for always answering my questions MSD, i really appreciate it!
*added to my favourite creators list*
31st Aug 2011, 2:08 PM
You might also want to take a look at this thread:
and the associated object
since Phae went through quite a lot of permutations for the sim dialog box in that project. :)
2nd Sep 2011, 6:52 PM
Luckily i've already solve the problem, thanks for trying to help though, that link would still really be useful for me. :)
vBulletin v3.0.14, Copyright ©2000-2013, Jelsoft Enterprises Ltd.