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!
Site Helper
Original Poster
#1 Old 12th Dec 2012 at 5:14 PM Last edited by Mootilda : 12th Dec 2012 at 8:23 PM.
Default Fixing the Stay-Things Shrub
I just wanted to start a thread to talk about fixing the main problem with the Stay-Things Shrub from SimLogical. Here's the problem:

The Stay-Things Shrub works by setting or clearing the "moveable" flag for each object of interest on the lot. As soon as an object is changed from moveable to stayable by clearing the flag, its value is lost in the lot value calculation.

The lot value consists of four different stored values:
- the cost of the empty lot,
- the value of all moveable objects,
- the value of all stayable objects,
- the value of all architectural components.

Obviously, the two fields that we're concerned with are the moveable and stayable object values. Setting or clearing the moveable flag should subtract the value from one of those fields and add the value to the other. Unfortunately, it doesn't. Setting an object to moveable adds the object value to the total value of all moveable objects, and clearing the moveable flag subtracts the object value from the total value of all moveable objects, but the value of the stayable objects remains the same.

This means that the family has now lost the value of all of the objects on their lot. If you set objects to stayable using the Stay-Things Shrub, you'll notice that your family's net worth has dropped significantly, even while they are still on the lot. When they sell their house, they receive the reduced value of the lot, giving them a reduced net worth. This means that they will no longer have enough money to move into a house which is comparable to their existing house. If you use my StayThingsShrub Fixer, the family won't even be able to afford to move back into their old furnished house.

Ideally, we would find a way to add (or subtract) the object value to the stayable objects lot value field, or even to restore the correct object value in the moveable objects lot value field. If we can find a way to do this, then my Fixer becomes obsolete.

However, if that isn't possible, then the next best thing would be to reimburse the family for the value of all objects made stayable and charge them for the value of all objects made moveable. That way, their net worth will remain constant. Then, when they move out, they will have the correct amount of money and my Fixer will ensure that the lot value is also correct.
Advertisement
Site Helper
Original Poster
#2 Old 14th Dec 2012 at 5:02 PM Last edited by Mootilda : 14th Dec 2012 at 5:15 PM.
I hope that it's OK to double post in a thread like this.

I'm making progress on this. I still haven't been able to find any way to add and subtract the value of the object from the total lot objects value field, but I did find a way to add the object value to the family's cash using the AlterBudget primitive. I thought about using the UpdatePersonalWealth BHAV, but I don't believe that this mod should be mucking around with people's memories of total wealth. My expectation is that the increased wealth is a temporary measure, just until the family sells their lot.

I need to verify that a local can only store a signed value up to 0xFFFF. This implies that I need to keep two locals, since furnishings can easily cost more than $32,767. Because the Budget (family cash value) is stored as Div 10000 and Mod 10000, I chose to keep the value of objects in the same way. When subtracting from the family's total cash (changing objects from stayable to moveable), I can then easily check whether they can afford the object or not. If not, the remaining objects will not be changed from stayable to moveable and the user will be notified of the problem.

I'm stumped on an issue that I'm seeing. For some families on some lots, when setting the objects to stayable, the final cash + lot value is not equal to the initial cash + lot value. It's not usually off by much, perhaps $250 or so, but I don't understand why there's any difference at all. When the objects are made moveable again, the correct value is restored. If anyone has any idea on how to narrow this down, I would appreciate the help.

My current theory is this. The total objects value is never recalculated (thus the need for the StayThingsShrub Fixer). Instead, the game keeps a running total of the value of all objects on the lot. I wonder whether it's possible that the running total is incorrect on some lots... that is, that the total of the current value of all objects does not equal the running total? If so, setting the object value to zero in the running total and then adding the current value of the object to the family's cash could result in the difference in value. I suppose that I could test this by calculating the total current value of objects and comparing it against the stored total object value field.

Finally, am I missing something obvious... Is there any way to get a text listing of a BHAV? I'd love to share what I've got to date, but can't think of any way other than to type it in by hand.
Site Helper
Original Poster
#3 Old 18th Dec 2012 at 12:20 AM Last edited by Mootilda : 18th Dec 2012 at 5:59 AM.
I made a very interesting discovery today. If you move your family out without the Stay-Things Shrub and then subtract 8 from the U0 field in the Lot Description, the lot will retain its furnishings. This is the same field that has the hidden flag (0x10).

So, my next question is: is there any way to gain access to this flag via BHAV?

A related thread:
http://www.modthesims.info/showthread.php?t=483634
Me? Sarcastic? Never.
staff: administrator
#4 Old 23rd Dec 2012 at 2:24 PM
I've come across another mod that allows furniture to stay when moving out. Maybe the code is slightly different than the stay things shrub? It's achieved via the newspaper and move out interaction.

http://www.insimenator.org/showthread.php?t=48193
Site Helper
Original Poster
#5 Old 23rd Dec 2012 at 5:14 PM Last edited by Mootilda : 24th Dec 2012 at 11:44 PM.
Interesting find. I'll take a look at it.

[Update:]

Different take on the same idea. This is a global mod (which I like), rather than an object mod. The mod hooks into the move out code and allows all sims to move out of the house while playing the house. Usually, the game insists that you use the neighborhood tool when you are moving an entire family.

So, although this is a global mod, it gives you the ability to decide whether you want to keep the furnishings or not. If you do, then have the entire family move out using the newspaper or computer. If you want the house cleared of furniture, move out the family in the neighborhood view.

Unfortunately, after moving out, the family has the standard $20,000, regardless of the price of the house that they sold, or the amount of money that they had before moving out.

Another thing that I don't like is that the Family ID and possibly the family Name are changed by the mod. That's because a brand new family is created and the original family becomes empty.
Back to top