Replies: 161 (Who?), Viewed: 97466 times.
Page 2 of 7
Lab Assistant
#26 Old 10th Oct 2005 at 9:17 PM Last edited by Targa : 10th Oct 2005 at 9:38 PM.
What are the values for making an object placable on walls and ceilings? I don't see those two locations mentioned.

Edit: Never mind, I figured it out. It's sort of a reverse-logic from the way I was reading your post. For anyone else who doesn't understand right away:

Edit your objects pivot and rotation so it will be the correct height and alignment for where you want it (wall or ceiling), then add to the Init "My 0x000D Clear Flag Literal Value 0x00XX" (where XX is the function number) to clear the "requires" section. So for example, if you wanted to make a wall object placeable on the ceiling, you'd add "clear flag literal value 0x0003" (needs wall on its back).

Also worth mentioning for beginners that to make these settings you need to click the little arrow icon next to where it says"operands".
Lab Assistant
#27 Old 25th Nov 2005 at 7:50 AM
well Im trying to make a mini tv (kinda) that can be placed on counters, tables etc but at this stage am having no luck with the placement (defaults to floor). I realise this has been done by others but am using it to help teach myself 'how' its done.

Ive read through the tutorial and all the posts in this thread and so far it is still not working.

In the tutorial (obviously using an older SimPE) it says the BHAV's are like ..
My 0x0004 set flag literal value 0x00?? (?? being the flags I want) but in SimPE 0.50a the closest I can find is weird .. eg.

My 0x0004 set flag flag# literal 0x00?? *shrug*

Then later people are refering to things like

My 0x0004 assign literal value 0x00?? (but the closest to this I can find is 'assign 32bit value literal'

If someone could clarify these, their differences and which one is actually being refered to when modifying object placement please as this is driving me a little nuts

--
Calidan
The ModFather
retired moderator
Original Poster
#28 Old 25th Nov 2005 at 10:04 AM Last edited by Numenor : 25th Nov 2005 at 10:20 AM.
In the BHAVs, you can assign a value to a variable (like "Local 0x0000", Temp 0x0001, "My 0x0015"...): e.g. "My 0x0015 assign to Literal Value 0x0001", which means "Assign to the parameter My 0x0015 (= 'My Repair level') the value of 1.

But some specific parameters, like the My 0x0004 (= 'My Allowed height flags') are flags, i.e. a binary number made by a list of "0" and "1", where each "0" and "1" is a switch yes/no.
For example, the My 0x0004 is a binary number composed by 11 digits: b00000000000 (the leading "b" stands for "Binary"). You can set each one of these zeros to 1, independently, and each one has a special meaning. The rightmost digit is the Flag#1 and means "Placeable on ground": if the Flag#1 is 0, the object is *not* placeable on ground; if it's 1, the object is placeable on ground.
Now, how can you "switch" only the last digit of this binary number? By using the "Set Flag" operand (that sets the digit to 1) and the "Clear flag" operand (that sets the digit to 0). You need to tell the game exactly the position of the flag you want to switch: in this case it's position 1 = the rightmost digit = "Flag #1".

Therefore, the instruction you need to use, in order for an object *not* to be placeable on the ground is:
My 0x0004 Clear Flag Literal Value 0x0001, which means "My Allowed height flag - Set to 0 the flag in position 1 (= allowed on ground)".

Note 1: "Literal value" (that has recently become simply "Literal") just means a plain number with a fixed value, not a variable; and the leading 0x means that the following number is hexadecimal; therefore, "Flag Literal Value 0x0001" just means Flag 1.

Note 2: The latest versions of SimPE incorporates the extremely useful BHAV editor by PLJones and Inge Jones; as pointed out in the main post, this editor has a "Wizard" that helps a lot when editing these types of values: look picture. The BHAV editor is continously modified and improved, and more and more values are "translated" in understandable language.

Note 3: When you add the "My 0x0004 Clear Flag Literal 0x0001", be sure to add it at the end of the Init BHAV, so that the "Clear Flag" operation will override any previous value.
Screenshots

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
#29 Old 25th Nov 2005 at 10:25 AM Last edited by Calidan : 25th Nov 2005 at 1:11 PM. Reason: Trim + Extra
Quote:
Originally Posted by Numenor
In the BHAVs, you can assign a value to a variable (like "Local 0x0000", Temp 0x0001, "My 0x0015"...): e.g. "My 0x0015 assign to Literal Value 0x0001", which means "Assign to the parameter My 0x0015 (= 'My Repair level') the value of 1.

(TRIMMED)

Note 3: When you add the "My 0x0004 Clear Flag Literal 0x0001", be sure to add it at the end of the Init BHAV, so that the "Clear Flag" operation will override any previous value.



Thanks - this I all basically knew from coding days, was just wondering about the 'wording' used in SimPE to be sure I had it right.

As to the problem I'm having at the moment - I have set My 0x0004 (placement) to 2, 3, 4, 8 and B (ie all the 'surfaces' as mentioned in the tutorial) and set the 'tv' object weight to 0 as also suggested, but I can still not get it to lock onto any surface - it will only place on the ground. Could this have something to do with it using the TelevisionGlobals (thought it best to leave that as it IS a tv afterall)? or am I missing something else.

EDIT: Your last suggestion worked a treat (clearing the 'on ground') however now it wont lock onto anything to place. Added a screenshot of my BHAV list - added at the end of the 'default' init BHAV's - and since 0x0001 cleared it must be setting them, it just doesnt want to work for me it seems

EDIT2: Please ignore the above finally figured it out *hops around excitedly*

--
Calidan
Lab Assistant
#30 Old 7th Dec 2005 at 11:19 PM
By chance do you know the Op-code for "Assign"? I have SimPE 0.50 and "Assign" isn't in my list. The closest thing I have is "Assign 32 bit value" and that doesn't seem to work. I'm trying to set its weight to zero, which I assume is the reason why I can only place the object (a BBQ grill; working on making it not set fires also) on counters (I am using the counter surface flag) when I use moveobjects on.

I had a similar problem with the UI when it came to the "My" operand. When I selected My from the list, it gave me a drop down box to choose from; it wouldn't let me enter my own value. Luckily in one of your screenshots you show the op codes, so I was able to just copy it down.
Instructor
#31 Old 8th Dec 2005 at 12:07 AM
assign is :=

Eclectic Sims The place for your younger sims and unique animated items!
Charmed Sims Archives Gorgeous Clothing, Furnishings and more.
Two great sites ALL FREE NOW!!!
One horse disagreer of the Apocalypse
#32 Old 8th Dec 2005 at 8:36 AM
I find it easier not to use the opcode wizard, just type numbers into the operands till it says what you want underneath

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
The ModFather
retired moderator
Original Poster
#33 Old 8th Dec 2005 at 9:39 AM
Quote:
Originally Posted by todd
By chance do you know the Op-code for "Assign"? I have SimPE 0.50 and "Assign" isn't in my list. The closest thing I have is "Assign 32 bit value" and that doesn't seem to work. I'm trying to set its weight to zero, which I assume is the reason why I can only place the object (a BBQ grill; working on making it not set fires also) on counters (I am using the counter surface flag) when I use moveobjects on.

I had a similar problem with the UI when it came to the "My" operand. When I selected My from the list, it gave me a drop down box to choose from; it wouldn't let me enter my own value. Luckily in one of your screenshots you show the op codes, so I was able to just copy it down.


You need to set the height flags as explained in the first post, and then set the weight to zero.

If you use the wizard, you should set the various values in the given order, because the drop-down lists change dynamically.

Start by choosing "My" from the first list, then "Weight" from the second, then "Assign to" (or ":=" in some older versions) from the third, then "Literal" from the fourth and lastly write 0x0000 in the last field; the translation will be "My Weight Assign to Literal 0x0000".

As for the placement flags, the procedure is the same.

HINT: if you are looking for a certain value (e.g. "Weight") from a long drop-down list, you can hit "W" on the keyboard multiple times, until the "Weight" entry is selected.

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.
Inventor
#34 Old 17th Dec 2005 at 8:01 PM
This is really useful in general - however, is there a flag to allow one object to intersect other objects? I want to have custom book/knicknack combinations and unless I use moveobject it won't let me put them in the same area.

Reyn Silversong-Sim Architect

Terms of Use-All of my stuff is available for use anywhere that is free. All I ask is credit and a link back to the objects in question, or the house they are featured with. DO NOT POST ON THE EXCHANGE!
Retired Duck
retired moderator
#35 Old 18th Dec 2005 at 5:31 AM
Reyn -
Allow object intersection:
My 0x0008 Set Flag Literal Value 0x0002
Allow person intersection:
My 0x0008 Set Flag Literal Value 0x0005
Allow object and person intersection:
My 0x0008 Set Flag Literal Value 0x0003

Forum Resident
#36 Old 18th Dec 2005 at 5:28 PM
is there a code to make an object not require, but allow floor beneath?
Inventor
#37 Old 18th Dec 2005 at 5:33 PM
Okay, thanks!
And that number looks formiliar, so I'm just dense, aren't I?

Reyn Silversong-Sim Architect

Terms of Use-All of my stuff is available for use anywhere that is free. All I ask is credit and a link back to the objects in question, or the house they are featured with. DO NOT POST ON THE EXCHANGE!
Inventor
#38 Old 18th Dec 2005 at 5:53 PM
I've another question - sorry, this still looks like gibberish to me - is there a way to have something remain at a fixed height, intersect an object, yet require an object to be there? I don't want my books and such floating in space, I want them to require a bookshelf.

Reyn Silversong-Sim Architect

Terms of Use-All of my stuff is available for use anywhere that is free. All I ask is credit and a link back to the objects in question, or the house they are featured with. DO NOT POST ON THE EXCHANGE!
Forum Resident
#39 Old 18th Dec 2005 at 6:06 PM
you will need slots, but this requires heavy coding as it needs own routes and the animations will have to be reassigned for that slot.
Consciously Undead
retired moderator
#40 Old 5th Feb 2006 at 10:13 PM
A question that I can't see an answer to in the original thread- what do you have to do to allow an object to be placed on the ceiling? (Like a TV that hangs from above)

If you're not part of the solution, you're part of the precipitate
The ModFather
retired moderator
Original Poster
#41 Old 6th Feb 2006 at 12:51 PM
Attach an object to the ceiling involves very different placement flags, than the ones described in this thread; all the above information apply to objects placed on ground or surfaces.
In this moment I can't check and tell you exactly the changes to the Init BHAV needed to make an object hang from the ceiling, but you can clone any ceiling-mounted object and examine its Init BHAV (following also the links to the semiglobal Init bhavs).

Mind that in the game the ceiling-mounted objects disappear when you zoom in; therefore, this setting might be not suitable for a TV. You could just create a TV that is placed onto the ground, but with a mesh that *simulates* it being attached to the ceiling...

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.
One horse disagreer of the Apocalypse
#42 Old 6th Feb 2006 at 2:39 PM Last edited by Inge Jones : 6th Feb 2006 at 2:44 PM.
Ah found it - on my ceiling light hider which also does other hanging objects. This is the line that decides if it is a ceiling hanging object:

0002 : 2A000D0000080400000000000000 : 00

[prim 0x0002] Expression (Stack Object's 0x002A (placement flags) Flag Set? flag# Literal 0x000D (attached to ceiling))


And here is the bit that deals with fading out when you get close, if you set the flag that it obstructs view, it will fade, and vice versa:

0002 : 28000400000A0400000000000000 : 00

[prim 0x0002] Expression (Stack Object's 0x0028 (flag field 2) Clear Flag flag# Literal 0x0004 (Obstructs View))

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Consciously Undead
retired moderator
#43 Old 6th Feb 2006 at 3:53 PM
Oh, thanks guys Much appreciated

If you're not part of the solution, you're part of the precipitate
The ModFather
retired moderator
Original Poster
#44 Old 7th Feb 2006 at 8:41 AM
Thanks Inge!

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
#45 Old 27th Feb 2006 at 3:10 AM
maybe I'm missing it... you start out:

Quote:
If you can't find an Init BHAV in the package, or there are multiple ones, you can know for sure which one is the right BHAV to edit by opening the Object Functions file: in the first line, you'll find the name of the "real" Init BHAV. (If there are multiple Object Functions files, look into the one with the lowest Instance number).


but you never say what to do if there isn't a BHAV in the package? I'm cloned curtain to make a bed canopy and the problem is that it requires a wall to be placed, but I'm sure not everyone places their beds against walls, so I was looking for way to stop that requirement. This seems to be the solution? But there is no BHAV in my package and I'm quite unsure as to how to proceed. Thanks!

~k
One horse disagreer of the Apocalypse
#46 Old 27th Feb 2006 at 7:39 AM
If there isn't a BHAV in the package, it means the object is sharing BHAVs with all other objects like it, and the Init BHAV can be found in the semiglobals file group.

Your package will have a filetype called GLOB for short. Open the file in there (while you have it loaded in SimPe) and it will tell you the correct semiglobals group that your object belongs to.

Then look at the Object Functions (OBJf) file to see what number BHAV is used for the Init(ialisation) BHAV. If you have more than one OBJf let me know and I can offer more specific help.

Then still in SimPe, use the top menu Tools|Object Tools|Import SemiGlobals, navigate to the correct semiglobal group and Scan. Untick them all, and just tick the BHAV or BHAVs that related to Initialisation. Import it or them. You'll get various options relating to renumbering and so on - accept everything.

Go into the OBJf (each of them if more than one) and make sure the number against the Init entry in them agrees with the number the Init BHAVs now have.

From this point on, those inits will belong to your object only, and you can edit them and your new object will use your new code.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Lab Assistant
#47 Old 28th Feb 2006 at 6:30 AM
This looks like the logical place to ask this - has anyone defined what is required to change an object from indoors to outdoors?

I live vicariously through my Sims. This is a sad reflection on my life and theirs.
The ModFather
retired moderator
Original Poster
#48 Old 28th Feb 2006 at 8:19 AM
Exactly, what you mean with "indoor" and "outdoor" objects? That can be placed only on floor tiles or - on the contrary - can be placed only on free ground?

You have to set (or clear) some specific "Placement Flags" (*after* you have enabled the placement on ground as explained above!):

OpCode: 0x0002 (Expression)
Operands: 2A000100FF0903070000000000000000
(My Placement Flags Set Flag Literal "Allow on floor")

and

OpCode: 0x0002 (Expression)
Operands: 2A000200FF0903070000000000000000
(My Placement Flags Set Flag Literal "Allow on terrain")


Obviously, if you want an object to be placed on floor but not on terrain you need to add two lines to the Init BHAV: the first with the "Set Flag" to allow placement on floor, the second with "Clear Flag" to prevent placement on terrain.

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
#49 Old 28th Feb 2006 at 9:36 AM
That's what I was after..thank you. I have an obsession with using the model plane for outdoor objects (because it doesn't interfere with placing other objects under or near it) and would rather not have to have people use 'moveobjects on' to place my things.

I live vicariously through my Sims. This is a sad reflection on my life and theirs.
Lab Assistant
#50 Old 28th Feb 2006 at 1:26 PM
Thanks Inge for your great clarification. I've run into another problem however... When I open GLOB it says I'm using "urtainGlobals". I went to OBJF like you said, and then opened up the Import Globals, I scrolled down to "urtainGlobals" and then hit scan and "nothing" happens. Nothing is listed in the box. I went up one and clicked scan and the box flooded with data, then tried "urtainGlobals" again and nothing happened again. Any ideas??

~k

urtainGlobal is a typo I think (on their part) as it should say "curtainGlobal".
Page 2 of 7
Back to top