Changes between Version 1 and Version 2 of Unit_Summary_Table_Generator
- Timestamp:
- 2011-09-06 17:15:48 (21 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Unit_Summary_Table_Generator
v1 v2 38 38 39 39 def printUnit(fileName, basePath): 40 general = ["GenericName", "SpecificName", "Vision > Range", "Health > Max" ]40 general = ["GenericName", "SpecificName", "Vision > Range", "Health > Max", "WalkSpeed"] 41 41 cost = ["Cost > * > food", "Cost > * > wood", "Cost > * > metal", "Cost > * > stone"] 42 42 attackRanged = ["Attack > Ranged > Pierce", "Attack > Ranged > Hack", "Attack > Ranged > Crush", "Attack > Ranged > MaxRange"] … … 82 82 return outString 83 83 84 header = "||'''Common Name'''||'''Specific Name'''||'''Line of Sight'''||'''Health'''||'''Speed'''||'''Cost'''||'''Attack'''||'''Armour'''||\n" 85 84 86 f = open('unit_summary_table', 'w') 85 87 86 f.write("= Unit Summary Table =\n\n ")88 f.write("= Unit Summary Table =\n\nA more detailed description of the units is avail on the [wiki:Manual_Units units page].\n\nThe following abbreviations are used in this page\n\n F = [wiki:Manual_Terminology#Food food], W = [wiki:Manual_Terminology#Wood wood], M = [wiki:Manual_Terminology#Metal metal], S = stone, H = Hack, P = Pierce, C = Crush\n\n") 87 89 88 90 f.write("== Hellene Units ==\n") 89 f.write( "||'''Common Name'''||'''Specific Name'''||'''Line of Sight'''||'''Health'''||'''Cost'''||'''Attack'''||'''Armour'''||\n")91 f.write(header) 90 92 93 f.write(printUnit("units/hele_support_female_citizen.xml", basePath).encode("utf-8")+"\n") 91 94 f.write(printUnit("units/hele_infantry_spearman_a.xml", basePath).encode("utf-8")+"\n") 92 95 f.write(printUnit("units/hele_infantry_javelinist_a.xml", basePath).encode("utf-8")+"\n") … … 98 101 f.write(printUnit("units/hele_champion_ranged_polis.xml", basePath).encode("utf-8")+"\n") 99 102 f.write(printUnit("units/hele_champion_cavalry_mace.xml", basePath).encode("utf-8")+"\n") 103 f.write(printUnit("units/hele_mechanical_siege_lithobolos.xml", basePath).encode("utf-8")+"\n") 104 f.write(printUnit("units/hele_mechanical_siege_oxybeles.xml", basePath).encode("utf-8")+"\n") 105 f.write(printUnit("units/hele_mechanical_siege_tower.xml", basePath).encode("utf-8")+"\n") 106 f.write(printUnit("units/hele_ship_fishing.xml", basePath).encode("utf-8")+"\n") 107 f.write(printUnit("units/hele_ship_merchant.xml", basePath).encode("utf-8")+"\n") 108 f.write(printUnit("units/hele_ship_bireme.xml", basePath).encode("utf-8")+"\n") 109 f.write(printUnit("units/hele_ship_trireme.xml", basePath).encode("utf-8")+"\n") 100 110 101 111 f.write("\n== Carthaginian Units =="+"\n") 102 f.write( "||'''Common Name'''||'''Specific Name'''||'''Line of Sight'''||'''Health'''||'''Cost'''||'''Attack'''||'''Armour'''||"+"\n")112 f.write(header) 103 113 114 f.write(printUnit("units/cart_support_female_citizen.xml", basePath).encode("utf-8")+"\n") 104 115 f.write(printUnit("units/cart_infantry_spearman_a.xml", basePath).encode("utf-8")+"\n") 105 116 f.write(printUnit("units/cart_infantry_swordsman_a.xml", basePath).encode("utf-8")+"\n") … … 112 123 f.write(printUnit("units/cart_champion_infantry.xml", basePath).encode("utf-8")+"\n") 113 124 f.write(printUnit("units/cart_champion_cavalry.xml", basePath).encode("utf-8")+"\n") 125 f.write(printUnit("units/cart_ship_fishing.xml", basePath).encode("utf-8")+"\n") 126 f.write(printUnit("units/cart_ship_merchant.xml", basePath).encode("utf-8")+"\n") 127 f.write(printUnit("units/cart_ship_bireme.xml", basePath).encode("utf-8")+"\n") 128 f.write(printUnit("units/cart_ship_trireme.xml", basePath).encode("utf-8")+"\n") 129 f.write(printUnit("units/cart_ship_quinquereme.xml", basePath).encode("utf-8")+"\n") 114 130 115 131 f.write("\n== Celtic Units =="+"\n") 116 f.write( "||'''Common Name'''||'''Specific Name'''||'''Line of Sight'''||'''Health'''||'''Cost'''||'''Attack'''||'''Armour'''||"+"\n")132 f.write(header) 117 133 134 f.write(printUnit("units/celt_support_female_citizen.xml", basePath).encode("utf-8")+"\n") 118 135 f.write(printUnit("units/celt_infantry_spearman_a.xml", basePath).encode("utf-8")+"\n") 119 136 f.write(printUnit("units/celt_infantry_javelinist_a.xml", basePath).encode("utf-8")+"\n") … … 125 142 f.write(printUnit("units/celt_champion_cavalry_brit.xml", basePath).encode("utf-8")+"\n") 126 143 f.write(printUnit("units/celt_champion_cavalry_gaul.xml", basePath).encode("utf-8")+"\n") 144 f.write(printUnit("units/celt_mechanical_siege_ram.xml", basePath).encode("utf-8")+"\n") 145 f.write(printUnit("units/celt_ship_fishing.xml", basePath).encode("utf-8")+"\n") 146 f.write(printUnit("units/celt_ship_merchant.xml", basePath).encode("utf-8")+"\n") 147 f.write(printUnit("units/celt_ship_trireme.xml", basePath).encode("utf-8")+"\n") 148 127 149 128 150 f.write("\n== Iberian Units =="+"\n") 129 f.write( "||'''Common Name'''||'''Specific Name'''||'''Line of Sight'''||'''Health'''||'''Cost'''||'''Attack'''||'''Armour'''||"+"\n")151 f.write(header) 130 152 153 f.write(printUnit("units/iber_support_female_citizen.xml", basePath).encode("utf-8")+"\n") 131 154 f.write(printUnit("units/iber_infantry_spearman_a.xml", basePath).encode("utf-8")+"\n") 132 155 f.write(printUnit("units/iber_infantry_swordsman_a.xml", basePath).encode("utf-8")+"\n") … … 136 159 f.write(printUnit("units/iber_champion_infantry.xml", basePath).encode("utf-8")+"\n") 137 160 f.write(printUnit("units/iber_champion_cavalry.xml", basePath).encode("utf-8")+"\n") 161 f.write(printUnit("units/iber_mechanical_siege_ram.xml", basePath).encode("utf-8")+"\n") 162 f.write(printUnit("units/iber_ship_fishing.xml", basePath).encode("utf-8")+"\n") 163 f.write(printUnit("units/iber_ship_merchant.xml", basePath).encode("utf-8")+"\n") 164 165 f.write("\n\nThis page was generated using this [wiki:Unit_Summary_Table_Generator unit summary table generator script]."+"\n") 138 166 139 167 }}}
