//Uphoenixwether start
public function Uphoenixweather()
// event OnAfterLoadingScreenGameStart()
{
var gameTimeDays : Int32;
var gameTime : GameTime;
var gameTimeHours : Int32;
var envID : Int32;
var gameTimeHoursint : Int32;
var gameTimeHoursh : Int32;
var Uphoenixweather : CEnvironmentDefinition;
var environmentRes : Int32;
var weatherTemplate : C2dArray;
// var template : CEntityTemplate;
var resourcePath : C2dArray;
// var l_weather : CName;
// var grassMask : CGenericGrassMask;
// var foliageScene : CFoliageScene;
gameTime = theGame.CalculateTimePlayed();
gameTimeHours = (GameTimeDays(gameTime) * 24 + GameTimeHours(gameTime));
gameTimeHoursint = 80;
theGame.GetGuiManager().ShowNotification("UpdateUphoenixweather:");
if (thePlayer.uphoenixweathercount <= 0.0)
{
thePlayer.SetUphoenixweather(85);
}
thePlayer.AddTimer('UpdateUphoenixweather', 1, true);
/// if (gameTimeHours > 1 && gameTimeHours < 35
/// || gameTimeHours > 100 && gameTimeHours < 135 )
if (thePlayer.uphoenixweathercount > 1 && gameTimeHours < 35)
{
resourcePath = LoadCSV("dlc\dlcuphoenix\data\environment\wether\novigrad_autumn.csv ");
Uphoenixweather = (CEnvironmentDefinition)LoadResource( "dlc\dlcuphoenix\data\environment\definitions\ureal\ureal_novigrad_autom.env", true );
envID = ActivateEnvironmentDefinition(Uphoenixweather, 1000, 1, 1.f);
theGame.SetEnvironmentID(envID);
}
else if (thePlayer.uphoenixweathercount > 35 && gameTimeHours < 80)
// else if (gameTimeHours > 35 && gameTimeHours < 80
// || gameTimeHours > 135 && gameTimeHours < 180 )
{
Uphoenixweather = (CEnvironmentDefinition)LoadResource( "dlc\dlcuphoenix\data\environment\definitions\ureal\cold\env_cold.env", true );
envID = ActivateEnvironmentDefinition(Uphoenixweather, 1001, 1, 1.f);
theGame.SetEnvironmentID(envID);
UpIceBreathEnable();
if(!UpisCold())
{
RandomUphoenixweather();
}
}
else if (thePlayer.uphoenixweathercount > 80 && gameTimeHours < 100)
/// else if (gameTimeHours > 80 && gameTimeHours < 100
/// || gameTimeHours > 180 && gameTimeHours < 200 )
{
DeactivateEnvironment(envID, 1000);
resourcePath = LoadCSV("dlc\dlcuphoenix\data\environment\wether\novigrad_spring.csv ");
Uphoenixweather = (CEnvironmentDefinition)LoadResource( "dlc\dlcuphoenix\data\environment\definitions\ureal\cold\env_spring.env", true );
envID = ActivateEnvironmentDefinition(Uphoenixweather, 1002, 1, 1.f);
theGame.SetEnvironmentID(envID);
}
else if (thePlayer.uphoenixweathercount > 100)
/// else if (gameTimeHours > 100)
{
DeactivateEnvironment(envID, 1000);
DeactivateEnvironment(envID, 1001);
DeactivateEnvironment(envID, 1002);
}
World.environmentParameters.weatherTemplate = resourcePath;
}
public function RandomUphoenixweather()
{
var newWeather : name;
var currentWeather : EWeatherEffect;
var currentArea : EAreaName;
var Rand : int;
Rand = RandRange(1, 4);
currentArea = theGame.GetCommonMapManager().GetCurrentArea();
currentWeather = GetCurWeather();
if (Rand = 1)
{
RequestWeatherChangeTo( 'WT_Snow', 300, false );
}
else if(Rand = 2)
{
RequestWeatherChangeTo( 'WT_Blizzard', 300, false );
}
else if(Rand = 3)
{
RequestWeatherChangeTo( 'WT_Clear', 300, false );
}
else if(Rand = 4)
{
RequestWeatherChangeTo( 'WT_Rain_Storm', 300, false );
}
}
}