Created
October 23, 2018 01:22
-
-
Save Bluscream/b7fa18cb6b935ecadc2a19bbad022ec5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SETLOCAL ENABLEEXTENSIONS | |
if not exist "mod\Data" mkdir "mod\Data" | |
if not exist "mod\Data\def" mkdir "mod\Data\def" | |
set /A contor=1 | |
IF EXIST "mod\SEASON - CURRENT.scs" ( | |
set /A contor=contor+1 | |
) | |
IF EXIST "mod\SEASON - Spring.scs" ( | |
set /A contor=contor+1 | |
) | |
IF EXIST "mod\SEASON - Summer.scs" ( | |
set /A contor=contor+1 | |
) | |
IF EXIST "mod\SEASON - Autumn.scs" ( | |
set /A contor=contor+1 | |
) | |
IF EXIST "mod\SEASON - Winter.scs" ( | |
set /A contor=contor+1 | |
) | |
if %contor% leq 4 ( | |
echo Missing mod! [%contor%] | |
Pause | |
exit | |
) | |
IF EXIST "mod\SEASON - CURRENT.scs" ( | |
IF not EXIST "mod\SEASON - Spring.scs" ( | |
move "mod\SEASON - CURRENT.scs" "mod\SEASON - Spring.scs" | |
) | |
IF not EXIST "mod\SEASON - Summer.scs" ( | |
move "mod\SEASON - CURRENT.scs" "mod\SEASON - Summer.scs" | |
) | |
IF not EXIST "mod\SEASON - Autumn.scs" ( | |
move "mod\SEASON - CURRENT.scs" "mod\SEASON - Autumn.scs" | |
) | |
IF not EXIST "mod\SEASON - Winter.scs" ( | |
move "mod\SEASON - CURRENT.scs" "mod\SEASON - Winter.scs" | |
) | |
IF EXIST "mod\SEASON - CURRENT.scs" ( | |
del "mod\SEASON - CURRENT.scs" | |
) | |
) | |
for /f %%i in ('cmd /c wmic path win32_localtime get dayofweek^|findstr [0-9]') do set /A dayofweek=%%i | |
For /f "tokens=1-2 delims=/:" %%a in ('time /t') do set mytime=%%a | |
set /A dayofweek=%dayofweek% | |
for /f "tokens=* delims=0" %%N in ("%mytime%") do set "n=%%N" | |
if not defined n set "n=0" | |
REM set /A dayOfYear=%dayofweek%*5214/100+%n%*217/100 | |
set /A dayOfYear=295 | |
set /A summer_time=0 | |
set /A season=0 | |
if %dayOfYear% leq 59 ( | |
set /A season=0 | |
) | |
if %dayOfYear% geq 60 ( | |
set /A season=1 | |
) | |
if %dayOfYear% geq 150 ( | |
set /A season=2 | |
) | |
if %dayOfYear% geq 240 ( | |
set /A season=3 | |
) | |
if %dayOfYear% geq 330 ( | |
set /A season=0 | |
) | |
if %dayOfYear% geq 88 ( | |
set /A summer_time=1 | |
) | |
if %dayOfYear% geq 302 ( | |
set /A summer_time=0 | |
) | |
echo mytime: %mytime% | |
echo dayofweek: %dayofweek% | |
echo dayOfYear: %dayOfYear% | |
echo n: %n% | |
echo season: %season% | |
echo summer_time: %summer_time% | |
PAUSE | |
if %season% equ 0 ( | |
cp "mod\SEASON - Winter.scs" "mod\SEASON - CURRENT.scs" | |
) | |
if %season% equ 1 ( | |
cp "mod\SEASON - Spring.scs" "mod\SEASON - CURRENT.scs" | |
) | |
if %season% equ 2 ( | |
cp "mod\SEASON - Summer.scs" "mod\SEASON - CURRENT.scs" | |
) | |
if %season% equ 3 ( | |
cp "mod\SEASON - Autumn.scs" "mod\SEASON - CURRENT.scs" | |
) | |
@echo SiiNunit > "mod\Data\def\env_data.sii" | |
@echo { >> mod\Data\def\env_data.sii | |
@echo env_profile : env.data {>> mod\Data\def\env_data.sii | |
@echo lamps_on_elevation: 2.0>> mod\Data\def\env_data.sii | |
@echo day_in_year: %dayOfYear% >> mod\Data\def\env_data.sii | |
@echo summer_time: %summer_time% //+1 hour>> mod\Data\def\env_data.sii | |
@echo }>> mod\Data\def\env_data.sii | |
@echo }>> mod\Data\def\env_data.sii | |
echo Finished setting season! | |
PAUSE | |
rem start /max /d"c:\Program Files\Euro Truck Simulator 2\bin\win_x86\" eurotrucks2.exe | |
rem start /max /d"c:\Program Files\Euro Truck Simulator 2\bin\win_x64\" eurotrucks2.exe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment