Light source: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
m (Remove confusing statement - radius is not doubled (I think this was a reference to the total diameter))
(separate the query into objects & creatures)
Line 5: Line 5:


== List of Light Sources ==
== List of Light Sources ==
Note that the radius extends outwards. For example, an item with a light radius of 1 lights up its own tile and the 4 tiles directly adjacent to it.
The following items and creatures emit light to the specified radius. Note that the radius extends outwards. For example, an item with a light radius of 1 lights up its own tile and the 4 tiles directly adjacent to it. In addition to these objects, helmets modded with the [[lanterned]] mod also act as light sources.


{{#cargo_query:tables=PhysicalProperties
<div style="display:flex;flex-wrap:wrap;">
|fields=CONCAT('{{((}}favilink page{{!}}',CONCAT(_pageName),'{{))}}')=Light Source,LightRadius=Radius
 
|where=LightRadius IS NOT NULL AND LightRadius > 0 AND _pageNamespace='0'
<div style="margin-right: 2.5em;">
=== Equipment and Objects ===
{{#cargo_query:tables=PhysicalProperties=PP,CreatureFactions=CF,GeneralData=GD
|join on=GD.JoinKey=PP.JoinKey,GD.ObjectID=CF.ObjectID
|fields=CONCAT('{{((}}favilink page{{!}}',CONCAT(PP._pageName),'{{))}}')=Light Source,PP.LightRadius=Radius
|where=PP.LightRadius IS NOT NULL AND PP.LightRadius > 0 AND PP._pageNamespace='0' AND CF.Value IS NULL
|format=table
|format=table
|order by=LightRadius DESC
|group by=GD.JoinKey
|order by=PP.LightRadius DESC,GD._pageTitle
}}
}}
</div>
<div style="margin-right: 2.5em;">
=== Creatures ===
{{#cargo_query:tables=PhysicalProperties=PP,CreatureFactions=CF,GeneralData=GD
|join on=GD.JoinKey=PP.JoinKey,GD.ObjectID=CF.ObjectID
|fields=CONCAT('{{((}}favilink page{{!}}',CONCAT(PP._pageName),'{{))}}')=Light Source,PP.LightRadius=Radius
|where=PP.LightRadius IS NOT NULL AND PP.LightRadius > 0 AND PP._pageNamespace='0' AND CF.Value IS NOT NULL
|format=table
|group by=GD.JoinKey
|order by=PP.LightRadius DESC,GD._pageTitle
}}
</div>
</div>


== See Also ==
== See Also ==
* [[:Category:Light Sources]]
* [[:Category:Light Sources]]

Revision as of 14:32, 1 October 2021

Example light radius of 8

A light source is any item that provides light, revealing objects and creatures in the tiles around it, which would otherwise be obscured in darkness. Tiles beyond their normal radius are not fully illuminated and will not be in color.

Light sources are particularly important for navigating underground or at night.

List of Light Sources

The following items and creatures emit light to the specified radius. Note that the radius extends outwards. For example, an item with a light radius of 1 lights up its own tile and the 4 tiles directly adjacent to it. In addition to these objects, helmets modded with the lanterned mod also act as light sources.

Equipment and Objects

Error 1054: Unknown column 'PP.JoinKey' in 'on clause' (localhost)

Function: CargoSQLQuery::run Query: SELECT CONCAT('{{favilink page|',CONCAT(`PP`.`_pageName`),'}}') AS `Light Source`,`PP`.`LightRadius` AS `Radius` FROM `PhysicalProperties` `PP`,`CreatureFactions` `CF` LEFT OUTER JOIN `GeneralData` `GD` ON ((`PP`.`JoinKey`=`GD`.`JoinKey`) AND (`CF`.`ObjectID`=`GD`.`ObjectID`)) WHERE `PP`.`LightRadius` IS NOT NULL AND `PP`.`LightRadius` > 0 AND `PP`.`_pageNamespace`='0' AND `CF`.`Value` IS NULL GROUP BY `GD`.`JoinKey` ORDER BY `PP`.`LightRadius` DESC,`GD`.`_pageTitle` LIMIT 100

Creatures

Error 1054: Unknown column 'PP.JoinKey' in 'on clause' (localhost)

Function: CargoSQLQuery::run Query: SELECT CONCAT('{{favilink page|',CONCAT(`PP`.`_pageName`),'}}') AS `Light Source`,`PP`.`LightRadius` AS `Radius` FROM `PhysicalProperties` `PP`,`CreatureFactions` `CF` LEFT OUTER JOIN `GeneralData` `GD` ON ((`PP`.`JoinKey`=`GD`.`JoinKey`) AND (`CF`.`ObjectID`=`GD`.`ObjectID`)) WHERE `PP`.`LightRadius` IS NOT NULL AND `PP`.`LightRadius` > 0 AND `PP`.`_pageNamespace`='0' AND `CF`.`Value` IS NOT NULL GROUP BY `GD`.`JoinKey` ORDER BY `PP`.`LightRadius` DESC,`GD`.`_pageTitle` LIMIT 100

See Also