Light Level - True Night

For questions relating to POL scripting (not necessarily related to WoD)

Moderators: Siobhan, Sebastian, Drocket

Light Level - True Night

Postby Grae on Mon Aug 18, 2003 3:37 am

Hiya,

Just curious as to what the darkest light level that is allowed by POL. As I would like to darken the nights some to make NightSight (spell & Potion) have more worth, also make better use of torches, candles & lanterns. The way it is at the moment it does'nt get that dark, so the above mentioned hardly get used, if at all. I would like dungeons to be very very dark as they should be.

Also before adjusting light levels is there a way to standardize the light level of the whole world, world wide. So no matter where you are in the map the light level is the same, rather than walk cross the street in a town and its day on one side, cross the street and it's night on the other. Seen this alot on other shards.

To adjust light levels would I edit :- POL\Regions\light.cfg

Code: Select all
# Note, regions found later in the file override those found earlier.

# default, over land and sea, is daylight
LightRegion Background
{
   Range      0 0 5119 4095
   LightLevel   0
}

# Divide the outside world into four time zones. This way darkness
# can pass somewhat gradually across the land.
#LightRegion TimeZone1
#{
#    Range       0 0 1279 4095
#    LightLevel  9
#}
#LightRegion TimeZone2
#{
#    Range       1280 0 2559 4095
#    LightLevel  0
#}
#LightRegion TimeZone3
#{
#    Range       2560 0 3839 4095
#    LightLevel  Daylight
#}
#LightRegion TimeZone4
#{
#    Range       3840 0 5119 4095
#    LightLevel  9   
#}
#
LightRegion CastleBlackthorne
{
    Range       1500 1400  1550 1480
    LightLevel  15
}

# Plunge the dungeons, and green acres, and the new lands (T2A), into darkness
LightRegion Dungeons
{
    Range       5120 0 6143 4095
    LightLevel  20
}


or do I edit :- \POL\pkg\world\daynight\daynight.scr

Code: Select all
use uo;
use os;

Include "include/clock";

var daylight_brightness := GetGlobalProperty ("daylight_level");
if (!daylight_brightness)
   daylight_brightness := 0;
endif

var nighttime_brightness := GetGlobalProperty ("nighttime_level");
if (!nighttime_brightness)
   nighttime_brightness := 20;
endif


program DNCycle ()
   var hour := GetHour();

   while (1)
      daylight_brightness := GetGlobalProperty ("daylight_level");
      if (!daylight_brightness)
         daylight_brightness := 0;
      endif

      nighttime_brightness := GetGlobalProperty ("nighttime_level");
      if (!nighttime_brightness)
         nighttime_brightness := 20;
      endif

      hour := GetHour();
      if ( (hour >= 6) and (hour <= 20) )
         Broadcast ("It is dawn.");
         DawnTransition ();
         SetRegionLightLevel ("Background", daylight_brightness);
         repeat
            sleep(60);
            hour := GetHour ();
         until ((hour < 6) or (hour > 20));
      else
         Broadcast ("It is dusk");
         DuskTransition ();
         SetRegionLightLevel ("Background", nighttime_brightness);
         repeat
            sleep (60);
            hour := GetHour ();
         until ((hour >= 6) and (hour <= 20));
      endif
   endwhile

endprogram

function DuskTransition()

   var lightamt := daylight_brightness;
   while (lightamt <= nighttime_brightness)
      SetRegionLightLevel ("Background", lightamt);
      lightamt := lightamt + 1;
      sleep (3);
   endwhile

endfunction

function DawnTransition()

   var lightamt := nighttime_brightness - 1;
   while (lightamt >= daylight_brightness)
      SetRegionLightLevel ("Background", lightamt);
      lightamt := lightamt - 1;
        sleep (3);
   endwhile

endfunction


What I am after is a true night, but also have the dungeons darker as well (more realistic).

As always, any advice/pointers would be greatly appreciated.

Peace Out.
Grae
Sr. Newbie
 
Posts: 25
Joined: Sat Aug 02, 2003 5:56 am

Postby Drocket on Mon Aug 18, 2003 5:08 am

This is sort of a 2-part answer, because the way that you handle light levels for dungeons is different from the rest of the world. For dungeons, just change the LightLevel setting in light.cfg. I believe that 30 is the darkest setting, and 0 is the brightest. So, to make dungeons the darkest they can possibly be, just change Lightlevel to 30. You'll probably need to restart for it to take effect.

For the rest of the world, you don't need to edit any files at all. When you're logged in as a GM, type:
.light level night #
where # is the level you want night to be set to (20 is standard, 30 is darkest, again.) It'll take a full game-day (until the next in-game night) for it to take effect.
Drocket
Site Admin
 
Posts: 820
Joined: Mon Oct 07, 2002 2:54 am

Postby Grae on Mon Aug 18, 2003 5:30 am

Much appreciated.

Thanks Kindly.

Peace Out.
Grae
Sr. Newbie
 
Posts: 25
Joined: Sat Aug 02, 2003 5:56 am


Return to Scripting Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron