RimWorld

RimWorld

Time-of-Day Switches
112 Comments
Merthykins  [author] 17 Jul @ 11:31am 
1.6 is planned (check back sunday)
Scionin 16 Jul @ 12:46pm 
1.6?
Blackout 11 Jul @ 7:48am 
Is this mod compatible with 1.6?
man_of_belief 18 Sep, 2024 @ 1:25am 
same problem like kiwa, but changing time did not helped for me.


Two power nets on the same cell (52, 104). First transmitters: Time of day switch and Hidden conduit.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Warning (string)
RimWorld.PowerNetGrid:Notify_PowerNetCreated (RimWorld.PowerNet)
RimWorld.PowerNetManager:RegisterPowerNet (RimWorld.PowerNet)
RimWorld.PowerNetManager:TryCreateNetAt (Verse.IntVec3)
RimWorld.PowerNetManager:UpdatePowerNetsAndConnections_First ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Map.MapUpdate_Patch3 (Verse.Map)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Game.UpdatePlay_Patch1 (Verse.Game)
Verse.Root_Play:Update ()
tzverg 9 Sep, 2024 @ 12:11pm 
Kiwa 6 Aug, 2024 @ 4:15am 
The issue also only occurs if both switches are set to turn on at the same time, but does not appear to happen when I offset them by one hour.
Kiwa 6 Aug, 2024 @ 3:10am 
Two power nets on the same cell (20, 128). First transmitters: Time of day switch and Power conduit.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Warning (string)
RimWorld.PowerNetGrid:Notify_PowerNetCreated (RimWorld.PowerNet)
RimWorld.PowerNetManager:RegisterPowerNet (RimWorld.PowerNet)
RimWorld.PowerNetManager:TryCreateNetAt (Verse.IntVec3)
RimWorld.PowerNetManager:UpdatePowerNetsAndConnections_First ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Map.MapUpdate_Patch1 (Verse.Map)
Verse.Game:UpdatePlay ()
Verse.Root_Play:Update ()
Kiwa 6 Aug, 2024 @ 3:10am 
Hmm, so... in 1.5, everything was fine as long as I only had one time-of-day switch on the map, but after adding a second one, I keep getting errors, and have to quicksave/reload each morning to get power back to one of the switched networks. I already completely deconstructed and rebuild both switches and power lines connecting them, to no success.

The power architecture is generators -> global power net, with two separate rooms each having a switch and a single power conduit behind the switch, with the devices (biofuel refinery, electric smelter) connected to that conduit. After the error messages, one of the rooms is powered, the other one is not (technically the conduit shows power, but the biofuel refinery keeps blinking the no-power-icon and is not operable until save/reload).

(posting the log next, message too long)
Venezz 18 Apr, 2024 @ 8:22am 
i also have the flickering issue
Merthykins  [author] 8 Apr, 2024 @ 1:08pm 
I'll check it out. If you could let me know what other mods you have that could help, but I can't say for sure yet it isn't something wrong out of the box. Thanks for th report!
Echo 8 Apr, 2024 @ 10:11am 
Ran into a weird issue where any machinery hooked up to a grid restricted by one of these will enter an infinite cycle of rapidly flicking on and off if the switch has any times set to Off. Setting all the times back to On and then reloading the save fixes the problem, but as soon as even a single Off hour passes, the infinite cycle begins again. Not sure if conflict with another mod, or issue with this one, but very frustrating - I count this as one of the absolute must have mods.
Merthykins  [author] 27 Mar, 2024 @ 5:22pm 
Also adjusted the research requirement to jsut electricity
Merthykins  [author] 27 Mar, 2024 @ 5:21pm 
Updated to 1.5, improved performance, verified it works in 1.4 and 1.5
skilfuleric 24 Feb, 2024 @ 9:12am 
Doesn't work
TheDankoCZ 3 Aug, 2023 @ 2:32pm 
Thank you again for a quick response. I really appreciate it and will look into it.
Merthykins  [author] 3 Aug, 2023 @ 12:34pm 
@TheDankoCZ - I have enabled the in-code strings to be translatable. On/Off will use the default rimworld translations, but the button text has been added.

If you do a pull request on the github, I will add your translation to the official release. If you want to have a separate mod uploaded as well that's fine too.
TheDankoCZ 3 Aug, 2023 @ 8:27am 
The mod is working great, thank you. But I was wondering, wanted to translate your mod, but some text seems to be not accessible, like the Set Times label and description on the button to set the times and On Off selectors. Is there a way to translate this text?
fra_dippi 3 Nov, 2022 @ 5:45am 
That's a great mod! I was wondering if there was a way to automatically time doors opening or areas. It would be extremely useful to micromanage a prison, for example.
VelxraTV 31 Oct, 2022 @ 8:27pm 
Thank you!
Merthykins  [author] 31 Oct, 2022 @ 4:21pm 
Updated to v1.4
VelxraTV 21 Oct, 2022 @ 1:56pm 
Please update to 1.4
man_of_belief 16 Aug, 2022 @ 1:53am 
my best mod ever. Thanks.
Tim 2 Apr, 2022 @ 9:30pm 
@dgloveruk76 you could just edit the xml in the mod folder:

Steam/steamapps/workshop/294100/776113312/1.3/Defs/ResearchProjectDefs/..TimeOfDatSwitch.xml


in there just edit:
<prerequisites>
<li>MicroelectronicsBasics</li>
</prerequisites>

To:
<prerequisites>
<li>Electricity</li>
</prerequisites>
Grow Insane 7 Jan, 2022 @ 3:18pm 
I like this although I find it has most potential utility before Microelectronics which it requires.
Once at the Microelectronics stage I am usually less concerned with power management. Also for for best utility it requires a degree of power grid thought/design, again this is less appealing in the later game, particularly as changing electricity grids in amongst a lot of other stuff can be a lot of fiddling. I think this timer should rely upon electricity not microelectronics even though I understand that from a scientific point of view it is more electronic in nature than simply electric. That said, when you look at what vanilla does, putting air con, hydroponics and autodoor etc all dependant only on electricity, you can see that the game designer saw the same thing. Let's not forget that the first power timers were less electronic and more mechanical anyway :)
Reianor 7 Aug, 2021 @ 6:17am 
If you need help setting that up - It's (probably, I'm not a native English speaker) called parallel and sequential connection of switches. The rest is up to you and your internet search engine of choice.
Reianor 7 Aug, 2021 @ 6:03am 
@Ascythian
And how exactly do you envision applying setting from one switch to another?
First there's the code side. You'd need a new switch essentially. One of them would need to implement the other mod's feature in their switches.

Then there's the actual work.
For example switch a is on when the time is right, and off when wrong.
The other is on when power is high and off when low.

How do you combine them? Do you want the result to be on when both the time is right and power is hight or when either?

You know how this is handled IRL? People connect those switches in different ways, and depending on how they are connected you get different results.

Nothing is stopping you from doing the same in RW if you have both mods.
Reianor 7 Aug, 2021 @ 6:02am 
@Aval
"I wasn't aware that rimworld's mod menu synchronized with the information provided on the steam workshop page, and just assumed that it was something defined within the mod's code."

I was under impression that it's the other way around, that steam workshop was reading mod's own tags. You'll notice some people "pre-tag" their mods for 1.4 and 1.5 but steam shows those tags separately.
Also there's the whole local mods thing. Where'd you think would tags come from for those?

What most likely happened is the workshop's usual shenanigans where it didn't actualy update mod files on your side. It does that (and more) a lot.
Merthykins  [author] 6 Jul, 2021 @ 4:52pm 
Updated to 1.3
Merthykins  [author] 28 Feb, 2021 @ 8:52pm 
Thanks for verifying!
rat 28 Feb, 2021 @ 8:00pm 
Unsub & resub fixed the problem, thanks! I wasn't aware that rimworld's mod menu synchronized with the information provided on the steam workshop page, and just assumed that it was something defined within the mod's code. Thanks again!
Merthykins  [author] 28 Feb, 2021 @ 7:20pm 
It shows 1.2 for me. It seems steam is having some strange version caching issues today. Would you mind trying unsubscribing and resubscribing and letting me know if it shows 1.2 compatibility?
rat 28 Feb, 2021 @ 6:23pm 
I just tried to run it in 1.2 and discovered that it works as you said, however it claims it's only for v1.0/1.1 in the actual game (steam page has correct info) - may confuse some users despite the fact that it works just fine
Merthykins  [author] 28 Feb, 2021 @ 5:52pm 
Yeah it's 1.2
rat 28 Feb, 2021 @ 5:08pm 
Any chance of a 1.2 update? :)
Merthykins  [author] 28 Feb, 2021 @ 12:22pm 
This can now be built over walls beacuse I like that better and it was a good suggestion.

Also I removed the log spam
Charlotte 4 Jun, 2020 @ 12:50am 
You have an extra logging line that spams logs at TimerSwitches.TimeOfDaySwitch:ExposeData()

https://bitbucket.org/merthsoft/timeofdayswitch/src/7a766b82520df52be85d78564ef8363f7da614f9/Source/TimeOfDaySwitch.cs#lines-78
Merthykins  [author] 24 Feb, 2020 @ 8:20pm 
This has been updated to 1.1

On-wall version is a good idea
StemderS 24 Feb, 2020 @ 6:04am 
Hey there bud, are you going to update this one for 1.1? :)
JangoD'soul 1 Sep, 2019 @ 12:40pm 
Is it possible to make a different version that build on the wall like the Thermostat in "Dubs bad Hygiene" ?
Merthykins  [author] 15 Jul, 2019 @ 1:51pm 
Thanks :)
Torbaz 14 Jul, 2019 @ 6:00pm 
Good mod
Merthykins  [author] 13 Jun, 2019 @ 7:46pm 
Alright added copy and paste
Merthykins  [author] 13 Jun, 2019 @ 8:04am 
Yeah that's a good idea
Vas 12 Jun, 2019 @ 10:24pm 
Any chance you can add a copy/paste function so they can be copied to other switches?
Merthykins  [author] 4 Jan, 2019 @ 7:40pm 
Sounds the same to me!
AmbiguousMonk 21 Dec, 2018 @ 12:17pm 
Is this mod made redundant by using "PowerSwitch", which adds a time-of-day function to the power switch, or does this mod do it differently?
Merthykins  [author] 5 Nov, 2018 @ 5:51pm 
brandon.hiraeth 5 Nov, 2018 @ 5:50pm 
Definitely do that. I hate that you can't have lights turn off when they leave the room.
Merthykins  [author] 5 Nov, 2018 @ 10:44am 
Hmm, I could take the tech from my auto light switches mod and add it to a switch, so that it's only on if someone is in the room