What permissions do you give others to modify and/or maintain your submission?
Modify: YES - Maintain: YES - I give permission for my entire submission to be modified by others or used in their own work. I give permission for my entire submission to be maintained by others as well.
I made sure my file(s) follow the Submissions Guidelines
  1. Yes
Uhhhh... Happy new years, or something.
Huge thanks to Fav for creating this trailer for me.​

So... Yeah. I took WAY too long to finish this, especially given how all that was really needed to be done after the direct aired was about half an hour's worth of work on my end... But uh, it's here now! Yay...?

...My laziness aside, this mod basically just does what it says on the tin, it adds a day & night cycle to SRB2.

Fair warning though, this mod will make your game absolutely chug if you don't have a fairly powerful computer and attempt to use it on a more complex map since it has to update every single sector once per tic whenever the light level's changing, and there's no real way to avoid that.
As of v2.0, @LJ Sonik has made some massive optimizations to the way the lighting system works, making this mod now viable for use in netgames, and usable on weaker computers!

Some levels, namely Greenflower 1 & 2 even have unique music that plays during the night!

There's one more feature within this mod though, as seen within the trailer...

Werehog compatibility!
When loaded alongside DrStephen's Werehog, Sonic will begin to to transform as the moon starts twinkling in the night sky... And when I say Sonic, I mean any Sonic! From Modern to Earless, they all work!

Not sure where else to put this, but if you're running this mod on a server, you can disable werehog transformation with the console command "werehogtransform".
There's a few things within this mod that others are able to hook off of. Might as well explain those here just to make things simple for others.

Adding your sonic to the list of transformable skins:
To add your own sonic to the list of skins capable of turning into The Werehog, just add this bit of code somewhere within your character's scripts. For this example, the character in question is a "modern" sonic, who uses Roger Craig Smith voice lines upon turning back from the werehog. If you wish to use Ryan voice lines, simply replace "Roger" with "Ryan". If you wish to use jason, then don't set anything, as he's the default. Classic characters all use the same voice line, since I doubt anyone really would need their classic sonic to sound like any of the modern VAs, but if someone needs it changed, I could probably do an update at some point.
compat code:
if not classicskins
    rawset(_G, "classicskins", {})
if not nonsonicsonics
    rawset(_G, "nonsonicsonics", {})
if not werehogtransformvoice
    rawset(_G, "werehogtransformvoice", {})

nonsonicsonics["myskin"] = true
classicskins["myskin"] = false
werehogtransformvoice["myskin"] = "roger"

Day/Night Music in your map:
Add this block of code to your map's scripts, and replace the "GFZ" music with the respective file names of your map's songs. "musicshift" is the base music, aka what plays during day, and "musicinvert" is what plays at night.
compat code:
if not musicshift or not musicinvert
    rawset(_G, "musicshift", {})
    rawset(_G, "musicinvert", {})

musicshift["GFZ1"] = "GFZ1N"
musicshift["GFZ2"] = "GFZ2N"

musicinvert["GFZ1N"] = "GFZ1"
musicinvert["GFZ2N"] = "GFZ2"

Preventing time from having an effect on your map:
add "lua.spacemap = true" to your map's header. Main intended use is for, well... space maps, but it can be used for any, really.
One last minor note: If anyone else wishes to contribute night-time remixes of other stages to this mod, you're more then welcome to. That was actually one of the main things holding this back initially, a lack of music, but I just decided it'd be best for it to actually get released and potentially have more tracks added in updates later down the line rather then to just have it rot on my hard drive forever. I'd like to learn how to create music, but currently just don't have the skills to do it myself. If you're at all interested, just shoot me a dm or something.

Frostiikin: Programming, concept
LJ Sonic: Re-code and optimization of the lighting system
ZenithNeko: Music for Greenflower 1 and 2's night variants
BlueBlur: Character icons for transforming to and from the Werehog
Twins 'R Epic: Edited sky textures
Golden Shine: Code used to detect any and all sonics, taken from SMS.
Extension type
File size
2.8 MB
MD5 Hash
First release
Last update
4.40 star(s) 10 ratings

More resources from Frostiikin

Share this resource

Latest updates

  1. minor net fix

    Fixed a bug involving data from prior maps not being properly reset, leading to some occasional...
  2. Optimization Recode (thanks, lj!)

    A complete recode of the lighting system, courtesy of @LJ Sonik! Has significantly better...

Latest reviews

magnificent work
Upvote 0
Love this mod! I think it might break some Super music though. I was playing around with Kirby and the Mario Bros. and when they go super, no music plays at night. Probably because the game tries to call to a nighttime version loop that does not exist since its Super music?
Upvote 0
This + Fall Damage = MAX REALISM
Upvote 0
Great! I like the music too.
But my only complaint is that there's no command for it to always be night.
Upvote 0
Finally Sunset Aris can have a sunset!
But Seriously this mod definitely is going to be one of the srb2 improvements list of mods, it just makes everything beautiful, its a nice touch that theres werehog compatibility and the music changes (also made a great title screen), just really wish the night was a bit less dark, because it makes it look like more of a challenge than an improvement
Upvote 0
good for adding some s p i c e to srb2. reccomened mod!
Upvote 1
Does what it needs to do, but customisability and mod interactivity could be better executed. The system seems to assume every level takes place at day time, which isn't true for both modded levels and the vanilla campaign. It then replaces the sky texture with a series of recolours of Greenflower Zone's sky texture. When night falls, it makes the level even darker than it already is which greatly reduces playability in levels that take place at night time. My suggestion to fix this is to introduce a level header parameter which specifies what time of day the level takes place at, either as an enumeration or an integer correlating to progress through the day cycle (preferably the latter). This would allow the system to adjust the sector brightness changes accordingly. Additionally, allowing the map to define its own textures for various times of day would improve compatibility.
The script currently keeps track of time using two integers: one determining how long until sunset or sunrise, and another determining progress through sunset or sunrise. In order to allow maps to define the precise time of day they take place in it may be necessary to combine these into a single integer and change the appearance of the level depending on its value. A simple way to implement this would be to have it continuously count up from 0 and loop back to 0 upon reaching a certain value, and trigger appearance changes by checking if the number is bigger than a given value.

Another suggestion that would probably be harder to implement: The script currently changes the light level of all sectors indiscriminately. My suggestion is to have it only directly change the brightness of sectors whose ceilings display the sky, and introduce a rudimentary light propagation system to determine the brightness of sectors which don't receive skylight.
Upvote 7
Good thing you have release it before 2023 , Also idk what can i say for your mod because its , good , awsome , Oustanding, AMAZING
Upvote 0
Outstanding Improvement (Also Happy New Year) I Was Seen A Great Year about Them (And its a Great!) I Loved this Mod
Upvote 0
nice pack wallpapers
Upvote 0