Crossfire Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CF: light bug?




> > be separate, since some "inside" maps (apartments, inns, taverns,
> > shops...)  will be daylight-adjusted, but they will not have weather
> 
> 	Ah. Good point. BTW, dont forget about the phases of 
> 	
> 	the moon! Nominally, I would think a full moon would
> 	be pretty decent light conditions (in clear night).
> 	You can read by the light of a full moon.

Hm... I never considered taking the moon into account. I wanted to
add some luck adjustment based on the moon (nethack style :-)),
but right now I don't consider it for daylight adjustment. Maybe
later --- such things are easy to add.

> Also,
> 	I wouldnt think that complete darkness (level 5)
> 	is allowable under most natural conditions. To get
> 	that dark outside, you would need something like
> 	serious fog on a new moon night.

Well, I'll try to explain how I'm implementing things right now.
First of all, there is a new "MapDarkness", which is the "base" darkness
of the map. Daylight and nightfall spells modify this value.
The darkness (mapstruct->darkness) is calculated from the MapDarkness
and the time of day, "full day" results in an effective darkness
of "MapDarkness", "full night" results in an effective darkness
of "min(MAX_DARKNESS,MapDarkness+3)". Thus, most maps will get darkness 3
at full night, which ensures that newbies without dark/xray vision
or daylight spells can still see something. Maps that start with a base
darkness of 2 get darkness 5 at night; I'm still thinking about using
a non-linear scale, although I don't think this is a problem right now
(since all world/inn/shops etc. have base darkness 0 anyway).

The idea is that maps that start darker than usual (maybe we'll get some
"shadow island" or something) will also get darker nights.

Note that this makes the daylight/nightfall spells quite powerful; the
way things are implemented now even lets you disable daylight
adjustment via the daylight spell (since the MapDarkness has an
effective range of -3..MAX_DARKNESS). But these spells are complicated
to handle properly, since you don't want to loose the effect of the
spells when the daylight changes (in 0.94.2, these spells last forever,
i.e. until the map is reset).

Christian
[to unsubscribe etc., send mail to crossfire-request@ifi.uio.no]