Light

Light governs how the world appears during its day/night cycle. It is mostly used to determine the Yin Yang modifier during a breakthrough, as a factor when establishing a Shendao's Divine Realm and for a Body Cultivator's Breathing, and it also has a minor effect on some plants growth speed as well as on moodlets.

The game differentiates between the tile light which takes into account nearby light sources, and the map light based only on ambient lighting so be mindful of the one you need to consider.

## Map or Ambient Light

Ambient light varies from day to day with fixed points, with its minimal and maximal values set by the game biome, by default 10 to 100. It is always minimal from midnight to 1 hour before sunrise, maximal from 12:00 (12PM) to 14:00 (2PM), then again minimal from 2 hours after sunset to midnight . In-between, it also varies depending on when the sun rises and sets.

#### Effect of the day length

The sun rising and setting hours vary across the year, with fixed points as well :

* On the first day of spring, the sun rises at 6:51 and sets at 17:09 (5:09PM).
* In the middle of summer (Summer 15), the length of the day maxes out with the sun rising at 4:30 and setting at 19:30 (7:30PM).
* In the middle of winter (Winter 15), the length of the day is minimal with the sun rising at 7:00 and setting at 17:00 (5:00PM).
* On new year, the sun rises at 6:51 and sets at 17:09 (5:09PM).

The length of the day varies between these fixed points. The light is always minimal 1 hour before sunrise and 2 hours after sunset.

#### Weather effects

Ambient light is also affected by some weather effects, which usually multiply ambient lighting by a factor (`LightAddP`). See the Weather events page for a detailed list.

## Tile Light

The tile light level changes based on nearby lamps and other light sources. Note that a lamp still gives off its light even if its sprite shows an unlit item. If outside, the minimum tile light is set at the current ambient lighting, and half of that in a room.

Lighting happens in a Square Range from the light source.

## Breakthrough (Yin-Yang)

### Light and Yin-Yang relationship

The Map (ambient) Light plays an important role during Breakthroughs, where it is called the "yin-yang" factor. This has nothing to do with the light given off by the Lamps in the room, which doesn't have any impact. Different Elements require different amounts of Light to obtain the highest bonus. When computing Golden Core Quality, +5 equals a multiplier of 1.2, None equals a multiplier of 1, and -5 equals a multiplier of 0.8 . For standard breakthroughs, -5 equals -4% breakthrough chances while +5 is +4% .

While a negative light is not possible, there is no upper bound to the multiplier so Drought / Clear Skies - possibly triggered by the Cloud Dispelling Miracle or Lushu as Spirit Contract, will still improve multiplier during daylight, for a maximum multiplier of 1.32 during drought and 1.28 during Clear Skies.

* Fire and Wood: Light as high as possible
	+ -5 at 0
	+ None at 50
	+ +5 at 100
* Water and Metal: Light as low as possible
	+ +5 at 0
	+ None at 50
	+ -5 at 100
* None and Earth: Light equal to 50
	+ The positive light effect is double compared to other elements, and it is impossible to get a negative effect without Drought or Clear skies on full sunlight.
	+ The best way to maintain a positive multiplier over long periods of time is by starting in the morning, using the Yin Yang Stela once the sun rises above 63 Light, then immediately after the Cloud Dispelling Miracle (or the Lushu one).
	+ 1.4 multiplier or +8% breakthrough chance at 50 (equivalent to +10)
	+ 1.2 multiplier or +4% breakthrough chance at 75 and 25 (equivalent to +5)
	+ 1 multiplier at 0 and 100 (equivalent to None)

### Season variation

As the duration of sunlight varies across the year, seasons apply a small correction to the yin-yang factor at sunset and sunrise. See the tables below for details. The Golden Core yin-yang breakthrough is equal to

1
5
∗
B
r
e
a
k
t
h
r
o
u
g
h
C
h
a
n
c
e

{\displaystyle 1+ 5 \* BreakthroughChance}

, with BreakthroughChance used as a fraction. For example, with a Fire law on 6 spring at 4 AM, it would be equal to 0.84.

#### Fire and Wood Laws

Fire and Wood laws will benefit from high light and prefer days with sunlight lasting longer.

#### Water and Metal Laws

Water and Metal laws will benefit from low light and prefer days with shorter sunlight.

#### Earth and None Law

Earth and None laws bonus are the more complex cases since they prefer twilight hours, and as their bonus is higher it might be worth paying particular attention to it.

## References

1. ↑ 1.0 1.1 1.2 `XiaoWorld.WeatherMapData.ChangeDay()`
2. ↑ `Settings/Biomes/BiomeBase.xml`
3. ↑ `XiaWorld.WeatherMapData.GetLight()`
4. ↑ `Settings/Weather/Weather.xml` & `Settings/Weather/Weather_Special.xml`
5. ↑ `XiaoWorld.Map.GetLight()`
6. ↑ 6.0 6.1 `XiaWorld.NpcPractice.GetLightEffectBroken`
7. ↑ `Wnd_BrokenNeck.OnUpdate() [case 5]`
8. ↑ `XiaWorld.NpcPractice.LightEffectGold`