Door Locks for TS4 - Version 3c

This is a featured upload! It showcases the best talent and creativity available on MTS and in the community.

This is a completely outdated mod that is useless to anyone who doesn't run an old unpatched version of the game. Use LittleMsSam's door locks for a better door lock that works with the current game versions!

Updated to Version 3c - This is a required update for the Door Locks mod to work with the December 4, 2015 game patch or later. This fixes the broken sim picker dialog box which began to occur due to changes in the game's internals. No other changes were made to the mod, so there may be other unknown bugs that have yet to surface - but everything I've tested is working well again.

Be sure to remove the old version of the script and package from your mods folder if you upgrade the mod!

Remember you must have Script Mods enabled in your game options, even with the new script file format!

Description

Version 3 Update (05/10/15)

Door can be set to always allow a list of up to 8 sims to use them.

Selecting individual sims can be done with the "Never Lock For..." menu selection

Never Lock For will not automatically set or change any other lock settings - to use the most most commonly desired feature, see the Allow Only Chosen Sims option in Quick Locks below

The sim picker dialog will be sorted with currently selected sims first, then the current household, followed by all sims. The list is then sorted by last name and first name.

A "Quick Locks" menu has been added which can be used to quickly set a specific lock style, options include:

Allow Only Current Sim - Turns on Lock For All and adds the current sim on the Always Allowed list

Allow Only Chosen Sims - Turns on Lock For All and allows up to 8 sims to be chosen for the Always Allowed list

Allow Children Only - Turns on Lock for Young Adults, Adults, and Elders

Allow Young Adults and Older - Turns on Lock for Children and Teens

A copy/paste feature is also available in the Quick Locks to quickly duplicate a lock style, including any chosen sims

Locks can be turned on and back off without clearing any settings

The mod will now re-evaluate an age lock automatically whenever a sim ages up

The mod will no longer attempt to lock doors for ghosts or Grim

A bug has been reported concerning visitor doors and switching control back and forth between sims on different lots locking out the wrong household. The glitch is only temporary and clears up after a reload, full details in this post

Princemajik has uploaded a mod review on YouTube which discusses how to properly install the mod.

Version 2a contains a bugfix for the age filters which were not working for young adults and older sims. Also several translations have been added (details in credits below).

Version 2 Update (04/11/15):

This is pretty well tested, but a LOT of changes were made under the hood so there may be new bugs. There shouldn't be any game breaking bugs, but the old version v1b will continue to be available for a while just in case.

Gave the menus a complete overhaul due to all the new options.

The internal lock states have changed completely, so any doors you have locked on a lot will be reset to unlocked.

If you downloaded the bathroom doors add-on, any of those doors will automatically translate to the default gender locks for that door. You do not need to download a new version of the bathroom doors.

Locks can now be locked to all sims, or filtered

Filters are available for all ages, genders and retail roles (employees and customers)

Filters can be combined in any combination, so some pretty creative (and many very useful) door locks can now be made! For instance:

Lock out employees and customers (but not regular visitors)

Lock out just children, teens and elders (allowing only young adults or adults)

Lock out customers or visitors, but not employees (the employee break room)

Added a convenient menu option to reset all filters, which will leave the lock "on" but will effectively make it unlocked until you add new filters

Unfortunately, the menu changes made all existing translations obsolete, so I'll need new ones.

Version 1b Update (04/09/15):

Includes the new Spanish translation, the full list of translations is below in the Additional Credits.

Removes the lot ownership requirement so that you can set locks on doors at venues or at any visited lot.

An add-on is also available which includes recolors of the Featureless Fiberglass Door to provide bathroom doors which are locked by default for the appropriate gender. Custom Content designers can reference the same object tuning instances used by these doors to produce their own doors.

To lock a door or gate, just click on it and Enable Lock. To lock an arch, you must target the arch itself, not the blank space in between.

New locks will default to locking the door for all sims. To change the lock style, click on a locked door and select a new lock type.

Once a lock type is set, disabling and re-enabling the lock will preserve the lock type you set previously.

Doors can be set to lock out...

All sims (the default)

Visitors only

Male sims only

Female sims only

Children only

The lock state for each door is saved with the lot, so when reloading the lot the locks will be set the way you left them.

Locks generated by sim roles (maids, ungreeted visitors, etc.) are not affected by the mod. Maids are considered visitors, so a lock can effectively prevent them from snooping around where you don't want them.

Sims will try their best to route around locked doors. Eventually they will give up and shrug.

If a sim has already decided on their route to a location, locking a door on their chosen path will be ignored until the next time they try to find a route somewhere.

As with any mod, there may be bugs! I ran the mod through some pretty rigourous testing, the final version was tested for at least two hours of locking doors, changing locks, switching lots, saving/reloading, etc. without exiting or restarting the game, so it seems quite stable. At least as stable as the game itself.

If you run into serious problems, you can simply remove the mod and the door locks will be silently eliminated from your game when you reload the game.

Menu translations are graciously accepted and you will be given credit below. Just send me a string table with the proper translation(s).

Installation Instructions and Compatibility

Starting with version 3b of the mod, the new ts4script file format is used for the script. Installation using the Mod Manager will no longer work until it or one of the other mod management programs is updated. Manual installation is a breeze, just drop the package and ts4script files found in the zip file you download into your mods folder.

Script mods must be enabled in your game options for this mod to work properly.

The current version of this mod, version 3c, was written and tested on Windows for The Sims 4 version 1.14.49.1020 (January 7, 2016) - the mod should work with the December 4 patch as well.

There may be older versions of the mod still available, but these are not supported and may be removed at any time.

This modfies the XML tuning for doors, gates and arches and can conflict with any other mods that modify these resources. Custom content doors, gates and arches should work properly with this mod as long as they don't modify the XML, which unless they're doing something unusual should be the case.

The mod modifies several of the games scripts in ways that may not be compatible with other mods.

Manual Installation

The zip file you downloaded should contain a package file and a zip file ending in _Script. Unzip both files into your Mods folder, but do not unzip the zip file ending in _Script -- that should end up in the Mods folder still zipped.

The package file can be placed into a subfolder, however the script file must be placed directly in the Mods folder.

Princemajik also discusses how to install the mod in his mod review on YouTube.

Additional Credits

Kuree and all the others at Sims4Group who have put together the S4PE tool

Menaceman44 for providing me with a save game file that helped me track down a major bug

Deaderpool for assistance solving some coding errors

Thanks to those who have been kind enough to provide translations:

Version 3 Translators:

French translation submitted by JakeC0001

Spanish translation submitted by JakeC0001

Some corrections to the Spanish translation submitted by Tracas

Brazilian Portuguese submitted by An_dz

Chinese translation submitted by egureh

German translation submitted by Blackberryzh

Some correctionst to the German translation submitted by Michelle.Greenday

Hey scumbumbo, I'll give you my first born child if you manage to make this mod work again. Hehe But jokes aside, you would be a life saver if you could. EA's lock doors system sucks major butt. It's useless because no matter what you do, visitors are always locked of using the doors, so it only works for household members. I just want to lock doors for toddlers and kids and household pets so they don't go outside of the house on their own and I can't.

If you do choose to update this mod I'll be forever grateful, I just can't stand how EA set it up. There's no way to customize it like your mod does. But if you do decide not too, I will also respect that and thank you so much for all that you've done for this community. <3

If you do choose to update this mod I'll be forever grateful, I just can't stand how EA set it up. There's no way to customize it like your mod does. But if you do decide not too, I will also respect that and thank you so much for all that you've done for this community. <3

Interesting, thanks for that link. If this seems to work well for people I'll put a link to it on this mod's description. Like I said, my code is a mess and I've always wanted to approach rewriting it using the game's built in door locks so this would be awesome if this mod takes care of at least the majority of what people want from the old mod.

Interesting, thanks for that link. If this seems to work well for people I'll put a link to it on this mod's description. Like I said, my code is a mess and I've always wanted to approach rewriting it using the game's built in door locks so this would be awesome if this mod takes care of at least the majority of what people want from the old mod.

This takes me nearly there - I will still miss the gender and age locks : ( but I understand if the code is too messed up.

Interesting, thanks for that link. If this seems to work well for people I'll put a link to it on this mod's description. Like I said, my code is a mess and I've always wanted to approach rewriting it using the game's built in door locks so this would be awesome if this mod takes care of at least the majority of what people want from the old mod.

I don't understand a thing about code so I'm sorry if this is a dumb question, but how hard would it be to add options to the game's locking system? For example, they now added "lock for all pets" with the new EP, which means they can probably lock doors to certain lifestages too (like lock for toddlers, children, etc.) and maybe even gender. So do you think it would be too much work to add to that?

What I desperately need right now is being able to lock doors for a specific sim only. So an option like "lock for this sim". My problem with the in game system is that whenever you lock a door, you are locking it to visitors as well and there's no way to unlock it for them. So if I want to lock the front door for my household toddler to prevent them from wandering into the street (which they do all the time), I would need to lock the door for everyone and then unlock it for all the other members of the household besides the toddler, right? But then visitors wouldn't be able to use the door as well. So this new mod that was linked really doesn't solve my problem because I would have to manually unlock the door for each sim and there's a limit of 20, which may not cover all of my sims' family and friends or other regular non-household sims like maid, repairman, etc.

So yeah, you'd still be a life saver if you would do this and I would love you forever. :D

I don't understand a thing about code so I'm sorry if this is a dumb question, but how hard would it be to add options to the game's locking system? For example, they now added "lock for all pets" with the new EP, which means they can probably lock doors to certain lifestages too (like lock for toddlers, children, etc.) and maybe even gender. So do you think it would be too much work to add to that?

Why do you ask scumbumbo instead of the Modder of said Mod? EA Tuning for Locking/Unlocking is completely different to Script Modding. For example all padlock Files have specific Tags like "lock_all_with_situation_job_exception". Situation Job is the Butler for example. Pets have a specfic exception for genus (lock_all_with_genus_exception). The Gender Doors that exist have their own Coding in the Object Files which is also not that helpful if you are limited to a tuning Mod. I will try to add ages/gender in my Mod but it might not work because of the specific exception tags EA uses for their locking System. I will just have to try it out...

Quote:

Originally Posted by aninhas103

What I desperately need right now is being able to lock doors for a specific sim only. So an option like "lock for this sim". My problem with the in game system is that whenever you lock a door, you are locking it to visitors as well and there's no way to unlock it for them. So if I want to lock the front door for my household toddler to prevent them from wandering into the street (which they do all the time), I would need to lock the door for everyone and then unlock it for all the other members of the household besides the toddler, right? But then visitors wouldn't be able to use the door as well. So this new mod that was linked really doesn't solve my problem because I would have to manually unlock the door for each sim and there's a limit of 20, which may not cover all of my sims' family and friends or other regular non-household sims like maid, repairman, etc.

If i remember right (at work and can't check) there is a "Lock Door for Household Member" implemented in the Game since the last big Patch or the one before that? At least i think i saw that in my Game. I would have to recheck through if it is a Mod that does that or the game itself or if i saw something completely different.

EDIT: "lockHouseholdSimsPickerInteraction_lock_door" so yes, locking single Household Members is already a Part of the Game! You should check your Doors again

Cannot loading saved game. Hope there will be an update soon. Thank you.

Check a few posts above for a link to LittleMsSam's door locks mod. This one uses old game features that would make it difficult to adapt (would basically require a complete rewrite). Her mod does what this one did and more and uses the base game's door lock methods rather than what I had hacked before they added lockable doors to the base game.