Hey guys. I got a request on MTS that is turning out to be a little bit more complicated than I anticipated. I think it's something a lot of people would appreciate having, so I do want to get through it, but I'm having trouble understanding the guardian BHAV I need to edit, and if I don't understand it I can't tell what needs to stay and what needs to go, and where to add my code.
The request is to modify autonomy for sleeping in beds, making it possible only at low levels of energy. I decided to build upon that and add time parameters, so that it requires different amounts of energy at different times of the night. That way Sims don't end up staying up all night waiting to hit very low energy. I know how to code it, I don't need any help with that, but I need to understand where the original energy check is kept so that I can remove it, and I need to figure out if anything else has to go.
The BHAV I'm modifying is called Interaction - Sleep - Autonomous - TEST. It is group 0x7F4437F2.
1. The BHAV starts with some kind of GUID check. If true, it goes to 1B, which then goes to 1 regardless if true or false. I looked up the GUID of line 0x0 and it comes up as Controller - Temperature Receptivity, which makes no sense to me. I don't understand what 0x0 or 0x1B is doing, and since that's the very beginning of the BHAV I really ought to be sure what it does.
2. What does this mean? I don't know what sleep state refers to, and so I can't really tell what it's doing. It's returning false if false, so it's something to do with hiding this menu option if sleep state isn't zero.
[prim 0x0002] Expression (My motive 0x000B (Sleep state) == Literal 0x0000)
3. Am I correct in understanding it as though adjust ads-lines only affect the autonomy advertising, nothing else?
[semi 0x201B] Bed Rel. - Adjust Ads - Sleep (no args)
4. I think line 0x7 is the one that's deciding if the Sim is tired enough, but it's not in a format I'm used to seeing for that. It's the only line that mentions energy though, so I feel like this has to be the one.
[prim 0x0002] Expression (Check tree advert: Range 0x0005 (Energy) /= Literal 0x0003)
What's check tree advert: Range?
The rest I think I understand. Thanks in advance to anyone who has the energy/time to answer my questions this time <3