anarchy = 16
andean_sling = 516
arbalester = 237
architecture = 51
arquebus = 573
arrowslits = 608
arson = 602
artillery = 10
atheism = 21
atlatl = 460
atonement = 319
aztecs = 543
bagains = 686
ballistics = 93
banking = 17
bearded_axe = 83
berbers = 583
berserkergang = 49
blast_furnace = 75
block_printing = 230
bloodlines = 435
bodkin_arrow = 200
bombard_cannon = 188
bombard_tower = 64
bow_saw = 203
bracer = 201
britons = 529
bulgarians = 673
burmese = 652
byzantines = 535
cannon_galleon = 37
capped_ram = 96
caravan = 48
careening = 374
carrack = 572
cartography = 19
castle_age = 102
cavalier = 209
celts = 541
chain_barding_armor = 82
chain_mail_armor = 76
champion = 264
chatras = 628
chemistry = 47
chinese = 534
chivalry = 493
coinage = 23
conscription = 315
corvinian_army = 514
couriers = 517
crenellations = 11
crop_rotation = 12
crossbowman = 100
chinese_50_percent_hp_demos = 396
cuman_mercenaries = 690
cumans = 675
dark_age = 104
double_crossbow = 623
franks_free_farming_1 = 287
double_bit_axe = 202
drill = 6
druzhina = 513
dry_dock = 375
eagle_warrior = 384
el_dorado = 4
elite_arambai = 619
elite_ballista_elephant = 615
elite_battle_elephant = 631
elite_berserk = 398
elite_boyar = 504
elite_camel_archer = 565
elite_cannon_galleon = 376
elite_caravel = 597
elite_cataphract = 361
elite_chu_ko_nu = 362
elite_conquistador = 60
elite_eagle_warrior = 434
elite_elephant_archer = 481
elite_gbeto = 567
elite_genitour = 599
elite_genoese_crossbowman = 468
elite_huskarl = 365
elite_jaguar_warrior = 432
elite_janissary = 369
elite_kamayuk = 509
elite_karambit_warrior = 617
elite_keshik = 680
elite_kipchak = 682
chieftains = 463
elite_konnik = 678
elite_leitis = 684
elite_longboat = 372
elite_longbowman = 360
elite_magyar_huszar = 472
elite_mameluke = 368
elite_mangudai = 371
elite_organ_gun = 563
elite_plumed_archer = 27
elite_rattan_archer = 621
elite_samurai = 366
elite_shotel_warrior = 569
elite_skirmisher = 98
elite_steppe_lancer = 715
elite_tarkan = 2
elite_teutonic_knight = 364
elite_throwing_axeman = 363
elite_turtle_ship = 448
elite_war_elephant = 367
elite_war_wagon = 450
elite_woad_raider = 370
enable_cows = 557
enable_llamas = 556
enable_sheep = 555
enable_turkeys = 558
ethiopians = 581
faith = 45
farimba = 577
fast_fire_ship = 246
fervor = 252
feudal_age = 101
fire_tower = 527
fletching = 199
forced_levy = 625
forging = 67
fortified_wall = 194
franks = 530
free_cartography = 600
furor_celtica = 5
galleon = 35
garland_wars = 24
bonfire = 65
gold_mining = 55
gold_shaft_mining = 182
goths = 531
great_wall = 462
greek_fire = 464
guard_tower = 140
guilds = 15
halberdier = 429
hand_cannon = 85
hand_cart = 249
heated_shot = 380
heavy_camel_rider = 236
heavy_cav_archer = 218
heavy_demolition_ship = 244
heavy_plow = 13
heavy_scorpion = 239
herbal_medicine = 441
heresy = 439
hill_forts_2 = 394
hill_forts = 691
hoardings = 379
horse_collar = 14
howdah = 626
huns = 545
hunting_dogs = 526
husbandry = 39
hussar = 428
illumination = 233
imperial_age = 103
imperial_camel_rider = 521
imperial_skirmisher = 655
incas = 549
indians = 548
inquisition = 492
iron_casting = 68
ironclad = 489
italians = 547
japanese = 533
kamandaran = 488
kasbah = 578
kataparuto = 59
keep = 63
khmer = 650
koreans = 546
leather_archer_armor = 212
light_cavalry = 254
lithuanians = 676
logistica = 61
long_swordsman = 207
loom = 22
madrasah = 490
maghrabi_camels = 579
magyars = 550
mahouts = 7
malay = 651
malians = 582
man_at_arms = 222
manipur_cavalry = 627
marauders = 483
masonry = 50
mayans = 544
mongols = 540
murder_holes = 322
nomads = 487
obsidian_arrows = 485
onager = 257
orthodoxy = 512
padded_archer_armor = 211
paladin = 265
panokseon = 486
paper_money = 629
parthian_tactics = 436
pavise = 494
perfusion = 457
persians = 536
pikeman = 197
plate_barding_armor = 80
plate_mail_armor = 77
portuguese = 580
recurve_bow = 515
redemption = 316
revetments = 525
ring_archer_armor = 219
rocketry = 52
royal_heirs = 574
sanctity = 231
sappers = 321
saracens = 537
scale_barding_armor = 81
scale_mail_armor = 74
scorpion = 94
set_maximum_population_no_houses = 658
shatagni = 507
shinkichon = 445
shipwright = 373
siege_engineers = 377
siege_onager = 320
siege_ram = 255
silk_armor = 687
silk_road = 499
sipahi = 491
slavs = 551
spanish = 542
spies_and_treason = 408
squires = 215
steppe_husbandry = 689
stirrups = 685
stone_mining = 278
stone_shaft_mining = 279
stronghold = 482
sultans = 506
supplies = 716
supremacy = 440
tatars = 674
teutons = 532
thalassocracy = 624
theocracy = 438
thumb_ring = 437
tigui = 576
timurid_siegecraft = 688
torsion_engines = 575
tower_shields = 692
town_center_spawn = 639
town_patrol = 280
town_watch = 8
tracking = 90
treadmill_crane = 54
turks = 538
tusk_swords = 622
two_handed_swordsman = 217
two_man_saw = 221
vietnamese = 653
vietnamese_vision = 665
vikings = 539
war_galley = 34
warwolf = 461
wheelbarrow = 213
yasama = 484
yeomen = 3
zealotry = 9


def get_tech_id_by_string(tech):
    """
    Returns the ID of the given tech. None otherwise.
    """
    try:
        return eval(tech)
    except NameError:
        return None
