-- [CONCEPT] --
Weathermod is a mod based on the gimmick of Touhou project 10.5/12.3, reproducing the weather system of those games but on a kart racer.
When the race starts, the timer decrements until it reachs 0 and activate the current weather shown on the top screen, then the timer increments until it reachs his max value set and disables the weather and the cycle repeat

Each weather has a different effect, the weather changes when the active effect stop or when a player get hit by orbinaut/jaws, blown up or squished


-- [LIST OF WEATHERS] --
------------------------------------------------------
1. Sunny 		| Players got increased speed
2. Snowy		| Players had ice physics
3. Earthquake	| Grounded items will bounce off the ground
4. Lunar		| Gravity is lower for Players
5. Dimension	| Players get their size increased
6. Typhoon	| Players get permanent flashtics, hazards and items won't hurt them
7. Windy		| Charges boost in mid-air and unleashs when they hit the ground
8. Sunset		| Drifting gives boost to Players
9. Twinkle star	| Getting an item will double his amount
10. Rain		| Players lose their item or powerup if they got hit
11. Tempest	| Send Players to the air when they got hit
12. Thunderstorm	| The thunder shield shock will trigger if the Player got hit
13. Blood moon	| Bumping others with a higher speed than them will cause spinout
14. Mountain vapor| Hides Player's item slot
15. Sandstorm	| Drift sparks came out faster
16. Cloudy	| Pickups only give a single type of item (banana, sneaker...)
17. Blue sky	| Driving become weirder
18. Aurora	| Award boost if the Player hit someone
19. Night		| Screen became darker
20. Pressure	| The faster player squishs other in contact + get squished when landing while spinning
21. Hail		| Ice rocks fall from the sky
22. Comet		| Increase the size of throwable items (except eggbox)
------------------------------------------------------
In encore mode, weathers effect can be changed or amplified
NOTICE: Lunar, Typhoon and Rain will never trigger on battle mode


-- [CVARS] --
All cvars are for admin only

weathermod [on/off]: Toggles this mod
(default: on)

weathermod_increment [number]: Sets how fast the timer goes during the active weather
(default: 15)

weathermod_decrement [number]: Sets how fast the timer goes during the inactive weather
(default: 15)

weathermod_maxtime [number]: Sets the maximum time used to turn off the active weather when reached
use this cvar if you want to both change weathermod_increment and weathermod_decrement
(default: 9999) (~18 seconds)
NOTICE: the timer shown on the top screen is this value divided by 100 (without the units shown)
(for Ex: 9999 will show 99,9 on the HUD)

weathermod_hell [percentage]: Set the chance of getting a hell weather on change
(default: 5)

weathermod_encore [on/off/force]: Toggles the encore variant of weathers on encore mode, setting this on force will also occur on normal races and battle
(default: on)

weathermod_order [on/off]: When on, the next weather will follow the order of the list seen above instead of picking a another one randomly
(default: off)
NOTICE: turining on this disables hell weathers

weathermod_force [weather name]: Force the activation of the weather typed (check list of weathers for names)
type "weathermod_force off" or any invalid value to toggle this off
type "weathermod_force random" to get a random weather
(default: off)

weathermod_keepforced [on/off]: Keep the same forced weather on map change if on
(default: off)

weathermod_visible [on/off]: this shows the weather selected on the top of screen, toggeling this off will not show the current weather triggered and also not change the background sky of the map
(default: on)

weathermod_dynamic [on/off]: if on, weather will can change during the active portion
(default: off)

weathermod_toggle [weather name]: Toggles on or off the weather specified, weathers that has been turned off will not show during play


-- [FOR MAP MAKERS/SOC] --
A SOC line can be added on your level header, this prevents some weathers to be triggered on cause issue (or become useless) on your map:
- "Lua.Removewheather = lunar, windy"
This exemple below will remove lunar and windy
Test your maps with some weathers too see witch ones you have to remove (use "weathermod_force" for this)

Cases of using this:
- Lunar can overshoot people on ramps/springs can make some parts unbeatable
- Encore variant dimension can make steepy slopes act like walls and vertival winds sections will badly work, or your map is too hellish to play with X2 size
- Lunar and windy become useless if your map has no ramps/springs
- Snowy is useless if your map is filled with ice physics


-- [KNOWN ISSUES] --
- Replays can desync and pick the wrong weather, this is mostly because the replays hates randoms functions, you can overcome this issue by using "weathermod_force" if you remeber witch weather got triggered during replay

--[NOTES]--
On the day i release the V2 update, that means i'm no longer part of the srb2kart community and i will no longer push further updates for my mods