Changes between Version 4 and Version 5 of Unit_Summary_Table_Generator
- Timestamp:
- Jan 21, 2013, 11:46:55 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Unit_Summary_Table_Generator
v4 v5 14 14 unitInfo = loadData(d("Entity").attr("parent")+".xml", basePath, general, cost, attackRanged, attackMelee, armour) 15 15 else: 16 unitInfo = {'general':{}, 'cost':[0,0,0,0 ], 'attackRanged':[0,0,0,0], 'attackMelee':[0,0,0], 'armour':[0,0,0]}16 unitInfo = {'general':{}, 'cost':[0,0,0,0,0], 'attackRanged':[0,0,0,0], 'attackMelee':[0,0,0], 'armour':[0,0,0]} 17 17 18 18 for attr in general: … … 40 40 def printUnit(fileName, basePath): 41 41 general = ["GenericName", "SpecificName", "Vision > Range", "Health > Max", "WalkSpeed"] 42 cost = ["Cost > * > food", "Cost > * > wood", "Cost > * > metal", "Cost > * > stone" ]42 cost = ["Cost > * > food", "Cost > * > wood", "Cost > * > metal", "Cost > * > stone", "Cost > BuildTime"] 43 43 attackRanged = ["Attack > Ranged > Pierce", "Attack > Ranged > Hack", "Attack > Ranged > Crush", "Attack > Ranged > MaxRange"] 44 44 attackMelee = ["Attack > Melee > Pierce", "Attack > Melee > Hack", "Attack > Melee > Crush"] 45 45 armour = ["Armour > Pierce", "Armour > Hack", "Armour > Crush"] 46 46 generalTitles = ["Unit", "Specific Name", "Line of Sight", "Health"] 47 costTitles = ["F", "W", "G", "S" ]47 costTitles = ["F", "W", "G", "S", "T"] 48 48 aTitles = ["P", "H", "C"] 49 49 … … 64 64 outString += " || " 65 65 66 for i in range( 4):66 for i in range(len(unitStuff["cost"])): 67 67 if unitStuff["cost"][i] != 0: 68 68 outString += costTitles[i] + "{0:g} ".format(unitStuff["cost"][i]) … … 97 97 f.write("A more detailed description of the units is available on the [wiki:Manual_Units units page].\n\n") 98 98 f.write("The following abbreviations are used in this page\n\n") 99 f.write(" 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")99 f.write(" F = [wiki:Manual_Terminology#Food food], W = [wiki:Manual_Terminology#Wood wood], M = [wiki:Manual_Terminology#Metal metal], S = stone, T = training time (seconds), H = Hack, P = Pierce, C = Crush\n\n") 100 100 f.write("The data is based on the basic form for all units that can be promoted.\n\n") 101 101