View Full Version : [SOLVED] Routing Slots & Bookcase.
3rd Apr 2017, 1:13 AM
Attempting to allow Sims to retrieve books from either side of a new bookcase. I cloned it, I believe, from the Bibliophile, which had only one routing slot and no container slots. Added another routing slot with inverted y-value and 180° rotation. Added into existing SLOT file, added reference in text file, and added it in CRES under same parent joint with previously mentioned transformations.
What happens is: the new slot works as intended if I delete or disable the original. Added line in text file that included both routing file names (I read to do that somewhere-can't recall where). This gets the same result. The light comes on in my head: "This must involve functions/BHAVs" [which basically is admitting I'm LOST. :blink: ]
So my questions are:
Do I need to make or add a new function to allow both routing options to work? Have I skipped a crucial linking step somewhere? Both?!
3rd Apr 2017, 12:53 PM
What happens if you put an obstacle in the original slot - would sims try to use the new one?
4th Apr 2017, 11:24 PM
They just stomp and whine. There's no container slot at all, just the routing slot. To test this I had to make a big square of bookshelves with only the backsides showing (the side I'm trying to get them to access). I'm guessing I need something like a Set to next command in the BHAV that is linked?
5th Apr 2017, 7:52 PM
If slots have numbers, you could write, say, "go to first slot, if fail then go to second". But I have a better idea. Think of another object that has two or more routing slots and look how it's done there. It'll save you some trial and error. Some kind of table maybe?
9th Jun 2017, 8:32 PM
I've been looking at how other things are made , chiefly beds and tables. Beds are kinda over my head and the routing for table slots are not giving me the results I hope for. I think I may have had a breakthrough yesterday: In the functions for the Better Barre, I found an instruction called "Sub - route to open slot". Clicked on action BHAV button in SimPE, and found TWO "go to routing slot"'s inside. Now if I can only figure out how to put it into my bookcase....
Reading theguide by AdidasSG2 (http://modthesims.info/t/111469) currently to learn about BHAVS. If there are any other sources for learning this material, I would really appreciate a nudge in the right direction.
11th Jun 2017, 7:29 PM
I'd recommend tutorials by Echo. Google for sims 2 bhav echo.
You'll probably need to change all relevant bhavs that deal with slots. Look through all action bhavs of interactions and take note of those that mention using slots. Because they're semi-global (used by all bookcases in game), you'll need to import them and make them private, so they do not override original bhavs. There's a handy button "Import as Private" for this.
I took a look at one of the bhavs - "Interaction - Read Book". And here's what logic I'd suggest.
(red - false target; green - true target)
At the point where sims fail to go to slot #0, make them go to slot #1 (assuming slot #1 is your new routing slot). Down the line, local variable 1 is assigned to slot #, so it has to be the right number, thus - branching. Both branches converge again after differences are over.
As for Better Barre, it uses attributes to let sims know that a slot is in use, but in case of bookcases they might be excessive and not very helpful. Sims occupy bookcase's slot for a very short time to get or put a book, so by the time they walk to bookcase the slot's occupancy may change a dozen times. No need to know if the slot is empty before they start walking. At least that's what I presume, but that's for you to test. :)
12th Jun 2017, 9:12 PM
You can route to slot by number :)
It is a primitive bhav 0x002D
Go to Routing Slot
You can select which slot there you want them to go to.
Some good tutorials to use are: http://modthesims.info/t/146440
20th Jun 2017, 12:00 AM
Thanks guys. That's plenty to chew on. I'll keep plugging away at it - trial and error if I must. This BHAV stuff makes perfect sense when I'm reading it, but then I open my object, and *poof!* - lost again.
EDIT: OK, I figured it out - and it's very embarrassing. :sheep: I looked at lots of objects, and could see nothing they did BHAV-wise that made them accessible from multiple sides. While researching what sofa to clone for another project, I was reading this post (http://www.modthesims.info/showthread.php?t=173017) from IgnorantBliss, which convinced me to read the entire CEP (http://modthesims.info/d/92541) documentation. Both these sources indicated that the bookcase I cloned didn't work well unless cloned as standalone. So I thought maybe recloning and starting over might be what I needed.
Then, as I was noting what things to change in the new clone, I found my mistakes in just a minute. Two very obvious, bush-league goofs: First, the names for my new route in the CRES and text file didn't match - I had typed an extra underscore in the text file. Second, I evidently didn't hit commit after adding the new route as a child to the practical joint, because it wasn't showing in the CRES hierarchy at all. I fixed these two problems and the bookcase works perfectly from both sides, with no BHAV editing at all.
Thank you guys for the help. and I apologize if I wasted your time with this.
On a lighter note: For posterity's sake, my first post provides a nearly complete step by step guide for making bookcases usable from multiple angles. Just add in a little diligence in checking for typos, remembering to click commit buttons, and always recheck any edited text files after a Fix Integrity.
vBulletin v3.0.14, Copyright ©2000-2019, Jelsoft Enterprises Ltd.