Extension:Bey-Partial Data Access

From PDXRPWiki
Jump to: navigation, search

Custom extension to access sector information from database. Currently have two database tables:

bey-partial-systems
bey-partial-subsectors

bpsystemrow

    {{#bpsystemrow:[hex]}}  // where [hex] is the four digit sector hex

... outputs a standard fixed field text formatted row describing the system. Example (headers are not outputted):

#--------1---------2---------3---------4---------5---------6---
#PlanetName   Loc. UPP Code   B   Notes         Z  PBG Al LRX *
#----------   ---- ---------  - --------------- -  --- -- --- -
Pacer         0105 X8C3000-0    Ba Fl Lo           003 Na 090

bpsubsectorrows

    {{#bpsubsectorrows:[letter]}}  // where [letter] is A-P, must be capital letter

... outputs a standard fixed field text formatted row describing systems as above. Example (headers are not outputted):

#--------1---------2---------3---------4---------5---------6---
#PlanetName   Loc. UPP Code   B   Notes         Z  PBG Al LRX *
#----------   ---- ---------  - --------------- -  --- -- --- -
Pacer         0105 X8C3000-0    Ba Fl Lo           003 Na 090
WOHLE         0108 A76AAC9-F  N Hi Wa Ca           500 Im 68Z Han Subsector Capital
Gardan        0307 C550535-7    De Ni Po           124 Cs 620
(etc)


bpsystembox

    {{#bpsystembox:[hex]}}  // where [hex] is the four digit sector hex

... outputs system information in the UWP Template format, as follows:

{{UWP|Name=Gardan|Subsector=Han|Sector=Bey-Partial|Coordinates=0307 (A0307)|UWP=C550535-7|Bases=|Trade=De Ni Po|Zone=|P=1|B=2|G=4|Allegiance=Cs|L=6|R=2|X=0|Notes=}}

Generates the following:

Name: Gardan
Subsector: Han
Sector: Bey-Partial
Coordinates: 0307 (A0307)
UWP: C550535-7-124
 
Starport: C: Fair
Size: 5: Medium (7200-8800 km)
Atmosphere: 5: Thin
Hydrographics: No liquid water
Population: 100,000
Govt: Self-Perpetuating Oligarchy
Law Level: 5: Moderate
Technology: 7: Early Information Age
Native Life: Primitive ecosystem
 
Planetoid Belts: 2
Gas Giants: 4
 
Allegiance: Coality Client State
Bases: None
Travel Zone: Green

Trade Codes: Desert,Non-industrial,Poor,
Resources: Poor (2),
Export: None

Personal tools