mercury19

module_constants

Feb 11th, 2016
396
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 89.04 KB | None | 0 0
  1. from ID_items import *
  2. from ID_quests import *
  3. from ID_factions import *
  4. ##############################################################
  5. # These constants are used in various files.
  6. # If you need to define a value that will be used in those files,
  7. # just define it here rather than copying it across each file, so
  8. # that it will be easy to change it if you need to.
  9. ##############################################################
  10.  
  11. ########################################################
  12. ##  ITEM SLOTS             #############################
  13. ########################################################
  14.  
  15. slot_item_is_checked               = 0
  16. slot_item_food_bonus               = 1
  17. slot_item_book_reading_progress    = 2
  18. slot_item_book_read                = 3
  19. slot_item_intelligence_requirement = 4
  20.  
  21. slot_item_amount_available         = 7
  22.  
  23. slot_item_urban_demand             = 11 #consumer demand for a good in town, measured in abstract units. The more essential the item (ie, like grain) the higher the price
  24. slot_item_rural_demand             = 12 #consumer demand in villages, measured in abstract units
  25. slot_item_desert_demand            = 13 #consumer demand in villages, measured in abstract units
  26.  
  27. slot_item_production_slot          = 14
  28. slot_item_production_string        = 15
  29.  
  30. slot_item_tied_to_good_price       = 20 #ie, weapons and metal armor to tools, padded to cloth, leather to leatherwork, etc
  31.  
  32. slot_item_num_positions            = 22
  33. slot_item_positions_begin          = 23 #reserve around 5 slots after this
  34.  
  35.  
  36. slot_item_multiplayer_faction_price_multipliers_begin = 30 #reserve around 10 slots after this
  37.  
  38. slot_item_primary_raw_material          = 50
  39. slot_item_is_raw_material_only_for      = 51
  40. slot_item_input_number                  = 52 #ie, how many items of inputs consumed per run
  41. slot_item_base_price                    = 53 #taken from module_items
  42. #slot_item_production_site              = 54 #a string replaced with function - Armagan
  43. slot_item_output_per_run                = 55 #number of items produced per run
  44. slot_item_overhead_per_run              = 56 #labor and overhead per run
  45. slot_item_secondary_raw_material        = 57 #in this case, the amount used is only one
  46. slot_item_enterprise_building_cost      = 58 #enterprise building cost
  47.  
  48.  
  49. slot_item_multiplayer_item_class   = 60 #temporary, can be moved to higher values
  50. slot_item_multiplayer_availability_linked_list_begin = 61 #temporary, can be moved to higher values
  51.  
  52.  
  53. ########################################################
  54. ##  AGENT SLOTS            #############################
  55. ########################################################
  56.  
  57. slot_agent_target_entry_point     = 0
  58. slot_agent_target_x_pos           = 1
  59. slot_agent_target_y_pos           = 2
  60. slot_agent_is_alive_before_retreat= 3
  61. slot_agent_is_in_scripted_mode    = 4
  62. slot_agent_is_not_reinforcement   = 5
  63. slot_agent_tournament_point       = 6
  64. slot_agent_arena_team_set         = 7
  65. slot_agent_spawn_entry_point      = 8
  66. slot_agent_target_prop_instance   = 9
  67. slot_agent_map_overlay_id         = 10
  68. slot_agent_target_entry_point     = 11
  69. slot_agent_initial_ally_power     = 12
  70. slot_agent_initial_enemy_power    = 13
  71. slot_agent_enemy_threat           = 14
  72. slot_agent_is_running_away        = 15
  73. slot_agent_courage_score          = 16
  74. slot_agent_is_respawn_as_bot      = 17
  75. slot_agent_cur_animation          = 18
  76. slot_agent_next_action_time       = 19
  77. slot_agent_state                  = 20
  78. slot_agent_in_duel_with           = 21
  79. slot_agent_duel_start_time        = 22
  80.  
  81. slot_agent_walker_occupation      = 25
  82.  
  83. ########################################################
  84. ##  FACTION SLOTS          #############################
  85. ########################################################
  86. slot_faction_ai_state                   = 4
  87. slot_faction_ai_object                  = 5
  88. slot_faction_ai_rationale               = 6 #Currently unused, can be linked to strings generated from decision checklists
  89.  
  90.  
  91. slot_faction_marshall                   = 8
  92. slot_faction_ai_offensive_max_followers = 9
  93.  
  94. slot_faction_culture                    = 10
  95. slot_faction_leader                     = 11
  96.  
  97. slot_faction_temp_slot                  = 12
  98.  
  99. ##slot_faction_vassal_of            = 11
  100. slot_faction_banner                     = 15
  101.  
  102. ##diplomacy start+
  103. slot_faction_number_of_parties    = 20#Deprecated, use slot_faction_num_parties instead
  104. slot_faction_num_parties          = slot_faction_number_of_parties
  105. ##diplomacy end+
  106. slot_faction_state                = 21
  107.  
  108. slot_faction_adjective            = 22
  109.  
  110.  
  111. slot_faction_player_alarm               = 30
  112. slot_faction_last_mercenary_offer_time  = 31
  113. slot_faction_recognized_player          = 32
  114.  
  115. #overriding troop info for factions in quick start mode.
  116. slot_faction_quick_battle_tier_1_infantry      = 41
  117. slot_faction_quick_battle_tier_2_infantry      = 42
  118. slot_faction_quick_battle_tier_1_archer        = 43
  119. slot_faction_quick_battle_tier_2_archer        = 44
  120. slot_faction_quick_battle_tier_1_cavalry       = 45
  121. slot_faction_quick_battle_tier_2_cavalry       = 46
  122.  
  123. slot_faction_tier_1_troop         = 41
  124. slot_faction_tier_2_troop         = 42
  125. slot_faction_tier_3_troop         = 43
  126. slot_faction_tier_4_troop         = 44
  127. slot_faction_tier_5_troop         = 45
  128.  
  129. slot_faction_deserter_troop       = 48
  130. slot_faction_guard_troop          = 49
  131. slot_faction_messenger_troop      = 50
  132. slot_faction_prison_guard_troop   = 51
  133. slot_faction_castle_guard_troop   = 52
  134.  
  135. slot_faction_town_walker_male_troop      = 53
  136. slot_faction_town_walker_female_troop    = 54
  137. slot_faction_village_walker_male_troop   = 55
  138. slot_faction_village_walker_female_troop = 56
  139. slot_faction_town_spy_male_troop         = 57
  140. slot_faction_town_spy_female_troop       = 58
  141.  
  142. slot_faction_has_rebellion_chance = 60
  143.  
  144. slot_faction_instability          = 61 #last time measured
  145.  
  146.  
  147. #UNIMPLEMENTED FEATURE ISSUES
  148. slot_faction_war_damage_inflicted_when_marshal_appointed = 62 #Probably deprecate
  149. slot_faction_war_damage_suffered_when_marshal_appointed  = 63 #Probably deprecate
  150.  
  151. slot_faction_political_issue                             = 64 #Center or marshal appointment
  152. slot_faction_political_issue_time                        = 65 #Now is used
  153.  
  154.  
  155. #Rebellion changes
  156. #slot_faction_rebellion_target                     = 65
  157. #slot_faction_inactive_leader_location         = 66
  158. #slot_faction_support_base                     = 67
  159. #Rebellion changes
  160.  
  161.  
  162.  
  163. #slot_faction_deserter_party_template       = 62
  164.  
  165. slot_faction_reinforcements_a        = 77
  166. slot_faction_reinforcements_b        = 78
  167. slot_faction_reinforcements_c        = 79
  168.  
  169. slot_faction_num_armies              = 80
  170. slot_faction_num_castles             = 81
  171. slot_faction_num_towns               = 82
  172.  
  173. slot_faction_last_attacked_center    = 85
  174. slot_faction_last_attacked_hours     = 86
  175. slot_faction_last_safe_hours         = 87
  176.  
  177. slot_faction_num_routed_agents       = 90
  178.  
  179. #useful for competitive consumption
  180. slot_faction_biggest_feast_score      = 91
  181. slot_faction_biggest_feast_time       = 92
  182. slot_faction_biggest_feast_host       = 93
  183.  
  184.  
  185. #Faction AI states
  186. slot_faction_last_feast_concluded       = 94 #Set when a feast starts -- this needs to be deprecated
  187. slot_faction_last_feast_start_time      = 94 #this is a bit confusing
  188.  
  189.  
  190. slot_faction_ai_last_offensive_time     = 95 #Set when an offensive concludes
  191. slot_faction_last_offensive_concluded   = 95 #Set when an offensive concludes
  192.  
  193. slot_faction_ai_last_rest_time          = 96 #the last time that the faction has had default or feast AI -- this determines lords' dissatisfaction with the campaign. Set during faction_ai script
  194. slot_faction_ai_current_state_started   = 97 #
  195.  
  196. slot_faction_ai_last_decisive_event     = 98 #capture a fortress or declaration of war
  197.  
  198. slot_faction_morale_of_player_troops    = 99
  199.  
  200. #diplomacy
  201. slot_faction_truce_days_with_factions_begin             = 120
  202. slot_faction_provocation_days_with_factions_begin       = 130
  203. slot_faction_war_damage_inflicted_on_factions_begin     = 140
  204. slot_faction_sum_advice_about_factions_begin            = 150
  205. ##diplomacy start+ end-points for the ranges for iteration and range checks
  206. slot_faction_truce_days_with_factions_end           = slot_faction_provocation_days_with_factions_begin
  207. slot_faction_provocation_days_with_factions_end         = slot_faction_war_damage_inflicted_on_factions_begin
  208. slot_faction_war_damage_inflicted_on_factions_end   = slot_faction_sum_advice_about_factions_begin
  209. slot_faction_sum_advice_about_factions_end          = 160
  210. ##diplomacy end+
  211.  
  212. #revolts -- notes for self
  213. #type 1 -- minor revolt, aimed at negotiating change without changing the ruler
  214. #type 2 -- alternate ruler revolt (ie, pretender, chinese dynastic revolt -- keep the same polity but switch the ruler)
  215.     #subtype -- pretender (keeps the same dynasty)
  216.     #"mandate of heaven" -- same basic rules, but a different dynasty
  217.     #alternate/religious
  218.     #alternate/political
  219. #type 3 -- separatist revolt
  220.     # reGonalist/dynastic (based around an alternate ruling house
  221.     # regionalist/republican
  222.     # messianic (ie, Canudos)
  223.  
  224. ##diplomacy start+
  225. #Treaty lengths.  Use these constants instead of "magic numbers" to make it
  226. #obvious what code is supposed to do, and also make it easy to change the
  227. #lengths without having to go through the entire mod.
  228.  
  229. # Truces (as exist in Native)
  230. dplmc_treaty_truce_days_initial    = 20
  231. dplmc_treaty_truce_days_expire     =  0
  232.  
  233. #Trade treaties convert to truces after 20 days.
  234. dplmc_treaty_trade_days_initial    = 40
  235. dplmc_treaty_trade_days_expire     = dplmc_treaty_truce_days_initial
  236.  
  237. #Defensive alliances convert to trade treaties after 20 days.
  238. dplmc_treaty_defense_days_initial  = 60
  239. dplmc_treaty_defense_days_expire   = dplmc_treaty_trade_days_initial
  240.  
  241. #Alliances convert to defensive alliances after 20 days.
  242. dplmc_treaty_alliance_days_initial = 80
  243. dplmc_treaty_alliance_days_expire  = dplmc_treaty_defense_days_initial
  244.  
  245. #Define these by name to make them more clear in the source code.
  246. #They should not be altered from their definitions.
  247. dplmc_treaty_truce_days_half_done = (dplmc_treaty_truce_days_initial + dplmc_treaty_truce_days_expire) // 2
  248. dplmc_treaty_trade_days_half_done = (dplmc_treaty_trade_days_initial + dplmc_treaty_trade_days_expire) // 2
  249. dplmc_treaty_defense_days_half_done = (dplmc_treaty_defense_days_initial + dplmc_treaty_defense_days_expire) // 2
  250. dplmc_treaty_alliance_days_half_done = (dplmc_treaty_alliance_days_initial + dplmc_treaty_alliance_days_expire) // 2
  251.  
  252. ##diplomacy end+
  253.  
  254. ########################################################
  255. ##  PARTY SLOTS            #############################
  256. ########################################################
  257. slot_party_type                = 0  #spt_caravan, spt_town, spt_castle
  258.  
  259. slot_party_retreat_flag        = 2
  260. slot_party_ignore_player_until = 3
  261. slot_party_ai_state            = 4
  262. slot_party_ai_object           = 5
  263. slot_party_ai_rationale        = 6 #Currently unused, but can be used to save a string explaining the lord's thinking
  264.  
  265. #slot_town_belongs_to_kingdom   = 6
  266. slot_town_lord                 = 7
  267. slot_party_ai_substate         = 8
  268. slot_town_claimed_by_player    = 9
  269.  
  270. slot_cattle_driven_by_player = slot_town_lord #hack
  271.  
  272. slot_town_center        = 10
  273. slot_town_castle        = 11
  274. slot_town_prison        = 12
  275. slot_town_tavern        = 13
  276. slot_town_store         = 14
  277. slot_town_arena         = 16
  278. slot_town_alley         = 17
  279. slot_town_walls         = 18
  280. slot_center_culture     = 19
  281.  
  282. slot_town_tavernkeeper  = 20
  283. slot_town_weaponsmith   = 21
  284. slot_town_armorer       = 22
  285. slot_town_merchant      = 23
  286. slot_town_horse_merchant= 24
  287. slot_town_elder         = 25
  288. slot_center_player_relation = 26
  289. ##diplomacy start+ This range doesn't need to be exhaustive (e.g. the seneschal isn't included), but it should be continuous
  290. dplmc_slot_town_merchants_begin = slot_town_tavernkeeper
  291. dplmc_slot_town_merchants_end = slot_town_elder + 1
  292. ##diplomacy end+
  293.  
  294. slot_center_siege_with_belfry = 27
  295. slot_center_last_taken_by_troop = 28
  296.  
  297. # party will follow this party if set:
  298. slot_party_commander_party = 30 #default -1   #Deprecate
  299. slot_party_following_player    = 31
  300. slot_party_follow_player_until_time = 32
  301. slot_party_dont_follow_player_until_time = 33
  302.  
  303. slot_village_raided_by        = 34
  304. slot_village_state            = 35 #svs_normal, svs_being_raided, svs_looted, svs_recovering, svs_deserted
  305. slot_village_raid_progress    = 36
  306. slot_village_recover_progress = 37
  307. slot_village_smoke_added      = 38
  308.  
  309. slot_village_infested_by_bandits   = 39
  310.  
  311. slot_center_last_visited_by_lord   = 41
  312.  
  313. slot_center_last_player_alarm_hour = 42
  314.  
  315. slot_village_player_can_not_steal_cattle = 46
  316.  
  317. slot_center_accumulated_rents      = 47 #collected automatically by NPC lords
  318. slot_center_accumulated_tariffs    = 48 #collected automatically by NPC lords
  319. slot_town_wealth        = 49 #total amount of accumulated wealth in the center, pays for the garrison
  320. slot_town_prosperity    = 50 #affects the amount of wealth generated
  321. slot_town_player_odds   = 51
  322.  
  323.  
  324. slot_party_last_toll_paid_hours = 52
  325. slot_party_food_store           = 53 #used for sieges
  326. slot_center_is_besieged_by      = 54 #used for sieges
  327. slot_center_last_spotted_enemy  = 55
  328.  
  329. slot_party_cached_strength        = 56
  330. slot_party_nearby_friend_strength = 57
  331. slot_party_nearby_enemy_strength  = 58
  332. slot_party_follower_strength      = 59
  333.  
  334. slot_town_reinforcement_party_template = 60
  335. slot_center_original_faction           = 61
  336. slot_center_ex_faction                 = 62
  337.  
  338. slot_party_follow_me                   = 63
  339. slot_center_siege_begin_hours          = 64 #used for sieges
  340. slot_center_siege_hardness             = 65
  341.  
  342. slot_center_sortie_strength            = 66
  343. slot_center_sortie_enemy_strength      = 67
  344.  
  345. slot_party_last_in_combat              = 68 #used for AI
  346. slot_party_last_in_home_center         = 69 #used for AI
  347. slot_party_leader_last_courted         = 70 #used for AI
  348. slot_party_last_in_any_center          = 71 #used for AI
  349.  
  350.  
  351.  
  352. slot_castle_exterior    = slot_town_center
  353.  
  354. #slot_town_rebellion_contact   = 76
  355. #trs_not_yet_approached  = 0
  356. #trs_approached_before   = 1
  357. #trs_approached_recently = 2
  358.  
  359. argument_none         = 0
  360. argument_claim        = 1 #deprecate for legal
  361. argument_legal        = 1
  362.  
  363. argument_ruler        = 2 #deprecate for commons
  364. argument_commons      = 2
  365.  
  366. argument_benefit      = 3 #deprecate for reward
  367. argument_reward       = 3
  368.  
  369. argument_victory      = 4
  370. argument_lords        = 5
  371. argument_rivalries    = 6 #new - needs to be added
  372.  
  373. slot_town_village_product = 76
  374.  
  375. slot_town_rebellion_readiness = 77
  376. #(readiness can be a negative number if the rebellion has been defeated)
  377.  
  378. slot_town_arena_melee_mission_tpl = 78
  379. slot_town_arena_torny_mission_tpl = 79
  380. slot_town_arena_melee_1_num_teams = 80
  381. slot_town_arena_melee_1_team_size = 81
  382. slot_town_arena_melee_2_num_teams = 82
  383. slot_town_arena_melee_2_team_size = 83
  384. slot_town_arena_melee_3_num_teams = 84
  385. slot_town_arena_melee_3_team_size = 85
  386. slot_town_arena_melee_cur_tier    = 86
  387. ##slot_town_arena_template    = 87
  388.  
  389. slot_center_npc_volunteer_troop_type   = 90
  390. slot_center_npc_volunteer_troop_amount = 91
  391. slot_center_mercenary_troop_type  = 90
  392. slot_center_mercenary_troop_amount= 91
  393. slot_center_volunteer_troop_type  = 92
  394. slot_center_volunteer_troop_amount= 93
  395.  
  396. #slot_center_companion_candidate   = 94
  397. slot_center_ransom_broker         = 95
  398. slot_center_tavern_traveler       = 96
  399. slot_center_traveler_info_faction = 97
  400. slot_center_tavern_bookseller     = 98
  401. slot_center_tavern_minstrel       = 99
  402.  
  403. num_party_loot_slots    = 5
  404. slot_party_next_looted_item_slot  = 109
  405. slot_party_looted_item_1          = 110
  406. slot_party_looted_item_2          = 111
  407. slot_party_looted_item_3          = 112
  408. slot_party_looted_item_4          = 113
  409. slot_party_looted_item_5          = 114
  410. slot_party_looted_item_1_modifier = 115
  411. slot_party_looted_item_2_modifier = 116
  412. slot_party_looted_item_3_modifier = 117
  413. slot_party_looted_item_4_modifier = 118
  414. slot_party_looted_item_5_modifier = 119
  415.  
  416. slot_village_bound_center         = 120
  417. slot_village_market_town          = 121
  418. slot_village_farmer_party         = 122
  419. slot_party_home_center            = 123 #Only use with caravans and villagers
  420.  
  421. slot_center_current_improvement   = 124
  422. slot_center_improvement_end_hour  = 125
  423.  
  424. slot_party_last_traded_center     = 126
  425.  
  426.  
  427.  
  428. slot_center_has_manor            = 130 #village
  429. slot_center_has_fish_pond        = 131 #village
  430. slot_center_has_watch_tower      = 132 #village
  431. slot_center_has_school           = 133 #village
  432. slot_center_has_messenger_post   = 134 #town, castle, village
  433. slot_center_has_prisoner_tower   = 135 #town, castle
  434.  
  435. village_improvements_begin = slot_center_has_manor
  436. village_improvements_end          = 135
  437.  
  438. walled_center_improvements_begin = slot_center_has_messenger_post
  439. walled_center_improvements_end               = 136
  440.  
  441. slot_center_player_enterprise                     = 137 #noted with the item produced
  442. slot_center_player_enterprise_production_order    = 138
  443. slot_center_player_enterprise_consumption_order   = 139 #not used
  444. slot_center_player_enterprise_days_until_complete = 139 #Used instead
  445.  
  446. slot_center_player_enterprise_balance             = 140 #not used
  447. slot_center_player_enterprise_input_price         = 141 #not used
  448. slot_center_player_enterprise_output_price        = 142 #not used
  449.  
  450.  
  451.  
  452. slot_center_has_bandits                        = 155
  453. slot_town_has_tournament                       = 156
  454. slot_town_tournament_max_teams                 = 157
  455. slot_town_tournament_max_team_size             = 158
  456.  
  457. slot_center_faction_when_oath_renounced        = 159
  458.  
  459. slot_center_walker_0_troop                   = 160
  460. slot_center_walker_1_troop                   = 161
  461. slot_center_walker_2_troop                   = 162
  462. slot_center_walker_3_troop                   = 163
  463. slot_center_walker_4_troop                   = 164
  464. slot_center_walker_5_troop                   = 165
  465. slot_center_walker_6_troop                   = 166
  466. slot_center_walker_7_troop                   = 167
  467. slot_center_walker_8_troop                   = 168
  468. slot_center_walker_9_troop                   = 169
  469.  
  470. slot_center_walker_0_dna                     = 170
  471. slot_center_walker_1_dna                     = 171
  472. slot_center_walker_2_dna                     = 172
  473. slot_center_walker_3_dna                     = 173
  474. slot_center_walker_4_dna                     = 174
  475. slot_center_walker_5_dna                     = 175
  476. slot_center_walker_6_dna                     = 176
  477. slot_center_walker_7_dna                     = 177
  478. slot_center_walker_8_dna                     = 178
  479. slot_center_walker_9_dna                     = 179
  480.  
  481. slot_center_walker_0_type                    = 180
  482. slot_center_walker_1_type                    = 181
  483. slot_center_walker_2_type                    = 182
  484. slot_center_walker_3_type                    = 183
  485. slot_center_walker_4_type                    = 184
  486. slot_center_walker_5_type                    = 185
  487. slot_center_walker_6_type                    = 186
  488. slot_center_walker_7_type                    = 187
  489. slot_center_walker_8_type                    = 188
  490. slot_center_walker_9_type                    = 189
  491.  
  492. slot_town_trade_route_1           = 190
  493. slot_town_trade_route_2           = 191
  494. slot_town_trade_route_3           = 192
  495. slot_town_trade_route_4           = 193
  496. slot_town_trade_route_5           = 194
  497. slot_town_trade_route_6           = 195
  498. slot_town_trade_route_7           = 196
  499. slot_town_trade_route_8           = 197
  500. slot_town_trade_route_9           = 198
  501. slot_town_trade_route_10          = 199
  502. slot_town_trade_route_11          = 200
  503. slot_town_trade_route_12          = 201
  504. slot_town_trade_route_13          = 202
  505. slot_town_trade_route_14          = 203
  506. slot_town_trade_route_15          = 204
  507. slot_town_trade_routes_begin = slot_town_trade_route_1
  508. slot_town_trade_routes_end = slot_town_trade_route_15 + 1
  509.  
  510.  
  511. num_trade_goods = itm_siege_supply - itm_spice
  512. slot_town_trade_good_productions_begin       = 500 #a harmless number, until it can be deprecated
  513.  
  514. #These affect production but in some cases also demand, so it is perhaps easier to itemize them than to have separate
  515.  
  516. slot_village_number_of_cattle   = 205
  517. slot_center_head_cattle         = 205 #dried meat, cheese, hides, butter
  518. slot_center_head_sheep          = 206 #sausages, wool
  519. slot_center_head_horses         = 207 #horses can be a trade item used in tracking but which are never offered for sale
  520.  
  521. slot_center_acres_pasture       = 208 #pasture area for grazing of cattles and sheeps, if this value is high then number of cattles and sheeps increase faster
  522. slot_center_acres_grain         = 209 #grain
  523. slot_center_acres_olives        = 210 #olives
  524. slot_center_acres_vineyard      = 211 #fruit
  525. slot_center_acres_flax          = 212 #flax
  526. slot_center_acres_dates         = 213 #dates
  527.  
  528. slot_center_fishing_fleet       = 214 #smoked fish
  529. slot_center_salt_pans           = 215 #salt
  530.  
  531. slot_center_apiaries            = 216 #honey
  532. slot_center_silk_farms          = 217 #silk
  533. slot_center_kirmiz_farms        = 218 #dyes
  534.  
  535. slot_center_iron_deposits       = 219 #iron
  536. slot_center_fur_traps           = 220 #furs
  537.  
  538. slot_center_mills               = 221 #bread
  539. slot_center_breweries           = 222 #ale
  540. slot_center_wine_presses        = 223 #wine
  541. slot_center_olive_presses       = 224 #oil
  542.  
  543. slot_center_linen_looms         = 225 #linen
  544. slot_center_silk_looms          = 226 #velvet
  545. slot_center_wool_looms          = 227 #wool cloth
  546.  
  547. slot_center_pottery_kilns       = 228 #pottery
  548. slot_center_smithies            = 229 #tools
  549. slot_center_tanneries           = 230 #leatherwork
  550. slot_center_shipyards           = 231 #naval stores - uses timber, pitch, and linen
  551.  
  552. slot_center_household_gardens   = 232 #cabbages
  553.  
  554. #all spice comes overland to Tulga
  555. #all dyes come by sea to Jelkala
  556.  
  557. #chicken and pork are perishable and non-tradeable, and based on grain production
  558. #timber and pitch if we ever have a shipbuilding industry
  559. #limestone and timber for mortar, if we allow building
  560.  
  561. slot_town_last_nearby_fire_time                         = 240
  562.  
  563. #slot_town_trade_good_prices_begin            = slot_town_trade_good_productions_begin + num_trade_goods + 1
  564. slot_party_following_orders_of_troop        = 244
  565. slot_party_orders_type                      = 245
  566. slot_party_orders_object                    = 246
  567. slot_party_orders_time                      = 247
  568.  
  569. slot_party_temp_slot_1                      = 248 #right now used only within a single script, merchant_road_info_to_s42, to denote closed roads. Now also used in comparative scripts
  570. slot_party_under_player_suggestion          = 249 #move this up a bit
  571. slot_town_trade_good_prices_begin           = 250
  572.  
  573. slot_center_last_reconnoitered_by_faction_time              = 350
  574. #slot_center_last_reconnoitered_by_faction_cached_strength  = 360
  575. #slot_center_last_reconnoitered_by_faction_friend_strength  = 370
  576.  
  577.  
  578.  
  579.  
  580. #slot_party_type values
  581. ##spt_caravan            = 1
  582. spt_castle             = 2
  583. spt_town               = 3
  584. spt_village            = 4
  585. ##spt_forager            = 5
  586. ##spt_war_party          = 6
  587. ##spt_patrol             = 7
  588. ##spt_messenger          = 8
  589. ##spt_raider             = 9
  590. ##spt_scout              = 10
  591. spt_kingdom_caravan    = 11
  592. ##spt_prisoner_train     = 12
  593. spt_kingdom_hero_party = 13
  594. ##spt_merchant_caravan   = 14
  595. spt_village_farmer     = 15
  596. spt_ship               = 16
  597. spt_cattle_herd        = 17
  598. spt_bandit_lair       = 18
  599. #spt_deserter           = 20
  600.  
  601. kingdom_party_types_begin = spt_kingdom_caravan
  602. kingdom_party_types_end = spt_kingdom_hero_party + 1
  603.  
  604. #slot_faction_state values
  605. sfs_active                     = 0
  606. sfs_defeated                   = 1
  607. sfs_inactive                   = 2
  608. sfs_inactive_rebellion         = 3
  609. sfs_beginning_rebellion        = 4
  610.  
  611.  
  612. #slot_faction_ai_state values
  613. sfai_default                         = 0 #also defending
  614. sfai_gathering_army                  = 1
  615. sfai_attacking_center                = 2
  616. sfai_raiding_village                 = 3
  617. sfai_attacking_enemy_army            = 4
  618. sfai_attacking_enemies_around_center = 5
  619. sfai_feast                           = 6 #can be feast, wedding, or major tournament
  620. #Social events are a generic aristocratic gathering. Tournaments take place if they are in a town, and hunts take place if they are at a castle.
  621. #Weddings will take place at social events between betrothed couples if they have been engaged for at least a month, if the lady's guardian is the town lord, and if both bride and groom are present
  622.  
  623.  
  624. #Rebellion system changes begin
  625. sfai_nascent_rebellion          = 7
  626. #Rebellion system changes end
  627.  
  628. #slot_party_ai_state values
  629. spai_undefined                  = -1
  630. spai_besieging_center           = 1
  631. spai_patrolling_around_center   = 4
  632. spai_raiding_around_center      = 5
  633. ##spai_raiding_village            = 6
  634. spai_holding_center             = 7
  635. ##spai_helping_town_against_siege = 9
  636. spai_engaging_army              = 10
  637. spai_accompanying_army          = 11
  638. spai_screening_army             = 12
  639. spai_trading_with_town          = 13
  640. spai_retreating_to_center       = 14
  641. ##spai_trading_within_kingdom     = 15
  642. spai_visiting_village           = 16 #same thing, I think. Recruiting differs from holding because NPC parties don't actually enter villages
  643.  
  644. #slot_village_state values
  645. svs_normal                      = 0
  646. svs_being_raided                = 1
  647. svs_looted                      = 2
  648. svs_recovering                  = 3
  649. svs_deserted                    = 4
  650. svs_under_siege                 = 5
  651.  
  652. #$g_player_icon_state values
  653. pis_normal                      = 0
  654. pis_camping                     = 1
  655. pis_ship                        = 2
  656.  
  657.  
  658. ########################################################
  659. ##  SCENE SLOTS            #############################
  660. ########################################################
  661. slot_scene_visited              = 0
  662. slot_scene_belfry_props_begin   = 10
  663.  
  664.  
  665.  
  666. ########################################################
  667. ##  TROOP SLOTS            #############################
  668. ########################################################
  669. #slot_troop_role         = 0  # 10=Kingdom Lord
  670.  
  671. slot_troop_occupation          = 2  # 0 = free, 1 = merchant
  672. #slot_troop_duty               = 3  # Kingdom duty, 0 = free
  673. #slot_troop_homage_type         = 45
  674. #homage_mercenary =             = 1 #Player is on a temporary contract
  675. #homage_official =              = 2 #Player has a royal appointment
  676. #homage_feudal   =              = 3 #
  677.  
  678.  
  679. slot_troop_state               = 3
  680. slot_troop_last_talk_time      = 4
  681. slot_troop_met                 = 5 #i also use this for the courtship state -- may become cumbersome
  682. slot_troop_courtship_state     = 5 #2 professed admiration, 3 agreed to seek a marriage, 4 ended relationship
  683.  
  684. slot_troop_party_template      = 6
  685. #slot_troop_kingdom_rank        = 7
  686.  
  687. slot_troop_renown              = 7
  688.  
  689. ##slot_troop_is_prisoner         = 8  # important for heroes only
  690. slot_troop_prisoner_of_party   = 8  # important for heroes only
  691. #slot_troop_is_player_companion = 9  # important for heroes only:::USE  slot_troop_occupation = slto_player_companion
  692.  
  693. slot_troop_present_at_event    = 9
  694.  
  695. slot_troop_leaded_party         = 10 # important for kingdom heroes only
  696. slot_troop_wealth               = 11 # important for kingdom heroes only
  697. slot_troop_cur_center           = 12 # important for royal family members only (non-kingdom heroes)
  698.  
  699. slot_troop_banner_scene_prop    = 13 # important for kingdom heroes and player only
  700.  
  701. slot_troop_original_faction     = 14 # for pretenders
  702. #slot_troop_loyalty              = 15 #deprecated - this is now derived from other figures
  703. slot_troop_player_order_state   = 16 #Deprecated
  704. slot_troop_player_order_object  = 17 #Deprecated
  705.  
  706. #troop_player order state are all deprecated in favor of party_order_state. This has two reasons -- 1) to reset AI if the party is eliminated, and 2) to allow the player at a later date to give orders to leaderless parties, if we want that
  707.  
  708.  
  709. #Post 0907 changes begin
  710. slot_troop_age                 =  18
  711. slot_troop_age_appearance      =  19
  712.  
  713. #Post 0907 changes end
  714.  
  715. slot_troop_does_not_give_quest = 20
  716. slot_troop_player_debt         = 21
  717. slot_troop_player_relation     = 22
  718. #slot_troop_player_favor        = 23
  719. slot_troop_last_quest          = 24
  720. slot_troop_last_quest_betrayed = 25
  721. slot_troop_last_persuasion_time= 26
  722. slot_troop_last_comment_time   = 27
  723. slot_troop_spawned_before      = 28
  724.  
  725. #Post 0907 changes begin
  726. slot_troop_last_comment_slot   = 29
  727. #Post 0907 changes end
  728.  
  729. slot_troop_spouse              = 30
  730. slot_troop_father              = 31
  731. slot_troop_mother              = 32
  732. slot_troop_guardian            = 33 #Usually siblings are identified by a common parent.This is used for brothers if the father is not an active npc. At some point we might introduce geneologies
  733. slot_troop_betrothed           = 34 #Obviously superseded once slot_troop_spouse is filled
  734. #other relations are derived from one's parents
  735. #slot_troop_daughter            = 33
  736. #slot_troop_son                 = 34
  737. #slot_troop_sibling             = 35
  738.     ##diplomacy start+
  739.     #NOTE TO MODDERS: There is code that depends on these slots appearing in the correct order and being continuous.
  740. dplmc_slot_troop_relatives_begin = slot_troop_spouse
  741. dplmc_slot_troop_relatives_end   = slot_troop_betrothed
  742. dplmc_slot_troop_relatives_including_betrothed_end = slot_troop_betrothed + 1
  743.     ##diplomacy end+
  744. slot_troop_love_interest_1     = 35 #each unmarried lord has three love interests
  745. slot_troop_love_interest_2     = 36
  746. slot_troop_love_interest_3     = 37
  747. slot_troop_love_interests_end  = 38
  748. #ways to court -- discuss a book, commission/compose a poem, present a gift, recount your exploits, fulfil a specific quest, appear at a tournament
  749. #preferences for women - (conventional - father's friends)
  750. slot_lady_no_messages                       = 37
  751. slot_lady_last_suitor                       = 38
  752. slot_lord_granted_courtship_permission      = 38
  753.  
  754. slot_troop_betrothal_time                   = 39 #used in scheduling the wedding
  755.  
  756. slot_troop_trainer_met                       = 30
  757. slot_troop_trainer_waiting_for_result        = 31
  758. slot_troop_trainer_training_fight_won        = 32
  759. slot_troop_trainer_num_opponents_to_beat     = 33
  760. slot_troop_trainer_training_system_explained = 34
  761. slot_troop_trainer_opponent_troop            = 35
  762. slot_troop_trainer_training_difficulty       = 36
  763. slot_troop_trainer_training_fight_won        = 37
  764.  
  765.  
  766. slot_lady_used_tournament                   = 40
  767.  
  768.  
  769. slot_troop_current_rumor       = 45
  770. slot_troop_temp_slot           = 46
  771. slot_troop_promised_fief       = 47
  772.  
  773. slot_troop_set_decision_seed       = 48 #Does not change
  774. slot_troop_temp_decision_seed      = 49 #Resets at recalculate_ai
  775. slot_troop_recruitment_random      = 50 #used in a number of different places in the intrigue procedures to overcome intermediate hurdles, although not for the final calculation, might be replaced at some point by the global decision seed
  776. #Decision seeds can be used so that some randomness can be added to NPC decisions, without allowing the player to spam the NPC with suggestions
  777. #The temp decision seed is reset 24 to 48 hours after the NPC last spoke to the player, while the set seed only changes in special occasions
  778. #The single seed is used with varying modula to give high/low outcomes on different issues, without using a separate slot for each issue
  779.  
  780. slot_troop_intrigue_impatience = 51
  781. #recruitment changes end
  782.  
  783. #slot_troop_honorable          = 50
  784. #slot_troop_merciful          = 51
  785. slot_lord_reputation_type             = 52
  786. slot_lord_recruitment_argument        = 53 #the last argument proposed by the player to the lord
  787. slot_lord_recruitment_candidate       = 54 #the last candidate proposed by the player to the lord
  788.  
  789. slot_troop_change_to_faction          = 55
  790.  
  791. ##diplomacy start+ Use this slot to track owned center points (village = 1, castle = 2, town = 3)
  792. #The value should be one more than the actual number of center points, because it makes
  793. #it obvious when the slot has not been initialized.  (It also so happens that we often
  794. #add 1 to the value anyway to avoid division by 0, so this can be convenient.)
  795. dplmc_slot_troop_center_points_plus_one = 56
  796. ##diplomacy end+
  797.  
  798. #slot_troop_readiness_to_join_army     = 57 #possibly deprecate
  799. #slot_troop_readiness_to_follow_orders = 58 #possibly deprecate
  800.  
  801. # NPC-related constants
  802.  
  803. #NPC companion changes begin
  804. slot_troop_first_encountered          = 59
  805. slot_troop_home                       = 60
  806.  
  807. slot_troop_morality_state       = 61
  808. tms_no_problem         = 0
  809. tms_acknowledged       = 1
  810. tms_dismissed          = 2
  811.  
  812. slot_troop_morality_type = 62
  813. tmt_aristocratic = 1
  814. tmt_egalitarian = 2
  815. tmt_humanitarian = 3
  816. tmt_honest = 4
  817. tmt_pious = 5
  818.  
  819. slot_troop_morality_value = 63
  820.  
  821. slot_troop_2ary_morality_type  = 64
  822. slot_troop_2ary_morality_state = 65
  823. slot_troop_2ary_morality_value = 66
  824.  
  825. slot_troop_town_with_contacts  = 67
  826. slot_troop_town_contact_type   = 68 #1 are nobles, 2 are commons
  827.  
  828. slot_troop_morality_penalties =  69 ### accumulated grievances from morality conflicts
  829.  
  830.  
  831. slot_troop_personalityclash_object     = 71
  832. #(0 - they have no problem, 1 - they have a problem)
  833. slot_troop_personalityclash_state    = 72 #1 = pclash_penalty_to_self, 2 = pclash_penalty_to_other, 3 = pclash_penalty_to_other,
  834. pclash_penalty_to_self  = 1
  835. pclash_penalty_to_other = 2
  836. pclash_penalty_to_both  = 3
  837. #(a string)
  838. slot_troop_personalityclash2_object   = 73
  839. slot_troop_personalityclash2_state    = 74
  840.  
  841. slot_troop_personalitymatch_object   =  75
  842. slot_troop_personalitymatch_state   =  76
  843.  
  844. slot_troop_personalityclash_penalties = 77 ### accumulated grievances from personality clash
  845. slot_troop_personalityclash_penalties = 77 ### accumulated grievances from personality clash
  846.  
  847. slot_troop_home_speech_delivered = 78 #only for companions
  848. slot_troop_discussed_rebellion   = 78 #only for pretenders
  849.  
  850. #courtship slots
  851. slot_lady_courtship_heroic_recited      = 74
  852. slot_lady_courtship_allegoric_recited   = 75
  853. slot_lady_courtship_comic_recited       = 76
  854. slot_lady_courtship_mystic_recited      = 77
  855. slot_lady_courtship_tragic_recited      = 78
  856.  
  857.  
  858.  
  859. #NPC history slots
  860. slot_troop_met_previously        = 80
  861. slot_troop_turned_down_twice     = 81
  862. slot_troop_playerparty_history   = 82
  863.  
  864. pp_history_scattered         = 1
  865. pp_history_dismissed         = 2
  866. pp_history_quit              = 3
  867. pp_history_indeterminate     = 4
  868. ##diplomacy start+
  869. dplmc_pp_history_appointed_office    = 5 #assigned an office (like Minister)
  870. dplmc_pp_history_granted_fief        = 6 #was granted a fief, or (for pretenders) completed Pretender quest
  871. dplmc_pp_history_lord_rejoined       = 7 #enfeoffed lord temporarily rejoined the party
  872. dplmc_pp_history_nonplayer_entry     = 8 #became a lord without first being a companion of the player (normally this is assumed to be impossible)
  873. ##diplomacy end+
  874.  
  875. slot_troop_playerparty_history_string   = 83
  876. slot_troop_return_renown        = 84
  877.  
  878. slot_troop_custom_banner_bg_color_1      = 85
  879. slot_troop_custom_banner_bg_color_2      = 86
  880. slot_troop_custom_banner_charge_color_1  = 87
  881. slot_troop_custom_banner_charge_color_2  = 88
  882. slot_troop_custom_banner_charge_color_3  = 89
  883. slot_troop_custom_banner_charge_color_4  = 90
  884. slot_troop_custom_banner_bg_type         = 91
  885. slot_troop_custom_banner_charge_type_1   = 92
  886. slot_troop_custom_banner_charge_type_2   = 93
  887. slot_troop_custom_banner_charge_type_3   = 94
  888. slot_troop_custom_banner_charge_type_4   = 95
  889. slot_troop_custom_banner_flag_type       = 96
  890. slot_troop_custom_banner_num_charges     = 97
  891. slot_troop_custom_banner_positioning     = 98
  892. slot_troop_custom_banner_map_flag_type   = 99
  893.  
  894. #conversation strings -- must be in this order!
  895. slot_troop_intro                        = 101
  896. slot_troop_intro_response_1             = 102
  897. slot_troop_intro_response_2             = 103
  898. slot_troop_backstory_a                  = 104
  899. slot_troop_backstory_b                  = 105
  900. slot_troop_backstory_c                  = 106
  901. slot_troop_backstory_delayed            = 107
  902. slot_troop_backstory_response_1         = 108
  903. slot_troop_backstory_response_2         = 109
  904. slot_troop_signup                       = 110
  905. slot_troop_signup_2                     = 111
  906. slot_troop_signup_response_1            = 112
  907. slot_troop_signup_response_2            = 113
  908. slot_troop_mentions_payment             = 114 #Not actually used
  909. slot_troop_payment_response             = 115 #Not actually used
  910. slot_troop_morality_speech              = 116
  911. slot_troop_2ary_morality_speech         = 117
  912. slot_troop_personalityclash_speech      = 118
  913. slot_troop_personalityclash_speech_b    = 119
  914. slot_troop_personalityclash2_speech     = 120
  915. slot_troop_personalityclash2_speech_b   = 121
  916. slot_troop_personalitymatch_speech      = 122
  917. slot_troop_personalitymatch_speech_b    = 123
  918. slot_troop_retirement_speech            = 124
  919. slot_troop_rehire_speech                = 125
  920. slot_troop_home_intro                   = 126
  921. slot_troop_home_description             = 127
  922. slot_troop_home_description_2           = 128
  923. slot_troop_home_recap                   = 129
  924. slot_troop_honorific                    = 130
  925. slot_troop_kingsupport_string_1         = 131
  926. slot_troop_kingsupport_string_2         = 132
  927. slot_troop_kingsupport_string_2a        = 133
  928. slot_troop_kingsupport_string_2b        = 134
  929. slot_troop_kingsupport_string_3         = 135
  930. slot_troop_kingsupport_objection_string = 136
  931. slot_troop_intel_gathering_string       = 137
  932. slot_troop_fief_acceptance_string       = 138
  933. slot_troop_woman_to_woman_string        = 139
  934. slot_troop_turn_against_string          = 140
  935.  
  936. slot_troop_strings_end                  = 141
  937.  
  938. slot_troop_payment_request              = 141
  939.  
  940. #141, support base removed, slot now available
  941.  
  942. slot_troop_kingsupport_state            = 142
  943. slot_troop_kingsupport_argument         = 143
  944. slot_troop_kingsupport_opponent         = 144
  945. slot_troop_kingsupport_objection_state  = 145 #0, default, 1, needs to voice, 2, has voiced
  946.  
  947. slot_troop_days_on_mission              = 150
  948. slot_troop_current_mission              = 151
  949. slot_troop_mission_object               = 152
  950. npc_mission_kingsupport                 = 1
  951. npc_mission_gather_intel                = 2
  952. npc_mission_peace_request               = 3
  953. npc_mission_pledge_vassal               = 4
  954. npc_mission_seek_recognition            = 5
  955. npc_mission_test_waters                 = 6
  956. npc_mission_non_aggression              = 7
  957. npc_mission_rejoin_when_possible        = 8
  958.  
  959. #Number of routed agents after battle ends.
  960. slot_troop_player_routed_agents                 = 146
  961. slot_troop_ally_routed_agents                   = 147
  962. slot_troop_enemy_routed_agents                  = 148
  963.  
  964. #Special quest slots
  965. slot_troop_mission_participation        = 149
  966. mp_unaware                              = 0
  967. mp_stay_out                             = 1
  968. mp_prison_break_fight                   = 2
  969. mp_prison_break_stand_back              = 3
  970. mp_prison_break_escaped                 = 4
  971. mp_prison_break_caught                  = 5
  972.  
  973. #Below are some constants to expand the political system a bit. The idea is to make quarrels less random, but instead make them serve a rational purpose -- as a disincentive to lords to seek
  974.  
  975. slot_troop_controversy                     = 150 #Determines whether or not a troop is likely to receive fief or marshalship
  976. slot_troop_recent_offense_type             = 151 #failure to join army, failure to support colleague
  977. slot_troop_recent_offense_object           = 152 #to whom it happened
  978. slot_troop_recent_offense_time             = 153
  979. slot_troop_stance_on_faction_issue         = 154 #when it happened
  980.  
  981. tro_failed_to_join_army                    = 1
  982. tro_failed_to_support_colleague            = 2
  983.  
  984. #CONTROVERSY
  985. #This is used to create a more "rational choice" model of faction politics, in which lords pick fights with other lords for gain, rather than simply because of clashing personalities
  986. #It is intended to be a limiting factor for players and lords in their ability to intrigue against each other. It represents the embroilment of a lord in internal factional disputes. In contemporary media English, a lord with high "controversy" would be described as "embattled."
  987. #The main effect of high controversy is that it disqualifies a lord from receiving a fief or an appointment
  988. #It is a key political concept because it provides incentive for much of the political activity. For example, Lord Red Senior is worried that his rival, Lord Blue Senior, is going to get a fied which Lord Red wants. So, Lord Red turns to his protege, Lord Orange Junior, to attack Lord Blue in public. The fief goes to Lord Red instead of Lord Blue, and Lord Red helps Lord Orange at a later date.
  989.  
  990.  
  991. slot_troop_will_join_prison_break      = 161
  992.  
  993.  
  994. troop_slots_reserved_for_relations_start        = 165 #this is based on id_troops, and might change
  995.  
  996. slot_troop_relations_begin              = 0 #this creates an array for relations between troops
  997.                                             #Right now, lords start at 165 and run to around 290, including pretenders
  998.  
  999.  
  1000.  
  1001. ########################################################
  1002. ##  PLAYER SLOTS           #############################
  1003. ########################################################
  1004.  
  1005. slot_player_spawned_this_round                 = 0
  1006. slot_player_last_rounds_used_item_earnings     = 1
  1007. slot_player_selected_item_indices_begin        = 2
  1008. slot_player_selected_item_indices_end          = 11
  1009. slot_player_cur_selected_item_indices_begin    = slot_player_selected_item_indices_end
  1010. slot_player_cur_selected_item_indices_end      = slot_player_selected_item_indices_end + 9
  1011. slot_player_join_time                          = 21
  1012. slot_player_button_index                       = 22 #used for presentations
  1013. slot_player_can_answer_poll                    = 23
  1014. slot_player_first_spawn                        = 24
  1015. slot_player_spawned_at_siege_round             = 25
  1016. slot_player_poll_disabled_until_time           = 26
  1017. slot_player_total_equipment_value              = 27
  1018. slot_player_last_team_select_time              = 28
  1019. slot_player_death_pos_x                        = 29
  1020. slot_player_death_pos_y                        = 30
  1021. slot_player_death_pos_z                        = 31
  1022. slot_player_damage_given_to_target_1           = 32 #used only in destroy mod
  1023. slot_player_damage_given_to_target_2           = 33 #used only in destroy mod
  1024. slot_player_last_bot_count                     = 34
  1025. slot_player_bot_type_1_wanted                  = 35
  1026. slot_player_bot_type_2_wanted                  = 36
  1027. slot_player_bot_type_3_wanted                  = 37
  1028. slot_player_bot_type_4_wanted                  = 38
  1029. slot_player_spawn_count                        = 39
  1030.  
  1031.  
  1032. ########################################################
  1033. ##  TEAM SLOTS             #############################
  1034. ########################################################
  1035.  
  1036. slot_team_flag_situation                       = 0
  1037.  
  1038.  
  1039.  
  1040.  
  1041. #Rebellion changes end
  1042. # character backgrounds
  1043. cb_noble = 1
  1044. cb_merchant = 2
  1045. cb_guard = 3
  1046. cb_forester = 4
  1047. cb_nomad = 5
  1048. cb_thief = 6
  1049. cb_priest = 7
  1050.  
  1051. cb2_page = 0
  1052. cb2_apprentice = 1
  1053. cb2_urchin  = 2
  1054. cb2_steppe_child = 3
  1055. cb2_merchants_helper = 4
  1056. ##diplomacy start+ add background constants
  1057. dplmc_cb2_mummer = 5
  1058. dplmc_cb2_courtier = 6
  1059. dplmc_cb2_noble = 7
  1060. dplmc_cb2_acolyte = 8
  1061. ##diplomacy end+
  1062.  
  1063. ##diplomacy start+ add background constants
  1064. dplmc_cb3_bravo = 1
  1065. dplmc_cb3_merc = 2
  1066. ##diplomacy end+
  1067. cb3_poacher = 3
  1068. cb3_craftsman = 4
  1069. cb3_peddler = 5
  1070. ##diplomacy start+ add background constants
  1071. dplmc_cb3_preacher = 6
  1072. ##diplomacy end+
  1073. cb3_troubadour = 7
  1074. cb3_squire = 8
  1075. cb3_lady_in_waiting = 9
  1076. cb3_student = 10
  1077.  
  1078. cb4_revenge = 1
  1079. cb4_loss    = 2
  1080. cb4_wanderlust =  3
  1081. ##diplomacy start+ add background constants
  1082. dplmc_cb4_fervor = 4
  1083. ##diplomacy end+
  1084. cb4_disown  = 5
  1085. cb4_greed  = 6
  1086.  
  1087. #NPC system changes end
  1088. #Encounter types
  1089. enctype_fighting_against_village_raid = 1
  1090. enctype_catched_during_village_raid   = 2
  1091.  
  1092.  
  1093. ### Troop occupations slot_troop_occupation
  1094. ##slto_merchant           = 1
  1095. slto_inactive           = 0 #for companions at the beginning of the game
  1096.  
  1097. slto_kingdom_hero       = 2
  1098.  
  1099. slto_player_companion   = 5 #This is specifically for companions in the employ of the player -- ie, in the party, or on a mission
  1100. slto_kingdom_lady       = 6 #Usually inactive (Calradia is a traditional place). However, can be made potentially active if active_npcs are expanded to include ladies
  1101. slto_kingdom_seneschal  = 7
  1102. slto_robber_knight      = 8
  1103. slto_inactive_pretender = 9
  1104.  
  1105.  
  1106. stl_unassigned          = -1
  1107. stl_reserved_for_player = -2
  1108. stl_rejected_by_player  = -3
  1109.  
  1110. #NPC changes begin
  1111. slto_retirement      = 11
  1112. #slto_retirement_medium    = 12
  1113. #slto_retirement_short     = 13
  1114. #NPC changes end
  1115. ##diplomacy start+
  1116.  
  1117. #These constants are not (yet) used, but they are defined so that other mods can
  1118. #extend diplomacy in a consistent way, and have confidence that base diplomacy
  1119. #will correctly respect the flags they set.
  1120.  
  1121. #Note that the existing code assumes that dplmc_slto_exile and dplmc_slto_dead are
  1122. #greater than slto_retirement.  If you had to change this, look around for every instance
  1123. #where diplomacy checks "troop_slot_ge" slto_retirement, and expand it to also check
  1124. #dead, exiled, etc.
  1125.  
  1126. dplmc_slto_exile           = 14 #Set for newly exiled lords.  In saved games, this is retroactively applied (once only).
  1127. dplmc_slto_dead            = 15 #not normally set
  1128. ##diplomacy end+
  1129.  
  1130. ########################################################
  1131. ##  QUEST SLOTS            #############################
  1132. ########################################################
  1133.  
  1134. slot_quest_target_center            = 1
  1135. slot_quest_target_troop             = 2
  1136. slot_quest_target_faction           = 3
  1137. slot_quest_object_troop             = 4
  1138. ##slot_quest_target_troop_is_prisoner = 5
  1139. slot_quest_giver_troop              = 6
  1140. slot_quest_object_center            = 7
  1141. slot_quest_target_party             = 8
  1142. slot_quest_target_party_template    = 9
  1143. slot_quest_target_amount            = 10
  1144. slot_quest_current_state            = 11
  1145. slot_quest_giver_center             = 12
  1146. slot_quest_target_dna               = 13
  1147. slot_quest_target_item              = 14
  1148. slot_quest_object_faction           = 15
  1149.  
  1150. slot_quest_target_state             = 16
  1151. slot_quest_object_state             = 17
  1152.  
  1153. slot_quest_convince_value           = 19
  1154. slot_quest_importance               = 20
  1155. slot_quest_xp_reward                = 21
  1156. slot_quest_gold_reward              = 22
  1157. slot_quest_expiration_days          = 23
  1158. slot_quest_dont_give_again_period   = 24
  1159. slot_quest_dont_give_again_remaining_days = 25
  1160.  
  1161. slot_quest_failure_consequence      = 26
  1162. slot_quest_temp_slot                = 27
  1163.  
  1164. ########################################################
  1165. ##  PARTY TEMPLATE SLOTS   #############################
  1166. ########################################################
  1167.  
  1168. # Ryan BEGIN
  1169. slot_party_template_num_killed   = 1
  1170.  
  1171. slot_party_template_lair_type           = 3
  1172. slot_party_template_lair_party          = 4
  1173. slot_party_template_lair_spawnpoint     = 5
  1174.  
  1175.  
  1176. # Ryan END
  1177.  
  1178.  
  1179. ########################################################
  1180. ##  SCENE PROP SLOTS       #############################
  1181. ########################################################
  1182.  
  1183. scene_prop_open_or_close_slot       = 1
  1184. scene_prop_smoke_effect_done        = 2
  1185. scene_prop_number_of_agents_pushing = 3 #for belfries only
  1186. scene_prop_next_entry_point_id      = 4 #for belfries only
  1187. scene_prop_belfry_platform_moved    = 5 #for belfries only
  1188. scene_prop_slots_end                = 6
  1189.  
  1190. ########################################################
  1191. rel_enemy   = 0
  1192. rel_neutral = 1
  1193. rel_ally    = 2
  1194.  
  1195.  
  1196. #Talk contexts
  1197. tc_town_talk                  = 0
  1198. tc_court_talk                 = 1
  1199. tc_party_encounter            = 2
  1200. tc_castle_gate                = 3
  1201. tc_siege_commander            = 4
  1202. tc_join_battle_ally           = 5
  1203. tc_join_battle_enemy          = 6
  1204. tc_castle_commander           = 7
  1205. tc_hero_freed                 = 8
  1206. tc_hero_defeated              = 9
  1207. tc_entering_center_quest_talk = 10
  1208. tc_back_alley                 = 11
  1209. tc_siege_won_seneschal        = 12
  1210. tc_ally_thanks                = 13
  1211. tc_tavern_talk                = 14
  1212. tc_rebel_thanks               = 15
  1213. tc_garden                     = 16
  1214. tc_courtship                  = 16
  1215. tc_after_duel                 = 17
  1216. tc_prison_break               = 18
  1217. tc_escape                     = 19
  1218. tc_give_center_to_fief        = 20
  1219. tc_merchants_house            = 21
  1220.  
  1221.  
  1222. #Troop Commentaries begin
  1223. #Log entry types
  1224. #civilian
  1225. logent_village_raided            = 1
  1226. logent_village_extorted          = 2
  1227. logent_caravan_accosted          = 3 #in caravan accosted, center and troop object are -1, and the defender's faction is the object
  1228. logent_traveller_attacked        = 3 #in traveller attacked, origin and destination are center and troop object, and the attacker's faction is the object
  1229.  
  1230. logent_helped_peasants           = 4
  1231.  
  1232. logent_party_traded              = 5
  1233.  
  1234. logent_castle_captured_by_player              = 10
  1235. logent_lord_defeated_by_player                = 11
  1236. logent_lord_captured_by_player                = 12
  1237. logent_lord_defeated_but_let_go_by_player     = 13
  1238. logent_player_defeated_by_lord                = 14
  1239. logent_player_retreated_from_lord             = 15
  1240. logent_player_retreated_from_lord_cowardly    = 16
  1241. logent_lord_helped_by_player                  = 17
  1242. logent_player_participated_in_siege           = 18
  1243. logent_player_participated_in_major_battle    = 19
  1244. logent_castle_given_to_lord_by_player         = 20
  1245.  
  1246. logent_pledged_allegiance          = 21
  1247. logent_liege_grants_fief_to_vassal = 22
  1248.  
  1249.  
  1250. logent_renounced_allegiance      = 23
  1251.  
  1252. logent_player_claims_throne_1                          = 24
  1253. logent_player_claims_throne_2                          = 25
  1254.  
  1255.  
  1256. logent_troop_feels_cheated_by_troop_over_land          = 26
  1257. logent_ruler_intervenes_in_quarrel                     = 27
  1258. logent_lords_quarrel_over_land                         = 28
  1259. logent_lords_quarrel_over_insult                       = 29
  1260. logent_marshal_vs_lord_quarrel                         = 30
  1261. logent_lords_quarrel_over_woman                        = 31
  1262.  
  1263. logent_lord_protests_marshall_appointment              = 32
  1264. logent_lord_blames_defeat                              = 33
  1265.  
  1266. logent_player_suggestion_succeeded                     = 35
  1267. logent_player_suggestion_failed                        = 36
  1268.  
  1269. logent_liege_promises_fief_to_vassal                   = 37
  1270.  
  1271. logent_lord_insults_lord_for_cowardice                 = 38
  1272. logent_lord_insults_lord_for_rashness                  = 39
  1273. logent_lord_insults_lord_for_abandonment               = 40
  1274. logent_lord_insults_lord_for_indecision                = 41
  1275. logent_lord_insults_lord_for_cruelty                   = 42
  1276. logent_lord_insults_lord_for_dishonor                  = 43
  1277.  
  1278.  
  1279.  
  1280.  
  1281. logent_game_start                           = 45
  1282. logent_poem_composed                        = 46 ##Not added
  1283. logent_tournament_distinguished             = 47 ##Not added
  1284. logent_tournament_won                       = 48 ##Not added
  1285.  
  1286. #logent courtship - lady is always actor, suitor is always troop object
  1287. logent_lady_favors_suitor                   = 51 #basically for gossip
  1288. logent_lady_betrothed_to_suitor_by_choice   = 52
  1289. logent_lady_betrothed_to_suitor_by_family   = 53
  1290. logent_lady_rejects_suitor                  = 54
  1291. logent_lady_father_rejects_suitor           = 55
  1292. logent_lady_marries_lord                    = 56
  1293. logent_lady_elopes_with_lord                = 57
  1294. logent_lady_rejected_by_suitor              = 58
  1295. logent_lady_betrothed_to_suitor_by_pressure = 59 #mostly for gossip
  1296.  
  1297. logent_lady_and_suitor_break_engagement     = 60
  1298. logent_lady_marries_suitor                  = 61
  1299.  
  1300. logent_lord_holds_lady_hostages             = 62
  1301. logent_challenger_defeats_lord_in_duel      = 63
  1302. logent_challenger_loses_to_lord_in_duel     = 64
  1303.  
  1304. logent_player_stole_cattles_from_village    = 66
  1305.  
  1306. logent_party_spots_wanted_bandits           = 70
  1307.  
  1308.  
  1309. logent_border_incident_cattle_stolen          = 72 #possibly add this to rumors for non-player faction
  1310. logent_border_incident_bride_abducted         = 73 #possibly add this to rumors for non-player faction
  1311. logent_border_incident_villagers_killed       = 74 #possibly add this to rumors for non-player faction
  1312. logent_border_incident_subjects_mistreated    = 75 #possibly add this to rumors for non-player faction
  1313.  
  1314. #These supplement caravans accosted and villages burnt, in that they create a provocation. So far, they only refer to the player
  1315. logent_border_incident_troop_attacks_neutral  = 76
  1316. logent_border_incident_troop_breaks_truce     = 77
  1317. logent_border_incident_troop_suborns_lord   = 78
  1318.  
  1319.  
  1320. logent_policy_ruler_attacks_without_provocation             = 80
  1321. logent_policy_ruler_ignores_provocation                     = 81 #possibly add this to rumors for non-player factions
  1322. logent_policy_ruler_makes_peace_too_soon                    = 82
  1323. logent_policy_ruler_declares_war_with_justification         = 83
  1324. logent_policy_ruler_breaks_truce                            = 84
  1325. logent_policy_ruler_issues_indictment_just                  = 85 #possibly add this to rumors for non-player faction
  1326. logent_policy_ruler_issues_indictment_questionable          = 86 #possibly add this to rumors for non-player faction
  1327.  
  1328. logent_player_faction_declares_war                          = 90 #this doubles for declare war to extend power
  1329. logent_faction_declares_war_out_of_personal_enmity          = 91
  1330. logent_faction_declares_war_to_regain_territory             = 92
  1331. logent_faction_declares_war_to_curb_power                   = 93
  1332. logent_faction_declares_war_to_respond_to_provocation       = 94
  1333. ##diplomacy begin
  1334. logent_faction_declares_war_to_fulfil_pact      = 95
  1335. logent_war_declaration_types_end                            = 96
  1336. ##diplomacy end
  1337.  
  1338. #logent_lady_breaks_betrothal_with_lord      = 58
  1339. #logent_lady_betrothal_broken_by_lord        = 59
  1340.  
  1341. #lord reputation type, for commentaries
  1342. #"Martial" will be twice as common as the other types
  1343. lrep_none           = 0
  1344. lrep_martial        = 1 #chivalrous but not terribly empathetic or introspective, - eg Richard Lionheart, your average 14th century French baron
  1345. lrep_quarrelsome    = 2 #spiteful, cynical, a bit paranoid, possibly hotheaded - eg Robert Graves' Tiberius, some of Charles VI's uncles
  1346. lrep_selfrighteous  = 3 #coldblooded, moralizing, often cruel - eg William the Conqueror, Timur, Octavian, Aurangzeb (although he is arguably upstanding instead, particularly after his accession)
  1347. lrep_cunning        = 4 #coldblooded, pragmatic, amoral - eg Louis XI, Guiscard, Akbar Khan, Abd al-Aziz Ibn Saud
  1348. lrep_debauched      = 5 #spiteful, amoral, sadistic - eg Caligula, Tuchman's Charles of Navarre
  1349. lrep_goodnatured    = 6 #chivalrous, benevolent, perhaps a little too decent to be a good warlord - eg Hussein ibn Ali. Few well-known historical examples maybe. because many lack the drive to rise to faction leadership. Ranjit Singh has aspects
  1350. lrep_upstanding     = 7 #moralizing, benevolent, pragmatic, - eg Bernard Cornwell's Alfred, Charlemagne, Salah al-Din, Sher Shah Suri
  1351.  
  1352. lrep_roguish        = 8 #used for commons, specifically ex-companions. Tries to live life as a lord to the full
  1353. lrep_benefactor     = 9 #used for commons, specifically ex-companions. Tries to improve lot of folks on land
  1354. lrep_custodian      = 10 #used for commons, specifically ex-companions. Tries to maximize fief's earning potential
  1355.  
  1356. #lreps specific to dependent noblewomen
  1357. lrep_conventional    = 21 #Charlotte York in SATC seasons 1-2, probably most medieval aristocrats
  1358. lrep_adventurous     = 22 #Tomboyish. However, this basically means that she likes to travel and hunt, and perhaps yearn for wider adventures. However, medieval noblewomen who fight are rare, and those that attempt to live independently of a man are rarer still, and best represented by pre-scripted individuals like companions
  1359. lrep_otherworldly    = 23 #Prone to mysticism, romantic.
  1360. lrep_ambitious       = 24 #Lady Macbeth
  1361. lrep_moralist        = 25 #Equivalent of upstanding or benefactor -- takes nobless oblige, and her traditional role as repository of morality, very seriously. Based loosely on Christine de Pisa
  1362.  
  1363. #a more complicated system of reputation could include the following...
  1364.  
  1365. #successful vs unlucky -- basic gauge of success
  1366. #daring vs cautious -- maybe not necessary
  1367. #honorable/pious/ideological vs unscrupulous -- character's adherance to an external code of conduct. Fails to capture complexity of people like Aurangzeb, maybe, but good for NPCs
  1368.     #(visionary/altruist and orthodox/unorthodox could be a subset of the above, or the specific external code could be another tag)
  1369. #generous/loyal vs manipulative/exploitative -- character's sense of duty to specific individuals, based on their relationship. Affects loyalty of troops, etc
  1370. #merciful vs cruel/ruthless/sociopathic -- character's general sense of compassion. Sher Shah is example of unscrupulous and merciful (the latter to a degree).
  1371. #dignified vs unconventional -- character's adherance to social conventions. Very important, given the times
  1372.  
  1373. ##diplomacy start+
  1374. #Define these for clarity and convenience elsewhere
  1375. dplmc_lrep_ladies_begin = lrep_conventional
  1376. dplmc_lrep_ladies_end = lrep_moralist + 1
  1377.  
  1378. dplmc_lrep_commoners_begin = lrep_roguish
  1379. dplmc_lrep_commoners_end = dplmc_lrep_ladies_begin
  1380.  
  1381. dplmc_lrep_nobles_including_liege_begin = lrep_none
  1382. dplmc_lrep_nobles_begin = lrep_martial
  1383. dplmc_lrep_nobles_end = dplmc_lrep_commoners_begin
  1384. ##diplomacy end+
  1385.  
  1386. courtship_poem_tragic      = 1 #Emphasizes longing, Laila and Majnoon
  1387. courtship_poem_heroic      = 2 #Norse sagas with female heroines
  1388. courtship_poem_comic       = 3 #Emphasis on witty repartee -- Contrasto (Sicilian school satire)
  1389. courtship_poem_mystic      = 4 #Sufi poetry. Song of Songs
  1390. courtship_poem_allegoric   = 5 #Idealizes woman as a civilizing force -- the Romance of the Rose, Siege of the Castle of Love
  1391.  
  1392. #courtship gifts currently deprecated
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400. #Troop Commentaries end
  1401.  
  1402. tutorial_fighters_begin = "trp_tutorial_fighter_1"
  1403. tutorial_fighters_end   = "trp_tutorial_archer_1"
  1404.  
  1405. #Walker types:
  1406. walkert_default            = 0
  1407. walkert_needs_money        = 1
  1408. walkert_needs_money_helped = 2
  1409. walkert_spy                = 3
  1410. num_town_walkers = 8
  1411. town_walker_entries_start = 32
  1412.  
  1413. reinforcement_cost_easy = 600
  1414. reinforcement_cost_moderate = 450
  1415. reinforcement_cost_hard = 300
  1416.  
  1417. merchant_toll_duration        = 72 #Tolls are valid for 72 hours
  1418.  
  1419. hero_escape_after_defeat_chance = 70
  1420.  
  1421.  
  1422. raid_distance = 4
  1423.  
  1424. surnames_begin = "str_surname_1"
  1425. surnames_end = "str_surnames_end"
  1426. names_begin = "str_name_1"
  1427. names_end = surnames_begin
  1428. countersigns_begin = "str_countersign_1"
  1429. countersigns_end = names_begin
  1430. secret_signs_begin = "str_secret_sign_1"
  1431. secret_signs_end = countersigns_begin
  1432.  
  1433. kingdom_titles_male_begin = "str_faction_title_male_player"
  1434. kingdom_titles_female_begin = "str_faction_title_female_player"
  1435.  
  1436. ##diplomacy start+
  1437. cultures_begin = "fac_culture_1"
  1438. cultures_end   = "fac_player_faction"
  1439. ##diplomacy end+
  1440.  
  1441. kingdoms_begin = "fac_player_supporters_faction"
  1442. kingdoms_end = "fac_kingdoms_end"
  1443.  
  1444. npc_kingdoms_begin = "fac_kingdom_1"
  1445. npc_kingdoms_end = kingdoms_end
  1446.  
  1447. bandits_begin = "trp_bandit"
  1448. bandits_end = "trp_black_khergit_horseman"
  1449.  
  1450. kingdom_ladies_begin = "trp_knight_1_1_wife"
  1451. kingdom_ladies_end = "trp_heroes_end"
  1452.  
  1453. #active NPCs in order: companions, kings, lords, pretenders
  1454.  
  1455. pretenders_begin = "trp_kingdom_1_pretender"
  1456. pretenders_end = kingdom_ladies_begin
  1457.  
  1458. lords_begin = "trp_knight_1_1"
  1459. lords_end = pretenders_begin
  1460.  
  1461. kings_begin = "trp_kingdom_1_lord"
  1462. kings_end = lords_begin
  1463.  
  1464. companions_begin = "trp_npc1"
  1465. companions_end = kings_begin
  1466.  
  1467. active_npcs_begin = "trp_npc1"
  1468. active_npcs_end = kingdom_ladies_begin
  1469. #"active_npcs_begin replaces kingdom_heroes_begin to allow for companions to become lords. Includes anyone who may at some point lead their own party: the original kingdom heroes, companions who may become kingdom heroes, and pretenders. (slto_kingdom_hero as an occupation means that you lead a party on the map. Pretenders have the occupation "slto_inactive_pretender", even if they are part of a player's party, until they have their own independent party)
  1470. #If you're a modder and you don't want to go through and switch every kingdom_heroes to active_npcs, simply define a constant: kingdom_heroes_begin = active_npcs_begin., and kingdom_heroes_end = active_npcs_end. I haven't tested for that, but I think it should work.
  1471.  
  1472. active_npcs_including_player_begin = "trp_kingdom_heroes_including_player_begin"
  1473. original_kingdom_heroes_begin = "trp_kingdom_1_lord"
  1474.  
  1475. heroes_begin = active_npcs_begin
  1476. heroes_end = kingdom_ladies_end
  1477.  
  1478. soldiers_begin = "trp_farmer"
  1479. soldiers_end = "trp_town_walker_1"
  1480.  
  1481. #Rebellion changes
  1482.  
  1483. ##rebel_factions_begin = "fac_kingdom_1_rebels"
  1484. ##rebel_factions_end =   "fac_kingdoms_end"
  1485.  
  1486. pretenders_begin = "trp_kingdom_1_pretender"
  1487. pretenders_end = active_npcs_end
  1488. #Rebellion changes
  1489.  
  1490. tavern_minstrels_begin = "trp_tavern_minstrel_1"
  1491. tavern_minstrels_end   = "trp_kingdom_heroes_including_player_begin"
  1492.  
  1493. tavern_booksellers_begin = "trp_tavern_bookseller_1"
  1494. tavern_booksellers_end   = tavern_minstrels_begin
  1495.  
  1496. tavern_travelers_begin = "trp_tavern_traveler_1"
  1497. tavern_travelers_end   = tavern_booksellers_begin
  1498.  
  1499. ransom_brokers_begin = "trp_ransom_broker_1"
  1500. ransom_brokers_end   = tavern_travelers_begin
  1501.  
  1502. mercenary_troops_begin = "trp_watchman"
  1503. mercenary_troops_end = "trp_mercenaries_end"
  1504.  
  1505. multiplayer_troops_begin = "trp_swadian_crossbowman_multiplayer"
  1506. multiplayer_troops_end = "trp_multiplayer_end"
  1507.  
  1508. multiplayer_ai_troops_begin = "trp_swadian_crossbowman_multiplayer_ai"
  1509. multiplayer_ai_troops_end = multiplayer_troops_begin
  1510.  
  1511. multiplayer_scenes_begin = "scn_multi_scene_1"
  1512. multiplayer_scenes_end = "scn_multiplayer_maps_end"
  1513.  
  1514. multiplayer_scene_names_begin = "str_multi_scene_1"
  1515. multiplayer_scene_names_end = "str_multi_scene_end"
  1516.  
  1517. multiplayer_flag_projections_begin = "mesh_flag_project_sw"
  1518. multiplayer_flag_projections_end = "mesh_flag_projects_end"
  1519.  
  1520. multiplayer_flag_taken_projections_begin = "mesh_flag_project_sw_miss"
  1521. multiplayer_flag_taken_projections_end = "mesh_flag_project_misses_end"
  1522.  
  1523. multiplayer_game_type_names_begin = "str_multi_game_type_1"
  1524. multiplayer_game_type_names_end = "str_multi_game_types_end"
  1525.  
  1526. quick_battle_troops_begin = "trp_quick_battle_troop_1"
  1527. quick_battle_troops_end = "trp_quick_battle_troops_end"
  1528.  
  1529. quick_battle_troop_texts_begin = "str_quick_battle_troop_1"
  1530. quick_battle_troop_texts_end = "str_quick_battle_troops_end"
  1531.  
  1532. quick_battle_scenes_begin = "scn_quick_battle_scene_1"
  1533. quick_battle_scenes_end = "scn_quick_battle_maps_end"
  1534.  
  1535. quick_battle_scene_images_begin = "mesh_cb_ui_maps_scene_01"
  1536.  
  1537. quick_battle_battle_scenes_begin = quick_battle_scenes_begin
  1538. quick_battle_battle_scenes_end = "scn_quick_battle_scene_4"
  1539.  
  1540. quick_battle_siege_scenes_begin = quick_battle_battle_scenes_end
  1541. quick_battle_siege_scenes_end = quick_battle_scenes_end
  1542.  
  1543. quick_battle_scene_names_begin = "str_quick_battle_scene_1"
  1544.  
  1545. lord_quests_begin = "qst_deliver_message"
  1546. lord_quests_end   = "qst_follow_army"
  1547.  
  1548. lord_quests_begin_2 = "qst_destroy_bandit_lair"
  1549. lord_quests_end_2   = "qst_blank_quest_2"
  1550.  
  1551. enemy_lord_quests_begin = "qst_lend_surgeon"
  1552. enemy_lord_quests_end   = lord_quests_end
  1553.  
  1554. village_elder_quests_begin = "qst_deliver_grain"
  1555. village_elder_quests_end = "qst_eliminate_bandits_infesting_village"
  1556.  
  1557. village_elder_quests_begin_2 = "qst_blank_quest_6"
  1558. village_elder_quests_end_2   = "qst_blank_quest_6"
  1559.  
  1560. mayor_quests_begin  = "qst_move_cattle_herd"
  1561. mayor_quests_end    = village_elder_quests_begin
  1562.  
  1563. mayor_quests_begin_2 = "qst_blank_quest_11"
  1564. mayor_quests_end_2   = "qst_blank_quest_11"
  1565.  
  1566. lady_quests_begin = "qst_rescue_lord_by_replace"
  1567. lady_quests_end   = mayor_quests_begin
  1568.  
  1569. lady_quests_begin_2 = "qst_blank_quest_16"
  1570. lady_quests_end_2   = "qst_blank_quest_16"
  1571.  
  1572. army_quests_begin = "qst_deliver_cattle_to_army"
  1573. army_quests_end   = lady_quests_begin
  1574.  
  1575. army_quests_begin_2 = "qst_blank_quest_21"
  1576. army_quests_end_2   = "qst_blank_quest_21"
  1577.  
  1578. player_realm_quests_begin = "qst_resolve_dispute"
  1579. player_realm_quests_end = "qst_blank_quest_1"
  1580.  
  1581. player_realm_quests_begin_2 = "qst_blank_quest_26"
  1582. player_realm_quests_end_2 = "qst_blank_quest_26"
  1583.  
  1584. all_items_begin = 0
  1585. all_items_end = "itm_items_end"
  1586.  
  1587. all_quests_begin = 0
  1588. all_quests_end = "qst_quests_end"
  1589.  
  1590. towns_begin = "p_town_1"
  1591. castles_begin = "p_castle_1"
  1592. villages_begin = "p_village_1"
  1593.  
  1594. towns_end = castles_begin
  1595. castles_end = villages_begin
  1596. villages_end   = "p_salt_mine"
  1597.  
  1598. walled_centers_begin = towns_begin
  1599. walled_centers_end   = castles_end
  1600.  
  1601. centers_begin = towns_begin
  1602. centers_end   = villages_end
  1603.  
  1604. training_grounds_begin   = "p_training_ground_1"
  1605. training_grounds_end     = "p_Bridge_1"
  1606.  
  1607. scenes_begin = "scn_town_1_center"
  1608. scenes_end = "scn_castle_1_exterior"
  1609.  
  1610. spawn_points_begin = "p_zendar"
  1611. spawn_points_end = "p_spawn_points_end"
  1612.  
  1613. regular_troops_begin       = "trp_novice_fighter"
  1614. regular_troops_end         = "trp_tournament_master"
  1615.  
  1616. swadian_merc_parties_begin = "p_town_1_mercs"
  1617. swadian_merc_parties_end   = "p_town_8_mercs"
  1618.  
  1619. vaegir_merc_parties_begin  = "p_town_8_mercs"
  1620. vaegir_merc_parties_end    = "p_zendar"
  1621.  
  1622. arena_masters_begin    = "trp_town_1_arena_master"
  1623. arena_masters_end      = "trp_town_1_armorer"
  1624.  
  1625. training_gound_trainers_begin    = "trp_trainer_1"
  1626. training_gound_trainers_end      = "trp_ransom_broker_1"
  1627.  
  1628. town_walkers_begin = "trp_town_walker_1"
  1629. town_walkers_end = "trp_village_walker_1"
  1630.  
  1631. village_walkers_begin = "trp_village_walker_1"
  1632. village_walkers_end   = "trp_spy_walker_1"
  1633.  
  1634. spy_walkers_begin = "trp_spy_walker_1"
  1635. spy_walkers_end = "trp_tournament_master"
  1636.  
  1637. walkers_begin = town_walkers_begin
  1638. walkers_end   = spy_walkers_end
  1639.  
  1640. armor_merchants_begin  = "trp_town_1_armorer"
  1641. armor_merchants_end    = "trp_town_1_weaponsmith"
  1642.  
  1643. weapon_merchants_begin = "trp_town_1_weaponsmith"
  1644. weapon_merchants_end   = "trp_town_1_tavernkeeper"
  1645.  
  1646. tavernkeepers_begin    = "trp_town_1_tavernkeeper"
  1647. tavernkeepers_end      = "trp_town_1_merchant"
  1648.  
  1649. goods_merchants_begin  = "trp_town_1_merchant"
  1650. goods_merchants_end    = "trp_town_1_horse_merchant"
  1651.  
  1652. horse_merchants_begin  = "trp_town_1_horse_merchant"
  1653. horse_merchants_end    = "trp_town_1_mayor"
  1654.  
  1655. mayors_begin           = "trp_town_1_mayor"
  1656. mayors_end             = "trp_village_1_elder"
  1657.  
  1658. village_elders_begin   = "trp_village_1_elder"
  1659. village_elders_end     = "trp_merchants_end"
  1660.  
  1661. startup_merchants_begin = "trp_swadian_merchant"
  1662. startup_merchants_end = "trp_startup_merchants_end"
  1663.  
  1664. ##diplomacy start+
  1665. tournament_champions_begin = "trp_Xerina"
  1666. tournament_champions_end   = "trp_tutorial_trainer"
  1667.  
  1668. merchants_begin = armor_merchants_begin
  1669. merchants_end = village_elders_end
  1670.  
  1671. dplmc_employees_begin = "trp_dplmc_chamberlain"#Individual employees (chancellor, constable, chamberlain)
  1672. dplmc_employees_end   = "trp_dplmc_messenger"#The messenger is not included, since it's a generic figure rather than a specific person.
  1673. ##diplomacy end+
  1674.  
  1675.  
  1676. num_max_items = 10000 #used for multiplayer mode
  1677.  
  1678. average_price_factor = 1000
  1679. minimum_price_factor = 100
  1680. maximum_price_factor = 10000
  1681.  
  1682. village_prod_min = 0 #was -5
  1683. village_prod_max = 20 #was 20
  1684.  
  1685. trade_goods_begin = "itm_spice"
  1686. trade_goods_end = "itm_siege_supply"
  1687. food_begin = "itm_smoked_fish"
  1688. food_end = "itm_siege_supply"
  1689. reference_books_begin = "itm_book_wound_treatment_reference"
  1690. reference_books_end   = trade_goods_begin
  1691. readable_books_begin = "itm_book_tactics"
  1692. readable_books_end   = reference_books_begin
  1693. books_begin = readable_books_begin
  1694. books_end = reference_books_end
  1695. horses_begin = "itm_sumpter_horse"
  1696. horses_end = "itm_arrows"
  1697. weapons_begin = "itm_wooden_stick"
  1698. weapons_end = "itm_wooden_shield"
  1699. ranged_weapons_begin = "itm_darts"
  1700. ranged_weapons_end = "itm_torch"
  1701. armors_begin = "itm_leather_gloves"
  1702. armors_end = "itm_wooden_stick"
  1703. shields_begin = "itm_wooden_shield"
  1704. shields_end = ranged_weapons_begin
  1705.  
  1706. # Banner constants
  1707.  
  1708. banner_meshes_begin = "mesh_banner_a01"
  1709. banner_meshes_end_minus_one = "mesh_banner_f21"
  1710.  
  1711. arms_meshes_begin = "mesh_arms_a01"
  1712. arms_meshes_end_minus_one = "mesh_arms_f21"
  1713.  
  1714. custom_banner_charges_begin = "mesh_custom_banner_charge_01"
  1715. custom_banner_charges_end = "mesh_tableau_mesh_custom_banner"
  1716.  
  1717. custom_banner_backgrounds_begin = "mesh_custom_banner_bg"
  1718. custom_banner_backgrounds_end = custom_banner_charges_begin
  1719.  
  1720. custom_banner_flag_types_begin = "mesh_custom_banner_01"
  1721. custom_banner_flag_types_end = custom_banner_backgrounds_begin
  1722.  
  1723. custom_banner_flag_map_types_begin = "mesh_custom_map_banner_01"
  1724. custom_banner_flag_map_types_end = custom_banner_flag_types_begin
  1725.  
  1726. custom_banner_flag_scene_props_begin = "spr_custom_banner_01"
  1727. custom_banner_flag_scene_props_end = "spr_banner_a"
  1728.  
  1729. custom_banner_map_icons_begin = "icon_custom_banner_01"
  1730. custom_banner_map_icons_end = "icon_banner_01"
  1731.  
  1732. banner_map_icons_begin = "icon_banner_01"
  1733. banner_map_icons_end_minus_one = "icon_banner_136"
  1734.  
  1735. banner_scene_props_begin = "spr_banner_a"
  1736. banner_scene_props_end_minus_one = "spr_banner_f21"
  1737.  
  1738. khergit_banners_begin_offset = 63
  1739. khergit_banners_end_offset = 84
  1740.  
  1741. sarranid_banners_begin_offset = 105
  1742. sarranid_banners_end_offset = 125
  1743.  
  1744. banners_end_offset = 136
  1745.  
  1746. # Some constants for merchant invenotries
  1747. merchant_inventory_space = 30
  1748. num_merchandise_goods = 40
  1749.  
  1750. num_max_river_pirates = 25
  1751. num_max_zendar_peasants = 25
  1752. num_max_zendar_manhunters = 10
  1753.  
  1754. num_max_dp_bandits = 10
  1755. num_max_refugees = 10
  1756. num_max_deserters = 10
  1757.  
  1758. num_max_militia_bands = 15
  1759. num_max_armed_bands = 12
  1760.  
  1761. num_max_vaegir_punishing_parties = 20
  1762. num_max_rebel_peasants = 25
  1763.  
  1764. num_max_frightened_farmers = 50
  1765. num_max_undead_messengers  = 20
  1766.  
  1767. num_forest_bandit_spawn_points = 1
  1768. num_mountain_bandit_spawn_points = 1
  1769. num_steppe_bandit_spawn_points = 1
  1770. num_taiga_bandit_spawn_points = 1
  1771. num_desert_bandit_spawn_points = 1
  1772. num_black_khergit_spawn_points = 1
  1773. num_sea_raider_spawn_points = 2
  1774.  
  1775. peak_prisoner_trains = 4
  1776. peak_kingdom_caravans = 12
  1777. peak_kingdom_messengers = 3
  1778.  
  1779.  
  1780. # Note positions
  1781. note_troop_location = 3
  1782.  
  1783. #battle tactics
  1784. btactic_hold = 1
  1785. btactic_follow_leader = 2
  1786. btactic_charge = 3
  1787. btactic_stand_ground = 4
  1788.  
  1789. #default right mouse menu orders
  1790. cmenu_move = -7
  1791. cmenu_follow = -6
  1792.  
  1793. # Town center modes - resets in game menus during the options
  1794. tcm_default         = 0
  1795. tcm_disguised       = 1
  1796. tcm_prison_break    = 2
  1797. tcm_escape          = 3
  1798.  
  1799.  
  1800. # Arena battle modes
  1801. #abm_fight = 0
  1802. abm_training = 1
  1803. abm_visit = 2
  1804. abm_tournament = 3
  1805.  
  1806. # Camp training modes
  1807. ctm_melee    = 1
  1808. ctm_ranged   = 2
  1809. ctm_mounted  = 3
  1810. ctm_training = 4
  1811.  
  1812. # Village bandits attack modes
  1813. vba_normal          = 1
  1814. vba_after_training  = 2
  1815.  
  1816. arena_tier1_opponents_to_beat = 3
  1817. arena_tier1_prize = 5
  1818. arena_tier2_opponents_to_beat = 6
  1819. arena_tier2_prize = 10
  1820. arena_tier3_opponents_to_beat = 10
  1821. arena_tier3_prize = 25
  1822. arena_tier4_opponents_to_beat = 20
  1823. arena_tier4_prize = 60
  1824. arena_grand_prize = 250
  1825.  
  1826.  
  1827. #Additions
  1828. price_adjustment = 25 #the percent by which a trade at a center alters price
  1829.  
  1830. fire_duration = 4 #fires takes 4 hours
  1831.  
  1832. #NORMAL ACHIEVEMENTS
  1833. ACHIEVEMENT_NONE_SHALL_PASS = 1,
  1834. ACHIEVEMENT_MAN_EATER = 2,
  1835. ACHIEVEMENT_THE_HOLY_HAND_GRENADE = 3,
  1836. ACHIEVEMENT_LOOK_AT_THE_BONES = 4,
  1837. ACHIEVEMENT_KHAAAN = 5,
  1838. ACHIEVEMENT_GET_UP_STAND_UP = 6,
  1839. ACHIEVEMENT_BARON_GOT_BACK = 7,
  1840. ACHIEVEMENT_BEST_SERVED_COLD = 8,
  1841. ACHIEVEMENT_TRICK_SHOT = 9,
  1842. ACHIEVEMENT_GAMBIT = 10,
  1843. ACHIEVEMENT_OLD_SCHOOL_SNIPER = 11,
  1844. ACHIEVEMENT_CALRADIAN_ARMY_KNIFE = 12,
  1845. ACHIEVEMENT_MOUNTAIN_BLADE = 13,
  1846. ACHIEVEMENT_HOLY_DIVER = 14,
  1847. ACHIEVEMENT_FORCE_OF_NATURE = 15,
  1848.  
  1849. #SKILL RELATED ACHIEVEMENTS:
  1850. ACHIEVEMENT_BRING_OUT_YOUR_DEAD = 16,
  1851. ACHIEVEMENT_MIGHT_MAKES_RIGHT = 17,
  1852. ACHIEVEMENT_COMMUNITY_SERVICE = 18,
  1853. ACHIEVEMENT_AGILE_WARRIOR = 19,
  1854. ACHIEVEMENT_MELEE_MASTER = 20,
  1855. ACHIEVEMENT_DEXTEROUS_DASTARD = 21,
  1856. ACHIEVEMENT_MIND_ON_THE_MONEY = 22,
  1857. ACHIEVEMENT_ART_OF_WAR = 23,
  1858. ACHIEVEMENT_THE_RANGER = 24,
  1859. ACHIEVEMENT_TROJAN_BUNNY_MAKER = 25,
  1860.  
  1861. #MAP RELATED ACHIEVEMENTS:
  1862. ACHIEVEMENT_MIGRATING_COCONUTS = 26,
  1863. ACHIEVEMENT_HELP_HELP_IM_BEING_REPRESSED = 27,
  1864. ACHIEVEMENT_SARRANIDIAN_NIGHTS = 28,
  1865. ACHIEVEMENT_OLD_DIRTY_SCOUNDREL = 29,
  1866. ACHIEVEMENT_THE_BANDIT = 30,
  1867. ACHIEVEMENT_GOT_MILK = 31,
  1868. ACHIEVEMENT_SOLD_INTO_SLAVERY = 32,
  1869. ACHIEVEMENT_MEDIEVAL_TIMES = 33,
  1870. ACHIEVEMENT_GOOD_SAMARITAN = 34,
  1871. ACHIEVEMENT_MORALE_LEADER = 35,
  1872. ACHIEVEMENT_ABUNDANT_FEAST = 36,
  1873. ACHIEVEMENT_BOOK_WORM = 37,
  1874. ACHIEVEMENT_ROMANTIC_WARRIOR = 38,
  1875.  
  1876. #POLITICALLY ORIENTED ACHIEVEMENTS:
  1877. ACHIEVEMENT_HAPPILY_EVER_AFTER = 39,
  1878. ACHIEVEMENT_HEART_BREAKER = 40,
  1879. ACHIEVEMENT_AUTONOMOUS_COLLECTIVE = 41,
  1880. ACHIEVEMENT_I_DUB_THEE = 42,
  1881. ACHIEVEMENT_SASSY = 43,
  1882. ACHIEVEMENT_THE_GOLDEN_THRONE = 44,
  1883. ACHIEVEMENT_KNIGHTS_OF_THE_ROUND = 45,
  1884. ACHIEVEMENT_TALKING_HELPS = 46,
  1885. ACHIEVEMENT_KINGMAKER = 47,
  1886. ACHIEVEMENT_PUGNACIOUS_D = 48,
  1887. ACHIEVEMENT_GOLD_FARMER = 49,
  1888. ACHIEVEMENT_ROYALITY_PAYMENT = 50,
  1889. ACHIEVEMENT_MEDIEVAL_EMLAK = 51,
  1890. ACHIEVEMENT_CALRADIAN_TEA_PARTY = 52,
  1891. ACHIEVEMENT_MANIFEST_DESTINY = 53,
  1892. ACHIEVEMENT_CONCILIO_CALRADI = 54,
  1893. ACHIEVEMENT_VICTUM_SEQUENS = 55,
  1894.  
  1895. #MULTIPLAYER ACHIEVEMENTS:
  1896. ACHIEVEMENT_THIS_IS_OUR_LAND = 56,
  1897. ACHIEVEMENT_SPOIL_THE_CHARGE = 57,
  1898. ACHIEVEMENT_HARASSING_HORSEMAN = 58,
  1899. ACHIEVEMENT_THROWING_STAR = 59,
  1900. ACHIEVEMENT_SHISH_KEBAB = 60,
  1901. ACHIEVEMENT_RUIN_THE_RAID = 61,
  1902. ACHIEVEMENT_LAST_MAN_STANDING = 62,
  1903. ACHIEVEMENT_EVERY_BREATH_YOU_TAKE = 63,
  1904. ACHIEVEMENT_CHOPPY_CHOP_CHOP = 64,
  1905. ACHIEVEMENT_MACE_IN_YER_FACE = 65,
  1906. ACHIEVEMENT_THE_HUSCARL = 66,
  1907. ACHIEVEMENT_GLORIOUS_MOTHER_FACTION = 67,
  1908. ACHIEVEMENT_ELITE_WARRIOR = 68,
  1909.  
  1910. #COMBINED ACHIEVEMENTS
  1911. ACHIEVEMENT_SON_OF_ODIN = 69,
  1912. ACHIEVEMENT_KING_ARTHUR = 70,
  1913. ACHIEVEMENT_KASSAI_MASTER = 71,
  1914. ACHIEVEMENT_IRON_BEAR = 72,
  1915. ACHIEVEMENT_LEGENDARY_RASTAM = 73,
  1916. ACHIEVEMENT_SVAROG_THE_MIGHTY = 74,
  1917.  
  1918. ACHIEVEMENT_MEN_HANDLER = 75,
  1919. ACHIEVEMENT_GIRL_POWER = 76,
  1920. ACHIEVEMENT_QUEEN = 77,
  1921. ACHIEVEMENT_EMPRESS = 78,
  1922. ACHIEVEMENT_TALK_OF_THE_TOWN = 79,
  1923. ACHIEVEMENT_LADY_OF_THE_LAKE = 80,
  1924.  
  1925. ##diplomacy begin
  1926. # recruiter kit begin
  1927. dplmc_slot_party_recruiter_needed_recruits = 233           # Amount of recruits the employer ordered.
  1928. dplmc_slot_party_recruiter_origin = 234                    # Walled center from where the recruiter was hired.
  1929. dplmc_slot_village_reserved_by_recruiter = 235            # This prevents recruiters from going to villages targeted by other recruiters.
  1930. dplmc_slot_party_recruiter_needed_recruits_faction = 236   # Alkhadias Master, you forgot this one from the PM you sent me :D
  1931. dplmc_spt_recruiter     = 12
  1932. # recruiter kit end
  1933. ##diplomacy start+ Re-use those slots for other party types
  1934. dplmc_slot_party_origin = dplmc_slot_party_recruiter_origin
  1935. dplmc_slot_party_mission_parameter_1 = dplmc_slot_party_recruiter_needed_recruits
  1936. dplmc_slot_party_mission_parameter_2 = dplmc_slot_party_recruiter_needed_recruits_faction
  1937. ##diplomacy end+
  1938.  
  1939. ###################################################################################
  1940. # AutoLoot: Modified Constants
  1941. # Most of these are slot definitions, make sure they do not clash with your mod's other slot usage
  1942. ###################################################################################
  1943. # This is an item slot
  1944. dplmc_slot_item_difficulty = 5
  1945.  
  1946.   #### Autoloot improved by rubik begin
  1947. dplmc_slot_item_head_armor      = 6
  1948. dplmc_slot_item_body_armor      = 7
  1949. dplmc_slot_item_leg_armor       = 8
  1950.  
  1951. # slots redefine, no need to create more new slots, 3 is enough
  1952. dplmc_slot_item_thrust_damage      = dplmc_slot_item_head_armor
  1953. dplmc_slot_item_swing_damage       = dplmc_slot_item_body_armor
  1954. dplmc_slot_two_handed_one_handed   = dplmc_slot_item_leg_armor
  1955.  
  1956. dplmc_slot_item_horse_speed        = dplmc_slot_item_head_armor
  1957. dplmc_slot_item_horse_armor        = dplmc_slot_item_body_armor
  1958.  
  1959. dplmc_slot_item_shield_size        = dplmc_slot_item_head_armor
  1960. dplmc_slot_item_shield_armor       = dplmc_slot_item_body_armor
  1961.  
  1962. ##diplomacy start+ slots redefined, re-use for rubik "auto buy food"
  1963. dplmc_slot_item_food_portion       = dplmc_slot_item_leg_armor
  1964.  
  1965. ##New slot needed for rubik's Auto-Sell
  1966. dplmc_slot_item_type_not_for_sell  = 71
  1967. ##diplomacy end+
  1968.   #### Autoloot improved by rubik end
  1969.  
  1970. # These are troops slots
  1971. ##diplomacy start+ Altered because 154 is slot_troop_stance_on_faction_issue.
  1972. #(Companions can become lords, so parts of the auto-loot system had undesired consequences for promoted companions.)
  1973. dplmc_slot_upgrade_armor = 155 #was 153 before Diplomacy 4.0
  1974. dplmc_slot_upgrade_horse = 156 #was 154 before Diplomacy 4.0
  1975. ##diplomacy end+
  1976. dplmc_slot_upgrade_wpn_0 = 157
  1977. dplmc_slot_upgrade_wpn_1 = 158
  1978. dplmc_slot_upgrade_wpn_2 = 159
  1979. dplmc_slot_upgrade_wpn_3 = 160
  1980.  
  1981. dplmc_wpn_setting_1                 = 1
  1982. dplmc_wpn_setting_2                 = 2
  1983. dplmc_armor_setting                 = 3
  1984. dplmc_horse_setting                 = 4
  1985. ###################################################################################
  1986. # End Autoloot
  1987. ###################################################################################
  1988.  
  1989. dplmc_npc_mission_war_request                 = 9
  1990. dplmc_npc_mission_alliance_request            = 10
  1991. dplmc_npc_mission_spy_request                 = 11
  1992. dplmc_npc_mission_gift_fief_request           = 12
  1993. dplmc_npc_mission_gift_horses_request         = 13
  1994. dplmc_npc_mission_threaten_request            = 14
  1995. dplmc_npc_mission_prisoner_exchange           = 15
  1996. dplmc_npc_mission_defensive_request           = 16
  1997. dplmc_npc_mission_trade_request               = 17
  1998. dplmc_npc_mission_nonaggression_request       = 18
  1999. dplmc_npc_mission_persuasion                  = 19
  2000. dplmc_slot_troop_mission_diplomacy            = 162
  2001. dplmc_slot_troop_mission_diplomacy2           = 163
  2002. dplmc_slot_troop_political_stance             = 164 #dplmc+ deprecated, see note below
  2003. ##diplomacy start+
  2004. #Though you may assume otherwise from the name,  dplmc_slot_troop_political_stance is
  2005. #actually used as a temporary slot (it's overwritten every time you start a conversation
  2006. #with your chancellor about who supports whom, and in Diplomacy 3.3.2 it isn't used
  2007. #elsewhere).
  2008. #   I'm giving it a new name to reflect its use, to avoid confusion.
  2009. dplmc_slot_troop_temp_slot                    = 164 #replaces dplmc_slot_troop_political_stance
  2010. ##diplomacy end+
  2011. dplmc_slot_troop_affiliated                   = 165 ##notes: 0 is default, 1 is asked; on newer games 3 is affiliated and 4 is betrayed
  2012. dplmc_slot_party_mission_diplomacy            = 300
  2013. dplmc_slot_center_taxation                    = 400
  2014. ##diplomacy start+ additional center slots
  2015. dplmc_slot_center_ex_lord                     = 401 #The last lord (not counting those who willingly transferred it)
  2016. dplmc_slot_center_original_lord               = 402 #The original lord
  2017. dplmc_slot_center_last_transfer_time          = 403 #The last time it was captured
  2018. dplmc_slot_center_last_attacked_time          = 404 #Last attempted raid or siege
  2019. dplmc_slot_center_last_attacker               = 405 #Last lord who attempted to raid or siege
  2020.  
  2021. dplmc_slot_village_trade_last_returned_from_market = 407#overlaps with dplmc_slot_town_trade_route_last_arrival_1
  2022. dplmc_slot_village_trade_last_arrived_to_market = 408#overlaps with dplmc_slot_town_trade_route_last_arrival_2
  2023.  
  2024. dplmc_slot_town_trade_route_last_arrival_1        = 407
  2025. dplmc_slot_town_trade_route_last_arrival_2        = 408
  2026. dplmc_slot_town_trade_route_last_arrival_3        = 409
  2027. dplmc_slot_town_trade_route_last_arrival_4        = 410
  2028. dplmc_slot_town_trade_route_last_arrival_5        = 411
  2029. dplmc_slot_town_trade_route_last_arrival_6        = 412
  2030. dplmc_slot_town_trade_route_last_arrival_7        = 413
  2031. dplmc_slot_town_trade_route_last_arrival_8        = 414
  2032. dplmc_slot_town_trade_route_last_arrival_9        = 415
  2033. dplmc_slot_town_trade_route_last_arrival_10        = 416
  2034. dplmc_slot_town_trade_route_last_arrival_11        = 417
  2035. dplmc_slot_town_trade_route_last_arrival_12        = 418
  2036. dplmc_slot_town_trade_route_last_arrival_13        = 419
  2037. dplmc_slot_town_trade_route_last_arrival_14        = 420
  2038. dplmc_slot_town_trade_route_last_arrival_15        = 421
  2039. dplmc_slot_town_trade_route_last_arrivals_begin    = dplmc_slot_town_trade_route_last_arrival_1
  2040. dplmc_slot_town_trade_route_last_arrivals_end      = dplmc_slot_town_trade_route_last_arrival_15 + 1
  2041.  
  2042. ##diplomacy end+
  2043. dplmc_spt_spouse                              = 19
  2044. dplmc_spt_gift_caravan                        = 21
  2045. spt_messenger                                 = 8 #no prefix since its outcommented in native
  2046. spt_patrol                                    = 7 #no prefix since its outcommented in native
  2047. spt_scout                                     = 10 #no prefix since its outcommented in native
  2048. dplmc_slot_faction_policy_time                = 200
  2049. dplmc_slot_faction_centralization             = 201
  2050. dplmc_slot_faction_aristocracy                = 202
  2051. dplmc_slot_faction_serfdom                    = 203
  2052. dplmc_slot_faction_quality                    = 204
  2053. dplmc_slot_faction_patrol_time                = 205
  2054. ##nested diplomacy start+
  2055. #dplmc_slot_faction_attitude                   = 206 #DEPRECATED - Not used anywhere in Diplomacy 3.3.2
  2056. ##nested diplomacy end+
  2057. dplmc_slot_faction_attitude_begin             = 160
  2058. ##diplomacy end
  2059. ##diplomacy start+ add faction slots for additional policies
  2060. dplmc_slot_faction_mercantilism               = 206 # + mercantilism / - free trade
  2061.  
  2062. dplmc_slot_faction_policies_begin = dplmc_slot_faction_centralization #Define these for convenient iteration.  Requires them to be continuous.
  2063. dplmc_slot_faction_policies_end   = dplmc_slot_faction_mercantilism + 1
  2064.  
  2065. #For $g_dplmc_terrain_advantage
  2066. DPLMC_TERRAIN_ADVANTAGE_DISABLE     =  -1
  2067. DPLMC_TERRAIN_ADVANTAGE_ENABLE      =  0   #So I don't have to keep track of whether it is enabled or disabled by default
  2068.  
  2069. #For $g_dplmc_lord_recycling
  2070. DPLMC_LORD_RECYCLING_DISABLE           = -1
  2071. DPLMC_LORD_RECYCLING_ENABLE            =  0
  2072. DPLMC_LORD_RECYCLING_FREQUENT          =  1
  2073.  
  2074. #For $g_dplmc_ai_changes
  2075. DPLMC_AI_CHANGES_DISABLE        =  -1
  2076. DPLMC_AI_CHANGES_LOW            =   0
  2077. DPLMC_AI_CHANGES_MEDIUM         =   1
  2078. DPLMC_AI_CHANGES_HIGH           =   2
  2079. # Low:
  2080. #  - Center points for fief allocation are calculated (villages 1 / castles 2 / towns 3)
  2081. #    instead of (villages 1 / castles 1 / towns 2).
  2082. #  - For qst_rescue_prisoner and qst_offer_gift, the relatives that can be a target of the
  2083. #    quest have been extended to include uncles and aunts and in-laws.
  2084. #  - Alterations to script_calculate_troop_score_for_center (these changes currently are
  2085. #    only relevant during claimant quests).
  2086. #  - When picking a new faction, lords are more likely to return to their original faction
  2087. #    (except when that's the faction they're being exiled from), if the ordinary conditions
  2088. #    for rejoining are met.  A lord's decision may also be influenced by his relations with
  2089. #    other lords in the various factions, instead of just his relations with the faction
  2090. #    leaders.
  2091. # Medium:
  2092. #  - Some changes for lord relation gains/losses when fiefs are allocated.
  2093. #  - Kings overrule lords slightly less frequently on faction issues.
  2094. #  - In deciding who to support for a fief, minor parameter changes for certain personalities.
  2095. #    Some lords will still give priority to fiefless lords or to the lord who conquered the
  2096. #    center if they have a slightly negative relation (normally the cutoff is 0 for all
  2097. #    personalities).
  2098. #  - When a lord can't find any good candidates for a fief under the normal rules,
  2099. #    instead of automatically supporting himself he uses a weighted scoring scheme.
  2100. #  - In various places where "average renown * 3/2" appears, an alternate calculation is
  2101. #    sometimes used.
  2102. # High:
  2103. #  - The "renown factor" when an NPC lord or the player courts and NPC lady is adjusted by
  2104. #    the prestige of the lady's guardian.
  2105. #  - When a faction has fiefless lords and no free fiefs left, under some circumstances
  2106. #    the king will redistribute a village he owns.
  2107. #For $g_dplmc_gold_changes
  2108. DPLMC_GOLD_CHANGES_DISABLE = -1
  2109. DPLMC_GOLD_CHANGES_LOW     =  0
  2110. DPLMC_GOLD_CHANGES_MEDIUM  =  1
  2111. DPLMC_GOLD_CHANGES_HIGH    =  2
  2112. #
  2113. #Mercantilism
  2114. # - Your caravans generate more revenue for your towns, but your benefit
  2115. #   from the caravans of other kingdoms is diminished.
  2116. # - Trade within the kingdom is made more efficient, while imports are
  2117. #   discouraged.
  2118. #
  2119. #Low:
  2120. # - Caravan trade benefits both the source and the destination
  2121. # - When the player surrenders, there is a chance his personal equipment
  2122. #   will not be looted, based on who accepted the surrender and the difficulty
  2123. #   setting.  (This is meant to address a gameplay issue.  In the first 700
  2124. #   days or so, there is no possible benefit to surrendering rather than
  2125. #   fighting to the last man.)  Also, a bug that made it possible for
  2126. #   books etc. to be looted was corrected.
  2127. # - AI caravans take into consideration distance when choosing their next
  2128. #   destination and will be slightly more like to visit their own faction.
  2129. #   This strategy is mixed with the Native one, so the trade pattern will
  2130. #   differ but not wildly.
  2131. # - Scale town merchant gold by prosperity (up to a maximum 40% change).
  2132. # - Food prices increase in towns that have been under siege for at least
  2133. #   48 hours.
  2134. # - In towns the trade penalty script has been tweaked to make it more
  2135. #   efficient to sell goods to merchants specializing in them.
  2136. #
  2137. #Medium:
  2138. # - Food consumption increases in towns as prosperity increases.
  2139. #   Consumption also increases with garrison sizes.
  2140. # - Lords' looting skill affects how much gold they take from the player
  2141. #   when they defeat him.
  2142. # - Lords' leadership skill modifies their troop wage costs the same way
  2143. #   it does for the player.
  2144. # - The player can lose gold when his fiefs are looted, like lords.
  2145. # - The same way that lord party sizes increase as the player progresses,
  2146. #   mercenary party sizes also increase to maintain their relevance.
  2147. #   (The rate is the same as for lords: a 1.25% increase per level.)
  2148. # - If the player has a kingdom of his own, his spouse will receive
  2149. #   part of the bonus that ordinarily would be due a liege.  The extent
  2150. #   of this bonus depends on the number of fiefs the players holds.
  2151. #   This bonus is non-cumulative with the marshall bonus.
  2152. # - Attrition is inflicted on NPC-owned centers if they can't pay wages,
  2153. #   but only above a certain threshold.
  2154. # - Strangers cannot acquire enterprises (enforced at 1 instead of at 0,
  2155. #   so you have to do something).
  2156. #
  2157. #High:
  2158. # - The total amount of weekly bonus gold awarded to kings in Calradia
  2159. #   remains constant: as kings go into exile, their bonuses are divided
  2160. #   among the remaining kings.
  2161. # - If lord's run a personal gold surplus after party wages, the extra is
  2162. #   divided among the lord and his garrisons budgets (each castle and town
  2163. #   has its own pool of funds to pay for soldiers) on the basis of whether
  2164. #   the lord is low on gold or any of his fortresses are.  (If none are low
  2165. #   on gold, the lord takes everything, like before.)
  2166. # - The honor loss from an offense depends in part on the player's honor
  2167. #   at the time.  The purer the reputation, the greater the effect of a single
  2168. #   disagrace.
  2169. # - Raiding change: village gold lost is removed from uncollected taxes before
  2170. #   the balance (if any) is removed from the lord.
  2171. # - Csah for prisoners
  2172.  
  2173. #For relatives: a standard way of generating IDs for "relatives" that are not
  2174. #implemented in the game as troops, but nevertheless should be taken into
  2175. #account for the purpose of script_troop_get_family_relation_to_troop
  2176. DPLMC_VIRTUAL_RELATIVE_MULTIPLIER = -4
  2177. DPLMC_VIRTUAL_RELATIVE_FATHER_OFFSET = -1#e.g. father for x = (DPLMC_VIRTUAL_RELATIVE_MULTIPLIER * x) + DPLMC_VIRTUAL_RELATIVE_FATHER_OFFSET
  2178. DPLMC_VIRTUAL_RELATIVE_MOTHER_OFFSET = -2
  2179. DPLMC_VIRTUAL_RELATIVE_SPOUSE_OFFSET = -3
  2180.  
  2181. #For cultural terms, with "script_dplmc_store_cultural_word_reg0" :
  2182. DPLMC_CULTURAL_TERM_WEAPON = 1#sword
  2183. DPLMC_CULTURAL_TERM_WEAPON_PLURAL = 2#"swords"
  2184. DPLMC_CULTURAL_TERM_USE_MY_WEAPON = 3#"swing my sword", etc.
  2185. DPLMC_CULTURAL_TERM_KING = 4#"king"
  2186. DPLMC_CULTURAL_TERM_KING_FEMALE = 5#"queen"
  2187. DPLMC_CULTURAL_TERM_KING_PLURAL = 6#"kings"
  2188. DPLMC_CULTURAL_TERM_LORD = 7#"lord"
  2189. DPLMC_CULTURAL_TERM_LORD_PLURAL = 8#"lords"
  2190. DPLMC_CULTURAL_TERM_SWINEHERD = 9
  2191. DPLMC_CULTURAL_TERM_TAVERNWINE = 10#"wine" (used in tavern talk)
  2192.  
  2193. ## Possible return values from "script_dplmc_get_troop_standing_in_faction"
  2194. DPLMC_FACTION_STANDING_LEADER = 60
  2195. DPLMC_FACTION_STANDING_LEADER_SPOUSE = 50
  2196. DPLMC_FACTION_STANDING_MARSHALL = 40
  2197. DPLMC_FACTION_STANDING_LORD = 30
  2198. DPLMC_FACTION_STANDING_DEPENDENT = 20
  2199. DPLMC_FACTION_STANDING_MEMBER = 10#includes mercenaries
  2200. DPLMC_FACTION_STANDING_PETITIONER = 5
  2201. DPLMC_FACTION_STANDING_UNAFFILIATED = 0
  2202.  
  2203.  
  2204. ## VERSION NUMBERS FOR TRACKING NEEDED CHANGES
  2205. #(These change numbers are only for things which require the game to alter saved games.)
  2206. #Version 0: Diplomacy 3.3.2 and prior, and all Diplomacy 3.3.2+ versions released before 2011-06-06
  2207. #Version 1: The 2011-06-06 release of Diplomacy 3.3.2+
  2208. #Version 110611: The 2011-06-11 release of Diplomacy 3.3.2+.
  2209. #Version 110612
  2210. #Version 110615: Correct "half-siblings"
  2211. #Version 111001: Diplomacy 4.0 for Warband 1.143 (targeted for release on 2011-10-01),
  2212. #    Makes slot_faction_leader and slot_faction_marshall default to -1 instead of 0
  2213. #       (so if the player is the leader of a faction we do not have to check whether
  2214. #       he is actually a member of that faction).  fac_player_faction and
  2215. #       fac_player_supporters_faction are exempt from this.
  2216. #    Sets slot_troop_home for town merchants, elders, etc. and startup merchants
  2217.  
  2218. DPLMC_CURRENT_VERSION_CODE = 111127
  2219. DPLMC_VERSION_LOW_7_BITS = 68 #Number that comes after the rest of the version code
  2220.  
  2221. DPLMC_DIPLOMACY_VERSION_STRING = "4.2 (November 27, 2011)"
  2222.  
  2223. #Perform a check to make sure constants are defined in a reasonable way.
  2224. def _validate_constants(verbose=False):
  2225.     """Makes sure begin/end pairs have length of at least zero."""
  2226.     d = globals()
  2227.     for from_key in d:
  2228.         if not from_key.endswith("_begin"):
  2229.             continue
  2230.         to_key = from_key[:-len("_begin")]+"_end"
  2231.         if not to_key in d:
  2232.             if verbose:
  2233.                 print "%s has no matching %s" % (from_key, to_key)
  2234.             continue
  2235.         from_value = d[from_key]
  2236.         to_value = d[to_key]
  2237.         if not type(from_value) in (int, float, long):
  2238.             continue
  2239.         if not from_value <= to_value:
  2240.             raise Exception("ERROR, condition %s <= %s failed [not true that %s <= %s]" % (from_key, to_key, str(from_value), str(to_value)))
  2241.         elif verbose:
  2242.             print "%s <= %s [%s <= %s]" % (from_key, to_key, str(from_value), str(to_value))
  2243.  
  2244. #Automatically run this on module import, so errors are detected
  2245. #during building.
  2246. _validate_constants(verbose=(__name__=="__main__"))
  2247. ##diplomacy end+
Add Comment
Please, Sign In to add comment