Alright, so, to make a looooong story short, I've created a mod for CS that'll let you add fadein (that you can toggle on or off for certain scenes) to your game and switch background and text color on the fly without having to write any extra code for it. In addition, since it's CS variable based, it works alongside CJW's smPlugin.js without a hitch and keeps previous settings (coincidentally that was the entire reason I made this, to work with smPlugin).
To install it, download and replace your scene.js file with the modded one here and download and add this fade.css file into the same directory where style.css is. After that's done, you'll need to edit the index.html file in your mygame folder with Notepad and add two lines to activate the mods:
Add this line (of course, take out the space between the "<" and "link id=" etc. otherwise it won't work):
< link id="fade" href="../fade.css" rel="stylesheet" type="text/css">
Right after this line here:
< link href="../style.css" rel="stylesheet" type="text/css">
All the way at the bottom of the file, add this line (again, remove the space between the "<" and "body id=" etc.):
< body id="body">
Right before this bit here:
< p>If you can't get the game to work, please write to us at
< a href="mailto:email@example.com">firstname.lastname@example.org for assistance.< /p>
Once you've done that, Congrats! You've installed the mod, now here's how to use it, (and because reasons) this section will be titled:
Malebranche's Mod Manual (V 1.2)
Since this mod works the way it does, in your startup.txt you'll need to *create 4 extra variables, these are:
*create scenecolor ""
*create scenecolor2 ""
*create togglescenefade false
*create scenefadetime "[Insert the number of seconds you want it to take to fadein]s"
(Note: The "s" is not a typo, that needs to be there for it to work, to if you wanted it to take 10 seconds for the text to fadein you'd create fadetime as *create fadetime "10s")
How to change colors:
scenecolor and scenecolor2 effect the text color and background color of your regular scene files respectively (scenecolor controls background color and scenecolor2 text color). If you leave them blank as they are, they'll simply inherit the CS default colors from within style.css, so no harm done if you want to leave them alone. If you want to change colors you simply need *set scenecolor and scenecolor2 to the equivalent hexcolor values of the colors you want (for example if you *set scenecolor "#000000" (the hexcolor value for black) and *set scenecolor2 "#FFFFFF" (the hexcolor value for white) you'd get white text on a black background). Want to revert back to CS defaults? Simply *set scenecolor and scenecolor2 back to just "" 's and you're good to go.
How to activate fading:
As was mentioned before, *set scenefadetime to the number of seconds you want it to take to fadein (Note: you can also change this as you please, so you need not stick with "10s" or "5s" fadein for the entirety of your game) and *set togglescenefade true to activate fading. If you only want fading for a certain scene, simply *set togglescenefade back to false and Fadebegone!
Isolating Color and Fade Schemes for Stats Screen and Regular Scenes:
In order to use this functionality, you'll need to *create 5 more variables in addition to the ones aforementioned, these 5 are:
*create isolateschemes false
*create statscreencolor ""
*create statscreencolor2 ""
*create togglestatscreenfade false
*create statscreenfadetime ""
These variables work EXACTLY the same as their "scene" counterparts, only they will apply settings to the stats screen. However, in order for the mod to apply these, the switch (the variable "isolateschemes") needs to be set to on, or, in our case, true. If isolateschemes is set to false (or not even created at all), the stat screen will simply inherit the scheme you've set for the regular scenes, effectively letting you turn the feature on and off at will throughout your game.
Hope you can use it! Let me know if it works as intended (EDIT AS OF V1.2: it should, since I tested it on my end without a hitch).