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
Lab Assistant
Original Poster
#1 Old 20th Mar 2024 at 12:41 AM

This user has the following games installed:

Sims 2, University, Nightlife, Open for Business, Pets, Seasons, Bon Voyage, Free Time, Apartment Life
Default Help Hiding a Custom Food
Hello! I'm currently following this tutorial to try and disable this food from appearing in the fridge menu, but after changing the BHAV's on Menu Time Availability to "0" as the tutorial says, it's still showing up in my game's Lunch and Dinner menus. I find this strange because initially there was only one mealtime listed in the BHAV's, Dinner, and prior to editing the BHAV's it still showed up in both the Lunch and Dinner menus.

I'm also a bit confused because the line below it reads all 0's, and in my experience usually when that happens a food won't show up for any additional mealtimes besides the one BHAV that specifies a mealtime (i.e. if there's a BHAV to say it will show up for breakfast, and nothing else, it can also show up for lunch and dinner without needing a separate line of code (I've edited fireflies' Flapjacks the same way: changed that BHAV from FFFF to 0000 and it would only appear for breakfast and not lunch and dinner, like it did initially). This is all based on my very limited understanding of coding food in SimPE, so please correct me if I'm way off base here...

I'm not quite sure what is going on, but regardless I'd still like to hide this food. If anyone can help me understand what's going on here, I'd be grateful. Inserted below is a screenshot of my last edit of the food in SimPE, including setting the Menu Time Availability to "0."
Screenshots
Advertisement
Inventor
#2 Old 20th Mar 2024 at 3:46 AM
Set Flag 0 is not valid. Flags are numbered 1 through 16. That line is redundant if you set my semi attribute 7 to 0 on the next line. You have to check all later lines that may change the value of your variable.
Mad Poster
#3 Old 20th Mar 2024 at 6:16 AM
I mean, I think set flag 0 should just be a no-op if the game doesn't throw an error for it. It looks like this particular food is actually setting the flag at a different part of the function that isn't being displayed in that screenshot, so you have to find where the flag is being set and remove it.

I have no idea what you're trying to say in your main post, though, or what you're using "BHAV" to mean there.

Edit: Looked at the food, and yes, the last two lines of the function make it available for lunch and dinner. Just delete those two lines and return true at line 8.
Lab Assistant
Original Poster
#4 Old 20th Mar 2024 at 10:41 PM
Quote: Originally posted by kestrellyn
I mean, I think set flag 0 should just be a no-op if the game doesn't throw an error for it. It looks like this particular food is actually setting the flag at a different part of the function that isn't being displayed in that screenshot, so you have to find where the flag is being set and remove it.

I have no idea what you're trying to say in your main post, though, or what you're using "BHAV" to mean there.

Edit: Looked at the food, and yes, the last two lines of the function make it available for lunch and dinner. Just delete those two lines and return true at line 8.


Okay, this is embarassing, somehow I missed those last two lines of code? Thank you, that did the trick! My problem is solved.
Back to top