// Uphoenixwether start
var gameTimeDays : Int32;
var gameTime : GameTime;
var gameTimeHours : Int32;
var envID : Int32;
var gameTimeHoursint : Int32;
var gameTimeHoursh : Int32;
var Uphoenixwether : CEnvironmentDefinition;
var envclod : C2dArray;
var world : CGameWorld;
var template : CEntityTemplate;
var resourcePath : String;
gameTime = theGame.CalculateTimePlayed();
gameTimeHours = (GameTimeDays(gameTime) * 24 + GameTimeHours(gameTime));
gameTimeHoursint = 80;
// if (gameTimeHours > gameTimeHoursint)
// {
// gamet = (gameTimeHours / gameTimeHoursint); 1.5
// gameTimeHours = gameTimeHours - ((gameTimeHours / gameTimeHoursint)-(gameTimeHours * gameTimeHoursint));
// }
if (gameTimeHours > 1 || gameTimeHours < 2)
{
envclod = LoadCSV("dlc\dlcuphoenix\data\environment\wether\novigrad_autumn.csv ");
Uphoenixwether = (CEnvironmentDefinition)LoadResource( "dlc\dlcuphoenix\data\environment\definitions\ureal\ureal_novigrad_autom.env", true );
envID = ActivateEnvironmentDefinition(Uphoenixwether, 1000, 1, 1.f);
theGame.SetEnvironmentID(envID);
}
else if (gameTimeHours >= 2 || gameTimeHours < 4)
{
envclod = LoadCSV("dlc\dlcuphoenix\data\environment\wether\novigrad_cold.csv ");
Uphoenixwether = (CEnvironmentDefinition)LoadResource( "dlc\dlcuphoenix\data\environment\definitions\ureal\env_novigrad_cold.env", true );
envID = ActivateEnvironmentDefinition(Uphoenixwether, 0900, 1, 1.f);
theGame.SetEnvironmentID(envID);
}
else if (gameTimeHours >= 4 || gameTimeHours < 5)
{
DeactivateEnvironment(envID, 1000);
envclod = LoadCSV("dlc\dlcuphoenix\data\environment\wether\novigrad_cold.csv ");
Uphoenixwether = (CEnvironmentDefinition)LoadResource( "dlc\dlcuphoenix\data\environment\definitions\ureal\env_novigrad_cold.env", true );
envID = ActivateEnvironmentDefinition(Uphoenixwether, 0900, 1, 1.f);
theGame.SetEnvironmentID(envID);
}
else if (gameTimeHours >= 5)
{
DeactivateEnvironment(envID, 1000);
DeactivateEnvironment(envID, 0900);
}
resourcePath = envclod.GetValueAt(0, 0);
template = (CEntityTemplate)LoadResource(resourcePath, true);
// Uphoenixwether end
theSound.LeaveGameState(ESGS_Movie);
theSound.SoundEvent("system_resume");
if(ShouldProcessTutorial('TutorialStash') && FactsQuerySum("tut_stash_fresh_playthrough") <= 0)
{
tut.type = ETMT_Message;
tut.tutorialScriptTag = 'TutorialStash';
tut.canBeShownInMenus = false;
tut.glossaryLink = false;
tut.markAsSeenOnShow = true;
theGame.GetTutorialSystem().DisplayTutorial(tut);
}
}