Difference between revisions of "Template:SectorDataQuery"

From Traveller Wiki - Science-Fiction Adventure in the Far future
Jump to navigation Jump to search
 
(24 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
# Generated by http://wiki.travellerrpg.com/
 
# Generated by http://wiki.travellerrpg.com/
 
# {{#time: Y-m-d H:i:sP}}
 
# {{#time: Y-m-d H:i:sP}}
 +
{{#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
 +
}}
  
# {{{sector}}}
+
{{#cargo_query: tables=StellarData,AllegianceCode
# -1,0
+
|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         
+
Hex  Name                UWP      Remarks                                             {Ix}  (Ex)    [Cx]  N     B   Z PBG W  A    Stellar         
<nowiki>---- -------------------- --------- -------------------------------------- ------ ------- ------ ---- -- - --- -- ---- ---------------</nowiki>
+
<nowiki>---- -------------------- --------- ---------------------------------------------------- ------ ------- ------ ----- --- - --- -- ---- -------------------</nowiki>
 
{{#cargo_query:
 
{{#cargo_query:
 
   tables=StellarData
 
   tables=StellarData
Line 13: Line 38:
 
   concat('{ ', ix , ' }')=IX, CONCAT('(', ex, ')')=EX, CONCAT('[',cx,']')=CX,  
 
   concat('{ ', ix , ' }')=IX, CONCAT('(', ex, ')')=EX, CONCAT('[',cx,']')=CX,  
 
   nobility, bases, zone, CONCAT(popmul, belts, giants) = PBG, worlds, allegiance, stars__full=STARS
 
   nobility, bases, zone, CONCAT(popmul, belts, giants) = PBG, worlds, allegiance, stars__full=STARS
  |where=sector='Dagudashaag'
+
  |where=sector=CONCAT('{{#replace:{{{sector|}}}|'|''}}') and era=CONCAT('{{#replace:{{{era|}}}|'|''}}')
 
  |limit=1000
 
  |limit=1000
 
  |format=template
 
  |format=template
 
  |template=SectorDataQuery.layout
 
  |template=SectorDataQuery.layout
 
  |named args=yes
 
  |named args=yes
 +
|more results text=
 
}}
 
}}
</pre<noinclude></noinclude> ><noinclude>[[Category:Cargo Templates]][[Category:Templates]]</noinclude>
+
</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: