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
Field Researcher
Original Poster
#26 Old 5th Dec 2005 at 4:19 AM
Hi again,

Ok, so I tried some of your suggestions, and I'm still having problems. Something is sneaking by somehow, and dormies are still managing to do their homework. It half works in that, when I throw a party, the options to "Do Homework" or "Do $Person's Homework" do not show up in the Pie Menu when clicking on any homework.

It also appears that visitors are not doing their homework any longer. But again, so far, that could just be mere coincidence (this requires more testing).

The part that is still failing are that dormies are still doing homework when a Party is going. I want this interaction to be disabled/unavailable when there is a Party.

I forced an error to take a look at a log again and I found this:

Quote: Originally posted by Error Log
Frame 4:
Stack Object id: 363
Stack Object name: University - Homework
Node: 10
Tree: id 4106 name 'Interaction - Do Homework' version -32702
from HomeworkUni
Prim state: 0
Params: Locals: 363 0 363
Frame 3:
Stack Object id: 363
Stack Object name: University - Homework
Node: 21
Tree: id 8233 name 'Function - Main - Process Autonomy' version 54
from PersonGlobals
Prim state: 0
Params: Locals: 363 0


It seems that the Process Autonomy is calling the Homework interaction? Is this how these sims are managing to slip by and evade the "TEST" conditions?

Could someone possibly clarify for me how "finding the best interaction" works? Does processing autonomy call TEST type BHAVs first (and is this done invisibly somehow?), to see if they should be done?

If so... then something really strange is happening, and I possibly have a bug in my code or possibly garbage values running amuck.

If NOT, then that means that processing autonomy can directly push "Interactions" onto a sim's queue without "testing" them first? If this is the case, then I have to modify the interactions themselves, as well.

I checked the dorm controller BHAVs, and it does not look like there is anything that controls whether doing homework gets pushed onto queues directly. I did find anothere TEST bhav in the PersonGlobals. And it is also in the PersonGlobals that I traced the "Process Autonomy" bhav to from looking at the Log I posted above.

I suppose that is what I will try next. Hopefully, modifying the direct Interaction itself will solve my problems, but I was also hoping that it wouldn't be necessary. I was eventually going to try and mod those bhavs as well, with the intent to make it so that sims will try to finish existing homeworks first, before creating new ones. But I wanted to try and work on that after I got the more elementary change working first. Unfortunately, I'm hitting a few stumbling blocks. :P

please? :puppy:

Ste
Advertisement
One horse disagreer of the Apocalypse
#27 Old 5th Dec 2005 at 7:33 AM
Could you upload your test BHAV listing again, so we can take a look at how it is now you altered it? Maybe something else crept in. Even a pushed interaction should run the test.

Have you checked that there are no other menu options that do the same thing? For example, the "do coursework" option when you click on the sim may be stored and tested somewhere other than the one you get when you click the book.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Field Researcher
Original Poster
#28 Old 5th Dec 2005 at 10:42 AM
Okay, actually I think I found my mistake. I might test it a few bits more and then maybe I'll officially make it available for "Testers Wanted" status.

The problem I had is that I reversed the true and false values after the User directed check (the line that ebruere had pointed out previously). Instead of user-directed being allowed and non-user directed (which presumably means "autonomous") being disabled, I had it backasswards. So... actually, I intended the option to be availabe for the user (that way, the user can decide whether or not they want to do homework, regardless of a party). However, if there is a Party going on, then sims should not autonomously decide to Do Homework. The exception to this is if any sim is Influenced to do homework.

In addition, if there isn't a party, then all the other checks should ensure that only YA, dormie residents on the current dorm lot can choose to do homework. All other types of visitors shouldn't do homework; that way, you don't get crap homeworks of friends from other dorms, or NPC YAs like the mascots or cheerleaders, who may never show up for a long time to come finish their homework, thus leaving their trash around, cluttering up your dorm. I mean, it's bad enough that your own dormmates will leave their homeworks out, scattered all over the dining hall tables, hallway, bathroom and rooftop floors.

I'll test this a bit more, and if it looks ok, then I'll release it. So far, it seems to work. The thing is, it won't stop sims from doing homework if they've already started. And... I'm not exactly sure when the Party Controller gets instantiated. If it is right after the phone call? Or only when the dialog box for the scoring actually appears. I can't quite be sure about it yet... but it seems that there may be a slight delay after the phone call and before the instantiation occurs. So... if any dormie sims manage to slip in past that short window of opportunity, they won't get stopped. I've tried 3 parties in a row, and it looks like no one did homework during that time. I did have one case where the sim was doing homework, but I think they had started during that slim window. Because I am not sure if this window exists (and that the Controller actually gets instantly created right after the phone call), I need to test more.

During the interim between parties, dormies started to do homework again. So, it still allows dormies to do it autonomously. Additionally, I had several visitors over, that I had either greeted as walkbys, or invited over via the phone, before I started the parties, and they did not do homeworks, which is as expected.

Anyways, thanks again all, and thanks Inge for volunteering to test. But now that I'm sure I fixed my mistake, once I've tested a bit more, I'll just release it, probably soon. :D

Ste
Field Researcher
Original Poster
#29 Old 16th Dec 2005 at 6:16 AM
I just wanted to thank all of you for being so helpful in answering my questions. I think I finally got my mod working the way I wanted it to.

Incidentally, I noticed something very odd in my testing, which was part of the reason why it was so difficult for me to figure out whether or not something was actually wrong with the mod itself.

While I was testing, I found that the mod definately worked on this single lot. I had cloned my neighborhood from my restarted Legacy game to use on my Hack Testing account. It worked fine on that lot, and everything happened the way I expected it to i.e. sims that I wanted to allow autonmous assignments were doing them, and sims that I wanted to prevent autonomous assignments were not.

However, I found that, whenever I tested in a completely new/fresh lot, where I only just moved a sim into the Dorm, NONE of the sims were doing any assignments!!! This was driving me crazy, the hair-tearing out of my skull kinda crazy! Because I couldn't see why doing assignments should be COMPLETELY disabled!!!

It turned out that there's some lines in the code for the BHAV TEST in personglobals that I didn't pay attention to. This particular TEST, I am fairly sure, is responsible for sims initiating an assignment to begin with. The other TEST is part of the HomeworkUni globals, and is for when you interact With an already existing Uni homework assignment. Anyways, what happened is that there are lines in the personglobals TEST which check if the Major GUID 1 and 2 are defined. If not, then sims won't even start to do assignments.

Now... you would thin that the game should assign some default values for Dormies and Undeclared majors. That just "makes sense" doesn't it? I searched through the bhavs and I did find that the Init - Student bhav, which I believe is responsible for initializing students, is supposed to set those values to some default number. So what the heck is the problem?

Well, I had my suspicions, and I thought it might be related to the fact that, on these new/fresh lots that I was testing, I didn't bother making the selectable sim Claim a door. I first tried doing that, but that didn't work either. My next suspicion was the fact that I was playing these lots "right out of the box" so to speak, without having saved at all. As soon as the sim moved in, I tried running the game for a long time, waiting to see if sims would start their college assignments. No luck, no joy. So, just to be sure, I made the playable sim(s) Claim a door, then I waited for ALL dormies to show up and fill out the rest of the dorm. And then I saved and exited and returned to the lot. Only THEN did the mod work correctly! Just to be certain, I stuck some Return Errors in the code, and when I looked at the Error Logs, sure enough, the fields for the Major GUIDs were ONLY defined AFTER I saved , exited, and returned to the lot. Any error logs created before saving, these fields were set to 0.

Anyways, I just thought that I would share that bit of frustration with you. Apparently the Init BHAV doesn't set student sims to a proper default major until after saving the lot. :shrug: At least that's my guess and my experimental results seem to support that unsteady hypothesis. :P

Well... thanks again for all your help! Feel free to test out the mod and let me know if you have any problems with it. I've posted it over here.

Cheers!

Ste
Lab Assistant
#30 Old 16th Dec 2005 at 4:02 PM
The answer to your problem is simple.

There are controller objects that are defined as "global sim objects" in the OBJD.
When you enter a lot, the game will try to create one instance of all these objects if there is not yet one existing in this lot.
Some specific controllers that should work only in some conditionss have a test at the start of their Main function and will autodestroy if the conditions are not true.
If you create a resid lot, then turn the lot to a dorm, the dorm controller will not exist until you save and reload the lot, because the lot was not yet a dorm when the game created the controller.
Field Researcher
Original Poster
#31 Old 16th Dec 2005 at 9:27 PM
Ahh... well I suspected something strange was going on. However, these lots were already dorms before I sent any sims into them. These were the default existing Maxis pre-made dorms, and the sims I were using were mostly CAS Maxis pre-made sims. I had a silly thought that maybe because they were Maxis pre-made sims, something might be different. So I made my own CAS student, and it still had the problem. It was only when I saved the lot and re-entered, in both situations, that my hack worked for both dorms they way it was working in dorm I cloned from my legacy game.

Anyways, thanks for elaborating. It's comforting at least to know that I wasn't going crazy. :loco:

Ste
Page 2 of 2
Back to top