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 7th Jun 2021 at 4:02 PM by simler90 : UPDATE 6
177 Thanks  Thanks     36 Favourited
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 Monster (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



Download files

Filename Size Downloads Date
AutoLightsMod-AdvancedVersion-UPDATE6.rar

Size: 1.0 KB · Downloads: 900 · 7th Jun 2021
1.0 KB 900 7th Jun 2021
AutoLightsMod-UPDATE6.rar

Size: 788 Bytes · Downloads: 2,242 · 7th Jun 2021
788 Bytes 2,242 7th Jun 2021

Key: - File was updated after upload was posted
Tip: You can click the magnifying glass to see the archive contents

Need help with downloading or installing content? Click here!
 
13 Comments / Replies (Who?)

Expansion/Stuff packs required:
Sims 2 Apartment Life + 1 SPs

13 Comments / replies (Who?)

3,145 Downloads

9,827 Views

Type: Global Mods

Tags: #Lights, #Light, #Lighting, #Automatic, #Auto, #Code, #Gameplay, #Graphics