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!
Lab Assistant
Original Poster
#1 Old 14th Jul 2013 at 6:19 PM
Default Days left in a season
I'm sorry if this isn't the right forum, but I didn't understand well where I can ask my question.
I'm creating a mod that simulates the real life (I mean: 1 year of sim life = 365 days, as in our real life) with some options, for example: add/subtract/reset days left, knowing the real age of a sim (from 1 to 100 years, included the Young Adult stage), etc.
I have almost completed it, but I need to know a thing to go on and complete the mod.
My question is related to SimPe.
I know that the variable that counts the age days left in a stage of life is just called "Age Days Left".
Now, I know that the days of a season can be changed modifying the related BCON or modifying some operands in particular LUA scripts, but I don't find a variable: you can tell me what's the name of the variable in SimPE that counts the days left in a season?
I mean, when in the game you see "x days left in spring", "x days left in summer",..., what's the name of the variable that controls the days left?
Thanks to all who will help me.
Advertisement
*shrugs*
retired moderator
#2 Old 14th Jul 2013 at 7:16 PM
That may not actually be stored in a variable, but calculated as needed.

Look at it this way....
Bob was born in 1900. The current year is X. To know how old Bob would be if alive to day, you would simply subtract from the current year: "Bob is (X - 1900) years old." There would not necessarily be the need to store and maintain Bob's age in its own unique variable when you can easily calculate the information on demand.

If the game knows how many days a season is supposed to last and how long it's been, it can do a similar calculation for the tooltip.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Lab Assistant
Original Poster
#3 Old 15th Jul 2013 at 9:37 AM
Quote: Originally posted by maybesomethingdunno
That may not actually be stored in a variable, but calculated as needed.

Look at it this way....
Bob was born in 1900. The current year is X. To know how old Bob would be if alive to day, you would simply subtract from the current year: "Bob is (X - 1900) years old." There would not necessarily be the need to store and maintain Bob's age in its own unique variable when you can easily calculate the information on demand.

If the game knows how many days a season is supposed to last and how long it's been, it can do a similar calculation for the tooltip.
First of all, thanks for the reply.
I understand what you mean, but there's a complication. Regarding the days left in the life of a sim, there aren't problems because I know in which variable are implemented the current days left and then I know precisely the current day in the life of a sim.
But regarding the days left in a season, I don't think that your method is applicable because I don't know what is the current day in the whole lenght of a season, id est I know how many days a season is supposed to last but I don't know how long it's been.
For example, I set the lenght of the spring season to 92 days (that is almost the real lenght of the spring season in the northern Hemisphere of the Earth) and I know that the first day of the spring is March 21 and the last day of the spring is June 20.
So, when the game says that there are "92 days left in spring", I know that day is March 21 and when I click on the interaction of my mod named "What day is today?", I am shown a message that says "Today is March 21". And when there is "1 day left in spring", I know that day is June 20.
Now, if I apply the method you have written, for knowing the current day in the season I must do "92 - X", where 92 is the lenght in days of the season and X are the days spent in the season; but I don't know what is X and how to find it.
Somewhere I know how to change a season, but I also want to insert the possibility of change the current day of a season and to do it I should know what is the variable that counts the days left in a season or the variable that counts the days spent, because one of them must needs exist, otherwise in the game would not be shown "x days left in spring", "x days left in summer", etc.
You understand what I mean?
Doing all the things, and *mostly* not failing.
retired moderator
#4 Old 15th Jul 2013 at 6:57 PM
I feel like I've seen something about this in SimPE and used it for my Calendar upload. Feel free to open it up and see if the stuff about 'what month is it' helps you at all.
Lab Assistant
Original Poster
#5 Old 15th Jul 2013 at 10:26 PM
Quote: Originally posted by Phaenoh
I feel like I've seen something about this in SimPE and used it for my Calendar upload. Feel free to open it up and see if the stuff about 'what month is it' helps you at all.
Thanks Phaenoh, I think I've found what I was looking for
Tomorrow I'll give it a look in SimPE.
And congratulations for the fantastic mod you have created
Lab Assistant
Original Poster
#6 Old 17th Jul 2013 at 5:31 PM
Then, I've given a look to your mod in SimPE, Phaenoh. I have not found what I was looking, because your mod changes the days of a week with the variable "Day of Week" and also the other variable named "Days Running" isn't related to the days left or spent in a season. But I still found some interesting infos in your mod, so thanks again
However, I've also tried to change other global variables like "Day of Month" and "Month", but they aren't related to the days of a season, too.
So, I'm still unable to find the right variable and I can't finish my mod.
Doing all the things, and *mostly* not failing.
retired moderator
#7 Old 17th Jul 2013 at 7:07 PM
Isn't there something about 'days left in season'? Look into the weather reward because it can change how many days are left in a season.
Lab Assistant
Original Poster
#8 Old 18th Jul 2013 at 12:03 PM
Quote: Originally posted by Phaenoh
Isn't there something about 'days left in season'? Look into the weather reward because it can change how many days are left in a season.
Where is the weather reward? It's a Lua script?
Meanwhile I'm trying with the global variables "Days Standard" and "Days Total" in the Lua scripts.
Doing all the things, and *mostly* not failing.
retired moderator
#9 Old 18th Jul 2013 at 1:59 PM
I had trouble finding the code for it myself, so I used Paladin Palace's Seasons Debug Changer thingy. It does all the same stuff, but is easier to use both in game and in SimPE.
Lab Assistant
Original Poster
#10 Old 18th Jul 2013 at 2:19 PM
Quote: Originally posted by Phaenoh
I had trouble finding the code for it myself, so I used Paladin Palace's Seasons Debug Changer thingy. It does all the same stuff, but is easier to use both in game and in SimPE.
You mean the Seasons and Weather Controller? I already have it.
It changes the seasons as set in the season quadrant and set the season lenght modifying the global variable "Days Standard" in the Lua script. For this reason I'm trying to change this type of variables and see what happens, because I've noticed that with the total days in a season set to 90 days (I've modified the related BCON) and changing the lenght of a season, for example, to 60 days with the Season and Weather Controller, the bar of the days left in a season does not reset but increases as if was still stored 90 days as total days in a season. I'll let you know if I found the solution.

P.S.: I've understood that for "weather reward" you mean the original object of the game that changes weather and season
Lab Assistant
Original Poster
#11 Old 18th Jul 2013 at 5:50 PM
Problem solved, finally
The days left in a season are stored in the global variable Days Standard - Get; it's the Lua script n. 81 (the 81 goes in the third quadrant of the operands list, starting from the top left) and the information is stored in the variable Temp 0x0000.
Now, I think to have everything I need to finish my mod
Lab Assistant
Original Poster
#12 Old 7th Aug 2013 at 3:52 PM
I've finished and tested my mod and everything works as intended
Now I just have to reflect if I want to add real life also for babies (1 entire year in this stage), pets (age variable, dependent from the type of pet) and for the pregnancy state (9 months with 3 months for every stage of pregnancy).
Doing all the things, and *mostly* not failing.
retired moderator
#13 Old 7th Aug 2013 at 4:47 PM
I think people have tried modding baby age length and pregnancy length, and both have been unsuccessful. You are always welcome to try, but I haven't seen one that works yet.
Site Helper
#14 Old 7th Aug 2013 at 5:48 PM Last edited by Mootilda : 7th Aug 2013 at 6:01 PM.
I've seen mods for both of those. If I remember correctly, they are just BCONs. Let me see whether I can find them.

Baby age length min and max is in BCON group 0x7F07FBBC instance 0x00001000 (first two numbers). I have mine set to 1/1, which seems to work just fine.

Pregnancy length is in BCON group 0x7FD46CD0 instance 0x00000102 numbers 0x32-0x34. If I remember correctly, each number must be at least one more than the previous number, which means that the minimum pregnancy length is 3 hours.

These mods work just fine for me. If you have problems with them, you may have a conflict with other mods which change the same BCONs.
Doing all the things, and *mostly* not failing.
retired moderator
#15 Old 7th Aug 2013 at 7:08 PM
I stand corrected! I never tried changing them myself because all the age mods I had seen had said that they had tried and it didn't work for them, and 3 days is fine for me, though I might try to shorten pregnancy to 2 days now that I know its possible. Thanks Mootilda!
Lab Assistant
Original Poster
#16 Old 7th Aug 2013 at 8:01 PM
My mod doesn't change automatically the days left, modifying the BCON you intend. I've tried to do that at the beginning, modifying the BCON extracted by IngeJones (if I remember correctly) but, as you've written, the result was not exhaustive: the days left remained static and pregnancy for the women was impossible to have.
So I've created this mod that manually modifies the age days left of a sim, clicking on the relative interaction.
Then I've added the possibility to know how old is the sim and the possibility to change the season, the month and the day on a total of 365 days, and if you want to know "what day is today?", just click on the related interaction
Futhermore, I've added the real life also for the young adult stage with the possibility to reset the hours left to the exam of every semester, from a few months up to a few hours, and the possibility to know how many days or hours are left to the final exam.
Finally, the days left in the elder stage depends on 3 factors: aspiration bar, trained skills and the fatness/fitness of a sim. The days left in the elder stage goes from 6 months to 40 years (age goes from 60 to 100 years) and the value of the days left depends on the 3 factors written before.
Now, before I upload the mod, you advise me to complete it adding the real life also for babies, pets and pregnancy stage, or it's better if I before upload the mod and after I complete it adding these last things?
Doing all the things, and *mostly* not failing.
retired moderator
#17 Old 7th Aug 2013 at 9:18 PM
Complete the mod to how you best want it. Uploading a not completely finished mod is frowned upon. /me puts on best frowny face.
If you don't want your mod to have the baby and pregnancy changes, that's fine too, but whatever you decide, finish it first, then upload it.
Site Helper
#18 Old 7th Aug 2013 at 9:34 PM
Quote: Originally posted by Phaenoh
I stand corrected! I never tried changing them myself because all the age mods I had seen had said that they had tried and it didn't work for them, and 3 days is fine for me, though I might try to shorten pregnancy to 2 days now that I know its possible. Thanks Mootilda!
That's 3 hours, not 3 days.

If an existing sim's pregnancy is already past the number of hours in the newly installed mod, the sim won't give birth. However, if you make sure that no pregnancies are past the new delivery date, then everything works just fine.
Lab Assistant
Original Poster
#19 Old 7th Aug 2013 at 9:37 PM
Quote: Originally posted by Phaenoh
Complete the mod to how you best want it. Uploading a not completely finished mod is frowned upon. /me puts on best frowny face.
If you don't want your mod to have the baby and pregnancy changes, that's fine too, but whatever you decide, finish it first, then upload it.
Thanks for the advice
Maybe I can complete it adding real life for babies (for pets, another time), and for the moment I don't modify the pregnancy stage since it needs to be modified in the related BCON, and modifying a BCON can cause problems.
The only BCON I've modified and that hasn't given me problems is the BCON related to the total days left in a season; I'll obviously include it in the mod because it's necessary for the real life.
If tomorrow I have time, I'll post here some images that can explain better what does my mod
Site Helper
#20 Old 7th Aug 2013 at 11:26 PM
That's really strange. I've always found the BCONs to be the easiest changes, and the least error prone. My only problem is when two or more numbers are related (like the pregnancy BCONs; you have to make sure that the relationship between the numbers remains correct.
Lab Assistant
Original Poster
#21 Old 8th Aug 2013 at 9:50 AM
Quote: Originally posted by Mootilda
That's really strange. I've always found the BCONs to be the easiest changes, and the least error prone. My only problem is when two or more numbers are related (like the pregnancy BCONs; you have to make sure that the relationship between the numbers remains correct.
Certainly you have much more experience than me in modding and I also think that BCONs are the easiest changes because you don't have to create any BHAV function. But changing the BCON related to the days left of a sim create the problems I have written in a previous message and furthermore, existing sims don't receive the change as long as they don't change the age stage: this happens because (I think) the BCON modifies the "Age days left" variable and only after the grow up it modifies the "Age duration" variable, but to have the change immediately, it'd soon modify the "Age duration" variable that increases the age bar; only new sims immediately receive the change of days left.
Different speech instead for the BCON related to the days left in a season: for existing lots, you don't see immediately the change, so if remained 5 days left in spring before the modification, still remain 5 days left in spring after the modification. But the change has been recorded, in fact you can see that the bar of the days left in spring is increased; this happens because the BCON directly modifies the "Days Total" variable in the related LUA script and doesn't modify the "Days Standard" variable that records the actual days left in the season.
Lab Assistant
Original Poster
#22 Old 9th Aug 2013 at 10:44 AM
Ok, I have problems to add the real life for babies because they are not selectable.
So far I've worked with "My object id" and everything was ok, but babies are other objects and I don't know how to set the Stack Object ID for not selectable sims.
I want to add an option on the selected sim (as I've done with all the other options) that doesn't modify the age of the selected sim, but modifies the age of another sim (in my case, the age of a baby). So, the menu must appear on the selected sim, but the interaction must refer to another sim.
How I can set the Stack Object ID in this case?
Lab Assistant
Original Poster
#23 Old 13th Aug 2013 at 8:58 AM
No one can help me?
Lab Assistant
Original Poster
#24 Old 24th Aug 2013 at 4:56 PM
I have solved the problem of setting the real life also for babies (that are unselectable) and now I think to be able to add the option for setting the real life also for pets.
Then, I must add other minor options and the mod will be finally complete
Back to top