Basic Game Time + Night/Day Script Tweak - Changing one variable

Hi, I was wondering if anyone knew how to tweak this script. Currently it's set so that you have to write the map ID that you DON'T want the night/day cycle to run but I feel like it's easier and makes more sense to have it so you write the map ID for those you DO want the cycle to run. Is there an easy way to tweak the script to do this?

Here's the script.
lines 148 to 154
Code:
for i in NOTINTMAPS
 if $game_map.map_id == i
  $game_map.screen.start_tone_change(Tone.new(0,0,0,0),0)
  return
 end
end

replace the bulk by
Code:
$game_map.screen.start_tone_change(Tone.new(0,0,0,0),0) if NOTINTMAPS.include?($game_map.map_id)

use the array NOTINTMAPS to write the IDs.
you can also do a full replace of NOTINTMAPS for TINTMAPS, for clarity, if you want.

I wouldn't use that script, though.
it looks like it would generate a lot of lag, based on how it's written.
Thank you. Hmm, really? I haven't tested it yet and my game is already pretty heavy so it might be a bad idea then. Do you know of any other day/night scripts by chance? I know there were a lot more in the XP days, I can't seem to find anything substantial even with a Google search.
I'm not so fond of plugins. I made my own daylight system, first by eventing and then by coding.
you *can* make a daylight system with plain eventing, there's tutorials for that.
I'm very familiar with eventing so I could definitely make what I need that way. That might be the way to go then. A constant parallel process like that wouldn't generate more lag than a script?
not necessarily.
you only need the parallel process to add up seconds (or hours), not to handle the whole thing.
it shouldn't cause noticeable lag until it goes to fade the screen tone.

also, if you use a script call like the one I posted, you'd always run one fade where the answer to the condition is "true" regardless of what the condition is.
the original script would run like this:
Code:
-is 1 equal to 2?
-no
-do nothing.

-is 1 equal to 5?
-no
-do nothing.

-is 1 equal to 25?
-no
-do nothing

(.... N times...)

-is 1 equal to 1?
-yes
-run the tone change.

the short script call is something like this:
Code:
-does *this array* contain *this variable* anywhere
-yes
-run the tone change.

which would be the same even without the .include? function:
Code:
- [*this array*] n [*this one variable*]  #set intersection
- results [*this one variable*]  #result, as opposed to no result
- run the tone change

TLDR: you don't need loops
Cool, thank you for the help. I made a quick evented version to see what it was like and it works pretty nicely. The only thing I'm wondering is how to handle it when you go into, say, a cave and it's already darker in there, and then when you come back out it resumes where the day/night event left off. I suppose I'll have to figure something out for that.

Original thread: https://forums.rpgmakerweb.com/threads/basic-game-time-night-day-script-tweak-changing-one-variable.93911/