Replies: 161 (Who?), Viewed: 101133 times.
Page 4 of 7
The ModFather
retired moderator
Original Poster
#76 Old 20th Apr 2006 at 9:51 AM
I don't know... BTW, there is another problem, in addition to the underground placement: the hot tub actually cuts a hole in the ground; and this doesn't happen by chance, I'm sure: the hot tub must contain something that does that.

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Field Researcher
#77 Old 20th Apr 2006 at 2:02 PM
Yeah, i guess it would be more complicated then I was thinking. If you look at the bhavs there is a whole, I don;t know what you would call it, section?, for placement. And ofcourse I don't know what any of those lines mean in there either. Maybe I should just test them out each on a simple object, see what happens, what does what? Oh, and thanks for answering tho, Numenor, appreciate it!
Instructor
#78 Old 20th Apr 2006 at 2:12 PM
[prim 0x0002] Expression (My 0x0008 (flags) Set Flag flag# Literal 0x000F (Hide Floor))

I think this is all I had to add to the init bhav for my sunken tub to work.
Field Researcher
#79 Old 21st Apr 2006 at 12:42 AM
really? that would be great, I'll try it!
Lab Assistant
#80 Old 22nd Apr 2006 at 3:14 AM
I've cloned a two-tile sculpture to create a large hanging potrack, and I'd like to allow object and person intersection so that I can place it above counters and such. I am absolutely brand new to "modding", but this is all I want to do. Can anyone help me out?
Field Researcher
#81 Old 22nd Apr 2006 at 3:31 AM
I think i can help with this one, please correct me Numenor if i am wrong!

First, read the beginning posts so you know how to set a new BHAV, then add this:

My - flags - (0x0008) set flag - literal - allow object and person intersection (0x0003)

and also i am not sure but I think you need this one?:

My - flags - (0x0008) set flag - literal - allow object intersection (0x0002)

I think this would work. Hope it helps!
The ModFather
retired moderator
Original Poster
#82 Old 22nd Apr 2006 at 9:11 PM
The "Allow object (and person) intersection is used when the object i placed on the floor; but in this case, the object is attached to the ceiling.

Therefore, my suggestion is to add the following line:

My - Placement Flags - Set Flag - Literal - Attached to Ceiling
(OpCode 0x0002 - operands 2A000D00000903070000000000000000)

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Field Researcher
#83 Old 23rd Apr 2006 at 9:58 PM
How do i get it so that the object will only be placeable outdoors? Thanks
Scholar
#84 Old 23rd Apr 2006 at 10:08 PM
I'm a beginner at BHAV editing and I am completly lost. Right now I'm trying to get my object placeable on a dining table.
This is what I see when I open up the Init BHAV. None of mine looks really like the pictures you gave. Would I click the little "Add" button to put in another one? I don't know. I'm completly lost. Is there an easier thread to start with?
Part-time Hermit
#85 Old 23rd Apr 2006 at 10:11 PM
zookini, try checking the "special buttons" box and then click on Add Via True (or something similar that appears after you check the box) to add the new line.
Space Pony
#86 Old 24th May 2006 at 1:11 AM
Aloha,

I've been doing a bit of work on the foods & I just wanted some clarification on allowed height flags.

All of the allowed height flags are set out in Food Global & I'm assuming they are inheritable by the different foods because most foods do not have an "allowed height flag" statement. But.... Some of them do.

So, I was wondering why some do & some don't. If they don't they seem to just use the ones from Food Global, but if they do does it meant they only use the ones stated locally or is this just duplicating what's in the global?

For example, lets say that the toaster pastry file have defined height flags of 03 & 06. Does this mean it can't use 04? The global file has 03, 04, 06 & others.

I guess what I'm wondering is are the local statements limiting or are they redundant?

Morague
The ModFather
retired moderator
Original Poster
#87 Old 24th May 2006 at 10:27 AM
Usually, the local init, in the first line, calls the semiglobal init. In this case, all the placement flags defined in the semiglobal are applied to the object, and then the local settings are applied.

In some cases, as you have correctly noticed, the additional settings are the same as the semiglobal ones; and they are just redundant.
In some other cases, the flags in the local statements are cleared, in order to prevent a placement that is usually allowed. In this case, the last instruction executed has the priority: if the semiglobal allows placement on the tables and the following private instruction prevents it, the object is NOT placeable on the tables.

If the semiglobal sets the flags 03 & 06, and the local sets again the same, plus the 04, all the three heights are allowed (local statements are partly redundant); but be sure to check if - by chance - the local statements clear a flag previously set by the semiglobal.

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Space Pony
#88 Old 24th May 2006 at 10:10 PM
Thank you, Numenor.

I thought that would be the case - otherwise it just doesn't make any sense.

It's good to know about clearing the flag in the local Init. Thanks!

Morague
Instructor
#89 Old 22nd Jun 2006 at 9:02 PM Last edited by morten8035 : 22nd Jun 2006 at 9:23 PM.
Numenor?
Can you update the pictures for the lates version of SimPE?
I think it's harder do find what i locking for if the picrue is oldder than the newest version.
But it is a step by step tutorial a place?

Here is there I came to. And that at the picture is sonething other.

Screenshots

Unauthorized incoming post!
The ModFather
retired moderator
Original Poster
#90 Old 22nd Jun 2006 at 11:43 PM
Basically, there are no differences... The only difference is the icon for the Instruction Wizard: instead of an arrow, now it's a "hammer & wrench" icon (in your screenshot, it's grayed out because it is active only if tou select a line containing an "Expression" function).

The Modding InfoCenter articles are not step-by-step tutorial; but anyway, here are some additional instructions:

1) First thing to do, when editing a BHAV (*especially* the Init BHAVs) is to click the Sort button. This will give you a more understandable layout of the BHAV.
2) Then, check the option "Special Buttons" (near the Add/Delete buttons): this will bring out some more useful command buttons.
3) Select the last line in the BHAV and click "Insert via true": this will add a new line (identical to the last one) properly linked to the previous.
4) Select the new line and change - if needed - the OpCode to 0x0002.
5) Click on the "Hammer&Wrench" button to access the Instruction wizard.
6) Edit the values in the wizard, according to what explained in the article.

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Instructor
#91 Old 23rd Jun 2006 at 12:30 PM
It don't work
I tryed to do so the smal fridge can be placed at counters, but it don't work

Unauthorized incoming post!
The ModFather
retired moderator
Original Poster
#92 Old 23rd Jun 2006 at 5:08 PM
The small fridge? Probaby (I said probably) it's a problem of weight.
In order to prevent "impossible" placements (for instance, a huge statue on an end table), Maxis usually uses the weight.
Try setting a very low weight for the fridge appending to the Init BHAV a line like this:

OpCode 0x0002 (Expression)
Operands: 1B000100000503070000000000000000
Translation: My Weight Set to Literal 0x0001

This solution might not work, though, because some "surface" objects (especially counters) check also the "category" of the object to be placed on them ("category" means, for instance: fridges, sinks, decorative, etc...).

One last note: placing a mini-fridge on a counter might prevent sims for using it, or the animations might look very odd; this is because the animations of the sims are tailored on the original height of the mini-fridge. But it worths a try, anyway...

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Instructor
#93 Old 23rd Jun 2006 at 5:12 PM
Ok
But can you make a step by step tutorial?
I think it's better to understand what I must do

Unauthorized incoming post!
Lab Assistant
#94 Old 27th Jun 2006 at 10:27 PM
o_0 Random thought (on the mini-fridge thing)

Would it be possible use the animation for a full-sized fridge if the mini was on a counter? I'm not by any means expert at BHAVs, but there should be a way for the bhavs to determine whether or not it's on a counter, and use the corresponding Animate Sim.

T'would seem to me that the full-sized animation would look almost right. Or at least better.

The above post should be ingested with 1/4 Tbsp salt. In the event of an allergic reaction, panic and wait for the reaction to pass.
The ModFather
retired moderator
Original Poster
#95 Old 27th Jun 2006 at 11:47 PM
The problem are not the BHAv, but the animations themselves. When the sim opens the mini-fridge, he performs a complex animation: bends toward the fridge, reach the handle with the hand, opens the door, takes something inside and closes the door.
Some of these animations are (as I call them) "stand-alone", i.e. the animation doesn't take care of the actual position of the object. The bending is a stand-alone animation, so that the sim will bend even if the fridge is on a counter.
On the contrary, when the sim grabs the door, it's an IK animation (Inverse Kinematic): the hand of the sim always reaches the handle, in its actual position: therefore, the sim will bend, and then his hand (in an unnatural position) will reach the handle in its upper position.
I haven't personally tested, but I'm quite sure the animation would happen as described, if the fridge is moved on a counter.

My suggestion is to clone a full-height fridge and "cut" the lower part of the mesh (while keeping the exact position of the handle); and then make this pridge placeable on the counter. This way, the final position of the handle will be the same as a normal full-height fridge, and therefore the normal fridge animations can be used without any problem.

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Lab Assistant
#96 Old 30th Jun 2006 at 5:10 PM
Ah, but then what happens when the fridge is placed on the ground, eh? Then your animations will look all funky again.


I was asking if there was a flag or something in the BHAVs that would distinguish between the fridge being on the ground or on a counter. If so, you could set up your animate BHAV to use the regular mini-fridge animation if it was ont he floor, and the regular fridge animation if it was on a counter.

The only advantage to "cutting" the bottom off a full fridge would be to use the same animation, which isn't really a factor.

The above post should be ingested with 1/4 Tbsp salt. In the event of an allergic reaction, panic and wait for the reaction to pass.
The ModFather
retired moderator
Original Poster
#97 Old 30th Jun 2006 at 10:05 PM
No, there isn't such a flag, unfortunately. Animations are carefully tailored on specific dimension and position of the object.

If you notice, all the objects in the game that can be placed at different heights do not have any "direct" animation, i.e. the sim never touches the object (at most, he can remote-control it, like the radio).

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Lab Assistant
#98 Old 3rd Jul 2006 at 5:50 AM
Dang.

What about newspapers? They can be placed on both the ground and tables, and sims have no problems with them.....

How does the BHAV distinguish between ground and table there?

The above post should be ingested with 1/4 Tbsp salt. In the event of an allergic reaction, panic and wait for the reaction to pass.
The ModFather
retired moderator
Original Poster
#99 Old 3rd Jul 2006 at 1:36 PM
There are generic routines in the game to allow sims to pick various objects from the ground or from a table.
Yours is a good question, though: how the sim can understand where is placed the newspaper? I will investigate it. But the main point is that, once the initial position of the object has been correctly determined, a specific animation is played (Pick up from ground / Pick up from table). And fridges have only one type of animation...

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Retired Duck
retired moderator
#100 Old 4th Jul 2006 at 1:34 PM
Picking stuff up is generally done using the Reach/Grab primitive. They can use generic reach/grab animations, or choose them specifically using CT functions.

That said, if you want to be able to check in code whether something is on the ground or on top of something, you could try something like:
Verify - Object ID (Object ID=Stack Object's 0x0002 (container id))

If it returns false then it's on the ground (or out of world, but I presume that's not going to happen in an interaction!), and if it returns true then it's contained within another object. If you need to check for particular types of surfaces it can be placed on, you can just check the container id's category.

Once you know where the object is, you can pick an animation that works for that height.
Page 4 of 7
Back to top