Disable TV Turn Off when Household Not Present

Talk nerdy to us here.
Post Reply
rgnrk198
Reactions:
Posts: 1
Joined: March 11th, 2019, 8:03 pm

Disable TV Turn Off when Household Not Present

Post by rgnrk198 » March 11th, 2019, 8:31 pm

I'm not sure if this is the right section to ask but here goes nothing. I created an mod that allowed my Sims to turn on the TV and play a home video on a Loop, but without the restrictions of needing a Sim to be actively watching the TV. This is useful to simulate some real world situations like: a video camera surveillance room for your home with multiple screens, or to setup advertisements that play on repeat in community lots. I implemented this through an interaction injection scripting mod that added this interaction to all TV screens.

For the most part, I did get this mod working however I notice that
  1. The TV turns off automatically when everyone from my household leaves the lot. I want to disable this behavior.
  2. There is a limit to the number of televisions that can play at the same time. For some televisions, some of the video gets stuck at the first frame. I want to increase this limit if possible.
I haven't figured out how I can make sure that the TVs stay on even if my household leaves the lot (so that I don't have to re-enable the video again). Also I'm not sure if theres a tuning parameter I can modify somewhere to increase the number of TVs that are able to play at the same time. Any advice for these two points would be appreciated.

I do have a lot of NRAAS mods installed like MC, Overwatch. Is there anything there that causes the behavior I am noticing? I know overwatch has a setting to automatically turn off inactive TVs everyday. I made sure to disable that but TVs still turn off if my household leaves the lot.

Here's the run() function of my interaction.

Code: Select all

public override bool Run()
{
DataDisc dataDisc = null;
if (!InteractionUtil.TryGetSelectedObject<DataDisc>((InteractionInstance)this, out dataDisc))

{
return false;
}

base.Target.mHomeMovie = dataDisc.ObjectId;
base.Target.mLastPlayedChannel = "Gameplay/Excel/TV/TVChannel:HomeMovie";
base.Target.ClearStateInformation();
base.Target.TurnTvOn(Target.mLastPlayedChannel, null);

// So that other sims won't mess with the TV screen
base.Target.DisableAutonomousInteractions();

return true;
}

User avatar
Chain_Reaction
Site Admin
Reactions:
Posts: 7568
Joined: December 30th, 2011, 6:00 pm
Answers: 81
Contact:

Disable TV Turn Off when Household Not Present

Post by Chain_Reaction » March 13th, 2019, 1:32 am

rgnrk198 wrote:
March 11th, 2019, 8:31 pm
The TV turns off automatically when everyone from my household leaves the lot. I want to disable this behavior.
This is being done by the venue system. You'd have to rewrite the alarm for every lot in town that you want to disable this behavior. It might be easier to just periodically check if they are off and turn them back on. I believe you could also make a tuning mod to make the lot types you want to use this on open 24 hours to disable it.
rgnrk198 wrote:
March 11th, 2019, 8:31 pm
There is a limit to the number of televisions that can play at the same time. For some televisions, some of the video gets stuck at the first frame. I want to increase this limit if possible.
This sounds like the engine balking to me. I could be wrong but don't see any limit to TV's in the scripting from a glance. If it is the engine you are out of luck I'm afraid.

Post Reply