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
Field Researcher
Original Poster
#1 Old 18th Jun 2005 at 7:22 PM
Default decorative object on the fence, how?
I need to place some decorative objects on a fence that are not lights. The way I managed it so far is by cloning a lantern and deleting "CT - Light - ON", "CT - Light - OFF" behav functions and LGHT file. The object now doesn't light up but it still has lamp pie menu. Is there a way to remove that menu? (there is no Pie menu file in the package).

OR, is there a way to take any decorative object other than lights and change it so it can be placed on the fence? Thanks!
Advertisement
Retired Duck
retired moderator
#2 Old 19th Jun 2005 at 7:37 AM
If it doesn't have the pie menu, then it's accessing its pie menu from a semi-global library. You should just be able to import any pie menu data in from another object and use that, so long as you remember to change their groups to 0xFFFFFFFF.
One horse disagreer of the Apocalypse
#3 Old 19th Jun 2005 at 10:01 AM
There's a flag for "allow on fence" that you can find in Objd - Default placement I think it is. If you stick "E" in there I think that's the one. It's under "Allowed height flags" in the behaviour globals as that was a typo. In fact the height flags are something different which never got included but are used. I have the table for heights typed out if anyone wants it.

If you want to see behaviour globals you need to go back to the package in the original Sims 2 as they didn't include it with Uni
Field Researcher
Original Poster
#4 Old 19th Jun 2005 at 8:17 PM
Thanks! I tried both methods but had no luck so far. Added a pie menu from a decor object to my modified lantern, the group was already set to 0xFFFFFFFF. In the game it still shows the original lights menu.

Then I took a bonsai tree for test, set "Default Placement" to 0xE, then set "Use Default Placement Flags" to 0x1. Removed My 0x0004 record from Init function - still not able to place it on the fence.
One horse disagreer of the Apocalypse
#5 Old 19th Jun 2005 at 9:28 PM
My 0004 is height, for the purposes of an init, you want 002A for placement.

For the menu, ensure the correct TTAB number is showing in OBJD.
Instructor
#6 Old 19th Jun 2005 at 10:11 PM
I'd love a copy of that heights table.
Field Researcher
Original Poster
#7 Old 20th Jun 2005 at 12:11 AM
I figured out how to change/remove the pie menu: by setting "Interaction Table ID" in OBJD to my newly added TTAB instance #! Just like Inge said :D.

I would still very much like to figure out the second method as well - placing decorative object on a fence. It would be really great to have an object that can be placed on any surface, including the fence! I've attached a bonsai tree clone with new GUID, no further changes were made to the file. Inge, or anyone else, I would appreciate if you could try to modify it.
Attached files:
File Type: zip  wind_testobject.zip (39.3 KB, 10 downloads) - View custom content
One horse disagreer of the Apocalypse
#8 Old 20th Jun 2005 at 12:16 AM
I'll download the file and see if I can get it on a fence.

Here is the heights table:

0 = undefined
1 = ground
2 = low table
3 = table
4 = on counter
5 = non-standard
6 = hand
7 = sitting
8 = end table
9 = in counter
10 = under counter
11 = decorative

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
One horse disagreer of the Apocalypse
#9 Old 20th Jun 2005 at 1:12 AM
Well here is the bonsai back again, and this time it seems to be able to go anywhere except the floor. It goes on fences and all heights of tables. But not the ground or the floor.... Hmm

Well I turned all the flags on in two new init sub-functions, maybe some of them want turning off. Anyway it goes on the fence now I can try again in the morning, but it's getting a bit late here now and I need to go to bed

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Field Researcher
Original Poster
#10 Old 20th Jun 2005 at 2:29 AM
Thanks a lot! Greatly appreciate it! Even if I can't place it on a floor, its already a progress that I don't need to use a lamp for fence decor.
Field Researcher
Original Poster
#11 Old 20th Jun 2005 at 3:18 AM
I have something interesting to report back . The modified file, thought its bhav looked like xmas tree with all the flags on lol, did not work on all the type of fence (pic 1). It refused to be installed on a low fence and only went just a bit above the ground on higher fence. So I decided to remove most of the flags guessing that bonsai tree would probably have most of them by default. I left just one record (0xE) in bhav Init placement, and even removed Init heights. Was surprised that it actually worked! (pic 2). Bhav section looks like this - pic 3. Oh, and it still cannot be placed on the ground, but I'm having too much fun to care at the moment, lol!
Screenshots
Attached files:
File Type: zip  wind_testobject.zip (39.1 KB, 13 downloads) - View custom content
Retired Duck
retired moderator
#12 Old 20th Jun 2005 at 4:12 AM
Very interesting!

You're right, the bonsai is calling a semi-global function called "Init Table", which is itself setting and clearing several allowed height values.

This could be quite useful actually...
One horse disagreer of the Apocalypse
#13 Old 20th Jun 2005 at 8:29 AM
Well, of course if you clone what you want, but use "init fence" (if there is one by that name) from the lamp semi globals - you'd have to import the BHAV - then that could do it too.

But as I called my new init subs after init table ran, I would have expected any flag in those two particular ranges to be set to my values, overruling whatever Init Table had to say about it.

Oh I just remembered, you better check that Load doesn't run some sort of initialisation.
Retired Duck
retired moderator
#14 Old 20th Jun 2005 at 12:19 PM
Inge - Absolutely. I was just trying to figure out why windkeeper was able to unset so many flags and still have the object sit on so many levels. Didn't mean it as any sort of criticism.
Field Researcher
Original Poster
#15 Old 21st Jun 2005 at 12:29 AM
I hope I didn't upset you, Inge, by removing all those flags! Your file is like a template to me now. For bonsai tree I only needed one flag, for another object I will need more. So I will reuse the functions you created. But I would've never been able to create functions on my own! Thanks again! :D
One horse disagreer of the Apocalypse
#16 Old 21st Jun 2005 at 12:32 AM
No I'm not upset! But I'd like you to tell me when you find out exactly what stopped the wretched thing being placed om the floor. Was it one of those two sets of flags I made the sub inits out of, or was it something else?
Field Researcher
Original Poster
#17 Old 21st Jun 2005 at 2:08 AM
I ran a few tests with the object. The moment I changed 0xE to 0x1, and then to 0x2, I was able to place the object on the ground but not on the fence. So it's that flag from Init Placements
One horse disagreer of the Apocalypse
#18 Old 21st Jun 2005 at 9:47 AM
There must be some way of allowing both tho. You're referring to 0xE from OBJD aren't you?
Field Researcher
Original Poster
#19 Old 21st Jun 2005 at 7:33 PM
To the one from behav function (pic 3), "My 0x002A Set Flag Literal Value 0x000E". The flag in OBJD is not set.
One horse disagreer of the Apocalypse
#20 Old 21st Jun 2005 at 10:14 PM
Ok I am a bit confused - how did you set a flag to value 2?
Field Researcher
Original Poster
#21 Old 21st Jun 2005 at 10:59 PM
By changing the third operand (see the pic). Mind you, I have no idea what setting that flag to 1 or 2 does, I was just testing to see what happens when the flag is NOT set to "E". The file I attached above is exactly the file I'm playing with.

I sure wish you could find the way to have both the ground and the fence placement! It would add so many possiblilities :D
Screenshots
One horse disagreer of the Apocalypse
#22 Old 21st Jun 2005 at 11:10 PM
That's not really how flags work. They're single bits, which are either set (1) or cleared/unset (0). On the other hand I think you can set "My 16" all in one go, if you add the flags up to give a two byte value.
Field Researcher
Original Poster
#23 Old 22nd Jun 2005 at 4:26 AM
But this is where it was set to "0E" initially. And this is how I usually change the flags. For example, if I were to use the heights table you provided, I would add "My 0x0004" record and set it to 09 (8+1) to place the object on the end table. Or I would add "My 0x0008" record and set it to "03" to allow object and person intersection. Perhaps I was doing it wrong?
One horse disagreer of the Apocalypse
#24 Old 22nd Jun 2005 at 8:40 AM
That's the other way of looking at it, yes. I was just confused by how you said it. Now I know what you meant.
Back to top