Appendix - Command Preprocessing

Olympia: The Age of Gods PBEM (Oct 4 2000)

# Appendix G: Appendix - Command Preprocessing

When you submit orders to TAG, the game can run those orders through a preprocessor for you. The preprocessor can convert orders like

              give Maldor peasants

into (for example)

              give 5499 10

This permits you to write your orders in a more English-like (and perhaps, more error-free) format.

To use this facility, you must include the keyword "preprocess" on the subject line of the mail you send to TAG.

The preprocessor currently includes the following aliases:

      	#define gold 1
      	#define golds 1
      	#define peasant 10
      	#define peasants 10
      	#define worker 11
      	#define workers 11
      	#define soldier 12
      	#define soldiers 12
      	#define archer 13
      	#define archers 13
      	#define knight 14
      	#define knights     14
      	#define elite_guard 15
      	#define elite_guards 15
      	#define paladin 15
      	#define paladins 15
      	#define pikeman 16
      	#define pikemans 16
      	#define blessed_soldier 17
      	#define blessed_soldiers 17
      	#define ghost_warrior 18
      	#define ghost_warriors 18
      	#define sailor 19
      	#define sailors     19
      	#define swordsman 20
      	#define swordsmen 20
      	#define crossbowman 21
      	#define crossbowmen 21
      	#define elite_archer 22
      	#define elite_archers 22
      	#define angry_peasant 23
      	#define angry_peasants 23
      	#define pirate 24
      	#define pirates 24
      	#define elf 25
      	#define elves 25
      	#define spirit 26
      	#define spirits 26
      	#define postulant 27
      	#define postulants 27
      	#define fanatic 28
      	#define fanatics 28
      	#define ninja 29
      	#define ninjas 29
      	#define angel 30
      	#define angels 30
      	#define corpse 31
      	#define corpses 31
      	#define savage 32
      	#define savages 32
      	#define skeleton 33
      	#define skeletons 33
      	#define barbarian 34
      	#define barbarians 34
      	#define wagon 35
      	#define wagons 35
      	#define skirmisher 36
      	#define skirmishers 36
      	#define hvy_foot 37
      	#define hvy_foots 37
      	#define hvy_feet 37
      	#define hvy_xbowman 38
      	#define hvy_xbowmans 38
      	#define hvy_xbowmen 38
      	#define elvish_arrow 39
      	#define elvish_arrows 39
      	#define hvy_xbow 40
      	#define hvy_xbows 40
      	#define horse_archer 41
      	#define horse_archers 41
      	#define cavalier 43
      	#define cavaliers 43
      	#define new_wagon 44
      	#define new_wagons 44
      	#define wild_horse 51
      	#define wild_horses 51
      	#define riding_horse 52
      	#define riding_horses 52
      	#define warmount 53
      	#define warmounts 53
      	#define pegasus 54
      	#define pegasi 54
      	#define pegasuses 54
      	#define nazgul     55
      	#define nazguls     55
      	#define flotsam     59
      	#define flotsams 59
      	#define battering_ram 60
      	#define battering_rams 60
      	#define catapult 61
      	#define catapults 61
      	#define siege_tower 62
      	#define siege_towers 62
      	#define ratspider_venom 63
      	#define ratspider_venoms 63
      	#define lana_bark 64
      	#define lana_barks 64
      	#define avinia_leaf 65
      	#define avinia_leafs 65
      	#define avinia_leaves 65
      	#define spiny_root 66
      	#define spiny_roots 66
      	#define farrenstone 67
      	#define farrenstones 67
      	#define yew 68
      	#define yews 68
      	#define elfstone 69
      	#define elfstones 69
      	#define mallorn_wood 70
      	#define mallorn_woods 70
      	#define pretus_bones 71
      	#define longbow 72
      	#define longbows 72
      	#define plate 73
      	#define plates 73
      	#define longsword 74
      	#define longswords 74
      	#define pike 75
      	#define pikes 75
      	#define ox 76
      	#define oxs 76
      	#define oxes 76
      	#define oxen 76
      	#define lumber 77
      	#define lumbers 77
      	#define stone 78
      	#define stones 78
      	#define iron 79
      	#define irons 79
      	#define leather 80
      	#define leathers 80
      	#define ratspider 81
      	#define ratspiders 81
      	#define mithril 82
      	#define mithrils 82
      	#define gate_crystal 83
      	#define gate_crystals 83
      	#define blank_scroll 84
      	#define blank_scrolls 84
      	#define crossbow 85
      	#define crossbows 85
      	#define rug 86
      	#define rugs 86
      	#define fish 87
      	#define fishs 87
      	#define fishes 87
      	#define pepper 88
      	#define peppers 88
      	#define pipeweed 89
      	#define pipeweeds 89
      	#define ale 90
      	#define ales 90
      	#define wool 91
      	#define wools 91
      	#define jewel 92
      	#define jewels 92
      	#define opium 93
      	#define opiums 93
      	#define basket 94
      	#define baskets 94
      	#define pot 95
      	#define pots 95
      	#define fish_oil 97
      	#define fish_oils 97
      	#define drum 98
      	#define drums 98
      	#define hide 99
      	#define hides 99
      	#define lead 102
      	#define leads 102
      	#define fine_cloak 103
      	#define fine_cloaks 103
      	#define chocolate 104
      	#define chocolates 104
      	#define ivory 105
      	#define ivorys 105
      	#define ivories 105
      	#define cardamom 106
      	#define cardamoms 106
      	#define honey 107
      	#define honeys 107
      	#define ink 108
      	#define inks 108
      	#define licorice 109
      	#define licorices 109
      	#define soap 110
      	#define soaps 110
      	#define old_book 111
      	#define old_books 111
      	#define jade_idol 112
      	#define jade_idols 112
      	#define purple_cloth 113
      	#define purple_cloths 113
      	#define rose_perfume 114
      	#define rose_perfumes 114
      	#define silk 115
      	#define silks 115
      	#define incense 116
      	#define incenses 116
      	#define ochre 117
      	#define ochres 117
      	#define jeweled_egg 118
      	#define jeweled_eggs 118
      	#define obsidian 119
      	#define obsidians 119
      	#define orange 251
      	#define oranges 251
      	#define cinnabar 252
      	#define cinnabars 252
      	#define myrhh 253
      	#define myrhhs 253
      	#define saffron 254
      	#define saffrons 254
      	#define dried_fish 255
      	#define dried_fishs 255
      	#define tallow 256
      	#define tallows 256
      	#define candles 257
      	#define candle 257
      	#define wax 258
      	#define waxs 258
      	#define waxes 258
      	#define sugar 259
      	#define sugars 259
      	#define salt 260
      	#define salts 260
      	#define glue 261
      	#define glues 261
      	#define linen 262
      	#define linens 262
      	#define beans 263
      	#define bean 263
      	#define walnuts 264
      	#define walnut 264
      	#define flax 265
      	#define flaxs 265
      	#define flaxes 265
      	#define flutes 266
      	#define flute 266
      	#define cassava 267
      	#define cassavas 267
      	#define plum_wine 268
      	#define plum_wines 268
      	#define vinegar 269
      	#define vinegars 269
      	#define tea 270
      	#define teas 270
      	#define centaur 271
      	#define centaurs 271
      	#define minotaur 272
      	#define minotaurs 272
      	#define spider 278
      	#define spiders 278
      	#define rat 279
      	#define rats 279
      	#define lion 280
      	#define lions 280
      	#define bird 281
      	#define birds 281
      	#define lizard 282
      	#define lizards 282
      	#define bandit 283
      	#define bandits 283
      	#define chimera 284
      	#define chimeras 284
      	#define harpie 285
      	#define harpies 285
      	#define dragon 286
      	#define dragons 286
      	#define orc 287
      	#define orcs 287
      	#define gorgon 288
      	#define gorgons 288
      	#define wolf 289
      	#define wolfs 289
      	#define wolves 289
      	#define orb 290
      	#define orbs 290
      	#define cyclops 291
      	#define cyclopses 291
      	#define giant 292
      	#define giants 292
      	#define faery 293
      	#define fairy 293
      	#define faerys 293
      	#define fairys 293
      	#define faeries 293
      	#define fairies 293
      	#define seagrass 295
      	#define seagrasss 295
      	#define seagrasses 295
      	#define firewort 296
      	#define fireworts 296
      	#define beastnip 297
      	#define beastnips 297
      	#define elf_poppy 298
      	#define elf_poppys 298
      	#define ironwood 299
      	#define ironwoods 299
      	#define kings_fern 300
      	#define kings_ferns 300
      	#define moon_palms 301
      	#define moon_palm 301
      	#define otter 302
      	#define otters 302
      	#define mole 303
      	#define moles 303
      	#define bull 304
      	#define bulls 304
      	#define eagle 305
      	#define eagles 305
      	#define monkey 306
      	#define monkeys 306
      	#define monkies 306
      	#define hare 307
      	#define hares 307
      	#define wardog 308
      	#define wardogs 308
      	#define sand_rat 309
      	#define sand_rats 309
      	#define balrog 310
      	#define balrogs 310
      	#define dirt_golem 311
      	#define dirt_golems 311
      	#define flesh_golem 312
      	#define flesh_golems 312
      	#define iron_golem 313
      	#define iron_golems 313
      	#define lesser_demon 314
      	#define lesser_demons 314
      	#define greater_demon 315
      	#define greater_demons 315
      	#define green_rose 316
      	#define green_roses 316
      	#define elf_ear 317
      	#define elf_ears 317
      	#define savage_ear 318
      	#define savage_ears 318
      	#define nazgul_tail 319
      	#define nazgul_tails 319
      	#define centaur_hide 320
      	#define centaur_hides 320
      	#define minotaur_hide 321
      	#define minotaur_hides 321
      	#define spider_eye 322
      	#define spider_eyes 322
      	#define rat_tail 323
      	#define rat_tails 323
      	#define lion_mane 324
      	#define lion_manes 324
      	#define bird_feather 325
      	#define bird_feathers 325
      	#define lizard_tail 326
      	#define lizard_tails 326
      	#define bandit_ear 327
      	#define bandit_ears 327
      	#define chimera_eye 328
      	#define chimera_eyes 328
      	#define harpie_feather 329
      	#define harpie_feathers 329
      	#define dragon_scale 330
      	#define dragon_scales 330
      	#define orc_scalp 331
      	#define orc_scalps 331
      	#define gorgon_liver 332
      	#define gorgon_livers 332
      	#define wolf_hide 333
      	#define wolf_hides 333
      	#define cyclops_eye 334
      	#define cyclops_eyes 334
      	#define giant_tongue 335
      	#define giant_tongues 335
      	#define balrog_horn 336
      	#define balrog_horns 336
      	#define shipcraft 1000
      	#define combat 1100
      	#define stealth 1200
      	#define beast 123
      	#define persuasion 1300
      	#define construction 1400
      	#define alchemy 1500
      	#define forestry 1600
      	#define mining 1700
      	#define trading 1800
      	#define ranger 1900
      	#define religion 3500
      	#define eres 2000
      	#define anteus 2100
      	#define dol 2200
      	#define timeid 2300
      	#define ham 2400
      	#define kireus 2500
      	#define halon 2600
      	#define domingo 2700
      	#define basic 2800
      	#define weather 161
      	#define scry 2900
      	#define gate 3000
      	#define artifact 3100
      	#define necromancy 3200
      	#define adv_sorcery 3300
      	#define heroism  3400
      	#define basic_religion  3500
      	#define forge_aura 3130
      	#define mage_menial 2802
      	#define appear_common 2803
      	#define view_aura 2804
      	#define quick_cast 2830
      	#define fortify_castle 1491
      	#define detect_artifacts 3101
      	#define reveal_artifacts 3102
      	#define mutate_artifact 3131
      	#define conceal_artifacts 3132
      	#define teleport 3030
      	#define obscure_artifact 3133
      	#define strengthen_castle 1492
      	#define detect_gates 3001
      	#define jump_gate 3002
      	#define seal_gate 3031
      	#define unseal_gate 3032
      	#define notify_unseal 3033
      	#define rem_seal 3034
      	#define reveal_key 3035
      	#define notify_jump 3036
      	#define reveal_mage 2831
      	#define fierce_wind 2030
      	#define transcend_death 3238
      	#define tap_health 2832
      	#define moat_castle 1493
      	#define deepen_mine 1703
      	#define wooden_shoring 1790
      	#define iron_shoring 1791
      	#define forge_weapon 3134
      	#define forge_armor 3135
      	#define forge_bow 3136
      	#define bind_storm 9134
      	#define lightning_bolt 2840
      	#define foresee_defense 2340
      	#define drain_mana 3039
      	#define raise_soldiers 3236
      	#define fireball 3332
      	#define conceal_nation 1291
      	#define scry_region 2901
      	#define shroud_region 2930
      	#define dispel_region 2931
      	#define remove_obscurity 3137
      	#define spot_hidden 1901
      	#define protect_noble 1990
      	#define write_basic 2833
      	#define assassinate 1292
      	#define find_food 1903
      	#define write_scry 2932
      	#define write_gate 3037
      	#define write_art 3138
      	#define write_necro 3230
      	#define bar_loc 2933
      	#define unbar_loc 2934
      	#define destroy_art 3103
      	#define rev_jump 3038
      	#define prot_blast_8 2735
      	#define locate_char 2935
      	#define deep_identify 3104
      	#define shroud_abil 2834
      	#define detect_abil 2835
      	#define detect_scry 2936
      	#define proj_cast 2937
      	#define dispel_abil 2836
      	#define adv_med 2837
      	#define hinder_med 2838
      	#define forge_palantir 3139
      	#define save_proj 2938
      	#define save_quick 2839
      	#define summon_ghost 3201
      	#define raise_corpses 3202
      	#define undead_lord 3231
      	#define renew_undead 3232
      	#define banish_undead 3233
      	#define eat_dead 3234
      	#define aura_blast 3203
      	#define absorb_blast 3235
      	#define summon_rain 2036
      	#define summon_wind 2037
      	#define summon_fog 2038
      	#define direct_storm 2039
      	#define dissipate 2031
      	#define renew_storm 2032
      	#define lightning 2033
      	#define seize_storm 2034
      	#define death_fog 2035
      	#define banish_corpses 2939
      	#define trance 3330
      	#define teleport_item 3331
      	#define summon_water_elemental 2040
      	#define write_weather 2041
      	#define find_mtn_trail 2130
      	#define obscure_mtn_trail 2131
      	#define improve_mining 2132
      	#define conceal_mine 2133
      	#define protect_mine 2134
      	#define bless_fort 2135
      	#define weaken_fort 2136
      	#define boulder_trap 2137
      	#define write_anteus 2138
      	#define detect_beasts  2234
      	#define snake_trap 2235
      	#define write_dol 2236
      	#define find_forest_trail 2330
      	#define obscure_forest_trail 2331
      	#define improve_forestry 2332
      	#define reveal_forest 2333
      	#define improve_fort 2334
      	#define create_deadfall 2335
      	#define recruit_elves 2336
      	#define write_timeid 2337
      	#define reveal_vision 2434
      	#define enchant_guard 2430
      	#define urchin_spy 2431
      	#define draw_crowds 2432
      	#define arrange_mugging 2433
      	#define write_ham 2435
      	#define pr_shroud_loc 2436
      	#define improve_quarry 2530
      	#define improve_smithing 2531
      	#define edge_of_kireus 2532
      	#define create_mithril 2533
      	#define quicksand_trap 2534
      	#define write_kireus 2535
      	#define calm_ap 2630
      	#define improve_charisma 2631
      	#define mesmerize_crowd 2632
      	#define improve_taxes 2633
      	#define guard_loyalty 2634
      	#define instill_fanaticism 2635
      	#define write_halon 2636
      	#define find_hidden 2730
      	#define conceal_loc 2731
      	#define mists_of_conceal 2732
      	#define create_ninja 2733
      	#define write_domingo 2734
      	#define survive_fatal 1193
      	#define pilot_ship 1001
      	#define shipbuilding 1002
      	#define bird_spy 2231
      	#define fight_to_death 1102
      	#define capture_beasts 2232
      	#define use_beasts 1195
      	#define breed_beasts 2233
      	#define petty_thief 1201
      	#define deep_sea 1094
      	#define bribe_noble 1301
      	#define catch_horse 1930
      	#define spy_inv 1202
      	#define spy_skills 1203
      	#define spy_lord 1204
      	#define find_rich 1230
      	#define torture 1231
      	#define train_wild 1931
      	#define train_warmount 1932
      	#define persuade_oath 1330
      	#define raise_mob 1302
      	#define rally_mob 1303
      	#define incite_mob 1331
      	#define make_ram 1601
      	#define make_catapult 1194
      	#define make_siege 1401
      	#define extract_venom 1530
      	#define brew_slave 1531
      	#define brew_heal 1501
      	#define brew_death 1502
      	#define brew_weightlessness 1590
      	#define add_ram 1095
      	#define cloak_trade 1232
      	#define mine_iron 1701
      	#define mine_gold 1702
      	#define mine_mithril 1730
      	#define quarry_stone 1402
      	#define mine_crystal 1731
      	#define harvest_lumber 1602
      	#define harvest_yew 1603
      	#define record_skill 1532
      	#define sneak_build 1233
      	#define archery 1902
      	#define train_soldiers 1105
      	#define weaponsmith 1106
      	#define fishing 1004
      	#define collect_foliage 1604
      	#define collect_elem 1503
      	#define summon_savage 1332
      	#define keep_savage 1333
      	#define harvest_mallorn 1630
      	#define harvest_opium 1605
      	#define improve_opium 1631
      	#define lead_to_gold 1533
      	#define hide_lord 1205
      	#define train_angry 1304
      	#define hide_self 1290
      	#define control_battle  1107
      	#define attack_tactics  1131
      	#define defense_tactics  1132
      	#define combat_discipline 1108
      	#define train_armor 1192
      	#define smuggle_goods 1830
      	#define smuggle_men 1831
      	#define avoid_taxes 1832
      	#define build_wagons 1801
      	#define increase_demand 1802
      	#define decrease_demand 1803
      	#define increase_supply 1804
      	#define decrease_supply 1805
      	#define hide_money 1890
      	#define hide_item 1891
      	#define grow_pop 1390
      	#define build_city 1490
      	#define train_knight 1190
      	#define train_paladin 1191
      	#define add_sails 1005
      	#define add_forts 1091
      	#define add_ports 1006
      	#define add_keels 1090
      	#define remove_sails 1096
      	#define remove_forts 1093
      	#define remove_ports 1097
      	#define remove_keels 1092
      	#define remove_ram 1098
      	#define brew_fiery 1591
      	#define create_dirt_golem 2841
      	#define create_flesh_golem 3237
      	#define create_iron_golem 3333
      	#define swordplay 3401
      	#define defense 3402
      	#define survive_fatal2 3483
      	#define avoid_wounds 3480
      	#define avoid_illness 3481
      	#define improved_recovery 3482
      	#define personal_fttd 3403
      	#define forced_march 3484
      	#define extra_attacks 3485
      	#define extra_missile_attacks 3486
      	#define acute_senses 3487
      	#define improved_explore 3488
      	#define uncanny_accuracy 3489
      	#define blinding_speed 3490
      	#define heal 3501
      	#define last_rites 3502
      	#define resurrect 3530
      	#define create_holy 3503
      	#define dedicate_temple 3504
      	#define pray 3505
      	#define bless 3506
      	#define gather_holy_plant 3507
      	#define write_religion 3508
      	#define proselytise 3509
      	#define banish_undead_r 3510
      	#define prot_blast 3531
      	#define hinder_med_r 3532
      	#define scry_r 3533
      	#define armor  plate
      	#define clay_pot pot
      	#define clay_pots  pot
      	#define lt_foot  swordsman
      	#define light_foot swordsman
      	#define heavy_foot hvy_foot
      	#define sword  longsword
      	#define swords longsword
      	#define woven_basket basket
      	#define woven_baskets  basket
      	#define control_men  control_battle
      	#define control_men_in_battle control_battle
      	#define armour plate
      	#define forge_armour forge_armor
      	#define train_armour train_armor
      	#define defence  defense
      	#define defence2 defense2
      	#define foresee_defence foresee_defense
      	#define defence_tactics defense_tactics
      	#define light_wagon             44
      	#define light_wagons            44
      	#define heavy_wagon             45
      	#define heavy_wagons            45
      	#define war_wagon               46
      	#define war_wagons              46
      	#define warhorse                warmount
      	#define warhorses               warmount
      	#define war_horse               warmount
      	#define war_horses              warmount
      	#define mine_gate_crystal       mine_crystal

These aliases replace the first item with the second item. For instance, the alias:

      	#define prot_blast 3531

causes every occurence of "prot_blast" in your commands to be replaced with "3531".

You may add your own aliases at the beginning of your commands. For instance, if you have a noble "Maldor" with the id "5499" you could add the alias

         	#define Maldor 5499

at the beginning of your orders to cause "Maldor" to be replaced with "5499".

There are a couple of problems you should be aware of if you use the preprocessor.

First, the aliases for collecting fish, wood, etc., will not work. If you try to give the command "fish" it will be replaced with "87" and you'll get the error:

      >line 105: unrecognized command: 87

Second, the preprocessor works on your entire turn, which means if you submit the command:

      rumor 1
      All that glitters is not gold.

what you'll actually see as a rumor is something like:

      rumor 1
      All that glitters is not  1 .

because the preprocessor will replace "gold" with "1".

For advanced users, the preprocessor used is the Gnu C preprocessor.