PDA

View Full Version : Deleting Objects using TelevisionGlobals


Calidan
3rd Dec 2005, 11:13 AM
Prompted by my recent inventigations into a problem concerning the inability to delete a Television (or any object using TelevisionGlobals) while they were placed on any surface other than the ground, and the discussion in this Object Creation Workshop and Repair Center thread (http://upload.modthesims2.com/showthread.php?p=877162#post877162) I was wondering if anyone out there with way more experience than I am in BHAVs may have some ideas.

Problem is - I have cloned several televisions and added BHAVs to allow them to 'place' on tables, end tables, benches etc. So far it seems that while the television is sitting on another object the game will not allow it's sale. You have to place the tv on the ground, then reselect before the game will sell it.

Now I am still very inexperienced in BHAVs but from my reading and investigations it appears to me that there are global and primative BHAVs in Objects.package that allow for removing objects from the game. Can/Do I have to use these BHAV functions to correct this 'unsalable' problem or have I overlooked some other method that will fix this issue.

Any ideas or suggestions welcome

--
Calidan

chrisnjosh
3rd Dec 2005, 08:59 PM
I think its extremely odd taht because of a BHAV change, which supposedly has no money-linked BHAV's, would change the sellability. All I can think of is if you are using bhavs obtained from other objects to allow them to be placed elsewhere, is that it inherited the sellability, like if you used some bhav's from a newspaper, perhaps. But I never saw a bhav that changed sellability of an object.

Calidan
4th Dec 2005, 02:02 AM
I think its extremely odd taht because of a BHAV change, which supposedly has no money-linked BHAV's, would change the sellability. All I can think of is if you are using bhavs obtained from other objects to allow them to be placed elsewhere, is that it inherited the sellability, like if you used some bhav's from a newspaper, perhaps. But I never saw a bhav that changed sellability of an object.

I don't think it is the BHAV's that are stopping sellability, as the ones used only effected placement.

04 00 83 40 00 09 03 1A
Expression (My 0x0004 (allowed height flags) Set Flag flag# Const 0x0101:0x03 G - Standard Heights: 0x0004

(Example 'translation' from SimPE 0.50b)
As well as similar for other placement locations (tables/benches etc)

Initially I wished my object to only be placed on these surfaces and not on the ground, so had 'reset' the placement flag to literal 0x0000 (0 all bits).

These were hand added BHAVs into the Function - Init, linked into the bottom of the pre-existing Init BHAVs - so nothing was changed from Television defaults and no BHAVs were 'imported' from another type of item.

Anyway I hope that give some more clarification to the setup I have atm. It was just seeing references to 'Delete', 'User Delete' in the OBJF's and noticing there were 'Remove Object' BHAV primatives and some CT Functions in Objects.package that started me thinking it may be possible to use BHAVs. *shrug*

I guess being rather new to modding still has me thinking down the wrong path.

Steps used to create item.

Clone using SimPE into a stand alone object package (moderateTV - the 1 tile cheap TV).
Assign new unique GUID and update all.
Remodel object mesh(initially using old clone object group names).
Update textures (again using existing clone object TXTR names).
Write in new BHAVs to allow table placement.
Test in game - no sell from table top, must first place to floor then sell


Almost forgot - I also added 2 other BHAVs but have seen these same BHAVs on sellable objects so didn't think of them. These were placed before the placement flags above.
2A 00 01 00 00 09 03 07
Expression (My 0x002A (placement flags) Set Flag flag# 0x0001 (allow on terrain))
----------------------------
2A 00 02 00 00 09 03 07
Expression (My 0x002A (placement flags) Set Flag flag# Literal 0x0002 (allow under water))

If someone could explain the full 'purpose' of this type of placement. I understand what it's doing, just not why this placement 'setup' is required. Anyway, like I said I have seen this same setup on saleable objects.

# Am I on the wrong track regarding this unsellable problem and BHAVs - Perhaps its just something I am not doing right when cloning the object.......

Thanks for any interest, suggestions or ideas

--
Calidan

ebruere
4th Dec 2005, 08:16 PM
Did you enable the testing cheats to see if there is an error message when you get the TV from a table ?

Calidan
5th Dec 2005, 03:53 AM
Did you enable the testing cheats to see if there is an error message when you get the TV from a table ?

There is no errors issued at all, and there is no problem getting the tv, placing etc - it simply will not delete/sell if you try straight from picking it up from the table top .. placing onto the ground then picking it back up again and it will then sell properly.

(and yes I use the testingcheats (http://www.modthesims2.com/showthread.php?t=103926) regularly for that purpose (and others))

--
Calidan

orson
8th Dec 2005, 04:20 PM
I was able to sell the stand-alone TV while it was still on its table (I didn't have to move it to the floor) only after I sold the Maxis TV that was also on the Lot.

This was in the La Fiesta Tech University neighborhood. The standard TV was on the lot before I added one of Numenor's.

--
Orson