Author Topic: Working day and night mod  (Read 3937 times)

This is possible. I have a copy but it crashes people. I wish I had one that does not crash people occasionally when the sky changes. Any good scripter wanting to help I may be able to PM you the existing one if amade lets me.

« Last Edit: February 03, 2010, 07:59:12 PM by Kalphiter »


I think it's a good idea.



I tried using a day and night script that cycles through times every 2 minutes. It has Onday events and such. I didn't use the map that came with it though. I tried making lights to simulate the sun, like a sun light that is really bright. Can someone make me custom lights that simulate a sun, mine are terrible.


I made a map that goes from sky blue to black, and back again

I found these lines in the script. One of these must be causing the crash.
Code: [Select]
case 1: makeSky("0.3 0.4 0.5","0.3 0.4 0.5"); makeSun("0.4 0.4 0.35","0.25 0.25 0.25"); //Dawn
Code: [Select]
function MakeSky(%color, %fog)
{
   sky.delete();
   new Sky(Sky)
   {
      position = "336 136 0";
      rotation = "1 0 0 0";
      scale = "1 1 1";
      materialList = "base/data/skies/Sky_Default/resource.dml";
      cloudHeightPer[0] = "0.349971";
      cloudHeightPer[1] = "0.3";
      cloudHeightPer[2] = "0.199973";
      cloudSpeed1 = "0.0005";
      cloudSpeed2 = "0.001";
      cloudSpeed3 = "0.0003";
      visibleDistance = "600";
      fogDistance = "500";
      fogColor = %fog;
      fogStorm1 = "0";
      fogStorm2 = "0";
      fogStorm3 = "0";
      fogVolume1 = "0 0 0";
      fogVolume2 = "0 0 0";
      fogVolume3 = "0 0 0";
      fogVolumeColor1 = "128.000000 128.000000 128.000000 -222768174765569860000000000000000000000.000000";
      fogVolumeColor2 = "128.000000 128.000000 128.000000 0.000000";
      fogVolumeColor3 = "128.000000 128.000000 128.000000 -170698929442160050000000000000000000000.000000";
      windVelocity = "0 0 0";
      windEffectPrecipitation = "1";
      SkySolidColor = %color;
      useSkyTextures = "0";
      renderBottomTexture = "1";
      noRenderBans = "1";
      locked = "true";
   };
   MissionGroup.add(Sky);
}
Code: [Select]
function MakeSun(%color, %ambient, %az, %ele)
{
   sun.delete();
   new Sun(Sun)
   {
      azimuth = %az;
      elevation = %ele;
      color = %color;
      ambient = %ambient;
      rotation = "1 0 0 0";
      locked = "true";
      scale = "1 1 1";
      direction = "0.57735 0.57735 -0.57735";
      position = "0 0 0";
   };
   missionGroup.add(Sun);
}
These are just snips.

Because you're not supposed to do this.

Code: [Select]
      fogVolumeColor1 = "128.000000 128.000000 128.000000 -222768174765569860000000000000000000000.000000";
      fogVolumeColor2 = "128.000000 128.000000 128.000000 0.000000";
      fogVolumeColor3 = "128.000000 128.000000 128.000000 -170698929442160050000000000000000000000.000000";

Is that even possible?



Edit: I got the one strat linked to but it does not update the sky or sun or re light the scene.
« Last Edit: February 04, 2010, 05:28:18 PM by heedicalking »