Replies: 3 (Who?), Viewed: 224 times.
Test Subject
Original Poster
#1 Old 5th Dec 2021 at 2:48 PM Last edited by mingos : 5th Dec 2021 at 10:07 PM.
Default Menstrual Cycle Initialization
I'm currently writing a mod based off of KW's reproductive cycle system. I started first with menstrual cycle but I have been having trouble initializing the mod within the game. In fact, the loading screen hangs when I uncomment out the new class initialization.

I've tried writing it with alarms, and now went back to way KW does with set hourlys for each phase. At this point, I'm not sure what else to do.

My Questions:

What else could I be doing to make the mod work?

Is there something that I'm missing about class initialization in C# and in mods?

Also, it's currently being written as a script mod.
Virtual gardener
staff: administrator
#2 Old 5th Dec 2021 at 5:15 PM
Heya Mingos!

For all questions it would be nice to have the source code in some way (a package file or a dll file would be enough ) as i'm not too sure how much you've changed from when we discussed the mod on discord
Test Subject
Original Poster
#3 Old 5th Dec 2021 at 10:09 PM
Package in question.
Download - please read all instructions before downloading any files!
File Type: zip (6.3 KB, 8 downloads)
#4 Old 10th Dec 2021 at 11:14 AM
@mingos Hmm what happens if instead of On World Load you placed this code in an interaction?

			Sim[] objects = Sims3.Gameplay.Queries.GetObjects<Sim>();
			for (int i = 0; i < objects.Length; i = checked(i + 1))
				if (!simsWithGenderManager.ContainsKey(objects[i].SimDescription.SimDescriptionId))
					if (objects[i].IsFemale && objects[i].IsHuman)
						simsWithGenderManager.Add(objects[i].SimDescription.SimDescriptionId, new GenderFemale(objects[i].SimDescription.SimDescriptionId, objects[i].SimDescription.TeenOrAbove));
					if (objects[i].IsMale && objects[i].IsHuman)
						simsWithGenderManager.Add(objects[i].SimDescription.SimDescriptionId, new GenderMale(objects[i].SimDescription.SimDescriptionId, objects[i].SimDescription.TeenOrAbove));
		catch (Exception exception)

I am wondering if maybe too much is going on during load time and that's why there's a crash. BTW which loading screen causes this crash/hang? The initial one or the second one when you load new game or save game?

If you like my mods. Consider supporting me on Patreon

Check out my website for updates on my mods and other work PuddingFace.Net

Check out my Youtube channel for tutorials(modding tutorials) and other content Youtube

Follow me on
Back to top