Hello, I've started working on a mod for timer switches, and wanted to see if one already existed. I've searched but the closest I've found is one that adds pretty advanced switches, including one that has a timer, but it's not as fine-grained as my idea. My idea is for it to work like the Restrictions tab, where you can set on or off for each hour. Does something like that exist? Would other people be interested?
I was looking for a mod like this ever since Day/Night Switches gained popularity. Sometimes you want fine control over those things, and an interface similar to the Restrict tab would be ideal.
I don't think one exists right now, it would be very much welcome.
Cool--I'll keep working on it then and keep you updated!
I'd be interested in a simple timer switch.
have you seen the haplo's power switch mod? it has timer, pawn on room, pawn nearby functionality, and has even partly entered into the base game (just not the extra modes eg timer pawn in room & pawn nearby)
I have! And I quite like it, but the interface for the timers is a little clunky. My hope is that we'll be able to combine them and mine can just be absorbed into his.
Progress is progressing! http://i.imgur.com/lQ4bX9v.gifv (http://i.imgur.com/lQ4bX9v.gifv)
Sorry for the weird green stuff--not sure what's going on there and I didn't feel like re-recording. Still needs lots of work, but jsut wanted to show something off.
Just a small suggestion: "timer" switch implies that the switch counts down X amount of ticks/hours and shuts itself off (which is what a timer is, it starts from 100% and goes to 0%). You could say these are time-sensitive switches or something like that.
I actually didn't know about Haplo's mod before, shucks. If you can implement this in a way that works alongside (or even merges into) his mod that would be great.
It'll definitely work with his, and hopefully just work together. Good idea on the naming--I'll probably implement both things, too.
(http://i.imgur.com/IrpjlsV.jpg)
Some progress. You can assign the times and everything. It's not fully functional yet, but it's coming along!
Alright! I've got a first release for you guys if you want to test it out!
Download Link (http://merthsoft.com/TimerSwitches.zip)
(http://i.imgur.com/i1Ote35.png)
Let me know what you think!
Looks really nice. I looked at it in-game, very slick. My only question is why the font on the On/Off designators looks so weird.
Oh, yeah, it does that when you call the translate method on it--I'm not sure why. I'll change that so it's not making it weird.
Your mod works good, except one thing - switches reset when loading a game from save.
Ability to disable sun lamps at "resting" hours so good!
Quote from: avilmask on October 04, 2016, 02:36:40 PM
Your mod works good, except one thing - switches reset when loading a game from save.
Ability to disable sun lamps at "resting" hours so good!
Are there concrete resting hours, or does that change per latitude? If they don't vary, it'd be nice if there was a pre-set button for those hours.
Yes, the resting hours are fixed. There's actually a Day/Night switch mod designed with sun lamps in mind, btw.
Quote from: MarvinKosh on October 04, 2016, 02:47:20 PM
Yes, the resting hours are fixed. There's actually a Day/Night switch mod designed with sun lamps in mind, btw.
Right, but it doesn't actually match up exactly to the resting period AFAIK. Have seen more than a few posts that are positive that resting hours are slightly less than the night period provided by the day/night switch, meaning you are missing out on some growing time by not either running a battery (on the sunlamp side of the day/night switch) to make up for some of that lost growing time or just running the sun lamp 24 hours/day and thereby wasting power much of the night but still getting a bit more growing.
Now it could be they are wrong and the day/night switch is perfectly setup. Haven't paid close enough attention myself yet to really know.
Even if Day/Night Switch is not perfect it works well enough for me. There is also Haplo's PowerSwitch which allows you to set the time freely. But the interface is a bit awkward and it's locked behind research, which I don't like.
So this would be nice when it's done.
Quote from: BlackSmokeDMax on October 04, 2016, 02:45:26 PM
Are there concrete resting hours, or does that change per latitude? If they don't vary, it'd be nice if there was a pre-set button for those hours.
As I know, they're always the same - 19pm-5am.
Ah, yes, I didn't have saving in there yet. It's implemented now.
I'm not sure about having a built-on day/night option. I think, design-wise, it's better for people to figure that out on their own, or look it up.
Also, this is gated behind research right now. That's easy to change, though--you can remove that from the defs. Question, then, for everyone: Should I gate it behind research (just microelectronic basics and and specific research), or not?
Current download w/ saving: http://merthsoft.com/TimerSwitches_2.zip (http://merthsoft.com/TimerSwitches_2.zip)
You're missing the abstract BuildingBase and have some quirky sentence structures in there. I hope you don't mind, I made some very slight changes to reduce redundancy and fix the missing base (see the attachment). The only thing you have left to do is recolour the On/Off buttons and their respective tiles because the colours are too similar, otherwise I think you can release this. It's so good!
[attachment deleted by admin - too old]
Thanks! I appreciate the help :)
What colors do you see? I see brown and grey:
(http://i.imgur.com/mfav3oR.png)
Specifically, I'm using the same colors as the Anything and Work buttons on the restrict tab, to make it consistent:
public static Texture2D OffColor => TimeAssignmentDefOf.Anything.ColorTexture;
public static Texture2D OnColor => TimeAssignmentDefOf.Work.ColorTexture;
Brown and grey are way too similar in the colour range IMO, but I might be over-sensitive. I recommend something like blue/grey for sharp contrast.
How's this:
(http://i.imgur.com/kc1Aat0.png)
I like it more!
(https://static-cdn.jtvnw.net/emoticons/v1/64138/3.0)
Dope! Here's the most up-to-date version:
http://merthsoft.com/TimerSwitches_3.zip (http://merthsoft.com/TimerSwitches_3.zip)
Will upload on Steam and make a "Finished" thread probably tomorrow. Wanna test it a bit more to make sure it's robust enough :)
Also, I think I got all your changes in there, but forgive me if I missed any--just let me know!
Released! https://ludeon.com/forums/index.php?topic=26661.0 (https://ludeon.com/forums/index.php?topic=26661.0)