Page 1 of 1

Change surface minimum darkness %

Posted: Thu Feb 21, 2019 6:09 am
by blankdiploma
Currently, the minimum darkness of a surface is hard-coded to be 85% at the deepest part of the night, calculated by time-of-day.

I am writing a mod that implements underground surfaces, and thus I would like to be able to force significantly deeper darkness.

If the override value is simply "How dark is it at evening-o-clock?" and I need to freeze the time of day on the surface, that's obviously fine.

Re: Change surface minimum darkness %

Posted: Thu Feb 21, 2019 2:56 pm
by Rseding91
I've looked into this before and got stuck on the fact that the darkness % effects solar panels directly - not just visual.

I'll see again but I don't remember it being something easy to work around.

Re: Change surface minimum darkness %

Posted: Thu Feb 21, 2019 7:48 pm
by blankdiploma
I mean, it's perfectly fine that this directly affects solar panels - I want to make the underground extremely dark, which should also naturally make solar panels next-to-useless. I don't want placing solar panels underground to be a viable source of energy :)

So that sounds just fine to me!

Re: Change surface minimum darkness %

Posted: Fri Feb 22, 2019 1:22 am
by BenSeidel
Yes, but you don't want your solar panels to produce negative power, as it could do when it goes an extra 15% below it's "zero" point.

Re: Change surface minimum darkness %

Posted: Fri Feb 22, 2019 1:43 am
by blankdiploma
I mean, sure. On the other hand, power_output = max(power_output, 0) isn't exactly a MENSA brain teaser :D

Re: Change surface minimum darkness %

Posted: Mon Mar 11, 2019 2:16 pm
by Boodals
I added this (I have source access). It is in a version that was released recently.