Mod The Sims

Mod The Sims (http://www.modthesims.info/index.php)
-   Global Mods (http://www.modthesims.info/forumdisplay.php?f=142)
-   -   "Banned Food" Fix for Food Judging Tables (http://www.modthesims.info/showthread.php?t=412183)

fway 17th Jul 2010 03:18 AM

"Banned Food" Fix for Food Judging Tables
 
4 Attachment(s)

This mod modifies the "Sub - Banned Foods" BHAV from the Food Judging table. Basically, EAxis made a giant oversight when it came to custom drinks. The only GUID the BHAV "banned" was the fruit juice drink, which doesn't even have a group meal. I found out that EAxis had made a mistake when it came to the "original" GUID. Before this fix was made custom drinks were showing up in the "Make Food For Contest" menu under "*Menu - Food - Insert Name Here", it wasn't a giant problem before users realized that once a Playable or NPC placed a custom drink onto a food judging table, jump bugs (or errors for those of us who play in debug mode) would occur and wouldn't stop. The only solution at the time was to take out the custom drinks and play without them, or not enter contests at all.

This fix takes all of those problems away by adding the correct GUID to the "Banned Foods" sub. From my testing it appears that no sim has entered a custom drink into a contest. While playing an AnyGameStarter version with FanseeLamb's non-default drinks installed along with my mod, sims with no cooking skills whatsoever entered either gelatin or sandwiches. Which is safe to say that the mod is working correctly because they probably would have entered one of fansee's custom drinks and cause BFBVFS (well not really). This mod is essential if you want to download custom drinks like the following:

12 Non-Default Simlish Drinks by Joninmobile.
Tasty Tins o' Beverage I by Fanseelamb.
Tasty Tins o' Beverage II by Fanseelamb.
Tru Blood by Fanseelamb.

Additional Credits:
Numenor for the AnyGameStarter.

fanseelamb 17th Jul 2010 05:12 AM

Whoo! Oh this is awesome! Thank you so much, fway. I shall link to it in my drink posts straight away.

ETA: Just one question. Do the "instant meal" or default-replacements of the "instant meal" also need this fix? Or do they work okay without it?

CatOfEvilGenius 17th Jul 2010 05:31 AM

* grabs fix, then enjoys custom drinks *

fway 17th Jul 2010 06:11 AM

Quote:
Originally Posted by fanseelamb
ETA: Just one question. Do the "instant meal" or default-replacements of the "instant meal" also need this fix? Or do they work okay without it?


Since the instant meal is part of the GUID that was originally banned, they will more than likely will not need this fix. When I did not have custom drinks and entered contests I didn't notice any Sims enter instant meals into contests or notice the menu option for entering a platter of instant meals into the contest. Otherwise someone would have caught this and EAxis would have needed to patch it. It "bans" any foods with the original or fallback GUID of 0xAFD872A2 which are the instant meals and 0x8C046AD4 which is the juice or single instant meal.

Sparklycookie 17th Jul 2010 09:14 AM

Been looking forward to this ever since I saw on on #create! Awesome!

joninmobile 17th Jul 2010 05:13 PM

Wonderful! Oooh goodie Fway! Now my drinks will work. Thank you bunches!

fanseelamb 17th Jul 2010 08:01 PM

Quote:
Originally Posted by fway
Since the instant meal is part of the GUID that was originally banned, they will more than likely will not need this fix.....


Okay, that's good to know. Thanks for the info! And thanks again for the fix.

leesester 18th Jul 2010 01:37 PM

Great fix Fway! Thank you.

Gwenke33 22nd Jul 2010 01:12 PM

Thank you or this fix. I haven't come across this bug yet, but now I won't ever have to wonder what's up.

chsf 3rd Aug 2010 05:36 AM

Thank you ever so much!

Sophie-David 11th Aug 2010 06:25 PM

Thank you for this fix and all the research behind it!

Quote:
Originally Posted by fway
Since the instant meal is part of the GUID that was originally banned, they will more than likely will not need this fix. When I did not have custom drinks and entered contests I didn't notice any Sims enter instant meals into contests or notice the menu option for entering a platter of instant meals into the contest. Otherwise someone would have caught this and EAxis would have needed to patch it. It "bans" any foods with the original or fallback GUID of 0xAFD872A2 which are the instant meals and 0x8C046AD4 which is the juice or single instant meal.
So if I code my custom drinks with a fallback GUID of either 0xAFD872A2 or 0x8C046AD4 would I need this fix? How does your fix work - do I need to use a specific fallback GUID?

fway 12th Aug 2010 06:35 AM

Quote:
Originally Posted by Sophie-David
Thank you for this fix and all the research behind it!

So if I code my custom drinks with a fallback GUID of either 0xAFD872A2 or 0x8C046AD4 would I need this fix? How does your fix work - do I need to use a specific fallback GUID?


No, you would just change the OBJD as you would if you were creating a custom object. You do not change the fallback GUID. Otherwise your drink would be overriding the original one.

Sophie-David 12th Aug 2010 07:40 PM

Quote:
Originally Posted by fway
No, you would just change the OBJD as you would if you were creating a custom object. You do not change the fallback GUID. Otherwise your drink would be overriding the original one.
In my experience the fallback GUID will not override the original object, but if you remove the custom object (which has its own GUID) then the object referenced by the fallback will appear instead (this happens most often if you disable custom content before entering a lot). I don't understand how your patch can ban the GUID of a new custom object if all the GUID data it has are essentially random. But I will look at the code later and figure it out.

fway 13th Aug 2010 05:51 AM

Quote:
Originally Posted by Sophie-David
In my experience the fallback GUID will not override the original object, but if you remove the custom object (which has its own GUID) then the object referenced by the fallback will appear instead (this happens most often if you disable custom content before entering a lot). I don't understand how your patch can ban the GUID of a new custom object if all the GUID data it has are essentially random. But I will look at the code later and figure it out.


I don't have SimPE installed on this computer, however I do remember checking something off when fiddling with the "Banned foods" sub. It had to do with the fall back or original, I think I had two lines of code (the original BHAV has one line) one of them returning false, and the other either returning true or false. Otherwise, it was set to "0xAFD872A2" which was the fallback of the drinks IIRC. The one starting with the 8 I believe is the juice snack.

unleased40 19th Aug 2010 02:00 AM

Thanks a bunch man, this really helped me =)

Sophie-David 5th Sep 2010 12:21 AM

Quote:
Originally Posted by fway
I don't have SimPE installed on this computer, however I do remember checking something off when fiddling with the "Banned foods" sub. It had to do with the fall back or original, I think I had two lines of code (the original BHAV has one line) one of them returning false, and the other either returning true or false. Otherwise, it was set to "0xAFD872A2" which was the fallback of the drinks IIRC. The one starting with the 8 I believe is the juice snack.
I see now that the original Sub - Banned Foods blocked only the Instant Meal - Menu object by checking for its Active GUID of 0x8C046D4. Instead, your patch bans the Instant Meal - Menu object based on its Original GUID of 0xAF0872A2. It also bans the Fruit Juice - Menu and Protein Shake - Menu objects based on their Original GUIDs of 0x8C046D4.

The bottom line is that a custom drink menu object has to use an original GUID of either 0xAFD872A2 or 0x8C046D4 for it to be banned.

fway 5th Sep 2010 10:18 AM

Quote:
Originally Posted by Sophie-David
I see now that the original Sub - Banned Foods blocked only the Instant Meal - Menu object by checking for its Active GUID of 0x8C046D4. Instead, your patch bans the Instant Meal - Menu object based on its Original GUID of 0xAF0872A2. It also bans the Fruit Juice - Menu and Protein Shake - Menu objects based on their Original GUIDs of 0x8C046D4.

The bottom line is that a custom drink menu object has to use an original GUID of either 0xAFD872A2 or 0x8C046D4 for it to be banned.


Mhmm. That's strange, because when I had it on my computer it was working correctly. I haven't had any reports about the contest table not working. The fruit juice and protein shake does not have a group meal (at least to my knowledge on the protein shake), what happens when the fitness sim unlocks the protein shake?

Sophie-David 5th Sep 2010 03:03 PM

Quote:
Originally Posted by fway
Mhmm. That's strange, because when I had it on my computer it was working correctly. I haven't had any reports about the contest table not working. The fruit juice and protein shake does not have a group meal (at least to my knowledge on the protein shake), what happens when the fitness sim unlocks the protein shake?
I believe that your patch works correctly just as it is. I don't think you would want the fruit juice or protein shake to part of the food judging at all. And if creators made group drinks coded with either of these two GUIDs as original then their drinks would be banned also, which is desirable.


All times are GMT +1. The time now is 08:14 PM.

Powered by: vBulletin Version 3.0.14
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.