Difference between revisions of "Template:SectorDataQuery"

From Traveller Wiki - Science-Fiction Adventure in the Far future
Jump to navigation Jump to search
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
<pre>
+
<pre<noinclude></noinclude> >
Hex  Name                UWP      Remarks                               {Ix}  (Ex)    [Cx]  N   B Z PBG W  A    Stellar         
+
# Generated by http://wiki.travellerrpg.com/
---- -------------------- --------- -------------------------------------- ------ ------- ------ ---- -- - --- -- ---- ---------------
+
# {{#time: Y-m-d H:i:sP}}
</pre>
+
{{#cargo_query: tables=SectorData
 +
|fields=name, pos_x=posX, pos_y=posY, source, credits, other_names=otherNames, CONCAT('{{#replace:{{{era|}}}|'|''}}')=era
 +
|where=name=CONCAT('{{#replace:{{{sector|}}}|'|''}}')
 +
|format=template
 +
|template=SectorDataQuery.header.layout
 +
|named args=yes
 +
|more results text=
 +
}}
 +
{{#cargo_query: tables=SubsectorData
 +
|fields=position,name
 +
|where=sector=CONCAT('{{#replace:{{{sector|}}}|'|''}}') and era=CONCAT('{{#replace:{{{era|}}}|'|''}}')
 +
|order by=position
 +
|format=template
 +
|template=SectorData.subsectors.layout
 +
|named args=yes
 +
}}
 +
 
 +
{{#cargo_query: tables=StellarData,AllegianceCode
 +
|join on=StellarData.allegiance = AllegianceCode.code
 +
|fields=code, description, detail, detail2
 +
|group by=code
 +
|where=sector=CONCAT('{{#replace:{{{sector|}}}|'|''}}') and era=CONCAT('{{#replace:{{{era|}}}|'|''}}')
 +
|order by=code
 +
|named args=yes
 +
|more results text=
 +
|format=template
 +
|template=SectorDataQuery.allegiance.query
 +
}}
 +
 
 +
Hex  Name                UWP      Remarks                                             {Ix}  (Ex)    [Cx]  N     B   Z PBG W  A    Stellar         
 +
<nowiki>---- -------------------- --------- ---------------------------------------------------- ------ ------- ------ ----- --- - --- -- ---- -------------------</nowiki>
 
{{#cargo_query:
 
{{#cargo_query:
 
   tables=StellarData
 
   tables=StellarData
  |fields=hex, name, uwp, CONCAT(codes__full, ', ', sophonts__full, ', ', details__full)=REMARKS,  
+
  |fields=hex, name, uwp, CONCAT(codes__full,COALESCE(CONCAT(',',details__full),''), COALESCE(CONCAT(',',sophonts__full),''))=REMARKS,  
   concat('{', ix , '}')=IX, CONCAT('(', ex, ')')=EX, CONCAT('[',cx,']'),  
+
   concat('{ ', ix , ' }')=IX, CONCAT('(', ex, ')')=EX, CONCAT('[',cx,']')=CX,  
   nobility, bases, zone, CONCAT(popmul, belts, giants) = PBG, worlds, allegiance, stars__full
+
   nobility, bases, zone, CONCAT(popmul, belts, giants) = PBG, worlds, allegiance, stars__full=STARS
  |where=sector='UnExplored'
+
  |where=sector=CONCAT('{{#replace:{{{sector|}}}|'|''}}') and era=CONCAT('{{#replace:{{{era|}}}|'|''}}')
 +
|limit=1000
 
  |format=template
 
  |format=template
 
  |template=SectorDataQuery.layout
 
  |template=SectorDataQuery.layout
 +
|named args=yes
 +
|more results text=
 
}}
 
}}
 +
</pre<noinclude></noinclude> ><noinclude>
 +
Used to generate a full listing of sector data in a given era into the T5 Second Survey data format.
 +
 +
parameters:
 +
: sector = sector name
 +
: era    = era name
 +
 +
Uses the following templates for layout:
 +
* [[Template:SectorDataQuery.header.layout]] - base sector information: credits, location, name
 +
* [[Template:SectorData.subsectors.layout]]  - Subsector information, list by position
 +
* [[Template:SectorDataQuery.allegiance.query]] - Allegiance information, list by code
 +
* [[Template:SectorDataQuery.layout]] - Main data layout, with spacing.
 +
[[Category:Cargo Templates]][[Category:Templates]]
 +
 +
</noinclude>

Latest revision as of 10:43, 14 September 2016

# Generated by http://wiki.travellerrpg.com/
# 2025-12-06 06:04:55+00:00
No results
No results

No results

Hex  Name                 UWP       Remarks                                              {Ix}   (Ex)    [Cx]   N     B   Z PBG W  A    Stellar        
---- -------------------- --------- ---------------------------------------------------- ------ ------- ------ ----- --- - --- -- ---- -------------------
No results

Used to generate a full listing of sector data in a given era into the T5 Second Survey data format.

parameters:

sector = sector name
era = era name

Uses the following templates for layout: