Module:Builder/Data/Header

--**************************************************** --** Definitions used by many other modules. ** --****************************************************

--**************************************************** --** Definitions of types for all elements. ** --**                                               ** --**  These are used in the actual element data     ** --** to determine what tables they are included in,** --** what kind of tip to use by default, what stats** --** to use in their info card and table rows, etc.** --**                                               ** --**  If you were going to add say, ecology raising ** --** techs and wanted to include them all in one   ** --** table, default their link to an ecology page, ** --** etc., you could add:                          ** --**                                               ** --**  eco = 'Ecology', you would add:               ** --**                                               ** --**  In Data/Tech you would then use t=t.eco       ** --**                                               ** --**  In Data/Formatting, you could them point      ** --** t.eco to the Ecology page; create tables of   ** --** over them with:                               ** --**             ** --**                                                ** --**  You might add a new 'MaxEco' key for what     ** --** level they can raise it to--you'd simple      ** --** put MaxEco=3, say, in their definitions in    ** --** in Data/Tech, then define a StatLine and new  ** --** TableDef in Data/Formatting to display that   ** --** value. ** --**                                               ** --**************************************************** local t = { p   = 'Building', e   = 'Empire Building', w   = 'Wonder', b   = 'Beam', k   = 'Kinetic', m   = 'Missile', t   = 'Torpedo', sh  = 'Shield', am  = 'Armor', gc  = 'Ground Combat', dr  = 'Drive', l   = 'Logistics', sc  = 'Scanner', tar = 'Targeting', sss = 'Ship Special System', eco = 'Eco', col = 'Colonization', eb  = 'Empire Bonus', misc = 'Misc', o   = 'Orbital Module', wm  = 'Weapon Mod', c   = 'Concept', hull = 'Hull', trait= 'Trait', skill= 'Skill' }

--********************* --** Research Types ** --********************* local rt = { d = 'Def', w = 'Weap', e = 'Eco', p = 'Prop', pe = 'PEng', c = 'Con', f = 'Ruins' } --****************** --** Stat Types  ** --****************** local st = { cc    = 'Construction Costs', mt    = 'Maintenance', sr    = 'Strategic Resource', srPath = 'SR Path', srMin = 'SR Min', ab    = 'Absorption', blk   = 'Blocking', ap    = 'Armor Points', md    = 'Min Damage', d     = 'Damage', r     = 'Range', e     = 'Max Ecology', gcb   = 'Ground Combat Points', sp    = 'Space', bc    = 'BC', att   = 'Attack Bonus', def   = 'Defense Bonus', mscale = 'Miniaturization Scale', cscale = 'Ship Class Scale', hp    = 'Missile HP', cd    = 'Cooldown', hullsize = 'HullSize', ssp     = 'Supply Costs', mult    = 'Multiplier', def     = 'Defense' } --******************************** --** Strategic Resource Types  ** --******************************** local sr = { a = 'Antimatter', d = 'Dark Matter', h = 'Helium-3', n = 'Neutronium' } --********************* --** Tip Templates  ** --********************* local tip = { Card   = 'card=< >', Section = 'page=< >|section=#Synopsis', Text   = 'text=< >', Concept = 'concept=< >' } local header = { t = t,   rt = rt, st = st, sr = sr, tip = tip }

-- Copy the below to new data files. -- local h = require('Module:Builder/Data/Header) -- Element types local t = h.t -- research types local rt = rt -- local stat types local st = st -- local strategic resourse types local sr = sr -- local tip types local tip = tip -- local tipdefaults local tipDefaults = tipDefaults --

return header