Light source: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
m (excerpt note)
(Fix cargo query errors)
 
Line 14: Line 14:
<div style="margin-right: 2.5em;">
<div style="margin-right: 2.5em;">
=== Equipment and Objects ===
=== Equipment and Objects ===
{{#cargo_query:tables=PhysicalProperties=PP,CreatureFactions=CF,GeneralData=GD
{{#cargo_query:
|join on=GD.JoinKey=PP.JoinKey,GD.ObjectID=CF.ObjectID
tables=PhysicalProperties=PP, GeneralData=GD, CreatureFactions=CF
|fields=CONCAT('{{((}}favilink page{{!}}',CONCAT(PP._pageName),'{{))}}')=Light Source,PP.LightRadius=Radius
|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
|where=PP.LightRadius IS NOT NULL AND PP.LightRadius > 0 AND PP._pageNamespace='0' AND CF.Value IS NULL
|join on=PP.JoinKey = GD.JoinKey, GD.ObjectID = CF.ObjectID
|group by=GD.JoinKey
|order by=PP.LightRadius DESC, GD._pageTitle ASC
|format=table
|format=table
|group by=GD.JoinKey
|order by=PP.LightRadius DESC,GD._pageTitle
}}
}}
</div>
</div>
Line 26: Line 27:
<div style="margin-right: 2.5em;">
<div style="margin-right: 2.5em;">
=== Lanterned Helmets ===
=== Lanterned Helmets ===
{{#cargo_query:table=ItemsTable=IT,GeneralData=GD|join on=IT.JoinKey=GD.JoinKey|fields=CONCAT('{{(}}favilink{{!}}', PlainName, '{{!}}prefix:&ylant&Ye&Wr&Yn&yed{{)}}')=Item, FLOOR(1 + Tier)= Light Radius|where=GD.ParentObject WITHIN 'BaseHelmet' AND GD._pageNamespace = '0'|order by = Light Radius DESC}}
{{#cargo_query:table=ItemsTable=IT,GeneralData=GD
|join on=IT.JoinKey=GD.JoinKey
|fields=CONCAT('{{(}}favilink{{!}}', PlainName, '{{!}}prefix:&ylant&Ye&Wr&Yn&yed{{)}}')=Item, FLOOR(1 + Tier)= Light Radius
|where=GD.ParentObject WITHIN 'BaseHelmet' AND GD._pageNamespace = '0'
|order by = Light Radius DESC
}}


=== Other Lanterned Objects ===
=== Other Lanterned Objects ===
{{#cargo_query:table=ItemsTable=IT,GeneralData=GD|join on=IT.JoinKey=GD.JoinKey|fields=CONCAT('{{((}}favilink{{!}}', PlainName, '{{!}}prefix:&ylant&Ye&Wr&Yn&yed{{)}}')=Item, FLOOR(1 + Tier)= Light Radius|where=GD.ObjectID = 'Strength Exo' AND GD._pageNamespace = '0'|order by = Light Radius DESC}}
{{#cargo_query:table=ItemsTable=IT,GeneralData=GD
|join on=IT.JoinKey=GD.JoinKey
|fields=CONCAT('{{((}}favilink{{!}}', PlainName, '{{!}}prefix:&ylant&Ye&Wr&Yn&yed{{)}}')=Item, FLOOR(1 + Tier)= Light Radius
|where=GD.ObjectID = 'Strength Exo' AND GD._pageNamespace = '0'
|order by = Light Radius DESC
}}
</div>
</div>


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

Latest revision as of 11:12, 19 January 2023

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.

See Also