MTS has all free content, all the time. Find out how YOU can help to keep it running. Tell me how...

Auto Lights Mod

by simler90 Posted 15th Apr 2020 at 11:39 PM - Updated 19th Aug 2021 at 2:02 PM by simler90 : UPDATE 12
14 Comments / replies (Who?) - 6 Feedback Posts, 7 Thanks Posts
UPDATE 12: This update fixes the issues that I described in the previous update. It turns out it is possible to fix the diagonal window problem, and now auto-lights will be able to recognize diagonal windows, so you can have a room with only diagonal windows without any issues. In addition, I got rid of my basement check and added a new check to see if there is at least one window facing outside in a particular room. This new check allows rooms which only have windows facing another interior room to be considered as having no windows by the light code.

UPDATE 11: Fixed yet another oversight with the basement check, it should work properly now. However, you should keep in mind that this check only works for conventional basements. If you heavily elevate the regular terrain and build a house on that terrain, and then build a basement, it is likely that the basement won't be at a low enough point compared to the road to be properly checked by the mod. In such basements, I recommend not using any windows. There is also something you should know about windows in the Sims 2. Diagonal windows can only exist in one room, as opposed to straight windows having a tile on both sides. This is why rooms which only have diagonal windows are considered to have no windows by the game during gameplay checks. There is no way around this, so you may want to add at least one straight window to such rooms.

UPDATE 10: Fixed a small oversight from the previous update.

UPDATE 9: I have found a way to check if an object is in a basement, so this update makes basement lights always work as if it is night-time, and in the Advanced Version, basement lights won't consider windows.

UPDATE 8: The game now also checks to see if the TV is in the same room as the lamp, as part of the feature added to the Advanced Version in the previous update.

UPDATE 7: Lights in the Advanced Version will now work as if it is night-time if the sky clarity is cloudy during daytime. If you are playing with Maxis' default lighting, it may be a bit difficult to realize that the sky is cloudy, as the effect is a bit subtle. But, if you have lighting mods, then it gets visibly darker when the sky gets cloudy. In addition, in the Advanced Version, sims will not cause lights to turn on if their current interaction happens to be watching a TV and if the TV in question is showing a Freetime movie and there is at least one sim who is currently watching the TV. Finally, I have made it so that toddlers and babies will only be skipped if they are in a crib or Baby Dangle Master (Store item), so they won't be skipped any more if they are being held by a sim.

UPDATE 6: Lights in the Advanced Version will no longer consider sims who are currently routing to nap on a recliner/lounger. In addition, I realized that the Sleep interaction entry is a different number on single beds as opposed to double beds, which is why sims who were routing to sleep in a single bed still caused lights to turn on. This has also been fixed.

UPDATE 5: Magical assistants, the therapist and social bunny won't cause lights to turn on. I also added an extra check to the Advanced Version to see if the sim is currently routing.

UPDATE 4:
- There is now an Advanced Version of this mod. Scroll down to read the description for that version.
- Pool lights will now only be on from 18 to 6 just like outdoor lights. I forgot to enable this feature in the previous update.
- I found out that there is a Maxis feature which is supposed to tell a lamp to turn on/off whenever a sim enters/exits a room. This feature seems to be used only when there are sleeping sims in a room and an awake sim enters the room, so that the game immediately turns on the lights. This feature does not work well with this mod or any other mod that makes it so that lamps turn on/off at all times dependent on the sims inside the same room as the lamp, rather than daytime/nighttime checks. It can cause turned-on lights to turn off right when the sim is about to enter the room, for example, because the way the game handles this feature is through a message that is sent right before the sim enters the room, rather than after. Not only that, this feature has the potential to sometimes mess up the lighting of the lamp, causing lighting issues even in an unmodded game. This update disables this feature, because it is completely unnecessary, as the game constantly checks to see if there are sims in the room who should cause lights to turn on anyway.

UPDATE 3: The mod is now compatible with my new Utility Mod. Pool lights will now only be on from 18 to 6 just like outdoor lights.

UPDATE 2:
- If there is a party on the lot, then indoor lights will be on except if all the sims within the room are asleep.
- Whenever a light is supposed to turn off, the game will wait exactly 15 sim-minutes before turning off the light. This prevents lights from constantly turning on and off, especially if there are many people on the lot.

UPDATE 1: The mod now considers the presence of babies, toddlers, active werewolves and Servos.

ORIGINAL DESCRIPTION

I don't like the way automatic lights work in the Sims 2. This mod changes the rules the game uses to determine if a light which has been set to automatic (which is the default setting) should be on or off. Before I tell you what this mod changes, you should know how the unmodded game works:
- Outdoor lights are always on from 18 to 2.
- Indoor lights are always on at night unless all the sims in the same room are asleep.

That's basically it, and because the game has so few checks, there are many oversights in the auto-light code. When this mod checks to see if there are any awake sims in a particular room to determine whether the light should be on or off, the mod skips certain kinds of sims which I think should not cause lights to turn on. These kinds of sims are burglars who are on the job, pets, babies, toddlers, zombies, active werewolves, bigfoot and ungreeted visitors. Also, I found out that certain moving objects are considered as human NPCs by the game for as long as they are moving, and the unmodded light code considers these objects as awake sims which in turn cause lights to turn on. These are cage birds which are currently flying, remote-control cars/helicopters which are moving and so on. This mod makes it so that these objects won't affect lights in any way. In addition, when the game pushes two sims to spoon each other in bed, the game temporarily wakes the sims up for a few seconds which causes the lights to turn on, and this mod fixes this and makes the code skip spooning sims.

Here are the new rules added by the mod:
- Outdoor lights are always on from 18 to 6.
- Pool lights are always on.
- Indoor lights are always on even during the day on community lots, secret society lots, and secret hobby lots.
- On all other lots, indoor lights in a particular room will be on during the day only if there are no windows in the room, and there is at least one eligible, awake sim in the same room. If the lot has a currently open home business, then lights will always be on in such rooms except if there are sleeping sims and no eligible, awake sims in the room.
- On all other lots, indoor lights in a particular room will be on during the night only if there is at least one, awake sim in the same room. If the lot has a currently open home business, then lights will always be on in such rooms except if there are sleeping sims and no eligible, awake sims in the room.

Advanced Version: I've made this version for my personal use, but I decided to release it, because some players may like the extra additions of this version. The Advanced Version has a few additional rules to determine how lights act:
- Babies and toddlers who are in a crib or who are currently being held by a sim, and babies in the Baby Dangle Master (Store item) are now skipped, so they won't cause lights to turn on.
- When a sim is routing towards a bed or sofa to sleep, all lights will skip the sim, except those lights that are in a room with no windows. Communal areas in an apartment and non-liveable lots always consider all sims.
- When a sim is routing outside or if they are routing towards a vehicle, only those lights which are in the same room as the object that the sim is routing towards will consider the sim's presence, because the sim will be leaving the house. Lights which are in a room with no windows will still consider the sim's presence. Communal areas in an apartment and non-liveable lots always consider all sims.
- When a sim is routing towards an object that is inside, lights which are in the same room as the object will consider the sim's presence normally. Other lights will only consider the sim's presence if they are in a room with no windows, or if they are in a room with more than 20 tiles. Communal areas in an apartment and non-liveable lots always consider all sims.

You need the latest version of 7zip or WinRAR to get this mod.

Requirements: Apartment Life and/or M&G.

Resources:
Function - Main/0x7F60C397/0x00002007
Lamp - Global Tuning/0x7F60C397/0x00002002

You must have the expansion or stuff packs listed below installed to use this custom content. Please see the post text for any exceptions.

Sims 2 Apartment Life + 1 SPs
Key: - File was updated after upload was posted
Filename - Tip: You can click the magnifying glass to see the archive contents Size Downloads Date
AutoLightsMod-AdvancedVersion-UPDATE12.rar

Size: 1.6 KB · Downloads: 1,160 · 19th Aug 2021
1.6 KB 1,160 19th Aug 2021
AutoLightsMod-UPDATE12.rar

Size: 1.2 KB · Downloads: 2,455 · 19th Aug 2021
1.2 KB 2,455 19th Aug 2021
Don't forget to Thank the creator after downloading! Use the Thanks button located above the screenshots above.
Basic Download and Install Instructions:

1. Download: Click the download link to save the .rar or .zip file(s) to your computer.

2. Extract the zip, rar, or 7z file.

3. Place in Downloads Folder: Cut and paste the .package file(s) into your Downloads folder:
  • Origin (Ultimate Collection): Users\(Current User Account)\Documents\EA Games\The Sims™ 2 Ultimate Collection\Downloads\
  • Non-Origin, Windows Vista/7/8/10: Users\(Current User Account)\Documents\EA Games\The Sims 2\Downloads\
  • Non-Origin, Windows XP: Documents and Settings\(Current User Account)\My Documents\EA Games\The Sims 2\Downloads\
  • Mac: Users\(Current User Account)\Documents\EA Games\The Sims 2\Downloads
  • Mac x64: /Library/Containers/com.aspyr.sims2.appstore/Data/Library/Application Support/Aspyr/The Sims 2/Downloads
Need more information?
 
14 Comments / Replies (Who?) - 5 Feedback Posts, 7 Thanks Posts
Hide Thanks Posts for this thread (Show only feedback)
Inventor
THANKS POST
#2 Old 16th Apr 2020 at 7:25 AM
Thanks for this, it's a pretty frequent occurrence for my sims to be outside at 2 am and suddenly get thrown into pitch darkness , much appreciated and useful !
Lab Assistant
THANKS POST
#3 Old 16th Apr 2020 at 10:27 AM
This is perfect! Thanks for helping the game e more realistic
Test Subject
THANKS POST
#4 Old 16th Apr 2020 at 10:32 AM
omg YES!! ive been waiting for something like this. do i just put it in downloads?
Inventor
THANKS POST
#5 Old 16th Apr 2020 at 5:29 PM
YES! Thank you! The lights situation always bugged me.
Lab Assistant
THANKS POST
#6 Old 17th Apr 2020 at 12:12 AM
And yet, another mod that just makes sense. Thanks for this!
Instructor
THANKS POST
#7 Old 19th Apr 2020 at 4:51 AM
I used Numenor's Smarter Lights mod for a long time, but this one makes a lot more sense. (I was especially annoyed by lights turning on for walkbys after dark while my sim was at work.) Thanks for sharing!
Scholar
THANKS POST
#8 Old 17th May 2020 at 5:49 AM
I love this mod so much but for some reason it doesnt work in my game, do you think it might be glitching with my lighting mod by spooky muffin?
Lab Assistant
#9 Old 8th Aug 2020 at 8:05 PM
Quote:
Originally Posted by labellavienna
I love this mod so much but for some reason it doesnt work in my game, do you think it might be glitching with my lighting mod by spooky muffin?


it doesn't work in my game either and i have spooky muffin's lighting mod also. i think i'll just remove the lighting mod because imo this mod is more important!
Test Subject
#10 Old 2nd Feb 2021 at 4:58 AM
I noticed that apartment neighbour don't turn on lights in rooms that are on communal area.
Lab Assistant
Original Poster
#11 Old 3rd Feb 2021 at 4:47 PM
Quote:
Originally Posted by guirnaldas
I noticed that apartment neighbour don't turn on lights in rooms that are on communal area.


There is an issue in the game which leaves apartment neighbours' sleep-state as "asleep" when the game pushes them to leave their rooms. Maxis never fixed this. You can get my new Apartment Neighbour Mod which fixes this issue in addition to other fixes and features.
Test Subject
#12 Old 6th Feb 2021 at 9:42 AM Last edited by guirnaldas : 7th Feb 2021 at 2:10 AM.
Awesome, thanks! Now I found another issue: when you command a sim walk to lot... he will not light any room he goes through in his way out. I think the same happens when going to sleep/nap autonomously.
Lab Assistant
Original Poster
#13 Old 23rd Feb 2021 at 12:18 PM
Quote:
Originally Posted by guirnaldas
Awesome, thanks! Now I found another issue: when you command a sim walk to lot... he will not light any room he goes through in his way out. I think the same happens when going to sleep/nap autonomously.


This is an intentional feature of the Advanced Version. In those cases, lights will only turn on if the room has no windows.
Test Subject
DELETED POST
29th Mar 2021 at 3:13 AM
This message has been deleted by TinyScholar.
Test Subject
#14 Old 25th Apr 2021 at 12:02 AM
i downloaded one of the files, it says it's corrupted. please help.