code
stringlengths
1
1.72M
language
stringclasses
1 value
import string from module_info import * from module_scene_props import * from process_common import * from process_operations import * def save_scene_props(variable_list,variable_uses,tag_uses,quick_strings): ofile = open(export_dir + "scene_props.txt","w") ofile.write("scene_propsfile version 1\n") ofile.write(" %d\n"%(len(scene_props))) for scene_prop in scene_props: ofile.write("spr_%s %d %d %s %s "%(scene_prop[0], scene_prop[1], get_spr_hit_points(scene_prop[1]), scene_prop[2], scene_prop[3])) save_simple_triggers(ofile,scene_prop[4] , variable_list,variable_uses,tag_uses,quick_strings) ofile.write("\n") ofile.close() def save_python_header(): file = open("./ID_scene_props.py","w") for i_scene_prop in xrange(len(scene_props)): file.write("spr_%s = %d\n"%(scene_props[i_scene_prop][0],i_scene_prop)) file.close() print "Exporting scene props..." save_python_header() variable_uses = [] variables = load_variables(export_dir,variable_uses) tag_uses = load_tag_uses(export_dir) quick_strings = load_quick_strings(export_dir) save_scene_props(variables,variable_uses,tag_uses,quick_strings) save_variables(export_dir,variables,variable_uses) save_tag_uses(export_dir,tag_uses) save_quick_strings(export_dir,quick_strings)
Python
anim_stand = 0 anim_stand_man = 1 anim_jump = 2 anim_jump_end = 3 anim_stand_unarmed = 4 anim_stand_single = 5 anim_stand_greatsword = 6 anim_stand_staff = 7 anim_stand_crossbow = 8 anim_walk_forward = 9 anim_walk_forward_onehanded = 10 anim_walk_forward_staff = 11 anim_walk_forward_greatsword = 12 anim_walk_backward = 13 anim_walk_backward_onehanded = 14 anim_walk_backward_staff = 15 anim_walk_backward_greatsword = 16 anim_run_forward = 17 anim_run_forward_onehanded = 18 anim_run_forward_staff = 19 anim_run_forward_greatsword = 20 anim_run_forward_right = 21 anim_run_forward_right_onehanded = 22 anim_run_forward_right_staff = 23 anim_run_forward_right_greatsword = 24 anim_run_forward_left = 25 anim_run_forward_left_onehanded = 26 anim_run_forward_left_staff = 27 anim_run_forward_left_greatsword = 28 anim_run_backward = 29 anim_run_backward_onehanded = 30 anim_run_backward_staff = 31 anim_run_backward_greatsword = 32 anim_walk_right = 33 anim_walk_right_onehanded = 34 anim_walk_right_twohanded = 35 anim_walk_right_polearm = 36 anim_walk_left = 37 anim_walk_left_onehanded = 38 anim_walk_left_twohanded = 39 anim_walk_left_polearm = 40 anim_walk_forward_right = 41 anim_walk_forward_right_onehanded = 42 anim_walk_forward_right_twohanded = 43 anim_walk_forward_right_polearm = 44 anim_walk_forward_left = 45 anim_walk_forward_left_onehanded = 46 anim_walk_forward_left_twohanded = 47 anim_walk_forward_left_polearm = 48 anim_walk_backward_left = 49 anim_walk_backward_left_onehanded = 50 anim_walk_backward_left_twohanded = 51 anim_walk_backward_left_polearm = 52 anim_walk_backward_right = 53 anim_walk_backward_right_onehanded = 54 anim_walk_backward_right_twohanded = 55 anim_walk_backward_right_polearm = 56 anim_run_right = 57 anim_run_right_onehanded = 58 anim_run_right_twohanded = 59 anim_run_right_polearm = 60 anim_run_left = 61 anim_run_left_onehanded = 62 anim_run_left_twohanded = 63 anim_run_left_polearm = 64 anim_ride_0 = 65 anim_ride_1 = 66 anim_lancer_ride_1 = 67 anim_lancer_charge_parried = 68 anim_ride_2 = 69 anim_ride_3 = 70 anim_ride_4 = 71 anim_lancer_ride_4 = 72 anim_ride_rear = 73 anim_ride_spur = 74 anim_ride_jump = 75 anim_ride_jump_end = 76 anim_ride_turn_right = 77 anim_ride_turn_left = 78 anim_mount_horse = 79 anim_dismount_horse = 80 anim_lancer_ride_0 = 81 anim_equip_default = 82 anim_unequip_default = 83 anim_equip_sword = 84 anim_unequip_sword = 85 anim_equip_greatsword = 86 anim_unequip_greatsword = 87 anim_equip_axe_left_hip = 88 anim_unequip_axe_left_hip = 89 anim_equip_crossbow = 90 anim_unequip_crossbow = 91 anim_equip_spear = 92 anim_unequip_spear = 93 anim_equip_dagger_front_left = 94 anim_unequip_dagger_front_left = 95 anim_equip_dagger_front_right = 96 anim_unequip_dagger_front_right = 97 anim_equip_axe_back = 98 anim_unequip_axe_back = 99 anim_equip_revolver_right = 100 anim_unequip_revolver_right = 101 anim_equip_pistol_front_left = 102 anim_unequip_pistol_front_left = 103 anim_equip_katana = 104 anim_unequip_katana = 105 anim_equip_wakizashi = 106 anim_unequip_wakizashi = 107 anim_equip_shield = 108 anim_unequip_shield = 109 anim_equip_bow_back = 110 anim_unequip_bow_back = 111 anim_equip_bow_left_hip = 112 anim_unequip_bow_left_hip = 113 anim_cancel_attack_onehanded = 114 anim_cancel_attack_twohanded = 115 anim_cancel_attack_polearm = 116 anim_ready_bow = 117 anim_release_bow = 118 anim_ready_bow_mounted = 119 anim_release_bow_mounted = 120 anim_ready_crossbow = 121 anim_release_crossbow = 122 anim_reload_crossbow = 123 anim_reload_crossbow_horseback = 124 anim_ready_javelin = 125 anim_release_javelin = 126 anim_ready_throwing_knife = 127 anim_release_throwing_knife = 128 anim_ready_throwing_axe = 129 anim_release_throwing_axe = 130 anim_ready_stone = 131 anim_release_stone = 132 anim_ready_pistol = 133 anim_release_pistol = 134 anim_reload_pistol = 135 anim_ready_musket = 136 anim_release_musket = 137 anim_reload_musket = 138 anim_ready_swingright_fist = 139 anim_release_swingright_fist = 140 anim_parry_swingright_fist = 141 anim_ready_swingleft_fist = 142 anim_release_swingleft_fist = 143 anim_parry_swingleft_fist = 144 anim_ready_direct_fist = 145 anim_release_direct_fist = 146 anim_parry_direct_fist = 147 anim_ready_uppercut_fist = 148 anim_release_uppercut_fist = 149 anim_parry_uppercut_fist = 150 anim_defend_fist = 151 anim_defend_fist_keep = 152 anim_defend_fist_parry = 153 anim_ready_slashright_twohanded = 154 anim_release_slashright_twohanded = 155 anim_parry_slashright_twohanded = 156 anim_ready_slashleft_twohanded = 157 anim_release_slashleft_twohanded = 158 anim_parry_slashleft_twohanded = 159 anim_ready_thrust_twohanded = 160 anim_release_thrust_twohanded = 161 anim_parry_thrust_twohanded = 162 anim_ready_overswing_twohanded = 163 anim_release_overswing_twohanded = 164 anim_parry_overswing_twohanded = 165 anim_ready_thrust_onehanded = 166 anim_release_thrust_onehanded = 167 anim_parry_thrust_onehanded = 168 anim_ready_thrust_onehanded_lance = 169 anim_release_thrust_onehanded_lance = 170 anim_parry_thrust_onehanded_lance = 171 anim_ready_slashright_onehanded = 172 anim_release_slashright_onehanded = 173 anim_parry_slashright_onehanded = 174 anim_ready_slashleft_onehanded = 175 anim_release_slashleft_onehanded = 176 anim_parry_slashleft_onehanded = 177 anim_ready_overswing_onehanded = 178 anim_release_overswing_onehanded = 179 anim_parry_overswing_onehanded = 180 anim_ready_slash_horseback_right = 181 anim_release_slash_horseback_right = 182 anim_parry_slash_horseback_right = 183 anim_ready_slash_horseback_left = 184 anim_release_slash_horseback_left = 185 anim_parry_slash_horseback_left = 186 anim_ready_overswing_staff = 187 anim_release_overswing_staff = 188 anim_parry_overswing_staff = 189 anim_ready_thrust_staff = 190 anim_release_thrust_staff = 191 anim_parry_thrust_staff = 192 anim_ready_slashleft_staff = 193 anim_release_slashleft_staff = 194 anim_parry_slashleft_staff = 195 anim_ready_slashright_staff = 196 anim_release_slashright_staff = 197 anim_parry_slashright_staff = 198 anim_defend_shield = 199 anim_defend_shield_keep = 200 anim_defend_shield_parry = 201 anim_defend_forward_greatsword = 202 anim_defend_forward_greatsword_keep = 203 anim_defend_forward_greatsword_parry = 204 anim_defend_up_twohanded = 205 anim_defend_up_twohanded_keep = 206 anim_defend_up_twohanded_parry = 207 anim_defend_right_twohanded = 208 anim_defend_right_twohanded_keep = 209 anim_defend_right_twohanded_parry = 210 anim_defend_left_twohanded = 211 anim_defend_left_twohanded_keep = 212 anim_defend_left_twohanded_parry = 213 anim_defend_forward_onehanded = 214 anim_defend_forward_onehanded_keep = 215 anim_defend_forward_onehanded_parry = 216 anim_defend_up_onehanded = 217 anim_defend_up_onehanded_keep = 218 anim_defend_up_onehanded_parry = 219 anim_defend_right_onehanded = 220 anim_defend_right_onehanded_keep = 221 anim_defend_right_onehanded_parry = 222 anim_defend_left_onehanded = 223 anim_defend_left_onehanded_keep = 224 anim_defend_left_onehanded_parry = 225 anim_defend_forward_staff = 226 anim_defend_forward_staff_keep = 227 anim_defend_forward_staff_parry = 228 anim_defend_up_staff = 229 anim_defend_up_staff_keep = 230 anim_defend_up_staff_parry = 231 anim_defend_right_staff = 232 anim_defend_right_staff_keep = 233 anim_defend_right_staff_parry = 234 anim_defend_left_staff = 235 anim_defend_left_staff_keep = 236 anim_defend_left_staff_parry = 237 anim_strike_head_left = 238 anim_strike_head_right = 239 anim_strike_head_front = 240 anim_strike_head_back = 241 anim_strike_chest_left = 242 anim_strike_chest_right = 243 anim_strike_chest_front = 244 anim_strike_chest_back = 245 anim_strike_abdomen_left = 246 anim_strike_abdomen_right = 247 anim_strike_abdomen_front = 248 anim_strike_abdomen_back = 249 anim_strike_legs_left = 250 anim_strike_legs_right = 251 anim_strike_legs_front = 252 anim_strike_legs_back = 253 anim_strike2_head_left = 254 anim_strike2_head_right = 255 anim_strike2_head_front = 256 anim_strike2_head_back = 257 anim_strike2_chest_left = 258 anim_strike2_chest_right = 259 anim_strike2_chest_front = 260 anim_strike2_chest_back = 261 anim_strike2_abdomen_left = 262 anim_strike2_abdomen_right = 263 anim_strike2_abdomen_front = 264 anim_strike2_abdomen_back = 265 anim_strike2_legs_left = 266 anim_strike2_legs_right = 267 anim_strike2_legs_front = 268 anim_strike2_legs_back = 269 anim_strike3_head_left = 270 anim_strike3_head_right = 271 anim_strike3_head_front = 272 anim_strike3_head_back = 273 anim_strike3_chest_left = 274 anim_strike3_chest_right = 275 anim_strike3_chest_front = 276 anim_strike3_abdomen_left = 277 anim_strike3_abdomen_right = 278 anim_strike3_abdomen_front = 279 anim_strike3_abdomen_back = 280 anim_strike_head_front_left_reloc = 281 anim_fall_face_hold = 282 anim_fall_chest_front = 283 anim_fall_abdomen_hold_front = 284 anim_fall_head_front = 285 anim_fall_right_front = 286 anim_fall_body_back = 287 anim_fall_rider_head_front = 288 anim_rider_fall_in_place = 289 anim_rider_fall_right = 290 anim_rider_fall_roll = 291 anim_strike_chest_front_stop = 292 anim_strike_fall_back_rise = 293 anim_strike_fall_back_rise_upper = 294 anim_cheer = 295 anim_cheer_stand = 296 anim_stand_townguard = 297 anim_stand_lady = 298 anim_stand_lord = 299 anim_dance = 300 anim_pose_1 = 301 anim_pose_2 = 302 anim_pose_3 = 303 anim_pose_4 = 304 anim_pose_5 = 305 anim_unused_human_anim_1 = 306 anim_unused_human_anim_2 = 307 anim_unused_human_anim_3 = 308 anim_unused_human_anim_4 = 309 anim_unused_human_anim_5 = 310 anim_unused_human_anim_6 = 311 anim_unused_human_anim_7 = 312 anim_unused_human_anim_8 = 313 anim_unused_human_anim_9 = 314 anim_unused_human_anim_10 = 315 anim_unused_human_anim_11 = 316 anim_unused_human_anim_12 = 317 anim_unused_human_anim_13 = 318 anim_unused_human_anim_14 = 319 anim_unused_human_anim_15 = 320 anim_unused_human_anim_16 = 321 anim_unused_human_anim_17 = 322 anim_unused_human_anim_18 = 323 anim_unused_human_anim_19 = 324 anim_unused_human_anim_20 = 325 anim_unused_human_anim_21 = 326 anim_unused_human_anim_22 = 327 anim_unused_human_anim_23 = 328 anim_unused_human_anim_24 = 329 anim_unused_human_anim_25 = 330 anim_unused_human_anim_26 = 331 anim_unused_human_anim_27 = 332 anim_unused_human_anim_28 = 333 anim_unused_human_anim_29 = 334 anim_unused_human_anim_30 = 335 anim_unused_human_anim_31 = 336 anim_unused_human_anim_32 = 337 anim_unused_human_anim_33 = 338 anim_unused_human_anim_34 = 339 anim_unused_human_anim_35 = 340 anim_unused_human_anim_36 = 341 anim_unused_human_anim_37 = 342 anim_unused_human_anim_38 = 343 anim_unused_human_anim_39 = 344 anim_unused_human_anim_40 = 345 anim_unused_human_anim_41 = 346 anim_unused_human_anim_42 = 347 anim_unused_human_anim_43 = 348 anim_unused_human_anim_44 = 349 anim_unused_human_anim_45 = 350 anim_unused_human_anim_46 = 351 anim_unused_human_anim_47 = 352 anim_unused_human_anim_48 = 353 anim_unused_human_anim_49 = 354 anim_unused_human_anim_50 = 355 anim_unused_human_anim_51 = 356 anim_unused_human_anim_52 = 357 anim_unused_human_anim_53 = 358 anim_unused_human_anim_54 = 359 anim_unused_human_anim_55 = 360 anim_unused_human_anim_56 = 361 anim_unused_human_anim_57 = 362 anim_unused_human_anim_58 = 363 anim_unused_human_anim_59 = 364 anim_unused_human_anim_60 = 365 anim_unused_human_anim_61 = 366 anim_unused_human_anim_62 = 367 anim_unused_human_anim_63 = 368 anim_unused_human_anim_64 = 369 anim_unused_human_anim_65 = 370 anim_unused_human_anim_66 = 371 anim_unused_human_anim_67 = 372 anim_unused_human_anim_68 = 373 anim_unused_human_anim_69 = 374 anim_unused_human_anim_70 = 375 anim_unused_human_anim_71 = 376 anim_unused_human_anim_72 = 377 anim_unused_human_anim_73 = 378 anim_unused_human_anim_74 = 379 anim_unused_human_anim_75 = 380 anim_unused_human_anim_76 = 381 anim_unused_human_anim_77 = 382 anim_unused_human_anim_78 = 383 anim_unused_human_anim_79 = 384 anim_unused_human_anim_80 = 385 anim_unused_human_anim_81 = 386 anim_unused_human_anim_82 = 387 anim_unused_human_anim_83 = 388 anim_unused_human_anim_84 = 389 anim_unused_human_anim_85 = 390 anim_unused_human_anim_86 = 391 anim_unused_human_anim_87 = 392 anim_unused_human_anim_88 = 393 anim_unused_human_anim_89 = 394 anim_unused_human_anim_90 = 395 anim_unused_human_anim_91 = 396 anim_unused_human_anim_92 = 397 anim_unused_human_anim_93 = 398 anim_unused_human_anim_94 = 399 anim_unused_human_anim_95 = 400 anim_unused_human_anim_96 = 401 anim_unused_human_anim_97 = 402 anim_unused_human_anim_98 = 403 anim_unused_human_anim_99 = 404 anim_unused_human_anim_100 = 405 anim_horse_stand = 406 anim_horse_pace_1 = 407 anim_horse_pace_2 = 408 anim_horse_pace_3 = 409 anim_horse_pace_4 = 410 anim_horse_walk_backward = 411 anim_horse_rear = 412 anim_horse_jump = 413 anim_horse_jump_end = 414 anim_horse_turn_right = 415 anim_horse_turn_left = 416 anim_horse_slow = 417 anim_horse_fall_in_place = 418 anim_horse_fall_right = 419 anim_horse_fall_roll = 420 anim_unused_horse_anim_1 = 421 anim_unused_horse_anim_2 = 422 anim_unused_horse_anim_3 = 423 anim_unused_horse_anim_4 = 424 anim_unused_horse_anim_5 = 425 anim_unused_horse_anim_6 = 426 anim_unused_horse_anim_7 = 427 anim_unused_horse_anim_8 = 428 anim_unused_horse_anim_9 = 429 anim_unused_horse_anim_10 = 430 anim_unused_horse_anim_11 = 431 anim_unused_horse_anim_12 = 432 anim_unused_horse_anim_13 = 433 anim_unused_horse_anim_14 = 434 anim_unused_horse_anim_15 = 435 anim_unused_horse_anim_16 = 436 anim_unused_horse_anim_17 = 437 anim_unused_horse_anim_18 = 438 anim_unused_horse_anim_19 = 439 anim_unused_horse_anim_20 = 440 anim_unused_horse_anim_21 = 441 anim_unused_horse_anim_22 = 442 anim_unused_horse_anim_23 = 443 anim_unused_horse_anim_24 = 444 anim_unused_horse_anim_25 = 445 anim_unused_horse_anim_26 = 446 anim_unused_horse_anim_27 = 447 anim_unused_horse_anim_28 = 448 anim_unused_horse_anim_29 = 449 anim_unused_horse_anim_30 = 450 anim_unused_horse_anim_31 = 451 anim_unused_horse_anim_32 = 452 anim_unused_horse_anim_33 = 453 anim_unused_horse_anim_34 = 454 anim_unused_horse_anim_35 = 455 anim_unused_horse_anim_36 = 456 anim_unused_horse_anim_37 = 457 anim_unused_horse_anim_38 = 458 anim_unused_horse_anim_39 = 459 anim_unused_horse_anim_40 = 460 anim_unused_horse_anim_41 = 461 anim_unused_horse_anim_42 = 462 anim_unused_horse_anim_43 = 463 anim_unused_horse_anim_44 = 464 anim_unused_horse_anim_45 = 465 anim_unused_horse_anim_46 = 466 anim_unused_horse_anim_47 = 467 anim_unused_horse_anim_48 = 468 anim_unused_horse_anim_49 = 469 anim_unused_horse_anim_50 = 470 anim_unused_horse_anim_51 = 471 anim_unused_horse_anim_52 = 472 anim_unused_horse_anim_53 = 473 anim_unused_horse_anim_54 = 474 anim_unused_horse_anim_55 = 475 anim_unused_horse_anim_56 = 476 anim_unused_horse_anim_57 = 477 anim_unused_horse_anim_58 = 478 anim_unused_horse_anim_59 = 479 anim_unused_horse_anim_60 = 480 anim_unused_horse_anim_61 = 481 anim_unused_horse_anim_62 = 482 anim_unused_horse_anim_63 = 483 anim_unused_horse_anim_64 = 484 anim_unused_horse_anim_65 = 485 anim_unused_horse_anim_66 = 486 anim_unused_horse_anim_67 = 487 anim_unused_horse_anim_68 = 488 anim_unused_horse_anim_69 = 489 anim_unused_horse_anim_70 = 490 anim_unused_horse_anim_71 = 491 anim_unused_horse_anim_72 = 492 anim_unused_horse_anim_73 = 493 anim_unused_horse_anim_74 = 494 anim_unused_horse_anim_75 = 495 anim_unused_horse_anim_76 = 496 anim_unused_horse_anim_77 = 497 anim_unused_horse_anim_78 = 498 anim_unused_horse_anim_79 = 499 anim_unused_horse_anim_80 = 500 anim_unused_horse_anim_81 = 501 anim_unused_horse_anim_82 = 502 anim_unused_horse_anim_83 = 503 anim_unused_horse_anim_84 = 504 anim_unused_horse_anim_85 = 505 anim_unused_horse_anim_86 = 506 anim_unused_horse_anim_87 = 507 anim_unused_horse_anim_88 = 508 anim_unused_horse_anim_89 = 509 anim_unused_horse_anim_90 = 510 anim_unused_horse_anim_91 = 511 anim_unused_horse_anim_92 = 512 anim_unused_horse_anim_93 = 513 anim_unused_horse_anim_94 = 514 anim_unused_horse_anim_95 = 515 anim_unused_horse_anim_96 = 516 anim_unused_horse_anim_97 = 517 anim_unused_horse_anim_98 = 518 anim_unused_horse_anim_99 = 519 anim_unused_horse_anim_100 = 520
Python
psys_game_rain = 0 psys_game_snow = 1 psys_game_blood = 2 psys_game_blood_2 = 3 psys_game_hoof_dust = 4 psys_game_hoof_dust_snow = 5 psys_game_hoof_dust_mud = 6 psys_game_water_splash_1 = 7 psys_game_water_splash_2 = 8 psys_game_water_splash_3 = 9 psys_torch_fire = 10 psys_fire_glow_1 = 11 psys_fire_glow_fixed = 12 psys_torch_smoke = 13 psys_flue_smoke_short = 14 psys_flue_smoke_tall = 15 psys_war_smoke_tall = 16 psys_torch_fire_sparks = 17 psys_fire_sparks_1 = 18 psys_pistol_smoke = 19 psys_brazier_fire_1 = 20 psys_cooking_fire_1 = 21 psys_cooking_smoke = 22 psys_food_steam = 23 psys_candle_light = 24 psys_candle_light_small = 25 psys_lamp_fire = 26 psys_dummy_smoke = 27 psys_dummy_straw = 28 psys_gourd_smoke = 29 psys_gourd_piece_1 = 30 psys_gourd_piece_2 = 31 psys_fire_fly_1 = 32 psys_bug_fly_1 = 33 psys_moon_beam_1 = 34 psys_moon_beam_paricle_1 = 35 psys_night_smoke_1 = 36 psys_fireplace_fire_small = 37 psys_fireplace_fire_big = 38 psys_village_fire_big = 39 psys_village_fire_smoke_big = 40 psys_map_village_fire = 41 psys_map_village_fire_smoke = 42 psys_map_village_looted_smoke = 43 psys_dungeon_water_drops = 44
Python
import string from process_common import * from module_items import * def get_item_code(item): prefix = "it_" code = prefix + item[0] return code def save_python_header(): file = open("./ID_items.py","w") for i_item in xrange(len(items)): file.write("itm_%s = %d\n"%(convert_to_identifier(items[i_item][0]),i_item)) file.close() def write_items(variable_list,variable_uses,tag_uses,quick_strings): itemkinds_file_name = export_dir + "item_kinds1.txt" ofile = open(itemkinds_file_name,"w") ofile.write("itemsfile version 2\n") ofile.write("%d\n"%len(items)) for item in items: if (item[3] & itp_merchandise) > 0: id_no = find_object(items,convert_to_identifier(item[0])) add_tag_use(tag_uses,tag_item,id_no) ofile.write(" itm_%s %s %s %d "%(convert_to_identifier(item[0]),replace_spaces(item[1]),replace_spaces(item[1]),len(item[2]))) item_variations = item[2] for item_variation in item_variations: ofile.write(" %s %d "%(item_variation[0],item_variation[1])) ofile.write(" %d %d %d %d %f %d %d %d %d %d %d %d %d %d %d %d %d\n"%(item[3], item[4], item[5], item[7], get_weight(item[6]), get_abundance(item[6]), get_head_armor(item[6]), get_body_armor(item[6]), get_leg_armor(item[6]), get_difficulty(item[6]), get_hit_points(item[6]), get_speed_rating(item[6]), get_missile_speed(item[6]), get_weapon_length(item[6]), get_max_ammo(item[6]), get_thrust_damage(item[6]), get_swing_damage(item[6]), )) trigger_list = [] if (len(item) > 8): trigger_list = item[8] save_simple_triggers(ofile,trigger_list, variable_list,variable_uses,tag_uses,quick_strings) ofile.close() print "Exporting item data..." save_python_header() from module_info import * from process_common import * from process_operations import * variable_uses = [] variables = load_variables(export_dir,variable_uses) tag_uses = load_tag_uses(export_dir) quick_strings = load_quick_strings(export_dir) write_items(variables,variable_uses,tag_uses,quick_strings) save_variables(export_dir,variables,variable_uses) save_tag_uses(export_dir,tag_uses) save_quick_strings(export_dir,quick_strings) #print "Finished with Items."
Python
import string import types def convert_to_identifier(s0): s1 = string.replace(s0," ","_") s2 = string.replace(s1,"'","_") s3 = string.replace(s2,"`","_") s4 = string.replace(s3,"(","_") s5 = string.replace(s4,")","_") s6 = string.replace(s5,"-","_") s7 = string.replace(s6,",","") s8 = string.replace(s7,"|","") s9 = string.lower(s8) return s9 def convert_to_identifier_with_no_lowercase(s0): s1 = string.replace(s0," ","_") s2 = string.replace(s1,"'","_") s3 = string.replace(s2,"`","_") s4 = string.replace(s3,"(","_") s5 = string.replace(s4,")","_") s6 = string.replace(s5,"-","_") s7 = string.replace(s6,",","") s8 = string.replace(s7,"|","") return s8 def replace_spaces(s0): return string.replace(s0," ","_")
Python
from header_quests import * #################################################################################################################### # Each quest record contains the following fields: # 1) Quest id: used for referencing quests in other files. The prefix qst_ is automatically added before each quest-id. # 2) Quest Name: Name displayed in the quest screen. # 3) Quest flags. See header_quests.py for a list of available flags # 4) Quest Description: Description displayed in the quest screen. # # Note that you may call the opcode setup_quest_text for setting up the name and description #################################################################################################################### quests = [ # Note : This is defined as the first governer quest in module_constants.py: ("deliver_message", "Deliver Message to {s13}", qf_random_quest, "{s9} asked you to take a message to {s13}. {s13} was at {s4} when you were given this quest." ), ("deliver_message_to_enemy_lord", "Deliver Message to {s13}", qf_random_quest, "{s9} asked you to take a message to {s13} of {s15}. {s13} was at {s4} when you were given this quest." ), ("raise_troops", "Raise {reg1} {s14}", qf_random_quest, "{s9} asked you to raise {reg1} {s14} and bring them to him." ), ("escort_lady", "Escort {s13} to {s14}", qf_random_quest, "None" ), ## ("rescue_lady_under_siege", "Rescue {s3} from {s4}", qf_random_quest, ## "{s1} asked you to rescue his {s7} {s3} from {s4} and return her back to him." ## ), ## ("deliver_message_to_lover", "Deliver Message to {s3}", qf_random_quest, ## "{s1} asked you to take a message to his lover {s3} at {s4}." ## ), ## ("bring_prisoners_to_enemy", "Bring Prisoners to {s4}", qf_random_quest, ## "{s1} asked you to bring {reg1} {s3} as prisoners to the guards at {s4}." ## ), ## ("bring_reinforcements_to_siege", "Bring Reinforcements to the Siege of {s5}", qf_random_quest, ## "{s1} asked you to bring {reg1} {s3} to {s4} at the siege of {s5}." ## ), ## ("deliver_supply_to_center_under_siege", "Deliver Supplies to {s5}", qf_random_quest, ## "TODO: Take {reg1} cartloads of supplies from constable {s3} and deliver them to constable {s4} at {s5}." ## ), ("deal_with_bandits_at_lords_village", "Save the Village of {s15} from Marauding Bandits", qf_random_quest, "{s13} asked you to deal with the bandits who took refuge in his village of {s15} and then report back to him." ), ("collect_taxes", "Collect taxes from {s3}", qf_random_quest, "{s9} asked you to collect taxes from {s3}. He offered to leave you one-fifth of all the money you collect there." ), ("hunt_down_fugitive", "Hunt down {s4}", qf_random_quest, "{s9} asked you to hunt down the fugitive named {s4}. He is currently believed to be at {s3}." ), ## ("capture_messenger", "Capture {s3}", qf_random_quest, ## "{s1} asked you to capture a {s3} and bring him back." ## ), ## ("bring_back_deserters", "Bring {reg1} {s3}", qf_random_quest, ## "{s1} asked you to bring {reg1} {s3}." ## ), ("kill_local_merchant", "Assassinate Local Merchant at {s3}", qf_random_quest, "{s9} asked you to assassinate a local merchant at {s3}." ), ("bring_back_runaway_serfs", "Bring Back Runaway Serfs", qf_random_quest, "{s9} asked you to bring back the three groups of runaway serfs back to {s2}. He said all three groups must be running away in the direction of {s3}." ), ("follow_spy", "Follow the Spy to Meeting", qf_random_quest, "{s11} asked you to follow the spy that will leave {s12}. You must be careful not to be seen by the spy during his travel, or else he may get suspicious and turn back. Once the spy meets with his accomplice, you are to ambush and capture them and bring them both back to {s11}." ), ("capture_enemy_hero", "Capture a Lord from {s13}", qf_random_quest, "TODO: {s11} asked you to capture a lord from {s13}." ), ("lend_companion", "Lend Your Companion {s3} to {s9}", qf_random_quest, "{s9} asked you to lend your companion {s3} to him for a week." ), ("collect_debt", "Collect the debt {s3} owes to {s9}", qf_random_quest, "{s9} asked you to collect the debt of {reg4} denars {s3} owes to him." ), ## ("capture_conspirators", "Capture Conspirators", qf_random_quest, ## "TODO: {s1} asked you to capture all troops in {reg1} conspirator parties that plan to rebel against him and join {s3}." ## ), ## ("defend_nobles_against_peasants", "Defend Nobles Against Peasants", qf_random_quest, ## "TODO: {s1} asked you to defend {reg1} noble parties against peasants." ## ), ("incriminate_loyal_commander", "Incriminate the Loyal Commander of {s13}, {s16}", qf_random_quest, "None" ), ("raid_caravan_to_start_war", "Raid {reg13} Caravans of {s13}", qf_random_quest, "None" ), ("meet_spy_in_enemy_town", "Meet Spy in {s13}", qf_random_quest, "None" ), ("capture_prisoners", "Bring {reg1} {s3} Prisoners", qf_random_quest, "{s9} wanted you to bring him {reg1} {s3} as prisoners." ), ## ("hunt_down_raiders", "Hunt Down Raiders",qf_random_quest, ## "{s1} asked you to hunt down and punish the raiders that attacked a village near {s3} before they reach the safety of their base at {s4}." ## ), ################## # Enemy Kingdom Lord quests ################## # Note : This is defined as the first enemy lord quest in module_constants.py: ("lend_surgeon", "Lend Your Surgeon {s3} to {s1}", qf_random_quest, "Lend your experienced surgeon {s3} to {s1}." ), ################## # Kingdom Army quests ################## # Note : This is defined as lord quests end in module_constants.py: ("follow_army", "Follow {s9}'s Army", qf_random_quest, "None" ), ("report_to_army", "Report to {s13}, the Marshall", qf_random_quest, "None" ), # Note : This is defined as the first army quest in module_constants.py: ("deliver_cattle_to_army", "Deliver {reg3} Heads of Cattle to {s13}", qf_random_quest, "None" ), ("join_siege_with_army", "Join the Siege of {s14}", qf_random_quest, "None" ), ("scout_waypoints", "Scout {s13}, {s14} and {s15}", qf_random_quest, "None" ), ################## # Kingdom Lady quests ################## # Note : This is defined as the first kingdom lady quest in module_constants.py: ("rescue_lord_by_replace", "Rescue {s13} from {s14}", qf_random_quest, "None" ), ("deliver_message_to_prisoner_lord", "Deliver Message to {s13} at {s14}", qf_random_quest, "None" ), ("duel_for_lady", "Challenge {s13} to a Trial of Arms", qf_random_quest, "None" ), ################## # Mayor quests ################## # Note : This is defined as the first mayor quest in module_constants.py: ("move_cattle_herd", "Move Cattle Herd to {s13}", qf_random_quest, "Guildmaster of {s10} asked you to move a cattle herd to {s13}." ), ("escort_merchant_caravan", "Escort Merchant Caravan to {s8}", qf_random_quest, "Escort the merchant caravan to the town of {s8}." ), ("deliver_wine", "Deliver {reg5} Units of {s6} to {s4}", qf_random_quest, "{s9} of {s3} asked you to deliver {reg5} units of {s6} to the tavern in {s4} in 7 days." ), ("troublesome_bandits", "Hunt Down Troublesome Bandits", qf_random_quest, "{s9} of {s4} asked you to hunt down the troublesome bandits in the vicinity of the town." ), ("kidnapped_girl", "Ransom Girl from Bandits", qf_random_quest, "Guildmaster of {s4} gave you {reg12} denars to pay the ransom of a girl kidnapped by bandits.\ You are to meet the bandits near {s3} and pay them the ransom fee.\ After that you are to bring the girl back to {s4}." ), ("persuade_lords_to_make_peace", "Make Sure Two Lords Do Not Object to Peace", qf_random_quest, "Guildmaster of {s4} promised you {reg12} denars if you can make sure that\ {s12} and {s13} no longer pose a threat to a peace settlement between {s15} and {s14}.\ In order to do that, you must either convince them or make sure they fall captive and remain so until a peace agreement is made." ), ("deal_with_looters", "Deal with Looters", qf_random_quest, "The Guildmaster of {s4} has asked you to deal with several bands of looters around {s4}, and bring back any goods you recover." ), ("deal_with_night_bandits", "Deal with Night Bandits", qf_random_quest, "TODO: The Guildmaster of {s14} has asked you to deal with night bandits at {s14}." ), ############ # Village Elder quests ############ # Note : This is defined as the first village elder quest in module_constants.py: ("deliver_grain", "Bring wheat to {s3}", qf_random_quest, "The elder of the village of {s3} asked you to bring them {reg5} packs of wheat.." ), ("deliver_cattle", "Deliver {reg5} Heads of Cattle to {s3}", qf_random_quest, "The elder of the village of {s3} asked you to bring {reg5} heads of cattle." ), ("train_peasants_against_bandits", "Train the Peasants of {s13} Against Bandits.", qf_random_quest, "None" ), # Deliver horses, Deliver food, Escort_Caravan, Hunt bandits, Ransom Merchant. ## ("capture_nobleman", "Capture Nobleman",qf_random_quest, ## "{s1} wanted you to capture an enemy nobleman on his way from {s3} to {s4}. He said the nobleman would leave {s3} in {reg1} days." ## ), # Bandit quests: Capture rich merchant, capture banker, kill manhunters?.. # Note : This is defined as the last village elder quest in module_constants.py: ("eliminate_bandits_infesting_village", "Save the Village of {s7} from Marauding Bandits", qf_random_quest, "A villager from {s7} begged you to save their village from the bandits that took refuge there." ), # Tutorial quest ## ("destroy_dummies", "Destroy Dummies", qf_show_progression, ## "Trainer ordered you to destroy 10 dummies in the training camp." ## ), # Join Kingdom quest ("join_faction", "Give Oath of Homage to {s1}", qf_random_quest, "Find {s1} and give him your oath of homage." ), # Rebel against Kingdom quest ("rebel_against_kingdom", "Help {s13} Claim the Throne of {s14}", qf_random_quest, "None" ), ("quests_end", "Quests End", 0, "."), ]
Python
imod_plain = 0 imod_cracked = 1 imod_rusty = 2 imod_bent = 3 imod_chipped = 4 imod_battered = 5 imod_poor = 6 imod_crude = 7 imod_old = 8 imod_cheap = 9 imod_fine = 10 imod_well_made = 11 imod_sharp = 12 imod_balanced = 13 imod_tempered = 14 imod_deadly = 15 imod_exquisite = 16 imod_masterwork = 17 imod_heavy = 18 imod_strong = 19 imod_powerful = 20 imod_tattered = 21 imod_ragged = 22 imod_rough = 23 imod_sturdy = 24 imod_thick = 25 imod_hardened = 26 imod_reinforced = 27 imod_superb = 28 imod_lordly = 29 imod_lame = 30 imod_swaybacked = 31 imod_stubborn = 32 imod_timid = 33 imod_meek = 34 imod_spirited = 35 imod_champion = 36 imod_fresh = 37 imod_day_old = 38 imod_two_day_old = 39 imod_smelling = 40 imod_rotten = 41 imod_large_bag = 42 imodbit_plain = 1 imodbit_cracked = 2 imodbit_rusty = 4 imodbit_bent = 8 imodbit_chipped = 16 imodbit_battered = 32 imodbit_poor = 64 imodbit_crude = 128 imodbit_old = 256 imodbit_cheap = 512 imodbit_fine = 1024 imodbit_well_made = 2048 imodbit_sharp = 4096 imodbit_balanced = 8192 imodbit_tempered = 16384 imodbit_deadly = 32768 imodbit_exquisite = 65536 imodbit_masterwork = 131072 imodbit_heavy = 262144 imodbit_strong = 524288 imodbit_powerful = 1048576 imodbit_tattered = 2097152 imodbit_ragged = 4194304 imodbit_rough = 8388608 imodbit_sturdy = 16777216 imodbit_thick = 33554432 imodbit_hardened = 67108864 imodbit_reinforced = 134217728 imodbit_superb = 268435456 imodbit_lordly = 536870912 imodbit_lame = 1073741824 imodbit_swaybacked = 2147483648 imodbit_stubborn = 4294967296 imodbit_timid = 8589934592 imodbit_meek = 17179869184 imodbit_spirited = 34359738368 imodbit_champion = 68719476736 imodbit_fresh = 137438953472 imodbit_day_old = 274877906944 imodbit_two_day_old = 549755813888 imodbit_smelling = 1099511627776 imodbit_rotten = 2199023255552 imodbit_large_bag = 4398046511104
Python
menu_start_game_1 = 0 menu_start_phase_2 = 1 menu_start_game_3 = 2 menu_tutorial = 3 menu_reports = 4 menu_custom_battle_2 = 5 menu_custom_battle_end = 6 menu_start_character_1 = 7 menu_start_character_2 = 8 menu_start_character_3 = 9 menu_start_character_4 = 10 menu_choose_skill = 11 menu_past_life_explanation = 12 menu_auto_return = 13 menu_morale_report = 14 menu_faction_orders = 15 menu_character_report = 16 menu_party_size_report = 17 menu_faction_relations_report = 18 menu_camp = 19 menu_camp_cheat = 20 menu_camp_action = 21 menu_camp_recruit_prisoners = 22 menu_camp_no_prisoners = 23 menu_camp_action_read_book = 24 menu_camp_action_read_book_start = 25 menu_retirement_verify = 26 menu_end_game = 27 menu_pay_day = 28 menu_cattle_herd = 29 menu_cattle_herd_kill = 30 menu_cattle_herd_kill_end = 31 menu_arena_duel_fight = 32 menu_simple_encounter = 33 menu_encounter_retreat_confirm = 34 menu_encounter_retreat = 35 menu_order_attack_begin = 36 menu_order_attack_2 = 37 menu_battle_debrief = 38 menu_total_victory = 39 menu_enemy_slipped_away = 40 menu_total_defeat = 41 menu_permanent_damage = 42 menu_pre_join = 43 menu_join_battle = 44 menu_join_order_attack = 45 menu_zendar = 46 menu_salt_mine = 47 menu_four_ways_inn = 48 menu_test_scene = 49 menu_battlefields = 50 menu_dhorak_keep = 51 menu_join_siege_outside = 52 menu_cut_siege_without_fight = 53 menu_besiegers_camp_with_allies = 54 menu_castle_outside = 55 menu_castle_guard = 56 menu_castle_entry_granted = 57 menu_castle_entry_denied = 58 menu_castle_meeting = 59 menu_castle_meeting_selected = 60 menu_castle_besiege = 61 menu_siege_attack_meets_sally = 62 menu_castle_besiege_inner_battle = 63 menu_construct_ladders = 64 menu_construct_siege_tower = 65 menu_castle_attack_walls_simulate = 66 menu_castle_attack_walls_with_allies_simulate = 67 menu_castle_taken_by_friends = 68 menu_castle_taken = 69 menu_castle_taken_2 = 70 menu_requested_castle_granted_to_player = 71 menu_requested_castle_granted_to_another = 72 menu_leave_faction = 73 menu_give_center_to_player = 74 menu_give_center_to_player_2 = 75 menu_oath_fulfilled = 76 menu_siege_started_defender = 77 menu_siege_join_defense = 78 menu_enter_your_own_castle = 79 menu_village = 80 menu_village_hostile_action = 81 menu_recruit_volunteers = 82 menu_village_hunt_down_fugitive_defeated = 83 menu_village_infest_bandits_result = 84 menu_village_infestation_removed = 85 menu_center_manage = 86 menu_center_improve = 87 menu_town_bandits_failed = 88 menu_town_bandits_succeeded = 89 menu_village_steal_cattle_confirm = 90 menu_village_steal_cattle = 91 menu_village_take_food_confirm = 92 menu_village_take_food = 93 menu_village_start_attack = 94 menu_village_loot_no_resist = 95 menu_village_loot_complete = 96 menu_village_loot_defeat = 97 menu_village_loot_continue = 98 menu_close = 99 menu_center_tax = 100 menu_town = 101 menu_town_tournament_lost = 102 menu_town_tournament_won = 103 menu_town_tournament_won_by_another = 104 menu_town_tournament = 105 menu_tournament_withdraw_verify = 106 menu_tournament_bet = 107 menu_tournament_bet_confirm = 108 menu_tournament_participants = 109 menu_collect_taxes = 110 menu_collect_taxes_complete = 111 menu_collect_taxes_rebels_killed = 112 menu_collect_taxes_failed = 113 menu_collect_taxes_revolt_warning = 114 menu_collect_taxes_revolt = 115 menu_train_peasants_against_bandits = 116 menu_train_peasants_against_bandits_ready = 117 menu_train_peasants_against_bandits_training_result = 118 menu_train_peasants_against_bandits_attack = 119 menu_train_peasants_against_bandits_attack_result = 120 menu_train_peasants_against_bandits_success = 121 menu_disembark = 122 menu_ship_reembark = 123 menu_center_reports = 124 menu_price_and_production = 125 menu_town_trade = 126 menu_town_trade_assessment_begin = 127 menu_town_trade_assessment = 128 menu_sneak_into_town_suceeded = 129 menu_sneak_into_town_caught = 130 menu_sneak_into_town_caught_dispersed_guards = 131 menu_sneak_into_town_caught_ran_away = 132 menu_enemy_offer_ransom_for_prisoner = 133 menu_training_ground = 134 menu_training_ground_selection_details_melee_1 = 135 menu_training_ground_selection_details_melee_2 = 136 menu_training_ground_selection_details_mounted = 137 menu_training_ground_selection_details_ranged_1 = 138 menu_training_ground_selection_details_ranged_2 = 139 menu_training_ground_description = 140 menu_training_ground_training_result = 141 menu_marshall_selection_candidate_ask = 142 menu_captivity_avoid_wilderness = 143 menu_captivity_start_wilderness = 144 menu_captivity_start_wilderness_surrender = 145 menu_captivity_start_wilderness_defeat = 146 menu_captivity_start_castle_surrender = 147 menu_captivity_start_castle_defeat = 148 menu_captivity_start_under_siege_defeat = 149 menu_captivity_wilderness_taken_prisoner = 150 menu_captivity_wilderness_check = 151 menu_captivity_end_wilderness_escape = 152 menu_captivity_castle_taken_prisoner = 153 menu_captivity_rescue_lord_taken_prisoner = 154 menu_captivity_castle_check = 155 menu_captivity_end_exchanged_with_prisoner = 156 menu_captivity_end_propose_ransom = 157 menu_captivity_castle_remain = 158 menu_kingdom_army_quest_report_to_army = 159 menu_kingdom_army_quest_messenger = 160 menu_kingdom_army_quest_join_siege_order = 161 menu_kingdom_army_follow_failed = 162 menu_invite_player_to_faction_without_center = 163 menu_invite_player_to_faction = 164 menu_invite_player_to_faction_accepted = 165 menu_question_peace_offer = 166 menu_notification_player_faction_active = 167 menu_notification_player_faction_deactive = 168 menu_notification_center_under_siege = 169 menu_notification_village_raided = 170 menu_notification_village_raid_started = 171 menu_notification_one_faction_left = 172 menu_notification_oath_renounced_faction_defeated = 173 menu_notification_center_lost = 174 menu_notification_troop_left_players_faction = 175 menu_notification_troop_joined_players_faction = 176 menu_notification_war_declared = 177 menu_notification_peace_declared = 178 menu_notification_faction_defeated = 179 menu_notification_rebels_switched_to_faction = 180 menu_kill_local_merchant_begin = 181 menu_auto_return_to_map = 182 menu_camp_action_formation_control_settings = 183 menu_camp_action_manage_arrays = 184 menu_camp_action_array_change = 185
Python
mst_town_default = 0 mst_conversation_encounter = 1 mst_town_center = 2 mst_village_center = 3 mst_bandits_at_night = 4 mst_village_training = 5 mst_visit_town_castle = 6 mst_back_alley_kill_local_merchant = 7 mst_back_alley_revolt = 8 mst_lead_charge = 9 mst_village_attack_bandits = 10 mst_village_raid = 11 mst_besiege_inner_battle_castle = 12 mst_besiege_inner_battle_town_center = 13 mst_castle_attack_walls_defenders_sally = 14 mst_castle_attack_walls_belfry = 15 mst_castle_attack_walls_ladder = 16 mst_castle_visit = 17 mst_training_ground_trainer_talk = 18 mst_training_ground_trainer_training = 19 mst_training_ground_training = 20 mst_sneak_caught_fight = 21 mst_ai_training = 22 mst_camera_test = 23 mst_arena_melee_fight = 24 mst_arena_challenge_fight = 25 mst_tutorial_1 = 26 mst_tutorial_2 = 27 mst_tutorial_3 = 28 mst_tutorial_3_2 = 29 mst_tutorial_4 = 30 mst_tutorial_5 = 31 mst_custom_battle = 32 mst_custom_battle_siege = 33 mst_custom_battle_5 = 34
Python
fac_no_faction = 0 fac_commoners = 1 fac_outlaws = 2 fac_neutral = 3 fac_innocents = 4 fac_merchants = 5 fac_dark_knights = 6 fac_culture_1 = 7 fac_culture_2 = 8 fac_culture_3 = 9 fac_culture_4 = 10 fac_culture_5 = 11 fac_player_faction = 12 fac_player_supporters_faction = 13 fac_kingdom_1 = 14 fac_kingdom_2 = 15 fac_kingdom_3 = 16 fac_kingdom_4 = 17 fac_kingdom_5 = 18 fac_kingdoms_end = 19 fac_robber_knights = 20 fac_khergits = 21 fac_black_khergits = 22 fac_manhunters = 23 fac_deserters = 24 fac_mountain_bandits = 25 fac_forest_bandits = 26 fac_undeads = 27 fac_slavers = 28 fac_peasant_rebels = 29 fac_noble_refugees = 30
Python
import string from module_info import * from module_troops import * from process_common import * #from process_operations import * num_face_numeric_keys = 4 def save_troops(): file = open(export_dir + "troops.txt","w") file.write("troopsfile version 1\n") file.write("%d "%len(troops)) for troop in troops: troop_len = len(troop) if troop_len == 11: troop[11:11] = [0, 0, 0, 0] elif troop_len == 12: troop[12:12] = [0, 0, 0] elif troop_len == 13: troop[13:13] = [0, 0] elif troop_len == 14: troop[14:14] = [0] if (troop[4] > 0): # add_tag_use(tag_uses,tag_scene,troop[4] & tsf_site_id_mask) id_no = find_object(troops,convert_to_identifier(troop[0])) # if (id_no >= 0): add_tag_use(tag_uses,tag_troop,id_no) # if (troop[6] > 0): add_tag_use(tag_uses,tag_faction,troop[6]) file.write("\ntrp_%s %s %s %d %d %d %d %d %d\n "%(convert_to_identifier(troop[0]),replace_spaces(troop[1]),replace_spaces(troop[2]),troop[3],troop[4],troop[5], troop[6], troop[13], troop[14])) inventory_list = troop[7] # inventory_list.append(itm_arrows) # inventory_list.append(itm_bolts) for inventory_item in inventory_list: # add_tag_use(tag_uses,tag_item,inventory_item) file.write("%d 0 "%inventory_item) for i in xrange(max_inventory_items - len(inventory_list)): file.write("-1 0 ") file.write("\n ") attrib = troop[8] strength = (attrib & 0xff) agility = ((attrib >> 8)& 0xff) intelligence = ((attrib >> 16)& 0xff) charisma = ((attrib >> 24)& 0xff) starting_level = (attrib >> level_bits) & level_mask # gold = two_to_pow(2 + (attrib >> 12)& 0x0f) * random file.write(" %d %d %d %d %d\n"%(strength,agility,intelligence,charisma,starting_level)) wp_word = troop[9] for wp in xrange(num_weapon_proficiencies): wp_level = wp_word & 0x3FF file.write(" %d"%wp_level) wp_word = wp_word >> 10 file.write("\n") skill_array = troop[10] for i in xrange(num_skill_words): file.write("%d "%((skill_array >> (i * 32)) & 0xffffffff)) file.write("\n ") face_keys = [troop[11],troop[12]] for fckey in (face_keys): word_keys = [] for word_no in xrange(num_face_numeric_keys): word_keys.append((fckey >> (64 * word_no)) & 0xFFFFFFFFFFFFFFFF) for word_no in xrange(num_face_numeric_keys): file.write("%d "%(word_keys[(num_face_numeric_keys -1) - word_no])) file.write("\n") # word2 = (fckey >> 64) & 0xFFFFFFFFFFFFFFFF # word3 = (fckey >> 128) & 0xFFFFFFFFFFFFFFFF # word4 = (fckey >> 192) & 0xFFFFFFFFFFFFFFFF # file.write("%d %d %d %d "%(word4, word3, word2, word1)) # face_keys = troop[10] # for fckey in (face_keys): # file.write("%d "%(fckey)) # for i in xrange(4 - len(face_keys)): # file.write("0 ") file.close() def two_to_pow(x): result = 1 for i in xrange(x): result = result * 2 return result def save_python_header(): file = open("./ID_troops.py","w") for i_troop in xrange(len(troops)): file.write("trp_%s = %d\n"%(convert_to_identifier(troops[i_troop][0]),i_troop)) file.close() print "Exporting troops data" #tag_uses = load_tag_uses(export_dir) save_python_header() save_troops() #save_tag_uses(export_dir, tag_uses) #print "Generating C header..." #save_c_header() #print "Generating Python header..." #print "Finished."
Python
from module_info import * from process_common import * from process_operations import * print "Checking tag usages..." tag_uses = load_tag_uses(export_dir) #Processing strings length = 0 for i in xrange(len(tag_uses[tag_string])): if tag_uses[tag_string][i] > 0: length = i for i in xrange(length): if tag_uses[tag_string][i] == 0: if i > 3: print "WARNING: String is never used: " + strings[i][0].lower() #Processing items length = 0 for i in xrange(len(tag_uses[tag_item])): if tag_uses[tag_item][i] > 0: length = i for i in xrange(length): if tag_uses[tag_item][i] == 0 and i > 1: print "WARNING: Item is never used: " + items[i][0].lower() #Processing troops length = 0 for i in xrange(len(tag_uses[tag_troop])): if tag_uses[tag_troop][i] > 0: length = i for i in xrange(length): if tag_uses[tag_troop][i] == 0: if i > 3: print "WARNING: Troop is never used: " + troops[i][0].lower() #Processing factions length = 0 for i in xrange(len(tag_uses[tag_faction])): if tag_uses[tag_faction][i] > 0: length = i for i in xrange(length): if tag_uses[tag_faction][i] == 0: print "WARNING: Faction is never used: " + factions[i][0].lower() #Processing quests length = 0 for i in xrange(len(tag_uses[tag_quest])): if tag_uses[tag_quest][i] > 0: length = i for i in xrange(length): if tag_uses[tag_quest][i] == 0: print "WARNING: Quest is never used: " + quests[i][0].lower() #Processing party_templates length = 0 for i in xrange(len(tag_uses[tag_party_tpl])): if tag_uses[tag_party_tpl][i] > 0: length = i for i in xrange(length): if tag_uses[tag_party_tpl][i] == 0: if i > 3: print "WARNING: Party template is never used: " + party_templates[i][0].lower() #Processing parties length = 0 for i in xrange(len(tag_uses[tag_party])): if tag_uses[tag_party][i] > 0: length = i for i in xrange(length): if tag_uses[tag_party][i] == 0: if parties[i][0].lower().find("temp_") == -1: print "WARNING: Party is never used: " + parties[i][0].lower() #Processing scenes #length = 0 #for i in xrange(1024): # if tag_uses[tag_scene][i] > 0: # length = i # #for i in xrange(length): # if tag_uses[tag_scene][i] == 0: # print "WARNING: Scene is never used: " + scenes[i][0].lower() #Processing mission_templates length = 0 for i in xrange(len(tag_uses[tag_mission_tpl])): if tag_uses[tag_mission_tpl][i] > 0: length = i for i in xrange(length): if tag_uses[tag_mission_tpl][i] == 0: print "WARNING: Mission template is never used: " + mission_templates[i][0].lower() #Processing game_menus length = 0 for i in xrange(len(tag_uses[tag_menu])): if tag_uses[tag_menu][i] > 0: length = i for i in xrange(length): if tag_uses[tag_menu][i] == 0 and i > 0: if i > 1: print "WARNING: Game menu is never used: " + game_menus[i][0].lower() #Processing scripts length = 0 for i in xrange(len(tag_uses[tag_script])): if tag_uses[tag_script][i] > 0: length = i for i in xrange(length): if tag_uses[tag_script][i] == 0: if scripts[i][0].lower().find("game_") == -1: print "WARNING: Script is never used: " + scripts[i][0].lower() #Processing particle systems length = 0 for i in xrange(len(tag_uses[tag_particle_sys])): if tag_uses[tag_particle_sys][i] > 0: length = i for i in xrange(length): if tag_uses[tag_particle_sys][i] == 0: if particle_systems[i][0].lower().find("game_") == -1: print "WARNING: Particle system is never used: " + particle_systems[i][0].lower() #Processing scene props #length = 0 #for i in xrange(1024): # if tag_uses[tag_scene_prop][i] > 0: # length = i # #for i in xrange(length): # if tag_uses[tag_scene_prop][i] == 0: # print "WARNING: Scene prop is never used: " + scene_props[i][0].lower() #Processing sounds #length = 0 #for i in xrange(1024): # if tag_uses[tag_sound][i] > 0: # length = i # #for i in xrange(length): # if tag_uses[tag_sound][i] == 0: # print "WARNING: Sound is never used: " + sounds[i][0].lower() #Processing map icons #length = 0 #for i in xrange(1024): # if tag_uses[tag_map_icon][i] > 0: # length = i # #for i in xrange(length): # if tag_uses[tag_map_icon][i] == 0: # print "WARNING: Map icon is never used: " + map_icons[i][0].lower()
Python
from header_common import * from header_presentations import * from header_mission_templates import * from ID_meshes import * from header_operations import * from header_triggers import * from module_constants import * import string #################################################################################################################### # Each presentation record contains the following fields: # 1) Presentation id: used for referencing presentations in other files. The prefix prsnt_ is automatically added before each presentation id. # 2) Presentation flags. See header_presentations.py for a list of available flags # 3) Presentation background mesh: See module_meshes.py for a list of available background meshes # 4) Triggers: Simple triggers that are associated with the presentation #################################################################################################################### ################################## # Form Ranks kit section # formation_order_functions = [ ("@Dismiss", (call_script, "script_formation_dismiss_key_reaction")), ("@Tactical charge", (call_script, "script_formation_tactical_charge_key_reaction")), ("@Charge", (call_script, "script_formation_charge_key_reaction", 1, "str_formation_charge")), ("@Halt", (call_script, "script_formation_charge_key_reaction", 0, "str_formation_halt")), ("@Fall back", (call_script, "script_formation_charge_key_reaction", -1, "str_formation_fall_back")), ("@Move forward", (call_script, "script_formation_move_key_reaction", 0, 10, "str_formation_advance")), ("@Move backward", (call_script, "script_formation_move_key_reaction", 0, -10, "str_formation_move_back")), ("@Move left", (call_script, "script_formation_move_key_reaction", -10, 0, "str_formation_move_left")), ("@Move right", (call_script, "script_formation_move_key_reaction", 10, 0, "str_formation_move_right")), ("@Turn left", (call_script, "script_formation_turn_key_reaction", 15, "str_formation_turn_left")), ("@Turn right", (call_script, "script_formation_turn_key_reaction", -15, "str_formation_turn_right")), ("@Stand closer", (call_script, "script_formation_density_key_reaction", -1, "str_formation_stand_closer")), ("@Spred out", (call_script, "script_formation_density_key_reaction", 1, "str_formation_spread_out")), ("@Toward enemies", (call_script, "script_formation_auto_rotation_key_reaction", 1)), ("@Free direction", (call_script, "script_formation_auto_rotation_key_reaction", 0)), ] # # Form Ranks kit section end ############################### presentations = [ ("game_credits",prsntf_read_only,mesh_load_window,[ (ti_on_presentation_load, [(assign, "$g_presentation_credits_obj_1", -1), (assign, "$g_presentation_credits_obj_2", -1), (assign, "$g_presentation_credits_obj_3", -1), (assign, "$g_presentation_credits_obj_4", -1), (assign, "$g_presentation_credits_obj_5", -1), (assign, "$g_presentation_credits_obj_6", -1), (assign, "$g_presentation_credits_obj_7", -1), (assign, "$g_presentation_credits_obj_8", -1), (assign, "$g_presentation_credits_obj_9", -1), (assign, "$g_presentation_credits_obj_10", -1), (assign, "$g_presentation_credits_obj_11", -1), (assign, "$g_presentation_credits_obj_12", -1), (assign, "$g_presentation_credits_obj_1_alpha", 0), (assign, "$g_presentation_credits_obj_2_alpha", 0), (assign, "$g_presentation_credits_obj_3_alpha", 0), (assign, "$g_presentation_credits_obj_4_alpha", 0), (assign, "$g_presentation_credits_obj_5_alpha", 0), (assign, "$g_presentation_credits_obj_6_alpha", 0), (assign, "$g_presentation_credits_obj_7_alpha", 0), (assign, "$g_presentation_credits_obj_8_alpha", 0), (assign, "$g_presentation_credits_obj_9_alpha", 0), ]), (ti_on_presentation_run, [ (store_trigger_param_1, ":cur_time"), (set_fixed_point_multiplier, 1000), (presentation_set_duration, 1000000), (try_begin), (this_or_next|key_clicked, key_space), (this_or_next|key_clicked, key_enter), (this_or_next|key_clicked, key_escape), (this_or_next|key_clicked, key_back_space), (this_or_next|key_clicked, key_left_mouse_button), (key_clicked, key_right_mouse_button), (presentation_set_duration, 0), (try_end), (try_begin), (lt, "$g_presentation_credits_obj_1", 0), (str_store_string, s1, "str_credits_1"), (create_text_overlay, "$g_presentation_credits_obj_1", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_1", 0), (overlay_set_alpha, "$g_presentation_credits_obj_1", 0), (position_set_x, pos1, 1500), (position_set_y, pos1, 1500), (overlay_set_size, "$g_presentation_credits_obj_1", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 375), (overlay_set_position, "$g_presentation_credits_obj_1", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_1", 1000, 0xFF), (else_try), (gt, ":cur_time", 2000), (eq, "$g_presentation_credits_obj_1_alpha", 0), (assign, "$g_presentation_credits_obj_1_alpha", 1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_1", 1000, 0x00), (else_try), (gt, ":cur_time", 3500), (lt, "$g_presentation_credits_obj_2", 0), (str_store_string, s1, "str_credits_2"), (create_text_overlay, "$g_presentation_credits_obj_2", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_2", 0), (overlay_set_alpha, "$g_presentation_credits_obj_2", 0), (position_set_x, pos1, 1750), (position_set_y, pos1, 1750), (overlay_set_size, "$g_presentation_credits_obj_2", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 375), (overlay_set_position, "$g_presentation_credits_obj_2", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_2", 1000, 0xFF), (else_try), (gt, ":cur_time", 5500), (eq, "$g_presentation_credits_obj_2_alpha", 0), (assign, "$g_presentation_credits_obj_2_alpha", 1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_2", 1000, 0x00), (else_try), (gt, ":cur_time", 7000), (lt, "$g_presentation_credits_obj_3", 0), (str_store_string, s1, "str_credits_3"), (create_text_overlay, "$g_presentation_credits_obj_3", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_3", 0), (overlay_set_alpha, "$g_presentation_credits_obj_3", 0), (position_set_x, pos1, 1750), (position_set_y, pos1, 1750), (overlay_set_size, "$g_presentation_credits_obj_3", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 375), (overlay_set_position, "$g_presentation_credits_obj_3", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_3", 1000, 0xFF), (else_try), (gt, ":cur_time", 9000), (eq, "$g_presentation_credits_obj_3_alpha", 0), (assign, "$g_presentation_credits_obj_3_alpha", 1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_3", 1000, 0), (else_try), (gt, ":cur_time", 10500), (lt, "$g_presentation_credits_obj_4", 0), (str_store_string, s1, "str_credits_4"), (create_text_overlay, "$g_presentation_credits_obj_4", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_4", 0), (overlay_set_alpha, "$g_presentation_credits_obj_4", 0), (position_set_x, pos1, 1750), (position_set_y, pos1, 1750), (overlay_set_size, "$g_presentation_credits_obj_4", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 375), (overlay_set_position, "$g_presentation_credits_obj_4", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_4", 1000, 0xFF), (else_try), (gt, ":cur_time", 12500), (eq, "$g_presentation_credits_obj_4_alpha", 0), (assign, "$g_presentation_credits_obj_4_alpha", 1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_4", 1000, 0), (else_try), (gt, ":cur_time", 14000), (lt, "$g_presentation_credits_obj_5", 0), (str_store_string, s1, "str_credits_8"), (create_text_overlay, "$g_presentation_credits_obj_5", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_5", 0), (overlay_set_alpha, "$g_presentation_credits_obj_5", 0), (position_set_x, pos1, 1750), (position_set_y, pos1, 1750), (overlay_set_size, "$g_presentation_credits_obj_5", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 375), (overlay_set_position, "$g_presentation_credits_obj_5", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_5", 1000, 0xFF), (else_try), (gt, ":cur_time", 16000), (eq, "$g_presentation_credits_obj_5_alpha", 0), (assign, "$g_presentation_credits_obj_5_alpha", 1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_5", 1000, 0), (else_try), (gt, ":cur_time", 17500), (lt, "$g_presentation_credits_obj_6", 0), (str_store_string, s1, "str_credits_5"), (create_text_overlay, "$g_presentation_credits_obj_6", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_6", 0), (overlay_set_alpha, "$g_presentation_credits_obj_6", 0), (position_set_x, pos1, 1750), (position_set_y, pos1, 1750), (overlay_set_size, "$g_presentation_credits_obj_6", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 375), (overlay_set_position, "$g_presentation_credits_obj_6", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_6", 1000, 0xFF), (else_try), (gt, ":cur_time", 19500), (eq, "$g_presentation_credits_obj_6_alpha", 0), (assign, "$g_presentation_credits_obj_6_alpha", 1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_6", 1000, 0), (else_try), (gt, ":cur_time", 21000), (lt, "$g_presentation_credits_obj_7", 0), (str_store_string, s1, "str_credits_6"), (create_text_overlay, "$g_presentation_credits_obj_7", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_7", 0), (overlay_set_alpha, "$g_presentation_credits_obj_7", 0), (position_set_x, pos1, 1750), (position_set_y, pos1, 1750), (overlay_set_size, "$g_presentation_credits_obj_7", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 375), (overlay_set_position, "$g_presentation_credits_obj_7", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_7", 1000, 0xFF), (else_try), (gt, ":cur_time", 23000), (eq, "$g_presentation_credits_obj_7_alpha", 0), (assign, "$g_presentation_credits_obj_7_alpha", 1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_7", 1000, 0), (else_try), (gt, ":cur_time", 24500), (lt, "$g_presentation_credits_obj_8", 0), (str_store_string, s1, "str_credits_9"), (create_text_overlay, "$g_presentation_credits_obj_8", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_8", 0), (overlay_set_alpha, "$g_presentation_credits_obj_8", 0), (position_set_x, pos1, 1750), (position_set_y, pos1, 1750), (overlay_set_size, "$g_presentation_credits_obj_8", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 375), (overlay_set_position, "$g_presentation_credits_obj_8", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_8", 1000, 0xFF), (else_try), (gt, ":cur_time", 26500), (eq, "$g_presentation_credits_obj_8_alpha", 0), (assign, "$g_presentation_credits_obj_8_alpha", 1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_8", 1000, 0), (else_try), (gt, ":cur_time", 28000), (lt, "$g_presentation_credits_obj_9", 0), (str_store_string, s1, "str_credits_10"), (create_text_overlay, "$g_presentation_credits_obj_9", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_9", 0), (overlay_set_alpha, "$g_presentation_credits_obj_9", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, "$g_presentation_credits_obj_9", pos1), (position_set_x, pos1, 250), (position_set_y, pos1, 485), (overlay_set_position, "$g_presentation_credits_obj_9", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_9", 1000, 0xFF), (str_store_string, s1, "str_credits_11"), (create_text_overlay, "$g_presentation_credits_obj_10", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_10", 0), (overlay_set_alpha, "$g_presentation_credits_obj_10", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, "$g_presentation_credits_obj_10", pos1), (position_set_x, pos1, 750), (position_set_y, pos1, 470), (overlay_set_position, "$g_presentation_credits_obj_10", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_10", 1000, 0xFF), (str_store_string, s1, "str_credits_12"), (create_text_overlay, "$g_presentation_credits_obj_11", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_11", 0), (overlay_set_alpha, "$g_presentation_credits_obj_11", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, "$g_presentation_credits_obj_11", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 105), (overlay_set_position, "$g_presentation_credits_obj_11", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_11", 1000, 0xFF), (else_try), (gt, ":cur_time", 34000), (eq, "$g_presentation_credits_obj_9_alpha", 0), (assign, "$g_presentation_credits_obj_9_alpha", 1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_9", 1000, 0), (overlay_animate_to_alpha, "$g_presentation_credits_obj_10", 1000, 0), (overlay_animate_to_alpha, "$g_presentation_credits_obj_11", 1000, 0), (else_try), (gt, ":cur_time", 35500), (lt, "$g_presentation_credits_obj_12", 0), (str_store_string, s1, "str_credits_7"), (create_text_overlay, "$g_presentation_credits_obj_12", s1, tf_center_justify|tf_double_space), (overlay_set_color, "$g_presentation_credits_obj_12", 0), (overlay_set_alpha, "$g_presentation_credits_obj_12", 0xFF), (position_set_x, pos1, 1000), (position_set_y, pos1, 1000), (overlay_set_size, "$g_presentation_credits_obj_12", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, -6100), (overlay_set_position, "$g_presentation_credits_obj_12", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 760), (overlay_animate_to_position, "$g_presentation_credits_obj_12", 70000, pos1), (else_try), (gt, ":cur_time", 105500), (presentation_set_duration, 0), (try_end), ]), ]), ("banner_selection",0,mesh_load_window,[ (ti_on_presentation_load, [(set_fixed_point_multiplier, 1000), (str_store_string, s1, "str_banner_selection_text"), (create_text_overlay, reg1, s1, tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 600), (overlay_set_position, reg1, pos1), (overlay_set_text, reg1, s1), (create_button_overlay, "$g_presentation_obj_1", "@Next Page", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 50), (overlay_set_position, "$g_presentation_obj_1", pos1), (assign, ":x_pos", 150), (assign, ":y_pos", 575), (assign, ":try_end", banner_meshes_end_minus_one), (store_mul, ":begin_mesh", 16, "$g_presentation_page_no"), (val_add, ":begin_mesh", banner_meshes_begin), (store_add, ":try_end_2", ":begin_mesh", 16), (val_min, ":try_end", ":try_end_2"), (store_add, "$g_presentation_banner_start", "$g_presentation_obj_1", 1), (try_for_range, ":cur_banner_mesh", ":begin_mesh", ":try_end"), (create_image_button_overlay, reg1, ":cur_banner_mesh", ":cur_banner_mesh"), (position_set_x, pos1, ":x_pos"), (position_set_y, pos1, ":y_pos"), (overlay_set_position, reg1, pos1), (position_set_x, pos1, 100), (position_set_y, pos1, 100), (overlay_set_size, reg1, pos1), (val_add, ":x_pos", 100), (ge, ":x_pos", 900), (assign, ":x_pos", 150), (val_sub, ":y_pos", 250), (try_end), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [(store_trigger_param_1, ":object"), (try_begin), (eq, ":object", "$g_presentation_obj_1"), (val_add, "$g_presentation_page_no", 1), (val_mod, "$g_presentation_page_no", 8), (start_presentation, "prsnt_banner_selection"), (else_try), (store_sub, ":selected_banner", ":object", "$g_presentation_banner_start"), (store_mul, ":page_adder", 16, "$g_presentation_page_no"), (val_add, ":selected_banner", ":page_adder"), (store_add, ":selected_banner_map_icon", ":selected_banner", banner_map_icons_begin), (party_set_banner_icon, "p_main_party", ":selected_banner_map_icon"), (store_add, ":selected_banner_spr", ":selected_banner", banner_scene_props_begin), (troop_set_slot, "trp_player", slot_troop_banner_scene_prop, ":selected_banner_spr"), (presentation_set_duration, 0), (assign, ":troop_to_change", 0), (assign, ":end_cond", kingdom_heroes_end), (try_for_range, ":cur_troop", kingdom_heroes_begin, ":end_cond"), (troop_slot_eq, ":cur_troop", slot_troop_banner_scene_prop, ":selected_banner_spr"), (assign, ":troop_to_change", ":cur_troop"), (assign, ":end_cond", 0), (troop_set_slot, ":cur_troop", slot_troop_banner_scene_prop, banner_scene_props_end_minus_one), (troop_get_slot, ":cur_party", ":cur_troop", slot_troop_leaded_party), (gt, ":cur_party", 0), (party_set_banner_icon, ":cur_party", banner_map_icons_end_minus_one), (try_end), (try_for_range, ":cur_center", walled_centers_begin, walled_centers_end), (try_begin), (party_slot_eq, ":cur_center", slot_town_lord, "trp_player"), (party_set_banner_icon, ":cur_center", ":selected_banner_map_icon"), (else_try), (party_slot_eq, ":cur_center", slot_town_lord, ":troop_to_change"), (party_set_banner_icon, ":cur_center", banner_map_icons_end_minus_one), (try_end), (try_end), (try_end), ]), (ti_on_presentation_run, [(try_begin), (this_or_next|key_clicked, key_space), (this_or_next|key_clicked, key_enter), (this_or_next|key_clicked, key_escape), (key_clicked, key_back_space), (presentation_set_duration, 0), (try_end), ]), ]), ("custom_banner", 0, mesh_load_window, [ (ti_on_presentation_load, [ (set_fixed_point_multiplier, 1000), (troop_get_slot, ":flag_type", "trp_player", slot_troop_custom_banner_flag_type), (val_max, ":flag_type", 0), (val_add, ":flag_type", custom_banner_flag_types_begin), (troop_get_slot, ":map_flag_type", "trp_player", slot_troop_custom_banner_map_flag_type), (val_max, ":map_flag_type", 0), (val_add, ":map_flag_type", custom_banner_flag_map_types_begin), ## (create_mesh_overlay_with_tableau_material, "$g_presentation_obj_1", ":flag_type", "tableau_custom_banner_square", "trp_player"), (troop_get_slot, ":bg_color_1", "trp_player", slot_troop_custom_banner_bg_color_1), (troop_get_slot, ":bg_color_2", "trp_player", slot_troop_custom_banner_bg_color_2), (create_text_overlay, reg1, "str_color_no_1", 0), (position_set_x, pos1, 40), (position_set_y, pos1, 550), (overlay_set_position, reg1, pos1), (create_text_overlay, reg1, "str_color_no_2", 0), (position_set_x, pos1, 40), (position_set_y, pos1, 500), (overlay_set_position, reg1, pos1), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_22", "mesh_color_picker", "tableau_color_picker", ":bg_color_1"), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_23", "mesh_color_picker", "tableau_color_picker", ":bg_color_2"), (position_set_x, pos1, 200), (position_set_y, pos1, 565), (overlay_set_position, "$g_presentation_obj_22", pos1), (position_set_y, pos1, 515), (overlay_set_position, "$g_presentation_obj_23", pos1), (position_set_x, pos1, 250), (position_set_y, pos1, 250), (overlay_set_size, "$g_presentation_obj_22", pos1), (overlay_set_size, "$g_presentation_obj_23", pos1), (create_button_overlay, "$g_presentation_obj_2", "str_change", tf_center_justify), (create_button_overlay, "$g_presentation_obj_3", "str_change", tf_center_justify), (create_button_overlay, "$g_presentation_obj_4", "str_change_background", tf_center_justify), (create_button_overlay, "$g_presentation_obj_5", "str_change", tf_center_justify), (create_button_overlay, "$g_presentation_obj_19", "str_change", tf_center_justify), (create_button_overlay, "$g_presentation_obj_20", "str_accept", tf_center_justify), (troop_get_slot, ":num_charges", "trp_player", slot_troop_custom_banner_num_charges), (create_button_overlay, "$g_presentation_obj_16", "str_randomize", tf_center_justify), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_17", ":flag_type", "tableau_custom_banner_default", "trp_player"), (try_begin), (eq, ":map_flag_type", "mesh_custom_map_banner_01"), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_18", ":map_flag_type", "tableau_custom_banner_square", "trp_player"), (else_try), (eq, ":map_flag_type", "mesh_custom_map_banner_02"), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_18", ":map_flag_type", "tableau_custom_banner_short", "trp_player"), (else_try), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_18", ":map_flag_type", "tableau_custom_banner_tall", "trp_player"), (try_end), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_1", -1, "tableau_custom_banner_square_no_mesh", "trp_player"), (create_text_overlay, reg1, "str_sample_banner", tf_center_justify), (position_set_x, pos1, 825), (position_set_y, pos1, 650), (overlay_set_position, reg1, pos1), (create_text_overlay, reg1, "str_sample_map_banner", tf_center_justify), (position_set_y, pos1, 500), (overlay_set_position, reg1, pos1), (position_set_x, pos1, 800), (position_set_y, pos1, 640), (overlay_set_position, "$g_presentation_obj_17", pos1), (position_set_x, pos1, 780), (position_set_y, pos1, 315), (overlay_set_position, "$g_presentation_obj_18", pos1), (position_set_x, pos1, 50), (position_set_y, pos1, 50), (overlay_set_size, "$g_presentation_obj_17", pos1), (position_set_x, pos1, 50), (position_set_y, pos1, 50), (overlay_set_size, "$g_presentation_obj_18", pos1), (create_text_overlay, reg1, "str_number_of_charges", 0), (position_set_x, pos1, 40), (position_set_y, pos1, 350), (overlay_set_position, reg1, pos1), (assign, reg1, ":num_charges"), (create_text_overlay, reg2, "str_reg1", tf_center_justify), (position_set_x, pos1, 350), (position_set_y, pos1, 350), (overlay_set_position, reg2, pos1), (try_begin), (lt, ":num_charges", 4), (create_button_overlay, "$g_presentation_obj_15", "str_plus", tf_center_justify), (position_set_x, pos1, 385), (position_set_y, pos1, 350), (overlay_set_position, "$g_presentation_obj_15", pos1), (else_try), (assign, "$g_presentation_obj_15", -1), (try_end), (try_begin), (gt, ":num_charges", 0), (create_button_overlay, "$g_presentation_obj_21", "str_minus", tf_center_justify), (position_set_x, pos1, 370), (position_set_y, pos1, 350), (overlay_set_position, "$g_presentation_obj_21", pos1), (else_try), (assign, "$g_presentation_obj_21", -1), (try_end), (try_begin), (ge, ":num_charges", 1), (create_text_overlay, reg1, "str_charge", tf_center_justify), (position_set_x, pos1, 300), (position_set_y, pos1, 300), (overlay_set_position, reg1, pos1), (create_text_overlay, reg1, "str_color", tf_center_justify), (position_set_x, pos1, 550), (position_set_y, pos1, 300), (overlay_set_position, reg1, pos1), (create_button_overlay, "$g_presentation_obj_14", "str_change_charge_position", tf_center_justify), (position_set_y, pos1, 350), (position_set_x, pos1, 550), (overlay_set_position, "$g_presentation_obj_14", pos1), (create_text_overlay, reg1, "str_charge_no_1", 0), (position_set_x, pos1, 40), (position_set_y, pos1, 240), (overlay_set_position, reg1, pos1), (create_button_overlay, "$g_presentation_obj_6", "str_change", 0), (position_set_x, pos1, 310), (overlay_set_position, "$g_presentation_obj_6", pos1), (create_button_overlay, "$g_presentation_obj_7", "str_change", 0), (position_set_x, pos1, 560), (overlay_set_position, "$g_presentation_obj_7", pos1), (troop_get_slot, ":cur_charge", "trp_player", slot_troop_custom_banner_charge_type_1), (val_mod, ":cur_charge", 256), (val_add, ":cur_charge", custom_banner_charges_begin), (create_image_button_overlay, "$g_presentation_obj_24", ":cur_charge", ":cur_charge"), (position_set_x, pos1, 260), (position_set_y, pos1, 255), (overlay_set_position, "$g_presentation_obj_24", pos1), (position_set_x, pos1, 50), (position_set_y, pos1, 50), (overlay_set_size, "$g_presentation_obj_24", pos1), (troop_get_slot, ":cur_charge_color", "trp_player", slot_troop_custom_banner_charge_color_1), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_28", "mesh_color_picker", "tableau_color_picker", ":cur_charge_color"), (position_set_x, pos1, 530), (position_set_y, pos1, 255), (overlay_set_position, "$g_presentation_obj_28", pos1), (position_set_x, pos1, 250), (position_set_y, pos1, 250), (overlay_set_size, "$g_presentation_obj_28", pos1), (create_button_overlay, "$g_presentation_obj_32", "str_flip_horizontal", 0), (position_set_x, pos1, 700), (position_set_y, pos1, 240), (overlay_set_position, "$g_presentation_obj_32", pos1), (create_button_overlay, "$g_presentation_obj_33", "str_flip_vertical", 0), (position_set_x, pos1, 800), (overlay_set_position, "$g_presentation_obj_33", pos1), (try_end), (try_begin), (ge, ":num_charges", 2), (create_text_overlay, reg1, "str_charge_no_2", 0), (position_set_x, pos1, 40), (position_set_y, pos1, 180), (overlay_set_position, reg1, pos1), (create_button_overlay, "$g_presentation_obj_8", "str_change", 0), (position_set_x, pos1, 310), (overlay_set_position, "$g_presentation_obj_8", pos1), (create_button_overlay, "$g_presentation_obj_9", "str_change", 0), (position_set_x, pos1, 560), (overlay_set_position, "$g_presentation_obj_9", pos1), (troop_get_slot, ":cur_charge", "trp_player", slot_troop_custom_banner_charge_type_2), (val_mod, ":cur_charge", 256), (val_add, ":cur_charge", custom_banner_charges_begin), (create_image_button_overlay, "$g_presentation_obj_25", ":cur_charge", ":cur_charge"), (position_set_x, pos1, 260), (position_set_y, pos1, 195), (overlay_set_position, "$g_presentation_obj_25", pos1), (position_set_x, pos1, 50), (position_set_y, pos1, 50), (overlay_set_size, "$g_presentation_obj_25", pos1), (troop_get_slot, ":cur_charge_color", "trp_player", slot_troop_custom_banner_charge_color_2), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_29", "mesh_color_picker", "tableau_color_picker", ":cur_charge_color"), (position_set_x, pos1, 530), (position_set_y, pos1, 195), (overlay_set_position, "$g_presentation_obj_29", pos1), (position_set_x, pos1, 250), (position_set_y, pos1, 250), (overlay_set_size, "$g_presentation_obj_29", pos1), (create_button_overlay, "$g_presentation_obj_34", "str_flip_horizontal", 0), (position_set_x, pos1, 700), (position_set_y, pos1, 180), (overlay_set_position, "$g_presentation_obj_34", pos1), (create_button_overlay, "$g_presentation_obj_35", "str_flip_vertical", 0), (position_set_x, pos1, 800), (overlay_set_position, "$g_presentation_obj_35", pos1), (try_end), (try_begin), (ge, ":num_charges", 3), (create_text_overlay, reg1, "str_charge_no_3", 0), (position_set_x, pos1, 40), (position_set_y, pos1, 120), (overlay_set_position, reg1, pos1), (create_button_overlay, "$g_presentation_obj_10", "str_change", 0), (position_set_x, pos1, 310), (overlay_set_position, "$g_presentation_obj_10", pos1), (create_button_overlay, "$g_presentation_obj_11", "str_change", 0), (position_set_x, pos1, 560), (overlay_set_position, "$g_presentation_obj_11", pos1), (troop_get_slot, ":cur_charge", "trp_player", slot_troop_custom_banner_charge_type_3), (val_mod, ":cur_charge", 256), (val_add, ":cur_charge", custom_banner_charges_begin), (create_image_button_overlay, "$g_presentation_obj_26", ":cur_charge", ":cur_charge"), (position_set_x, pos1, 260), (position_set_y, pos1, 135), (overlay_set_position, "$g_presentation_obj_26", pos1), (position_set_x, pos1, 50), (position_set_y, pos1, 50), (overlay_set_size, "$g_presentation_obj_26", pos1), (troop_get_slot, ":cur_charge_color", "trp_player", slot_troop_custom_banner_charge_color_3), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_30", "mesh_color_picker", "tableau_color_picker", ":cur_charge_color"), (position_set_x, pos1, 530), (position_set_y, pos1, 135), (overlay_set_position, "$g_presentation_obj_30", pos1), (position_set_x, pos1, 250), (position_set_y, pos1, 250), (overlay_set_size, "$g_presentation_obj_30", pos1), (create_button_overlay, "$g_presentation_obj_36", "str_flip_horizontal", 0), (position_set_x, pos1, 700), (position_set_y, pos1, 120), (overlay_set_position, "$g_presentation_obj_36", pos1), (create_button_overlay, "$g_presentation_obj_37", "str_flip_vertical", 0), (position_set_x, pos1, 800), (overlay_set_position, "$g_presentation_obj_37", pos1), (try_end), (try_begin), (ge, ":num_charges", 4), (create_text_overlay, reg1, "str_charge_no_4", 0), (position_set_x, pos1, 40), (position_set_y, pos1, 60), (overlay_set_position, reg1, pos1), (create_button_overlay, "$g_presentation_obj_12", "str_change", 0), (position_set_x, pos1, 310), (overlay_set_position, "$g_presentation_obj_12", pos1), (create_button_overlay, "$g_presentation_obj_13", "str_change", 0), (position_set_x, pos1, 560), (overlay_set_position, "$g_presentation_obj_13", pos1), (troop_get_slot, ":cur_charge", "trp_player", slot_troop_custom_banner_charge_type_4), (val_mod, ":cur_charge", 256), (val_add, ":cur_charge", custom_banner_charges_begin), (create_image_button_overlay, "$g_presentation_obj_27", ":cur_charge", ":cur_charge"), (position_set_x, pos1, 260), (position_set_y, pos1, 75), (overlay_set_position, "$g_presentation_obj_27", pos1), (position_set_x, pos1, 50), (position_set_y, pos1, 50), (overlay_set_size, "$g_presentation_obj_27", pos1), (troop_get_slot, ":cur_charge_color", "trp_player", slot_troop_custom_banner_charge_color_4), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_31", "mesh_color_picker", "tableau_color_picker", ":cur_charge_color"), (position_set_x, pos1, 530), (position_set_y, pos1, 75), (overlay_set_position, "$g_presentation_obj_31", pos1), (position_set_x, pos1, 250), (position_set_y, pos1, 250), (overlay_set_size, "$g_presentation_obj_31", pos1), (create_button_overlay, "$g_presentation_obj_38", "str_flip_horizontal", 0), (position_set_x, pos1, 700), (position_set_y, pos1, 60), (overlay_set_position, "$g_presentation_obj_38", pos1), (create_button_overlay, "$g_presentation_obj_39", "str_flip_vertical", 0), (position_set_x, pos1, 800), (overlay_set_position, "$g_presentation_obj_39", pos1), (try_end), (position_set_x, pos1, 350), (position_set_y, pos1, 400), (overlay_set_position, "$g_presentation_obj_1", pos1), (position_set_x, pos1, 275), (position_set_y, pos1, 550), (overlay_set_position, "$g_presentation_obj_2", pos1), (position_set_y, pos1, 500), (overlay_set_position, "$g_presentation_obj_3", pos1), (position_set_x, pos1, 175), (position_set_y, pos1, 600), (overlay_set_position, "$g_presentation_obj_4", pos1), (position_set_x, pos1, 880), (position_set_y, pos1, 575), (overlay_set_position, "$g_presentation_obj_5", pos1), (position_set_y, pos1, 400), (overlay_set_position, "$g_presentation_obj_19", pos1), (position_set_y, pos1, 650), (position_set_x, pos1, 175), (overlay_set_position, "$g_presentation_obj_16", pos1), (position_set_y, pos1, 150), (position_set_x, pos1, 850), (overlay_set_position, "$g_presentation_obj_20", pos1), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [ (store_trigger_param_1, ":object"), (troop_get_slot, ":num_charges", "trp_player", slot_troop_custom_banner_num_charges), (try_begin), (this_or_next|eq, ":object", "$g_presentation_obj_2"), (eq, ":object", "$g_presentation_obj_22"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (assign, "$g_presentation_output_slot", slot_troop_custom_banner_bg_color_1), (start_presentation, "prsnt_color_selection"), (else_try), (this_or_next|eq, ":object", "$g_presentation_obj_3"), (eq, ":object", "$g_presentation_obj_23"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (assign, "$g_presentation_output_slot", slot_troop_custom_banner_bg_color_2), (start_presentation, "prsnt_color_selection"), (else_try), (this_or_next|eq, ":object", "$g_presentation_obj_4"), (eq, ":object", "$g_presentation_obj_1"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (start_presentation, "prsnt_banner_background_selection"), (else_try), (eq, ":object", "$g_presentation_obj_5"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (start_presentation, "prsnt_banner_flag_type_selection"), (else_try), (ge, ":num_charges", 1), (this_or_next|eq, ":object", "$g_presentation_obj_6"), (eq, ":object", "$g_presentation_obj_24"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (assign, "$g_presentation_output_slot", slot_troop_custom_banner_charge_type_1), (start_presentation, "prsnt_banner_charge_selection"), (else_try), (ge, ":num_charges", 1), (this_or_next|eq, ":object", "$g_presentation_obj_7"), (eq, ":object", "$g_presentation_obj_28"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (assign, "$g_presentation_output_slot", slot_troop_custom_banner_charge_color_1), (start_presentation, "prsnt_color_selection"), (else_try), (ge, ":num_charges", 2), (this_or_next|eq, ":object", "$g_presentation_obj_8"), (eq, ":object", "$g_presentation_obj_25"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (assign, "$g_presentation_output_slot", slot_troop_custom_banner_charge_type_2), (start_presentation, "prsnt_banner_charge_selection"), (else_try), (ge, ":num_charges", 2), (this_or_next|eq, ":object", "$g_presentation_obj_9"), (eq, ":object", "$g_presentation_obj_29"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (assign, "$g_presentation_output_slot", slot_troop_custom_banner_charge_color_2), (start_presentation, "prsnt_color_selection"), (else_try), (ge, ":num_charges", 3), (this_or_next|eq, ":object", "$g_presentation_obj_10"), (eq, ":object", "$g_presentation_obj_26"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (assign, "$g_presentation_output_slot", slot_troop_custom_banner_charge_type_3), (start_presentation, "prsnt_banner_charge_selection"), (else_try), (ge, ":num_charges", 3), (this_or_next|eq, ":object", "$g_presentation_obj_11"), (eq, ":object", "$g_presentation_obj_30"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (assign, "$g_presentation_output_slot", slot_troop_custom_banner_charge_color_3), (start_presentation, "prsnt_color_selection"), (else_try), (ge, ":num_charges", 4), (this_or_next|eq, ":object", "$g_presentation_obj_12"), (eq, ":object", "$g_presentation_obj_27"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (assign, "$g_presentation_output_slot", slot_troop_custom_banner_charge_type_4), (start_presentation, "prsnt_banner_charge_selection"), (else_try), (ge, ":num_charges", 4), (this_or_next|eq, ":object", "$g_presentation_obj_13"), (eq, ":object", "$g_presentation_obj_31"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (assign, "$g_presentation_output_slot", slot_troop_custom_banner_charge_color_4), (start_presentation, "prsnt_color_selection"), (else_try), (ge, ":num_charges", 1), (eq, ":object", "$g_presentation_obj_14"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (start_presentation, "prsnt_banner_charge_positioning"), (else_try), (eq, ":object", "$g_presentation_obj_15"), (troop_get_slot, ":num_charges", "trp_player", slot_troop_custom_banner_num_charges), (val_add, ":num_charges", 1), (val_clamp, ":num_charges", 0, 5), (troop_set_slot, "trp_player", slot_troop_custom_banner_num_charges, ":num_charges"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_21"), (troop_get_slot, ":num_charges", "trp_player", slot_troop_custom_banner_num_charges), (val_sub, ":num_charges", 1), (val_clamp, ":num_charges", 0, 5), (troop_set_slot, "trp_player", slot_troop_custom_banner_num_charges, ":num_charges"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_16"), (call_script, "script_get_random_custom_banner", "trp_player"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_17"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (start_presentation, "prsnt_banner_flag_type_selection"), (else_try), (eq, ":object", "$g_presentation_obj_18"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (start_presentation, "prsnt_banner_flag_map_type_selection"), (else_try), (eq, ":object", "$g_presentation_obj_19"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (start_presentation, "prsnt_banner_flag_map_type_selection"), (else_try), (eq, ":object", "$g_presentation_obj_32"), (troop_get_slot, ":charge_type", "trp_player", slot_troop_custom_banner_charge_type_1), (store_mod, ":charge_type_base", ":charge_type", 256), (val_div, ":charge_type", 256), (store_mod, ":flag", ":charge_type", 2), (val_div, ":charge_type", 2), #remove flag (val_add, ":flag", 1), (val_mod, ":flag", 2), #switch flag (val_mul, ":charge_type", 2), (val_add, ":charge_type", ":flag"), (val_mul, ":charge_type", 256), (val_add, ":charge_type", ":charge_type_base"), (troop_set_slot, "trp_player", slot_troop_custom_banner_charge_type_1, ":charge_type"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_34"), (troop_get_slot, ":charge_type", "trp_player", slot_troop_custom_banner_charge_type_2), (store_mod, ":charge_type_base", ":charge_type", 256), (val_div, ":charge_type", 256), (store_mod, ":flag", ":charge_type", 2), (val_div, ":charge_type", 2), #remove flag (val_add, ":flag", 1), (val_mod, ":flag", 2), #switch flag (val_mul, ":charge_type", 2), (val_add, ":charge_type", ":flag"), (val_mul, ":charge_type", 256), (val_add, ":charge_type", ":charge_type_base"), (troop_set_slot, "trp_player", slot_troop_custom_banner_charge_type_2, ":charge_type"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_36"), (troop_get_slot, ":charge_type", "trp_player", slot_troop_custom_banner_charge_type_3), (store_mod, ":charge_type_base", ":charge_type", 256), (val_div, ":charge_type", 256), (store_mod, ":flag", ":charge_type", 2), (val_div, ":charge_type", 2), #remove flag (val_add, ":flag", 1), (val_mod, ":flag", 2), #switch flag (val_mul, ":charge_type", 2), (val_add, ":charge_type", ":flag"), (val_mul, ":charge_type", 256), (val_add, ":charge_type", ":charge_type_base"), (troop_set_slot, "trp_player", slot_troop_custom_banner_charge_type_3, ":charge_type"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_38"), (troop_get_slot, ":charge_type", "trp_player", slot_troop_custom_banner_charge_type_4), (store_mod, ":charge_type_base", ":charge_type", 256), (val_div, ":charge_type", 256), (store_mod, ":flag", ":charge_type", 2), (val_div, ":charge_type", 2), #remove flag (val_add, ":flag", 1), (val_mod, ":flag", 2), #switch flag (val_mul, ":charge_type", 2), (val_add, ":charge_type", ":flag"), (val_mul, ":charge_type", 256), (val_add, ":charge_type", ":charge_type_base"), (troop_set_slot, "trp_player", slot_troop_custom_banner_charge_type_4, ":charge_type"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_33"), (troop_get_slot, ":charge_type", "trp_player", slot_troop_custom_banner_charge_type_1), (store_div, ":flag", ":charge_type", 512), (val_add, ":flag", 1), (val_mod, ":flag", 2), #switch flag (val_mul, ":flag", 512), (val_mod, ":charge_type", 512), #remove flag (val_add, ":charge_type", ":flag"), (troop_set_slot, "trp_player", slot_troop_custom_banner_charge_type_1, ":charge_type"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_35"), (troop_get_slot, ":charge_type", "trp_player", slot_troop_custom_banner_charge_type_2), (store_div, ":flag", ":charge_type", 512), (val_add, ":flag", 1), (val_mod, ":flag", 2), #switch flag (val_mul, ":flag", 512), (val_mod, ":charge_type", 512), #remove flag (val_add, ":charge_type", ":flag"), (troop_set_slot, "trp_player", slot_troop_custom_banner_charge_type_2, ":charge_type"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_37"), (troop_get_slot, ":charge_type", "trp_player", slot_troop_custom_banner_charge_type_3), (store_div, ":flag", ":charge_type", 512), (val_add, ":flag", 1), (val_mod, ":flag", 2), #switch flag (val_mul, ":flag", 512), (val_mod, ":charge_type", 512), #remove flag (val_add, ":charge_type", ":flag"), (troop_set_slot, "trp_player", slot_troop_custom_banner_charge_type_3, ":charge_type"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_39"), (troop_get_slot, ":charge_type", "trp_player", slot_troop_custom_banner_charge_type_4), (store_div, ":flag", ":charge_type", 512), (val_add, ":flag", 1), (val_mod, ":flag", 2), #switch flag (val_mul, ":flag", 512), (val_mod, ":charge_type", 512), #remove flag (val_add, ":charge_type", ":flag"), (troop_set_slot, "trp_player", slot_troop_custom_banner_charge_type_4, ":charge_type"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_20"), (troop_get_slot, ":flag_icon", "trp_player", slot_troop_custom_banner_map_flag_type), (try_begin), (ge, ":flag_icon", 0), (val_add, ":flag_icon", custom_banner_map_icons_begin), (party_set_banner_icon, "p_main_party", ":flag_icon"), (try_end), (presentation_set_duration, 0), (try_end), ]), ## (ti_on_presentation_run, ## [(try_begin), ## (this_or_next|key_clicked, key_space), ## (this_or_next|key_clicked, key_enter), ## (this_or_next|key_clicked, key_escape), ## (key_clicked, key_back_space), ## (presentation_set_duration, 0), ## (try_end), ## ]), ]), ("banner_charge_positioning", 0, mesh_load_window, [ (ti_on_presentation_load, [ (set_fixed_point_multiplier, 1000), (create_text_overlay, reg1, "str_choose_position", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 600), (overlay_set_position, reg1, pos1), (assign, ":pos_x", 125), (assign, ":pos_y", 400), (call_script, "script_get_troop_custom_banner_num_positionings", "trp_player"), (assign, ":num_positionings", reg0), (store_mul, ":x_needed", ":num_positionings", 125), (val_sub, ":x_needed", 25), (store_div, ":pos_x", ":x_needed", 2), (store_sub, ":pos_x", 500, ":pos_x"), (try_for_range, ":cur_positioning", 0, ":num_positionings"), (create_image_button_overlay_with_tableau_material, reg1, -1, "tableau_positioning_selection", ":cur_positioning"), (position_set_x, pos1, ":pos_x"), (position_set_y, pos1, ":pos_y"), (val_add, ":pos_x", 125), (overlay_set_position, reg1, pos1), (troop_set_slot, "trp_temp_array_a", ":cur_positioning", reg1), (try_end), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [ (store_trigger_param_1, ":object"), (call_script, "script_get_troop_custom_banner_num_positionings", "trp_player"), (assign, ":num_positionings", reg0), (try_for_range, ":trp_slot_index", 0, ":num_positionings"), (troop_slot_eq, "trp_temp_array_a", ":trp_slot_index", ":object"), (troop_set_slot, "trp_player", slot_troop_custom_banner_positioning, ":trp_slot_index"), (assign, ":num_positionings", 0), (try_end), (try_begin), (gt, "$g_presentation_next_presentation", 0), (start_presentation, "$g_presentation_next_presentation"), (else_try), (presentation_set_duration, 0), (try_end), ]), ]), ("banner_charge_selection", 0, mesh_load_window, [ (ti_on_presentation_load, [ (set_fixed_point_multiplier, 1000), (create_text_overlay, reg1, "str_choose_charge", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 650), (overlay_set_position, reg1, pos1), (assign, ":pos_x", 100), (assign, ":pos_y", 600), (try_for_range, ":cur_charge", custom_banner_charges_begin, custom_banner_charges_end), (create_image_button_overlay, reg1, ":cur_charge", ":cur_charge"), (position_set_x, pos1, ":pos_x"), (position_set_y, pos1, ":pos_y"), (val_add, ":pos_x", 100), (try_begin), (gt, ":pos_x", 900), (assign, ":pos_x", 100), (val_sub, ":pos_y", 100), (try_end), (overlay_set_position, reg1, pos1), (position_set_x, pos1, 80), (position_set_y, pos1, 80), (overlay_set_size, reg1, pos1), (store_sub, ":slot_index", ":cur_charge", custom_banner_charges_begin), (troop_set_slot, "trp_temp_array_a", ":slot_index", reg1), (try_end), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [ (store_trigger_param_1, ":object"), (assign, ":end_cond", custom_banner_charges_end), (val_sub, ":end_cond", custom_banner_charges_begin), (try_for_range, ":trp_slot_index", 0, ":end_cond"), (troop_slot_eq, "trp_temp_array_a", ":trp_slot_index", ":object"), (troop_set_slot, "trp_player", "$g_presentation_output_slot", ":trp_slot_index"), (assign, ":end_cond", 0), (try_end), (try_begin), (gt, "$g_presentation_next_presentation", 0), (start_presentation, "$g_presentation_next_presentation"), (else_try), (presentation_set_duration, 0), (try_end), ]), ]), ("banner_background_selection", 0, mesh_load_window, [ (ti_on_presentation_load, [ (set_fixed_point_multiplier, 1000), (create_text_overlay, reg1, "str_choose_background", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 600), (overlay_set_position, reg1, pos1), (assign, ":pos_x", 75), (assign, ":pos_y", 450), (try_for_range, ":cur_banner", custom_banner_backgrounds_begin, custom_banner_backgrounds_end), (store_sub, ":slot_index", ":cur_banner", custom_banner_backgrounds_begin), (create_image_button_overlay_with_tableau_material, reg1, -1, "tableau_background_selection", ":slot_index"), (position_set_x, pos1, ":pos_x"), (position_set_y, pos1, ":pos_y"), (val_add, ":pos_x", 125), (try_begin), (gt, ":pos_x", 900), (assign, ":pos_x", 75), (val_sub, ":pos_y", 125), (try_end), (overlay_set_position, reg1, pos1), (troop_set_slot, "trp_temp_array_a", ":slot_index", reg1), (try_end), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [ (store_trigger_param_1, ":object"), (assign, ":end_cond", custom_banner_backgrounds_end), (val_sub, ":end_cond", custom_banner_backgrounds_begin), (try_for_range, ":trp_slot_index", 0, ":end_cond"), (troop_slot_eq, "trp_temp_array_a", ":trp_slot_index", ":object"), (troop_set_slot, "trp_player", slot_troop_custom_banner_bg_type, ":trp_slot_index"), (assign, ":end_cond", 0), (try_end), (try_begin), (gt, "$g_presentation_next_presentation", 0), (start_presentation, "$g_presentation_next_presentation"), (else_try), (presentation_set_duration, 0), (try_end), ]), ]), ("banner_flag_type_selection", 0, mesh_load_window, [ (ti_on_presentation_load, [ (set_fixed_point_multiplier, 1000), (create_text_overlay, reg1, "str_choose_flag_type", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 600), (overlay_set_position, reg1, pos1), (assign, ":pos_x", 435), (assign, ":pos_y", 450), (try_for_range, ":cur_flag", custom_banner_flag_types_begin, custom_banner_flag_types_end), (store_sub, ":slot_index", ":cur_flag", custom_banner_flag_types_begin), (troop_set_slot, "trp_player", slot_troop_custom_banner_flag_type, ":slot_index"), (create_image_button_overlay_with_tableau_material, reg1, ":cur_flag", "tableau_custom_banner_default", "trp_player"), (position_set_x, pos1, ":pos_x"), (position_set_y, pos1, ":pos_y"), (val_add, ":pos_x", 130), (overlay_set_position, reg1, pos1), (position_set_x, pos1, 100), (position_set_y, pos1, 100), (overlay_set_size, reg1, pos1), (troop_set_slot, "trp_temp_array_a", ":slot_index", reg1), (try_end), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [ (store_trigger_param_1, ":object"), (assign, ":end_cond", custom_banner_flag_types_end), (val_sub, ":end_cond", custom_banner_flag_types_begin), (try_for_range, ":trp_slot_index", 0, ":end_cond"), (troop_slot_eq, "trp_temp_array_a", ":trp_slot_index", ":object"), (troop_set_slot, "trp_player", slot_troop_custom_banner_flag_type, ":trp_slot_index"), (assign, ":end_cond", 0), (try_end), (try_begin), (gt, "$g_presentation_next_presentation", 0), (start_presentation, "$g_presentation_next_presentation"), (else_try), (presentation_set_duration, 0), (try_end), ]), ]), ("banner_flag_map_type_selection", 0, mesh_load_window, [ (ti_on_presentation_load, [ (set_fixed_point_multiplier, 1000), (create_text_overlay, reg1, "str_choose_map_flag_type", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 600), (overlay_set_position, reg1, pos1), (troop_get_slot, ":bg_type", "trp_player", slot_troop_custom_banner_bg_type), (val_add, ":bg_type", custom_banner_backgrounds_begin), (assign, ":pos_x", 250), (assign, ":pos_y", 150), (try_for_range, ":cur_flag", custom_banner_flag_map_types_begin, custom_banner_flag_map_types_end), (store_sub, ":slot_index", ":cur_flag", custom_banner_flag_map_types_begin), (troop_set_slot, "trp_player", slot_troop_custom_banner_map_flag_type, ":slot_index"), (try_begin), (eq, ":cur_flag", "mesh_custom_map_banner_01"), (create_image_button_overlay_with_tableau_material, reg1, ":cur_flag", "tableau_custom_banner_square", "trp_player"), (else_try), (eq, ":cur_flag", "mesh_custom_map_banner_02"), (create_image_button_overlay_with_tableau_material, reg1, ":cur_flag", "tableau_custom_banner_short", "trp_player"), (else_try), (create_image_button_overlay_with_tableau_material, reg1, ":cur_flag", "tableau_custom_banner_tall", "trp_player"), (try_end), (position_set_x, pos1, ":pos_x"), (position_set_y, pos1, ":pos_y"), (val_add, ":pos_x", 200), (overlay_set_position, reg1, pos1), (position_set_x, pos1, 100), (position_set_y, pos1, 100), (overlay_set_size, reg1, pos1), (troop_set_slot, "trp_temp_array_a", ":slot_index", reg1), (try_end), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [ (store_trigger_param_1, ":object"), (assign, ":end_cond", custom_banner_flag_map_types_end), (val_sub, ":end_cond", custom_banner_flag_map_types_begin), (try_for_range, ":trp_slot_index", 0, ":end_cond"), (troop_slot_eq, "trp_temp_array_a", ":trp_slot_index", ":object"), (troop_set_slot, "trp_player", slot_troop_custom_banner_map_flag_type, ":trp_slot_index"), (assign, ":end_cond", 0), (try_end), (try_begin), (gt, "$g_presentation_next_presentation", 0), (start_presentation, "$g_presentation_next_presentation"), (else_try), (presentation_set_duration, 0), (try_end), ]), ]), ("color_selection", 0, mesh_load_window, [ (ti_on_presentation_load, [ (set_fixed_point_multiplier, 1000), (create_text_overlay, reg1, "str_choose_color", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 600), (overlay_set_position, reg1, pos1), (assign, ":pos_x", 125), (assign, ":pos_y", 450), (try_for_range, ":i_color", 0, 42), (call_script, "script_get_custom_banner_color_from_index", ":i_color"), (assign, ":cur_color", reg0), (create_image_button_overlay_with_tableau_material, reg1, "mesh_color_picker", "tableau_color_picker", ":cur_color"), (position_set_x, pos1, ":pos_x"), (position_set_y, pos1, ":pos_y"), (val_add, ":pos_x", 50), (try_begin), (store_mod, ":mod_i_color", ":i_color", 7), (eq, ":mod_i_color", 6), (assign, ":pos_x", 125), (val_sub, ":pos_y", 50), (try_end), (overlay_set_position, reg1, pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 500), (overlay_set_size, reg1, pos1), (store_mul, ":trp_slot_index", ":i_color", 2), (store_add, ":trp_slot_color", ":trp_slot_index", 1), (troop_set_slot, "trp_temp_array_a", ":trp_slot_index", reg1), (troop_set_slot, "trp_temp_array_a", ":trp_slot_color", ":cur_color"), (try_end), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [ (store_trigger_param_1, ":object"), (assign, ":end_cond", 64), (try_for_range, ":i_color", 0, ":end_cond"), (store_mul, ":trp_slot_index", ":i_color", 2), (troop_slot_eq, "trp_temp_array_a", ":trp_slot_index", ":object"), (store_add, ":trp_slot_color", ":trp_slot_index", 1), (troop_get_slot, ":output_color", "trp_temp_array_a", ":trp_slot_color"), (troop_set_slot, "trp_player", "$g_presentation_output_slot", ":output_color"), (assign, ":end_cond", 0), (try_end), (try_begin), (gt, "$g_presentation_next_presentation", 0), (start_presentation, "$g_presentation_next_presentation"), (else_try), (presentation_set_duration, 0), (try_end), ]), ]), ("marshall_selection", 0, mesh_load_window, [ (ti_on_presentation_load, [ (assign, "$g_presentation_obj_1", -1), (assign, "$g_presentation_obj_2", -1), (assign, "$g_presentation_obj_3", -1), (set_fixed_point_multiplier, 1000), (assign, "$g_presentation_next_presentation", -1), (store_add, ":total_renown", "$g_presentation_marshall_selection_max_renown_1", "$g_presentation_marshall_selection_max_renown_2"), (faction_get_slot, ":king", "$players_kingdom", slot_faction_leader), (str_store_troop_name, s1, "$g_presentation_marshall_selection_max_renown_1_troop"), (create_text_overlay, reg1, "@Candidate #1: {s1}", tf_center_justify), (position_set_x, pos1, 200), (position_set_y, pos1, 600), (overlay_set_position, reg1, pos1), (str_store_troop_name, s1, "$g_presentation_marshall_selection_max_renown_2_troop"), (create_text_overlay, reg1, "@Candidate #2: {s1}", tf_center_justify), (position_set_x, pos1, 800), (position_set_y, pos1, 600), (overlay_set_position, reg1, pos1), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_troop_note_mesh", "$g_presentation_marshall_selection_max_renown_1_troop"), (position_set_x, pos1, 500), (position_set_y, pos1, 500), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 100), (position_set_y, pos1, 300), (overlay_set_position, reg1, pos1), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_troop_note_mesh", "$g_presentation_marshall_selection_max_renown_2_troop"), (position_set_x, pos1, 500), (position_set_y, pos1, 500), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 700), (position_set_y, pos1, 300), (overlay_set_position, reg1, pos1), (assign, ":lord_index", "$g_presentation_input"), (val_add, "$g_presentation_input", 1), (try_begin), (lt, ":lord_index", 0), (str_store_troop_name, s1, "$g_presentation_marshall_selection_max_renown_1_troop"), (str_store_troop_name, s2, "$g_presentation_marshall_selection_max_renown_2_troop"), (str_store_troop_name, s3, ":king"), (str_store_faction_name, s4, "$players_kingdom"), (create_text_overlay, reg1, "@{s3} of {s4} wishes to select a new marshall and invites his vassals for a counsel. {s1} and {s2} are the likely candidates.", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 200), (overlay_set_position, reg1, pos1), (create_button_overlay, "$g_presentation_obj_1", "@Continue...", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 100), (overlay_set_position, "$g_presentation_obj_1", pos1), (assign, "$g_presentation_next_presentation", "prsnt_marshall_selection"), (else_try), (assign, ":cur_index", ":lord_index"), (try_for_range_backwards, ":loop_var", "trp_kingdom_heroes_including_player_begin", kingdom_heroes_end), (ge, ":cur_index", 0), (assign, ":cur_troop", ":loop_var"), (assign, ":continue", 0), (try_begin), (eq, ":loop_var", "trp_kingdom_heroes_including_player_begin"), (assign, ":cur_troop", "trp_player"), (try_begin), (eq, "$g_player_is_captive", 0), (assign, ":continue", 1), (try_end), (else_try), (store_troop_faction, ":cur_troop_faction", ":cur_troop"), (eq, "$players_kingdom", ":cur_troop_faction"), #(troop_slot_eq, ":cur_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":cur_troop", slot_troop_prisoner_of_party, 0), (troop_slot_ge, ":cur_troop", slot_troop_leaded_party, 1), (troop_slot_eq, ":cur_troop", slot_troop_occupation, slto_kingdom_hero), (neg|faction_slot_eq, ":cur_troop_faction", slot_faction_leader, ":cur_troop"), (assign, ":continue", 1), (try_end), (eq, ":continue", 1), (neq, "$g_presentation_marshall_selection_max_renown_1_troop", ":cur_troop"), (neq, "$g_presentation_marshall_selection_max_renown_2_troop", ":cur_troop"), (val_sub, ":cur_index", 1), (lt, ":cur_index", 0), (assign, "$g_presentation_next_presentation", "prsnt_marshall_selection"), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_troop_note_mesh", ":cur_troop"), (position_set_x, pos1, 300), (position_set_y, pos1, 300), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 440), (position_set_y, pos1, 400), (overlay_set_position, reg1, pos1), (try_begin), (eq, ":cur_troop", "trp_player"), (create_text_overlay, reg1, "@Who do you wish to support?", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 200), (overlay_set_position, reg1, pos1), (str_store_troop_name, s1, "$g_presentation_marshall_selection_max_renown_1_troop"), (create_button_overlay, "$g_presentation_obj_2", "@{s1}", tf_center_justify), (position_set_x, pos1, 300), (position_set_y, pos1, 100), (overlay_set_position, "$g_presentation_obj_2", pos1), (str_store_troop_name, s1, "$g_presentation_marshall_selection_max_renown_2_troop"), (create_button_overlay, "$g_presentation_obj_3", "@{s1}", tf_center_justify), (position_set_x, pos1, 700), (position_set_y, pos1, 100), (overlay_set_position, "$g_presentation_obj_3", pos1), (else_try), (str_store_troop_name, s1, ":cur_troop"), (store_random_in_range, ":random_renown", 0, ":total_renown"), (val_sub, ":random_renown", "$g_presentation_marshall_selection_max_renown_1"), (try_begin), (lt, ":random_renown", 0), (val_add, "$g_presentation_marshall_selection_1_vote", 1), (str_store_troop_name, s2, "$g_presentation_marshall_selection_max_renown_1_troop"), (else_try), (val_add, "$g_presentation_marshall_selection_2_vote", 1), (str_store_troop_name, s2, "$g_presentation_marshall_selection_max_renown_2_troop"), (try_end), (create_text_overlay, reg1, "@{s1} gives his support to {s2}.", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 200), (overlay_set_position, reg1, pos1), (create_button_overlay, "$g_presentation_obj_1", "@Continue...", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 100), (overlay_set_position, "$g_presentation_obj_1", pos1), (try_end), (try_end), (try_end), (assign, reg0, "$g_presentation_marshall_selection_1_vote"), (create_text_overlay, reg1, "@Number of Supporters: {reg0}", tf_center_justify), (position_set_x, pos1, 200), (position_set_y, pos1, 550), (overlay_set_position, reg1, pos1), (assign, reg0, "$g_presentation_marshall_selection_2_vote"), (create_text_overlay, reg1, "@Number of Supporters: {reg0}", tf_center_justify), (position_set_x, pos1, 800), (position_set_y, pos1, 550), (overlay_set_position, reg1, pos1), (try_begin), (lt, "$g_presentation_next_presentation", 0), (try_begin), (gt, "$g_presentation_marshall_selection_2_vote", "$g_presentation_marshall_selection_1_vote"), (assign, ":local_temp", "$g_presentation_marshall_selection_max_renown_1_troop"), (assign, "$g_presentation_marshall_selection_max_renown_1_troop", "$g_presentation_marshall_selection_max_renown_2_troop"), (assign, "$g_presentation_marshall_selection_max_renown_2_troop", ":local_temp"), (try_end), #Winner is set to g_presentation_marshall_selection_max_renown_1_troop (str_store_troop_name, s1, "$g_presentation_marshall_selection_max_renown_1_troop"), (str_store_troop_name, s2, ":king"), (str_store_faction_name, s3, "$players_kingdom"), (create_text_overlay, reg1, "@{s2} has heard his vassals' counsel. He selects {s1} as the marshall of {s3}.", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 200), (overlay_set_position, reg1, pos1), (create_button_overlay, "$g_presentation_obj_1", "@Continue...", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 100), (overlay_set_position, "$g_presentation_obj_1", pos1), (try_end), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [ (store_trigger_param_1, ":object"), (try_begin), (eq, ":object", "$g_presentation_obj_2"), (val_add, "$g_presentation_marshall_selection_1_vote", 1), (call_script, "script_change_player_relation_with_troop", "$g_presentation_marshall_selection_max_renown_1_troop", 2), (call_script, "script_change_player_relation_with_troop", "$g_presentation_marshall_selection_max_renown_2_troop", -2), (else_try), (eq, ":object", "$g_presentation_obj_3"), (val_add, "$g_presentation_marshall_selection_2_vote", 1), (call_script, "script_change_player_relation_with_troop", "$g_presentation_marshall_selection_max_renown_1_troop", -2), (call_script, "script_change_player_relation_with_troop", "$g_presentation_marshall_selection_max_renown_2_troop", 2), (try_end), (try_begin), (this_or_next|eq, ":object", "$g_presentation_obj_1"), (this_or_next|eq, ":object", "$g_presentation_obj_2"), (eq, ":object", "$g_presentation_obj_3"), (try_begin), (ge, "$g_presentation_next_presentation", 0), (start_presentation, "$g_presentation_next_presentation"), (else_try), (try_begin), (neg|faction_slot_eq, "$players_kingdom", slot_faction_marshall, "$g_presentation_marshall_selection_max_renown_1_troop"), (call_script, "script_check_and_finish_active_army_quests_for_faction", "$players_kingdom"), (try_end), (faction_set_slot, "$players_kingdom", slot_faction_marshall, "$g_presentation_marshall_selection_max_renown_1_troop"), (try_begin), (eq, "$g_presentation_marshall_selection_max_renown_1_troop", "trp_player"), (call_script, "script_change_player_relation_with_troop", "$g_presentation_marshall_selection_max_renown_2_troop", -3), (try_end), (assign, "$g_recalculate_ais", 1), (assign, "$g_presentation_marshall_selection_ended", 1), (presentation_set_duration, 0), (try_end), (try_end), ]), ]), ("battle",0,0,[ (ti_on_presentation_load, [(set_fixed_point_multiplier, 1000), (assign, "$g_formation_infantry_selected", 0), (assign, "$g_formation_archers_selected", 0), (assign, "$g_formation_cavalry_selected", 0), (assign, "$g_presentation_battle_active", 1), (str_clear, s7), (try_for_agents, ":agent_no"), (agent_set_slot, ":agent_no", slot_agent_map_overlay_id, 0), (try_end), (position_set_x, pos1, 0), (create_image_button_overlay, "$g_presentation_obj_1", "mesh_white_plane", "mesh_white_plane"), (position_set_y, pos1, 653), (overlay_set_position, "$g_presentation_obj_1", pos1), (create_image_button_overlay, "$g_presentation_obj_2", "mesh_white_plane", "mesh_white_plane"), (position_set_y, pos1, 613), (overlay_set_position, "$g_presentation_obj_2", pos1), (create_image_button_overlay, "$g_presentation_obj_3", "mesh_white_plane", "mesh_white_plane"), (position_set_y, pos1, 573), (overlay_set_position, "$g_presentation_obj_3", pos1), (position_set_x, pos1, 32500), (position_set_y, pos1, 2000), (overlay_set_size, "$g_presentation_obj_1", pos1), (overlay_set_size, "$g_presentation_obj_2", pos1), (overlay_set_size, "$g_presentation_obj_3", pos1), (overlay_set_alpha, "$g_presentation_obj_1", 0), (overlay_set_alpha, "$g_presentation_obj_2", 0), (overlay_set_alpha, "$g_presentation_obj_3", 0), (overlay_set_color, "$g_presentation_obj_1", 0xFFFF00), (overlay_set_color, "$g_presentation_obj_2", 0xFFFF00), (overlay_set_color, "$g_presentation_obj_3", 0xFFFF00), (position_set_x, pos1, 20), (create_check_box_overlay, "$g_presentation_obj_4", "mesh_checkbox_off", "mesh_checkbox_on"), (position_set_y, pos1, 663), (overlay_set_position, "$g_presentation_obj_4", pos1), (create_check_box_overlay, "$g_presentation_obj_5", "mesh_checkbox_off", "mesh_checkbox_on"), (position_set_y, pos1, 623), (overlay_set_position, "$g_presentation_obj_5", pos1), (create_check_box_overlay, "$g_presentation_obj_6", "mesh_checkbox_off", "mesh_checkbox_on"), (position_set_y, pos1, 583), (overlay_set_position, "$g_presentation_obj_6", pos1), (get_player_agent_no, ":player_agent"), (agent_get_team, ":player_team", ":player_agent"), (position_set_x, pos1, 50), (create_text_overlay, "$g_presentation_obj_7", s7, 0), (position_set_y, pos1, 660), (overlay_set_position, "$g_presentation_obj_7", pos1), (create_text_overlay, "$g_presentation_obj_8", s7, 0), (position_set_y, pos1, 620), (overlay_set_position, "$g_presentation_obj_8", pos1), (create_text_overlay, "$g_presentation_obj_9", s7, 0), (position_set_y, pos1, 580), (overlay_set_position, "$g_presentation_obj_9", pos1), (position_set_y, pos1, 700), (create_text_overlay, reg1, "@Action", tf_center_justify), (position_set_x, pos1, 250), (overlay_set_position, reg1, pos1), (create_text_overlay, reg1, "@Mount", tf_center_justify), (position_set_x, pos1, 400), (overlay_set_position, reg1, pos1), (create_text_overlay, reg1, "@Attack Type", tf_center_justify), (position_set_x, pos1, 550), (overlay_set_position, reg1, pos1), (create_text_overlay, "$g_presentation_infantry_movement", s7, tf_center_justify), (create_text_overlay, "$g_presentation_infantry_riding", s7, tf_center_justify), (create_text_overlay, "$g_presentation_infantry_weapon_usage", s7, tf_center_justify), (create_text_overlay, "$g_presentation_archers_movement", s7, tf_center_justify), (create_text_overlay, "$g_presentation_archers_riding", s7, tf_center_justify), (create_text_overlay, "$g_presentation_archers_weapon_usage", s7, tf_center_justify), (create_text_overlay, "$g_presentation_cavalry_movement", s7, tf_center_justify), (create_text_overlay, "$g_presentation_cavalry_riding", s7, tf_center_justify), (create_text_overlay, "$g_presentation_cavalry_weapon_usage", s7, tf_center_justify), (call_script, "script_update_order_panel", ":player_team"), (create_button_overlay, "$g_presentation_obj_10", "@Hold This Position", tf_center_justify), (create_button_overlay, "$g_presentation_obj_11", "@Follow Me", tf_center_justify), (create_button_overlay, "$g_presentation_obj_12", "@Charge", tf_center_justify), (create_button_overlay, "$g_presentation_obj_13", "@Advance", tf_center_justify), (create_button_overlay, "$g_presentation_obj_14", "@Fall Back", tf_center_justify), (create_button_overlay, "$g_presentation_obj_15", "@Stand Closer", tf_center_justify), (create_button_overlay, "$g_presentation_obj_16", "@Spread Out", tf_center_justify), (create_button_overlay, "$g_presentation_obj_17", "@Stand Ground", tf_center_justify), (create_button_overlay, "$g_presentation_obj_18", "@Mount", tf_center_justify), (create_button_overlay, "$g_presentation_obj_19", "@Dismount", tf_center_justify), (create_button_overlay, "$g_presentation_obj_20", "@Use Any Weapon", tf_center_justify), (create_button_overlay, "$g_presentation_obj_21", "@Use Blunt Weapons", tf_center_justify), (create_button_overlay, "$g_presentation_obj_28", "@Hold Your Fire", tf_center_justify), (create_button_overlay, "$g_presentation_obj_29", "@Fire At Will", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, "$g_presentation_obj_10", pos1), (overlay_set_size, "$g_presentation_obj_11", pos1), (overlay_set_size, "$g_presentation_obj_12", pos1), (overlay_set_size, "$g_presentation_obj_13", pos1), (overlay_set_size, "$g_presentation_obj_14", pos1), (overlay_set_size, "$g_presentation_obj_15", pos1), (overlay_set_size, "$g_presentation_obj_16", pos1), (overlay_set_size, "$g_presentation_obj_17", pos1), (overlay_set_size, "$g_presentation_obj_18", pos1), (overlay_set_size, "$g_presentation_obj_19", pos1), (overlay_set_size, "$g_presentation_obj_20", pos1), (overlay_set_size, "$g_presentation_obj_21", pos1), (overlay_set_size, "$g_presentation_obj_28", pos1), (overlay_set_size, "$g_presentation_obj_29", pos1), (position_set_x, pos1, 250), (position_set_y, pos1, 540), (overlay_set_position, "$g_presentation_obj_10", pos1), (position_set_y, pos1, 520), (overlay_set_position, "$g_presentation_obj_11", pos1), (position_set_y, pos1, 500), (overlay_set_position, "$g_presentation_obj_12", pos1), (position_set_y, pos1, 480), (overlay_set_position, "$g_presentation_obj_13", pos1), (position_set_y, pos1, 460), (overlay_set_position, "$g_presentation_obj_14", pos1), (position_set_y, pos1, 440), (overlay_set_position, "$g_presentation_obj_15", pos1), (position_set_y, pos1, 420), (overlay_set_position, "$g_presentation_obj_16", pos1), (position_set_y, pos1, 400), (overlay_set_position, "$g_presentation_obj_17", pos1), (position_set_x, pos1, 400), (position_set_y, pos1, 540), (overlay_set_position, "$g_presentation_obj_18", pos1), (position_set_y, pos1, 520), (overlay_set_position, "$g_presentation_obj_19", pos1), (position_set_x, pos1, 550), (position_set_y, pos1, 540), (overlay_set_position, "$g_presentation_obj_20", pos1), (position_set_y, pos1, 520), (overlay_set_position, "$g_presentation_obj_21", pos1), (position_set_y, pos1, 500), (overlay_set_position, "$g_presentation_obj_28", pos1), (position_set_y, pos1, 480), (overlay_set_position, "$g_presentation_obj_29", pos1), (create_text_overlay, "$g_presentation_obj_22", "@Us", 0), (create_text_overlay, "$g_presentation_obj_24", "@Enemies", 0), (create_text_overlay, "$g_presentation_obj_25", "@Ready", tf_center_justify), (create_text_overlay, "$g_presentation_obj_26", "@Wounded", tf_center_justify), (create_text_overlay, "$g_presentation_obj_27", "@Dead", tf_center_justify), (create_text_overlay, "$g_battle_us_ready", s7, tf_center_justify), (create_text_overlay, "$g_battle_us_wounded", s7, tf_center_justify), (create_text_overlay, "$g_battle_us_dead", s7, tf_center_justify), (create_text_overlay, "$g_battle_enemies_ready", s7, tf_center_justify), (create_text_overlay, "$g_battle_enemies_wounded", s7, tf_center_justify), (create_text_overlay, "$g_battle_enemies_dead", s7, tf_center_justify), (create_text_overlay, "$g_presentation_obj_23", "@Allies", 0), (create_text_overlay, "$g_battle_allies_ready", s7, tf_center_justify), (create_text_overlay, "$g_battle_allies_wounded", s7, tf_center_justify), (create_text_overlay, "$g_battle_allies_dead", s7, tf_center_justify), (assign, ":stat_position_x", 100), (assign, ":stat_position_y", 100), (val_add, ":stat_position_x", 150), (val_add, ":stat_position_y", 120), (position_set_x, pos1, ":stat_position_x"), (position_set_y, pos1, ":stat_position_y"), (overlay_set_position, "$g_presentation_obj_25", pos1), (val_add, ":stat_position_x", 150), (position_set_x, pos1, ":stat_position_x"), (overlay_set_position, "$g_presentation_obj_26", pos1), (val_add, ":stat_position_x", 150), (position_set_x, pos1, ":stat_position_x"), (overlay_set_position, "$g_presentation_obj_27", pos1), (val_add, ":stat_position_x", -450), (val_add, ":stat_position_y", -40), (position_set_x, pos1, ":stat_position_x"), (position_set_y, pos1, ":stat_position_y"), (overlay_set_position, "$g_presentation_obj_22", pos1), (val_add, ":stat_position_y", -40), (position_set_y, pos1, ":stat_position_y"), (overlay_set_position, "$g_presentation_obj_23", pos1), (val_add, ":stat_position_y", -40), (position_set_y, pos1, ":stat_position_y"), (overlay_set_position, "$g_presentation_obj_24", pos1), (get_scene_boundaries, pos2, pos3), (position_transform_position_to_local, pos4, pos2, pos3), (set_fixed_point_multiplier, 1000), (position_get_x, ":map_width", pos4), (position_get_y, ":map_height", pos4), (set_fixed_point_multiplier, 1000), (store_div, ":map_ratio", ":map_height", 100), (store_div, ":map_ratio", ":map_width", ":map_ratio"), (try_begin), (gt, ":map_ratio", 100), (assign, "$g_battle_map_width", 300), (store_div, "$g_battle_map_scale", ":map_width", "$g_battle_map_width"), (store_div, "$g_battle_map_height", ":map_height", "$g_battle_map_scale"), (else_try), (assign, "$g_battle_map_height", 300), (store_div, "$g_battle_map_scale", ":map_height", "$g_battle_map_height"), (store_div, "$g_battle_map_width", ":map_width", "$g_battle_map_scale"), (try_end), (create_image_button_overlay, "$g_battle_map_plane", "mesh_white_plane", "mesh_white_plane"), (overlay_set_color, "$g_battle_map_plane", 0), (store_add, ":map_bordered_width", "$g_battle_map_width", 20), (store_add, ":map_bordered_height", "$g_battle_map_height", 20), (store_mul, ":map_scale_x", ":map_bordered_width", 50), (store_mul, ":map_scale_y", ":map_bordered_height", 50), (position_set_x, pos1, ":map_scale_x"), (position_set_y, pos1, ":map_scale_y"), (overlay_set_size, "$g_battle_map_plane", pos1), (store_sub, ":map_pos_x", 990, ":map_bordered_width"), (store_sub, ":map_pos_y", 740, ":map_bordered_height"), (position_set_x, pos1, ":map_pos_x"), (position_set_y, pos1, ":map_pos_y"), (overlay_set_position, "$g_battle_map_plane", pos1), (overlay_set_alpha, "$g_battle_map_plane", 0x44), (create_mesh_overlay, "$g_battle_map_infantry_order_flag", "mesh_flag_infantry"), (create_mesh_overlay, "$g_battle_map_archers_order_flag", "mesh_flag_archers"), (create_mesh_overlay, "$g_battle_map_cavalry_order_flag", "mesh_flag_cavalry"), (overlay_set_alpha, "$g_battle_map_infantry_order_flag", 0), (overlay_set_alpha, "$g_battle_map_archers_order_flag", 0), (overlay_set_alpha, "$g_battle_map_cavalry_order_flag", 0), (call_script, "script_update_order_panel_checked_classes"), (call_script, "script_update_order_panel_statistics_and_map"), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [(store_trigger_param_1, ":object"), (store_trigger_param_2, ":value"), (get_player_agent_no, ":player_agent"), (agent_get_team, ":player_team", ":player_agent"), (assign, ":update_listeners", 0), (try_begin), (eq, ":object", "$g_presentation_obj_4"), (assign, ":update_listeners", 1), (assign, "$g_formation_infantry_selected", ":value"), (try_begin), (eq, ":value", 1), (overlay_animate_to_alpha, "$g_presentation_obj_1", 250, 0x44), (else_try), (overlay_animate_to_alpha, "$g_presentation_obj_1", 250, 0), (try_end), (else_try), (eq, ":object", "$g_presentation_obj_5"), (assign, ":update_listeners", 1), (assign, "$g_formation_archers_selected", ":value"), (try_begin), (eq, ":value", 1), (overlay_animate_to_alpha, "$g_presentation_obj_2", 250, 0x44), (else_try), (overlay_animate_to_alpha, "$g_presentation_obj_2", 250, 0), (try_end), (else_try), (eq, ":object", "$g_presentation_obj_6"), (assign, ":update_listeners", 1), (assign, "$g_formation_cavalry_selected", ":value"), (try_begin), (eq, ":value", 1), (overlay_animate_to_alpha, "$g_presentation_obj_3", 250, 0x44), (else_try), (overlay_animate_to_alpha, "$g_presentation_obj_3", 250, 0), (try_end), (else_try), (eq, ":object", "$g_presentation_obj_1"), (assign, ":update_listeners", 1), (assign, "$g_formation_infantry_selected", 1), (assign, "$g_formation_archers_selected", 0), (assign, "$g_formation_cavalry_selected", 0), (overlay_animate_to_alpha, "$g_presentation_obj_1", 250, 0x44), (overlay_animate_to_alpha, "$g_presentation_obj_2", 250, 0), (overlay_animate_to_alpha, "$g_presentation_obj_3", 250, 0), (overlay_set_val, "$g_presentation_obj_4", 1), (overlay_set_val, "$g_presentation_obj_5", 0), (overlay_set_val, "$g_presentation_obj_6", 0), (else_try), (eq, ":object", "$g_presentation_obj_2"), (assign, ":update_listeners", 1), (assign, "$g_formation_infantry_selected", 0), (assign, "$g_formation_archers_selected", 1), (assign, "$g_formation_cavalry_selected", 0), (overlay_animate_to_alpha, "$g_presentation_obj_1", 250, 0), (overlay_animate_to_alpha, "$g_presentation_obj_2", 250, 0x44), (overlay_animate_to_alpha, "$g_presentation_obj_3", 250, 0), (overlay_set_val, "$g_presentation_obj_4", 0), (overlay_set_val, "$g_presentation_obj_5", 1), (overlay_set_val, "$g_presentation_obj_6", 0), (else_try), (eq, ":object", "$g_presentation_obj_3"), (assign, ":update_listeners", 1), (assign, "$g_formation_infantry_selected", 0), (assign, "$g_formation_archers_selected", 0), (assign, "$g_formation_cavalry_selected", 1), (overlay_animate_to_alpha, "$g_presentation_obj_1", 250, 0), (overlay_animate_to_alpha, "$g_presentation_obj_2", 250, 0), (overlay_animate_to_alpha, "$g_presentation_obj_3", 250, 0x44), (overlay_set_val, "$g_presentation_obj_4", 0), (overlay_set_val, "$g_presentation_obj_5", 0), (overlay_set_val, "$g_presentation_obj_6", 1), (else_try), (eq, ":object", "$g_presentation_obj_10"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_hold), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_11"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_follow), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_12"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_charge), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_13"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_advance), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_14"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_fall_back), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_15"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_stand_closer), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_16"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_spread_out), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_17"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_stand_ground), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_18"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_mount), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_19"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_dismount), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_20"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_use_any_weapon), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_21"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_use_blunt_weapons), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_28"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_hold_fire), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_29"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_fire_at_will), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_battle_map_plane"), (get_scene_boundaries, pos2, pos3), (mouse_get_position, pos1), (set_fixed_point_multiplier, 1000), (position_get_x, ":mouse_x", pos1), (position_get_y, ":mouse_y", pos1), (store_sub, ":map_x", 980, "$g_battle_map_width"), (store_sub, ":map_y", 730, "$g_battle_map_height"), (val_sub, ":mouse_x", ":map_x"), (val_sub, ":mouse_y", ":map_y"), (val_clamp, ":mouse_x", 0, "$g_battle_map_width"), (val_clamp, ":mouse_y", 0, "$g_battle_map_height"), (val_mul, ":mouse_x", "$g_battle_map_scale"), (val_mul, ":mouse_y", "$g_battle_map_scale"), (set_fixed_point_multiplier, 1000), (position_set_x, pos1, ":mouse_x"), (position_set_y, pos1, ":mouse_y"), (position_transform_position_to_parent, pos3, pos2, pos1), (try_begin), (eq, "$g_formation_infantry_selected", 1), (team_give_order, ":player_team", grc_infantry, mordr_hold), (team_set_order_position, ":player_team", grc_infantry, pos3), (try_end), (try_begin), (eq, "$g_formation_archers_selected", 1), (team_give_order, ":player_team", grc_archers, mordr_hold), (team_set_order_position, ":player_team", grc_archers, pos3), (try_end), (try_begin), (eq, "$g_formation_cavalry_selected", 1), (team_give_order, ":player_team", grc_cavalry, mordr_hold), (team_set_order_position, ":player_team", grc_cavalry, pos3), (try_end), (call_script, "script_update_order_flags_on_map"), (call_script, "script_update_order_panel", ":player_team"), (try_end), (try_begin), (eq, ":update_listeners", 1), (try_begin), (eq, "$g_formation_infantry_selected", 1), (eq, "$g_formation_archers_selected", 1), (eq, "$g_formation_cavalry_selected", 1), (team_set_order_listener, ":player_team", grc_everyone), (else_try), (eq, "$g_formation_infantry_selected", 1), (team_set_order_listener, ":player_team", grc_infantry), (else_try), (eq, "$g_formation_archers_selected", 1), (team_set_order_listener, ":player_team", grc_archers), (else_try), (eq, "$g_formation_cavalry_selected", 1), (team_set_order_listener, ":player_team", grc_cavalry), (try_end), (try_end), ]), (ti_on_presentation_mouse_enter_leave, [(store_trigger_param_1, ":object"), (store_trigger_param_2, ":enter_leave"), (try_begin), (eq, ":object", "$g_presentation_obj_1"), (try_begin), (eq, ":enter_leave", 0), (overlay_animate_to_color, "$g_presentation_infantry_movement", 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_infantry_riding", 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_infantry_weapon_usage", 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_obj_7", 250, 0xFFFFFF), (else_try), (overlay_animate_to_color, "$g_presentation_infantry_movement", 250, 0), (overlay_animate_to_color, "$g_presentation_infantry_riding", 250, 0), (overlay_animate_to_color, "$g_presentation_infantry_weapon_usage", 250, 0), (overlay_animate_to_color, "$g_presentation_obj_7", 250, 0), (try_end), (else_try), (eq, ":object", "$g_presentation_obj_2"), (try_begin), (eq, ":enter_leave", 0), (overlay_animate_to_color, "$g_presentation_archers_movement", 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_archers_riding", 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_archers_weapon_usage", 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_obj_8", 250, 0xFFFFFF), (else_try), (overlay_animate_to_color, "$g_presentation_archers_movement", 250, 0), (overlay_animate_to_color, "$g_presentation_archers_riding", 250, 0), (overlay_animate_to_color, "$g_presentation_archers_weapon_usage", 250, 0), (overlay_animate_to_color, "$g_presentation_obj_8", 250, 0), (try_end), (else_try), (eq, ":object", "$g_presentation_obj_3"), (try_begin), (eq, ":enter_leave", 0), (overlay_animate_to_color, "$g_presentation_cavalry_movement", 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_cavalry_riding", 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_cavalry_weapon_usage", 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_obj_9", 250, 0xFFFFFF), (else_try), (overlay_animate_to_color, "$g_presentation_cavalry_movement", 250, 0), (overlay_animate_to_color, "$g_presentation_cavalry_riding", 250, 0), (overlay_animate_to_color, "$g_presentation_cavalry_weapon_usage", 250, 0), (overlay_animate_to_color, "$g_presentation_obj_9", 250, 0), (try_end), (try_end), ]), (ti_on_presentation_run, [(store_trigger_param_1, ":cur_time"), (try_begin), (this_or_next|game_key_clicked, gk_infantry_hear), (this_or_next|game_key_clicked, gk_archers_hear), (this_or_next|game_key_clicked, gk_cavalry_hear), (this_or_next|game_key_clicked, gk_everyone_hear), (game_key_clicked, gk_reverse_order_group), (call_script, "script_update_order_panel_checked_classes"), (try_end), (try_begin), (this_or_next|game_key_clicked, gk_order_halt), (this_or_next|game_key_clicked, gk_order_follow), (this_or_next|game_key_clicked, gk_order_charge), (this_or_next|game_key_clicked, gk_order_dismount), (this_or_next|game_key_clicked, gk_order_advance), (this_or_next|game_key_clicked, gk_order_fall_back), (this_or_next|game_key_clicked, gk_order_stand_closer), (this_or_next|game_key_clicked, gk_order_spread_out), (this_or_next|game_key_clicked, gk_order_hold_fire_toggle), (game_key_clicked, gk_order_blunt_weapons_toggle), (get_player_agent_no, ":player_agent"), (agent_get_team, ":player_team", ":player_agent"), (call_script, "script_update_order_panel", ":player_team"), (try_end), (try_begin), (gt, ":cur_time", 200), (game_key_clicked, gk_view_orders), (assign, "$g_presentation_battle_active", 0), (try_for_agents, ":cur_agent"), (agent_set_slot, ":cur_agent", slot_agent_map_overlay_id, 0), (try_end), (presentation_set_duration, 0), (try_end), ]), ]), ("sliders",0,0,[ (ti_on_presentation_load, [(set_fixed_point_multiplier, 1000), (create_slider_overlay, "$g_presentation_obj_1", 0, 100), (create_slider_overlay, "$g_presentation_obj_2", 0, 100), (create_slider_overlay, "$g_presentation_obj_3", 0, 100), (create_slider_overlay, "$g_presentation_obj_4", 0, 100), (assign, reg1, 25), (str_store_string, s1, "str_reg1"), (create_text_overlay, "$g_presentation_obj_5", s1), (create_text_overlay, "$g_presentation_obj_6", s1), (create_text_overlay, "$g_presentation_obj_7", s1), (create_text_overlay, "$g_presentation_obj_8", s1), (assign, "$g_presentation_obj_1_val", 25), (overlay_set_val, "$g_presentation_obj_1", 25), (assign, "$g_presentation_obj_2_val", 25), (overlay_set_val, "$g_presentation_obj_2", 25), (assign, "$g_presentation_obj_3_val", 25), (overlay_set_val, "$g_presentation_obj_3", 25), (assign, "$g_presentation_obj_4_val", 25), (overlay_set_val, "$g_presentation_obj_4", 25), (position_set_x, pos1, 600), (position_set_y, pos1, 200), (overlay_set_position, "$g_presentation_obj_1", pos1), (position_set_y, pos1, 300), (overlay_set_position, "$g_presentation_obj_2", pos1), (position_set_y, pos1, 400), (overlay_set_position, "$g_presentation_obj_3", pos1), (position_set_y, pos1, 500), (overlay_set_position, "$g_presentation_obj_4", pos1), (position_set_x, pos1, 800), (position_set_y, pos1, 200), (overlay_set_position, "$g_presentation_obj_5", pos1), (position_set_y, pos1, 300), (overlay_set_position, "$g_presentation_obj_6", pos1), (position_set_y, pos1, 400), (overlay_set_position, "$g_presentation_obj_7", pos1), (position_set_y, pos1, 500), (overlay_set_position, "$g_presentation_obj_8", pos1), (position_set_x, pos1, 500), (overlay_set_size, "$g_presentation_obj_3", pos1), ]), (ti_on_presentation_run, [ ]), (ti_on_presentation_event_state_change, [(store_trigger_param_1, ":object"), (store_trigger_param_2, ":value"), (assign, ":val_changed", 0), (try_begin), (eq, ":object", "$g_presentation_obj_1"), (try_begin), (neq, "$g_presentation_obj_1_val", ":value"), (assign, "$g_presentation_obj_1_val", ":value"), (assign, ":val_changed", 1), (try_end), (else_try), (eq, ":object", "$g_presentation_obj_2"), (try_begin), (neq, "$g_presentation_obj_2_val", ":value"), (assign, "$g_presentation_obj_2_val", ":value"), (assign, ":val_changed", 1), (try_end), (else_try), (eq, ":object", "$g_presentation_obj_3"), (try_begin), (neq, "$g_presentation_obj_3_val", ":value"), (assign, "$g_presentation_obj_3_val", ":value"), (assign, ":val_changed", 1), (try_end), (else_try), (eq, ":object", "$g_presentation_obj_4"), (try_begin), (neq, "$g_presentation_obj_4_val", ":value"), (assign, "$g_presentation_obj_4_val", ":value"), (assign, ":val_changed", 1), (try_end), (try_end), (try_begin), (eq, ":val_changed", 1), (assign, ":sum_values", 0), (val_add, ":sum_values", "$g_presentation_obj_1_val"), (val_add, ":sum_values", "$g_presentation_obj_2_val"), (val_add, ":sum_values", "$g_presentation_obj_3_val"), (val_add, ":sum_values", "$g_presentation_obj_4_val"), (store_sub, ":difference", 100, ":sum_values"), (assign, ":obj_1_new_val", "$g_presentation_obj_1_val"), (assign, ":obj_2_new_val", "$g_presentation_obj_2_val"), (assign, ":obj_3_new_val", "$g_presentation_obj_3_val"), (assign, ":obj_4_new_val", "$g_presentation_obj_4_val"), (assign, ":adder", 1), (assign, ":between_1", 0), (assign, ":between_2", 100), (try_begin), (lt, ":difference", 0), (val_mul, ":difference", -1), (assign, ":adder", -1), (assign, ":between_1", 1), (assign, ":between_2", 101), (try_end), (store_sub, ":sum_non_changed_values", ":sum_values", ":value"), (val_add, ":sum_non_changed_values", 30), (try_for_range, ":unused", 0, ":difference"), (store_random_in_range, ":random_no", 0, ":sum_non_changed_values"), (try_begin), (neq, ":object", "$g_presentation_obj_1"), (val_sub, ":random_no", "$g_presentation_obj_1_val"), (val_sub, ":random_no", 10), (lt, ":random_no", 0), (is_between, ":obj_1_new_val", ":between_1", ":between_2"), (val_add, ":obj_1_new_val", ":adder"), (else_try), (neq, ":object", "$g_presentation_obj_2"), (val_sub, ":random_no", "$g_presentation_obj_2_val"), (val_sub, ":random_no", 10), (lt, ":random_no", 0), (is_between, ":obj_2_new_val", ":between_1", ":between_2"), (val_add, ":obj_2_new_val", ":adder"), (else_try), (neq, ":object", "$g_presentation_obj_3"), (val_sub, ":random_no", "$g_presentation_obj_3_val"), (val_sub, ":random_no", 10), (lt, ":random_no", 0), (is_between, ":obj_3_new_val", ":between_1", ":between_2"), (val_add, ":obj_3_new_val", ":adder"), (else_try), (is_between, ":obj_4_new_val", ":between_1", ":between_2"), (val_add, ":obj_4_new_val", ":adder"), (else_try), (val_add, ":difference", 1), (try_end), (try_end), (assign, "$g_presentation_obj_1_val", ":obj_1_new_val"), (assign, "$g_presentation_obj_2_val", ":obj_2_new_val"), (assign, "$g_presentation_obj_3_val", ":obj_3_new_val"), (assign, "$g_presentation_obj_4_val", ":obj_4_new_val"), (try_end), (overlay_set_val, "$g_presentation_obj_1", "$g_presentation_obj_1_val"), (overlay_set_val, "$g_presentation_obj_2", "$g_presentation_obj_2_val"), (overlay_set_val, "$g_presentation_obj_3", "$g_presentation_obj_3_val"), (overlay_set_val, "$g_presentation_obj_4", "$g_presentation_obj_4_val"), (assign, reg1, "$g_presentation_obj_1_val"), (str_store_string, s1, "str_reg1"), (overlay_set_text, "$g_presentation_obj_5", s1), (assign, reg1, "$g_presentation_obj_2_val"), (str_store_string, s1, "str_reg1"), (overlay_set_text, "$g_presentation_obj_6", s1), (assign, reg1, "$g_presentation_obj_3_val"), (str_store_string, s1, "str_reg1"), (overlay_set_text, "$g_presentation_obj_7", s1), (assign, reg1, "$g_presentation_obj_4_val"), (str_store_string, s1, "str_reg1"), (overlay_set_text, "$g_presentation_obj_8", s1), ]), ]), ("arena_training", prsntf_read_only, 0, [ (ti_on_presentation_load, [(presentation_set_duration, 999999), (set_fixed_point_multiplier, 1000), (get_player_agent_no, ":player_agent"), (agent_get_kill_count, reg1, ":player_agent", 1), (str_store_string, s1, "@Number of men knocked down: {reg1}"), (create_text_overlay, "$g_presentation_obj_1", s1), (overlay_set_color, "$g_presentation_obj_1", 0xFFFFFF), (position_set_x, pos1, 10), (position_set_y, pos1, 700), (overlay_set_position, "$g_presentation_obj_1", pos1), (assign, reg1, 0), (str_store_string, s1, "@Number of men left: {reg1}"), (create_text_overlay, "$g_presentation_obj_2", s1), (overlay_set_color, "$g_presentation_obj_2", 0xFFFFFF), (position_set_x, pos1, 10), (position_set_y, pos1, 670), (overlay_set_position, "$g_presentation_obj_2", pos1), ]), (ti_on_presentation_run, [(get_player_agent_no, ":player_agent"), (agent_get_kill_count, reg1, ":player_agent", 1), (str_store_string, s1, "@Opponents Beaten: {reg1}"), (overlay_set_text, "$g_presentation_obj_1", s1), (assign, ":num_left", "$g_arena_training_max_opponents"), (try_for_agents, ":agent_no"), (agent_is_human, ":agent_no"), (neg|agent_is_alive, ":agent_no"), (neq, ":agent_no", ":player_agent"), (val_sub, ":num_left", 1), (try_end), (assign, reg1, ":num_left"), (str_store_string, s1, "@Opponents Remaining: {reg1}"), (overlay_set_text, "$g_presentation_obj_2", s1), ]), ]), ("retirement", 0, mesh_load_window, [ (ti_on_presentation_load, [ (presentation_set_duration, 999999), (set_fixed_point_multiplier, 1000), (create_button_overlay, "$g_presentation_obj_1", "@Remain in retirement.", tf_center_justify), (create_button_overlay, "$g_presentation_obj_2", "@Go back to the adventuring.", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 80), (overlay_set_position, "$g_presentation_obj_1", pos1), (position_set_y, pos1, 40), (overlay_set_position, "$g_presentation_obj_2", pos1), (assign, ":total_effect", 0), #wealth (store_troop_gold, ":wealth", "trp_player"), (store_div, ":wealth_effect", ":wealth", 200), (val_add, ":total_effect", ":wealth_effect"), #ruled centers and friendly/enemy centers (assign, ":num_towns", 0), (assign, ":num_castles", 0), (assign, ":num_villages", 0), (assign, ":num_friendly_towns", 0), (assign, ":num_friendly_villages", 0), (assign, ":num_enemy_towns", 0), (assign, ":num_enemy_villages", 0), (try_for_range, ":center_no", centers_begin, centers_end), (party_get_slot, ":type", ":center_no", slot_party_type), (try_begin), (party_slot_eq, ":center_no", slot_town_lord, "trp_player"), (try_begin), (eq, ":type", spt_town), (val_add, ":num_towns", 1), (else_try), (eq, ":type", spt_castle), (val_add, ":num_castles", 1), (else_try), (val_add, ":num_villages", 1), (try_end), (try_end), (party_get_slot, ":relation", ":center_no", slot_center_player_relation), (try_begin), (ge, ":relation", 40), (try_begin), (eq, ":type", spt_town), (val_add, ":num_friendly_towns", 1), (else_try), (eq, ":type", spt_village), (val_add, ":num_friendly_villages", 1), (try_end), (else_try), (le, ":relation", -40), (try_begin), (eq, ":type", spt_town), (val_add, ":num_enemy_towns", 1), (else_try), (eq, ":type", spt_village), (val_add, ":num_enemy_villages", 1), (try_end), (try_end), (try_end), (store_mul, ":num_towns_effect", ":num_towns", 100), (store_mul, ":num_castles_effect", ":num_castles", 50), (store_mul, ":num_villages_effect", ":num_villages", 20), (store_add, ":num_centers", ":num_towns", ":num_castles"), (val_add, ":num_centers", ":num_villages"), (store_add, ":ruled_centers_effect", ":num_towns_effect", ":num_castles_effect"), (val_add, ":ruled_centers_effect", ":num_villages_effect"), (val_add, ":total_effect", ":ruled_centers_effect"), (store_mul, ":num_friendly_towns_effect", ":num_friendly_towns", 20), (store_mul, ":num_friendly_villages_effect", ":num_friendly_villages", 4), (store_add, ":num_friendly_centers", ":num_friendly_towns", ":num_friendly_villages"), (store_add, ":friendly_centers_effect", ":num_friendly_towns_effect", ":num_friendly_villages_effect"), (val_add, ":total_effect", ":friendly_centers_effect"), (store_mul, ":num_enemy_towns_effect", ":num_enemy_towns", -40), (store_mul, ":num_enemy_villages_effect", ":num_enemy_villages", -8), (store_add, ":num_enemy_centers", ":num_enemy_towns", ":num_enemy_villages"), (store_add, ":enemy_centers_effect", ":num_enemy_towns_effect", ":num_enemy_villages_effect"), (val_add, ":total_effect", ":enemy_centers_effect"), #inventory (assign, ":total_item_value", 0), (troop_get_inventory_capacity, ":capacity", "trp_player"), (try_for_range, ":i_inv", 0, ":capacity"), (troop_get_inventory_slot, ":item", "trp_player", ":i_inv"), (ge, ":item", 0), (store_item_value, ":item_value", ":item"), (val_add, ":total_item_value", ":item_value"), (try_end), (store_div, ":total_item_value_effect", ":total_item_value", 200), (val_add, ":total_effect", ":total_item_value_effect"), #renown (troop_get_slot, ":renown", "trp_player", slot_troop_renown), (store_div, ":renown_effect", ":renown", 1), (val_add, ":total_effect", ":renown_effect"), #enemies and friends (assign, ":num_enemies", 0), (assign, ":num_friends", 0), (try_for_range, ":troop_no", heroes_begin, heroes_end), (this_or_next|troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_lady), (call_script, "script_troop_get_player_relation", ":troop_no"), (assign, ":relation", reg0), #(troop_get_slot, ":relation", ":troop_no", slot_troop_player_relation), (try_begin), (ge, ":relation", 40), (val_add, ":num_friends", 1), (else_try), (le, ":relation", -40), (val_add, ":num_enemies", 1), (try_end), (try_end), (store_mul, ":num_friends_effect", ":num_friends", 10), (val_add, ":total_effect", ":num_friends_effect"), (store_mul, ":num_enemies_effect", ":num_enemies", -10), (val_add, ":total_effect", ":num_enemies_effect"), #current day (store_current_day, ":cur_day"), (store_div, ":cur_day_effect", ":cur_day", -1), (val_add, ":total_effect", ":cur_day_effect"), #g_total_victories (store_mul, ":total_victories_effect", "$g_total_victories", 2), (val_add, ":total_effect", ":total_victories_effect"), #g_total_defeats (store_mul, ":total_defeats_effect", "$g_total_defeats", -3), (val_add, ":total_effect", ":total_defeats_effect"), #g_total_quests_completed (store_mul, ":total_quests_completed_effect", "$g_total_quests_completed", 4), (val_add, ":total_effect", ":total_quests_completed_effect"), #xp (troop_get_xp, ":xp", "trp_player"), (store_div, ":xp_effect", ":xp", 5000), (val_add, ":total_effect", ":xp_effect"), #companions joined / departed (assign, ":num_companions_joined", 0), (assign, ":num_companions_departed", 0), (try_for_range, ":troop_no", companions_begin, companions_end), (try_begin), (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_player_companion), (val_add, ":num_companions_joined", 1), (else_try), (troop_slot_ge, ":troop_no", slot_troop_playerparty_history, 1), (val_add, ":num_companions_departed", 1), (try_end), (try_end), (store_div, ":num_companions_joined_effect", ":num_companions_joined", 2), (val_add, ":total_effect", ":num_companions_joined_effect"), (store_div, ":num_companions_departed_effect", ":num_companions_departed", -4), (val_add, ":total_effect", ":num_companions_departed_effect"), #difficulty (get_average_game_difficulty, ":difficulty"), (assign, ":difficulty_effect", ":total_effect"), (val_mul, ":total_effect", ":difficulty"), (val_div, ":total_effect", 75), (val_mul, ":total_effect", ":difficulty"), (val_div, ":total_effect", 75), (store_sub, ":difficulty_effect", ":total_effect", ":difficulty_effect"), (assign, reg5, ":cur_day"), (store_character_level, reg4, "trp_player"), (create_text_overlay, reg1, "@You have retired at level {reg4} after {reg5} days of adventuring.", tf_center_justify), (position_set_x, pos1, 700), (position_set_y, pos1, 700), (overlay_set_position, reg1, pos1), (position_set_x, pos1, 950), (position_set_y, pos1, 950), (overlay_set_size, reg1, pos1), ## (overlay_set_color, reg1, 0), (create_text_overlay, reg2, "@Effect on Score", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg2, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 670), (overlay_set_position, reg2, pos1), (assign, reg0, ":num_centers"), (create_text_overlay, reg1, "@Settlements owned by you: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 650), (overlay_set_position, reg1, pos1), (assign, reg0, ":ruled_centers_effect"), (create_text_overlay, reg1, "@{reg0?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 650), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (try_end), (assign, reg0, ":num_friendly_centers"), (create_text_overlay, reg1, "@Friendly Settlements: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 630), (overlay_set_position, reg1, pos1), (assign, reg0, ":friendly_centers_effect"), (create_text_overlay, reg1, "@{reg0?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 630), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (try_end), (assign, reg0, ":num_enemy_centers"), (create_text_overlay, reg1, "@Hostile Settlements: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 610), (overlay_set_position, reg1, pos1), (assign, reg0, ":enemy_centers_effect"), (create_text_overlay, reg1, "@{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 610), (overlay_set_position, reg1, pos1), (try_begin), (lt, reg0, 0), (overlay_set_color, reg1, 0xFF0000), (try_end), (assign, reg0, ":num_friends"), (create_text_overlay, reg1, "@Friendly Lords: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 590), (overlay_set_position, reg1, pos1), (assign, reg0, ":num_friends_effect"), (create_text_overlay, reg1, "@{reg0?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 590), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (try_end), (assign, reg0, ":num_enemies"), (create_text_overlay, reg1, "@Enemy Lords: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 570), (overlay_set_position, reg1, pos1), (assign, reg0, ":num_enemies_effect"), (create_text_overlay, reg1, "@{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 570), (overlay_set_position, reg1, pos1), (try_begin), (lt, reg0, 0), (overlay_set_color, reg1, 0xFF0000), (try_end), (assign, reg0, "$g_total_victories"), (create_text_overlay, reg1, "@Victories: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 550), (overlay_set_position, reg1, pos1), (assign, reg0, ":total_victories_effect"), (create_text_overlay, reg1, "@{reg0?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 550), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (try_end), (assign, reg0, "$g_total_defeats"), (create_text_overlay, reg1, "@Defeats: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 530), (overlay_set_position, reg1, pos1), (assign, reg0, ":total_defeats_effect"), (create_text_overlay, reg1, "@{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 530), (overlay_set_position, reg1, pos1), (try_begin), (lt, reg0, 0), (overlay_set_color, reg1, 0xFF0000), (try_end), (assign, reg0, "$g_total_quests_completed"), (create_text_overlay, reg1, "@Quests Completed: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 510), (overlay_set_position, reg1, pos1), (assign, reg0, ":total_quests_completed_effect"), (create_text_overlay, reg1, "@{reg0?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 510), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (try_end), (assign, reg0, ":num_companions_joined"), (create_text_overlay, reg1, "@Companions Found: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 490), (overlay_set_position, reg1, pos1), (assign, reg0, ":num_companions_joined_effect"), (create_text_overlay, reg1, "@{reg0?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 490), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (try_end), (assign, reg0, ":num_companions_departed"), (create_text_overlay, reg1, "@Companions Lost/Departed: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 470), (overlay_set_position, reg1, pos1), (assign, reg0, ":num_companions_departed_effect"), (create_text_overlay, reg1, "@{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 470), (overlay_set_position, reg1, pos1), (try_begin), (lt, reg0, 0), (overlay_set_color, reg1, 0xFF0000), (try_end), (assign, reg0, ":wealth"), (create_text_overlay, reg1, "@Wealth: {reg0} denars", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 450), (overlay_set_position, reg1, pos1), (assign, reg0, ":wealth_effect"), (create_text_overlay, reg1, "@{reg0?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 450), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (try_end), (assign, reg0, ":total_item_value"), (create_text_overlay, reg1, "@Inventory: {reg0} denars", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 430), (overlay_set_position, reg1, pos1), (assign, reg0, ":total_item_value_effect"), (create_text_overlay, reg1, "@{reg0?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 430), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (try_end), (assign, reg0, ":renown"), (create_text_overlay, reg1, "@Renown: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 410), (overlay_set_position, reg1, pos1), (assign, reg0, ":renown_effect"), (create_text_overlay, reg1, "@{reg0?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 410), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (try_end), (assign, reg0, ":xp"), (create_text_overlay, reg1, "@Experience: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 390), (overlay_set_position, reg1, pos1), (assign, reg0, ":xp_effect"), (create_text_overlay, reg1, "@{reg0?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 390), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (try_end), (assign, reg0, ":cur_day"), (create_text_overlay, reg1, "@Days Passed: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 370), (overlay_set_position, reg1, pos1), (assign, reg0, ":cur_day_effect"), (create_text_overlay, reg1, "@{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 370), (overlay_set_position, reg1, pos1), (try_begin), (lt, reg0, 0), (overlay_set_color, reg1, 0xFF0000), (try_end), (assign, reg0, ":difficulty"), (create_text_overlay, reg1, "@Difficulty: {reg0}%", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 350), (overlay_set_position, reg1, pos1), (assign, reg0, ":difficulty_effect"), (assign, reg3, reg0), (val_max, reg3, 0), (create_text_overlay, reg1, "@{reg3?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 350), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (else_try), (lt, reg0, 0), (overlay_set_color, reg1, 0xFF0000), (try_end), (assign, reg0, ":total_effect"), (create_text_overlay, reg1, "@TOTAL SCORE: {reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 320), (overlay_set_position, reg1, pos1), (assign, ":total_villages", 0), (assign, ":total_castles", 0), (assign, ":total_towns", 0), (assign, ":total_village_rels", 0), (assign, ":total_castle_rels", 0), (assign, ":total_town_rels", 0), (try_for_range, ":cur_center_no", centers_begin, centers_end), (try_begin), (party_slot_eq, ":cur_center_no", slot_town_lord, "trp_player"), (try_begin), (party_slot_eq, ":cur_center_no", slot_party_type, spt_town), (val_add, ":total_towns", 1), (else_try), (party_slot_eq, ":cur_center_no", slot_party_type, spt_castle), (val_add, ":total_castles", 1), (else_try), (val_add, ":total_villages", 1), (try_end), (else_try), (party_get_slot, ":center_relation", ":cur_center_no", slot_center_player_relation), (gt, ":center_relation", 0), (try_begin), (party_slot_eq, ":cur_center_no", slot_party_type, spt_town), (val_add, ":total_town_rels", ":center_relation"), (else_try), (party_slot_eq, ":cur_center_no", slot_party_type, spt_castle), (val_add, ":total_castle_rels", ":center_relation"), (else_try), (val_add, ":total_village_rels", ":center_relation"), (try_end), (try_end), (try_end), (try_begin), (gt, ":total_towns", 0), (store_random_in_range, ":random_town", 0, ":total_towns"), (try_for_range, ":cur_center_no", towns_begin, towns_end), (party_slot_eq, ":cur_center_no", slot_town_lord, "trp_player"), (val_sub, ":random_town", 1), (lt, ":random_town", 0), (str_store_party_name, s9, ":cur_center_no"), (try_end), (else_try), (gt, ":total_town_rels", 0), (store_random_in_range, ":random_town_rel", 0, ":total_town_rels"), (try_for_range, ":cur_center_no", towns_begin, towns_end), (party_get_slot, ":center_relation", ":cur_center_no", slot_center_player_relation), (gt, ":center_relation", 0), (val_sub, ":random_town_rel", ":center_relation"), (lt, ":random_town_rel", 0), (str_store_party_name, s9, ":cur_center_no"), (try_end), (else_try), (store_random_in_range, ":random_town", towns_begin, towns_end), (str_store_party_name, s9, ":random_town"), (try_end), (try_begin), (gt, ":total_castles", 0), (store_random_in_range, ":random_castle", 0, ":total_castles"), (try_for_range, ":cur_center_no", castles_begin, castles_end), (party_slot_eq, ":cur_center_no", slot_town_lord, "trp_player"), (val_sub, ":random_castle", 1), (lt, ":random_castle", 0), (str_store_party_name, s8, ":cur_center_no"), (try_end), (else_try), (gt, ":total_castle_rels", 0), (store_random_in_range, ":random_castle_rel", 0, ":total_castle_rels"), (try_for_range, ":cur_center_no", castles_begin, castles_end), (party_get_slot, ":center_relation", ":cur_center_no", slot_center_player_relation), (gt, ":center_relation", 0), (val_sub, ":random_castle_rel", ":center_relation"), (lt, ":random_castle_rel", 0), (str_store_party_name, s8, ":cur_center_no"), (try_end), (else_try), (store_random_in_range, ":random_castle", castles_begin, castles_end), (str_store_party_name, s8, ":random_castle"), (try_end), (try_begin), (gt, ":total_villages", 0), (store_random_in_range, ":random_village", 0, ":total_villages"), (try_for_range, ":cur_center_no", villages_begin, villages_end), (party_slot_eq, ":cur_center_no", slot_town_lord, "trp_player"), (val_sub, ":random_village", 1), (lt, ":random_village", 0), (str_store_party_name, s7, ":cur_center_no"), (try_end), (else_try), (gt, ":total_village_rels", 0), (store_random_in_range, ":random_village_rel", 0, ":total_village_rels"), (try_for_range, ":cur_center_no", villages_begin, villages_end), (party_get_slot, ":center_relation", ":cur_center_no", slot_center_player_relation), (gt, ":center_relation", 0), (val_sub, ":random_village_rel", ":center_relation"), (lt, ":random_village_rel", 0), (str_store_party_name, s7, ":cur_center_no"), (try_end), (else_try), (store_random_in_range, ":random_village", villages_begin, villages_end), (str_store_party_name, s7, ":random_village"), (try_end), (try_begin), (lt, ":total_effect", 100), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_retirement_troop", 0), (str_store_string, s0, "str_retirement_text_1"), (else_try), (lt, ":total_effect", 200), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_retirement_troop", 1), (str_store_string, s0, "str_retirement_text_2"), (else_try), (lt, ":total_effect", 400), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_retirement_troop", 2), (str_store_string, s0, "str_retirement_text_3"), (else_try), (lt, ":total_effect", 700), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_retirement_troop", 3), (str_store_string, s0, "str_retirement_text_4"), (else_try), (lt, ":total_effect", 1200), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_retirement_troop", 4), (str_store_string, s0, "str_retirement_text_5"), (else_try), (lt, ":total_effect", 1850), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_retirement_troop", 5), (str_store_string, s0, "str_retirement_text_6"), (else_try), (lt, ":total_effect", 2500), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_retirement_troop", 6), (str_store_string, s0, "str_retirement_text_7"), (else_try), (lt, ":total_effect", 3500), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_retirement_troop", 7), (str_store_string, s0, "str_retirement_text_8"), (else_try), (lt, ":total_effect", 5000), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_retirement_troop", 8), (str_store_string, s0, "str_retirement_text_9"), (else_try), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_retirement_troop", 9), (str_store_string, s0, "str_retirement_text_10"), (try_end), (position_set_x, pos1, 0), (position_set_y, pos1, 120), (overlay_set_position, reg1, pos1), (create_text_overlay, reg1, s0, tf_double_space|tf_scrollable), (position_set_x, pos1, 600), (position_set_y, pos1, 120), (overlay_set_position, reg1, pos1), (position_set_x, pos1, 360), (position_set_y, pos1, 190), (overlay_set_area_size, reg1, pos1), (position_set_x, pos1, 800), (position_set_y, pos1, 800), (overlay_set_size, reg1, pos1), ]), (ti_on_presentation_event_state_change, [ (store_trigger_param_1, ":object"), (try_begin), (eq, ":object", "$g_presentation_obj_1"), (jump_to_menu, "mnu_end_game"), (start_presentation, "prsnt_game_credits"), (else_try), (eq, ":object", "$g_presentation_obj_2"), (presentation_set_duration, 0), (change_screen_return), (try_end), ]), ]), ########################### # Form Ranks Kit section # # Key configuration ("key_config", 0, mesh_load_window, [ (ti_on_presentation_load, [ (presentation_set_duration, 999999), (set_fixed_point_multiplier, 1000), ]+[ (assign, "$g_presentation_obj_"+str(x+1), -1) \ for x in range(0, 2*len(formation_keys_list)) ]+[ (assign, "$formation_key_config_back", -1), (assign, "$formation_key_config_reset", -1), (assign, "$formation_key_config_default", -1), (assign, "$formation_key_config_title", -1), (assign, "$key_config_button_down", 0), (set_spawn_radius, 5), (spawn_around_party, "p_main_party", "pt_none"), (assign, "$formation_key_config_vector", reg0), (disable_party, reg0), (spawn_around_party, "p_main_party", "pt_none"), (assign, "$formation_key_config_vector_back", reg0), (disable_party, reg0), (try_for_range, ":slot", 0, 0xff), (party_set_slot, "$formation_key_config_vector", ":slot", -1), (party_set_slot, "$formation_key_config_vector_back", ":slot", -1), (try_end), (try_for_range, ":key", 0, len(formation_keys_list)), (store_add, ":slot", slot_party_formation_keys_begin, ":key"), (party_get_slot, ":mapped_key", "p_main_party", ":slot"), (neq, ":mapped_key", 0xff), (party_set_slot, "$formation_key_config_vector", ":mapped_key", ":key"), (party_set_slot, "$formation_key_config_vector_back", ":mapped_key", ":key"), (try_end), (init_position, pos1), (position_set_y, pos1, 680), (position_set_x, pos1, 200), (create_text_overlay, "$formation_key_config_title", "@Formation Keys Configuration", tf_center_justify), (overlay_set_position, "$formation_key_config_title", pos1), (position_set_y, pos1, 150), (position_set_x, pos1, 600), (create_text_overlay, "$formation_key_config_notes", "@Press Esc to^^Disable a key", tf_left_align), (overlay_set_position, "$formation_key_config_notes", pos1), (overlay_set_color, "$formation_key_config_notes", 0x600000), (overlay_set_alpha, "$formation_key_config_notes", 0x00), (position_set_y, pos1, 600), (position_set_x, pos1, 25), (position_set_x, pos2, 1000), (position_set_y, pos2, 1000), (position_set_x, pos3, 120), (position_set_y, pos3, 40), ]+concatenate_scripts([ [(store_add, ":key_name", formation_key_names_begin, y), (create_text_overlay, "$g_presentation_obj_"+str(y*2+1), ":key_name", tf_left_align), (overlay_set_position, "$g_presentation_obj_"+str(y*2+1), pos1), (overlay_set_size, "$g_presentation_obj_"+str(y*2+1), pos2), (position_move_x, pos1, 25), (create_game_button_overlay, "$g_presentation_obj_"+str(y*2+2), "str_no_string", tf_center_justify), (overlay_set_position, "$g_presentation_obj_"+str(y*2+2), pos1), (overlay_set_size, "$g_presentation_obj_"+str(y*2+2), pos3), (position_move_x, pos1, -25), (position_move_y, pos1, -4), (try_begin), (eq, len(formation_keys_list)/3+3, y), (position_move_y, pos1, 4*(y+1)), (position_move_x, pos1, 32), (try_end), (try_begin), (eq, len(formation_keys_list)/3+3+(len(formation_keys_list)-len(formation_keys_list)/3-4)/2, y), (position_move_y, pos1, 4*(y-len(formation_keys_list)/3-3)), (position_move_x, pos1, 32), (try_end), (try_begin), ] for y in range(0, len(formation_keys_list)) ])+[ (call_script, "script_update_formation_key_config_buttons"), (position_set_y, pos1, 25), (position_set_x, pos1, 900), (create_game_button_overlay, "$formation_key_config_back", "@Back", tf_center_justify), (overlay_set_position, "$formation_key_config_back", pos1), (position_move_x, pos1, -16), (create_game_button_overlay, "$formation_key_config_reset", "@Reset", tf_center_justify), (overlay_set_position, "$formation_key_config_reset", pos1), (position_move_x, pos1, -16), (create_game_button_overlay, "$formation_key_config_default", "@Default", tf_center_justify), (overlay_set_position, "$formation_key_config_default", pos1), ] ), (ti_on_presentation_event_state_change, [ (store_trigger_param_1, ":object"), #(store_trigger_param_2, ":value"), (try_begin), ]+concatenate_scripts([ [ (eq, ":object", "$g_presentation_obj_"+str(y*2+2)), (assign, "$key_config_button_down", 1), (assign, "$key_config_listener", "$g_presentation_obj_"+str(y*2+2)), (overlay_set_text, "$key_config_listener", "@Press a key", tf_center_justify), (overlay_set_color, "$key_config_listener", 0x0000FF), (overlay_set_hilight_color, "$key_config_listener", 0x0000FF), (assign, "$formation_key_no", y), (else_try),] for y in range(0, len(formation_keys_list)) ])+[ (eq, ":object", "$formation_key_config_back"), (eq, "$key_config_button_down", 0), (presentation_set_duration, 0), (jump_to_menu, "mnu_camp_action"), (else_try), (eq, ":object", "$formation_key_config_reset"), (try_for_range, ":slot", slot_party_formation_keys_begin, slot_party_formation_keys_begin+len(formation_keys_list)), (party_set_slot, "p_main_party", ":slot", 0xff), (try_end), (try_for_range, ":slot", 0, 0xff), (party_get_slot, ":key", "$formation_key_config_vector_back", ":slot"), (party_set_slot, "$formation_key_config_vector", ":slot", ":key"), (neq, ":key", -1), (val_add, ":key", slot_party_formation_keys_begin), (party_set_slot, "p_main_party", ":key", ":slot"), (try_end), (call_script, "script_update_formation_key_config_buttons"), (else_try), (eq, ":object", "$formation_key_config_default"), ]+[ (party_set_slot, "p_main_party", slot_party_formation_keys_begin+x, formation_default_key_list[x]) \ for x in range(0, len(formation_keys_list)) ]+[ (try_for_range, ":slot", 0, 0xff), (party_set_slot, "$formation_key_config_vector", ":slot", -1), (try_end), (try_for_range, ":key", 0, len(formation_keys_list)), (store_add, ":slot", ":key", slot_party_formation_keys_begin), (party_get_slot, ":mapped_key", "p_main_party", ":slot"), (neq, ":mapped_key", 0xff), (party_set_slot, "$formation_key_config_vector", ":mapped_key", ":key"), (try_end), (call_script, "script_update_formation_key_config_buttons"), (try_end), (try_begin), (eq, "$key_config_button_down", 1), (overlay_set_alpha, "$formation_key_config_notes", 0xFF), (try_end), ] ), (ti_on_presentation_run, [ (eq, "$key_config_button_down", 1), (store_add, ":slot", "$formation_key_no", slot_party_formation_keys_begin), (assign, "$key_config_button_down", 0), (try_begin), ]+concatenate_scripts([ [ (key_clicked, all_keys_list[x][0]), #(overlay_set_text, "$key_config_listener", all_keys_list[x][1], tf_center_justify), #(overlay_set_color, "$key_config_listener", 0x0), (party_get_slot, ":prev_mapped_key", "p_main_party", ":slot"), (party_set_slot, "$formation_key_config_vector", ":prev_mapped_key", -1), (party_set_slot, "p_main_party", ":slot", all_keys_list[x][0]), (try_begin), (party_get_slot, ":prev_key", "$formation_key_config_vector", all_keys_list[x][0]), (party_set_slot, "$formation_key_config_vector", all_keys_list[x][0], "$formation_key_no"), (neq, ":prev_key", -1), (store_add, ":prev_slot", ":prev_key", slot_party_formation_keys_begin), (party_set_slot, "p_main_party", ":prev_slot", 0xff), (try_end), (else_try), ] for x in range(0, len(all_keys_list)) ])+[ (key_clicked, key_escape), #(overlay_set_text, "$key_config_listener", "@Undefined"), #(overlay_set_color, "$key_config_listener", 0xFF0000), (party_get_slot, ":prev_mapped_key", "p_main_party", ":slot"), (party_set_slot, "$formation_key_config_vector", ":prev_mapped_key", -1), (party_set_slot, "p_main_party", ":slot", 0xff), (else_try), (assign, "$key_config_button_down", 1), (try_end), (try_begin), (eq, "$key_config_button_down", 0), (overlay_set_hilight_color, "$key_config_listener", 0x00FF00), (overlay_set_alpha, "$formation_key_config_notes", 0x00), (call_script, "script_update_formation_key_config_buttons"), (try_end), ] ), ] ), ("battle_formations",0,0,[ (ti_on_presentation_load, [(set_fixed_point_multiplier, 1000), (assign, "$g_presentation_battle_formations_active", 1), (str_clear, s7), (try_for_agents, ":agent_no"), (agent_set_slot, ":agent_no", slot_agent_map_overlay_id, 0), (try_end), (set_fixed_point_multiplier, 1000), (position_set_x, pos1, 0), (position_set_y, pos1, 650), (position_set_x, pos2, 32500), (position_set_y, pos2, 2500), (position_set_x, pos3, 20), (position_set_y, pos3, 663), (position_set_x, pos4, 50), (position_set_y, pos4, 663), (position_set_y, pos5, 663), (position_set_x, pos6, 900), (position_set_y, pos6, 900), ]+concatenate_scripts([ [(create_image_button_overlay, "$g_presentation_obj_"+str(x+1), "mesh_white_plane", "mesh_white_plane"), (position_set_y, pos1, 650-50*x), (overlay_set_position, "$g_presentation_obj_"+str(x+1), pos1), (overlay_set_size, "$g_presentation_obj_"+str(x+1), pos2), (overlay_set_alpha, "$g_presentation_obj_"+str(x+1), 0), (overlay_set_color, "$g_presentation_obj_"+str(x+1), 0xFFFF00), (create_check_box_overlay, "$g_presentation_obj_"+str(x+1+formation_arrays), "mesh_checkbox_off", "mesh_checkbox_on"), (position_set_y, pos3, 663-50*x), (overlay_set_position, "$g_presentation_obj_"+str(x+1+formation_arrays), pos3), (create_text_overlay, "$g_presentation_obj_"+str(x+1+2*formation_arrays), s7, 0), (position_set_y, pos4, 663-50*x), (overlay_set_position, "$g_presentation_obj_"+str(x+1+2*formation_arrays), pos4), (position_set_y, pos5, 663-50*x), (position_set_x, pos5, 250), (create_text_overlay, "$g_presentation_array_formation_"+str(x+1), s7, tf_center_justify), (overlay_set_position, "$g_presentation_array_formation_"+str(x+1), pos5), (overlay_set_size, "$g_presentation_array_formation_"+str(x+1), pos6), (position_set_x, pos5, 375), (create_text_overlay, "$g_presentation_array_movement_"+str(x+1), s7, tf_center_justify), (overlay_set_position, "$g_presentation_array_movement_"+str(x+1), pos5), (overlay_set_size, "$g_presentation_array_movement_"+str(x+1), pos6), (position_set_x, pos5, 500), (create_text_overlay, "$g_presentation_array_density_"+str(x+1), s7, tf_center_justify), (overlay_set_position, "$g_presentation_array_density_"+str(x+1), pos5), (overlay_set_size, "$g_presentation_array_density_"+str(x+1), pos6), (position_set_x, pos5, 600), (create_text_overlay, "$g_presentation_array_facing_"+str(x+1), s7, tf_center_justify), (overlay_set_position, "$g_presentation_array_facing_"+str(x+1), pos5), (overlay_set_size, "$g_presentation_array_facing_"+str(x+1), pos6), ] for x in range(0, formation_arrays) ])+[ (get_player_agent_no, ":player_agent"), (agent_get_team, ":player_team", ":player_agent"), (position_set_y, pos1, 700), (create_text_overlay, reg1, "@Battles", tf_center_justify), (position_set_x, pos1, 100), (overlay_set_position, reg1, pos1), (create_text_overlay, reg1, "@Formation", tf_center_justify), (position_set_x, pos1, 250), (overlay_set_position, reg1, pos1), (create_text_overlay, reg1, "@Action", tf_center_justify), (position_set_x, pos1, 375), (overlay_set_position, reg1, pos1), (create_text_overlay, reg1, "@Density", tf_center_justify), (position_set_x, pos1, 500), (overlay_set_position, reg1, pos1), (create_text_overlay, reg1, "@Facing", tf_center_justify), (position_set_x, pos1, 600), (overlay_set_position, reg1, pos1), (call_script, "script_update_formation_order_panel", ":player_team"), ]+concatenate_scripts([[(store_add, ":formation_pl", formation_commands_pl_begin, x), (str_store_string, s1, ":formation_pl"), (create_button_overlay, "$g_presentation_obj_"+str(x+1+3*formation_arrays), "@Form {s1}", tf_center_justify)]\ for x in range(0, formation_types) ])+[ (create_button_overlay, "$g_presentation_obj_"+str(x+1+3*formation_arrays+formation_types), formation_order_functions[x][0], tf_center_justify)\ for x in range(0, len(formation_order_functions)) ]+[ (position_set_x, pos1, 750), (position_set_y, pos1, 750), ]+[ (overlay_set_size, "$g_presentation_obj_"+str(x+1+3*formation_arrays), pos1)\ for x in range(0, formation_types) ]+[ (overlay_set_size, "$g_presentation_obj_"+str(x+1+3*formation_arrays+formation_types), pos1)\ for x in range(0, len(formation_order_functions)) ]+[ (position_set_x, pos1, 250), (position_set_y, pos1, 250), ]+concatenate_scripts([ [ (position_set_y, pos1, 250-20*x), (overlay_set_position, "$g_presentation_obj_"+str(x+1+3*formation_arrays), pos1), ] for x in range(0, formation_types) ])+[ (position_set_y, pos1, 250-20*formation_types), (overlay_set_position, "$g_presentation_obj_"+str(1+formation_types+3*formation_arrays), pos1), (position_set_x, pos1, 375), (position_set_y, pos1, 250), ]+concatenate_scripts([ [ (position_set_y, pos1, 250-20*x), (overlay_set_position, "$g_presentation_obj_"+str(x+2+formation_types+3*formation_arrays), pos1), ] for x in range(0, 10) ])+[ (position_set_x, pos1, 500), (position_set_y, pos1, 250), (overlay_set_position, "$g_presentation_obj_"+str(12+formation_types+3*formation_arrays), pos1), (position_set_y, pos1, 230), (overlay_set_position, "$g_presentation_obj_"+str(13+formation_types+3*formation_arrays), pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 250), (overlay_set_position, "$g_presentation_obj_"+str(14+formation_types+3*formation_arrays), pos1), (position_set_y, pos1, 230), (overlay_set_position, "$g_presentation_obj_"+str(15+formation_types+3*formation_arrays), pos1), (get_scene_boundaries, pos2, pos3), (position_transform_position_to_local, pos4, pos2, pos3), (set_fixed_point_multiplier, 1000), (position_get_x, ":map_width", pos4), (position_get_y, ":map_height", pos4), (set_fixed_point_multiplier, 1000), (store_div, ":map_ratio", ":map_height", 100), (store_div, ":map_ratio", ":map_width", ":map_ratio"), (try_begin), (gt, ":map_ratio", 100), (assign, "$g_battle_map_width", 300), (store_div, "$g_battle_map_scale", ":map_width", "$g_battle_map_width"), (store_div, "$g_battle_map_height", ":map_height", "$g_battle_map_scale"), (else_try), (assign, "$g_battle_map_height", 300), (store_div, "$g_battle_map_scale", ":map_height", "$g_battle_map_height"), (store_div, "$g_battle_map_width", ":map_width", "$g_battle_map_scale"), (try_end), (create_image_button_overlay, "$g_battle_map_plane", "mesh_white_plane", "mesh_white_plane"), (overlay_set_color, "$g_battle_map_plane", 0), (store_add, ":map_bordered_width", "$g_battle_map_width", 20), (store_add, ":map_bordered_height", "$g_battle_map_height", 20), (store_mul, ":map_scale_x", ":map_bordered_width", 50), (store_mul, ":map_scale_y", ":map_bordered_height", 50), (position_set_x, pos1, ":map_scale_x"), (position_set_y, pos1, ":map_scale_y"), (overlay_set_size, "$g_battle_map_plane", pos1), (store_sub, ":map_pos_x", 990, ":map_bordered_width"), (store_sub, ":map_pos_y", 740, ":map_bordered_height"), (position_set_x, pos1, ":map_pos_x"), (position_set_y, pos1, ":map_pos_y"), (overlay_set_position, "$g_battle_map_plane", pos1), (overlay_set_alpha, "$g_battle_map_plane", 0x44), (position_set_x, pos1, 750), (position_set_y, pos1, 750), ]+concatenate_scripts([ [ (create_text_overlay, "$g_battle_map_array_"+str(x+1)+"_flag", "@"+str(x+1), tf_center_justify), (overlay_set_alpha, "$g_battle_map_array_"+str(x+1)+"_flag", 0), (overlay_set_size, "$g_battle_map_array_"+str(x+1)+"_flag", pos1), (overlay_set_color, "$g_battle_map_array_"+str(x+1)+"_flag", 0xFFFFFF), ] for x in range(0, formation_arrays) ])+[ (call_script, "script_update_formation_order_panel_checked_arrays"), (call_script, "script_update_formation_order_panel_statistics_and_map"), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [(store_trigger_param_1, ":object"), (store_trigger_param_2, ":value"), (get_player_agent_no, ":player_agent"), (agent_get_team, ":player_team", ":player_agent"), (try_begin), ]+concatenate_scripts([ [ (eq, ":object", "$g_presentation_obj_"+str(x+1+formation_arrays)), #(assign, ":update_listeners", 1), (try_begin), (lt, x, "$formation_max_array_no"), (party_get_slot, ":mark", formation_vector, slot_formation_array_marks_begin+x), (val_mul, ":value", ":mark"), (val_or, "$formation_array_selected", ":mark"), (val_sub, "$formation_array_selected", ":mark"), (val_add, "$formation_array_selected", ":value"), (try_end), #(try_begin), # (eq, ":value", 1), # (overlay_animate_to_alpha, "$g_presentation_obj_"+str(x+1), 250, 0x44), #(else_try), # (overlay_animate_to_alpha, "$g_presentation_obj_"+str(x+1), 250, 0), #(try_end), (call_script, "script_update_formation_order_panel_checked_arrays"), (else_try), ] for x in range(0, formation_arrays) ])+concatenate_scripts([ [ (eq, ":object", "$g_presentation_obj_"+str(x+1)), (lt, x, "$formation_max_array_no"), (party_get_slot, ":mark", formation_vector, slot_formation_array_marks_begin+x), (assign, "$formation_array_selected", ":mark"), #]+[ #(overlay_animate_to_alpha, "$g_presentation_obj_"+str(y+1), 250, 0)\ # for y in range(0, formation_arrays) if x != y #]+[ #(overlay_animate_to_alpha, "$g_presentation_obj_"+str(x+1), 250, 0x44), #(overlay_set_val, "$g_presentation_obj_"+str(x+1+formation_arrays), 1), #]+[ #(overlay_set_val, "$g_presentation_obj_"+str(y+1+formation_arrays), 0)\ # for y in range(0, formation_arrays) if x != y #]+[ (call_script, "script_update_formation_order_panel_checked_arrays"), (else_try), ] for x in range(0, formation_arrays) ])+concatenate_scripts([ [ (eq, ":object", "$g_presentation_obj_"+str(x+1+formation_arrays*3)), (call_script, "script_apply_formation_key_reaction", x), (call_script, "script_update_formation_order_panel", ":player_team"), (else_try), ] for x in range(0, formation_types) ])+concatenate_scripts([ [ (eq, ":object", "$g_presentation_obj_"+str(x+1+formation_types+formation_arrays*3)), formation_order_functions[x][1], (call_script, "script_update_formation_order_panel", ":player_team"), (else_try), ] for x in range(0, len(formation_order_functions)) ])+[ (eq, ":object", "$g_battle_map_plane"), (get_scene_boundaries, pos2, pos3), (mouse_get_position, pos1), (set_fixed_point_multiplier, 1000), (position_get_x, ":mouse_x", pos1), (position_get_y, ":mouse_y", pos1), (store_sub, ":map_x", 980, "$g_battle_map_width"), (store_sub, ":map_y", 730, "$g_battle_map_height"), (val_sub, ":mouse_x", ":map_x"), (val_sub, ":mouse_y", ":map_y"), (val_clamp, ":mouse_x", 0, "$g_battle_map_width"), (val_clamp, ":mouse_y", 0, "$g_battle_map_height"), (val_mul, ":mouse_x", "$g_battle_map_scale"), (val_mul, ":mouse_y", "$g_battle_map_scale"), (set_fixed_point_multiplier, 1000), (position_set_x, pos1, ":mouse_x"), (position_set_y, pos1, ":mouse_y"), (position_transform_position_to_parent, pos3, pos2, pos1), (copy_position, pos1, pos3), (get_player_agent_no, ":player"), (agent_get_position, pos3, ":player"), (position_copy_rotation, pos1, pos3), (call_script, "script_formation_move_to_pos_key_reaction"), (call_script, "script_update_formation_order_flags_on_map"), (call_script, "script_update_formation_order_panel", ":player_team"), (try_end), ]), (ti_on_presentation_mouse_enter_leave, [(store_trigger_param_1, ":object"), (store_trigger_param_2, ":enter_leave"), (try_begin), ]+concatenate_scripts([ [ (eq, ":object", "$g_presentation_obj_"+str(x+1)), (try_begin), (eq, ":enter_leave", 0), (overlay_animate_to_color, "$g_presentation_array_formation_"+str(x+1), 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_array_movement_"+str(x+1), 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_array_density_"+str(x+1), 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_array_facing_"+str(x+1), 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_obj_"+str(x+1+formation_arrays*2), 250, 0xFFFFFF), (else_try), (overlay_animate_to_color, "$g_presentation_array_formation_"+str(x+1), 250, 0), (overlay_animate_to_color, "$g_presentation_array_movement_"+str(x+1), 250, 0), (overlay_animate_to_color, "$g_presentation_array_density_"+str(x+1), 250, 0), (overlay_animate_to_color, "$g_presentation_array_facing_"+str(x+1), 250, 0), (overlay_animate_to_color, "$g_presentation_obj_"+str(x+1+formation_arrays*2), 250, 0), (try_end), (else_try), ] for x in range(0, formation_arrays) ])+[ (try_end), ]), (ti_on_presentation_run, [(store_trigger_param_1, ":cur_time"), (try_begin), ]+[ (this_or_next|key_clicked, formation_keys_list[x]) \ for x in range(0, formation_arrays) ]+[ (eq, 0, 1), (call_script, "script_update_formation_order_panel_checked_arrays"), (try_end), (try_begin), ]+[ (this_or_next|key_clicked, formation_keys_list[x]) \ for x in range(formation_arrays, len(formation_keys_list)-1) ]+[ (eq, 0, 1), (get_player_agent_no, ":player_agent"), (agent_get_team, ":player_team", ":player_agent"), (call_script, "script_update_formation_order_panel", ":player_team"), (try_end), (try_begin), (gt, ":cur_time", 200), (key_clicked, "$key_formation_view_orders"), (assign, "$g_presentation_battle_formations_active", 0), (try_for_agents, ":cur_agent"), (agent_set_slot, ":cur_agent", slot_agent_map_overlay_id, 0), (try_end), (presentation_set_duration, 0), (try_end), (try_begin), (eq, "$formation_vector_active", 0), (assign, "$g_presentation_battle_formations_active", 0), (try_for_agents, ":cur_agent"), (agent_set_slot, ":cur_agent", slot_agent_map_overlay_id, 0), (try_end), (presentation_set_duration, 0), (try_end), ]), ]), # # Form Ranks Kit section end ############################## ]
Python
import types from header_game_menus import * from module_info import * from module_game_menus import * from module_parties import * from process_operations import * from process_common import * def save_parties(parties): file = open(export_dir + "parties.txt","w") file.write("partiesfile version 1\n") file.write("%d %d\n"%(len(parties), len(parties))) for i_party in xrange(len(parties)): party = parties[i_party] if (party[5] >= 0): add_tag_use(tag_uses,tag_faction,party[5]) file.write(" 1 %d %d "%(i_party, i_party)) # file.write(" 1 %d "%(i_party)) file.write("p_%s %s %d "%(convert_to_identifier(party[0]),replace_spaces(party[1]),party[2])) menu_no = 0 menu_param = party[3] if (type(menu_param) == types.StringType): menu_no = find_object(game_menus,menu_param) if (menu_no < 0): print "Error: Unable to find menu-id :" + menu_param else: menu_no = menu_param file.write("%d "%(menu_no)) file.write("%d %d %d %d %d "%(party[4], party[5], party[6], party[6],party[7])) ai_behavior_object = 0 ai_param = party[8] if (type(ai_param) == types.StringType): ai_behavior_object = find_object(parties,ai_param) if (ai_behavior_object < 0): print "Error: Unable to find party-id :" + ai_param else: ai_behavior_object = ai_param file.write("%d %d "%(ai_behavior_object,ai_behavior_object)) position = party[9] default_behavior_location = position file.write("%f %f "%(default_behavior_location[0],default_behavior_location[1])) file.write("%f %f "%(default_behavior_location[0],default_behavior_location[1])) file.write("%f %f 0.0 "%position) member_list = party[10] file.write("%d "%len(member_list)) for member in member_list: add_tag_use(tag_uses,tag_troop,member[0]) file.write("%d %d 0 %d "%(member[0],member[1],member[2])) bearing = 0.0 if (len(party) > 11): bearing = (3.1415926 / 180.0) * party[11] file.write("\n%f\n"%(bearing)) file.close() def save_python_header(parties): file = open("./ID_parties.py","w") for i_party in xrange(len(parties)): file.write("p_%s = %d\n"%(convert_to_identifier(parties[i_party][0]),i_party)) file.close() print "Exporting parties" tag_uses = load_tag_uses(export_dir) save_python_header(parties) save_parties(parties) save_tag_uses(export_dir, tag_uses) #print "Generating C header..." #save_c_header() #print "Generating Python header..." #print "Finished."
Python
from module_info import * from process_common import * from process_operations import * print "Checking global variable usages..." variable_uses = [] variables = load_variables(export_dir,variable_uses) i = 0 while (i < len(variables)): if (variable_uses[i] == 0): print "WARNING: Global variable never used: " + variables[i] i = i + 1
Python
from header_common import * from module_info import * from module_sounds import * def write_python_header(sounds): file = open("./ID_sounds.py","w") for i_sound in xrange(len(sounds)): file.write("snd_%s = %d\n"%(sounds[i_sound][0],i_sound)) file.write("\n\n") file.close() def write_sounds(sound_samples, sounds): ofile = open(export_dir + "sounds.txt","w") ofile.write("soundsfile version 2\n") ofile.write("%d\n"%len(sound_samples)) for sound_sample in sound_samples: ofile.write(" %s %d\n"%sound_sample) ofile.write("%d\n"%len(sounds)) for sound in sounds: ofile.write("snd_%s %d %d "%(sound[0], sound[1],len(sound[2]))) sample_list = sound[2] for s in sample_list: ofile.write("%d "%(s)) ofile.write("\n") ofile.close() def compile_sounds(sounds): all_sounds = [] for sound in sounds: sound_files = sound[2] sound_flags = sound[1] for i_sound_file in xrange(len(sound_files)): sound_file = sound_files[i_sound_file] sound_no = 0 found = 0 while (sound_no< (len(all_sounds))) and (not found): if all_sounds[sound_no][0] == sound_file: found = 1 else: sound_no += 1 if not found: all_sounds.append((sound_file,sound_flags)) sound_no = len(all_sounds) - 1 sound_files[i_sound_file] = sound_no return all_sounds print "Exporting sounds..." sound_samples = compile_sounds(sounds) write_sounds(sound_samples, sounds) write_python_header(sounds)
Python
mesh_pic_bandits = 0 mesh_pic_mb_warrior_1 = 1 mesh_pic_messenger = 2 mesh_pic_prisoner_man = 3 mesh_pic_prisoner_fem = 4 mesh_pic_prisoner_wilderness = 5 mesh_pic_siege_sighted = 6 mesh_pic_siege_sighted_fem = 7 mesh_pic_camp = 8 mesh_pic_payment = 9 mesh_pic_escape_1 = 10 mesh_pic_escape_1_fem = 11 mesh_pic_victory = 12 mesh_pic_defeat = 13 mesh_pic_wounded = 14 mesh_pic_wounded_fem = 15 mesh_pic_steppe_bandits = 16 mesh_pic_mountain_bandits = 17 mesh_pic_sea_raiders = 18 mesh_pic_deserters = 19 mesh_pic_forest_bandits = 20 mesh_pic_cattle = 21 mesh_pic_looted_village = 22 mesh_pic_village_p = 23 mesh_pic_village_s = 24 mesh_pic_village_w = 25 mesh_pic_recruits = 26 mesh_pic_arms_swadian = 27 mesh_pic_arms_vaegir = 28 mesh_pic_arms_khergit = 29 mesh_pic_arms_nord = 30 mesh_pic_arms_rhodok = 31 mesh_portrait_blend_out = 32 mesh_load_window = 33 mesh_checkbox_off = 34 mesh_checkbox_on = 35 mesh_white_plane = 36 mesh_white_dot = 37 mesh_player_dot = 38 mesh_flag_infantry = 39 mesh_flag_archers = 40 mesh_flag_cavalry = 41 mesh_color_picker = 42 mesh_custom_map_banner_01 = 43 mesh_custom_map_banner_02 = 44 mesh_custom_map_banner_03 = 45 mesh_custom_banner_01 = 46 mesh_custom_banner_02 = 47 mesh_custom_banner_bg = 48 mesh_custom_banner_fg01 = 49 mesh_custom_banner_fg02 = 50 mesh_custom_banner_fg03 = 51 mesh_custom_banner_fg04 = 52 mesh_custom_banner_fg05 = 53 mesh_custom_banner_fg06 = 54 mesh_custom_banner_fg07 = 55 mesh_custom_banner_fg08 = 56 mesh_custom_banner_fg09 = 57 mesh_custom_banner_fg10 = 58 mesh_custom_banner_fg11 = 59 mesh_custom_banner_fg12 = 60 mesh_custom_banner_fg13 = 61 mesh_custom_banner_fg14 = 62 mesh_custom_banner_fg15 = 63 mesh_custom_banner_fg16 = 64 mesh_custom_banner_fg17 = 65 mesh_custom_banner_fg18 = 66 mesh_custom_banner_fg19 = 67 mesh_custom_banner_fg20 = 68 mesh_custom_banner_fg21 = 69 mesh_custom_banner_fg22 = 70 mesh_custom_banner_fg23 = 71 mesh_custom_banner_charge_01 = 72 mesh_custom_banner_charge_02 = 73 mesh_custom_banner_charge_03 = 74 mesh_custom_banner_charge_04 = 75 mesh_custom_banner_charge_05 = 76 mesh_custom_banner_charge_06 = 77 mesh_custom_banner_charge_07 = 78 mesh_custom_banner_charge_08 = 79 mesh_custom_banner_charge_09 = 80 mesh_custom_banner_charge_10 = 81 mesh_custom_banner_charge_11 = 82 mesh_custom_banner_charge_12 = 83 mesh_custom_banner_charge_13 = 84 mesh_custom_banner_charge_14 = 85 mesh_custom_banner_charge_15 = 86 mesh_custom_banner_charge_16 = 87 mesh_custom_banner_charge_17 = 88 mesh_custom_banner_charge_18 = 89 mesh_custom_banner_charge_19 = 90 mesh_custom_banner_charge_20 = 91 mesh_custom_banner_charge_21 = 92 mesh_custom_banner_charge_22 = 93 mesh_custom_banner_charge_23 = 94 mesh_custom_banner_charge_24 = 95 mesh_custom_banner_charge_25 = 96 mesh_custom_banner_charge_26 = 97 mesh_custom_banner_charge_27 = 98 mesh_custom_banner_charge_28 = 99 mesh_custom_banner_charge_29 = 100 mesh_custom_banner_charge_30 = 101 mesh_custom_banner_charge_31 = 102 mesh_custom_banner_charge_32 = 103 mesh_custom_banner_charge_33 = 104 mesh_custom_banner_charge_34 = 105 mesh_custom_banner_charge_35 = 106 mesh_custom_banner_charge_36 = 107 mesh_custom_banner_charge_37 = 108 mesh_custom_banner_charge_38 = 109 mesh_custom_banner_charge_39 = 110 mesh_custom_banner_charge_40 = 111 mesh_custom_banner_charge_41 = 112 mesh_custom_banner_charge_42 = 113 mesh_custom_banner_charge_43 = 114 mesh_custom_banner_charge_44 = 115 mesh_custom_banner_charge_45 = 116 mesh_custom_banner_charge_46 = 117 mesh_tableau_mesh_custom_banner = 118 mesh_tableau_mesh_custom_banner_square = 119 mesh_tableau_mesh_custom_banner_tall = 120 mesh_tableau_mesh_custom_banner_short = 121 mesh_tableau_mesh_shield_round_1 = 122 mesh_tableau_mesh_shield_round_2 = 123 mesh_tableau_mesh_shield_round_3 = 124 mesh_tableau_mesh_shield_round_4 = 125 mesh_tableau_mesh_shield_round_5 = 126 mesh_tableau_mesh_shield_small_round_1 = 127 mesh_tableau_mesh_shield_small_round_2 = 128 mesh_tableau_mesh_shield_small_round_3 = 129 mesh_tableau_mesh_shield_kite_1 = 130 mesh_tableau_mesh_shield_kite_2 = 131 mesh_tableau_mesh_shield_kite_3 = 132 mesh_tableau_mesh_shield_kite_4 = 133 mesh_tableau_mesh_shield_heater_1 = 134 mesh_tableau_mesh_shield_heater_2 = 135 mesh_tableau_mesh_shield_pavise_1 = 136 mesh_tableau_mesh_shield_pavise_2 = 137 mesh_heraldic_armor_bg = 138 mesh_tableau_mesh_heraldic_armor_a = 139 mesh_tableau_mesh_heraldic_armor_b = 140 mesh_tableau_mesh_heraldic_armor_c = 141 mesh_tableau_mesh_heraldic_armor_d = 142 mesh_outer_terrain_plain_1 = 143 mesh_banner_a01 = 144 mesh_banner_a02 = 145 mesh_banner_a03 = 146 mesh_banner_a04 = 147 mesh_banner_a05 = 148 mesh_banner_a06 = 149 mesh_banner_a07 = 150 mesh_banner_a08 = 151 mesh_banner_a09 = 152 mesh_banner_a10 = 153 mesh_banner_a11 = 154 mesh_banner_a12 = 155 mesh_banner_a13 = 156 mesh_banner_a14 = 157 mesh_banner_a15 = 158 mesh_banner_a16 = 159 mesh_banner_a17 = 160 mesh_banner_a18 = 161 mesh_banner_a19 = 162 mesh_banner_a20 = 163 mesh_banner_a21 = 164 mesh_banner_b01 = 165 mesh_banner_b02 = 166 mesh_banner_b03 = 167 mesh_banner_b04 = 168 mesh_banner_b05 = 169 mesh_banner_b06 = 170 mesh_banner_b07 = 171 mesh_banner_b08 = 172 mesh_banner_b09 = 173 mesh_banner_b10 = 174 mesh_banner_b11 = 175 mesh_banner_b12 = 176 mesh_banner_b13 = 177 mesh_banner_b14 = 178 mesh_banner_b15 = 179 mesh_banner_b16 = 180 mesh_banner_b17 = 181 mesh_banner_b18 = 182 mesh_banner_b19 = 183 mesh_banner_b20 = 184 mesh_banner_b21 = 185 mesh_banner_c01 = 186 mesh_banner_c02 = 187 mesh_banner_c03 = 188 mesh_banner_c04 = 189 mesh_banner_c05 = 190 mesh_banner_c06 = 191 mesh_banner_c07 = 192 mesh_banner_c08 = 193 mesh_banner_c09 = 194 mesh_banner_c10 = 195 mesh_banner_c11 = 196 mesh_banner_c12 = 197 mesh_banner_c13 = 198 mesh_banner_c14 = 199 mesh_banner_c15 = 200 mesh_banner_c16 = 201 mesh_banner_c17 = 202 mesh_banner_c18 = 203 mesh_banner_c19 = 204 mesh_banner_c20 = 205 mesh_banner_c21 = 206 mesh_banner_d01 = 207 mesh_banner_d02 = 208 mesh_banner_d03 = 209 mesh_banner_d04 = 210 mesh_banner_d05 = 211 mesh_banner_d06 = 212 mesh_banner_d07 = 213 mesh_banner_d08 = 214 mesh_banner_d09 = 215 mesh_banner_d10 = 216 mesh_banner_d11 = 217 mesh_banner_d12 = 218 mesh_banner_d13 = 219 mesh_banner_d14 = 220 mesh_banner_d15 = 221 mesh_banner_d16 = 222 mesh_banner_d17 = 223 mesh_banner_d18 = 224 mesh_banner_d19 = 225 mesh_banner_d20 = 226 mesh_banner_d21 = 227 mesh_banner_e01 = 228 mesh_banner_e02 = 229 mesh_banner_e03 = 230 mesh_banner_e04 = 231 mesh_banner_e05 = 232 mesh_banner_e06 = 233 mesh_banner_e07 = 234 mesh_banner_e08 = 235 mesh_banner_e09 = 236 mesh_banner_e10 = 237 mesh_banner_e11 = 238 mesh_banner_e12 = 239 mesh_banner_e13 = 240 mesh_banner_e14 = 241 mesh_banner_e15 = 242 mesh_banner_e16 = 243 mesh_banner_e17 = 244 mesh_banner_e18 = 245 mesh_banner_e19 = 246 mesh_banner_e20 = 247 mesh_banner_e21 = 248 mesh_banner_f01 = 249 mesh_banner_f02 = 250 mesh_banner_f03 = 251 mesh_banner_f04 = 252 mesh_banner_f05 = 253 mesh_banner_f06 = 254 mesh_banner_f07 = 255 mesh_banner_f08 = 256 mesh_banner_f09 = 257 mesh_banner_f10 = 258 mesh_banner_f11 = 259 mesh_banner_f12 = 260 mesh_banner_f13 = 261 mesh_banner_f14 = 262 mesh_banner_f15 = 263 mesh_banner_f16 = 264 mesh_banner_f17 = 265 mesh_banner_f18 = 266 mesh_banner_f19 = 267 mesh_banner_f20 = 268 mesh_banner_f21 = 269 mesh_arms_a01 = 270 mesh_arms_a02 = 271 mesh_arms_a03 = 272 mesh_arms_a04 = 273 mesh_arms_a05 = 274 mesh_arms_a06 = 275 mesh_arms_a07 = 276 mesh_arms_a08 = 277 mesh_arms_a09 = 278 mesh_arms_a10 = 279 mesh_arms_a11 = 280 mesh_arms_a12 = 281 mesh_arms_a13 = 282 mesh_arms_a14 = 283 mesh_arms_a15 = 284 mesh_arms_a16 = 285 mesh_arms_a17 = 286 mesh_arms_a18 = 287 mesh_arms_a19 = 288 mesh_arms_a20 = 289 mesh_arms_a21 = 290 mesh_arms_b01 = 291 mesh_arms_b02 = 292 mesh_arms_b03 = 293 mesh_arms_b04 = 294 mesh_arms_b05 = 295 mesh_arms_b06 = 296 mesh_arms_b07 = 297 mesh_arms_b08 = 298 mesh_arms_b09 = 299 mesh_arms_b10 = 300 mesh_arms_b11 = 301 mesh_arms_b12 = 302 mesh_arms_b13 = 303 mesh_arms_b14 = 304 mesh_arms_b15 = 305 mesh_arms_b16 = 306 mesh_arms_b17 = 307 mesh_arms_b18 = 308 mesh_arms_b19 = 309 mesh_arms_b20 = 310 mesh_arms_b21 = 311 mesh_arms_c01 = 312 mesh_arms_c02 = 313 mesh_arms_c03 = 314 mesh_arms_c04 = 315 mesh_arms_c05 = 316 mesh_arms_c06 = 317 mesh_arms_c07 = 318 mesh_arms_c08 = 319 mesh_arms_c09 = 320 mesh_arms_c10 = 321 mesh_arms_c11 = 322 mesh_arms_c12 = 323 mesh_arms_c13 = 324 mesh_arms_c14 = 325 mesh_arms_c15 = 326 mesh_arms_c16 = 327 mesh_arms_c17 = 328 mesh_arms_c18 = 329 mesh_arms_c19 = 330 mesh_arms_c20 = 331 mesh_arms_c21 = 332 mesh_arms_d01 = 333 mesh_arms_d02 = 334 mesh_arms_d03 = 335 mesh_arms_d04 = 336 mesh_arms_d05 = 337 mesh_arms_d06 = 338 mesh_arms_d07 = 339 mesh_arms_d08 = 340 mesh_arms_d09 = 341 mesh_arms_d10 = 342 mesh_arms_d11 = 343 mesh_arms_d12 = 344 mesh_arms_d13 = 345 mesh_arms_d14 = 346 mesh_arms_d15 = 347 mesh_arms_d16 = 348 mesh_arms_d17 = 349 mesh_arms_d18 = 350 mesh_arms_d19 = 351 mesh_arms_d20 = 352 mesh_arms_d21 = 353 mesh_arms_e01 = 354 mesh_arms_e02 = 355 mesh_arms_e03 = 356 mesh_arms_e04 = 357 mesh_arms_e05 = 358 mesh_arms_e06 = 359 mesh_arms_e07 = 360 mesh_arms_e08 = 361 mesh_arms_e09 = 362 mesh_arms_e10 = 363 mesh_arms_e11 = 364 mesh_arms_e12 = 365 mesh_arms_e13 = 366 mesh_arms_e14 = 367 mesh_arms_e15 = 368 mesh_arms_e16 = 369 mesh_arms_e17 = 370 mesh_arms_e18 = 371 mesh_arms_e19 = 372 mesh_arms_e20 = 373 mesh_arms_e21 = 374 mesh_arms_f01 = 375 mesh_arms_f02 = 376 mesh_arms_f03 = 377 mesh_arms_f04 = 378 mesh_arms_f05 = 379 mesh_arms_f06 = 380 mesh_arms_f07 = 381 mesh_arms_f08 = 382 mesh_arms_f09 = 383 mesh_arms_f10 = 384 mesh_arms_f11 = 385 mesh_arms_f12 = 386 mesh_arms_f13 = 387 mesh_arms_f14 = 388 mesh_arms_f15 = 389 mesh_arms_f16 = 390 mesh_arms_f17 = 391 mesh_arms_f18 = 392 mesh_arms_f19 = 393 mesh_arms_f20 = 394 mesh_arms_f21 = 395 mesh_banners_default_a = 396 mesh_banners_default_b = 397 mesh_banners_default_c = 398 mesh_banners_default_d = 399 mesh_banners_default_e = 400
Python
arf_blend_in_0 = 0x00000001 arf_blend_in_1 = 0x00000002 arf_blend_in_2 = 0x00000003 arf_blend_in_3 = 0x00000004 arf_blend_in_4 = 0x00000005 arf_blend_in_5 = 0x00000006 arf_blend_in_6 = 0x00000007 arf_blend_in_7 = 0x00000008 arf_blend_in_8 = 0x00000009 arf_blend_in_9 = 0x0000000a arf_blend_in_10 = 0x0000000b arf_blend_in_11 = 0x0000000c arf_blend_in_12 = 0x0000000d arf_blend_in_13 = 0x0000000e arf_blend_in_14 = 0x0000000f arf_blend_in_15 = 0x00000010 arf_blend_in_16 = 0x00000011 arf_blend_in_17 = 0x00000012 arf_blend_in_18 = 0x00000013 arf_blend_in_19 = 0x00000014 arf_blend_in_20 = 0x00000015 arf_blend_in_21 = 0x00000016 arf_blend_in_22 = 0x00000017 arf_blend_in_23 = 0x00000018 arf_blend_in_24 = 0x00000019 arf_blend_in_25 = 0x0000001a arf_blend_in_26 = 0x0000001b arf_blend_in_27 = 0x0000001c arf_blend_in_28 = 0x0000001d arf_blend_in_29 = 0x0000001e arf_blend_in_30 = 0x0000001f arf_blend_in_31 = 0x00000020 arf_blend_in_32 = 0x00000021 arf_blend_in_48 = 0x00000031 arf_blend_in_64 = 0x00000041 arf_blend_in_128 = 0x00000081 arf_blend_in_254 = 0x000000ff arf_make_walk_sound = 0x00000100 arf_make_custom_sound = 0x00000200 ##arf_start_pos_0 = 0x00000100 ##arf_end_pos_0 = 0x00000200 ##arf_start_pos_0_25 = 0x00000400 ##arf_end_pos_0_25 = 0x00000800 ##arf_start_pos_0_5 = 0x00001000 ##arf_end_pos_0_5 = 0x00002000 ##arf_start_pos_0_75 = 0x00004000 ##arf_end_pos_0_75 = 0x00008000 ##arf_loop_pos_0 = arf_start_pos_0 | arf_end_pos_0 ##arf_loop_pos_0_25 = arf_start_pos_0_25 | arf_end_pos_0_25 ##arf_loop_pos_0_5 = arf_start_pos_0_5 | arf_end_pos_0_5 ##arf_loop_pos_0_75 = arf_start_pos_0_75 | arf_end_pos_0_75 ##arf_phase_even = 0x00010000 ##arf_phase_odd = 0x00030000 ##arf_phase_inverse_even = 0x00050000 ##arf_phase_inverse_odd = 0x00070000 arf_two_handed_blade = 0x01000000 arf_lancer = 0x02000000 arf_cyclic = 0x10000000 arf_use_walk_progress = 0x20000000 arf_use_stand_progress = 0x40000000 arf_use_inv_walk_progress = 0x80000000 ##arf_walk = arf_phase_even | arf_cyclic #----------------------------------------- acf_synch_with_horse = 0x00000001 acf_align_with_ground = 0x00000002 acf_enforce_lowerbody = 0x00000100 acf_enforce_rightside = 0x00000200 acf_enforce_all = 0x00000400 acf_parallels_for_look_slope = 0x00001000 acf_rotate_body = 0x00002000 acf_displace_position = 0x00004000 acf_ignore_slope = 0x00008000 acf_thrust = 0x00010000 acf_right_cut = 0x00020000 acf_left_cut = 0x00040000 acf_overswing = 0x00080000 acf_lock_camera = 0x00100000 acf_anim_length_mask = 0xff000000 acf_anim_length_bits = 24 def acf_anim_length(x): return (x << acf_anim_length_bits) & acf_anim_length_mask #------------------------------------------ #### Do not edit these lines def get_byte(f): if f == 0.0: return 0 i = int(f * 255.0) if (i< 1): i=1 elif (i > 255): i = 255 return i def pack2f(a,b): ai = get_byte(a) bi = get_byte(b) return ((bi << 8) | ai) def pack4f(a,b,c,d): ai = get_byte(a) bi = get_byte(b) ci = get_byte(c) di = get_byte(d) return ((di << 24) | (ci << 16) | (bi << 8) | ai)
Python
from header_common import * from header_parties import * from ID_troops import * from ID_factions import * from ID_party_templates import * from ID_map_icons import * #################################################################################################################### # Each party record contains the following fields: # 1) Party id: used for referencing parties in other files. # The prefix p_ is automatically added before each party id. # 2) Party name. # 3) Party flags. See header_parties.py for a list of available flags # 4) Menu. ID of the menu to use when this party is met. The value 0 uses the default party encounter system. # 5) Party-template. ID of the party template this party belongs to. Use pt_none as the default value. # 6) Faction. # 7) Personality. See header_parties.py for an explanation of personality flags. # 8) Ai-behavior # 9) Ai-target party # 10) Initial coordinates. # 11) List of stacks. Each stack record is a triple that contains the following fields: # 11.1) Troop-id. # 11.2) Number of troops in this stack. # 11.3) Member flags. Use pmf_is_prisoner to note that this member is a prisoner. # 12) Party direction in degrees [optional] #################################################################################################################### no_menu = 0 #pf_town = pf_is_static|pf_always_visible|pf_hide_defenders|pf_show_faction pf_town = pf_is_static|pf_always_visible|pf_show_faction|pf_label_large pf_castle = pf_is_static|pf_always_visible|pf_show_faction|pf_label_medium pf_village = pf_is_static|pf_always_visible|pf_hide_defenders|pf_label_small #sample_party = [(trp_swadian_knight,1,0), (trp_swadian_peasant,10,0), (trp_swadian_crossbowman,1,0), (trp_swadian_man_at_arms, 1, 0), (trp_swadian_footman, 1, 0), (trp_swadian_militia,1,0)] # NEW TOWNS: # NORMANDY: Rouen, Caen, Bayeux, Coutances, Evreux, Avranches # Brittany: Rennes, Nantes, # Maine: Le Mans # Anjou: Angers parties = [ ("main_party","Main Party",icon_player|pf_limit_members, no_menu, pt_none,fac_player_faction,0,ai_bhvr_hold,0,(17, 52.5),[(trp_player,1,0)]), ("temp_party","temp_party",pf_disabled, no_menu, pt_none, fac_commoners,0,ai_bhvr_hold,0,(0,0),[]), ("camp_bandits","camp_bandits",pf_disabled, no_menu, pt_none, fac_outlaws,0,ai_bhvr_hold,0,(1,1),[(trp_unarmed_troop,3,0)]), #parties before this point are hardwired. Their order should not be changed. ("temp_party_2","temp_party_2",pf_disabled, no_menu, pt_none, fac_commoners,0,ai_bhvr_hold,0,(0,0),[]), #Used for calculating casulties. ("temp_casualties","casualties",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(1,1),[]), ("temp_casualties_2","casualties",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(1,1),[]), ("temp_casualties_3","casualties",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(1,1),[]), ("temp_wounded","enemies_wounded",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(1,1),[]), ("temp_killed", "enemies_killed", pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(1,1),[]), ("main_party_backup","_", pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(1,1),[]), ("encountered_party_backup","_", pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(1,1),[]), # ("ally_party_backup","_", pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(1,1),[]), ("collective_friends_backup","_", pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(1,1),[]), ("player_casualties","_", pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(1,1),[]), ("enemy_casualties","_", pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(1,1),[]), ("ally_casualties","_", pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(1,1),[]), ("collective_enemy","collective_enemy",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(1,1),[]), #TODO: remove this and move all to collective ally ("collective_ally","collective_ally",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(1,1),[]), ("collective_friends","collective_ally",pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(1,1),[]), # ("village_reinforcements","village_reinforcements",pf_is_static|pf_disabled, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(1,1),[]), ############################################################### ####################### # Formation vector #("formation_vector", "_", pf_disabled, no_menu, pt_none, fac_neutral, 0, ai_bhvr_hold, 0, (1, 1), []), #("formation_temp_vector", "_", pf_disabled, no_menu, pt_none, fac_neutral, 0, ai_bhvr_hold, 0, (1, 1), []), # Formation vector End ####################### ("zendar","Zendar",pf_disabled|icon_town|pf_is_static|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(18,60),[]), ("town_1","Sargoth", icon_town|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-1.55, 66.45),[], 170), ("town_2","Tihr", icon_town|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-48.9, 92.6),[], 120), ("town_3","Veluca", icon_town|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-55,-57),[], 80), ("town_4","Suno", icon_town|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-23, 33.5),[], 290), ("town_5","Jelkala", icon_town|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-41, -20.35),[], 90), ("town_6","Praven", icon_town|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-6.7, -15.6),[], 155), ("town_7","Uxkhal", icon_town|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(13.8, -41.2),[], 240), ("town_8","Reyvadin", icon_town|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(52.5, 53.5),[], 175), ("town_9","Khudan", icon_town_snow|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(89, 40.5),[], 90), ("town_10","Tulga", icon_town_steppe|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(70, -67.75),[], 310), ("town_11","Curaw", icon_town_snow|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(83 , 0.7),[], 150), ("town_12","Wercheg", icon_town|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(43, 84.5),[], 25), ("town_13","Rivacheg",icon_town|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(73.7, 74.2),[], 60), ("town_14","Halmar", icon_town_steppe|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(28, -80),[], 135), ("town_15","Yalen", icon_town|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-64.1, 16.5),[], 135), ("town_16","Dhirim", icon_town|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(20.7, 18.6),[], 135), ("town_17","Ichamur", icon_town_steppe|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(51, -48),[], 135), ("town_18","Narra", icon_town_steppe|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-22.6, -82),[], 135), # Aztaq_Castle # Malabadi_Castle ("castle_1","Culmarr_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-69.2, 31.3),[],50), ("castle_2","Malayurg_Castle",icon_castle_b|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(33.6, -45.6),[],75), ("castle_3","Bulugha_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(67, 75),[],100), ("castle_4","Radoghir_Castle",icon_castle_c|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(91.5, 85.3),[],180), ("castle_5","Tehlrog_Castle",icon_castle_c|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-19.7, 50.1),[],90), ("castle_6","Tilbaut_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(23.3, 57.3),[],55), ("castle_7","Sungetche_Castle",icon_castle_snow_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(62, -28.5),[],45), ("castle_8","Jeirbe_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(33.5, 39.6),[],30), ("castle_9","Jamiche_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-46, -68.3),[],100), ("castle_10","Alburq_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(57, 81.5),[],110), ("castle_11","Curin_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-50.30, 81.36),[],75), ("castle_12","Chalbek_Castle",icon_castle_b|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-78.7, 89.5),[],95), ("castle_13","Kelredan_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-5, 36),[],115), ("castle_14","Maras_Castle",icon_castle_c|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-74.8, -34.25 ),[],90), ("castle_15","Ergellon_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-54.5, -15),[],235), ("castle_16","Almerra_Castle",icon_castle_c|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-34.7, -22.6),[],45), ("castle_17","Distar_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-27.65 , -68.3),[],15), ("castle_18","Ismirala_Castle",icon_castle_snow_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(64.7, -3),[],300), ("castle_19","Yruma_Castle",icon_castle_snow_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(71, 44),[],280), ("castle_20","Derchios_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(18.20, 28.82),[],260), ("castle_21","Ibdeles_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-56.8, 4.1),[],260), ("castle_22","Unuzdaq_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(2, -59.25),[],260), ("castle_23","Tevarin_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(7.75, -48),[],80), ("castle_24","Reindi_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-18.5, -18.3),[],260), ("castle_25","Ryibelet_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-41.7, 32.1),[],260), ("castle_26","Senuzgda_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-23.7, -5.4),[],260), ("castle_27","Rindyar_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(47.6, -3.5),[],260), ("castle_28","Grunwalder_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-22.75, -31.2),[],260), ("castle_29","Nelag_Castle",icon_castle_snow_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(96, 28),[],280), ("castle_30","Asugan_Castle",icon_castle_d|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(90, -62),[],260), ("castle_31","Vyincourd_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(46.3, 20),[],260), ("castle_32","Knudarr_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(5.5, 58),[],260), ("castle_33","Etrosq_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-51.8, 17.5),[],80), ("castle_34","Hrus_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-31, 69),[],260), ("castle_35","Haringoth_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(7, 4),[],260), ("castle_36","Jelbegi_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-47, 59),[],260), ("castle_37","Dramug_Castle",icon_castle_c|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(57, 50),[],260), ("castle_38","Tulbuk_Castle",icon_castle_d|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(18, -94),[],260), ("castle_39","Slezkh_Castle",icon_castle_snow_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(89.4, 66.4),[],280), ("castle_40","Uhhun_Castle",icon_castle_d|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(50.8, -75),[],260), # Rinimad # Rietal Derchios Gerdus # Tuavus Pamir vezona ("village_1", "Yaragar", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-15,0),[], 100), ("village_2", "Burglen", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(12,-20),[], 110), ("village_3", "Azgad", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(24,-3),[], 120), ("village_4", "Nomar", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-7.4,31.2),[], 130), ("village_5", "Kulum", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(16, 73.5),[], 170), ("village_6", "Emirin", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-13,-25),[], 100), ("village_7", "Amere", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(20.8, -30.7),[], 110), ("village_8", "Haen", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-49.7, 74),[], 120), ("village_9", "Buvran", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-43,-11),[], 130), ("village_10","Mechin", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(21, 50.2),[], 170), ("village_11","Dusturil", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(32.9, -74),[], 100), ("village_12","Emer", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-45.8, -58.5),[], 110), ("village_13","Nemeja", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(25.1, 7.35),[], 120), ("village_14","Sumbuja", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(40,52),[], 130), ("village_15","Ryibelet", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-37.65,31.9),[], 170), ("village_16","Shapeshte", icon_village_snow_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(103, 80),[], 170), ("village_17","Mazen", icon_village_snow_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(80.1, 59),[], 35), ("village_18","Ulburban", icon_village_snow_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(73.7, 30.1),[], 170), ("village_19","Hanun", icon_village_snow_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(93.8 , 31),[], 170), ("village_20","Uslum", icon_village_snow_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(78, 14),[], 170), ("village_21","Bazeck", icon_village_snow_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(99 , 4),[], 100), ("village_22","Shulus", icon_village_snow_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(93, -13.5),[], 110), ("village_23","Ilvia", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-50, -42),[], 120), ("village_24","Ruldi", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-62.5, -68.2),[], 130), ("village_25","Dashbigha", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-14.6, -60),[], 170), ("village_26","Pagundur", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-68,-28),[], 170), ("village_27","Glunmar", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-77.2 , 16),[], 170), ("village_28","Tash_Kulun", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(33.8, -50.8),[], 170), ("village_29","Buillin", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-77.5,70.5),[], 170), ("village_30","Ruvar", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(51, 76),[], 170), ("village_31","Ambean", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-24, 53),[], 100), ("village_32","Tosdhar", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0.5, -23.4),[], 110), ("village_33","Ruluns", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-10, 42),[], 120), ("village_34","Ehlerdah", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-28, 1),[], 130), ("village_35","Fearichen", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0, 90),[], 170), ("village_36","Jayek", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(36, 85),[], 170), ("village_37","Ada_Kulun", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-6.5, -88),[], 170), ("village_38","Ibiran", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(13, 22),[], 170), ("village_39","Reveran", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-49, 10),[], 170), ("village_40","Saren", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-24.22, -34.4),[], 170), ("village_41","Dugan", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(95.7, -81.5),[], 100), ("village_42","Dirigh_Aban", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(59.35, -64),[], 110), ("village_43","Zagush", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(36, -89.3),[], 120), ("village_44","Peshmi", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(86, -58.5),[], 130), ("village_45","Bulugur", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-24.8 , -71),[], 170), ("village_46","Fedner", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-73.18, -59.7),[], 170), ("village_47","Epeshe", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-96, 45),[], 170), ("village_48","Veidar", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-88.1, -15),[], 170), ("village_49","Tismirr", icon_village_snow_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(68.7, -23.6),[], 10), ("village_50","Karindi", icon_village_snow_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(75.5, 45),[], 170), ("village_51","Jelbegi", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-50, 60.2),[], 100), ("village_52","Amashke", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(59.1, -47.8),[], 110), ("village_53","Balanli", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(49, 7),[], 120), ("village_54","Chide", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(46.5, -7.3),[], 130), ("village_55","Tadsamesh", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(32.6, 31.3),[], 170), ("village_56","Fenada", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-59.1, 93.3),[], 170), ("village_57","Ushkuru", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(33, 11.5),[], 170), ("village_58","Vezin", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(62, 41),[], 170), ("village_59","Dumar", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-53 , 20),[], 170), ("village_60","Tahlberl", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(8.8, 0.5),[], 170), ("village_61","Aldelen", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-89.3, 86),[], 100), ("village_62","Rebache", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(38.4, 64.6),[], 100), ("village_63","Rduna", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(42.5, 21.46),[], 100), ("village_64","Serindiar", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-41.5, -35.8),[], 100), ("village_65","Iyindah", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(8.6, -39.5),[], 100), ("village_66","Fisdnar", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(69.6, 78.3),[], 100), ("village_67","Tebandra", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(99.9, 91.8),[], 100), ("village_68","Ibdeles", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-61, 2.45),[], 100), ("village_69","Kwynn", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-15.3, 75.4),[], 100), ("village_70","Dirigsene", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-73, -17.7),[], 100), ("village_71","Tshibtin", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0, -34),[], 20), ("village_72","Elberl", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-35.2, 21),[], 60), ("village_73","Chaeza", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-63.2, -51.4),[], 55), ("village_74","Ayyike", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(49, 31),[], 15), ("village_75","Bhulaban", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(95 , 50),[], 10), ("village_76","Kedelke", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(0.6, -65.50),[], 35), ("village_77","Rizi", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-33.6, 73.3),[], 160), ("village_78","Sarimish", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-30.5, -14.3),[], 180), ("village_79","Istiniar", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-72.6, 34.1),[], 0), ("village_80","Vayejeg", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-1.5, 56),[], 40), ("village_81","Odasan", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-25, 81.6),[], 20), ("village_82","Yalibe", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-49.7, 43.1),[], 60), ("village_83","Gisim", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-78.1, 62),[], 55), ("village_84","Chelez", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-85.7, 34.5),[], 15), ("village_85","Ismirala", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(69.2, -0.4),[], 10), ("village_86","Slezkh", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(89.8, 61.5),[], 35), ("village_87","Udiniad", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(31.6, 73),[], 160), ("village_88","Tulbuk", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(21.1, -98.1),[], 180), ("village_89","Uhhun", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(50.2, -71.5),[], 0), ("village_90","Jamiche", icon_village_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-48.7, -71.5),[], 40), ("salt_mine","Salt_Mine",icon_village_a|pf_disabled|pf_is_static|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(14.2, -31),[]), ("four_ways_inn","Four_Ways_Inn",icon_village_a|pf_disabled|pf_is_static|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(4.8, -39.6),[]), ("test_scene","test_scene",icon_village_a|pf_disabled|pf_is_static|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(10.8, -19.6),[]), ("battlefields","battlefields",pf_disabled|icon_village_a|pf_is_static|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(10.8, -16.6),[]), ("dhorak_keep","Dhorak_Keep",icon_town|pf_disabled|pf_is_static|pf_always_visible|pf_no_label|pf_hide_defenders, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-50,-58),[]), ("training_ground","Training Ground", pf_disabled|icon_training_ground|pf_hide_defenders|pf_is_static|pf_always_visible, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(3, -7),[]), ("training_ground_1", "Training Field", icon_training_ground|icon_training_ground|pf_hide_defenders|pf_is_static|pf_always_visible|pf_label_medium, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(44,61),[], 100), ("training_ground_2", "Training Field", icon_training_ground|icon_training_ground|pf_hide_defenders|pf_is_static|pf_always_visible|pf_label_medium, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-38, 81.7),[], 100), ("training_ground_3", "Training Field", icon_training_ground|icon_training_ground|pf_hide_defenders|pf_is_static|pf_always_visible|pf_label_medium, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(89.2, 16),[], 100), ("training_ground_4", "Training Field", icon_training_ground|icon_training_ground|pf_hide_defenders|pf_is_static|pf_always_visible|pf_label_medium, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(9.5 , -80.5),[], 100), ("training_ground_5", "Training Field", icon_training_ground|icon_training_ground|pf_hide_defenders|pf_is_static|pf_always_visible|pf_label_medium, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-34.75, -30.3),[], 100), # bridge_a ("Bridge_1","1",icon_bridge_a|pf_is_static|pf_always_visible|pf_no_label, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(11.56, 59.89),[], 90), ("Bridge_2","2",icon_bridge_a|pf_is_static|pf_always_visible|pf_no_label, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(2.14, 34.13),[], 64), ("Bridge_3","3",icon_bridge_a|pf_is_static|pf_always_visible|pf_no_label, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-66.92, 72.98),[], 10), ("Bridge_4","4",icon_bridge_a|pf_is_static|pf_always_visible|pf_no_label, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-76.94, 67.25),[], 90), ("Bridge_5","5",icon_bridge_a|pf_is_static|pf_always_visible|pf_no_label, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(82.16, 79.18),[], 135), ("Bridge_6","6",icon_bridge_snow_a|pf_is_static|pf_always_visible|pf_no_label, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(85.60, 64.32),[], 120), ("Bridge_7","7",icon_bridge_snow_a|pf_is_static|pf_always_visible|pf_no_label, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(82.47, 43.28),[], 75), ("Bridge_8","8",icon_bridge_snow_a|pf_is_static|pf_always_visible|pf_no_label, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(79.46, 21.19),[], 55), ("Bridge_9","9",icon_bridge_a|pf_is_static|pf_always_visible|pf_no_label, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(62.13, 48.21),[], 60), ("Bridge_10","10",icon_bridge_a|pf_is_static|pf_always_visible|pf_no_label, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(71.05, 54.55),[], 35), ("Bridge_11","11",icon_bridge_a|pf_is_static|pf_always_visible|pf_no_label, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-54.85, -41.40),[], 90), ("Bridge_12","12",icon_bridge_b|pf_is_static|pf_always_visible|pf_no_label, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(12.17, 79.57),[], 135), ("Bridge_13","13",icon_bridge_b|pf_is_static|pf_always_visible|pf_no_label, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(17.16, 81.16),[], 90), ("Bridge_14","14",icon_bridge_b|pf_is_static|pf_always_visible|pf_no_label, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(21.88, 78.80),[], 75), ("Bridge_15","15",icon_bridge_b|pf_is_static|pf_always_visible|pf_no_label, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-68.01, -29.60),[], 15), ("looter_spawn_point" ,"looter_sp",pf_disabled|pf_is_static, no_menu, pt_none, fac_outlaws,0,ai_bhvr_hold,0,(26, 77),[(trp_looter,15,0)]), ("steppe_bandit_spawn_point" ,"steppe_bandit_sp",pf_disabled|pf_is_static, no_menu, pt_none, fac_outlaws,0,ai_bhvr_hold,0,(42, -73.3),[(trp_looter,15,0)]), ## ("black_khergit_spawn_point" ,"black_khergit_sp",pf_disabled|pf_is_static, no_menu, pt_none, fac_outlaws,0,ai_bhvr_hold,0,(47.1, -73.3),[(trp_looter,15,0)]), ("forest_bandit_spawn_point" ,"forest_bandit_sp",pf_disabled|pf_is_static, no_menu, pt_none, fac_outlaws,0,ai_bhvr_hold,0,(-30, 5.5),[(trp_looter,15,0)]), ("mountain_bandit_spawn_point","mountain_bandit_sp",pf_disabled|pf_is_static, no_menu, pt_none, fac_outlaws,0,ai_bhvr_hold,0,(46.4, 22.4),[(trp_looter,15,0)]), ("sea_raider_spawn_point_1" ,"sea_raider_sp",pf_disabled|pf_is_static, no_menu, pt_none, fac_outlaws,0,ai_bhvr_hold,0,(-43, 96),[(trp_looter,15,0)]), ("sea_raider_spawn_point_2" ,"sea_raider_sp",pf_disabled|pf_is_static, no_menu, pt_none, fac_outlaws,0,ai_bhvr_hold,0,(47, 86),[(trp_looter,15,0)]), # add extra towns before this point ("spawn_points_end" ,"last_spawn_point", pf_disabled|pf_is_static, no_menu, pt_none, fac_commoners,0,ai_bhvr_hold,0,(0., 0),[(trp_looter,15,0)]), ]
Python
sf_base_att_str = 0x000 sf_base_att_agi = 0x001 sf_base_att_int = 0x002 sf_base_att_cha = 0x003 sf_effects_party = 0x010 sf_inactive = 0x100 skl_trade = 0 skl_leadership = 1 skl_prisoner_management = 2 skl_reserved_1 = 3 skl_reserved_2 = 4 skl_reserved_3 = 5 skl_reserved_4 = 6 skl_reserved_5 = 7 skl_engineer = 8 skl_first_aid = 9 skl_surgery = 10 skl_wound_treatment = 11 skl_inventory_management = 12 skl_spotting = 13 skl_pathfinding = 14 skl_tactics = 15 skl_tracking = 16 skl_trainer = 17 skl_reserved_6 = 18 skl_reserved_7 = 19 skl_reserved_8 = 20 skl_reserved_9 = 21 skl_reserved_10 = 22 skl_horse_archery = 23 skl_riding = 24 skl_athletics = 25 skl_shield = 26 skl_weapon_master = 27 skl_reserved_11 = 28 skl_reserved_12 = 29 skl_reserved_13 = 30 skl_reserved_14 = 31 skl_reserved_15 = 32 skl_power_draw = 33 skl_power_throw = 34 skl_power_strike = 35 skl_ironflesh = 36 skl_reserved_16 = 37 skl_reserved_17 = 38 skl_reserved_18 = 39 skl_reserved_19 = 40 skl_reserved_20 = 41 knows_trade_1 = 1 knows_trade_2 = 2 knows_trade_3 = 3 knows_trade_4 = 4 knows_trade_5 = 5 knows_trade_6 = 6 knows_trade_7 = 7 knows_trade_8 = 8 knows_trade_9 = 9 knows_trade_10 = 10 knows_leadership_1 = 16 knows_leadership_2 = 32 knows_leadership_3 = 48 knows_leadership_4 = 64 knows_leadership_5 = 80 knows_leadership_6 = 96 knows_leadership_7 = 112 knows_leadership_8 = 128 knows_leadership_9 = 144 knows_leadership_10 = 160 knows_prisoner_management_1 = 256 knows_prisoner_management_2 = 512 knows_prisoner_management_3 = 768 knows_prisoner_management_4 = 1024 knows_prisoner_management_5 = 1280 knows_prisoner_management_6 = 1536 knows_prisoner_management_7 = 1792 knows_prisoner_management_8 = 2048 knows_prisoner_management_9 = 2304 knows_prisoner_management_10 = 2560 knows_reserved_1_1 = 4096 knows_reserved_1_2 = 8192 knows_reserved_1_3 = 12288 knows_reserved_1_4 = 16384 knows_reserved_1_5 = 20480 knows_reserved_1_6 = 24576 knows_reserved_1_7 = 28672 knows_reserved_1_8 = 32768 knows_reserved_1_9 = 36864 knows_reserved_1_10 = 40960 knows_reserved_2_1 = 65536 knows_reserved_2_2 = 131072 knows_reserved_2_3 = 196608 knows_reserved_2_4 = 262144 knows_reserved_2_5 = 327680 knows_reserved_2_6 = 393216 knows_reserved_2_7 = 458752 knows_reserved_2_8 = 524288 knows_reserved_2_9 = 589824 knows_reserved_2_10 = 655360 knows_reserved_3_1 = 1048576 knows_reserved_3_2 = 2097152 knows_reserved_3_3 = 3145728 knows_reserved_3_4 = 4194304 knows_reserved_3_5 = 5242880 knows_reserved_3_6 = 6291456 knows_reserved_3_7 = 7340032 knows_reserved_3_8 = 8388608 knows_reserved_3_9 = 9437184 knows_reserved_3_10 = 10485760 knows_reserved_4_1 = 16777216 knows_reserved_4_2 = 33554432 knows_reserved_4_3 = 50331648 knows_reserved_4_4 = 67108864 knows_reserved_4_5 = 83886080 knows_reserved_4_6 = 100663296 knows_reserved_4_7 = 117440512 knows_reserved_4_8 = 134217728 knows_reserved_4_9 = 150994944 knows_reserved_4_10 = 167772160 knows_reserved_5_1 = 268435456 knows_reserved_5_2 = 536870912 knows_reserved_5_3 = 805306368 knows_reserved_5_4 = 1073741824 knows_reserved_5_5 = 1342177280 knows_reserved_5_6 = 1610612736 knows_reserved_5_7 = 1879048192 knows_reserved_5_8 = 2147483648 knows_reserved_5_9 = 2415919104 knows_reserved_5_10 = 2684354560 knows_engineer_1 = 4294967296 knows_engineer_2 = 8589934592 knows_engineer_3 = 12884901888 knows_engineer_4 = 17179869184 knows_engineer_5 = 21474836480 knows_engineer_6 = 25769803776 knows_engineer_7 = 30064771072 knows_engineer_8 = 34359738368 knows_engineer_9 = 38654705664 knows_engineer_10 = 42949672960 knows_first_aid_1 = 68719476736 knows_first_aid_2 = 137438953472 knows_first_aid_3 = 206158430208 knows_first_aid_4 = 274877906944 knows_first_aid_5 = 343597383680 knows_first_aid_6 = 412316860416 knows_first_aid_7 = 481036337152 knows_first_aid_8 = 549755813888 knows_first_aid_9 = 618475290624 knows_first_aid_10 = 687194767360 knows_surgery_1 = 1099511627776 knows_surgery_2 = 2199023255552 knows_surgery_3 = 3298534883328 knows_surgery_4 = 4398046511104 knows_surgery_5 = 5497558138880 knows_surgery_6 = 6597069766656 knows_surgery_7 = 7696581394432 knows_surgery_8 = 8796093022208 knows_surgery_9 = 9895604649984 knows_surgery_10 = 10995116277760 knows_wound_treatment_1 = 17592186044416 knows_wound_treatment_2 = 35184372088832 knows_wound_treatment_3 = 52776558133248 knows_wound_treatment_4 = 70368744177664 knows_wound_treatment_5 = 87960930222080 knows_wound_treatment_6 = 105553116266496 knows_wound_treatment_7 = 123145302310912 knows_wound_treatment_8 = 140737488355328 knows_wound_treatment_9 = 158329674399744 knows_wound_treatment_10 = 175921860444160 knows_inventory_management_1 = 281474976710656 knows_inventory_management_2 = 562949953421312 knows_inventory_management_3 = 844424930131968 knows_inventory_management_4 = 1125899906842624 knows_inventory_management_5 = 1407374883553280 knows_inventory_management_6 = 1688849860263936 knows_inventory_management_7 = 1970324836974592 knows_inventory_management_8 = 2251799813685248 knows_inventory_management_9 = 2533274790395904 knows_inventory_management_10 = 2814749767106560 knows_spotting_1 = 4503599627370496 knows_spotting_2 = 9007199254740992 knows_spotting_3 = 13510798882111488 knows_spotting_4 = 18014398509481984 knows_spotting_5 = 22517998136852480 knows_spotting_6 = 27021597764222976 knows_spotting_7 = 31525197391593472 knows_spotting_8 = 36028797018963968 knows_spotting_9 = 40532396646334464 knows_spotting_10 = 45035996273704960 knows_pathfinding_1 = 72057594037927936 knows_pathfinding_2 = 144115188075855872 knows_pathfinding_3 = 216172782113783808 knows_pathfinding_4 = 288230376151711744 knows_pathfinding_5 = 360287970189639680 knows_pathfinding_6 = 432345564227567616 knows_pathfinding_7 = 504403158265495552 knows_pathfinding_8 = 576460752303423488 knows_pathfinding_9 = 648518346341351424 knows_pathfinding_10 = 720575940379279360 knows_tactics_1 = 1152921504606846976 knows_tactics_2 = 2305843009213693952 knows_tactics_3 = 3458764513820540928 knows_tactics_4 = 4611686018427387904 knows_tactics_5 = 5764607523034234880 knows_tactics_6 = 6917529027641081856 knows_tactics_7 = 8070450532247928832 knows_tactics_8 = 9223372036854775808 knows_tactics_9 = 10376293541461622784 knows_tactics_10 = 11529215046068469760 knows_tracking_1 = 18446744073709551616 knows_tracking_2 = 36893488147419103232 knows_tracking_3 = 55340232221128654848 knows_tracking_4 = 73786976294838206464 knows_tracking_5 = 92233720368547758080 knows_tracking_6 = 110680464442257309696 knows_tracking_7 = 129127208515966861312 knows_tracking_8 = 147573952589676412928 knows_tracking_9 = 166020696663385964544 knows_tracking_10 = 184467440737095516160 knows_trainer_1 = 295147905179352825856 knows_trainer_2 = 590295810358705651712 knows_trainer_3 = 885443715538058477568 knows_trainer_4 = 1180591620717411303424 knows_trainer_5 = 1475739525896764129280 knows_trainer_6 = 1770887431076116955136 knows_trainer_7 = 2066035336255469780992 knows_trainer_8 = 2361183241434822606848 knows_trainer_9 = 2656331146614175432704 knows_trainer_10 = 2951479051793528258560 knows_reserved_6_1 = 4722366482869645213696 knows_reserved_6_2 = 9444732965739290427392 knows_reserved_6_3 = 14167099448608935641088 knows_reserved_6_4 = 18889465931478580854784 knows_reserved_6_5 = 23611832414348226068480 knows_reserved_6_6 = 28334198897217871282176 knows_reserved_6_7 = 33056565380087516495872 knows_reserved_6_8 = 37778931862957161709568 knows_reserved_6_9 = 42501298345826806923264 knows_reserved_6_10 = 47223664828696452136960 knows_reserved_7_1 = 75557863725914323419136 knows_reserved_7_2 = 151115727451828646838272 knows_reserved_7_3 = 226673591177742970257408 knows_reserved_7_4 = 302231454903657293676544 knows_reserved_7_5 = 377789318629571617095680 knows_reserved_7_6 = 453347182355485940514816 knows_reserved_7_7 = 528905046081400263933952 knows_reserved_7_8 = 604462909807314587353088 knows_reserved_7_9 = 680020773533228910772224 knows_reserved_7_10 = 755578637259143234191360 knows_reserved_8_1 = 1208925819614629174706176 knows_reserved_8_2 = 2417851639229258349412352 knows_reserved_8_3 = 3626777458843887524118528 knows_reserved_8_4 = 4835703278458516698824704 knows_reserved_8_5 = 6044629098073145873530880 knows_reserved_8_6 = 7253554917687775048237056 knows_reserved_8_7 = 8462480737302404222943232 knows_reserved_8_8 = 9671406556917033397649408 knows_reserved_8_9 = 10880332376531662572355584 knows_reserved_8_10 = 12089258196146291747061760 knows_reserved_9_1 = 19342813113834066795298816 knows_reserved_9_2 = 38685626227668133590597632 knows_reserved_9_3 = 58028439341502200385896448 knows_reserved_9_4 = 77371252455336267181195264 knows_reserved_9_5 = 96714065569170333976494080 knows_reserved_9_6 = 116056878683004400771792896 knows_reserved_9_7 = 135399691796838467567091712 knows_reserved_9_8 = 154742504910672534362390528 knows_reserved_9_9 = 174085318024506601157689344 knows_reserved_9_10 = 193428131138340667952988160 knows_reserved_10_1 = 309485009821345068724781056 knows_reserved_10_2 = 618970019642690137449562112 knows_reserved_10_3 = 928455029464035206174343168 knows_reserved_10_4 = 1237940039285380274899124224 knows_reserved_10_5 = 1547425049106725343623905280 knows_reserved_10_6 = 1856910058928070412348686336 knows_reserved_10_7 = 2166395068749415481073467392 knows_reserved_10_8 = 2475880078570760549798248448 knows_reserved_10_9 = 2785365088392105618523029504 knows_reserved_10_10 = 3094850098213450687247810560 knows_horse_archery_1 = 4951760157141521099596496896 knows_horse_archery_2 = 9903520314283042199192993792 knows_horse_archery_3 = 14855280471424563298789490688 knows_horse_archery_4 = 19807040628566084398385987584 knows_horse_archery_5 = 24758800785707605497982484480 knows_horse_archery_6 = 29710560942849126597578981376 knows_horse_archery_7 = 34662321099990647697175478272 knows_horse_archery_8 = 39614081257132168796771975168 knows_horse_archery_9 = 44565841414273689896368472064 knows_horse_archery_10 = 49517601571415210995964968960 knows_riding_1 = 79228162514264337593543950336 knows_riding_2 = 158456325028528675187087900672 knows_riding_3 = 237684487542793012780631851008 knows_riding_4 = 316912650057057350374175801344 knows_riding_5 = 396140812571321687967719751680 knows_riding_6 = 475368975085586025561263702016 knows_riding_7 = 554597137599850363154807652352 knows_riding_8 = 633825300114114700748351602688 knows_riding_9 = 713053462628379038341895553024 knows_riding_10 = 792281625142643375935439503360 knows_athletics_1 = 1267650600228229401496703205376 knows_athletics_2 = 2535301200456458802993406410752 knows_athletics_3 = 3802951800684688204490109616128 knows_athletics_4 = 5070602400912917605986812821504 knows_athletics_5 = 6338253001141147007483516026880 knows_athletics_6 = 7605903601369376408980219232256 knows_athletics_7 = 8873554201597605810476922437632 knows_athletics_8 = 10141204801825835211973625643008 knows_athletics_9 = 11408855402054064613470328848384 knows_athletics_10 = 12676506002282294014967032053760 knows_shield_1 = 20282409603651670423947251286016 knows_shield_2 = 40564819207303340847894502572032 knows_shield_3 = 60847228810955011271841753858048 knows_shield_4 = 81129638414606681695789005144064 knows_shield_5 = 101412048018258352119736256430080 knows_shield_6 = 121694457621910022543683507716096 knows_shield_7 = 141976867225561692967630759002112 knows_shield_8 = 162259276829213363391578010288128 knows_shield_9 = 182541686432865033815525261574144 knows_shield_10 = 202824096036516704239472512860160 knows_weapon_master_1 = 324518553658426726783156020576256 knows_weapon_master_2 = 649037107316853453566312041152512 knows_weapon_master_3 = 973555660975280180349468061728768 knows_weapon_master_4 = 1298074214633706907132624082305024 knows_weapon_master_5 = 1622592768292133633915780102881280 knows_weapon_master_6 = 1947111321950560360698936123457536 knows_weapon_master_7 = 2271629875608987087482092144033792 knows_weapon_master_8 = 2596148429267413814265248164610048 knows_weapon_master_9 = 2920666982925840541048404185186304 knows_weapon_master_10 = 3245185536584267267831560205762560 knows_reserved_11_1 = 5192296858534827628530496329220096 knows_reserved_11_2 = 10384593717069655257060992658440192 knows_reserved_11_3 = 15576890575604482885591488987660288 knows_reserved_11_4 = 20769187434139310514121985316880384 knows_reserved_11_5 = 25961484292674138142652481646100480 knows_reserved_11_6 = 31153781151208965771182977975320576 knows_reserved_11_7 = 36346078009743793399713474304540672 knows_reserved_11_8 = 41538374868278621028243970633760768 knows_reserved_11_9 = 46730671726813448656774466962980864 knows_reserved_11_10 = 51922968585348276285304963292200960 knows_reserved_12_1 = 83076749736557242056487941267521536 knows_reserved_12_2 = 166153499473114484112975882535043072 knows_reserved_12_3 = 249230249209671726169463823802564608 knows_reserved_12_4 = 332306998946228968225951765070086144 knows_reserved_12_5 = 415383748682786210282439706337607680 knows_reserved_12_6 = 498460498419343452338927647605129216 knows_reserved_12_7 = 581537248155900694395415588872650752 knows_reserved_12_8 = 664613997892457936451903530140172288 knows_reserved_12_9 = 747690747629015178508391471407693824 knows_reserved_12_10 = 830767497365572420564879412675215360 knows_reserved_13_1 = 1329227995784915872903807060280344576 knows_reserved_13_2 = 2658455991569831745807614120560689152 knows_reserved_13_3 = 3987683987354747618711421180841033728 knows_reserved_13_4 = 5316911983139663491615228241121378304 knows_reserved_13_5 = 6646139978924579364519035301401722880 knows_reserved_13_6 = 7975367974709495237422842361682067456 knows_reserved_13_7 = 9304595970494411110326649421962412032 knows_reserved_13_8 = 10633823966279326983230456482242756608 knows_reserved_13_9 = 11963051962064242856134263542523101184 knows_reserved_13_10 = 13292279957849158729038070602803445760 knows_reserved_14_1 = 21267647932558653966460912964485513216 knows_reserved_14_2 = 42535295865117307932921825928971026432 knows_reserved_14_3 = 63802943797675961899382738893456539648 knows_reserved_14_4 = 85070591730234615865843651857942052864 knows_reserved_14_5 = 106338239662793269832304564822427566080 knows_reserved_14_6 = 127605887595351923798765477786913079296 knows_reserved_14_7 = 148873535527910577765226390751398592512 knows_reserved_14_8 = 170141183460469231731687303715884105728 knows_reserved_14_9 = 191408831393027885698148216680369618944 knows_reserved_14_10 = 212676479325586539664609129644855132160 knows_reserved_15_1 = 340282366920938463463374607431768211456 knows_reserved_15_2 = 680564733841876926926749214863536422912 knows_reserved_15_3 = 1020847100762815390390123822295304634368 knows_reserved_15_4 = 1361129467683753853853498429727072845824 knows_reserved_15_5 = 1701411834604692317316873037158841057280 knows_reserved_15_6 = 2041694201525630780780247644590609268736 knows_reserved_15_7 = 2381976568446569244243622252022377480192 knows_reserved_15_8 = 2722258935367507707706996859454145691648 knows_reserved_15_9 = 3062541302288446171170371466885913903104 knows_reserved_15_10 = 3402823669209384634633746074317682114560 knows_power_draw_1 = 5444517870735015415413993718908291383296 knows_power_draw_2 = 10889035741470030830827987437816582766592 knows_power_draw_3 = 16333553612205046246241981156724874149888 knows_power_draw_4 = 21778071482940061661655974875633165533184 knows_power_draw_5 = 27222589353675077077069968594541456916480 knows_power_draw_6 = 32667107224410092492483962313449748299776 knows_power_draw_7 = 38111625095145107907897956032358039683072 knows_power_draw_8 = 43556142965880123323311949751266331066368 knows_power_draw_9 = 49000660836615138738725943470174622449664 knows_power_draw_10 = 54445178707350154154139937189082913832960 knows_power_throw_1 = 87112285931760246646623899502532662132736 knows_power_throw_2 = 174224571863520493293247799005065324265472 knows_power_throw_3 = 261336857795280739939871698507597986398208 knows_power_throw_4 = 348449143727040986586495598010130648530944 knows_power_throw_5 = 435561429658801233233119497512663310663680 knows_power_throw_6 = 522673715590561479879743397015195972796416 knows_power_throw_7 = 609786001522321726526367296517728634929152 knows_power_throw_8 = 696898287454081973172991196020261297061888 knows_power_throw_9 = 784010573385842219819615095522793959194624 knows_power_throw_10 = 871122859317602466466238995025326621327360 knows_power_strike_1 = 1393796574908163946345982392040522594123776 knows_power_strike_2 = 2787593149816327892691964784081045188247552 knows_power_strike_3 = 4181389724724491839037947176121567782371328 knows_power_strike_4 = 5575186299632655785383929568162090376495104 knows_power_strike_5 = 6968982874540819731729911960202612970618880 knows_power_strike_6 = 8362779449448983678075894352243135564742656 knows_power_strike_7 = 9756576024357147624421876744283658158866432 knows_power_strike_8 = 11150372599265311570767859136324180752990208 knows_power_strike_9 = 12544169174173475517113841528364703347113984 knows_power_strike_10 = 13937965749081639463459823920405225941237760 knows_ironflesh_1 = 22300745198530623141535718272648361505980416 knows_ironflesh_2 = 44601490397061246283071436545296723011960832 knows_ironflesh_3 = 66902235595591869424607154817945084517941248 knows_ironflesh_4 = 89202980794122492566142873090593446023921664 knows_ironflesh_5 = 111503725992653115707678591363241807529902080 knows_ironflesh_6 = 133804471191183738849214309635890169035882496 knows_ironflesh_7 = 156105216389714361990750027908538530541862912 knows_ironflesh_8 = 178405961588244985132285746181186892047843328 knows_ironflesh_9 = 200706706786775608273821464453835253553823744 knows_ironflesh_10 = 223007451985306231415357182726483615059804160 knows_reserved_16_1 = 356811923176489970264571492362373784095686656 knows_reserved_16_2 = 713623846352979940529142984724747568191373312 knows_reserved_16_3 = 1070435769529469910793714477087121352287059968 knows_reserved_16_4 = 1427247692705959881058285969449495136382746624 knows_reserved_16_5 = 1784059615882449851322857461811868920478433280 knows_reserved_16_6 = 2140871539058939821587428954174242704574119936 knows_reserved_16_7 = 2497683462235429791852000446536616488669806592 knows_reserved_16_8 = 2854495385411919762116571938898990272765493248 knows_reserved_16_9 = 3211307308588409732381143431261364056861179904 knows_reserved_16_10 = 3568119231764899702645714923623737840956866560 knows_reserved_17_1 = 5708990770823839524233143877797980545530986496 knows_reserved_17_2 = 11417981541647679048466287755595961091061972992 knows_reserved_17_3 = 17126972312471518572699431633393941636592959488 knows_reserved_17_4 = 22835963083295358096932575511191922182123945984 knows_reserved_17_5 = 28544953854119197621165719388989902727654932480 knows_reserved_17_6 = 34253944624943037145398863266787883273185918976 knows_reserved_17_7 = 39962935395766876669632007144585863818716905472 knows_reserved_17_8 = 45671926166590716193865151022383844364247891968 knows_reserved_17_9 = 51380916937414555718098294900181824909778878464 knows_reserved_17_10 = 57089907708238395242331438777979805455309864960 knows_reserved_18_1 = 91343852333181432387730302044767688728495783936 knows_reserved_18_2 = 182687704666362864775460604089535377456991567872 knows_reserved_18_3 = 274031556999544297163190906134303066185487351808 knows_reserved_18_4 = 365375409332725729550921208179070754913983135744 knows_reserved_18_5 = 456719261665907161938651510223838443642478919680 knows_reserved_18_6 = 548063113999088594326381812268606132370974703616 knows_reserved_18_7 = 639406966332270026714112114313373821099470487552 knows_reserved_18_8 = 730750818665451459101842416358141509827966271488 knows_reserved_18_9 = 822094670998632891489572718402909198556462055424 knows_reserved_18_10 = 913438523331814323877303020447676887284957839360 knows_reserved_19_1 = 1461501637330902918203684832716283019655932542976 knows_reserved_19_2 = 2923003274661805836407369665432566039311865085952 knows_reserved_19_3 = 4384504911992708754611054498148849058967797628928 knows_reserved_19_4 = 5846006549323611672814739330865132078623730171904 knows_reserved_19_5 = 7307508186654514591018424163581415098279662714880 knows_reserved_19_6 = 8769009823985417509222108996297698117935595257856 knows_reserved_19_7 = 10230511461316320427425793829013981137591527800832 knows_reserved_19_8 = 11692013098647223345629478661730264157247460343808 knows_reserved_19_9 = 13153514735978126263833163494446547176903392886784 knows_reserved_19_10 = 14615016373309029182036848327162830196559325429760 knows_reserved_20_1 = 23384026197294446691258957323460528314494920687616 knows_reserved_20_2 = 46768052394588893382517914646921056628989841375232 knows_reserved_20_3 = 70152078591883340073776871970381584943484762062848 knows_reserved_20_4 = 93536104789177786765035829293842113257979682750464 knows_reserved_20_5 = 116920130986472233456294786617302641572474603438080 knows_reserved_20_6 = 140304157183766680147553743940763169886969524125696 knows_reserved_20_7 = 163688183381061126838812701264223698201464444813312 knows_reserved_20_8 = 187072209578355573530071658587684226515959365500928 knows_reserved_20_9 = 210456235775650020221330615911144754830454286188544 knows_reserved_20_10 = 233840261972944466912589573234605283144949206876160 num_skill_words = 6
Python
import string from module_info import * from module_quests import * from process_common import * def save_quests(): ofile = open(export_dir + "quests.txt","w") ofile.write("questsfile version 1\n") ofile.write("%d\n"%(len(quests))) for i_quest in xrange(len(quests)): quest = quests[i_quest] ofile.write("qst_%s %s %d "%(quest[0],(string.replace(quest[1]," ","_")),quest[2])) ofile.write("%s "%(string.replace(quest[3]," ","_"))) ofile.write("\n") ofile.close() def save_python_header(): ofile = open("./ID_quests.py","w") for i_quest in xrange(len(quests)): ofile.write("qst_%s = %d\n"%(quests[i_quest][0],i_quest)) for i_quest in xrange(len(quests)): ofile.write("qsttag_%s = %d\n"%(quests[i_quest][0],opmask_quest_index|i_quest)) ofile.write("\n\n") ofile.close() print "Exporting quest data..." save_quests() save_python_header()
Python
from module_info import * from module_scenes import * from process_common import * def save_python_header(): ofile = open("./ID_scenes.py","w") for i_scene in xrange(len(scenes)): ofile.write("scn_%s = %d\n"%(convert_to_identifier(scenes[i_scene][0]),i_scene)) ofile.close() print "Exporting scene data..." save_python_header() from process_operations import * from module_troops import * scene_name_pos = 0 passages_pos = 8 scene_outer_terrain_pos = 10 def write_vec(ofile,vec): ofile.write(" %f %f %f "%vec) def write_passage(ofile,scenes,passage): scene_no = 0 found = 0 while (not found) and (scene_no < len(scenes)): if (scenes[scene_no][0] == passage): found = 1 else: scene_no += 1 if (passage == "exit"): scene_no = 100000 elif (passage == ""): scene_no = 0 elif not found: print "Error passage not found:" print passage do_error() ofile.write(" %d "%scene_no) def save_scenes(variables,variable_uses,tag_uses): ofile = open(export_dir + "scenes.txt","w") ofile.write("scenesfile version 1\n") ofile.write(" %d\n"%len(scenes)) for scene in scenes: ofile.write("scn_%s %s %d %s %s %f %f %f %f %f %s "%(convert_to_identifier(scene[0]),replace_spaces(scene[0]),scene[1], scene[2],scene[3],scene[4][0],scene[4][1],scene[5][0],scene[5][1],scene[6],scene[7])) passages = scene[passages_pos] ofile.write("\n %d "%len(passages)) for passage in passages: write_passage(ofile,scenes,passage) chest_troops = scene[9] ofile.write("\n %d "%len(chest_troops)) for chest_troop in chest_troops: troop_no = find_troop(troops,chest_troop) if (troop_no < 0): print "Error unable to find chest-troop: " + chest_troop troop_no = 0 else: add_tag_use(tag_uses,tag_troop,troop_no) ofile.write(" %d "%troop_no) ofile.write("\n") if (len(scene) > scene_outer_terrain_pos): ofile.write(" %s "%scene[scene_outer_terrain_pos]) else: ofile.write(" 0 ") ofile.write("\n") ofile.close() variable_uses = [] variables = load_variables(export_dir, variable_uses) tag_uses = load_tag_uses(export_dir) quick_strings = load_quick_strings(export_dir) save_scenes(variables,variable_uses,tag_uses) save_variables(export_dir,variables,variable_uses) save_tag_uses(export_dir,tag_uses) save_quick_strings(export_dir,quick_strings)
Python
from header_common import * from header_scene_props import * from header_operations import * from header_triggers import * from header_sounds import * from module_constants import * import string #################################################################################################################### # Each scene prop record contains the following fields: # 1) Scene prop id: used for referencing scene props in other files. The prefix spr_ is automatically added before each scene prop id. # 2) Scene prop flags. See header_scene_props.py for a list of available flags # 3) Mesh name: Name of the mesh. # 4) Physics object name: # 5) Triggers: Simple triggers that are associated with the scene prop #################################################################################################################### scene_props = [ ("invalid_object",0,"question_mark","0", []), ("inventory",sokf_type_container|sokf_place_at_origin,"package","bobaggage", []), ("empty", 0, "0", "0", []), ("chest_a",sokf_type_container,"chest_gothic","bochest_gothic", []), ("container_small_chest",sokf_type_container,"package","bobaggage", []), ("container_chest_b",sokf_type_container,"chest_b","bo_chest_b", []), ("container_chest_c",sokf_type_container,"chest_c","bo_chest_c", []), ("player_chest",sokf_type_container,"player_chest","bo_player_chest", []), ("locked_player_chest",0,"player_chest","bo_player_chest", []), ("light_sun",sokf_invisible,"light_sphere","0", [ (ti_on_init_scene_prop, [ (neg|is_currently_night), (store_trigger_param_1, ":prop_instance_no"), (set_fixed_point_multiplier, 100), (prop_instance_get_scale, pos5, ":prop_instance_no"), (position_get_scale_x, ":scale", pos5), (store_time_of_day,reg(12)), (try_begin), (is_between,reg(12),5,20), (store_mul, ":red", 5 * 200, ":scale"), (store_mul, ":green", 5 * 193, ":scale"), (store_mul, ":blue", 5 * 180, ":scale"), (else_try), (store_mul, ":red", 5 * 90, ":scale"), (store_mul, ":green", 5 * 115, ":scale"), (store_mul, ":blue", 5 * 150, ":scale"), (try_end), (val_div, ":red", 100), (val_div, ":green", 100), (val_div, ":blue", 100), (set_current_color,":red", ":green", ":blue"), (set_position_delta,0,0,0), (add_point_light, 0, 0), ]), ]), ("light",sokf_invisible,"light_sphere","0", [ (ti_on_init_scene_prop, [ (store_trigger_param_1, ":prop_instance_no"), (set_fixed_point_multiplier, 100), (prop_instance_get_scale, pos5, ":prop_instance_no"), (position_get_scale_x, ":scale", pos5), (store_mul, ":red", 3 * 200, ":scale"), (store_mul, ":green", 3 * 145, ":scale"), (store_mul, ":blue", 3 * 45, ":scale"), (val_div, ":red", 100), (val_div, ":green", 100), (val_div, ":blue", 100), (set_current_color,":red", ":green", ":blue"), (set_position_delta,0,0,0), (add_point_light, 10, 30), ]), ]), ("light_red",sokf_invisible,"light_sphere","0", [ (ti_on_init_scene_prop, [ (store_trigger_param_1, ":prop_instance_no"), (set_fixed_point_multiplier, 100), (prop_instance_get_scale, pos5, ":prop_instance_no"), (position_get_scale_x, ":scale", pos5), (store_mul, ":red", 2 * 170, ":scale"), (store_mul, ":green", 2 * 100, ":scale"), (store_mul, ":blue", 2 * 30, ":scale"), (val_div, ":red", 100), (val_div, ":green", 100), (val_div, ":blue", 100), (set_current_color,":red", ":green", ":blue"), (set_position_delta,0,0,0), (add_point_light, 20, 30), ]), ]), ("light_night",sokf_invisible,"light_sphere","0", [ (ti_on_init_scene_prop, [ # (store_time_of_day,reg(12)), # (neg|is_between,reg(12),5,20), (is_currently_night, 0), (store_trigger_param_1, ":prop_instance_no"), (set_fixed_point_multiplier, 100), (prop_instance_get_scale, pos5, ":prop_instance_no"), (position_get_scale_x, ":scale", pos5), (store_mul, ":red", 3 * 160, ":scale"), (store_mul, ":green", 3 * 145, ":scale"), (store_mul, ":blue", 3 * 100, ":scale"), (val_div, ":red", 100), (val_div, ":green", 100), (val_div, ":blue", 100), (set_current_color,":red", ":green", ":blue"), (set_position_delta,0,0,0), (add_point_light, 10, 30), ]), ]), ("torch",0,"torch_a","0", [ (ti_on_init_scene_prop, [ (set_position_delta,0,-35,48), (particle_system_add_new, "psys_torch_fire"), (particle_system_add_new, "psys_torch_smoke"), (particle_system_add_new, "psys_torch_fire_sparks"), (play_sound, "snd_torch_loop", 0), (set_position_delta,0,-35,56), (particle_system_add_new, "psys_fire_glow_1"), # (particle_system_emit, "psys_fire_glow_1",9000000), #second method (get_trigger_object_position, pos2), (set_position_delta,0,0,0), (position_move_y, pos2, -35), (position_move_z, pos2, 55), (particle_system_burst, "psys_fire_glow_fixed", pos2, 1), ]), ]), ("torch_night",0,"torch_a","0", [ (ti_on_init_scene_prop, [ # (store_time_of_day,reg(12)), # (neg|is_between,reg(12),5,20), (is_currently_night, 0), (set_position_delta,0,-35,48), (particle_system_add_new, "psys_torch_fire"), (particle_system_add_new, "psys_torch_smoke"), (particle_system_add_new, "psys_torch_fire_sparks"), (set_position_delta,0,-35,56), (particle_system_add_new, "psys_fire_glow_1"), (particle_system_emit, "psys_fire_glow_1",9000000), (play_sound, "snd_torch_loop", 0), ]), ]), # ("Baggage",sokf_place_at_origin|sokf_entity_body,"package","bobaggage"), ("barrier_20m",sokf_invisible|sokf_type_barrier,"barrier_20m","bo_barrier_20m", []), ("barrier_16m",sokf_invisible|sokf_type_barrier,"barrier_16m","bo_barrier_16m", []), ("barrier_8m" ,sokf_invisible|sokf_type_barrier,"barrier_8m" ,"bo_barrier_8m" , []), ("barrier_4m" ,sokf_invisible|sokf_type_barrier,"barrier_4m" ,"bo_barrier_4m" , []), ("barrier_2m" ,sokf_invisible|sokf_type_barrier,"barrier_2m" ,"bo_barrier_2m" , []), ("exit_4m" ,sokf_invisible|sokf_type_barrier_leave,"barrier_4m" ,"bo_barrier_4m" , []), ("exit_8m" ,sokf_invisible|sokf_type_barrier_leave,"barrier_8m" ,"bo_barrier_8m" , []), ("exit_16m" ,sokf_invisible|sokf_type_barrier_leave,"barrier_16m" ,"bo_barrier_16m" , []), ("ai_limiter_2m" ,sokf_invisible|sokf_type_ai_limiter,"barrier_2m" ,"bo_barrier_2m" , []), ("ai_limiter_4m" ,sokf_invisible|sokf_type_ai_limiter,"barrier_4m" ,"bo_barrier_4m" , []), ("ai_limiter_8m" ,sokf_invisible|sokf_type_ai_limiter,"barrier_8m" ,"bo_barrier_8m" , []), ("ai_limiter_16m",sokf_invisible|sokf_type_ai_limiter,"barrier_16m","bo_barrier_16m", []), ("Shield",sokf_dynamic,"0","boshield", []), ("shelves",0,"shelves","boshelves", []), ("table_tavern",0,"table_tavern","botable_tavern", []), ("table_castle_a",0,"table_castle_a","bo_table_castle_a", []), ("chair_castle_a",0,"chair_castle_a","bo_chair_castle_a", []), ("pillow_a",0,"pillow_a","bo_pillow", []), ("pillow_b",0,"pillow_b","bo_pillow", []), ("pillow_c",0,"pillow_c","0", []), ("interior_castle_g_square_keep_b",0,"interior_castle_g_square_keep_b","bo_interior_castle_g_square_keep_b", []), ("carpet_with_pillows_a",0,"carpet_with_pillows_a","bo_carpet_with_pillows", []), ("carpet_with_pillows_b",0,"carpet_with_pillows_b","bo_carpet_with_pillows", []), ("table_round_a",0,"table_round_a","bo_table_round_a", []), ("table_round_b",0,"table_round_b","bo_table_round_b", []), ("fireplace_b",0,"fireplace_b","bo_fireplace_b", []), ("fireplace_c",0,"fireplace_c","bo_fireplace_c", []), ("sofa_a",0,"sofa_a","bo_sofa", []), ("sofa_b",0,"sofa_b","bo_sofa", []), ("ewer_a",0,"ewer_a","bo_ewer_a", []), ("end_table_a",0,"end_table_a","bo_end_table_a", []), ("fake_houses_steppe_a",0,"fake_houses_steppe_a","0", []), ("fake_houses_steppe_b",0,"fake_houses_steppe_b","0", []), ("fake_houses_steppe_c",0,"fake_houses_steppe_c","0", []), ("boat_destroy",0,"boat_destroy","bo_boat_destroy", []), ("destroy_house_a",0,"destroy_house_a","bo_destroy_house_a", []), ("destroy_house_b",0,"destroy_house_b","bo_destroy_house_b", []), ("destroy_house_c",0,"destroy_house_c","bo_destroy_house_c", []), ("destroy_heap",0,"destroy_heap","bo_destroy_heap", []), ("destroy_castle_a",0,"destroy_castle_a","bo_destroy_castle_a", []), ("destroy_castle_b",0,"destroy_castle_b","bo_destroy_castle_b", []), ("destroy_castle_c",0,"destroy_castle_c","bo_destroy_castle_c", []), ("destroy_castle_d",0,"destroy_castle_d","bo_destroy_castle_d", []), ("destroy_windmill",0,"destroy_windmill","bo_destroy_windmill", []), ("destroy_tree_a",0,"destroy_tree_a","bo_destroy_tree_a", []), ("destroy_tree_b",0,"destroy_tree_b","bo_destroy_tree_b", []), ("destroy_bridge_a",0,"destroy_bridge_a","bo_destroy_bridge_a", []), ("destroy_bridge_b",0,"destroy_bridge_b","bo_destroy_bridge_b", []), ("Catapult",0,"Catapult","bo_Catapult", []), ("broom",0,"broom","0", []), ("garlic",0,"garlic","0", []), ("garlic_b",0,"garlic_b","0", []), ("destroy_a",0,"destroy_a","0", []), ("destroy_b",0,"destroy_b","0", []), ("bridge_wooden",0,"bridge_wooden","bo_bridge_wooden", []), ("bridge_wooden_snowy",0,"bridge_wooden_snowy","bo_bridge_wooden", []), ("grave_a",0,"grave_a","bo_grave_a", []), ("village_house_e",0,"village_house_e","bo_village_house_e", []), ("village_house_f",0,"village_house_f","bo_village_house_f", []), ("village_house_g",0,"village_house_g","bo_village_house_g", []), ("village_house_h",0,"village_house_h","bo_village_house_h", []), ("village_house_i",0,"village_house_i","bo_village_house_i", []), ("village_house_j",0,"village_house_j","bo_village_house_j", []), ("village_wall_a",0,"village_wall_a","bo_village_wall_a", []), ("village_wall_b",0,"village_wall_b","bo_village_wall_b", []), ("village_snowy_house_a",0,"village_snowy_house_a","bo_village_snowy_house_a", []), ("village_snowy_house_b",0,"village_snowy_house_b","bo_village_snowy_house_b", []), ("village_snowy_house_c",0,"village_snowy_house_c","bo_village_snowy_house_c", []), ("village_snowy_house_d",0,"village_snowy_house_d","bo_village_snowy_house_d", []), ("village_snowy_house_e",0,"village_snowy_house_e","bo_village_snowy_house_e", []), ("village_snowy_house_f",0,"village_snowy_house_f","bo_village_snowy_house_f", []), ("town_house_steppe_a",0,"town_house_steppe_a","bo_town_house_steppe_a", []), ("town_house_steppe_b",0,"town_house_steppe_b","bo_town_house_steppe_b", []), ("town_house_steppe_c",0,"town_house_steppe_c","bo_town_house_steppe_c", []), ("town_house_steppe_d",0,"town_house_steppe_d","bo_town_house_steppe_d", []), ("town_house_steppe_e",0,"town_house_steppe_e","bo_town_house_steppe_e", []), ("town_house_steppe_f",0,"town_house_steppe_f","bo_town_house_steppe_f", []), ("town_house_steppe_g",0,"town_house_steppe_g","bo_town_house_steppe_g", []), ("town_house_steppe_h",0,"town_house_steppe_h","bo_town_house_steppe_h", []), ("town_house_steppe_i",0,"town_house_steppe_i","bo_town_house_steppe_i", []), ("carpet_a",0,"carpet_a","0", []), ("carpet_b",0,"carpet_b","0", []), ("carpet_c",0,"carpet_c","0", []), ("carpet_d",0,"carpet_d","0", []), ("carpet_e",0,"carpet_e","0", []), ("carpet_f",0,"carpet_f","0", []), ("awning_a",0,"awning_a","bo_awning", []), ("awning_b",0,"awning_b","bo_awning", []), ("awning_c",0,"awning_c","bo_awning", []), ("awning_long",0,"awning_long","bo_awning_long", []), ("awning_long_b",0,"awning_long_b","bo_awning_long", []), ("awning_d",0,"awning_d","bo_awning_d", []), ("snowy_barrel_a",0,"snowy_barrel_a","bo_snowy_barrel_a", []), ("snowy_fence",0,"snowy_fence","bo_snowy_fence", []), ("snowy_wood_heap",0,"snowy_wood_heap","bo_snowy_wood_heap", []), ("village_snowy_stable_a",0,"village_snowy_stable_a","bo_village_snowy_stable_a", []), ("village_straw_house_a",0,"village_straw_house_a","bo_village_straw_house_a", []), ("village_stable_a",0,"village_stable_a","bo_village_stable_a", []), ("village_shed_a",0,"village_shed_a","bo_village_shed_a", []), ("village_shed_b",0,"village_shed_b","bo_village_shed_b", []), ("trunks_snowy",0,"trunks_snowy","0", []), ("dungeon_door_cell_a",0,"dungeon_door_cell_a","bo_dungeon_door_cell_a", []), ("dungeon_door_cell_b",0,"dungeon_door_cell_b","bo_dungeon_door_cell_b", []), ("dungeon_door_entry_a",0,"dungeon_door_entry_a","bo_dungeon_door_entry_a", []), ("dungeon_door_entry_b",0,"dungeon_door_entry_b","bo_dungeon_door_entry_a", []), ("dungeon_door_entry_c",0,"dungeon_door_entry_c","bo_dungeon_door_entry_a", []), ("dungeon_door_direction_a",0,"dungeon_door_direction_a","bo_dungeon_door_direction_a", []), ("dungeon_door_direction_b",0,"dungeon_door_direction_b","bo_dungeon_door_direction_a", []), ("dungeon_door_stairs_a",0,"dungeon_door_stairs_a","bo_dungeon_door_stairs_a", []), ("dungeon_door_stairs_b",0,"dungeon_door_stairs_b","bo_dungeon_door_stairs_a", []), ("dungeon_bed_a",0,"dungeon_bed_a","0", []), ("dungeon_bed_b",0,"dungeon_bed_b","bo_dungeon_bed_b", []), ("torture_tool_a",0,"torture_tool_a","bo_torture_tool_a", []), ("torture_tool_b",0,"torture_tool_b","0", []), ("torture_tool_c",0,"torture_tool_c","bo_torture_tool_c", []), ("skeleton_head",0,"skeleton_head","0", []), ("skeleton_bone",0,"skeleton_bone","0", []), ("skeleton_a",0,"skeleton_a","bo_skeleton_a", []), ("dungeon_stairs_a",0,"dungeon_stairs_a","bo_dungeon_stairs_a", []), ("dungeon_stairs_b",0,"dungeon_stairs_b","bo_dungeon_stairs_a", []), ("dungeon_torture_room_a",0,"dungeon_torture_room_a","bo_dungeon_torture_room_a", []), ("dungeon_entry_a",0,"dungeon_entry_a","bo_dungeon_entry_a", []), ("dungeon_entry_b",0,"dungeon_entry_b","bo_dungeon_entry_b", []), ("dungeon_entry_c",0,"dungeon_entry_c","bo_dungeon_entry_c", []), ("dungeon_cell_a",0,"dungeon_cell_a","bo_dungeon_cell_a", []), ("dungeon_cell_b",0,"dungeon_cell_b","bo_dungeon_cell_b", []), ("dungeon_cell_c",0,"dungeon_cell_c","bo_dungeon_cell_c", []), ("dungeon_corridor_a",0,"dungeon_corridor_a","bo_dungeon_corridor_a", []), ("dungeon_corridor_b",0,"dungeon_corridor_b","bo_dungeon_corridor_b", []), ("dungeon_corridor_c",0,"dungeon_corridor_c","bo_dungeon_corridor_b", []), ("dungeon_corridor_d",0,"dungeon_corridor_d","bo_dungeon_corridor_b", []), ("dungeon_direction_a",0,"dungeon_direction_a","bo_dungeon_direction_a", []), ("dungeon_direction_b",0,"dungeon_direction_b","bo_dungeon_direction_a", []), ("dungeon_room_a",0,"dungeon_room_a","bo_dungeon_room_a", []), ("dungeon_tower_stairs_a",0,"dungeon_tower_stairs_a","bo_dungeon_tower_stairs_a", []), ("dungeon_tower_cell_a",0,"dungeon_tower_cell_a","bo_dungeon_tower_cell_a", []), ("tunnel_a",0,"tunnel_a","bo_tunnel_a", []), ("tunnel_salt",0,"tunnel_salt","bo_tunnel_salt", []), ("salt_a",0,"salt_a","bo_salt_a", []), ("tutorial_door_a",sokf_moveable,"tutorial_door_a","bo_tutorial_door_a", []), ("tutorial_door_b",sokf_moveable,"tutorial_door_b","bo_tutorial_door_b", []), ("tutorial_flag_yellow",sokf_moveable,"tutorial_flag_yellow","0", []), ("tutorial_flag_red",sokf_moveable,"tutorial_flag_red","0", []), ("tutorial_flag_blue",sokf_moveable,"tutorial_flag_blue","0", []), ("interior_prison_a",0,"interior_prison_a","bo_interior_prison_a", []), ("interior_prison_b",0,"interior_prison_b","bo_interior_prison_b", []), ("interior_prison_cell_a",0,"interior_prison_cell_a","bo_interior_prison_cell_a", []), # ("interior_prison_c",0,"interior_prison_c","bo_interior_prison_c", []), ("interior_prison_d",0,"interior_prison_d","bo_interior_prison_d", []), ("arena_archery_target_a",0,"arena_archery_target_a","bo_arena_archery_target_a", []), ("archery_butt_a",0,"archery_butt","bo_archery_butt", [ (ti_on_scene_prop_hit, [ (store_trigger_param_1, ":instance_no"), (prop_instance_get_position, pos2, ":instance_no"), (get_player_agent_no, ":player_agent"), (agent_get_position, pos3, ":player_agent"), (get_distance_between_positions, ":player_distance", pos3, pos2), (position_transform_position_to_local, pos4, pos2, pos1), (position_set_y, pos4, 0), (position_set_x, pos2, 0), (position_set_y, pos2, 0), (position_set_z, pos2, 0), (get_distance_between_positions, ":target_distance", pos4, pos2), (assign, ":point_earned", 43), #Calculating a point between 0-12 (val_sub, ":point_earned", ":target_distance"), (val_mul, ":point_earned", 1299), (val_div, ":point_earned", 4300), (try_begin), (lt, ":point_earned", 0), (assign, ":point_earned", 0), (try_end), (val_div, ":player_distance", 91), #Converting to yards (assign, reg60, ":point_earned"), (assign, reg61, ":player_distance"), (display_message, "str_archery_target_hit"), ]), ]), ("archery_target_with_hit_a",0,"arena_archery_target_a","bo_arena_archery_target_a", [ (ti_on_scene_prop_hit, [ (store_trigger_param_1, ":instance_no"), (prop_instance_get_position, pos2, ":instance_no"), (get_player_agent_no, ":player_agent"), (agent_get_position, pos3, ":player_agent"), (get_distance_between_positions, ":player_distance", pos3, pos2), (position_transform_position_to_local, pos4, pos2, pos1), (position_set_y, pos4, 0), (position_set_x, pos2, 0), (position_set_y, pos2, 0), (position_set_z, pos2, 0), (get_distance_between_positions, ":target_distance", pos4, pos2), (assign, ":point_earned", 43), #Calculating a point between 0-12 (val_sub, ":point_earned", ":target_distance"), (val_mul, ":point_earned", 1299), (val_div, ":point_earned", 4300), (try_begin), (lt, ":point_earned", 0), (assign, ":point_earned", 0), (try_end), (val_div, ":player_distance", 91), #Converting to yards (assign, "$g_last_archery_point_earned", ":point_earned"), (assign, reg60, ":point_earned"), (assign, reg61, ":player_distance"), (display_message, "str_archery_target_hit"), ]), ]), ("dummy_a",sokf_destructible|sokf_moveable,"arena_archery_target_b","bo_arena_archery_target_b", [ (ti_on_scene_prop_destroy, [ (store_trigger_param_1, ":instance_no"), (prop_instance_get_starting_position, pos1, ":instance_no"), (get_player_agent_no, ":player_agent"), (agent_get_position, 2, ":player_agent"), (assign, ":rotate_side", 80), (try_begin), (position_is_behind_position, 2, 1), (val_mul, ":rotate_side", -1), (try_end), (position_rotate_x, 1, ":rotate_side"), (prop_instance_animate_to_position, ":instance_no", 1, 70), #animate to position 1 in 0.7 second (val_add, "$tutorial_num_total_dummies_destroyed", 1), (play_sound, "snd_dummy_destroyed"), ]), (ti_on_scene_prop_hit, [ (store_trigger_param_1, ":instance_no"), (store_trigger_param_2, ":damage"), (assign, reg60, ":damage"), (val_div, ":damage", 8), (prop_instance_get_position, pos2, ":instance_no"), (get_player_agent_no, ":player_agent"), (agent_get_position, pos3, ":player_agent"), (try_begin), (position_is_behind_position, pos3, pos2), (val_mul, ":damage", -1), (try_end), (position_rotate_x, 2, ":damage"), (display_message, "str_delivered_damage"), (prop_instance_animate_to_position, ":instance_no", 2, 30), #animate to position 1 in 0.3 second (play_sound, "snd_dummy_hit"), #(particle_system_burst, "psys_blood_hit_1", pos1, 100), #littles #(particle_system_burst, "psys_blood_hit_2", pos1, 1), #Massive blood part #(particle_system_burst, "psys_blood_hit_3", pos1, 10), #3-4 part of blood #(set_position_delta,0,0,50), #(prop_instance_get_position, pos2, ":instance_no"), (particle_system_burst, "psys_dummy_smoke", pos1, 3), (particle_system_burst, "psys_dummy_straw", pos1, 10), ]), ]), ("band_a",0,"band_a","0", []), ("arena_sign",0,"arena_arms","0", []), ("castle_h_battlement_a",0,"castle_h_battlement_a","bo_castle_h_battlement_a", []), ("castle_h_battlement_b",0,"castle_h_battlement_b","bo_castle_h_battlement_b", []), ("castle_h_battlement_a2",0,"castle_h_battlement_a2","bo_castle_h_battlement_a2", []), ("castle_h_battlement_b2",0,"castle_h_battlement_b2","bo_castle_h_battlement_b2", []), ("castle_h_corner_a",0,"castle_h_corner_a","bo_castle_h_corner_a", []), ("castle_h_stairs_a",0,"castle_h_stairs_a","bo_castle_h_stairs_a", []), ("castle_h_stairs_b",0,"castle_h_stairs_b","bo_castle_h_stairs_b", []), ("castle_h_gatehouse_a",0,"castle_h_gatehouse_a","bo_castle_h_gatehouse_a", []), ("castle_h_keep_a",0,"castle_h_keep_a","bo_castle_h_keep_a", []), ("castle_h_keep_b",0,"castle_h_keep_b","bo_castle_h_keep_b", []), ("castle_h_house_a",0,"castle_h_house_a","bo_castle_h_house_a", []), ("castle_h_house_b",0,"castle_h_house_b","bo_castle_h_house_b", []), ("castle_h_house_c",0,"castle_h_house_c","bo_castle_h_house_b", []), ("castle_h_battlement_barrier",0,"castle_h_battlement_barrier","bo_castle_h_battlement_barrier", []), ("castle_f_keep_a",0,"castle_f_keep_a","bo_castle_f_keep_a", []), ("castle_f_battlement_a",0,"castle_f_battlement_a","bo_castle_f_battlement_a", []), ("castle_f_battlement_a_destroyed",0,"castle_f_battlement_a_destroyed","bo_castle_f_battlement_a_destroyed", []), ("castle_f_battlement_b",0,"castle_f_battlement_b","bo_castle_f_battlement_b", []), ("castle_f_battlement_corner_a",0,"castle_f_battlement_corner_a","bo_castle_f_battlement_corner_a", []), ("castle_f_battlement_corner_b",0,"castle_f_battlement_corner_b","bo_castle_f_battlement_corner_b", []), ("castle_f_stairs_a",0,"castle_f_stairs_a","bo_castle_f_stairs_a", []), ("castle_f_tower_a",0,"castle_f_tower_a","bo_castle_f_tower_a", []), ("castle_f_wall_stairs_a",0,"castle_f_wall_stairs_a","bo_castle_f_wall_stairs_a", []), ("castle_f_wall_stairs_b",0,"castle_f_wall_stairs_b","bo_castle_f_wall_stairs_b", []), ("castle_f_wall_way_a",0,"castle_f_wall_way_a","bo_castle_f_wall_way_a", []), ("castle_f_wall_way_b",0,"castle_f_wall_way_b","bo_castle_f_wall_way_b", []), ("castle_f_gatehouse_a",0,"castle_f_gatehouse_a","bo_castle_f_gatehouse_a", []), ("castle_g_battlement_a",0,"castle_g_battlement_a","bo_castle_g_battlement_a", []), ("castle_g_corner_a",0,"castle_g_corner_a","bo_castle_g_corner_a", []), ("castle_g_tower_a",0,"castle_g_tower_a","bo_castle_g_tower_a", []), ("castle_g_gate_house",0,"castle_g_gate_house","bo_castle_g_gate_house", []), ("castle_g_gate_house_door_a",0,"castle_g_gate_house_door_a","bo_castle_g_gate_house_door_a", []), ("castle_g_gate_house_door_b",0,"castle_g_gate_house_door_b","bo_castle_g_gate_house_door_b", []), ("castle_g_square_keep_a",0,"castle_g_square_keep_a","bo_castle_g_square_keep_a", []), ("mosque_a",0,"mosque_a","bo_mosque_a", []), ("stone_minaret_a",0,"stone_minaret_a","bo_stone_minaret_a", []), ("stone_house_a",0,"stone_house_a","bo_stone_house_a", []), ("stone_house_b",0,"stone_house_b","bo_stone_house_b", []), ("stone_house_c",0,"stone_house_c","bo_stone_house_c", []), ("stone_house_d",0,"stone_house_d","bo_stone_house_d", []), ("stone_house_e",0,"stone_house_e","bo_stone_house_e", []), ("stone_house_f",0,"stone_house_f","bo_stone_house_f", []), ("banner_pole", 0, "banner_pole", "bo_banner_pole", []), ("custom_banner_01",0,"custom_banner_01","0", [ (ti_on_init_scene_prop, [ (party_get_slot, ":leader_troop", "$g_encountered_party", slot_town_lord), (try_begin), (ge, ":leader_troop", 0), (cur_scene_prop_set_tableau_material, "tableau_custom_banner_default", ":leader_troop"), (try_end), ]), ]), ("custom_banner_02",0,"custom_banner_02","0", [ (ti_on_init_scene_prop, [ (party_get_slot, ":leader_troop", "$g_encountered_party", slot_town_lord), (try_begin), (ge, ":leader_troop", 0), (cur_scene_prop_set_tableau_material, "tableau_custom_banner_default", ":leader_troop"), (try_end), ]), ]), ("banner_a",0,"banner_a01","0", []), ("banner_b",0,"banner_a02","0", []), ("banner_c",0,"banner_a03","0", []), ("banner_d",0,"banner_a04","0", []), ("banner_e",0,"banner_a05","0", []), ("banner_f",0,"banner_a06","0", []), ("banner_g",0,"banner_a07","0", []), ("banner_h",0,"banner_a08","0", []), ("banner_i",0,"banner_a09","0", []), ("banner_j",0,"banner_a10","0", []), ("banner_k",0,"banner_a11","0", []), ("banner_l",0,"banner_a12","0", []), ("banner_m",0,"banner_a13","0", []), ("banner_n",0,"banner_a14","0", []), ("banner_o",0,"banner_f21","0", []), ("banner_p",0,"banner_a16","0", []), ("banner_q",0,"banner_a17","0", []), ("banner_r",0,"banner_a18","0", []), ("banner_s",0,"banner_a19","0", []), ("banner_t",0,"banner_a20","0", []), ("banner_u",0,"banner_a21","0", []), ("banner_ba",0,"banner_b01","0", []), ("banner_bb",0,"banner_b02","0", []), ("banner_bc",0,"banner_b03","0", []), ("banner_bd",0,"banner_b04","0", []), ("banner_be",0,"banner_b05","0", []), ("banner_bf",0,"banner_b06","0", []), ("banner_bg",0,"banner_b07","0", []), ("banner_bh",0,"banner_b08","0", []), ("banner_bi",0,"banner_b09","0", []), ("banner_bj",0,"banner_b10","0", []), ("banner_bk",0,"banner_b11","0", []), ("banner_bl",0,"banner_b12","0", []), ("banner_bm",0,"banner_b13","0", []), ("banner_bn",0,"banner_b14","0", []), ("banner_bo",0,"banner_b15","0", []), ("banner_bp",0,"banner_b16","0", []), ("banner_bq",0,"banner_b17","0", []), ("banner_br",0,"banner_b18","0", []), ("banner_bs",0,"banner_b19","0", []), ("banner_bt",0,"banner_b20","0", []), ("banner_bu",0,"banner_b21","0", []), ("banner_ca",0,"banner_c01","0", []), ("banner_cb",0,"banner_c02","0", []), ("banner_cc",0,"banner_c03","0", []), ("banner_cd",0,"banner_c04","0", []), ("banner_ce",0,"banner_c05","0", []), ("banner_cf",0,"banner_c06","0", []), ("banner_cg",0,"banner_c07","0", []), ("banner_ch",0,"banner_c08","0", []), ("banner_ci",0,"banner_c09","0", []), ("banner_cj",0,"banner_c10","0", []), ("banner_ck",0,"banner_c11","0", []), ("banner_cl",0,"banner_c12","0", []), ("banner_cm",0,"banner_c13","0", []), ("banner_cn",0,"banner_c14","0", []), ("banner_co",0,"banner_c15","0", []), ("banner_cp",0,"banner_c16","0", []), ("banner_cq",0,"banner_c17","0", []), ("banner_cr",0,"banner_c18","0", []), ("banner_cs",0,"banner_c19","0", []), ("banner_ct",0,"banner_c20","0", []), ("banner_cu",0,"banner_c21","0", []), ("banner_da",0,"banner_d01","0", []), ("banner_db",0,"banner_d02","0", []), ("banner_dc",0,"banner_d03","0", []), ("banner_dd",0,"banner_d04","0", []), ("banner_de",0,"banner_d05","0", []), ("banner_df",0,"banner_d06","0", []), ("banner_dg",0,"banner_d07","0", []), ("banner_dh",0,"banner_d08","0", []), ("banner_di",0,"banner_d09","0", []), ("banner_dj",0,"banner_d10","0", []), ("banner_dk",0,"banner_d11","0", []), ("banner_dl",0,"banner_d12","0", []), ("banner_dm",0,"banner_d13","0", []), ("banner_dn",0,"banner_d14","0", []), ("banner_do",0,"banner_d15","0", []), ("banner_dp",0,"banner_d16","0", []), ("banner_dq",0,"banner_d17","0", []), ("banner_dr",0,"banner_d18","0", []), ("banner_ds",0,"banner_d19","0", []), ("banner_dt",0,"banner_d20","0", []), ("banner_du",0,"banner_d21","0", []), ("banner_ea",0,"banner_e01","0", []), ("banner_eb",0,"banner_e02","0", []), ("banner_ec",0,"banner_e03","0", []), ("banner_ed",0,"banner_e04","0", []), ("banner_ee",0,"banner_e05","0", []), ("banner_ef",0,"banner_e06","0", []), ("banner_eg",0,"banner_e07","0", []), ("banner_eh",0,"banner_e08","0", []), ("banner_ei",0,"banner_e09","0", []), ("banner_ej",0,"banner_e10","0", []), ("banner_ek",0,"banner_e11","0", []), ("banner_el",0,"banner_e12","0", []), ("banner_em",0,"banner_e13","0", []), ("banner_en",0,"banner_e14","0", []), ("banner_eo",0,"banner_e15","0", []), ("banner_ep",0,"banner_e16","0", []), ("banner_eq",0,"banner_e17","0", []), ("banner_er",0,"banner_e18","0", []), ("banner_es",0,"banner_e19","0", []), ("banner_et",0,"banner_e20","0", []), ("banner_eu",0,"banner_e21","0", []), ("banner_f01", 0, "banner_f01", "0", []), ("banner_f02", 0, "banner_f02", "0", []), ("banner_f03", 0, "banner_f03", "0", []), ("banner_f04", 0, "banner_f04", "0", []), ("banner_f05", 0, "banner_f05", "0", []), ("banner_f06", 0, "banner_f06", "0", []), ("banner_f07", 0, "banner_f07", "0", []), ("banner_f08", 0, "banner_f08", "0", []), ("banner_f09", 0, "banner_f09", "0", []), ("banner_f10", 0, "banner_f10", "0", []), ("banner_f11", 0, "banner_f11", "0", []), ("banner_f12", 0, "banner_f12", "0", []), ("banner_f13", 0, "banner_f13", "0", []), ("banner_f14", 0, "banner_f14", "0", []), ("banner_f15", 0, "banner_f15", "0", []), ("banner_f16", 0, "banner_f16", "0", []), ("banner_f17", 0, "banner_f17", "0", []), ("banner_f18", 0, "banner_f18", "0", []), ("banner_f19", 0, "banner_f19", "0", []), ("banner_f20", 0, "banner_f20", "0", []), ("banner_f21", 0, "banner_a15", "0", []), ("tavern_chair_a",0,"tavern_chair_a","bo_tavern_chair_a", []), ("tavern_chair_b",0,"tavern_chair_b","bo_tavern_chair_b", []), ("tavern_table_a",0,"tavern_table_a","bo_tavern_table_a", []), ("tavern_table_b",0,"tavern_table_b","bo_tavern_table_b", []), ("fireplace_a",0,"fireplace_a","bo_fireplace_a", []), ("barrel",0,"barrel","bobarrel", []), ("bench_tavern",0,"bench_tavern","bobench_tavern", []), ("bench_tavern_b",0,"bench_tavern_b","bo_bench_tavern_b", []), ("bowl_wood",0,"bowl_wood","0", []), ("chandelier_table",0,"chandelier_table","0", []), ("chandelier_tavern",0,"chandelier_tavern","0", []), ("chest_gothic",0,"chest_gothic","bochest_gothic", []), ("chest_b",0,"chest_b","bo_chest_b", []), ("chest_c",0,"chest_c","bo_chest_c", []), ("counter_tavern",0,"counter_tavern","bocounter_tavern", []), ("cup",0,"cup","0", []), ("dish_metal",0,"dish_metal","0", []), ("gothic_chair",0,"gothic_chair","bogothic_chair", []), ("gothic_stool",0,"gothic_stool","bogothic_stool", []), ("grate",0,"grate","bograte", []), ("jug",0,"jug","0", []), ("potlamp",0,"potlamp","0", []), ("weapon_rack",0,"weapon_rack","boweapon_rack", []), ("weapon_rack_big",0,"weapon_rack_big","boweapon_rack_big", []), ("tavern_barrel",0,"barrel","bobarrel", []), ("tavern_barrel_b",0,"tavern_barrel_b","bo_tavern_barrel_b", []), ("merchant_sign",0,"merchant_sign","bo_tavern_sign", []), ("tavern_sign",0,"tavern_sign","bo_tavern_sign", []), ("sack",0,"sack","0", []), ("skull_a",0,"skull_a","0", []), ("skull_b",0,"skull_b","0", []), ("skull_c",0,"skull_c","0", []), ("skull_d",0,"skull_d","0", []), ("skeleton_cow",0,"skeleton_cow","0", []), ("cupboard_a",0,"cupboard_a","bo_cupboard_a", []), ("box_a",0,"box_a","bo_box_a", []), ("bucket_a",0,"bucket_a","bo_bucket_a", []), ("straw_a",0,"straw_a","0", []), ("straw_b",0,"straw_b","0", []), ("straw_c",0,"straw_c","0", []), ("cloth_a",0,"cloth_a","0", []), ("cloth_b",0,"cloth_b","0", []), ("mat_a",0,"mat_a","0", []), ("mat_b",0,"mat_b","0", []), ("mat_c",0,"mat_c","0", []), ("mat_d",0,"mat_d","0", []), ("wood_a",0,"wood_a","bo_wood_a", []), ("wood_b",0,"wood_b","bo_wood_b", []), ("wood_heap",0,"wood_heap_a","bo_wood_heap_a", []), ("wood_heap_b",0,"wood_heap_b","bo_wood_heap_b", []), ("water_well_a",0,"water_well_a","bo_water_well_a", []), ("net_a",0,"net_a","bo_net_a", []), ("net_b",0,"net_b","0", []), ("meat_hook",0,"meat_hook","0", []), ("cooking_pole",0,"cooking_pole","0", []), ("bowl_a",0,"bowl_a","0", []), ("bucket_b",0,"bucket_b","0", []), ("washtub_a",0,"washtub_a","bo_washtub_a", []), ("washtub_b",0,"washtub_b","bo_washtub_b", []), ("table_trunk_a",0,"table_trunk_a","bo_table_trunk_a", []), ("chair_trunk_a",0,"chair_trunk_a","bo_chair_trunk_a", []), ("chair_trunk_b",0,"chair_trunk_b","bo_chair_trunk_b", []), ("chair_trunk_c",0,"chair_trunk_c","bo_chair_trunk_c", []), ("table_trestle_long",0,"table_trestle_long","bo_table_trestle_long", []), ("table_trestle_small",0,"table_trestle_small","bo_table_trestle_small", []), ("chair_trestle",0,"chair_trestle","bo_chair_trestle", []), ("wheel",0,"wheel","bowheel", []), ("ladder",0,"ladder","boladder", []), ("cart",0,"cart","bocart", []), ("village_stand",0,"village_stand","bovillage_stand", []), ("wooden_stand",0,"wooden_stand","bowooden_stand", []), ("table_small",0,"table_small","botable_small", []), ("table_small_b",0,"table_small_b","bo_table_small_b", []), ("small_timber_frame_house_a",0,"small_timber_frame_house_a","bo_small_timber_frame_house_a", []), ("timber_frame_house_b",0,"tf_house_b","bo_tf_house_b", []), ("timber_frame_house_c",0,"tf_house_c","bo_tf_house_c", []), ("timber_frame_extension_a",0,"timber_frame_extension_a","bo_timber_frame_extension_a", []), ("timber_frame_extension_b",0,"timber_frame_extension_b","bo_timber_frame_extension_b", []), ("stone_stairs_a",0,"stone_stairs_a","bo_stone_stairs_a", []), ("stone_stairs_b",0,"stone_stairs_b","bo_stone_stairs_b", []), ("railing_a",0,"railing_a","bo_railing_a", []), ("side_building_a",0,"side_building_a","bo_side_building_a", []), ("battlement_a",0,"battlement_a","bo_battlement_a", []), ("battlement_a_destroyed",0,"battlement_a_destroyed","bo_battlement_a_destroyed", []), ("round_tower_a",0,"round_tower_a","bo_round_tower_a", []), ("small_round_tower_a",0,"small_round_tower_a","bo_small_round_tower_a", []), ("small_round_tower_roof_a",0,"small_round_tower_roof_a","bo_small_round_tower_roof_a", []), ("square_keep_a",0,"square_keep_a","bo_square_keep_a", []), ("square_tower_roof_a",0,"square_tower_roof_a","0", []), ("gate_house_a",0,"gate_house_a","bo_gate_house_a", []), ("gate_house_b",0,"gate_house_b","bo_gate_house_b", []), ("small_wall_a",0,"small_wall_a","bo_small_wall_a", []), ("small_wall_b",0,"small_wall_b","bo_small_wall_b", []), ("small_wall_c",0,"small_wall_c","bo_small_wall_c", []), ("small_wall_c_destroy",0,"small_wall_c_destroy","bo_small_wall_c_destroy", []), ("small_wall_d",0,"small_wall_d","bo_small_wall_d", []), ("small_wall_e",0,"small_wall_e","bo_small_wall_d", []), ("town_house_a",0,"town_house_a","bo_town_house_a", []), ("town_house_b",0,"town_house_b","bo_town_house_b", []), ("town_house_c",0,"town_house_c","bo_town_house_c", []), ("town_house_d",0,"town_house_d","bo_town_house_d", []), ("town_house_e",0,"town_house_e","bo_town_house_e", []), ("town_house_f",0,"town_house_f","bo_town_house_f", []), ("town_house_g",0,"town_house_g","bo_town_house_g", []), ("town_house_h",0,"town_house_h","bo_town_house_h", []), ("town_house_i",0,"town_house_i","bo_town_house_i", []), ("town_house_j",0,"town_house_j","bo_town_house_j", []), ("town_house_l",0,"town_house_l","bo_town_house_l", []), ("town_house_m",0,"town_house_m","bo_town_house_m", []), ("town_house_n",0,"town_house_n","bo_town_house_n", []), ("town_house_o",0,"town_house_o","bo_town_house_o", []), ("town_house_p",0,"town_house_p","bo_town_house_p", []), ("town_house_q",0,"town_house_q","bo_town_house_q", []), ("passage_house_a",0,"passage_house_a","bo_passage_house_a", []), ("passage_house_b",0,"passage_house_b","bo_passage_house_b", []), ("passage_house_c",0,"passage_house_c","bo_passage_house_c", []), ("passage_house_d",0,"passage_house_d","bo_passage_house_d", []), ("passage_house_c_door",0,"passage_house_c_door","bo_passage_house_c_door", []), ("house_extension_a",0,"house_extension_a","bo_house_extension_a", []), ("house_extension_b",0,"house_extension_b","bo_house_extension_b", []), ("house_extension_c",0,"house_extension_c","bo_house_extension_a", []),#reuse ("house_extension_d",0,"house_extension_d","bo_house_extension_d", []), ("house_extension_e",0,"house_extension_e","bo_house_extension_e", []), ("house_extension_f",0,"house_extension_f","bo_house_extension_f", []), ("house_extension_f2",0,"house_extension_f2","bo_house_extension_f", []), ("house_extension_g",0,"house_extension_g","bo_house_extension_g", []), ("house_extension_g2",0,"house_extension_g2","bo_house_extension_g", []), ("house_extension_h",0,"house_extension_h","bo_house_extension_h", []), ("house_roof_door",0,"house_roof_door","bo_house_roof_door", []), ("door_extension_a",0,"door_extension_a","bo_door_extension_a", []), ("stairs_arch_a",0,"stairs_arch_a","bo_stairs_arch_a", []), ("town_house_r",0,"town_house_r","bo_town_house_r", []), ("town_house_s",0,"town_house_s","bo_town_house_s", []), ("town_house_t",0,"town_house_t","bo_town_house_t", []), ("town_house_u",0,"town_house_u","bo_town_house_u", []), ("town_house_v",0,"town_house_v","bo_town_house_v", []), ("town_house_w",0,"town_house_w","bo_town_house_w", []), ("town_house_y",0,"town_house_y","bo_town_house_y", []), ("town_house_z",0,"town_house_z","bo_town_house_z", []), ("town_house_za",0,"town_house_za","bo_town_house_za", []), ("windmill",0,"windmill","bo_windmill", []), ("windmill_fan_turning",sokf_moveable,"windmill_fan_turning","bo_windmill_fan_turning", []), ("windmill_fan",0,"windmill_fan","bo_windmill_fan", []), ("fake_house_a",0,"fake_house_a","bo_fake_house_a", []), ("fake_house_b",0,"fake_house_b","bo_fake_house_b", []), ("fake_house_c",0,"fake_house_c","bo_fake_house_c", []), ("fake_house_d",0,"fake_house_d","bo_fake_house_d", []), ("fake_house_e",0,"fake_house_e","bo_fake_house_e", []), ("fake_house_f",0,"fake_house_f","bo_fake_house_f", []), ("fake_house_snowy_a",0,"fake_house_snowy_a","bo_fake_house_a", []), ("fake_house_snowy_b",0,"fake_house_snowy_b","bo_fake_house_b", []), ("fake_house_snowy_c",0,"fake_house_snowy_c","bo_fake_house_c", []), ("fake_house_snowy_d",0,"fake_house_snowy_d","bo_fake_house_d", []), ("fake_house_far_a",0,"fake_house_far_a","0", []), ("fake_house_far_b",0,"fake_house_far_b","0", []), ("fake_house_far_c",0,"fake_house_far_c","0", []), ("fake_house_far_d",0,"fake_house_far_d","0", []), ("fake_house_far_e",0,"fake_house_far_e","0", []), ("fake_house_far_f",0,"fake_house_far_f","0", []), ("fake_house_far_snowycrude_a",0,"fake_house_far_snowy_a","0", []), ("fake_house_far_snowy_b",0,"fake_house_far_snowy_b","0", []), ("fake_house_far_snowy_c",0,"fake_house_far_snowy_c","0", []), ("fake_house_far_snowy_d",0,"fake_house_far_snowy_d","0", []), ("earth_wall_a",0,"earth_wall_a","bo_earth_wall_a", []), ("earth_wall_a2",0,"earth_wall_a2","bo_earth_wall_a2", []), ("earth_wall_b",0,"earth_wall_b","bo_earth_wall_b", []), ("earth_wall_b2",0,"earth_wall_b2","bo_earth_wall_b2", []), ("earth_stairs_a",0,"earth_stairs_a","bo_earth_stairs_a", []), ("earth_stairs_b",0,"earth_stairs_b","bo_earth_stairs_b", []), ("earth_tower_small_a",0,"earth_tower_small_a","bo_earth_tower_small_a", []), ("earth_gate_house_a",0,"earth_gate_house_a","bo_earth_gate_house_a", []), ("earth_gate_a",0,"earth_gate_a","bo_earth_gate_a", []), ("earth_square_keep_a",0,"earth_square_keep_a","bo_earth_square_keep_a", []), ("earth_house_a",0,"earth_house_a","bo_earth_house_a", []), ("earth_house_b",0,"earth_house_b","bo_earth_house_b", []), ("earth_house_c",0,"earth_house_c","bo_earth_house_c", []), ("earth_house_d",0,"earth_house_d","bo_earth_house_d", []), ("village_steppe_a",0,"village_steppe_a","bo_village_steppe_a", []), ("village_steppe_b",0,"village_steppe_b","bo_village_steppe_b", []), ("village_steppe_c",0,"village_steppe_c","bo_village_steppe_c", []), ("village_steppe_d",0,"village_steppe_d","bo_village_steppe_d", []), ("village_steppe_e",0,"village_steppe_e","bo_village_steppe_e", []), ("village_steppe_f",0,"village_steppe_f","bo_village_steppe_f", []), ("town_house_aa",0,"town_house_aa","bo_town_house_aa", []), ("snowy_house_a",0,"snowy_house_a","bo_snowy_house_a", []), ("snowy_house_b",0,"snowy_house_b","bo_snowy_house_b", []), ("snowy_house_c",0,"snowy_house_c","bo_snowy_house_c", []), ("snowy_house_d",0,"snowy_house_d","bo_snowy_house_d", []), ("snowy_house_e",0,"snowy_house_e","bo_snowy_house_e", []), ("snowy_house_f",0,"snowy_house_f","bo_snowy_house_f", []), ("snowy_house_g",0,"snowy_house_g","bo_snowy_house_g", []), ("snowy_house_h",0,"snowy_house_h","bo_snowy_house_h", []), ("snowy_house_i",0,"snowy_house_i","bo_snowy_house_i", []), ("snowy_wall_a",0,"snowy_wall_a","bo_snowy_wall_a", []), ("snowy_stand",0,"snowy_stand","bo_snowy_stand", []), ("snowy_heap_a",0,"snowy_heap_a","bo_snowy_heap_a", []), ("snowy_trunks_a",0,"snowy_trunks_a","bo_snowy_trunks_a", []), ("snowy_castle_tower_a",0,"snowy_castle_tower_a","bo_snowy_castle_tower_a", []), ("snowy_castle_battlement_a",0,"snowy_castle_battlement_a","bo_snowy_castle_battlement_a", []), ("snowy_castle_battlement_a_destroyed",0,"snowy_castle_battlement_a_destroyed","bo_snowy_castle_battlement_a_destroyed", []), ("snowy_castle_battlement_b",0,"snowy_castle_battlement_b","bo_snowy_castle_battlement_b", []), ("snowy_castle_battlement_corner_a",0,"snowy_castle_battlement_corner_a","bo_snowy_castle_battlement_corner_a", []), ("snowy_castle_battlement_corner_b",0,"snowy_castle_battlement_corner_b","bo_snowy_castle_battlement_corner_b", []), ("snowy_castle_battlement_stairs_a",0,"snowy_castle_battlement_stairs_a","bo_snowy_castle_battlement_stairs_a", []), ("snowy_castle_battlement_stairs_b",0,"snowy_castle_battlement_stairs_b","bo_snowy_castle_battlement_stairs_b", []), ("snowy_castle_gate_house_a",0,"snowy_castle_gate_house_a","bo_snowy_castle_gate_house_a", []), ("snowy_castle_round_tower_a",0,"snowy_castle_round_tower_a","bo_snowy_castle_round_tower_a", []), ("snowy_castle_square_keep_a",0,"snowy_castle_square_keep_a","bo_snowy_castle_square_keep_a", []), ("snowy_castle_stairs_a",0,"snowy_castle_stairs_a","bo_snowy_castle_stairs_a", []), ("square_keep_b",0,"square_keep_b","bo_square_keep_b", []), ("square_keep_c",0,"square_keep_c","bo_square_keep_c", []), ("square_keep_d",0,"square_keep_d","bo_square_keep_d", []), ("square_keep_e",0,"square_keep_e","bo_square_keep_e", []), ("square_keep_f",0,"square_keep_f","bo_square_keep_f", []), ("square_extension_a",0,"square_extension_a","bo_square_extension_a", []), ("square_stairs_a",0,"square_stairs_a","bo_square_stairs_a", []), ("castle_courtyard_house_a",0,"castle_courtyard_house_a","bo_castle_courtyard_house_a", []), ("castle_courtyard_house_b",0,"castle_courtyard_house_b","bo_castle_courtyard_house_b", []), ("castle_courtyard_house_c",0,"castle_courtyard_house_c","bo_castle_courtyard_house_c", []), ("castle_courtyard_a",0,"castle_courtyard_a","bo_castle_courtyard_a", []), ("gatehouse_b",0,"gatehouse_b","bo_gatehouse_b", []), ("castle_gaillard",0,"castle_gaillard","bo_castle_gaillard", []), ("castle_e_battlement_a",0,"castle_e_battlement_a","bo_castle_e_battlement_a", []), ("castle_e_battlement_a_destroyed",0,"castle_e_battlement_a_destroyed","bo_castle_e_battlement_a_destroyed", []), ("castle_e_corner",0,"castle_e_corner","bo_castle_e_corner", []), ("castle_e_stairs_a",0,"castle_e_stairs_a","bo_castle_e_stairs_a", []), ("castle_e_tower",0,"castle_e_tower","bo_castle_e_tower", []), ("castle_e_gate_house_a",0,"castle_e_gate_house_a","bo_castle_e_gate_house_a", []), ("castle_e_keep_a",0,"castle_e_keep_a","bo_castle_e_keep_a", []), ("stand_thatched",0,"stand_thatched","bo_stand_thatched", []), ("stand_cloth",0,"stand_cloth","bo_stand_cloth", []), ("castle_e_house_a",0,"castle_e_house_a","bo_castle_e_house_a", []), ("castle_e_house_b",0,"castle_e_house_b","bo_castle_e_house_b", []), ("castle_e_corner_b",0,"castle_e_corner_b","bo_castle_e_corner_b", []), ("arena_block_a",0,"arena_block_a","bo_arena_block_ab", []), ("arena_block_b",0,"arena_block_b","bo_arena_block_ab", []), ("arena_block_c",0,"arena_block_c","bo_arena_block_c", []), ("arena_block_d",0,"arena_block_d","bo_arena_block_def", []), ("arena_block_e",0,"arena_block_e","bo_arena_block_def", []), ("arena_block_f",0,"arena_block_f","bo_arena_block_def", []), ("arena_block_g",0,"arena_block_g","bo_arena_block_ghi", []), ("arena_block_h",0,"arena_block_h","bo_arena_block_ghi", []), ("arena_block_i",0,"arena_block_i","bo_arena_block_ghi", []), ("arena_block_j",0,"arena_block_j","bo_arena_block_j", []), ("arena_block_j_awning",0,"arena_block_j_awning","bo_arena_block_j_awning", []), ("arena_palisade_a",0,"arena_palisade_a","bo_arena_palisade_a", []), ("arena_wall_a",0,"arena_wall_a","bo_arena_wall_ab", []), ("arena_wall_b",0,"arena_wall_b","bo_arena_wall_ab", []), ("arena_barrier_a",0,"arena_barrier_a","bo_arena_barrier_a", []), ("arena_barrier_b",0,"arena_barrier_b","bo_arena_barrier_bc", []), ("arena_barrier_c",0,"arena_barrier_c","bo_arena_barrier_bc", []), ("arena_tower_a",0,"arena_tower_a","bo_arena_tower_abc", []), ("arena_tower_b",0,"arena_tower_b","bo_arena_tower_abc", []), ("arena_tower_c",0,"arena_tower_c","bo_arena_tower_abc", []), ("arena_spectator_a",0,"arena_spectator_a","0", []), ("arena_spectator_b",0,"arena_spectator_b","0", []), ("arena_spectator_c",0,"arena_spectator_c","0", []), ("arena_spectator_sitting_a",0,"arena_spectator_sitting_a","0", []), ("arena_spectator_sitting_b",0,"arena_spectator_sitting_b","0", []), ("arena_spectator_sitting_c",0,"arena_spectator_sitting_c","0", []), ("courtyard_gate_a",0,"courtyard_entry_a","bo_courtyard_entry_a", []), ("courtyard_gate_b",0,"courtyard_entry_b","bo_courtyard_entry_b", []), ("courtyard_gate_c",0,"courtyard_entry_c","bo_courtyard_entry_c", []), ("courtyard_gate_snowy",0,"courtyard_entry_snowy","bo_courtyard_entry_a", []), ("castle_tower_a",0,"castle_tower_a","bo_castle_tower_a", []), ("castle_battlement_a",0,"castle_battlement_a","bo_castle_battlement_a", []), ("castle_battlement_b",0,"castle_battlement_b","bo_castle_battlement_b", []), ("castle_battlement_a_destroyed",0,"castle_battlement_a_destroyed","bo_castle_battlement_a_destroyed", []), ("castle_battlement_b_destroyed",0,"castle_battlement_b_destroyed","bo_castle_battlement_b_destroyed", []), ("castle_battlement_corner_a",0,"castle_battlement_corner_a","bo_castle_battlement_corner_a", []), ("castle_battlement_corner_b",0,"castle_battlement_corner_b","bo_castle_battlement_corner_b", []), ("castle_battlement_stairs_a",0,"castle_battlement_stairs_a","bo_castle_battlement_stairs_a", []), ("castle_battlement_stairs_b",0,"castle_battlement_stairs_b","bo_castle_battlement_stairs_b", []), ("castle_gate_house_a",0,"castle_gate_house_a","bo_castle_gate_house_a", []), ("castle_round_tower_a",0,"castle_round_tower_a","bo_castle_round_tower_a", []), ("castle_square_keep_a",0,"castle_square_keep_a","bo_castle_square_keep_a", []), ("castle_stairs_a",0,"castle_stairs_a","bo_castle_stairs_a", []), ("castle_drawbridge_open",0,"castle_drawbridges_open","bo_castle_drawbridges_open", []), ("castle_drawbridge_closed",0,"castle_drawbridges_closed","bo_castle_drawbridges_closed", []), ("spike_group_a",0,"spike_group_a","bo_spike_group_a", []), ("spike_a",0,"spike_a","bo_spike_a", []), ("belfry_a",sokf_moveable,"belfry_a","bo_belfry_a", []), ("belfry_old",0,"belfry_a","bo_belfry_a", []), ("belfry_platform_a",sokf_moveable,"belfry_platform_a","bo_belfry_platform_a", []), ("belfry_platform_b",sokf_moveable,"belfry_platform_b","bo_belfry_platform_b", []), ("belfry_platform_old",0,"belfry_platform_b","bo_belfry_platform_b", []), ("belfry_wheel",sokf_moveable,"belfry_wheel",0, []), ("belfry_wheel_old",0,"belfry_wheel",0, []), ("mangonel",0,"mangonel","bo_mangonel", []), ("trebuchet_old",0,"trebuchet_old","bo_trebuchet_old", []), ("trebuchet_new",0,"trebuchet_new","bo_trebuchet_old", []), ("stone_ball",0,"stone_ball","0", []), ("village_house_a",0,"village_house_a","bo_village_house_a", []), ("village_house_b",0,"village_house_b","bo_village_house_b", []), ("village_house_c",0,"village_house_c","bo_village_house_c", []), ("village_house_d",0,"village_house_d","bo_village_house_d", []), ("farm_house_a",0,"farm_house_a","bo_farm_house_a", []), ("farm_house_b",0,"farm_house_b","bo_farm_house_b", []), ("farm_house_c",0,"farm_house_c","bo_farm_house_c", []), ("mountain_house_a",0,"mountain_house_a","bo_mountain_house_a", []), ("mountain_house_b",0,"mountain_house_b","bo_mountain_house_b", []), ("village_hut_a",0,"village_hut_a","bo_village_hut_a", []), ("crude_fence",0,"fence","bo_fence", []), ("crude_fence_small",0,"crude_fence_small","bo_crude_fence_small", []), ("crude_fence_small_b",0,"crude_fence_small_b","bo_crude_fence_small_b", []), ("ramp_12m",0,"ramp_12m","bo_ramp_12m", []), ("ramp_14m",0,"ramp_14m","bo_ramp_14m", []), ("siege_ladder_12m",0,"siege_leadder_12m","bo_siege_leadder_12m", []), ("siege_ladder_14m",0,"siege_leadder_14m","bo_siege_leadder_14m", []), ("portcullis",0,"portcullis_a","bo_portcullis_a", []), ("bed_a",0,"bed_a","bo_bed_a", []), ("bed_b",0,"bed_b","bo_bed_b", []), ("bed_c",0,"bed_c","bo_bed_c", []), ("bed_d",0,"bed_d","bo_bed_d", []), ("bed_e",0,"bed_e","bo_bed_e", []), ("bed_f",0,"bed_f","bo_bed_f", []), ("towngate_door_left",0,"door_g_left","bo_door_left", []), ("towngate_door_right",0,"door_g_right","bo_door_right", []), ("towngate_rectangle_door_left",0,"towngate_rectangle_door_left","bo_towngate_rectangle_door_left", []), ("towngate_rectangle_door_right",0,"towngate_rectangle_door_right","bo_towngate_rectangle_door_right", []), ("door_screen",0,"door_screen","0", []), ("door_a",0,"door_a","bo_door_a", []), ("door_b",0,"door_b","bo_door_a", []), ("door_c",0,"door_c","bo_door_a", []), ("door_d",0,"door_d","bo_door_a", []), ("tavern_door_a",0,"tavern_door_a","bo_tavern_door_a", []), ("tavern_door_b",0,"tavern_door_b","bo_tavern_door_a", []), ("door_e_left",0,"door_e_left","bo_door_left", []), ("door_e_right",0,"door_e_right","bo_door_right", []), ("door_f_left",0,"door_f_left","bo_door_left", []), ("door_f_right",0,"door_f_right","bo_door_right", []), ("door_h_left",0,"door_g_left","bo_door_left", []), ("door_h_right",0,"door_g_right","bo_door_right", []), ("draw_bridge_a",0,"draw_bridge_a","bo_draw_bridge_a", []), ("chain_1m",0,"chain_1m","0", []), ("chain_2m",0,"chain_2m","0", []), ("chain_5m",0,"chain_5m","0", []), ("chain_10m",0,"chain_10m","0", []), ("bridge_modular_a",0,"bridge_modular_a","bo_bridge_modular_a", []), ("bridge_modular_b",0,"bridge_modular_b","bo_bridge_modular_b", []), ("church_a",0,"church_a","bo_church_a", []), ("church_tower_a",0,"church_tower_a","bo_church_tower_a", []), ("stone_step_a",0,"floor_stone_a","bo_floor_stone_a", []), ("stone_step_b",0,"stone_step_b","0", []), ("stone_step_c",0,"stone_step_c","0", []), ("stone_heap",0,"stone_heap","bo_stone_heap", []), ("stone_heap_b",0,"stone_heap_b","bo_stone_heap", []), ("panel_door_a",0,"house_door_a","bo_house_door_a", []), ("panel_door_b",0,"house_door_b","bo_house_door_a", []), ("smoke_stain",0,"soot_a","0", []), ("brazier_with_fire",0,"brazier","bo_brazier", [ (ti_on_scene_prop_init, [ (set_position_delta,0,0,85), (particle_system_add_new, "psys_brazier_fire_1"), (particle_system_add_new, "psys_fire_sparks_1"), (set_position_delta,0,0,100), (particle_system_add_new, "psys_fire_glow_1"), (particle_system_emit, "psys_fire_glow_1",9000000), #(particle_system_add_new, "psys_fire_glow_1"), #(set_position_delta,0,0,95), #(particle_system_add_new, "psys_cooking_smoke"), ]), ]), ("cooking_fire",0,"fire_floor","0", [ (ti_on_scene_prop_init, [ (set_position_delta,0,0,12), (particle_system_add_new, "psys_cooking_fire_1"), (particle_system_add_new, "psys_fire_sparks_1"), (particle_system_add_new, "psys_cooking_smoke"), (set_position_delta,0,0,50), (particle_system_add_new, "psys_fire_glow_1"), (particle_system_emit, "psys_fire_glow_1",9000000), ]), ]), ("cauldron_a",0,"cauldron_a","bo_cauldron_a", []), ("fry_pan_a",0,"fry_pan_a","0", []), ("tripod_cauldron_a",0,"tripod_cauldron_a","bo_tripod_cauldron_a", []), ("tripod_cauldron_b",0,"tripod_cauldron_b","bo_tripod_cauldron_b", []), ("open_stable_a",0,"open_stable_a","bo_open_stable_a", []), ("open_stable_b",0,"open_stable_b","bo_open_stable_b", []), ("plate_a",0,"plate_a","0", []), ("plate_b",0,"plate_b","0", []), ("plate_c",0,"plate_c","0", []), ("lettuce",0,"lettuce","0", []), ("hanger",0,"hanger","0", []), ("knife_eating",0,"knife_eating","0", []), ("colander",0,"colander","0", []), ("ladle",0,"ladle","0", []), ("spoon",0,"spoon","0", []), ("skewer",0,"skewer","0", []), ("grape_a",0,"grape_a","0", []), ("grape_b",0,"grape_b","0", []), ("apple_a",0,"apple_a","0", []), ("apple_b",0,"apple_b","0", []), ("maize_a",0,"maize_a","0", []), ("maize_b",0,"maize_b","0", []), ("cabbage",0,"cabbage","0", []), ("cabbage_b",0,"cabbage_b","0", []), ("bean",0,"bean","0", []), ("basket_a",0,"basket_a","bo_basket_a", []), ("feeding_trough_a",0,"feeding_trough_a","bo_feeding_trough_a", []), ("marrow_a",0,"marrow_a","0", []), ("marrow_b",0,"marrow_b","0", []), ("squash_plant",0,"marrow_c","0", []), ("cheese_a",0,"cheese_a","0", []), ("cheese_b",0,"cheese_b","0", []), ("cheese_slice_a",0,"cheese_slice_a","0", []), ("bread_a",0,"bread_a","0", []), ("bread_b",0,"bread_b","0", []), ("bread_slice_a",0,"bread_slice_a","0", []), ("fish_a",0,"fish_a","0", []), ("fish_roasted_a",0,"fish_roasted_a","0", []), ("chicken_roasted",0,"chicken_roasted","0", []), ("food_steam",0,"0","0", [ (ti_on_scene_prop_init, [ (set_position_delta,0,0,0), (particle_system_add_new, "psys_food_steam"), ]), ]), ######################## ("city_smoke",0,"0","0", [ (ti_on_scene_prop_init, [ (store_time_of_day,reg(12)), (neg|is_between,reg(12),5,20), (set_position_delta,0,0,0), (particle_system_add_new, "psys_night_smoke_1"), ]), ]), ("city_fire_fly_night",0,"0","0", [ (ti_on_scene_prop_init, [ (store_time_of_day,reg(12)), (neg|is_between,reg(12),5,20), (set_position_delta,0,0,0), (particle_system_add_new, "psys_fire_fly_1"), ]), ]), ("city_fly_day",0,"0","0", [ (ti_on_scene_prop_init, [ (particle_system_add_new, "psys_bug_fly_1"), ]), ]), ("flue_smoke_tall",0,"0","0", [ (ti_on_scene_prop_init, [ (particle_system_add_new, "psys_flue_smoke_tall"), ]), ]), ("flue_smoke_short",0,"0","0", [ (ti_on_scene_prop_init, [ (particle_system_add_new, "psys_flue_smoke_short"), ]), ]), ("moon_beam",0,"0","0", [ (ti_on_scene_prop_init, [ (particle_system_add_new, "psys_moon_beam_1"), (particle_system_add_new, "psys_moon_beam_paricle_1"), ]), ]), ("fire_small",0,"0","0", [ (ti_on_scene_prop_init, [ (particle_system_add_new, "psys_fireplace_fire_small"), ]), ]), ("fire_big",0,"0","0", [ (ti_on_scene_prop_init, [ (particle_system_add_new, "psys_fireplace_fire_big"), ]), ]), ("battle_field_smoke",0,"0","0", [ (ti_on_scene_prop_init, [ (particle_system_add_new, "psys_war_smoke_tall"), ]), ]), ("Village_fire_big",0,"0","0", [ (ti_on_scene_prop_init, [ (particle_system_add_new, "psys_village_fire_big"), (set_position_delta,0,0,100), (particle_system_add_new, "psys_village_fire_smoke_big"), ]), ]), ######################### ("candle_a",0,"candle_a","0", [ (ti_on_scene_prop_init, [ (set_position_delta,0,0,27), (particle_system_add_new, "psys_candle_light"), ]), ]), ("candle_b",0,"candle_b","0", [ (ti_on_scene_prop_init, [ (set_position_delta,0,0,25), (particle_system_add_new, "psys_candle_light"), ]), ]), ("candle_c",0,"candle_c","0", [ (ti_on_scene_prop_init, [ (set_position_delta,0,0,10), (particle_system_add_new, "psys_candle_light_small"), ]), ]), ("lamp_a",0,"lamp_a","0", [ (ti_on_scene_prop_init, [ (set_position_delta,66,0,2), (particle_system_add_new, "psys_candle_light"), ]), ]), ("lamp_b",0,"lamp_b","0", [ (ti_on_scene_prop_init, [ (set_position_delta,65,0,-7), (particle_system_add_new, "psys_lamp_fire"), (set_position_delta,70,0,-5), (particle_system_add_new, "psys_fire_glow_1"), (particle_system_emit, "psys_fire_glow_1",9000000), (play_sound, "snd_fire_loop", 0), ]), ]), ("hook_a",0,"hook_a","0", []), ("window_night",0,"window_night","0", []), ("fried_pig",0,"fried_pig","0", []), ("village_oven",0,"village_oven","bo_village_oven", []), ("dungeon_water_drops",0,"0","0", [ (ti_on_scene_prop_init, [ (particle_system_add_new, "psys_dungeon_water_drops"), ]), ]), ("shadow_circle_1",0,"shadow_circle_1","0", []), ("shadow_circle_2",0,"shadow_circle_2","0", []), ("shadow_square_1",0,"shadow_square_1","0", []), ("shadow_square_2",0,"shadow_square_2","0", []), ("wheelbarrow",0,"wheelbarrow","bo_wheelbarrow", []), ("gourd",sokf_destructible|spr_hit_points(1),"gourd","bo_gourd", [ (ti_on_scene_prop_destroy, [ (store_trigger_param_1, ":instance_no"), (val_add, "$g_last_destroyed_gourds", 1), (prop_instance_get_position, pos1, ":instance_no"), (copy_position, pos2, pos1), (position_set_z, pos2, -100000), (particle_system_burst, "psys_gourd_smoke", pos1, 2), (particle_system_burst, "psys_gourd_piece_1", pos1, 1), (particle_system_burst, "psys_gourd_piece_2", pos1, 5), (prop_instance_animate_to_position, ":instance_no", pos2, 1), (play_sound, "snd_gourd_destroyed"), ]), ]), ("gourd_spike",0,"gourd_spike","bo_gourd_spike",[]), ("obstacle_fence_1",0,"fence","bo_fence", []), ("obstacle_fallen_tree_a",0,"destroy_tree_a","bo_destroy_tree_a", []), ("obstacle_fallen_tree_b",0,"destroy_tree_b","bo_destroy_tree_b", []), ]
Python
import string from header_common import * from module_info import * from module_strings import * from process_common import * def save_strings(strings): ofile = open(export_dir + "strings.txt","w") ofile.write("stringsfile version 1\n") ofile.write("%d\n"%len(strings)) for i_string in xrange(len(strings)): str = strings[i_string] ofile.write("str_%s %s\n"%(convert_to_identifier(str[0]),replace_spaces(str[1]))) ofile.close() def save_python_header(): ofile = open("./ID_strings.py","w") for i_string in xrange(len(strings)): ofile.write("str_%s = %d\n"%(convert_to_identifier(strings[i_string][0]),i_string)) ofile.write("\n\n") ofile.close() print "Exporting strings..." save_python_header() save_strings(strings)
Python
from header_factions import * #################################################################################################################### # Each faction record contains the following fields: # 1) Faction id: used for referencing factions in other files. # The prefix fac_ is automatically added before each faction id. # 2) Faction name. # 3) Faction flags. See header_factions.py for a list of available flags # 4) Faction coherence. Relation between members of this faction. # 5) Relations. This is a list of relation records. # Each relation record is a tuple that contains the following fields: # 5.1) Faction. Which other faction this relation is referring to # 5.2) Value: Relation value between the two factions. # Values range between -1 and 1. # 6) Ranks # 7) Faction color (default is gray) #################################################################################################################### default_kingdom_relations = [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.05),("mountain_bandits", -0.02),("forest_bandits", -0.02)] factions = [ ("no_faction","No Faction",0, 0.9, [], []), ("commoners","Commoners",0, 0.1,[("player_faction",0.1)], []), ("outlaws","Outlaws", max_player_rating(-30), 0.5,[("commoners",-0.6),("player_faction",-0.15)], [], 0x888888), # Factions before this point are hardwired into the game end their order should not be changed. ("neutral","Neutral",0, 0.1,[("player_faction",0.0)], [],0xFFFFFF), ("innocents","Innocents", ff_always_hide_label, 0.5,[("outlaws",-0.05)], []), ("merchants","Merchants", ff_always_hide_label, 0.5,[("outlaws",-0.5),], []), ("dark_knights","Dark Knights", 0, 0.5,[("innocents",-0.9),("player_faction",-0.4)], []), ("culture_1", "culture_1", 0, 0.9, [], []), ("culture_2", "culture_2", 0, 0.9, [], []), ("culture_3", "culture_3", 0, 0.9, [], []), ("culture_4", "culture_4", 0, 0.9, [], []), ("culture_5", "culture_5", 0, 0.9, [], []), # ("swadian_caravans","Swadian Caravans", 0, 0.5,[("outlaws",-0.8), ("dark_knights",-0.2)], []), # ("vaegir_caravans","Vaegir Caravans", 0, 0.5,[("outlaws",-0.8), ("dark_knights",-0.2)], []), ("player_faction","Player Faction",0, 0.9, [], []), ("player_supporters_faction","Player Faction",0, 0.9, [("player_faction",1.00),("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], []), ("kingdom_1", "Kingdom of Swadia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xDD8844), ("kingdom_2", "Kingdom of Vaegirs", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x33DD33), ("kingdom_3", "Khergit Khanate", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xCC99FF), ("kingdom_4", "Kingdom of Nords", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xDDDD33), ("kingdom_5", "Kingdom of Rhodoks", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x33DDDD), ## ("kingdom_1_rebels", "Swadian rebels", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xCC2211), ## ("kingdom_2_rebels", "Vaegir rebels", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xCC2211), ## ("kingdom_3_rebels", "Khergit rebels", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xCC2211), ## ("kingdom_4_rebels", "Nord rebels", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xCC2211), ## ("kingdom_5_rebels", "Rhodok rebels", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xCC2211), ("kingdoms_end","kingdoms_end", 0, 0,[], []), ("robber_knights", "robber_knights", 0, 0.1, [], []), ("khergits","Khergits", 0, 0.5,[("player_faction",0.0)], []), ("black_khergits","Black Khergits", 0, 0.5,[("player_faction",-0.3),("kingdom_1",-0.02),("kingdom_2",-0.02)], []), ## ("rebel_peasants","Rebel Peasants", 0, 0.5,[("vaegirs",-0.5),("player_faction",0.0)], []), ("manhunters","Manhunters", 0, 0.5,[("outlaws",-0.6),("player_faction",0.1)], []), ("deserters","Deserters", 0, 0.5,[("manhunters",-0.6),("merchants",-0.5),("player_faction",-0.1)], [], 0x888888), ("mountain_bandits","Mountain Bandits", 0, 0.5,[("commoners",-0.2),("merchants",-0.5),("manhunters",-0.6),("player_faction",-0.15)], [], 0x888888), ("forest_bandits","Forest Bandits", 0, 0.5,[("commoners",-0.2),("merchants",-0.5),("manhunters",-0.6),("player_faction",-0.15)], [], 0x888888), ("undeads","Undeads", max_player_rating(-30), 0.5,[("commoners",-0.7),("player_faction",-0.5)], []), ("slavers","Slavers", 0, 0.1, [], []), ("peasant_rebels","Peasant Rebels", 0, 1.0,[("noble_refugees",-1.0),("player_faction",-0.4)], []), ("noble_refugees","Noble Refugees", 0, 0.5,[], []), ]
Python
from module_info import * from module_factions import * from process_common import * faction_name_pos = 0 faction_flags_pos = 2 faction_coherence_pos = 3 faction_relations_pos = 4 faction_ranks_pos = 5 def compile_relations(): relations = [] for i in xrange(len(factions)): r = [0.0 for j in range(len(factions))] relations.append(r) for i_faction in xrange(len(factions)): relations[i_faction][i_faction] = factions[i_faction][faction_coherence_pos] rels = factions[i_faction][faction_relations_pos] for rel in rels: rel_name = rel[0] other_pos = -1 for j_f in xrange(len(factions)): if factions[j_f][faction_name_pos] == rel_name: other_pos = j_f if other_pos == -1: print "ERROR faction not found: "+ rel_name else: relations[other_pos][i_faction] = rel[1] relations[i_faction][other_pos] = rel[1] return relations def save_factions(relations): file = open(export_dir + "factions.txt","w") file.write("factionsfile version 1\n") file.write("%d\n"%len(factions)) for i_faction in xrange(len(factions)): faction = factions[i_faction] fac_color = 0xAAAAAA if len(faction) == 7: fac_color = faction[6] file.write("fac_%s %s %d %d \n"%(convert_to_identifier(faction[0]), replace_spaces(faction[1]), faction[2], fac_color)) for reln in relations[i_faction]: file.write(" %f "%reln) file.write("\n") ranks = [] if (len(faction) > (faction_ranks_pos)): ranks = faction[faction_ranks_pos] file.write("%d "%(len(ranks))) for rank in ranks: file.write(" %s "%(replace_spaces(rank))) file.close() def two_to_pow(x): result = 1 for i in xrange(x): result = result * 2 return result def save_python_header(): file = open("./ID_factions.py","w") for i_faction in xrange(len(factions)): file.write("fac_%s = %d\n"%(factions[i_faction][0],i_faction)) file.write("\n\n") file.close() print "Exporting faction data..." save_python_header() relations = compile_relations() save_factions(relations)
Python
from header_common import * from header_parties import * from ID_troops import * from ID_factions import * from ID_map_icons import * pmf_is_prisoner = 0x0001 #################################################################################################################### # Each party template record contains the following fields: # 1) Party-template id: used for referencing party-templates in other files. # The prefix pt_ is automatically added before each party-template id. # 2) Party-template name. # 3) Party flags. See header_parties.py for a list of available flags # 4) Menu. ID of the menu to use when this party is met. The value 0 uses the default party encounter system. # 5) Faction # 6) Personality. See header_parties.py for an explanation of personality flags. # 7) List of stacks. Each stack record is a tuple that contains the following fields: # 7.1) Troop-id. # 7.2) Minimum number of troops in the stack. # 7.3) Maximum number of troops in the stack. # 7.4) Member flags(optional). Use pmf_is_prisoner to note that this member is a prisoner. # Note: There can be at most 6 stacks. #################################################################################################################### party_templates = [ ("none","none",icon_gray_knight,0,fac_commoners,merchant_personality,[]), ("rescued_prisoners","Rescued Prisoners",icon_gray_knight,0,fac_commoners,merchant_personality,[]), ("enemy","Enemy",icon_gray_knight,0,fac_undeads,merchant_personality,[]), ("hero_party","Hero Party",icon_gray_knight,0,fac_commoners,merchant_personality,[]), #################################################################################################################### # Party templates before this point are hard-wired into the game and should not be changed. #################################################################################################################### ## ("old_garrison","Old Garrison",icon_vaegir_knight,0,fac_neutral,merchant_personality,[]), ("village_defenders","Village Defenders",icon_peasant,0,fac_commoners,merchant_personality,[(trp_farmer,10,20),(trp_peasant_woman,0,4)]), ("cattle_herd","Cattle Herd",icon_cattle|carries_goods(10),0,fac_neutral,merchant_personality,[(trp_cattle,80,120)]), ## ("vaegir_nobleman","Vaegir Nobleman",icon_vaegir_knight|carries_goods(10)|pf_quest_party,0,fac_commoners,merchant_personality,[(trp_nobleman,1,1),(trp_vaegir_knight,2,6),(trp_vaegir_horseman,4,12)]), ## ("swadian_nobleman","Swadian Nobleman",icon_gray_knight|carries_goods(10)|pf_quest_party,0,fac_commoners,merchant_personality,[(trp_nobleman,1,1),(trp_swadian_knight,2,6),(trp_swadian_man_at_arms,4,12)]), # Ryan BEGIN ("looters","Looters",icon_axeman|carries_goods(8),0,fac_outlaws,bandit_personality,[(trp_looter,4,25)]), # Ryan END ("manhunters","Manhunters",icon_gray_knight,0,fac_manhunters,soldier_personality,[(trp_manhunter,9,40)]), ## ("peasant","Peasant",icon_peasant,0,fac_commoners,merchant_personality,[(trp_farmer,1,6),(trp_peasant_woman,0,7)]), # ("black_khergit_raiders","Black Khergit Raiders",icon_khergit_horseman_b|carries_goods(2),0,fac_black_khergits,bandit_personality,[(trp_black_khergit_guard,1,10),(trp_black_khergit_horseman,5,5)]), ("steppe_bandits","Steppe Bandits",icon_khergit|carries_goods(2),0,fac_outlaws,bandit_personality,[(trp_steppe_bandit,5,58)]), ("forest_bandits","Forest Bandits",icon_axeman|carries_goods(2),0,fac_forest_bandits,bandit_personality,[(trp_forest_bandit,5,52)]), ("mountain_bandits","Mountain Bandits",icon_axeman|carries_goods(2),0,fac_mountain_bandits,bandit_personality,[(trp_mountain_bandit,5,60)]), ("sea_raiders","Sea Raiders",icon_axeman|carries_goods(2),0,fac_outlaws,bandit_personality,[(trp_sea_raider,5,50)]), ("deserters","Deserters",icon_vaegir_knight|carries_goods(3),0,fac_deserters,bandit_personality,[]), ("merchant_caravan","Merchant Caravan",icon_gray_knight|carries_goods(20)|pf_auto_remove_in_town|pf_quest_party,0,fac_commoners,escorted_merchant_personality,[(trp_caravan_master,1,1),(trp_caravan_guard,5,25)]), ("troublesome_bandits","Troublesome Bandits",icon_axeman|carries_goods(9)|pf_quest_party,0,fac_outlaws,bandit_personality,[(trp_bandit,14,55)]), ("bandits_awaiting_ransom","Bandits Awaiting Ransom",icon_axeman|carries_goods(9)|pf_auto_remove_in_town|pf_quest_party,0,fac_neutral,bandit_personality,[(trp_bandit,24,58),(trp_kidnapped_girl,1,1,pmf_is_prisoner)]), ("kidnapped_girl","Kidnapped Girl",icon_woman|pf_quest_party,0,fac_neutral,merchant_personality,[(trp_kidnapped_girl,1,1)]), ## ("farmers","Farmers",icon_peasant,0,fac_innocents,merchant_personality,[(trp_farmer,11,22),(trp_peasant_woman,16,44)]), ("village_farmers","Village Farmers",icon_peasant,0,fac_innocents,merchant_personality,[(trp_farmer,5,10),(trp_peasant_woman,3,8)]), ## ("refugees","Refugees",icon_woman_b,0,fac_innocents,merchant_personality,[(trp_refugee,19,48)]), ## ("dark_hunters","Dark Hunters",icon_gray_knight,0,fac_dark_knights,soldier_personality,[(trp_dark_knight,4,42),(trp_dark_hunter,13,25)]), ("spy_partners", "Unremarkable Travellers", icon_gray_knight|carries_goods(3)|pf_default_behavior|pf_quest_party,0,fac_neutral,merchant_personality,[(trp_spy_partner,1,1),(trp_caravan_guard,5,11)]), ("runaway_serfs","Runaway Serfs",icon_peasant|carries_goods(8)|pf_default_behavior|pf_quest_party,0,fac_neutral,merchant_personality,[(trp_farmer,6,7), (trp_peasant_woman,3,3)]), ("spy", "Ordinary Townsman", icon_gray_knight|carries_goods(3)|pf_default_behavior|pf_quest_party,0,fac_neutral,merchant_personality,[(trp_spy,1,1)]), ("sacrificed_messenger", "Sacrificed Messenger", icon_gray_knight|carries_goods(3)|pf_default_behavior|pf_quest_party,0,fac_neutral,merchant_personality,[]), ## ("conspirator", "Conspirators", icon_gray_knight|carries_goods(8)|pf_default_behavior|pf_quest_party,0,fac_neutral,merchant_personality,[(trp_conspirator,3,4)]), ## ("conspirator_leader", "Conspirator Leader", icon_gray_knight|carries_goods(8)|pf_default_behavior|pf_quest_party,0,fac_neutral,merchant_personality,[(trp_conspirator_leader,1,1)]), ## ("peasant_rebels", "Peasant Rebels", icon_peasant,0,fac_peasant_rebels,bandit_personality,[(trp_peasant_rebel,33,97)]), ## ("noble_refugees", "Noble Refugees", icon_gray_knight|carries_goods(12)|pf_quest_party,0,fac_noble_refugees,merchant_personality,[(trp_noble_refugee,3,5),(trp_noble_refugee_woman,5,7)]), ("forager_party","Foraging Party",icon_gray_knight|carries_goods(5)|pf_show_faction,0,fac_commoners,merchant_personality,[]), ("scout_party","Scouts",icon_gray_knight|carries_goods(1)|pf_show_faction,0,fac_commoners,bandit_personality,[]), ("patrol_party","Patrol",icon_gray_knight|carries_goods(2)|pf_show_faction,0,fac_commoners,soldier_personality,[]), # ("war_party", "War Party",icon_gray_knight|carries_goods(3),0,fac_commoners,soldier_personality,[]), ("messenger_party","Messenger",icon_gray_knight|pf_show_faction,0,fac_commoners,merchant_personality,[]), ("raider_party","Raiders",icon_gray_knight|carries_goods(16)|pf_quest_party,0,fac_commoners,bandit_personality,[]), ("raider_captives","Raider Captives",0,0,fac_commoners,0,[(trp_peasant_woman,6,30,pmf_is_prisoner)]), ("kingdom_caravan_party","Caravan",icon_mule|carries_goods(25)|pf_show_faction,0,fac_commoners,merchant_personality,[(trp_caravan_master,1,1),(trp_caravan_guard,12,40)]), ("prisoner_train_party","Prisoner Train",icon_gray_knight|carries_goods(5)|pf_show_faction,0,fac_commoners,merchant_personality,[]), ("default_prisoners","Default Prisoners",0,0,fac_commoners,0,[(trp_bandit,5,10,pmf_is_prisoner)]), ## ("merchant_party","Merchant",icon_mule|carries_goods(25)|pf_show_faction,0,fac_merchants,merchant_personality,[(trp_caravan_guard,12,40)]), ## ("merchant_party_reinforcement","Merchant Party Reinforcement",icon_mule|carries_goods(25),0,fac_merchants,merchant_personality,[(trp_caravan_guard,6,20)]), # Caravans ("center_reinforcements","Reinforcements",icon_axeman|carries_goods(16),0,fac_commoners,soldier_personality,[(trp_townsman,5,30),(trp_watchman,4,20)]), ("kingdom_hero_party","War Party",icon_flagbearer_a|pf_show_faction|pf_default_behavior,0,fac_commoners,soldier_personality,[]), # Reinforcements # ("default_reinforcements_a","default_reinforcements_a",0,0,fac_commoners,0,[(trp_caravan_guard,1,10),(trp_watchman,3,16),(trp_farmer,9,24)]), # ("default_reinforcements_b","default_reinforcements_b",0,0,fac_commoners,0,[(trp_mercenary,1,7),(trp_caravan_guard,3,10),(trp_watchman,3,15)]), # ("default_reinforcements_c","default_reinforcements_c",0,0,fac_commoners,0,[(trp_hired_blade,1,7),(trp_mercenary,3,10),(trp_caravan_guard,3,15)]), ("kingdom_1_reinforcements_a", "kingdom_1_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_swadian_militia,2,6),(trp_swadian_recruit,4,7)]), ("kingdom_1_reinforcements_b", "kingdom_1_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_swadian_crossbowman,2,6),(trp_swadian_skirmisher,4,7)]), ("kingdom_1_reinforcements_c", "kingdom_1_reinforcements_c", 0, 0, fac_commoners, 0, [(trp_swadian_man_at_arms,3,6)]), ("kingdom_2_reinforcements_a", "kingdom_2_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_vaegir_footman,2,6),(trp_vaegir_recruit,4,7)]), ("kingdom_2_reinforcements_b", "kingdom_2_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_vaegir_archer,2,6),(trp_vaegir_skirmisher,3,5),(trp_vaegir_footman,1,3)]), ("kingdom_2_reinforcements_c", "kingdom_2_reinforcements_c", 0, 0, fac_commoners, 0, [(trp_vaegir_horseman,3,6)]), ("kingdom_3_reinforcements_a", "kingdom_3_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_khergit_skirmisher,2,6),(trp_khergit_tribesman,4,7)]), ("kingdom_3_reinforcements_b", "kingdom_3_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_khergit_horse_archer,2,6),(trp_khergit_skirmisher,4,7)]), ("kingdom_3_reinforcements_c", "kingdom_3_reinforcements_c", 0, 0, fac_commoners, 0, [(trp_khergit_lancer,3,6)]), ("kingdom_4_reinforcements_a", "kingdom_4_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_nord_footman,4,8),(trp_nord_recruit,2,4)]), ("kingdom_4_reinforcements_b", "kingdom_4_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_nord_archer,1,3),(trp_nord_huntsman,3,5),(trp_nord_footman,2,5)]), ("kingdom_4_reinforcements_c", "kingdom_4_reinforcements_c", 0, 0, fac_commoners, 0, [(trp_nord_warrior,3,6)]), ("kingdom_5_reinforcements_a", "kingdom_5_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_rhodok_spearman,3,7),(trp_rhodok_tribesman,3,6)]), ("kingdom_5_reinforcements_b", "kingdom_5_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_rhodok_trained_crossbowman,2,6),(trp_rhodok_crossbowman,4,7)]), ("kingdom_5_reinforcements_c", "kingdom_5_reinforcements_c", 0, 0, fac_commoners, 0, [(trp_rhodok_sergeant,3,6)]), ## ("kingdom_1_reinforcements_a", "kingdom_1_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_swadian_footman,3,7),(trp_swadian_skirmisher,5,10),(trp_swadian_militia,11,26)]), ## ("kingdom_1_reinforcements_b", "kingdom_1_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_swadian_man_at_arms,5,10),(trp_swadian_infantry,5,10),(trp_swadian_crossbowman,3,8)]), ## ("kingdom_1_reinforcements_c", "kingdom_1_reinforcements_c", 0, 0, fac_commoners, 0, [(trp_swadian_knight,2,6),(trp_swadian_sergeant,2,5),(trp_swadian_sharpshooter,2,5)]), ## ## ("kingdom_2_reinforcements_a", "kingdom_2_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_vaegir_veteran,3,7),(trp_vaegir_skirmisher,5,10),(trp_vaegir_footman,11,26)]), ## ("kingdom_2_reinforcements_b", "kingdom_2_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_vaegir_horseman,4,9),(trp_vaegir_infantry,5,10),(trp_vaegir_archer,3,8)]), ## ("kingdom_2_reinforcements_c", "kingdom_2_reinforcements_c", 0, 0, fac_commoners, 0, [(trp_vaegir_knight,3,7),(trp_vaegir_guard,2,5),(trp_vaegir_marksman,2,5)]), ## ## ("kingdom_3_reinforcements_a", "kingdom_3_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_khergit_horseman,3,7),(trp_khergit_skirmisher,5,10),(trp_khergit_tribesman,11,26)]), ## ("kingdom_3_reinforcements_b", "kingdom_3_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_khergit_veteran_horse_archer,4,9),(trp_khergit_horse_archer,5,10),(trp_khergit_horseman,3,8)]), ## ("kingdom_3_reinforcements_c", "kingdom_3_reinforcements_c", 0, 0, fac_commoners, 0, [(trp_khergit_lancer,3,7),(trp_khergit_veteran_horse_archer,2,5),(trp_khergit_horse_archer,2,5)]), ## ## ("kingdom_4_reinforcements_a", "kingdom_4_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_nord_trained_footman,3,7),(trp_nord_footman,5,10),(trp_nord_recruit,11,26)]), ## ("kingdom_4_reinforcements_b", "kingdom_4_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_nord_veteran,4,9),(trp_nord_warrior,5,10),(trp_nord_footman,3,8)]), ## ("kingdom_4_reinforcements_c", "kingdom_4_reinforcements_c", 0, 0, fac_commoners, 0, [(trp_nord_champion,1,3),(trp_nord_veteran,2,5),(trp_nord_warrior,2,5)]), ## ## ("kingdom_5_reinforcements_a", "kingdom_5_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_rhodok_spearman,3,7),(trp_rhodok_crossbowman,5,10),(trp_rhodok_tribesman,11,26)]), ## ("kingdom_5_reinforcements_b", "kingdom_5_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_rhodok_trained_spearman,4,9),(trp_rhodok_spearman,5,10),(trp_rhodok_crossbowman,3,8)]), ## ("kingdom_5_reinforcements_c", "kingdom_5_reinforcements_c", 0, 0, fac_commoners, 0, [(trp_rhodok_sergeant,3,7),(trp_rhodok_veteran_spearman,2,5),(trp_rhodok_veteran_crossbowman,2,5)]), #("array", "Battle array", icon_gray_knight|pf_limit_members, no_menu, fac_player_faction, 0, []), ]
Python
prsnt_game_credits = 0 prsnt_banner_selection = 1 prsnt_custom_banner = 2 prsnt_banner_charge_positioning = 3 prsnt_banner_charge_selection = 4 prsnt_banner_background_selection = 5 prsnt_banner_flag_type_selection = 6 prsnt_banner_flag_map_type_selection = 7 prsnt_color_selection = 8 prsnt_marshall_selection = 9 prsnt_battle = 10 prsnt_sliders = 11 prsnt_arena_training = 12 prsnt_retirement = 13 prsnt_key_config = 14 prsnt_battle_formations = 15
Python
import string from header_common import * from module_info import * from module_skills import * from process_common import * skill_name_pos = 1 skill_attribute_pos = 2 skill_max_level_pos= 3 skill_desc_pos = 4 def save_skills(): ofile = open(export_dir + "skills.txt","w") ofile.write("%d\n"%(len(skills))) for i_skill in xrange(len(skills)): skill = skills[i_skill] ofile.write("skl_%s %s "%(skill[0], replace_spaces(skill[1]))) ofile.write("%d %d %s\n"%(skill[skill_attribute_pos],skill[skill_max_level_pos],(string.replace(skill[skill_desc_pos]," ","_")))) ofile.close() def save_python_header(): ofile = open("./ID_skills.py","w") for i_skill in xrange(len(skills)): ofile.write("skl_%s = %d\n"%(skills[i_skill][0],i_skill)) ofile.write("\n\n") ofile.close() print "Exporting skills..." save_python_header() save_skills()
Python
from module_info import * from module_particle_systems import * from process_common import * id_pos = 0 flags_pos = 1 mesh_name_pos = 2 num_particles_pos = 3 life_pos = 4 damping_pos = 5 gravity_pos = 6 turb_size_pos = 7 turb_wt_pos = 8 alpha_key_pos = 9 red_key_pos = alpha_key_pos + 2 green_key_pos = red_key_pos + 2 blue_key_pos = green_key_pos + 2 scale_key_pos = blue_key_pos + 2 emit_box_size_pos = scale_key_pos + 2 emit_velocity_pos = emit_box_size_pos + 1 emit_rndmness_pos = emit_velocity_pos + 1 angular_speed_pos = emit_rndmness_pos + 1 angular_damping_pos = angular_speed_pos + 1 def save_psys_keys(ofile, keys1, keys2): ofile.write("%f %f %f %f\n"%(keys1[0], keys1[1], keys2[0], keys2[1])) def save_particle_systems(): ofile = open(export_dir + "particle_systems.txt","w") ofile.write("particle_systemsfile version 1\n") ofile.write("%d\n"%len(particle_systems)) for psys in particle_systems: ofile.write("psys_%s %d %s "%(psys[0], psys[1], psys[2])) ofile.write("%d %f %f %f %f %f \n"%(psys[num_particles_pos], psys[life_pos], psys[damping_pos], psys[gravity_pos], psys[turb_size_pos], psys[turb_wt_pos])) save_psys_keys(ofile,psys[alpha_key_pos],psys[alpha_key_pos+1]) save_psys_keys(ofile,psys[red_key_pos],psys[red_key_pos+1]) save_psys_keys(ofile,psys[green_key_pos],psys[green_key_pos+1]) save_psys_keys(ofile,psys[blue_key_pos],psys[blue_key_pos+1]) save_psys_keys(ofile,psys[scale_key_pos],psys[scale_key_pos+1]) ofile.write("%f %f %f "%(psys[emit_box_size_pos][0],psys[emit_box_size_pos][1],psys[emit_box_size_pos][2])) ofile.write("%f %f %f "%(psys[emit_velocity_pos][0],psys[emit_velocity_pos][1],psys[emit_velocity_pos][2])) ofile.write("%f \n"%(psys[emit_rndmness_pos])) if (len(psys) >= (angular_speed_pos + 1)): ofile.write("%f "%(psys[angular_speed_pos])) else: ofile.write("0.0 ") if (len(psys) >= (angular_damping_pos + 1)): ofile.write("%f "%(psys[angular_damping_pos])) else: ofile.write("0.0 ") ofile.write("\n") ofile.close() def save_python_header(): ofile = open("./ID_particle_systems.py","w") for i_particle_system in xrange(len(particle_systems)): ofile.write("psys_%s = %d\n"%(particle_systems[i_particle_system][0],i_particle_system)) ofile.close() print "Exporting particle data..." save_particle_systems() save_python_header()
Python
pt_none = 0 pt_rescued_prisoners = 1 pt_enemy = 2 pt_hero_party = 3 pt_village_defenders = 4 pt_cattle_herd = 5 pt_looters = 6 pt_manhunters = 7 pt_steppe_bandits = 8 pt_forest_bandits = 9 pt_mountain_bandits = 10 pt_sea_raiders = 11 pt_deserters = 12 pt_merchant_caravan = 13 pt_troublesome_bandits = 14 pt_bandits_awaiting_ransom = 15 pt_kidnapped_girl = 16 pt_village_farmers = 17 pt_spy_partners = 18 pt_runaway_serfs = 19 pt_spy = 20 pt_sacrificed_messenger = 21 pt_forager_party = 22 pt_scout_party = 23 pt_patrol_party = 24 pt_messenger_party = 25 pt_raider_party = 26 pt_raider_captives = 27 pt_kingdom_caravan_party = 28 pt_prisoner_train_party = 29 pt_default_prisoners = 30 pt_center_reinforcements = 31 pt_kingdom_hero_party = 32 pt_kingdom_1_reinforcements_a = 33 pt_kingdom_1_reinforcements_b = 34 pt_kingdom_1_reinforcements_c = 35 pt_kingdom_2_reinforcements_a = 36 pt_kingdom_2_reinforcements_b = 37 pt_kingdom_2_reinforcements_c = 38 pt_kingdom_3_reinforcements_a = 39 pt_kingdom_3_reinforcements_b = 40 pt_kingdom_3_reinforcements_c = 41 pt_kingdom_4_reinforcements_a = 42 pt_kingdom_4_reinforcements_b = 43 pt_kingdom_4_reinforcements_c = 44 pt_kingdom_5_reinforcements_a = 45 pt_kingdom_5_reinforcements_b = 46 pt_kingdom_5_reinforcements_c = 47
Python
from header_map_icons import * from module_constants import * from header_operations import * from header_triggers import * from ID_sounds import * #################################################################################################################### # Each map icon record contains the following fields: # 1) Map icon id: used for referencing map icons in other files. # The prefix icon_ is automatically added before each map icon id. # 2) Map icon flags. See header_map icons.py for a list of available flags # 3) Mesh name. # 4) Scale. # 5) Sound. # 6) Offset x position for the flag icon. # 7) Offset y position for the flag icon. # 8) Offset z position for the flag icon. #################################################################################################################### banner_scale = 0.3 avatar_scale = 0.15 map_icons = [ ("player",0,"player", avatar_scale, snd_footstep_grass, 0.15, 0.173, 0), ("player_horseman",0,"player_horseman", avatar_scale, snd_gallop, 0.15, 0.173, 0), ("gray_knight",0,"knight_a", avatar_scale, snd_gallop, 0.15, 0.173, 0), ("vaegir_knight",0,"knight_b", avatar_scale, snd_gallop, 0.15, 0.173, 0), ("flagbearer_a",0,"flagbearer_a", avatar_scale, snd_gallop, 0.15, 0.173, 0), ("flagbearer_b",0,"flagbearer_b", avatar_scale, snd_gallop, 0.15, 0.173, 0), ("peasant",0,"peasant_a", avatar_scale,snd_footstep_grass, 0.15, 0.173, 0), ("khergit",0,"khergit_horseman", avatar_scale,snd_gallop, 0.15, 0.173, 0), ("khergit_horseman_b",0,"khergit_horseman_b", avatar_scale,snd_gallop, 0.15, 0.173, 0), ("axeman",0,"bandit_a", avatar_scale,snd_footstep_grass, 0.15, 0.173, 0), ("woman",0,"woman_a", avatar_scale,snd_footstep_grass, 0.15, 0.173, 0), ("woman_b",0,"woman_b", avatar_scale,snd_footstep_grass, 0.15, 0.173, 0), ("town",mcn_no_shadow,"map_town_a", 0.35,0), ("town_steppe",mcn_no_shadow,"map_town_steppe_a", 0.35,0), ("village_a",mcn_no_shadow,"map_village_a", 0.45, 0), ("village_burnt_a",mcn_no_shadow,"map_village_burnt_a", 0.45, 0), ("village_deserted_a",mcn_no_shadow,"map_village_deserted_a", 0.45, 0), ("camp",mcn_no_shadow,"camp_tent", 0.13, 0), ("ship",mcn_no_shadow,"boat_sail_on", 0.23, snd_footstep_grass, 0.0, 0.05, 0), ("ship_on_land",mcn_no_shadow,"boat_sail_off", 0.23, 0), ("castle_a",mcn_no_shadow,"map_castle_a", 0.35,0), ("castle_b",mcn_no_shadow,"map_castle_b", 0.35,0), ("castle_c",mcn_no_shadow,"map_castle_c", 0.35,0), ("castle_d",mcn_no_shadow,"map_castle_d", 0.35,0), ("town_snow",mcn_no_shadow,"map_town_snow_a", 0.35,0), ("village_snow_a",mcn_no_shadow,"map_village_snow_a", 0.45, 0), ("village_snow_burnt_a",mcn_no_shadow,"map_village_snow_burnt_a", 0.45, 0), ("village_snow_deserted_a",mcn_no_shadow,"map_village_snow_deserted_a", 0.45, 0), ("castle_snow_a",mcn_no_shadow,"map_castle_snow_a", 0.35,0), ("castle_snow_b",mcn_no_shadow,"map_castle_snow_b", 0.35,0), ("mule",0,"icon_mule", 0.2,snd_footstep_grass, 0.15, 0.173, 0), ("cattle",0,"icon_cow", 0.2,snd_footstep_grass, 0.15, 0.173, 0), ("training_ground",mcn_no_shadow,"training", 0.35,0), ("bridge_a",mcn_no_shadow,"map_river_bridge_a", 1.27,0), ("bridge_b",mcn_no_shadow,"map_river_bridge_b", 0.7,0), ("bridge_snow_a",mcn_no_shadow,"map_river_bridge_snow_a", 1.27,0), ("custom_banner_01",0,"custom_map_banner_01", banner_scale, 0, [ (ti_on_init_map_icon, [ (store_trigger_param_1, ":party_no"), (party_get_slot, ":leader_troop", ":party_no", slot_town_lord), (try_begin), (ge, ":leader_troop", 0), (cur_map_icon_set_tableau_material, "tableau_custom_banner_square", ":leader_troop"), (try_end), ]), ]), ("custom_banner_02",0,"custom_map_banner_02", banner_scale, 0, [ (ti_on_init_map_icon, [ (store_trigger_param_1, ":party_no"), (party_get_slot, ":leader_troop", ":party_no", slot_town_lord), (try_begin), (ge, ":leader_troop", 0), (cur_map_icon_set_tableau_material, "tableau_custom_banner_short", ":leader_troop"), (try_end), ]), ]), ("custom_banner_03",0,"custom_map_banner_03", banner_scale, 0, [ (ti_on_init_map_icon, [ (store_trigger_param_1, ":party_no"), (party_get_slot, ":leader_troop", ":party_no", slot_town_lord), (try_begin), (ge, ":leader_troop", 0), (cur_map_icon_set_tableau_material, "tableau_custom_banner_tall", ":leader_troop"), (try_end), ]), ]), # Banners ("banner_01",0,"map_flag_01", banner_scale,0), ("banner_02",0,"map_flag_02", banner_scale,0), ("banner_03",0,"map_flag_03", banner_scale,0), ("banner_04",0,"map_flag_04", banner_scale,0), ("banner_05",0,"map_flag_05", banner_scale,0), ("banner_06",0,"map_flag_06", banner_scale,0), ("banner_07",0,"map_flag_07", banner_scale,0), ("banner_08",0,"map_flag_08", banner_scale,0), ("banner_09",0,"map_flag_09", banner_scale,0), ("banner_10",0,"map_flag_10", banner_scale,0), ("banner_11",0,"map_flag_11", banner_scale,0), ("banner_12",0,"map_flag_12", banner_scale,0), ("banner_13",0,"map_flag_13", banner_scale,0), ("banner_14",0,"map_flag_14", banner_scale,0), ("banner_15",0,"map_flag_f21", banner_scale,0), ("banner_16",0,"map_flag_16", banner_scale,0), ("banner_17",0,"map_flag_17", banner_scale,0), ("banner_18",0,"map_flag_18", banner_scale,0), ("banner_19",0,"map_flag_19", banner_scale,0), ("banner_20",0,"map_flag_20", banner_scale,0), ("banner_21",0,"map_flag_21", banner_scale,0), ("banner_22",0,"map_flag_22", banner_scale,0), ("banner_23",0,"map_flag_23", banner_scale,0), ("banner_24",0,"map_flag_24", banner_scale,0), ("banner_25",0,"map_flag_25", banner_scale,0), ("banner_26",0,"map_flag_26", banner_scale,0), ("banner_27",0,"map_flag_27", banner_scale,0), ("banner_28",0,"map_flag_28", banner_scale,0), ("banner_29",0,"map_flag_29", banner_scale,0), ("banner_30",0,"map_flag_30", banner_scale,0), ("banner_31",0,"map_flag_31", banner_scale,0), ("banner_32",0,"map_flag_32", banner_scale,0), ("banner_33",0,"map_flag_33", banner_scale,0), ("banner_34",0,"map_flag_34", banner_scale,0), ("banner_35",0,"map_flag_35", banner_scale,0), ("banner_36",0,"map_flag_36", banner_scale,0), ("banner_37",0,"map_flag_37", banner_scale,0), ("banner_38",0,"map_flag_38", banner_scale,0), ("banner_39",0,"map_flag_39", banner_scale,0), ("banner_40",0,"map_flag_40", banner_scale,0), ("banner_41",0,"map_flag_41", banner_scale,0), ("banner_42",0,"map_flag_42", banner_scale,0), ("banner_43",0,"map_flag_43", banner_scale,0), ("banner_44",0,"map_flag_44", banner_scale,0), ("banner_45",0,"map_flag_45", banner_scale,0), ("banner_46",0,"map_flag_46", banner_scale,0), ("banner_47",0,"map_flag_47", banner_scale,0), ("banner_48",0,"map_flag_48", banner_scale,0), ("banner_49",0,"map_flag_49", banner_scale,0), ("banner_50",0,"map_flag_50", banner_scale,0), ("banner_51",0,"map_flag_51", banner_scale,0), ("banner_52",0,"map_flag_52", banner_scale,0), ("banner_53",0,"map_flag_53", banner_scale,0), ("banner_54",0,"map_flag_54", banner_scale,0), ("banner_55",0,"map_flag_55", banner_scale,0), ("banner_56",0,"map_flag_56", banner_scale,0), ("banner_57",0,"map_flag_57", banner_scale,0), ("banner_58",0,"map_flag_58", banner_scale,0), ("banner_59",0,"map_flag_59", banner_scale,0), ("banner_60",0,"map_flag_60", banner_scale,0), ("banner_61",0,"map_flag_61", banner_scale,0), ("banner_62",0,"map_flag_62", banner_scale,0), ("banner_63",0,"map_flag_63", banner_scale,0), ("banner_64",0,"map_flag_d01", banner_scale,0), ("banner_65",0,"map_flag_d02", banner_scale,0), ("banner_66",0,"map_flag_d03", banner_scale,0), ("banner_67",0,"map_flag_d04", banner_scale,0), ("banner_68",0,"map_flag_d05", banner_scale,0), ("banner_69",0,"map_flag_d06", banner_scale,0), ("banner_70",0,"map_flag_d07", banner_scale,0), ("banner_71",0,"map_flag_d08", banner_scale,0), ("banner_72",0,"map_flag_d09", banner_scale,0), ("banner_73",0,"map_flag_d10", banner_scale,0), ("banner_74",0,"map_flag_d11", banner_scale,0), ("banner_75",0,"map_flag_d12", banner_scale,0), ("banner_76",0,"map_flag_d13", banner_scale,0), ("banner_77",0,"map_flag_d14", banner_scale,0), ("banner_78",0,"map_flag_d15", banner_scale,0), ("banner_79",0,"map_flag_d16", banner_scale,0), ("banner_80",0,"map_flag_d17", banner_scale,0), ("banner_81",0,"map_flag_d18", banner_scale,0), ("banner_82",0,"map_flag_d19", banner_scale,0), ("banner_83",0,"map_flag_d20", banner_scale,0), ("banner_84",0,"map_flag_d21", banner_scale,0), ("banner_85",0,"map_flag_e01", banner_scale,0), ("banner_86",0,"map_flag_e02", banner_scale,0), ("banner_87",0,"map_flag_e03", banner_scale,0), ("banner_88",0,"map_flag_e04", banner_scale,0), ("banner_89",0,"map_flag_e05", banner_scale,0), ("banner_90",0,"map_flag_e06", banner_scale,0), ("banner_91",0,"map_flag_e07", banner_scale,0), ("banner_92",0,"map_flag_e08", banner_scale,0), ("banner_93",0,"map_flag_e09", banner_scale,0), ("banner_94",0,"map_flag_e10", banner_scale,0), ("banner_95",0,"map_flag_e11", banner_scale,0), ("banner_96",0,"map_flag_e12", banner_scale,0), ("banner_97",0,"map_flag_e13", banner_scale,0), ("banner_98",0,"map_flag_e14", banner_scale,0), ("banner_99",0,"map_flag_e15", banner_scale,0), ("banner_100",0,"map_flag_e16", banner_scale,0), ("banner_101",0,"map_flag_e17", banner_scale,0), ("banner_102",0,"map_flag_e18", banner_scale,0), ("banner_103",0,"map_flag_e19", banner_scale,0), ("banner_104",0,"map_flag_e20", banner_scale,0), ("banner_105",0,"map_flag_e21", banner_scale,0), ("banner_106",0,"map_flag_f01", banner_scale,0), ("banner_107",0,"map_flag_f02", banner_scale,0), ("banner_108",0,"map_flag_f03", banner_scale,0), ("banner_109",0,"map_flag_f04", banner_scale,0), ("banner_110",0,"map_flag_f05", banner_scale,0), ("banner_111",0,"map_flag_f06", banner_scale,0), ("banner_112",0,"map_flag_f07", banner_scale,0), ("banner_113",0,"map_flag_f08", banner_scale,0), ("banner_114",0,"map_flag_f09", banner_scale,0), ("banner_115",0,"map_flag_f10", banner_scale,0), ("banner_116",0,"map_flag_f11", banner_scale,0), ("banner_117",0,"map_flag_f12", banner_scale,0), ("banner_118",0,"map_flag_f13", banner_scale,0), ("banner_119",0,"map_flag_f14", banner_scale,0), ("banner_120",0,"map_flag_f15", banner_scale,0), ("banner_121",0,"map_flag_f16", banner_scale,0), ("banner_122",0,"map_flag_f17", banner_scale,0), ("banner_123",0,"map_flag_f18", banner_scale,0), ("banner_124",0,"map_flag_f19", banner_scale,0), ("banner_125",0,"map_flag_f20", banner_scale,0), ("banner_126",0,"map_flag_15", banner_scale,0), ]
Python
trp_player = 0 trp_temp_troop = 1 trp_game = 2 trp_unarmed_troop = 3 trp_random_town_sequence = 4 trp_tournament_participants = 5 trp_tutorial_maceman = 6 trp_tutorial_archer = 7 trp_tutorial_swordsman = 8 trp_novice_fighter = 9 trp_regular_fighter = 10 trp_veteran_fighter = 11 trp_champion_fighter = 12 trp_arena_training_fighter_1 = 13 trp_arena_training_fighter_2 = 14 trp_arena_training_fighter_3 = 15 trp_arena_training_fighter_4 = 16 trp_arena_training_fighter_5 = 17 trp_arena_training_fighter_6 = 18 trp_arena_training_fighter_7 = 19 trp_arena_training_fighter_8 = 20 trp_arena_training_fighter_9 = 21 trp_arena_training_fighter_10 = 22 trp_cattle = 23 trp_farmer = 24 trp_townsman = 25 trp_watchman = 26 trp_caravan_guard = 27 trp_mercenary_swordsman = 28 trp_hired_blade = 29 trp_mercenary_crossbowman = 30 trp_mercenary_horseman = 31 trp_mercenary_cavalry = 32 trp_mercenaries_end = 33 trp_swadian_recruit = 34 trp_swadian_militia = 35 trp_swadian_footman = 36 trp_swadian_infantry = 37 trp_swadian_sergeant = 38 trp_swadian_skirmisher = 39 trp_swadian_crossbowman = 40 trp_swadian_sharpshooter = 41 trp_swadian_man_at_arms = 42 trp_swadian_knight = 43 trp_swadian_messenger = 44 trp_swadian_deserter = 45 trp_swadian_prison_guard = 46 trp_swadian_castle_guard = 47 trp_vaegir_recruit = 48 trp_vaegir_footman = 49 trp_vaegir_skirmisher = 50 trp_vaegir_archer = 51 trp_vaegir_marksman = 52 trp_vaegir_veteran = 53 trp_vaegir_infantry = 54 trp_vaegir_guard = 55 trp_vaegir_horseman = 56 trp_vaegir_knight = 57 trp_vaegir_messenger = 58 trp_vaegir_deserter = 59 trp_vaegir_prison_guard = 60 trp_vaegir_castle_guard = 61 trp_khergit_tribesman = 62 trp_khergit_skirmisher = 63 trp_khergit_horseman = 64 trp_khergit_horse_archer = 65 trp_khergit_veteran_horse_archer = 66 trp_khergit_lancer = 67 trp_khergit_messenger = 68 trp_khergit_deserter = 69 trp_khergit_prison_guard = 70 trp_khergit_castle_guard = 71 trp_nord_recruit = 72 trp_nord_footman = 73 trp_nord_trained_footman = 74 trp_nord_warrior = 75 trp_nord_veteran = 76 trp_nord_champion = 77 trp_nord_huntsman = 78 trp_nord_archer = 79 trp_nord_veteran_archer = 80 trp_nord_messenger = 81 trp_nord_deserter = 82 trp_nord_prison_guard = 83 trp_nord_castle_guard = 84 trp_rhodok_tribesman = 85 trp_rhodok_spearman = 86 trp_rhodok_trained_spearman = 87 trp_rhodok_veteran_spearman = 88 trp_rhodok_sergeant = 89 trp_rhodok_crossbowman = 90 trp_rhodok_trained_crossbowman = 91 trp_rhodok_veteran_crossbowman = 92 trp_rhodok_sharpshooter = 93 trp_rhodok_messenger = 94 trp_rhodok_deserter = 95 trp_rhodok_prison_guard = 96 trp_rhodok_castle_guard = 97 trp_looter = 98 trp_bandit = 99 trp_brigand = 100 trp_mountain_bandit = 101 trp_forest_bandit = 102 trp_sea_raider = 103 trp_steppe_bandit = 104 trp_black_khergit_horseman = 105 trp_manhunter = 106 trp_slave_driver = 107 trp_slave_hunter = 108 trp_slave_crusher = 109 trp_slaver_chief = 110 trp_follower_woman = 111 trp_hunter_woman = 112 trp_fighter_woman = 113 trp_sword_sister = 114 trp_refugee = 115 trp_peasant_woman = 116 trp_caravan_master = 117 trp_kidnapped_girl = 118 trp_town_walker_1 = 119 trp_town_walker_2 = 120 trp_village_walker_1 = 121 trp_village_walker_2 = 122 trp_spy_walker_1 = 123 trp_spy_walker_2 = 124 trp_tournament_master = 125 trp_trainer = 126 trp_constable_hareck = 127 trp_ramun_the_slave_trader = 128 trp_guide = 129 trp_xerina = 130 trp_dranton = 131 trp_kradus = 132 trp_tutorial_trainer = 133 trp_galeas = 134 trp_farmer_from_bandit_village = 135 trp_trainer_1 = 136 trp_trainer_2 = 137 trp_trainer_3 = 138 trp_trainer_4 = 139 trp_trainer_5 = 140 trp_ransom_broker_1 = 141 trp_ransom_broker_2 = 142 trp_ransom_broker_3 = 143 trp_ransom_broker_4 = 144 trp_ransom_broker_5 = 145 trp_ransom_broker_6 = 146 trp_ransom_broker_7 = 147 trp_ransom_broker_8 = 148 trp_ransom_broker_9 = 149 trp_ransom_broker_10 = 150 trp_tavern_traveler_1 = 151 trp_tavern_traveler_2 = 152 trp_tavern_traveler_3 = 153 trp_tavern_traveler_4 = 154 trp_tavern_traveler_5 = 155 trp_tavern_traveler_6 = 156 trp_tavern_traveler_7 = 157 trp_tavern_traveler_8 = 158 trp_tavern_traveler_9 = 159 trp_tavern_traveler_10 = 160 trp_tavern_bookseller_1 = 161 trp_tavern_bookseller_2 = 162 trp_tavern_minstrel_1 = 163 trp_npc1 = 164 trp_npc2 = 165 trp_npc3 = 166 trp_npc4 = 167 trp_npc5 = 168 trp_npc6 = 169 trp_npc7 = 170 trp_npc8 = 171 trp_npc9 = 172 trp_npc10 = 173 trp_npc11 = 174 trp_npc12 = 175 trp_npc13 = 176 trp_npc14 = 177 trp_npc15 = 178 trp_npc16 = 179 trp_kingdom_heroes_including_player_begin = 180 trp_kingdom_1_lord = 181 trp_kingdom_2_lord = 182 trp_kingdom_3_lord = 183 trp_kingdom_4_lord = 184 trp_kingdom_5_lord = 185 trp_knight_1_1 = 186 trp_knight_1_2 = 187 trp_knight_1_3 = 188 trp_knight_1_4 = 189 trp_knight_1_5 = 190 trp_knight_1_6 = 191 trp_knight_1_7 = 192 trp_knight_1_8 = 193 trp_knight_1_9 = 194 trp_knight_1_10 = 195 trp_knight_1_11 = 196 trp_knight_1_12 = 197 trp_knight_1_13 = 198 trp_knight_1_14 = 199 trp_knight_1_15 = 200 trp_knight_1_16 = 201 trp_knight_1_17 = 202 trp_knight_1_18 = 203 trp_knight_1_19 = 204 trp_knight_1_20 = 205 trp_knight_2_1 = 206 trp_knight_2_2 = 207 trp_knight_2_3 = 208 trp_knight_2_4 = 209 trp_knight_2_5 = 210 trp_knight_2_6 = 211 trp_knight_2_7 = 212 trp_knight_2_8 = 213 trp_knight_2_9 = 214 trp_knight_2_10 = 215 trp_knight_2_11 = 216 trp_knight_2_12 = 217 trp_knight_2_13 = 218 trp_knight_2_14 = 219 trp_knight_2_15 = 220 trp_knight_2_16 = 221 trp_knight_2_17 = 222 trp_knight_2_18 = 223 trp_knight_2_19 = 224 trp_knight_2_20 = 225 trp_knight_3_1 = 226 trp_knight_3_2 = 227 trp_knight_3_3 = 228 trp_knight_3_4 = 229 trp_knight_3_5 = 230 trp_knight_3_6 = 231 trp_knight_3_7 = 232 trp_knight_3_8 = 233 trp_knight_3_9 = 234 trp_knight_3_10 = 235 trp_knight_3_11 = 236 trp_knight_3_12 = 237 trp_knight_3_13 = 238 trp_knight_3_14 = 239 trp_knight_3_15 = 240 trp_knight_3_16 = 241 trp_knight_3_17 = 242 trp_knight_3_18 = 243 trp_knight_3_19 = 244 trp_knight_3_20 = 245 trp_knight_4_1 = 246 trp_knight_4_2 = 247 trp_knight_4_3 = 248 trp_knight_4_4 = 249 trp_knight_4_5 = 250 trp_knight_4_6 = 251 trp_knight_4_7 = 252 trp_knight_4_8 = 253 trp_knight_4_9 = 254 trp_knight_4_10 = 255 trp_knight_4_11 = 256 trp_knight_4_12 = 257 trp_knight_4_13 = 258 trp_knight_4_14 = 259 trp_knight_4_15 = 260 trp_knight_4_16 = 261 trp_knight_4_17 = 262 trp_knight_4_18 = 263 trp_knight_4_19 = 264 trp_knight_4_20 = 265 trp_knight_5_1 = 266 trp_knight_5_2 = 267 trp_knight_5_3 = 268 trp_knight_5_4 = 269 trp_knight_5_5 = 270 trp_knight_5_6 = 271 trp_knight_5_7 = 272 trp_knight_5_8 = 273 trp_knight_5_9 = 274 trp_knight_5_10 = 275 trp_knight_5_11 = 276 trp_knight_5_12 = 277 trp_knight_5_13 = 278 trp_knight_5_14 = 279 trp_knight_5_15 = 280 trp_knight_5_16 = 281 trp_knight_5_17 = 282 trp_knight_5_18 = 283 trp_knight_5_19 = 284 trp_knight_5_20 = 285 trp_kingdom_1_pretender = 286 trp_kingdom_2_pretender = 287 trp_kingdom_3_pretender = 288 trp_kingdom_4_pretender = 289 trp_kingdom_5_pretender = 290 trp_knight_1_1_wife = 291 trp_knight_2_1_wife = 292 trp_knight_3_1_wife = 293 trp_knight_4_1_wife = 294 trp_knight_5_1_wife = 295 trp_knight_1_2_wife = 296 trp_knight_2_2_wife = 297 trp_knight_3_2_wife = 298 trp_knight_4_2_wife = 299 trp_knight_5_2_wife = 300 trp_knight_1_1_daughter = 301 trp_knight_2_1_daughter = 302 trp_knight_3_1_daughter = 303 trp_knight_4_1_daughter = 304 trp_knight_5_1_daughter = 305 trp_knight_1_2_daughter = 306 trp_knight_2_2_daughter = 307 trp_knight_3_2_daughter = 308 trp_knight_4_2_daughter = 309 trp_knight_5_2_daughter = 310 trp_heroes_end = 311 trp_town_1_seneschal = 312 trp_town_2_seneschal = 313 trp_town_3_seneschal = 314 trp_town_4_seneschal = 315 trp_town_5_seneschal = 316 trp_town_6_seneschal = 317 trp_town_7_seneschal = 318 trp_town_8_seneschal = 319 trp_town_9_seneschal = 320 trp_town_10_seneschal = 321 trp_town_11_seneschal = 322 trp_town_12_seneschal = 323 trp_town_13_seneschal = 324 trp_town_14_seneschal = 325 trp_town_15_seneschal = 326 trp_town_16_seneschal = 327 trp_town_17_seneschal = 328 trp_town_18_seneschal = 329 trp_castle_1_seneschal = 330 trp_castle_2_seneschal = 331 trp_castle_3_seneschal = 332 trp_castle_4_seneschal = 333 trp_castle_5_seneschal = 334 trp_castle_6_seneschal = 335 trp_castle_7_seneschal = 336 trp_castle_8_seneschal = 337 trp_castle_9_seneschal = 338 trp_castle_10_seneschal = 339 trp_castle_11_seneschal = 340 trp_castle_12_seneschal = 341 trp_castle_13_seneschal = 342 trp_castle_14_seneschal = 343 trp_castle_15_seneschal = 344 trp_castle_16_seneschal = 345 trp_castle_17_seneschal = 346 trp_castle_18_seneschal = 347 trp_castle_19_seneschal = 348 trp_castle_20_seneschal = 349 trp_castle_21_seneschal = 350 trp_castle_22_seneschal = 351 trp_castle_23_seneschal = 352 trp_castle_24_seneschal = 353 trp_castle_25_seneschal = 354 trp_castle_26_seneschal = 355 trp_castle_27_seneschal = 356 trp_castle_28_seneschal = 357 trp_castle_29_seneschal = 358 trp_castle_30_seneschal = 359 trp_castle_31_seneschal = 360 trp_castle_32_seneschal = 361 trp_castle_33_seneschal = 362 trp_castle_34_seneschal = 363 trp_castle_35_seneschal = 364 trp_castle_36_seneschal = 365 trp_castle_37_seneschal = 366 trp_castle_38_seneschal = 367 trp_castle_39_seneschal = 368 trp_castle_40_seneschal = 369 trp_town_1_arena_master = 370 trp_town_2_arena_master = 371 trp_town_3_arena_master = 372 trp_town_4_arena_master = 373 trp_town_5_arena_master = 374 trp_town_6_arena_master = 375 trp_town_7_arena_master = 376 trp_town_8_arena_master = 377 trp_town_9_arena_master = 378 trp_town_10_arena_master = 379 trp_town_11_arena_master = 380 trp_town_12_arena_master = 381 trp_town_13_arena_master = 382 trp_town_14_arena_master = 383 trp_town_15_arena_master = 384 trp_town_16_arena_master = 385 trp_town_17_arena_master = 386 trp_town_18_arena_master = 387 trp_town_1_armorer = 388 trp_town_2_armorer = 389 trp_town_3_armorer = 390 trp_town_4_armorer = 391 trp_town_5_armorer = 392 trp_town_6_armorer = 393 trp_town_7_armorer = 394 trp_town_8_armorer = 395 trp_town_9_armorer = 396 trp_town_10_armorer = 397 trp_town_11_armorer = 398 trp_town_12_armorer = 399 trp_town_13_armorer = 400 trp_town_14_armorer = 401 trp_town_15_armorer = 402 trp_town_16_armorer = 403 trp_town_17_armorer = 404 trp_town_18_armorer = 405 trp_town_1_weaponsmith = 406 trp_town_2_weaponsmith = 407 trp_town_3_weaponsmith = 408 trp_town_4_weaponsmith = 409 trp_town_5_weaponsmith = 410 trp_town_6_weaponsmith = 411 trp_town_7_weaponsmith = 412 trp_town_8_weaponsmith = 413 trp_town_9_weaponsmith = 414 trp_town_10_weaponsmith = 415 trp_town_11_weaponsmith = 416 trp_town_12_weaponsmith = 417 trp_town_13_weaponsmith = 418 trp_town_14_weaponsmith = 419 trp_town_15_weaponsmith = 420 trp_town_16_weaponsmith = 421 trp_town_17_weaponsmith = 422 trp_town_18_weaponsmith = 423 trp_town_1_tavernkeeper = 424 trp_town_2_tavernkeeper = 425 trp_town_3_tavernkeeper = 426 trp_town_4_tavernkeeper = 427 trp_town_5_tavernkeeper = 428 trp_town_6_tavernkeeper = 429 trp_town_7_tavernkeeper = 430 trp_town_8_tavernkeeper = 431 trp_town_9_tavernkeeper = 432 trp_town_10_tavernkeeper = 433 trp_town_11_tavernkeeper = 434 trp_town_12_tavernkeeper = 435 trp_town_13_tavernkeeper = 436 trp_town_14_tavernkeeper = 437 trp_town_15_tavernkeeper = 438 trp_town_16_tavernkeeper = 439 trp_town_17_tavernkeeper = 440 trp_town_18_tavernkeeper = 441 trp_town_1_merchant = 442 trp_town_2_merchant = 443 trp_town_3_merchant = 444 trp_town_4_merchant = 445 trp_town_5_merchant = 446 trp_town_6_merchant = 447 trp_town_7_merchant = 448 trp_town_8_merchant = 449 trp_town_9_merchant = 450 trp_town_10_merchant = 451 trp_town_11_merchant = 452 trp_town_12_merchant = 453 trp_town_13_merchant = 454 trp_town_14_merchant = 455 trp_town_15_merchant = 456 trp_town_16_merchant = 457 trp_town_17_merchant = 458 trp_town_18_merchant = 459 trp_salt_mine_merchant = 460 trp_town_1_horse_merchant = 461 trp_town_2_horse_merchant = 462 trp_town_3_horse_merchant = 463 trp_town_4_horse_merchant = 464 trp_town_5_horse_merchant = 465 trp_town_6_horse_merchant = 466 trp_town_7_horse_merchant = 467 trp_town_8_horse_merchant = 468 trp_town_9_horse_merchant = 469 trp_town_10_horse_merchant = 470 trp_town_11_horse_merchant = 471 trp_town_12_horse_merchant = 472 trp_town_13_horse_merchant = 473 trp_town_14_horse_merchant = 474 trp_town_15_horse_merchant = 475 trp_town_16_horse_merchant = 476 trp_town_17_horse_merchant = 477 trp_town_18_horse_merchant = 478 trp_town_1_mayor = 479 trp_town_2_mayor = 480 trp_town_3_mayor = 481 trp_town_4_mayor = 482 trp_town_5_mayor = 483 trp_town_6_mayor = 484 trp_town_7_mayor = 485 trp_town_8_mayor = 486 trp_town_9_mayor = 487 trp_town_10_mayor = 488 trp_town_11_mayor = 489 trp_town_12_mayor = 490 trp_town_13_mayor = 491 trp_town_14_mayor = 492 trp_town_15_mayor = 493 trp_town_16_mayor = 494 trp_town_17_mayor = 495 trp_town_18_mayor = 496 trp_village_1_elder = 497 trp_village_2_elder = 498 trp_village_3_elder = 499 trp_village_4_elder = 500 trp_village_5_elder = 501 trp_village_6_elder = 502 trp_village_7_elder = 503 trp_village_8_elder = 504 trp_village_9_elder = 505 trp_village_10_elder = 506 trp_village_11_elder = 507 trp_village_12_elder = 508 trp_village_13_elder = 509 trp_village_14_elder = 510 trp_village_15_elder = 511 trp_village_16_elder = 512 trp_village_17_elder = 513 trp_village_18_elder = 514 trp_village_19_elder = 515 trp_village_20_elder = 516 trp_village_21_elder = 517 trp_village_22_elder = 518 trp_village_23_elder = 519 trp_village_24_elder = 520 trp_village_25_elder = 521 trp_village_26_elder = 522 trp_village_27_elder = 523 trp_village_28_elder = 524 trp_village_29_elder = 525 trp_village_30_elder = 526 trp_village_31_elder = 527 trp_village_32_elder = 528 trp_village_33_elder = 529 trp_village_34_elder = 530 trp_village_35_elder = 531 trp_village_36_elder = 532 trp_village_37_elder = 533 trp_village_38_elder = 534 trp_village_39_elder = 535 trp_village_40_elder = 536 trp_village_41_elder = 537 trp_village_42_elder = 538 trp_village_43_elder = 539 trp_village_44_elder = 540 trp_village_45_elder = 541 trp_village_46_elder = 542 trp_village_47_elder = 543 trp_village_48_elder = 544 trp_village_49_elder = 545 trp_village_50_elder = 546 trp_village_51_elder = 547 trp_village_52_elder = 548 trp_village_53_elder = 549 trp_village_54_elder = 550 trp_village_55_elder = 551 trp_village_56_elder = 552 trp_village_57_elder = 553 trp_village_58_elder = 554 trp_village_59_elder = 555 trp_village_60_elder = 556 trp_village_61_elder = 557 trp_village_62_elder = 558 trp_village_63_elder = 559 trp_village_64_elder = 560 trp_village_65_elder = 561 trp_village_66_elder = 562 trp_village_67_elder = 563 trp_village_68_elder = 564 trp_village_69_elder = 565 trp_village_70_elder = 566 trp_village_71_elder = 567 trp_village_72_elder = 568 trp_village_73_elder = 569 trp_village_74_elder = 570 trp_village_75_elder = 571 trp_village_76_elder = 572 trp_village_77_elder = 573 trp_village_78_elder = 574 trp_village_79_elder = 575 trp_village_80_elder = 576 trp_village_81_elder = 577 trp_village_82_elder = 578 trp_village_83_elder = 579 trp_village_84_elder = 580 trp_village_85_elder = 581 trp_village_86_elder = 582 trp_village_87_elder = 583 trp_village_88_elder = 584 trp_village_89_elder = 585 trp_village_90_elder = 586 trp_merchants_end = 587 trp_zendar_chest = 588 trp_tutorial_chest_1 = 589 trp_tutorial_chest_2 = 590 trp_bonus_chest_1 = 591 trp_bonus_chest_2 = 592 trp_bonus_chest_3 = 593 trp_temp_array_a = 594 trp_temp_array_b = 595 trp_temp_array_c = 596 trp_stack_selection_amounts = 597 trp_stack_selection_ids = 598 trp_notification_menu_types = 599 trp_notification_menu_var1 = 600 trp_notification_menu_var2 = 601 trp_banner_background_color_array = 602 trp_local_merchant = 603 trp_tax_rebel = 604 trp_trainee_peasant = 605 trp_fugitive = 606 trp_spy = 607 trp_spy_partner = 608 trp_quick_battle_6_player = 609 trp_log_array_entry_type = 610 trp_log_array_entry_time = 611 trp_log_array_actor = 612 trp_log_array_center_object = 613 trp_log_array_center_object_lord = 614 trp_log_array_center_object_faction = 615 trp_log_array_troop_object = 616 trp_log_array_troop_object_faction = 617 trp_log_array_faction_object = 618
Python
from header_common import * from ID_animations import * from header_mission_templates import * from header_tableau_materials import * from header_items import * from module_constants import * #################################################################################################################### # Each tableau material contains the following fields: # 1) Tableau id (string): used for referencing tableaux in other files. The prefix tab_ is automatically added before each tableau-id. # 2) Tableau flags (int). See header_tableau_materials.py for a list of available flags # 3) Tableau sample material name (string). # 4) Tableau width (int). # 5) Tableau height (int). # 6) Tableau mesh min x (int): divided by 1000 and used when a mesh is auto-generated using the tableau material # 7) Tableau mesh min y (int): divided by 1000 and used when a mesh is auto-generated using the tableau material # 8) Tableau mesh max x (int): divided by 1000 and used when a mesh is auto-generated using the tableau material # 9) Tableau mesh max y (int): divided by 1000 and used when a mesh is auto-generated using the tableau material # 10) Operations block (list): A list of operations. See header_operations.py for reference. # The operations block is executed when the tableau is activated. # #################################################################################################################### #banner height = 200, width = 85 with wood, 75 without wood tableaus = [ ("game_character_sheet", 0, "tableau_with_transparency", 1024, 1024, 0, 0, 266, 532, [ (store_script_param, ":troop_no", 1), (cur_tableau_set_background_color, 0xFF888888), (cur_tableau_set_ambient_light, 10,11,15), (set_fixed_point_multiplier, 100), (cur_tableau_set_camera_parameters, 0, 40, 40, 0, 100000), (init_position, pos1), (position_set_z, pos1, 100), (position_set_x, pos1, -20), (position_set_y, pos1, -20), (cur_tableau_add_tableau_mesh, "tableau_troop_character_color", ":troop_no", pos1, 0, 0), (position_set_z, pos1, 200), (cur_tableau_add_tableau_mesh, "tableau_troop_character_alpha_mask", ":troop_no", pos1, 0, 0), (position_set_z, pos1, 300), ]), ("game_inventory_window", 0, "tableau_with_transparency", 1024, 1024, 0, 0, 180, 270, [ (store_script_param, ":troop_no", 1), (cur_tableau_set_background_color, 0xFF888888), (cur_tableau_set_ambient_light, 10,11,15), (set_fixed_point_multiplier, 100), (cur_tableau_set_camera_parameters, 0, 40, 40, 0, 100000), (init_position, pos1), (position_set_z, pos1, 100), (position_set_x, pos1, -20), (position_set_y, pos1, -20), (cur_tableau_add_tableau_mesh, "tableau_troop_inventory_color", ":troop_no", pos1, 0, 0), (position_set_z, pos1, 200), (cur_tableau_add_tableau_mesh, "tableau_troop_inventory_alpha_mask", ":troop_no", pos1, 0, 0), (position_set_z, pos1, 300), ]), ("game_party_window", 0, "tableau_with_transparency", 1024, 1024, 0, 0, 300, 300, [ (store_script_param, ":troop_no", 1), (cur_tableau_set_background_color, 0xFF888888), (cur_tableau_set_ambient_light, 10,11,15), (set_fixed_point_multiplier, 100), (cur_tableau_set_camera_parameters, 0, 40, 40, 0, 100000), (init_position, pos1), (position_set_z, pos1, 100), (position_set_x, pos1, -20), (position_set_y, pos1, -20), (cur_tableau_add_tableau_mesh, "tableau_troop_party_color", ":troop_no", pos1, 0, 0), (position_set_z, pos1, 200), (cur_tableau_add_tableau_mesh, "tableau_troop_party_alpha_mask", ":troop_no", pos1, 0, 0), (position_set_z, pos1, 300), ]), ("round_shield_1", 0, "sample_shield_round_1", 512, 256, 0, 0, 0, 0, [ (store_script_param, ":banner_mesh", 1), (set_fixed_point_multiplier, 100), (init_position, pos1), (position_set_x, pos1, -50), (position_set_y, pos1, 125), (cur_tableau_add_mesh, ":banner_mesh", pos1, 120, 0), (init_position, pos1), (position_set_z, pos1, 10), (cur_tableau_add_mesh, "mesh_tableau_mesh_shield_round_1", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 200, 100, 0, 100000), ]), ("round_shield_2", 0, "sample_shield_matte", 512, 256, 0, 0, 0, 0, [ (store_script_param, ":banner_mesh", 1), (set_fixed_point_multiplier, 100), (init_position, pos1), (position_set_x, pos1, -50), (position_set_y, pos1, 120), (cur_tableau_add_mesh, ":banner_mesh", pos1, 116, 0), (init_position, pos1), (position_set_z, pos1, 10), (cur_tableau_add_mesh, "mesh_tableau_mesh_shield_round_2", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 200, 100, 0, 100000), ]), ("round_shield_3", 0, "sample_shield_matte", 512, 256, 0, 0, 0, 0, [ (store_script_param, ":banner_mesh", 1), (set_fixed_point_multiplier, 100), (init_position, pos1), (position_set_x, pos1, -50), (position_set_y, pos1, 120), (cur_tableau_add_mesh, ":banner_mesh", pos1, 116, 0), (init_position, pos1), (position_set_z, pos1, 10), (cur_tableau_add_mesh, "mesh_tableau_mesh_shield_round_3", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 200, 100, 0, 100000), ]), ("round_shield_4", 0, "sample_shield_matte", 512, 256, 0, 0, 0, 0, [ (store_script_param, ":banner_mesh", 1), (set_fixed_point_multiplier, 100), (init_position, pos1), (position_set_x, pos1, -50), (position_set_y, pos1, 125), (cur_tableau_add_mesh, ":banner_mesh", pos1, 123, 0), (init_position, pos1), (position_set_z, pos1, 10), (cur_tableau_add_mesh, "mesh_tableau_mesh_shield_round_4", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 200, 100, 0, 100000), ]), ("round_shield_5", 0, "sample_shield_matte", 512, 256, 0, 0, 0, 0, [ (store_script_param, ":banner_mesh", 1), (set_fixed_point_multiplier, 100), (init_position, pos1), (position_set_x, pos1, -50), (position_set_y, pos1, 125), (cur_tableau_add_mesh, ":banner_mesh", pos1, 122, 0), (init_position, pos1), (position_set_z, pos1, 10), (cur_tableau_add_mesh, "mesh_tableau_mesh_shield_round_5", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 200, 100, 0, 100000), ]), ("small_round_shield_1", 0, "sample_shield_small_round_1", 512, 256, 0, 0, 0, 0, [ (store_script_param, ":banner_mesh", 1), (set_fixed_point_multiplier, 100), (init_position, pos1), (position_set_x, pos1, -50), (position_set_y, pos1, 130), (cur_tableau_add_mesh, ":banner_mesh", pos1, 127, 0), (init_position, pos1), (position_set_z, pos1, 10), (cur_tableau_add_mesh, "mesh_tableau_mesh_shield_small_round_1", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 200, 100, 0, 100000), ]), ("small_round_shield_2", 0, "sample_shield_small_round_2", 512, 256, 0, 0, 0, 0, [ (store_script_param, ":banner_mesh", 1), (set_fixed_point_multiplier, 100), (init_position, pos1), (position_set_x, pos1, -50), (position_set_y, pos1, 130), (cur_tableau_add_mesh, ":banner_mesh", pos1, 127, 0), (init_position, pos1), (position_set_z, pos1, 10), (cur_tableau_add_mesh, "mesh_tableau_mesh_shield_small_round_2", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 200, 100, 0, 100000), ]), ("small_round_shield_3", 0, "sample_shield_matte", 512, 256, 0, 0, 0, 0, [ (store_script_param, ":banner_mesh", 1), (set_fixed_point_multiplier, 100), (init_position, pos1), (position_set_x, pos1, -50), (position_set_y, pos1, 130), (cur_tableau_add_mesh, ":banner_mesh", pos1, 127, 0), (init_position, pos1), (position_set_z, pos1, 10), (cur_tableau_add_mesh, "mesh_tableau_mesh_shield_small_round_3", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 200, 100, 0, 100000), ]), ("kite_shield_1", 0, "sample_shield_matte", 512, 512, 0, 0, 0, 0, [ (store_script_param, ":banner_mesh", 1), (set_fixed_point_multiplier, 100), (init_position, pos1), (position_set_x, pos1, -60), (position_set_y, pos1, 140), (cur_tableau_add_mesh, ":banner_mesh", pos1, 116, 0), (init_position, pos1), (position_set_z, pos1, 10), (cur_tableau_add_mesh, "mesh_tableau_mesh_shield_kite_1", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 200, 200, 0, 100000), ]), ("kite_shield_2", 0, "sample_shield_matte", 512, 512, 0, 0, 0, 0, [ (store_script_param, ":banner_mesh", 1), (set_fixed_point_multiplier, 100), (init_position, pos1), (position_set_x, pos1, -57), (position_set_y, pos1, 140), (cur_tableau_add_mesh, ":banner_mesh", pos1, 116, 0), (init_position, pos1), (position_set_z, pos1, 10), (cur_tableau_add_mesh, "mesh_tableau_mesh_shield_kite_2", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 200, 200, 0, 100000), ]), ("kite_shield_3", 0, "sample_shield_matte", 512, 512, 0, 0, 0, 0, [ (store_script_param, ":banner_mesh", 1), (set_fixed_point_multiplier, 100), (init_position, pos1), (position_set_x, pos1, -57), (position_set_y, pos1, 140), (cur_tableau_add_mesh, ":banner_mesh", pos1, 116, 0), (init_position, pos1), (position_set_z, pos1, 10), (cur_tableau_add_mesh, "mesh_tableau_mesh_shield_kite_3", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 200, 200, 0, 100000), ]), ("kite_shield_4", 0, "sample_shield_matte", 512, 512, 0, 0, 0, 0, [ (store_script_param, ":banner_mesh", 1), (set_fixed_point_multiplier, 100), (init_position, pos1), (position_set_x, pos1, -50), (position_set_y, pos1, 160), (cur_tableau_add_mesh, ":banner_mesh", pos1, 120, 0), (init_position, pos1), (position_set_z, pos1, 10), (cur_tableau_add_mesh, "mesh_tableau_mesh_shield_kite_4", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 200, 200, 0, 100000), ]), ("heater_shield_1", 0, "sample_shield_matte", 512, 512, 0, 0, 0, 0, [ (store_script_param, ":banner_mesh", 1), (set_fixed_point_multiplier, 100), (init_position, pos1), (position_set_x, pos1, -60), (position_set_y, pos1, 151), (cur_tableau_add_mesh, ":banner_mesh", pos1, 116, 0), (init_position, pos1), (position_set_z, pos1, 10), (cur_tableau_add_mesh, "mesh_tableau_mesh_shield_heater_1", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 200, 200, 0, 100000), ]), ("heater_shield_2", 0, "sample_shield_matte", 512, 512, 0, 0, 0, 0, [ (store_script_param, ":banner_mesh", 1), (set_fixed_point_multiplier, 100), (init_position, pos1), (position_set_x, pos1, -50), (position_set_y, pos1, 150), (cur_tableau_add_mesh, ":banner_mesh", pos1, 116, 0), (init_position, pos1), (position_set_z, pos1, 10), (cur_tableau_add_mesh, "mesh_tableau_mesh_shield_heater_2", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 200, 200, 0, 100000), ]), ("pavise_shield_1", 0, "sample_shield_matte", 512, 512, 0, 0, 0, 0, [ (store_script_param, ":banner_mesh", 1), (set_fixed_point_multiplier, 100), (init_position, pos1), (position_set_x, pos1, -54), (position_set_y, pos1, 120), (cur_tableau_add_mesh, ":banner_mesh", pos1, 118, 0), (init_position, pos1), (position_set_z, pos1, 10), (cur_tableau_add_mesh, "mesh_tableau_mesh_shield_pavise_1", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 200, 200, 0, 100000), ]), ("pavise_shield_2", 0, "sample_shield_matte", 512, 512, 0, 0, 0, 0, [ (store_script_param, ":banner_mesh", 1), (set_fixed_point_multiplier, 100), (init_position, pos1), (position_set_x, pos1, -54), (position_set_y, pos1, 120), (cur_tableau_add_mesh, ":banner_mesh", pos1, 116, 0), (init_position, pos1), (position_set_z, pos1, 10), (cur_tableau_add_mesh, "mesh_tableau_mesh_shield_pavise_2", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 200, 200, 0, 100000), ]), ("heraldic_armor_a", 0, "sample_heraldic_armor_a", 512, 512, 0, 0, 0, 0, [ (store_script_param, ":banner_mesh", 1), (set_fixed_point_multiplier, 100), (store_sub, ":background_slot", ":banner_mesh", arms_meshes_begin), #banner_meshes_begin), (troop_get_slot, ":background_color", "trp_banner_background_color_array", ":background_slot"), (cur_tableau_set_background_color, ":background_color"), (init_position, pos1), (cur_tableau_add_mesh_with_vertex_color, "mesh_heraldic_armor_bg", pos1, 200, 100, ":background_color"), # (cur_tableau_add_mesh, "mesh_heraldic_armor_bg", pos1, 200, 0), (init_position, pos1), (position_set_z, pos1, 50), (position_set_x, pos1, -25), (position_set_y, pos1, 130), (cur_tableau_add_mesh, ":banner_mesh", pos1, 103, 0), # (cur_tableau_add_mesh, "mesh_banner_a01", pos1, 116, 0), (init_position, pos1), (position_set_z, pos1, 100), (cur_tableau_add_mesh, "mesh_tableau_mesh_heraldic_armor_a", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 200, 200, 0, 100000), ]), ("heraldic_armor_b", 0, "sample_heraldic_armor_b", 512, 512, 0, 0, 0, 0, [ (store_script_param, ":banner_mesh", 1), (set_fixed_point_multiplier, 100), (store_sub, ":background_slot", ":banner_mesh", arms_meshes_begin), (troop_get_slot, ":background_color", "trp_banner_background_color_array", ":background_slot"), (cur_tableau_set_background_color, ":background_color"), (init_position, pos1), (cur_tableau_add_mesh_with_vertex_color, "mesh_heraldic_armor_bg", pos1, 200, 100, ":background_color"), (init_position, pos1), (position_set_x, pos1, -5), (position_set_y, pos1, 130), (cur_tableau_add_mesh, ":banner_mesh", pos1, 113, 0), # (cur_tableau_add_mesh, "mesh_banner_a01", pos1, 116, 0), (init_position, pos1), (position_set_z, pos1, 100), (cur_tableau_add_mesh, "mesh_tableau_mesh_heraldic_armor_b", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 200, 200, 0, 100000), ]), ("heraldic_armor_c", 0, "sample_heraldic_armor_c", 512, 512, 0, 0, 0, 0, [ (store_script_param, ":banner_mesh", 1), (set_fixed_point_multiplier, 100), (store_sub, ":background_slot", ":banner_mesh", arms_meshes_begin), #banner_meshes_begin), (troop_get_slot, ":background_color", "trp_banner_background_color_array", ":background_slot"), (cur_tableau_set_background_color, ":background_color"), (init_position, pos1), (cur_tableau_add_mesh_with_vertex_color, "mesh_heraldic_armor_bg", pos1, 200, 100, ":background_color"), (init_position, pos1), (position_set_x, pos1, -0), (position_set_y, pos1, 130), (cur_tableau_add_mesh, ":banner_mesh", pos1, 115, 0), # (cur_tableau_add_mesh, "mesh_banner_a01", pos1, 116, 0), (init_position, pos1), (position_set_z, pos1, 100), (cur_tableau_add_mesh, "mesh_tableau_mesh_heraldic_armor_c", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 200, 200, 0, 100000), ]), ("heraldic_armor_d", 0, "sample_heraldic_armor_d", 512, 512, 0, 0, 0, 0, [ (store_script_param, ":banner_mesh", 1), (set_fixed_point_multiplier, 100), (store_sub, ":background_slot", ":banner_mesh", arms_meshes_begin), #banner_meshes_begin), (troop_get_slot, ":background_color", "trp_banner_background_color_array", ":background_slot"), (cur_tableau_set_background_color, ":background_color"), (init_position, pos1), (cur_tableau_add_mesh_with_vertex_color, "mesh_heraldic_armor_bg", pos1, 200, 100, ":background_color"), (init_position, pos1), (position_set_x, pos1, -0), (position_set_y, pos1, 130), (cur_tableau_add_mesh, ":banner_mesh", pos1, 113, 0), # (cur_tableau_add_mesh, "mesh_banner_a01", pos1, 116, 0), (init_position, pos1), (position_set_z, pos1, 100), (cur_tableau_add_mesh, "mesh_tableau_mesh_heraldic_armor_d", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 200, 200, 0, 100000), ]), ("troop_note_alpha_mask", 0, "mat_troop_portrait_mask", 1024, 1024, 0, 0, 400, 400, [ (store_script_param, ":troop_no", 1), (cur_tableau_set_background_color, 0x00888888), (cur_tableau_set_ambient_light, 10,11,15), (cur_tableau_render_as_alpha_mask), (call_script, "script_add_troop_to_cur_tableau", ":troop_no"), ]), ("troop_note_color", 0, "mat_troop_portrait_color", 1024, 1024, 0, 0, 400, 400, [ (store_script_param, ":troop_no", 1), (cur_tableau_set_background_color, 0xFFC6BB94), (cur_tableau_set_ambient_light, 10,11,15), (call_script, "script_add_troop_to_cur_tableau", ":troop_no"), ]), ("troop_character_alpha_mask", 0, "mat_troop_portrait_mask", 1024, 1024, 0, 0, 400, 400, [ (store_script_param, ":troop_no", 1), (cur_tableau_set_background_color, 0x00888888), (cur_tableau_set_ambient_light, 10,11,15), (cur_tableau_render_as_alpha_mask), (call_script, "script_add_troop_to_cur_tableau_for_character", ":troop_no"), ]), ("troop_character_color", 0, "mat_troop_portrait_color", 1024, 1024, 0, 0, 400, 400, [ (store_script_param, ":troop_no", 1), (cur_tableau_set_background_color, 0xFFE0CFB1), (cur_tableau_set_ambient_light, 10,11,15), (call_script, "script_add_troop_to_cur_tableau_for_character", ":troop_no"), ]), ("troop_inventory_alpha_mask", 0, "mat_troop_portrait_mask", 1024, 1024, 0, 0, 400, 400, [ (store_script_param, ":troop_no", 1), (cur_tableau_set_background_color, 0x00888888), (cur_tableau_set_ambient_light, 10,11,15), (cur_tableau_render_as_alpha_mask), (call_script, "script_add_troop_to_cur_tableau_for_inventory", ":troop_no"), ]), ("troop_inventory_color", 0, "mat_troop_portrait_color", 1024, 1024, 0, 0, 400, 400, [ (store_script_param, ":troop_no", 1), (cur_tableau_set_background_color, 0xFF6A583A), (cur_tableau_set_ambient_light, 10,11,15), (call_script, "script_add_troop_to_cur_tableau_for_inventory", ":troop_no"), ]), ("troop_party_alpha_mask", 0, "mat_troop_portrait_mask", 1024, 1024, 0, 0, 400, 400, [ (store_script_param, ":troop_no", 1), (cur_tableau_set_background_color, 0x00888888), (cur_tableau_set_ambient_light, 10,11,15), (cur_tableau_render_as_alpha_mask), (call_script, "script_add_troop_to_cur_tableau_for_party", ":troop_no"), ]), ("troop_party_color", 0, "mat_troop_portrait_color", 1024, 1024, 0, 0, 400, 400, [ (store_script_param, ":troop_no", 1), (cur_tableau_set_background_color, 0xFFBE9C72), (cur_tableau_set_ambient_light, 10,11,15), (call_script, "script_add_troop_to_cur_tableau_for_party", ":troop_no"), ]), ("troop_note_mesh", 0, "tableau_with_transparency", 1024, 1024, 0, 0, 350, 350, [ (store_script_param, ":troop_no", 1), (cur_tableau_set_background_color, 0xFF888888), (cur_tableau_set_ambient_light, 10,11,15), (set_fixed_point_multiplier, 100), (cur_tableau_set_camera_parameters, 0, 40, 40, 0, 100000), (init_position, pos1), (position_set_z, pos1, 100), (position_set_x, pos1, -20), (position_set_y, pos1, -20), (cur_tableau_add_tableau_mesh, "tableau_troop_note_color", ":troop_no", pos1, 0, 0), (position_set_z, pos1, 200), (cur_tableau_add_tableau_mesh, "tableau_troop_note_alpha_mask", ":troop_no", pos1, 0, 0), (position_set_z, pos1, 300), (cur_tableau_add_mesh, "mesh_portrait_blend_out", pos1, 0, 0), ]), ("center_note_mesh", 0, "tableau_with_transparency", 1024, 1024, 0, 0, 200, 200, [ (store_script_param, ":center_no", 1), (set_fixed_point_multiplier, 100), (cur_tableau_set_background_color, 0x00888888), (cur_tableau_set_ambient_light, 10,11,15), (init_position, pos8), (position_set_x, pos8, -210), (position_set_y, pos8, 200), (position_set_z, pos8, 300), (cur_tableau_add_point_light, pos8, 550,500,450), ## (party_get_slot, ":troop_no", ":center_no", slot_town_lord), ## (try_begin), ## (ge, ":troop_no", 0), ## (troop_get_slot, ":banner_spr", ":troop_no", slot_troop_banner_scene_prop), ## (store_add, ":banner_scene_props_end", banner_scene_props_end_minus_one, 1), ## (is_between, ":banner_spr", banner_scene_props_begin, ":banner_scene_props_end"), ## (val_sub, ":banner_spr", banner_scene_props_begin), ## (store_add, ":banner_mesh", ":banner_spr", banner_meshes_begin), ## (try_end), ## ## (init_position, pos1), ## (position_set_x, pos1, -60), ## (position_set_y, pos1, -100), ## (position_set_z, pos1, 230), ## (position_rotate_x, pos1, 90), ## (assign, ":banner_scale", 105), (cur_tableau_set_camera_parameters, 1, 10, 10, 10, 10000), ## (position_set_x, pos1, -100), (init_position, pos1), (position_set_z, pos1, 0), (position_set_z, pos1, -500), (init_position, pos1), (position_set_y, pos1, -100), (position_set_x, pos1, -100), (position_set_z, pos1, 100), (position_rotate_z, pos1, 200), ## (cur_tableau_add_mesh, ":banner_mesh", pos1, ":banner_scale", 0), (party_get_icon, ":map_icon", ":center_no"), (try_begin), (ge, ":map_icon", 0), (cur_tableau_add_map_icon, ":map_icon", pos1, 0), (try_end), (init_position, pos5), (position_set_x, pos5, -90), (position_set_z, pos5, 500), (position_set_y, pos5, 480), (position_rotate_x, pos5, -90), (position_rotate_z, pos5, 180), (position_rotate_x, pos5, -35), (cur_tableau_set_camera_position, pos5), ]), ("faction_note_mesh_for_menu", 0, "pic_arms_swadian", 1024, 512, 0, 0, 450, 225, [ (store_script_param, ":faction_no", 1), (cur_tableau_set_background_color, 0xFFFFFFFF), (set_fixed_point_multiplier, 100), (try_begin), (is_between, ":faction_no", "fac_kingdom_1", kingdoms_end), #Excluding player kingdom (store_add, ":banner_mesh", "mesh_pic_arms_swadian", ":faction_no"), (val_sub, ":banner_mesh", "fac_kingdom_1"), (init_position, pos1), (position_set_y, pos1, -5), (position_set_x, pos1, -45), (cur_tableau_add_mesh, ":banner_mesh", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 160, 80, 0, 100000), (try_end), ]), ("faction_note_mesh", 0, "pic_arms_swadian", 1024, 512, 0, 0, 500, 250, [ (store_script_param, ":faction_no", 1), (cur_tableau_set_background_color, 0xFFFFFFFF), (set_fixed_point_multiplier, 100), (try_begin), (is_between, ":faction_no", "fac_kingdom_1", kingdoms_end), #Excluding player kingdom (store_add, ":banner_mesh", "mesh_pic_arms_swadian", ":faction_no"), (val_sub, ":banner_mesh", "fac_kingdom_1"), (init_position, pos1), (position_set_y, pos1, -5), (cur_tableau_add_mesh, ":banner_mesh", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 100, 50, 0, 100000), (try_end), ]), ("faction_note_mesh_banner", 0, "tableau_with_transparency", 1024, 1024, 0, 0, 200, 200, [ (store_script_param, ":faction_no", 1), (set_fixed_point_multiplier, 100), (try_begin), (faction_get_slot, ":leader_troop", ":faction_no", slot_faction_leader), (ge, ":leader_troop", 0), (troop_get_slot, ":banner_spr", ":leader_troop", slot_troop_banner_scene_prop), (store_add, ":banner_scene_props_end", banner_scene_props_end_minus_one, 1), (is_between, ":banner_spr", banner_scene_props_begin, ":banner_scene_props_end"), (val_sub, ":banner_spr", banner_scene_props_begin), (store_add, ":banner_mesh", ":banner_spr", banner_meshes_begin), (init_position, pos1), (position_set_y, pos1, 100), (cur_tableau_add_mesh, ":banner_mesh", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 210, 210, 0, 100000), (try_end), ]), ("2_factions_mesh", 0, "tableau_with_transparency", 1024, 1024, 0, 0, 200, 200, [ (store_script_param, ":faction_no", 1), (store_mod, ":faction_no_2", ":faction_no", 128), (val_div, ":faction_no", 128), (val_add, ":faction_no", kingdoms_begin), (val_add, ":faction_no_2", kingdoms_begin), (set_fixed_point_multiplier, 100), (try_begin), (faction_get_slot, ":leader_troop", ":faction_no", slot_faction_leader), (ge, ":leader_troop", 0), (troop_get_slot, ":banner_spr", ":leader_troop", slot_troop_banner_scene_prop), (store_add, ":banner_scene_props_end", banner_scene_props_end_minus_one, 1), (is_between, ":banner_spr", banner_scene_props_begin, ":banner_scene_props_end"), (val_sub, ":banner_spr", banner_scene_props_begin), (store_add, ":banner_mesh", ":banner_spr", banner_meshes_begin), (init_position, pos1), (position_set_x, pos1, -50), (position_set_y, pos1, 100), (cur_tableau_add_mesh, ":banner_mesh", pos1, 0, 0), (try_end), (try_begin), (faction_get_slot, ":leader_troop", ":faction_no_2", slot_faction_leader), (ge, ":leader_troop", 0), (troop_get_slot, ":banner_spr", ":leader_troop", slot_troop_banner_scene_prop), (store_add, ":banner_scene_props_end", banner_scene_props_end_minus_one, 1), (is_between, ":banner_spr", banner_scene_props_begin, ":banner_scene_props_end"), (val_sub, ":banner_spr", banner_scene_props_begin), (store_add, ":banner_mesh", ":banner_spr", banner_meshes_begin), (init_position, pos1), (position_set_x, pos1, 50), (position_set_y, pos1, 100), (cur_tableau_add_mesh, ":banner_mesh", pos1, 0, 0), (try_end), (cur_tableau_set_camera_parameters, 0, 210, 210, 0, 100000), ]), ("color_picker", 0, "missiles", 32, 32, 0, 0, 0, 0, [ (store_script_param, ":color", 1), (set_fixed_point_multiplier, 100), (init_position, pos1), (cur_tableau_add_mesh, "mesh_color_picker", pos1, 0, 0), (position_move_z, pos1, 1), (position_move_x, pos1, -2), (position_move_y, pos1, -2), (cur_tableau_add_mesh_with_vertex_color, "mesh_white_plane", pos1, 200, 0, ":color"), (cur_tableau_set_camera_parameters, 0, 20, 20, 0, 100000), ]), ("custom_banner_square_no_mesh", 0, "missiles", 512, 512, 0, 0, 300, 300, [ (store_script_param, ":troop_no", 1), (set_fixed_point_multiplier, 100), (call_script, "script_draw_banner_to_region", ":troop_no", 0, 0, 10000, 10000, 9800, 9800, 10000, 10000, 0), (cur_tableau_set_camera_parameters, 0, 100, 100, 0, 100000), ]), ("custom_banner_default", 0, "missiles", 512, 256, 0, 0, 0, 0, [ (store_script_param, ":troop_no", 1), (set_fixed_point_multiplier, 100), (call_script, "script_draw_banner_to_region", ":troop_no", -9, -2, 7450, 19400, 7200, 18000, 9000, 10000, 0), (init_position, pos1), (position_set_z, pos1, 10), (cur_tableau_add_mesh, "mesh_tableau_mesh_custom_banner", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 100, 200, 0, 100000), ]), ("custom_banner_tall", 0, "missiles", 512, 256, 0, 0, 0, 0, [ (store_script_param, ":troop_no", 1), (set_fixed_point_multiplier, 100), (call_script, "script_draw_banner_to_region", ":troop_no", -9, 12, 8250, 18000, 8000, 21000, 10000, 10000, 0), (init_position, pos1), (position_set_z, pos1, 10), (cur_tableau_add_mesh, "mesh_tableau_mesh_custom_banner", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 100, 200, 0, 100000), ]), ("custom_banner_square", 0, "missiles", 256, 256, 0, 0, 0, 0, [ (store_script_param, ":troop_no", 1), (set_fixed_point_multiplier, 100), (call_script, "script_draw_banner_to_region", ":troop_no", -11, 10, 7700, 7700, 7500, 7500, 8300, 10000, 0), (init_position, pos1), (position_set_z, pos1, 10), (cur_tableau_add_mesh, "mesh_tableau_mesh_custom_banner_square", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 100, 100, 0, 100000), ]), ("custom_banner_short", 0, "missiles", 256, 512, 0, 0, 0, 0, [ (store_script_param, ":troop_no", 1), (set_fixed_point_multiplier, 100), (call_script, "script_draw_banner_to_region", ":troop_no", -10, 0, 8050, 5000, 4200, 4800, 6600, 10000, 0), (init_position, pos1), (position_set_z, pos1, 10), (cur_tableau_add_mesh, "mesh_tableau_mesh_custom_banner_short", pos1, 0, 0), (cur_tableau_set_camera_parameters, 0, 100, 50, 0, 100000), ]), ## ("custom_banner", 0, "missiles", 256, 512, 0, 0, 0, 0, ## [ ## (store_script_param, ":troop_no", 1), ## ## (set_fixed_point_multiplier, 100), ## (troop_get_slot, ":bg_type", ":troop_no", slot_troop_custom_banner_bg_type), ## (val_add, ":bg_type", custom_banner_backgrounds_begin), ## (troop_get_slot, ":bg_color_1", ":troop_no", slot_troop_custom_banner_bg_color_1), ## (troop_get_slot, ":bg_color_2", ":troop_no", slot_troop_custom_banner_bg_color_2), ## (troop_get_slot, ":num_charges", ":troop_no", slot_troop_custom_banner_num_charges), ## (troop_get_slot, ":positioning", ":troop_no", slot_troop_custom_banner_positioning), ## (call_script, "script_get_troop_custom_banner_num_positionings", ":troop_no"), ## (assign, ":num_positionings", reg0), ## (val_mod, ":positioning", ":num_positionings"), ## ## (init_position, pos1), ## ## (position_move_z, pos1, -10), ## (cur_tableau_add_mesh_with_vertex_color, ":bg_type", pos1, 0, 0, ":bg_color_1"), ## (position_move_z, pos1, -10), ## (cur_tableau_add_mesh_with_vertex_color, "mesh_custom_banner_bg", pos1, 0, 0, ":bg_color_2"), ## (init_position, pos1), ## (position_move_z, pos1, -50), ## (cur_tableau_add_mesh, "mesh_tableau_mesh_custom_banner", pos1, 0, 0), ## ## (call_script, "script_get_custom_banner_charge_type_position_scale_color", "trp_player", ":positioning"), ## (try_begin), ## (ge, ":num_charges", 1), ## (cur_tableau_add_mesh_with_vertex_color, reg0, pos0, reg1, 0, reg2), ## (try_end), ## (try_begin), ## (ge, ":num_charges", 2), ## (cur_tableau_add_mesh_with_vertex_color, reg3, pos1, reg4, 0, reg5), ## (try_end), ## (try_begin), ## (ge, ":num_charges", 3), ## (cur_tableau_add_mesh_with_vertex_color, reg6, pos2, reg7, 0, reg8), ## (try_end), ## (try_begin), ## (ge, ":num_charges", 4), ## (cur_tableau_add_mesh_with_vertex_color, reg9, pos3, reg10, 0, reg11), ## (try_end), ## ## (cur_tableau_set_camera_parameters, 0, 100, 200, 0, 100000), ## ]), ("background_selection", 0, "missiles", 512, 512, 0, 0, 100, 100, [ (store_script_param, ":banner_bg", 1), (troop_get_slot, ":old_bg", "trp_player", slot_troop_custom_banner_bg_type), (troop_set_slot, "trp_player", slot_troop_custom_banner_bg_type, ":banner_bg"), (set_fixed_point_multiplier, 100), (call_script, "script_draw_banner_to_region", "trp_player", 0, 0, 10000, 10000, 9800, 9800, 10000, 10000, 0), (cur_tableau_set_camera_parameters, 0, 100, 100, 0, 100000), (troop_set_slot, "trp_player", slot_troop_custom_banner_bg_type, ":old_bg"), ]), ("positioning_selection", 0, "missiles", 512, 512, 0, 0, 100, 100, [ (store_script_param, ":positioning", 1), (troop_get_slot, ":old_positioning", "trp_player", slot_troop_custom_banner_positioning), (troop_set_slot, "trp_player", slot_troop_custom_banner_positioning, ":positioning"), (set_fixed_point_multiplier, 100), (call_script, "script_draw_banner_to_region", "trp_player", 0, 0, 10000, 10000, 9800, 9800, 10000, 10000, 0), (cur_tableau_set_camera_parameters, 0, 100, 100, 0, 100000), (troop_set_slot, "trp_player", slot_troop_custom_banner_positioning, ":old_positioning"), ]), ("retirement_troop", 0, "troop_portrait", 1024, 1024, 0, 0, 600, 600, [ (store_script_param, ":type", 1), (set_fixed_point_multiplier, 100), (cur_tableau_set_background_color, 0x00000000), (cur_tableau_set_ambient_light, 10,11,15), (init_position, pos8), (position_set_x, pos8, -210), (position_set_y, pos8, 200), (position_set_z, pos8, 300), (cur_tableau_add_point_light, pos8, 550,500,450), (cur_tableau_set_override_flags, af_override_all), (try_begin), (eq, ":type", 0), (cur_tableau_add_override_item, "itm_pilgrim_hood"), (cur_tableau_add_override_item, "itm_pilgrim_disguise"), (cur_tableau_add_override_item, "itm_wrapping_boots"), (assign, ":animation", "anim_pose_1"), (else_try), (eq, ":type", 1), (cur_tableau_add_override_item, "itm_black_hood"), (cur_tableau_add_override_item, "itm_shirt"), (cur_tableau_add_override_item, "itm_wrapping_boots"), (assign, ":animation", "anim_pose_1"), (else_try), (eq, ":type", 2), (cur_tableau_add_override_item, "itm_coarse_tunic"), (cur_tableau_add_override_item, "itm_wrapping_boots"), (assign, ":animation", "anim_pose_2"), (else_try), (eq, ":type", 3), (cur_tableau_add_override_item, "itm_linen_tunic"), (cur_tableau_add_override_item, "itm_woolen_hose"), (assign, ":animation", "anim_pose_2"), (else_try), (eq, ":type", 4), (cur_tableau_add_override_item, "itm_leather_apron"), (cur_tableau_add_override_item, "itm_leather_boots"), (assign, ":animation", "anim_pose_3"), (else_try), (eq, ":type", 5), (cur_tableau_add_override_item, "itm_short_tunic"), (cur_tableau_add_override_item, "itm_leather_boots"), (assign, ":animation", "anim_pose_3"), (else_try), (eq, ":type", 6), (cur_tableau_add_override_item, "itm_tabard"), (cur_tableau_add_override_item, "itm_leather_boots"), (assign, ":animation", "anim_pose_4"), (else_try), (eq, ":type", 7), (cur_tableau_add_override_item, "itm_courtly_outfit"), (cur_tableau_add_override_item, "itm_mail_boots"), (assign, ":animation", "anim_pose_4"), (else_try), (eq, ":type", 8), (cur_tableau_add_override_item, "itm_nobleman_outfit"), (cur_tableau_add_override_item, "itm_woolen_hose"), (assign, ":animation", "anim_pose_4"), (else_try), (eq, ":type", 9), (cur_tableau_add_override_item, "itm_heraldic_mail_with_surcoat"), (cur_tableau_add_override_item, "itm_mail_boots"), (assign, ":animation", "anim_pose_5"), (else_try), (cur_tableau_add_override_item, "itm_heraldic_mail_with_tabard"), (cur_tableau_add_override_item, "itm_iron_greaves"), (assign, ":animation", "anim_pose_5"), (try_end), (init_position, pos2), (cur_tableau_set_camera_parameters, 1, 6, 6, 10, 10000), (init_position, pos5), (position_set_z, pos5, 96), (position_set_y, pos5, 350), ## (troop_get_inventory_slot, ":horse_item", "trp_player", ek_horse), ## (try_begin), ## (gt, ":horse_item", 0), ## (position_rotate_z, pos2, -40), ## (cur_tableau_add_horse, ":horse_item", pos2, anim_horse_stand, 0), ## (assign, ":animation", anim_ride_0), ## (position_set_z, pos5, 125), ## (position_set_y, pos5, 480), ## (try_end), (cur_tableau_add_troop, "trp_player", pos2, ":animation" , 0), (position_rotate_x, pos5, -90), (position_rotate_z, pos5, 180), (cur_tableau_set_camera_position, pos5), ]), ("retired_troop_alpha_mask", 0, "mat_troop_portrait_mask", 512, 512, 0, 0, 400, 400, [ (store_script_param, ":troop_no", 1), (cur_tableau_set_background_color, 0x00888888), (cur_tableau_set_ambient_light, 10,11,15), (cur_tableau_render_as_alpha_mask), (call_script, "script_add_troop_to_cur_tableau", ":troop_no"), ]), ("retired_troop_color", 0, "mat_troop_portrait_color", 512, 512, 0, 0, 400, 400, [ (store_script_param, ":troop_no", 1), (cur_tableau_set_background_color, 0xFFe7d399), (cur_tableau_set_ambient_light, 10,11,15), (call_script, "script_add_troop_to_cur_tableau", ":troop_no"), ]), ("retired_troop", 0, "tableau_with_transparency", 512, 512, 0, 0, 400, 400, [ (store_script_param, ":troop_no", 1), (cur_tableau_set_background_color, 0xFF888888), (cur_tableau_set_ambient_light, 10,11,15), (set_fixed_point_multiplier, 100), (cur_tableau_set_camera_parameters, 0, 40, 40, 0, 100000), (init_position, pos1), (position_set_z, pos1, 100), (position_set_x, pos1, -20), (position_set_y, pos1, -20), (cur_tableau_add_tableau_mesh, "tableau_retired_troop_color", ":troop_no", pos1, 0, 0), (position_set_z, pos1, 200), (cur_tableau_add_tableau_mesh, "tableau_retired_troop_alpha_mask", ":troop_no", pos1, 0, 0), ]), ]
Python
import string from module_info import * from module_presentations import * from ID_meshes import * from process_common import * from process_operations import * def save_presentations(variable_list,variable_uses,tag_uses,quick_strings): ofile = open(export_dir + "presentations.txt","w") ofile.write("presentationsfile version 1\n") ofile.write(" %d\n"%(len(presentations))) for presentation in presentations: ofile.write("prsnt_%s %d %d "%(presentation[0], presentation[1], presentation[2])) save_simple_triggers(ofile,presentation[3], variable_list,variable_uses,tag_uses,quick_strings) ofile.write("\n") ofile.close() def save_python_header(): file = open("./ID_presentations.py","w") for i_presentation in xrange(len(presentations)): file.write("prsnt_%s = %d\n"%(presentations[i_presentation][0],i_presentation)) file.close() print "Exporting presentations..." save_python_header() variable_uses = [] variables = load_variables(export_dir,variable_uses) tag_uses = load_tag_uses(export_dir) quick_strings = load_quick_strings(export_dir) save_presentations(variables,variable_uses,tag_uses,quick_strings) save_variables(export_dir,variables,variable_uses) save_tag_uses(export_dir,tag_uses) save_quick_strings(export_dir,quick_strings)
Python
#import string #import types from module_info import * from module_triggers import * from module_dialogs import * from module_simple_triggers import * from module_presentations import * from process_common import * from process_operations import * #------------------------------------------------------- def compile_all_global_vars(variable_list,variable_uses, triggers, sentences, game_menus, mission_templates, scripts, simple_triggers): temp_list = [] list_type = type(temp_list) print "#Triggers begin" for trigger in triggers: try: compile_global_vars(trigger[3], variable_list,variable_uses), compile_global_vars(trigger[4], variable_list,variable_uses), except: print "Error in trigger:" print trigger print "#Triggers end" print "#Dialogs begin" for sentence in sentences: try: compile_global_vars(sentence[2], variable_list,variable_uses), compile_global_vars(sentence[5], variable_list,variable_uses), except: print "Error in dialog line:" print sentence print "#Dialogs end" print "#Game menus begin" for game_menu in game_menus: try: compile_global_vars(game_menu[4], variable_list,variable_uses) menu_items = game_menu[5] for menu_item in menu_items: compile_global_vars(menu_item[1], variable_list,variable_uses) compile_global_vars(menu_item[3], variable_list,variable_uses) except: print "Error in game menu:" print game_menu print "#Game menus end" print "#Mission templates begin" for mission_template in mission_templates: try: mt_triggers = mission_template[5] for mt_trigger in mt_triggers: compile_global_vars(mt_trigger[3], variable_list,variable_uses) compile_global_vars(mt_trigger[4], variable_list,variable_uses) except: print "Error in mission template:" print mission_template print "#Mission templates end" print "#Presentations begin" for presentation in presentations: try: prsnt_triggers = presentation[3] for prsnt_trigger in prsnt_triggers: compile_global_vars(prsnt_trigger[1], variable_list,variable_uses) except: print "Error in presentation:" print presentation print "#Presentations end" print "#Scripts begin" for i_script in xrange(len(scripts)): try: func = scripts[i_script] if (type(func[1]) == list_type): compile_global_vars(func[1], variable_list,variable_uses) else: compile_global_vars(func[2], variable_list,variable_uses) except: print "Error in script:" print func print "#Scripts end" print "#Simple triggers begin" for simple_trigger in simple_triggers: try: compile_global_vars(simple_trigger[1] , variable_list,variable_uses) except: print "Error in simple trigger:" print simple_trigger print "#Simple triggers end" print "Compiling all global variables..." variables = [] variable_uses = [] compile_all_global_vars(variables, variable_uses,triggers, dialogs, game_menus, mission_templates, scripts, simple_triggers) save_variables(export_dir, variables,variable_uses)
Python
# Point export_dir to the folder you will be keeping your module # Make sure you use forward slashes (/) and NOT backward slashes (\) export_dir = "D:/Game/Mount&Blade/Modules/Test/"
Python
import string from header_common import * from module_info import * from module_meshes import * from process_common import * def save_meshes(): ofile = open(export_dir + "meshes.txt","w") ofile.write("%d\n"%len(meshes)) for i_mesh in xrange(len(meshes)): mesh = meshes[i_mesh] ofile.write("mesh_%s %d %s %f %f %f %f %f %f %f %f %f\n"%(mesh[0],mesh[1],replace_spaces(mesh[2]),mesh[3],mesh[4],mesh[5],mesh[6],mesh[7],mesh[8],mesh[9],mesh[10],mesh[11])) ofile.close() def save_python_header(): ofile = open("./ID_meshes.py","w") for i_mesh in xrange(len(meshes)): ofile.write("mesh_%s = %d\n"%(meshes[i_mesh][0],i_mesh)) ofile.write("\n\n") ofile.close() print "Exporting meshes..." save_python_header() save_meshes()
Python
from header_common import * from header_skills import * #################################################################################################################### # Each skill contains the following fields: # 1) Skill id (string): used for referencing skills in other files. The prefix skl_ is automatically added before each skill-id . # 2) Skill name (string). # 3) Skill flags (int). See header_skills.py for a list of available flags # 4) Maximum level of the skill (int). # 5) Skill description (string): used in character window for explaining the skills. # #################################################################################################################### #Hardcoded skills are {names (indexes, beginning with 0)}: # Trade (1) # Leadership (2) # Prisoner Management (3) # First Aid (9) # Surgery (10) # Wound Treatment (11) # Inventory Management (12) # Spotting (13) # Pathfinding (14) # Tactics (15) # Tracking (16) # Trainer (17) # Engineer (18) # Horse Archery (24) # Riding (25) # Athletics (26) # Shield (27) # Weapon Master (28) # Power Draw (34) # Power Throw (35) # Power Strike (36) # Ironflesh (37) # # The effects of these skills can only be removed if the skill is disabled with sf_inactive flag. # If you want to add a new skill, use the reserved skills or use non-hardcoded skills. skills = [ ("trade","Trade",sf_base_att_cha|sf_effects_party,10,"Every level of this skill reduces your trade penalty by 5%%. (Party skill)"), ("leadership","Leadership",sf_base_att_cha,10,"Every point increases maximum number of troops you can command by 5, increases your party morale and reduces troop wages by 5%%. (Leader skill)"), ("prisoner_management", "Prisoner Management",sf_base_att_cha,10,"Every level of this skill increases maximum number of prisoners by %d. (Leader skill)"), ("reserved_1","Reserved Skill 1",sf_base_att_cha|sf_inactive,10,"This is a reserved skill."), ("reserved_2","Reserved Skill 2",sf_base_att_cha|sf_inactive,10,"This is a reserved skill."), ("reserved_3","Reserved Skill 3",sf_base_att_cha|sf_inactive,10,"This is a reserved skill."), ("reserved_4","Reserved Skill 4",sf_base_att_cha|sf_inactive,10,"This is a reserved skill."), ("persuasion","Persuasion", sf_base_att_int,10, "This skill helps you make other people accept your point of view. (Personal skill)"), ("engineer","Engineer",sf_base_att_int|sf_effects_party,10,"This skill allows you to construct siege equipment and fief improvements more efficiently. (Party skill)"), ("first_aid", "First Aid",sf_base_att_int|sf_effects_party,10,"Heroes regain 5%% per skill level of hit-points lost during mission. (Party skill)"), ("surgery","Surgery",sf_base_att_int|sf_effects_party,10,"Each point to this skill gives a 4%% chance that a mortally struck party member will be wounded rather than killed. (Party skill)"), ("wound_treatment","Wound Treatment",sf_base_att_int|sf_effects_party,10,"Party healing speed is increased by 20%% per level of this skill. (Party skill)"), ("inventory_management","Inventory Management",sf_base_att_int,10,"Increases inventory capacity by +6 per skill level. (Leader skill)"), ("spotting","Spotting",sf_base_att_int|sf_effects_party,10,"Party seeing range is increased by 10%% per skill level. (Party skill)"), ("pathfinding","Path-finding",sf_base_att_int|sf_effects_party,10,"Party map speed is increased by 3%% per skill level. (Party skill)"), ("tactics","Tactics",sf_base_att_int|sf_effects_party,10,"Every two levels of this skill increases starting battle advantage by 1. (Party skill)"), ("tracking","Tracking",sf_base_att_int|sf_effects_party,10,"Tracks become more informative. (Party skill)"), ("trainer","Trainer",sf_base_att_int,10,"Every day, each hero with this skill adds some experience to every other member of the party whose level is lower than his/hers. Experience gained goes as: {0,4,10,16,23,30,38,46,55,65,80}. (Personal skill)"), ("reserved_5","Reserved Skill 5",sf_base_att_int|sf_inactive,10,"This is a reserved skill."), ("reserved_6","Reserved Skill 6",sf_base_att_int|sf_inactive,10,"This is a reserved skill."), ("reserved_7","Reserved Skill 7",sf_base_att_int|sf_inactive,10,"This is a reserved skill."), ("reserved_8","Reserved Skill 8",sf_base_att_int|sf_inactive,10,"This is a reserved skill."), ("looting","Looting",sf_base_att_agi|sf_effects_party,10,"This skill increases the amount of loot obtained by 10%% per skill level. (Party skill)"), ("horse_archery","Horse Archery",sf_base_att_agi,10,"Reduces damage and accuracy penalties for archery and throwing from horseback. (Personal skill)"), ("riding","Riding",sf_base_att_agi,10,"Enables you to ride horses of higher difficulty levels and increases your riding speed and manuever. (Personal skill)"), ("athletics","Athletics",sf_base_att_agi,10,"Improves your running speed. (Personal skill)"), ("shield","Shield",sf_base_att_agi,10,"Reduces damage to shields (by 8%% per skill level) and improves shield speed and coverage. (Personal skill)"), ("weapon_master","Weapon Master",sf_base_att_agi,10,"Makes it easier to learn weapon proficiencies and increases the proficiency limits. Limits go as: 60, 100, 140, 180, 220, 260, 300, 340, 380, 420. (Personal skill)"), ("reserved_9","Reserved Skill 9",sf_base_att_agi|sf_inactive,10,"This is a reserved skill."), ("reserved_10","Reserved Skill 10",sf_base_att_agi|sf_inactive,10,"This is a reserved skill."), ("reserved_11","Reserved Skill 11",sf_base_att_agi|sf_inactive,10,"This is a reserved skill."), ("reserved_12","Reserved Skill 12",sf_base_att_agi|sf_inactive,10,"This is a reserved skill."), ("reserved_13","Reserved Skill 13",sf_base_att_agi|sf_inactive,10,"This is a reserved skill."), ("power_draw","Power Draw",sf_base_att_str,10,"Lets character use more powerful bows. Each point to this skill (up to four plus power-draw requirement of the bow) increases bow damage by 14%%. (Personal skill)"), ("power_throw","Power Throw",sf_base_att_str,10,"Each point to this skill increases throwing damage by 10%%. (Personal skill)"), ("power_strike","Power Strike",sf_base_att_str,10,"Each point to this skill increases melee damage by 8%%. (Personal skill)"), ("ironflesh","Ironflesh",sf_base_att_str,10,"Each point to this skill increases hit points by +2. (Personal skill)"), ("reserved_14","Reserved Skill 14",sf_base_att_str|sf_inactive,10,"This is a reserved skill."), ("reserved_15","Reserved Skill 15",sf_base_att_str|sf_inactive,10,"This is a reserved skill."), ("reserved_16","Reserved Skill 16",sf_base_att_str|sf_inactive,10,"This is a reserved skill."), ("reserved_17","Reserved Skill 17",sf_base_att_str|sf_inactive,10,"This is a reserved skill."), ("reserved_18","Reserved Skill 18",sf_base_att_str|sf_inactive,10,"This is a reserved skill."), ]
Python
strings = [ ("no_string", "NO STRING!"), ("empty_string", " "), ("yes", "Yes."), ("no", "No."), # Strings before this point are hardwired. ("blank_string", " "), ("error_string", "ERROR!!!ERROR!!!!ERROR!!!ERROR!!!ERROR!!!ERROR!!!!ERROR!!!ERROR!!!!ERROR!!!ERROR!!!!ERROR!!!ERROR!!!!ERROR!!!ERROR!!!!ERROR!!!ERROR!!!!!"), ## ("none", "none"), ("noone", "no one"), ## ("nothing", "nothing"), ("s0", "{s0}"), ("blank_s1", " {s1}"), ("reg1", "{reg1}"), ("s50_comma_s51", "{s50}, {s51}"), ("s50_and_s51", "{s50} and {s51}"), ("s5_s_party", "{s5}'s Party"), ("given_by_s1_at_s2", "Given by {s1} at {s2}"), ("given_by_s1_in_wilderness", "Given by {s1} whilst in the field"), ("s7_raiders", "{s7} Raiders"), ("bandits_eliminated_by_another", "The troublesome bandits have been eliminated by another party."), ("msg_battle_won","Battle won! Press tab key to leave..."), ("tutorial_map1","You are now viewing the overland map. Left-click on the map to move your party to that location, enter the selected town, or pursue the selected party. Time will pause on the overland map if your party is not moving, waiting or resting. To wait anywhere simply press and hold down the space bar."), ("change_color_1", "Change Color 1"), ("change_color_2", "Change Color 2"), ("change_background", "Change Background Pattern"), ("change_flag_type", "Change Flag Type"), ("change_map_flag_type", "Change Map Flag Type"), ("randomize", "Randomize"), ("sample_banner", "Sample banner:"), ("sample_map_banner", "Sample map banner:"), ("number_of_charges", "Number of charges:"), ("change_charge_1", "Change Charge 1"), ("change_charge_1_color", "Change Charge 1 Color"), ("change_charge_2", "Change Charge 2"), ("change_charge_2_color", "Change Charge 2 Color"), ("change_charge_3", "Change Charge 3"), ("change_charge_3_color", "Change Charge 3 Color"), ("change_charge_4", "Change Charge 4"), ("change_charge_4_color", "Change Charge 4 Color"), ("change_charge_position", "Change Charge Position"), ("choose_position", "Choose position:"), ("choose_charge", "Choose a charge:"), ("choose_background", "Choose background pattern:"), ("choose_flag_type", "Choose flag type:"), ("choose_map_flag_type", "Choose map flag type:"), ("choose_color", "Choose color:"), ("accept", "Accept"), ("charge_no_1", "Charge #1:"), ("charge_no_2", "Charge #2:"), ("charge_no_3", "Charge #3:"), ("charge_no_4", "Charge #4:"), ("change", "Change"), ("plus", "+"), ("minus", "-"), ("color_no_1", "Color #1:"), ("color_no_2", "Color #2:"), ("charge", "Charge"), ("color", "Color"), ("flip_horizontal", "Flip Horizontal"), ("flip_vertical", "Flip Vertical"), ("hold_fire", "Hold Fire"), ("blunt_hold_fire", "Blunt / Hold Fire"), ## ("tutorial_camp1","This is training ground where you can learn the basics of the game. Use A, S, D, W keys to move and the mouse to look around."), ## ("tutorial_camp2","F is the action key. You can open doors, talk to people and pick up objects with F key. If you wish to leave a town or retreat from a battle, press the TAB key."), ## ("tutorial_camp3","Training Ground Master wishes to speak with you about your training. Go near him, look at him and press F when you see the word 'Talk' under his name. "), ## ("tutorial_camp4","To see the in-game menu, press the Escape key. If you select Options, and then Controls from the in-game menu, you can see a complete list of key bindings."), ## ("tutorial_camp6","You've received your first quest! You can take a look at your current quests by pressing the Q key. Do it now and check the details of your quest."), ## ("tutorial_camp7","You've completed your quest! Go near Training Ground Master and speak with him about your reward."), ## ("tutorial_camp8","You've gained some experience and weapon points! Press C key to view your character and increase your weapon proficiencies."), ## ("tutorial_camp9","Congratulations! You've finished the tutorial of Mount&Blade. Press TAB key to leave the training ground."), ## ("tutorial_enter_melee", "You are entering the melee weapon training area. The chest nearby contains various weapons which you can experiment with. If you wish to quit this tutorial, press TAB key."), ## ("tutorial_enter_ranged", "You are entering the ranged weapon training area. The chest nearby contains various ranged weapons which you can experiment with. If you wish to quit this tutorial, press TAB key."), ## ("tutorial_enter_mounted", "You are entering the mounted training area. Here, you can try different kinds of weapons while riding a horse. If you wish to quit this tutorial, press TAB key."), # ("tutorial_usage_sword", "Sword is a very versatile weapon which is very fast in both attack and defense. Usage of one handed swords are affected by your one handed weapon proficiency. Focus on the sword and press F key to pick it up."), # ("tutorial_usage_axe", "Axe is a heavy (and therefore slow) weapon which can deal high damage to the opponent. Usage of one handed axes are affected by your one handed weapon proficiency. Focus on the axe and press F key to pick it up."), # ("tutorial_usage_club", "Club is a blunt weapon which deals less damage to the opponent than any other one handed weapon, but it knocks you opponents unconscious so that you can take them as a prisoner. Usage of clubs are affected by your one handed weapon proficiency. Focus on the club and press F key to pick it up."), # ("tutorial_usage_battle_axe", "Battle axe is a long weapon and it can deal high damage to the opponent. Usage of battle axes are affected by your two handed weapon proficiency. Focus on the battle axe and press F key to pick it up."), # ("tutorial_usage_spear", "Spear is a very long weapon which lets the wielder to strike the opponent earlier. Usage of the spears are affected by your polearm proficiency. Focus on the spear and press F key to pick it up."), # ("tutorial_usage_short_bow", "Short bow is a common ranged weapon which is easy to reload but hard to master at. Usage of short bows are affected by your archery proficiency. Focus on the short bow and arrows and press F key to pick them up."), # ("tutorial_usage_crossbow", "Crossbow is a heavy ranged weapon which is easy to use and deals high amount of damage to the opponent. Usage of crossbows are affected by your crossbow proficiency. Focus on the crossbow and bolts and press F key to pick them up."), # ("tutorial_usage_throwing_daggers", "Throwing daggers are easy to use and throwing them takes a very short time. But they deal light damage to the opponent. Usage of throwing daggers are affected byyour throwing weapon proficiency. Focus on the throwing daggers and press F key to pick it up."), # ("tutorial_usage_mounted", "You can use your weapons while you're mounted. Polearms like the lance here can be used for couched damage against opponents. In order to do that, ride your horse at a good speed and aim at your enemy. But do not press the attack button."), ## ("tutorial_melee_chest", "The chest near you contains some of the melee weapons that can be used throughout the game. Look at the chest now and press F key to view its contents. Click on the weapons and move them to your Arms slots to be able to use them."), ## ("tutorial_ranged_chest", "The chest near you contains some of the ranged weapons that can be used throughout the game. Look at the chest now and press F key to view its contents. Click on the weapons and move them to your Arms slots to be able to use them."), ## ## ("tutorial_item_equipped", "You have equipped a weapon. Move your mouse scroll wheel up to wield your weapon. You can also switch between your weapons using your mouse scroll wheel."), ("tutorial_ammo_refilled", "Ammo refilled."), ("tutorial_failed", "You have been beaten this time, but don't worry. Follow the instructions carefully and you'll do better next time.\ Press the Tab key to return to to the menu where you can retry this tutorial."), ("tutorial_1_msg_1","In this tutorial you will learn the basics of movement and combat.\ In Mount&Blade you use the mouse to control where you are looking, and the WASD keys of your keyboard to move.\ Your first task in the training is to locate the yellow flag in the room and move over it.\ You can press the Tab key at any time to quit this tutorial or to exit any other area in the game.\ Go to the yellow flag now."), ("tutorial_1_msg_2","Well done. Next we will cover attacking with weapons.\ For the purposes of this tutorial you have been equipped with bow and arrows, a sword and a shield.\ You can draw different weapons from your weapon slots by using the scroll wheel of your mouse.\ In the default configuration, scrolling up pulls out your next weapon, and scrolling down pulls out your shield.\ If you are already holding a shield, scrolling down will put your shield away instead.\ Try changing your wielded equipment with the scroll wheel now. When you are ready,\ go to the yellow flag to move on to your next task."), ("tutorial_1_msg_3","Excellent. The next part of this tutorial covers attacking with melee weapons.\ You attack with your currently wielded weapon by using your left mouse button.\ Press and hold the button to ready an attack, then release the button to strike.\ If you hold down the left mouse button for a while before releasing, your attack will be more powerful.\ Now draw your sword and destroy the four dummies in the room."), ("tutorial_1_msg_4","Nice work! You've destroyed all four dummies. You can now move on to the next room."), ("tutorial_1_msg_5","As you see, there is an archery target on the far side of the room.\ Your next task is to use your bow to put three arrows into that target. Press and hold down the left mouse button to notch an arrow.\ You can then fire the arrow by releasing the left mouse button. Note the targeting reticule in the centre of your screen,\ which shows you the accuracy of your shot.\ In order to achieve optimal accuracy, let fly your arrow when the reticule is at its smallest.\ Try to shoot the target now."), ("tutorial_1_msg_6","Well done! You've learned the basics of moving and attacking.\ With a little bit of practice you will soon master them.\ In the second tutorial you can learn more advanced combat skills and face armed opponents.\ You can press the Tab key at any time to return to the tutorial menu."), ("tutorial_2_msg_1","This tutorial will teach you how to defend yourself with a shield and how to battle armed opponents.\ For the moment you are armed with nothing but a shield.\ Your task is not to attack, but to successfully protect yourself from harm with your shield.\ There is an armed opponent waiting for you in the next room.\ He will try his best to knock you unconscious, while you must protect yourself with your shield\ by pressing and holding the right mouse button.\ Go into the next room now to face your opponent.\ Remember that you can press the Tab key at any time to quit this tutorial or to exit any other area in the game."), ("tutorial_2_msg_2","Press and hold down the right mouse button to raise your shield. Try to remain standing for thirty seconds. You have {reg3} seconds to go."), ("tutorial_2_msg_3","Well done, you've succeeded in defending against an armed opponent.\ The next phase of this tutorial will pit you and your shield against a force of enemy archers.\ Move on to the next room when you're ready to face the archers."), ("tutorial_2_msg_4","Defend yourself from arrows by raising your shield with the right mouse button. Try to remain standing for thirty seconds. You have {reg3} seconds to go."), ("tutorial_2_msg_5","Excellent, you've put up a succesful defence against archers.\ There is a reward waiting for you in the next room."), ("tutorial_2_msg_6","In the default configuration,\ the F key on your keyboard is used for non-violent interaction with objects and humans in the gameworld.\ To pick up the sword on the altar, look at it and press F when you see the word 'Equip'."), ("tutorial_2_msg_7","A fine weapon! Now you can use it to deliver a bit of payback.\ Go back through the door and dispose of the archers you faced earlier."), ("tutorial_2_msg_8","Very good. Your last task before finishing this tutorial is to face the maceman.\ Go through the door now and show him your steel!"), ("tutorial_2_msg_9","Congratulations! You have now learned how to defend yourself with a shield and even had your first taste of combat with armed opponents.\ Give it a bit more practice and you'll soon be a renowned swordsman.\ The next tutorial covers directional defence, which is one of the most important elements of Mount&Blade combat.\ You can press the Tab key at any time to return to the tutorial menu."), ("tutorial_3_msg_1","This tutorial is intended to give you an overview of parrying and defence without a shield.\ Parrying attacks with your weapon is a little bit more difficult than blocking them with a shield.\ When you are defending with a weapon, you are only protected from one direction, the direction in which your weapon is set.\ If you are blocking upwards, you will parry any overhead swings coming against you, but you will not stop thrusts or attacks to your sides.\ Either of these attacks would still be able to hit you.\ That's why, in order to survive without a shield, you must learn directional defence.\ Go pick up up the quarterstaff now to begin practice."), ("tutorial_3_msg_2","By default, the direction in which you defend (by clicking and holding your right mouse button) is determined by the attack direction of your closest opponent.\ For example, if your opponent is readying a thrust attack, pressing and holding the right mouse button will parry thrust attacks, but not side or overhead attacks.\ You must watch your opponent carefully and only initiate your parry AFTER the enemy starts to attack.\ If you start BEFORE he readies an attack, you may parry the wrong way altogether!\ Now it's time for you to move on to the next room, where you'll have to defend yourself against an armed opponent.\ Your task is to defend yourself successfully for thirty seconds with no equipment other than a simple quarterstaff.\ Your quarterstaff's attacks are disabled for this tutorial, so don't worry about attacking and focus on your defence instead.\ Move on to the next room when you are ready to initiate the fight."), ("tutorial_3_msg_3","Press and hold down the right mouse button to defend yourself with your staff after your opponent starts his attack.\ Try to remain standing for thirty seconds. You have {reg3} seconds to go."), ("tutorial_3_msg_4","Well done, you've succeeded this trial!\ Now you will be pitted against a more challenging opponent that will make things more difficult for you.\ Move on to the next room when you're ready to face him."), ("tutorial_3_msg_5","Press and hold down the right mouse button to defend yourself with your staff after your opponent starts his attack.\ Try to remain standing for thirty seconds. You have {reg3} seconds to go."), ("tutorial_3_msg_6","Congratulations, you still stand despite the enemy's best efforts.\ The time has now come to attack as well as defend.\ Approach the door and press the F key when you see the word 'Go'."), ("tutorial_3_2_msg_1","Your staff's attacks have been enabled again. Your first opponent is waiting in the next room.\ Defeat him by a combination of attack and defence."), ("tutorial_3_2_msg_2","Defeat your opponent with your quarterstaff."), ("tutorial_3_2_msg_3","Excellent. Now the only thing standing in your way is one last opponent.\ He is in the next room. Move in and knock him down."), ("tutorial_3_2_msg_4","Defeat your opponent with your quarterstaff."), ("tutorial_3_2_msg_5","Well done! In this tutorial you have learned how to fight ably without a shield.\ Train hard and train well, and no one shall be able to lay a stroke on you.\ In the next tutorial you may learn horseback riding and cavalry combat.\ You can press the Tab key at any time to return to the tutorial menu."), ("tutorial_4_msg_1","Welcome to the fourth tutorial.\ In this sequence you'll learn about riding a horse and how to perform various martial exercises on horseback.\ We'll start by getting you mounted up.\ Approach the horse, and press the 'F' key when you see the word 'Mount'."), ("tutorial_4_msg_2","While on horseback, the WASD keys control your horse's movement, not your own.\ Ride your horse and try to follow the yellow flag around the course.\ When you reach the flag, it will move to the next waypoint on the course until you reach the finish."), ("tutorial_4_msg_3","Very good. Next we'll cover attacking enemies from horseback. Approach the yellow flag now."), ("tutorial_4_msg_4","Draw your sword (using the mouse wheel) and destroy the four targets.\ Try hitting the dummies as you pass them at full gallop -- this provides an extra challenge,\ but the additional speed added to your blow will allow you to do more damage.\ The easiest way of doing this is by pressing and holding the left mouse button until the right moment,\ releasing it just before you pass the target."), ("tutorial_4_msg_5","Excellent work. Now let us try some target shooting from horseback. Go near the yellow flag now."), ("tutorial_4_msg_6","Locate the archery target beside the riding course and shoot it three times with your bow.\ Although you are not required to ride while shooting, it's recommended that you try to hit the target at various speeds and angles\ to get a feel for how your horse's speed and course affects your aim."), ("tutorial_4_msg_7","Congratulations, you have finished this tutorial.\ You can press the Tab key at any time to return to the tutorial menu."), # Ryan END ("tutorial_5_msg_1","TODO: Follow order to the flag"), ("tutorial_5_msg_2","TODO: Move to the flag, keep your units at this position"), ("tutorial_5_msg_3","TODO: Move to the flag to get the archers"), ("tutorial_5_msg_4","TODO: Move archers to flag1, infantry to flag2"), ("tutorial_5_msg_5","TODO: Enemy is charging. Fight!"), ("tutorial_5_msg_6","TODO: End of battle."), ("trainer_help_1", "This is a training ground where you can learn the basics of the game. Use A, S, D, W keys to move and the mouse to look around."), ("trainer_help_2", "To speak with the trainer, go near him, look at him and press the 'F' key when you see the word 'Talk' under his name.\ When you wish to leave this or any other area or retreat from a battle, you can press the TAB key."), ("custom_battle_1", "Lord Haringoth of Swadia is travelling with his household knights when he spots a group of raiders preparing to attack a small hamlet.\ Shouting out his warcry, he spurs his horse forward, and leads his loyal men to a fierce battle."), ("custom_battle_2", "Lord Mleza is leading a patrol of horsemen and archers\ in search of a group of bandits who plundered a caravan and ran away to the hills.\ Unfortunately the bandits have recently met two other large groups who want a share of their booty,\ and spotting the new threat, they decide to combine their forces."), ("custom_battle_3", "Lady Brina is leading the defense of her castle against a Swadian army.\ Now, as the besiegers prepare for a final assault on the walls, she must make sure the attack does not succeed."), ("custom_battle_4", "When the scouts inform Lord Grainwad of the presence of an enemy war band,\ he decides to act quickly and use the element of surprise against superior numbers."), ("custom_battle_5", "Lord Haeda has brought his fierce huscarls into the south with the promise of plunder.\ If he can make this castle fall to him today, he will settle in these lands and become the ruler of this valley."), ("finished", "(Finished)"), ("delivered_damage", "Delivered {reg60} damage."), ("archery_target_hit", "Distance: {reg61} yards. Score: {reg60}"), ("use_baggage_for_inventory","Use your baggage to access your inventory during battle (it's at your starting position)."), ## ("cant_leave_now","Can't leave the area now."), ("cant_use_inventory_now","Can't access inventory now."), ("cant_use_inventory_arena","Can't access inventory in the arena."), ("cant_use_inventory_disguised","Can't access inventory while you're disguised."), ("cant_use_inventory_tutorial","Can't access inventory in the training camp."), ("1_denar", "1 denar"), ("reg1_denars", "{reg1} denars"), ("january_reg1_reg2", "January {reg1}, {reg2}"), ("february_reg1_reg2", "February {reg1}, {reg2}"), ("march_reg1_reg2", "March {reg1}, {reg2}"), ("april_reg1_reg2", "April {reg1}, {reg2}"), ("may_reg1_reg2", "May {reg1}, {reg2}"), ("june_reg1_reg2", "June {reg1}, {reg2}"), ("july_reg1_reg2", "July {reg1}, {reg2}"), ("august_reg1_reg2", "August {reg1}, {reg2}"), ("september_reg1_reg2", "September {reg1}, {reg2}"), ("october_reg1_reg2", "October {reg1}, {reg2}"), ("november_reg1_reg2", "November {reg1}, {reg2}"), ("december_reg1_reg2", "December {reg1}, {reg2}"), ## ("you_approach_town","You approach the town of "), ## ("you_are_in_town","You are in the town of "), ## ("you_are_in_castle","You are at the castle of "), ## ("you_sneaked_into_town","You have sneaked into the town of "), ("town_nighttime"," It is late at night and honest folk have abandoned the streets."), ("door_locked","The door is locked."), ("castle_is_abondened","The castle seems to be unoccupied."), ("town_is_abondened","The town has no garrison defending it."), ("place_is_occupied_by_player","The place is held by your own troops."), ("place_is_occupied_by_enemy", "The place is held by hostile troops."), ("place_is_occupied_by_friendly", "The place is held by friendly troops."), ("do_you_want_to_retreat", "Are you sure you want to retreat?"), ("give_up_fight", "Give up the fight?"), ("do_you_wish_to_leave_tutorial", "Do you wish to leave the tutorial?"), ("do_you_wish_to_surrender", "Do you wish to surrender?"), ("can_not_retreat", "Can't retreat, there are enemies nearby!"), ## ("can_not_leave", "Can't leave. There are enemies nearby!"), ("s1_joined_battle_enemy", "{s1} has joined the battle on the enemy side."), ("s1_joined_battle_friend", "{s1} has joined the battle on your side."), # ("entrance_to_town_forbidden","It seems that the town guards have been warned of your presence and you won't be able to enter the town unchallenged."), ("entrance_to_town_forbidden","The town guards are on the lookout for intruders and it seems that you won't be able to pass through the gates unchallenged."), ("sneaking_to_town_impossible","The town guards are alarmed. You wouldn't be able to sneak through that gate no matter how well you disguised yourself."), ("battle_won", "You have won the battle!"), ("battle_lost", "You have lost the battle!"), ("attack_walls_success", "After a bloody fight, your brave soldiers manage to claim the walls from the enemy."), ("attack_walls_failure", "Your soldiers fall in waves as they charge the walls, and the few who remain alive soon rout and run away, never to be seen again."), ("attack_walls_continue", "A bloody battle ensues and both sides fight with equal valour. Despite the efforts of your troops, the castle remains in enemy hands."), ("order_attack_success", "Your men fight bravely and defeat the enemy."), ("order_attack_failure", "You watch the battle in despair as the enemy cuts your soldiers down, then easily drives off the few ragged survivors."), ("order_attack_continue", "Despite an extended skirmish, your troops were unable to win a decisive victory."), ("join_order_attack_success", "Your men fight well alongside your allies, sharing in the glory as your enemies are beaten."), ("join_order_attack_failure", "You watch the battle in despair as the enemy cuts your soldiers down, then easily drives off the few ragged survivors."), ("join_order_attack_continue", "Despite an extended skirmish, neither your troops nor your allies were able to win a decisive victory over the enemy."), ("siege_defender_order_attack_success", "The men of the garrison hold their walls with skill and courage, breaking the enemy assault and skillfully turning the defeat into a full-fledged rout."), ("siege_defender_order_attack_failure", "The assault quickly turns into a bloodbath. Valiant efforts are for naught; the overmatched garrison cannot hold the walls, and the enemy puts every last defender to the sword."), ("siege_defender_order_attack_continue", "Repeated, bloody attempts on the walls fail to gain any ground, but too many enemies remain for the defenders to claim a true victory. The siege continues."), ("hero_taken_prisoner", "{s1} of {s3} has been taken prisoner by {s2}."), ("hero_freed", "{s1} of {s3} has been freed from captivity by {s2}."), ("center_captured", "{s2} have taken {s1} from {s3}."), ("troop_relation_increased", "Your relation with {s1} has increased from {reg1} to {reg2}."), ("troop_relation_detoriated", "Your relation with {s1} has deteriorated from {reg1} to {reg2}."), ("faction_relation_increased", "Your relation with {s1} has increased from {reg1} to {reg2}."), ("faction_relation_detoriated", "Your relation with {s1} has deteriorated from {reg1} to {reg2}."), ("party_gained_morale", "Your party gains {reg1} morale."), ("party_lost_morale", "Your party loses {reg1} morale."), ("qst_follow_spy_noticed_you", "The spy has spotted you! He's making a run for it!"), ("father", "father"), ("husband", "husband"), ("wife", "wife"), ("daughter", "daughter"), ("mother", "mother"), ("son", "son"), ("brother", "brother"), ("sister", "sister"), ("he", "He"), ("she", "She"), ("s3s_s2", "{s3}'s {s2}"), ("s5_is_s51", "{s5} is {s51}."), ("s5_is_the_ruler_of_s51", "{s5} is the ruler of {s51}. "), ("s5_is_a_nobleman_of_s6", "{s5} is a nobleman of {s6}. "), ## ("your_debt_to_s1_is_changed_from_reg1_to_reg2", "Your debt to {s1} is changed from {reg1} to {reg2}."), ("relation_mnus_100", "Vengeful"), # -100..-94 ("relation_mnus_90", "Vengeful"), # -95..-84 ("relation_mnus_80", "Vengeful"), ("relation_mnus_70", "Hateful"), ("relation_mnus_60", "Hateful"), ("relation_mnus_50", " Hostile"), ("relation_mnus_40", " Angry"), ("relation_mnus_30", " Resentful"), ("relation_mnus_20", " Grumbling"), ("relation_mnus_10", " Suspicious"), ("relation_plus_0", " Indifferent"),# -5...4 ("relation_plus_10", " Cooperative"), # 5..14 ("relation_plus_20", " Welcoming"), ("relation_plus_30", " Favorable"), ("relation_plus_40", " Supportive"), ("relation_plus_50", " Friendly"), ("relation_plus_60", " Gracious"), ("relation_plus_70", " Fond"), ("relation_plus_80", " Loyal"), ("relation_plus_90", " Devoted"), ("relation_mnus_100_ns", "{s60} is vengeful towards you."), # -100..-94 ("relation_mnus_90_ns", "{s60} is vengeful towards you."), # -95..-84 ("relation_mnus_80_ns", "{s60} is vengeful towards you."), ("relation_mnus_70_ns", "{s60} is hateful towards you."), ("relation_mnus_60_ns", "{s60} is hateful towards you."), ("relation_mnus_50_ns", "{s60} is hostile towards you."), ("relation_mnus_40_ns", "{s60} is angry towards you."), ("relation_mnus_30_ns", "{s60} is resentful against you."), ("relation_mnus_20_ns", "{s60} is grumbling against you."), ("relation_mnus_10_ns", "{s60} is suspicious towards you."), ("relation_plus_0_ns", "{s60} is indifferent against you."),# -5...4 ("relation_plus_10_ns", "{s60} is cooperative towards you."), # 5..14 ("relation_plus_20_ns", "{s60} is welcoming towards you."), ("relation_plus_30_ns", "{s60} is favorable to you."), ("relation_plus_40_ns", "{s60} is supportive to you."), ("relation_plus_50_ns", "{s60} is friendly to you."), ("relation_plus_60_ns", "{s60} is gracious to you."), ("relation_plus_70_ns", "{s60} is fond of you."), ("relation_plus_80_ns", "{s60} is loyal to you."), ("relation_plus_90_ns", "{s60} is devoted to you."), ("relation_reg1", " Relation: {reg1}"), ("center_relation_mnus_100", "The populace hates you with a passion"), # -100..-94 ("center_relation_mnus_90", "The populace hates you intensely"), # -95..-84 ("center_relation_mnus_80", "The populace hates you strongly"), ("center_relation_mnus_70", "The populace hates you"), ("center_relation_mnus_60", "The populace is hateful to you"), ("center_relation_mnus_50", "The populace is extremely hostile to you"), ("center_relation_mnus_40", "The populace is very hostile to you"), ("center_relation_mnus_30", "The populace is hostile to you"), ("center_relation_mnus_20", "The populace is against you"), ("center_relation_mnus_10", "The populace is opposed to you"), ("center_relation_plus_0", "The populace is indifferent to you"), ("center_relation_plus_10", "The populace is acceptive to you"), ("center_relation_plus_20", "The populace is cooperative to you"), ("center_relation_plus_30", "The populace is somewhat supportive to you"), ("center_relation_plus_40", "The populace is supportive to you"), ("center_relation_plus_50", "The populace is very supportive to you"), ("center_relation_plus_60", "The populace is loyal to you"), ("center_relation_plus_70", "The populace is highly loyal to you"), ("center_relation_plus_80", "The populace is devoted to you"), ("center_relation_plus_90", "The populace is fiercely devoted to you"), ("town_prosperity_0", "The poverty of the town of {s60} is unbearable"), ("town_prosperity_10", "The squalorous town of {s60} is all but deserted."), ("town_prosperity_20", "The town of {s60} looks a wretched, desolate place."), ("town_prosperity_30", "The town of {s60} looks poor and neglected."), ("town_prosperity_40", "The town of {s60} appears to be struggling."), ("town_prosperity_50", "The town of {s60} seems unremarkable."), ("town_prosperity_60", "The town of {s60} seems to be flourishing."), ("town_prosperity_70", "The prosperous town of {s60} is bustling with activity."), ("town_prosperity_80", "The town of {s60} looks rich and well-maintained."), ("town_prosperity_90", "The town of {s60} is opulent and crowded with well-to-do people."), ("town_prosperity_100", "The glittering town of {s60} openly flaunts its great wealth."), ("village_prosperity_0", "The poverty of the village of {s60} is unbearable."), ("village_prosperity_10", "The village of {s60} looks wretchedly poor and miserable."), ("village_prosperity_20", "The village of {s60} looks very poor and desolate."), ("village_prosperity_30", "The village of {s60} looks poor and neglected."), ("village_prosperity_40", "The village of {s60} appears to be somewhat poor and struggling."), ("village_prosperity_50", "The village of {s60} seems unremarkable."), ("village_prosperity_60", "The village of {s60} seems to be flourishing."), ("village_prosperity_70", "The village of {s60} appears to be thriving."), ("village_prosperity_80", "The village of {s60} looks rich and well-maintained."), ("village_prosperity_90", "The village of {s60} looks very rich and prosperous."), ("village_prosperity_100", "The village of {s60}, surrounded by vast, fertile fields, looks immensely rich."), ("war_report_minus_4", "we are about to lose the war"), ("war_report_minus_3", "the situation looks bleak"), ("war_report_minus_2", "things aren't going too well for us"), ("war_report_minus_1", "we can still win the war if we rally"), ("war_report_0", "we are evenly matched with the enemy"), ("war_report_plus_1", "we have a fair chance of winning the war"), ("war_report_plus_2", "things are going quite well"), ("war_report_plus_3", "we should have no difficulty defeating them"), ("war_report_plus_4", "we are about to win the war"), ("persuasion_summary_very_bad", "You try your best to persuade {s50},\ but none of your arguments seem to come out right. Every time you start to make sense,\ you seem to say something entirely wrong that puts you off track.\ By the time you finish speaking you've failed to form a single coherent point in your own favour,\ and you realise that all you've done was dig yourself deeper into a hole.\ Unsurprisingly, {s50} does not look impressed."), ("persuasion_summary_bad", "You try to persuade {s50}, but {reg51?she:he} outmanoeuvres you from the very start.\ Even your best arguments sound hollow to your own ears. {s50}, likewise,\ has not formed a very high opinion of what you had to say."), ("persuasion_summary_average", "{s50} turns out to be a skilled speaker with a keen mind,\ and you can't seem to bring forth anything concrete that {reg51?she:he} cannot counter with a rational point.\ In the end, neither of you manage to gain any ground in this discussion."), ("persuasion_summary_good", "Through quick thinking and smooth argumentation, you manage to state your case well,\ forcing {s50} to concede on several points. However, {reg51?she:he} still expresses doubts about your request."), ("persuasion_summary_very_good","You deliver an impassioned speech that echoes through all listening ears like poetry.\ The world itself seems to quiet down in order to hear you better .\ The inspiring words have moved {s50} deeply, and {reg51?she:he} looks much more well-disposed towards helping you."), # meet_spy_in_enemy_town quest secret sentences ("secret_sign_1", "The armoire dances at midnight..."), ("secret_sign_2", "I am selling these fine Khergit tapestries. Would you like to buy some?"), ("secret_sign_3", "The friend of a friend sent me..."), ("secret_sign_4", "The wind blows hard from the east and the river runs red..."), ("countersign_1", "But does he dance for the dresser or the candlestick?"), ("countersign_2", "Yes I would, do you have any in blue?"), ("countersign_3", "But, my friend, your friend's friend will never have a friend like me."), ("countersign_4", "Have you been sick?"), # Names ("name_1", "Albard"), ("name_2", "Euscarl"), ("name_3", "Sigmar"), ("name_4", "Talesqe"), ("name_5", "Ritmand"), ("name_6", "Aels"), ("name_7", "Raurqe"), ("name_8", "Bragamus"), ("name_9", "Taarl"), ("name_10", "Ramin"), ("name_11", "Shulk"), ("name_12", "Putar"), ("name_13", "Tamus"), ("name_14", "Reichad"), ("name_15", "Walcheas"), ("name_16", "Rulkh"), ("name_17", "Marlund"), ("name_18", "Auguryn"), ("name_19", "Daynad"), ("name_20", "Joayah"), ("name_21", "Ramar"), ("name_22", "Caldaran"), ("name_23", "Brabas"), ("name_24", "Kundrin"), ("name_25", "Pechnak"), # Surname ("surname_1", "{s50} of Uxhal"), ("surname_2", "{s50} of Wercheg"), ("surname_3", "{s50} of Reyvadin"), ("surname_4", "{s50} of Suno"), ("surname_5", "{s50} of Jelkala"), ("surname_6", "{s50} of Veluca"), ("surname_7", "{s50} of Halmar"), ("surname_8", "{s50} of Curaw"), ("surname_9", "{s50} of Sargoth"), ("surname_10", "{s50} of Tihr"), ("surname_11", "{s50} of Zendar"), ("surname_12", "{s50} of Rivacheg"), ("surname_13", "{s50} of Wercheg"), ("surname_14", "{s50} of Ehlerdag"), ("surname_15", "{s50} of Yaragar"), ("surname_16", "{s50} of Burglen"), ("surname_17", "{s50} of Shapeshte"), ("surname_18", "{s50} of Hanun"), ("surname_19", "{s50} of Saren"), ("surname_20", "{s50} of Tosdhar"), ("surname_21", "{s50} the Long"), ("surname_22", "{s50} the Gaunt"), ("surname_23", "{s50} Silkybeard"), ("surname_24", "{s50} the Sparrow"), ("surname_25", "{s50} the Pauper"), ("surname_26", "{s50} the Scarred"), ("surname_27", "{s50} the Fair"), ("surname_28", "{s50} the Grim"), ("surname_29", "{s50} the Red"), ("surname_30", "{s50} the Black"), ("surname_31", "{s50} the Tall"), ("surname_32", "{s50} Star-Eyed"), ("surname_33", "{s50} the Fearless"), ("surname_34", "{s50} the Valorous"), ("surname_35", "{s50} the Cunning"), ("surname_36", "{s50} the Coward"), ("surname_37", "{s50} Bright"), ("surname_38", "{s50} the Quick"), ("surname_39", "{s50} the Minstrel"), ("surname_40", "{s50} the Bold"), ("surname_41", "{s50} Hot-Head"), ("surnames_end", "surnames_end"), ("number_of_troops_killed_reg1", "Number of troops killed: {reg1}"), ("number_of_troops_wounded_reg1", "Number of troops wounded: {reg1}"), ("number_of_own_troops_killed_reg1", "Number of friendly troops killed: {reg1}"), ("number_of_own_troops_wounded_reg1", "Number of friendly troops wounded: {reg1}"), ("retreat", "Retreat!"), ("siege_continues", "Fighting Continues..."), ("casualty_display", "Your casualties: {s10}^Enemy casualties: {s11}{s12}"), ("casualty_display_hp", "^You were wounded for {reg1} hit points."), # Quest log texts ("quest_log_updated", "Quest log has been updated..."), ("banner_selection_text", "You have been awarded the right to carry a banner.\ Your banner will signify your status and bring you honour. Which banner do you want to choose?"), # Retirement Texts: s7=village name; s8=castle name; s9=town name ("retirement_text_1", "Only too late do you realise that your money won't last.\ It doesn't take you long to fritter away what little you bothered to save,\ and you fare poorly in several desperate attempts to start adventuring again.\ You end up a beggar in {s9}, living on alms and the charity of the church."), ("retirement_text_2", "Only too late do you realise that your money won't last.\ It doesn't take you long to fritter away what little you bothered to save.\ Once every denar has evaporated in your hands you are forced to start a life of crime in the backstreets of {s9},\ using your skills to eke out a living robbing coppers from women and poor townsmen."), ("retirement_text_3", "Only too late do you realise that your money won't last.\ It doesn't take you long to fritter away what little you bothered to save,\ and you end up a penniless drifter, going from tavern to tavern\ blagging drinks from indulgent patrons by regaling them with war stories that no one ever believes."), ("retirement_text_4", "The silver you've saved doesn't last long,\ but you manage to put together enough to buy some land near the village of {s7}.\ There you become a free farmer, and you soon begin to attract potential {wives/husbands}.\ In time the villagers come to treat you as their local hero.\ You always receive a place of honour at feasts, and your exploits are told and retold in the pubs and taverns\ so that the children may keep a memory of you for ever and ever."), ("retirement_text_5", "The silver you've saved doesn't last long,\ but it's enough to buy a small tavern in {s9}. Although the locals are wary of you at first,\ they soon accept you into their midst. In time your growing tavern becomes a popular feasthall and meeting place.\ People come for miles to eat or stay there due to your sheer renown and the epic stories you tell of your adventuring days."), ("retirement_text_6", "You've saved wisely throughout your career,\ and now your silver and your intelligence allow you to make some excellent investments to cement your future.\ After buying several shops and warehouses in {s9}, your shrewdness turns you into one of the most prominent merchants in town,\ and you soon become a wealthy {man/woman} known as much for your trading empire as your exploits in battle."), ("retirement_text_7", "As a landed noble, however minor, your future is all but assured.\ You settle in your holdfast at {s7}, administrating the village and fields,\ adjudicating the local courts and fulfilling your obligations to your liege lord.\ Occasionally your liege calls you to muster and command in his campaigns, but these stints are brief,\ and you never truly return to the adventuring of your younger days. You have already made your fortune.\ With your own hall and holdings, you've few wants that your personal wealth and the income of your lands cannot afford you."), ("retirement_text_8", "There is no question that you've done very well for yourself.\ Your extensive holdings and adventuring wealth are enough to guarantee you a rich and easy life for the rest of your days.\ Retiring to your noble seat in {s8}, you exchange adventure for politics,\ and you soon establish yourself as a considerable power in your liege lord's kingdom.\ With intrigue to busy yourself with, your own forests to hunt, a hall to feast in and a hundred fine war stories to tell,\ you have little trouble making the best of the years that follow."), ("retirement_text_9", "As a reward for your competent and loyal service,\ your liege lord decrees that you be given a hereditary title, joining the major nobility of the realm.\ Soon you complete your investitute as baron of {s7}, and you become one of your liege's close advisors\ and adjutants. Your renown garners you much subtle pull and influence as well as overt political power.\ Now you spend your days playing the games of power, administering your great fiefs,\ and recounting the old times of adventure and glory."), ("retirement_text_10", "Though you started from humble beginnings, your liege lord holds you in high esteem,\ and a ripple of shock passes through the realm when he names you to the hereditary title of {count/countess} of {s9}.\ Vast fiefs and fortunes are now yours to rule. You quickly become your liege's most trusted advisor,\ almost his equal and charged with much of the running of his realm,\ and you sit a throne in your own splendourous palace as one of the most powerful figures in Calradia."), #NPC companion changes begin # Objectionable actions # humanitarian ("loot_village", "attack innocent villagers"), ("steal_from_villagers", "steal from poor villagers"), ("rob_caravan", "rob a merchant caravan"), # possibly remove ("sell_slavery", "sell people into slavery"), # egalitarian ("men_hungry", "run out of food"), ##Done - simple triggers ("men_unpaid", "not be able to pay the men"), # ("party_crushed", "get ourselves slaughtered"), ##Done - game menus ("excessive_casualties", "turn every battle into a bloodbath for our side"), # chivalric ("surrender", "surrender to the enemy"), ##Done - game menus ("flee_battle", "run from battle"), ##Done - game menus ("pay_bandits", "pay off common bandits"), # honest ("fail_quest", "fail a quest which we undertook on word of honour"), # quest-related strings ("squander_money", "squander money given to us in trust"), ("murder_merchant", "involve ourselves in cold-blooded murder"), ("round_up_serfs", "round up serfs on behalf of some noble"), # Fates suffered by companions in battle ("battle_fate_1", "We were separated in the heat of battle"), ("battle_fate_2", "I was wounded and left for dead"), ("battle_fate_3", "I was knocked senseless by the enemy"), ("battle_fate_4", "I was taken and held for ransom"), ("battle_fate_5", "I got captured, but later managed to escape"), # strings for opinion ("npc_morale_report", "I'm {s6} your choice of companions, {s7} your style of leadership, and {s8} the general state of affairs"), ("happy", "happy about"), ("content", "content with"), ("concerned", "concerned about"), ("not_happy", "not at all happy about"), ("miserable", "downright appalled at"), ("morale_reg1", " Morale: {reg1}"), ("bar_enthusiastic", " Enthusiastic"), ("bar_content", " Content"), ("bar_weary", " Weary"), ("bar_disgruntled", " Disgruntled"), ("bar_miserable", " Miserable"), #other strings ("here_plus_space", "here "), #NPC strings #npc1 = borcha #npc2 = marnid #npc3 = ymira #npc4 = rolf #npc5 = baheshtur #npc6 = firentis #npc7 = deshavi #npc8 = matheld #npc9 = alayen #npc10 = bunduk #npc11 = katrin #npc12 = jeremus #npc13 = nizar #npc14 = lazalit #npc15 = artimenner #npc16 = klethi ("npc1_intro", "Ho there, traveller. You wouldn't by chance be in the market for a tracker, would you?"), ("npc2_intro", "Hello. Would you be so kind as to have a cup with me? I'm down to my last five denars and I'd rather not drink alone."), ("npc3_intro", "Good day to you!"), ("npc4_intro", "Greetings. I am Rolf, son of Rolf, of the most ancient and puissant House of Rolf."), ("npc5_intro", "Greetings, traveller. Would you join me for a drink?"), ("npc6_intro", "I am lost... Lost..."), ("npc7_intro", "Yes? Keep your distance, by the way."), ("npc8_intro", "What do you want?"), ("npc9_intro", "You there, good {man/woman}, be so kind as to fetch me another drink, eh?"), ("npc10_intro", "Greetings there, {Brother/Sister}! Here's to the doom and downfall of all high-born lords and ladies!"), ("npc11_intro", "Hello there, {laddie/lassie}. Have a drink on me."), ("npc12_intro", "Greetings, fellow traveller. Perhaps you can help me."), ("npc13_intro", "Greetings, traveller. I am Nizar. No doubt you will have heard of me."), ("npc14_intro", "Yes? What is it you wish?"), ("npc15_intro", "Oh! Say, friend, are you by chance heading out of town anytime soon?"), ("npc16_intro", "Hello there. I couldn't help noticing that you came into town at the head of a company of soldiers. Are you by any chance looking for new hands?"), ("npc1_intro_response_1", "Perhaps. What's the urgency?"), ("npc2_intro_response_1", "Your last five denars? What happened to you?"), ("npc3_intro_response_1", "Hello. What's a clearly well-brought up young lady like you doing in a place like this?"), ("npc4_intro_response_1", "Hmm... I have never heard of the House of Rolf."), ("npc5_intro_response_1", "Certainly. With whom do I have the pleasure of drinking?"), ("npc6_intro_response_1", "Why so gloomy, friend?"), ("npc7_intro_response_1", "My apologies. I was merely going to say that you look a bit down on your luck."), ("npc8_intro_response_1", "Merely to pass the time of day, ma'am, if you're not otherwise engaged."), ("npc9_intro_response_1", "You must have me confused with the tavernkeep, sir."), ("npc10_intro_response_1", "Why do you say that, sir?"), ("npc11_intro_response_1", "What's the occasion?"), ("npc12_intro_response_1", "How is that?"), ("npc13_intro_response_1", "Um... I don't think so."), ("npc14_intro_response_1", "To pass the time of day with a fellow traveller, if you permit."), ("npc15_intro_response_1", "I am. What concern is it of your, may I ask?"), ("npc16_intro_response_1", "I could be. What's your story?"), ("npc1_intro_response_2", "Step back, sir, and keep your hand away from my purse."), ("npc2_intro_response_2", "I have better things to do."), ("npc3_intro_response_2", "Run along now, girl. I have work to do."), ("npc4_intro_response_2", "Eh? No thanks, we don't want any."), ("npc5_intro_response_2", "I have no time for that."), ("npc6_intro_response_2", "No doubt. Well, good luck getting found."), ("npc7_intro_response_2", "Right. I'll not bother you, then."), ("npc8_intro_response_2", "Nothing at all, from one so clearly disinclined to pleasantries. Good day to you."), ("npc9_intro_response_2", "Fetch it yourself!"), ("npc10_intro_response_2", "That's rebel talk, and I'll hear none of it. Good day to you."), ("npc11_intro_response_2", "I think not, madame."), ("npc12_intro_response_2", "Sorry, I am afraid that I am otherwise engaged right now."), ("npc13_intro_response_2", "No, and I can't say that I much want to make your acquaintance."), ("npc14_intro_response_2", "Nothing at all. My apologies."), ("npc15_intro_response_2", "I'd be obliged if you minded your own business, sir."), ("npc16_intro_response_2", "Mind your own business, lass."), #backstory intro ("npc1_backstory_a", "Well, {sir/madame}, it's a long story..."), ("npc2_backstory_a", "It's a tragic tale, sir."), ("npc3_backstory_a", "A good question, and I shall tell you!"), ("npc4_backstory_a", "Really? Well, perhaps your ignorance can be forgiven. Our ancestral lands are far away, over the mountains."), ("npc5_backstory_a", "I am Baheshtur, son of Azabei, grandson of Badzan. Were you not a barbarian, you would likely know from my lineage that I am a Roan Horse Khergit of the highlands, of the tribe of Shamir, of the clan of Dulam, of the family of Ubayn, from the Pantash valley, and you might be able to guess why I am so far from home."), ("npc6_backstory_a", "I have commited the greatest of sins, {sir/madame}, and it is to my shame that I must appoint you my confessor, if you should like to hear it."), ("npc7_backstory_a", "My luck? You could say that."), ("npc8_backstory_a", "Ah. Well, if you must know, I shall tell you."), ("npc9_backstory_a", "My most humble apologies. It is sometimes hard to recognize folk amid the smoke and gloom here. I still cannot believe that I must make my home in such a place."), ("npc10_backstory_a", "It's a long story, but if you get yourself a drink, I'll be glad to tell it."), ("npc11_backstory_a", "Why, I managed to sell my wagon and pots, {lad/lass}. For once I've got money to spend and I intend to make the best of it."), ("npc12_backstory_a", "I shall tell you -- but know that it is a tale of gross iniquity. I warn you in advance, lest you are of a choleric temperament, and so become incensed at the injustice done unto me that you do yourself a mischief."), ("npc13_backstory_a", "You have not? Then perhaps you will have heard of my steed, who cuts across the Calradian plains like a beam of moonlight? Or of my sword, a connoisseur of the blood of the highest-born princes of the land?"), ("npc14_backstory_a", "Very well. I do not mind. My name is Lazalet."), ("npc15_backstory_a", "I'm an engineer, specialized in the art of fortification. If you need a wall knocked down, I can do that, given enough time. If you need a wall built back up, I can do that too, although it will take longer and cost you more. And you can't cut costs, either, unless you want your new edifice coming down underneath you, as someone around here has just found out."), ("npc16_backstory_a", "Well, {sir/madame}, as long as I can remember I've had a weakness for pretty things, and it's gotten me into trouble, you see."), #backstory main body ("npc1_backstory_b", "I had a bit of a misunderstanding {s19}in {s20} about a horse that I found tied up outside the inn. It was the spitting image of a beast that threw me a few days back and ran off. Naturally I untied it for a closer look. As it turns out, the horse belonged to a merchant, a pinch-faced old goat who wouldn't accept that it all was a simple misunderstanding, and went off to get the guard."), ("npc2_backstory_b", "A while back, I left Geroia with a caravan of goods. I was hoping to sell it all in Sargoth and make a hefty sum. But, what do you know... we were ambushed by a party of Khergit raiders who rode away with most of the horses and goods. And two days later, my own caravan guards ran away with the rest of what I had."), ("npc3_backstory_b", "My father, a well-known merchant {s19}in {s20}, decided that I should be married to one of his business partners, a man well past the age of 30. I have been an obedient daughter all of my life, but it was a ridiculous and horrid proposition. So I ran away!"), ("npc4_backstory_b", "Like all the men of my family, I have come to a foreign land to make a name for myself in the profession of arms before returning home to take over custodianship of my estates. Unfortunately, the authorities in these lands have little understanding of the warrior code, and have chosen to call me a bandit and brigand, and put a price on my head -- a most unfair libel to throw at a gentleman adventurer, you will surely agree."), ("npc5_backstory_b", "For as long as any one can remember, our people have feuded with the tribe of Humyan, many of whom have settled in the next valley over. Many men have died in this feud, on both sides, including two of my brothers. The Khan himself has ordered us to cease, to save men for the wars in Calradia. But I know my rights, and my brothers' blood cries out for vengeance. I waylaid and killed a Humyan on a track over the mountains, and I rode out of our village the same night, without even having had the chance to bid farewell to my father. I will bide my time in Calradia, for a year or two, then return home when the Khan's men have forgotten. The Humyan will not forget, of course, but such is the price of honour."), ("npc6_backstory_b", "I was a captain of horse in the service of the lord {s19}in {s20}, and my brother served with me. But we were both in love with the same woman, a courtesan -- a temptress, who played upon our jealousies! My brother and I quarreled. I had drunk too much. He slapped me with his glove, and I spit him upon my sword... My own brother! My sword-arm was stained with the blood of my kin!"), ("npc7_backstory_b", "It was my bad luck to be born to a weak father who married me off to a drunken layabout, who beat me. It was my bad luck, when I ran away from my husband, to be taken by a group of bandits. It was my bad luck that the only one among them who was kind to me, who taught me to hunt and to fight, inspired the jealousy of the others, who knifed him and forced me to run away again."), ("npc8_backstory_b", "I am from an old family in the northern lands, the daughter of a thane and also wife to one. I fought by my husband's side, his partner both in war and in peace. But my husband died of the plague, when I was still childless. My husband had decreed that I should inherit his lands, in the absence of an heir. My brother-in-law, cursed be his name, said that it was not our custom that women could inherit a thanedom. That was nonsense, but his gold bought the loyalties of enough of my husband's faithless servants for him to install himself in my hall. So I fled, something I was raised never to do, and something I hope never to do again."), ("npc9_backstory_b", "I was my father's first son, and his heir. But my mother died, and my father remarried. His new wife thought that her son should inherit. She could not move against me openly, but the other day I fed a pot of suet that had been left out for me to one of my hounds, and it keeled over. I accused my stepmother, but my father, befuddled by her witchcraft, refused to believe me and ordered me to leave his sight."), ("npc10_backstory_b", "A sergeant I was, in the garrison {s19} at {s20}. Twenty years I stood guard for the city, taking many a hard knock in many a tough fight, until they appointed a snot-nosed, downy-lipped princeling, barely out of his mother's cradle, as commander of the garrison. He came upon me standing watch atop the tower, with my crossbow unstrung -- on account of the rain, you see... Can't have the cord loosen... But Little Prince Snot-Nose tells me that an unstrung bow is dereliction of duty. Says he'll have me horsewhipped. And something in me snapped. So I walked off my post."), ("npc11_backstory_b", "For 30 years I followed the armies of this land, selling them victuals and drink, watching their games of dice and finding them girls, and nary a denar was left in my purse at the end."), ("npc12_backstory_b", "I am by training a natural philosopher, but condemned by the jealousy of the thick-headed doctors of my university to make my living as an itinerant surgeon. I was hired by a merchant of this city to cure his son, who fell into a coma after a fall from his balcony. I successfully trepanned the patient's skull to reduce the cranial swelling, but the family ignored my advice to treat the ensuing fevers with a tincture of willow bark, and the boy died. The father, rather than reward me for my efforts, charged me with sorcery -- me, a philosopher of nature! Such is the ignorance and ingratitude of mankind."), ("npc13_backstory_b", "I am a warrior by profession. But perhaps you may also have heard of my prowess as a poet, who can move the iciest of maidens to swoon. Or of my prowess in the art of the bedchamber, in which I must confess a modest degree of skill. I confess a modest affection for Calradia, and for the past several years have visited its towns, castles, and villages, making the most of my talents."), ("npc14_backstory_b", "I am the second son of the count of Geroia, of whom you have no doubt heard. Having no inheritance of my own, I came here to seek my fortune in Calradia, training men in the art of battle. Unfortunately, the lords here in {s20} has no taste for the disciplinary methods needed to turn rabble into soldiers. I told him it was wiser to flog them now, then bury them later. But he would not listen, and I was told to take my services elsewhere."), ("npc15_backstory_b", "The castellan {s19}in {s20} wanted a new tower added to the wall. Trouble is, he ran out of cash halfway through the process, before I could complete the supports. I told him that it would collapse, and it did. Unfortunately he was standing on it, at the time. The new castellan didn't feel like honouring his predecessor's debts and implied that I might find myself charged with murder if I push the point."), ("npc16_backstory_b", "I grew up in Malayurg castle as a bonded servant, working alongside my mother in the kitchens. I would amuse myself by hunting mice through the pantries and sculleries. I was so good at it that I put the castle cats out of a job, and eventually the lord realized that I might also be employed to track down bigger game, on certain errands of a type perhaps better left unsaid. Needless to say, I found a number of opportunities to avail myself of trinkets that had formerly belonged to my lord's enemies. So I was able to buy myself out of bondage, and find hire as a free agent. My last job was {s19}in {s20}."), #backstory recruit pitch ("npc1_backstory_c", "But if I was with a larger group who could vouch for me, they might let it pass. I'd be very grateful to you."), ("npc2_backstory_c", "So here I am, no money and no way home."), ("npc3_backstory_c", "I shall marry whom I want, when I want. Moreover, regardless of what my father might think, I am perfectly capable of taking care of myself. I was thinking that I should perhaps join a band of gypsies, or perhaps a troop of mercenaries!"), ("npc4_backstory_c", "But I am anxious to avoid any further trouble, so if you knew of any company of fighting men where I might enlist, I would be most grateful."), ("npc5_backstory_c", "In the meantime, any opportunities to earn a living with my sword would be most welcome."), ("npc6_backstory_c", "Do you believe there is hope for a man like me? Can I find the path of righteousness, or am I doomed to follow the demons that dwell inside of me?"), ("npc7_backstory_c", "But I do not count myself unlucky, stranger, no more than any other woman of Calradia, this fetid backwater, this dungheap among the nations, populated by apes and jackals."), ("npc8_backstory_c", "When I have enough gold to raise an army I shall go back and take what it is mine."), ("npc9_backstory_c", "I hope to offer my sword to some worthy captain, as it is the only honourable profession for a man of my birth apart from owning land, but in the meantime I am condemned to make my bed among thieves, vagabonds, merchants, and the other riff-raff of the road."), ("npc10_backstory_c", "Now I'm here getting drunk, and the Devil take tomorrow."), ("npc11_backstory_c", "It's no kind of life, victualling the armies. You earn a bit here and a bit there as the soldiers spend their money, and then along comes one defeat and you have to start over, endebting yourself to buy a new wagon and new oxen. So I've decided to get out of the business, but army life is all I know."), ("npc12_backstory_c", "The lord of this castle is reluctant to place me under arrest, but I am anxious to move on elsewhere."), ("npc13_backstory_c", "Which reminds me -- somewhere out there in the city is a rather irate husband. I don't suppose you might consider helping me leave town?"), ("npc14_backstory_c", "So, if you know of any commander who believes that his purpose is to win battles, rather than pamper his soldiers, I would be pleased if you directed me to him ."), ("npc15_backstory_c", "More fool me for having taken the contract without an advance, I suppose, but the end of it all is that I'm in a difficult spot, with the roads full of bandits and no money to pay for an escort. So I'd be much obliged if a well-armed party heading out in the next few days could take me along."), ("npc16_backstory_c", "Unfortunately, my last employer's wife had a lovely amulet, of a kind I simply could not resist. She doesn't know it's missing, yet, but she might soon. So tell me, are you looking for helpers?"), ### use these if there is a short period of time between the last meeting ("npc1_backstory_later", "I've been here and about, you know, doing my best to keep out of trouble. I'm desperately in need of work, however."), ("npc2_backstory_later", "I sold my boots and have managed to make a few denars peddling goods from town to town, but it's a hard living."), ("npc3_backstory_later", "I hired myself on as a cook for some passing caravans, and that at least keeps me fed. But it is rough company on the road, and I grow weary of fighting off guards and others who would try to take liberties. I was thinking that if I could find work as a warrior, men would know to leave me alone."), ("npc4_backstory_later", "I went back to my ancestral barony, to inspect my lands. But we had locusts, you see, and bad rains, and other things, so here I am again, looking for work."), ("npc5_backstory_later", "I've been wandering through this war-torn land, looking for a leader who is worth following."), ("npc6_backstory_later", "I have been wandering Calradia, but have yet to find redemption."), ("npc7_backstory_later", "I have been wandering, looking for work as a tracker, but it has not been easy. Calradians are mostly ill-bred, lice-ridden, and ignorant, and it is not easy to work with such people."), ("npc8_backstory_later", "I am still seeking a war leader in whose shield wall I would fight. But I need gold, and fast, and the lords of this land as often as not prefer to stay behind the walls of their fortresses, rather march out to where glory and riches can be won."), ("npc9_backstory_later", "I've offered my sword to a few lords in these parts. But I find as often as not they'll ask me to run messages, or train peasants, or some other job not fit for a gentleman."), ("npc10_backstory_later", "I don't know if I told you or not, but I deserted my unit after I struck a young noble who had ordered me to be horsewhipped without cause. Since then I've been laying low. Thankfully I had the wit to pilfer my captain's purse before heading out, but the money is running low."), ("npc11_backstory_later", "I've been around and about. But it's a rare captain who'll take on an old bag of bones like me as a fighter, even if I could whip half the boys in his outfit."), ("npc12_backstory_later", "I have been here and about, tending to the sick and taking what reward I can. But the people of these parts are ignorant, and have little respect for my craft. The few denars I make are barely enough for me to replenish my stock of medicine. I should be grateful for the chance to find other work."), ("npc13_backstory_later", "I have been wandering through the cities of Calradia, leaving a string of love-sick women and cuckolded husbands in my wake. But I grow weary of such simple challenges, and had been thinking of turning myself to more martial pastimes."), ("npc14_backstory_later", "I have gone from court to court, but I have not yet found a lord who is to my liking."), ("npc15_backstory_later", "I've been going from castle to castle, looking to see if walls or towers need repair. But either the lord's away, or he's got other things on his mind, or I run into his creditors on the street, begging for change, and I realize that here's one job not to take. So if you hear of anything, let me know."), ("npc16_backstory_later", "I do the odd job from time to time. But there's naught like steady employment, and a regular run of corpses to loot."), ("npc1_backstory_response_1", "Perhaps. But how do I know that there won't be a 'misunderstanding' about one of my horses?"), ("npc2_backstory_response_1", "Well, perhaps I could offer you work. Can you fight?"), ("npc3_backstory_response_1", "Well, as it happens I run a company of mercenaries."), ("npc4_backstory_response_1", "I run such a company, and might be able to hire an extra hand."), ("npc5_backstory_response_1", "That's the spirit! I might be able to offer you something."), ("npc6_backstory_response_1", "Hmm. You might consider joining us. Right wrongs, fight oppressors, redeem yourself, that kind of thing."), ("npc7_backstory_response_1", "Hmm... Are you by any chance looking for work?"), ("npc8_backstory_response_1", "I can offer you opportunities to make money through good honest fighting and pillaging."), ("npc9_backstory_response_1", "Perhaps you would like to join my company for a while."), ("npc10_backstory_response_1", "If you're looking for work, I can use experienced fighters."), ("npc11_backstory_response_1", "What will you do now?"), ("npc12_backstory_response_1", "Well, you could travel with us, but you'd have to be able to fight in our battle line."), ("npc13_backstory_response_1", "I might be able to use an extra sword in my company."), ("npc14_backstory_response_1", "I might be able to use you in my company."), ("npc15_backstory_response_1", "Where do you need to go?"), ("npc16_backstory_response_1", "I might be. What can you do?"), ("npc1_backstory_response_2", "I'll do no such thing. I have better things to do then to help thieves avoid justice."), ("npc2_backstory_response_2", "Hard luck, friend. Good day to you."), ("npc3_backstory_response_2", "Go back to your family, lass. Fathers must always be obeyed."), ("npc4_backstory_response_2", "No, sorry, I haven't heard of one."), ("npc5_backstory_response_2", "Sigh.. So long as you hill clans fight tribe against tribe, you will remain a silly, weak people."), ("npc6_backstory_response_2", "Away with you, accursed fraticide!"), ("npc7_backstory_response_2", "Actually, I'm rather fond of the place. Good day to you."), ("npc8_backstory_response_2", "Your brother-in-law was right -- women should not rule. Go back home and tend your hearth."), ("npc9_backstory_response_2", "Some of my best friends are riff-raff. Good day to you, sir."), ("npc10_backstory_response_2", "No doubt you'll wake up with your head in a noose, and you'll deserve it. Good day."), ("npc11_backstory_response_2", "Very interesting, madame, but I have work to do."), ("npc12_backstory_response_2", "Sorry. I can't take on any new hands."), ("npc13_backstory_response_2", "No, sorry. Nothing I can do for you."), ("npc14_backstory_response_2", "I'll let you know if I hear of anything. Good day."), ("npc15_backstory_response_2", "Sorry. I've got all the men that I can manage right now."), ("npc16_backstory_response_2", "Sorry, lass. You sound like you might be trouble."), ("npc1_signup", "{Sir/Madame} -- I'm offended that you would even think such a thing. I'd be most indebted to you, and you'll see that I show my gratitude."), ("npc2_signup", "Well, I will confess that I am not a warrior by trade."), ("npc3_signup", "Do you? Well, I am in no position to be picky! I would be pleased to join you."), ("npc4_signup", "Good! I look forward to vanquishing your enemies."), ("npc5_signup", "Why, that is a most generous offer."), ("npc6_signup", "Yes! You must have been sent by divine providence! Lead me -- lead me away from darkness!"), ("npc7_signup", "I might be. I could certainly use the money."), ("npc8_signup", "Can you? I shall accept your offer."), ("npc9_signup", "I would very much like that, sir"), ("npc10_signup", "Are you, now? Well, that's a sight better than swinging from a gibbet for desertion."), ("npc11_signup", "Why, I'll be a soldier myself! Help my old hands to a bit of loot to comfort me in my retirement. Two boys I bore, both soldiers' brats, and they became soldiers themselves. One had his head split by a Khergit war club, the other died of the pox, but at least they didn't die hungry."), ("npc12_signup", "As I told you, I am a surgeon, not some silk-robed university physician who has never touched a body. I can get my hands dirty."), ("npc13_signup", "Indeed? You would do well to enlist me."), ("npc14_signup", "I would be pleased to ride with you, at least for a little while, for pay and a share of any loot."), ("npc15_signup", "Geroia, eventually, but I'd welcome the opportunity to get a few denars in my pocket, first, so I don't come home empty handed. So if you promise me food and a share of the loot, I'd be happy to fight with you for a while."), ("npc16_signup", "Well, {sir/madame}, let me tell you. I may not know how to read and write, but I know the quickest way to a man's heart is between his fourth and fifth rib, if you understand me. "), ("npc1_signup_2", "I've ridden over a fair amount of rough country in my time, more often than not in a hurry. I'm a good tracker and I've got a good eye for terrain. So what do you say?"), ("npc2_signup_2", "I'm a fast learner. I can ride, and know a fair bit about trade, prices and such."), ("npc3_signup_2", "I think you would find I would be a most valuable addition to your ranks. I am well versed in the classics of literature and can declaim several of the epic poems of my people. I play the lute and am a skilled manager of household servants."), ("npc4_signup_2", "Note however that as a gentleman and the holder of a barony, I expect to be in a position of command, and not be treated as one of the common soldiers."), ("npc5_signup_2", "I shall not betray you -- so long, of course, as you do your duty to me by feeding me, paying me, and not dragging my miserable hide into a battle where there is no chance of winning. Hand me some salt, if you will -- it is the custom of our people to take salt from our captains, as a token of their concern for our well-being."), ("npc6_signup_2", "I am well practiced in the arts of war -- but I beg you, sir, I wish to use my skills to defend the innocent, the pure, and the defenseless, not to be a common brigand and wreak more misery than I have already wrought."), ("npc7_signup_2", "But let your followers know that I do not suffer louts and brutes. Anyone who misbehaves around me will quickly find an arrow in their gullet."), ("npc8_signup_2", "I shall be pleased to fight in your shield wall. But I warn you -- if you ask me to gather the firewood, or cook a meal, you will not like the consequences."), ("npc9_signup_2", "I am a gentleman, and prefer to fight with sword and lance. I recognize that you are of lower birth than I, there is no shame for me to serve under an experienced captain -- presuming, of course, that your followers do not become too familiar with me. I assume that will not be a problem?"), ("npc10_signup_2", "You won't regret taking me on, {Brother/Sister}. I'm a dead eye with a crossbow -- a beautiful weapon, it can right punch through a nobleman's armour and spill his blue blood upon the ground. And I've trained more raw recruits than you've had hot dinners, begging your pardon. I don't toadie to the high-born."), ("npc11_signup_2", "I know how to swing a blade, staunch a wound, and feed an army on the march. It would be a foolish captain who passed up the opportunity to hire an experienced campaigner like me! Say, {laddie/lassie}, don't you command a war party of your own, now?"), ("npc12_signup_2", "I have treated every variety of wound that can be inflicted by the hand of man. Before I was a surgeon, I was a student, so you may be sure that I have inflicted wounds as well as healed them."), ("npc13_signup_2", "Sword, lance, the bow -- my skill in all such martial pursuits is the stuff of epic verse. Together we will perform such feats as will be recounted in festivals and campfires, in filthy taverns and in the halls of kings, for many generations to come."), ("npc14_signup_2", "I am a skilled swordsman, and I can also instruct your men in fighting. But I warn you that I do not care to fight for a leader who is lax in discipline with {his/her} men, for in the long run they will not respect a soft hand. "), ("npc15_signup_2", "Siegework is my speciality, although I reckon can handle myself well enough in an open battle, if need be."), ("npc16_signup_2", "I can throw knives, in addition to stabbing with them, and I'm slippery as quicksilver. You'll find me useful in a fight, I'll warrant."), ("npc1_signup_response_1", "Good. You can be useful to us."), ("npc2_signup_response_1", "That will do."), ("npc3_signup_response_1", "Um, that's a start. We can teach you the rest."), ("npc4_signup_response_1", "Very well. I'll be glad to have you with us, um, 'Baron.'"), ("npc5_signup_response_1", "Certainly. Here, have some salt."), ("npc6_signup_response_1", "Happy to be of service! Get your things together, and we shall be on our way."), ("npc7_signup_response_1", "I will hire you. Try not to shoot anyone on your first day."), ("npc8_signup_response_1", "No fear, ma'am. You're the widow and the daughter of a thane, and you'll be treated as such."), ("npc9_signup_response_1", "Well, it shouldn't be. I'll have a talk with them."), ("npc10_signup_response_1", "Good man. We'll treat you with the respect you deserve."), ("npc11_signup_response_1", "It sounds like you'll be useful. You are hired."), ("npc12_signup_response_1", "Then welcome to our company, doctor"), ("npc13_signup_response_1", "Good. Make yourself ready, and we'll be on our way. "), ("npc14_signup_response_1", "Good. I'll be happy to hire someone like you."), ("npc15_signup_response_1", "That works for me. I will be pleased to hire you."), ("npc16_signup_response_1", "It sounds like you can do the job. I will hire you."), #11 ("npc1_signup_response_2", "I'd prefer not to take the risk. Good day, sir."), ("npc2_signup_response_2", "I'm afraid I'm only looking for men with some experience. Good day to you."), ("npc3_signup_response_2", "Actually, we were looking for a slightly different skill-set."), ("npc4_signup_response_2", "Actually, we are not in the habit of hiring bandits with invented pedigrees. Good day, sir."), ("npc5_signup_response_2", "Actually, on second thought, I prefer to keep more civilized company."), ("npc6_signup_response_2", "On second thought, maybe a mercenary company is not what you need right now."), ("npc7_signup_response_2", "Actually, on second thought, you sound like you might be trouble. Good day to you. "), ("npc8_signup_response_2", "Ah. Actually, if you don't do whatever I order you to do, you'd best seek your fortune elsewhere."), ("npc9_signup_response_2", "You assume wrong, sir. In my company we respect courage and skill, rather than noble birth."), ("npc10_signup_response_2", "On second thought, we value discipline pretty highly in our company. Good day to you."), ("npc11_signup_response_2", "Sorry, madame. We've already got as many in our company as we can handle."), ("npc12_signup_response_2", "A battle is not the same thing as a tavern brawl. Perhaps you should look elsewhere for work."), ("npc13_signup_response_2", "Actually, on second thought, a fighter overeager for glory is dangerous to have in one's company."), ("npc14_signup_response_2", "Actually, I have no wish to provoke a mutiny in my ranks. Good day, sir."), ("npc15_signup_response_2", "Actually, I need a different kind of expertise. My apologies."), ("npc16_signup_response_2", "To be honest, I'd prefer someone who was a little less tempted to larceny."), ("npc1_payment", "I will be very useful to you, {sir/madame}, you can bet on that. Just one more thing before we leave, would you mind lending me {reg3} denars? I am ashamed to say it, but I have made myself a bit of debt here, staying in this tavern over the last few weeks and the tavern owners no longer believe that I am loaded with gold as I used to tell them. You know, things could get ugly here if they see me leaving with you before paying them."), ("npc2_payment", "."), ("npc3_payment", "."), ("npc4_payment", "Excellent. Before we depart, would you be so kind to lend me {reg3} denars? I had to pawn a family heirloom at a pawnbroker here in {s20}, and I would like to retrieve it before we leave."), ("npc5_payment", "Thank you. Now, to seal off our agreement, I ask for {reg3} denars from you. It's an advice my father gave me. He told me 'Baheshtur, never fight for a barbarian before {he/she} pays you your worth of gold first'."), ("npc6_payment", "."), ("npc7_payment", "All right then. I will come with you. But I want a payment of {reg3} denars first. You aren't expecting me to work for free, do you?"), ("npc8_payment", "Then I will fight your enemies for you. But first I want a bounty of {reg3} denars. If you are a worthy captain who can lead {his/her} company to riches and plunder, you should have no trouble paying. I cannot afford to follow a pauper."), ("npc9_payment", "That's very good of you. And before I join, can you lend me {reg3} denars, so that I can buy some proper clothing that befits a gentleman of noble birth such as myself. The coat on me has been worn down badly due to my recent bad fortune, and I cannot let common soldiers mistake me as one of their own."), ("npc10_payment", "That's good news. But I'll ask for one last thing, captain. I have a woman here in {s20}, a tavern wench, and she says she has my child in her belly. I want to give her some money before I leave... for the child, you know. Do you think you can spare {reg3} denars?"), ("npc11_payment", "Hey thank you captain. But before joining up with you, I would ask for a payment of {reg3} denars. I know that in war parties soldiers can go on for weeks without seeing any wages. I am wise enough not to sign anywhere without having myself covered."), ("npc12_payment", "."), ("npc13_payment", "Before I sign up, there is the small matter of some expenses I have incurred while staying here -- {reg3} denars. Do you think that you could cover those for me, as a gesture of friendship?"), ("npc14_payment", "Ah, one last thing. I would ask for an initial bounty of {reg3} denars before I join your command. It's my principle never to enter someone's service without receiving the payment I deserve."), ("npc15_payment", "Good. By the way, as a skilled engineer I would expect a payment for my services. A signing bonus of {reg3} denars would be fair, I think."), ("npc16_payment", "Now, that's good news, captain. So, how about paying me a little something to seal off our agreement? A mere {reg3} would be enough. Please don't take this the wrong way, but I've had some bad luck with employers in the past. "), ("npc1_payment_response", "Very well, here's {reg3} denars. Now, fall in with the rest."), ("npc2_payment_response", "."), ("npc3_payment_response", "."), ("npc4_payment_response", "Certainly. Here's {reg3} denars."), ("npc5_payment_response", "Well... here's {reg3} denars, then. Your first payment."), ("npc6_payment_response", "."), ("npc7_payment_response", "No, of course not. Here's {reg3} denars."), ("npc8_payment_response", "Oh, I am no pauper, madame. Here's {reg3} denars for you."), ("npc9_payment_response", "Very well, here's {reg3} denars."), ("npc10_payment_response", "Of course. Here, {reg3} denars."), ("npc11_payment_response", "Very well, here's {reg3} denars. Make yourself ready. We leave soon."), ("npc12_payment_response", "."), ("npc13_payment_response", "Of course, here's {reg3} denars. Make ready to leave soon."), ("npc14_payment_response", "All right, here's {reg3} denars. You are most welcome in our company."), ("npc15_payment_response", "All right, here's {reg3} denars. Glad to have you with us."), ("npc16_payment_response", "All right, here's {reg3} denars for you. Make yourself ready."), ("npc1_morality_speech", "Oy -- boss. Please don't take this the wrong way, but it's a hard life and it's a bit much that we {s21}. Take a little more care in the future, captain, if you don't mind my saying."), ("npc2_morality_speech", "I hope you don't mind my saying so, but it's a bit hard for me to see us {s21}. Maybe I ought to try to be more of a hardened soldier, but if we could try to exercise a little mercy from time to time, I'd sleep better."), ("npc3_morality_speech", "Perhaps it is not my place to say so, {sir/madame}, but I confess that I am somewhat shocked that we {s21}. Of course I realize that war is cruel, but there is no need to make it more cruel than necessary."), ("npc4_morality_speech", "Your pardon -- just so you know, the men of the House of Rolf do not care to {s21}. I will not be pleased if you continue to take this course."), ("npc5_morality_speech", "Pardon me, captain. It is not good to {s21}. Your first duty is to the men who have taken your salt. The least they can expect is food, pay, the opportunity to loot, and that you not waste their lives needlessly."), ("npc6_morality_speech", "Excuse me, {sir/madame}. As you know, I joined with you to right wrongs, protect the innocent, and make amends for my sin. I did not expect to {s21}."), ("npc7_morality_speech", "Captain -- I do not like to see us {s21}. Such are the actions of a common bandit chief, with no regard for his followers."), ("npc8_morality_speech", "I was not pleased that you decided to {s21}. To fall in battle is an honour, but to fight in a warband led by a coward is a disgrace."), ("npc9_morality_speech", "{Sir/Madame} -- it is not my way to {s21}. Men of my house will accept death but not dishonour. Please do not make me ashamed to serve under you."), ("npc10_morality_speech", "Begging your pardon, captain. I can't say that I'm happy to see us {s21}. Those are just simple people, trying to make a living. If we could try to go easy on the poor wretches, captain, I'd feel much better."), ("npc11_morality_speech", "Excuse me, captain. It's not good that we {s21}. I've followed armies and warbands for 30 years, and the least the soldiers expect of a leader is to feed them, pay them, and do {his/her} best to keep their sorry skins intact as best {he/she} can."), ("npc12_morality_speech", "Captain -- I do not like to see us {s21}. I am prepared to be a warrior, but not a brigand. Pray let us try to show a little more compassion."), ("npc13_morality_speech", "Captain, if we can avoid it, I'd prefer not to {s21}. Calradia is a small place, and one's reputation is precious. I would not care for one of my rivals to include this latest unfortunate incident in a satirical verse."), ("npc14_morality_speech", "I do not care to {s21}. No one with a reputation for cowardice will be properly feared by his men."), ("npc15_morality_speech", "{Sir/Madame} -- just so you know my opinion, any commander with sense will not let his company {s21}.I hope you don't mind me speaking so bluntly."), ("npc16_morality_speech", "Captain. I don't like to {s21}. So many throats left uncut, and so many purses left unexplored..."), ("npc1_2ary_morality_speech", "Boss -- just so you know, I've got no problem if we {s21}. Living to fight another day makes good sense to me."), ("npc2_2ary_morality_speech", "{Sir/Madame} -- I'm not altogether happy that we {s21}. I'm a merchant, and in our business one is bonded by one's word. I don't want a reputation for dishonesty -- that would spell my end as a trader, {sir/madame}."), ("npc3_2ary_morality_speech", "{Sir/Madame} -- I think it was a brave decision you took to {s21}. There is no shame in finding a way to avoid the spilling of blood."), ("npc4_2ary_morality_speech", "Your pardon -- whatever anyone else says, I think nothing of it that you {s21}. You should adopt whatever ruse you need to survive in these troubled times."), ("npc5_2ary_morality_speech", "[No secondary moral code]"), ("npc6_2ary_morality_speech", "{Sir/Madame} -- you may choose to {s21}, but would prefer to have no part in it. Such is not the path to my redemption."), ("npc7_2ary_morality_speech", "[No secondary moral code]"), ("npc8_2ary_morality_speech", "[No secondary moral code]"), ("npc9_2ary_morality_speech", "Captain, I am dismayed that you {s21}. A {gentleman/gentlewoman} such as yourself should exhibit the highest standards of honour at all times."), ("npc10_2ary_morality_speech", "{Brother/Sister} -- I can't say I like to see us {s21}. You should treat your men well, and they'll repay with interest."), ("npc11_2ary_morality_speech", "[No secondary moral code]"), ("npc12_2ary_morality_speech", "[No secondary moral code]"), ("npc13_2ary_morality_speech", "[No secondary moral code]"), ("npc14_2ary_morality_speech", "Captain -- you should not let it bother you that you {s21}. Armies are made to do their leaders' bidding, and hardships are part of a soldier's life."), ("npc15_2ary_morality_speech", "You know, friend {playername}, it's none too reassuring to see how you just {s21}. If you can break your word to them, you can break your word to me, is how I figure it."), ("npc16_2ary_morality_speech", "Captain -- just so you know, it's no problem by me that we {s21}. We do what we need to do to live, and they'd do the same to us if they were in our shoes."), ("npc1_personalityclash_speech", "Captain -- no offense, but I'm a bit tired of {s11}, who puts on airs like she's something better than your humble servant Borcha."), ("npc2_personalityclash_speech", "{Sir/Madame} -- as you recall I was a merchant before I signed on with you. I respect men who make their living peacefully, risking all to bring goods for far away lands."), ("npc3_personalityclash_speech", "Captain -- in my opinion, {s11} is a hard and cruel man. He speaks of nothing but the need to flog, beat, and hang his fellow soldiers."), ("npc4_personalityclash_speech", "{Sir/Madame}. The House of Rolf is one of the most ancient and respected families in this part of the world, with a provenance dating back to the Old Calradic Empire. Yet {s11} openly shows me disrespect, and casts doubt on the provenance of my house."), ("npc5_personalityclash_speech", "A moment of your time, captain. {s11} seems to think me a common bandit, just because I have rewarded myself in the past to the legitimate spoils of war from caravans passing through my family's lands."), ("npc6_personalityclash_speech", "Your pardon, {sir/madame}, but I cannot keep my tongue stilled any longer. That harlot, {s11} -- every time she sees me she points the five fingers of her hand at me -- a peasant's sign to ward off evil."), ("npc7_personalityclash_speech", "Captain, I have done my best to put up with your followers' rude talk and filthy habits. But that one who calls himself {s11} is beyond tolerance."), ("npc8_personalityclash_speech", "Just so you know, I cannot abide that insolent mountebank {s11}. Some minutes ago, I was remarking to our companions how the peasants of this region were more than usually slack-jawed and beetle-browed, and speculated that perhaps they had bred with apes."), ("npc9_personalityclash_speech", "Sir -- {s11} is a base braggart, a man with no respect for the honour of women. I am tired of hearing how he conquered this or that damsel."), ("npc10_personalityclash_speech", "Excuse me, captain. I hate to trouble you with such things, but I just wanted to let you know that I can't abide that fellow Rolf, the one who calls himself a baron."), ("npc11_personalityclash_speech", "Begging your pardon, captain, but I can't keep silent. That man, {s11} -- he killed his own brother."), ("npc12_personalityclash_speech", "My lord. The barbarian woman, {s11}, complained of headaches -- a possible symptom of excess of sanguinity. I thought to apply my leeches."), ("npc13_personalityclash_speech", "Captain, I weary of {s11}, who talks of nothing but chivalry and feats of arms."), ("npc14_personalityclash_speech", "Excuse me, captain. A few minutes ago, I had expressed the opinion that liberal use of the lash and occasional use of the gallows is essential to keep soldiers in line. Men without a healthy fear of their commanders are more likely to run from battle."), ("npc15_personalityclash_speech", "Excuse me. I hope you don't mind me telling you that in my opinion, that girl {s11} is a danger to the party. She's a feral brat, disrespectful of authority and the basic principles of the military art."), ("npc16_personalityclash_speech", "Oy, captain. Just so you know -- there's something funny about {s11}. He makes strange scrawlings in the dirt, and mutters to himself."), ("npc1_personalityclash_speech_b", "She's a common bandit, just like myself, and she has no right to tell me to keep my distance from her, as she did just now."), ("npc2_personalityclash_speech_b", "I don't much care to hear {s11} gloat about the caravans he has looted, or he plans to loot, like he has no respect for good honest trade."), ("npc3_personalityclash_speech_b", "I know that an army is not a nursery, and that strong discipline is important, but I do believe that man enjoys cruelty for cruelty's sake. I hope you do not mind me saying so."), ("npc4_personalityclash_speech_b", "{Sir/madame}, these are indeed sorry days if common folk are allowed to mock their betters. That is all."), ("npc5_personalityclash_speech_b", "I told him that if the warrior's way bothers him so much, that he become a priest or a beggar and so not have to worry about such things. I hope you do not mind that I said such things."), ("npc6_personalityclash_speech_b", "I know the crime I committed was an abomination, but I am seeking repentance, and I deserve better than to be the object of some witch's superstition. I just thought you should know."), ("npc7_personalityclash_speech_b", "I do not care for how he stares at me around the campfire after a meal, as he picks his teeth. I believe I recognize him from my days as a bandit. He is base and ignorant. I do not care to travel with such people."), ("npc8_personalityclash_speech_b", "{s11}, that font of impudence, overheard me, and called me ignorant, and a savage, and other words I do not care to repeat. It was only out of respect for you that I refrained from cutting his throat then and there. I thought it only fit that I should warn you."), ("npc9_personalityclash_speech_b", "If he persists, I shall tell him that he is a base varlot, and if it comes to blows I will not apologize. That is all, {sir/madame}."), ("npc10_personalityclash_speech_b", "He's just a simple brigand, as far as I can tell. House of Rolf, my arse. Genuine blue-bloods are bad enough, but those who pretend to be blue-bloods are bloody intolerable. Anyway, I might have said something a bit sharp to him a minute ago. He seemed to take offense, anyway. I just thought you should know."), ("npc11_personalityclash_speech_b", "He's a kinslayer, cursed by heaven, and he'll bring misfortune and sorrow upon us, that's for certain. I don't like being around him and I don't think he should be with us. That's all. Sorry for troubling you."), ("npc12_personalityclash_speech_b", "But when I tried to afix them, she recoiled and struck me, and accused me of witchcraft. Captain, I am deeply tired of attending to the complaints of such an ungrateful and ignorant lot."), ("npc13_personalityclash_speech_b", "Valorous deeds are all very well, but they are not the only goals worth pursuing in life. Personally, I never trust any man who has not at least once woken up drunk in a ditch, or been beaten by the slipper of his lover."), ("npc14_personalityclash_speech_b", "That chit {s11} saw fit to admonish me for this. I will not have my methods questioned in front of the men, and I will not serve any commander who tolerates such insubordination in his company. Thank you for allowing me to speak my peace."), ("npc15_personalityclash_speech_b", "What's more, I suspect she's a thief. I found her going through my baggage and pawing some of my schematics, and she pulled a knife on me when I thought fit to object. A wise captain would not allow her in his company."), ("npc16_personalityclash_speech_b", "Fearing witchcraft, I asked him about it, and he told me that a chit of a girl like myself should mind her own business. So I had a look in his baggage, and found strange plans and diagrams. I think he's a sorceror, {sir/madame}, and if I catch him trying to hex me he'll have a knife in his throat."), ### set off by behavior after victorious battle ("npc1_personalityclash2_speech", "Oy -- boss, I don't fancy myself a sensitive soul, but I don't particularly like how {s11} went about cutting the throats of the enemy wounded, back there."), ("npc2_personalityclash2_speech", "{Sir/Madame}. If you don't mind, I'd prefer not to be deployed anywhere near {s11}, after what he said to me during that last battle."), ("npc3_personalityclash2_speech", "{Sir/Madame}. Since I have joined your company, I have tried hard to learn how to live like a soldier, and how to honour the warrior's code. If I occasionally make mistakes, I would hope to be forgiven."), ("npc4_personalityclash2_speech", "{Sir/Madame}. I happened to exchange a few words with {s11} as we were dividing up the spoils of battle. Please inform her that when she speaks to me, she should call me 'Baron' or perhaps 'Baron Rolf,' or 'Your Grace,' but certainly not just 'Rolf.'"), ("npc5_personalityclash2_speech", "Captain. {s11} needs to have her tongue cut out."), ("npc6_personalityclash2_speech", "My lord. Did you see {s11} during that last battle? He taunts the fallen foe as they lay stricken and helpless on the battlefield, mocking their parentage, their foolishness for having fought us."), ("npc7_personalityclash2_speech", "Captain -- I have been searching my mind trying to remember where I have seen {s11}, the one who calls himself a baron. As I watched him in action during that last battle, I suddenly remembered. He is a good fighter, but also a vicious one."), ("npc8_personalityclash2_speech", "Captain. {s11} is a most insolent girl. I have tried to be polite, even friendly, only to have her rebuff me."), ("npc9_personalityclash2_speech", "{Sir/My lady}, I hope you do not mind me telling you this, but in my opinion {s11}, the merchant, does not know his place. During that last battle, he cut in front of me to engage a foe whom I had marked for my own."), ("npc10_personalityclash2_speech", "{Brother/Sister} -- a question for you. Are you in charge of this company, or is it {s11}?"), ("npc11_personalityclash2_speech", "Captain. I don't much care for that {s11}. After that last battle, he went around muttering some heathen incantation, as he went through the slain looking for loot."), ("npc12_personalityclash2_speech", "Captain. I can no longer abide the rank ignorance of {s11}. As I was treating the wounded during our last battle, he saw fit to disparage my use of laudanum in relieving the pain while I conducted surgery, and of treating wounds with a poultice of honey."), ("npc13_personalityclash2_speech", "Hello, captain! {s11} is a temperamental one, isn't he? During that last battle, I was merely having a friendly chat with our foes about their mothers as we exchanged swordblows, and it caused him to throw a fit!"), ("npc14_personalityclash2_speech", "Sir. {s11} is incorrigibly indisciplined. During that skirmish, I called out to him that he should hold ranks with the rest of our battle array. He called back to me that I should 'get stuffed.'"), ("npc15_personalityclash2_speech", "Captain -- I must tell you that I question {s11}'s medical credentials. As he was tending to our wounded after that last battle, I saw fit to remind him that the peerless Galerian often advocated administering a distillation of beetroot, to restore the humor imbalance brought by loss of sanguinity."), ("npc16_personalityclash2_speech", "Beg your pardon, sir. {s11} might have been a very good thief, but he's not got the stomach to be a warrior, if you ask me."), ("npc1_personalityclash2_speech_b", "The way she whistles cheerfully as she does it -- it puts a chill down my spine, it does."),#borcha - klethi ("npc2_personalityclash2_speech_b", "The enemy was bearing down on us, and he says, 'Step aside, merchant, this is knight's work.' Next time I will step aside, and let him take a spear in the gut."), #marnid - alayen ("npc3_personalityclash2_speech_b", "After our last victory I was picking through the slain, and availed myself of one of our foe's purses. No sooner had I done so then {s11} came up behind me and struck it from my hands, saying that it was she who had made the kill, and thus she deserved the spoils. My lord, I could not tell in the heat of battle who had struck whom. If {s11} had simply told me that she deserved the purse, I would gladly have given it to her."),#Ymira - matheld ("npc4_personalityclash2_speech_b", "I am of noble blood, and she is of the basest birth. She must remember her place."),#Rolf - deshavi ("npc5_personalityclash2_speech_b", "When the loot was piled up after the last battle, I found among the enemy's baggage a very decent cooking pot. Often I had wished to find such a pot, so I could boil some of the stews that my people use to warm their bellies during the winter months. But {s11} grabs the pot, and tells me that I will not be allowed to 'taint' it with heathen food, and that it should properly belong to her. I yielded the pot to her, but I will not tolerate such disrespect in the future."), #beheshtur- katrin ("npc6_personalityclash2_speech_b", "My lord -- such hubris will not be overlooked by Heaven, and I fear we shall all of us pay the price."), #firentis - nizar ("npc7_personalityclash2_speech_b", "Back when I lived in the ravines, we would sometimes fight with a rival band called the Brethen of the Woods. Captain -- I would not trust any man who hides his origins, and particularly would not trust a common bandit who calls himself a lord."),#deshavi - rolf ("npc8_personalityclash2_speech_b", "As we were cleaning our weapons after that last battle, I remarked that I thought her a handsome girl, and after I regained my lands I would happily find her a match with one of my warriors. I thought it was a very generous offer, as a woman disinherited by her father is hardly going to find herself awash in prospects. But rather than thank me, she simply turned her back without a word. It was only out of respect for your leadership that I did not immediately try to teach her some manners."), #matheld - ymira ("npc9_personalityclash2_speech_b", "I appreciate that he is willing to risk his life in battle, but that alone does not make a gentleman. He is not of noble birth, and his family's wealth comes from commerce and usury. He may fight with us as an auxiliary, but should not attempt to steal glory from his betters."),# alayen - marnid ("npc10_personalityclash2_speech_b", "In that last battle he was shouting at me: 'Go forward, go back, hold the line.' When I told him to mind his own trimming he said he'd have me flogged. Captain, that man is looking for a crossbow bolt in his chest, begging your pardon."), ("npc11_personalityclash2_speech_b", "He said it was a prayer of thanksgiving for victory, but it didn't sound like that to me. Captain, I don't want him raising up the ghosts of the dead to make trouble for us on our travels. I think you had best be rid of him"), ("npc12_personalityclash2_speech_b", "Captain, if that man knew the slightest thing about medical matters, he would know that one should never undermine a patient's confidence in his doctor, particularly not during a complicated operation. If you would be kind enough to dismiss him from this company, you would be doing all of us a great service."), # jeremenus - artimenner ("npc13_personalityclash2_speech_b", "When all the dust settled, {s11} turned on me and told me not to 'tempt the wrath of the Heavens' with my 'hubris.' I responded that at least I hadn't killed my own brother, which I think bothers the Heavens a lot more than battlefield small talk. {s11} turns red like a baboon's arse and would have struck me had I not artfully dodged out of his away. Tell him to lighten up, will you?"), #nizar - firentis ("npc14_personalityclash2_speech_b", "{Sir/Madame}, such defiance of proper authority is a corrosive influence on our company, and I shall have him flogged if he does so again."), #lazalit - bunduk ("npc15_personalityclash2_speech_b", "{s11} responded that Galenian was an 'antiquated know-nothing.' Captain, no true doctor would have such disrespect for the great masters of the past. I do not believe you should employ such an obvious impostor."), #artimenner - jeremus ("npc16_personalityclash2_speech_b", "After our last scrap, I was slicing open the guts of some our foes to check for hidden gold, as a girl who counts her pennies ought. He gagged and muttered that I was an 'animal.' I'll inspect his innards for contraband if he doesn't keep a civil tongue in his head."), #klethi - borcha ("npc1_personalitymatch_speech", "Boss. {s11} back there didn't do badly in that last fight at all. He's a good egg, too."), ("npc2_personalitymatch_speech", "{Sir/Madame}. I just wanted to tell you that {s11} may be a rough sort, and I'll venture a thoroughgoing rogue as well, but I'm proud to call him my companion."), ("npc3_personalitymatch_speech", "Hello, {sir/madame}! I had just wanted to tell you that {s11} is a most gallant knight. Did you see him in our last battle?"), ("npc4_personalitymatch_speech", "Excuse me, {sir/madame}. I just wanted to say a word in praise of {s11}. He did well in that last battle."), ("npc5_personalitymatch_speech", "That was a fine battle, {playername} Bahadur! {s11} is a good man to have by our side in a fight."), ("npc6_personalitymatch_speech", "Captain. Sometimes I am troubled by all this bloodshed, although I know that proud warlords must be humbled, and cruel bandits tamed, if we are to restore peace to Calradia."), ("npc7_personalitymatch_speech", "Captain. I was just talking to {s11}. She may be a bit savage, but I believe that she is a faithful friend."), ("npc8_personalitymatch_speech", "A fine battle that was, captain. And I have to say, I admire the taunts that {s11} hurled at our enemy."), ("npc9_personalitymatch_speech", "Captain. {s11} acquitted herself well in that fight back there. A fine, modest maiden she is, if I dare say so myself."), ("npc10_personalitymatch_speech", "Ahoy, Brother! I wish you joy of your victory! Say, old Mother {s11}'s not bad in a scrap, is she, for a woman of her years? Although I'm getting to be a bit of an old dog myself, now."), ("npc11_personalitymatch_speech", "Ach, captain! A fight like that one sets my old joints a-creaking. Still, we licked them pretty good, didn't we?"), ("npc12_personalitymatch_speech", "A bloody business, captain, a bloody business -- although a necessary one, of course. {s11}, I believe, shares my ambivalence about this constant fighting."), ("npc13_personalitymatch_speech", "You have earned your name today, oh valorous one! And {s11}, too! I like that one. She sings the songs of her people as she goes into battle, which appeals to an artistic soul like my own."), ("npc14_personalityclash_speech", "Captain. It is a pleasure going into battle with men like {s11} by my side."), ("npc15_personalitymatch_speech", "Captain. I was just having a word with {s11} after our last battle, and it strikes me that the man has got a good head on his shoulders."), ("npc16_personalitymatch_speech", "Oy -- captain. I was just having a chat with {s11}, as we picked through the bodies after our last little scrap."), ("npc1_personalitymatch_speech_b", "Without good honest souls like him to bring silver into Calradia, scoundrels like me would have a hard time in life, I'll warrant. I'm glad to have him with us."), ("npc2_personalitymatch_speech_b", "Based on how he did in that last fight, I'd say that I'd trust my back to him any day, although I'd still keep a hand on my purse."), ("npc3_personalitymatch_speech_b", "I also confess that I find him a truly delightful companion, a man of both wit and manners. Perhaps, perhaps... Ah, but I say too much. Good day, {sir/madame}."), ("npc4_personalitymatch_speech_b", "You chose well to enlist him in our company. He knows a thing or two about a fight, and also knows the importance of respecting his comrades-in-arms, unlike some others I might mention."), ("npc5_personalitymatch_speech_b", "As for his other attributes, I doubt that he is any more a Baron than I am, but I have to admire the brazen way he makes that claim."), ("npc6_personalitymatch_speech_b", "I must say that {s11} is a source of great comfort to me. I have told him of my sin, and he said to me that Heaven will forgive my transgression, if I truly repent and truly desire such forgiveness. He is wise, and I am glad that he is with us."), ("npc7_personalitymatch_speech_b", "At some point in the future, if you have no need of our services, she has promised to go back to the ravines with me and find the bandits who murdered my lover, and help me take my revenge. It was a kind offer. I am glad that she is with us."), ("npc8_personalitymatch_speech_b", "He managed to include their geneology, their appearance, and their eating habits in a well-framed Old Calradic quatrain. I personally prefer the saga, but we Nords respect poetic craftwork when we hear it."), ("npc9_personalitymatch_speech_b", "Were she of noble blood, I might ask for her hand. It is a pity that she is a merchant's daughter. But speaking with her is a pleasant way to pass time on the march."), ("npc10_personalitymatch_speech_b", "Heh. It just goes to show that youth ain't everything, that experience also wins battles. I reckon she and I could teach the young puppies of the world a thing or two, couldn't we?"), ("npc11_personalitymatch_speech_b", "Old {s11} in particular showed them a thing or two, I thought. Not bad for the pair of us, I thought, given that between us we've probably seen close to a hundred winters."), ("npc12_personalitymatch_speech_b", "It saddens him deeply to take the lives of his fellow men, however just the cause. He and I have talked together of a brighter future, of the need to unite these petty warring kingdoms of Calradia, so that we may bring this time of troubles to an end."), ("npc13_personalitymatch_speech_b", "Also, although I normally prefer the coy to the Amazonesque, I confess that I have also noticed the femininity she tries to hide beneath her martial demeanour. True, she is a bit aloof on the march and in camp, but perhaps my fair words can melt the Nordic ice around her heart."), ("npc14_personalityclash_speech_b", "He is a professional soldier, and though he may not be as fast on his feet as some others, he knows the wisdom of holding together in a disciplined battle-line. You showed good sense in bringing him into this company."), ("npc15_personalitymatch_speech_b", "War, like any other affair, requires careful planning and preparation, and a firm grasp of strategic principals. All other things being equal, the best trained army will win the battle, an observation that I think our last fight bears out. The men may curse him now, but they'll learn to thank him, I'll warrant."), ("npc16_personalitymatch_speech_b", "Have you heard her story? Can you believe the wrongs done to her? I tell you, it makes my blood boil. I want to cut off all the little bits of those bastards who mistreated her -- and I'll do it, too, if we ever run into them in our travels."), ("npc1_retirement_speech", "I'm a bit tired of marching up and down the land, shedding my blood for someone else's cause. The loot is good, but I think I've got enough of that, now. I'm going to head back to my village, take a wife, settle down, maybe raise horses if I can afford it."), ("npc2_retirement_speech", "I'm getting a bit tired of the warrior's life. I'm going to invest my share of our loot into a cargo of goods -- furs, linens, velvets, probably -- and take them back over the mountains. I would like to thank you again for taking me on, and wish you the best of luck."), ("npc3_retirement_speech", "I am afraid I have something to tell you. I have decided that the warrior's life is not for me. I think it is probably too late for me to find a good marriage -- no one of my people would take a wife who had served with a company of soldiers -- but I may have enough money to start myself up as a merchant. I hope you will not be angry, {sir/madame}."), ("npc4_retirement_speech", "I have fought with you honourably, as befits a son of the House of Rolf, but I am not altogether satisfied with your leadership. I will go home to my ancestral estates, which are much in need of my services."), ("npc5_retirement_speech", "Bahadur -- since I have taken your salt, I have fought for you fiercely, and loyally. But you have not always repayed my service with the kind of leadership that I deserve. So I am going home, in the hope that the Khan's men have forgotten me, to see my father and brothers again."), ("npc6_retirement_speech", "I joined this company in the hope that you would lead me out of darkness, and indeed I have found a measure of peace here. But I have some qualms about your leadership, and have begun to suspect that the path to redemption can be found elsewhere."), ("npc7_retirement_speech", "I am tired of this squalid life of endless warfare, seeing men debased by fear, greed, lust, and a hundred other sins. I have money in my purse. I am going overseas to look for a better land than Calradia. I assume that you will fare well without me."), ("npc8_retirement_speech", "I have fought in your shield wall, and done well by it. But your leadership is not always to my liking, and anyways I have another task. I will take what plunder I have won and raise a warband of my own and sail to Nordland to take back my husband's hall from my treacherous brother-in-law. I wish you well."), ("npc9_retirement_speech", "We have fought well together, and earned ourselves much glory. But I have some reservations about your leadership, and at any rate have my patrimony to reclaim. I will be leaving you. Perhaps we will meet again."), ("npc10_retirement_speech", "I've had enough of tromping up and down the length and breadth of Calradia. I've got enough to buy a small bit of land somewhere, so I think I'll give that a try. So long, and best of luck to you."), ("npc11_retirement_speech", "You did an old woman a great service by taking her into your company. But I'm afraid I'm finding this life no more to my liking than driving a wagon. Too much cold, too much hunger, and at the end all I see in front of me is a hole in the ground. So I'll be off, although I don't know where."), ("npc12_retirement_speech", "I've done all right in your company. I filled my belly, put some gold in my purse, and broadened my knowledge of wounds and injury -- I can't complain about that! But I think right now that service in this company is holding me back. I have a duty to share my findings with other surgeons, and for that I need to hire scribes, who are rare in Calradia. I shall be going home"), ("npc13_retirement_speech", "As the luster of your name grows ever brighter, I fear that my own reputation will seem pale in comparison, as the moon is outshined by the sun. I have decided to strike out on my own. The very best of luck to you!"), ("npc14_retirement_speech", "I would like to inform you that I wish to sever our relationship. I intend to seek alternative employment."), ("npc15_retirement_speech", "I appreciate that you took me on, but I'm not altogether happy about how things have worked out. I'm going to head off elsewhere -- maybe go home, maybe find another job, I haven't quite decided yet."), ("npc16_retirement_speech", "I've had good times in this company, and I've found myself a pretty trinket or two on the battlefield, but right now it isn't working out. I'm leaving you to go offer my talents to someone else."), ("npc1_rehire_speech", "Boss -- it's good to see you again. I know we had our differences in the past, but to tell you the truth, those were some of the best days I've known. And, to tell you the truth, I've had a bit of difficulty finding work. Listen, if you'd be willing to have me back, I'd be willing to sign up with your company again."), ("npc2_rehire_speech", "{Sir/Madame}! It's good to see you again. But I'll confess -- I've been looking for you. I bought a load of goods like I told you I would, loaded them up, and took them back across the steppe -- but wouldn't you know it, I was hit again by Khergits, and lost it all. I guess I'm just destined to fight for my fortune. Also, people tell me that you've done very well for yourself. So tell me, {sir/madame}, would you have me back?"), ("npc3_rehire_speech", "Well, hello {sir/madame}! It is very good to see you again. I have not fared so well since we parted, I am afraid. My mother's family. whom I hoped would give me a start in trading, have not been as welcoming as I have hoped. I receive nothing but lectures from my aunts, on how I have ruined my prospects for marriage by taking service in a mercenary company. Perhaps I am better suited to war than to commerce, to share a meal over a campfire with rough fellows than to drink wine with the burghers of Veluca. {Sir/Madame}, I must ask you -- will you take me back?"), ("npc4_rehire_speech", "Why hello, captain. It's been a while. You've done well for yourself, I hear. For my part, I've been having some difficulties coaxing a living from my estates -- locusts, bad rains, unruly serfs, that sort of thing. I thought I might take up the sword once more. I know there's been some bad blood between us, but I'd be honoured to fight in your ranks once again."), ("npc5_rehire_speech", "{playername} Bahadur! Your fame grows ever greater -- even as far as my homeland, beyond the mountains. I'd returned there, hoping that the Khan's men had forgotten. Well, they had not -- even before I set foot in my valley, I had word from my family that both the Khan and the Humyan were looking for me. So I came back again, hoping you might forget any harsh words I had spoken, to see if I could fight with you once again."), ("npc6_rehire_speech", "It is good to see you, {sir/madame}. Everywhere I go, men are in awe of your deeds. I have not had it so well since I left. Wherever I go, I feel my demons returning. My soul is in turmoil. For reasons that I cannot fully explain, I had found peace in your company, even if I had questions about your leadership. Will you allow me to serve with you once again?"), ("npc7_rehire_speech", "Captain! It is good to see you. Forgive what I may have said when we parted. I took a ship out of Wercheg, bound for the east, but it was taken by pirates and after my ransom I was set ashore back here. There may be better places in the world than Calradia, but I have yet to see them. So I think, if it is my lot to live here, then your company is as good a livelihood as any. Will you have me back?"), ("npc8_rehire_speech", "Greetings to you, {playername}. I was wondering if the harsh words spoken between us in the past could be forgotten. I have been hunting among the Nords here, to see if I could find enough men to take back my husband's hall. But I could not find enough men to crew a longship, and those whom I gathered quickly got bored and wandered off -- not, I will add, before they drank away such gold as I had accumulated. So I thought back to the battles we fought together. Those were good days, and profitable ones too."), ("npc9_rehire_speech", "My dear, dear {man/lady}! So good it is to see you! I have sought service with the lords of this land, but have been most grieviously disappointed. Half of them ask me to collect debts from fellow lords, as though I were a banker's errand boy, or chase down his serfs, as though I were a farm overseer. One even asked me to murder one of his creditors! I have looked for you, to see if you would wish me to join you again."), #Alayen ("npc10_rehire_speech", "Captain! It's good to see you. You see, it turns out I'm not much of a farmer. Too soft on the hired hands, I figure. I let them rob me blind. I guess fighting is what I know best. So tell me, captain, are you still looking for good men?"), ("npc11_rehire_speech", "Captain! So good to see you! People say that you've been making gold hand over foot. I'm a fidgety old bag of bones, I'll admit. I left you because I wasn't satisfied with the warrior's life, but I spend a bit of time in town and I realize that there's worse things in life than a full belly, honest companions, and the joy of seeing the enemy run before you. So, would you be hiring again"), ("npc12_rehire_speech", "Captain! It's a fine thing to see an honest face like yours. This world is full of lies. I went home to publish my findings, hired some scribes and made a handful of codices, and waited for the commissions. But it turns out that the universities don't care about real medical knowledge rather than warmed-over Galerian. And publishers -- let me tell you, you never saw anyone so unscrupulous. They rent the books out chapter to by chapter to students to copy, but half of them aren't returned, and those that are have pages soaked in wine, and there's no longer a complete copy of my work anywhere. I'll keep trying, but first I need a bit of money in my pocket, first. Are you looking for a surgeon?"), ("npc13_rehire_speech", "Well hello there, oh valorous one. I had been hoping to see you again. Everywhere I go, I hear tales and songs of your deeds. I will admit that I felt a twinge of regret that we had parted ways, and, I'll confess, a twinge of jealousy as well at your reputation. I thought that once again I might fight by your side, and thus bask in the reflection of your glory. Perhaps we might ride together again, for a little while?"), ("npc14_rehire_speech", "Captain. It is good to see you. When last we parted, I was ready to swear that I would not serve you again, but perhaps I judged you too harshly. All over Calradia, men sing your praises. I have tried serving in other lords' armies, and believe me, what I have seen of them restores my opinion of your leadership. If you would have me in your company, I would fight for you again."), ("npc15_rehire_speech", "Why hello, {playername}. I can't say I'm entirely displeased to see you. You see, I took on another contract before I left, and sure enough, when it came time to collect the pay, the lord had nothing but talk and excuses and petty little complaints about my handiwork. I can't say I was always happy in your company, but at least I put gold directly into my purse after every battle. You still offering work?"), ("npc16_rehire_speech", "Captain! They say that you've done well for yourself since we last met. I'll come out and admit that I cursed your name when we parted ways, but thinking back on it you weren't all that bad. All these lords, they're glad enough to send me on little side errands, but they don't much care to have me in their main battle-line. Apparently I spook the men. I've heard it muttered that I'm a witch, or that I eat men's hearts after killing them, or other rot. Not that I mind stabbing a man while he's asleep, but it's a lot more gratifying when he's awake and kicking. So I thought I'd try to find you again, see if you'll take me on."), #local color strings ("npc1_home_intro", "Boss -- did you know that I was born around here, in the high steppe? This is where I got my eye for horseflesh, because this is good land for horses, although a hard land for men. I suppose that's why the Khergits like it."), ("npc2_home_intro", "We're approaching Sargoth. That's where I was headed when the Khergits got me."), ("npc3_home_intro", "Can you smell that? Lemon trees, apples and crocus flowers, it's the scent of Veluca. I spent many a happy summer here when I was a girl, playing in the gardens of my mother's family while my father was away trading."), ("npc4_home_intro", "The Woods of Ehlerdah. Bah. This place is thick with bandits and outlaws."), ("npc5_home_intro", "Bahadur, we are nearing Halmar, largest town in the lower steppe. My mother's sister went here to marry a townsman and I thought to seek service with the lord here. That is when I ran into you."), ("npc6_home_intro", "I can see by the vines and terraces on the hillside that I am near home. I have no wish to see my family, so I will linger outside the walls if you go into town. I am sure that you will understand."), ("npc7_home_intro", "Do you smell that? Salt fish, rotting flax and river mud. The smells of my childhood. I want to retch."), ("npc8_home_intro", "Hmf. Do you hear that? It must be the crash of waves on the headland. We must be near Gundig's Point."), ("npc9_home_intro", "Behold the Rock of Rivacheg! The strongest fortress in Calradia. My father was one of those who held the line here against the Nords, when they first tried to push inland from the coast."), ("npc10_home_intro", "D'you smell that fresh air, Brother? This was my home, before I went abroad in search of coin. It's good to be up in the hills again. It's the smell of freedom. This is the cradle of Rhodok liberty, here under Grunwalder Castle"), ("npc11_home_intro", "I see the mountains. We must be getting near home."), ("npc12_home_intro", "We're passing by the site of one of my greatest medical triumphs, if that interests you."), ("npc13_home_intro", "Ah, Castle Ergellon! Such a lovely spot, by the deep lake. Such happy days I spent here, the summer before last."), ("npc14_home_intro", "Do you see that fortress up there, on the spur over the valley? Ismirala? I spent a winter there some years back, trying to train the lord's men."), ("npc15_home_intro", "You see that castle up on the hill? Culmarr Castle, it's called. I did some work there, not long ago. It's not as showy as some of the other castles in this land, but it's the finest stonework you ever saw."), ("npc16_home_intro", "Aye, captain, do you see those? Those are hare tracks in the snow. We must be getting near to my birthplace."), ("npc1_home_description", "Well, Khergits always lived here, even back in the old days, as the Emperor gave them gold and lands to keep out the other tribes. I'm told my grandfather was a Khergit chieftain, although my mother didn't know him, any more than I knew my father. When my mother was a lass, the Khergit started coming over the mountains in larger numbers, and now there's a Khergit Khan in Tulga."), ("npc2_home_description", "People say that the Nords are a bunch of bloodthirsty barbarians, but they have a good head for trade, if you ask me. They make the people up and down the coast grow flax, which they weave here into linen. It can't compete with Jelkala silks and velvets as a luxury fabric, but it makes good summertime wear and you can use it for the sails of ships. More importantly, linen was one of the few goods that someone else in Calradia wasn't already making."), ("npc3_home_description", "Veluca has wet winters and hot summers, but the people here build great cisterns to water their crops. They grow grapes -- Velucan wine is famous, {sir/madame} -- and those who can afford it make walled gardens, where fruit trees grow in abundance, and we sit at night listening to music, or playing chess, or merely sniff the night air."), ("npc4_home_description", "Well, you see, the King of Swadia declared this to be his personal hunting preserve, and said he'd kill any man who as much as strung his bow here. So what happens? Some family goes hungry, and succumbs to the temptation to poach, and the king's sheriff comes along and strings him up and takes his land. His sons, rather than starve, go bandit. And so naturally anyone in the whole valley who feels the need to run away from a debt or a nagging wife or a vengeful noble comes up here to join them, living on wild pigs and berries and the purses of unwary travellers."), ("npc5_home_description", "Khergits had always come here, to trade and raid, and in the last days of the Empire we began to settle. Just like the Vaegirs, Swadians, Rhodoks and Nords, we took the Emperor's coin to keep the other tribes at bay. But when the Great Horde attacked our homeland in my grandfather's day, we moved into this region in force. We pushed the Vaegirs back, and made their fortresses our own."), ("npc6_home_description", "Here in the Vale of Suno, our dialect and customs are closer than anywhere else in Calradia to those of the old Calrad Empire. We grow olives and wine, both crops brought to this land from overseas by the emperors, and also follow the old Calradic ways. We keep our pledges and pay our debts."), ("npc7_home_description", "Before I was married off, and before I was taken by bandits, I lived here. I was born in a hovel and spent my childhood in the fields. Our landlords were Nord, but we never saw them, merely their cursed minions and overseers. My father, coward that he was, cringed before them."), ("npc8_home_description", "You haven't heard the story? When Gundig Hairy-Breeks came to Calradia from Nordland, he planted his banner on the headland and said that it would remain there until he recaptured his 'inheritance.' His 'inheritance', he called it. Gundig believed the skalds who told him that the Emperor had bequeathed Calradia to the Nords, when in fact he just gave us a small strip of land along the coast, so that we would crew his galleys."), ("npc9_home_description", "The Nords would sail up the river in their longships. The townsmen of the coast could have stopped them, but they were cowards then, as they are today, and paid them a yearly stipend, known as the Nordgeld, to be let in peace. But the Vaegir king would not pay. My father decided to come over the mountains, to fight with the Vaegir hosts. Three summers in a row they tried to take the Rock, and each time the Vaegir lords held them back."), ("npc10_home_description", "In my father's day the Swadians would come calling, thinking to make us knuckle our foreheads and call them their overlords. But Grunwalder, an old veteran of the wars from the hills, showed us how to form a battleline with spear and crossbow that could break a Swadian charge. He fell in battle, but the people gave his name to the castle that was built here, where he fell, so that we would remember, and always stand firm against the horsemens' onslaught."), ("npc11_home_description", "I'm from Praven. You know the saying, {sir/madame} -- 'Barley grown in Uxkhal is made into ale in Praven, and we're all the better for it.' Not sure what that means, {sir/madame}, but it's true about the barley. And wheat, and oats. We grow more grain here in the Vale of Uxkhall then all the rest of Calradia put together, and our ale is the best, too. You can see it in the soil here -- rich and black, and smells of good harvests and full bellies."), ("npc12_home_description", "The lord over there in Almerra Castle had the dropsy, and had requested a doctor from Uxkhal to treat him. Like a typical university-educated doctor, he went right to Galerian for a cure. Galerian commends sun-metal for dropsy. Now most of Galerian's writings were useless back in the days of the Calradic emperors when they were first written down, and they're doubly worthless today, but he sometimes he hits upon the right cure by chance: sun-metal does cure some kinds of dropsy in small doses. However, sun-metal in large doses is poison, something that the Galerian-worshippers never grasped."), ("npc13_home_description", "I had come up here with a small Swadian force, but they were caught by the Rhodoks in the woods and their horsemen cut down amid the trees. I fled and found shelter by the lake, in the arms of the comeliest cowherd you ever saw. She took me to a cave near the high pastures, and would bring me cheese and berries, and tell me the tale from the hills. They say the lake is a gateway to the underworld, and sometimes on the fringes you can the noxious fumes beneath bubbling up to the surface. Such rustics they are!"), ("npc14_home_description", "I say 'trying' because in my opinion, Vaegirs don't take well to discipline. Finest archers you ever saw, and good riders too, but they have no stomach for fighting in ranks. Their skills serve them well enough against Khergits and Nords, particularly when they can hide behind walls, but I've seen Swadian knights cut through Vaegirs like a knife through butter. Now, a Rhodok spear-wall is designed to stop a Swadian charge in its tracks, and usually does."), ("npc15_home_description", "Like most castles that last around here, it's got foundations that are old Imperial Calradic. You can't see them any more with all the rebuilding, but the slabs are the size of a house. They must have been real sorcerors back in those days, because I don't see how they moved those things otherwise. Beautiful location, too -- Culmarr sits right in front of the pass leading out of Calradia, which allows the lord to charge a pretty penny in tolls during the three months of the year that it's not snowed in."), ("npc16_home_description", "The snows in these valleys don't melt until late in the year, and the land is hard to plough. You can grow a bit of barley, but not much else. But there's wealth here in the woods: deer, rabbit and lynx, meat and furs, and the mountains have iron, and traders would ship enough saltfish up the river from the coast to keep the people fed for the winter."), ("npc1_home_description_2", "They go easy on us Old Calradians, and don't ask for much in tax -- not that we would be able to pay in any case. The land isn't good enough for most crops. Frankly, it's only good for horse-rearing, and that only for half of the year, in the winter after the rains. In the summer they take their herds back into the mountains. Caravans come over the hills and bring spice to Tulga, but we don't see much of that money down in the villages."), ("npc2_home_description_2", "I had loaded up on saffron, cinnamon, cloves, pepper and other spices and a chest full of denars. I estimated that I could buy linens, furs, velvet, iron and wool, and the extra horses to carry them back, and I'd still make a profit. I just hadn't figured in the Khergits, who apparently don't care for others cutting in on their monopoly."), ("npc3_home_description_2", "The poets call Veluca a paradise, and I think for once that they do not exaggerate."), ("npc4_home_description_2", "How do I know this, you ask? Well... I was taken by them, and held for ransom, but I got away. That's really all there is to tell."), ("npc5_home_description_2", "Of course, you know how things go. My father's generation were hard warriors from the cold lands across the mountains, but this generation all has houses in the town and great estates and spend time as much trading as they do practicing archery. The next generation will grow soft on Velucan wine and will lose their lands to the next batch of illiterate hill-raiders to come over the mountains, just you watch. It's how things always were, and how things always will be."), ("npc6_home_description_2", "We men of Suno also never forget an insult, and avenge any wrong done unto us. Old-fashioned Calradic honour, I dare say, has brought me to my current fallen state. But despite that, I am proud to be from this region. Our lord is a vassal of the Swadian king in Praven, but as far as we are concerned his is just yet another barbarian chieftain, and we are the Empire's true heirs."), ("npc7_home_description_2", "We were allowed to fish the river, raise pigs amid the reedbeds, and grow whatever we could in our private plots, but in the open fields we were only permitted to grow flax, to be taken to Sargoth and woven into linen. So we were always hungry, and weak, and never had the courage to rebel."), ("npc8_home_description_2", "The skalds' tales at least gave Gundig an excuse to raise a warband -- not that we Nords ever need an excuse, mind. He sailed across the sea, rallied the Calradian Nords to his banner, and marched on the Rock of Rivacheg. The Vaegirs killed him, and threw his banner into the surf. But the Nords keep coming, and some day all of Calradia will be ours."), ("npc9_home_description_2", "Just as the Nords can call on their kinfolk overseas, so does the Vaegir king call on his kinfolk from over the mountains. Had my father not disinherited me, I would also have taken an oath of fealty to the lord of Reyvadin. But just as I was shorn of my inheritance, so also was I shown of my obligations, and it is the Vaegir king's loss."), ("npc10_home_description_2", "We grow mulberry trees here for silk and kermes too for the dye. We take it to Jelkala where they weave it into the finest velvet -- not that I have ever had enough denars in my pocket to buy velvet, mind. But the craftsmen of Jelkala also make good crossbows, and for that I'll not begrudge them their little luxuries"), ("npc11_home_description_2", "The Swadian king will tell you that Praven was the biggest city in Calradia back under the Empire, and that's why he should rule the whole land today. Mind you, I don't care much about politics, {sir/madame} -- I've sold provisions to every army that ever marched in Calradia, and I tell you that I wouldn't give a single one of them a single biscuit unless I had the cold, hard denars in my hand first. Why these high and mighty kings and nobles can't pay their bills, I'll never know. But I prattle on a bit, there, don't I?"), ("npc12_home_description_2", "The difference between poison and cure is the dose. You tell that to everyone you meet, and tell them you heard it first from Jeremus the Great. People think that all the wisdom worth knowing was written in Old Calradic, but I say you can learn twice as much from village midwives and careful examination of nature than from the entire imperial corpus. That's why they threw me out of the university, although in retrospect that was a blessing. Anyway, I put that lord back on his feet, and he availed me of a sack of gold and the corpse of a freshly hanged criminal to dissect. Ha! To think of the lengths I had to go to get specimens back in those days."), ("npc13_home_description_2", "Eventually I had to leave, and sometimes I wonder if there is a little herdsboy swaddled on her back, as she takes the cows up to pasture each morning. I'd be tempted to try to find her -- but no, no, one should never look back."), ("npc14_home_description_2", "If anyone were ever to unify this little land of ours, I'd sign up to serve them, free of charge. I'd put together an army of Rhodok spears with Nord footmen on the flanks and Vaegir archers in front, take along some Khergit scouts to find and fix the enemy, and some Swadian lancers to finish them off. I'd take that army over the mountains and make the whole world kneel to Calradia.... Of course, that's what the Emperors thought, and in the end the tribes took away their Empire."), ("npc15_home_description_2", "And here's the funny thing -- when the Rhodok lands first rebelled against the Swadians, they all said they weren't going to have any noble lords ruling over them. You can guess how long that lasted. One Rhodok hill chieftain sets himself up in Culmarr, calls himself 'Count', and the good burghers of Jelkala and Veluca have to lick his boots if they want to sell their wine and velvet outside Calradia. And if you want to keep the counts under control, and the peasants providing the towns with food rather than selling to the highest bidder, then you need a King too, don't you? The Rhodok lands are no different than anyone else, whatever guff they talk about 'ancient liberties' and 'freedom.'"), ("npc16_home_description_2", "Still, it was a thin living, and there were always too many mouths around to feed. The Vaegir king and the Khergit khan don't make life any easier for us, squeezing for tax money the villages they control, and raiding for plunder the villages they don't. Of course, I can't say I'd do any differently do the same if I had a castle and an army all of my own. The mighty do whatever the can, and the humble do whatever they must."), ("npc1_home_recap", "I'm from the high steppe, near {s21}."), ("npc2_home_recap", "I was born over the mountains. I'm a merchant, the son of a merchant, and the grandson of a merchant."), ("npc3_home_recap", "I used to live in my father's house in {s20}, but I spent much of my childhood in {s21}."), ("npc4_home_recap", "Our ancestral barony is over the mountains, across the Culdarr pass."), ("npc5_home_recap", "I was born in the highlands on the other side of the mountains, past Tulga, but I have relatives in {s21}."), ("npc6_home_recap", "My family lives in {s21}, but I cannot bear to face them."), ("npc7_home_recap", "I was born in a hovel in the fens, not far from {s21}."), ("npc8_home_recap", "I was born overseas, in Nordland, and my husband's hall also was in Nordland."), ("npc9_home_recap", "I am from the Vaegir homeland over the mountains, where the Vaegir lords lived before the Emperor brought them in Calradia."), ("npc10_home_recap", "Born and raised in Jelkala, {Brother/Sister}, and I hope some day to buy land there. But I had a mind to see a bit of the world first, so I took my crossbow and went off to the wars."), ("npc11_home_recap", "I was born in the train of an army, and lived all my days in the train of an army. My folk are from Praven, however, so I guess that's as much home to me as anywhere."), ("npc12_home_recap", "I come from overseas. I travel the world in search of medical lore."), ("npc13_home_recap", "Oh, far away from here, my {lord/lady}, else you would already have heard about me, and would not need to ask such things."), ("npc14_home_recap", "I am the younger son of the Count of Geroia."), ("npc15_home_recap", "I'm from over the hills. But Calradia is where the money is to be made, these days, if your trade is siegecraft."), ("npc16_home_recap", "Why, captain, I was born in Uslum village, but my mother lost her land to a scheming relative and had to put herself in bond to a nearby lord."), ("npc1_honorific", "boss"), #Borcha ("npc2_honorific", "{sir/madame}"), #marnid ("npc3_honorific", "{sir/madame}"), ("npc4_honorific", "{sir/madame}"), ("npc5_honorific", "{playername} Bahadur"), #beheshtur ("npc6_honorific", "captain"), #firentis ("npc7_honorific", "captain"), #deshavi ("npc8_honorific", "{playername}"), #matheld ("npc9_honorific", "{my good sir/my good lady}"), #Alayen ("npc10_honorific", "{Brother/Sister}"), #Bunduk ("npc11_honorific", "{laddie/lassie} -- I mean Captain"), #katrin ("npc12_honorific", "captain"), ("npc13_honorific", "oh valorous one"), #nizar ("npc14_honorific", "commander"), #lazalit ("npc15_honorific", "captain"), #artimenner ("npc16_honorific", "captain"), #klethi #NPC companion changes end #Troop Commentaries begin #Tags for comments are = allied/enemy, friendly/unfriendly, and then those related to specific reputations #Also, there are four other tags which refer to groups of two or more reputations (spiteful, benevolent, chivalrous, and coldblooded) #The game will select the first comment in each block which meets all the tag requirements #Beginning of game comments ("comment_intro_liege_affiliated", "I am told that you are pledged to one of the pretenders who disputes my claim to the crown of Calradia. But we may still talk."), ("comment_intro_famous_liege", "Your fame runs before you! Perhaps it is time that you sought a liege worthy of your valor."), ("comment_intro_famous_martial", "Your fame runs before you! Perhaps we shall test each other's valor in a tournament, or on the battlefield!"), ("comment_intro_famous_badtempered", "I've heard of you. Well, I'm not one for bandying words, so if you have anything to say, out with it."), ("comment_intro_famous_pitiless", "I know your name. It strikes fear in men's hearts. That is good. Perhaps we should speak together, some time."), ("comment_intro_famous_cunning", "Ah, yes. At last we meet. You sound like a good {man/woman} to know. Let us speak together, from time to time."), ("comment_intro_famous_sadistic", "I know your name -- and from what I hear, I'll warrant that many a grieving widow knows too. But that is no concern of mine."), ("comment_intro_famous_goodnatured", "I've heard of you! It's very good to finally make your acquaintance."), ("comment_intro_famous_upstanding", "I know your name. They say you are a most valiant warrior. I can only hope that your honour and mercy matches your valor."), ("comment_intro_noble_liege", "I see that you carry a nobleman's banner, although I do not recognize the device. Know that I am always looking for good men to fight for me, once they prove themselves to be worthy of my trust."), ("comment_intro_noble_martial", "I see that you carry a nobleman's banner, but I do not recognize the device. Perhaps one day we shall test each other's valor in a tournament, or on the battlefield!"), ("comment_intro_noble_badtempered", "I don't recognize the device on your banner. No doubt another foreigner come to our lands, as if we didn't have so many here already."), ("comment_intro_noble_pitiless", "I see that you carry a nobleman's banner, but I do not recognize the device. Another vulture come to grow fat on the leftovers of war, no doubt!"), ("comment_intro_noble_cunning", "I see that you carry a nobleman's banner, but I do not recognize the device. Still, it is always worthwhile to make the acquaintance of {men/women} who may one day prove themselves to be great warriors."), ("comment_intro_noble_sadistic", "I see that you carry a nobleman's banner, but I do not recognize the device. Perhaps you are the bastard {son/daughter} of a puffed-up cattle thief? Or perhaps you stole it?"), ("comment_intro_noble_goodnatured", "I see that you carry a nobleman's banner, but I do not recognize the device. Forgive my ignorance, {sir/madame}! It is good to make your acquaitance."), ("comment_intro_noble_upstanding", "I see that you carry a nobleman's banner, but I do not recognize the device. No doubt you have come to Calradia in search of wealth and glory. If this indeed is the case, then I only ask that you show mercy to those poor souls caught in the path of war."), ("comment_intro_common_liege", "You may be of common birth, but know that I am always looking for good men to fight for me, if they can prove themselves to be worthy of my trust."), ("comment_intro_common_martial", "Perhaps you are not of gentle birth, but if you prove yourself a {man/woman} of valor, then I would be pleased to try my strength against yours in the tournament or on the battlefield."), ("comment_intro_common_badtempered", "Speak quickly, if you have anything to say, for I have no time to be bandying words with common soldiers of fortune."), ("comment_intro_common_pitiless", "You have the look of a mercenary, another vulture come to grow fat on the misery of this land."), ("comment_intro_common_cunning", "Well... I have not heard of you, but you have the look of a {man/woman} who might make something of {himself/herself}, some day."), ("comment_intro_common_sadistic", "Normally I cut the throats of impudent commoners who barge into my presence uninvited, but I am in a good mood today."), ("comment_intro_common_goodnatured", "Well, you look like a good enough sort."), ("comment_intro_common_upstanding", "Peace to you, and always remember to temper your valor with mercy, your courage with honour."), #Actions vis-a-vis civilians ("comment_you_raided_my_village_enemy_benevolent", "You have attacked innocent farmers under my protection in the village of {s51}. I will punish you for your misdeeds!"), ("comment_you_raided_my_village_enemy_spiteful", "You have raided my village of {s51}, destroying my property and killing the tenants. I will take my compensation in blood!"), ("comment_you_raided_my_village_enemy_coldblooded", "You have raided my village of {s51}, destroying my property and killing the tenants. I will make you think twice before you disrupt my revenues like that again."), ("comment_you_raided_my_village_enemy", "You have raided my village of {s51}, destroying my property and killing tenants under my protection. You will pay the price for your crime!"), ("comment_you_raided_my_village_unfriendly_spiteful", "You have raided my village of {s51}. Do it again and I'll gut you like a fish."), ("comment_you_raided_my_village_friendly", "You have raided my village of {s51}. This will place a grave strain on our friendship."), ("comment_you_raided_my_village_default", "You have raided my village of {s51}. If you continue to behave this way, we may soon come to blows."), ("comment_you_robbed_my_village_enemy_coldblooded", "You have robbed my tenants in the village of {s51}. I take that as a personal insult."), ("comment_you_robbed_my_village_enemy", "You have robbed innocent farmers under my protection in the village of {s51}. I will punish you for your misdeeds!"), ("comment_you_robbed_my_village_friendly_spiteful", "I have heard that you pinched some food from my tenants at {s51}. Well, I'll not begrudge you a scrap or two, but keep in mind that I'm the one who must listen to their whining afterward."), ("comment_you_robbed_my_village_friendly", "I have heard that you requisitioned supplies from my tenants at {s51}. I am sure that you would not have done so were you not desperately in need."), ("comment_you_robbed_my_village_default", "You have robbed my tenants in the village of {s51}. If you continue to behave this way, we may soon come to blows."), ("comment_you_accosted_my_caravan_enemy", "You have been accosting caravans under my protection. But your trail of brigandage will soon come to an end."), ("comment_you_accosted_my_caravan_default", "You have been accosting caravans under my protection. This sort of behavior must stop."), ("comment_you_helped_villagers_benevolent", "I heard that you gave charity to my tenants in the village of {s51}. I had been neglectful in my duties as lord and protector, and I appreciate what you have done."), ("comment_you_helped_villagers_friendly_cruel", "I heard that you gave charity to my tenants in the village of {s51}. I appreciate that you meant well, but I'd rather you not undercut my authority like that."), ("comment_you_helped_villagers_friendly", "I heard that you gave charity to my tenants in the village of {s51}. Times are hard, and I know that you mean well, so I will not object to you providing them with assistance."), ("comment_you_helped_villagers_unfriendly_spiteful", "I heard that you gave charity to my tenants in the village of {s51}. As amusing as it is to see you grubbing for favor among my vassals, I would ask you to mind your own business."), ("comment_you_helped_villagers_cruel", "I heard that you gave charity to my tenants in the village of {s51}. As the peasants' lord and protector, it is most properly my duty to assist them in times of hardship. You may mean well, but your actions still undercut my authority. I would thank you to leave them alone."), ("comment_you_helped_villagers_default", "I heard that you gave charity to my tenants in the village of {s51}. Times are hard, and I know that you mean well, but try not to make a habit of it. I am their lord and protector, and I would rather not have them go looking to strangers for assistance."), #Combat-related events ("comment_you_captured_a_castle_allied_friendly", "I heard that you have besieged and taken {s51}. That was a great dead, and I am proud to call you my friend!"), ("comment_you_captured_a_castle_allied_spiteful", "I heard that you have besieged and taken {s51}. Good work! Soon, we will have all their fortresses to despoil, their treasuries to ransack, their grieving widows to serve us our wine."), ("comment_you_captured_a_castle_allied_unfriendly_spiteful", "I heard that you have besieged and taken {s51}. Well, every dog has his day, or so they say. Enjoy it while you can, until your betters kick you back out in the cold where you belong."), ("comment_you_captured_a_castle_allied_unfriendly", "I heard that you have besieged and taken {s51}. Whatever our differences in the past, I must offer you my congratulations."), ("comment_you_captured_a_castle_allied", "I heard that you have besieged and taken {s51}. We have them on the run!"), ("comment_you_captured_my_castle_enemy_spiteful", "I hear that you have broken into my home at {s51}. I hope the dungeon is to your liking, as you will be spending much time there in the years to come."), ("comment_you_captured_my_castle_enemy_chivalrous", "You hold {s51}, my rightful fief. I hope you will give me the chance to win it back!"), ("comment_you_captured_my_castle_enemy", "You have something that belongs to me -- {s51}. I will make you relinquish it."), ###Add some variation to these ("comment_we_defeated_a_lord_unfriendly_spiteful", "I suppose you will want to drink to the memory of our victory over {s54}. Well, save your wine -- it will take more than that to wipe out the stain of your earlier disgraces."), ("comment_we_defeated_a_lord_unfriendly", "I will not forget how we fought together against {s54}, but I can also not forget the other matters that lie between us."), ("comment_we_defeated_a_lord_cruel", "That was a great victory over {s54}, wasn't it? We made of his army a feast for the crows!"), ("comment_we_defeated_a_lord_quarrelsome", "I won't forget how we whipped {s54}? I enjoyed that."), ("comment_we_defeated_a_lord_upstanding", "I will not forget our victory over {s54}. Let us once again give thanks to heaven, and pray that we not grow too proud."), ("comment_we_defeated_a_lord_default", "That was a great victory over {s54}, wasn't it? I am honoured to have fought by your side."), ("comment_we_fought_in_siege_unfriendly_spiteful", "I suppose you will want to drink to the memory of our capture of {s51}. Well, save your wine -- it will take more than that to wipe out the stain of your earlier disgraces."), ("comment_we_fought_in_siege_unfriendly", "I will not forget how we together we stormed {s51}, but I can also not forget the other matters that lie between us."), ("comment_we_fought_in_siege_cruel", "I won't forget how we broke through the walls of {s51} and put its defenders to the sword. It is a sweet memory."), ("comment_we_fought_in_siege_quarrelsome", "Remember how the enemy squealed when we came over the walls of {s51}? They had thought they were safe! We wiped the smug smiles of their faces!"), ("comment_we_fought_in_siege_upstanding", "I will not forget our capture of {s51}. Let us once again give thanks to heaven, and pray that we not grow too proud."), ("comment_we_fought_in_siege_default", "I will not forget how together we captured {s51}. I am honoured to have fought by your side."), ("comment_we_fought_in_major_battle_unfriendly_spiteful", "I suppose you will want to drink to the memory of our great victory near {s51}. Well, save your wine -- it will take more than that to wipe out the stain of your earlier disgraces."), ("comment_we_fought_in_major_battle_unfriendly", "I will not forget how we fought together in the great battle near {s51}, but I can also not forget the other matters that lie between us."), ("comment_we_fought_in_major_battle_cruel", "I won't forget the great battle near {s51}, when we broke through the enemy lines and they ran screaming before us. It is a sweet memory."), ("comment_we_fought_in_major_battle_quarrelsome", "That was a fine fight near {s51}, when we made those bastards run!"), ("comment_we_fought_in_major_battle_upstanding", "I will not forget how we fought side by side at the great battle near {s51}. Let us once again give thanks to heaven, and pray that we not grow too proud."), ("comment_we_fought_in_major_battle_default", "I will not forget how we fought side by side at the great battle near {s51}. I am honoured to have fought by your side."), ("comment_you_defeated_a_lord_allied_liege", "So, you crossed swords with that rascal they call {s54}, and emerged victorious. I am very happy to hear that."), ("comment_you_defeated_a_lord_allied_unfriendly_spiteful", "I heard that you fought and defeated {s54}. Every dog has its day, I suppose."), ("comment_you_defeated_a_lord_allied_spiteful", "I heard that you fought and defeated that dog {s54}. Ah, if only I could have heard him whimpering for mercy."), ("comment_you_defeated_a_lord_allied_unfriendly_chivalrous", "I heard that you fought and defeated {s54}. I hope that you did not use dishonourable means to do so."), ("comment_you_defeated_a_lord_allied", "I heard that you fought and defeated {s54}. I wish you joy of your victory."), ("comment_you_defeated_me_enemy_chivalrous", "I will not begrudge you your victory the last time that we met, but I am anxious for another round!"), ("comment_you_defeated_me_enemy_spiteful", "I have been looking forward to meeting you again. Your tricks will not deceive me a second time, and I will relish hearing your cries for mercy."), ("comment_you_defeated_me_enemy", "When last we met, {playername}, you had the better of me. But I assure you that it will not happen again!"), ("comment_I_defeated_you_enemy_spiteful", "Back for more? Make me fight you again, and I'll feed your bowels to my hounds."), ("comment_I_defeated_you_enemy_chivalrous", "Come to test your valor against me again, {playername}?"), ("comment_I_defeated_you_enemy_benevolent", "So once again you come at me? Will you ever learn?"), ("comment_I_defeated_you_enemy_coldblooded", "You are persistent, but a nuisance."), ("comment_I_defeated_you_enemy", "How many times must I chastise you before you learn to keep your distance?"), ("comment_we_were_defeated_unfriendly_spiteful", "Last I saw you, you had been struck down by the men of {s54}. I blame you for that disaster. What a pity to see that you survived."), ("comment_we_were_defeated_unfriendly", "Last I saw you, you had been struck down by the men of {s54}. Well, I see that you survived."), ("comment_we_were_defeated_cruel", "Last I saw you, you had been struck down by the men of {s54}. Don't worry -- we'll find him, and make him choke on his victory."), ("comment_we_were_defeated_default", "Last I saw you, you had been struck down by the men of {s54}. It is good to see you alive and well."), ("comment_you_were_defeated_allied_friendly_spiteful", "I heard that {s54} gave you a hard time. Don't worry, friend -- I'll find him for you, and make you a gift of his head."), ("comment_you_were_defeated_allied_unfriendly_cruel", "I had heard that {s54} slaughtered your men like sheep. But here you are, alive. Such a disappointment!"), ("comment_you_were_defeated_allied_spiteful", "I heard that {s54} crushed you underfoot like an ant. Hah! Children should not play games made for grown-ups, little {boy/girl}!"), ("comment_you_were_defeated_allied_pitiless", "I heard that {s54} defeated you, and scattered your forces. That is most disappointing..."), ("comment_you_were_defeated_allied_unfriendly_upstanding", "I heard that {s54} defeated you. Perhaps you should consider if you have considered any misdeeds, that might cause heaven to rebuke you in this way."), ("comment_you_were_defeated_allied_unfriendly", "I heard that {s54} defeated you. Look, try not to get too many of our men killed, will you?"), ("comment_you_were_defeated_allied", "I heard that {s54} defeated you. But take heart -- the tables will soon be turned!"), ("comment_you_helped_my_ally_unfriendly_chivalrous", "I heard that you saved {s54} from likely defeat. Whatever else I may think of you, I must at least commend you for that."), ("comment_you_helped_my_ally_unfriendly", "[revelance should be zero, and this message should not appear]"), ("comment_you_helped_my_ally_liege", "I heard that you saved my vassal {s54} from likely defeat. "), ("comment_you_helped_my_ally_unfriendly_spiteful", "I heard that you rode to the rescue of our poor {s54}. Did you think him a damsel in distress? No matter -- it's a common mistake."), ("comment_you_helped_my_ally_spiteful", "I heard that you saved {s54} from a whipping. You should have let him learn his lesson, in my opinion."), ("comment_you_helped_my_ally_chivalrous", "I heard that you got {s54} out of a tight spot. That was a noble deed."), ("comment_you_helped_my_ally_default", "I heard that you got {s54} out of a tight spot. Good work!"), ("comment_you_were_defeated_allied_unfriendly", "I heard that {s54} defeated you. Look, try not to get too many of our men killed, will you?"), ("comment_you_were_defeated_allied", "I heard that {s54} defeated you. But take heart -- the tables will soon be turned!"), ("comment_you_abandoned_us_unfriendly_spiteful", "You worm! You left us alone to face {s54}, didn't you? I spit at you."), ("comment_you_abandoned_us_unfriendly_pitiless", "Well... You abandoned me in the middle of a battle with {s54}, didn't you? I'll see you buried in a traitor's grave."), ("comment_you_abandoned_us_spiteful", "You disappeared in the middle of that battle with {s54}... I hope you have a good explanation. Did your bowels give out? Were you shaking too hard with fear to hold your weapon?"), ("comment_you_abandoned_us_chivalrous", "What happened? You disappeared in the middle of that battle against {s54}. I can only hope that you were too badly wounded to stand, for I would be ashamed to have gone into battle alongside a coward."), ("comment_you_abandoned_us_benefitofdoubt", "What happened? You disappeared in the middle of that battle against {s54}. I assume that you must have been wounded, but it did look suspicious."), ("comment_you_abandoned_us_default", "What happened? One moment you were fighting with us against {s54}, the next moment you were nowhere to be found?"), ("comment_you_ran_from_me_enemy_spiteful", "Last time we met, you ran from me like a whipped dog. Have you come back to bark at me again, or to whine for mercy?"), ("comment_you_ran_from_me_enemy_chivalrous", "Last time we met, you fled from me. Learn to stand and fight like a gentleman!"), ("comment_you_ran_from_me_enemy_benevolent", "When I saw you flee the last time that we met, I had hoped that I would not have to fight you again."), ("comment_you_ran_from_me_enemy_coldblooded", "Last time we met, you fled from me. That was a wise decision"), ("comment_you_ran_from_me_enemy", "You may have been able to escape the last time we crossed paths, but the next time I doubt that you be so lucky."), ("comment_you_ran_from_foe_allied_chivalrous", "They say that you fled from {s54}, leaving your men behind. I pray that this is not true, for such conduct does dishonour to us all."), ("comment_you_ran_from_foe_allied_upstanding", "They say that you fled from {s54}, leaving your men behind. I do not always believe such rumors, and I also know that desperate straits call for desperate measures. But I beg you to take more care of your good name, for men will not fight in our armies if they hear that we abandon them on the field of battle."), ("comment_you_ran_from_foe_allied_spiteful", "By the way, they said that you ran away from {s54} like a quaking little rabbit, leaving your men behind to be butchered. Ha! What a sight that would have been to see!"), ("comment_you_defeated_my_friend_enemy_pragmatic", "You may have bested {s54}, but you cannot defeat us all."), ("comment_you_defeated_my_friend_enemy_chivalrous", "I have heard that you defeated {s54}, and ever since have been anxious to cross swords with you."), ("comment_you_defeated_my_friend_enemy_spiteful", "Your fame runs before you, {playername}. {s54} may have fallen for your tricks, but if you fight me, you'll find a me a much more slippery foe."), ("comment_you_defeated_my_friend_enemy", "They say that you have defeated {s54}. But I will be a truer test of your skill at arms."), ("comment_you_captured_a_lord_allied_friendly_spiteful", "I heard that you captured {s54}. I hope that you squeezed him for every denar."), ("comment_you_captured_a_lord_allied_unfriendly_spiteful", "I heard that you captured {s54}. Your coffers must be well-bloated with ransom by now. Such a pity that money cannot transform a low-born cur into a gentleman!"), ("comment_you_captured_a_lord_allied_chivalrous", "I heard that you captured {s54}. Well done. I assume, of course, that he has been been treated with the honours due his rank."), ("comment_you_captured_a_lord_allied", "I heard that you captured {s54}. Well done. His ransom must be worth quite something."), ("comment_you_let_go_a_lord_allied_chivalrous", "I heard that you captured {s54}, but then let him go. Such chivalry does a credit to our cause."), ("comment_you_let_go_a_lord_allied_upstanding", "I heard that you captured {s54}, but then let him go. Well, that was an honourable course of action, if possibly also a dangerous one."), ("comment_you_let_go_a_lord_allied_coldblooded", "I heard that you captured {s54}, but then let him go. That was most chivalrous of you, but chivalry does not win wars."), ("comment_you_let_go_a_lord_allied_unfriendly_spiteful", "I heard that you captured {s54}, but then let him go. How very chivalrous of you! No doubt the widows and orphans he leaves in his wake will want to commend you in person."), ("comment_you_let_go_a_lord_allied", "I heard that you captured {s54}, but then let him go. Well, I will not tell you what to do with your own prisoners."), ("comment_you_let_me_go_spiteful", "When last we met, you had me at your mercy and allowed me to go free. I hope you enjoyed toying with me, like a cat with a mouse, because soon I will have you at my mercy, to slay or humiliate according to my fancy."), ("comment_you_let_me_go_enemy_chivalrous", "When last we met, you had me at your mercy and allowed me to go free. That was most chivalrous of you, and I will not forget. But I also must remember my oath to my liege, and our kingdoms are still at war."), ("comment_you_let_me_go_enemy_coldblooded", "When last we met, you had me at your mercy and allowed me to go free. But we are still enemies, and I cannot promise to repay your mercy in kind."), ("comment_you_let_me_go_enemy", "When last we met, you had me at your mercy and allowed me to go free. That was kind of you. But we are still at war."), ("comment_you_let_me_go_default", "When last we met, you had me at your mercy and allowed me to go free. That was kind of you, and I am glad that our kingdoms are no longer at war."), #Internal faction events ("comment_pledged_allegiance_allied_martial_unfriendly", "I heard that you have pledged allegiance to our lord, {s54}. Pray do not disgrace us by behaving in a cowardly fashion."), ("comment_pledged_allegiance_allied_martial", "I heard that you have pledged allegiance to our lord, {s54}. I look forward to fighting alongside you against our foes."), ("comment_pledged_allegiance_allied_quarrelsome_unfriendly", "I heard that you have pledged allegiance to our lord, {s54}. Bah. Do yourself a favor, and stay out of my way."), ("comment_pledged_allegiance_allied_quarrelsome", "I heard that you have pledged allegiance to our lord, {s54}. Fight hard against our foes, respect your betters, and don't cross me, and we'll get along fine."), ("comment_pledged_allegiance_allied_selfrighteous_unfriendly", "I heard that you have pledged allegiance to our lord, {s54}. If I were he, I would not trust you to clean the sculleries."), ("comment_pledged_allegiance_allied_selfrighteous", "I heard that you have pledged allegiance to our lord, {s54}. Fight bravely and you will be well-rewarded. Betray us, and we shall make of you the kind of example that will not soon be forgotten."), ("comment_pledged_allegiance_allied_cunning_unfriendly", "I heard that you have pledged allegiance to our lord, {s54}. I do not pretend to be happy about his decision, but perhaps it is better to have you inside our tent pissing out, than the other way around."), ("comment_pledged_allegiance_allied_cunning", "I heard that you have pledged allegiance to our lord, {s54}. That is good. The more skilled fighters we have with us in these troubled times, the better. I shall be watching your progress."), ("comment_pledged_allegiance_allied_debauched_unfriendly", "I heard that you have pledged allegiance to our lord, {s54}. No doubt you will soon betray him, and I will have the pleasure of watching you die a traitor's death."), ("comment_pledged_allegiance_allied_debauched", "I heard that you have pledged allegiance to our lord, {s54}. Excellent... I am sure that you and I will become very good friends. But remember -- if you betray us, it will be the biggest mistake you will ever make."), ("comment_pledged_allegiance_allied_goodnatured_unfriendly", "I heard that you have pledged allegiance to our lord, {s54}. Well, I can't say that I would have trusted you, but perhaps you deserve the benefit of the doubt."), ("comment_pledged_allegiance_allied_goodnatured", "I heard that you have pledged allegiance to our lord, {s54}. Good {man/woman}! Our lord is a noble soul, and rewards loyalty and valor with kindness and generosity."), ("comment_pledged_allegiance_allied_upstanding_unfriendly", "I heard that you have pledged allegiance to our lord, {s54}. Alas, from what I know of you I fear that you will disgrace us, but I will be happy if you prove me wrong."), ("comment_pledged_allegiance_allied_upstanding", "I heard that you have pledged allegiance to our lord, {s54}. Fight against our foes with valor, but also with honour and compassion. A good name is as valuable as a sharp sword or a swift horse in affairs of arms."), ("comment_our_king_granted_you_a_fief_allied_friendly_cruel", "I heard that {s54} granted you {s51} as a fief. Don't forget -- spare the whip and spoil the peasant!"), ("comment_our_king_granted_you_a_fief_allied_friendly_cynical", "I heard that {s54} granted you {s51} as a fief. I am glad to see you prosper -- but be careful. Men are vipers, envious and covetous of their neighbours' wealth. Stay close to me, and I'll watch your back."), ("comment_our_king_granted_you_a_fief_allied_friendly", "I heard that {s54} granted you {s51} as a fief. May your new lands prosper."), ("comment_our_king_granted_you_a_fief_allied_unfriendly_upstanding", "I heard that {s54} granted you {s51} as a fief. But keep in mind that pride goes before a fall."), ("comment_our_king_granted_you_a_fief_allied_unfriendly_spiteful", "I heard that {s54} granted you {s51} as a fief. I suspect, however, that fortune is only raising you up so as to humble you even more, when it casts you back into the dung from whence you came."), ("comment_our_king_granted_you_a_fief_allied_spiteful", "I heard that {s54} granted you {s51} as a fief. Let's hope you are indeed deserving of our lord's favor."), ("comment_our_king_granted_you_a_fief_allied", "I heard that {s54} granted you {s51} as a fief. You seem to be doing very well for yourself."), ("comment_you_renounced_your_alliegance_enemy_friendly", "I heard that you renounced your allegiance to our lord, {s54}. It grieves me that we must now meet on the field of battle."), ("comment_you_renounced_your_alliegance_friendly", "I heard that you renounced your allegiance to our lord, {s54}. Let us pray that we may not come to blows."), ("comment_you_renounced_your_alliegance_unfriendly_spiteful", "I always had you figured for a traitor to {s54}, and now it seems I was proven right. I hope you are prepared to die a traitor's death!"), ("comment_you_renounced_your_alliegance_unfriendly_moralizing", "I heard that you renounced your allegiance to our lord, {s54}. I am forced to consider you a traitor."), ("comment_you_renounced_your_alliegance_enemy", "I heard that you renounced your allegiance to our lord, {s54}. Well, it is the way of the world for old comrades to become enemies."), ("comment_you_renounced_your_alliegance_default", "I heard that you renounced your allegiance to our lord, {s54}. Well, that is your decision, but do not expect me to go easy on you when we meet on the battlefield."), ("personality_archetypes", "liege"), ("martial", "martial"), ("quarrelsome", "bad-tempered"), ("selfrighteous", "pitiless"), ("cunning", "cunning"), ("debauched", "sadistic"), ("goodnatured", "good-natured"), ("upstanding", "upstanding"), ("surrender_demand_default", "Yield or die!"), ("surrender_demand_martial", "The odds are not in your favor today. You may fight us, but there is also no shame if you yield now."), ("surrender_demand_quarrelsome", "I've got you cornered. Give up, or I'll ride you down like a dog."), ("surrender_demand_pitiless", "You cannot defeat me, and I'll teach you a painful lesson if you try. Yield!"), ("surrender_demand_cunning", "You are outmatched today. Give up -- if not for your own sake, then think of your men!"), ("surrender_demand_sadistic", "Surrender or I'll gut you like a fish!"), ("surrender_demand_goodnatured", "We have the advantage of you. Yield, and you will be well-treated."), ("surrender_demand_upstanding", "You may fight us, but many of your men will be killed, and you will probably lose. Yield, and spare us both the unnecessary bloodshed."), ("surrender_offer_default", "Stop! I yield!"), ("surrender_offer_martial", "Stop! I yield!"), ("surrender_offer_quarrelsome", "Enough! You win today, you dog! Ach, the shame of it!"), ("surrender_offer_pitiless", "I yield! You have won. Cursed be this day!"), ("surrender_offer_cunning", "Stop! I yield to you!"), ("surrender_offer_sadistic", "I give up! I give up! Call back your dogs!"), ("surrender_offer_goodnatured", "I yield! Congratulations on your victory, {sir/madame}!"), ("surrender_offer_upstanding", "I yield! Grant me the honours of war, and do yourself credit!"), ("prisoner_released_default", "You have my gratitude, {sir/madame}. I shall not forget your kindness."), ("prisoner_released_martial", "You are indeed a {man/woman} of honour, {sir/madame}. I shall not forget this!"), ("prisoner_released_quarrelsome", "I'm free? Well... Good bye, then."), ("prisoner_released_pitiless", "Thank you. When you are finally defeated, I will request for your death to be swift and merciful. Unless, that is, you care to join us... Good bye, for now."), ("prisoner_released_cunning", "Am I? You are a good {man/woman}. I will try to find a way to repay you."), ("prisoner_released_sadistic", "Am I? So refined is your cruelty, that you would rather see me free and humiliated, than in chains. Enjoy your triumph!"), ("prisoner_released_goodnatured", "You are indeed a {man/woman} of honour, {sir/madame}. I shall not forget this!"), ("prisoner_released_upstanding", "You are indeed a {man/woman} of honour, {sir/madame}. I shall not forget this!"), #Post 0907 changes begin ("enemy_meet_default", "Who are you, that comes in arms against me?"), ("enemy_meet_martial", "What is your name, {sir/madame}? If we come to blows, I would know whom I fight."), ("enemy_meet_quarrelsome", "Who the hell are you?"), ("enemy_meet_pitiless", "Who are you? Speak, so that I may know whom I slay."), ("enemy_meet_cunning", "Tell me your name. It is always good to know your enemy."), ("enemy_meet_sadistic", "Who are you? Speak quick, before I cut your tongue out."), ("enemy_meet_goodnatured", "What is your name, {sir/madame}? If we come to blows, I would know whom I fight."), ("enemy_meet_upstanding", "Who are you, who would come in arms to dispute our righteous cause?"), ("battle_won_default", "You have proven yourself a most valued ally, today."), ("battle_won_martial", "There is no greater fortune than the chance to show one's valor on the field of arms!"), ("battle_won_quarrelsome", "Hah! We showed those bastards a thing or two, there, didn't we?"), ("battle_won_pitiless", "Together, we will make the foe learn to fear our names, and to quail at our coming!"), ("battle_won_cunning", "Now, we must be sure to press our advantage, so that the blood shed today is not wasted."), ("battle_won_sadistic", "Now let us strip their dead and leave them for the crows, so that all will know the fate of those who come against us."), ("battle_won_goodnatured", "That was a good scrap! No joy like the joy of victory, eh?"), ("battle_won_upstanding", "Now, let us give thanks to the heavens for our victory, and mourn the many fine men who have fallen today."), ("battle_won_grudging_default", "You helped turn the tide on the field, today. Whatever I may think of you, I cannot fault you for your valor."), ("battle_won_grudging_martial", "{playername} -- you have shown yourself a worthy {man/woman} today, whatever your misdeeds in the past."), ("battle_won_grudging_quarrelsome", "Hmf. Yours is not a face which I normally like to see, but I suppose today I should thank you for your help."), ("battle_won_grudging_pitiless", "Your help was most valuable today. I would not imagine that you came to help me out of kindness, but I nonetheless thank you."), ("battle_won_grudging_cunning", "It would be unwise of me not to thank you for coming to help me in my hour of need. So... You have my gratitude."), ("battle_won_grudging_sadistic", "Well! How touching! {playername} has come to rescue me."), ("battle_won_grudging_goodnatured", "{playername}! I can't say that we've always gotten along in the past, but you fought well today. My thanks to you!"), ("battle_won_grudging_upstanding", "Perhaps I was wrong about you. Your arrival was most timely. You have my gratitude."), ("battle_won_unfriendly_default", "So you're here. Well, better late than never, I suppose."), ("battle_won_unfriendly_martial", "We have hard harsh words in the past, but for now let us simply enjoy our victory."), ("battle_won_unfriendly_quarrelsome", "If you're standing there waiting for thanks, you can keep waiting. Your help wasn't really needed, but I guess you had nothing better to do, right?"), ("battle_won_unfriendly_pitiless", "You have come here, like a jackal to a lion's kill. Very well then, help yourself to the spoils. I shall not stop you."), ("battle_won_unfriendly_cunning", "{playername}... Well, I suppose your arrival didn't hurt, although I won't pretend that I'm happy to see you."), ("battle_won_unfriendly_sadistic", "Back off, carrion fowl! This was my victory, however hard you try to steal the glory for yourself."), ("battle_won_unfriendly_goodnatured", "Oh, it's you. Well, I suppose I should thank you for your help."), ("battle_won_unfriendly_upstanding", "Thank you for coming to my support. Now I will be off, before I say something that I regret."), ("troop_train_request_default", "I need someone like you to knock them into shape."), ("troop_train_request_martial", "They need someone to show them the meaning of valor."), ("troop_train_request_quarrelsome", "Fat lazy bastards. They make me puke."), ("troop_train_request_pitiless", "They are more afraid of the enemy than they are of me, and this will not do."), ("troop_train_request_cunning", "But men, like swords, are tempered and hardened by fire."), ("troop_train_request_sadistic", "They need someone with steel in his back to flog some courage into them, or kill them trying."), ("troop_train_request_goodnatured", "They're good enough lads, but I am afraid that they are not quite ready for a battle just yet."), ("troop_train_request_upstanding", "It would be tantamount to murder for me to lead them into combat in their current state."), ("unprovoked_attack_default", "What? Why do you attack us? Speak, you rascal!"), ("unprovoked_attack_martial", "I have no objection to a trial of arms, but I would ask you for what reason you attack us?"), ("unprovoked_attack_quarrelsome", "You're making a big mistake, {boy/girl}. What do you think you're doing?"), ("unprovoked_attack_pitiless", "Indeed? If you really want to die today, I'd be more than happy to oblige you, but I am curious as to what you hope to accomplish."), ("unprovoked_attack_cunning", "Really? I think that you are acting most unwisely. What do you hope to gain by this?"), ("unprovoked_attack_sadistic", "What's this? Do you enjoy having your eyes put out?"), ("unprovoked_attack_goodnatured", "Why do you do this? We've got no quarrel, {sir/madame}."), ("unprovoked_attack_upstanding", "I consider this an unprovoked assault, and will protest to your king. Why do you do this?"), ("unnecessary_attack_default", "I will not hesitate to cut you down if pressed, but I will offer you the chance to ride away from this."), ("unnecessary_attack_martial", "I am eager to take you up on your challenge, {sir/madame}, although I will give you a minute to reconsider."), ("unnecessary_attack_quarrelsome", "Bah! I'm in no mood for this nonsense today. Get out of my way."), ("unnecessary_attack_pitiless", "I am in a merciful mood today. I will pretend that I did not hear you."), ("unnecessary_attack_cunning", "I don't see what you have to gain by making an enemy of me. Maybe you should just ride away."), ("unnecessary_attack_sadistic", "I have no time to waste on a worm like you. Get out of my way."), ("unnecessary_attack_goodnatured", "I don't see what you have to gain by picking a fight, {sir/madame}. You can still ride away."), ("unnecessary_attack_upstanding", "If a fight is what you wish, {sir/madame}, then you will have one, but I will yet offer you the chance to back down."), ("lord_challenged_default", "As you wish. Prepare to die!"), ("lord_challenged_martial", "So be it. Defend yourself!"), ("lord_challenged_quarrelsome", "You impudent whelp! I'll crush you!"), ("lord_challenged_pitiless", "If you so badly wish to die, then I have no choice but to oblige you."), ("lord_challenged_cunning", "Well, if you leave me no choice..."), ("lord_challenged_sadistic", "You heap of filth! I'll make you wish you'd never been born."), ("lord_challenged_goodnatured", "Very well. I had hoped that we might avoid coming to blows, but I see that have no choice."), ("lord_challenged_upstanding", "So be it. It saddens me that you cannot be made to see reason."), ("lord_mission_failed_default", "Well, I am disappointed, but I am sure that you will have many chances to redeem yourself."), ("lord_mission_failed_martial", "There is no honour in failing a quest which you endeavoured to take, but I will accept your word on it."), ("lord_mission_failed_quarrelsome", "You failed? Bah. I should have expected as much from the likes of you."), ("lord_mission_failed_pitiless", "You failed? Well. You disappoint me. That is a most unwise thing to do."), ("lord_mission_failed_cunning", "Well, I am disappointed, but no one can guarantee that the winds of fortune will always blow their way."), ("lord_mission_failed_sadistic", "Indeed? Those who fail me do not always live to regret it."), ("lord_mission_failed_goodnatured", "Oh well. It was a long shot, anyway. Thank you for making an effort."), ("lord_mission_failed_upstanding", "Very well. I am sure that you gave it your best effort."), ("lord_follow_refusal_default", "Follow you? You forget your station, {sir/madame}."), ("lord_follow_refusal_martial", "Perhaps if you one day prove yourself a valorous and honourable warrior, then I would follow you. But not today."), ("lord_follow_refusal_quarrelsome", "Follow someone like you? I don't think so."), ("lord_follow_refusal_pitiless", "Lords like me do not follow people like you, {sir/madame}."), ("lord_follow_refusal_cunning", "First show me that you are the type of {man/woman} who will not lead me into disaster, and then perhaps I will follow you."), ("lord_follow_refusal_sadistic", "I think not! Rather, you should follow me, as a whipped cur follows {his/her} master."), ("lord_follow_refusal_goodnatured", "Um, I am a bit pressed with errands right now. Perhaps at a later date."), ("lord_follow_refusal_upstanding", "First show me that you are worthy to lead, and then perhaps I will follow."), ("lord_insult_default", "base varlot"), ("lord_insult_martial", "dishonourable knave"), ("lord_insult_quarrelsome", "filth-swilling bastard"), ("lord_insult_pitiless", "low-born worm"), ("lord_insult_cunning", "careless oaf"), ("lord_insult_sadistic", "sniveling cur"), ("lord_insult_goodnatured", "unpleasant fellow"), ("lord_insult_upstanding", "disgraceful scoundrel"), ("rebellion_dilemma_default", "[liege]"), ("rebellion_dilemma_martial", "{s45} was clearly wronged. Although I gave an oath to {s46}, it does not bind me to support him if he usurped his throne illegally."), ("rebellion_dilemma_quarrelsome", "Hmm. {s46} has never given me my due, so I don't figure I owe him much. However, maybe {s45} will be no better, and {s46} has at least shown himself ."), ("rebellion_dilemma_pitiless", "Hmm. {s45} says {reg3?she:he} is the rightful heir to the throne. That is good -- it absolves me of my oath to {s46}. But still I must weight my decision carefully."), ("rebellion_dilemma_cunning", "Hmm. I gave an oath of homage to {s46}, yet the powerful are not bound by their oaths as our ordinary people. Our duty is to our own ability to rule, to impose order and prevent the war of all against all."), ("rebellion_dilemma_sadistic", "Hmm. In this vile world, a wise man must think of himself, for no one else will. So -- what's in it for me?"), ("rebellion_dilemma_goodnatured", "I do not know what to say. I gave an oath to {s46} as the lawful ruler, but if he is not the lawful ruler, I don't know if I am still bound."), ("rebellion_dilemma_upstanding", "This is troublesome. It is a grave thing to declare my homage to {s46} to be null and void, and dissolve the bonds which keep our land from sinking into anarchy. Yet I am also pledged to support the legitimacy of the succession, and {s45} also has a valid claim to the throne."), ("rebellion_dilemma_2_default", "[liege]"), ("rebellion_dilemma_2_martial", "On the other hand, {s46} has led us in war and peace, and I am loathe to renounce my allegiance."), ("rebellion_dilemma_2_quarrelsome", "So tell me, why should I turn my back on the bastard I know, in favor of {reg3?a woman:the bastard} I don't know?"), ("rebellion_dilemma_2_pitiless", "It is a most perilous position to be in, to be asked whom I would make {reg3?ruler:king} of this land. Yet it is also a time of opportunity, for me to reap the rewards that have always been my due!"), ("rebellion_dilemma_2_cunning", "{s46} has been challenged, and thus he will never be able to rule as strongly as one whose claim has never been questioned. Yet if {s45} takes the throne by force, {reg3?she:he} will not be as strong as one who succeeded peacefully."), ("rebellion_dilemma_2_sadistic", "Perhaps if I join {s45} while {reg3?she:he} is still weak {reg3?she:he} will enrich me, but perhaps if I bring {s46} your head he will give me an even greater reward."), ("rebellion_dilemma_2_goodnatured", "{s46} has always treated me decently, yet it's true that he did wrong to {s45}. I hesitate to renounce my homage to {s46}, yet I also don't think it's right to support injustice."), ("rebellion_dilemma_2_upstanding", "I feel that I must do whatever is best for the realm, to avoid it being laid waste by civil war and ravaged by its enemies."), ("rebellion_prior_argument_very_favorable", "I have already heard some arguments for supporting your candidate for the throne, and I tend to agree with them."), ("rebellion_prior_argument_favorable", "I have already heard some arguments for supporting your candidate for the throne, and I tend to agree with them."), ("rebellion_prior_argument_unfavorable", "I have already heard some arguments for supporting your candidate for the throne, but I do not find them convincing."), ("rebellion_prior_argument_very_unfavorable", "I have already heard some arguments for supporting your candidate for the throne, but I disagree with most of them."), ("rebellion_rival_default", "[liege]"), ("rebellion_rival_martial", "{s49} your ally {s44} once questioned my honour and my bravery. It's not often I get the chance to face him in battle, and make him retract his statement."), ("rebellion_rival_quarrelsome", "{s49} you're working with {s44}. He's a crafty weasel, and I don't trust him one bit."), ("rebellion_rival_pitiless", "{s49} you seem to have enlisted the support of {s44} -- who is soft, and weak, and not fit to govern a fief, and whom I have always detested."), ("rebellion_rival_cunning", "{s49} {s44}, who has already joined you, is headstrong and quarrelsome, and a bit of liability."), ("rebellion_rival_sadistic", "{s49} I have no desire to fight alongside your ally {s44}, who puts on such a nauseating display of virtue."), ("rebellion_rival_goodnatured", "{s49} I'd be reluctant to be on the same side as {s44}, who has quite a reputation for cruelty."), ("rebellion_rival_upstanding", "{s49} your ally {s44} is in my opinion a dangerous, unreliable, and highly unprincipled man."), ("rebellion_argument_favorable", "I respect your line of argument"), ("rebellion_argument_neutral", "I find your line of argument only moderately compelling"), ("rebellion_argument_unfavorable", "I do not find your line of argument compelling"), ("rebellion_persuasion_favorable", "you state your case eloquently"), ("rebellion_persuasion_neutral", "you make a reasonable case"), ("rebellion_persuasion_unfavorable", "you make an unconvincing case"), ("rebellion_relation_very_favorable", "I have the greatest respect for you personally."), ("rebellion_relation_favorable", "I know and respect you personally."), ("rebellion_relation_neutral", "I do not know you as well as I might like."), ("rebellion_relation_unfavorable", "I do not trust you."), ("and_comma_3", "Furthermore, "), ("but_comma_3", "However,"), ("and_comma_1", ", and "), ("but_comma_1", ", but "), ("and_comma_2", ". Moreover, "), ("but_comma_2", ". Nonetheless, "), ("rebellion_agree_default", "[liege]"), ("rebellion_agree_martial", "I have decided. I will back {s45} as the rightful heir."), ("rebellion_agree_quarrelsome", "Ahh, I've thought long enough. I never did like {s46} much anyway. Let's go take his throne away from him."), ("rebellion_agree_pitiless", "You are fortunate. I have decided to join you. Pray do not give me cause to regret this decision."), ("rebellion_agree_cunning", "This is a most dangerous decision, but after careful consideration, I have decided that I will join you. Let's hope it is for the best."), ("rebellion_agree_sadistic", "I have decided. I will back your {reg3?woman:man} {s45}. But you'd best make sure that {reg3?she:he} rewards me well!"), ("rebellion_agree_goodnatured", "All right. I think your {reg3?woman:man} will be a good ruler. I'll join you."), ("rebellion_agree_upstanding", "So be it. My first duty is to this realm, and to save it from lawlessness I will back {s45} and renounce my homage to {s46}. May the Heavens forgive me if I do wrong."), ("rebellion_refuse_default", "[liege]"), ("rebellion_refuse_martial", "I am sorry. {s45} has a good claim, but it's not enough for me to turn my back on {s46}. I will remain loyal to my liege."), ("rebellion_refuse_quarrelsome", "Nah. Your whelp {s45} doesn't have what it takes to rule this realm. I'm sticking with {s46}."), ("rebellion_agree_pitiless", "No. I will not join your rebellion. I count it little more than the tantrum of a child, denied a bauble which {reg3?she:he} thinks should be {reg3?hers:his}. I will stick with {s46}, whose ability to rule is well-tested."), ("rebellion_agree_cunning", "I am sorry. You do not give me reason for confidence that you will win. Many will die, but I do not wish to be among them. I will continue to back {s46}."), ("rebellion_agree_sadistic", "No. I won't play your little game. You grasp at a crown, but I think instead you'll get a quick trip to the scaffold, and I'll be there by {s46}'s side to watch the headsman's axe drop."), ("rebellion_agree_goodnatured", "I am sorry. I don't feel right turning my back on {s46}. No hard feelings when me meet on the battlefield."), ("rebellion_agree_upstanding", "I am sorry. {s45}'s claim is not strong enough for me to inflict the curse of civil disorder on the poor wretches of this land. I will continue to back {s46}. May the Heavens forgive me if I do wrong."), ("talk_later_default", "[liege]"), ("talk_later_martial", "Now is not the time to talk politics! I am here today with my fellow lords, armed for battle. You'd better prepare to fight."), ("talk_later_quarrelsome", "Do you expect me to discuss betraying my liege with you, while we are surrounded by his army? What do you take me for, a bloody idiot?"), ("talk_later_pitiless", "Still your tongue! Whatever I have to say on this matter, I will not say it here and now, while we are in the midst of our army."), ("talk_later_cunning", "This is hardly the time or the place for such a discussion. Perhaps we can discuss it at a later time and a different place, but for now we're still foes."), ("talk_later_sadistic", "You should have your mouth sewn shut! Can you imagine what would happen if the other vassals see me talking to you of treason?"), ("talk_later_goodnatured", "So you wish to discuss your rebellion with me? Try that again when we aren't surrounded by my liege's army, and I will hear what you have to say."), ("talk_later_upstanding", "Whatever my thoughts on the legitimacy of the succession, I am not about to discuss them here and now. If we meet again when we can talk in privacy, I will hear what you have to say on the matter. But for now, consider me your enemy."), ("gossip_about_character_default", "They say that {s6} doesn't possess any interesting character traits."), ("gossip_about_character_martial", "They say that {s6} loves nothing more than war."), ("gossip_about_character_quarrelsome", "They say that {s6} almost came to blows with another lord lately, because the man made a joke about his nose."), ("gossip_about_character_selfrighteous", "I heard that {s6} had a squire executed because the unfortunate man killed a deer in his forest."), ("gossip_about_character_cunning", "They say that {s6} is a cunning opponent."), ("gossip_about_character_sadistic", "They say that {s6} likes to torture his enemies. I wouldn't want to get on the bad side of that man."), ("gossip_about_character_goodnatured", "They say that {s6} is a good man and treats people living in his lands decently. That is more than what can be said for most of the nobles."), ("gossip_about_character_upstanding", "People say that it is good to be in the service of {s6}. He is good to his followers, and rewards them if they work well."), ("latest_rumor", "The latest rumor you heard about {s6} was:"), #steve post 0912 changes begin ("swadian_rebellion_pretender_intro", "I am Isolla, rightful Queen of the Swadians."), ("vaegir_rebellion_pretender_intro", "My name is Valdym. Some men call me 'the Bastard.' I am a prince of the Vaegirs, but by all rights I should be their king, instead of my cousin Yaroglek."), ("khergit_rebellion_pretender_intro", "I am Dustum Khan, son of Janakir Khan, and rightful Khan of the Khergits."), ("nord_rebellion_pretender_intro", "I am Lethwin Far-Seeker, son of Hakrim the Old, who should be king of the Nords of Calradia."), ("rhodok_rebellion_pretender_intro", "I am Lord Kastor, the rightful King of the Rhodoks, who will free them from tyranny."), ("swadian_rebellion_pretender_story_1", "I was the only child of my father, King Esterich. Although I am a woman, he loved me like a son and named me his heir -- not once, but several times, before the grandest nobles of the land so that none could doubt his intention. There is no law that bars a woman from ruling -- indeed, we Swadians tell tales of warrior queens who ruled us in our distant past."), ("vaegir_rebellion_pretender_story_1", "My father died when I was young, leaving me in the care of his brother, the regent Burelek. But rather than hold the throne until I came of age, this usurper used his newfound power to accuse my mother of adultery, and to claim that I was not my father's son. She was executed for treason, and I was declared a bastard."), ("khergit_rebellion_pretender_story_1", "Sanjar Khan and I are brothers, sons of the old Janakir Khan, although of different mothers. Although I was the younger brother, all those who knew the old Khan will testify that throughout my father's life, I was his favorite, entrusted with the responsibilities of government. Sanjar busied himself with hunts and feasts to win the affection of the more dissolate of my father's commanders."), ("nord_rebellion_pretender_story_1", "I am called the Far-Seeker because I have travelled great distances, even by the standards of the Nords, in search of knowledge. Before I came of age, my father sent me abroad on a tour of study at the courts and universities in the lands overseas. If the Nords are to call themselves the heirs of the Calradian empire, then they must act the part, and know something of law and letters, and not call themselves content merely to fight, plunder, and drink."), ("rhodok_rebellion_pretender_story_1", "The Rhodoks are a free people, and not slaves to any hereditary monarch. The king must be chosen from one of the leading noble families of the land, by a council drawn by lot from the patricians of the cities of Jelkala, Veluca, and Yalen. The council meets on a field before Jelkala, and no man is allowed to appear in arms during their deliberations, on pain of death."), ("swadian_rebellion_pretender_story_2", "Yet when my father died, his cousin Harlaus convinced the nobles that no Swadian king of sound mind could name a woman as his heir. Harlaus said that his designation of me was the act of a madman, and thus had no legal standing, and that he, as my father's closest male relative, should of take the throne."), ("vaegir_rebellion_pretender_story_2", "I was smuggled abroad by a faithful servant, but now I am of age and have returned to reclaim what is rightfully mine. Burelek died soon after his act of perfidy -- the judgment of heaven, no doubt. His son Yaroglek now calls himself king, but as his claim is tainted, he is no less a usurper than his father, and I will topple him from his throne."), ("khergit_rebellion_pretender_story_2", "According to Khergit custom, when a man dies his herds are split between all his sons, equally. So too it is with the khanate. When I heard of my father's death, I was away inspecting our borders, but I hurried home to Tulga, ready to give Sanjar his due and share the khanate with him. But when I arrived, I found that he rushed his supporters to the court, to have himself proclaimed as the sole khan."), ("nord_rebellion_pretender_story_2", "My father died however before I completed my course of study, and as I hurried home to claim his throne my ship was wrecked by a storm. One of my father's thanes, Ragnar, seized this opportunity and spread rumors that I had died abroad. He summoned a gathering of his supporters to have himself proclaimed king, and has taken the past few years to consolidate his power."), ("rhodok_rebellion_pretender_story_2", "During the last selection, there were but two candidates, myself, and Lord Graveth. While the council was deliberating, Graveth appeared, sword in hand, telling them that a Swadian raiding party was about to descend on the field of deliberation -- which was true, by the way -- and if he were not elected king, then he would leave them to their fate."), ("swadian_rebellion_pretender_story_3", "I will admit that I did my cause no good by cursing Harlaus and all who listened to him as traitors, but I also believe that the magistrates who ruled in his favor were bought. No matter -- I will raise an army of loyal subjects, who would honour their old king's memory and will. And if anyone doubts that a woman can wield power, then I will prove them wrong by taking Harlaus' ill-gotten crown away from him."), ("vaegir_rebellion_pretender_story_3", "Until I have my rights restored in the sight of all the Vaegirs, I will bear the sobriquet, 'the Bastard', to remind me of what I must do."), ("khergit_rebellion_pretender_story_3", "My brother thinks that Khergits will only respect strength: a leader who takes what he wants, when he wants it. But I think that he misreads the spirit of our people.--we admire a resolute leader, but even more we a just one, and we know that a man who does not respect his own brother's rights will not respect the rights of his followers."), ("nord_rebellion_pretender_story_3", "So I remain in exile -- except now I am not looking for sages to tutor me in the wisdom of faraway lands, but warriors, to come with me back to the land of the Nords and regain my throne. If Ragnar doubts my ability to rule, then let him say so face to face, as we stare at each other over the rims of our shields. For a warrior can be a scholar, and a scholar a warrior, and to my mind, only one who combines the two is fit to be king!"), ("rhodok_rebellion_pretender_story_3", "Well, Graveth defeated the Swadians, and for that, as a Rhodok, I am grateful. When I am king, I will myself place the wreath of victory on his head. But after that I will have it separated from his shoulders, for by his actions he has shown himself a traitor to the Rhodok confederacy and its sacred custom."), ("swadian_rebellion_monarch_response_1", "Isolla thinks she should be Queen of the Swadians? Well, King Esterich had a kind heart, and doted on his daughter, but a good-hearted king who doesn't use his head can be a curse to his people. Isolla may tell you stories of warrior queens of old, but you might also recall that all the old legends end in the same way -- with the Swadians crushed underfoot by the armies of the Calradic Emperor."), ("vaegir_rebellion_monarch_response_1", "Were Valdym to come to me in peace, I would laden him with titles and honours, and he would become the greatest of my vassals. But as he comes in war, I will drag him before me in chains and make him acknowledge me as rightful sovereign, then cut his tongue from his mouth so that he cannot recant."), ("khergit_rebellion_monarch_response_1", "My brother Dustum has perhaps told you of his insistence upon splitting the khanate, as though it were a herd of sheep. Let me tell you something. Ever since the Khergits established themselves on this land, the death of every khan has had the same result -- the land was divided, the khan's sons went to war, and the strongest took it all anyway. I simply had the foresight to stave off the civil war in advance."), ("nord_rebellion_monarch_response_1", "Lethwin 'Far-Seeker'? Lethwin Inkfingers, is more like it. Perhaps you have heard the expression, 'Unhappy is the land whose king is a child.' Unhappy too is the land whose king is a student. You want the Nords to be ruled by a beardless youth, whose hand bears no callouses left by a sword's grip, who has never stood in a shield wall? If Lethwin were king, his thanes would laugh at him to his face!"), ("rhodok_rebellion_monarch_response_1", "No doubt Lord Kastor told you that I defiled the hallowed Rhodok custom by interfering with the patricians' election of a king. Well, let me tell you something. The patricians of the towns make longwinded speeches about our ancient liberties, but then choose as their king whichever noble last sat in their villa and sipped a fine wine and promised to overlook their unpaid taxes."), ("swadian_rebellion_monarch_response_2", "Those who weep for the plight of a Swadian princess denied her father's throne should reflect instead on the fate of a Swadian herdswoman seized by a Vaegir raider and taken as chattel to the slave markets. Talk to me of queens and old stories when our warlike neighbors are vanquished, and our land is at peace."), ("vaegir_rebellion_monarch_response_2", "Whatever my father may or may not have done to secure the throne does not matter. I have inherited it, and that is final. If every old claim were to be brought up anew, if every man's inheritance could be called into question at any time, then it would be the end of the institution of kingship, and we would live in a state of constant civil war."), ("khergit_rebellion_monarch_response_2", "Dustum would make a fine assessor of flocks, or adjudicator of land disputes. But can you imagine such a man as khan? We would be run off of our land in no time by our neighbors, and return to our old days of starving and freezing on the steppe."), ("nord_rebellion_monarch_response_2", "Old Hakrim may have had fancy ideas about how to dispose of his kingdom, but it is not just royal blood that makes a King of the Nords. I am king by acclamation of the thanes, and by right of being the strongest. That counts for more than blood, and woe to any man in this land who says otherwise."), ("rhodok_rebellion_monarch_response_2", "The only liberty that concerns them is their liberty to grow fat. Meanwhile, my men sleep out on the steppe, and eat dry bread and salt fish, and scan the horizon for burning villages, and shed our blood to keep the caravan routes open. Here's an idea -- if I ever meet a merchant who limps from a Khergit arrow-wound or a Swadian sword-stroke, then I'll say, 'Here's a man whose counsel is worth taking.'"), #steve post 0912 changes end ########################## # Form Ranks strings begin # Important note: Make sure the order of strings here is consistent with # the formation type assignments' in module_constants.py, # including number of types!!! ("formation_array_1", "Main Battle"), ("formation_array_2", "Vaward Battle"), ("formation_array_3", "Rearward Battle"), ("formation_array_4", "Forth Battle"), ("formation_array_5", "Fifth Battle"), ("formation_array_6", "Sixth Battle"), ("formation_array_7", "Seventh Battle"), ("formation_array_8", "Eighth Battle"), ("formation_array_end", "formation_array_end"), ("formation_order_panel_array_1", "Main"), ("formation_order_panel_array_2", "Vaward"), ("formation_order_panel_array_3", "Rearward"), ("formation_order_panel_array_4", "Forth"), ("formation_order_panel_array_5", "Fifth"), ("formation_order_panel_array_6", "Sixth"), ("formation_order_panel_array_7", "Seventh"), ("formation_order_panel_array_8", "Eighth"), ("formation_order_panel_array_end", "formation_array_end"), ("formation_command_line", "line"), ("formation_command_phalanx", "phalanx"), ("formation_command_wedge", "wedge"), ("formation_command_square", "square"), ("formation_command_line_pl", "lines"), ("formation_command_phalanx_pl", "phalanxes"), ("formation_command_wedge_pl", "wedges"), ("formation_command_square_pl", "squares"), ("formation_command_end", "formation_command_end"), ("formation_advance", "advance"), ("formation_move_back", "move back"), ("formation_move_left", "move left"), ("formation_move_right", "move right"), ("formation_turn_left", "turn left"), ("formation_turn_right", "turn right"), ("formation_halt", "halt"), ("formation_charge", "charge"), ("formation_fall_back", "fall back"), ("formation_stand_closer", "stand closer"), ("formation_spread_out", "spread out"), ("key_array_selection_1", "Main Battle!"), ("key_array_selection_2", "Vaward Battle!"), ("key_array_selection_3", "Rearward Battle!"), ("key_array_selection_4", "Forth Battle!"), ("key_array_selection_5", "Fifth Battle!"), ("key_array_selection_6", "Sixth Battle!"), ("key_array_selection_7", "Seventh Battle!"), ("key_array_selection_8", "Eighth Battle!"), ("key_array_select_all", "All Battles!"), ("key_formation_selection", "Next formation"), ("key_formation_selection_backward", "Previous formation"), ("key_formation_tighten", "Stand closer"), ("key_formation_disperse", "Spread out"), ("key_formation_hold_pos", "Hold this position"), ("key_auto_rotation_toggle", "Auto rotation"), ("key_apply_formation", "Apply formation"), ("key_formation_charge", "Charge"), ("key_formation_fall_back", "Fall back"), ("key_formation_halt", "Halt"), ("key_formation_tactical_charge", "Tactical charge"), ("key_formation_move_forward", "Move forward"), ("key_formation_move_backward", "Move backward"), ("key_formation_move_left", "Move left"), ("key_formation_move_right", "Move right"), ("key_formation_turn_left", "Turn left"), ("key_formation_turn_right", "Turn right"), ("key_dismiss_formation", "Dismiss formation"), ("key_formation_view_orders", "View orders"), ("formation_key_names_end", "formation_key_names_end"), # # Form Ranks strings end ########################## ("credits_1", "Mount&Blade Copyright 2001-2008 Taleworlds Entertainment"), ("credits_2", "Game design:^Armagan Yavuz^Steve Negus^Cem Cimenbicer"), ("credits_3", "Programming:^Armagan Yavuz^Cem Cimenbicer"), ("credits_4", "CG Artists:^Ipek Yavuz^Ozgur Saral^Mustafa Ozturk"), ("credits_8", "Animation:^Pinar Cekic^Umit Singil"), ("credits_5", "Concept Artist:^Ganbat Badamkhand"), ("credits_6", "Writing:^Steve Negus^Ryan A. Span^Armagan Yavuz"), ("credits_9", "Original Music:^Jesse Hopkins"), ("credits_7", "Additional Modeling:^Hilmi Aric^Ahmet Sarisakal^Katie Beedham^^^Additional Writing:^Michael Buhler^Patrick Desjardins^^^Voice Talents:^Tassilo Egloffstein^Jade E Henderson^^^\ Original Music Composed by:^Jesse Hopkins^\ Violin Solos Performed by:^Zoriy Zinger^\ Main Theme and Scherzo Performed by:^The Russian State Symphony Cinema Orchestra, Conducted by Sergei Skripka^^^\ Sound Samples:^Audiosparx.com^^^\ Mount&Blade Map Editor:^Matt Stentiford^^^\ Taleworlds Forum Programming:^Brett Flannigan www.fenrisoft.com^^^\ Mount&Blade Tutorial written by:^Edward Spoerl^^^\ Gameplay Videos:^Jemes Muia^^^\ Motion Capture System:^NaturalPoint-Optitrack Arena^^^\ Horse Motion Capture Animation Supplied by:^Richard Widgery & Kinetic Impulse^^^\ Ragdoll Physics:^Newton Game Dynamics^^^\ Sound and Music Program Library:^FMOD Sound System by Firelight Technologies^^^\ Copy Protection:^Themida by Oreans Technologies^^^\ Skybox Textures:^Jay Weston www.hyperfocaldesign.com^^^\ Third Party Art Libraries Used:^Texturemonk^Mayang Textures^cgtextures.com^3d.sk^^\ Unofficial Mount&Blade Editor:^Josh Dahlby^^^\ Many thanks to Marco Tarini for the Mountain shader idea!^^^\ Special Thanks to:^Ibrahim Dogan^Nova Language Works^Selim Kurtulus and UPS Turkey^^^\ Taleworlds.com Forum Administrators and Moderators:^Janus^Archonsod^Narcissus^Nairagorn^Lost Lamb^Deus Ex^Merentha^Volkier^Okin^Instag0\ ^Deniz^ego^Guspav^Hallequin^Invictus^okiN^Raz^rejenorst^Skyrage^ThVaz^^^\ Spanish Translation^^Translators:^Anabel 'Rhaenys' Diaz^Analia 'Immortality' Dobarro^Anoik^^Medieval Consultant:^Enric 'Palafoxx' Clave^^Language Tester:^Theo de Moree^^^\ Mount&Blade Community Suggestions and Feedback:^\ 13 Chain Bloody Spider^\ Aenarion^\ AgentSword^\ Ahadhran^\ Albino^\ Allegro^\ allthesedamnnamesare^\ Amman de Stazia^\ Ancientwanker^\ Anrea 'Skree' Giongiani^\ Aqtai^\ Art Falmingaid^\ bryce777^\ Bugman^\ Buxton^\ Calandale^\ Cartread^\ Chel^\ Chilly5^\ Cirdan^\ Cleaning agent^\ Cymro^\ DaBlade^\ DaLagga^\ Damien^\ danover^\ Dearahn^\ Deathblow^\ Destichado^\ Dryvus^\ dunnno^\ D'Sparil^\ ealabor^\ Ealdormann Hussey^\ EasyCo506^\ El Duke^\ Elias Maluco^\ Eogan^\ ex_ottoyuhr^\ Fisheye^\ Fossi^\ fujiwara^\ Fuzzpilz^\ GandalfTheGrey^\ Gerif^\ Grocat^\ Guspav^\ Halden The Borch shooter^\ Hallequin^\ Handel^\ Hardcode^\ Haupper^\ Hellequin^\ Highelf^\ Highlander^\ Ibrahim Turgut^\ Iesu^\ Ilex^\ Ingolifs^\ Invictus^\ Itchrelief^\ Jlgx50^\ JHermes^\ Jik^\ john259^\ JonathanStrange^\ jpgray^\ kamov23^\ Kayback^\ Khalid Ibn Walid^\ KON_Air^\ Lady Tanith^\ Larry Knight^\ LavaLampMaster^\ Leprechaun^\ Lhorkan^\ Llew2^\ Maelstorm^\ Manitas^\ Maw^\ MAXHARDMAN^\ Merentha^\ Merlkir^\ Michael Elijah 'ironpants' Bell-Rao^\ mihoshi^\ Mirathei^\ mkeller^\ Momaw^\ Morgoth2005^\ MrCrotch^\ mtarini^\ n00854180t^\ Naridill^\ Nicholas Altaman\ okiN^\ oksir^\ Oldtimer^\ Ollieh^\ oRGy^\ Oubliette^\ Patrick 'nox' Gallaty^\ Pavlov^\ Rando^\ Raz^\ rejenorst^\ Rjii^\ Ron Losey^\ Rorthic^\ RR_raptor^\ Scion^\ Seff^\ shenzay^\ Shadowmoses^\ shikamaru 1993^\ Silver^\ silverkatana^\ Sir Prince^\ Sirgigor^\ Skyrage^\ Smoson^\ sneakey pete^\ Stefano^\ Stella^\ Stonewall382^\ Talak^\ Tankai^\ TG^\ thelast^\ The Phoenix^\ The Pope^\ The Yogi^\ Thingy Master^\ Thormac^\ Thus_Spake_Nosferatu^\ ThVaz^\ Toygar Birinci^\ Tuckles^\ Tul^\ Ursca^\ Vaerraent^\ Vilhjalmr^\ Volkier^\ vuk^\ Wanderer^\ WhoCares^\ Winter^\ Worbah^\ Yoshiboy^\ ...and many many other wonderful Mount&Blade players!^^\ (This is only a small sample of all the players who have contributed to the game by providing suggestions and feedback.^\ This list has been compiled by sampling only a few threads in the Taleworlds Forums.^\ Unfortunately compiling an exhaustive list is almost impossible.^\ We apologize sincerely if you contributed your suggestions and feedback but were not listed here, and please know that we are grateful to you all the same...)\ "), ("credits_10", "Paradox Interactive^^President and CEO:^Theodore Bergqvist^^Executive Vice President:^Fredrik Wester\ ^^Chief Financial Officer:^Lena Eriksson^^Finance & Accounting:^Annlouise Larsson^^VP Sales & Marketing US:^Reena M. Miranda\ ^^VP Sales & Marketing EU:^Martin Sirc^^Distribution Manager Nordic:^Erik Helmfridsson^^Director of PR & Marketing:^Susana Meza\ ^^PR & Marketing:^Sofia Forsgren^^Product Manager:^Boel Bermann\ "), ("credits_11", "Logotype:^Jason Brown^^Cover Art:^Piotr Fox Wysocki\ ^^Layout:^Christian Sabe^Melina Grundel^^Poster:^Piotr Fox Wysocki^^Map & Concept Art:^Ganbat Badamkhand\ ^^Manual Editing:^Digital Wordsmithing: Ryan Newman, Nick Stewart^^Web:^Martin Ericsson^^Marketing Assets:^2Coats\ ^^Localization:^S&H Entertainment Localization^^GamersGate:^Ulf Hedblom^Andreas Pousette^Martin Ericson^Christoffer Lindberg\ "), ("credits_12", "Thanks to all of our partners worldwide, in particular long-term partners:\ ^Koch Media (Germany & UK)^Blue Label (Italy & France)^Friendware (Spain)^New Era Interactive Media Co. Ltd. (Asia)\ ^Snowball (Russia)^Pinnacle (UK)^Porto Editora (Portugal)^Hell-Tech (Greece)^CD Projekt (Poland, Czech Republic, Slovakia & Hungary)\ ^Paradox Scandinavian Distribution (Scandinavia)\ "), ]
Python
from header_particle_systems import * #psf_always_emit = 0x0000000002 #psf_global_emit_dir = 0x0000000010 #psf_emit_at_water_level = 0x0000000020 #psf_billboard_2d = 0x0000000100 # up_vec = dir, front rotated towards camera #psf_billboard_3d = 0x0000000200 # front_vec point to camera. #psf_billboard_drop = 0x0000000300 #psf_turn_to_velocity = 0x0000000400 #psf_randomize_rotation = 0x0000001000 #psf_randomize_size = 0x0000002000 #psf_2d_turbulance = 0x0000010000 #################################################################################################################### # Each particle system contains the following fields: # # 1) Particle system id (string): used for referencing particle systems in other files. # The prefix psys_ is automatically added before each particle system id. # 2) Particle system flags (int). See header_particle_systems.py for a list of available flags # 3) mesh-name. #### # 4) Num particles per second: Number of particles emitted per second. # 5) Particle Life: Each particle lives this long (in seconds). # 6) Damping: How much particle's speed is lost due to friction. # 7) Gravity strength: Effect of gravity. (Negative values make the particles float upwards.) # 8) Turbulance size: Size of random turbulance (in meters) # 9) Turbulance strength: How much a particle is affected by turbulance. #### # 10,11) Alpha keys : Each attribute is controlled by two keys and # 12,13) Red keys : each key has two fields: (time, magnitude) # 14,15) Green keys : For example scale key (0.3,0.6) means # 16,17) Blue keys : scale of each particle will be 0.6 at the # 18,19) Scale keys : time 0.3 (where time=0 means creation and time=1 means end of the particle) # # The magnitudes are interpolated in between the two keys and remain constant beyond the keys. # Except the alpha always starts from 0 at time 0. #### # 20) Emit Box Size : The dimension of the box particles are emitted from. # 21) Emit velocity : Particles are initially shot with this velocity. # 22) Emit dir randomness # 23) Particle rotation speed: Particles start to rotate with this (angular) speed (degrees per second). # 24) Particle rotation damping: How quickly particles stop their rotation #################################################################################################################### particle_systems = [ ("game_rain", psf_billboard_2d|psf_global_emit_dir|psf_always_emit, "prtcl_rain", 500, 0.5, 0.33, 1.0, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (1.0, 0.3), (1, 0.3), #alpha keys (1.0, 1.0), (1, 1.0), #red keys (1.0, 1.0), (1, 1.0), #green keys (1.0, 1.0), (1, 1.0), #blue keys (1.0, 1.0), (1.0, 1.0), #scale keys (8.2, 8.2, 0.2), #emit box size (0, 0, -10.0), #emit velocity 0.0, #emit dir randomness 0, #rotation speed 0.5 #rotation damping ), ("game_snow", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size|psf_randomize_rotation, "prt_mesh_snow_fall_1", 150, 2, 0.2, 0.1, 30, 20, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.2, 1), (1, 1), #alpha keys (1.0, 1.0), (1, 1.0), #red keys (1.0, 1.0), (1, 1.0), #green keys (1.0, 1.0), (1, 1.0), #blue keys (1.0, 1.0), (1.0, 1.0), #scale keys (10, 10, 0.5), #emit box size (0, 0, -5.0), #emit velocity 1, #emit dir randomness 200, #rotation speed 0.5 #rotation damping ), ## ("game_blood", psf_billboard_3d|psf_randomize_size|psf_randomize_rotation, "prtcl_dust_a", ## 50, 0.65, 0.95, 1.0, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength ## (0.3, 0.3), (1, 0.2), #alpha keys ## (1.0, 0.4), (1, 0.05), #red keys ## (1.0, 0.05),(1, 0.05), #green keys ## (1.0, 0.05),(1, 0.05), #blue keys ## (0.3, 0.5), (1.0, 2.5), #scale keys ## (0.04, 0.01, 0.01), #emit box size ## (0, 1, 0.0), #emit velocity ## 0.05, #emit dir randomness ## 0, #rotation speed ## 0.5 #rotation damping ## ), ## ("game_blood", psf_billboard_3d |psf_randomize_size|psf_randomize_rotation, "prt_mesh_blood_1", 500, 0.65, 3, 0.5, 0, 0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.0, 0.7), (0.7, 0.7), #alpha keys (0.1, 0.7), (1, 0.7), #red keys (0.1, 0.7), (1, 0.7), #green keys (0.1, 0.7), (1, 0.7), #blue keys (0.0, 0.015), (1, 0.018), #scale keys (0, 0.05, 0), #emit box size (0, 1.0, 0.3), #emit velocity 0.9, #emit dir randomness 0, #rotation speed 0, #rotation damping ), ("game_blood_2", psf_billboard_3d | psf_randomize_size|psf_randomize_rotation , "prt_mesh_blood_3", 2000, 0.6, 3, 0.3, 0, 0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.0, 0.25), (0.7, 0.1), #alpha keys (0.1, 0.7), (1, 0.7), #red keys (0.1, 0.7), (1, 0.7), #green keys (0.1, 0.7), (1, 0.7), #blue keys (0.0, 0.15), (1, 0.35), #scale keys (0.01, 0.2, 0.01), #emit box size (0.2, 0.3, 0), #emit velocity 0.3, #emit dir randomness 150, #rotation speed 0, #rotation damping ), # ("game_hoof_dust", psf_billboard_3d|psf_randomize_size|psf_randomize_rotation, "prtcl_dust_a", # 50, 1.0, 0.95, -0.1, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength # (0.0, 0.5), (1, 0.0), #alpha keys # (1.0, 0.9), (1, 0.05), #red keys # (1.0, 0.8),(1, 0.05), #green keys # (1.0, 0.7),(1, 0.05), #blue keys # (0.0, 7.5), (1.0, 15.5), #scale keys # (0.2, 0.3, 0.2), #emit box size # (0, 0, 2.5), #emit velocity # 0.05, #emit dir randomness # 100, #rotation speed # 0.5 #rotation damping # ), ("game_hoof_dust", psf_billboard_3d|psf_randomize_size|psf_randomize_rotation|psf_2d_turbulance, "prt_mesh_dust_1",#prt_mesh_dust_1 5, 2.0, 10, 0.05, 10.0, 39.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.2, 0.5), (1, 0.0), #alpha keys (0, 1), (1, 1), #red keys (0, 0.9),(1, 0.9), #green keys (0, 0.78),(1, 0.78), #blue keys (0.0, 2.0), (1.0, 3.5), #scale keys (0.2, 0.3, 0.2), #emit box size (0, 0, 3.9), #emit velocity 0.5, #emit dir randomness 130, #rotation speed 0.5 #rotation damping ), ("game_hoof_dust_snow", psf_billboard_3d|psf_randomize_size, "prt_mesh_snow_dust_1",#prt_mesh_dust_1 6, 2, 3.5, 1, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.2, 1), (1, 1), #alpha keys (0, 1), (1, 1), #red keys (0, 1),(1, 1), #green keys (0, 1),(1, 1), #blue keys (0.5, 4), (1.0, 5.7), #scale keys (0.2, 1, 0.1), #emit box size (0, 0, 1), #emit velocity 2, #emit dir randomness 0, #rotation speed 0 #rotation damping ), ("game_hoof_dust_mud", psf_billboard_2d|psf_randomize_size|psf_randomize_rotation|psf_2d_turbulance, "prt_mesh_mud_1",#prt_mesh_dust_1 5, .7, 10, 3, 0, 0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0, 1), (1, 1), #alpha keys (0, .7), (1, .7), #red keys (0, 0.6),(1, 0.6), #green keys (0, 0.4),(1, 0.4), #blue keys (0.0, 0.2), (1.0, 0.22), #scale keys (0.15, 0.5, 0.1), #emit box size (0, 0, 15), #emit velocity 6, #emit dir randomness 200, #rotation speed 0.5 #rotation damping ), ("game_water_splash_1", psf_billboard_3d|psf_randomize_size|psf_randomize_rotation|psf_emit_at_water_level, "prtcl_drop", 20, 0.85, 0.25, 0.9, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.3, 0.5), (1, 0.0), #alpha keys (1.0, 1.0), (1, 1.0), #red keys (1.0, 1.0), (1, 1.0), #green keys (1.0, 1.0), (1, 1.0), #blue keys (0.0, 0.3), (1.0, 0.18), #scale keys (0.3, 0.2, 0.1), #emit box size (0, 1.2, 2.3), #emit velocity 0.3, #emit dir randomness 50, #rotation speed 0.5 #rotation damping ), ("game_water_splash_2", psf_billboard_3d|psf_randomize_size|psf_randomize_rotation|psf_emit_at_water_level, "prtcl_splash_b", 30, 0.4, 0.7, 0.5, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.3, 1.0), (1, 0.3), #alpha keys (1.0, 1.0), (1, 1.0), #red keys (1.0, 1.0), (1, 1.0), #green keys (1.0, 1.0), (1, 1.0), #blue keys (0.0, 0.25), (1.0, 0.7), #scale keys (0.4, 0.3, 0.1), #emit box size (0, 1.3, 1.1), #emit velocity 0.1, #emit dir randomness 50, #rotation speed 0.5 #rotation damping ), ("game_water_splash_3", psf_emit_at_water_level , "prt_mesh_water_wave_1", 5, 2.0, 0, 0.0, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.03, 0.2), (1, 0.0), #alpha keys (1.0, 1.0), (1, 1.0), #red keys (1.0, 1.0), (1, 1.0), #green keys (1.0, 1.0), (1, 1.0), #blue keys (0.0, 3), (1.0, 10), #scale keys (0.0, 0.0, 0.0), #emit box size (0, 0, 0), #emit velocity 0.0, #emit dir randomness 0, #rotation speed 0.5 #rotation damping ), ("torch_fire", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size|psf_randomize_rotation, "prt_mesh_fire_1", 50, 0.35, 0.2, 0.03, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.5, 0.8), (1, 0), #alpha keys (0.5, 1.0), (1, 0.9), #red keys (0.5, 0.7),(1, 0.3), #green keys (0.5, 0.2), (1, 0.0), #blue keys (0, 0.15), (0.4, 0.3), #scale keys (0.04, 0.04, 0.01), #emit box size (0, 0, 0.5), #emit velocity 0.0, #emit dir randomness 200, #rotation speed 0.5 #rotation damping ), ("fire_glow_1", psf_billboard_3d|psf_global_emit_dir|psf_always_emit, "prt_mesh_fire_2", 2, 0.55, 0.2, 0.0, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.5, 0.9), (1, 0), #alpha keys (0.0, 0.9), (1, 0.9), #red keys (0.0, 0.7),(1, 0.7), #green keys (0.0, 0.4), (1, 0.4), #blue keys (0, 2), (1.0, 2), #scale keys (0.0, 0.0, 0.0), #emit box size (0, 0, 0), #emit velocity 0.0, #emit dir randomness 0, 0 ), ("fire_glow_fixed", psf_billboard_3d|psf_global_emit_dir, "prt_mesh_fire_2", 4, 100.0, 0.2, 0.0, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (-0.01, 1.0), (1, 1.0), #alpha keys (0.0, 0.9), (1, 0.9), #red keys (0.0, 0.7),(1, 0.7), #green keys (0.0, 0.4), (1, 0.4), #blue keys (0, 2), (1.0, 2), #scale keys (0.0, 0.0, 0.0), #emit box size (0, 0, 0), #emit velocity 0.0, #emit dir randomness 0, 0 ), ("torch_smoke", psf_billboard_3d|psf_global_emit_dir|psf_always_emit, "prtcl_dust_a", 15, 0.5, 0.2, -0.2, 10.0, 0.1, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.5, 0.25), (1, 0), #alpha keys (0.0, 0.2), (1, 0.1), #red keys (0.0, 0.2),(1, 0.09), #green keys (0.0, 0.2), (1, 0.08), #blue keys (0, 0.5), (0.8, 2.5), #scale keys (0.1, 0.1, 0.1), #emit box size (0, 0, 1.5), #emit velocity 0.1 #emit dir randomness ), ("flue_smoke_short", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_rotation|psf_randomize_size, "prtcl_dust_a", 15, 1.5, 0.1, -0.0, 10.0, 12, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.0, 0.3), (1, 0), #alpha keys (0.0, 0.2), (1, 0.1), #red keys (0.0, 0.2),(1, 0.09), #green keys (0.0, 0.2), (1, 0.08), #blue keys (0, 1.5), (1, 7), #scale keys (0, 0, 0), #emit box size (0, 0, 1.5), #emit velocity 0.1, #emit dir randomness 150, 0.8, ), ("flue_smoke_tall", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_rotation|psf_randomize_size, "prtcl_dust_a", 15, 3, 0.5, -0.0, 15.0, 12,#num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0, 0.35), (1, 0), #alpha keys (0.0, 0.3), (1, 0.1), #red keys (0.0, 0.3),(1, 0.1), #green keys (0.0, 0.3), (1, 0.1), #blue keys (0, 2), (1, 7), #scale keys (0, 0, 0), #emit box size (0, 0, 1.5), #emit velocity 0.1, #emit dir randomness 150, 0.5, ), ("war_smoke_tall", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_rotation|psf_randomize_size, "prt_mesh_smoke_1", 5, 12, 0, 0, 7, 7, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0, 0.25), (1, 0), #alpha keys (0.0, 1), (1, 0.8), #red keys (0.0, 1),(1, 0.8), #green keys (0.0, 1), (1, 0.8), #blue keys (0, 2.2), (1, 15), #scale keys (0, 0, 0), #emit box size (0, 0, 2.2), #emit velocity 0.1, #emit dir randomness 100, 0.2, ), ("torch_fire_sparks", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size, "prt_sparks_mesh_1", 10, 0.7, 0.2, 0, 10.0, 0.02, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.66, 1), (1, 0), #alpha keys (0.1, 0.7), (1, 0.7), #red keys (0.1, 0.5),(1, 0.5), #green keys (0.1, 0.1), (1, 0.1), #blue keys (0.1, 0.05), (1, 0.05), #scale keys (0.1, 0.1, 0.1), #emit box size (0, 0, 0.9), #emit velocity 0.0, #emit dir randomness 0, 0, ), ("fire_sparks_1", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size, "prt_sparks_mesh_1", 10, 1.5, 0.2, 0, 3, 10, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.6, 1), (1, 1), #alpha keys (0.1, 0.7), (1, 0.7), #red keys (0.1, 0.5),(1, 0.5), #green keys (0.1, 0.1), (1, 0.1), #blue keys (0.1, 0.07), (1, 0.03), #scale keys (0.17, 0.17, 0.01), #emit box size (0, 0, 1), #emit velocity 0.0, #emit dir randomness 0, 0, ), ("pistol_smoke", psf_billboard_3d, "prtcl_dust_a", 90, 2.5, 0.6, -0.2, 60.0, 1.5, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.0, 0.75), (1, 0), #alpha keys (0.0, 0.7), (1, 0.4), #red keys (0.0, 0.7),(1, 0.4), #green keys (0.0, 0.7), (1, 0.4), #blue keys (0, 1.5), (0.5, 11.0), #scale keys (0.1, 0.1, 0.1), #emit box size (2, 2, 0), #emit velocity 0.1 #emit dir randomness ), # ("cooking_fire", psf_billboard_3d|psf_global_emit_dir|psf_always_emit, "prtcl_fire", # 50, 0.5, 0.2, -0.05, 30.0, 0.3, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength # (0.5, 1), (1, 1), #alpha keys # (0.5, 1.0), (1, 0.9), #red keys # (0.5, 0.4), (1, 0.1), #green keys # (0.5, 0.2), (1, 0.0), #blue keys # (0.3, 0.9), (0.9, 2), #scale keys # (0.07, 0.07, 0.01), #emit box size # (0, 0, 0.1), #emit velocity # 0.1 #emit dir randomness # ), ("brazier_fire_1", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size|psf_randomize_rotation, "prt_mesh_fire_1", 25, 0.5, 0.1, 0.0, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.5, 0.4), (1.0, 0), #alpha keys (0.5, 1.0), (1.0, 0.9), #red keys (0.5, 0.7),(1.0, 0.3), #green keys (0.5, 0.2), (1, 0.0), #blue keys (0.1, 0.2), (1.0, 0.5), #scale keys (0.1, 0.1, 0.01), #emit box size (0.0, 0.0, 0.4), #emit velocity 0.0, #emit dir randomness 100, #rotation speed 0.2 #rotation damping ), # ("cooking_smoke", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_rotation|psf_randomize_size, "prt_mesh_steam_1", # 3, 3.5, 0.4, -0.03, 10.0, 10.9, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength # (0.4, 1), (1, 0), #alpha keys # (0.0, 0.6), (1, 0.3), #red keys # (0.0, 0.6),(1, 0.3), #green keys # (0.0, 0.6), (1, 0.3), #blue keys # (0, 2.5), (0.9, 7.5), #scale keys # (0.1, 0.1, 0.06), #emit box size # (0, 0, 1.3), #emit velocity # 0.2, #emit dir randomness # 200, #rotation speed # 0.2, #rotation damping # ), ("cooking_fire_1", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size|psf_randomize_rotation, "prt_mesh_fire_1", 25, 0.35, 0.1, 0.03, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.5, 0.8), (1, 0), #alpha keys (0.5, 0.5*1.0), (1, 0.3*0.9), #red keys (0.5, 0.5*0.7),(1, 0.3*0.3), #green keys (0.5, 0.5*0.2), (1, 0.0), #blue keys (0.1, 0.5), (1, 1), #scale keys (0.05, 0.05, 0.01), #emit box size (0, 0, 1), #emit velocity 0.0, #emit dir randomness 200, #rotation speed 0.0 #rotation damping ), ("cooking_smoke", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_rotation|psf_randomize_size, "prt_mesh_smoke_1", 4, 4, 0.1, 0, 3, 5, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.2, 0.20), (1.0, 0.0), #alpha keys (0.0, 0.8), (1.0, 1.0), #red keys (0.0, 0.8),(1.0, 1.0), #green keys (0.0, 0.85), (1.0, 1.0), #blue keys (0.0, 0.65), (1.0, 3.0), #scale keys (0.0, 0.0, 0.0), #emit box size (0.0, 0.0, 1.2), #emit velocity 0.0, #emit dir randomness 0, 0, ), ("food_steam", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_rotation|psf_randomize_size, "prt_mesh_steam_1", 3, 1, 0, 0, 8.0, 1, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.5, 0.1), (1, 0), #alpha keys (0.0, 1), (1, 0.1), #red keys (0.0, 1),(1, 0.1), #green keys (0.0, 1), (1, 0.1), #blue keys (0, 0.2), (0.9, 0.5), #scale keys (0.05, 0.05, 0), #emit box size (0, 0, 0.1), #emit velocity 0, #emit dir randomness 100, #rotation speed 0.5, #rotation damping ), ("candle_light", psf_billboard_3d|psf_global_emit_dir|psf_always_emit, "prt_mesh_candle_fire_1", 7, 1.1, 0.6, -0.0, 10.0, 0.2, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.1, 0.5), (1, 0), #alpha keys (0.5, 1.0), (1, 0.9), #red keys (0.5, 0.6), (1, 0.1), #green keys (0.5, 0.2), (1, 0.0), #blue keys (0.3, 0.2), (1, 0.0), #scale keys (0.0, 0.0, 0.0), #emit box size (0, 0, 0.09), #emit velocity 0, #emit dir randomness 0, #rotation speed 0 #rotation damping ), ("candle_light_small", psf_billboard_3d|psf_global_emit_dir|psf_always_emit, "prt_mesh_candle_fire_1", 4, 1.1, 0.6, -0.0, 10.0, 0.2, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.1, 0.8), (1, 0), #alpha keys (0.5, 1.0), (1, 0.9), #red keys (0.5, 0.6), (1, 0.1), #green keys (0.5, 0.2), (1, 0.0), #blue keys (0.3, 0.13), (1, 0.0), #scale keys (0.0, 0.0, 0.0), #emit box size (0, 0, 0.06), #emit velocity 0, #emit dir randomness 0, #rotation speed 0 #rotation damping ), ("lamp_fire", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_rotation|psf_randomize_size, "prt_mesh_fire_1", 10, 0.8, 0.6, -0.0, 10.0, 0.4, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.1, 0.5), (1, 0), #alpha keys (0.5, 1.0), (1, 0.9), #red keys (0.5, 0.8), (1, 0.1), #green keys (0.5, 0.4), (1, 0.0), #blue keys (0.3, 0.35), (0.9, 0.5), #scale keys (0.01, 0.01, 0.0), #emit box size (0, 0, 0.35), #emit velocity 0.03, #emit dir randomness 100, #rotation speed 0.5, #rotation damping ), #*-*-*-*-* D U M M Y *-*-*-*-# ("dummy_smoke", psf_billboard_3d|psf_randomize_size, "prt_mesh_dust_1", 500, 3, 15, -0.05, 10.0, 0.2, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.1, 0.5), (1, 0), #alpha keys (0.1, 0.8), (1, 0.8), #red keys (0.1, 0.7),(1, 0.7), #green keys (0.1, 0.6), (1, 0.7), #blue keys (0.0, 0.7), (1, 2.2), #scale keys (0.2, 0.2, 0.5), #emit box size (0, 0, 0.05), #emit velocity 2, #emit dir randomness 10, #rotation speed 0.1, #rotation damping ), ("dummy_straw", psf_randomize_size | psf_randomize_rotation, "prt_mesh_straw_1", 500, 1, 2, 0.9, 10, 2, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.1, 1), (1, 1), #alpha keys (0.1, 0.6), (1, 0.6), #red keys (0.1, 0.5),(1, 0.5), #green keys (0.1, 0.4), (1, 0.4), #blue keys (0.0, 0.3), (1, 0.3), #scale keys (0.2, 0.2, 0.5), #emit box size (0, 0, 0), #emit velocity 2.3, #emit dir randomness 200, #rotation speed 0, #rotation damping ), #*-*-*-*-* D U M M Y E N D *-*-*-*-# #*-*-*-*-* GOURD *-*-*-*-# ("gourd_smoke", psf_billboard_3d|psf_randomize_size, "prt_mesh_dust_1", 500, 3, 15, -0.05, 10.0, 0.2, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.1, 0.5), (1, 0), #alpha keys (0.1, 0.8), (1, 0.8), #red keys (0.1, 0.7),(1, 0.7), #green keys (0.1, 0.6), (1, 0.7), #blue keys (0.0, 0.5), (1, 1), #scale keys (0.2, 0.2, 0.5), #emit box size (0, 0, 0.05), #emit velocity 2, #emit dir randomness 10, #rotation speed 0.1, #rotation damping ), ("gourd_piece_1", psf_randomize_rotation, "prt_gourd_piece_1", 15, 1, 2, 0.9, 10, 2, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.1, 1), (1, 1), #alpha keys (0.1, 0.6), (1, 0.6), #red keys (0.1, 0.5),(1, 0.5), #green keys (0.1, 0.4), (1, 0.4), #blue keys (0.0, 1), (1, 1), #scale keys (0.2, 0.2, 0.5), #emit box size (0, 0, 0), #emit velocity 2.3, #emit dir randomness 200, #rotation speed 0, #rotation damping ), ("gourd_piece_2", psf_randomize_size | psf_randomize_rotation, "prt_gourd_piece_2", 50, 1, 2, 0.9, 10, 2, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.1, 1), (1, 1), #alpha keys (0.1, 0.6), (1, 0.6), #red keys (0.1, 0.5),(1, 0.5), #green keys (0.1, 0.4), (1, 0.4), #blue keys (0.0, 1), (1, 1), #scale keys (0.2, 0.2, 0.5), #emit box size (0, 0, 0), #emit velocity 2.3, #emit dir randomness 200, #rotation speed 0, #rotation damping ), ## ("rat_particle", psf_global_emit_dir|psf_2d_turbulance | psf_randomize_size |psf_billboard_3d, "rat_particle", ## 500, 4, 0, 0, 20, 10, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength ## (0.1, 1), (1, 1), #alpha keys ## (0.1, 0.6), (1, 0.6), #red keys ## (0.1, 0.5),(1, 0.5), #green keys ## (0.1, 0.4), (1, 0.4), #blue keys ## (0.1, 1), (1, 1), #scale keys ## (0.1, 0.1, 0.1), #emit box size ## (0, 0, 0), #emit velocity ## 5, #emit dir randomness ## ), #*-*-*-**** BLOOD ****-*-*-*# ##("blood_hit_1", psf_billboard_3d | psf_randomize_size , "prt_mesh_blood_1", ## 5000, 0.5, 6, 0.5, 0, 0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength ## (0.1, 1), (1, 0), #alpha keys ## (0.1, 0.6), (1, 0.6), #red keys ## (0.1, 0.5),(1, 0.5), #green keys ## (0.1, 0.4), (1, 0.4), #blue keys ## (0.0, 0.05), (1, 0.05), #scale keys ## (0, 0.5, 0), #emit box size ## (0, -1, 0), #emit velocity ## 1.5, #emit dir randomness ## 0, #rotation speed ## 0, #rotation damping ## ), ## #("blood_hit_2", 0 , "prt_mesh_blood_2", ## # 500, 0.3, 0,0, 0, 0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength ## # (0.1, 1), (1, 0.0), #alpha keys ## # (0.1, 0.6), (1, 0.6), #red keys ## # (0.1, 0.5),(1, 0.5), #green keys ## # (0.1, 0.4), (1, 0.4), #blue keys ## # (0.0, 0.4), (1, 2), #scale keys ## # (0.0, 0.0, 0.0), #emit box size ## # (0, -0.1, 0), #emit velocity ## # 0, #emit dir randomness ## # 0, #rotation speed ## # 0, #rotation damping ## # ), ## ("blood_hit_3", psf_billboard_3d | psf_randomize_size , "prt_mesh_blood_3", ## 500, 0.3, 1,0.0, 0, 0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength ## (0.1, 1), (1, 0.0), #alpha keys ## (0.1, 0.6), (1, 0.6), #red keys ## (0.1, 0.5),(1, 0.5), #green keys ## (0.1, 0.4), (1, 0.4), #blue keys ## (0.0, 0.2), (1, 0.8), #scale keys ## (0.0, 0.3, 0.0), #emit box size ## (0, 1, 0), #emit velocity ## 1, #emit dir randomness ## 250, #rotation speed ## 0, #rotation damping ## ), #*-*-*-**** BLOOD END ****-*-*-*# #-*-*-*- Fire Fly Deneme *-*-*-*-# ("fire_fly_1", psf_billboard_3d|psf_global_emit_dir|psf_always_emit, "prt_sparks_mesh_1", 2, 5, 1.2, 0, 50, 7, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.1, 0.8), (1, 0.2), #alpha keys (0.5, .7), (1, 0.7), #red keys (0.5, 0.8), (1, 0.8), #green keys (0.5, 1), (1, 1), #blue keys (0, 0.1), (1, 0.1), #scale keys (20, 20, 0.5), #emit box size (0, 0, 0), #emit velocity 5, #emit dir randomness 0, #rotation speed 0 #rotation damping ), ("bug_fly_1", psf_billboard_3d|psf_global_emit_dir|psf_always_emit, "prt_mesh_snow_dust_1", 5, 5, 1.2, 0, 50, 20, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.1, 1), (1, 1), #alpha keys (0, 0), (1, 0), #red keys (0, 0), (1, 0), #green keys (0, 0), (1, 0), #blue keys (0, 0.05), (1, 0.05), #scale keys (20, 20, 0.5), #emit box size (0, 0, 0), #emit velocity 5, #emit dir randomness 100, #rotation speed 0.5, #rotation damping ), #-*-*-*- Fire Fly End*-*-*-*-# #-*-*-*- Moon Beam *-*-*-*-*-*-*# ("moon_beam_1", psf_billboard_2d|psf_global_emit_dir|psf_always_emit|psf_randomize_size, "prt_mesh_moon_beam",#prt_mesh_moon_beam 2, 4, 1.2, 0, 0, 0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.5, 1), (1, 0), #alpha keys (0, 0.4), (1, 0.4), #red keys (0, 0.5), (1, 0.5), #green keys (0, 0.6), (1, 0.6), #blue keys (0, 2), (1, 2.2), #scale keys (1, 1, 0.2), #emit box size (0, 0, -2), #emit velocity 0, #emit dir randomness 100, #rotation speed 0.5, #rotation damping ), ("moon_beam_paricle_1", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size, "prt_sparks_mesh_1", 10, 1.5, 1.5, 0, 10, 10, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.5, 1), (1, 0.0), #alpha keys (0.5, .5), (1, 0.5), #red keys (0.5, 0.7), (1, 0.7), #green keys (0.5, 1), (1, 1), #blue keys (0, 0.1), (1, 0.1), #scale keys (1, 1, 4), #emit box size (0, 0, 0), #emit velocity 0.5, #emit dir randomness 0, #rotation speed 0 #rotation damping ), #-*-*-*- Moon Beam End *-*-*-*-*-*-*# #-*-*-*- Stone Smoke *-*-*-*-*-*-*# ##("stone_hit_1", psf_billboard_3d | psf_randomize_size | psf_randomize_rotation, "prt_mesh_dust_1", ## 5000, 0.5, 6, 0.1, 0, 0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength ## (0.1, .2), (1, 0), #alpha keys ## (0.5, 0.7), (1, 0.7), #red keys ## (0.5, 0.6), (1, 0.6), #green keys ## (0.5, 0.6), (1, 0.6), #blue keys ## (0.0, .2), (1, 0.7), #scale keys ## (0, 0.3, 0), #emit box size ## (0, 0, 0), #emit velocity ## 1.1, #emit dir randomness ## 200, #rotation speed ## 0.8, #rotation damping ## ), #-*-*-*- Stone Smoke END -*-*-*-*-*# ("night_smoke_1", psf_billboard_3d|psf_global_emit_dir|psf_always_emit, "prt_mesh_dust_1", 5, 10, 1.5, 0, 50, 2, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.3, 0.2), (1, 0), #alpha keys (0.5, 0.5), (1, 0.5), #red keys (0.5, 0.5), (1, 0.5), #green keys (0.5, 0.5), (1, 0.6), #blue keys (0, 10), (1, 10), #scale keys (25, 25, 0.5), #emit box size (0, 1, 0), #emit velocity 2, #emit dir randomness 20, #rotation speed 1 #rotation damping ), #-*-*-*- Fire For Fireplace -*-*-*-# ("fireplace_fire_small", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size|psf_randomize_rotation, "prt_mesh_fire_1", 25, 0.8, 0.2, -0.1, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.5, 0.5), (1, 0), #alpha keys (0.5, 1.0), (1, 0.9), #red keys (0.5, 0.7),(1, 0.3), #green keys (0.5, 0.2), (1, 0.0), #blue keys (0, 0.2), (1, 0.7), #scale keys (0.2, 0.1, 0.01), #emit box size (0, 0, 0.2), #emit velocity 0.1, #emit dir randomness 100, #rotation speed 0.5 #rotation damping ), ("fireplace_fire_big", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size|psf_randomize_rotation, "prt_mesh_fire_1", 35, 0.6, 0.2, -0.2, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.5, 0.5), (1, 0), #alpha keys (0.5, 1.0), (1, 0.9), #red keys (0.5, 0.7),(1, 0.3), #green keys (0.5, 0.2), (1, 0.0), #blue keys (0, 0.4), (1, 1), #scale keys (0.4, 0.2, 0.01), #emit box size (0, 0, 0.4), #emit velocity 0.1, #emit dir randomness 100, #rotation speed 0.5 #rotation damping ), #-*-*-*- Fire For Fireplace -*-*-*-# #-*-*-*- Village Fire *-*-*-*-# ("village_fire_big", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size|psf_randomize_rotation, "prt_mesh_fire_1", 50, 1.0, 0, -1.2, 25.0, 10.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.2, 0.7), (1, 0), #alpha keys (0.2, 1.0), (1, 0.9), #red keys (0.2, 0.7),(1, 0.3), #green keys (0.2, 0.2), (1, 0.0), #blue keys (0, 2), (1, 6), #scale keys (2.2, 2.2, 0.2), #emit box size (0, 0, 0.0), #emit velocity 0.0, #emit dir randomness 250, #rotation speed 0.3 #rotation damping ), ("village_fire_smoke_big", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size|psf_randomize_rotation, "prt_mesh_smoke_1", 30, 2, 0.3, -1, 50.0, 10.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.5, 0.15), (1, 0), #alpha keys (0.2, 0.4), (1, 0.2), #red keys (0.2, 0.4),(1, 0.2), #green keys (0.2, 0.4), (1, 0.2), #blue keys (0, 6), (1, 8), #scale keys (2, 2, 1), #emit box size (0, 0, 5), #emit velocity 0.0, #emit dir randomness 0, #rotation speed 0.1 #rotation damping ), ("map_village_fire", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size|psf_randomize_rotation, "prt_mesh_fire_1", 20, 1.0, 0, -0.2, 3.0, 3.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.2, 0.7), (1, 0), #alpha keys (0.2, 1.0), (1, 0.9), #red keys (0.2, 0.7),(1, 0.3), #green keys (0.2, 0.2), (1, 0.0), #blue keys (0, 0.15), (1, 0.45), #scale keys (0.2, 0.2, 0.02), #emit box size (0, 0, 0.0), #emit velocity 0.0, #emit dir randomness 250, #rotation speed 0.3 #rotation damping ), ("map_village_fire_smoke", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size|psf_randomize_rotation, "prt_mesh_smoke_1", 25, 2.5, 0.3, -0.15, 3.0, 3.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.5, 0.15), (1, 0), #alpha keys (0.2, 0.4), (1, 0.3), #red keys (0.2, 0.4),(1, 0.3), #green keys (0.2, 0.4), (1, 0.3), #blue keys (0, 0.6), (1, 0.9), #scale keys (0.2, 0.2, 0.1), #emit box size (0, 0, 0.03), #emit velocity 0.0, #emit dir randomness 0, #rotation speed 0.1 #rotation damping ), ("map_village_looted_smoke", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size|psf_randomize_rotation, "prt_mesh_smoke_1", 20, 3, 0.3, -0.11, 3.0, 2.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (0.5, 0.15), (1, 0), #alpha keys (0.2, 0.5), (1, 0.5), #red keys (0.2, 0.5),(1, 0.5), #green keys (0.2, 0.5), (1, 0.5), #blue keys (0, 0.7), (1, 1.3), #scale keys (0.2, 0.2, 0.1), #emit box size (0, 0, 0.015), #emit velocity 0.0, #emit dir randomness 0, #rotation speed 0.1 #rotation damping ), ##### Dungeon Water Drops ##### ("dungeon_water_drops", psf_billboard_2d|psf_global_emit_dir|psf_always_emit, "prtcl_rain", 1, 1, 0.33, 0.8, 0, 0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength (1.0, 0.2), (1, 0.2), #alpha keys (1.0, 1.0), (1, 1.0), #red keys (1.0, 1.0), (1, 1.0), #green keys (1.0, 1.0), (1, 1.0), #blue keys (1.0, 0.8), (1.0, 0.8), #scale keys (0.05, 0.05, 0.5), #emit box size (0, 0, -5.0), #emit velocity 0.0, #emit dir randomness 0, #rotation speed 0, #rotation damping ), ##### Dungeon Water Drops END ##### ]
Python
p_main_party = 0 p_temp_party = 1 p_camp_bandits = 2 p_temp_party_2 = 3 p_temp_casualties = 4 p_temp_casualties_2 = 5 p_temp_casualties_3 = 6 p_temp_wounded = 7 p_temp_killed = 8 p_main_party_backup = 9 p_encountered_party_backup = 10 p_collective_friends_backup = 11 p_player_casualties = 12 p_enemy_casualties = 13 p_ally_casualties = 14 p_collective_enemy = 15 p_collective_ally = 16 p_collective_friends = 17 p_zendar = 18 p_town_1 = 19 p_town_2 = 20 p_town_3 = 21 p_town_4 = 22 p_town_5 = 23 p_town_6 = 24 p_town_7 = 25 p_town_8 = 26 p_town_9 = 27 p_town_10 = 28 p_town_11 = 29 p_town_12 = 30 p_town_13 = 31 p_town_14 = 32 p_town_15 = 33 p_town_16 = 34 p_town_17 = 35 p_town_18 = 36 p_castle_1 = 37 p_castle_2 = 38 p_castle_3 = 39 p_castle_4 = 40 p_castle_5 = 41 p_castle_6 = 42 p_castle_7 = 43 p_castle_8 = 44 p_castle_9 = 45 p_castle_10 = 46 p_castle_11 = 47 p_castle_12 = 48 p_castle_13 = 49 p_castle_14 = 50 p_castle_15 = 51 p_castle_16 = 52 p_castle_17 = 53 p_castle_18 = 54 p_castle_19 = 55 p_castle_20 = 56 p_castle_21 = 57 p_castle_22 = 58 p_castle_23 = 59 p_castle_24 = 60 p_castle_25 = 61 p_castle_26 = 62 p_castle_27 = 63 p_castle_28 = 64 p_castle_29 = 65 p_castle_30 = 66 p_castle_31 = 67 p_castle_32 = 68 p_castle_33 = 69 p_castle_34 = 70 p_castle_35 = 71 p_castle_36 = 72 p_castle_37 = 73 p_castle_38 = 74 p_castle_39 = 75 p_castle_40 = 76 p_village_1 = 77 p_village_2 = 78 p_village_3 = 79 p_village_4 = 80 p_village_5 = 81 p_village_6 = 82 p_village_7 = 83 p_village_8 = 84 p_village_9 = 85 p_village_10 = 86 p_village_11 = 87 p_village_12 = 88 p_village_13 = 89 p_village_14 = 90 p_village_15 = 91 p_village_16 = 92 p_village_17 = 93 p_village_18 = 94 p_village_19 = 95 p_village_20 = 96 p_village_21 = 97 p_village_22 = 98 p_village_23 = 99 p_village_24 = 100 p_village_25 = 101 p_village_26 = 102 p_village_27 = 103 p_village_28 = 104 p_village_29 = 105 p_village_30 = 106 p_village_31 = 107 p_village_32 = 108 p_village_33 = 109 p_village_34 = 110 p_village_35 = 111 p_village_36 = 112 p_village_37 = 113 p_village_38 = 114 p_village_39 = 115 p_village_40 = 116 p_village_41 = 117 p_village_42 = 118 p_village_43 = 119 p_village_44 = 120 p_village_45 = 121 p_village_46 = 122 p_village_47 = 123 p_village_48 = 124 p_village_49 = 125 p_village_50 = 126 p_village_51 = 127 p_village_52 = 128 p_village_53 = 129 p_village_54 = 130 p_village_55 = 131 p_village_56 = 132 p_village_57 = 133 p_village_58 = 134 p_village_59 = 135 p_village_60 = 136 p_village_61 = 137 p_village_62 = 138 p_village_63 = 139 p_village_64 = 140 p_village_65 = 141 p_village_66 = 142 p_village_67 = 143 p_village_68 = 144 p_village_69 = 145 p_village_70 = 146 p_village_71 = 147 p_village_72 = 148 p_village_73 = 149 p_village_74 = 150 p_village_75 = 151 p_village_76 = 152 p_village_77 = 153 p_village_78 = 154 p_village_79 = 155 p_village_80 = 156 p_village_81 = 157 p_village_82 = 158 p_village_83 = 159 p_village_84 = 160 p_village_85 = 161 p_village_86 = 162 p_village_87 = 163 p_village_88 = 164 p_village_89 = 165 p_village_90 = 166 p_salt_mine = 167 p_four_ways_inn = 168 p_test_scene = 169 p_battlefields = 170 p_dhorak_keep = 171 p_training_ground = 172 p_training_ground_1 = 173 p_training_ground_2 = 174 p_training_ground_3 = 175 p_training_ground_4 = 176 p_training_ground_5 = 177 p_bridge_1 = 178 p_bridge_2 = 179 p_bridge_3 = 180 p_bridge_4 = 181 p_bridge_5 = 182 p_bridge_6 = 183 p_bridge_7 = 184 p_bridge_8 = 185 p_bridge_9 = 186 p_bridge_10 = 187 p_bridge_11 = 188 p_bridge_12 = 189 p_bridge_13 = 190 p_bridge_14 = 191 p_bridge_15 = 192 p_looter_spawn_point = 193 p_steppe_bandit_spawn_point = 194 p_forest_bandit_spawn_point = 195 p_mountain_bandit_spawn_point = 196 p_sea_raider_spawn_point_1 = 197 p_sea_raider_spawn_point_2 = 198 p_spawn_points_end = 199
Python
from header_meshes import * #################################################################################################################### # Each mesh record contains the following fields: # 1) Mesh id: used for referencing meshes in other files. The prefix mesh_ is automatically added before each mesh id. # 2) Mesh flags. See header_meshes.py for a list of available flags # 3) Mesh resource name: Resource name of the mesh # 4) Mesh translation on x axis: Will be done automatically when the mesh is loaded # 5) Mesh translation on y axis: Will be done automatically when the mesh is loaded # 6) Mesh translation on z axis: Will be done automatically when the mesh is loaded # 7) Mesh rotation angle over x axis: Will be done automatically when the mesh is loaded # 8) Mesh rotation angle over y axis: Will be done automatically when the mesh is loaded # 9) Mesh rotation angle over z axis: Will be done automatically when the mesh is loaded # 10) Mesh x scale: Will be done automatically when the mesh is loaded # 11) Mesh y scale: Will be done automatically when the mesh is loaded # 12) Mesh z scale: Will be done automatically when the mesh is loaded #################################################################################################################### meshes = [ ("pic_bandits", 0, "pic_bandits", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_mb_warrior_1", 0, "pic_mb_warrior_1", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_messenger", 0, "pic_messenger", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_prisoner_man", 0, "pic_prisoner_man", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_prisoner_fem", 0, "pic_prisoner_fem", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_prisoner_wilderness", 0, "pic_prisoner_wilderness", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_siege_sighted", 0, "pic_siege_sighted", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_siege_sighted_fem", 0, "pic_siege_sighted_fem", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_camp", 0, "pic_camp", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_payment", 0, "pic_payment", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_escape_1", 0, "pic_escape_1", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_escape_1_fem", 0, "pic_escape_1_fem", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_victory", 0, "pic_victory", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_defeat", 0, "pic_defeat", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_wounded", 0, "pic_wounded", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_wounded_fem", 0, "pic_wounded_fem", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_steppe_bandits", 0, "pic_steppe_bandits", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_mountain_bandits", 0, "pic_mountain_bandits", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_sea_raiders", 0, "pic_sea_raiders", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_deserters", 0, "pic_deserters", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_forest_bandits", 0, "pic_forest_bandits", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_cattle", 0, "pic_cattle", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_looted_village", 0, "pic_looted_village", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_village_p", 0, "pic_village_p", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_village_s", 0, "pic_village_s", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_village_w", 0, "pic_village_w", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_recruits", 0, "pic_recruits", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_arms_swadian", 0, "pic_arms_swadian", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_arms_vaegir", 0, "pic_arms_vaegir", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_arms_khergit", 0, "pic_arms_khergit", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_arms_nord", 0, "pic_arms_nord", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("pic_arms_rhodok", 0, "pic_arms_rhodok", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("portrait_blend_out", 0, "portrait_blend_out", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("load_window", 0, "load_window", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("checkbox_off", render_order_plus_1, "checkbox_off", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("checkbox_on", render_order_plus_1, "checkbox_on", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("white_plane", 0, "white_plane", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("white_dot", 0, "white_dot", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("player_dot", 0, "player_dot", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("flag_infantry", 0, "flag_infantry", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("flag_archers", 0, "flag_archers", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("flag_cavalry", 0, "flag_cavalry", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("color_picker", 0, "color_picker", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("custom_map_banner_01", 0, "custom_map_banner_01", 0, 0, 0, -90, 0, 90, 1, 1, 1), ("custom_map_banner_02", 0, "custom_map_banner_02", 0, 0, 0, -90, 0, 90, 1, 1, 1), ("custom_map_banner_03", 0, "custom_map_banner_03", 0, 0, 0, -90, 0, 90, 1, 1, 1), ("custom_banner_01", 0, "custom_banner_01", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("custom_banner_02", 0, "custom_banner_02", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("custom_banner_bg", 0, "custom_banner_bg", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg01", 0, "custom_banner_fg01", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg02", 0, "custom_banner_fg02", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg03", 0, "custom_banner_fg03", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg04", 0, "custom_banner_fg04", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg05", 0, "custom_banner_fg05", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg06", 0, "custom_banner_fg06", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg07", 0, "custom_banner_fg07", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg08", 0, "custom_banner_fg08", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg09", 0, "custom_banner_fg09", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg10", 0, "custom_banner_fg10", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg11", 0, "custom_banner_fg11", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg12", 0, "custom_banner_fg12", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg13", 0, "custom_banner_fg13", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg14", 0, "custom_banner_fg14", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg15", 0, "custom_banner_fg15", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg16", 0, "custom_banner_fg16", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg17", 0, "custom_banner_fg17", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg18", 0, "custom_banner_fg18", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg19", 0, "custom_banner_fg19", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg20", 0, "custom_banner_fg20", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg21", 0, "custom_banner_fg21", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg22", 0, "custom_banner_fg22", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_fg23", 0, "custom_banner_fg23", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_01", 0, "custom_banner_charge_01", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_02", 0, "custom_banner_charge_02", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_03", 0, "custom_banner_charge_03", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_04", 0, "custom_banner_charge_04", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_05", 0, "custom_banner_charge_05", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_06", 0, "custom_banner_charge_06", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_07", 0, "custom_banner_charge_07", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_08", 0, "custom_banner_charge_08", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_09", 0, "custom_banner_charge_09", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_10", 0, "custom_banner_charge_10", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_11", 0, "custom_banner_charge_11", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_12", 0, "custom_banner_charge_12", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_13", 0, "custom_banner_charge_13", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_14", 0, "custom_banner_charge_14", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_15", 0, "custom_banner_charge_15", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_16", 0, "custom_banner_charge_16", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_17", 0, "custom_banner_charge_17", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_18", 0, "custom_banner_charge_18", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_19", 0, "custom_banner_charge_19", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_20", 0, "custom_banner_charge_20", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_21", 0, "custom_banner_charge_21", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_22", 0, "custom_banner_charge_22", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_23", 0, "custom_banner_charge_23", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_24", 0, "custom_banner_charge_24", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_25", 0, "custom_banner_charge_25", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_26", 0, "custom_banner_charge_26", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_27", 0, "custom_banner_charge_27", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_28", 0, "custom_banner_charge_28", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_29", 0, "custom_banner_charge_29", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_30", 0, "custom_banner_charge_30", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_31", 0, "custom_banner_charge_31", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_32", 0, "custom_banner_charge_32", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_33", 0, "custom_banner_charge_33", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_34", 0, "custom_banner_charge_34", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_35", 0, "custom_banner_charge_35", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_36", 0, "custom_banner_charge_36", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_37", 0, "custom_banner_charge_37", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_38", 0, "custom_banner_charge_38", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_39", 0, "custom_banner_charge_39", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_40", 0, "custom_banner_charge_40", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_41", 0, "custom_banner_charge_41", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_42", 0, "custom_banner_charge_42", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_43", 0, "custom_banner_charge_43", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_44", 0, "custom_banner_charge_44", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_45", 0, "custom_banner_charge_45", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("custom_banner_charge_46", 0, "custom_banner_charge_46", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_custom_banner", 0, "tableau_mesh_custom_banner", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_custom_banner_square", 0, "tableau_mesh_custom_banner_square", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_custom_banner_tall", 0, "tableau_mesh_custom_banner_tall", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_custom_banner_short", 0, "tableau_mesh_custom_banner_short", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_shield_round_1", 0, "tableau_mesh_shield_round_1", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_shield_round_2", 0, "tableau_mesh_shield_round_2", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_shield_round_3", 0, "tableau_mesh_shield_round_3", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_shield_round_4", 0, "tableau_mesh_shield_round_4", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_shield_round_5", 0, "tableau_mesh_shield_round_5", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_shield_small_round_1", 0, "tableau_mesh_shield_small_round_1", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_shield_small_round_2", 0, "tableau_mesh_shield_small_round_2", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_shield_small_round_3", 0, "tableau_mesh_shield_small_round_3", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_shield_kite_1", 0, "tableau_mesh_shield_kite_1", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_shield_kite_2", 0, "tableau_mesh_shield_kite_2", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_shield_kite_3", 0, "tableau_mesh_shield_kite_3", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_shield_kite_4", 0, "tableau_mesh_shield_kite_4", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_shield_heater_1", 0, "tableau_mesh_shield_heater_1", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_shield_heater_2", 0, "tableau_mesh_shield_heater_2", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_shield_pavise_1", 0, "tableau_mesh_shield_pavise_1", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_shield_pavise_2", 0, "tableau_mesh_shield_pavise_2", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("heraldic_armor_bg", 0, "heraldic_armor_bg", 0, 0, 0, 0, 0, 0, 10, 10, 10), ("tableau_mesh_heraldic_armor_a", 0, "tableau_mesh_heraldic_armor_a", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("tableau_mesh_heraldic_armor_b", 0, "tableau_mesh_heraldic_armor_b", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("tableau_mesh_heraldic_armor_c", 0, "tableau_mesh_heraldic_armor_c", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("tableau_mesh_heraldic_armor_d", 0, "tableau_mesh_heraldic_armor_d", 0, 0, 0, 0, 0, 0, 1, 1, 1), ("outer_terrain_plain_1", 0, "ter_border_a", -90, 0, 0, 0, 0, 0, 1, 1, 1), ("banner_a01", 0, "banner_a01", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_a02", 0, "banner_a02", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_a03", 0, "banner_a03", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_a04", 0, "banner_a04", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_a05", 0, "banner_a05", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_a06", 0, "banner_a06", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_a07", 0, "banner_a07", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_a08", 0, "banner_a08", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_a09", 0, "banner_a09", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_a10", 0, "banner_a10", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_a11", 0, "banner_a11", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_a12", 0, "banner_a12", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_a13", 0, "banner_a13", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_a14", 0, "banner_a14", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_a15", 0, "banner_f21", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_a16", 0, "banner_a16", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_a17", 0, "banner_a17", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_a18", 0, "banner_a18", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_a19", 0, "banner_a19", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_a20", 0, "banner_a20", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_a21", 0, "banner_a21", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b01", 0, "banner_b01", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b02", 0, "banner_b02", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b03", 0, "banner_b03", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b04", 0, "banner_b04", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b05", 0, "banner_b05", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b06", 0, "banner_b06", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b07", 0, "banner_b07", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b08", 0, "banner_b08", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b09", 0, "banner_b09", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b10", 0, "banner_b10", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b11", 0, "banner_b11", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b12", 0, "banner_b12", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b13", 0, "banner_b13", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b14", 0, "banner_b14", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b15", 0, "banner_b15", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b16", 0, "banner_b16", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b17", 0, "banner_b17", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b18", 0, "banner_b18", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b19", 0, "banner_b19", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b20", 0, "banner_b20", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_b21", 0, "banner_b21", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c01", 0, "banner_c01", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c02", 0, "banner_c02", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c03", 0, "banner_c03", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c04", 0, "banner_c04", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c05", 0, "banner_c05", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c06", 0, "banner_c06", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c07", 0, "banner_c07", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c08", 0, "banner_c08", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c09", 0, "banner_c09", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c10", 0, "banner_c10", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c11", 0, "banner_c11", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c12", 0, "banner_c12", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c13", 0, "banner_c13", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c14", 0, "banner_c14", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c15", 0, "banner_c15", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c16", 0, "banner_c16", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c17", 0, "banner_c17", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c18", 0, "banner_c18", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c19", 0, "banner_c19", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c20", 0, "banner_c20", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_c21", 0, "banner_c21", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d01", 0, "banner_d01", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d02", 0, "banner_d02", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d03", 0, "banner_d03", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d04", 0, "banner_d04", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d05", 0, "banner_d05", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d06", 0, "banner_d06", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d07", 0, "banner_d07", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d08", 0, "banner_d08", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d09", 0, "banner_d09", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d10", 0, "banner_d10", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d11", 0, "banner_d11", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d12", 0, "banner_d12", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d13", 0, "banner_d13", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d14", 0, "banner_d14", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d15", 0, "banner_d15", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d16", 0, "banner_d16", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d17", 0, "banner_d17", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d18", 0, "banner_d18", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d19", 0, "banner_d19", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d20", 0, "banner_d20", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_d21", 0, "banner_d21", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e01", 0, "banner_e01", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e02", 0, "banner_e02", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e03", 0, "banner_e03", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e04", 0, "banner_e04", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e05", 0, "banner_e05", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e06", 0, "banner_e06", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e07", 0, "banner_e07", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e08", 0, "banner_e08", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e09", 0, "banner_e09", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e10", 0, "banner_e10", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e11", 0, "banner_e11", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e12", 0, "banner_e12", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e13", 0, "banner_e13", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e14", 0, "banner_e14", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e15", 0, "banner_e15", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e16", 0, "banner_e16", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e17", 0, "banner_e17", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e18", 0, "banner_e18", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e19", 0, "banner_e19", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e20", 0, "banner_e20", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_e21", 0, "banner_e21", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f01", 0, "banner_f01", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f02", 0, "banner_f02", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f03", 0, "banner_f03", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f04", 0, "banner_f04", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f05", 0, "banner_f05", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f06", 0, "banner_f06", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f07", 0, "banner_f07", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f08", 0, "banner_f08", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f09", 0, "banner_f09", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f10", 0, "banner_f10", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f11", 0, "banner_f11", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f12", 0, "banner_f12", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f13", 0, "banner_f13", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f14", 0, "banner_f14", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f15", 0, "banner_f15", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f16", 0, "banner_f16", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f17", 0, "banner_f17", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f18", 0, "banner_f18", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f19", 0, "banner_f19", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f20", 0, "banner_f20", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banner_f21", 0, "banner_a15", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a01", 0, "arms_a01", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a02", 0, "arms_a02", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a03", 0, "arms_a03", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a04", 0, "arms_a04", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a05", 0, "banner_a05", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a06", 0, "arms_a06", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a07", 0, "banner_a07", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a08", 0, "arms_a08", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a09", 0, "banner_a09", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a10", 0, "banner_a10", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a11", 0, "banner_a11", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a12", 0, "arms_a12", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a13", 0, "arms_a13", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a14", 0, "banner_a14", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a15", 0, "banner_f21", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a16", 0, "arms_a16", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a17", 0, "arms_a17", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a18", 0, "arms_a18", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a19", 0, "arms_a19", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a20", 0, "arms_a20", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_a21", 0, "arms_a21", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b01", 0, "arms_b01", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b02", 0, "arms_b02", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b03", 0, "banner_b03", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b04", 0, "banner_b04", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b05", 0, "arms_b05", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b06", 0, "arms_b06", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b07", 0, "arms_b07", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b08", 0, "arms_b08", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b09", 0, "arms_b09", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b10", 0, "arms_b10", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b11", 0, "banner_b11", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b12", 0, "banner_b12", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b13", 0, "banner_b13", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b14", 0, "arms_b14", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b15", 0, "arms_b15", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b16", 0, "arms_b16", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b17", 0, "banner_b17", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b18", 0, "arms_b18", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b19", 0, "banner_b19", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b20", 0, "arms_b20", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_b21", 0, "banner_b21", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c01", 0, "arms_c01", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c02", 0, "banner_c02", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c03", 0, "banner_c03", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c04", 0, "arms_c04", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c05", 0, "banner_c05", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c06", 0, "arms_c06", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c07", 0, "arms_c07", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c08", 0, "banner_c08", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c09", 0, "banner_c09", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c10", 0, "arms_c10", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c11", 0, "banner_c11", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c12", 0, "arms_c12", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c13", 0, "arms_c13", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c14", 0, "arms_c14", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c15", 0, "banner_c15", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c16", 0, "arms_c16", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c17", 0, "banner_c17", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c18", 0, "banner_c18", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c19", 0, "arms_c19", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c20", 0, "banner_c20", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_c21", 0, "banner_c21", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d01", 0, "banner_d01", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d02", 0, "arms_d02", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d03", 0, "arms_d03", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d04", 0, "arms_d04", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d05", 0, "banner_d05", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d06", 0, "arms_d06", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d07", 0, "arms_d07", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d08", 0, "arms_d08", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d09", 0, "arms_d09", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d10", 0, "banner_d10", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d11", 0, "arms_d11", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d12", 0, "arms_d12", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d13", 0, "arms_d13", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d14", 0, "arms_d14", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d15", 0, "arms_d15", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d16", 0, "arms_d16", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d17", 0, "arms_d17", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d18", 0, "arms_d18", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d19", 0, "arms_d19", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d20", 0, "arms_d20", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_d21", 0, "arms_d21", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e01", 0, "banner_e01", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e02", 0, "arms_e02", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e03", 0, "banner_e03", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e04", 0, "banner_e04", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e05", 0, "banner_e05", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e06", 0, "banner_e06", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e07", 0, "banner_e07", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e08", 0, "banner_e08", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e09", 0, "banner_e09", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e10", 0, "banner_e10", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e11", 0, "banner_e11", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e12", 0, "banner_e12", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e13", 0, "banner_e13", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e14", 0, "banner_e14", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e15", 0, "banner_e15", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e16", 0, "banner_e16", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e17", 0, "banner_e17", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e18", 0, "banner_e18", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e19", 0, "banner_e19", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e20", 0, "banner_e20", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_e21", 0, "banner_e21", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f01", 0, "banner_f01", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f02", 0, "banner_f02", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f03", 0, "banner_f03", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f04", 0, "banner_f04", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f05", 0, "banner_f05", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f06", 0, "banner_f06", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f07", 0, "banner_f07", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f08", 0, "banner_f08", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f09", 0, "banner_f09", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f10", 0, "banner_f10", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f11", 0, "banner_f11", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f12", 0, "banner_f12", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f13", 0, "banner_f13", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f14", 0, "banner_f14", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f15", 0, "banner_f15", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f16", 0, "banner_f16", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f17", 0, "banner_f17", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f18", 0, "banner_f18", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f19", 0, "banner_f19", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f20", 0, "banner_f20", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("arms_f21", 0, "banner_a15", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banners_default_a", 0, "banners_default_a", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banners_default_b", 0, "banners_default_b", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banners_default_c", 0, "banners_default_c", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banners_default_d", 0, "banners_default_d", 0, 0, 0, -90, 0, 0, 1, 1, 1), ("banners_default_e", 0, "banners_default_e", 0, 0, 0, -90, 0, 0, 1, 1, 1), ]
Python
from module_info import * from module_simple_triggers import * from process_common import * from process_operations import * def save_simple_triggers(variable_list,variable_uses,triggers,tag_uses,quick_strings): file = open(export_dir + "simple_triggers.txt","w") file.write("simple_triggers_file version 1\n") file.write("%d\n"%len(simple_triggers)) for i in xrange(len(simple_triggers)): simple_trigger = simple_triggers[i] file.write("%f "%(simple_trigger[0])) save_statement_block(file,0, 1, simple_trigger[1] , variable_list,variable_uses,tag_uses,quick_strings) file.write("\n") file.close() print "exporting simple triggers..." variable_uses = [] variables = load_variables(export_dir,variable_uses) tag_uses = load_tag_uses(export_dir) quick_strings = load_quick_strings(export_dir) save_simple_triggers(variables,variable_uses,simple_triggers,tag_uses,quick_strings) save_variables(export_dir,variables,variable_uses) save_tag_uses(export_dir,tag_uses) save_quick_strings(export_dir,quick_strings) #print "finished."
Python
import string import types from process_common import * from header_common import * from header_operations import * from module_strings import * from module_skills import * from module_music import * from module_meshes import * from module_sounds import * from module_items import * from module_troops import * from module_factions import * from module_quests import * from module_party_templates import * from module_parties import * from module_scenes import * from module_scripts import * from module_mission_templates import * from module_game_menus import * from module_particle_systems import * from module_scene_props import * from module_scene_props import * from module_presentations import * from module_map_icons import * from module_tableau_materials import * from module_animations import * def get_id_value(tag, identifier, tag_uses): tag_type = -1 id_no = -1 if (tag == "str"): id_no = find_object(strings,identifier) tag_type = tag_string elif (tag == "itm"): id_no = find_object(items,identifier) tag_type = tag_item elif (tag == "trp"): id_no = find_object(troops,identifier) tag_type = tag_troop elif (tag == "fac"): id_no = find_object(factions,identifier) tag_type = tag_faction elif (tag == "qst"): id_no = find_object(quests,identifier) tag_type = tag_quest elif (tag == "pt"): id_no = find_object(party_templates,identifier) tag_type = tag_party_tpl elif (tag == "p"): id_no = find_object(parties,identifier) tag_type = tag_party elif (tag == "scn"): id_no = find_object(scenes,identifier) tag_type = tag_scene elif (tag == "mt"): id_no = find_object(mission_templates,identifier) tag_type = tag_mission_tpl elif (tag == "mnu"): id_no = find_object(game_menus,identifier) tag_type = tag_menu elif (tag == "script"): id_no = find_object(scripts,identifier) tag_type = tag_script elif (tag == "psys"): id_no = find_object(particle_systems,identifier) tag_type = tag_particle_sys elif (tag == "spr"): id_no = find_object(scene_props,identifier) tag_type = tag_scene_prop elif (tag == "prsnt"): id_no = find_object(presentations,identifier) tag_type = tag_presentation elif (tag == "snd"): id_no = find_object(sounds,identifier) tag_type = tag_sound elif (tag == "icon"): id_no = find_object(map_icons,identifier) tag_type = tag_map_icon elif (tag == "skl"): id_no = find_object(skills,identifier) tag_type = tag_skill elif (tag == "track"): id_no = find_object(tracks,identifier) tag_type = tag_track elif (tag == "mesh"): id_no = find_object(meshes,identifier) tag_type = tag_mesh elif (tag == "anim"): id_no = find_object(animations,identifier) tag_type = tag_animation elif (tag == "tableau"): id_no = find_object(tableaus,identifier) tag_type = tag_tableau if (tag_type > -1 and id_no > -1): add_tag_use(tag_uses,tag_type,id_no) return (tag_type, id_no) def get_identifier_value(str, tag_uses): underscore_pos = string.find(str, "_") result = -1 if (underscore_pos > 0): tag_str = str[0:underscore_pos] id_str = str[underscore_pos + 1:len(str)] (tag_type, id_no) = get_id_value(tag_str,id_str,tag_uses) if (tag_type > 0): if (id_no < 0): print "Error: Unable to find object:" + str else: result = id_no | (tag_type << op_num_value_bits) else: print "Error: Unrecognized tag:" +tag_str + "in object:" + str else: print "Error: Invalid object:" +str + ".Variables should start with $ sign and references should start with a tag" return result def load_quick_strings(export_dir): quick_strings = [] try: file = open(export_dir + "quick_strings.txt", "r") str_list = file.readlines() file.close() for s in str_list: s = string.strip(s) if s: ssplit = s.split(' ') if len(ssplit) == 2: quick_strings.append(ssplit) except: print "Creating new quick_strings.txt file..." return quick_strings def save_quick_strings(export_dir, quick_strings): file = open(export_dir + "quick_strings.txt", "w") file.write("%d\n"%len(quick_strings)) for i in xrange(len(quick_strings)): file.write("%s %s\n"%(quick_strings[i][0],replace_spaces(quick_strings[i][1]))) file.close() def load_variables(export_dir,variable_uses): variables = [] try: file = open(export_dir + "variables.txt","r") var_list = file.readlines() file.close() for v in var_list: vv = string.strip(v) if vv: variables.append(vv) except: print "variables.txt not found. Creating new variables.txt file" try: file = open(export_dir + "variable_uses.txt","r") var_list = file.readlines() file.close() for v in var_list: vv = string.strip(v) if vv: variable_uses.append(int(vv)) except: print "variable_uses.txt not found. Creating new variable_uses.txt file" return variables def save_variables(export_dir,variables_list,variable_uses,): file = open(export_dir + "variables.txt","w") for i in xrange(len(variables_list)): file.write("%s\n"%variables_list[i]) file.close() file = open(export_dir + "variable_uses.txt","w") for i in xrange(len(variables_list)): file.write("%d\n"%variable_uses[i]) file.close() def ensure_tag_use(tag_uses, tag_no, object_no): if len(tag_uses[tag_no]) <= object_no: num_to_add = object_no + 1 - len(tag_uses[tag_no]) for j in xrange(num_to_add): tag_uses[tag_no].append(0) def add_tag_use(tag_uses, tag_no, object_no): #TODO: Uncomment to make build_module_check_tags work # ensure_tag_use(tag_uses, tag_no, object_no) # tag_uses[tag_no][object_no] = tag_uses[tag_no][object_no] + 1 pass def load_tag_uses(export_dir): tag_uses = [] for i in xrange(tags_end): sub_tag_uses = [] tag_uses.append(sub_tag_uses) try: file = open(export_dir + "tag_uses.txt","r") var_list = file.readlines() file.close() for v in var_list: vv = string.strip(v).split(';') if vv: for v2 in vv: vvv = v2.split(' ') if len(vvv) >= 3: ensure_tag_use(tag_uses,int(vvv[0]),int(vvv[1])) tag_uses[int(vvv[0])][int(vvv[1])] = int(vvv[2]) except: print "Creating new tag_uses.txt file..." return tag_uses def save_tag_uses(export_dir,tag_uses): file = open(export_dir + "tag_uses.txt","w") for i in xrange(len(tag_uses)): for j in xrange(len(tag_uses[i])): file.write("%d %d %d;" % (i, j, tag_uses[i][j])) file.write("\n") file.close() def add_cookie(cookies_list,cookie_string): found = 0 result = -1 for i_t in xrange(len(cookies_list)): if cookie_string == cookies_list[i_t]: found = 1 result = i_t break if not found: cookies_list.append(cookie_string) result = len(cookies_list) - 1 return result def get_cookie(cookies_list,cookie_string): found = 0 result = -1 for i_t in xrange(len(cookies_list)): if cookie_string == cookies_list[i_t]: found = 1 result = i_t break if not found: print "ERROR: input token not found:" + cookie_string cookies_list.append(cookie_string) result = len(cookies_list) - 1 return result def check_varible_not_defined(variable_string,variables_list): for i_t in xrange(len(variables_list)): if variable_string == variables_list[i_t]: print "WARNING: Variable name used for both local and global contexts:" + variable_string break #def add_get_variable(variable_string,variables_list): # found = 0 # result = -1 # for i_t in xrange(len(variables_list)): # if variable_string == variables_list[i_t]: # found = 1 # result = i_t # break # if not found: # variables_list.append(variable_string) # result = len(variables_list) - 1 # return result def add_variable(variable_string,variables_list,variable_uses): found = 0 for i_t in xrange(len(variables_list)): if variable_string == variables_list[i_t]: found = 1 variable_uses[i_t] = variable_uses[i_t] - 1 break if not found: variables_list.append(variable_string) variable_uses.append(-1) # print " (assign, \"$"+variable_string+"\", %d),"%(len(variables_list)) def get_variable(variable_string,variables_list,variable_uses): found = 0 result = -1 var_string = variable_string[1:] for i_t in xrange(len(variables_list)): if var_string == variables_list[i_t]: found = 1 result = i_t variable_uses[result] = variable_uses[result] + 1 break if not found: if (variable_string[0] == '$'): variables_list.append(variable_string) variable_uses.append(0) result = len(variables_list) - 1 print "WARNING: Usage of unassigned global variable: " + variable_string else: print "ERROR: Usage of unassigned local variable: " + variable_string return result def is_lhs_operation(op_code): found = 0 if op_code in lhs_operations: return 1 return 0 def is_lhs_operation_for_global_vars(op_code): found = 0 if op_code in lhs_operations: return 1 if op_code in global_lhs_operations: return 1 return 0 def is_can_fail_operation(op_code): found = 0 if op_code in can_fail_operations: return 1 return 0 def search_quick_string_keys(key, quick_strings): index = -1 for i in xrange(len(quick_strings)): if quick_strings[i][0] == key: index = i return index def insert_quick_string_with_auto_id(sentence,quick_strings): index = 0 text = convert_to_identifier_with_no_lowercase(sentence) sentence = replace_spaces(sentence) done = 0 i = 20 lt = len(text) if (i > lt): i = lt auto_id = "qstr_" + text[0:i] done = 0 index = search_quick_string_keys(auto_id, quick_strings) if index >= 0 and (quick_strings[index][1] == sentence): done = 1 while (i <= lt) and not done: auto_id = "qstr_" + text[0:i] index = search_quick_string_keys(auto_id, quick_strings) if index >= 0: if quick_strings[index][1] == sentence: done = 1 else: i += 1 else: done = 1 index = len(quick_strings) quick_strings.append([auto_id, sentence]) if not done: number = 1 new_auto_id = auto_id + str(number) while quick_strings.has_key(new_auto_id): number += 1 new_auto_id = auto_id + str(number) auto_id = new_auto_id index = len(quick_strings) quick_strings.append([auto_id, sentence]) return index def process_param(param,global_vars_list,global_var_uses, local_vars_list, local_var_uses, tag_uses, quick_strings): result = 0 if (type(param) == types.StringType): if (param[0] == '$'): check_varible_not_defined(param[1:], local_vars_list) result = get_variable(param, global_vars_list,global_var_uses) result |= opmask_variable elif (param[0] == ':'): check_varible_not_defined(param[1:], global_vars_list) result = get_variable(param, local_vars_list,local_var_uses) result |= opmask_local_variable elif (param[0] == '@'): result = insert_quick_string_with_auto_id(param[1:], quick_strings) result |= opmask_quick_string else: result = get_identifier_value(param.lower(), tag_uses) if (result < 0): print "ERROR: Illegal Identifier:" + param else: result = param return result def save_statement(ofile,opcode,no_variables,statement,variable_list,variable_uses,local_vars_list,local_var_uses,tag_uses,quick_strings): if no_variables == 0: lenstatement = len(statement) - 1 if (is_lhs_operation(opcode) == 1): if (lenstatement > 0): param = statement[1] if (type(param) == types.StringType): if (param[0] == ':'): add_variable(param[1:], local_vars_list, local_var_uses) else: lenstatement = 0 ofile.write("%d %d "%(opcode, lenstatement)) for i in xrange(lenstatement): operand = process_param(statement[i + 1],variable_list,variable_uses,local_vars_list,local_var_uses,tag_uses,quick_strings) ofile.write("%d "%operand) def compile_global_vars_in_statement(statement,variable_list, variable_uses): opcode = 0 if ((type(statement) != types.ListType) and (type(statement) != types.TupleType)): opcode = statement else: opcode = statement[0] if (is_lhs_operation_for_global_vars(opcode) == 1): if (len(statement) > 1): param = statement[1] if (type(param) == types.StringType): if (statement[1][0] == '$'): add_variable(statement[1][1:], variable_list, variable_uses) def save_statement_block(ofile,statement_name,can_fail_statement,statement_block,variable_list, variable_uses,tag_uses,quick_strings): local_vars = [] local_var_uses = [] ofile.write(" %d "%(len(statement_block))) store_script_param_1_uses = 0 store_script_param_2_uses = 0 current_depth = 0 can_fail = 0 for i in xrange(len(statement_block)): statement = statement_block[i] if ((type(statement) != types.ListType) and (type(statement) != types.TupleType)): opcode = statement no_variables = 1 else: opcode = statement[0] no_variables = 0 if (opcode in [try_begin, try_for_range, try_for_range_backwards, try_for_parties, try_for_agents]): current_depth = current_depth + 1 elif (opcode == try_end): current_depth = current_depth - 1 elif (opcode == store_script_param_1 or (opcode == store_script_param and statement[2] == 1)): store_script_param_1_uses = store_script_param_1_uses + 1 elif (opcode == store_script_param_2 or (opcode == store_script_param and statement[2] == 2)): store_script_param_2_uses = store_script_param_2_uses + 1 elif (can_fail_statement == 0 and current_depth == 0 and (is_can_fail_operation(opcode) or ((opcode == call_script) and (statement[1].startswith("cf_", 7)))) and (not statement_name.startswith("cf_"))): print "WARNING: Script can fail at operation #" + str(i) + ". Use cf_ at the beginning of its name: " + statement_name save_statement(ofile,opcode,no_variables,statement,variable_list,variable_uses,local_vars, local_var_uses,tag_uses,quick_strings) if (store_script_param_1_uses > 1): print "WARNING: store_script_param_1 is used more than once:" + statement_name if (store_script_param_2_uses > 1): print "WARNING: store_script_param_2 is used more than once:" + statement_name i = 0 while (i < len(local_vars)): if (local_var_uses[i] == 0 and not(local_vars[i].startswith("unused"))): print "WARNING: Local variable never used: " + local_vars[i] i = i + 1 def compile_global_vars(statement_block,variable_list, variable_uses): for statement in statement_block: compile_global_vars_in_statement(statement, variable_list, variable_uses) def save_simple_triggers(ofile,triggers,variable_list, variable_uses,tag_uses,quick_strings): ofile.write("%d\n"%len(triggers)) for trigger in triggers: ofile.write("%f "%(trigger[0])) save_statement_block(ofile,0,1,trigger[1] , variable_list, variable_uses,tag_uses,quick_strings) ofile.write("\n") ofile.write("\n")
Python
skl_trade = 0 skl_leadership = 1 skl_prisoner_management = 2 skl_reserved_1 = 3 skl_reserved_2 = 4 skl_reserved_3 = 5 skl_reserved_4 = 6 skl_persuasion = 7 skl_engineer = 8 skl_first_aid = 9 skl_surgery = 10 skl_wound_treatment = 11 skl_inventory_management = 12 skl_spotting = 13 skl_pathfinding = 14 skl_tactics = 15 skl_tracking = 16 skl_trainer = 17 skl_reserved_5 = 18 skl_reserved_6 = 19 skl_reserved_7 = 20 skl_reserved_8 = 21 skl_looting = 22 skl_horse_archery = 23 skl_riding = 24 skl_athletics = 25 skl_shield = 26 skl_weapon_master = 27 skl_reserved_9 = 28 skl_reserved_10 = 29 skl_reserved_11 = 30 skl_reserved_12 = 31 skl_reserved_13 = 32 skl_power_draw = 33 skl_power_throw = 34 skl_power_strike = 35 skl_ironflesh = 36 skl_reserved_14 = 37 skl_reserved_15 = 38 skl_reserved_16 = 39 skl_reserved_17 = 40 skl_reserved_18 = 41
Python
from header_common import * from header_operations import * from header_triggers import * from header_scenes import * from module_constants import * #################################################################################################################### # Each scene record contains the following fields: # 1) Scene id {string}: used for referencing scenes in other files. The prefix scn_ is automatically added before each scene-id. # 2) Scene flags {int}. See header_scenes.py for a list of available flags # 3) Mesh name {string}: This is used for indoor scenes only. Use the keyword "none" for outdoor scenes. # 4) Body name {string}: This is used for indoor scenes only. Use the keyword "none" for outdoor scenes. # 5) Min-pos {(float,float)}: minimum (x,y) coordinate. Player can't move beyond this limit. # 6) Max-pos {(float,float)}: maximum (x,y) coordinate. Player can't move beyond this limit. # 7) Water-level {float}. # 8) Terrain code {string}: You can obtain the terrain code by copying it from the terrain generator screen # 9) List of other scenes accessible from this scene {list of strings}. # (deprecated. This will probably be removed in future versions of the module system) # (In the new system passages are used to travel between scenes and # the passage's variation-no is used to select the game menu item that the passage leads to.) # 10) List of chest-troops used in this scene {list of strings}. You can access chests by placing them in edit mode. # The chest's variation-no is used with this list for selecting which troop's inventory it will access. # town_1 Sargoth #plain # town_2 Tihr #steppe # town_3 Veluca #steppe # town_4 Suno #plain # town_5 Jelkala #plain # town_6 Praven #plain # town_7 Uxkhal #plain # town_8 Reyvadin #plain # town_9 Khudan #snow # town_10 Tulga #steppe # town_11 Curaw #snow # town_12 Wercheg #plain # town_13 Rivacheg #plain # town_14 Halmar #steppe #################################################################################################################### scenes = [ ("random_scene",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x300028000003e8fa0000034e00004b34000059be", [],[]), ("conversation_scene",0,"encounter_spot", "bo_encounter_spot", (-40,-40),(40,40),-100,"0", [],[]), ("random_scene_steppe",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x0000000229602800000691a400003efe00004b34000059be", [],[], "outer_terrain_steppe"), ("random_scene_plain",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x0000000229602800000691a400003efe00004b34000059be", [],[], "outer_terrain_plain"), ("random_scene_snow",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x0000000229602800000691a400003efe00004b34000059be", [],[], "outer_terrain_snow"), ("random_scene_desert",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x0000000229602800000691a400003efe00004b34000059be", [],[], "outer_terrain_steppe"), ("random_scene_steppe_forest",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x300028000003e8fa0000034e00004b34000059be", [],[], "outer_terrain_plain"), ("random_scene_plain_forest",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x300028000003e8fa0000034e00004b34000059be", [],[], "outer_terrain_plain"), ("random_scene_snow_forest",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x300028000003e8fa0000034e00004b34000059be", [],[], "outer_terrain_snow"), ("random_scene_desert_forest",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x300028000003e8fa0000034e00004b34000059be", [],[], "outer_terrain_plain"), ("camp_scene",sf_generate|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x300028000003e8fa0000034e00004b34000059be", [],[], "outer_terrain_plain"), ("camp_scene_horse_track",sf_generate|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x300028000003e8fa0000034e00004b34000059be", [],[], "outer_terrain_plain"), ("four_ways_inn",sf_generate,"none", "none", (0,0),(120,120),-100,"0x0230817a00028ca300007f4a0000479400161992", [],[], "outer_terrain_plain"), ("test_scene",sf_generate,"none", "none", (0,0),(120,120),-100,"0x0230817a00028ca300007f4a0000479400161992", [],[], "outer_terrain_plain"), ("quick_battle_1",sf_generate,"none", "none", (0,0),(120,120),-100,"0x30401ee300059966000001bf0000299a0000638f", [],[], "outer_terrain_plain"), ("quick_battle_2",sf_generate,"none", "none", (0,0),(120,120),-100,"0xa0425ccf0004a92a000063d600005a8a00003d9a", [],[], "outer_terrain_steppe"), ("quick_battle_3",sf_generate,"none", "none", (0,0),(120,120),-100,"0x4c6024e3000691a400001b7c0000591500007b52", [],[], "outer_terrain_snow"), ("quick_battle_4",sf_generate,"none", "none", (0,0),(120,120),-100,"0x00001d63c005114300006228000053bf00004eb9", [],[], "outer_terrain_plain"), ("quick_battle_5",sf_generate,"none", "none", (0,0),(120,120),-100,"0x3a078bb2000589630000667200002fb90000179c", [],[], "outer_terrain_plain"), ("quick_battle_6",sf_generate,"none", "none", (0,0),(120,120),-100,"0xa0425ccf0004a92a000063d600005a8a00003d9a", [],[], "outer_terrain_steppe"), ("quick_battle_7",sf_generate,"none", "none", (0,0),(100,100),-100,"0x314d060900036cd70000295300002ec9000025f3", [],[],"outer_terrain_plain"), ("salt_mine",sf_generate,"none", "none", (-200,-200),(200,200),-100,"0x2a07b23200025896000023ee00007f9c000022a8", [],[], "outer_terrain_steppe"), ("novice_ground",sf_indoors,"training_house_a", "bo_training_house_a", (-100,-100),(100,100),-100,"0", [],[]), ("zendar_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0xa0001d9300031ccb0000156f000048ba0000361c", [],[], "outer_terrain_plain"), ("dhorak_keep",sf_generate,"none", "none", (0,0),(120,120),-100,"0x33a7946000028ca300007f4a0000479400161992", ["exit"],[]), ("reserved4",sf_generate,"none", "none", (0,0),(120,120),-100,"28791", [],[]), ("reserved5",sf_generate,"none", "none", (0,0),(120,120),-100,"117828", [],[]), ("reserved6",sf_generate,"none", "none", (0,0),(100,100),-100,"6849", [],[]), ("reserved7",sf_generate,"none", "none", (0,0),(100,100),-100,"6849", [],[]), ("reserved8",sf_generate,"none", "none", (0,0),(100,100),-100,"13278", [],[]), ("reserved9",sf_indoors,"thirsty_lion", "bo_thirsty_lion", (-100,-100),(100,100),-100,"0", [],[]), ("reserved10",0,"none", "none", (-100,-100),(100,100),-100,"0", [],[]), ("reserved11",0,"none", "none", (-100,-100),(100,100),-100,"0", [],[]), ("reserved12",sf_indoors,"thirsty_lion", "bo_thirsty_lion", (-100,-100),(100,100),-100,"0", [],[]), ("training_ground",sf_generate,"none", "none", (0,0),(120,120),-100,"0x30000500400360d80000189f00002a8380006d91", [],["tutorial_chest_1", "tutorial_chest_2"], "outer_terrain_plain_1"), ("tutorial_1",sf_indoors,"tutorial_1_scene", "bo_tutorial_1_scene", (-100,-100),(100,100),-100,"0", [],[]), ("tutorial_2",sf_indoors,"tutorial_2_scene", "bo_tutorial_2_scene", (-100,-100),(100,100),-100,"0", [],[]), ("tutorial_3",sf_indoors,"tutorial_3_scene", "bo_tutorial_3_scene", (-100,-100),(100,100),-100,"0", [],[]), ("tutorial_4",sf_generate,"none", "none", (0,0),(120,120),-100,"0x30000500400360d80000189f00002a8380006d91", [],[], "outer_terrain_plain"), ("tutorial_5",sf_generate,"none", "none", (0,0),(120,120),-100,"0x3a06dca80005715c0000537400001377000011fe", [],[], "outer_terrain_plain"), ("training_ground_horse_track_1",sf_generate,"none", "none", (0,0),(120,120),-100,"0x00000000337553240004d53700000c0500002a0f80006267", [],[], "outer_terrain_plain"), ("training_ground_horse_track_2",sf_generate,"none", "none", (0,0),(120,120),-100,"0x00000000301553240004d5370000466000002a0f800073f1", [],[], "outer_terrain_plain"), #Kar ("training_ground_horse_track_3",sf_generate,"none", "none", (0,0),(120,120),-100,"0x00000000400c12b2000515470000216b0000485e00006928", [],[], "outer_terrain_snow"), #Steppe ("training_ground_horse_track_4",sf_generate,"none", "none", (0,0),(120,120),-100,"0x00000000200b60320004a5290000180d0000452f00000e90", [],[], "outer_terrain_steppe"), #Plain ("training_ground_horse_track_5",sf_generate,"none", "none", (0,0),(120,120),-100,"0x000000003008208e0006419000000f730000440f00003c86", [],[], "outer_terrain_plain"), ("training_ground_ranged_melee_1",sf_generate,"none", "none", (0,0),(120,120),-100,"0x00000001350455c20005194a000041cb00005ae800000ff5", [],[], "outer_terrain_plain"), ("training_ground_ranged_melee_2",sf_generate,"none", "none", (0,0),(120,120),-100,"0x0000000532c8dccb0005194a000041cb00005ae800001bdd", [],[], "outer_terrain_plain"), #Kar ("training_ground_ranged_melee_3",sf_generate,"none", "none", (0,0),(120,120),-100,"0x000000054327dcba0005194a00001b1d00005ae800004d63", [],[], "outer_terrain_snow"), #Steppe ("training_ground_ranged_melee_4",sf_generate,"none", "none", (0,0),(120,120),-100,"0x000000012247dcba0005194a000041ef00005ae8000050af", [],[], "outer_terrain_steppe"), #Plain ("training_ground_ranged_melee_5",sf_generate,"none", "none", (0,0),(120,120),-100,"0x00000001324a9cba0005194a000041ef00005ae800003c55", [],[], "outer_terrain_plain"), ("zendar_center",sf_generate,"none", "none", (0,0),(100,100),-100,"0x300bc5430001e0780000448a0000049f00007932", ["the_happy_boar","","zendar_merchant"],[], "outer_terrain_plain_1"), # ("zendar_center",0,"sargoth_square", "bo_sargoth_square", (-24,-22),(21,13),-100,"0", # ["the_happy_boar","","zendar_merchant"],[]), ("the_happy_boar",sf_indoors,"interior_town_house_f", "bo_interior_town_house_f", (-100,-100),(100,100),-100,"0", ["zendar_center"],["zendar_chest"]), ("zendar_merchant",sf_indoors,"interior_town_house_i", "bo_interior_town_house_i", (-100,-100),(100,100),-100,"0", [],[]), # Tvern names: #the shy monkey #the singing pumpkin #three swords #red stag #the bard's corner #interior_tavern_a # town_1 Sargoth #plain # town_2 Tihr #plain # town_3 Veluca #steppe # town_4 Suno #plain # town_5 Jelkala #plain # town_6 Praven #plain # town_7 Uxkhal #plain # town_8 Reyvadin #plain # town_9 Khudan #snow # town_10 Tulga #steppe # town_11 Curaw #snow # town_12 Wercheg #plain # town_13 Rivacheg #plain # town_14 Halmar #steppe ("town_1_center",sf_generate,"none", "none", (0,0),(100,100),-100,"0x20008a110002589600006af30000356b00002c27", [],[],"outer_terrain_plain"), ("town_2_center",sf_generate,"none", "none", (0,0),(100,100),-100,"0xa009c7070002589600002b6300001ef60000122e", [],["bonus_chest_3"],"outer_terrain_town_thir_1"), ("town_3_center",sf_generate,"none", "none",(0,0),(100,100),-100,"0x000000002005591e00040506000059a100002cd500005052", [],[],"outer_terrain_steppe"), ("town_4_center",sf_generate,"none", "none", (0,0),(100,100),-100,"0x30001d9300031ccb0000156f000048ba0000361c", [],[],"outer_terrain_plain"), ("town_5_center",sf_generate,"none", "none",(0,0),(100,100),-100,"0x00000000300798b2000380e3000037960000573900003f48", [],["bonus_chest_2"],"outer_terrain_plain"), ("town_6_center",sf_generate,"none", "none", (0,0),(100,100),-100,"0x3000148000025896000074e600006c260000125a", [],[],"outer_terrain_plain"), ("town_7_center",sf_generate,"none", "none", (0,0),(100,100),-100,"0x30050d0d0002d4b300000e2f000027d200005f66", [],[],"outer_terrain_plain"), ("town_8_center",sf_generate,"none", "none",(0,0),(100,100),-100,"0x3000148000025896000074e600006c260000125a", [],[],"outer_terrain_plain"), ("town_9_center",sf_generate,"none", "none", (0,0),(100,100),-100,"0x400790b20002c8b0000050d500006f8c00006dbd", [],[],"outer_terrain_snow"), ("town_10_center",sf_generate,"none", "none",(0,0),(100,100),-100,"0x00000000200016da000364d9000060f500007591000064e7", [],[],"outer_terrain_steppe"), ("town_11_center",sf_generate,"none", "none",(0,0),(100,100),-100,"0x400790b20002c8b0000050d500006f8c00006dbd", [],[],"outer_terrain_snow"), ("town_12_center",sf_generate,"none", "none", (0,0),(100,100),-100,"0x3002cd340002b4ac00002ccd800026dc00000c1d", [],[],"outer_terrain_town_thir"), ("town_13_center",sf_generate,"none", "none",(0,0),(100,100),-100,"0x300416a600035cd600007ee80000012100003fbc", [],["bonus_chest_1"]), ("town_14_center",sf_generate,"none", "none",(0,0),(100,100),-100,"0x00000000200016da000364d9000060f500007591000064e7", [],[],"outer_terrain_steppe"), ("town_15_center",sf_generate,"none", "none",(0,0),(100,100),-100,"0x2007956000025896000037e800000e860000674b", [],[],"outer_terrain_steppe"), ("town_16_center",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000130001887000334d0000073ed00004f1a00007a35", [],[],"outer_terrain_steppe"), ("town_17_center",sf_generate,"none", "none",(0,0),(100,100),-100,"0x0000000020045abc000308c4000029d9000033bd000009b9", [],[],"outer_terrain_steppe"), ("town_18_center",sf_generate,"none", "none",(0,0),(100,100),-100,"0x0000000020049cbd00025896000048e90000164400002b3f", [],[],"outer_terrain_steppe"), ("town_1_castle",sf_indoors,"interior_castle_y", "bo_interior_castle_y", (-100,-100),(100,100),-100,"0", [],["town_1_seneschal"]), ("town_2_castle",sf_indoors,"interior_castle_t", "bo_interior_castle_t", (-100,-100),(100,100),-100,"0", ["exit"],["town_2_seneschal"]), ("town_3_castle",sf_indoors,"interior_castle_a", "bo_interior_castle_a", (-100,-100),(100,100),-100,"0", ["exit"],["town_3_seneschal"]), ("town_4_castle",sf_indoors, "interior_castle_q", "bo_interior_castle_q", (-100,-100),(100,100),-100,"0", ["exit"],["town_4_seneschal"]), ("town_5_castle",sf_indoors, "interior_castle_c", "bo_interior_castle_c", (-100,-100),(100,100),-100,"0", ["exit"],["town_5_seneschal"]), ("town_6_castle",sf_indoors, "interior_castle_z", "bo_interior_castle_z", (-100,-100),(100,100),-100,"0", ["exit"],["town_6_seneschal"]), ("town_7_castle",sf_indoors, "interior_castle_v", "bo_interior_castle_v", (-100,-100),(100,100),-100,"0", ["exit"],["town_7_seneschal"]), ("town_8_castle",sf_indoors, "interior_castle_w", "bo_interior_castle_w", (-100,-100),(100,100),-100,"0", ["exit"],["town_8_seneschal"]), ("town_9_castle",sf_indoors, "interior_castle_g", "bo_interior_castle_g", (-100,-100),(100,100),-100,"0", ["exit"],["town_9_seneschal"]), ("town_10_castle",sf_generate, "none", "none", (-100,-100),(100,100),-100,"0x00000007300005000002308c00004a840000624700004fda", ["exit"],["town_10_seneschal"]), ("town_11_castle",sf_indoors, "interior_castle_i", "bo_interior_castle_i", (-100,-100),(100,100),-100,"0", ["exit"],["town_11_seneschal"]), ("town_12_castle",sf_indoors, "interior_castle_x", "bo_interior_castle_x", (-100,-100),(100,100),-100,"0", ["exit"],["town_12_seneschal"]), ("town_13_castle",sf_indoors, "interior_castle_b", "bo_interior_castle_b", (-100,-100),(100,100),-100,"0", ["exit"],["town_13_seneschal"]), ("town_14_castle",sf_indoors, "interior_castle_g_square_keep", "bo_interior_castle_g_square_keep", (-100,-100),(100,100),-100,"0", ["exit"],["town_14_seneschal"]), ("town_15_castle",sf_indoors, "interior_castle_e", "bo_interior_castle_e", (-100,-100),(100,100),-100,"0", ["exit"],["town_15_seneschal"]), ("town_16_castle",sf_indoors, "interior_castle_n", "bo_interior_castle_n", (-100,-100),(100,100),-100,"0", ["exit"],["town_16_seneschal"]), ("town_17_castle",sf_indoors, "interior_castle_g_square_keep", "bo_interior_castle_g_square_keep", (-100,-100),(100,100),-100,"0", ["exit"],["town_17_seneschal"]), ("town_18_castle",sf_generate, "none", "none", (-100,-100),(100,100),-100,"0x00000007300005000002308c00004a840000624700004fda", ["exit"],["town_18_seneschal"]), ("town_1_tavern",sf_indoors,"interior_town_house_f", "bo_interior_town_house_f", (-100,-100),(100,100),-100,"0", [],[]), ("town_2_tavern",sf_indoors,"interior_tavern_e", "bo_interior_tavern_e", (-100,-100),(100,100),-100,"0", ["exit"],[],"outer_terrain_town_thir_1"), ("town_3_tavern",sf_indoors,"interior_town_house_d", "bo_interior_town_house_d", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_4_tavern",sf_indoors, "interior_tavern_f", "bo_interior_tavern_f", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_5_tavern",sf_indoors, "interior_tavern_h", "bo_interior_tavern_h", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_6_tavern",sf_indoors, "interior_tavern_g", "bo_interior_tavern_g", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_7_tavern",sf_indoors, "interior_town_house_f", "bo_interior_town_house_f", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_8_tavern",sf_indoors, "interior_tavern_h", "bo_interior_tavern_h", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_9_tavern",sf_indoors, "interior_tavern_g", "bo_interior_tavern_g", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_10_tavern",sf_indoors, "interior_town_house_steppe_c", "bo_interior_town_house_steppe_c", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_11_tavern",sf_indoors, "interior_tavern_c", "bo_interior_tavern_c", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_12_tavern",sf_indoors, "interior_town_house_aa", "bo_interior_town_house_aa", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_13_tavern",sf_indoors, "interior_tavern_g", "bo_interior_tavern_g", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_14_tavern",sf_indoors, "interior_town_house_steppe_g", "bo_interior_town_house_steppe_g", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_15_tavern",sf_indoors, "interior_tavern_d", "bo_interior_tavern_d", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_16_tavern",sf_indoors, "interior_tavern_b", "bo_interior_tavern_b", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_17_tavern",sf_indoors, "interior_town_house_steppe_g", "bo_interior_town_house_steppe_g", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_18_tavern",sf_indoors, "interior_town_house_steppe_c", "bo_interior_town_house_steppe_c", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_1_store",sf_indoors,"interior_town_house_i", "bo_interior_town_house_i", (-100,-100),(100,100),-100,"0", [],[]), ("town_2_store",sf_indoors,"interior_town_house_j", "bo_interior_town_house_j", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_3_store",sf_indoors,"interior_town_house_e", "bo_interior_town_house_e", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_4_store",sf_indoors, "interior_town_house_a", "bo_interior_town_house_a", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_5_store",sf_indoors, "interior_town_house_d", "bo_interior_town_house_d", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_6_store",sf_indoors, "interior_town_house_j", "bo_interior_town_house_j", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_7_store",sf_indoors, "interior_house_a", "bo_interior_house_a", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_8_store",sf_indoors, "interior_house_b", "bo_interior_house_b", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_9_store",sf_indoors, "interior_tavern_a", "bo_interior_tavern_a", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_10_store",sf_indoors, "interior_town_house_steppe_d", "bo_interior_town_house_steppe_d", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_11_store",sf_indoors, "interior_town_house_j", "bo_interior_town_house_j", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_12_store",sf_indoors, "interior_house_a", "bo_interior_house_a", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_13_store",sf_indoors, "interior_town_house_j", "bo_interior_town_house_j", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_14_store",sf_indoors, "interior_house_extension_h", "bo_interior_house_extension_h", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_15_store",sf_indoors, "interior_town_house_c", "bo_interior_town_house_c", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_16_store",sf_indoors, "interior_town_house_i", "bo_interior_town_house_i", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_17_store",sf_indoors, "interior_town_house_steppe_g", "bo_interior_town_house_steppe_g", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_18_store",sf_indoors, "interior_town_house_steppe_d", "bo_interior_town_house_steppe_d", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_1_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0xa0001d9300031ccb0000156f000048ba0000361c", [],[],"outer_terrain_plain"), ("town_2_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0xa0001d9300031ccb0000156f000048ba0000361c", [],[],"outer_terrain_town_thir_1"), ("town_3_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0xa0001d9300031ccb0000156f000048ba0000361c", [],[]), ("town_4_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0xa0001d9300031ccb0000156f000048ba0000361c", [],[],"outer_terrain_plain"), ("town_5_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0xa0001d9300031ccb0000156f000048ba0000361c", [],[],"outer_terrain_plain"), ("town_6_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0xa0001d9300031ccb0000156f000048ba0000361c", [],[],"outer_terrain_plain"), ("town_7_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0xa0001d9300031ccb0000156f000048ba0000361c", [],[],"outer_terrain_plain"), ("town_8_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0xa0001d9300031ccb0000156f000048ba0000361c", [],[],"outer_terrain_plain"), ("town_9_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0x40001d9300031ccb0000156f000048ba0000361c", [],[],"outer_terrain_snow"), ("town_10_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002200005000005f57b00005885000046bd00006d9c", [],[],"outer_terrain_steppe"), ("town_11_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0x40001d9300031ccb0000156f000048ba0000361c", [],[],"outer_terrain_snow"), ("town_12_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0xa0001d9300031ccb0000156f000048ba0000361c", [],[],"outer_terrain_town_thir_1"), ("town_13_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0xa0001d9300031ccb0000156f000048ba0000361c", [],[]), ("town_14_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002200005000005f57b00005885000046bd00006d9c", [],[],"outer_terrain_steppe"), ("town_15_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0xa0001d9300031ccb0000156f000048ba0000361c", [],[],"outer_terrain_plain"), ("town_16_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0xa0001d9300031ccb0000156f000048ba0000361c", [],[],"outer_terrain_plain"), ("town_17_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002200005000005f57b00005885000046bd00006d9c", [],[],"outer_terrain_steppe"), ("town_18_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002200005000005f57b00005885000046bd00006d9c", [],[],"outer_terrain_steppe"), ("town_1_prison",sf_indoors,"interior_prison_a", "bo_interior_prison_a", (-100,-100),(100,100),-100,"0", [],[]), ("town_2_prison",sf_indoors,"interior_prison_b", "bo_interior_prison_b", (-100,-100),(100,100),-100,"0", [],[]), ("town_3_prison",sf_indoors,"interior_prison_f", "bo_interior_prison_f", (-100,-100),(100,100),-100,"0", [],[]), ("town_4_prison",sf_indoors,"interior_prison_g", "bo_interior_prison_g", (-100,-100),(100,100),-100,"0", [],[]), ("town_5_prison",sf_indoors,"interior_prison_h", "bo_interior_prison_h", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_6_prison",sf_indoors,"interior_prison_e", "bo_interior_prison_e", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_7_prison",sf_indoors,"interior_prison_i", "bo_interior_prison_i", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_8_prison",sf_indoors,"dungeon_cell_b", "bo_dungeon_cell_b", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_9_prison",sf_indoors,"interior_prison_j", "bo_interior_prison_j", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_10_prison",sf_indoors,"interior_prison_o", "bo_interior_prison_o", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_11_prison",sf_indoors,"dungeon_a", "bo_dungeon_a", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_12_prison",sf_indoors,"interior_prison_d", "bo_interior_prison_d", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_13_prison",sf_indoors,"interior_prison_a", "bo_interior_prison_a", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_14_prison",sf_indoors,"interior_prison_n", "bo_interior_prison_n", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_15_prison",sf_indoors,"interior_prison_f", "bo_interior_prison_f", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_16_prison",sf_indoors,"interior_prison_k", "bo_interior_prison_k", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_17_prison",sf_indoors,"interior_prison_n", "bo_interior_prison_n", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_18_prison",sf_indoors,"interior_prison_o", "bo_interior_prison_o", (-100,-100),(100,100),-100,"0", ["exit"],[]), ("town_1_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013002491600055157000000d20000152a0000611a", [],[],"outer_terrain_plain"), ("town_2_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013002491600055157000000d20000152a0000611a", [],[],"outer_terrain_plain"), ("town_3_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000120044ecf0005955e0000119b0000290000001f11", [],[],"outer_terrain_steppe"), ("town_4_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000001300010c800054d5c00004af000005d3f00002ca0", [],[],"outer_terrain_plain"), ("town_5_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000130028e320005e17b00004a14000006d70000019d", [],[],"outer_terrain_plain"), ("town_6_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000001300010c800054d5c00004af000005d3f00002ca0", [],[],"outer_terrain_plain"), ("town_7_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013002491600055157000000d20000152a0000611a", [],[],"outer_terrain_plain"), ("town_8_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013002491600055157000000d20000152a0000611a", [],[],"outer_terrain_plain"), ("town_9_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000140015033000651900000159f0000619800006af6", [],[],"outer_terrain_snow"), ("town_10_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002200011af00065192000067110000688300003435", [],[],"outer_terrain_steppe"), ("town_11_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000140015033000651900000159f0000619800006af6", [],[],"outer_terrain_snow"), ("town_12_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000001300010c800054d5c00004af000005d3f00002ca0", [],[],"outer_terrain_plain"), ("town_13_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000130028e320005e17b00004a14000006d70000019d", [],[],"outer_terrain_plain"), ("town_14_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002200011af00065192000067110000688300003435", [],[],"outer_terrain_steppe"), ("town_15_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000530040ece0005b56d000072a70000240a00001534", [],[],"outer_terrain_steppe"), ("town_16_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013001c98d0005b56d000072a70000240a00001e09", [],[],"outer_terrain_steppe"), ("town_17_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002200011af00065192000067110000688300003435", [],[],"outer_terrain_steppe"), ("town_18_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002200011af00065192000067110000688300003435", [],[],"outer_terrain_steppe"), ("town_1_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x300bc5430001e0780000448a0000049f00007932", [],[],"outer_terrain_plain"), ("town_2_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x300bc5430001e0780000448a0000049f00007932", [],[],"outer_terrain_town_thir"), ("town_3_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x300bc5430001e0780000448a0000049f00007932", [],[]), ("town_4_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x300bc5430001e0780000448a0000049f00007932", [],[],"outer_terrain_plain"), ("town_5_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x300bc5430001e0780000448a0000049f00007932", [],[],"outer_terrain_plain"), ("town_6_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x300bc5430001e0780000448a0000049f00007932", [],[],"outer_terrain_plain"), ("town_7_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x20008a110002589600006af30000356b00002c27", [],[],"outer_terrain_plain"), ("town_8_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x300bc5430001e0780000448a0000049f00007932", [],[],"outer_terrain_plain"), ("town_9_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x400211130001e07800002ad400001172000035c4", [],[],"outer_terrain_snow"), ("town_10_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000420000500000334ce00001d1100003d0600000d27", [],[],"outer_terrain_steppe"), ("town_11_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x400211130001e07800002ad400001172000035c4", [],[],"outer_terrain_snow"), ("town_12_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x300bc5430001e0780000448a0000049f00007932", [],[],"outer_terrain_town_thir"), ("town_13_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x300bc5430001e0780000448a0000049f00007932", [],[]), ("town_14_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000420000500000334ce00001d1100003d0600000d27", [],[],"outer_terrain_steppe"), ("town_15_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x300bc5430001e0780000448a0000049f00007932", [],[],"outer_terrain_steppe"), ("town_16_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x300bc5430001e0780000448a0000049f00007932", [],[],"outer_terrain_steppe"), ("town_17_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000420000500000334ce00001d1100003d0600000d27", [],[],"outer_terrain_steppe"), ("town_18_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000420000500000334ce00001d1100003d0600000d27", [],[],"outer_terrain_steppe"), #0x30054d228004050000005a768000688400002e3b #0x30054da28004050000005a76800022aa00002e3b #Castles: # 1 Steppe ("castle_1_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x30054da28004050000005a76800022aa00002e3b", [],[],"outer_terrain_steppe"), ("castle_1_interior",sf_indoors, "dungeon_entry_a", "bo_dungeon_entry_a", (-100,-100),(100,100),-100,"0", ["exit"],["castle_1_seneschal"]), ("castle_1_prison",sf_indoors,"interior_prison_a", "bo_interior_prison_a", (-100,-100),(100,100),-100,"0", [],[]), # 2 Plain ("castle_2_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0xa00363638005c16d00003c82000037e000002303", [],[],"outer_terrain_plain"), ("castle_2_interior",sf_indoors, "interior_castle_u", "bo_interior_castle_u", (-100,-100),(100,100),-100,"0", ["exit"],["castle_2_seneschal"]), ("castle_2_prison",sf_indoors,"interior_prison_d", "bo_interior_prison_d", (-100,-100),(100,100),-100,"0",#### B bkullanilmayacak [],[]), # 3 Plain ("castle_3_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000030044e900003dd02000077b20000400100005697", [],[],"outer_terrain_plain"), ("castle_3_interior",sf_indoors, "interior_castle_m", "bo_interior_castle_m", (-100,-100),(100,100),-100,"0", ["exit"],["castle_3_seneschal"]), ("castle_3_prison",sf_indoors,"interior_prison_e", "bo_interior_prison_e", (-100,-100),(100,100),-100,"0", [],[]), # 4 Plain ("castle_4_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000030044e900003dd02000077b20000400100005697", [],[],"outer_terrain_plain"), ("castle_4_interior",sf_indoors, "interior_castle_k", "bo_interior_castle_k", (-100,-100),(100,100),-100,"0", ["exit"],["castle_4_seneschal"]), ("castle_4_prison",sf_indoors,"interior_prison_l", "bo_interior_prison_l", (-100,-100),(100,100),-100,"0", [],[]), # 5 Plain ("castle_5_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x3189dc1a000429090000619700007cbd00005ab7", [],[],"outer_terrain_plain"), ("castle_5_interior",sf_indoors, "interior_castle_j", "bo_interior_castle_j", (-100,-100),(100,100),-100,"0", ["exit"],["castle_5_seneschal"]), ("castle_5_prison",sf_indoors,"interior_prison_l", "bo_interior_prison_l", (-100,-100),(100,100),-100,"0", [],[]), # 6 Plain ("castle_6_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000000b009723200059d6800005f4f0000757f000069cd", [],[],"outer_terrain_plain"), ("castle_6_interior",sf_indoors, "interior_castle_p", "bo_interior_castle_p", (-100,-100),(100,100),-100,"0", ["exit"],["castle_6_seneschal"]), ("castle_6_prison",sf_indoors,"interior_prison_j", "bo_interior_prison_j", (-100,-100),(100,100),-100,"0", [],[]), # 7 Snow ("castle_7_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000000c007a56300047d1e00006c9100002859000028bc", [],[],"outer_terrain_snow"), ("castle_7_interior",sf_indoors, "interior_castle_o", "bo_interior_castle_o", (-100,-100),(100,100),-100,"0", ["exit"],["castle_7_seneschal"]), ("castle_7_prison",sf_indoors,"interior_prison_i", "bo_interior_prison_i", (-100,-100),(100,100),-100,"0", [],[]), # 8 Plain ("castle_8_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x314d060900036cd70000295300002ec9000025f3", [],[],"outer_terrain_plain"), ("castle_8_interior",sf_indoors, "interior_castle_t", "bo_interior_castle_t", (-100,-100),(100,100),-100,"0", ["exit"],["castle_8_seneschal"]), ("castle_8_prison",sf_indoors,"interior_prison_e", "bo_interior_prison_e", (-100,-100),(100,100),-100,"0", [],[]), # 9 Steppe ("castle_9_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0xa0048e000004d93700004f91000065980000229b", [],[],"outer_terrain_castle_9"), ("castle_9_interior",sf_indoors, "interior_castle_l", "bo_interior_castle_l", (-100,-100),(100,100),-100,"0", ["exit"],["castle_9_seneschal"]), ("castle_9_prison",sf_indoors,"interior_prison_d", "bo_interior_prison_d", (-100,-100),(100,100),-100,"0", [],[]), # 10 Steppe ("castle_10_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0xa0045f200004751b000051cf00007f7a00002cd9", [],[],"outer_terrain_steppe"), ("castle_10_interior",sf_indoors, "interior_castle_n", "bo_interior_castle_n", (-100,-100),(100,100),-100,"0", ["exit"],["castle_10_seneschal"]), ("castle_10_prison",sf_indoors,"interior_prison_k", "bo_interior_prison_k", (-100,-100),(100,100),-100,"0", [],[]), # 11 Plain ("castle_11_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000030044e900003dd02000077b20000400100005697", [],[],"outer_terrain_plain"), ("castle_11_interior",sf_indoors, "interior_castle_a", "bo_interior_castle_a", (-100,-100),(100,100),-100,"0", ["exit"],["castle_11_seneschal"]), ("castle_11_prison",sf_indoors,"interior_prison_k", "bo_interior_prison_k", (-100,-100),(100,100),-100,"0", [],[]), # Plain ("castle_12_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000230054f630005fd820000222a00003de000005f00", [],[],"outer_terrain_town_thir_1"), ("castle_12_interior",sf_indoors, "interior_castle_y", "bo_interior_castle_y", (-100,-100),(100,100),-100,"0", ["exit"],["castle_12_seneschal"]), ("castle_12_prison",sf_indoors,"interior_prison_i", "bo_interior_prison_i", (-100,-100),(100,100),-100,"0", [],[]), # Plain ("castle_13_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000230054f630005fd820000222a00003de000005f00", [],[],"outer_terrain_plain"), ("castle_13_interior",sf_indoors, "interior_castle_v", "bo_interior_castle_v", (-100,-100),(100,100),-100,"0", ["exit"],["castle_13_seneschal"]), ("castle_13_prison",sf_indoors,"interior_prison_j", "bo_interior_prison_j", (-100,-100),(100,100),-100,"0", [],[]), # Plain ("castle_14_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000023007a3b20005795e0000706d0000381800000bbc", [],[],"outer_terrain_plain"), ("castle_14_interior",sf_indoors, "interior_castle_j", "bo_interior_castle_j" , (-100,-100),(100,100),-100,"0", ["exit"],["castle_14_seneschal"]), ("castle_14_prison",sf_indoors,"interior_prison_m", "bo_interior_prison_m", (-100,-100),(100,100),-100,"0", [],[]), # Plain ("castle_15_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000023007941f0005415000007e650000225f00003b3e", [],[],"outer_terrain_plain"), ("castle_15_interior",sf_indoors, "interior_castle_p", "bo_interior_castle_p", (-100,-100),(100,100),-100,"0", ["exit"],["castle_15_seneschal"]), ("castle_15_prison",sf_indoors,"interior_prison_a", "bo_interior_prison_a", (-100,-100),(100,100),-100,"0", [],[]), # Plain ("castle_16_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000023007a3b20005795e0000706d0000381800000bbc", [],[],"outer_terrain_plain"), ("castle_16_interior",sf_indoors, "interior_castle_k", "bo_interior_castle_k", (-100,-100),(100,100),-100,"0", ["exit"],["castle_16_seneschal"]), ("castle_16_prison",sf_indoors,"interior_prison_l", "bo_interior_prison_l", (-100,-100),(100,100),-100,"0", [],[]), # Steppe ("castle_17_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000220045d9b0005d9760000034a00002a3e00006fbd", [],[],"outer_terrain_steppe"), ("castle_17_interior",sf_indoors, "interior_castle_l", "bo_interior_castle_l", (-100,-100),(100,100),-100,"0", ["exit"],["castle_17_seneschal"]), ("castle_17_prison",sf_indoors,"interior_prison_a", "bo_interior_prison_a", (-100,-100),(100,100),-100,"0", [],[]), # Snow ("castle_18_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000240079f9e0005695a0000035f00003ef400004aa8", [],[],"outer_terrain_snow"), ("castle_18_interior",sf_indoors, "interior_castle_n", "bo_interior_castle_n", (-100,-100),(100,100),-100,"0", ["exit"],["castle_18_seneschal"]), ("castle_18_prison",sf_indoors,"interior_prison_k", "bo_interior_prison_k", (-100,-100),(100,100),-100,"0", [],[]), # Snow ("castle_19_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000014004d81100057963000062ce0000255800004c09", [],[],"outer_terrain_snow"), ("castle_19_interior",sf_indoors, "interior_castle_c", "bo_interior_castle_c", (-100,-100),(100,100),-100,"0", ["exit"],["castle_19_seneschal"]), ("castle_19_prison",sf_indoors,"interior_prison_e", "bo_interior_prison_e", (-100,-100),(100,100),-100,"0", [],[]), # Plain ("castle_20_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013006199a0004e5370000494f000028fc00006cf6", [],[],"outer_terrain_plain"), ("castle_20_interior",sf_indoors, "interior_castle_a", "bo_interior_castle_a", (-100,-100),(100,100),-100,"0", ["exit"],["castle_20_seneschal"]), ("castle_20_prison",sf_indoors,"interior_prison_d", "bo_interior_prison_d", (-100,-100),(100,100),-100,"0", [],[]), ("castle_21_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000030011ab20005d57800003a2600004b7a000071ef", [],[],"outer_terrain_plain"), ("castle_21_interior",sf_indoors, "interior_castle_c", "bo_interior_castle_c", (-100,-100),(100,100),-100,"0", ["exit"],["castle_21_seneschal"]), ("castle_21_prison",sf_indoors,"interior_prison_d", "bo_interior_prison_d", (-100,-100),(100,100),-100,"0", [],[]), ("castle_22_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000003000ad340004d537000024650000253c00000461", [],[],"outer_terrain_plain"), ("castle_22_interior",sf_indoors, "interior_castle_a", "bo_interior_castle_a", (-100,-100),(100,100),-100,"0", ["exit"],["castle_22_seneschal"]), ("castle_22_prison",sf_indoors,"interior_prison_i", "bo_interior_prison_i", (-100,-100),(100,100),-100,"0", [],[]), ("castle_23_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002300658bc0007bded000025520000093800006114", [],[], "outer_terrain_plain"), ("castle_23_interior",sf_indoors, "interior_castle_y", "bo_interior_castle_y", (-100,-100),(100,100),-100,"0", ["exit"],["castle_23_seneschal"]), ("castle_23_prison",sf_indoors,"interior_prison_b", "bo_interior_prison_b", (-100,-100),(100,100),-100,"0", [],[]), ("castle_24_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000130021f63000721ca000055be000079d90000156d", [],[],"outer_terrain_plain"), ("castle_24_interior",sf_indoors, "castle_h_interior_b", "bo_castle_h_interior_b", (-100,-100),(100,100),-100,"0", ["exit"],["castle_24_seneschal"]), ("castle_24_prison",sf_indoors,"interior_prison_f", "bo_interior_prison_f", (-100,-100),(100,100),-100,"0", [],[]), ("castle_25_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013004e0a600061989000053d50000749800005f64", [],[],"outer_terrain_plain"), ("castle_25_interior",sf_indoors, "castle_h_interior_b", "bo_castle_h_interior_b", (-100,-100),(100,100),-100,"0", ["exit"],["castle_25_seneschal"]), ("castle_25_prison",sf_indoors,"interior_prison_a", "bo_interior_prison_a", (-100,-100),(100,100),-100,"0", [],[]), ("castle_26_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013005213200077dda0000733300002edf000052ba", [],[],"outer_terrain_plain"), ("castle_26_interior",sf_indoors, "castle_h_interior_a", "bo_castle_h_interior_a", (-100,-100),(100,100),-100,"0", ["exit"],["castle_26_seneschal"]), ("castle_26_prison",sf_indoors,"interior_prison_h", "bo_interior_prison_h", (-100,-100),(100,100),-100,"0", [],[]), ("castle_27_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013007b23200070dbc000041de00000c4900003cfc", [],[],"outer_terrain_plain"), ("castle_27_interior",sf_indoors, "castle_h_interior_a", "bo_castle_h_interior_a", (-100,-100),(100,100),-100,"0", ["exit"],["castle_27_seneschal"]), ("castle_27_prison",sf_indoors,"interior_prison_i", "bo_interior_prison_i", (-100,-100),(100,100),-100,"0", [],[]), ("castle_28_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013007b232000715c50000084c00001b5b000018ec", [],[],"outer_terrain_plain"), ("castle_28_interior",sf_indoors, "castle_h_interior_a", "bo_castle_h_interior_a", (-100,-100),(100,100),-100,"0", ["exit"],["castle_28_seneschal"]), ("castle_28_prison",sf_indoors,"interior_prison_j", "bo_interior_prison_j", (-100,-100),(100,100),-100,"0", [],[]), ("castle_29_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000006400796b20005053e000042ed0000199b000037cd", [],[],"outer_terrain_snow"), ("castle_29_interior",sf_indoors, "interior_castle_n", "bo_interior_castle_n", (-100,-100),(100,100),-100,"0", ["exit"],["castle_29_seneschal"]), ("castle_29_prison",sf_indoors,"interior_prison_a", "bo_interior_prison_a", (-100,-100),(100,100),-100,"0", [],[]), ("castle_30_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000620035e32000611840000147f00003dac00000660", [],[],"outer_terrain_plain"), ("castle_30_interior",sf_indoors, "interior_castle_g_square_keep", "bo_interior_castle_g_square_keep", (-100,-100),(100,100),-100,"0", ["exit"],["castle_30_seneschal"]), ("castle_30_prison",sf_indoors,"interior_prison_n", "bo_interior_prison_n", (-100,-100),(100,100),-100,"0", [],[]), ("castle_31_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000230025b8d0006459400006a3700002adb00007091", [],[],"outer_terrain_plain"), ("castle_31_interior",sf_indoors, "interior_castle_y", "bo_interior_castle_y", (-100,-100),(100,100),-100,"0", ["exit"],["castle_31_seneschal"]), ("castle_31_prison",sf_indoors,"interior_prison_i", "bo_interior_prison_i", (-100,-100),(100,100),-100,"0", [],[]), ("castle_32_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000230041fb20005fd7d00002692000029b700007d12", [],[],"outer_terrain_plain"), ("castle_32_interior",sf_indoors, "castle_h_interior_a", "bo_castle_h_interior_a", (-100,-100),(100,100),-100,"0", ["exit"],["castle_32_seneschal"]), ("castle_32_prison",sf_indoors,"interior_prison_j", "bo_interior_prison_j", (-100,-100),(100,100),-100,"0", [],[]), ("castle_33_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000230029cb2000709c200003c9500004b9b00002f4d", [],[],"outer_terrain_plain"), ("castle_33_interior",sf_indoors, "interior_castle_v", "bo_interior_castle_v", (-100,-100),(100,100),-100,"0", ["exit"],["castle_33_seneschal"]), ("castle_33_prison",sf_indoors,"interior_prison_d", "bo_interior_prison_d", (-100,-100),(100,100),-100,"0", [],[]), ("castle_34_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002b007b232000715c50000084c00001b5b00006580", [],[],"outer_terrain_plain"), ("castle_34_interior",sf_indoors, "interior_castle_c", "bo_interior_castle_c", (-100,-100),(100,100),-100,"0", ["exit"],["castle_34_seneschal"]), ("castle_34_prison",sf_indoors,"interior_prison_f", "bo_interior_prison_f", (-100,-100),(100,100),-100,"0", [],[]), ("castle_35_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000130031be30006f9bc00000aae00000fb80000243f", [],[],"outer_terrain_plain"), ("castle_35_interior",sf_indoors, "castle_h_interior_a", "bo_castle_h_interior_a", (-100,-100),(100,100),-100,"0", ["exit"],["castle_35_seneschal"]), ("castle_35_prison",sf_indoors,"interior_prison_f", "bo_interior_prison_f", (-100,-100),(100,100),-100,"0", [],[]), ("castle_36_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013007b2630005695c00001ebe0000028e00007e37", [],[],"outer_terrain_plain"), ("castle_36_interior",sf_indoors, "castle_h_interior_b", "bo_castle_h_interior_b", (-100,-100),(100,100),-100,"0", ["exit"],["castle_36_seneschal"]), ("castle_36_prison",sf_indoors,"interior_prison_h", "bo_interior_prison_h", (-100,-100),(100,100),-100,"0", [],[]), ("castle_37_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000130025cb20006097f00005b1400000e2f00005fd9", [],[],"outer_terrain_plain"), ("castle_37_interior",sf_indoors, "interior_castle_k", "bo_interior_castle_k", (-100,-100),(100,100),-100,"0", ["exit"],["castle_37_seneschal"]), ("castle_37_prison",sf_indoors,"interior_prison_l", "bo_interior_prison_l", (-100,-100),(100,100),-100,"0", [],[]), ("castle_38_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000012007985300055550000064d500005c060000759e", [],[],"outer_terrain_steppe"), ("castle_38_interior",sf_generate, "none", "none", (-100,-100),(100,100),-100,"0x00000007300005000002308c00004a840000624700004fda", ["exit"],["castle_38_seneschal"]), ("castle_38_prison",sf_indoors,"interior_prison_o", "bo_interior_prison_o", (-100,-100),(100,100),-100,"0", [],[]), ("castle_39_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000014007a0320005695f0000601c00007a8800001a17", [],[],"outer_terrain_snow"), ("castle_39_interior",sf_indoors, "interior_castle_n", "bo_interior_castle_n", (-100,-100),(100,100),-100,"0", ["exit"],["castle_39_seneschal"]), ("castle_39_prison",sf_indoors,"interior_prison_k", "bo_interior_prison_k", (-100,-100),(100,100),-100,"0", [],[]), ("castle_40_exterior",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000012007985300055550000064d500005c060000759e", [],[],"outer_terrain_plain"), ("castle_40_interior",sf_indoors, "interior_castle_g_square_keep", "bo_interior_castle_g_square_keep", (-100,-100),(100,100),-100,"0", ["exit"],["castle_40_seneschal"]), ("castle_40_prison",sf_indoors,"interior_prison_n", "bo_interior_prison_n", (-100,-100),(100,100),-100,"0", [],[]), #!!Villages !!# ("village_1",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000030081763000589620000338e00004f2c00005cfb", [],[],"outer_terrain_plain"), ("village_2",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000003007a21c0003ecfe000001f0000073b100000fd2", [],[],"outer_terrain_plain"), ("village_3",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000023003dc4e0006118b000029f8000034670000105f", [],[],"outer_terrain_plain"), ("village_4",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000230079732000651a00000044c0000177200000234", [],[],"outer_terrain_plain"), ("village_5",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000003001ce100006097d0000134c000016d8000042a2", [],[],"outer_terrain_plain"), ("village_6",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000230035598000761df000058ea000006f3000005e7", [],[],"outer_terrain_plain"), ("village_7",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000031059a0d0004792000005c3a00004df500000dbc", [],[],"outer_terrain_plain"), ("village_8",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002300798320006499200002acc000040d70000421d", [],[],"outer_terrain_plain"), ("village_9",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000004300005008005b57000004e31800017d80000754b", [],[],"outer_terrain_plain"), ("village_10",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013005dad40005f57b0000543e0000279d000052b4", [],[],"outer_terrain_plain"), ("village_11",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000220029c4400077de100002dcc00002edf00003925", [],[],"outer_terrain_steppe"), ("village_12",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002200213e300077ddf000019d3000034520000626e", [],[],"outer_terrain_steppe"), ("village_13",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000000300265e3400691a400005e4d80006dfa00003bc8", [],[], "outer_terrain_plain"), ("village_14",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000230029ce30004912400002acc000040d7000077db", [],[], "outer_terrain_plain"), ("village_15",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002300029d4000691a4000015148000335800004190", [],[],"outer_terrain_plain"), ("village_16",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000240031a0f0006b9ae00006e1b00006e9000007281", [],[],"outer_terrain_snow"), ("village_17",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002c003131700066da00000484c000008630000613d", [],[],), ("village_18",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000024003561a00070dbe000016f8000010ca000069f8", [],[],"outer_terrain_snow"), ("village_19",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000024003991e0006f1bc000055cc0000085600001563", [],[],"outer_terrain_snow"), ("village_20",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000024003d7d20007d1f40000374100001e120000097b", [],[],"outer_terrain_snow"), ("village_21",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000240024d3800074dcc0000488b0000016100002047", [],[],"outer_terrain_snow"), ("village_22",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000024003d7d20007d1f40000374100001e120000097b", [],[],"outer_terrain_snow"), ("village_23",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002300415380007b5e600005f7b00000a9200001615", [],[],), ("village_24",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000023002e1ad00048924000031e70000677500002a0c", [],[],"outer_terrain_plain"), ("village_25",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002d0021ede000775dd000032670000173700007c40", [],[],"outer_terrain_steppe"), ("village_26",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000230020a008005294c000063fc0000771c0000216f", [],[],"outer_terrain_plain"), ("village_27",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013001b2320004a52900004d390000518c00001ab1", [],[],"outer_terrain_plain"), ("village_28",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000022002de4c00077ddd00007e1300000af400006de1", [],[],"outer_terrain_steppe"), ("village_29",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000023007b2320004f93c000023ed000053e500002949", [],[],"outer_terrain_plain"), ("village_30",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000230025e0a0004dd3700004822000032ea0000011b", [],[],"outer_terrain_plain"), ("village_31",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000001300619e38003a8ec00004c8380005c6600001cb5", ##0x00000001300619e30003a8ec00004c8380007de100001cb5", [],[],"outer_terrain_plain"), ("village_32",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000001300619e30003a8ec00004c8380007de100001cb5", [],[],"outer_terrain_plain"), ("village_33",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000130001700000649920000423900007768000062c3", [],[],"outer_terrain_plain"), ("village_34",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002300323e3000611860000392d00005c05000067e1", [],[],"outer_terrain_plain"), ("village_35",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000230079cb20005394e00001ef90000753000000731", [],[],"outer_terrain_town_thir_1"), ("village_36",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013003a1560006118d00003ce300004123000043b2", [],[],"outer_terrain_plain"), ("village_37",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000022004d36300077dd600002e08000036ab00004651", [],[],"outer_terrain_steppe"), ("village_38",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013003e21e0005fd7f000028920000650500005c53", [],[],"outer_terrain_plain"), ("village_39",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013003e5990005fd78000069670000446c00007476", [],[],"outer_terrain_plain"), ("village_40",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000220031f6300076dda000056f100004f6d000070b3", [],[],"outer_terrain_steppe"), ("village_41",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000022000a3e300062d8d0000444e0000276e00006eb1", [],[],"outer_terrain_steppe"), ("village_42",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000022007b23200062d8d000060b900003b8b00006c93", [],[],"outer_terrain_castle_9"), ("village_43",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000022000320e0005856300001d770000792700002aa1", [],[],"outer_terrain_steppe"), ("village_44",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002200020200005c574000075480000002d00004be7", [],[],"outer_terrain_steppe"), ("village_45",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000012007a3df0004e52b0000167700005180000051ea", [],[],"outer_terrain_steppe"), ("village_46",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013007a03200061184000058d20000717a00001af0", [],[],"outer_terrain_plain"), ("village_47",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000000300621b100051d47000034e300007926000048d3", [],[],"outer_terrain_plain"), ("village_48",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000001b0051ebc00062d8b0000570d00005b3900001ae1", [],[],"outer_terrain_plain"), ("village_49",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000140029bbc0006799b000009cb0000720000006555", [],[],"outer_terrain_snow"), ("village_50",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000140029bbc0006799b000009cb0000720000006555", [],[],"outer_terrain_snow"), ("village_51",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000023002b0e30006a5a90000722700002f5200005e2b", [],[],"outer_terrain_plain"), ("village_52",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000220011de30005655900002c2300003b2400000d47", [],[],"outer_terrain_steppe"), ("village_53",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000023002dd19000691a40000566a000012a000001037", [],[],"outer_terrain_plain"), ("village_54",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002300032300005c5740000243e000056aa00003a7a", [],[],"outer_terrain_plain"), ("village_55",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002300019500006c1b4000065c700002bea0000154e", [],[],"outer_terrain_plain"), ("village_56",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002300296320006b5aa00006f3200003a5000004fed", [],[],"outer_terrain_town_thir_1"), ("village_57",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002300027b200065d9700004dcf0000212800001bf0", [],[],"outer_terrain_plain"), ("village_58",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002300018e38005e58300000376000027e70000015c", [],[],"outer_terrain_plain"), ("village_59",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002300022a60005314c0000428100007e0100002e97", [],[],"outer_terrain_plain"), ("village_60",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000230079c3200060d860000428100007e01000071b4", [],[],"outer_terrain_plain"), ("village_61",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000001300325350006659e0000603500006b0200005676", [],[],"outer_terrain_plain"), ("village_62",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000130038cbc00062d8b00006cb100002b9f00002ca6", [],[],"outer_terrain_steppe"), ("village_63",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013007a6b20006258b00006bb8000074df00002f18", [],[],"outer_terrain_plain"), ("village_64",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000001300410320005a96800006b5300004edc00000d11", [],[],"outer_terrain_plain"), ("village_65",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013004d8320006358b00006d2b000005d5000023e5", [],[],"outer_terrain_plain"), ("village_66",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013007a2b20006097f00001342000050d900003545", [],[],"outer_terrain_town_thir_1"), ("village_67",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013003e02d0005ed7800002c2e0000688800005fe4", [],[],"outer_terrain_plain"), ("village_68",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000130079a3200062d8b0000297c00000def000067b7", [],[],"outer_terrain_plain"), ("village_69",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002300022a60005314c0000428100007e0100002e97", [],[],"outer_terrain_plain"), ("village_70",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000230079c3200060d860000428100007e01000071b4", [],[],"outer_terrain_plain"), ("village_71",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000630079ab20005fd7f0000687300007190000006df", [],[],"outer_terrain_plain"), ("village_72",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000006300654ac00062d910000635800007c9600005d35", [],[],"outer_terrain_plain"), ("village_73",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000230079db200050d4500001b4b00007cf400001973", [],[],"outer_terrain_plain"), ("village_74",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002300794320005f17c00003187000051540000350a", [],[],"outer_terrain_plain"), ("village_75",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002400798b20005ed7b000019160000650f000072d2", [],[],"outer_terrain_snow"), ("village_76",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000022007a7b200045d19000004920000076d00003b0a", [],[],"outer_terrain_steppe"), ("village_77",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000023009629a0005615800005564000023590000579e", [],[],"outer_terrain_plain"), ("village_78",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000023004561e00069da700000f490000256b000058b5", [],[],"outer_terrain_plain"), ("village_79",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000230084fac00057d5f00002ba900004a7a000060be", [],[],"outer_terrain_plain"), ("village_80",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013001b21e0004f13e000042b2000058e400007fce", [],[],"outer_terrain_plain"), #################### Yeni koyler ###################### ("village_81",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000230079ab20005fd7f0000621700007190000006df", [],[],"outer_terrain_plain"), ("village_82",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013002541c00062d8b00000a01000068cb00006d9b", [],[],"outer_terrain_plain"), ("village_83",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013007b2320005956300001e640000462c00003a51", [],[],"outer_terrain_plain"), ("village_84",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000130069b270004dd390000689b00002d3b00001876", [],[],"outer_terrain_plain"), ("village_85",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000014007b26300059563000051e000001aa4000034ee", [],[],"outer_terrain_snow"), ("village_86",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000014007b26300059563000051e000001aa4000034ee", [],[],"outer_terrain_snow"), ("village_87",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013001c98a0004dd3000001a5e00005c6200001ec9", [],[],"outer_terrain_plain"), ("village_88",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000012007a83200049924000049bd00001f7a00006c57", [],[],"outer_terrain_steppe"), ("village_89",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000001200513940005314c00001f6d00006d7700006698", [],[],"outer_terrain_steppe"), ("village_90",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000012002cd900005314c00001f6d00006d7700003493", [],[],"outer_terrain_steppe"), ("field_1",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000033a059a5a0009525600002005000060e300001175", [],[],"outer_terrain_plain"), ("field_2",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000033a079a3f000a3a8000006dfd000030a100006522", [],[],"outer_terrain_steppe"), ("field_3",sf_generate,"none", "none", (0,0),(100,100),-100,"0x30054da28004050000005a76800022aa00002e3b", [],[],"outer_terrain_steppe"), ("field_4",sf_generate,"none", "none", (0,0),(100,100),-100,"0x30054da28004050000005a76800022aa00002e3b", [],[],"outer_terrain_steppe"), ("field_5",sf_generate,"none", "none", (0,0),(100,100),-100,"0x30054da28004050000005a76800022aa00002e3b", [],[],"outer_terrain_steppe"), ]
Python
from module_info import * from module_party_templates import * #from process_operations import * from process_common import * def save_party_template_troop(file,troop): if troop: # add_tag_use(tag_uses,tag_troop,troop[0]) file.write("%d %d %d "%(troop[0],troop[1],troop[2])) if (len(troop) > 3): file.write("%d "%troop[3]) else: file.write("0 ") else: file.write("-1 ") def save_party_templates(): file = open(export_dir + "party_templates.txt","w") file.write("partytemplatesfile version 1\n") file.write("%d\n"%(len(party_templates))) for party_template in party_templates: # add_tag_use(tag_uses,tag_faction,party_template[4]) file.write("pt_%s %s %d %d %d %d "%(convert_to_identifier(party_template[0]),replace_spaces(party_template[1]),party_template[2],party_template[3], party_template[4], party_template[5])) members = party_template[6] if (len(members) > 6): print "Error! NUMBER OF TEMPLATE MEMBERS EXCEEDS 6 " + party_template[0] members = members[0:6] for party_template_member in members: save_party_template_troop(file,party_template_member) for i in xrange(6 - len(members)): save_party_template_troop(file,0) file.write("\n") file.close() def save_python_header(): file = open("./ID_party_templates.py","w") for i_party_template in xrange(len(party_templates)): file.write("pt_%s = %d\n"%(convert_to_identifier(party_templates[i_party_template][0]),i_party_template)) file.close() print "Exporting party_template data..." #tag_uses = load_tag_uses(export_dir) save_python_header() save_party_templates() #save_tag_uses(export_dir, tag_uses)
Python
from header_common import * from header_operations import * from header_parties import * from header_items import * from header_skills import * from header_triggers import * from header_troops import * from module_constants import * #################################################################################################################### # Each trigger contains the following fields: # 1) Check interval: How frequently this trigger will be checked # 2) Delay interval: Time to wait before applying the consequences of the trigger # After its conditions have been evaluated as true. # 3) Re-arm interval. How much time must pass after applying the consequences of the trigger for the trigger to become active again. # You can put the constant ti_once here to make sure that the trigger never becomes active again after it fires once. # 4) Conditions block (list). This must be a valid operation block. See header_operations.py for reference. # Every time the trigger is checked, the conditions block will be executed. # If the conditions block returns true, the consequences block will be executed. # If the conditions block is empty, it is assumed that it always evaluates to true. # 5) Consequences block (list). This must be a valid operation block. See header_operations.py for reference. #################################################################################################################### # Some constants for use below merchant_inventory_space = 30 num_merchandise_goods = 36 triggers = [ # Tutorial: (0.1, 0, ti_once, [(map_free,0)], [(dialog_box,"str_tutorial_map1"), # Here's something tricky, making global variables compatible with native, don't touch or modify. (eq, 0, 1), # make sure the following are never reached ############################################## # Native global variables decleration ############################################## #Triggers begin (assign, "$caravan_escort_state", 0), (assign, "$qst_bring_back_runaway_serfs_num_parties_fleed", 0), (assign, "$qst_bring_back_runaway_serfs_num_parties_returned", 0), (assign, "$qst_follow_spy_run_away", 0), (assign, "$qst_follow_spy_meeting_state", 0), (assign, "$qst_follow_spy_meeting_counter", 0), (assign, "$qst_follow_spy_spy_back_in_town", 0), (assign, "$qst_follow_spy_partner_back_in_town", 0), (assign, "$qst_follow_spy_no_active_parties", 0), (assign, "$debt_to_merchants_guild", 0), (assign, "$npc_with_personality_clash", 0), (assign, "$personality_clash_after_24_hrs", 0), (assign, "$npc_is_quitting", 0), #Triggers end #Dialogs begin (assign, "$g_talk_troop", 0), (assign, "$g_talk_agent", 0), (assign, "$g_talk_troop_faction", 0), (assign, "$g_talk_troop_relation", 0), (assign, "$g_talk_troop_faction_relation", 0), (assign, "$g_talk_troop_party", 0), (assign, "$g_current_hours", 0), (assign, "$g_talk_troop_last_talk_time", 0), (assign, "$g_time_since_last_talk", 0), (assign, "$g_talk_troop_met", 0), (assign, "$g_enemy_strength", 0), (assign, "$g_ally_strength", 0), (assign, "$g_strength_ratio", 0), (assign, "$g_comment_found", 0), (assign, "$g_leave_encounter", 0), (assign, "$g_move_heroes", 0), (assign, "$supported_pretender", 0), (assign, "$npc_quit_morale", 0), (assign, "$player_can_refuse_npc_quitting", 0), (assign, "$player_can_persuade_npc", 0), (assign, "$temp", 0), (assign, "$g_center_taken_by_player_faction", 0), (assign, "$map_talk_troop", 0), (assign, "$npc_with_grievance", 0), (assign, "$npc_with_personality_clash_2", 0), (assign, "$npc_with_personality_match", 0), (assign, "$disable_local_histories", 0), (assign, "$g_enemy_surrenders", 0), (assign, "$g_castle_left_to_player", 0), (assign, "$g_player_surrenders", 0), (assign, "$pretender_told_story", 0), (assign, "$town_to_rebel", 0), (assign, "$town_to_approach", 0), (assign, "$player_made_legitimacy_claim", 0), (assign, "$player_made_benefit_claim", 0), (assign, "$player_made_strength_claim", 0), (assign, "$g_invite_offered_center", 0), (assign, "$g_player_follow_army_warnings", 0), (assign, "$prisoner_lord_to_buy", 0), (assign, "$g_ransom_offer_rejected", 0), (assign, "$g_convince_quest", 0), (assign, "$auto_menu", 0), (assign, "$capturer_party", 0), (assign, "$players_oath_renounced_given_center", 0), (assign, "$players_oath_renounced_terms_state", 0), (assign, "$player_has_homage", 0), (assign, "$g_leave_town_outside", 0), (assign, "$mercenary_service_accumulated_pay", 0), (assign, "$temp_2", 0), (assign, "$g_recalculate_ais", 0), (assign, "$hero_requested_to_learn_location", 0), (assign, "$faction_requested_to_learn_more_details_about_the_war_against", 0), (assign, "$encountered_party_hostile", 0), (assign, "$g_rebellion_suggest_friends_stronger", 0), (assign, "$rival_lord", 0), (assign, "$rebellion_chance", 0), (assign, "$prior_argument_value", 0), (assign, "$current_argument", 0), (assign, "$current_argument_value", 0), (assign, "$player_made_ruler_claim", 0), (assign, "$rebellion_check", 0), (assign, "$g_invite_faction", 0), (assign, "$g_invite_faction_lord", 0), (assign, "$supported_pretender_old_faction", 0), (assign, "$g_player_banner_granted", 0), (assign, "$town_suggested_to_go_to", 0), (assign, "$suggested_to_attack_party", 0), (assign, "$suggested_to_attack_center", 0), (assign, "$mercenary_service_next_pay_time", 0), (assign, "$mercenary_service_next_renew_day", 0), (assign, "$random_quest_no", 0), (assign, "$g_leave_town", 0), (assign, "$qst_kill_local_merchant_center", 0), (assign, "$qst_follow_spy_spy_partners_party", 0), (assign, "$qst_follow_spy_spy_party", 0), (assign, "$qst_bring_back_runaway_serfs_party_1", 0), (assign, "$qst_bring_back_runaway_serfs_party_2", 0), (assign, "$qst_bring_back_runaway_serfs_party_3", 0), (assign, "$auto_enter_town", 0), (assign, "$lord_requested_to_talk_to", 0), (assign, "$troop_to_restore_relations_with", 0), (assign, "$lady_restore_cost_1", 0), (assign, "$lady_restore_cost_2", 0), (assign, "$lady_restore_cost_3", 0), (assign, "$convince_value", 0), (assign, "$convince_relation_penalty", 0), (assign, "$persuasion_strength", 0), (assign, "$hero_requested_to_learn_relations", 0), (assign, "$caravan_distance_to_target", 0), (assign, "$caravan_escort_offer", 0), (assign, "$caravan_escort_destination_town", 0), (assign, "$caravan_escort_party_id", 0), (assign, "$caravan_escort_agreed_reward", 0), (assign, "$g_permitted_to_center", 0), (assign, "$deserter_tribute", 0), (assign, "$buy_drinks_last_time", 0), (assign, "$ransom_broker_families_told", 0), (assign, "$ransom_broker_prices_told", 0), (assign, "$ransom_broker_ransom_me_told", 0), (assign, "$traveler_land_asked", 0), (assign, "$last_lost_companion", 0), (assign, "$traveller_claimants_mentioned", 0), (assign, "$num_opponents_to_beat_in_a_row", 0), (assign, "$waiting_for_training_fight_result", 0), (assign, "$novicemaster_opponent_troop", 0), (assign, "$training_system_explained", 0), (assign, "$novice_training_difficulty", 0), (assign, "$training_fight_won", 0), (assign, "$merchant_quest_last_offerer", 0), (assign, "$merchant_offered_quest", 0), (assign, "$g_force_peace_faction_1", 0), (assign, "$g_force_peace_faction_2", 0), (assign, "$random_merchant_quest_no", 0), (assign, "$mayor_info_lord_told", 0), (assign, "$escort_merchant_caravan_mode", 0), (assign, "$qst_troublesome_bandits_eliminated", 0), (assign, "$qst_troublesome_bandits_eliminated_by_player", 0), (assign, "$arena_reward_asked", 0), (assign, "$arena_tournaments_asked", 0), (assign, "$arena_master_first_talk", 0), (assign, "$last_training_fight_town", 0), (assign, "$training_fight_time", 0), (assign, "$g_mt_mode", 0), (assign, "$g_player_entry_point", 0), (assign, "$bandit_tribute", 0), (assign, "$welfare_inquired", 0), (assign, "$rumors_inquired", 0), (assign, "$info_inquired", 0), #Dialogs end #Game menus begin (assign, "$character_gender", 0), (assign, "$cheat_mode", 0), (assign, "$g_custom_battle_scenario", 0), (assign, "$g_battle_result", 0), (assign, "$g_player_troop", 0), (assign, "$g_custom_battle_scene", 0), (assign, "$background_type", 0), (assign, "$background_answer_2", 0), (assign, "$background_answer_3", 0), (assign, "$background_answer_4", 0), (assign, "$current_string_reg", 0), (assign, "$g_cheat_selected_faction", 0), (assign, "$g_player_reading_book", 0), (assign, "$g_player_icon_state", 0), (assign, "$g_camp_mode", 0), (assign, "$g_prisoner_recruit_troop_id", 0), (assign, "$g_prisoner_recruit_size", 0), (assign, "$g_prisoner_recruit_last_time", 0), (assign, "$g_player_debt_to_party_members", 0), (assign, "$g_enemy_party", 0), (assign, "$g_ally_party", 0), (assign, "$new_encounter", 0), (assign, "$g_encounter_is_in_village", 0), (assign, "$g_encounter_type", 0), (assign, "$encountered_party_friendly", 0), (assign, "$cant_leave_encounter", 0), (assign, "$talk_context", 0), (assign, "$g_next_menu", 0), (assign, "$g_engaged_enemy", 0), (assign, "$g_village_raid_evil", 0), (assign, "$no_soldiers_left", 0), (assign, "$playerparty_postbattle_regulars", 0), (assign, "$thanked_by_ally_leader", 0), (assign, "$g_relation_boost", 0), (assign, "$last_defeated_hero", 0), (assign, "$last_freed_hero", 0), (assign, "$capture_screen_shown", 0), (assign, "$pin_number", 0), (assign, "$loot_screen_shown", 0), (assign, "$g_total_victories", 0), (assign, "$g_total_defeats", 0), (assign, "$g_siege_final_menu", 0), (assign, "$g_siege_battle_state", 0), (assign, "$all_doors_locked", 0), (assign, "$current_town", 0), (assign, "$entry_to_town_forbidden", 0), (assign, "$sneaked_into_town", 0), (assign, "$town_entered", 0), (assign, "$g_player_besiege_town", 0), (assign, "$cant_sneak_into_town", 0), (assign, "$castle_undefended", 0), (assign, "$g_town_visit_after_rest", 0), (assign, "$g_last_defeated_bandits_town", 0), (assign, "$num_castle_meeting_troops", 0), (assign, "$castle_meeting_selected_troop", 0), (assign, "$g_siege_force_wait", 0), (assign, "$g_siege_method", 0), (assign, "$g_siege_sallied_out_once", 0), (assign, "$cant_talk_to_enemy", 0), (assign, "$auto_besiege_town", 0), (assign, "$g_siege_method_finish_hours", 0), (assign, "$g_castle_requested_by_player", 0), (assign, "$players_oath_renounced_against_kingdom", 0), (assign, "$players_oath_renounced_begin_time", 0), (assign, "$g_battle_simulation_cancel_for_party", 0), (assign, "$g_battle_simulation_auto_enter_town_after_battle", 0), (assign, "$g_siege_first_encounter", 0), (assign, "$g_siege_join", 0), (assign, "$g_defending_against_siege", 0), (assign, "$qst_collect_taxes_currently_collecting", 0), (assign, "$qst_train_peasants_against_bandits_currently_training", 0), (assign, "$auto_enter_menu_in_center", 0), (assign, "$g_player_raiding_village", 0), (assign, "$qst_eliminate_bandits_infesting_village_num_bandits", 0), (assign, "$qst_eliminate_bandits_infesting_village_num_villagers", 0), (assign, "$g_player_raid_complete", 0), (assign, "$town_nighttime", 0), (assign, "$g_last_rest_center", 0), (assign, "$g_strength_contribution_of_player", 0), (assign, "$g_improvement_type", 0), (assign, "$quest_auto_menu", 0), (assign, "$g_town_assess_trade_goods_after_rest", 0), (assign, "$g_tournament_cur_tier", 0), (assign, "$g_tournament_player_team_won", 0), (assign, "$g_tournament_bet_placed", 0), (assign, "$g_tournament_bet_win_amount", 0), (assign, "$g_tournament_last_bet_tier", 0), (assign, "$g_tournament_next_num_teams", 0), (assign, "$g_tournament_next_team_size", 0), (assign, "$g_last_rest_payment_until", 0), (assign, "$g_main_ship_party", 0), (assign, "$g_tournament_num_participants_for_fight", 0), (assign, "$qst_collect_taxes_total_hours", 0), (assign, "$qst_collect_taxes_hourly_income", 0), (assign, "$qst_collect_taxes_menu_counter", 0), (assign, "$qst_collect_taxes_unrest_counter", 0), (assign, "$qst_collect_taxes_halve_taxes", 0), (assign, "$g_train_peasants_against_bandits_num_peasants", 0), (assign, "$g_encountered_party", 0), (assign, "$last_sneak_attempt_town", 0), (assign, "$last_sneak_attempt_time", 0), (assign, "$g_training_ground_melee_training_scene", 0), (assign, "$g_training_ground_training_count", 0), (assign, "$temp_3", 0), (assign, "$g_presentation_marshall_selection_max_renown_2", 0), (assign, "$g_presentation_marshall_selection_max_renown_2_troop", 0), (assign, "$g_presentation_marshall_selection_max_renown_1", 0), (assign, "$g_presentation_marshall_selection_max_renown_1_troop", 0), (assign, "$g_player_is_captive", 0), (assign, "$player_ransom_amount", 0), (assign, "$players_kingdom", 0), #Game menus end #Mission templates begin (assign, "$g_train_peasants_against_bandits_training_succeeded", 0), (assign, "$pin_player_fallen", 0), (assign, "$battle_won", 0), (assign, "$defender_reinforcement_stage", 0), (assign, "$attacker_reinforcement_stage", 0), (assign, "$g_presentation_battle_active", 0), # (assign, "$formation_vector", 0), # (assign, "$formation_temp_vector", 0), # (assign, "$formation_selected", 0), # (assign, "$formation_array_selected", 0), # (assign, "$formation_max_array_no", 0), # (assign, "$formation_auto_rotation", 0), (assign, "$defender_team", 0), (assign, "$attacker_team", 0), (assign, "$defender_team_2", 0), (assign, "$attacker_team_2", 0), (assign, "$belfry_positioned", 0), (assign, "$trainer_help_message", 0), (assign, "$g_last_destroyed_gourds", 0), (assign, "$g_training_ground_training_success_ratio", 0), (assign, "$scene_num_total_gourds_destroyed", 0), (assign, "$g_arena_training_num_agents_spawned", 0), (assign, "$g_arena_training_kills", 0), (assign, "$g_arena_training_max_opponents", 0), (assign, "$g_arena_training_won", 0), (assign, "$g_arena_training_next_spawn_time", 0), (assign, "$tutorial_1_state", 0), (assign, "$tutorial_1_msg_1_displayed", 0), (assign, "$tutorial_1_msg_2_displayed", 0), (assign, "$tutorial_1_msg_3_displayed", 0), (assign, "$tutorial_1_msg_4_displayed", 0), (assign, "$tutorial_1_msg_5_displayed", 0), (assign, "$tutorial_1_msg_6_displayed", 0), (assign, "$tutorial_num_total_dummies_destroyed", 0), (assign, "$tutorial_time", 0), (assign, "$g_last_archery_point_earned", 0), (assign, "$tutorial_num_arrows_hit", 0), (assign, "$tutorial_1_finished", 0), (assign, "$tutorial_2_state", 0), (assign, "$tutorial_2_msg_1_displayed", 0), (assign, "$tutorial_2_msg_2_displayed", 0), (assign, "$tutorial_2_msg_3_displayed", 0), (assign, "$tutorial_2_msg_4_displayed", 0), (assign, "$tutorial_2_msg_5_displayed", 0), (assign, "$tutorial_2_msg_6_displayed", 0), (assign, "$tutorial_2_msg_7_displayed", 0), (assign, "$tutorial_2_msg_8_displayed", 0), (assign, "$tutorial_2_msg_9_displayed", 0), (assign, "$tutorial_2_melee_agent_state", 0), (assign, "$tutorial_2_finished", 0), (assign, "$tutorial_3_state", 0), (assign, "$tutorial_3_msg_1_displayed", 0), (assign, "$tutorial_3_msg_2_displayed", 0), (assign, "$tutorial_3_msg_3_displayed", 0), (assign, "$tutorial_3_msg_4_displayed", 0), (assign, "$tutorial_3_msg_5_displayed", 0), (assign, "$tutorial_3_msg_6_displayed", 0), (assign, "$tutorial_3_finished", 0), (assign, "$tutorial_4_state", 0), (assign, "$tutorial_4_msg_1_displayed", 0), (assign, "$tutorial_4_msg_2_displayed", 0), (assign, "$tutorial_4_msg_3_displayed", 0), (assign, "$tutorial_4_msg_4_displayed", 0), (assign, "$tutorial_4_msg_5_displayed", 0), (assign, "$tutorial_4_msg_6_displayed", 0), (assign, "$tutorial_4_msg_7_displayed", 0), (assign, "$tutorial_4_finished", 0), (assign, "$tutorial_5_state", 0), (assign, "$tutorial_5_msg_1_displayed", 0), (assign, "$tutorial_5_msg_2_displayed", 0), (assign, "$tutorial_5_msg_3_displayed", 0), (assign, "$tutorial_5_msg_4_displayed", 0), (assign, "$tutorial_5_msg_5_displayed", 0), (assign, "$tutorial_5_msg_6_displayed", 0), (assign, "$tutorial_5_finished", 0), #Mission templates end #Presentations begin (assign, "$g_presentation_credits_obj_1", 0), (assign, "$g_presentation_credits_obj_2", 0), (assign, "$g_presentation_credits_obj_3", 0), (assign, "$g_presentation_credits_obj_4", 0), (assign, "$g_presentation_credits_obj_5", 0), (assign, "$g_presentation_credits_obj_6", 0), (assign, "$g_presentation_credits_obj_7", 0), (assign, "$g_presentation_credits_obj_8", 0), (assign, "$g_presentation_credits_obj_9", 0), (assign, "$g_presentation_credits_obj_10", 0), (assign, "$g_presentation_credits_obj_11", 0), (assign, "$g_presentation_credits_obj_12", 0), (assign, "$g_presentation_credits_obj_1_alpha", 0), (assign, "$g_presentation_credits_obj_2_alpha", 0), (assign, "$g_presentation_credits_obj_3_alpha", 0), (assign, "$g_presentation_credits_obj_4_alpha", 0), (assign, "$g_presentation_credits_obj_5_alpha", 0), (assign, "$g_presentation_credits_obj_6_alpha", 0), (assign, "$g_presentation_credits_obj_7_alpha", 0), (assign, "$g_presentation_credits_obj_8_alpha", 0), (assign, "$g_presentation_credits_obj_9_alpha", 0), (assign, "$g_presentation_obj_1", 0), (assign, "$g_presentation_banner_start", 0), (assign, "$g_presentation_page_no", 0), (assign, "$g_presentation_obj_22", 0), (assign, "$g_presentation_obj_23", 0), (assign, "$g_presentation_obj_2", 0), (assign, "$g_presentation_obj_3", 0), (assign, "$g_presentation_obj_4", 0), (assign, "$g_presentation_obj_5", 0), (assign, "$g_presentation_obj_19", 0), (assign, "$g_presentation_obj_20", 0), (assign, "$g_presentation_obj_16", 0), (assign, "$g_presentation_obj_17", 0), (assign, "$g_presentation_obj_18", 0), (assign, "$g_presentation_obj_15", 0), (assign, "$g_presentation_obj_21", 0), (assign, "$g_presentation_obj_14", 0), (assign, "$g_presentation_obj_6", 0), (assign, "$g_presentation_obj_7", 0), (assign, "$g_presentation_obj_24", 0), (assign, "$g_presentation_obj_28", 0), (assign, "$g_presentation_obj_32", 0), (assign, "$g_presentation_obj_33", 0), (assign, "$g_presentation_obj_8", 0), (assign, "$g_presentation_obj_9", 0), (assign, "$g_presentation_obj_25", 0), (assign, "$g_presentation_obj_29", 0), (assign, "$g_presentation_obj_34", 0), (assign, "$g_presentation_obj_35", 0), (assign, "$g_presentation_obj_10", 0), (assign, "$g_presentation_obj_11", 0), (assign, "$g_presentation_obj_26", 0), (assign, "$g_presentation_obj_30", 0), (assign, "$g_presentation_obj_36", 0), (assign, "$g_presentation_obj_37", 0), (assign, "$g_presentation_obj_12", 0), (assign, "$g_presentation_obj_13", 0), (assign, "$g_presentation_obj_27", 0), (assign, "$g_presentation_obj_31", 0), (assign, "$g_presentation_obj_38", 0), (assign, "$g_presentation_obj_39", 0), (assign, "$g_presentation_next_presentation", 0), (assign, "$g_presentation_output_slot", 0), (assign, "$g_presentation_input", 0), (assign, "$g_presentation_marshall_selection_1_vote", 0), (assign, "$g_presentation_marshall_selection_2_vote", 0), (assign, "$g_presentation_marshall_selection_ended", 0), (assign, "$g_formation_infantry_selected", 0), (assign, "$g_formation_archers_selected", 0), (assign, "$g_formation_cavalry_selected", 0), (assign, "$g_presentation_infantry_movement", 0), (assign, "$g_presentation_infantry_riding", 0), (assign, "$g_presentation_infantry_weapon_usage", 0), (assign, "$g_presentation_archers_movement", 0), (assign, "$g_presentation_archers_riding", 0), (assign, "$g_presentation_archers_weapon_usage", 0), (assign, "$g_presentation_cavalry_movement", 0), (assign, "$g_presentation_cavalry_riding", 0), (assign, "$g_presentation_cavalry_weapon_usage", 0), (assign, "$g_battle_us_ready", 0), (assign, "$g_battle_us_wounded", 0), (assign, "$g_battle_us_dead", 0), (assign, "$g_battle_enemies_ready", 0), (assign, "$g_battle_enemies_wounded", 0), (assign, "$g_battle_enemies_dead", 0), (assign, "$g_battle_allies_ready", 0), (assign, "$g_battle_allies_wounded", 0), (assign, "$g_battle_allies_dead", 0), (assign, "$g_battle_map_width", 0), (assign, "$g_battle_map_scale", 0), (assign, "$g_battle_map_height", 0), (assign, "$g_battle_map_plane", 0), (assign, "$g_battle_map_infantry_order_flag", 0), (assign, "$g_battle_map_archers_order_flag", 0), (assign, "$g_battle_map_cavalry_order_flag", 0), (assign, "$g_presentation_obj_1_val", 0), (assign, "$g_presentation_obj_2_val", 0), (assign, "$g_presentation_obj_3_val", 0), (assign, "$g_presentation_obj_4_val", 0), #Presentations end #Scripts begin (assign, "$g_player_luck", 0), (assign, "$g_election_date", 0), (assign, "$g_player_party_icon", 0), (assign, "$disable_npc_complaints", 0), (assign, "$g_encountered_party_2", 0), (assign, "$g_encountered_party_faction", 0), (assign, "$g_encountered_party_relation", 0), (assign, "$g_encountered_party_type", 0), (assign, "$g_encountered_party_template", 0), (assign, "$playerparty_prebattle_regulars", 0), (assign, "$g_training_ground_used_weapon_proficiency", 0), (assign, "$g_training_ground_training_scene", 0), (assign, "$g_training_ground_training_num_enemies", 0), (assign, "$g_training_ground_training_hardness", 0), (assign, "$g_training_ground_training_num_gourds_to_destroy", 0), (assign, "$g_training_ground_ranged_distance", 0), (assign, "$qst_deliver_wine_debt", 0), (assign, "$incriminate_quest_sacrificed_troop", 0), (assign, "$pout_party", 0), (assign, "$player_honor", 0), (assign, "$g_player_party_morale_modifier_party_size", 0), (assign, "$g_player_party_morale_modifier_leadership", 0), (assign, "$g_player_party_morale_modifier_food", 0), (assign, "$g_player_party_morale_modifier_no_food", 0), (assign, "$g_player_party_morale_modifier_debt", 0), (assign, "$party_relative_strength", 0), (assign, "$ratio_of_prisoners", 0), (assign, "$ai_team_1_battle_tactic", 0), (assign, "$ai_team_1", 0), (assign, "$ai_team_2", 0), (assign, "$ai_team_2_battle_tactic", 0), (assign, "$g_player_current_own_troop_kills", 0), (assign, "$g_last_mission_player_damage", 0), (assign, "$g_friend_fit_for_battle", 0), (assign, "$g_enemy_fit_for_battle", 0), (assign, "$g_starting_strength_main_party", 0), (assign, "$g_starting_strength_enemy_party", 0), (assign, "$g_starting_strength_friends", 0), (assign, "$battle_renown_value", 0), (assign, "$spy_item_worn", 0), (assign, "$spy_quest_troop", 0), (assign, "$num_center_bandits", 0), (assign, "$cur_belfry_pos", 0), (assign, "$belfry_rotating_objects_begin", 0), (assign, "$last_belfry_object_pos", 0), (assign, "$belfry_num_slots_positioned", 0), (assign, "$belfry_num_men_pushing", 0), (assign, "$g_total_quests_completed", 0), (assign, "$any_allies_at_the_last_battle", 0), (assign, "$number_of_npc_slots", 0), (assign, "$npc_grievance_string", 0), (assign, "$npc_grievance_slot", 0), (assign, "$npc_praise_not_complaint", 0), (assign, "$npc_map_talk_context", 0), (assign, "$g_ransom_offer_troop", 0), (assign, "$g_ransom_offer_party", 0), (assign, "$g_check_autos_at_hour", 0), (assign, "$g_average_center_value_per_faction", 0), (assign, "$num_log_entries", 0), (assign, "$log_comment_relation_change", 0), (assign, "$g_custom_battle_team1_death_count", 0), (assign, "$g_custom_battle_team2_death_count", 0), #Scripts end #Simple triggers begin (assign, "$g_notification_menu_var1", 0), (assign, "$g_notification_menu_var2", 0), (assign, "$g_cur_week_half_daily_wage_payments", 0), (assign, "$g_last_half_payment_check_day", 0), (assign, "$g_half_payment_checkpoint", 0), (assign, "$g_presentation_marshall_selection_max_renown_3", 0), (assign, "$g_presentation_marshall_selection_max_renown_3_troop", 0), (assign, "$g_center_to_give_to_player", 0), (assign, "$g_random_army_quest", 0), (assign, "$qst_scout_waypoints_wp_1", 0), (assign, "$qst_scout_waypoints_wp_2", 0), (assign, "$qst_scout_waypoints_wp_3", 0), (assign, "$qst_scout_waypoints_wp_1_visited", 0), (assign, "$qst_scout_waypoints_wp_2_visited", 0), (assign, "$qst_scout_waypoints_wp_3_visited", 0), (assign, "$qst_train_peasants_against_bandits_num_hours_trained", 0), #Simple triggers end ########################################## # Native global variables decleration end ########################################## ]), # (1.0, 0, ti_once, [(map_free,0)], [(start_map_conversation,"trp_guide")]), # Refresh Merchants (0.0, 0, 24.0, [], [ (reset_item_probabilities,100), (set_merchandise_modifier_quality,150), (reset_item_probabilities,100),(set_item_probability_in_merchandise,"itm_salt",700), (troop_add_merchandise,"trp_salt_mine_merchant",itp_type_goods,num_merchandise_goods), # Add trade goods to merchant inventories # (store_sub, ":item_to_production_slot", slot_town_trade_good_productions_begin, trade_goods_begin), (store_sub, ":item_to_price_slot", slot_town_trade_good_prices_begin, trade_goods_begin), (try_for_range,":cur_center",towns_begin,towns_end), (party_get_slot,":cur_merchant",":cur_center",slot_town_merchant), (reset_item_probabilities,100), (try_for_range, ":cur_goods", trade_goods_begin, trade_goods_end), # (store_add, ":cur_production_slot", ":cur_goods", ":item_to_production_slot"), (store_add, ":cur_price_slot", ":cur_goods", ":item_to_price_slot"), # (party_get_slot, ":cur_production", ":cur_center", ":cur_production_slot"), (party_get_slot, ":cur_price", ":cur_center", ":cur_price_slot"), ## (assign, ":cur_probability", 100), ## (store_add, ":cur_production", 100, ":cur_production"), ## (val_mul, ":cur_probability", ":cur_production"), ## (val_div, ":cur_probability", 100), ## (try_begin), ## (gt, ":cur_probability", 100), ## (store_sub, ":temp_dif", ":cur_probability", 100), ## (val_mul, ":temp_dif", 4), ## (val_add, ":cur_probability", ":temp_dif"), ## (try_end), ## (store_sub, ":temp_dif", average_price_factor, ":cur_price"), ## (val_div, ":temp_dif", 2), ## (val_add, ":cur_price", ":temp_dif"), (assign, ":cur_probability", 100), (val_mul, ":cur_probability", average_price_factor), (val_div, ":cur_probability", ":cur_price"), (val_mul, ":cur_probability", average_price_factor), (val_div, ":cur_probability", ":cur_price"), (val_mul, ":cur_probability", average_price_factor), (val_div, ":cur_probability", ":cur_price"), (val_mul, ":cur_probability", average_price_factor), (val_div, ":cur_probability", ":cur_price"), (set_item_probability_in_merchandise,":cur_goods",":cur_probability"), (try_end), (troop_add_merchandise,":cur_merchant",itp_type_goods,num_merchandise_goods), (troop_ensure_inventory_space,":cur_merchant",merchant_inventory_space), (troop_sort_inventory, ":cur_merchant"), (store_troop_gold, ":cur_gold",":cur_merchant"), (lt,":cur_gold",1500), (store_random_in_range,":new_gold",500,1000), (call_script, "script_troop_add_gold",":cur_merchant",":new_gold"), (try_end), ]), # Refresh Armor sellers (0.0, 0, 24.0, [], [ (reset_item_probabilities,100), (set_merchandise_modifier_quality,150), (try_for_range,reg(2),armor_merchants_begin,armor_merchants_end), (troop_add_merchandise,reg(2),itp_type_body_armor,16), (troop_add_merchandise,reg(2),itp_type_head_armor,16), (troop_add_merchandise,reg(2),itp_type_foot_armor,8), (troop_add_merchandise,reg(2),itp_type_hand_armor,4), (troop_ensure_inventory_space,reg(2),merchant_inventory_space), (troop_sort_inventory, reg(2)), (store_troop_gold, reg(6),reg(2)), (lt,reg(6),900), (store_random_in_range,":new_gold",200,400), (call_script, "script_troop_add_gold",reg(2),":new_gold"), (end_try,0), ]), # Refresh Weapon sellers (0.0, 0, 24.0, [], [ (reset_item_probabilities,100), (set_merchandise_modifier_quality,150), (try_for_range,reg(2),weapon_merchants_begin,weapon_merchants_end), (troop_add_merchandise,reg(2),itp_type_one_handed_wpn,5), (troop_add_merchandise,reg(2),itp_type_two_handed_wpn,5), (troop_add_merchandise,reg(2),itp_type_polearm,5), (troop_add_merchandise,reg(2),itp_type_shield,6), (troop_add_merchandise,reg(2),itp_type_bow,4), (troop_add_merchandise,reg(2),itp_type_crossbow,3), (troop_add_merchandise,reg(2),itp_type_thrown,5), (troop_add_merchandise,reg(2),itp_type_arrows,2), (troop_add_merchandise,reg(2),itp_type_bolts,2), (troop_ensure_inventory_space,reg(2),merchant_inventory_space), (troop_sort_inventory, reg(2)), (store_troop_gold, reg(6),reg(2)), (lt,reg(6),900), (store_random_in_range,":new_gold",200,400), (call_script, "script_troop_add_gold",reg(2),":new_gold"), (end_try,0), ]), # Refresh Horse sellers (0.0, 0, 24.0, [], [ (reset_item_probabilities,100), (set_merchandise_modifier_quality,150), (try_for_range,":cur_merchant",horse_merchants_begin,horse_merchants_end), (troop_add_merchandise,":cur_merchant",itp_type_horse,5), (troop_ensure_inventory_space,":cur_merchant",65), (troop_sort_inventory, ":cur_merchant"), (store_troop_gold, ":cur_gold",":cur_merchant"), (lt,":cur_gold",600), (store_random_in_range,":new_gold",200,400), (call_script, "script_troop_add_gold",":cur_merchant",":new_gold"), (try_end), ]), ############# #Captivity: # (1.0, 0, 0.0, [], # [ # (ge,"$captivity_mode",1), # (store_current_hours,reg(1)), # (val_sub,reg(1),"$captivity_end_time"), # (ge,reg(1),0), # (display_message,"str_nobleman_reached_destination"), # (jump_to_menu,"$captivity_end_menu"), # ]), (5.7, 0, 0.0, [(store_num_parties_created,reg(3),"pt_manhunters"), (lt,reg(3),num_max_zendar_manhunters), (store_num_parties_of_template, reg(2), "pt_manhunters"), (lt,reg(2),3)], [(set_spawn_radius,1),(spawn_around_party,"p_zendar","pt_manhunters")]), # (5.2, 0, 0.0, [(store_num_parties_created,reg(3),"pt_peasant"),(lt,reg(3),num_max_zendar_peasants), # (store_num_parties_of_template, reg(2), "pt_peasant"), (lt,reg(2),3)], # [(set_spawn_radius,1),(spawn_around_party,"p_zendar","pt_peasant")]), #Tax Collectors # Prisoner Trains # (4.1, 0, 0.0, [], # [ # (assign, "$pin_faction", "fac_swadians"), # (assign, "$pin_party_template", "pt_swadian_prisoner_train"), # (assign, "$pin_limit", peak_prisoner_trains), # (call_script,"script_cf_spawn_party_at_faction_town_if_below_limit"), # (party_set_ai_behavior,"$pout_party",ai_bhvr_travel_to_party), # (party_set_ai_object,"$pout_party","$pout_town"), # ]), # # (4.1, 0, 0.0, [], # [ # (assign, "$pin_faction", "fac_vaegirs"), # (assign, "$pin_party_template", "pt_vaegir_prisoner_train"), # (assign, "$pin_limit", peak_prisoner_trains), # (call_script,"script_cf_spawn_party_at_faction_town_if_below_limit"), # (party_set_ai_behavior,"$pout_party",ai_bhvr_travel_to_party), # (party_set_ai_object,"$pout_party","$pout_town"), # ]), (2.0, 0, 0, [(store_random_party_of_template, reg(2), "pt_prisoner_train_party"), (party_is_in_any_town,reg(2)), ], [(store_faction_of_party, ":faction_no", reg(2)), (call_script,"script_cf_select_random_walled_center_with_faction", ":faction_no", -1), (party_set_ai_behavior,reg(2),ai_bhvr_travel_to_party), (party_set_ai_object,reg(2),reg0), (party_set_flags, reg(2), pf_default_behavior, 0), ]), ##Caravans # (4.2, 0, 0.0, [], # [ # (assign, "$pin_faction", "fac_swadians"), # (assign, "$pin_party_template", "pt_swadian_caravan"), # (assign, "$pin_limit", peak_kingdom_caravans), # (call_script,"script_cf_spawn_party_at_faction_town_if_below_limit"), # (party_set_ai_behavior,"$pout_party",ai_bhvr_travel_to_party), # (party_set_ai_object,"$pout_party","$pout_town"), # ]), # (4.2, 0, 0.0, [], # [ # (assign, "$pin_faction", "fac_vaegirs"), # (assign, "$pin_party_template", "pt_vaegir_caravan"), # (assign, "$pin_limit", peak_kingdom_caravans), # (call_script,"script_cf_spawn_party_at_faction_town_if_below_limit"), # (party_set_ai_behavior,"$pout_party",ai_bhvr_travel_to_party), # (party_set_ai_object,"$pout_party","$pout_town"), # ]), ## (2.0, 0, 0, [(store_random_party_of_template, reg(2), "pt_kingdom_caravan_party"), ## (party_is_in_any_town,reg(2)), ## ], ## [(store_faction_of_party, ":faction_no", reg(2)), ## (call_script,"script_cf_select_random_town_with_faction", ":faction_no"), ## (party_set_ai_behavior,reg(2),ai_bhvr_travel_to_party), ## (party_set_ai_object,reg(2),reg0), ## (party_set_flags, reg(2), pf_default_behavior, 0), ## ]), (4.0, 0, 0.0, [(eq, "$caravan_escort_state", 1), #cancel caravan_escort_state if caravan leaves the destination (get_party_ai_object,reg(1),"$caravan_escort_party_id"), (neq,reg(1),"$caravan_escort_destination_town"), ], [(assign,"$caravan_escort_state",0), # (add_xp_as_reward,100), ]), #Messengers # (4.2, 0, 0.0, [], # [(assign, "$pin_faction", "fac_swadians"), # (assign, "$pin_party_template", "pt_swadian_messenger"), # (assign, "$pin_limit", peak_kingdom_messengers), # (call_script,"script_cf_spawn_party_at_faction_town_if_below_limit"), # (party_set_ai_behavior,"$pout_party",ai_bhvr_travel_to_party), # (party_set_ai_object,"$pout_party","$pout_town"), # ]), # (4.2, 0, 0.0, [], # [(assign, "$pin_faction", "fac_vaegirs"), # (assign, "$pin_party_template", "pt_vaegir_messenger"), # (assign, "$pin_limit", peak_kingdom_caravans), # (call_script,"script_cf_spawn_party_at_faction_town_if_below_limit"), # (party_set_ai_behavior,"$pout_party",ai_bhvr_travel_to_party), # (party_set_ai_object,"$pout_party","$pout_town"), # ]), (1.5, 0, 0, [(store_random_party_of_template, reg(2), "pt_messenger_party"), (party_is_in_any_town,reg(2)), ], [(store_faction_of_party, ":faction_no", reg(2)), (call_script,"script_cf_select_random_walled_center_with_faction", ":faction_no", -1), (party_set_ai_behavior,reg(2),ai_bhvr_travel_to_party), (party_set_ai_object,reg(2),reg0), (party_set_flags, reg(2), pf_default_behavior, 0), ]), #Deserters # (10.2, 0, 0.0, [], # [ # (assign, "$pin_faction", "fac_swadians"), # (assign, "$pin_party_template", "pt_swadian_deserters"), # (assign, "$pin_limit", 4), # (call_script,"script_cf_spawn_party_at_faction_town_if_below_limit"), # ]), # (10.2, 0, 0.0, [], # [ # (assign, "$pin_faction", "fac_vaegirs"), # (assign, "$pin_party_template", "pt_vaegir_deserters"), # (assign, "$pin_limit", 4), # (call_script,"script_cf_spawn_party_at_faction_town_if_below_limit"), # ]), #Kingdom Parties (1.0, 0, 0.0, [], [(try_for_range, ":cur_kingdom", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":cur_kingdom", slot_faction_state, sfs_active), (neq, ":cur_kingdom", "fac_player_supporters_faction"), ## (try_begin), ## (store_random_in_range, ":random_no", 0, 100), ## (lt, ":random_no", 10), ## (call_script, "script_create_kingdom_party_if_below_limit", ":cur_kingdom", spt_forager), ## (try_end), ## (try_begin), ## (store_random_in_range, ":random_no", 0, 100), ## (lt, ":random_no", 10), ## (call_script, "script_create_kingdom_party_if_below_limit", ":cur_kingdom", spt_scout), ## (try_end), ## (try_begin), ## (store_random_in_range, ":random_no", 0, 100), ## (lt, ":random_no", 10), ## (call_script, "script_create_kingdom_party_if_below_limit", ":cur_kingdom", spt_patrol), ## (try_end), ## (try_begin), ## (store_random_in_range, ":random_no", 0, 100), ## (lt, ":random_no", 10), ## (call_script, "script_create_kingdom_party_if_below_limit", ":cur_kingdom", spt_messenger), ## (try_end), (try_begin), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", 10), (call_script, "script_create_kingdom_party_if_below_limit", ":cur_kingdom", spt_kingdom_caravan), (try_end), ## (try_begin), ## (store_random_in_range, ":random_no", 0, 100), ## (lt, ":random_no", 10), ## (call_script, "script_create_kingdom_party_if_below_limit", ":cur_kingdom", spt_prisoner_train), ## (try_end), (try_end), ]), #Swadians # (0.0, 0.0, ti_once, [], [(assign,"$peak_swadian_foragers",4)]), # (0.0, 0.0, ti_once, [], [(assign,"$peak_swadian_scouts",4)]), # (0.0, 0.0, ti_once, [], [(assign,"$peak_swadian_harassers",3)]), # (0.0, 0.0, ti_once, [], [(assign,"$peak_swadian_war_parties",2)]), # (10.2, 0, 0.0, [], # [ # (assign, "$pin_faction", "fac_swadians"), # (assign, "$pin_party_template", "pt_swadian_foragers"), # (assign, "$pin_limit", "$peak_swadian_foragers"), # (call_script,"script_cf_spawn_party_at_faction_town_if_below_limit"), # ]), # (10.2, 0, 0.0, [], # [ # (assign, "$pin_faction", "fac_swadians"), # (assign, "$pin_party_template", "pt_swadian_scouts"), # (assign, "$pin_limit", "$peak_swadian_scouts"), # (call_script,"script_cf_spawn_party_at_faction_town_if_below_limit"), # ]), # (10.2, 0, 0.0, [], # [ # (assign, "$pin_faction", "fac_swadians"), # (assign, "$pin_party_template", "pt_swadian_patrol"), # (assign, "$pin_limit", "$peak_swadian_harassers"), # (call_script,"script_cf_spawn_party_at_faction_town_if_below_limit"), # ]), # (10.2, 0, 0.0, [], # [ # (assign, "$pin_faction", "fac_swadians"), # (assign, "$pin_party_template", "pt_swadian_war_party"), # (assign, "$pin_limit", "$peak_swadian_war_parties"), # (call_script,"script_cf_spawn_party_at_faction_town_if_below_limit"), # ]), #Vaegirs # (0.0, 0.0, ti_once, [], [(assign,"$peak_vaegir_foragers",4)]), # (0.0, 0.0, ti_once, [], [(assign,"$peak_vaegir_scouts",4)]), # (0.0, 0.0, ti_once, [], [(assign,"$peak_vaegir_harassers",3)]), # (0.0, 0.0, ti_once, [], [(assign,"$peak_vaegir_war_parties",2)]), # (10.2, 0, 0.0, [], # [ # (assign, "$pin_faction", "fac_vaegirs"), # (assign, "$pin_party_template", "pt_vaegir_foragers"), # (assign, "$pin_limit", "$peak_vaegir_foragers"), # (call_script,"script_cf_spawn_party_at_faction_town_if_below_limit"), # ]), # (10.2, 0, 0.0, [], # [ # (assign, "$pin_faction", "fac_vaegirs"), # (assign, "$pin_party_template", "pt_vaegir_scouts"), # (assign, "$pin_limit", "$peak_vaegir_scouts"), # (call_script,"script_cf_spawn_party_at_faction_town_if_below_limit"), # ]), # (10.2, 0, 0.0, [], # [ # (assign, "$pin_faction", "fac_vaegirs"), # (assign, "$pin_party_template", "pt_vaegir_patrol"), # (assign, "$pin_limit", "$peak_vaegir_harassers"), # (call_script,"script_cf_spawn_party_at_faction_town_if_below_limit"), # ]), # (10.2, 0, 0.0, [], # [ # (assign, "$pin_faction", "fac_vaegirs"), # (assign, "$pin_party_template", "pt_vaegir_war_party"), # (assign, "$pin_limit", "$peak_vaegir_war_parties"), # (call_script,"script_cf_spawn_party_at_faction_town_if_below_limit"), # ]), #Villains etc. # (14.2, 0, 0.0, [], # [ # (assign, "$pin_faction", "fac_sea_raiders"), # (assign, "$pin_party_template", "pt_sea_raiders"), # (assign, "$pin_limit", 5), # (call_script,"script_cf_spawn_party_at_faction_town_if_below_limit"), # ]), # ## (10.1, 0, 0.0, [], ## [ ## (assign, "$pin_party_template", "pt_refugees"), ## (assign, "$pin_limit", 5), ## (call_script,"script_cf_spawn_party_at_random_town_if_below_limit"), ## ]), ## ## (10.1, 0, 0.0, [], ## [ ## (assign, "$pin_party_template", "pt_farmers"), ## (assign, "$pin_limit", 6), ## (call_script,"script_cf_spawn_party_at_random_town_if_below_limit"), ## ]), # [1.0, 96.0, ti_once, [], [[assign,"$peak_dark_hunters",3]]], ## (10.1, 0, 0.0, [], ## [ ## (assign, "$pin_party_template", "pt_dark_hunters"), ## (assign, "$pin_limit", "$peak_dark_hunters"), ## (call_script,"script_cf_spawn_party_at_random_town_if_below_limit"), ## ]), #Companion quests ## (0, 0, ti_once, ## [ ## (entering_town,"p_town_1"), ## (main_party_has_troop,"trp_borcha"), ## (eq,"$borcha_freed",0) ## ], ## ## [ ## (assign,"$borcha_arrive_sargoth_as_prisoner",1), ## (start_map_conversation,"trp_borcha") ## ] ## ), ## ## (1, 0, ti_once, ## [ ## (map_free,0), ## (eq,"$borcha_asked_for_freedom",0), ## (main_party_has_troop,"trp_borcha") ## ], ## [ ## (start_map_conversation,"trp_borcha") ## ] ## ), ## ## (2, 0, ti_once, ## [ ## (map_free, 0), ## (neq,"$borcha_asked_for_freedom",0), ## (eq,"$borcha_freed",0), ## (main_party_has_troop,"trp_borcha") ## ], ## [ ## (start_map_conversation,"trp_borcha"), ## ] ## ), ##### TODO: QUESTS COMMENT OUT BEGIN ########################################################################### ### Random Governer Quest triggers ########################################################################### # Incriminate Loyal Advisor quest (0.2, 0.0, 0.0, [ (check_quest_active, "qst_incriminate_loyal_commander"), (neg|check_quest_concluded, "qst_incriminate_loyal_commander"), (quest_slot_eq, "qst_incriminate_loyal_commander", slot_quest_current_state, 2), (quest_get_slot, ":quest_target_center", "qst_incriminate_loyal_commander", slot_quest_target_center), (quest_get_slot, ":quest_target_party", "qst_incriminate_loyal_commander", slot_quest_target_party), (try_begin), (neg|party_is_active, ":quest_target_party"), (quest_set_slot, "qst_incriminate_loyal_commander", slot_quest_current_state, 3), (call_script, "script_fail_quest", "qst_incriminate_loyal_commander"), (else_try), (party_is_in_town, ":quest_target_party", ":quest_target_center"), (remove_party, ":quest_target_party"), (quest_set_slot, "qst_incriminate_loyal_commander", slot_quest_current_state, 3), (quest_get_slot, ":quest_object_troop", "qst_incriminate_loyal_commander", slot_quest_object_troop), (assign, ":num_available_factions", 0), (try_for_range, ":faction_no", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":faction_no", slot_faction_state, sfs_active), (neq, ":faction_no", "fac_player_supporters_faction"), (neg|quest_slot_eq, "qst_incriminate_loyal_commander", slot_quest_target_faction, ":faction_no"), (val_add, ":num_available_factions", 1), (try_end), (try_begin), (gt, ":num_available_factions", 0), (store_random_in_range, ":random_faction", 0, ":num_available_factions"), (assign, ":target_faction", -1), (try_for_range, ":faction_no", kingdoms_begin, kingdoms_end), (eq, ":target_faction", -1), (faction_slot_eq, ":faction_no", slot_faction_state, sfs_active), (neq, ":faction_no", "fac_player_supporters_faction"), (neg|quest_slot_eq, "qst_incriminate_loyal_commander", slot_quest_target_faction, ":faction_no"), (val_sub, ":random_faction", 1), (lt, ":random_faction", 0), (assign, ":target_faction", ":faction_no"), (try_end), (try_end), (try_begin), (gt, ":target_faction", 0), (call_script, "script_change_troop_faction", ":quest_object_troop", ":target_faction"), (else_try), (call_script, "script_change_troop_faction", ":quest_object_troop", "fac_robber_knights"), (try_end), (call_script, "script_succeed_quest", "qst_incriminate_loyal_commander"), (try_end), ], [] ), # Runaway Peasants quest (0.2, 0.0, 0.0, [ (check_quest_active, "qst_bring_back_runaway_serfs"), (neg|check_quest_concluded, "qst_bring_back_runaway_serfs"), (quest_get_slot, ":quest_object_center", "qst_bring_back_runaway_serfs", slot_quest_object_center), (quest_get_slot, ":quest_target_center", "qst_bring_back_runaway_serfs", slot_quest_target_center), (try_begin), (party_is_active, "$qst_bring_back_runaway_serfs_party_1"), (try_begin), (party_is_in_town, "$qst_bring_back_runaway_serfs_party_1", ":quest_target_center"), (remove_party, "$qst_bring_back_runaway_serfs_party_1"), (val_add, "$qst_bring_back_runaway_serfs_num_parties_fleed", 1), (else_try), (party_is_in_town, "$qst_bring_back_runaway_serfs_party_1", ":quest_object_center"), (remove_party, "$qst_bring_back_runaway_serfs_party_1"), (val_add, "$qst_bring_back_runaway_serfs_num_parties_returned", 1), (else_try), (store_distance_to_party_from_party, ":cur_distance", "p_main_party", "$qst_bring_back_runaway_serfs_party_1"), (gt, ":cur_distance", 3), (party_set_ai_object, "$qst_bring_back_runaway_serfs_party_1", ":quest_target_center"), (try_end), (try_end), (try_begin), (party_is_active, "$qst_bring_back_runaway_serfs_party_2"), (try_begin), (party_is_in_town, "$qst_bring_back_runaway_serfs_party_2", ":quest_target_center"), (remove_party, "$qst_bring_back_runaway_serfs_party_2"), (val_add, "$qst_bring_back_runaway_serfs_num_parties_fleed", 1), (else_try), (party_is_in_town, "$qst_bring_back_runaway_serfs_party_2", ":quest_object_center"), (remove_party, "$qst_bring_back_runaway_serfs_party_2"), (val_add, "$qst_bring_back_runaway_serfs_num_parties_returned", 1), (else_try), (store_distance_to_party_from_party, ":cur_distance", "p_main_party", "$qst_bring_back_runaway_serfs_party_2"), (gt, ":cur_distance", 3), (party_set_ai_object, "$qst_bring_back_runaway_serfs_party_2", ":quest_target_center"), (try_end), (try_end), (try_begin), (party_is_active, "$qst_bring_back_runaway_serfs_party_3"), (try_begin), (party_is_in_town, "$qst_bring_back_runaway_serfs_party_3", ":quest_target_center"), (remove_party, "$qst_bring_back_runaway_serfs_party_3"), (val_add, "$qst_bring_back_runaway_serfs_num_parties_fleed", 1), (else_try), (party_is_in_town, "$qst_bring_back_runaway_serfs_party_3", ":quest_object_center"), (remove_party, "$qst_bring_back_runaway_serfs_party_3"), (val_add, "$qst_bring_back_runaway_serfs_num_parties_returned", 1), (else_try), (store_distance_to_party_from_party, ":cur_distance", "p_main_party", "$qst_bring_back_runaway_serfs_party_3"), (gt, ":cur_distance", 3), (party_set_ai_object, "$qst_bring_back_runaway_serfs_party_3", ":quest_target_center"), (try_end), (try_end), (assign, ":sum_removed", "$qst_bring_back_runaway_serfs_num_parties_returned"), (val_add, ":sum_removed", "$qst_bring_back_runaway_serfs_num_parties_fleed"), (ge, ":sum_removed", 3), (try_begin), (ge, "$qst_bring_back_runaway_serfs_num_parties_returned", 3), (call_script, "script_succeed_quest", "qst_bring_back_runaway_serfs"), (else_try), (eq, "$qst_bring_back_runaway_serfs_num_parties_returned", 0), (call_script, "script_fail_quest", "qst_bring_back_runaway_serfs"), (else_try), (call_script, "script_conclude_quest", "qst_bring_back_runaway_serfs"), (try_end), ], [] ), ### Defend Nobles Against Peasants quest ## (0.2, 0.0, 0.0, ## [ ## (check_quest_active, "qst_defend_nobles_against_peasants"), ## (neg|check_quest_succeeded, "qst_defend_nobles_against_peasants"), ## (neg|check_quest_failed, "qst_defend_nobles_against_peasants"), ## (quest_get_slot, ":quest_target_center", "qst_defend_nobles_against_peasants", slot_quest_target_center), ## (assign, ":num_active_parties", 0), ## (try_begin), ## (gt, "$qst_defend_nobles_against_peasants_noble_party_1", 0), ## (party_is_active, "$qst_defend_nobles_against_peasants_noble_party_1"), ## (val_add, ":num_active_parties", 1), ## (party_is_in_town, "$qst_defend_nobles_against_peasants_noble_party_1", ":quest_target_center"), ## (remove_party, "$qst_defend_nobles_against_peasants_noble_party_1"), ## (party_get_num_companions, ":num_companions", "$qst_defend_nobles_against_peasants_noble_party_1"), ## (val_add, "$qst_defend_nobles_against_peasants_num_nobles_saved", ":num_companions"), ## (try_end), ## (try_begin), ## (gt, "$qst_defend_nobles_against_peasants_noble_party_2", 0), ## (party_is_active, "$qst_defend_nobles_against_peasants_noble_party_2"), ## (val_add, ":num_active_parties", 1), ## (party_is_in_town, "$qst_defend_nobles_against_peasants_noble_party_2", ":quest_target_center"), ## (remove_party, "$qst_defend_nobles_against_peasants_noble_party_2"), ## (party_get_num_companions, ":num_companions", "$qst_defend_nobles_against_peasants_noble_party_2"), ## (val_add, "$qst_defend_nobles_against_peasants_num_nobles_saved", ":num_companions"), ## (try_end), ## (try_begin), ## (gt, "$qst_defend_nobles_against_peasants_noble_party_3", 0), ## (party_is_active, "$qst_defend_nobles_against_peasants_noble_party_3"), ## (val_add, ":num_active_parties", 1), ## (party_is_in_town, "$qst_defend_nobles_against_peasants_noble_party_3", ":quest_target_center"), ## (remove_party, "$qst_defend_nobles_against_peasants_noble_party_3"), ## (party_get_num_companions, ":num_companions", "$qst_defend_nobles_against_peasants_noble_party_3"), ## (val_add, "$qst_defend_nobles_against_peasants_num_nobles_saved", ":num_companions"), ## (try_end), ## (try_begin), ## (gt, "$qst_defend_nobles_against_peasants_noble_party_4", 0), ## (party_is_active, "$qst_defend_nobles_against_peasants_noble_party_4"), ## (val_add, ":num_active_parties", 1), ## (party_is_in_town, "$qst_defend_nobles_against_peasants_noble_party_4", ":quest_target_center"), ## (remove_party, "$qst_defend_nobles_against_peasants_noble_party_4"), ## (party_get_num_companions, ":num_companions", "$qst_defend_nobles_against_peasants_noble_party_4"), ## (val_add, "$qst_defend_nobles_against_peasants_num_nobles_saved", ":num_companions"), ## (try_end), ## (try_begin), ## (gt, "$qst_defend_nobles_against_peasants_noble_party_5", 0), ## (party_is_active, "$qst_defend_nobles_against_peasants_noble_party_5"), ## (val_add, ":num_active_parties", 1), ## (party_is_in_town, "$qst_defend_nobles_against_peasants_noble_party_5", ":quest_target_center"), ## (remove_party, "$qst_defend_nobles_against_peasants_noble_party_5"), ## (party_get_num_companions, ":num_companions", "$qst_defend_nobles_against_peasants_noble_party_5"), ## (val_add, "$qst_defend_nobles_against_peasants_num_nobles_saved", ":num_companions"), ## (try_end), ## (try_begin), ## (gt, "$qst_defend_nobles_against_peasants_noble_party_6", 0), ## (party_is_active, "$qst_defend_nobles_against_peasants_noble_party_6"), ## (val_add, ":num_active_parties", 1), ## (party_is_in_town, "$qst_defend_nobles_against_peasants_noble_party_6", ":quest_target_center"), ## (remove_party, "$qst_defend_nobles_against_peasants_noble_party_6"), ## (party_get_num_companions, ":num_companions", "$qst_defend_nobles_against_peasants_noble_party_6"), ## (val_add, "$qst_defend_nobles_against_peasants_num_nobles_saved", ":num_companions"), ## (try_end), ## (try_begin), ## (gt, "$qst_defend_nobles_against_peasants_noble_party_7", 0), ## (party_is_active, "$qst_defend_nobles_against_peasants_noble_party_7"), ## (val_add, ":num_active_parties", 1), ## (party_is_in_town, "$qst_defend_nobles_against_peasants_noble_party_7", ":quest_target_center"), ## (remove_party, "$qst_defend_nobles_against_peasants_noble_party_7"), ## (party_get_num_companions, ":num_companions", "$qst_defend_nobles_against_peasants_noble_party_7"), ## (val_add, "$qst_defend_nobles_against_peasants_num_nobles_saved", ":num_companions"), ## (try_end), ## (try_begin), ## (gt, "$qst_defend_nobles_against_peasants_noble_party_8", 0), ## (party_is_active, "$qst_defend_nobles_against_peasants_noble_party_8"), ## (val_add, ":num_active_parties", 1), ## (party_is_in_town, "$qst_defend_nobles_against_peasants_noble_party_8", ":quest_target_center"), ## (remove_party, "$qst_defend_nobles_against_peasants_noble_party_8"), ## (party_get_num_companions, ":num_companions", "$qst_defend_nobles_against_peasants_noble_party_8"), ## (val_add, "$qst_defend_nobles_against_peasants_num_nobles_saved", ":num_companions"), ## (try_end), ## (eq, ":num_active_parties", 0), ## (try_begin), ## (store_div, ":limit", "$qst_defend_nobles_against_peasants_num_nobles_to_save", 2), ## (ge, "$qst_defend_nobles_against_peasants_num_nobles_saved", ":limit"), ## (call_script, "script_succeed_quest", "qst_defend_nobles_against_peasants"), ## (else_try), ## (call_script, "script_fail_quest", "qst_defend_nobles_against_peasants"), ## (try_end), ## ], ## [] ## ), ### Capture Conspirators quest ## (0.15, 0.0, 0.0, ## [ ## (check_quest_active, "qst_capture_conspirators"), ## (neg|check_quest_succeeded, "qst_capture_conspirators"), ## (neg|check_quest_failed, "qst_capture_conspirators"), ## (quest_get_slot, ":quest_target_center", "qst_capture_conspirators", slot_quest_target_center), ## (quest_get_slot, ":faction_no", "qst_capture_conspirators", slot_quest_target_faction), ## (try_begin), ## (gt, "$qst_capture_conspirators_num_parties_to_spawn", "$qst_capture_conspirators_num_parties_spawned"), ## (store_random_in_range, ":random_no", 0, 100), ## (lt, ":random_no", 20), ## (set_spawn_radius, 3), ## (spawn_around_party,":quest_target_center","pt_conspirator"), ## (val_add, "$qst_capture_conspirators_num_parties_spawned", 1), ## (party_get_num_companions, ":num_companions", reg0), ## (val_add, "$qst_capture_conspirators_num_troops_to_capture", ":num_companions"), ## (party_set_ai_behavior, reg0, ai_bhvr_travel_to_party), ## (party_set_ai_object, reg0, "$qst_capture_conspirators_party_1"), ## (party_set_flags, reg0, pf_default_behavior, 0), ## (try_begin), ## (le, "$qst_capture_conspirators_party_2", 0), ## (assign, "$qst_capture_conspirators_party_2", reg0), ## (else_try), ## (le, "$qst_capture_conspirators_party_3", 0), ## (assign, "$qst_capture_conspirators_party_3", reg0), ## (else_try), ## (le, "$qst_capture_conspirators_party_4", 0), ## (assign, "$qst_capture_conspirators_party_4", reg0), ## (else_try), ## (le, "$qst_capture_conspirators_party_5", 0), ## (assign, "$qst_capture_conspirators_party_5", reg0), ## (else_try), ## (le, "$qst_capture_conspirators_party_6", 0), ## (assign, "$qst_capture_conspirators_party_6", reg0), ## (else_try), ## (le, "$qst_capture_conspirators_party_7", 0), ## (assign, "$qst_capture_conspirators_party_7", reg0), ## (try_end), ## (try_end), ## ## (assign, ":num_active_parties", 0), ## ## (try_begin), ## (gt, "$qst_capture_conspirators_party_1", 0), ## (party_is_active, "$qst_capture_conspirators_party_1"), ## (val_add, ":num_active_parties", 1), ## (try_begin), ## (party_is_in_any_town, "$qst_capture_conspirators_party_1"), ## (remove_party, "$qst_capture_conspirators_party_1"), ## (else_try), ## (party_get_num_attached_parties, ":num_attachments", "$qst_capture_conspirators_party_1"), ## (gt, ":num_attachments", 0), ## (assign, ":leave_meeting", 0), ## (try_begin), ## (store_sub, ":required_attachments", "$qst_capture_conspirators_num_parties_to_spawn", 1), ## (eq, ":num_attachments", ":required_attachments"), ## (val_add, "$qst_capture_conspirators_leave_meeting_counter", 1), ## (ge, "$qst_capture_conspirators_leave_meeting_counter", 15), ## (assign, ":leave_meeting", 1), ## (try_end), ## (try_begin), ## (eq, "$qst_capture_conspirators_num_parties_to_spawn", "$qst_capture_conspirators_num_parties_spawned"), ## (store_distance_to_party_from_party, ":cur_distance", "p_main_party", "$qst_capture_conspirators_party_1"), ## (assign, ":min_distance", 3), ## (try_begin), ## (is_currently_night), ## (assign, ":min_distance", 2), ## (try_end), ## (lt, ":cur_distance", ":min_distance"), ## (assign, "$qst_capture_conspirators_leave_meeting_counter", 15), ## (assign, ":leave_meeting", 1), ## (try_end), ## (eq, ":leave_meeting", 1), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_1", ai_bhvr_travel_to_point), ## (party_set_flags, "$qst_capture_conspirators_party_1", pf_default_behavior, 0), ## (party_get_position, pos1, "$qst_capture_conspirators_party_1"), ## (call_script, "script_map_get_random_position_around_position_within_range", 15, 17), ## (party_set_ai_target_position, "$qst_capture_conspirators_party_1", pos2), ## (try_begin), ## (gt, "$qst_capture_conspirators_party_2", 0), ## (party_detach, "$qst_capture_conspirators_party_2"), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_2", ai_bhvr_travel_to_point), ## (party_set_flags, "$qst_capture_conspirators_party_2", pf_default_behavior, 0), ## (call_script, "script_map_get_random_position_around_position_within_range", 15, 17), ## (party_set_ai_target_position, "$qst_capture_conspirators_party_2", pos2), ## (try_end), ## (try_begin), ## (gt, "$qst_capture_conspirators_party_3", 0), ## (party_detach, "$qst_capture_conspirators_party_3"), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_3", ai_bhvr_travel_to_point), ## (party_set_flags, "$qst_capture_conspirators_party_3", pf_default_behavior, 0), ## (call_script, "script_map_get_random_position_around_position_within_range", 15, 17), ## (party_set_ai_target_position, "$qst_capture_conspirators_party_3", pos2), ## (try_end), ## (try_begin), ## (gt, "$qst_capture_conspirators_party_4", 0), ## (party_detach, "$qst_capture_conspirators_party_4"), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_4", ai_bhvr_travel_to_point), ## (party_set_flags, "$qst_capture_conspirators_party_4", pf_default_behavior, 0), ## (call_script, "script_map_get_random_position_around_position_within_range", 15, 17), ## (party_set_ai_target_position, "$qst_capture_conspirators_party_4", pos2), ## (try_end), ## (try_begin), ## (gt, "$qst_capture_conspirators_party_5", 0), ## (party_detach, "$qst_capture_conspirators_party_5"), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_5", ai_bhvr_travel_to_point), ## (party_set_flags, "$qst_capture_conspirators_party_5", pf_default_behavior, 0), ## (call_script, "script_map_get_random_position_around_position_within_range", 15, 17), ## (party_set_ai_target_position, "$qst_capture_conspirators_party_5", pos2), ## (try_end), ## (try_begin), ## (gt, "$qst_capture_conspirators_party_6", 0), ## (party_detach, "$qst_capture_conspirators_party_6"), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_6", ai_bhvr_travel_to_point), ## (party_set_flags, "$qst_capture_conspirators_party_6", pf_default_behavior, 0), ## (call_script, "script_map_get_random_position_around_position_within_range", 15, 17), ## (party_set_ai_target_position, "$qst_capture_conspirators_party_6", pos2), ## (try_end), ## (try_begin), ## (gt, "$qst_capture_conspirators_party_7", 0), ## (party_detach, "$qst_capture_conspirators_party_7"), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_7", ai_bhvr_travel_to_point), ## (party_set_flags, "$qst_capture_conspirators_party_7", pf_default_behavior, 0), ## (call_script, "script_map_get_random_position_around_position_within_range", 15, 17), ## (party_set_ai_target_position, "$qst_capture_conspirators_party_7", pos2), ## (try_end), ## (try_end), ## (try_begin), ## (get_party_ai_behavior, ":ai_behavior", "$qst_capture_conspirators_party_1"), ## (eq, ":ai_behavior", ai_bhvr_travel_to_point), ## (party_get_ai_target_position, pos2, "$qst_capture_conspirators_party_1"), ## (party_get_position, pos1, "$qst_capture_conspirators_party_1"), ## (get_distance_between_positions, ":distance", pos2, pos1), ## (lt, ":distance", 200), ## (call_script, "script_get_closest_walled_center_of_faction", "$qst_capture_conspirators_party_1", ":faction_no"),#Can fail ## (ge, reg0, 0), ## (party_set_ai_object, "$qst_capture_conspirators_party_1", reg0), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_1", ai_bhvr_travel_to_party), ## (party_set_flags, "$qst_capture_conspirators_party_1", pf_default_behavior, 0), ## (try_end), ## (try_end), ## (try_begin), ## (gt, "$qst_capture_conspirators_party_2", 0), ## (party_is_active, "$qst_capture_conspirators_party_2"), ## (val_add, ":num_active_parties", 1), ## (try_begin), ## (party_is_in_any_town, "$qst_capture_conspirators_party_2"), ## (try_begin), ## (neg|party_is_in_town, "$qst_capture_conspirators_party_2", "$qst_capture_conspirators_party_1"), ## (remove_party, "$qst_capture_conspirators_party_2"), ## (else_try), ## (get_party_ai_behavior, ":ai_behavior", "$qst_capture_conspirators_party_2"), ## (neq, ":ai_behavior", ai_bhvr_hold), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_2", ai_bhvr_hold), ## (party_attach_to_party, "$qst_capture_conspirators_party_2", "$qst_capture_conspirators_party_1"), ## (party_set_flags, "$qst_capture_conspirators_party_2", pf_default_behavior, 0), ## (try_end), ## (try_end), ## (try_begin), ## (get_party_ai_behavior, ":ai_behavior", "$qst_capture_conspirators_party_2"), ## (eq, ":ai_behavior", ai_bhvr_travel_to_point), ## (party_get_ai_target_position, pos2, "$qst_capture_conspirators_party_2"), ## (party_get_position, pos1, "$qst_capture_conspirators_party_2"), ## (get_distance_between_positions, ":distance", pos2, pos1), ## (lt, ":distance", 200), ## (call_script, "script_get_closest_walled_center_of_faction", "$qst_capture_conspirators_party_2", ":faction_no"),#Can fail ## (ge, reg0, 0), ## (party_set_ai_object, "$qst_capture_conspirators_party_2", reg0), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_2", ai_bhvr_travel_to_party), ## (party_set_flags, "$qst_capture_conspirators_party_2", pf_default_behavior, 0), ## (try_end), ## (try_end), ## (try_begin), ## (gt, "$qst_capture_conspirators_party_3", 0), ## (party_is_active, "$qst_capture_conspirators_party_3"), ## (val_add, ":num_active_parties", 1), ## (try_begin), ## (party_is_in_any_town, "$qst_capture_conspirators_party_3"), ## (try_begin), ## (neg|party_is_in_town, "$qst_capture_conspirators_party_3", "$qst_capture_conspirators_party_1"), ## (remove_party, "$qst_capture_conspirators_party_3"), ## (else_try), ## (get_party_ai_behavior, ":ai_behavior", "$qst_capture_conspirators_party_3"), ## (neq, ":ai_behavior", ai_bhvr_hold), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_3", ai_bhvr_hold), ## (party_attach_to_party, "$qst_capture_conspirators_party_3", "$qst_capture_conspirators_party_1"), ## (party_set_flags, "$qst_capture_conspirators_party_3", pf_default_behavior, 0), ## (try_end), ## (try_end), ## (try_begin), ## (get_party_ai_behavior, ":ai_behavior", "$qst_capture_conspirators_party_3"), ## (eq, ":ai_behavior", ai_bhvr_travel_to_point), ## (party_get_ai_target_position, pos2, "$qst_capture_conspirators_party_3"), ## (party_get_position, pos1, "$qst_capture_conspirators_party_3"), ## (get_distance_between_positions, ":distance", pos2, pos1), ## (lt, ":distance", 200), ## (call_script, "script_get_closest_walled_center_of_faction", "$qst_capture_conspirators_party_3", ":faction_no"),#Can fail ## (ge, reg0, 0), ## (party_set_ai_object, "$qst_capture_conspirators_party_3", reg0), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_3", ai_bhvr_travel_to_party), ## (party_set_flags, "$qst_capture_conspirators_party_3", pf_default_behavior, 0), ## (try_end), ## (try_end), ## (try_begin), ## (gt, "$qst_capture_conspirators_party_4", 0), ## (party_is_active, "$qst_capture_conspirators_party_4"), ## (val_add, ":num_active_parties", 1), ## (try_begin), ## (party_is_in_any_town, "$qst_capture_conspirators_party_4"), ## (try_begin), ## (neg|party_is_in_town, "$qst_capture_conspirators_party_4", "$qst_capture_conspirators_party_1"), ## (remove_party, "$qst_capture_conspirators_party_4"), ## (else_try), ## (get_party_ai_behavior, ":ai_behavior", "$qst_capture_conspirators_party_4"), ## (neq, ":ai_behavior", ai_bhvr_hold), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_4", ai_bhvr_hold), ## (party_set_flags, "$qst_capture_conspirators_party_4", pf_default_behavior, 0), ## (party_attach_to_party, "$qst_capture_conspirators_party_4", "$qst_capture_conspirators_party_1"), ## (try_end), ## (try_end), ## (try_begin), ## (get_party_ai_behavior, ":ai_behavior", "$qst_capture_conspirators_party_4"), ## (eq, ":ai_behavior", ai_bhvr_travel_to_point), ## (party_get_ai_target_position, pos2, "$qst_capture_conspirators_party_4"), ## (party_get_position, pos1, "$qst_capture_conspirators_party_4"), ## (get_distance_between_positions, ":distance", pos2, pos1), ## (lt, ":distance", 200), ## (call_script, "script_get_closest_walled_center_of_faction", "$qst_capture_conspirators_party_4", ":faction_no"),#Can fail ## (ge, reg0, 0), ## (party_set_ai_object, "$qst_capture_conspirators_party_4", reg0), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_4", ai_bhvr_travel_to_party), ## (party_set_flags, "$qst_capture_conspirators_party_4", pf_default_behavior, 0), ## (try_end), ## (try_end), ## (try_begin), ## (gt, "$qst_capture_conspirators_party_5", 0), ## (party_is_active, "$qst_capture_conspirators_party_5"), ## (val_add, ":num_active_parties", 1), ## (try_begin), ## (party_is_in_any_town, "$qst_capture_conspirators_party_5"), ## (try_begin), ## (neg|party_is_in_town, "$qst_capture_conspirators_party_5", "$qst_capture_conspirators_party_1"), ## (remove_party, "$qst_capture_conspirators_party_5"), ## (else_try), ## (get_party_ai_behavior, ":ai_behavior", "$qst_capture_conspirators_party_5"), ## (neq, ":ai_behavior", ai_bhvr_hold), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_5", ai_bhvr_hold), ## (party_set_flags, "$qst_capture_conspirators_party_5", pf_default_behavior, 0), ## (party_attach_to_party, "$qst_capture_conspirators_party_5", "$qst_capture_conspirators_party_1"), ## (try_end), ## (try_end), ## (try_begin), ## (get_party_ai_behavior, ":ai_behavior", "$qst_capture_conspirators_party_5"), ## (eq, ":ai_behavior", ai_bhvr_travel_to_point), ## (party_get_ai_target_position, pos2, "$qst_capture_conspirators_party_5"), ## (party_get_position, pos1, "$qst_capture_conspirators_party_5"), ## (get_distance_between_positions, ":distance", pos2, pos1), ## (lt, ":distance", 200), ## (call_script, "script_get_closest_walled_center_of_faction", "$qst_capture_conspirators_party_5", ":faction_no"),#Can fail ## (ge, reg0, 0), ## (party_set_ai_object, "$qst_capture_conspirators_party_5", reg0), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_5", ai_bhvr_travel_to_party), ## (party_set_flags, "$qst_capture_conspirators_party_5", pf_default_behavior, 0), ## (try_end), ## (try_end), ## (try_begin), ## (gt, "$qst_capture_conspirators_party_6", 0), ## (party_is_active, "$qst_capture_conspirators_party_6"), ## (val_add, ":num_active_parties", 1), ## (try_begin), ## (party_is_in_any_town, "$qst_capture_conspirators_party_6"), ## (try_begin), ## (neg|party_is_in_town, "$qst_capture_conspirators_party_6", "$qst_capture_conspirators_party_1"), ## (remove_party, "$qst_capture_conspirators_party_6"), ## (else_try), ## (get_party_ai_behavior, ":ai_behavior", "$qst_capture_conspirators_party_6"), ## (neq, ":ai_behavior", ai_bhvr_hold), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_6", ai_bhvr_hold), ## (party_set_flags, "$qst_capture_conspirators_party_6", pf_default_behavior, 0), ## (party_attach_to_party, "$qst_capture_conspirators_party_6", "$qst_capture_conspirators_party_1"), ## (try_end), ## (try_end), ## (try_begin), ## (get_party_ai_behavior, ":ai_behavior", "$qst_capture_conspirators_party_6"), ## (eq, ":ai_behavior", ai_bhvr_travel_to_point), ## (party_get_ai_target_position, pos2, "$qst_capture_conspirators_party_6"), ## (party_get_position, pos1, "$qst_capture_conspirators_party_6"), ## (get_distance_between_positions, ":distance", pos2, pos1), ## (lt, ":distance", 200), ## (call_script, "script_get_closest_walled_center_of_faction", "$qst_capture_conspirators_party_6", ":faction_no"),#Can fail ## (ge, reg0, 0), ## (party_set_ai_object, "$qst_capture_conspirators_party_6", reg0), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_6", ai_bhvr_travel_to_party), ## (party_set_flags, "$qst_capture_conspirators_party_6", pf_default_behavior, 0), ## (try_end), ## (try_end), ## (try_begin), ## (gt, "$qst_capture_conspirators_party_7", 0), ## (party_is_active, "$qst_capture_conspirators_party_7"), ## (val_add, ":num_active_parties", 1), ## (try_begin), ## (party_is_in_any_town, "$qst_capture_conspirators_party_7"), ## (try_begin), ## (neg|party_is_in_town, "$qst_capture_conspirators_party_7", "$qst_capture_conspirators_party_1"), ## (remove_party, "$qst_capture_conspirators_party_7"), ## (else_try), ## (get_party_ai_behavior, ":ai_behavior", "$qst_capture_conspirators_party_7"), ## (neq, ":ai_behavior", ai_bhvr_hold), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_7", ai_bhvr_hold), ## (party_set_flags, "$qst_capture_conspirators_party_7", pf_default_behavior, 0), ## (party_attach_to_party, "$qst_capture_conspirators_party_7", "$qst_capture_conspirators_party_1"), ## (try_end), ## (try_end), ## (try_begin), ## (get_party_ai_behavior, ":ai_behavior", "$qst_capture_conspirators_party_7"), ## (eq, ":ai_behavior", ai_bhvr_travel_to_point), ## (party_get_ai_target_position, pos2, "$qst_capture_conspirators_party_7"), ## (party_get_position, pos1, "$qst_capture_conspirators_party_7"), ## (get_distance_between_positions, ":distance", pos2, pos1), ## (lt, ":distance", 200), ## (call_script, "script_get_closest_walled_center_of_faction", "$qst_capture_conspirators_party_7", ":faction_no"),#Can fail ## (ge, reg0, 0), ## (party_set_ai_object, "$qst_capture_conspirators_party_7", reg0), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_7", ai_bhvr_travel_to_party), ## (party_set_flags, "$qst_capture_conspirators_party_7", pf_default_behavior, 0), ## (try_end), ## (try_end), ## ## (eq, ":num_active_parties", 0), ## (party_count_prisoners_of_type, ":count_captured_conspirators", "p_main_party", "trp_conspirator"), ## (party_count_prisoners_of_type, ":count_captured_conspirator_leaders", "p_main_party", "trp_conspirator_leader"), ## (val_add, ":count_captured_conspirators", ":count_captured_conspirator_leaders"), ## (try_begin), ## (store_div, ":limit", "$qst_capture_conspirators_num_troops_to_capture", 2), ## (gt, ":count_captured_conspirators", ":limit"), ## (call_script, "script_succeed_quest", "qst_capture_conspirators"), ## (else_try), ## (call_script, "script_fail_quest", "qst_capture_conspirators"), ## (try_end), ## ], ## [] ## ), # Follow Spy quest (0.5, 0.0, 0.0, [ (check_quest_active, "qst_follow_spy"), (eq, "$qst_follow_spy_no_active_parties", 0), (quest_get_slot, ":quest_giver_center", "qst_follow_spy", slot_quest_giver_center), (quest_get_slot, ":quest_object_center", "qst_follow_spy", slot_quest_object_center), (assign, ":abort_meeting", 0), (try_begin), (this_or_next|eq, "$qst_follow_spy_run_away", 1), (this_or_next|neg|party_is_active, "$qst_follow_spy_spy_party"), (neg|party_is_active, "$qst_follow_spy_spy_partners_party"), (else_try), (eq, "$qst_follow_spy_meeting_state", 0), (store_distance_to_party_from_party, ":cur_distance", "p_main_party", "$qst_follow_spy_spy_party"), (try_begin), (assign, ":min_distance", 3), (try_begin), (is_currently_night), (assign, ":min_distance", 1), (try_end), (le, ":cur_distance", ":min_distance"), (store_distance_to_party_from_party, ":player_distance_to_quest_giver_center", "p_main_party", ":quest_giver_center"), (gt, ":player_distance_to_quest_giver_center", 1), (assign, ":abort_meeting", 1), (assign, "$qst_follow_spy_run_away", 1), (display_message, "str_qst_follow_spy_noticed_you"), (else_try), (store_distance_to_party_from_party, ":cur_distance", "$qst_follow_spy_spy_partners_party", "$qst_follow_spy_spy_party"), (le, ":cur_distance", 1), (party_attach_to_party, "$qst_follow_spy_spy_party", "$qst_follow_spy_spy_partners_party"), (assign, "$qst_follow_spy_meeting_state", 1), (assign, "$qst_follow_spy_meeting_counter", 0), (try_end), (else_try), (eq, "$qst_follow_spy_meeting_state", 1), (store_distance_to_party_from_party, ":cur_distance", "p_main_party", "$qst_follow_spy_spy_partners_party"), (try_begin), (le, ":cur_distance", 1), (party_detach, "$qst_follow_spy_spy_party"), (assign, ":abort_meeting", 1), (assign, "$qst_follow_spy_run_away", 1), (display_message, "str_qst_follow_spy_noticed_you"), (else_try), (val_add, "$qst_follow_spy_meeting_counter", 1), (gt, "$qst_follow_spy_meeting_counter", 4), (party_detach, "$qst_follow_spy_spy_party"), (assign, ":abort_meeting", 0), (assign, "$qst_follow_spy_meeting_state", 2), (try_end), (try_end), (try_begin), (eq, ":abort_meeting", 1), (party_set_ai_object, "$qst_follow_spy_spy_party", ":quest_giver_center"), (party_set_ai_object, "$qst_follow_spy_spy_partners_party", ":quest_object_center"), (party_set_ai_behavior, "$qst_follow_spy_spy_party", ai_bhvr_travel_to_party), (party_set_ai_behavior, "$qst_follow_spy_spy_partners_party", ai_bhvr_travel_to_party), (party_set_flags, "$qst_follow_spy_spy_party", pf_default_behavior, 0), (party_set_flags, "$qst_follow_spy_spy_partners_party", pf_default_behavior, 0), (try_end), (assign, ":num_active", 0), (try_begin), (party_is_active, "$qst_follow_spy_spy_party"), (val_add, ":num_active", 1), (party_is_in_town, "$qst_follow_spy_spy_party", ":quest_giver_center"), (remove_party, "$qst_follow_spy_spy_party"), (assign, "$qst_follow_spy_spy_back_in_town", 1), (val_sub, ":num_active", 1), (try_end), (try_begin), (party_is_active, "$qst_follow_spy_spy_partners_party"), (val_add, ":num_active", 1), (party_is_in_town, "$qst_follow_spy_spy_partners_party", ":quest_object_center"), (remove_party, "$qst_follow_spy_spy_partners_party"), (assign, "$qst_follow_spy_partner_back_in_town", 1), (val_sub, ":num_active", 1), (try_end), (try_begin), (eq, "$qst_follow_spy_partner_back_in_town",1), (eq, "$qst_follow_spy_spy_back_in_town",1), (call_script, "script_fail_quest", "qst_follow_spy"), (try_end), (try_begin), (eq, ":num_active", 0), (assign, "$qst_follow_spy_no_active_parties", 1), (party_count_prisoners_of_type, ":num_spies", "p_main_party", "trp_spy"), (party_count_prisoners_of_type, ":num_spy_partners", "p_main_party", "trp_spy_partner"), (gt, ":num_spies", 0), (gt, ":num_spy_partners", 0), (call_script, "script_succeed_quest", "qst_follow_spy"), (try_end), ], [] ), ### Raiders quest ## (0.95, 0.0, 0.2, ## [ ## (check_quest_active, "qst_hunt_down_raiders"), ## (neg|check_quest_succeeded, "qst_hunt_down_raiders"), ## (neg|check_quest_failed, "qst_hunt_down_raiders"), ## ], ## [ ## (quest_get_slot, ":quest_target_party", "qst_hunt_down_raiders", slot_quest_target_party), ## (party_set_ai_behavior, ":quest_target_party", ai_bhvr_hold), ## (party_set_flags, ":quest_target_party", pf_default_behavior, 0), ## ] ## ), ## ## (0.7, 0, 0.2, ## [ ## (check_quest_active, "qst_hunt_down_raiders"), ## (neg|check_quest_succeeded, "qst_hunt_down_raiders"), ## (neg|check_quest_failed, "qst_hunt_down_raiders"), ## ], ## [ ## (quest_get_slot, ":quest_target_party", "qst_hunt_down_raiders", slot_quest_target_party), ## (party_set_ai_behavior,":quest_target_party",ai_bhvr_travel_to_party), ## (party_set_flags, ":quest_target_party", pf_default_behavior, 0), ## ] ## ), ## ## (0.1, 0.0, 0.0, ## [ ## (check_quest_active, "qst_hunt_down_raiders"), ## (neg|check_quest_succeeded, "qst_hunt_down_raiders"), ## (neg|check_quest_failed, "qst_hunt_down_raiders"), ## (quest_get_slot, ":quest_target_party", "qst_hunt_down_raiders", slot_quest_target_party), ## (neg|party_is_active, ":quest_target_party") ## ], ## [ ## (call_script, "script_succeed_quest", "qst_hunt_down_raiders"), ## ] ## ), ## ## (1.3, 0, 0.0, ## [ ## (check_quest_active, "qst_hunt_down_raiders"), ## (neg|check_quest_succeeded, "qst_hunt_down_raiders"), ## (neg|check_quest_failed, "qst_hunt_down_raiders"), ## (quest_get_slot, ":quest_target_party", "qst_hunt_down_raiders", slot_quest_target_party), ## (quest_get_slot, ":quest_target_center", "qst_hunt_down_raiders", slot_quest_target_center), ## (party_is_in_town,":quest_target_party",":quest_target_center") ## ], ## [ ## (call_script, "script_fail_quest", "qst_hunt_down_raiders"), ## (display_message, "str_raiders_reached_base"), ## (quest_get_slot, ":quest_target_party", "qst_hunt_down_raiders", slot_quest_target_party), ## (remove_party, ":quest_target_party"), ## ] ## ), ##### TODO: QUESTS COMMENT OUT END ######################################################################### # Random MERCHANT quest triggers #################################### # Apply interest to merchants guild debt 1% per week (24.0 * 7, 0.0, 0.0, [], [ (val_mul,"$debt_to_merchants_guild",101), (val_div,"$debt_to_merchants_guild",100) ] ), # Escort merchant caravan: (0.1, 0.0, 0.1, [(check_quest_active, "qst_escort_merchant_caravan"), (eq, "$escort_merchant_caravan_mode", 1) ], [(quest_get_slot, ":quest_target_party", "qst_escort_merchant_caravan", slot_quest_target_party), (try_begin), (party_is_active, ":quest_target_party"), (party_set_ai_behavior, ":quest_target_party", ai_bhvr_hold), (party_set_flags, ":quest_target_party", pf_default_behavior, 0), (try_end), ]), (0.1, 0.0, 0.1, [(check_quest_active, "qst_escort_merchant_caravan"), (eq, "$escort_merchant_caravan_mode", 0), ], [(quest_get_slot, ":quest_target_party", "qst_escort_merchant_caravan", slot_quest_target_party), (try_begin), (party_is_active, ":quest_target_party"), (party_set_ai_behavior, ":quest_target_party", ai_bhvr_escort_party), (party_set_flags, ":quest_target_party", pf_default_behavior, 0), (party_set_ai_object, ":quest_target_party", "p_main_party"), (try_end), ]), (0.1, 0, 0.0, [(check_quest_active, "qst_escort_merchant_caravan"), (quest_get_slot, ":quest_target_party", "qst_escort_merchant_caravan", slot_quest_target_party), (neg|party_is_active,":quest_target_party"), ], [(call_script, "script_abort_quest", "qst_escort_merchant_caravan", 2), ]), # Troublesome bandits (0.3, 0.0, 1.1, [(check_quest_active, "qst_troublesome_bandits"), (neg|check_quest_failed, "qst_troublesome_bandits"), (store_num_parties_destroyed, ":cur_eliminated", "pt_troublesome_bandits"), (lt, "$qst_troublesome_bandits_eliminated", ":cur_eliminated"), (store_num_parties_destroyed_by_player, ":cur_eliminated_by_player", "pt_troublesome_bandits"), (eq, ":cur_eliminated_by_player", "$qst_troublesome_bandits_eliminated_by_player"), ], [(display_message, "str_bandits_eliminated_by_another"), (call_script, "script_abort_quest", "qst_troublesome_bandits", 2), ]), (0.3, 0.0, 1.1, [(check_quest_active, "qst_troublesome_bandits"), (neg|check_quest_succeeded, "qst_troublesome_bandits"), (store_num_parties_destroyed, ":cur_eliminated", "pt_troublesome_bandits"), (lt, "$qst_troublesome_bandits_eliminated", ":cur_eliminated"), (store_num_parties_destroyed_by_player, ":cur_eliminated_by_player", "pt_troublesome_bandits"), (neq, ":cur_eliminated_by_player", "$qst_troublesome_bandits_eliminated_by_player"), ], [(call_script, "script_succeed_quest", "qst_troublesome_bandits"),]), # Kidnapped girl: (1, 0, 0, [(check_quest_active, "qst_kidnapped_girl"), (quest_get_slot, ":quest_target_party", "qst_kidnapped_girl", slot_quest_target_party), (party_is_active, ":quest_target_party"), (party_is_in_any_town, ":quest_target_party"), (remove_party, ":quest_target_party"), ], [] ), #Rebellion changes begin #move (0, 0, 24 * 14, [ (try_for_range, ":pretender", pretenders_begin, pretenders_end), (troop_set_slot, ":pretender", slot_troop_cur_center, 0), (neq, ":pretender", "$supported_pretender"), (troop_get_slot, ":target_faction", ":pretender", slot_troop_original_faction), (faction_slot_eq, ":target_faction", slot_faction_state, sfs_active), (faction_slot_eq, ":target_faction", slot_faction_has_rebellion_chance, 1), (neg|troop_slot_eq, ":pretender", slot_troop_occupation, slto_kingdom_hero), (try_for_range, ":unused", 0, 30), (troop_slot_eq, ":pretender", slot_troop_cur_center, 0), (store_random_in_range, ":town", towns_begin, towns_end), (store_faction_of_party, ":town_faction", ":town"), (store_relation, ":relation", ":town_faction", ":target_faction"), (le, ":relation", 0), #fail if nothing qualifies (troop_set_slot, ":pretender", slot_troop_cur_center, ":town"), (try_begin), (eq, "$cheat_mode", 1), (str_store_troop_name, 4, ":pretender"), (str_store_party_name, 5, ":town"), (display_message, "@{s4} is in {s5}"), (try_end), (try_end), # (try_for_range, ":rebel_faction", rebel_factions_begin, rebel_factions_end), # (faction_get_slot, ":rebellion_status", ":rebel_faction", slot_faction_state), # (eq, ":rebellion_status", sfs_inactive_rebellion), # (faction_get_slot, ":pretender", ":rebel_faction", slot_faction_leader), # (faction_get_slot, ":target_faction", ":rebel_faction", slot_faction_rebellion_target),# # (store_random_in_range, ":town", towns_begin, towns_end), # (store_faction_of_party, ":town_faction", ":town"), # (store_relation, ":relation", ":town_faction", ":target_faction"), # (le, ":relation", 0), #fail if nothing qualifies # (faction_set_slot, ":rebel_faction", slot_faction_inactive_leader_location, ":town"), (try_end), ], [] ), #Rebellion changes end #NPC system changes begin #Move unemployed NPCs around taverns (24 * 15, 0, 0, [ (call_script, "script_update_companion_candidates_in_taverns"), ], [] ), #Process morale and determine personality clashes (0, 0, 24, [], [ #Count NPCs in party and get the "grievance divisor", which determines how fast grievances go away #Set their relation to the player (assign, ":npcs_in_party", 0), (assign, ":grievance_divisor", 100), (try_for_range, ":npc1", companions_begin, companions_end), (main_party_has_troop, ":npc1"), (val_add, ":npcs_in_party", 1), (try_end), (val_sub, ":grievance_divisor", ":npcs_in_party"), (store_skill_level, ":persuasion_level", "skl_persuasion", "trp_player"), (val_add, ":grievance_divisor", ":persuasion_level"), (assign, reg7, ":grievance_divisor"), # (display_message, "@Process NPC changes. GD: {reg7}"), ##Activate personality clash from 24 hours ago (try_begin), #scheduled personality clashes require at least 24hrs together (gt, "$personality_clash_after_24_hrs", 0), (eq, "$disable_npc_complaints", 0), (try_begin), (troop_get_slot, ":other_npc", "$personality_clash_after_24_hrs", slot_troop_personalityclash_object), (main_party_has_troop, "$personality_clash_after_24_hrs"), (main_party_has_troop, ":other_npc"), (assign, "$npc_with_personality_clash", "$personality_clash_after_24_hrs"), (try_end), (assign, "$personality_clash_after_24_hrs", 0), (try_end), # (try_for_range, ":npc", companions_begin, companions_end), ###Reset meeting variables (troop_set_slot, ":npc", slot_troop_turned_down_twice, 0), (try_begin), (troop_slot_eq, ":npc", slot_troop_met, 1), (troop_set_slot, ":npc", slot_troop_met_previously, 1), (try_end), ###Check for coming out of retirement (troop_get_slot, ":occupation", ":npc", slot_troop_occupation), (try_begin), (eq, ":occupation", slto_retirement), (troop_get_slot, ":renown_min", ":npc", slot_troop_return_renown), (str_store_troop_name, s31, ":npc"), (troop_get_slot, ":player_renown", "trp_player", slot_troop_renown), (assign, reg4, ":player_renown"), (assign, reg5, ":renown_min"), # (display_message, "@Test {s31} for retirement return {reg4}, {reg5}."), (gt, ":player_renown", ":renown_min"), (troop_set_slot, ":npc", slot_troop_personalityclash_penalties, 0), (troop_set_slot, ":npc", slot_troop_morality_penalties, 0), (troop_set_slot, ":npc", slot_troop_occupation, 0), (try_end), (try_begin), (main_party_has_troop, ":npc"), #Check for quitting (call_script, "script_npc_morale", ":npc"), (assign, ":npc_morale", reg0), (try_begin), (lt, ":npc_morale", 20), (store_random_in_range, ":random", 0, 100), (val_add, ":npc_morale", ":random"), (lt, ":npc_morale", 20), (assign, "$npc_is_quitting", ":npc"), (try_end), #Reduce grievance over time (or augment, if party is overcrowded (troop_get_slot, ":grievance", ":npc", slot_troop_personalityclash_penalties), (val_mul, ":grievance", 90), (val_div, ":grievance", ":grievance_divisor"), (troop_set_slot, ":npc", slot_troop_personalityclash_penalties, ":grievance"), (troop_get_slot, ":grievance", ":npc", slot_troop_morality_penalties), (val_mul, ":grievance", 90), (val_div, ":grievance", ":grievance_divisor"), (troop_set_slot, ":npc", slot_troop_morality_penalties, ":grievance"), #Change personality grievance levels (try_begin), (this_or_next|troop_slot_ge, ":npc", slot_troop_personalityclash_state, 1), (eq, "$disable_npc_complaints", 1), (troop_get_slot, ":object", ":npc", slot_troop_personalityclash_object), (main_party_has_troop, ":object"), (call_script, "script_reduce_companion_morale_for_clash", ":npc", ":object", slot_troop_personalityclash_state), (try_end), (try_begin), (this_or_next|troop_slot_ge, ":npc", slot_troop_personalityclash2_state, 1), (eq, "$disable_npc_complaints", 1), (troop_get_slot, ":object", ":npc", slot_troop_personalityclash2_object), (main_party_has_troop, ":object"), (call_script, "script_reduce_companion_morale_for_clash", ":npc", ":object", slot_troop_personalityclash2_state), (try_end), (try_begin), (this_or_next|troop_slot_ge, ":npc", slot_troop_personalitymatch_state, 1), (eq, "$disable_npc_complaints", 1), (troop_get_slot, ":object", ":npc", slot_troop_personalitymatch_object), (main_party_has_troop, ":object"), (troop_get_slot, ":grievance", ":npc", slot_troop_personalityclash_penalties), (val_mul, ":grievance", 9), (val_div, ":grievance", 10), (troop_set_slot, ":npc", slot_troop_personalityclash_penalties, ":grievance"), (try_end), #Check for new personality clashes #Active personality clash 1 if at least 24 hours have passed (try_begin), (eq, "$disable_npc_complaints", 0), (eq, "$npc_with_personality_clash", 0), (eq, "$npc_with_personality_clash_2", 0), (eq, "$personality_clash_after_24_hrs", 0), (troop_slot_eq, ":npc", slot_troop_personalityclash_state, 0), (troop_get_slot, ":other_npc", ":npc", slot_troop_personalityclash_object), (main_party_has_troop, ":other_npc"), (assign, "$personality_clash_after_24_hrs", ":npc"), (try_end), #Personality clash 2 and personality match is triggered by battles (try_end), (try_end), ]), #NPC system changes end #################################### # Formation section # # refresh array parties (not sure if it's useful, and might become buggy when the savegame is during siege) #(0, 0, ti_once, [ # ], [ # (party_get_num_attached_parties, ":array_num", "p_main_party"), # (try_for_range, ":array", 0, ":array_num"), # (party_get_attached_party_with_rank, ":array_party", "p_main_party", ":array"), # (store_add, ":slot", slot_party_array_parties_begin+1, ":array"), # (party_set_slot, "p_main_party", ":slot", ":array_party"), # (try_end), # (val_add, ":array_num", 1), # (party_set_slot, "p_main_party", slot_party_array_parties_begin, ":array_num"), # ] # ), # # Formation section end #################################### ]
Python
from header_music import * #################################################################################################################### # Each track record contains the following fields: # 1) Track id: used for referencing tracks. # 2) Track file: filename of the track # 3) Track flags. See header_music.py for a list of available flags # 4) Continue Track flags: Shows in which situations or cultures the track can continue playing. See header_music.py for a list of available flags #################################################################################################################### # WARNING: You MUST add mtf_module_track flag to the flags of the tracks located under module directory tracks = [ ## ("losing_battle", "alosingbattle.mp3", sit_calm|sit_action), ## ("reluctant_hero", "reluctanthero.mp3", sit_action), ## ("the_great_hall", "thegreathall.mp3", sit_calm), ## ("requiem", "requiem.mp3", sit_calm), ## ("silent_intruder", "silentintruder.mp3", sit_calm|sit_action), ## ("the_pilgrimage", "thepilgrimage.mp3", sit_calm), ## ("ambushed", "ambushed.mp3", sit_action), ## ("triumph", "triumph.mp3", sit_action), ## ("losing_battle", "alosingbattle.mp3", mtf_sit_map_travel|mtf_sit_attack), ## ("reluctant_hero", "reluctanthero.mp3", mtf_sit_attack), ## ("the_great_hall", "thegreathall.mp3", mtf_sit_map_travel), ## ("requiem", "requiem.mp3", mtf_sit_map_travel), ## ("silent_intruder", "silentintruder.mp3", mtf_sit_map_travel|mtf_sit_attack), ## ("the_pilgrimage", "thepilgrimage.mp3", mtf_sit_map_travel), ## ("ambushed", "ambushed.mp3", mtf_sit_attack), ## ("triumph", "triumph.mp3", mtf_sit_attack), ("bogus", "cant_find_this.ogg", 0, 0), ("mount_and_blade_title_screen", "mount_and_blade_title_screen.ogg", mtf_sit_main_title|mtf_start_immediately, 0), ("ambushed_by_neutral", "ambushed_by_neutral.ogg", mtf_sit_ambushed|mtf_sit_siege, mtf_sit_fight), ("ambushed_by_khergit", "ambushed_by_khergit.ogg", mtf_culture_3|mtf_sit_ambushed|mtf_sit_siege, mtf_sit_fight|mtf_culture_all), ("ambushed_by_nord", "ambushed_by_nord.ogg", mtf_culture_4|mtf_sit_ambushed|mtf_sit_siege, mtf_sit_fight|mtf_culture_all), ("ambushed_by_rhodok", "ambushed_by_rhodok.ogg", mtf_culture_5|mtf_sit_ambushed|mtf_sit_siege, mtf_sit_fight|mtf_culture_all), ("ambushed_by_swadian", "ambushed_by_swadian.ogg", mtf_culture_1|mtf_sit_ambushed|mtf_sit_siege, mtf_sit_fight|mtf_culture_all), ("ambushed_by_vaegir", "ambushed_by_vaegir.ogg", mtf_culture_2|mtf_sit_ambushed|mtf_sit_siege, mtf_sit_fight|mtf_culture_all), ("arena_1", "arena_1.ogg", mtf_sit_arena, 0), # ("arena_2", "arena_2.ogg", mtf_looping|mtf_sit_arena, 0), ("armorer", "armorer.ogg", mtf_sit_travel, 0), ("bandit_fight", "bandit_fight.ogg", mtf_sit_fight|mtf_sit_ambushed, 0), ("calm_night_1", "calm_night_2.ogg", mtf_sit_night, mtf_sit_town|mtf_sit_tavern|mtf_sit_travel), ("captured", "capture.ogg", mtf_persist_until_finished, 0), ("defeated_by_neutral", "defeated_by_neutral.ogg",mtf_persist_until_finished|mtf_sit_killed, 0), ("defeated_by_neutral_2", "defeated_by_neutral_2.ogg", mtf_persist_until_finished|mtf_sit_killed, 0), ("defeated_by_neutral_3", "defeated_by_neutral_3.ogg", mtf_persist_until_finished|mtf_sit_killed, 0), ("empty_village", "empty_village.ogg", mtf_persist_until_finished, 0), ("encounter_hostile_nords", "encounter_hostile_nords.ogg", mtf_persist_until_finished|mtf_sit_encounter_hostile, 0), ("escape", "escape.ogg", mtf_persist_until_finished, 0), ("fight_1", "fight_1.ogg", mtf_sit_fight|mtf_sit_ambushed, 0), ("fight_2", "fight_2.ogg", mtf_sit_fight|mtf_sit_ambushed, 0), ("fight_3", "fight_3.ogg", mtf_sit_fight|mtf_sit_ambushed, 0), ("fight_as_khergit", "fight_as_khergit.ogg", mtf_culture_3|mtf_sit_fight|mtf_sit_ambushed, mtf_culture_all), ("fight_as_nord", "fight_as_nord.ogg", mtf_culture_4|mtf_sit_fight|mtf_sit_ambushed, mtf_culture_all), ("fight_as_rhodok", "fight_as_rhodok.ogg", mtf_culture_5|mtf_sit_fight|mtf_sit_ambushed, mtf_culture_all), # ("fight_as_swadian", "fight_as_swadian.ogg", mtf_culture_1|mtf_sit_fight, mtf_culture_all), ("fight_as_vaegir", "fight_as_vaegir.ogg", mtf_culture_2|mtf_sit_fight|mtf_sit_ambushed, mtf_culture_all), ("fight_while_mounted_1", "fight_while_mounted_1.ogg", mtf_sit_fight|mtf_sit_ambushed, 0), ("fight_while_mounted_2", "fight_while_mounted_2.ogg", mtf_sit_fight|mtf_sit_ambushed, 0), ("infiltration_khergit", "infiltration_khergit.ogg", mtf_culture_3|mtf_sit_town_infiltrate, mtf_culture_all), ("killed_by_khergit", "killed_by_khergit.ogg", mtf_persist_until_finished|mtf_culture_3|mtf_sit_killed, 0), # ("killed_by_neutral", "killed_by_neutral.ogg", mtf_persist_until_finished|mtf_culture_6|mtf_sit_killed, 0), # ("killed_by_nord", "killed_by_nord.ogg", mtf_persist_until_finished|mtf_culture_4|mtf_sit_killed, 0), # ("killed_by_rhodok", "killed_by_rhodok.ogg", mtf_persist_until_finished|mtf_culture_5|mtf_sit_killed, 0), ("killed_by_swadian", "killed_by_swadian.ogg", mtf_persist_until_finished|mtf_culture_1|mtf_sit_killed, 0), # ("killed_by_vaegir", "killed_by_vaegir.ogg", mtf_persist_until_finished|mtf_culture_2|mtf_sit_killed, 0), ("lords_hall_khergit", "lords_hall_khergit.ogg", mtf_culture_3|mtf_sit_travel, mtf_sit_town|mtf_sit_night|mtf_sit_tavern|mtf_culture_all), ("lords_hall_nord", "lords_hall_nord.ogg", mtf_sit_travel, mtf_sit_town|mtf_sit_night|mtf_sit_tavern), ("lords_hall_swadian", "lords_hall_swadian.ogg", mtf_sit_travel, mtf_sit_town|mtf_sit_night|mtf_sit_tavern), ("lords_hall_rhodok", "lords_hall_rhodok.ogg", mtf_sit_travel, mtf_sit_town|mtf_sit_night|mtf_sit_tavern), ("lords_hall_vaegir", "lords_hall_vaegir.ogg", mtf_sit_travel, mtf_sit_town|mtf_sit_night|mtf_sit_tavern), ("mounted_snow_terrain_calm", "mounted_snow_terrain_calm.ogg", mtf_sit_travel, mtf_sit_town|mtf_sit_night|mtf_sit_night|mtf_sit_tavern), ("neutral_infiltration", "neutral_infiltration.ogg", mtf_sit_town_infiltrate, 0), ("outdoor_beautiful_land", "outdoor_beautiful_land.ogg", mtf_sit_travel, mtf_sit_town|mtf_sit_night|mtf_sit_night|mtf_sit_tavern), ("retreat", "retreat.ogg", mtf_persist_until_finished|mtf_sit_killed, 0), ("seige_neutral", "seige_neutral.ogg", mtf_sit_siege, mtf_sit_fight|mtf_sit_ambushed), ("tavern_1", "tavern_1.ogg", mtf_sit_tavern, 0), ("tavern_2", "tavern_2.ogg", mtf_sit_tavern, 0), ("town_neutral", "town_neutral.ogg", mtf_sit_town|mtf_sit_travel, mtf_sit_tavern|mtf_sit_night), ("town_khergit", "town_khergit.ogg", mtf_culture_3|mtf_sit_town|mtf_sit_travel, mtf_sit_tavern|mtf_sit_night|mtf_culture_all), ("town_nord", "town_nord.ogg", mtf_culture_4|mtf_sit_town|mtf_sit_travel, mtf_sit_tavern|mtf_sit_night|mtf_culture_all), ("town_rhodok", "town_rhodok.ogg", mtf_culture_5|mtf_sit_town|mtf_sit_travel, mtf_sit_tavern|mtf_sit_night|mtf_culture_all), ("town_swadian", "town_swadian.ogg", mtf_culture_1|mtf_sit_town|mtf_sit_travel, mtf_sit_tavern|mtf_sit_night|mtf_culture_all), ("town_vaegir", "town_vaegir.ogg", mtf_culture_2|mtf_sit_town|mtf_sit_travel, mtf_sit_tavern|mtf_sit_night|mtf_culture_all), ("travel_khergit", "travel_khergit.ogg", mtf_culture_3|mtf_sit_travel, mtf_sit_town|mtf_sit_tavern|mtf_sit_night|mtf_culture_all), ("travel_neutral", "travel_neutral.ogg", mtf_sit_travel, mtf_sit_town|mtf_sit_tavern|mtf_sit_night), ("travel_nord", "travel_nord.ogg", mtf_culture_4|mtf_sit_travel, mtf_sit_town|mtf_sit_tavern|mtf_sit_night|mtf_culture_all), ("travel_rhodok", "travel_rhodok.ogg", mtf_culture_5|mtf_sit_travel, mtf_sit_town|mtf_sit_tavern|mtf_sit_night|mtf_culture_all), ("travel_swadian", "travel_swadian.ogg", mtf_culture_1|mtf_sit_travel, mtf_sit_town|mtf_sit_tavern|mtf_sit_night|mtf_culture_all), ("travel_vaegir", "travel_vaegir.ogg", mtf_culture_2|mtf_sit_travel, mtf_sit_town|mtf_sit_tavern|mtf_sit_night|mtf_culture_all), ("uncertain_homestead", "uncertain_homestead.ogg", mtf_sit_travel, mtf_sit_town|mtf_sit_night|mtf_sit_tavern), ("victorious_evil", "victorious_evil.ogg", mtf_persist_until_finished, 0), ("victorious_neutral_1", "victorious_neutral_1.ogg", mtf_persist_until_finished|mtf_sit_victorious, 0), ("victorious_neutral_2", "victorious_neutral_2.ogg", mtf_persist_until_finished|mtf_sit_victorious, 0), ("victorious_neutral_3", "victorious_neutral_3.ogg", mtf_persist_until_finished|mtf_sit_victorious, 0), ("victorious_swadian", "victorious_swadian.ogg", mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0), ("victorious_vaegir", "victorious_vaegir.ogg", mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0), ("victorious_vaegir_2", "victorious_vaegir_2.ogg", mtf_persist_until_finished|mtf_culture_2|mtf_sit_victorious, 0), ]
Python
import string import types from module_info import * from module_triggers import * from module_dialogs import * from process_common import * from process_operations import * speaker_pos = 0 ipt_token_pos = 1 sentence_conditions_pos = 2 text_pos = 3 opt_token_pos = 4 sentence_consequences_pos = 5 #------------------------------------------------------- def save_dialog_states(dialog_states): file = open(export_dir + "dialog_states.txt","w") for dialog_state in dialog_states: file.write("%s\n"%dialog_state) file.close() #def compile_variables(cookies_list): # for trigger in triggers: # for consequence in trigger[trigger_consequences_pos]: # compile_statement(consequence,cookies_list) # for sentence in sentences: # for consequence in sentence[sentence_consequences_pos]: # compile_statement(consequence,cookies_list) # for trigger in triggers: # for condition in trigger[trigger_conditions_pos]: # compile_statement(condition,cookies_list) # for sentence in sentences: # for condition in sentence[sentence_conditions_pos]: # compile_statement(condition,cookies_list) # return cookies_list def save_triggers(variable_list,variable_uses,triggers,tag_uses,quick_strings): file = open(export_dir + "triggers.txt","w") file.write("triggersfile version 1\n") file.write("%d\n"%len(triggers)) for i in xrange(len(triggers)): trigger = triggers[i] file.write("%f %f %f "%(trigger[trigger_check_pos],trigger[trigger_delay_pos],trigger[trigger_rearm_pos])) save_statement_block(file,0,1,trigger[trigger_conditions_pos] , variable_list, variable_uses,tag_uses,quick_strings) save_statement_block(file,0,1,trigger[trigger_consequences_pos], variable_list, variable_uses,tag_uses,quick_strings) # for condition in trigger[trigger_conditions_pos]: # save_operation(file,condition,variable_list) # file.write(" %d "%(len(trigger[trigger_consequences_pos]))) # for consequence in trigger[trigger_consequences_pos]: # save_operation(file,consequence,variable_list) file.write("\n") file.close() #================================================================= def compile_sentence_tokens(sentences): input_tokens = [] output_tokens = [] dialog_states = ["start","party_encounter","prisoner_liberated","enemy_defeated","party_relieved","event_triggered","close_window","trade","exchange_members", "trade_prisoners","buy_mercenaries","view_char","training","member_chat","prisoner_chat"] for sentence in sentences: output_token_id = -1 output_token = sentence[opt_token_pos] found = 0 for i_t in xrange(len(dialog_states)): if output_token == dialog_states[i_t]: output_token_id = i_t found = 1 break if not found: dialog_states.append(output_token) output_token_id = len(dialog_states) - 1 output_tokens.append(output_token_id) for sentence in sentences: input_token_id = -1 input_token = sentence[ipt_token_pos] found = 0 for i_t in xrange(len(dialog_states)): if input_token == dialog_states[i_t]: input_token_id = i_t found = 1 break if not found: print sentence[ipt_token_pos] print sentence[text_pos] print sentence[opt_token_pos] print "**********************************************************************************" print "ERROR: INPUT TOKEN NOT FOUND:" + input_token print "**********************************************************************************" print "**********************************************************************************" input_tokens.append(input_token_id) save_dialog_states(dialog_states) return (input_tokens, output_tokens) def create_auto_id(sentence,auto_ids): text = convert_to_identifier(sentence[text_pos]) done = 0 i = 20 lt = len(text) if (i > lt): i = lt auto_id = "dlga_" + text[0:i] done = 0 if auto_ids.has_key(auto_id) and (auto_ids[auto_id] == text): done = 1 while (i <= lt) and not done: auto_id = "dlga_" + text[0:i] if auto_ids.has_key(auto_id): if auto_ids[auto_id] == text: done = 1 else: i += 1 else: done = 1 auto_ids[auto_id] = text if not done: number = 1 new_auto_id = auto_id + str(number) while auto_ids.has_key(new_auto_id): number += 1 new_auto_id = auto_id + str(number) auto_id = new_auto_id auto_ids[auto_id] = text return auto_id def create_auto_id2(sentence,auto_ids): text = sentence[text_pos] token_ipt = convert_to_identifier(sentence[ipt_token_pos]) token_opt = convert_to_identifier(sentence[opt_token_pos]) done = 0 auto_id = "dlga_" + token_ipt + ":" + token_opt done = 0 if not auto_ids.has_key(auto_id): done = 1 else: if auto_ids.has_key(auto_id) and (auto_ids[auto_id] == text): done = 1 if not done: number = 1 new_auto_id = auto_id + "." + str(number) while auto_ids.has_key(new_auto_id): number += 1 new_auto_id = auto_id + "." + str(number) auto_id = new_auto_id auto_ids[auto_id] = text return auto_id def save_sentences(variable_list,variable_uses,sentences,tag_uses,quick_strings,input_states,output_states): file = open(export_dir + "conversation.txt","w") file.write("dialogsfile version 1\n") file.write("%d\n"%len(sentences)) # Create an empty dictionary auto_ids = {} for i in xrange(len(sentences)): sentence = sentences[i] try: dialog_id = create_auto_id2(sentence,auto_ids) file.write("%s %d %d "%(dialog_id,sentence[speaker_pos],input_states[i])) save_statement_block(file, 0, 1, sentence[sentence_conditions_pos], variable_list,variable_uses,tag_uses,quick_strings) file.write("%s "%(string.replace(sentence[text_pos]," ","_"))) if (len(sentence[text_pos]) == 0): file.write("NO_TEXT ") file.write(" %d "%(output_states[i])) save_statement_block(file, 0, 1, sentence[sentence_consequences_pos], variable_list,variable_uses,tag_uses,quick_strings) file.write("\n") except: print "Error in dialog line:" print sentence file.close() # Registered cookies is a list which enables the order of cookies to remain fixed across changes. # In order to remove cookies not used anymore, edit the cookies_registery.py and remove all entries. print "exporting triggers..." variable_uses = [] variables = load_variables(export_dir,variable_uses) tag_uses = load_tag_uses(export_dir) quick_strings = load_quick_strings(export_dir) #compile_variables(variables) save_triggers(variables,variable_uses,triggers,tag_uses,quick_strings) print "exporting dialogs..." (input_states,output_states) = compile_sentence_tokens(dialogs) save_sentences(variables,variable_uses,dialogs,tag_uses,quick_strings,input_states,output_states) save_variables(export_dir,variables,variable_uses) save_tag_uses(export_dir, tag_uses) save_quick_strings(export_dir,quick_strings) #print "finished."
Python
import string from header_common import * from module_info import * from module_music import * from process_common import * def save_python_header(): ofile = open("./ID_music.py","w") for i_track in xrange(len(tracks)): ofile.write("track_%s = %d\n"%(tracks[i_track][0],i_track)) ofile.write("\n\n") ofile.close() def save_tracks(): file = open(export_dir + "music.txt","w") file.write("%d\n"%len(tracks)) for track in tracks: file.write("%s %d %d\n"%(track[1], track[2], (track[2] | track[3]))) file.close() print "Exporting tracks..." save_python_header() save_tracks()
Python
track_bogus = 0 track_mount_and_blade_title_screen = 1 track_ambushed_by_neutral = 2 track_ambushed_by_khergit = 3 track_ambushed_by_nord = 4 track_ambushed_by_rhodok = 5 track_ambushed_by_swadian = 6 track_ambushed_by_vaegir = 7 track_arena_1 = 8 track_armorer = 9 track_bandit_fight = 10 track_calm_night_1 = 11 track_captured = 12 track_defeated_by_neutral = 13 track_defeated_by_neutral_2 = 14 track_defeated_by_neutral_3 = 15 track_empty_village = 16 track_encounter_hostile_nords = 17 track_escape = 18 track_fight_1 = 19 track_fight_2 = 20 track_fight_3 = 21 track_fight_as_khergit = 22 track_fight_as_nord = 23 track_fight_as_rhodok = 24 track_fight_as_vaegir = 25 track_fight_while_mounted_1 = 26 track_fight_while_mounted_2 = 27 track_infiltration_khergit = 28 track_killed_by_khergit = 29 track_killed_by_swadian = 30 track_lords_hall_khergit = 31 track_lords_hall_nord = 32 track_lords_hall_swadian = 33 track_lords_hall_rhodok = 34 track_lords_hall_vaegir = 35 track_mounted_snow_terrain_calm = 36 track_neutral_infiltration = 37 track_outdoor_beautiful_land = 38 track_retreat = 39 track_seige_neutral = 40 track_tavern_1 = 41 track_tavern_2 = 42 track_town_neutral = 43 track_town_khergit = 44 track_town_nord = 45 track_town_rhodok = 46 track_town_swadian = 47 track_town_vaegir = 48 track_travel_khergit = 49 track_travel_neutral = 50 track_travel_nord = 51 track_travel_rhodok = 52 track_travel_swadian = 53 track_travel_vaegir = 54 track_uncertain_homestead = 55 track_victorious_evil = 56 track_victorious_neutral_1 = 57 track_victorious_neutral_2 = 58 track_victorious_neutral_3 = 59 track_victorious_swadian = 60 track_victorious_vaegir = 61 track_victorious_vaegir_2 = 62
Python
leave_wo_battle = 0 leave_during_battle = 1 cancel_attack = 2 speak = 3 intend_battle = 4 cancel_reinforce = 5 surrender = 6 stay_back = 7 charge = 8 stay_back_with_ally = 9 charge_with_ally = 10
Python
from ID_items import * from ID_quests import * from ID_factions import * ############################################################## # These constants are used in various files. # If you need to define a value that will be used in those files, # just define it here rather than copying it across each file, so # that it will be easy to change it if you need to. ############################################################## ######################################################## ## ITEM SLOTS ############################# ######################################################## slot_item_is_checked = 0 slot_item_food_bonus = 1 slot_item_book_reading_progress = 2 slot_item_book_read = 3 slot_item_intelligence_requirement= 4 ######################################################## ## AGENT SLOTS ############################# ######################################################## slot_agent_target_entry_point = 0 slot_agent_target_x_pos = 1 slot_agent_target_y_pos = 2 slot_agent_is_alive_before_retreat= 3 slot_agent_is_in_scripted_mode = 4 slot_agent_is_not_reinforcement = 5 slot_agent_tournament_point = 6 slot_agent_arena_team_set = 7 slot_agent_map_overlay_id = 10 slot_agent_target_entry_point = 11 ######################################################## ## FACTION SLOTS ############################# ######################################################## slot_faction_ai_state = 4 slot_faction_ai_object = 5 slot_faction_ai_last_offensive_time = 6 slot_faction_marshall = 7 slot_faction_ai_offensive_max_followers = 8 slot_faction_culture = 9 slot_faction_leader = 10 ##slot_faction_vassal_of = 11 slot_faction_number_of_parties = 20 slot_faction_state = 21 slot_faction_player_alarm = 30 slot_faction_last_mercenary_offer_time = 31 slot_faction_tier_1_troop = 41 slot_faction_tier_2_troop = 42 slot_faction_tier_3_troop = 43 slot_faction_tier_4_troop = 44 slot_faction_tier_5_troop = 45 slot_faction_deserter_troop = 48 slot_faction_guard_troop = 49 slot_faction_messenger_troop = 50 slot_faction_prison_guard_troop = 51 slot_faction_castle_guard_troop = 52 slot_faction_has_rebellion_chance = 60 #Rebellion changes #slot_faction_rebellion_target = 65 #slot_faction_inactive_leader_location = 66 #slot_faction_support_base = 67 #Rebellion changes #slot_faction_deserter_party_template = 62 slot_faction_reinforcements_a = 77 slot_faction_reinforcements_b = 78 slot_faction_reinforcements_c = 79 slot_faction_num_armies = 80 slot_faction_num_castles = 81 slot_faction_num_towns = 82 ######################################################## ## PARTY SLOTS ############################# ######################################################## slot_party_type = 0 #spt_caravan, spt_town, spt_castle slot_party_retreat_flag = 2 slot_party_ignore_player_until = 3 slot_party_ai_state = 4 slot_party_ai_object = 5 slot_town_belongs_to_kingdom = 6 slot_town_lord = 7 slot_party_ai_substate = 8 slot_town_claimed_by_player = 9 slot_cattle_driven_by_player = slot_town_lord #hack slot_town_center = 10 slot_town_castle = 11 slot_town_prison = 12 slot_town_tavern = 13 slot_town_store = 14 slot_town_arena = 16 slot_town_alley = 17 slot_town_walls = 18 slot_center_culture = 19 slot_town_tavernkeeper = 20 slot_town_weaponsmith = 21 slot_town_armorer = 22 slot_town_merchant = 23 slot_town_horse_merchant= 24 slot_town_elder = 25 slot_center_player_relation = 26 slot_center_siege_with_belfry = 27 slot_center_last_taken_by_troop = 28 # party will follow this party if set: slot_party_commander_party = 30 #default -1 slot_party_following_player = 31 slot_party_follow_player_until_time = 32 slot_party_dont_follow_player_until_time = 33 slot_village_raided_by = 34 slot_village_state = 35 #svs_normal, svs_being_raided, svs_looted, svs_recovering, svs_deserted slot_village_raid_progress = 36 slot_village_recover_progress = 37 slot_village_smoke_added = 38 slot_village_infested_by_bandits = 39 slot_center_last_player_alarm_hour = 42 slot_village_land_quality = 44 slot_village_number_of_cattle = 45 slot_village_player_can_not_steal_cattle = 46 slot_center_accumulated_rents = 47 slot_center_accumulated_tariffs = 48 slot_town_wealth = 49 slot_town_prosperity = 50 slot_town_player_odds = 51 slot_party_last_toll_paid_hours = 52 slot_party_food_store = 53 #used for sieges slot_center_is_besieged_by = 54 #used for sieges slot_center_last_spotted_enemy = 55 slot_party_cached_strength = 56 slot_party_nearby_friend_strength = 57 slot_party_nearby_enemy_strength = 58 slot_party_follower_strength = 59 slot_town_reinforcement_party_template = 60 slot_center_original_faction = 61 slot_center_ex_faction = 62 slot_party_follow_me = 63 slot_center_siege_begin_hours = 64 #used for sieges slot_center_siege_hardness = 65 slot_castle_exterior = slot_town_center #slot_town_rebellion_contact = 76 #trs_not_yet_approached = 0 #trs_approached_before = 1 #trs_approached_recently = 2 argument_none = 0 argument_claim = 1 argument_ruler = 2 argument_benefit = 3 argument_victory = 4 slot_town_rebellion_readiness = 77 #(readiness can be a negative number if the rebellion has been defeated) slot_town_arena_melee_mission_tpl = 78 slot_town_arena_torny_mission_tpl = 79 slot_town_arena_melee_1_num_teams = 80 slot_town_arena_melee_1_team_size = 81 slot_town_arena_melee_2_num_teams = 82 slot_town_arena_melee_2_team_size = 83 slot_town_arena_melee_3_num_teams = 84 slot_town_arena_melee_3_team_size = 85 slot_town_arena_melee_cur_tier = 86 ##slot_town_arena_template = 87 slot_center_npc_volunteer_troop_type = 90 slot_center_npc_volunteer_troop_amount = 91 slot_center_mercenary_troop_type = 90 slot_center_mercenary_troop_amount= 91 slot_center_volunteer_troop_type = 92 slot_center_volunteer_troop_amount= 93 #slot_center_companion_candidate = 94 slot_center_ransom_broker = 95 slot_center_tavern_traveler = 96 slot_center_traveler_info_faction = 97 slot_center_tavern_bookseller = 98 slot_center_tavern_minstrel = 99 num_party_loot_slots = 5 slot_party_next_looted_item_slot = 109 slot_party_looted_item_1 = 110 slot_party_looted_item_2 = 111 slot_party_looted_item_3 = 112 slot_party_looted_item_4 = 113 slot_party_looted_item_5 = 114 slot_party_looted_item_1_modifier = 115 slot_party_looted_item_2_modifier = 116 slot_party_looted_item_3_modifier = 117 slot_party_looted_item_4_modifier = 118 slot_party_looted_item_5_modifier = 119 slot_village_bound_center = 120 slot_village_market_town = 121 slot_village_farmer_party = 122 slot_party_home_center = 123 slot_center_current_improvement = 124 slot_center_improvement_end_hour = 125 slot_center_has_manor = 130 #village slot_center_has_fish_pond = 131 #village slot_center_has_watch_tower = 132 #village slot_center_has_school = 133 #village slot_center_has_messenger_post = 134 #town, castle, village slot_center_has_prisoner_tower = 135 #town, castle village_improvements_begin = slot_center_has_manor village_improvements_end = 135 walled_center_improvements_begin = slot_center_has_messenger_post walled_center_improvements_end = 136 slot_center_has_bandits = 149 slot_town_has_tournament = 150 slot_town_tournament_max_teams = 151 slot_town_tournament_max_team_size = 152 slot_center_faction_when_oath_renounced = 155 slot_center_walker_0_troop = 160 slot_center_walker_1_troop = 161 slot_center_walker_2_troop = 162 slot_center_walker_3_troop = 163 slot_center_walker_4_troop = 164 slot_center_walker_5_troop = 165 slot_center_walker_6_troop = 166 slot_center_walker_7_troop = 167 slot_center_walker_8_troop = 168 slot_center_walker_9_troop = 169 slot_center_walker_0_dna = 170 slot_center_walker_1_dna = 171 slot_center_walker_2_dna = 172 slot_center_walker_3_dna = 173 slot_center_walker_4_dna = 174 slot_center_walker_5_dna = 175 slot_center_walker_6_dna = 176 slot_center_walker_7_dna = 177 slot_center_walker_8_dna = 178 slot_center_walker_9_dna = 179 slot_center_walker_0_type = 180 slot_center_walker_1_type = 181 slot_center_walker_2_type = 182 slot_center_walker_3_type = 183 slot_center_walker_4_type = 184 slot_center_walker_5_type = 185 slot_center_walker_6_type = 186 slot_center_walker_7_type = 187 slot_center_walker_8_type = 188 slot_center_walker_9_type = 189 slot_town_trade_route_1 = 190 slot_town_trade_route_2 = 191 slot_town_trade_route_3 = 192 slot_town_trade_route_4 = 193 slot_town_trade_route_5 = 194 slot_town_trade_route_6 = 195 slot_town_trade_route_7 = 196 slot_town_trade_route_8 = 197 slot_town_trade_route_9 = 198 slot_town_trade_route_10 = 199 slot_town_trade_route_11 = 200 slot_town_trade_route_12 = 201 slot_town_trade_route_13 = 202 slot_town_trade_route_14 = 203 slot_town_trade_route_15 = 204 slot_town_trade_routes_begin = slot_town_trade_route_1 slot_town_trade_routes_end = slot_town_trade_route_15 + 1 num_trade_goods = itm_siege_supply - itm_smoked_fish slot_town_trade_good_productions_begin = 205 slot_town_trade_good_prices_begin = slot_town_trade_good_productions_begin + num_trade_goods + 1 #slot_party_type values ##spt_caravan = 1 spt_castle = 2 spt_town = 3 spt_village = 4 ##spt_forager = 5 ##spt_war_party = 6 ##spt_patrol = 7 ##spt_messenger = 8 ##spt_raider = 9 ##spt_scout = 10 spt_kingdom_caravan = 11 ##spt_prisoner_train = 12 spt_kingdom_hero_party = 13 ##spt_merchant_caravan = 14 spt_village_farmer = 15 spt_ship = 16 spt_cattle_herd = 17 #spt_deserter = 20 kingdom_party_types_begin = spt_kingdom_caravan kingdom_party_types_end = spt_kingdom_hero_party + 1 #slot_faction_state values sfs_active = 0 sfs_defeated = 1 sfs_inactive = 2 sfs_inactive_rebellion = 3 sfs_beginning_rebellion = 4 #slot_faction_ai_state values sfai_default = 0 sfai_gathering_army = 1 sfai_attacking_center = 2 sfai_raiding_village = 3 sfai_attacking_enemy_army = 4 sfai_attacking_enemies_around_center = 5 #Rebellion system changes begin sfai_nascent_rebellion = 6 #Rebellion system changes end #slot_party_ai_state values spai_undefined = -1 spai_besieging_center = 1 spai_patrolling_around_center = 4 spai_raiding_around_center = 5 ##spai_raiding_village = 6 spai_holding_center = 7 ##spai_helping_town_against_siege = 9 spai_engaging_army = 10 spai_accompanying_army = 11 spai_trading_with_town = 13 spai_retreating_to_center = 14 ##spai_trading_within_kingdom = 15 spai_recruiting_troops = 16 #slot_village_state values svs_normal = 0 svs_being_raided = 1 svs_looted = 2 svs_recovering = 3 svs_deserted = 4 svs_under_siege = 5 #$g_player_icon_state values pis_normal = 0 pis_camping = 1 pis_ship = 2 ######################################################## ## SCENE SLOTS ############################# ######################################################## slot_scene_visited = 0 slot_scene_belfry_props_begin = 10 ######################################################## ## TROOP SLOTS ############################# ######################################################## #slot_troop_role = 0 # 10=Kingdom Lord slot_troop_occupation = 2 # 0 = free, 1 = merchant #slot_troop_duty = 3 # Kingdom duty, 0 = free slot_troop_state = 3 slot_troop_last_talk_time = 4 slot_troop_met = 5 slot_troop_party_template = 6 #slot_troop_kingdom_rank = 7 slot_troop_renown = 7 ##slot_troop_is_prisoner = 8 # important for heroes only slot_troop_prisoner_of_party = 8 # important for heroes only #slot_troop_is_player_companion = 9 # important for heroes only:::USE slot_troop_occupation = slto_player_companion slot_troop_leaded_party = 10 # important for kingdom heroes only slot_troop_wealth = 11 # important for kingdom heroes only slot_troop_cur_center = 12 # important for royal family members only (non-kingdom heroes) slot_troop_banner_scene_prop = 13 # important for kingdom heroes and player only slot_troop_original_faction = 14 # for pretenders slot_troop_loyalty = 15 slot_troop_player_order_state = 16 slot_troop_player_order_object = 17 #slot_troop_present_at_event = 19 #defined below slot_troop_does_not_give_quest = 20 slot_troop_player_debt = 21 slot_troop_player_relation = 22 #slot_troop_player_favor = 23 slot_troop_last_quest = 24 slot_troop_last_quest_betrayed = 25 slot_troop_last_persuasion_time= 26 slot_troop_last_comment_time = 27 slot_troop_spawned_before = 28 #Post 0907 changes begin slot_troop_last_comment_slot = 29 slot_troop_present_at_event = 19 #Post 0907 changes end slot_troop_spouse = 30 slot_troop_father = 31 slot_troop_mother = 32 slot_troop_daughter = 33 slot_troop_son = 34 slot_troop_sibling = 35 slot_troop_lover = 36 slot_troop_trainer_met = 30 slot_troop_trainer_waiting_for_result = 31 slot_troop_trainer_training_fight_won = 32 slot_troop_trainer_num_opponents_to_beat = 33 slot_troop_trainer_training_system_explained = 34 slot_troop_trainer_opponent_troop = 35 slot_troop_trainer_training_difficulty = 36 slot_troop_trainer_training_fight_won = 37 slot_troop_family_begin = 30 slot_troop_family_end = 36 slot_troop_enemy_1 = 40 slot_troop_enemy_2 = 41 slot_troop_enemy_3 = 42 slot_troop_enemy_4 = 43 slot_troop_enemy_5 = 44 slot_troop_enemies_begin = 40 slot_troop_enemies_end = 45 slot_troop_honorable = 50 #slot_troop_merciful = 51 slot_lord_reputation_type = 52 slot_troop_change_to_faction = 55 slot_troop_readiness_to_join_army = 57 slot_troop_readiness_to_follow_orders = 58 # NPC-related constants #NPC companion changes begin slot_troop_first_encountered = 59 slot_troop_home = 60 slot_troop_morality_state = 61 tms_no_problem = 0 tms_acknowledged = 1 tms_dismissed = 2 slot_troop_morality_type = 62 tmt_aristocratic = 1 tmt_egalitarian = 2 tmt_humanitarian = 3 tmt_honest = 4 tmt_pious = 5 slot_troop_morality_value = 63 slot_troop_2ary_morality_type = 64 slot_troop_2ary_morality_state = 65 slot_troop_2ary_morality_value = 66 slot_troop_morality_penalties = 69 ### accumulated grievances from morality conflicts slot_troop_personalityclash_object = 71 #(0 - they have no problem, 1 - they have a problem) slot_troop_personalityclash_state = 72 #1 = pclash_penalty_to_self, 2 = pclash_penalty_to_other, 3 = pclash_penalty_to_other, pclash_penalty_to_self = 1 pclash_penalty_to_other = 2 pclash_penalty_to_both = 3 #(a string) slot_troop_personalityclash2_object = 73 slot_troop_personalityclash2_state = 74 slot_troop_personalitymatch_object = 75 slot_troop_personalitymatch_state = 76 slot_troop_personalityclash_penalties = 77 ### accumulated grievances from personality clash slot_troop_home_speech_delivered = 78 #NPC history slots slot_troop_met_previously = 80 slot_troop_turned_down_twice = 81 slot_troop_playerparty_history = 82 pp_history_scattered = 1 pp_history_dismissed = 2 pp_history_quit = 3 pp_history_indeterminate = 4 slot_troop_playerparty_history_string = 83 slot_troop_return_renown = 84 slot_troop_custom_banner_bg_color_1 = 85 slot_troop_custom_banner_bg_color_2 = 86 slot_troop_custom_banner_charge_color_1 = 87 slot_troop_custom_banner_charge_color_2 = 88 slot_troop_custom_banner_charge_color_3 = 89 slot_troop_custom_banner_charge_color_4 = 90 slot_troop_custom_banner_bg_type = 91 slot_troop_custom_banner_charge_type_1 = 92 slot_troop_custom_banner_charge_type_2 = 93 slot_troop_custom_banner_charge_type_3 = 94 slot_troop_custom_banner_charge_type_4 = 95 slot_troop_custom_banner_flag_type = 96 slot_troop_custom_banner_num_charges = 97 slot_troop_custom_banner_positioning = 98 slot_troop_custom_banner_map_flag_type = 99 #conversation strings -- must be in this order! slot_troop_intro = 101 slot_troop_intro_response_1 = 102 slot_troop_intro_response_2 = 103 slot_troop_backstory_a = 104 slot_troop_backstory_b = 105 slot_troop_backstory_c = 106 slot_troop_backstory_delayed = 107 slot_troop_backstory_response_1 = 108 slot_troop_backstory_response_2 = 109 slot_troop_signup = 110 slot_troop_signup_2 = 111 slot_troop_signup_response_1 = 112 slot_troop_signup_response_2 = 113 slot_troop_mentions_payment = 114 #Not actually used slot_troop_payment_response = 115 #Not actually used slot_troop_morality_speech = 116 slot_troop_2ary_morality_speech = 117 slot_troop_personalityclash_speech = 118 slot_troop_personalityclash_speech_b = 119 slot_troop_personalityclash2_speech = 120 slot_troop_personalityclash2_speech_b = 121 slot_troop_personalitymatch_speech = 122 slot_troop_personalitymatch_speech_b = 123 slot_troop_retirement_speech = 124 slot_troop_rehire_speech = 125 slot_troop_home_intro = 126 slot_troop_home_description = 127 slot_troop_home_description_2 = 128 slot_troop_home_recap = 129 slot_troop_honorific = 130 slot_troop_strings_end = 131 slot_troop_payment_request = 132 #Rebellion changes begin slot_troop_discussed_rebellion = 140 slot_troop_support_base = 141 #Rebellion changes end # character backgrounds cb_noble = 1 cb_merchant = 2 cb_guard = 3 cb_forester = 4 cb_nomad = 5 cb_thief = 6 cb_priest = 7 cb2_page = 0 cb2_apprentice = 1 cb2_urchin = 2 cb2_steppe_child = 3 cb2_merchants_helper = 4 cb3_poacher = 3 cb3_craftsman = 4 cb3_peddler = 5 cb3_troubadour = 7 cb3_squire = 8 cb3_lady_in_waiting = 9 cb3_student = 10 cb4_revenge = 1 cb4_loss = 2 cb4_wanderlust = 3 cb4_disown = 5 cb4_greed = 6 #NPC system changes end #Encounter types enctype_fighting_against_village_raid = 1 enctype_catched_during_village_raid = 2 ### Troop occupations slot_troop_occupation ##slto_merchant = 1 slto_kingdom_hero = 2 slto_player_companion = 3 slto_kingdom_lady = 4 slto_kingdom_seneschal = 5 slto_robber_knight = 6 stl_unassigned = -1 stl_reserved_for_player = -2 stl_rejected_by_player = -3 #NPC changes begin slto_retirement = 11 #slto_retirement_medium = 12 #slto_retirement_short = 13 #NPC changes end ######################################################## ## QUEST SLOTS ############################# ######################################################## slot_quest_target_center = 1 slot_quest_target_troop = 2 slot_quest_target_faction = 3 slot_quest_object_troop = 4 ##slot_quest_target_troop_is_prisoner = 5 slot_quest_giver_troop = 6 slot_quest_object_center = 7 slot_quest_target_party = 8 slot_quest_target_party_template = 9 slot_quest_target_amount = 10 slot_quest_current_state = 11 slot_quest_giver_center = 12 slot_quest_target_dna = 13 slot_quest_target_item = 14 slot_quest_object_faction = 15 slot_quest_convince_value = 19 slot_quest_importance = 20 slot_quest_xp_reward = 21 slot_quest_gold_reward = 22 slot_quest_expiration_days = 23 slot_quest_dont_give_again_period = 24 slot_quest_dont_give_again_remaining_days = 25 ######################################################## ## PARTY TEMPLATE SLOTS ############################# ######################################################## # Ryan BEGIN slot_party_template_num_killed = 1 # Ryan END ######################################################## rel_enemy = 0 rel_neutral = 1 rel_ally = 2 #Talk contexts tc_town_talk = 0 tc_court_talk = 1 tc_party_encounter = 2 tc_castle_gate = 3 tc_siege_commander = 4 tc_join_battle_ally = 5 tc_join_battle_enemy = 6 tc_castle_commander = 7 tc_hero_freed = 8 tc_hero_defeated = 9 tc_entering_center_quest_talk = 10 tc_back_alley = 11 tc_siege_won_seneschal = 12 tc_ally_thanks = 13 tc_tavern_talk = 14 tc_rebel_thanks = 15 #Troop Commentaries begin #Log entry types #civilian logent_village_raided = 1 logent_village_extorted = 2 logent_caravan_accosted = 3 logent_helped_peasants = 4 logent_castle_captured_by_player = 10 logent_lord_defeated_by_player = 11 logent_lord_captured_by_player = 12 logent_lord_defeated_but_let_go_by_player = 13 logent_player_defeated_by_lord = 14 logent_player_retreated_from_lord = 15 logent_player_retreated_from_lord_cowardly = 16 logent_lord_helped_by_player = 17 logent_player_participated_in_siege = 18 logent_player_participated_in_major_battle = 19 logent_pledged_allegiance = 21 logent_fief_granted_village = 22 logent_renounced_allegiance = 23 logent_game_start = 31 logent_poem_composed = 32 ##Not added logent_tournament_distinguished = 33 ##Not added logent_tournament_won = 34 ##Not added #lord reputation type, for commentaries #"Martial" will be twice as common as the other types lrep_none = 0 lrep_martial = 1 #chivalrous but not terribly empathetic or introspective, - eg Richard Lionheart, your average 14th century French baron lrep_quarrelsome = 2 #spiteful, cynical, a bit paranoid, possibly hotheaded - eg Robert Graves' Tiberius, Shakespeare's Richard III lrep_selfrighteous = 3 #coldblooded, moralizing, often cruel - eg William the Conqueror, Timur, Octavian, Aurangzeb (although he borders on upstanding) lrep_cunning = 4 #coldblooded, pragmatic, amoral - eg Louis XI, Guiscard, Akbar Khan, Abd al-Aziz Ibn Saud lrep_debauched = 5 #spiteful, amoral, sadistic, - eg Caligula, Tuchman's Charles of Navarre lrep_goodnatured = 6 #chivalrous, benevolent, perhaps a little too decent to be a good warlord - eg Hussein, poss Ranjit Singh (although roguish), Humayun lrep_upstanding = 7 #moralizing, benevolent, pragmatic, - eg Bernard Cornwell's Alfred, Charlemagne, Sher Shah Suri #Troop Commentaries end #Walker types: walkert_default = 0 walkert_needs_money = 1 walkert_needs_money_helped = 2 walkert_spy = 3 num_town_walkers = 8 town_walker_entries_start = 32 reinforcement_cost = 400 merchant_toll_duration = 72 #Tolls are valid for 72 hours hero_escape_after_defeat_chance = 80 raid_distance = 4 ########################## # Form Ranks Constants Section # ####### # Note: Some operations are based on the relative position of slots, # so when adding new slots, DO NOT insert in between, append them # at the bottom. ####### formation_keys_list = [ #0x07, # "$key_array_selection_1", #0x08, # "$key_array_selection_2", #0x09, # "$key_array_selection_3", #0x0a, # "$key_array_selection_4", #0x0b, # "$key_array_selection_5", #0x0c, # "$key_array_selection_6", #0x0d, # "$key_array_selection_7", #0x1b, # "$key_array_selection_8", "$key_array_select_all", "$key_formation_selection", "$key_formation_selection_backward", "$key_formation_tighten", "$key_formation_disperse", "$key_formation_hold_pos", "$key_auto_rotation_toggle", "$key_apply_formation", "$key_formation_charge", "$key_formation_fall_back", "$key_formation_halt", "$key_formation_tactical_charge", "$key_formation_move_forward", "$key_formation_move_backward", "$key_formation_move_left", "$key_formation_move_right", "$key_formation_turn_left", "$key_formation_turn_right", "$key_dismiss_formation", "$key_formation_view_orders", ] formation_default_key_list = [ 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x2b, 0x02, 0x15, 0x16, 0x42, 0x43, 0x3b, 0x22, 0x25, 0x30, 0x32, 0x31, 0x23, 0xc8, 0xd0, 0xcb, 0xcd, 0x33, 0x34, 0x18, 0x2d, ] all_keys_list = [ (0x02, "@1"), (0x03, "@2"), (0x04, "@3"), (0x05, "@4"), (0x06, "@5"), (0x07, "@6"), (0x08, "@7"), (0x09, "@8"), (0x0a, "@9"), (0x0b, "@0"), (0x1e, "@A"), (0x30, "@B"), (0x2e, "@C"), (0x20, "@D"), (0x12, "@E"), (0x21, "@F"), (0x22, "@G"), (0x23, "@H"), (0x17, "@I"), (0x24, "@J"), (0x25, "@K"), (0x26, "@L"), (0x32, "@M"), (0x31, "@N"), (0x18, "@O"), (0x19, "@P"), (0x10, "@Q"), (0x13, "@R"), (0x1f, "@S"), (0x14, "@T"), (0x16, "@U"), (0x2f, "@V"), (0x11, "@W"), (0x2d, "@X"), (0x15, "@Y"), (0x2c, "@Z"), (0x52, "@Numpad 0"), (0x4f, "@Numpad 1"), (0x50, "@Numpad 2"), (0x51, "@Numpad 3"), (0x4b, "@Numpad 4"), (0x4c, "@Numpad 5"), (0x4d, "@Numpad 6"), (0x47, "@Numpad 7"), (0x48, "@Numpad 8"), (0x49, "@Numpad 9"), (0x45, "@Num Lock"), (0xb5, "@Numpad Div"), (0x37, "@Numpad Mul"), (0x4a, "@Numpad Mins"), (0x4e, "@Numpad Pls"), (0x9c, "@Numpad Entr"), (0x53, "@Numpad Dot"), (0xd2, "@Insert"), (0xd3, "@Delete"), (0xc7, "@Home"), (0xcf, "@End"), (0xc9, "@Page Up"), (0xd1, "@Page Down"), (0xc8, "@Up"), (0xd0, "@Down"), (0xcb, "@Left"), (0xcd, "@Right"), (0x3b, "@F1"), (0x3c, "@F2"), (0x3d, "@F3"), (0x3e, "@F4"), (0x3f, "@F5"), (0x40, "@F6"), (0x41, "@F7"), (0x42, "@F8"), (0x43, "@F9"), (0x44, "@F10"), (0x57, "@F11"), (0x58, "@F12"), (0x39, "@Space Bar"), (0x1c, "@Enter"), (0x0f, "@Tab"), (0x0e, "@Backspace"), (0x1a, "@Left Bracess"), (0x1b, "@Right Braces"), (0x33, "@Comma"), (0x34, "@Period"), (0x35, "@Slash"), (0x2b, "@Back Slash"), (0x0d, "@Equals"), (0x0c, "@Minus"), (0x27, "@Semicolon"), (0x28, "@Apostrophe"), (0x29, "@Tilde"), (0x3a, "@Caps Lock"), (0x2a, "@Left Shift"), (0x36, "@Right Shift"), (0x1d, "@Left Ctrl"), (0x9d, "@Right Ctrl"), (0x38, "@Left Alt"), (0xb8, "@Right Alt"), (0xe0, "@Left Click"), (0xe1, "@Right Click"), (0xe2, "@Mouse Button 3"), (0xe3, "@Mouse Button 4"), (0xe4, "@Mouse Button 5"), (0xe5, "@Mouse Button 6"), (0xe6, "@Mouse Button 7"), (0xe7, "@Mouse Button 8"), (0xee, "@Scroll Up"), (0xef, "@Scroll Down"), ] # agent slots for formation slot_agent_native_end = 12 # refer this to the agent # slot section for native, # should be {the last slot}+1 slot_agent_formation_states = slot_agent_native_end slot_agent_formation_x_pos = slot_agent_formation_states+1 slot_agent_formation_y_pos = slot_agent_formation_x_pos+1 # slot_agent_formation_states masks safs_in_formation = 0x10 # used when calculating formation safs_array_leader = 0x20 # mark if agent is leader of array safs_array_no = 0xF # so arrays can be numbered through 16, see notes below safs_roar_stage = 0x1C0 # how long since the agent last roared safs_roar_stage_second = 0x40 # bit representing one second for roar_stage safs_full_mask = 0xFFF formation_arrays = 8 # This can be changed if you want more arrays, # but due to storage limitation of the party slots, # the maximum is 10 for current configuration. # Main party slots slot_party_array_parties_begin = slot_center_walker_0_troop slot_party_array_parties_end = slot_party_array_parties_begin+formation_arrays slot_party_formation_keys_begin = slot_party_array_parties_end slot_party_formation_keys_end = slot_party_formation_keys_begin+len(formation_keys_list) # Array party slots slot_array_party_leader = slot_center_walker_0_troop formation_vector = "$formation_vector" formation_temp_vector = "$formation_temp_vector" # Formation vector slots ############# slot_formation_array_marks_begin = 0 slot_formation_array_marks_end = slot_formation_array_marks_begin+formation_arrays slot_formation_teams_begin = slot_formation_array_marks_end # formation team section # Indices are just offsets. slot_formation_team_array_selection = 0 slot_formation_team_max_array_no = 1 slot_formation_team_arrays_begin = 2 # formation array section # Nested in formation team section, these indices # are just offsets. slot_formation_array_leader = 0 slot_formation_array_ref_x_pos = 1 slot_formation_array_ref_y_pos = 2 slot_formation_array_ref_rotation = 3 slot_formation_array_num_of_men = 4 slot_formation_array_states = 5 # slot formation array states masks sfas_formation_type = 0xFF # 256 formation types maximum..hmm..should suffice... sfas_auto_rotate = 0x100 # mark if array should always face enemies sfas_charge = 0x200 # mark if array is charging sfas_fall_back = 0x400 # mark if array is falling back sfas_speed = 0xF000 # speed of charge or fall back sfas_speed_unit = 0x1000 # unit bit of speed sfas_speed_base = 0x1000 # convertion base from bits to meters sfas_speed_limit = 16 # maximum speed in kbits sfas_formation_density = 0x30000 # The tightness of the formation sfas_density_unit = 0x10000 # unit bit of density sfas_density_base = 75 # base interval in centimetres sfas_tactical_charge = 0x40000 # whether the formation is in tactical charge sfas_engaged = 0x80000 # whether the array has engaged enmey sfas_roar = 0x100000 # whether the soldiers give out war cry tactical_charge_adjust_in = 6 tactical_charge_adjust_out = 30 tactical_charge_cut_in = 20 tactical_charge_listen_interval = 1 # the interval for trigger to activate sfa_array_section_size = 6 slot_formation_team_arrays_end = slot_formation_team_arrays_begin \ +sfa_array_section_size*formation_arrays # slot formation team values sft_team_section_size = slot_formation_team_arrays_end slot_formation_teams_end = slot_formation_teams_begin \ +sft_team_section_size*4 # Formation types: formation_types = 4 #number of formations ft_line = 0 ft_phalanx = 1 ft_wedge = 2 ft_square = 3 # Formation vector slots end ########### # Formation temporary vector slots ##### slot_formation_tmp_maintain = 0 slot_formation_tmp_density = 4*formation_arrays*2 slot_formation_tmp_team_stat_begin = slot_formation_tmp_density+4*formation_arrays # below are off-sets for each team section slot_formation_tmp_team_total = 0 slot_formation_tmp_team_infantry_high = 1 slot_formation_tmp_team_infantry_low = 2 slot_formation_tmp_team_archer = 3 slot_formation_tmp_team_cavalry_1 = 6 slot_formation_tmp_team_cavalry_2 = 7 slot_formation_tmp_team_horse_archer_1 = 4 slot_formation_tmp_team_horse_archer_2 = 5 slot_formation_tmp_team_arrays = 8 slot_formation_tmp_team_stat_section_size = 7 sftt_num_mask = 0xFFF sftt_num_assigned_mask = 0xFFF000 sftt_num_assigned_base = 0x1000 sftt_formation_stage_mask = 0xF000000 sftt_formation_stage = 0x1000000 sftt_array_no_mask = 0x70000000 sftt_array_no_base = 0x10000000 sftd_ratio_base = 12 # Formation temporary vector slots end # # pos20 to pos51 for maintain formation, do not use in other mission-template triggers maintain_formation_pos_begin = 20 # Formation strings index formation_array_names_begin = "str_formation_array_1" formation_array_names_end = "str_formation_array_end" formation_order_panel_array_names_begin = "str_formation_order_panel_array_1" formation_order_panel_array_names_end = "str_formation_order_panel_array_end" formation_commands_begin = "str_formation_command_line" formation_commands_pl_begin = "str_formation_command_line_pl" formation_commands_end = "str_formation_command_end" formation_key_names_begin = "str_key_array_selection_1" formation_key_names_end = "str_formation_key_names_end" # Formation scripts index formation_scripts_begin = "script_formation_line" formation_scripts_end = "script_dismiss_battle_array" # Formation tactics scripts index formation_tactics_scripts_begin = "script_formation_tactical_charge_line" formation_tactcs_scripts_end = "script_formation_line" Pi = 3.1415926535 # Colors formation_message_color = 0xFFAAFF55 formation_order_color = 0xFFAAFF00 formation_debug_color = 0xFF0000FF debug_point = (1106, "@DEBUG: Line reached!", formation_debug_color) def concatenate_scripts(block_list): result = [] for block in block_list: result += block return result # # Form Ranks Constants Section End ############################ surnames_begin = "str_surname_1" surnames_end = "str_surnames_end" names_begin = "str_name_1" names_end = surnames_begin countersigns_begin = "str_countersign_1" countersigns_end = names_begin secret_signs_begin = "str_secret_sign_1" secret_signs_end = countersigns_begin kingdoms_begin = "fac_player_supporters_faction" kingdoms_end = "fac_kingdoms_end" kingdom_ladies_begin = "trp_knight_1_1_wife" kingdom_ladies_end = "trp_heroes_end" kings_begin = "trp_kingdom_1_lord" kings_end = "trp_knight_1_1" kingdom_heroes_begin = "trp_kingdom_1_lord" kingdom_heroes_end = kingdom_ladies_begin heroes_begin = kingdom_heroes_begin heroes_end = kingdom_ladies_end companions_begin = "trp_npc1" companions_end = "trp_kingdom_heroes_including_player_begin" soldiers_begin = "trp_farmer" soldiers_end = "trp_town_walker_1" #Rebellion changes ##rebel_factions_begin = "fac_kingdom_1_rebels" ##rebel_factions_end = "fac_kingdoms_end" pretenders_begin = "trp_kingdom_1_pretender" pretenders_end = kingdom_heroes_end #Rebellion changes tavern_minstrels_begin = "trp_tavern_minstrel_1" tavern_minstrels_end = companions_begin tavern_booksellers_begin = "trp_tavern_bookseller_1" tavern_booksellers_end = tavern_minstrels_begin tavern_travelers_begin = "trp_tavern_traveler_1" tavern_travelers_end = tavern_booksellers_begin ransom_brokers_begin = "trp_ransom_broker_1" ransom_brokers_end = tavern_travelers_begin mercenary_troops_begin = "trp_watchman" mercenary_troops_end = "trp_mercenaries_end" lord_quests_begin = "qst_deliver_message" lord_quests_end = "qst_follow_army" enemy_lord_quests_begin = "qst_lend_surgeon" enemy_lord_quests_end = lord_quests_end village_elder_quests_begin = "qst_deliver_grain" village_elder_quests_end = "qst_eliminate_bandits_infesting_village" mayor_quests_begin = "qst_move_cattle_herd" mayor_quests_end = village_elder_quests_begin lady_quests_begin = "qst_rescue_lord_by_replace" lady_quests_end = mayor_quests_begin army_quests_begin = "qst_deliver_cattle_to_army" army_quests_end = lady_quests_begin all_quests_begin = 0 all_quests_end = "qst_quests_end" towns_begin = "p_town_1" castles_begin = "p_castle_1" villages_begin = "p_village_1" towns_end = castles_begin castles_end = villages_begin villages_end = "p_salt_mine" walled_centers_begin = towns_begin walled_centers_end = castles_end centers_begin = towns_begin centers_end = villages_end training_grounds_begin = "p_training_ground_1" training_grounds_end = "p_Bridge_1" scenes_begin = "scn_town_1_center" scenes_end = "scn_castle_1_exterior" spawn_points_begin = "p_zendar" spawn_points_end = "p_spawn_points_end" regular_troops_begin = "trp_novice_fighter" regular_troops_end = "trp_tournament_master" swadian_merc_parties_begin = "p_town_1_mercs" swadian_merc_parties_end = "p_town_8_mercs" vaegir_merc_parties_begin = "p_town_8_mercs" vaegir_merc_parties_end = "p_zendar" arena_masters_begin = "trp_town_1_arena_master" arena_masters_end = "trp_town_1_armorer" training_gound_trainers_begin = "trp_trainer_1" training_gound_trainers_end = "trp_ransom_broker_1" town_walkers_begin = "trp_town_walker_1" town_walkers_end = "trp_village_walker_1" village_walkers_begin = "trp_village_walker_1" village_walkers_end = "trp_spy_walker_1" spy_walkers_begin = "trp_spy_walker_1" spy_walkers_end = "trp_tournament_master" walkers_begin = town_walkers_begin walkers_end = spy_walkers_end armor_merchants_begin = "trp_town_1_armorer" armor_merchants_end = "trp_town_1_weaponsmith" weapon_merchants_begin = "trp_town_1_weaponsmith" weapon_merchants_end = "trp_town_1_tavernkeeper" tavernkeepers_begin = "trp_town_1_tavernkeeper" tavernkeepers_end = "trp_town_1_merchant" goods_merchants_begin = "trp_town_1_merchant" goods_merchants_end = "trp_town_1_horse_merchant" horse_merchants_begin = "trp_town_1_horse_merchant" horse_merchants_end = "trp_town_1_mayor" mayors_begin = "trp_town_1_mayor" mayors_end = "trp_village_1_elder" village_elders_begin = "trp_village_1_elder" village_elders_end = "trp_merchants_end" average_price_factor = 1000 minimum_price_factor = 100 maximum_price_factor = 10000 village_prod_min = -5 village_prod_max = 18 trade_goods_begin = "itm_smoked_fish" trade_goods_end = "itm_siege_supply" food_begin = "itm_smoked_fish" food_end = "itm_wine" reference_books_begin = "itm_book_wound_treatment_reference" reference_books_end = trade_goods_begin readable_books_begin = "itm_book_tactics" readable_books_end = reference_books_begin books_begin = readable_books_begin books_end = reference_books_end horses_begin = "itm_sumpter_horse" horses_end = "itm_arrows" weapons_begin = "itm_wooden_stick" weapons_end = "itm_wooden_shield" ranged_weapons_begin = "itm_jarid" ranged_weapons_end = "itm_torch" armors_begin = "itm_leather_gloves" armors_end = "itm_wooden_stick" shields_begin = "itm_wooden_shield" shields_end = "itm_jarid" # Banner constants banner_meshes_begin = "mesh_banner_a01" banner_meshes_end_minus_one = "mesh_banner_f21" arms_meshes_begin = "mesh_arms_a01" arms_meshes_end_minus_one = "mesh_arms_f21" custom_banner_charges_begin = "mesh_custom_banner_charge_01" custom_banner_charges_end = "mesh_tableau_mesh_custom_banner" custom_banner_backgrounds_begin = "mesh_custom_banner_bg" custom_banner_backgrounds_end = custom_banner_charges_begin custom_banner_flag_types_begin = "mesh_custom_banner_01" custom_banner_flag_types_end = custom_banner_backgrounds_begin custom_banner_flag_map_types_begin = "mesh_custom_map_banner_01" custom_banner_flag_map_types_end = custom_banner_flag_types_begin custom_banner_flag_scene_props_begin = "spr_custom_banner_01" custom_banner_flag_scene_props_end = "spr_banner_a" custom_banner_map_icons_begin = "icon_custom_banner_01" custom_banner_map_icons_end = "icon_banner_01" banner_map_icons_begin = "icon_banner_01" banner_map_icons_end_minus_one = "icon_banner_126" banner_scene_props_begin = "spr_banner_a" banner_scene_props_end_minus_one = "spr_banner_f21" khergit_banners_begin_offset = 63 khergit_banners_end_offset = 84 # Some constants for merchant invenotries merchant_inventory_space = 30 num_merchandise_goods = 40 num_max_river_pirates = 25 num_max_zendar_peasants = 25 num_max_zendar_manhunters = 10 num_max_dp_bandits = 10 num_max_refugees = 10 num_max_deserters = 10 num_max_militia_bands = 15 num_max_armed_bands = 12 num_max_vaegir_punishing_parties = 20 num_max_rebel_peasants = 25 num_max_frightened_farmers = 50 num_max_undead_messengers = 20 num_forest_bandit_spawn_points = 1 num_mountain_bandit_spawn_points = 1 num_steppe_bandit_spawn_points = 1 num_black_khergit_spawn_points = 1 num_sea_raider_spawn_points = 2 peak_prisoner_trains = 4 peak_kingdom_caravans = 12 peak_kingdom_messengers = 3 # Note positions note_troop_location = 3 #battle tactics btactic_hold = 1 btactic_follow_leader = 2 btactic_charge = 3 btactic_stand_ground = 4 #default right mouse menu orders cmenu_move = -7 # Town center modes tcm_default = 0 tcm_disguised = 1 # Arena battle modes #abm_fight = 0 abm_training = 1 abm_visit = 2 abm_tournament = 3 # Camp training modes ctm_melee = 1 ctm_ranged = 2 ctm_mounted = 3 ctm_training = 4 # Village bandits attack modes vba_normal = 1 vba_after_training = 2 arena_tier1_opponents_to_beat = 3 arena_tier1_prize = 5 arena_tier2_opponents_to_beat = 6 arena_tier2_prize = 10 arena_tier3_opponents_to_beat = 10 arena_tier3_prize = 25 arena_tier4_opponents_to_beat = 20 arena_tier4_prize = 60 arena_grand_prize = 250
Python
script_game_start = 0 script_game_event_party_encounter = 1 script_game_event_simulate_battle = 2 script_game_event_battle_end = 3 script_order_best_besieger_party_to_guard_center = 4 script_game_get_item_buy_price_factor = 5 script_game_get_item_sell_price_factor = 6 script_get_trade_penalty = 7 script_game_event_buy_item = 8 script_game_event_sell_item = 9 script_game_get_troop_wage = 10 script_game_get_total_wage = 11 script_game_get_join_cost = 12 script_game_get_prisoner_price = 13 script_game_check_prisoner_can_be_sold = 14 script_game_event_detect_party = 15 script_game_event_undetect_party = 16 script_game_get_statistics_line = 17 script_game_get_date_text = 18 script_game_get_money_text = 19 script_game_get_party_companion_limit = 20 script_game_reset_player_party_name = 21 script_party_get_ideal_size = 22 script_game_get_party_prisoner_limit = 23 script_game_get_item_extra_text = 24 script_game_on_disembark = 25 script_game_context_menu_get_buttons = 26 script_game_event_context_menu_button_clicked = 27 script_game_get_skill_modifier_for_troop = 28 script_npc_get_troop_wage = 29 script_setup_talk_info = 30 script_setup_talk_info_companions = 31 script_update_party_creation_random_limits = 32 script_set_trade_route_between_centers = 33 script_center_change_trade_good_production = 34 script_average_trade_good_productions = 35 script_normalize_trade_good_productions = 36 script_update_trade_good_prices = 37 script_update_trade_good_price_for_party = 38 script_do_merchant_town_trade = 39 script_party_calculate_regular_strength = 40 script_party_calculate_strength = 41 script_loot_player_items = 42 script_party_calculate_loot = 43 script_calculate_main_party_shares = 44 script_party_give_xp_and_gold = 45 script_setup_troop_meeting = 46 script_setup_party_meeting = 47 script_party_remove_all_companions = 48 script_party_remove_all_prisoners = 49 script_party_add_party_companions = 50 script_party_add_party_prisoners = 51 script_party_prisoners_add_party_companions = 52 script_party_prisoners_add_party_prisoners = 53 script_party_add_party = 54 script_party_copy = 55 script_clear_party_group = 56 script_get_nonempty_party_in_group = 57 script_collect_prisoners_from_empty_parties = 58 script_print_casualties_to_s0 = 59 script_write_fit_party_members_to_stack_selection = 60 script_remove_fit_party_member_from_stack_selection = 61 script_remove_random_fit_party_member_from_stack_selection = 62 script_cf_training_ground_sub_routine_1_for_melee_details = 63 script_training_ground_sub_routine_2_for_melee_details = 64 script_cf_training_ground_sub_routine_for_training_result = 65 script_print_troop_owned_centers_in_numbers_to_s0 = 66 script_get_random_melee_training_weapon = 67 script_start_training_at_training_ground = 68 script_party_count_fit_regulars = 69 script_party_count_fit_for_battle = 70 script_party_count_members_with_full_health = 71 script_get_stack_with_rank = 72 script_inflict_casualties_to_party = 73 script_move_members_with_ratio = 74 script_count_parties_of_faction_and_party_type = 75 script_faction_get_number_of_armies = 76 script_faction_recalculate_strength = 77 script_cf_select_random_town_with_faction = 78 script_cf_select_random_village_with_faction = 79 script_cf_select_random_walled_center_with_faction = 80 script_cf_select_random_walled_center_with_faction_and_owner_priority_no_siege = 81 script_cf_select_random_walled_center_with_faction_and_less_strength_priority = 82 script_cf_select_random_town_at_peace_with_faction = 83 script_cf_select_random_town_at_peace_with_faction_in_trade_route = 84 script_shuffle_troop_slots = 85 script_get_random_quest = 86 script_cf_get_random_enemy_center_within_range = 87 script_cf_faction_get_random_enemy_faction = 88 script_cf_faction_get_random_friendly_faction = 89 script_cf_troop_get_random_enemy_troop_with_occupation = 90 script_cf_get_random_kingdom_hero_as_lover = 91 script_cf_get_random_lord_in_a_center_with_faction = 92 script_cf_get_random_lord_except_king_with_faction = 93 script_cf_get_random_lord_from_another_faction_in_a_center = 94 script_get_closest_walled_center = 95 script_get_closest_center = 96 script_get_closest_center_of_faction = 97 script_get_closest_walled_center_of_faction = 98 script_let_nearby_parties_join_current_battle = 99 script_party_wound_all_members_aux = 100 script_party_wound_all_members = 101 script_calculate_battle_advantage = 102 script_cf_check_enemies_nearby = 103 script_get_heroes_attached_to_center_aux = 104 script_get_heroes_attached_to_center = 105 script_get_heroes_attached_to_center_as_prisoner_aux = 106 script_get_heroes_attached_to_center_as_prisoner = 107 script_give_center_to_faction = 108 script_give_center_to_faction_aux = 109 script_change_troop_faction = 110 script_give_center_to_lord = 111 script_get_number_of_hero_centers = 112 script_cf_get_random_enemy_center = 113 script_find_travel_location = 114 script_get_relation_between_parties = 115 script_calculate_weekly_party_wage = 116 script_calculate_player_faction_wage = 117 script_calculate_hero_weekly_net_income_and_add_to_wealth = 118 script_cf_reinforce_party = 119 script_hire_men_to_kingdom_hero_party = 120 script_get_percentage_with_randomized_round = 121 script_create_cattle_herd = 122 script_buy_cattle_from_village = 123 script_kill_cattle_from_herd = 124 script_create_kingdom_hero_party = 125 script_create_kingdom_party_if_below_limit = 126 script_cf_create_kingdom_party = 127 script_get_troop_attached_party = 128 script_center_get_food_consumption = 129 script_center_get_food_store_limit = 130 script_refresh_village_merchant_inventory = 131 script_refresh_village_defenders = 132 script_village_set_state = 133 script_process_village_raids = 134 script_process_sieges = 135 script_lift_siege = 136 script_process_alarms = 137 script_party_set_ai_state = 138 script_decide_kingdom_party_ais = 139 script_party_decide_next_ai_state_under_command = 140 script_kingdom_hero_decide_next_ai_state_follow_or_not = 141 script_kingdom_hero_decide_next_ai_state = 142 script_process_kingdom_parties_ai = 143 script_process_hero_ai = 144 script_select_faction_marshall = 145 script_get_center_faction_relation_including_player = 146 script_decide_faction_ai = 147 script_check_and_finish_active_army_quests_for_faction = 148 script_troop_get_player_relation = 149 script_change_troop_renown = 150 script_change_player_relation_with_troop = 151 script_change_player_relation_with_center = 152 script_change_player_relation_with_faction = 153 script_set_player_relation_with_faction = 154 script_change_player_relation_with_faction_ex = 155 script_cf_get_random_active_faction_except_player_faction_and_faction = 156 script_make_kingdom_hostile_to_player = 157 script_change_player_honor = 158 script_change_player_party_morale = 159 script_cf_player_has_item_without_modifier = 160 script_get_player_party_morale_values = 161 script_diplomacy_start_war_between_kingdoms = 162 script_party_calculate_and_set_nearby_friend_strength = 163 script_init_ai_calculation = 164 script_recalculate_ais = 165 script_recalculate_ai_for_troop = 166 script_calculate_troop_ai = 167 script_calculate_troop_ai_under_command = 168 script_diplomacy_start_peace_between_kingdoms = 169 script_event_kingdom_make_peace_with_kingdom = 170 script_randomly_start_war_peace = 171 script_exchange_prisoners_between_factions = 172 script_add_notification_menu = 173 script_finish_quest = 174 script_get_information_about_troops_position = 175 script_recruit_troop_as_companion = 176 script_setup_random_scene = 177 script_enter_dungeon = 178 script_enter_court = 179 script_find_high_ground_around_pos1 = 180 script_select_battle_tactic = 181 script_select_battle_tactic_aux = 182 script_battle_tactic_init = 183 script_battle_tactic_init_aux = 184 script_battle_tactic_apply = 185 script_battle_tactic_apply_aux = 186 script_team_get_class_percentages = 187 script_get_closest3_distance_of_enemies_at_pos1 = 188 script_team_get_average_position_of_enemies = 189 script_search_troop_prisoner_of_party = 190 script_change_debt_to_troop = 191 script_abort_quest = 192 script_cf_is_quest_troop = 193 script_check_friendly_kills = 194 script_simulate_retreat = 195 script_simulate_battle_with_agents_aux = 196 script_map_get_random_position_around_position_within_range = 197 script_get_number_of_unclaimed_centers_by_player = 198 script_troop_count_number_of_enemy_troops = 199 script_cf_troop_check_troop_is_enemy = 200 script_troop_get_leaded_center_with_index = 201 script_cf_troop_get_random_leaded_walled_center_with_less_strength_priority = 202 script_cf_troop_get_random_leaded_town_or_village_except_center = 203 script_troop_write_owned_centers_to_s2 = 204 script_troop_write_family_relations_to_s1 = 205 script_write_family_relation_as_s3s_s2_to_s4 = 206 script_complete_family_relations = 207 script_collect_friendly_parties = 208 script_encounter_calculate_fit = 209 script_encounter_init_variables = 210 script_calculate_renown_value = 211 script_cf_get_first_agent_with_troop_id = 212 script_cf_team_get_average_position_of_agents_with_type_to_pos1 = 213 script_cf_turn_windmill_fans = 214 script_print_party_members = 215 script_round_value = 216 script_change_banners_and_chest = 217 script_remove_siege_objects = 218 script_describe_relation_to_s63 = 219 script_describe_center_relation_to_s3 = 220 script_center_ambiance_sounds = 221 script_center_set_walker_to_type = 222 script_cf_center_get_free_walker = 223 script_center_remove_walker_type_from_walkers = 224 script_init_town_walkers = 225 script_cf_enter_center_location_bandit_check = 226 script_init_town_agent = 227 script_init_town_walker_agents = 228 script_agent_get_town_walker_details = 229 script_tick_town_walkers = 230 script_set_town_walker_destination = 231 script_town_init_doors = 232 script_siege_init_ai_and_belfry = 233 script_cf_siege_move_belfry = 234 script_cf_siege_rotate_belfry_platform = 235 script_cf_siege_assign_men_to_belfry = 236 script_siege_move_archers_to_archer_positions = 237 script_store_movement_order_name_to_s1 = 238 script_store_riding_order_name_to_s1 = 239 script_store_weapon_usage_order_name_to_s1 = 240 script_team_give_order_from_order_panel = 241 script_update_order_panel = 242 script_update_agent_position_on_map = 243 script_convert_3d_pos_to_map_pos = 244 script_update_order_flags_on_map = 245 script_update_order_panel_checked_classes = 246 script_update_order_panel_statistics_and_map = 247 script_consume_food = 248 script_calculate_troop_score_for_center = 249 script_assign_lords_to_empty_centers = 250 script_create_village_farmer_party = 251 script_do_party_center_trade = 252 script_player_join_faction = 253 script_player_leave_faction = 254 script_activate_deactivate_player_faction = 255 script_agent_reassign_team = 256 script_start_quest = 257 script_conclude_quest = 258 script_succeed_quest = 259 script_fail_quest = 260 script_report_quest_troop_positions = 261 script_end_quest = 262 script_cancel_quest = 263 script_update_village_market_towns = 264 script_update_mercenary_units_of_towns = 265 script_update_volunteer_troops_in_village = 266 script_update_npc_volunteer_troops_in_village = 267 script_update_companion_candidates_in_taverns = 268 script_update_ransom_brokers = 269 script_update_tavern_travelers = 270 script_update_villages_infested_by_bandits = 271 script_update_booksellers = 272 script_update_tavern_minstels = 273 script_update_faction_notes = 274 script_update_faction_traveler_notes = 275 script_update_troop_notes = 276 script_update_troop_location_notes = 277 script_update_center_notes = 278 script_update_center_recon_notes = 279 script_update_all_notes = 280 script_shield_item_set_banner = 281 script_add_troop_to_cur_tableau = 282 script_add_troop_to_cur_tableau_for_character = 283 script_add_troop_to_cur_tableau_for_inventory = 284 script_add_troop_to_cur_tableau_for_party = 285 script_get_prosperity_text_to_s50 = 286 script_spawn_bandits = 287 script_count_mission_casualties_from_agents = 288 script_get_max_skill_of_player_party = 289 script_upgrade_hero_party = 290 script_get_improvement_details = 291 script_cf_troop_agent_is_alive = 292 script_cf_village_recruit_volunteers_cond = 293 script_village_recruit_volunteers_recruit = 294 script_get_troop_item_amount = 295 script_get_name_from_dna_to_s50 = 296 script_change_center_prosperity = 297 script_get_center_ideal_prosperity = 298 script_get_poorest_village_of_faction = 299 script_troop_add_gold = 300 script_initialize_npcs = 301 script_objectionable_action = 302 script_post_battle_personality_clash_check = 303 script_event_player_defeated_enemy_party = 304 script_event_player_captured_as_prisoner = 305 script_npc_morale = 306 script_retire_companion = 307 script_reduce_companion_morale_for_clash = 308 script_calculate_ransom_amount_for_troop = 309 script_offer_ransom_amount_to_player_for_prisoners_in_party = 310 script_event_hero_taken_prisoner_by_player = 311 script_cf_check_hero_can_escape_from_player = 312 script_cf_party_remove_random_regular_troop = 313 script_place_player_banner_near_inventory = 314 script_place_player_banner_near_inventory_bms = 315 script_stay_captive_for_hours = 316 script_set_parties_around_player_ignore_player = 317 script_randomly_make_prisoner_heroes_escape_from_party = 318 script_fill_tournament_participants_troop = 319 script_get_num_tournament_participants = 320 script_get_random_tournament_participant = 321 script_add_tournament_participant = 322 script_get_random_tournament_team_amount_and_size = 323 script_get_troop_priority_point_for_tournament = 324 script_sort_tournament_participant_troops = 325 script_remove_tournament_participants_randomly = 326 script_end_tournament_fight = 327 script_get_win_amount_for_tournament_bet = 328 script_tournament_place_bet = 329 script_calculate_amount_of_cattle_can_be_stolen = 330 script_draw_banner_to_region = 331 script_get_troop_custom_banner_num_positionings = 332 script_get_custom_banner_charge_type_position_scale_color = 333 script_get_random_custom_banner = 334 script_get_custom_banner_color_from_index = 335 script_cf_check_color_visibility = 336 script_get_next_active_kingdom = 337 script_store_average_center_value_per_faction = 338 script_remove_cattles_if_herd_is_close_to_party = 339 script_get_rumor_to_s61 = 340 script_lord_comment_to_s43 = 341 script_add_log_entry = 342 script_get_relevant_comment_for_log_entry = 343 script_get_relevant_comment_to_s42 = 344 script_find_rival_from_faction = 345 script_rebellion_arguments = 346 script_get_culture_with_party_faction_for_music = 347 script_music_set_situation_with_culture = 348 script_combat_music_set_situation_with_culture = 349 script_play_victorious_sound = 350 script_set_items_for_tournament = 351 script_custom_battle_end = 352 script_remove_troop_from_prison = 353 script_formation_agent_init = 354 script_formation_array_init = 355 script_formation_formulate_arrays = 356 script_cf_formation_agent_assign_array = 357 script_cf_formation_elect_array_leader = 358 script_formation_ai_tactics = 359 script_cf_formation_ai_deploy_array_generic = 360 script_formation_reassign_array = 361 script_cf_apply_formation = 362 script_maintain_formation = 363 script_formation_move_key_reaction = 364 script_formation_move_to_pos = 365 script_formation_move = 366 script_formation_turn_key_reaction = 367 script_formation_turn = 368 script_formation_charge_key_reaction = 369 script_formation_accelerate = 370 script_formation_density_key_reaction = 371 script_formation_density_change = 372 script_calculate_formation_row = 373 script_formation_move_to_pos_key_reaction = 374 script_apply_formation_key_reaction = 375 script_formation_auto_rotation_key_reaction = 376 script_formation_tactical_charge_key_reaction = 377 script_formation_dismiss_key_reaction = 378 script_formation_clean_up = 379 script_get_closest_distance_of_enemy_at_pos1 = 380 script_formation_tactical_charge_generic = 381 script_cf_calculate_enemy_infantry_centroid = 382 script_cf_calculate_enemy_infantry_linear_regression_pos = 383 script_formation_tactical_charge_cavalry = 384 script_formation_check_array_ammo = 385 script_formation_tactical_charge_ranged = 386 script_formation_tactical_charge_line = 387 script_formation_tactical_charge_phalanx = 388 script_formation_tactical_charge_wedge = 389 script_formation_tactical_charge_square = 390 script_formation_line = 391 script_formation_phalanx = 392 script_formation_wedge = 393 script_formation_square = 394 script_dismiss_battle_array = 395 script_convert_to_slot_no = 396 script_arctan = 397 script_update_formation_key_config_buttons = 398 script_update_formation_order_panel = 399 script_update_formation_order_flags_on_map = 400 script_update_formation_order_panel_checked_arrays = 401 script_update_formation_order_panel_statistics_and_map = 402
Python
# -*- coding: cp1254 -*- from header_common import * from header_operations import * from module_constants import * from header_parties import * from header_skills import * from header_mission_templates import * from header_items import * from header_triggers import * from header_terrain_types import * from header_music import * from ID_animations import * #################################################################################################################### # scripts is a list of script records. # Each script record contns the following two fields: # 1) Script id: The prefix "script_" will be inserted when referencing scripts. # 2) Operation block: This must be a valid operation block. See header_operations.py for reference. #################################################################################################################### scripts = [ #script_game_start: # This script is called when a new game is started # INPUT: none ("game_start", [ (faction_set_slot, "fac_player_supporters_faction", slot_faction_state, sfs_inactive), (assign, "$g_player_luck", 200), (troop_set_slot, "trp_player", slot_troop_occupation, slto_kingdom_hero), (troop_set_slot, "trp_player", slot_troop_prisoner_of_party, -1), (try_for_range, ":cur_troop", kingdom_heroes_begin, kingdom_heroes_end), (troop_set_slot, ":cur_troop", slot_troop_prisoner_of_party, -1), (troop_set_slot, ":cur_troop", slot_troop_custom_banner_flag_type, -1), (troop_set_slot, ":cur_troop", slot_troop_custom_banner_map_flag_type, -1), (try_end), (troop_set_slot, "trp_player", slot_troop_custom_banner_flag_type, -1), (troop_set_slot, "trp_player", slot_troop_custom_banner_map_flag_type, -1), (store_random_in_range, "$g_election_date", 0, 45), #setting a random election date #Assigning global constant (call_script, "script_store_average_center_value_per_faction"), (troop_set_slot, "trp_player", slot_troop_custom_banner_bg_color_1, 0xFFFFFFFF), (troop_set_slot, "trp_player", slot_troop_custom_banner_bg_color_2, 0xFFFFFFFF), (troop_set_slot, "trp_player", slot_troop_custom_banner_charge_color_1, 0xFFFFFFFF), (troop_set_slot, "trp_player", slot_troop_custom_banner_charge_color_2, 0xFFFFFFFF), (troop_set_slot, "trp_player", slot_troop_custom_banner_charge_color_3, 0xFFFFFFFF), (troop_set_slot, "trp_player", slot_troop_custom_banner_charge_color_4, 0xFFFFFFFF), #Setting background colors for banners (troop_set_slot, "trp_banner_background_color_array", 0, 0xFF8f4531), (troop_set_slot, "trp_banner_background_color_array", 1, 0xFF315458), (troop_set_slot, "trp_banner_background_color_array", 2, 0xFF373736), (troop_set_slot, "trp_banner_background_color_array", 3, 0xFFa48b28), (troop_set_slot, "trp_banner_background_color_array", 4, 0xFF497735), (troop_set_slot, "trp_banner_background_color_array", 5, 0xFF82362d), (troop_set_slot, "trp_banner_background_color_array", 6, 0xFF793329), (troop_set_slot, "trp_banner_background_color_array", 7, 0xFF262521), (troop_set_slot, "trp_banner_background_color_array", 8, 0xFFd9dad1), (troop_set_slot, "trp_banner_background_color_array", 9, 0xFF524563), (troop_set_slot, "trp_banner_background_color_array", 10, 0xFF91312c), (troop_set_slot, "trp_banner_background_color_array", 11, 0xFFafa231), (troop_set_slot, "trp_banner_background_color_array", 12, 0xFF706d3c), (troop_set_slot, "trp_banner_background_color_array", 13, 0xFFd6d3ce), (troop_set_slot, "trp_banner_background_color_array", 14, 0xFF912929), (troop_set_slot, "trp_banner_background_color_array", 15, 0xFF394584), (troop_set_slot, "trp_banner_background_color_array", 16, 0xFF42662e), (troop_set_slot, "trp_banner_background_color_array", 17, 0xFFdfded6), (troop_set_slot, "trp_banner_background_color_array", 18, 0xFF292724), (troop_set_slot, "trp_banner_background_color_array", 19, 0xFF58611b), (troop_set_slot, "trp_banner_background_color_array", 20, 0xFF313a67), (troop_set_slot, "trp_banner_background_color_array", 21, 0xFFb5a231), (troop_set_slot, "trp_banner_background_color_array", 22, 0xFFbdb629), (troop_set_slot, "trp_banner_background_color_array", 23, 0xFF6e7929), (troop_set_slot, "trp_banner_background_color_array", 24, 0xFFd6d3ce), (troop_set_slot, "trp_banner_background_color_array", 25, 0xFF94a642), (troop_set_slot, "trp_banner_background_color_array", 26, 0xFF944131), (troop_set_slot, "trp_banner_background_color_array", 27, 0xFF893b34), (troop_set_slot, "trp_banner_background_color_array", 28, 0xFF425510), (troop_set_slot, "trp_banner_background_color_array", 29, 0xFF94452e), (troop_set_slot, "trp_banner_background_color_array", 30, 0xFF475a94), (troop_set_slot, "trp_banner_background_color_array", 31, 0xFFd1b231), (troop_set_slot, "trp_banner_background_color_array", 32, 0xFFe1e2df), (troop_set_slot, "trp_banner_background_color_array", 33, 0xFF4a4942), (troop_set_slot, "trp_banner_background_color_array", 34, 0xFFc6b74d), (troop_set_slot, "trp_banner_background_color_array", 35, 0xFF7b5184), (troop_set_slot, "trp_banner_background_color_array", 36, 0xFF212421), (troop_set_slot, "trp_banner_background_color_array", 37, 0xFF3c5d9a), (troop_set_slot, "trp_banner_background_color_array", 38, 0xFF4d7136), (troop_set_slot, "trp_banner_background_color_array", 39, 0xFFdfdfd6), (troop_set_slot, "trp_banner_background_color_array", 40, 0xFF527539), (troop_set_slot, "trp_banner_background_color_array", 41, 0xFF9c3c39), (troop_set_slot, "trp_banner_background_color_array", 42, 0xFF42518c), (troop_set_slot, "trp_banner_background_color_array", 43, 0xFFa46a2c), (troop_set_slot, "trp_banner_background_color_array", 44, 0xFF843829), (troop_set_slot, "trp_banner_background_color_array", 45, 0xFF2c6189), (troop_set_slot, "trp_banner_background_color_array", 46, 0xFF556421), (troop_set_slot, "trp_banner_background_color_array", 47, 0xFF9d621e), (troop_set_slot, "trp_banner_background_color_array", 48, 0xFFdeded6), (troop_set_slot, "trp_banner_background_color_array", 49, 0xFF6e4891), (troop_set_slot, "trp_banner_background_color_array", 50, 0xFF865a29), (troop_set_slot, "trp_banner_background_color_array", 51, 0xFFdedfd9), (troop_set_slot, "trp_banner_background_color_array", 52, 0xFF524273), (troop_set_slot, "trp_banner_background_color_array", 53, 0xFF8c3821), (troop_set_slot, "trp_banner_background_color_array", 54, 0xFF948403), (troop_set_slot, "trp_banner_background_color_array", 55, 0xFF313031), (troop_set_slot, "trp_banner_background_color_array", 56, 0xFF47620d), (troop_set_slot, "trp_banner_background_color_array", 57, 0xFFdfded6), (troop_set_slot, "trp_banner_background_color_array", 58, 0xFFd6d7d6), (troop_set_slot, "trp_banner_background_color_array", 59, 0xFF2e2f2c), (troop_set_slot, "trp_banner_background_color_array", 60, 0xFF604283), (troop_set_slot, "trp_banner_background_color_array", 61, 0xFF395584), (troop_set_slot, "trp_banner_background_color_array", 62, 0xFF313031), (troop_set_slot, "trp_banner_background_color_array", 63, 0xFF7e3f2e), (troop_set_slot, "trp_banner_background_color_array", 64, 0xFF343434), (troop_set_slot, "trp_banner_background_color_array", 65, 0xFF3c496b), (troop_set_slot, "trp_banner_background_color_array", 66, 0xFFd9d8d1), (troop_set_slot, "trp_banner_background_color_array", 67, 0xFF99823c), (troop_set_slot, "trp_banner_background_color_array", 68, 0xFF9f822e), (troop_set_slot, "trp_banner_background_color_array", 69, 0xFF393839), (troop_set_slot, "trp_banner_background_color_array", 70, 0xFFa54931), (troop_set_slot, "trp_banner_background_color_array", 71, 0xFFdfdcd6), (troop_set_slot, "trp_banner_background_color_array", 72, 0xFF9f4a36), (troop_set_slot, "trp_banner_background_color_array", 73, 0xFF8c7521), (troop_set_slot, "trp_banner_background_color_array", 74, 0xFF9f4631), (troop_set_slot, "trp_banner_background_color_array", 75, 0xFF793324), (troop_set_slot, "trp_banner_background_color_array", 76, 0xFF395076), (troop_set_slot, "trp_banner_background_color_array", 77, 0xFF2c2b2c), (troop_set_slot, "trp_banner_background_color_array", 78, 0xFF657121), (troop_set_slot, "trp_banner_background_color_array", 79, 0xFF7e3121), (troop_set_slot, "trp_banner_background_color_array", 80, 0xFF76512e), (troop_set_slot, "trp_banner_background_color_array", 81, 0xFFe7e3de), (troop_set_slot, "trp_banner_background_color_array", 82, 0xFF947921), (troop_set_slot, "trp_banner_background_color_array", 83, 0xFF4d7b7c), (troop_set_slot, "trp_banner_background_color_array", 84, 0xFF343331), (troop_set_slot, "trp_banner_background_color_array", 85, 0xFFa74d36), (troop_set_slot, "trp_banner_background_color_array", 86, 0xFFe7e3de), (troop_set_slot, "trp_banner_background_color_array", 87, 0xFFd6d8ce), (troop_set_slot, "trp_banner_background_color_array", 88, 0xFF3e4d67), (troop_set_slot, "trp_banner_background_color_array", 89, 0xFF913331), (troop_set_slot, "trp_banner_background_color_array", 90, 0xFF4d6994), (troop_set_slot, "trp_banner_background_color_array", 91, 0xFF4a6118), (troop_set_slot, "trp_banner_background_color_array", 92, 0xFFd9d8d3), (troop_set_slot, "trp_banner_background_color_array", 93, 0xFF394479), (troop_set_slot, "trp_banner_background_color_array", 94, 0xFF343331), (troop_set_slot, "trp_banner_background_color_array", 95, 0xFF3f4d5d), (troop_set_slot, "trp_banner_background_color_array", 96, 0xFF4a6489), (troop_set_slot, "trp_banner_background_color_array", 97, 0xFF313031), (troop_set_slot, "trp_banner_background_color_array", 98, 0xFFd6d7ce), (troop_set_slot, "trp_banner_background_color_array", 99, 0xFFc69e00), (troop_set_slot, "trp_banner_background_color_array", 100, 0xFF638e52), (troop_set_slot, "trp_banner_background_color_array", 101, 0xFFdcdbd3), (troop_set_slot, "trp_banner_background_color_array", 102, 0xFFdbdcd3), (troop_set_slot, "trp_banner_background_color_array", 103, 0xFF843831), (troop_set_slot, "trp_banner_background_color_array", 104, 0xFFcecfc6), (troop_set_slot, "trp_banner_background_color_array", 105, 0xFF8f4431), (troop_set_slot, "trp_banner_background_color_array", 106, 0xFF602926), (troop_set_slot, "trp_banner_background_color_array", 107, 0xFFd3d4cb), (troop_set_slot, "trp_banner_background_color_array", 108, 0xFFdcdbd3), (troop_set_slot, "trp_banner_background_color_array", 109, 0xFF556024), (troop_set_slot, "trp_banner_background_color_array", 110, 0xFF602d2c), (troop_set_slot, "trp_banner_background_color_array", 111, 0xFF315184), (troop_set_slot, "trp_banner_background_color_array", 112, 0xFF313031), (troop_set_slot, "trp_banner_background_color_array", 113, 0xFFe7e7e7), (troop_set_slot, "trp_banner_background_color_array", 114, 0xFF526d47), (troop_set_slot, "trp_banner_background_color_array", 115, 0xFFdedbd6), (troop_set_slot, "trp_banner_background_color_array", 116, 0xFFb2a631), (troop_set_slot, "trp_banner_background_color_array", 117, 0xFF76713f), (troop_set_slot, "trp_banner_background_color_array", 118, 0xFFdedbd6), (troop_set_slot, "trp_banner_background_color_array", 119, 0xFFe9eae7), (troop_set_slot, "trp_banner_background_color_array", 120, 0xFF6b5131), (troop_set_slot, "trp_banner_background_color_array", 121, 0xFF31557b), (troop_set_slot, "trp_banner_background_color_array", 122, 0xFF703324), (troop_set_slot, "trp_banner_background_color_array", 123, 0xFFe7e3de), (troop_set_slot, "trp_banner_background_color_array", 124, 0xFFd6d7ce), (troop_set_slot, "trp_banner_background_color_array", 125, 0xFF3f6e39), #Default banners (troop_set_slot, "trp_banner_background_color_array", 126, 0xFF212221), (troop_set_slot, "trp_banner_background_color_array", 127, 0xFF212221), (troop_set_slot, "trp_banner_background_color_array", 128, 0xFF2E3B10), (troop_set_slot, "trp_banner_background_color_array", 129, 0xFF425D7B), (troop_set_slot, "trp_banner_background_color_array", 130, 0xFF394608), (store_random_in_range, ":starting_training_ground", training_grounds_begin, training_grounds_end), (party_relocate_near_party, "p_main_party", ":starting_training_ground", 3), (str_store_troop_name, s5, "trp_player"), (party_set_name, "p_main_party", s5), (call_script, "script_update_party_creation_random_limits"), # Reseting player party icon (assign, "$g_player_party_icon", -1), # Setting food bonuses (item_set_slot, "itm_smoked_fish", slot_item_food_bonus, 5), (item_set_slot, "itm_dried_meat", slot_item_food_bonus, 5), (item_set_slot, "itm_cattle_meat", slot_item_food_bonus, 7), (item_set_slot, "itm_pork", slot_item_food_bonus, 6), (item_set_slot, "itm_bread", slot_item_food_bonus, 4), (item_set_slot, "itm_apples", slot_item_food_bonus, 5), (item_set_slot, "itm_cheese", slot_item_food_bonus, 5), (item_set_slot, "itm_chicken", slot_item_food_bonus, 6), (item_set_slot, "itm_honey", slot_item_food_bonus, 10), (item_set_slot, "itm_cabbages", slot_item_food_bonus, 4), (item_set_slot, "itm_sausages", slot_item_food_bonus, 5), (item_set_slot, "itm_butter", slot_item_food_bonus, 8), (item_set_slot, "itm_wine", slot_item_food_bonus, 5), (item_set_slot, "itm_ale", slot_item_food_bonus, 4), #NPC companion changes begin (call_script, "script_initialize_npcs"), (assign, "$disable_npc_complaints", 0), #NPC companion changes end # Setting book intelligence requirements (item_set_slot, "itm_book_tactics", slot_item_intelligence_requirement, 9), (item_set_slot, "itm_book_persuasion", slot_item_intelligence_requirement, 8), (item_set_slot, "itm_book_leadership", slot_item_intelligence_requirement, 7), (item_set_slot, "itm_book_intelligence", slot_item_intelligence_requirement, 10), (item_set_slot, "itm_book_trade", slot_item_intelligence_requirement, 11), (item_set_slot, "itm_book_weapon_mastery", slot_item_intelligence_requirement, 9), (item_set_slot, "itm_book_engineering", slot_item_intelligence_requirement, 12), (item_set_slot, "itm_book_wound_treatment_reference", slot_item_intelligence_requirement, 10), (item_set_slot, "itm_book_training_reference", slot_item_intelligence_requirement, 10), (item_set_slot, "itm_book_surgery_reference", slot_item_intelligence_requirement, 10), # Setting the random town sequence: (store_sub, ":num_towns", towns_end, towns_begin), (assign, ":num_iterations", ":num_towns"), (try_for_range, ":cur_town_no", 0, ":num_towns"), (troop_set_slot, "trp_random_town_sequence", ":cur_town_no", -1), (try_end), (assign, ":cur_town_no", 0), (try_for_range, ":unused", 0, ":num_iterations"), (store_random_in_range, ":random_no", 0, ":num_towns"), (assign, ":is_unique", 1), (try_for_range, ":cur_town_no_2", 0, ":num_towns"), (troop_slot_eq, "trp_random_town_sequence", ":cur_town_no_2", ":random_no"), (assign, ":is_unique", 0), (try_end), (try_begin), (eq, ":is_unique", 1), (troop_set_slot, "trp_random_town_sequence", ":cur_town_no", ":random_no"), (val_add, ":cur_town_no", 1), (else_try), (val_add, ":num_iterations", 1), (try_end), (try_end), # Cultures: (faction_set_slot, "fac_culture_1", slot_faction_tier_1_troop, "trp_swadian_recruit"), (faction_set_slot, "fac_culture_1", slot_faction_tier_2_troop, "trp_swadian_militia"), (faction_set_slot, "fac_culture_1", slot_faction_tier_3_troop, "trp_swadian_footman"), (faction_set_slot, "fac_culture_1", slot_faction_tier_4_troop, "trp_swadian_infantry"), (faction_set_slot, "fac_culture_1", slot_faction_tier_5_troop, "trp_swadian_knight"), (faction_set_slot, "fac_culture_2", slot_faction_tier_1_troop, "trp_vaegir_recruit"), (faction_set_slot, "fac_culture_2", slot_faction_tier_2_troop, "trp_vaegir_footman"), (faction_set_slot, "fac_culture_2", slot_faction_tier_3_troop, "trp_vaegir_veteran"), (faction_set_slot, "fac_culture_2", slot_faction_tier_4_troop, "trp_vaegir_infantry"), (faction_set_slot, "fac_culture_2", slot_faction_tier_5_troop, "trp_vaegir_knight"), (faction_set_slot, "fac_culture_3", slot_faction_tier_1_troop, "trp_khergit_tribesman"), (faction_set_slot, "fac_culture_3", slot_faction_tier_2_troop, "trp_khergit_skirmisher"), (faction_set_slot, "fac_culture_3", slot_faction_tier_3_troop, "trp_khergit_horseman"), (faction_set_slot, "fac_culture_3", slot_faction_tier_4_troop, "trp_khergit_horse_archer"), (faction_set_slot, "fac_culture_3", slot_faction_tier_5_troop, "trp_khergit_veteran_horse_archer"), (faction_set_slot, "fac_culture_4", slot_faction_tier_1_troop, "trp_nord_recruit"), (faction_set_slot, "fac_culture_4", slot_faction_tier_2_troop, "trp_nord_footman"), (faction_set_slot, "fac_culture_4", slot_faction_tier_3_troop, "trp_nord_trained_footman"), (faction_set_slot, "fac_culture_4", slot_faction_tier_4_troop, "trp_nord_warrior"), (faction_set_slot, "fac_culture_4", slot_faction_tier_5_troop, "trp_nord_veteran"), (faction_set_slot, "fac_culture_5", slot_faction_tier_1_troop, "trp_rhodok_tribesman"), (faction_set_slot, "fac_culture_5", slot_faction_tier_2_troop, "trp_rhodok_spearman"), (faction_set_slot, "fac_culture_5", slot_faction_tier_3_troop, "trp_rhodok_trained_spearman"), (faction_set_slot, "fac_culture_5", slot_faction_tier_4_troop, "trp_rhodok_veteran_spearman"), (faction_set_slot, "fac_culture_5", slot_faction_tier_5_troop, "trp_rhodok_sergeant"), # Factions: (faction_set_slot, "fac_kingdom_1", slot_faction_culture, "fac_culture_1"), (faction_set_slot, "fac_kingdom_1", slot_faction_leader, "trp_kingdom_1_lord"), (faction_set_slot, "fac_kingdom_2", slot_faction_culture, "fac_culture_2"), (faction_set_slot, "fac_kingdom_2", slot_faction_leader, "trp_kingdom_2_lord"), (faction_set_slot, "fac_kingdom_3", slot_faction_culture, "fac_culture_3"), (faction_set_slot, "fac_kingdom_3", slot_faction_leader, "trp_kingdom_3_lord"), (faction_set_slot, "fac_kingdom_4", slot_faction_culture, "fac_culture_4"), (faction_set_slot, "fac_kingdom_4", slot_faction_leader, "trp_kingdom_4_lord"), (faction_set_slot, "fac_kingdom_5", slot_faction_culture, "fac_culture_5"), (faction_set_slot, "fac_kingdom_5", slot_faction_leader, "trp_kingdom_5_lord"), ## (call_script, "script_diplomacy_start_war_between_kingdoms", "fac_kingdom_1", "fac_kingdom_2"), ## (call_script, "script_diplomacy_start_war_between_kingdoms", "fac_kingdom_1", "fac_kingdom_5"), ## (call_script, "script_diplomacy_start_war_between_kingdoms", "fac_kingdom_4", "fac_kingdom_2"), ## (call_script, "script_diplomacy_start_war_between_kingdoms", "fac_kingdom_4", "fac_kingdom_1"), ## (call_script, "script_diplomacy_start_war_between_kingdoms", "fac_kingdom_3", "fac_kingdom_2"), ## (call_script, "script_diplomacy_start_war_between_kingdoms", "fac_kingdom_3", "fac_kingdom_5"), (try_for_range, ":unused", 0, 70), (call_script, "script_randomly_start_war_peace", 0), (try_end), (try_for_range, ":faction_no", kingdoms_begin, kingdoms_end), (faction_set_slot, ":faction_no", slot_faction_marshall, -1), (faction_get_slot, ":culture", ":faction_no", slot_faction_culture), (faction_get_slot, ":troop", ":culture", slot_faction_tier_1_troop), (faction_set_slot, ":faction_no", slot_faction_tier_1_troop, ":troop"), (faction_get_slot, ":troop", ":culture", slot_faction_tier_2_troop), (faction_set_slot, ":faction_no", slot_faction_tier_2_troop, ":troop"), (faction_get_slot, ":troop", ":culture", slot_faction_tier_3_troop), (faction_set_slot, ":faction_no", slot_faction_tier_3_troop, ":troop"), (faction_get_slot, ":troop", ":culture", slot_faction_tier_4_troop), (faction_set_slot, ":faction_no", slot_faction_tier_4_troop, ":troop"), (faction_get_slot, ":troop", ":culture", slot_faction_tier_5_troop), (faction_set_slot, ":faction_no", slot_faction_tier_5_troop, ":troop"), (try_begin), (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_1"), (faction_set_slot, ":faction_no", slot_faction_deserter_troop, "trp_swadian_deserter"), (faction_set_slot, ":faction_no", slot_faction_guard_troop, "trp_swadian_sergeant"), (faction_set_slot, ":faction_no", slot_faction_messenger_troop, "trp_swadian_messenger"), (faction_set_slot, ":faction_no", slot_faction_prison_guard_troop, "trp_swadian_prison_guard"), (faction_set_slot, ":faction_no", slot_faction_castle_guard_troop, "trp_swadian_castle_guard"), (faction_set_slot, ":faction_no", slot_faction_reinforcements_a, "pt_kingdom_1_reinforcements_a"), (faction_set_slot, ":faction_no", slot_faction_reinforcements_b, "pt_kingdom_1_reinforcements_b"), (faction_set_slot, ":faction_no", slot_faction_reinforcements_c, "pt_kingdom_1_reinforcements_c"), (else_try), (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_2"), (faction_set_slot, ":faction_no", slot_faction_deserter_troop, "trp_vaegir_deserter"), (faction_set_slot, ":faction_no", slot_faction_guard_troop, "trp_vaegir_guard"), (faction_set_slot, ":faction_no", slot_faction_messenger_troop, "trp_vaegir_messenger"), (faction_set_slot, ":faction_no", slot_faction_prison_guard_troop, "trp_vaegir_prison_guard"), (faction_set_slot, ":faction_no", slot_faction_castle_guard_troop, "trp_vaegir_castle_guard"), (faction_set_slot, ":faction_no", slot_faction_reinforcements_a, "pt_kingdom_2_reinforcements_a"), (faction_set_slot, ":faction_no", slot_faction_reinforcements_b, "pt_kingdom_2_reinforcements_b"), (faction_set_slot, ":faction_no", slot_faction_reinforcements_c, "pt_kingdom_2_reinforcements_c"), (else_try), (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_3"), (faction_set_slot, ":faction_no", slot_faction_deserter_troop, "trp_khergit_deserter"), (faction_set_slot, ":faction_no", slot_faction_guard_troop, "trp_khergit_horseman"), (faction_set_slot, ":faction_no", slot_faction_messenger_troop, "trp_khergit_messenger"), (faction_set_slot, ":faction_no", slot_faction_prison_guard_troop, "trp_khergit_prison_guard"), (faction_set_slot, ":faction_no", slot_faction_castle_guard_troop, "trp_khergit_castle_guard"), (faction_set_slot, ":faction_no", slot_faction_reinforcements_a, "pt_kingdom_3_reinforcements_a"), (faction_set_slot, ":faction_no", slot_faction_reinforcements_b, "pt_kingdom_3_reinforcements_b"), (faction_set_slot, ":faction_no", slot_faction_reinforcements_c, "pt_kingdom_3_reinforcements_c"), (else_try), (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_4"), (faction_set_slot, ":faction_no", slot_faction_deserter_troop, "trp_nord_deserter"), (faction_set_slot, ":faction_no", slot_faction_guard_troop, "trp_nord_warrior"), (faction_set_slot, ":faction_no", slot_faction_messenger_troop, "trp_nord_messenger"), (faction_set_slot, ":faction_no", slot_faction_prison_guard_troop, "trp_nord_prison_guard"), (faction_set_slot, ":faction_no", slot_faction_castle_guard_troop, "trp_nord_castle_guard"), (faction_set_slot, ":faction_no", slot_faction_reinforcements_a, "pt_kingdom_4_reinforcements_a"), (faction_set_slot, ":faction_no", slot_faction_reinforcements_b, "pt_kingdom_4_reinforcements_b"), (faction_set_slot, ":faction_no", slot_faction_reinforcements_c, "pt_kingdom_4_reinforcements_c"), (else_try), (faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_5"), (faction_set_slot, ":faction_no", slot_faction_deserter_troop, "trp_rhodok_deserter"), (faction_set_slot, ":faction_no", slot_faction_guard_troop, "trp_rhodok_veteran_spearman"), (faction_set_slot, ":faction_no", slot_faction_messenger_troop, "trp_rhodok_messenger"), (faction_set_slot, ":faction_no", slot_faction_prison_guard_troop, "trp_rhodok_prison_guard"), (faction_set_slot, ":faction_no", slot_faction_castle_guard_troop, "trp_rhodok_castle_guard"), (faction_set_slot, ":faction_no", slot_faction_reinforcements_a, "pt_kingdom_5_reinforcements_a"), (faction_set_slot, ":faction_no", slot_faction_reinforcements_b, "pt_kingdom_5_reinforcements_b"), (faction_set_slot, ":faction_no", slot_faction_reinforcements_c, "pt_kingdom_5_reinforcements_c"), (try_end), (try_end), (faction_set_slot, "fac_player_supporters_faction", slot_faction_marshall, "trp_player"), # Towns: (try_for_range, ":item_no", trade_goods_begin, trade_goods_end), (store_sub, ":offset", ":item_no", trade_goods_begin), (val_add, ":offset", slot_town_trade_good_prices_begin), (try_for_range, ":center_no", centers_begin, centers_end), (party_set_slot, ":center_no", ":offset", average_price_factor), (try_end), ## (party_set_slot, "p_zendar", ":offset", average_price_factor), ## (party_set_slot, "p_salt_mine", ":offset", average_price_factor), ## (party_set_slot, "p_four_ways_inn", ":offset", average_price_factor), (try_end), (call_script, "script_set_trade_route_between_centers", "p_town_1", "p_town_2"), (call_script, "script_set_trade_route_between_centers", "p_town_1", "p_town_4"), (call_script, "script_set_trade_route_between_centers", "p_town_1", "p_town_8"), (call_script, "script_set_trade_route_between_centers", "p_town_1", "p_town_9"), (call_script, "script_set_trade_route_between_centers", "p_town_1", "p_town_11"), (call_script, "script_set_trade_route_between_centers", "p_town_1", "p_town_12"), (call_script, "script_set_trade_route_between_centers", "p_town_1", "p_town_13"), (call_script, "script_set_trade_route_between_centers", "p_town_1", "p_town_15"), (call_script, "script_set_trade_route_between_centers", "p_town_1", "p_town_16"), (call_script, "script_set_trade_route_between_centers", "p_town_2", "p_town_4"), (call_script, "script_set_trade_route_between_centers", "p_town_2", "p_town_6"), (call_script, "script_set_trade_route_between_centers", "p_town_2", "p_town_8"), (call_script, "script_set_trade_route_between_centers", "p_town_2", "p_town_12"), (call_script, "script_set_trade_route_between_centers", "p_town_2", "p_town_13"), (call_script, "script_set_trade_route_between_centers", "p_town_2", "p_town_15"), (call_script, "script_set_trade_route_between_centers", "p_town_2", "p_town_16"), (call_script, "script_set_trade_route_between_centers", "p_town_3", "p_town_4"), (call_script, "script_set_trade_route_between_centers", "p_town_3", "p_town_5"), (call_script, "script_set_trade_route_between_centers", "p_town_3", "p_town_6"), (call_script, "script_set_trade_route_between_centers", "p_town_3", "p_town_7"), (call_script, "script_set_trade_route_between_centers", "p_town_3", "p_town_14"), (call_script, "script_set_trade_route_between_centers", "p_town_3", "p_town_15"), (call_script, "script_set_trade_route_between_centers", "p_town_3", "p_town_18"), (call_script, "script_set_trade_route_between_centers", "p_town_4", "p_town_6"), (call_script, "script_set_trade_route_between_centers", "p_town_4", "p_town_12"), (call_script, "script_set_trade_route_between_centers", "p_town_4", "p_town_13"), (call_script, "script_set_trade_route_between_centers", "p_town_4", "p_town_15"), (call_script, "script_set_trade_route_between_centers", "p_town_4", "p_town_16"), (call_script, "script_set_trade_route_between_centers", "p_town_5", "p_town_6"), (call_script, "script_set_trade_route_between_centers", "p_town_5", "p_town_7"), (call_script, "script_set_trade_route_between_centers", "p_town_5", "p_town_14"), (call_script, "script_set_trade_route_between_centers", "p_town_5", "p_town_15"), (call_script, "script_set_trade_route_between_centers", "p_town_5", "p_town_17"), (call_script, "script_set_trade_route_between_centers", "p_town_5", "p_town_18"), (call_script, "script_set_trade_route_between_centers", "p_town_6", "p_town_7"), (call_script, "script_set_trade_route_between_centers", "p_town_6", "p_town_11"), (call_script, "script_set_trade_route_between_centers", "p_town_6", "p_town_13"), (call_script, "script_set_trade_route_between_centers", "p_town_6", "p_town_15"), (call_script, "script_set_trade_route_between_centers", "p_town_6", "p_town_16"), (call_script, "script_set_trade_route_between_centers", "p_town_6", "p_town_17"), (call_script, "script_set_trade_route_between_centers", "p_town_7", "p_town_10"), (call_script, "script_set_trade_route_between_centers", "p_town_7", "p_town_11"), (call_script, "script_set_trade_route_between_centers", "p_town_7", "p_town_13"), (call_script, "script_set_trade_route_between_centers", "p_town_7", "p_town_14"), (call_script, "script_set_trade_route_between_centers", "p_town_7", "p_town_15"), (call_script, "script_set_trade_route_between_centers", "p_town_7", "p_town_16"), (call_script, "script_set_trade_route_between_centers", "p_town_7", "p_town_17"), (call_script, "script_set_trade_route_between_centers", "p_town_7", "p_town_18"), (call_script, "script_set_trade_route_between_centers", "p_town_8", "p_town_9"), (call_script, "script_set_trade_route_between_centers", "p_town_8", "p_town_11"), (call_script, "script_set_trade_route_between_centers", "p_town_8", "p_town_12"), (call_script, "script_set_trade_route_between_centers", "p_town_8", "p_town_13"), (call_script, "script_set_trade_route_between_centers", "p_town_8", "p_town_16"), (call_script, "script_set_trade_route_between_centers", "p_town_9", "p_town_11"), (call_script, "script_set_trade_route_between_centers", "p_town_9", "p_town_12"), (call_script, "script_set_trade_route_between_centers", "p_town_9", "p_town_13"), (call_script, "script_set_trade_route_between_centers", "p_town_9", "p_town_16"), (call_script, "script_set_trade_route_between_centers", "p_town_10", "p_town_11"), (call_script, "script_set_trade_route_between_centers", "p_town_10", "p_town_14"), (call_script, "script_set_trade_route_between_centers", "p_town_10", "p_town_17"), (call_script, "script_set_trade_route_between_centers", "p_town_10", "p_town_18"), (call_script, "script_set_trade_route_between_centers", "p_town_11", "p_town_12"), (call_script, "script_set_trade_route_between_centers", "p_town_11", "p_town_13"), (call_script, "script_set_trade_route_between_centers", "p_town_11", "p_town_14"), (call_script, "script_set_trade_route_between_centers", "p_town_11", "p_town_16"), (call_script, "script_set_trade_route_between_centers", "p_town_11", "p_town_17"), (call_script, "script_set_trade_route_between_centers", "p_town_12", "p_town_13"), (call_script, "script_set_trade_route_between_centers", "p_town_12", "p_town_16"), (call_script, "script_set_trade_route_between_centers", "p_town_13", "p_town_16"), (call_script, "script_set_trade_route_between_centers", "p_town_13", "p_town_17"), (call_script, "script_set_trade_route_between_centers", "p_town_14", "p_town_17"), (call_script, "script_set_trade_route_between_centers", "p_town_14", "p_town_18"), (call_script, "script_set_trade_route_between_centers", "p_town_15", "p_town_16"), (call_script, "script_set_trade_route_between_centers", "p_town_16", "p_town_17"), (call_script, "script_set_trade_route_between_centers", "p_town_17", "p_town_18"), (try_for_range, ":town_no", towns_begin, towns_end), (party_set_slot, ":town_no", slot_town_tournament_max_teams, 4), (party_set_slot, ":town_no", slot_town_tournament_max_team_size, 8), (try_end), (party_set_slot, "p_town_6", slot_town_tournament_max_team_size, 2), #start some tournaments (try_for_range, ":town_no", towns_begin, towns_end), (store_random_in_range, ":rand", 0, 100), (lt, ":rand", 20), (store_random_in_range, ":random_days", 12, 15), (party_set_slot, ":town_no", slot_town_has_tournament, ":random_days"), (try_end), (party_set_slot,"p_town_1", slot_town_arena_melee_1_num_teams, 2), (party_set_slot,"p_town_1", slot_town_arena_melee_1_team_size, 1), (party_set_slot,"p_town_1", slot_town_arena_melee_2_num_teams, 4), (party_set_slot,"p_town_1", slot_town_arena_melee_2_team_size, 1), (party_set_slot,"p_town_1", slot_town_arena_melee_3_num_teams, 4), (party_set_slot,"p_town_1", slot_town_arena_melee_3_team_size, 1), (call_script, "script_center_change_trade_good_production", "p_town_1", "itm_linen", 110, 0), (party_set_slot,"p_town_2", slot_town_arena_melee_1_num_teams, 4), (party_set_slot,"p_town_2", slot_town_arena_melee_1_team_size, 4), (party_set_slot,"p_town_2", slot_town_arena_melee_2_num_teams, 4), (party_set_slot,"p_town_2", slot_town_arena_melee_2_team_size, 6), (party_set_slot,"p_town_2", slot_town_arena_melee_3_num_teams, 4), (party_set_slot,"p_town_2", slot_town_arena_melee_3_team_size, 8), (call_script, "script_center_change_trade_good_production", "p_town_2", "itm_smoked_fish", 130, 0), (party_set_slot,"p_town_3", slot_town_arena_melee_1_num_teams, 2), (party_set_slot,"p_town_3", slot_town_arena_melee_1_team_size, 8), (party_set_slot,"p_town_3", slot_town_arena_melee_2_num_teams, 2), (party_set_slot,"p_town_3", slot_town_arena_melee_2_team_size, 8), (party_set_slot,"p_town_3", slot_town_arena_melee_3_num_teams, 2), (party_set_slot,"p_town_3", slot_town_arena_melee_3_team_size, 8), (call_script, "script_center_change_trade_good_production", "p_town_3", "itm_wine", 120, 0), (party_set_slot,"p_town_4", slot_town_arena_melee_1_num_teams, 2), (party_set_slot,"p_town_4", slot_town_arena_melee_1_team_size, 8), (party_set_slot,"p_town_4", slot_town_arena_melee_2_num_teams, 3), (party_set_slot,"p_town_4", slot_town_arena_melee_2_team_size, 8), (party_set_slot,"p_town_4", slot_town_arena_melee_3_num_teams, 2), (party_set_slot,"p_town_4", slot_town_arena_melee_3_team_size, 5), (call_script, "script_center_change_trade_good_production", "p_town_4", "itm_oil", 130, 0), (party_set_slot,"p_town_5", slot_town_arena_melee_1_num_teams, 2), (party_set_slot,"p_town_5", slot_town_arena_melee_1_team_size, 3), (party_set_slot,"p_town_5", slot_town_arena_melee_2_num_teams, 2), (party_set_slot,"p_town_5", slot_town_arena_melee_2_team_size, 5), (party_set_slot,"p_town_5", slot_town_arena_melee_3_num_teams, 2), (party_set_slot,"p_town_5", slot_town_arena_melee_3_team_size, 8), (call_script, "script_center_change_trade_good_production", "p_town_5", "itm_velvet", 80, 0), (party_set_slot,"p_town_6", slot_town_arena_melee_1_num_teams, 2), (party_set_slot,"p_town_6", slot_town_arena_melee_1_team_size, 4), (party_set_slot,"p_town_6", slot_town_arena_melee_2_num_teams, 3), (party_set_slot,"p_town_6", slot_town_arena_melee_2_team_size, 4), (party_set_slot,"p_town_6", slot_town_arena_melee_3_num_teams, 3), (party_set_slot,"p_town_6", slot_town_arena_melee_3_team_size, 6), (call_script, "script_center_change_trade_good_production", "p_town_6", "itm_ale", 130, 0), (party_set_slot,"p_town_7", slot_town_arena_melee_1_num_teams, 4), (party_set_slot,"p_town_7", slot_town_arena_melee_1_team_size, 4), (party_set_slot,"p_town_7", slot_town_arena_melee_2_num_teams, 4), (party_set_slot,"p_town_7", slot_town_arena_melee_2_team_size, 6), (party_set_slot,"p_town_7", slot_town_arena_melee_3_num_teams, 4), (party_set_slot,"p_town_7", slot_town_arena_melee_3_team_size, 8), (call_script, "script_center_change_trade_good_production", "p_town_7", "itm_grain", 140, 0), (call_script, "script_center_change_trade_good_production", "p_town_7", "itm_flour", 110, 0), (party_set_slot,"p_town_8", slot_town_arena_melee_1_num_teams, 3), (party_set_slot,"p_town_8", slot_town_arena_melee_1_team_size, 1), (party_set_slot,"p_town_8", slot_town_arena_melee_2_num_teams, 3), (party_set_slot,"p_town_8", slot_town_arena_melee_2_team_size, 3), (party_set_slot,"p_town_8", slot_town_arena_melee_3_num_teams, 3), (party_set_slot,"p_town_8", slot_town_arena_melee_3_team_size, 7), (call_script, "script_center_change_trade_good_production", "p_town_8", "itm_wool", 130, 0), (party_set_slot,"p_town_9", slot_town_arena_melee_1_num_teams, 2), (party_set_slot,"p_town_9", slot_town_arena_melee_1_team_size, 2), (party_set_slot,"p_town_9", slot_town_arena_melee_2_num_teams, 2), (party_set_slot,"p_town_9", slot_town_arena_melee_2_team_size, 5), (party_set_slot,"p_town_9", slot_town_arena_melee_3_num_teams, 2), (party_set_slot,"p_town_9", slot_town_arena_melee_3_team_size, 8), (call_script, "script_center_change_trade_good_production", "p_town_9", "itm_furs", 135, 0), (party_set_slot,"p_town_10", slot_town_arena_melee_1_num_teams, 2), (party_set_slot,"p_town_10", slot_town_arena_melee_1_team_size, 3), (party_set_slot,"p_town_10", slot_town_arena_melee_2_num_teams, 2), (party_set_slot,"p_town_10", slot_town_arena_melee_2_team_size, 5), (party_set_slot,"p_town_10", slot_town_arena_melee_3_num_teams, 2), (party_set_slot,"p_town_10", slot_town_arena_melee_3_team_size, 8), (call_script, "script_center_change_trade_good_production", "p_town_10", "itm_spice", 86, 0), (party_set_slot,"p_town_11", slot_town_arena_melee_1_num_teams, 2), (party_set_slot,"p_town_11", slot_town_arena_melee_1_team_size, 8), (party_set_slot,"p_town_11", slot_town_arena_melee_2_num_teams, 3), (party_set_slot,"p_town_11", slot_town_arena_melee_2_team_size, 4), (party_set_slot,"p_town_11", slot_town_arena_melee_3_num_teams, 3), (party_set_slot,"p_town_11", slot_town_arena_melee_3_team_size, 6), (call_script, "script_center_change_trade_good_production", "p_town_11", "itm_iron", 130, 0), (party_set_slot,"p_town_12", slot_town_arena_melee_1_num_teams, 3), (party_set_slot,"p_town_12", slot_town_arena_melee_1_team_size, 8), (party_set_slot,"p_town_12", slot_town_arena_melee_2_num_teams, 4), (party_set_slot,"p_town_12", slot_town_arena_melee_2_team_size, 6), (party_set_slot,"p_town_12", slot_town_arena_melee_3_num_teams, 4), (party_set_slot,"p_town_12", slot_town_arena_melee_3_team_size, 5), (call_script, "script_center_change_trade_good_production", "p_town_12", "itm_smoked_fish", 140, 0), (party_set_slot,"p_town_13", slot_town_arena_melee_1_num_teams, 2), (party_set_slot,"p_town_13", slot_town_arena_melee_1_team_size, 8), (party_set_slot,"p_town_13", slot_town_arena_melee_2_num_teams, 4), (party_set_slot,"p_town_13", slot_town_arena_melee_2_team_size, 5), (party_set_slot,"p_town_13", slot_town_arena_melee_3_num_teams, 4), (party_set_slot,"p_town_13", slot_town_arena_melee_3_team_size, 7), (call_script, "script_center_change_trade_good_production", "p_town_13", "itm_dried_meat", 120, 0), (party_set_slot,"p_town_14", slot_town_arena_melee_1_num_teams, 2), (party_set_slot,"p_town_14", slot_town_arena_melee_1_team_size, 4), (party_set_slot,"p_town_14", slot_town_arena_melee_2_num_teams, 2), (party_set_slot,"p_town_14", slot_town_arena_melee_2_team_size, 5), (party_set_slot,"p_town_14", slot_town_arena_melee_3_num_teams, 2), (party_set_slot,"p_town_14", slot_town_arena_melee_3_team_size, 6), (call_script, "script_center_change_trade_good_production", "p_town_14", "itm_pottery", 120, 0), (party_set_slot,"p_town_15", slot_town_arena_melee_1_num_teams, 2), (party_set_slot,"p_town_15", slot_town_arena_melee_1_team_size, 8), (party_set_slot,"p_town_15", slot_town_arena_melee_2_num_teams, 3), (party_set_slot,"p_town_15", slot_town_arena_melee_2_team_size, 4), (party_set_slot,"p_town_15", slot_town_arena_melee_3_num_teams, 3), (party_set_slot,"p_town_15", slot_town_arena_melee_3_team_size, 6), (call_script, "script_center_change_trade_good_production", "p_town_15", "itm_cheese", 100, 0), (party_set_slot,"p_town_16", slot_town_arena_melee_1_num_teams, 3), (party_set_slot,"p_town_16", slot_town_arena_melee_1_team_size, 8), (party_set_slot,"p_town_16", slot_town_arena_melee_2_num_teams, 4), (party_set_slot,"p_town_16", slot_town_arena_melee_2_team_size, 6), (party_set_slot,"p_town_16", slot_town_arena_melee_3_num_teams, 4), (party_set_slot,"p_town_16", slot_town_arena_melee_3_team_size, 5), (call_script, "script_center_change_trade_good_production", "p_town_16", "itm_tools", 100, 0), (party_set_slot,"p_town_17", slot_town_arena_melee_1_num_teams, 2), (party_set_slot,"p_town_17", slot_town_arena_melee_1_team_size, 8), (party_set_slot,"p_town_17", slot_town_arena_melee_2_num_teams, 4), (party_set_slot,"p_town_17", slot_town_arena_melee_2_team_size, 5), (party_set_slot,"p_town_17", slot_town_arena_melee_3_num_teams, 4), (party_set_slot,"p_town_17", slot_town_arena_melee_3_team_size, 7), (call_script, "script_center_change_trade_good_production", "p_town_17", "itm_salt", 100, 0), (party_set_slot,"p_town_18", slot_town_arena_melee_1_num_teams, 2), (party_set_slot,"p_town_18", slot_town_arena_melee_1_team_size, 4), (party_set_slot,"p_town_18", slot_town_arena_melee_2_num_teams, 2), (party_set_slot,"p_town_18", slot_town_arena_melee_2_team_size, 5), (party_set_slot,"p_town_18", slot_town_arena_melee_3_num_teams, 2), (party_set_slot,"p_town_18", slot_town_arena_melee_3_team_size, 6), (call_script, "script_center_change_trade_good_production", "p_town_18", "itm_oil", 125, 0), (try_for_range, ":unused", 0, 1), (call_script, "script_average_trade_good_productions"), (try_end), (call_script, "script_normalize_trade_good_productions"), (try_for_range, ":town_no", towns_begin, towns_end), (call_script, "script_center_change_trade_good_production", ":town_no", "itm_smoked_fish", -12, 3), (call_script, "script_center_change_trade_good_production", ":town_no", "itm_dried_meat", -12, 3), (call_script, "script_center_change_trade_good_production", ":town_no", "itm_cattle_meat", -15, 3), (call_script, "script_center_change_trade_good_production", ":town_no", "itm_cheese", -10, 3), (call_script, "script_center_change_trade_good_production", ":town_no", "itm_chicken", -10, 3), (call_script, "script_center_change_trade_good_production", ":town_no", "itm_honey", -9, 3), (call_script, "script_center_change_trade_good_production", ":town_no", "itm_cabbages", -10, 3), (call_script, "script_center_change_trade_good_production", ":town_no", "itm_butter", -12, 3), (call_script, "script_center_change_trade_good_production", ":town_no", "itm_wine", -14, 2), (call_script, "script_center_change_trade_good_production", ":town_no", "itm_flour", -13, 3), (call_script, "script_center_change_trade_good_production", ":town_no", "itm_ale", -10, 3), (call_script, "script_center_change_trade_good_production", ":town_no", "itm_apples", -10, 3), (call_script, "script_center_change_trade_good_production", ":town_no", "itm_grain", -10, 3), (call_script, "script_center_change_trade_good_production", ":town_no", "itm_iron", -10, 3), (call_script, "script_center_change_trade_good_production", ":town_no", "itm_wool", -10, 3), (call_script, "script_center_change_trade_good_production", ":town_no", "itm_furs", -10, 3), (call_script, "script_center_change_trade_good_production", ":town_no", "itm_oil", -12, 3), (call_script, "script_center_change_trade_good_production", ":town_no", "itm_velvet", -3, 3), (call_script, "script_center_change_trade_good_production", ":town_no", "itm_spice", -5, 3), (call_script, "script_center_change_trade_good_production", ":town_no", "itm_linen", -3, 3), (try_end), # Towns (loop) (try_for_range, ":town_no", towns_begin, towns_end), (store_sub, ":offset", ":town_no", towns_begin), (party_set_slot,":town_no", slot_party_type, spt_town), # (store_add, ":cur_object_no", "trp_town_1_seneschal", ":offset"), # (party_set_slot,":town_no", slot_town_seneschal, ":cur_object_no"), (store_add, ":cur_object_no", "scn_town_1_center", ":offset"), (party_set_slot,":town_no", slot_town_center, ":cur_object_no"), (store_add, ":cur_object_no", "scn_town_1_castle", ":offset"), (party_set_slot,":town_no", slot_town_castle, ":cur_object_no"), (store_add, ":cur_object_no", "scn_town_1_prison", ":offset"), (party_set_slot,":town_no", slot_town_prison, ":cur_object_no"), (store_add, ":cur_object_no", "scn_town_1_walls", ":offset"), (party_set_slot,":town_no", slot_town_walls, ":cur_object_no"), (store_add, ":cur_object_no", "scn_town_1_tavern", ":offset"), (party_set_slot,":town_no", slot_town_tavern, ":cur_object_no"), (store_add, ":cur_object_no", "scn_town_1_store", ":offset"), (party_set_slot,":town_no", slot_town_store, ":cur_object_no"), (store_add, ":cur_object_no", "scn_town_1_arena", ":offset"), (party_set_slot,":town_no", slot_town_arena, ":cur_object_no"), (store_add, ":cur_object_no", "scn_town_1_alley", ":offset"), (party_set_slot,":town_no", slot_town_alley, ":cur_object_no"), (store_add, ":cur_object_no", "trp_town_1_mayor", ":offset"), (party_set_slot,":town_no", slot_town_elder, ":cur_object_no"), (store_add, ":cur_object_no", "trp_town_1_tavernkeeper", ":offset"), (party_set_slot,":town_no", slot_town_tavernkeeper, ":cur_object_no"), (store_add, ":cur_object_no", "trp_town_1_weaponsmith", ":offset"), (party_set_slot,":town_no", slot_town_weaponsmith, ":cur_object_no"), (store_add, ":cur_object_no", "trp_town_1_armorer", ":offset"), (party_set_slot,":town_no", slot_town_armorer, ":cur_object_no"), (store_add, ":cur_object_no", "trp_town_1_merchant", ":offset"), (party_set_slot,":town_no", slot_town_merchant, ":cur_object_no"), (store_add, ":cur_object_no", "trp_town_1_horse_merchant", ":offset"), (party_set_slot,":town_no", slot_town_horse_merchant, ":cur_object_no"), (store_add, ":cur_object_no", "scn_town_1_center", ":offset"), (party_set_slot,":town_no", slot_town_center, ":cur_object_no"), (party_set_slot,":town_no", slot_town_reinforcement_party_template, "pt_center_reinforcements"), (try_end), # Castles (try_for_range, ":castle_no", castles_begin, castles_end), (store_sub, ":offset", ":castle_no", castles_begin), (val_mul, ":offset", 3), # (store_add, ":senechal_troop_no", "trp_castle_1_seneschal", ":offset"), # (party_set_slot,":castle_no", slot_town_seneschal, ":senechal_troop_no"), (store_add, ":exterior_scene_no", "scn_castle_1_exterior", ":offset"), (party_set_slot,":castle_no", slot_castle_exterior, ":exterior_scene_no"), (store_add, ":interior_scene_no", "scn_castle_1_interior", ":offset"), (party_set_slot,":castle_no", slot_town_castle, ":interior_scene_no"), (store_add, ":interior_scene_no", "scn_castle_1_prison", ":offset"), (party_set_slot,":castle_no", slot_town_prison, ":interior_scene_no"), (party_set_slot,":castle_no", slot_town_reinforcement_party_template, "pt_center_reinforcements"), (party_set_slot,":castle_no", slot_party_type, spt_castle), (party_set_slot,":castle_no", slot_center_is_besieged_by, -1), (try_end), # Set which castles need to be attacked with siege towers. (party_set_slot,"p_town_1", slot_center_siege_with_belfry, 1), (party_set_slot,"p_town_13", slot_center_siege_with_belfry, 1), (party_set_slot,"p_town_16", slot_center_siege_with_belfry, 1), (party_set_slot,"p_castle_1", slot_center_siege_with_belfry, 1), (party_set_slot,"p_castle_2", slot_center_siege_with_belfry, 1), (party_set_slot,"p_castle_3", slot_center_siege_with_belfry, 0), (party_set_slot,"p_castle_4", slot_center_siege_with_belfry, 1), (party_set_slot,"p_castle_5", slot_center_siege_with_belfry, 0), (party_set_slot,"p_castle_6", slot_center_siege_with_belfry, 0), (party_set_slot,"p_castle_7", slot_center_siege_with_belfry, 1), (party_set_slot,"p_castle_8", slot_center_siege_with_belfry, 1), (party_set_slot,"p_castle_9", slot_center_siege_with_belfry, 1), (party_set_slot,"p_castle_10", slot_center_siege_with_belfry, 0), (party_set_slot,"p_castle_11", slot_center_siege_with_belfry, 1), (party_set_slot,"p_castle_13", slot_center_siege_with_belfry, 1), (party_set_slot,"p_castle_21", slot_center_siege_with_belfry, 1), (party_set_slot,"p_castle_25", slot_center_siege_with_belfry, 1), (party_set_slot,"p_castle_38", slot_center_siege_with_belfry, 1), (party_set_slot,"p_castle_34", slot_center_siege_with_belfry, 1), (party_set_slot,"p_castle_35", slot_center_siege_with_belfry, 1), (party_set_slot,"p_castle_40", slot_center_siege_with_belfry, 1), # Towns # Villages (call_script, "script_center_change_trade_good_production", "p_village_56", "itm_smoked_fish", 60, 0), (call_script, "script_center_change_trade_good_production", "p_village_35", "itm_smoked_fish", 60, 0), (call_script, "script_center_change_trade_good_production", "p_village_36", "itm_smoked_fish", 60, 0), (call_script, "script_center_change_trade_good_production", "p_village_66", "itm_smoked_fish", 50, 0), (call_script, "script_center_change_trade_good_production", "p_village_67", "itm_smoked_fish", 50, 0), (try_for_range, ":village_no", villages_begin, villages_end), #Not setting production for the cattle meat here. (store_random_in_range, ":rand", village_prod_min, village_prod_max), (call_script, "script_center_change_trade_good_production", ":village_no", "itm_dried_meat", ":rand", 0), (store_random_in_range, ":rand", village_prod_min, village_prod_max), (call_script, "script_center_change_trade_good_production", ":village_no", "itm_pork", ":rand", 0), (store_random_in_range, ":rand", village_prod_min, village_prod_max), (call_script, "script_center_change_trade_good_production", ":village_no", "itm_bread", ":rand", 0), (store_random_in_range, ":rand", village_prod_min, village_prod_max), (call_script, "script_center_change_trade_good_production", ":village_no", "itm_apples", ":rand", 0), (store_random_in_range, ":rand", village_prod_min, village_prod_max), (call_script, "script_center_change_trade_good_production", ":village_no", "itm_cheese", ":rand", 0), (store_random_in_range, ":rand", village_prod_min, village_prod_max), (call_script, "script_center_change_trade_good_production", ":village_no", "itm_chicken", ":rand", 0), (store_random_in_range, ":rand", village_prod_min, village_prod_max), (call_script, "script_center_change_trade_good_production", ":village_no", "itm_honey", ":rand", 0), (store_random_in_range, ":rand", village_prod_min, village_prod_max), (call_script, "script_center_change_trade_good_production", ":village_no", "itm_cabbages", ":rand", 0), (store_random_in_range, ":rand", village_prod_min, village_prod_max), (call_script, "script_center_change_trade_good_production", ":village_no", "itm_butter", ":rand", 0), (store_random_in_range, ":rand", village_prod_min, village_prod_max), (call_script, "script_center_change_trade_good_production", ":village_no", "itm_wine", ":rand", 0), (store_random_in_range, ":rand", village_prod_min, village_prod_max), (call_script, "script_center_change_trade_good_production", ":village_no", "itm_flour", ":rand", 0), (store_random_in_range, ":rand", village_prod_min, village_prod_max), (call_script, "script_center_change_trade_good_production", ":village_no", "itm_ale", ":rand", 0), (store_random_in_range, ":rand", village_prod_min, village_prod_max), (call_script, "script_center_change_trade_good_production", ":village_no", "itm_apples", ":rand", 0), (store_random_in_range, ":rand", village_prod_min, village_prod_max), (call_script, "script_center_change_trade_good_production", ":village_no", "itm_grain", ":rand", 0), (store_random_in_range, ":rand", village_prod_min, village_prod_max), (call_script, "script_center_change_trade_good_production", ":village_no", "itm_oil", ":rand", 0), (try_end), (try_for_range, ":village_no", villages_begin, villages_end), (store_random_in_range, ":random_land_quality", 0, 5), (party_set_slot, ":village_no", slot_village_land_quality, ":random_land_quality"), (store_random_in_range, ":random_cattle", 25, 75), (party_set_slot, ":village_no", slot_village_number_of_cattle, ":random_cattle"), #Reassigning the cattle production in the village (store_sub, ":production", ":random_cattle", 10), (val_div, ":production", 2), (call_script, "script_center_change_trade_good_production", ":village_no", "itm_cattle_meat", ":production", 0), (store_sub, ":offset", ":village_no", villages_begin), (store_add, ":exterior_scene_no", "scn_village_1", ":offset"), (party_set_slot,":village_no", slot_castle_exterior, ":exterior_scene_no"), (store_add, ":store_troop_no", "trp_village_1_elder", ":offset"), (party_set_slot,":village_no", slot_town_elder, ":store_troop_no"), (party_set_slot,":village_no", slot_party_type, spt_village), (party_set_slot,":village_no", slot_village_raided_by, -1), (call_script, "script_refresh_village_merchant_inventory", ":village_no"), (call_script, "script_refresh_village_merchant_inventory", ":village_no"), (call_script, "script_refresh_village_defenders", ":village_no"), (call_script, "script_refresh_village_defenders", ":village_no"), (call_script, "script_refresh_village_defenders", ":village_no"), (call_script, "script_refresh_village_defenders", ":village_no"), (try_end), # (store_sub, ":item_to_slot", slot_town_trade_good_productions_begin, trade_goods_begin), # (try_for_range, ":center_no", centers_begin, centers_end), # (str_clear, s3), # (this_or_next|is_between, ":center_no", towns_begin, towns_end), # (is_between, ":center_no", villages_begin, villages_end), # (try_for_range, ":cur_good", trade_goods_begin, trade_goods_end), # (store_add, ":cur_good_slot", ":cur_good", ":item_to_slot"), # (str_store_party_name, s1, ":center_no"), # (str_store_item_name, s2, ":cur_good"), # (party_get_slot, ":center_production", ":center_no", ":cur_good_slot"), # (assign, reg0, ":center_production"), # (str_store_string, s3, "@{s3}^{s1} production for {s2}: {reg0}"), # (try_end), # (add_party_note_from_sreg, ":center_no", 2, s3, 0), # (try_end), (try_for_range, ":center_no", centers_begin, centers_end), (party_set_slot, ":center_no", slot_center_last_spotted_enemy, -1), (party_set_slot, ":center_no", slot_center_is_besieged_by, -1), (party_set_slot, ":center_no", slot_center_last_taken_by_troop, -1), #Assigning random prosperity (store_random_in_range, ":random_prosperity_adder", -25, 15), (call_script, "script_get_center_ideal_prosperity", ":center_no"), (assign, ":prosperity", reg0), (val_add, ":prosperity", ":random_prosperity_adder"), (try_begin), (party_slot_eq, ":center_no", slot_party_type, spt_town), (val_add, ":prosperity", 20), (try_end), (val_clamp, ":prosperity", 0, 100), (party_set_slot, ":center_no", slot_town_prosperity, ":prosperity"), (try_end), #Initialize walkers (try_for_range, ":center_no", centers_begin, centers_end), (this_or_next|party_slot_eq, ":center_no", slot_party_type, spt_town), (party_slot_eq, ":center_no", slot_party_type, spt_village), (try_for_range, ":walker_no", 0, num_town_walkers), (call_script, "script_center_set_walker_to_type", ":center_no", ":walker_no", walkert_default), (try_end), (try_end), # Troops: # Assign banners and renown. # We assume there are enough banners for all kingdom heroes. (assign, ":num_khergit_lords_assigned", 0), (try_for_range, ":kingdom_hero", kingdom_heroes_begin, kingdom_heroes_end), (store_troop_faction, ":kingdom_hero_faction", ":kingdom_hero"), (try_begin), (eq, ":kingdom_hero_faction", "fac_kingdom_3"), #Khergit Khanate (store_add, ":kingdom_3_banners_begin", banner_scene_props_begin, khergit_banners_begin_offset), (store_add, ":banner_id", ":kingdom_3_banners_begin", ":num_khergit_lords_assigned"), (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":banner_id"), (val_add, ":num_khergit_lords_assigned", 1), (else_try), (store_sub, ":hero_offset", ":kingdom_hero", kingdom_heroes_begin), (val_sub, ":hero_offset", ":num_khergit_lords_assigned"),#Remove khergits from offset since their banners are assigned above here (try_begin), (gt, ":hero_offset", khergit_banners_begin_offset),#Do not add khergit banners to non-khergit lords (val_add, ":hero_offset", khergit_banners_end_offset), (val_sub, ":hero_offset", khergit_banners_begin_offset), (try_end), (store_add, ":banner_id", banner_scene_props_begin, ":hero_offset"), (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":banner_id"), (try_end), (store_character_level, ":level", ":kingdom_hero"), (store_mul, ":renown", ":level", ":level"), (val_div, ":renown", 2), (try_begin), (faction_slot_eq, ":kingdom_hero_faction", slot_faction_leader, ":kingdom_hero"), (troop_set_slot, ":kingdom_hero", slot_troop_loyalty, 100), (store_random_in_range, ":random_renown", 250, 400), (else_try), (store_random_in_range, ":random_loyalty", 50, 100), (troop_set_slot, ":kingdom_hero", slot_troop_loyalty, ":random_loyalty"), (store_random_in_range, ":random_renown", 100, 200), (try_end), (val_add, ":renown", ":random_renown"), (troop_set_slot, ":kingdom_hero", slot_troop_renown, ":renown"), (store_random_in_range, ":random_readiness", 0, 100), (troop_set_slot, ":kingdom_hero", slot_troop_readiness_to_join_army, ":random_readiness"), (troop_set_slot, ":kingdom_hero", slot_troop_readiness_to_follow_orders, 100), (troop_set_slot, ":kingdom_hero", slot_troop_player_order_state, spai_undefined), (troop_set_slot, ":kingdom_hero", slot_troop_player_order_object, -1), (try_end), #Correcting banners according to the player banner (troop_get_slot, ":selected_banner_spr", "trp_player", slot_troop_banner_scene_prop), (assign, ":end_cond", kingdom_heroes_end), (try_for_range, ":cur_troop", kingdom_heroes_begin, ":end_cond"), (troop_slot_eq, ":cur_troop", slot_troop_banner_scene_prop, ":selected_banner_spr"), (troop_set_slot, ":cur_troop", slot_troop_banner_scene_prop, banner_scene_props_end_minus_one), (assign, ":end_cond", 0), (try_end), (call_script, "script_give_center_to_lord", "p_town_1", "trp_kingdom_4_lord", 0), (call_script, "script_give_center_to_lord", "p_town_2", "trp_knight_4_1", 0), (call_script, "script_give_center_to_lord", "p_town_3", "trp_knight_5_1", 0), (call_script, "script_give_center_to_lord", "p_town_4", "trp_knight_1_1", 0), (call_script, "script_give_center_to_lord", "p_town_5", "trp_kingdom_5_lord", 0), (call_script, "script_give_center_to_lord", "p_town_6", "trp_kingdom_1_lord", 0), (call_script, "script_give_center_to_lord", "p_town_7", "trp_knight_1_2", 0), (call_script, "script_give_center_to_lord", "p_town_8", "trp_kingdom_2_lord", 0), (call_script, "script_give_center_to_lord", "p_town_9", "trp_knight_2_1", 0), (call_script, "script_give_center_to_lord", "p_town_10", "trp_kingdom_3_lord", 0), (call_script, "script_give_center_to_lord", "p_town_11", "trp_knight_2_2", 0), (call_script, "script_give_center_to_lord", "p_town_12", "trp_knight_4_2", 0), (call_script, "script_give_center_to_lord", "p_town_13", "trp_knight_2_3", 0), (call_script, "script_give_center_to_lord", "p_town_14", "trp_knight_3_1", 0), (call_script, "script_give_center_to_lord", "p_town_15", "trp_knight_5_2", 0), (call_script, "script_give_center_to_lord", "p_town_16", "trp_knight_1_3", 0), (call_script, "script_give_center_to_lord", "p_town_17", "trp_knight_3_2", 0), (call_script, "script_give_center_to_lord", "p_town_18", "trp_knight_3_3", 0), (call_script, "script_give_center_to_faction_aux", "p_castle_1", "fac_kingdom_5"), (call_script, "script_give_center_to_faction_aux", "p_castle_2", "fac_kingdom_3"), (call_script, "script_give_center_to_faction_aux", "p_castle_3", "fac_kingdom_2"), (call_script, "script_give_center_to_faction_aux", "p_castle_4", "fac_kingdom_2"), (call_script, "script_give_center_to_faction_aux", "p_castle_5", "fac_kingdom_4"), (call_script, "script_give_center_to_faction_aux", "p_castle_6", "fac_kingdom_2"), (call_script, "script_give_center_to_faction_aux", "p_castle_7", "fac_kingdom_3"), (call_script, "script_give_center_to_faction_aux", "p_castle_8", "fac_kingdom_2"), (call_script, "script_give_center_to_faction_aux", "p_castle_9", "fac_kingdom_5"), (call_script, "script_give_center_to_faction_aux", "p_castle_10", "fac_kingdom_4"), (call_script, "script_give_center_to_faction_aux", "p_castle_11", "fac_kingdom_4"), (call_script, "script_give_center_to_faction_aux", "p_castle_12", "fac_kingdom_4"), (call_script, "script_give_center_to_faction_aux", "p_castle_13", "fac_kingdom_1"), (call_script, "script_give_center_to_faction_aux", "p_castle_14", "fac_kingdom_5"), (call_script, "script_give_center_to_faction_aux", "p_castle_15", "fac_kingdom_5"), (call_script, "script_give_center_to_faction_aux", "p_castle_16", "fac_kingdom_5"), (call_script, "script_give_center_to_faction_aux", "p_castle_17", "fac_kingdom_3"), (call_script, "script_give_center_to_faction_aux", "p_castle_18", "fac_kingdom_2"), (call_script, "script_give_center_to_faction_aux", "p_castle_19", "fac_kingdom_2"), (call_script, "script_give_center_to_faction_aux", "p_castle_20", "fac_kingdom_1"), (call_script, "script_give_center_to_faction_aux", "p_castle_21", "fac_kingdom_5"), (call_script, "script_give_center_to_faction_aux", "p_castle_22", "fac_kingdom_3"), (call_script, "script_give_center_to_faction_aux", "p_castle_23", "fac_kingdom_1"), (call_script, "script_give_center_to_faction_aux", "p_castle_24", "fac_kingdom_1"), (call_script, "script_give_center_to_faction_aux", "p_castle_25", "fac_kingdom_1"), (call_script, "script_give_center_to_faction_aux", "p_castle_26", "fac_kingdom_1"), (call_script, "script_give_center_to_faction_aux", "p_castle_27", "fac_kingdom_1"), (call_script, "script_give_center_to_faction_aux", "p_castle_28", "fac_kingdom_5"), (call_script, "script_give_center_to_faction_aux", "p_castle_29", "fac_kingdom_2"), (call_script, "script_give_center_to_faction_aux", "p_castle_30", "fac_kingdom_3"), (call_script, "script_give_center_to_faction_aux", "p_castle_31", "fac_kingdom_1"), (call_script, "script_give_center_to_faction_aux", "p_castle_32", "fac_kingdom_4"), (call_script, "script_give_center_to_faction_aux", "p_castle_33", "fac_kingdom_5"), (call_script, "script_give_center_to_faction_aux", "p_castle_34", "fac_kingdom_4"), (call_script, "script_give_center_to_faction_aux", "p_castle_35", "fac_kingdom_1"), (call_script, "script_give_center_to_faction_aux", "p_castle_36", "fac_kingdom_4"), (call_script, "script_give_center_to_faction_aux", "p_castle_37", "fac_kingdom_2"), (call_script, "script_give_center_to_faction_aux", "p_castle_38", "fac_kingdom_3"), (call_script, "script_give_center_to_faction_aux", "p_castle_39", "fac_kingdom_2"), (call_script, "script_give_center_to_faction_aux", "p_castle_40", "fac_kingdom_3"), # fill_village_bound_centers #pass 1: Give one village to each castle (try_for_range, ":cur_center", castles_begin, castles_end), (assign, ":min_dist", 999999), (assign, ":min_dist_village", -1), (try_for_range, ":cur_village", villages_begin, villages_end), (neg|party_slot_ge, ":cur_village", slot_village_bound_center, 1), #skip villages which are already bound. (store_distance_to_party_from_party, ":cur_dist", ":cur_village", ":cur_center"), (lt, ":cur_dist", ":min_dist"), (assign, ":min_dist", ":cur_dist"), (assign, ":min_dist_village", ":cur_village"), (try_end), (party_set_slot, ":min_dist_village", slot_village_bound_center, ":cur_center"), (store_faction_of_party, ":town_faction", ":cur_center"), (call_script, "script_give_center_to_faction_aux", ":min_dist_village", ":town_faction"), (try_end), # Give family castles to certain nobles. (call_script, "script_give_center_to_lord", "p_castle_29", "trp_knight_2_10", 0), #Nelag_Castle (call_script, "script_give_center_to_lord", "p_castle_30", "trp_knight_3_4", 0), #Asugan_Castle (call_script, "script_give_center_to_lord", "p_castle_35", "trp_knight_1_15", 0), #Haringoth_Castle #pass 2: Give other villages to closest town. (try_for_range, ":cur_village", villages_begin, villages_end), (neg|party_slot_ge, ":cur_village", slot_village_bound_center, 1), #skip villages which are already bound. (assign, ":min_dist", 999999), (assign, ":min_dist_town", -1), (try_for_range, ":cur_town", towns_begin, towns_end), (store_distance_to_party_from_party, ":cur_dist", ":cur_village", ":cur_town"), (lt, ":cur_dist", ":min_dist"), (assign, ":min_dist", ":cur_dist"), (assign, ":min_dist_town", ":cur_town"), (try_end), (party_set_slot, ":cur_village", slot_village_bound_center, ":min_dist_town"), (store_faction_of_party, ":town_faction", ":min_dist_town"), (call_script, "script_give_center_to_faction_aux", ":cur_village", ":town_faction"), (try_end), (try_for_range, ":center_no", centers_begin, centers_end), (store_faction_of_party, ":original_faction", ":center_no"), (faction_get_slot, ":culture", ":original_faction", slot_faction_culture), (party_set_slot, ":center_no", slot_center_culture, ":culture"), (party_set_slot, ":center_no", slot_center_original_faction, ":original_faction"), (party_set_slot, ":center_no", slot_center_ex_faction, ":original_faction"), (try_end), (call_script, "script_update_village_market_towns"), #Assign only family structures of lords who doesn't have a father. Other troops will get the family tree automatically (troop_set_slot,"trp_knight_1_1", slot_troop_spouse, "trp_knight_1_1_wife"), (troop_set_slot,"trp_knight_2_1", slot_troop_spouse, "trp_knight_2_1_wife"), (troop_set_slot,"trp_knight_3_1", slot_troop_spouse, "trp_knight_3_1_wife"), (troop_set_slot,"trp_knight_4_1", slot_troop_spouse, "trp_knight_4_1_wife"), (troop_set_slot,"trp_knight_5_1", slot_troop_spouse, "trp_knight_5_1_wife"), (troop_set_slot,"trp_knight_1_2", slot_troop_spouse, "trp_knight_1_2_wife"), (troop_set_slot,"trp_knight_2_2", slot_troop_spouse, "trp_knight_2_2_wife"), (troop_set_slot,"trp_knight_3_2", slot_troop_spouse, "trp_knight_3_2_wife"), (troop_set_slot,"trp_knight_4_2", slot_troop_spouse, "trp_knight_4_2_wife"), (troop_set_slot,"trp_knight_5_2", slot_troop_spouse, "trp_knight_5_2_wife"), (troop_set_slot,"trp_knight_1_3", slot_troop_spouse, "trp_knight_1_1_daughter"), (troop_set_slot,"trp_knight_2_3", slot_troop_spouse, "trp_knight_2_1_daughter"), (troop_set_slot,"trp_knight_3_3", slot_troop_spouse, "trp_knight_3_1_daughter"), (troop_set_slot,"trp_knight_4_3", slot_troop_spouse, "trp_knight_4_1_daughter"), (troop_set_slot,"trp_knight_5_3", slot_troop_spouse, "trp_knight_5_1_daughter"), (troop_set_slot,"trp_knight_1_4", slot_troop_spouse, "trp_knight_1_2_daughter"), (troop_set_slot,"trp_knight_2_4", slot_troop_spouse, "trp_knight_2_2_daughter"), (troop_set_slot,"trp_knight_3_4", slot_troop_spouse, "trp_knight_3_2_daughter"), (troop_set_slot,"trp_knight_4_4", slot_troop_spouse, "trp_knight_4_2_daughter"), (troop_set_slot,"trp_knight_5_4", slot_troop_spouse, "trp_knight_5_2_daughter"), ## (troop_set_slot,"trp_kingdom_2_lord_a", slot_troop_spouse, "trp_kingdom_2_lady_a"), ## (troop_set_slot,"trp_kingdom_2_lord_a", slot_troop_son, "trp_kingdom_2_lord_b"), ## (troop_set_slot,"trp_kingdom_2_lord_a", slot_troop_sibling, "trp_kingdom_2_lady_c"), ## (troop_set_slot,"trp_kingdom_2_lord_a", slot_troop_daughter, "trp_kingdom_2_lady_e"), ## ## (troop_set_slot,"trp_kingdom_2_lord_b", slot_troop_daughter, "trp_kingdom_2_lady_b"), ## (troop_set_slot,"trp_kingdom_2_lord_c", slot_troop_spouse, "trp_kingdom_2_lady_c"), ## (troop_set_slot,"trp_kingdom_2_lord_d", slot_troop_daughter, "trp_kingdom_2_lady_d"), ## (troop_set_slot,"trp_kingdom_2_lord_e", slot_troop_spouse, "trp_kingdom_2_lady_e"), ## (troop_set_slot,"trp_kingdom_2_lord_f", slot_troop_daughter, "trp_kingdom_2_lady_f"), ## (troop_set_slot,"trp_kingdom_2_lord_g", slot_troop_spouse, "trp_kingdom_2_lady_g"), ## (troop_set_slot,"trp_kingdom_2_lord_h", slot_troop_daughter, "trp_kingdom_2_lady_h"), ## (troop_set_slot,"trp_kingdom_2_lord_i", slot_troop_spouse, "trp_kingdom_2_lady_i"), ## (troop_set_slot,"trp_kingdom_2_lord_j", slot_troop_daughter, "trp_kingdom_2_lady_j"), ## (try_for_range, ":troop_id", merchants_begin, merchants_end), ## (troop_set_slot, ":troop_id", slot_troop_occupation, slto_merchant), ## (try_end), (try_for_range, ":troop_id", kingdom_heroes_begin, kingdom_heroes_end), (try_begin), (store_troop_faction, ":faction_id", ":troop_id"), (is_between, ":faction_id", kingdoms_begin, kingdoms_end), (troop_set_slot, ":troop_id", slot_troop_original_faction, ":faction_id"), (try_begin), (is_between, ":troop_id", pretenders_begin, pretenders_end), (faction_set_slot, ":faction_id", slot_faction_has_rebellion_chance, 1), (else_try), (troop_set_slot, ":troop_id", slot_troop_occupation, slto_kingdom_hero), (try_end), (try_end), (assign, ":initial_wealth", 6000), (try_begin), (store_troop_faction, ":faction", ":troop_id"), (faction_slot_eq, ":faction", slot_faction_leader, ":troop_id"), (assign, ":initial_wealth", 20000), (try_end), (troop_set_slot, ":troop_id", slot_troop_wealth, ":initial_wealth"), (try_end), (try_for_range, ":center_no", walled_centers_begin, walled_centers_end),#add town garrisons #Add initial center wealth (assign, ":initial_wealth", 2000), (try_begin), (is_between, ":center_no", towns_begin, towns_end), (val_mul, ":initial_wealth", 2), (try_end), (party_set_slot, ":center_no", slot_town_wealth, ":initial_wealth"), (assign, ":garrison_strength", 13), (try_begin), (party_slot_eq, ":center_no", slot_party_type, spt_town), (assign, ":garrison_strength", 40), (try_end), (try_for_range, ":unused", 0, ":garrison_strength"), (call_script, "script_cf_reinforce_party", ":center_no"), (try_end), ## ADD some XP initially (store_div, ":xp_amount", ":garrison_strength", 8), (val_add, ":xp_amount", 4), (try_for_range, ":unused", 0, ":xp_amount"), (store_random_in_range, ":xp", 7000, 9000), (party_upgrade_with_xp, ":center_no", ":xp", 0), (try_end), #Fill town food stores upto half the limit (call_script, "script_center_get_food_store_limit", ":center_no"), (assign, ":food_store_limit", reg0), (val_div, ":food_store_limit", 2), (party_set_slot, ":center_no", slot_party_food_store, ":food_store_limit"), #create lord parties (party_get_slot, ":center_lord", ":center_no", slot_town_lord), (ge, ":center_lord", 1), (troop_slot_eq, ":center_lord", slot_troop_leaded_party, 0), (call_script, "script_create_kingdom_hero_party", ":center_lord", ":center_no"), (assign, ":lords_party", "$pout_party"), (party_attach_to_party, ":lords_party", ":center_no"), (party_set_slot, ":center_no", slot_town_player_odds, 1000), (try_end), (call_script, "script_complete_family_relations"), (call_script, "script_complete_family_relations"), (try_for_range, ":troop_id", kingdom_ladies_begin, kingdom_ladies_end), (troop_set_slot, ":troop_id", slot_troop_occupation, slto_kingdom_lady), (troop_get_slot, ":cur_family", ":troop_id", slot_troop_father), (try_begin), (eq, ":cur_family", 0), (troop_get_slot, ":cur_family", ":troop_id", slot_troop_spouse), (try_end), (try_begin), (gt, ":cur_family", 0), (call_script, "script_get_troop_attached_party", ":cur_family"), (assign, ":cur_center", reg0), (gt, ":cur_center", 0), (troop_set_slot, ":troop_id", slot_troop_cur_center, ":cur_center"), (else_try), (store_troop_faction, ":faction_no", ":troop_id"), (call_script, "script_cf_select_random_walled_center_with_faction", ":faction_no", -1), (assign, ":cur_center", reg0), (troop_set_slot, ":troop_id", slot_troop_cur_center, ":cur_center"), (try_end), (try_end), (try_for_range, ":troop_id", heroes_begin, heroes_end), (troop_slot_eq, ":troop_id", slot_troop_occupation, slto_kingdom_lady), (troop_get_slot, ":cur_father", ":troop_id", slot_troop_father), (gt, ":cur_father", 0),# Lovers for daughters only (store_random_in_range, ":random_no", 0, 100), (le, ":random_no", 80), (call_script, "script_cf_get_random_kingdom_hero_as_lover", ":troop_id"),#Can fail (assign, ":cur_lover", reg0), (troop_set_slot, ":troop_id", slot_troop_lover, ":cur_lover"), (troop_set_slot, ":cur_lover", slot_troop_lover, ":troop_id"), (try_end), (try_for_range, ":troop_id", heroes_begin, heroes_end), (troop_get_slot, ":in_relation_1", ":troop_id", slot_troop_spouse), (troop_get_slot, ":in_relation_2", ":troop_id", slot_troop_sibling), (troop_get_slot, ":in_relation_3", ":troop_id", slot_troop_daughter), (troop_get_slot, ":in_relation_4", ":troop_id", slot_troop_son), (troop_get_slot, ":in_relation_5", ":troop_id", slot_troop_father), (troop_get_slot, ":in_relation_6", ":troop_id", slot_troop_mother), (troop_get_slot, ":in_relation_7", ":troop_id", slot_troop_lover), # (troop_get_slot, ":troop_rank", ":troop_id", slot_troop_kingdom_rank), (store_troop_faction, ":troop_faction", ":troop_id"), (assign, ":troop_enemy_count", 0), (try_for_range, ":i_enemy_slot", slot_troop_enemies_begin, slot_troop_enemies_end), (troop_slot_ge, ":troop_id", ":i_enemy_slot", 1), (val_add, ":troop_enemy_count", 1), (try_end), (try_for_range, ":i_enemy_slot", slot_troop_enemies_begin, slot_troop_enemies_end), (troop_set_slot, ":troop_id", ":i_enemy_slot", -1), (try_end), (store_random_in_range, ":random_enemy_count", 0, 4), (val_add, ":random_enemy_count", ":troop_enemy_count"), (val_min, ":random_enemy_count", 5), (try_for_range, ":unused", ":troop_enemy_count", ":random_enemy_count"), (assign, ":possible_enemy_count", 0), (try_for_range, ":enemy_troop_id", heroes_begin, heroes_end), (neq, ":enemy_troop_id", ":troop_id"), (neq, ":enemy_troop_id", ":in_relation_1"), (neq, ":enemy_troop_id", ":in_relation_2"), (neq, ":enemy_troop_id", ":in_relation_3"), (neq, ":enemy_troop_id", ":in_relation_4"), (neq, ":enemy_troop_id", ":in_relation_5"), (neq, ":enemy_troop_id", ":in_relation_6"), (neq, ":enemy_troop_id", ":in_relation_7"), (store_troop_faction, ":enemy_troop_faction", ":enemy_troop_id"), (eq, ":enemy_troop_faction", ":troop_faction"), # (troop_get_slot, ":enemy_troop_rank", ":enemy_troop_id", slot_troop_kingdom_rank), # (lt, ":enemy_troop_rank", 4), # (lt, ":troop_rank", 4), (assign, ":marked_as_enemy", 0), (try_for_range, ":i_enemy_slot_mark", slot_troop_enemies_begin, slot_troop_enemies_end), (troop_slot_eq, ":troop_id", ":i_enemy_slot_mark", ":enemy_troop_id"), (assign, ":marked_as_enemy", 1), (try_end), (eq, ":marked_as_enemy", 0), (val_add, ":possible_enemy_count", 1), (try_end), (store_random_in_range, ":random_enemy", 0, ":possible_enemy_count"), (assign, ":possible_enemy_count", 0), (assign, ":result", -1), (try_for_range, ":enemy_troop_id", heroes_begin, heroes_end), (eq, ":result", -1), (neq, ":enemy_troop_id", ":troop_id"), (neq, ":enemy_troop_id", ":in_relation_1"), (neq, ":enemy_troop_id", ":in_relation_2"), (neq, ":enemy_troop_id", ":in_relation_3"), (neq, ":enemy_troop_id", ":in_relation_4"), (neq, ":enemy_troop_id", ":in_relation_5"), (neq, ":enemy_troop_id", ":in_relation_6"), (neq, ":enemy_troop_id", ":in_relation_7"), (store_troop_faction, ":enemy_troop_faction", ":enemy_troop_id"), (eq, ":enemy_troop_faction", ":troop_faction"), # (troop_get_slot, ":enemy_troop_rank", ":enemy_troop_id", slot_troop_kingdom_rank), # (lt, ":enemy_troop_rank", 4), # (lt, ":troop_rank", 4), (assign, ":marked_as_enemy", 0), (try_for_range, ":i_enemy_slot_mark", slot_troop_enemies_begin, slot_troop_enemies_end), (troop_slot_eq, ":troop_id", ":i_enemy_slot_mark", ":enemy_troop_id"), (assign, ":marked_as_enemy", 1), (try_end), (eq, ":marked_as_enemy", 0), (val_add, ":possible_enemy_count", 1), (gt, ":possible_enemy_count", ":random_enemy"), (assign, ":result", ":enemy_troop_id"), (try_end), (gt, ":result", 0), (assign, ":enemy_troop_enemy_count", 0), (try_for_range, ":i_enemy_slot", slot_troop_enemies_begin, slot_troop_enemies_end), (troop_slot_ge, ":result", ":i_enemy_slot", 1), (val_add, ":enemy_troop_enemy_count", 1), (try_end), (lt, ":enemy_troop_enemy_count", 5), (assign, ":troop_enemy_count", 0), (try_for_range, ":i_enemy_slot", slot_troop_enemies_begin, slot_troop_enemies_end), (troop_slot_ge, ":troop_id", ":i_enemy_slot", 1), (val_add, ":troop_enemy_count", 1), (try_end), (store_add, ":cur_slot", slot_troop_enemies_begin, ":troop_enemy_count"), (troop_set_slot, ":troop_id", ":cur_slot", ":result"), (store_add, ":cur_slot", slot_troop_enemies_begin, ":enemy_troop_enemy_count"), (troop_set_slot, ":result", ":cur_slot", ":troop_id"), (try_end), (try_end), (try_for_range, ":unused", 0, 8), (call_script, "script_spawn_bandits"), (try_end), (set_spawn_radius, 50), (try_for_range, ":unused", 0, 25), (spawn_around_party,"p_main_party","pt_looters"), (try_end), (try_for_range, ":unused", 0, 6), (call_script, "script_update_trade_good_prices"), (try_end), (call_script, "script_assign_lords_to_empty_centers"), (call_script, "script_update_mercenary_units_of_towns"), (call_script, "script_update_companion_candidates_in_taverns"), (call_script, "script_update_ransom_brokers"), (call_script, "script_update_tavern_travelers"), (call_script, "script_update_tavern_minstels"), (call_script, "script_update_booksellers"), (try_for_range, ":village_no", villages_begin, villages_end), (call_script, "script_update_volunteer_troops_in_village", ":village_no"), (try_end), (try_for_range, ":cur_kingdom", kingdoms_begin, kingdoms_end), (call_script, "script_update_faction_notes", ":cur_kingdom"), (store_random_in_range, ":random_no", -60, 0), (faction_set_slot, ":faction_no", slot_faction_ai_last_offensive_time, ":random_no"), (try_end), (try_for_range, ":cur_troop", kingdom_heroes_begin, kingdom_heroes_end), (call_script, "script_update_troop_notes", ":cur_troop"), (try_end), (try_for_range, ":cur_center", centers_begin, centers_end), (call_script, "script_update_center_notes", ":cur_center"), (try_end), (call_script, "script_update_troop_notes", "trp_player"), (try_for_range, ":faction_no", kingdoms_begin, kingdoms_end), (call_script, "script_faction_recalculate_strength", ":faction_no"), (try_end), ## (assign, "$players_kingdom", "fac_kingdom_1"), ## (call_script, "script_give_center_to_lord", "p_town_7", "trp_player", 0), ## (call_script, "script_give_center_to_lord", "p_town_16", "trp_player", 0), #### (call_script, "script_give_center_to_lord", "p_castle_10", "trp_player", 0), ## (assign, "$g_castle_requested_by_player", "p_castle_10"), (call_script, "script_get_player_party_morale_values"), (party_set_morale, "p_main_party", reg0), ]), # script_game_event_party_encounter: # This script is called from the game engine whenever player party encounters another party or a battle on the world map # INPUT: # param1: encountered_party # param2: second encountered_party (if this was a battle ("game_event_party_encounter", [ (store_script_param_1, "$g_encountered_party"), (store_script_param_2, "$g_encountered_party_2"),# encountered_party2 is set when we come across a battle or siege, otherwise it's a negative value # (store_encountered_party, "$g_encountered_party"), # (store_encountered_party2,"$g_encountered_party_2"), # encountered_party2 is set when we come across a battle or siege, otherwise it's a minus value (store_faction_of_party, "$g_encountered_party_faction","$g_encountered_party"), (store_relation, "$g_encountered_party_relation", "$g_encountered_party_faction", "fac_player_faction"), (party_get_slot, "$g_encountered_party_type", "$g_encountered_party", slot_party_type), (party_get_template_id,"$g_encountered_party_template","$g_encountered_party"), # (try_begin), # (gt, "$g_encountered_party_2", 0), # (store_faction_of_party, "$g_encountered_party_2_faction","$g_encountered_party_2"), # (store_relation, "$g_encountered_party_2_relation", "$g_encountered_party_2_faction", "fac_player_faction"), # (party_get_template_id,"$g_encountered_party_2_template","$g_encountered_party_2"), # (else_try), # (assign, "$g_encountered_party_2_faction",-1), # (assign, "$g_encountered_party_2_relation", 0), # (assign,"$g_encountered_party_2_template", -1), # (try_end), #NPC companion changes begin (call_script, "script_party_count_fit_regulars", "p_main_party"), (assign, "$playerparty_prebattle_regulars", reg0), # (try_begin), # (assign, "$player_party__regulars", 0), # (call_script, "script_party_count_fit_regulars", "p_main_party"), # (gt, reg0, 0), # (assign, "$player_party_contains_regulars", 1), # (try_end), #NPC companion changes end (assign, "$g_last_rest_center", -1), (assign, "$talk_context", 0), (assign,"$g_player_surrenders",0), (assign,"$g_enemy_surrenders",0), (assign, "$g_leave_encounter",0), (assign, "$g_engaged_enemy", 0), # (assign,"$waiting_for_arena_fight_result", 0), # (assign,"$arena_bet_amount",0), # (assign,"$g_player_raiding_village",0), (try_begin), (neg|is_between, "$g_encountered_party", centers_begin, centers_end), (rest_for_hours, 0), #stop waiting (try_end), # (assign, "$g_permitted_to_center",0), (assign, "$new_encounter", 1), #check this in the menu. (try_begin), (lt, "$g_encountered_party_2",0), #Normal encounter. Not battle or siege. (try_begin), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_town), #(assign, reg0, "$g_encountered_party"), #(display_message, "@party_id: {reg0}"), (jump_to_menu, "mnu_castle_outside"), (else_try), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_castle), (jump_to_menu, "mnu_castle_outside"), (else_try), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_ship), (jump_to_menu, "mnu_ship_reembark"), (else_try), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_village), (jump_to_menu, "mnu_village"), (else_try), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_cattle_herd), (jump_to_menu, "mnu_cattle_herd"), (else_try), (is_between, "$g_encountered_party", training_grounds_begin, training_grounds_end), (jump_to_menu, "mnu_training_ground"), (else_try), (eq, "$g_encountered_party", "p_zendar"), (jump_to_menu, "mnu_zendar"), (else_try), (eq, "$g_encountered_party", "p_salt_mine"), (jump_to_menu, "mnu_salt_mine"), (else_try), (eq, "$g_encountered_party", "p_four_ways_inn"), (jump_to_menu, "mnu_four_ways_inn"), (else_try), (eq, "$g_encountered_party", "p_test_scene"), (jump_to_menu, "mnu_test_scene"), (else_try), (eq, "$g_encountered_party", "p_battlefields"), (jump_to_menu, "mnu_battlefields"), (else_try), (eq, "$g_encountered_party", "p_training_ground"), (jump_to_menu, "mnu_tutorial"), (else_try), (eq, "$g_encountered_party", "p_camp_bandits"), (jump_to_menu, "mnu_camp"), (else_try), (jump_to_menu, "mnu_simple_encounter"), (try_end), (else_try), #Battle or siege (try_begin), (this_or_next|party_slot_eq, "$g_encountered_party", slot_party_type, spt_town), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_castle), (try_begin), (eq, "$auto_enter_town", "$g_encountered_party"), (jump_to_menu, "mnu_town"), (else_try), (eq, "$auto_besiege_town", "$g_encountered_party"), (jump_to_menu, "mnu_besiegers_camp_with_allies"), (else_try), (jump_to_menu, "mnu_join_siege_outside"), (try_end), (else_try), (jump_to_menu, "mnu_pre_join"), (try_end), (try_end), (assign,"$auto_enter_town",0), (assign,"$auto_besiege_town",0), ]), #script_game_event_simulate_battle: # This script is called whenever the game simulates the battle between two parties on the map. # INPUT: # param1: Defender Party # param2: Attacker Party ("game_event_simulate_battle", [ (store_script_param_1, ":root_defender_party"), (store_script_param_2, ":root_attacker_party"), (try_begin), (store_faction_of_party, ":defender_faction", ":root_defender_party"), (store_faction_of_party, ":attacker_faction", ":root_attacker_party"), (neq, ":defender_faction", "fac_player_faction"), (neq, ":attacker_faction", "fac_player_faction"), (store_relation, ":reln", ":defender_faction", ":attacker_faction"), (ge, ":reln", 0), (set_trigger_result, 1), (else_try), (assign, ":trigger_result", 0), (try_begin), (this_or_next|eq, "$g_battle_simulation_cancel_for_party", ":root_defender_party"), (eq, "$g_battle_simulation_cancel_for_party", ":root_attacker_party"), (assign, "$g_battle_simulation_cancel_for_party", -1), (assign, "$auto_enter_town", "$g_battle_simulation_auto_enter_town_after_battle"), (assign, ":trigger_result", 1), (else_try), (try_begin), (this_or_next|party_slot_eq, ":root_defender_party", slot_party_retreat_flag, 1), (party_slot_eq, ":root_attacker_party", slot_party_retreat_flag, 1), (assign, ":trigger_result", 1), #End battle! (try_end), (party_set_slot, ":root_attacker_party", slot_party_retreat_flag, 0), ## (assign, ":cancel_attack", 0), (party_collect_attachments_to_party, ":root_defender_party", "p_collective_ally"), (party_collect_attachments_to_party, ":root_attacker_party", "p_collective_enemy"), # (call_script, "script_party_count_fit_for_battle", "p_collective_ally"), (call_script, "script_party_calculate_strength", "p_collective_ally", 0), (assign, ":defender_strength", reg0), # (call_script, "script_party_count_fit_for_battle", "p_collective_enemy"), (call_script, "script_party_calculate_strength", "p_collective_enemy", 0), (assign, ":attacker_strength", reg0), (store_div, ":defender_strength", ":defender_strength", 20), (val_min, ":defender_strength", 50), (val_max, ":defender_strength", 1), (store_div, ":attacker_strength", ":attacker_strength", 20), (val_min, ":attacker_strength", 50), (val_add, ":attacker_strength", 1), (try_begin), #For sieges increase attacker casualties and reduce defender casualties. (this_or_next|party_slot_eq, ":root_defender_party", slot_party_type, spt_castle), (party_slot_eq, ":root_defender_party", slot_party_type, spt_town), (val_mul, ":defender_strength", 3), (val_div, ":defender_strength", 2), (val_div, ":attacker_strength", 2), (try_end), (try_begin), (neg|is_currently_night), #Don't fight at night (inflict_casualties_to_party_group, ":root_attacker_party", ":defender_strength", "p_temp_casualties"), (party_collect_attachments_to_party, ":root_attacker_party", "p_collective_enemy"), (try_end), (call_script, "script_party_count_fit_for_battle", "p_collective_enemy", 0), (assign, ":new_attacker_strength", reg0), (try_begin), (gt, ":new_attacker_strength", 0), (neg|is_currently_night), #Don't fight at night (inflict_casualties_to_party_group, ":root_defender_party", ":attacker_strength", "p_temp_casualties"), (party_collect_attachments_to_party, ":root_defender_party", "p_collective_ally"), (try_end), (call_script, "script_party_count_fit_for_battle", "p_collective_ally", 0), (assign, ":new_defender_strength", reg0), (try_begin), (this_or_next|eq, ":new_attacker_strength", 0), (eq, ":new_defender_strength", 0), # Battle concluded! determine winner (try_begin), (eq, ":new_attacker_strength", 0), (eq, ":new_defender_strength", 0), (assign, ":root_winner_party", -1), (assign, ":root_defeated_party", -1), (assign, ":collective_casualties", -1), (else_try), (eq, ":new_attacker_strength", 0), (assign, ":root_winner_party", ":root_defender_party"), (assign, ":root_defeated_party", ":root_attacker_party"), (assign, ":collective_casualties", "p_collective_enemy"), (else_try), (assign, ":root_winner_party", ":root_attacker_party"), (assign, ":root_defeated_party", ":root_defender_party"), (assign, ":collective_casualties", "p_collective_ally"), (try_end), (try_begin), (ge, ":root_winner_party", 0), (call_script, "script_get_nonempty_party_in_group", ":root_winner_party"), (assign, ":nonempty_winner_party", reg0), (store_faction_of_party, ":faction_receiving_prisoners", ":nonempty_winner_party"), (store_faction_of_party, ":defeated_faction", ":root_defeated_party"), (else_try), (assign, ":nonempty_winner_party", -1), (try_end), (try_begin), (ge, ":collective_casualties", 0), (party_get_num_companion_stacks, ":num_stacks", ":collective_casualties"), (else_try), (assign, ":num_stacks", 0), (try_end), (try_for_range, ":troop_iterator", 0, ":num_stacks"), (party_stack_get_troop_id, ":cur_troop_id", ":collective_casualties", ":troop_iterator"), (troop_is_hero, ":cur_troop_id"), (call_script, "script_remove_troop_from_prison", ":cur_troop_id"), (troop_set_slot, ":cur_troop_id", slot_troop_leaded_party, -1), (store_random_in_range, ":rand", 0, 100), (str_store_troop_name_link, s1, ":cur_troop_id"), (str_store_faction_name_link, s2, ":faction_receiving_prisoners"), (store_troop_faction, ":defeated_troop_faction", ":cur_troop_id"), (str_store_faction_name_link, s3, ":defeated_troop_faction"), (try_begin), (ge, ":rand", hero_escape_after_defeat_chance), (party_stack_get_troop_id, ":leader_troop_id", ":nonempty_winner_party", 0), (is_between, ":leader_troop_id", kingdom_heroes_begin, kingdom_heroes_end), #disable non-kingdom parties capturing enemy lords (party_add_prisoners, ":nonempty_winner_party", ":cur_troop_id", 1), (gt, reg0, 0), #(troop_set_slot, ":cur_troop_id", slot_troop_is_prisoner, 1), (troop_set_slot, ":cur_troop_id", slot_troop_prisoner_of_party, ":nonempty_winner_party"), (display_log_message, "str_hero_taken_prisoner"), (else_try), (display_message,"@{s1} of {s3} was defeated in battle but managed to escape."), (try_end), (try_begin), (store_troop_faction, ":cur_troop_faction", ":cur_troop_id"), (faction_slot_eq, ":cur_troop_faction", slot_faction_marshall, ":cur_troop_id"), #Marshall is defeated, refresh ai. (assign, "$g_recalculate_ais", 1), (try_end), (try_end), (try_begin), (ge, ":collective_casualties", 0), (party_get_num_prisoner_stacks, ":num_stacks", ":collective_casualties"), (else_try), (assign, ":num_stacks", 0), (try_end), (try_for_range, ":troop_iterator", 0, ":num_stacks"), (party_prisoner_stack_get_troop_id, ":cur_troop_id", ":collective_casualties", ":troop_iterator"), (troop_is_hero, ":cur_troop_id"), (call_script, "script_remove_troop_from_prison", ":cur_troop_id"), (store_troop_faction, ":cur_troop_faction", ":cur_troop_id"), (str_store_troop_name_link, s1, ":cur_troop_id"), (str_store_faction_name_link, s2, ":faction_receiving_prisoners"), (str_store_faction_name_link, s3, ":cur_troop_faction"), (display_log_message,"str_hero_freed"), (try_end), (try_begin), (ge, ":collective_casualties", 0), (party_clear, "p_temp_party"), (assign, "$g_move_heroes", 0), #heroes are already processed above. Skip them here. (call_script, "script_party_add_party_prisoners", "p_temp_party", ":collective_casualties"), (call_script, "script_party_prisoners_add_party_companions", "p_temp_party", ":collective_casualties"), (distribute_party_among_party_group, "p_temp_party", ":root_winner_party"), (call_script, "script_clear_party_group", ":root_defeated_party"), (try_end), (assign, ":trigger_result", 1), #End battle! #Center captured (try_begin), (ge, ":collective_casualties", 0), (party_get_slot, ":cur_party_type", ":root_defeated_party", slot_party_type), (this_or_next|eq, ":cur_party_type", spt_town), (eq, ":cur_party_type", spt_castle), (assign, "$g_recalculate_ais", 1), (store_faction_of_party, ":winner_faction", ":root_winner_party"), (store_faction_of_party, ":defeated_faction", ":root_defeated_party"), (str_store_party_name, s1, ":root_defeated_party"), (str_store_faction_name, s2, ":winner_faction"), (str_store_faction_name, s3, ":defeated_faction"), (display_log_message, "str_center_captured"), (try_begin), (eq, "$g_encountered_party", ":root_defeated_party"), ## (display_message, "@Player participation in siege called from g_encountered_party"), (call_script, "script_add_log_entry", logent_player_participated_in_siege, "trp_player", "$g_encountered_party", 0, "$g_encountered_party_faction"), (try_end), ## (try_begin), ## (eq, "$g_encountered_party_2", ":root_defeated_party"), ## (display_message, "@Player participation in siege called from game_event_simulate_battle thanks to g_encountered_party"), ## (try_end), ## (try_begin), ## (eq, "$g_enemy_party", ":root_defeated_party"), ## (display_message, "@Player participation in siege called from game_event_simulate_battle thanks to g_encountered_party"), ## (try_end), (try_begin), (party_get_num_companion_stacks, ":num_stacks", ":root_winner_party"), (gt, ":num_stacks", 0), (party_stack_get_troop_id, ":leader_troop_no", ":root_winner_party", 0), (is_between, ":leader_troop_no", kingdom_heroes_begin, kingdom_heroes_end), (party_set_slot, ":root_defeated_party", slot_center_last_taken_by_troop, ":leader_troop_no"), (else_try), (party_set_slot, ":root_defeated_party", slot_center_last_taken_by_troop, -1), (try_end), (call_script, "script_lift_siege", ":root_defeated_party", 0), (call_script, "script_give_center_to_faction", ":root_defeated_party", ":winner_faction"), (try_begin), (eq, ":defeated_faction", "fac_player_supporters_faction"), (call_script, "script_add_notification_menu", "mnu_notification_center_lost", ":root_defeated_party", ":winner_faction"), (try_end), #Reduce prosperity of the center by 5 (call_script, "script_change_center_prosperity", ":root_defeated_party", -5), (call_script, "script_order_best_besieger_party_to_guard_center", ":root_defeated_party", ":winner_faction"), (call_script, "script_cf_reinforce_party", ":root_defeated_party"), (call_script, "script_cf_reinforce_party", ":root_defeated_party"), (try_end), (try_end), #ADD XP (try_begin), (party_slot_eq, ":root_attacker_party", slot_party_type, spt_kingdom_hero_party), (store_random_in_range, ":random_num",0, 100), (lt, ":random_num", 25), (gt, ":new_attacker_strength", 0), (call_script, "script_upgrade_hero_party", ":root_attacker_party", 1000), (try_end), (try_begin), (party_slot_eq, ":root_defender_party", slot_party_type, spt_kingdom_hero_party), (store_random_in_range, ":random_num",0, 100), (lt, ":random_num", 25), (gt, ":new_defender_strength", 0), (call_script, "script_upgrade_hero_party", ":root_defender_party", 1000), (try_end), (store_random_in_range, ":random_num", 0, 100), (try_begin), (lt, ":random_num", 10), ## (this_or_next|lt, ":random_num", 10), ## (eq, ":cancel_attack", 1), (assign, ":trigger_result", 1), #End battle! (try_end), (try_end), (set_trigger_result, ":trigger_result"), (try_end), ]), #script_game_event_battle_end: # This script is called whenever the game ends the battle between two parties on the map. # INPUT: # param1: Defender Party # param2: Attacker Party ("game_event_battle_end", [ ## (store_script_param_1, ":root_defender_party"), ## (store_script_param_2, ":root_attacker_party"), #Fixing deleted heroes (try_for_range, ":cur_troop", kingdom_heroes_begin, kingdom_heroes_end), (troop_get_slot, ":cur_party", ":cur_troop", slot_troop_leaded_party), (troop_get_slot, ":cur_prisoner_of_party", ":cur_troop", slot_troop_prisoner_of_party), (try_begin), (ge, ":cur_party", 0), (assign, ":continue", 0), (try_begin), (neg|party_is_active, ":cur_party"), (assign, ":continue", 1), (else_try), (party_count_companions_of_type, ":amount", ":cur_party", ":cur_troop"), (le, ":amount", 0), (assign, ":continue", 1), (try_end), (eq, ":continue", 1), (try_begin), (eq, "$cheat_mode", 1), (str_store_troop_name, s1, ":cur_troop"), (display_message, "@DEBUG: {s1} no longer leads a party."), (try_end), (troop_set_slot, ":cur_troop", slot_troop_leaded_party, -1), (try_end), (try_begin), (ge, ":cur_prisoner_of_party", 0), (assign, ":continue", 0), (try_begin), (neg|party_is_active, ":cur_prisoner_of_party"), (assign, ":continue", 1), (else_try), (party_count_prisoners_of_type, ":amount", ":cur_prisoner_of_party", ":cur_troop"), (le, ":amount", 0), (assign, ":continue", 1), (try_end), (eq, ":continue", 1), (try_begin), (eq, "$cheat_mode", 1), (str_store_troop_name, s1, ":cur_troop"), (display_message, "@DEBUG: {s1} is no longer a prisoner."), (try_end), (call_script, "script_remove_troop_from_prison", ":cur_troop"), #searching player (try_begin), (party_count_prisoners_of_type, ":amount", "p_main_party", ":cur_troop"), (gt, ":amount", 0), (troop_set_slot, ":cur_troop", slot_troop_prisoner_of_party, "p_main_party"), (assign, ":continue", 0), (try_begin), (eq, "$cheat_mode", 1), (str_store_troop_name, s1, ":cur_troop"), (display_message, "@DEBUG: {s1} is now a prisoner of player."), (try_end), (try_end), (eq, ":continue", 1), #searching kingdom heroes (try_for_range, ":cur_troop_2", kingdom_heroes_begin, kingdom_heroes_end), (eq, ":continue", 1), (troop_get_slot, ":cur_prisoner_of_party_2", ":cur_troop_2", slot_troop_leaded_party), (party_is_active, ":cur_prisoner_of_party_2"), (party_count_prisoners_of_type, ":amount", ":cur_prisoner_of_party_2", ":cur_troop"), (gt, ":amount", 0), (troop_set_slot, ":cur_troop", slot_troop_prisoner_of_party, ":cur_prisoner_of_party_2"), (assign, ":continue", 0), (try_begin), (eq, "$cheat_mode", 1), (str_store_troop_name, s1, ":cur_troop"), (str_store_party_name, s2, ":cur_prisoner_of_party_2"), (display_message, "@DEBUG: {s1} is now a prisoner of {s2}."), (try_end), (try_end), #searching walled centers (try_for_range, ":cur_prisoner_of_party_2", walled_centers_begin, walled_centers_end), (eq, ":continue", 1), (party_count_prisoners_of_type, ":amount", ":cur_prisoner_of_party_2", ":cur_troop"), (gt, ":amount", 0), (troop_set_slot, ":cur_troop", slot_troop_prisoner_of_party, ":cur_prisoner_of_party_2"), (assign, ":continue", 0), (try_begin), (eq, "$cheat_mode", 1), (str_store_troop_name, s1, ":cur_troop"), (str_store_party_name, s2, ":cur_prisoner_of_party_2"), (display_message, "@DEBUG: {s1} is now a prisoner of {s2}."), (try_end), (try_end), (try_end), (try_end), ]), #script_order_best_besieger_party_to_guard_center: # INPUT: # param1: defeated_center, param2: winner_faction # OUTPUT: # none ("order_best_besieger_party_to_guard_center", [ (store_script_param, ":defeated_center", 1), (store_script_param, ":winner_faction", 2), (assign, ":best_party", -1), (assign, ":best_party_strength", 0), (try_for_range, ":kingdom_hero", kingdom_heroes_begin, kingdom_heroes_end), (troop_get_slot, ":kingdom_hero_party", ":kingdom_hero", slot_troop_leaded_party), (gt, ":kingdom_hero_party", 0), (store_distance_to_party_from_party, ":dist", ":kingdom_hero_party", ":defeated_center"), (lt, ":dist", 5), (store_faction_of_party, ":kingdom_hero_party_faction", ":kingdom_hero_party"), (eq, ":winner_faction", ":kingdom_hero_party_faction"), #If marshall has captured the castle, then do not leave him behind. (neg|faction_slot_eq, ":winner_faction", slot_faction_marshall, ":kingdom_hero"), (assign, ":has_besiege_ai", 0), (try_begin), (party_slot_eq, ":kingdom_hero_party", slot_party_ai_state, spai_besieging_center), (party_slot_eq, ":kingdom_hero_party", slot_party_ai_object, ":defeated_center"), (assign, ":has_besiege_ai", 1), (else_try), (party_slot_eq, ":kingdom_hero_party", slot_party_ai_state, spai_accompanying_army), (party_get_slot, ":kingdom_hero_party_commander_party", ":kingdom_hero_party", slot_party_commander_party), (party_slot_eq, ":kingdom_hero_party_commander_party", slot_party_ai_state, spai_besieging_center), (party_slot_eq, ":kingdom_hero_party_commander_party", slot_party_ai_object, ":defeated_center"), (assign, ":has_besiege_ai", 1), (try_end), (eq, ":has_besiege_ai", 1), (party_get_slot, ":kingdom_hero_party_strength", ":kingdom_hero_party", slot_party_cached_strength),#recently calculated (gt, ":kingdom_hero_party_strength", ":best_party_strength"), (assign, ":best_party_strength", ":kingdom_hero_party_strength"), (assign, ":best_party", ":kingdom_hero_party"), (try_end), (try_begin), (gt, ":best_party", 0), (call_script, "script_party_set_ai_state", ":best_party", spai_holding_center, ":defeated_center"), (party_set_slot, ":best_party", slot_party_commander_party, -1), (party_set_flags, ":best_party", pf_default_behavior, 1), (try_end), ]), #script_game_get_item_buy_price_factor: # This script is called from the game engine for calculating the buying price of any item. # INPUT: # param1: item_kind_id # OUTPUT: # trigger_result and reg0 = price_factor ("game_get_item_buy_price_factor", [ (store_script_param_1, ":item_kind_id"), (assign, ":price_factor", 100), (call_script, "script_get_trade_penalty", ":item_kind_id"), (assign, ":trade_penalty", reg0), (try_begin), (is_between, "$g_encountered_party", centers_begin, centers_end), (is_between, ":item_kind_id", trade_goods_begin, trade_goods_end), (store_sub, ":item_slot_no", ":item_kind_id", trade_goods_begin), (val_add, ":item_slot_no", slot_town_trade_good_prices_begin), (party_get_slot, ":price_factor", "$g_encountered_party", ":item_slot_no"), (val_mul, ":price_factor", 100), #normalize price factor to range 0..100 (val_div, ":price_factor", average_price_factor), (try_end), (store_add, ":penalty_factor", 100, ":trade_penalty"), (val_mul, ":price_factor", ":penalty_factor"), (val_div, ":price_factor", 100), (assign, reg0, ":price_factor"), (set_trigger_result, reg0), ]), #script_game_get_item_sell_price_factor: # This script is called from the game engine for calculating the selling price of any item. # INPUT: # param1: item_kind_id # OUTPUT: # trigger_result and reg0 = price_factor ("game_get_item_sell_price_factor", [ (store_script_param_1, ":item_kind_id"), (assign, ":price_factor", 100), (call_script, "script_get_trade_penalty", ":item_kind_id"), (assign, ":trade_penalty", reg0), (try_begin), (is_between, "$g_encountered_party", centers_begin, centers_end), (is_between, ":item_kind_id", trade_goods_begin, trade_goods_end), (store_sub, ":item_slot_no", ":item_kind_id", trade_goods_begin), (val_add, ":item_slot_no", slot_town_trade_good_prices_begin), (party_get_slot, ":price_factor", "$g_encountered_party", ":item_slot_no"), (val_mul, ":price_factor", 100),#normalize price factor to range 0..100 (val_div, ":price_factor", average_price_factor), (else_try), #increase trade penalty while selling (val_mul, ":trade_penalty", 4), (try_end), (store_add, ":penalty_divisor", 100, ":trade_penalty"), (val_mul, ":price_factor", 100), (val_div, ":price_factor", ":penalty_divisor"), (assign, reg0, ":price_factor"), (set_trigger_result, reg0), ]), # script_get_trade_penalty # # Input: # param1: troop_id, # Output: reg0 ("get_trade_penalty", [ (store_script_param_1, ":item_kind_id"), (assign, ":penalty",0), (party_get_skill_level, ":trade_skill", "p_main_party", skl_trade), (try_begin), (is_between, ":item_kind_id", trade_goods_begin, trade_goods_end), (assign, ":penalty",20), (store_mul, ":skill_bonus", ":trade_skill", 1), (val_sub, ":penalty", ":skill_bonus"), (else_try), (assign, ":penalty",100), (store_mul, ":skill_bonus", ":trade_skill", 5), (val_sub, ":penalty", ":skill_bonus"), (try_end), (assign, ":penalty_multiplier", 1000), ## # Apply penalty if player is hostile to merchants faction ## (store_relation, ":merchants_reln", "fac_merchants", "fac_player_supporters_faction"), ## (try_begin), ## (lt, ":merchants_reln", 0), ## (store_sub, ":merchants_reln_dif", 10, ":merchants_reln"), ## (store_mul, ":merchants_relation_penalty", ":merchants_reln_dif", 20), ## (val_add, ":penalty_multiplier", ":merchants_relation_penalty"), ## (try_end), # Apply penalty if player is on bad terms with the town (try_begin), (is_between, "$g_encountered_party", centers_begin, centers_end), (party_get_slot, ":center_relation", "$g_encountered_party", slot_center_player_relation), (store_mul, ":center_relation_penalty", ":center_relation", -3), (val_add, ":penalty_multiplier", ":center_relation_penalty"), (try_begin), (lt, ":center_relation", 0), (store_sub, ":center_penalty_multiplier", 100, ":center_relation"), (val_mul, ":penalty_multiplier", ":center_penalty_multiplier"), (val_div, ":penalty_multiplier", 100), (try_end), (try_end), # Apply penalty if player is on bad terms with the merchant (not currently used) (call_script, "script_troop_get_player_relation", "$g_talk_troop"), (assign, ":troop_reln", reg0), #(troop_get_slot, ":troop_reln", "$g_talk_troop", slot_troop_player_relation), (try_begin), (lt, ":troop_reln", 0), (store_sub, ":troop_reln_dif", 0, ":troop_reln"), (store_mul, ":troop_relation_penalty", ":troop_reln_dif", 20), (val_add, ":penalty_multiplier", ":troop_relation_penalty"), (try_end), (val_mul, ":penalty", ":penalty_multiplier"), (val_div, ":penalty", 1000), (val_max, ":penalty", 1), (assign, reg0, ":penalty"), ]), #script_game_event_buy_item: # This script is called from the game engine when player buys an item. # INPUT: # param1: item_kind_id ("game_event_buy_item", [ (store_script_param_1, ":item_kind_id"), (store_script_param_2, ":reclaim_mode"), (try_begin), (is_between, ":item_kind_id", trade_goods_begin, trade_goods_end), (store_sub, ":item_slot_no", ":item_kind_id", trade_goods_begin), (val_add, ":item_slot_no", slot_town_trade_good_prices_begin), (party_get_slot, ":multiplier", "$g_encountered_party", ":item_slot_no"), (try_begin), (eq, ":reclaim_mode", 0), (val_add, ":multiplier", 10), (else_try), (val_add, ":multiplier", 15), (try_end), (val_min, ":multiplier", maximum_price_factor), (party_set_slot, "$g_encountered_party", ":item_slot_no", ":multiplier"), (try_end), ]), #script_game_event_sell_item: # This script is called from the game engine when player sells an item. # INPUT: # param1: item_kind_id ("game_event_sell_item", [ (store_script_param_1, ":item_kind_id"), (store_script_param_2, ":return_mode"), (try_begin), (is_between, ":item_kind_id", trade_goods_begin, trade_goods_end), (store_sub, ":item_slot_no", ":item_kind_id", trade_goods_begin), (val_add, ":item_slot_no", slot_town_trade_good_prices_begin), (party_get_slot, ":multiplier", "$g_encountered_party", ":item_slot_no"), (try_begin), (eq, ":return_mode", 0), (val_sub, ":multiplier", 15), (else_try), (val_sub, ":multiplier", 10), (try_end), (val_max, ":multiplier", minimum_price_factor), (party_set_slot, "$g_encountered_party", ":item_slot_no", ":multiplier"), (try_end), ]), # script_game_get_troop_wage # This script is called from the game engine for calculating troop wages. # Input: # param1: troop_id, param2: party-id # Output: reg0: weekly wage ("game_get_troop_wage", [ (store_script_param_1, ":troop_id"), (store_script_param_2, ":unused"), #party id (assign,":wage", 0), (try_begin), (this_or_next|eq, ":troop_id", "trp_player"), (eq, ":troop_id", "trp_kidnapped_girl"), (else_try), (is_between, ":troop_id", pretenders_begin, pretenders_end), (else_try), (store_character_level, ":troop_level", ":troop_id"), (assign, ":wage", ":troop_level"), (val_add, ":wage", 3), (val_mul, ":wage", ":wage"), (val_div, ":wage", 25), (try_end), (try_begin), #mounted troops cost 65% more than the normal cost (troop_is_mounted, ":troop_id"), (val_mul, ":wage", 5), (val_div, ":wage", 3), (try_end), (try_begin), #mercenaries cost %50 more than the normal cost (is_between, ":troop_id", mercenary_troops_begin, mercenary_troops_end), (val_mul, ":wage", 3), (val_div, ":wage", 2), (try_end), (try_begin), (is_between, ":troop_id", companions_begin, companions_end), (val_mul, ":wage", 2), (try_end), (store_skill_level, ":leadership_level", "skl_leadership", "trp_player"), (store_mul, ":leadership_bonus", 5, ":leadership_level"), (store_sub, ":leadership_factor", 100, ":leadership_bonus"), (val_mul, ":wage", ":leadership_factor"), #wage = wage * (100 - 5*leadership)/100 (val_div, ":wage", 100), (try_begin), (neq, ":troop_id", "trp_player"), (neq, ":troop_id", "trp_kidnapped_girl"), (neg|is_between, ":troop_id", pretenders_begin, pretenders_end), (val_max, ":wage", 1), (try_end), (assign, reg0, ":wage"), (set_trigger_result, reg0), ]), # script_game_get_total_wage # This script is called from the game engine for calculating total wage of the player party which is shown at the party window. # Input: none # Output: reg0: weekly wage ("game_get_total_wage", [ (assign, ":total_wage", 0), (party_get_num_companion_stacks, ":num_stacks", "p_main_party"), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop", "p_main_party", ":i_stack"), (party_stack_get_size, ":stack_size", "p_main_party", ":i_stack"), (call_script, "script_game_get_troop_wage", ":stack_troop", 0), (val_mul, reg0, ":stack_size"), (val_add, ":total_wage", reg0), (try_end), (assign, reg0, ":total_wage"), (set_trigger_result, reg0), ]), # script_game_get_join_cost # This script is called from the game engine for calculating troop join cost. # Input: # param1: troop_id, # Output: reg0: weekly wage ("game_get_join_cost", [ (store_script_param_1, ":troop_id"), (assign,":join_cost", 0), (try_begin), (troop_is_hero, ":troop_id"), (else_try), (store_character_level, ":troop_level", ":troop_id"), (assign, ":join_cost", ":troop_level"), (val_add, ":join_cost", 5), (val_mul, ":join_cost", ":join_cost"), (val_add, ":join_cost", 40), (val_div, ":join_cost", 5), (try_begin), #mounted troops cost %100 more than the normal cost (troop_is_mounted, ":troop_id"), (val_mul, ":join_cost", 2), (try_end), (try_end), (assign, reg0, ":join_cost"), (set_trigger_result, reg0), ]), # script_game_get_prisoner_price # This script is called from the game engine for calculating prisoner price # Input: # param1: troop_id, # Output: reg0 ("game_get_prisoner_price", [ (store_script_param_1, ":troop_id"), (assign, reg0, 50), (try_begin), (is_between, "$g_talk_troop", ransom_brokers_begin, ransom_brokers_end), (store_character_level, ":troop_level", ":troop_id"), (assign, ":ransom_amount", ":troop_level"), (val_add, ":ransom_amount", 10), (val_mul, ":ransom_amount", ":ransom_amount"), (val_div, ":ransom_amount", 6), (try_end), (set_trigger_result, reg0), ]), # script_game_check_prisoner_can_be_sold # This script is called from the game engine for checking if a given troop can be sold. # Input: # param1: troop_id, # Output: reg0: 1= can be sold; 0= cannot be sold. ("game_check_prisoner_can_be_sold", [ (store_script_param_1, ":troop_id"), (assign, reg0, 0), (try_begin), (neg|troop_is_hero, ":troop_id"), (assign, reg0, 1), (try_end), (set_trigger_result, reg0), ]), #script_game_event_detect_party: # This script is called from the game engine when player party inspects another party. # INPUT: # param1: Party-id ("game_event_detect_party", [ (store_script_param_1, ":party_id"), (try_begin), (party_slot_eq, ":party_id", slot_party_type, spt_kingdom_hero_party), (party_stack_get_troop_id, ":leader", ":party_id", 0), (is_between, ":leader", kingdom_heroes_begin, kingdom_heroes_end), (call_script, "script_update_troop_location_notes", ":leader", 0), (else_try), (is_between, ":party_id", walled_centers_begin, walled_centers_end), (party_get_num_attached_parties, ":num_attached_parties", ":party_id"), (try_for_range, ":attached_party_rank", 0, ":num_attached_parties"), (party_get_attached_party_with_rank, ":attached_party", ":party_id", ":attached_party_rank"), (party_stack_get_troop_id, ":leader", ":attached_party", 0), (is_between, ":leader", kingdom_heroes_begin, kingdom_heroes_end), (call_script, "script_update_troop_location_notes", ":leader", 0), (try_end), (try_end), ]), #script_game_event_undetect_party: # This script is called from the game engine when player party inspects another party. # INPUT: # param1: Party-id ("game_event_undetect_party", [ (store_script_param_1, ":party_id"), (try_begin), (party_slot_eq, ":party_id", slot_party_type, spt_kingdom_hero_party), (party_stack_get_troop_id, ":leader", ":party_id", 0), (is_between, ":leader", kingdom_heroes_begin, kingdom_heroes_end), (call_script, "script_update_troop_location_notes", ":leader", 0), (try_end), ]), #script_game_get_statistics_line: # This script is called from the game engine when statistics page is opened. # INPUT: # param1: line_no ("game_get_statistics_line", [ (store_script_param_1, ":line_no"), (try_begin), (eq, ":line_no", 0), (get_player_agent_kill_count, reg1), (str_store_string, s1, "str_number_of_troops_killed_reg1"), (set_result_string, s1), (else_try), (eq, ":line_no", 1), (get_player_agent_kill_count, reg1, 1), (str_store_string, s1, "str_number_of_troops_wounded_reg1"), (set_result_string, s1), (else_try), (eq, ":line_no", 2), (get_player_agent_own_troop_kill_count, reg1), (str_store_string, s1, "str_number_of_own_troops_killed_reg1"), (set_result_string, s1), (else_try), (eq, ":line_no", 3), (get_player_agent_own_troop_kill_count, reg1, 1), (str_store_string, s1, "str_number_of_own_troops_wounded_reg1"), (set_result_string, s1), (try_end), ]), #script_game_get_date_text: # This script is called from the game engine when the date needs to be displayed. # INPUT: arg1 = number of days passed since the beginning of the game # OUTPUT: result string = date ("game_get_date_text", [ (store_script_param_2, ":num_hours"), (store_div, ":num_days", ":num_hours", 24), (store_add, ":cur_day", ":num_days", 23), (assign, ":cur_month", 3), (assign, ":cur_year", 1257), (assign, ":try_range", 99999), (try_for_range, ":unused", 0, ":try_range"), (try_begin), (this_or_next|eq, ":cur_month", 1), (this_or_next|eq, ":cur_month", 3), (this_or_next|eq, ":cur_month", 5), (this_or_next|eq, ":cur_month", 7), (this_or_next|eq, ":cur_month", 8), (this_or_next|eq, ":cur_month", 10), (eq, ":cur_month", 12), (assign, ":month_day_limit", 31), (else_try), (this_or_next|eq, ":cur_month", 4), (this_or_next|eq, ":cur_month", 6), (this_or_next|eq, ":cur_month", 9), (eq, ":cur_month", 11), (assign, ":month_day_limit", 30), (else_try), (try_begin), (store_div, ":cur_year_div_4", ":cur_year", 4), (val_mul, ":cur_year_div_4", 4), (eq, ":cur_year_div_4", ":cur_year"), (assign, ":month_day_limit", 29), (else_try), (assign, ":month_day_limit", 28), (try_end), (try_end), (try_begin), (gt, ":cur_day", ":month_day_limit"), (val_sub, ":cur_day", ":month_day_limit"), (val_add, ":cur_month", 1), (try_begin), (gt, ":cur_month", 12), (val_sub, ":cur_month", 12), (val_add, ":cur_year", 1), (try_end), (else_try), (assign, ":try_range", 0), (try_end), (try_end), (assign, reg1, ":cur_day"), (assign, reg2, ":cur_year"), (try_begin), (eq, ":cur_month", 1), (str_store_string, s1, "str_january_reg1_reg2"), (else_try), (eq, ":cur_month", 2), (str_store_string, s1, "str_february_reg1_reg2"), (else_try), (eq, ":cur_month", 3), (str_store_string, s1, "str_march_reg1_reg2"), (else_try), (eq, ":cur_month", 4), (str_store_string, s1, "str_april_reg1_reg2"), (else_try), (eq, ":cur_month", 5), (str_store_string, s1, "str_may_reg1_reg2"), (else_try), (eq, ":cur_month", 6), (str_store_string, s1, "str_june_reg1_reg2"), (else_try), (eq, ":cur_month", 7), (str_store_string, s1, "str_july_reg1_reg2"), (else_try), (eq, ":cur_month", 8), (str_store_string, s1, "str_august_reg1_reg2"), (else_try), (eq, ":cur_month", 9), (str_store_string, s1, "str_september_reg1_reg2"), (else_try), (eq, ":cur_month", 10), (str_store_string, s1, "str_october_reg1_reg2"), (else_try), (eq, ":cur_month", 11), (str_store_string, s1, "str_november_reg1_reg2"), (else_try), (eq, ":cur_month", 12), (str_store_string, s1, "str_december_reg1_reg2"), (try_end), (set_result_string, s1), ]), #script_game_get_money_text: # This script is called from the game engine when an amount of money needs to be displayed. # INPUT: arg1 = amount in units # OUTPUT: result string = money in text ("game_get_money_text", [ (store_script_param_1, ":amount"), (try_begin), (eq, ":amount", 1), (str_store_string, s1, "str_1_denar"), (else_try), (assign, reg1, ":amount"), (str_store_string, s1, "str_reg1_denars"), (try_end), (set_result_string, s1), ]), #script_game_get_party_companion_limit: # This script is called from the game engine when the companion limit is needed for a party. # INPUT: arg1 = none # OUTPUT: reg0 = companion_limit ("game_get_party_companion_limit", [ (assign, ":troop_no", "trp_player"), (assign, ":limit", 10), (store_skill_level, ":skill", "skl_leadership", ":troop_no"), (store_attribute_level, ":charisma", ":troop_no", ca_charisma), (val_mul, ":skill", 5), (val_add, ":limit", ":skill"), (val_add, ":limit", ":charisma"), (troop_get_slot, ":troop_renown", ":troop_no", slot_troop_renown), (store_div, ":renown_bonus", ":troop_renown", 80), # Modified by formation mod, to ensure the whole player party (including arrays) don't exceed the original limit (val_add, ":limit", ":renown_bonus"), (assign, reg0, ":limit"), (set_trigger_result, reg0), ]), #script_game_reset_player_party_name: # This script is called from the game engine when the player name is changed. # INPUT: none # OUTPUT: none ("game_reset_player_party_name", [(str_store_troop_name, s5, "trp_player"), (party_set_name, "p_main_party", s5), ]), # script_party_get_ideal_size @used for NPC parties. # Input: arg1 = party_no # Output: reg0: ideal size ("party_get_ideal_size", [ (store_script_param_1, ":party_no"), (assign, ":limit", 30), (try_begin), (party_slot_eq, ":party_no", slot_party_type, spt_kingdom_hero_party), (party_stack_get_troop_id, ":party_leader", ":party_no", 0), (store_faction_of_party, ":faction_id", ":party_no"), (assign, ":limit", 10), (store_skill_level, ":skill", "skl_leadership", ":party_leader"), (store_attribute_level, ":charisma", ":party_leader", ca_charisma), (val_mul, ":skill", 5), (val_add, ":limit", ":skill"), (val_add, ":limit", ":charisma"), (troop_get_slot, ":troop_renown", ":party_leader", slot_troop_renown), (store_div, ":renown_bonus", ":troop_renown", 25), (val_add, ":limit", ":renown_bonus"), (try_begin), (faction_slot_eq, ":faction_id", slot_faction_leader, ":party_leader"), (val_add, ":limit", 100), (try_end), (try_end), (store_character_level, ":level", "trp_player"), #increase limits a little bit as the game progresses. (store_add, ":level_factor", 90, ":level"), (val_mul, ":limit", ":level_factor"), (val_div, ":limit", 90), (assign, reg0, ":limit"), ]), #script_game_get_party_prisoner_limit: # This script is called from the game engine when the prisoner limit is needed for a party. # INPUT: arg1 = party_no # OUTPUT: reg0 = prisoner_limit ("game_get_party_prisoner_limit", [ # (store_script_param_1, ":party_no"), (assign, ":troop_no", "trp_player"), (assign, ":limit", 0), (store_skill_level, ":skill", "skl_prisoner_management", ":troop_no"), (store_mul, ":limit", ":skill", 5), (assign, reg0, ":limit"), (set_trigger_result, reg0), ]), #script_game_get_item_extra_text: # This script is called from the game engine when an item's properties are displayed. # INPUT: arg1 = item_no, arg2 = extra_text_id (this can be between 0-7 (7 included)), arg3 = item_modifier # OUTPUT: result_string = item extra text, trigger_result = text color (0 for default) ("game_get_item_extra_text", [ (store_script_param, ":item_no", 1), (store_script_param, ":extra_text_id", 2), (store_script_param, ":item_modifier", 3), (try_begin), (is_between, ":item_no", food_begin, food_end), (try_begin), (eq, ":extra_text_id", 0), (assign, ":continue", 1), (try_begin), (eq, ":item_no", "itm_cattle_meat"), (eq, ":item_modifier", imod_rotten), (assign, ":continue", 0), (try_end), (eq, ":continue", 1), (item_get_slot, ":food_bonus", ":item_no", slot_item_food_bonus), (assign, reg1, ":food_bonus"), (set_result_string, "@+{reg1} to party morale"), (set_trigger_result, 0x4444FF), (try_end), (else_try), (is_between, ":item_no", readable_books_begin, readable_books_end), (try_begin), (eq, ":extra_text_id", 0), (item_get_slot, reg1, ":item_no", slot_item_intelligence_requirement), (set_result_string, "@Requires {reg1} intelligence to read"), (set_trigger_result, 0xFFEEDD), (else_try), (eq, ":extra_text_id", 1), (item_get_slot, ":progress", ":item_no", slot_item_book_reading_progress), (val_div, ":progress", 10), (assign, reg1, ":progress"), (set_result_string, "@Reading Progress: {reg1}%"), (set_trigger_result, 0xFFEEDD), (try_end), (else_try), (is_between, ":item_no", reference_books_begin, reference_books_end), (try_begin), (eq, ":extra_text_id", 0), (try_begin), (eq, ":item_no", "itm_book_wound_treatment_reference"), (str_store_string, s1, "@wound treament"), (else_try), (eq, ":item_no", "itm_book_training_reference"), (str_store_string, s1, "@trainer"), (else_try), (eq, ":item_no", "itm_book_surgery_reference"), (str_store_string, s1, "@surgery"), (try_end), (set_result_string, "@+1 to {s1} while in inventory"), (set_trigger_result, 0xFFEEDD), (try_end), (try_end), ]), #script_game_on_disembark: # This script is called from the game engine when the player reaches the shore with a ship. # INPUT: pos0 = disembark position # OUTPUT: none ("game_on_disembark", [(jump_to_menu, "mnu_disembark"), ]), #script_game_context_menu_get_buttons: # This script is called from the game engine when the player clicks the right mouse button over a party on the map. # INPUT: arg1 = party_no # OUTPUT: none, fills the menu buttons ("game_context_menu_get_buttons", [(store_script_param, ":party_no", 1), (try_begin), (neq, ":party_no", "p_main_party"), (context_menu_add_item, "@Move here", cmenu_move), (try_end), (try_begin), (is_between, ":party_no", centers_begin, centers_end), (context_menu_add_item, "@View notes", 1), (else_try), (party_get_num_companion_stacks, ":num_stacks", ":party_no"), (gt, ":num_stacks", 0), (party_stack_get_troop_id, ":troop_no", ":party_no", 0), (is_between, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (context_menu_add_item, "@View notes", 2), (try_end), ]), #script_game_event_context_menu_button_clicked: # This script is called from the game engine when the player clicks on a button at the right mouse menu. # INPUT: arg1 = party_no, arg2 = button_value # OUTPUT: none ("game_event_context_menu_button_clicked", [(store_script_param, ":party_no", 1), (store_script_param, ":button_value", 2), (try_begin), (eq, ":button_value", 1), (change_screen_notes, 3, ":party_no"), (else_try), (eq, ":button_value", 2), (party_stack_get_troop_id, ":troop_no", ":party_no", 0), (change_screen_notes, 1, ":troop_no"), (try_end), ]), #script_game_get_skill_modifier_for_troop # This script is called from the game engine when a skill's modifiers are needed # INPUT: arg1 = troop_no, arg2 = skill_no # OUTPUT: trigger_result = modifier_value ("game_get_skill_modifier_for_troop", [(store_script_param, ":troop_no", 1), (store_script_param, ":skill_no", 2), (assign, ":modifier_value", 0), (try_begin), (eq, ":skill_no", "skl_wound_treatment"), (call_script, "script_get_troop_item_amount", ":troop_no", "itm_book_wound_treatment_reference"), (gt, reg0, 0), (val_add, ":modifier_value", 1), (else_try), (eq, ":skill_no", "skl_trainer"), (call_script, "script_get_troop_item_amount", ":troop_no", "itm_book_training_reference"), (gt, reg0, 0), (val_add, ":modifier_value", 1), (else_try), (eq, ":skill_no", "skl_surgery"), (call_script, "script_get_troop_item_amount", ":troop_no", "itm_book_surgery_reference"), (gt, reg0, 0), (val_add, ":modifier_value", 1), (try_end), (set_trigger_result, ":modifier_value"), ]), # Note to modders: Uncomment these if you'd like to use the following. ## #script_game_check_party_sees_party ## # This script is called from the game engine when a party is inside the range of another party ## # INPUT: arg1 = party_no_seer, arg2 = party_no_seen ## # OUTPUT: trigger_result = true or false (1 = true, 0 = false) ## ("game_check_party_sees_party", ## [ ## (store_script_param, ":party_no_seer", 1), ## (store_script_param, ":party_no_seen", 2), ## (set_trigger_result, 1), ## ]), ## ## #script_game_get_party_speed_multiplier ## # This script is called from the game engine when a skill's modifiers are needed ## # INPUT: arg1 = party_no ## # OUTPUT: trigger_result = multiplier (scaled by 100, meaning that giving 100 as the trigger result does not change the party speed) ## ("game_get_party_speed_multiplier", ## [ ## (store_script_param, ":party_no", 1), ## (set_trigger_result, 100), ## ]), # script_npc_get_troop_wage # This script is called from module system to calculate troop wages for npc parties. # Input: # param1: troop_id # Output: reg0: weekly wage ("npc_get_troop_wage", [ (store_script_param_1, ":troop_id"), (assign,":wage", 0), (try_begin), (troop_is_hero, ":troop_id"), (else_try), (store_character_level, ":wage", ":troop_id"), (val_mul, ":wage", ":wage"), (val_add, ":wage", 50), (val_div, ":wage", 30), (troop_is_mounted, ":troop_id"), (val_mul, ":wage", 5), (val_div, ":wage", 4), (try_end), (assign, reg0, ":wage"), ]), #script_setup_talk_info # INPUT: $g_talk_troop, $g_talk_troop_relation ("setup_talk_info", [ (talk_info_set_relation_bar, "$g_talk_troop_relation"), (str_store_troop_name, s61, "$g_talk_troop"), (str_store_string, s61, "@ {s61}"), (assign, reg1, "$g_talk_troop_relation"), (str_store_string, s62, "str_relation_reg1"), (talk_info_set_line, 0, s61), (talk_info_set_line, 1, s62), (call_script, "script_describe_relation_to_s63", "$g_talk_troop_relation"), (talk_info_set_line, 3, s63), ]), #NPC companion changes begin #script_setup_talk_info_companions ("setup_talk_info_companions", [ (call_script, "script_npc_morale", "$g_talk_troop"), (assign, ":troop_morale", reg0), (talk_info_set_relation_bar, ":troop_morale"), (str_store_troop_name, s61, "$g_talk_troop"), (str_store_string, s61, "@ {s61}"), (assign, reg1, ":troop_morale"), (str_store_string, s62, "str_morale_reg1"), (talk_info_set_line, 0, s61), (talk_info_set_line, 1, s62), (talk_info_set_line, 3, s63), ]), #NPC companion changes end #script_update_party_creation_random_limits # INPUT: none ("update_party_creation_random_limits", [ (store_character_level, ":player_level", "trp_player"), (store_mul, ":upper_limit", ":player_level", 3), (val_add, ":upper_limit", 25), (val_min, ":upper_limit", 100), (set_party_creation_random_limits, 0, ":upper_limit"), (assign, reg0, ":upper_limit"), ]), #script_set_trade_route_between_centers # INPUT: # param1: center_no_1 # param1: center_no_2 ("set_trade_route_between_centers", [(store_script_param, ":center_no_1", 1), (store_script_param, ":center_no_2", 2), (assign, ":center_1_added", 0), (assign, ":center_2_added", 0), (try_for_range, ":cur_slot", slot_town_trade_routes_begin, slot_town_trade_routes_end), (try_begin), (eq, ":center_1_added", 0), (party_slot_eq, ":center_no_1", ":cur_slot", 0), (party_set_slot, ":center_no_1", ":cur_slot", ":center_no_2"), (assign, ":center_1_added", 1), (try_end), (try_begin), (eq, ":center_2_added", 0), (party_slot_eq, ":center_no_2", ":cur_slot", 0), (party_set_slot, ":center_no_2", ":cur_slot", ":center_no_1"), (assign, ":center_2_added", 1), (try_end), (try_end), (try_begin), (eq, ":center_1_added", 0), (str_store_party_name, s1, ":center_no_1"), (display_message, "@ERROR: More than 15 trade routes are given for {s1}."), (try_end), (try_begin), (eq, ":center_2_added", 0), (str_store_party_name, s1, ":center_no_2"), (display_message, "@ERROR: More than 15 trade routes are given for {s1}."), (try_end), ]), #script_center_change_trade_good_production # INPUT: # param1: center_no # param2: item_id # param3: production_rate (should be between -100 (for net consumption) and 100 (for net production) # param4: randomness (between 0-100) ("center_change_trade_good_production", [ (store_script_param, ":center_no", 1), (store_script_param, ":item_no", 2), (store_script_param, ":production_rate", 3), # (val_mul, ":production_rate", 5), (store_script_param, ":randomness", 4), (store_random_in_range, ":random_num", 0, ":randomness"), (store_random_in_range, ":random_sign", 0, 2), (try_begin), (eq, ":random_sign", 0), (val_add, ":production_rate", ":random_num"), (else_try), (val_sub, ":production_rate", ":random_num"), (try_end), (val_sub, ":item_no", trade_goods_begin), (val_add, ":item_no", slot_town_trade_good_productions_begin), (party_get_slot, ":old_production_rate", ":center_no", ":item_no"), (val_add, ":production_rate", ":old_production_rate"), (party_set_slot, ":center_no", ":item_no", ":production_rate"), ]), #script_average_trade_good_productions # INPUT: none ("average_trade_good_productions", [ (store_sub, ":item_to_slot", slot_town_trade_good_productions_begin, trade_goods_begin), # (store_sub, ":item_to_price_slot", slot_town_trade_good_prices_begin, trade_goods_begin), (try_for_range, ":center_no", towns_begin, towns_end), (this_or_next|is_between, ":center_no", towns_begin, towns_end), (is_between, ":center_no", villages_begin, villages_end), (try_for_range, ":other_center", centers_begin, centers_end), (this_or_next|is_between, ":center_no", towns_begin, towns_end), (is_between, ":center_no", villages_begin, villages_end), (neq, ":other_center", ":center_no"), (store_distance_to_party_from_party, ":cur_distance", ":center_no", ":other_center"), (lt, ":cur_distance", 110), (store_sub, ":dist_factor", 110, ":cur_distance"), (try_for_range, ":cur_good", trade_goods_begin, trade_goods_end), (store_add, ":cur_good_slot", ":cur_good", ":item_to_slot"), (party_get_slot, ":center_production", ":center_no", ":cur_good_slot"), (party_get_slot, ":other_center_production", ":other_center", ":cur_good_slot"), (store_sub, ":prod_dif", ":center_production", ":other_center_production"), (gt, ":prod_dif", 0), (store_mul, ":prod_dif_change", ":prod_dif", 1), ## (try_begin), ## (is_between, ":center_no", towns_begin, towns_end), ## (is_between, ":other_center", towns_begin, towns_end), ## (val_mul, ":cur_distance", 2), ## (try_end), (val_mul ,":prod_dif_change", ":dist_factor"), (val_div ,":prod_dif_change", 110), (val_add, ":other_center_production", ":prod_dif_change"), (party_set_slot, ":other_center", ":cur_good_slot", ":other_center_production"), (try_end), (try_end), (try_end), ]), #script_normalize_trade_good_productions # INPUT: none ("normalize_trade_good_productions", [ (store_sub, ":item_to_slot", slot_town_trade_good_productions_begin, trade_goods_begin), (try_for_range, ":cur_good", trade_goods_begin, trade_goods_end), (assign, ":total_production", 0), (assign, ":num_centers", 0), (store_add, ":cur_good_slot", ":cur_good", ":item_to_slot"), (try_for_range, ":center_no", centers_begin, centers_end), (val_add, ":num_centers", 1), (try_begin), (is_between, ":center_no", towns_begin, towns_end), #each town is weighted as 5 villages... (val_add, ":num_centers", 4), (try_end), (party_get_slot, ":center_production", ":center_no", ":cur_good_slot"), (val_add, ":total_production", ":center_production"), (try_end), (store_div, ":new_production_difference", ":total_production", ":num_centers"), (neq, ":new_production_difference", 0), (try_for_range, ":center_no", centers_begin, centers_end), (this_or_next|is_between, ":center_no", towns_begin, towns_end), (is_between, ":center_no", villages_begin, villages_end), (party_get_slot, ":center_production", ":center_no", ":cur_good_slot"), (val_sub, ":center_production", ":new_production_difference"), (party_set_slot, ":center_no", ":cur_good_slot", ":center_production"), (try_end), (try_end), ]), #script_update_trade_good_prices # INPUT: none ("update_trade_good_prices", [ (try_for_range, ":center_no", centers_begin, centers_end), (this_or_next|is_between, ":center_no", towns_begin, towns_end), (is_between, ":center_no", villages_begin, villages_end), (call_script, "script_update_trade_good_price_for_party", ":center_no"), (try_end), # (call_script, "script_update_trade_good_price_for_party", "p_zendar"), # (call_script, "script_update_trade_good_price_for_party", "p_salt_mine"), # (call_script, "script_update_trade_good_price_for_party", "p_four_ways_inn"), ]), #script_update_trade_good_price_for_party # INPUT: arg1 = party_no ("update_trade_good_price_for_party", [ (store_script_param, ":center_no", 1), (try_for_range, ":cur_good", trade_goods_begin, trade_goods_end), (store_sub, ":cur_good_slot", ":cur_good", trade_goods_begin), (val_add, ":cur_good_slot", slot_town_trade_good_productions_begin), (store_sub, ":cur_good_price_slot", ":cur_good", trade_goods_begin), (val_add, ":cur_good_price_slot", slot_town_trade_good_prices_begin), (party_get_slot, ":production", ":center_no", ":cur_good_slot"), (party_get_slot, ":cur_price", ":center_no", ":cur_good_price_slot"), (try_begin), (lt, ":production", 0), #demand is greater than supply (store_mul, ":change_factor", ":production", -3), #price will be increased by his factor (else_try), (store_mul, ":change_factor", ":production", 3), #price will be decreased by this factor (try_end), # (val_mul, ":change_factor", 2), (store_random_in_range, ":random_change", 0, ":change_factor"), (try_begin), (lt, ":production", 0), #demand is greater than supply (val_add, ":cur_price", ":random_change"), (else_try), (val_sub, ":cur_price", ":random_change"), (try_end), #Move price towards average by 2%... (store_sub, ":price_difference", ":cur_price", average_price_factor), (val_mul, ":price_difference", 97), (val_div, ":price_difference", 100), (store_add, ":new_price", average_price_factor, ":price_difference"), (val_clamp, ":new_price", minimum_price_factor, maximum_price_factor), (party_set_slot, ":center_no", ":cur_good_price_slot", ":new_price"), (try_end), ]), #script_do_merchant_town_trade # INPUT: arg1 = party_no (of the merchant), arg2 = center_no ("do_merchant_town_trade", [ (store_script_param_1, ":party_no"), (store_script_param_2, ":center_no"), (call_script, "script_do_party_center_trade", ":party_no", ":center_no", 20), #change prices by 20% (assign, ":total_change", reg0), #Adding the earnings to the wealth (maximum changed price is the earning) (val_div, ":total_change", 2), (str_store_party_name, s1, ":party_no"), (str_store_party_name, s2, ":center_no"), (assign, reg1, ":total_change"), ## (try_begin), ## (eq, "$cheat_mode", 1), ## (display_message, "@Merchant {s1} traded with {s2} and earned {reg1} denars."), ## (try_end), #Adding tax revenue to the center (party_get_slot, ":accumulated_tariffs", ":center_no", slot_center_accumulated_tariffs), (party_get_slot, ":prosperity", ":center_no", slot_town_prosperity), (store_add, ":tax_gain", ":prosperity", 10), (val_mul, ":tax_gain", ":total_change"), (val_div, ":tax_gain", 2200), #(10 + prosperity) / 110 * 5% of the merchant's revenue. (val_add, ":accumulated_tariffs", ":tax_gain"), (party_set_slot, ":center_no", slot_center_accumulated_tariffs, ":accumulated_tariffs"), # (try_begin), # (is_between, ":center_no", towns_begin, towns_end), # (party_get_slot, ":merchant",":center_no",slot_town_merchant), # (gt, ":merchant", 0), # (store_mul, ":merchant_profit", ":total_change", 1), # (val_div, ":merchant_profit", 2), # (troop_add_gold, ":merchant", ":merchant_profit"), # (try_end), #Adding 1 to center prosperity (try_begin), (store_random_in_range, ":rand", 0, 100), (lt, ":rand", 35), (call_script, "script_change_center_prosperity", ":center_no", 1), (try_end), ]), #script_party_calculate_regular_strength: # INPUT: # param1: Party-id ("party_calculate_regular_strength", [ (store_script_param_1, ":party"), #Party_id (assign, reg(0),0), (party_get_num_companion_stacks, ":num_stacks",":party"), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop",":party",":i_stack"), (neg|troop_is_hero, ":stack_troop"), (store_character_level, ":stack_strength", ":stack_troop"), (val_add, ":stack_strength", 12), (val_mul, ":stack_strength", ":stack_strength"), (val_div, ":stack_strength", 100), (party_stack_get_size, ":stack_size",":party",":i_stack"), (party_stack_get_num_wounded, ":num_wounded",":party",":i_stack"), (val_sub, ":stack_size", ":num_wounded"), (val_mul, ":stack_strength", ":stack_size"), (val_add,reg(0), ":stack_strength"), (try_end), ]), #script_party_calculate_strength: # INPUT: arg1 = party_id, arg2 = exclude leader # OUTPUT: reg0 = strength ("party_calculate_strength", [ (store_script_param_1, ":party"), #Party_id (store_script_param_2, ":exclude_leader"), #Party_id (assign, reg(0),0), (party_get_num_companion_stacks, ":num_stacks",":party"), (assign, ":first_stack", 0), (try_begin), (neq, ":exclude_leader", 0), (assign, ":first_stack", 1), (try_end), (try_for_range, ":i_stack", ":first_stack", ":num_stacks"), (party_stack_get_troop_id, ":stack_troop",":party",":i_stack"), (store_character_level, ":stack_strength", ":stack_troop"), (val_add, ":stack_strength", 12), (val_mul, ":stack_strength", ":stack_strength"), (val_div, ":stack_strength", 100), (try_begin), (neg|troop_is_hero, ":stack_troop"), (party_stack_get_size, ":stack_size",":party",":i_stack"), (party_stack_get_num_wounded, ":num_wounded",":party",":i_stack"), (val_sub, ":stack_size", ":num_wounded"), (val_mul, ":stack_strength", ":stack_size"), (else_try), (troop_is_wounded, ":stack_troop"), #hero... (assign,":stack_strength",0), (try_end), (val_add,reg(0), ":stack_strength"), (try_end), (party_set_slot, ":party", slot_party_cached_strength, reg(0)), ]), #script_loot_player_items: # INPUT: arg1 = enemy_party_no # Output: none ("loot_player_items", [ (store_script_param, ":enemy_party_no", 1), (troop_get_inventory_capacity, ":inv_cap", "trp_player"), (try_for_range, ":i_slot", 0, ":inv_cap"), (troop_get_inventory_slot, ":item_id", "trp_player", ":i_slot"), (ge, ":item_id", 0), (troop_get_inventory_slot_modifier, ":item_modifier", "trp_player", ":i_slot"), (try_begin), (is_between, ":item_id", trade_goods_begin, trade_goods_end), (assign, ":randomness", 20), (else_try), (is_between, ":item_id", horses_begin, horses_end), (assign, ":randomness", 15), (else_try), (this_or_next|is_between, ":item_id", weapons_begin, weapons_end), (is_between, ":item_id", ranged_weapons_begin, ranged_weapons_end), (assign, ":randomness", 5), (else_try), (this_or_next|is_between, ":item_id", armors_begin, armors_end), (is_between, ":item_id", shields_begin, shields_end), (assign, ":randomness", 5), (try_end), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", ":randomness"), (troop_remove_item, "trp_player", ":item_id"), (try_begin), (gt, ":enemy_party_no", 0), (party_get_slot, ":cur_loot_slot", ":enemy_party_no", slot_party_next_looted_item_slot), (val_add, ":cur_loot_slot", slot_party_looted_item_1), (party_set_slot, ":enemy_party_no", ":cur_loot_slot", ":item_id"), (val_sub, ":cur_loot_slot", slot_party_looted_item_1), (val_add, ":cur_loot_slot", slot_party_looted_item_1_modifier), (party_set_slot, ":enemy_party_no", ":cur_loot_slot", ":item_modifier"), (val_sub, ":cur_loot_slot", slot_party_looted_item_1_modifier), (val_add, ":cur_loot_slot", 1), (val_mod, ":cur_loot_slot", num_party_loot_slots), (party_set_slot, ":enemy_party_no", slot_party_next_looted_item_slot, ":cur_loot_slot"), (try_end), (try_end), (store_troop_gold, ":cur_gold", "trp_player"), (store_div, ":max_lost", ":cur_gold", 4), (store_div, ":min_lost", ":cur_gold", 10), (store_random_in_range, ":lost_gold", ":min_lost", ":max_lost"), (troop_remove_gold, "trp_player", ":lost_gold"), ]), #script_party_calculate_loot: # INPUT: # param1: Party-id # Returns num looted items in reg(0) ("party_calculate_loot", [ (store_script_param_1, ":enemy_party"), #Enemy Party_id (call_script, "script_calculate_main_party_shares"), (assign, ":num_player_party_shares", reg0), # (assign, ":num_ally_shares", reg1), # (store_add, ":num_shares", ":num_player_party_shares", ":num_ally_shares"), #Calculate player loot probability # (assign, ":loot_probability", 100), # (val_mul, ":loot_probability", 10), # (val_div, ":loot_probability", ":num_shares"), (try_for_range, ":i_loot", 0, num_party_loot_slots), (store_add, ":cur_loot_slot", ":i_loot", slot_party_looted_item_1), (party_get_slot, ":item_no", "$g_enemy_party", ":cur_loot_slot"), (gt, ":item_no", 0), (party_set_slot, "$g_enemy_party", ":cur_loot_slot", 0), (val_sub, ":cur_loot_slot", slot_party_looted_item_1), (val_add, ":cur_loot_slot", slot_party_looted_item_1_modifier), (party_get_slot, ":item_modifier", "$g_enemy_party", ":cur_loot_slot"), (troop_add_item, "trp_temp_troop", ":item_no", ":item_modifier"), (try_end), (party_set_slot, "$g_enemy_party", slot_party_next_looted_item_slot, 0), (assign, ":num_looted_items",0), (try_begin), (this_or_next|party_slot_eq, "$g_enemy_party", slot_party_type, spt_kingdom_caravan), (party_slot_eq, "$g_enemy_party", slot_party_type, spt_village_farmer), (store_mul, ":plunder_amount", player_loot_share, 30), (val_mul, ":plunder_amount", "$g_strength_contribution_of_player"), (val_div, ":plunder_amount", 100), (val_div, ":plunder_amount", ":num_player_party_shares"), (try_begin), (party_slot_eq, "$g_enemy_party", slot_party_type, spt_kingdom_caravan), # (val_clamp, ":plunder_amount", 1, 50), (reset_item_probabilities, 100), (assign, ":range_min", trade_goods_begin), (assign, ":range_max", trade_goods_end), (else_try), (val_div, ":plunder_amount", 5), # (val_clamp, ":plunder_amount", 1, 10), (reset_item_probabilities, 1), (assign, ":range_min", food_begin), (assign, ":range_max", food_end), (try_end), (store_sub, ":item_to_price_slot", slot_town_trade_good_prices_begin, trade_goods_begin), (try_for_range, ":cur_goods", ":range_min", ":range_max"), (store_add, ":cur_price_slot", ":cur_goods", ":item_to_price_slot"), (party_get_slot, ":cur_price", "$g_enemy_party", ":cur_price_slot"), (assign, ":cur_probability", 100), (val_mul, ":cur_probability", average_price_factor), (val_div, ":cur_probability", ":cur_price"), (val_mul, ":cur_probability", average_price_factor), (val_div, ":cur_probability", ":cur_price"), (val_mul, ":cur_probability", average_price_factor), (val_div, ":cur_probability", ":cur_price"), (assign, reg0, ":cur_probability"), (set_item_probability_in_merchandise, ":cur_goods", ":cur_probability"), (try_end), (troop_add_merchandise, "trp_temp_troop", itp_type_goods, ":plunder_amount"), (assign, reg5, ":plunder_amount"), (val_add, ":num_looted_items", ":plunder_amount"), (try_end), #Now loot the defeated party (store_mul, ":loot_probability", player_loot_share, 3), (val_mul, ":loot_probability", "$g_strength_contribution_of_player"), (party_get_skill_level, ":player_party_looting", "p_main_party", "skl_looting"), (val_add, ":player_party_looting", 10), (val_mul, ":loot_probability", ":player_party_looting"), (val_div, ":loot_probability", 10), (val_div, ":loot_probability", ":num_player_party_shares"), (party_get_num_companion_stacks, ":num_stacks",":enemy_party"), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop",":enemy_party",":i_stack"), (neg|troop_is_hero, ":stack_troop"), (party_stack_get_size, ":stack_size",":enemy_party",":i_stack"), (try_for_range, ":unused", 0, ":stack_size"), (troop_loot_troop,"trp_temp_troop",":stack_troop",":loot_probability"), (try_end), (try_end), (troop_get_inventory_capacity, ":inv_cap", "trp_temp_troop"), (try_for_range, ":i_slot", 0, ":inv_cap"), (troop_get_inventory_slot, ":item_id", "trp_temp_troop", ":i_slot"), (ge, ":item_id", 0), (val_add, ":num_looted_items",1), (try_end), (assign, reg0, ":num_looted_items"), ]), #script_calculate_main_party_shares: # INPUT: # Returns number of player party shares in reg0 ("calculate_main_party_shares", [ (assign, ":num_player_party_shares",player_loot_share), # Add shares for player's party (party_get_num_companion_stacks, ":num_stacks","p_main_party"), (try_for_range, ":i_stack", 1, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop","p_main_party",":i_stack"), (try_begin), (neg|troop_is_hero, ":stack_troop"), (party_stack_get_size, ":stack_size","p_main_party",":i_stack"), (val_add, ":num_player_party_shares", ":stack_size"), (else_try), (val_add, ":num_player_party_shares", hero_loot_share), (try_end), (try_end), (assign, reg0, ":num_player_party_shares"), ]), #script_party_give_xp_and_gold: # INPUT: # param1: destroyed Party-id # calculates and gives player paty's share of gold and xp. ("party_give_xp_and_gold", [ (store_script_param_1, ":enemy_party"), #Party_id (call_script, "script_calculate_main_party_shares"), (assign, ":num_player_party_shares", reg0), # (assign, ":num_ally_shares", reg1), # (store_add, ":num_total_shares", ":num_player_party_shares", ":num_ally_shares"), (assign, ":total_gain", 0), (party_get_num_companion_stacks, ":num_stacks",":enemy_party"), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop",":enemy_party",":i_stack"), (neg|troop_is_hero, ":stack_troop"), (party_stack_get_size, ":stack_size",":enemy_party",":i_stack"), (store_character_level, ":level", ":stack_troop"), (store_add, ":gain", ":level", 10), (val_mul, ":gain", ":gain"), (val_div, ":gain", 10), (store_mul, ":stack_gain", ":gain", ":stack_size"), (val_add, ":total_gain", ":stack_gain"), (try_end), (val_mul, ":total_gain", "$g_strength_contribution_of_player"), (val_div, ":total_gain", 100), (val_min, ":total_gain", 40000), #eliminate negative results # (store_mul, ":player_party_xp_gain", ":total_gain", ":num_player_party_shares"), # (val_div, ":player_party_xp_gain", ":num_total_shares"), (assign, ":player_party_xp_gain", ":total_gain"), (store_random_in_range, ":r", 50, 100), (val_mul, ":player_party_xp_gain", ":r"), (val_div, ":player_party_xp_gain", 100), (party_add_xp, "p_main_party", ":player_party_xp_gain"), (store_mul, ":player_gold_gain", ":total_gain", player_loot_share), (val_min, ":player_gold_gain", 60000), #eliminate negative results (store_random_in_range, ":r", 50, 100), (val_mul, ":player_gold_gain", ":r"), (val_div, ":player_gold_gain", 100), (val_div, ":player_gold_gain", ":num_player_party_shares"), #add gold now (party_get_num_companion_stacks, ":num_stacks","p_main_party"), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop","p_main_party",":i_stack"), (try_begin), (troop_is_hero, ":stack_troop"), (call_script, "script_troop_add_gold", ":stack_troop", ":player_gold_gain"), (try_end), (try_end), #Add morale (assign, ":morale_gain", ":total_gain"), (val_div, ":morale_gain", ":num_player_party_shares"), (call_script, "script_change_player_party_morale", ":morale_gain"), ]), #script_setup_troop_meeting: # INPUT: # param1: troop_id with which meeting will be made. # param2: troop_dna (optional) ("setup_troop_meeting", [ (store_script_param_1, ":meeting_troop"), (store_script_param_2, ":troop_dna"), (modify_visitors_at_site,"scn_conversation_scene"),(reset_visitors), (set_visitor,0,"trp_player"), # (party_stack_get_troop_dna,":troop_dna",":meeting_party",0), (set_visitor,17,":meeting_troop",":troop_dna"), (set_jump_mission,"mt_conversation_encounter"), (jump_to_scene,"scn_conversation_scene"), (change_screen_map_conversation, ":meeting_troop"), ]), #script_setup_party_meeting: # INPUT: # param1: Party-id with which meeting will be made. ("setup_party_meeting", [ (store_script_param_1, ":meeting_party"), (try_begin), (lt, "$g_encountered_party_relation", 0), #hostile # (call_script, "script_music_set_situation_with_culture", mtf_sit_encounter_hostile), (try_end), (modify_visitors_at_site,"scn_conversation_scene"),(reset_visitors), (set_visitor,0,"trp_player"), (party_stack_get_troop_id, ":meeting_troop",":meeting_party",0), (party_stack_get_troop_dna,":troop_dna",":meeting_party",0), (set_visitor,17,":meeting_troop",":troop_dna"), (set_jump_mission,"mt_conversation_encounter"), (jump_to_scene,"scn_conversation_scene"), (change_screen_map_conversation, ":meeting_troop"), ]), #script_party_remove_all_companions: # INPUT: # param1: Party-id from which companions will be removed. # "$g_move_heroes" : controls if heroes will also be removed. ("party_remove_all_companions", [ (store_script_param_1, ":party"), #Source Party_id (party_get_num_companion_stacks, ":num_companion_stacks",":party"), (try_for_range_backwards, ":stack_no", 0, ":num_companion_stacks"), (party_stack_get_troop_id, ":stack_troop",":party",":stack_no"), (this_or_next|neg|troop_is_hero, ":stack_troop"), (eq, "$g_move_heroes", 1), (party_stack_get_size, ":stack_size",":party",":stack_no"), (party_remove_members, ":party", ":stack_troop", ":stack_size"), (try_end), ]), #script_party_remove_all_prisoners: # INPUT: # param1: Party-id from which prisoners will be removed. # "$g_move_heroes" : controls if heroes will also be removed. ("party_remove_all_prisoners", [ (store_script_param_1, ":party"), #Source Party_id (party_get_num_prisoner_stacks, ":num_prisoner_stacks",":party"), (try_for_range_backwards, ":stack_no", 0, ":num_prisoner_stacks"), (party_prisoner_stack_get_troop_id, ":stack_troop",":party",":stack_no"), (this_or_next|neg|troop_is_hero, ":stack_troop"), (eq, "$g_move_heroes", 1), (party_prisoner_stack_get_size, ":stack_size",":party",":stack_no"), (party_remove_prisoners, ":party", ":stack_troop", ":stack_size"), (try_end), ]), #script_party_add_party_companions: # INPUT: # param1: Party-id to add the second part # param2: Party-id which will be added to the first one. # "$g_move_heroes" : controls if heroes will also be added. ("party_add_party_companions", [ (store_script_param_1, ":target_party"), #Target Party_id (store_script_param_2, ":source_party"), #Source Party_id (party_get_num_companion_stacks, ":num_stacks",":source_party"), (try_for_range, ":stack_no", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop",":source_party",":stack_no"), (this_or_next|neg|troop_is_hero, ":stack_troop"), (eq, "$g_move_heroes", 1), (party_stack_get_size, ":stack_size",":source_party",":stack_no"), (party_add_members, ":target_party", ":stack_troop", ":stack_size"), (party_stack_get_num_wounded, ":num_wounded", ":source_party", ":stack_no"), (party_wound_members, ":target_party", ":stack_troop", ":num_wounded"), (try_end), ]), #script_party_add_party_prisoners: # INPUT: # param1: Party-id to add the second party # param2: Party-id which will be added to the first one. # "$g_move_heroes" : controls if heroes will also be added. ("party_add_party_prisoners", [ (store_script_param_1, ":target_party"), #Target Party_id (store_script_param_2, ":source_party"), #Source Party_id (party_get_num_prisoner_stacks, ":num_stacks",":source_party"), (try_for_range, ":stack_no", 0, ":num_stacks"), (party_prisoner_stack_get_troop_id, ":stack_troop",":source_party",":stack_no"), (this_or_next|neg|troop_is_hero, ":stack_troop"), (eq, "$g_move_heroes", 1), (party_prisoner_stack_get_size, ":stack_size",":source_party",":stack_no"), (party_add_members, ":target_party", ":stack_troop", ":stack_size"), (try_end), ]), #script_party_prisoners_add_party_companions: # INPUT: # param1: Party-id to add the second part # param2: Party-id which will be added to the first one. # "$g_move_heroes" : controls if heroes will also be added. ("party_prisoners_add_party_companions", [ (store_script_param_1, ":target_party"), #Target Party_id (store_script_param_2, ":source_party"), #Source Party_id (party_get_num_companion_stacks, ":num_stacks",":source_party"), (try_for_range, ":stack_no", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop",":source_party",":stack_no"), (this_or_next|neg|troop_is_hero, ":stack_troop"), (eq, "$g_move_heroes", 1), (party_stack_get_size, ":stack_size",":source_party",":stack_no"), (party_add_prisoners, ":target_party", ":stack_troop", ":stack_size"), (try_end), ]), #script_party_prisoners_add_party_prisoners: # INPUT: # param1: Party-id to add the second part # param2: Party-id which will be added to the first one. # "$g_move_heroes" : controls if heroes will also be added. ("party_prisoners_add_party_prisoners", [ (store_script_param_1, ":target_party"), #Target Party_id (store_script_param_2, ":source_party"), #Source Party_id (party_get_num_prisoner_stacks, ":num_stacks",":source_party"), (try_for_range, ":stack_no", 0, ":num_stacks"), (party_prisoner_stack_get_troop_id, ":stack_troop",":source_party",":stack_no"), (this_or_next|neg|troop_is_hero, ":stack_troop"), (eq, "$g_move_heroes", 1), (party_prisoner_stack_get_size, ":stack_size",":source_party",":stack_no"), (party_add_prisoners, ":target_party", ":stack_troop", ":stack_size"), (try_end), ]), # script_party_add_party: # INPUT: # param1: Party-id to add the second part # param2: Party-id which will be added to the first one. # "$g_move_heroes" : controls if heroes will also be added. ("party_add_party", [ (store_script_param_1, ":target_party"), #Target Party_id (store_script_param_2, ":source_party"), #Source Party_id (call_script, "script_party_add_party_companions", ":target_party", ":source_party"), (call_script, "script_party_prisoners_add_party_prisoners", ":target_party", ":source_party"), ]), #script_party_copy: # INPUT: # param1: Party-id to copy the second party # param2: Party-id which will be copied to the first one. ("party_copy", [ (assign, "$g_move_heroes", 1), (store_script_param_1, ":target_party"), #Target Party_id (store_script_param_2, ":source_party"), #Source Party_id (party_clear, ":target_party"), (call_script, "script_party_add_party", ":target_party", ":source_party"), ]), #script_clear_party_group: # INPUT: # param1: Party-id of the root of the group. # This script will clear the root party and all parties attached to it recursively. ("clear_party_group", [ (store_script_param_1, ":root_party"), (party_clear, ":root_party"), (party_get_num_attached_parties, ":num_attached_parties", ":root_party"), (try_for_range, ":attached_party_rank", 0, ":num_attached_parties"), (party_get_attached_party_with_rank, ":attached_party", ":root_party", ":attached_party_rank"), (call_script, "script_clear_party_group", ":attached_party"), (try_end), ]), #script_get_nonempty_party_in_group: # INPUT: # param1: Party-id of the root of the group. # OUTPUT: reg0: nonempy party-id ("get_nonempty_party_in_group", [ (store_script_param_1, ":party_no"), (party_get_num_companion_stacks, ":num_companion_stacks", ":party_no"), (try_begin), (gt, ":num_companion_stacks", 0), (assign, reg0, ":party_no"), (else_try), (assign, reg0, -1), (party_get_num_attached_parties, ":num_attached_parties", ":party_no"), (try_for_range, ":attached_party_rank", 0, ":num_attached_parties"), (lt, reg0, 0), (party_get_attached_party_with_rank, ":attached_party", ":party_no", ":attached_party_rank"), (call_script, "script_get_nonempty_party_in_group", ":attached_party"), (try_end), (try_end), ]), #script_collect_prisoners_from_empty_parties: # INPUT: # param1: Party-id of the root of the group. # param2: Party to collect prisoners in. # make sure collection party is cleared before calling this. ("collect_prisoners_from_empty_parties", [ (store_script_param_1, ":party_no"), (store_script_param_2, ":collection_party"), (party_get_num_companions, ":num_companions", ":party_no"), (try_begin), (eq, ":num_companions", 0), #party is empty (has no companions). Collect its prisoners. (party_get_num_prisoner_stacks, ":num_stacks",":party_no"), (try_for_range, ":stack_no", 0, ":num_stacks"), (party_prisoner_stack_get_troop_id, ":stack_troop",":party_no",":stack_no"), (troop_is_hero, ":stack_troop"), (party_add_members, ":collection_party", ":stack_troop", 1), (try_end), (try_end), (party_get_num_attached_parties, ":num_attached_parties", ":party_no"), (try_for_range, ":attached_party_rank", 0, ":num_attached_parties"), (party_get_attached_party_with_rank, ":attached_party", ":party_no", ":attached_party_rank"), (call_script, "script_collect_prisoners_from_empty_parties", ":attached_party", ":collection_party"), (try_end), ]), #script_print_casualties_to_s0: # INPUT: # param1: Party_id, param2: 0 = use new line, 1 = use comma #OUTPUT: # string register 0. ("print_casualties_to_s0", [(store_script_param, ":party_no", 1), (store_script_param, ":use_comma", 2), (str_clear, s0), (assign, ":total_reported", 0), (assign, ":total_wounded", 0), (assign, ":total_killed", 0), (party_get_num_companion_stacks, ":num_stacks",":party_no"), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop",":party_no",":i_stack"), (party_stack_get_size, ":stack_size",":party_no",":i_stack"), (party_stack_get_num_wounded, ":num_wounded",":party_no",":i_stack"), (store_sub, ":num_killed", ":stack_size", ":num_wounded"), (val_add, ":total_killed", ":num_killed"), (val_add, ":total_wounded", ":num_wounded"), (try_begin), (this_or_next|gt, ":num_killed", 0), (gt, ":num_wounded", 0), (store_add, reg3, ":num_killed", ":num_wounded"), (str_store_troop_name_by_count, s1, ":stack_troop", reg3), (try_begin), (troop_is_hero, ":stack_troop"), (assign, reg3, 0), (try_end), (try_begin), (gt, ":num_killed", 0), (gt, ":num_wounded", 0), (assign, reg4, ":num_killed"), (assign, reg5, ":num_wounded"), (str_store_string, s2, "@{reg4} killed, {reg5} wounded"), (else_try), (gt, ":num_killed", 0), (str_store_string, s2, "@killed"), (else_try), (str_store_string, s2, "@wounded"), (try_end), (try_begin), (eq, ":use_comma", 1), (try_begin), (eq, ":total_reported", 0), (str_store_string, s0, "@{reg3?{reg3}:} {s1} ({s2})"), (else_try), (str_store_string, s0, "@{s0}, {reg3?{reg3}:} {s1} ({s2})"), (try_end), (else_try), (str_store_string, s0, "@{s0}^{reg3?{reg3}:} {s1} ({s2})"), (try_end), (val_add, ":total_reported", 1), (try_end), (try_end), (try_begin), (this_or_next|gt, ":total_killed", 0), (gt, ":total_wounded", 0), (store_add, reg3, ":total_killed", ":total_wounded"), (try_begin), (gt, ":total_killed", 0), (gt, ":total_wounded", 0), (assign, reg4, ":total_killed"), (assign, reg5, ":total_wounded"), (str_store_string, s2, "@{reg4} killed, {reg5} wounded"), (else_try), (gt, ":total_killed", 0), (str_store_string, s2, "@killed"), (else_try), (str_store_string, s2, "@wounded"), (try_end), (str_store_string, s0, "@{s0}^TOTAL: {reg3} ({s2})"), (else_try), (try_begin), (eq, ":use_comma", 1), (str_store_string, s0, "@None"), (else_try), (str_store_string, s0, "@^None"), (try_end), (try_end), ]), #script_write_fit_party_members_to_stack_selection # INPUT: # param1: party_no, exclude_leader #OUTPUT: # trp_stack_selection_amounts slots (slot 0 = number of stacks, 1 = number of men fit, 2..n = stack sizes (fit)) # trp_stack_selection_ids slots (2..n = stack troops) ("write_fit_party_members_to_stack_selection", [ (store_script_param, ":party_no", 1), (store_script_param, ":exclude_leader", 2), (party_get_num_companion_stacks, ":num_stacks", ":party_no"), (assign, ":slot_index", 2), (assign, ":total_fit", 0), (try_for_range, ":stack_index", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop", ":party_no", ":stack_index"), (assign, ":num_fit", 0), (try_begin), (troop_is_hero, ":stack_troop"), (try_begin), (neg|troop_is_wounded, ":stack_troop"), (this_or_next|eq, ":exclude_leader", 0), (neq, ":stack_index", 0), (assign, ":num_fit",1), (try_end), (else_try), (party_stack_get_size, ":num_fit", ":party_no", ":stack_index"), (party_stack_get_num_wounded, ":num_wounded", ":party_no", ":stack_index"), (val_sub, ":num_fit", ":num_wounded"), (try_end), (try_begin), (gt, ":num_fit", 0), (troop_set_slot, "trp_stack_selection_amounts", ":slot_index", ":num_fit"), (troop_set_slot, "trp_stack_selection_ids", ":slot_index", ":stack_troop"), (val_add, ":slot_index", 1), (try_end), (val_add, ":total_fit", ":num_fit"), (try_end), (val_sub, ":slot_index", 2), (troop_set_slot, "trp_stack_selection_amounts", 0, ":slot_index"), (troop_set_slot, "trp_stack_selection_amounts", 1, ":total_fit"), ]), #script_remove_fit_party_member_from_stack_selection # INPUT: # param1: slot_index #OUTPUT: # reg0 = troop_no # trp_stack_selection_amounts slots (slot 0 = number of stacks, 1 = number of men fit, 2..n = stack sizes (fit)) # trp_stack_selection_ids slots (2..n = stack troops) ("remove_fit_party_member_from_stack_selection", [ (store_script_param, ":slot_index", 1), (val_add, ":slot_index", 2), (troop_get_slot, ":amount", "trp_stack_selection_amounts", ":slot_index"), (troop_get_slot, ":troop_no", "trp_stack_selection_ids", ":slot_index"), (val_sub, ":amount", 1), (troop_set_slot, "trp_stack_selection_amounts", ":slot_index", ":amount"), (troop_get_slot, ":total_amount", "trp_stack_selection_amounts", 1), (val_sub, ":total_amount", 1), (troop_set_slot, "trp_stack_selection_amounts", 1, ":total_amount"), (try_begin), (le, ":amount", 0), (troop_get_slot, ":num_slots", "trp_stack_selection_amounts", 0), (store_add, ":end_cond", ":num_slots", 2), (store_add, ":begin_cond", ":slot_index", 1), (try_for_range, ":index", ":begin_cond", ":end_cond"), (store_sub, ":prev_index", ":index", 1), (troop_get_slot, ":value", "trp_stack_selection_amounts", ":index"), (troop_set_slot, "trp_stack_selection_amounts", ":prev_index", ":value"), (troop_get_slot, ":value", "trp_stack_selection_ids", ":index"), (troop_set_slot, "trp_stack_selection_ids", ":prev_index", ":value"), (try_end), (val_sub, ":num_slots", 1), (troop_set_slot, "trp_stack_selection_amounts", 0, ":num_slots"), (try_end), (assign, reg0, ":troop_no"), ]), #script_remove_random_fit_party_member_from_stack_selection # INPUT: # none #OUTPUT: # reg0 = troop_no # trp_stack_selection_amounts slots (slot 0 = number of stacks, 1 = number of men fit, 2..n = stack sizes (fit)) # trp_stack_selection_ids slots (2..n = stack troops) ("remove_random_fit_party_member_from_stack_selection", [ (troop_get_slot, ":total_amount", "trp_stack_selection_amounts", 1), (store_random_in_range, ":random_troop", 0, ":total_amount"), (troop_get_slot, ":num_slots", "trp_stack_selection_amounts", 0), (store_add, ":end_cond", ":num_slots", 2), (try_for_range, ":index", 2, ":end_cond"), (troop_get_slot, ":amount", "trp_stack_selection_amounts", ":index"), (val_sub, ":random_troop", ":amount"), (lt, ":random_troop", 0), (assign, ":end_cond", 0), (store_sub, ":slot_index", ":index", 2), (try_end), (call_script, "script_remove_fit_party_member_from_stack_selection", ":slot_index"), ]), #script_cf_training_ground_sub_routine_1_for_melee_details # INPUT: # value #OUTPUT: # none ("cf_training_ground_sub_routine_1_for_melee_details", [ (store_script_param, ":value", 1), (ge, "$temp_3", ":value"), (val_add, ":value", 1), (troop_get_slot, ":troop_id", "trp_stack_selection_ids", ":value"), (str_store_troop_name, s0, ":troop_id"), ]), #script_training_ground_sub_routine_2_for_melee_details # INPUT: # value #OUTPUT: # none ("training_ground_sub_routine_2_for_melee_details", [ (store_script_param, ":value", 1), (val_sub, ":value", 1), (try_begin), (lt, ":value", 0), (call_script, "script_remove_random_fit_party_member_from_stack_selection"), (else_try), (call_script, "script_remove_fit_party_member_from_stack_selection", ":value"), (try_end), (assign, ":troop_id", reg0), (store_sub, ":slot_index", "$temp_2", 1), (troop_set_slot, "trp_temp_array_a", ":slot_index", ":troop_id"), (try_begin), (eq, "$temp", "$temp_2"), (call_script, "script_start_training_at_training_ground", -1, "$temp"), (else_try), (val_add, "$temp_2", 1), (jump_to_menu, "mnu_training_ground_selection_details_melee_2"), (try_end), ]), #script_cf_training_ground_sub_routine_for_training_result # INPUT: # arg1: troop_id, arg2: stack_no, arg3: troop_count, arg4: xp_ratio_to_add #OUTPUT: # none ("cf_training_ground_sub_routine_for_training_result", [ (store_script_param, ":troop_id", 1), (store_script_param, ":stack_no", 2), (store_script_param, ":amount", 3), (store_script_param, ":xp_ratio_to_add", 4), (store_character_level, ":level", ":troop_id"), (store_add, ":level_added", ":level", 5), (store_mul, ":min_hardness", ":level_added", 3), (val_min, ":min_hardness", 100), (store_sub, ":hardness_dif", ":min_hardness", "$g_training_ground_training_hardness"), (val_max, ":hardness_dif", 0), (store_sub, ":hardness_dif", 100, ":hardness_dif"), (val_mul, ":hardness_dif", ":hardness_dif"), (val_div, ":hardness_dif", 10), # value over 1000 ## (assign, reg0, ":hardness_dif"), ## (display_message, "@Hardness difference: {reg0}/1000"), (store_mul, ":xp_ratio_to_add_for_stack", ":xp_ratio_to_add", ":hardness_dif"), (val_div, ":xp_ratio_to_add_for_stack", 1000), (try_begin), (eq, ":troop_id", "trp_player"), (val_mul, ":xp_ratio_to_add_for_stack", 1), (else_try), (try_begin), (eq, "$g_mt_mode", ctm_melee), (try_begin), (this_or_next|troop_is_guarantee_ranged, ":troop_id"), (troop_is_guarantee_horse, ":troop_id"), (val_div, ":xp_ratio_to_add_for_stack", 4), (try_end), (else_try), (eq, "$g_mt_mode", ctm_mounted), (try_begin), (neg|troop_is_guarantee_horse, ":troop_id"), (assign, ":xp_ratio_to_add_for_stack", 0), (try_end), (else_try), (neg|troop_is_guarantee_ranged, ":troop_id"), (assign, ":xp_ratio_to_add_for_stack", 0), (try_end), (try_end), (val_add, ":level", 1), (store_mul, ":xp_to_add", 100, ":level"), (val_mul, ":xp_to_add", ":amount"), (val_div, ":xp_to_add", 20), (val_mul, ":xp_to_add", ":xp_ratio_to_add_for_stack"), (val_div, ":xp_to_add", 1000), (store_mul, ":max_xp_to_add", ":xp_to_add", 3), (val_div, ":max_xp_to_add", 2), (store_div, ":min_xp_to_add", ":xp_to_add", 2), (store_random_in_range, ":random_xp_to_add", ":min_xp_to_add", ":max_xp_to_add"), (gt, ":random_xp_to_add", 0), (try_begin), (troop_is_hero, ":troop_id"), (add_xp_to_troop, ":random_xp_to_add", ":troop_id"), (store_div, ":proficiency_to_add", ":random_xp_to_add", 50), (try_begin), (gt, ":proficiency_to_add", 0), (troop_raise_proficiency, ":troop_id", "$g_training_ground_used_weapon_proficiency", ":proficiency_to_add"), (try_end), (else_try), (party_add_xp_to_stack, "p_main_party", ":stack_no", ":random_xp_to_add"), (try_end), (assign, reg0, ":random_xp_to_add"), ]), ## #script_cf_print_troop_name_with_stack_index_to_s0 ## # INPUT: ## # param1: stack_index ## ## #OUTPUT: ## # string register 0. ## ("cf_print_troop_name_with_stack_index_to_s0", ## [ ## (store_script_param_1, ":stack_index"), ## (party_get_num_companion_stacks, ":num_stacks", "p_main_party"), ## (lt, ":stack_index", ":num_stacks"), ## (party_stack_get_troop_id, ":stack_troop", "p_main_party", ":stack_index"), ## (str_store_troop_name, s0, ":stack_troop"), ## ]), #script_print_troop_owned_centers_in_numbers_to_s0 # INPUT: # param1: troop_no #OUTPUT: # string register 0. ("print_troop_owned_centers_in_numbers_to_s0", [ (store_script_param_1, ":troop_no"), (str_store_string, s0, "@nothing"), (assign, ":owned_towns", 0), (assign, ":owned_castles", 0), (assign, ":owned_villages", 0), (try_for_range_backwards, ":cur_center", centers_begin, centers_end), (party_slot_eq, ":cur_center", slot_town_lord, ":troop_no"), (try_begin), (party_slot_eq, ":cur_center", slot_party_type, spt_town), (val_add, ":owned_towns", 1), (else_try), (party_slot_eq, ":cur_center", slot_party_type, spt_castle), (val_add, ":owned_castles", 1), (else_try), (val_add, ":owned_villages", 1), (try_end), (try_end), (assign, ":num_types", 0), (try_begin), (gt, ":owned_villages", 0), (assign, reg0, ":owned_villages"), (store_sub, reg1, reg0, 1), (str_store_string, s0, "@{reg0} village{reg1?s:}"), (val_add, ":num_types", 1), (try_end), (try_begin), (gt, ":owned_castles", 0), (assign, reg0, ":owned_castles"), (store_sub, reg1, reg0, 1), (try_begin), (eq, ":num_types", 0), (str_store_string, s0, "@{reg0} castle{reg1?s:}"), (else_try), (str_store_string, s0, "@{reg0} castle{reg1?s:} and {s0}"), (try_end), (val_add, ":num_types", 1), (try_end), (try_begin), (gt, ":owned_towns", 0), (assign, reg0, ":owned_towns"), (store_sub, reg1, reg0, 1), (try_begin), (eq, ":num_types", 0), (str_store_string, s0, "@{reg0} town{reg1?s:}"), (else_try), (eq, ":num_types", 1), (str_store_string, s0, "@{reg0} town{reg1?s:} and {s0}"), (else_try), (str_store_string, s0, "@{reg0} town{reg1?s:}, {s0}"), (try_end), (try_end), (store_add, reg0, ":owned_villages", ":owned_castles"), (val_add, reg0, ":owned_towns"), ]), #script_get_random_melee_training_weapon # INPUT: none # OUTPUT: reg0 = weapon_1, reg1 = weapon_2 ("get_random_melee_training_weapon", [ (assign, ":weapon_1", -1), (assign, ":weapon_2", -1), (store_random_in_range, ":random_no", 0, 3), (try_begin), (eq, ":random_no", 0), (assign, ":weapon_1", "itm_practice_staff"), (else_try), (eq, ":random_no", 1), (assign, ":weapon_1", "itm_practice_sword"), (assign, ":weapon_2", "itm_practice_shield"), (else_try), (assign, ":weapon_1", "itm_heavy_practice_sword"), (try_end), (assign, reg0, ":weapon_1"), (assign, reg1, ":weapon_2"), ]), #script_start_training_at_training_ground # INPUT: # param1: training_weapon_type, param2: training_param ("start_training_at_training_ground", [ (val_add, "$g_training_ground_training_count", 1), (store_script_param, ":mission_weapon_type", 1), (store_script_param, ":training_param", 2), (assign, ":training_default_weapon_1", -1), (assign, ":training_default_weapon_2", -1), (assign, ":training_default_weapon_3", -1), (assign, "$scene_num_total_gourds_destroyed", 0), (try_begin), (eq, ":mission_weapon_type", itp_type_bow), (assign, "$g_training_ground_used_weapon_proficiency", wpt_archery), (assign, ":training_default_weapon_1", "itm_practice_bow"), (try_begin), (eq, "$g_mt_mode", ctm_mounted), (assign, ":training_default_weapon_2", "itm_practice_arrows_100_amount"), (else_try), (assign, ":training_default_weapon_2", "itm_practice_arrows_10_amount"), (try_end), (else_try), (eq, ":mission_weapon_type", itp_type_crossbow), (assign, "$g_training_ground_used_weapon_proficiency", wpt_crossbow), (assign, ":training_default_weapon_1", "itm_practice_crossbow"), (assign, ":training_default_weapon_2", "itm_practice_bolts_9_amount"), (else_try), (eq, ":mission_weapon_type", itp_type_thrown), (assign, "$g_training_ground_used_weapon_proficiency", wpt_throwing), (try_begin), (eq, "$g_mt_mode", ctm_mounted), (assign, ":training_default_weapon_2", "itm_practice_throwing_daggers_100_amount"), (else_try), (assign, ":training_default_weapon_2", "itm_practice_throwing_daggers"), (try_end), (else_try), (eq, ":mission_weapon_type", itp_type_one_handed_wpn), (assign, "$g_training_ground_used_weapon_proficiency", wpt_one_handed_weapon), (assign, ":training_default_weapon_1", "itm_practice_sword"), (else_try), (eq, ":mission_weapon_type", itp_type_polearm), (assign, "$g_training_ground_used_weapon_proficiency", wpt_polearm), (assign, ":training_default_weapon_1", "itm_practice_lance"), (else_try), #weapon_type comes as -1 when melee training is selected (assign, "$g_training_ground_used_weapon_proficiency", wpt_one_handed_weapon), (call_script, "script_get_random_melee_training_weapon"), (assign, ":training_default_weapon_1", reg0), (assign, ":training_default_weapon_2", reg1), (try_end), ## (assign, "$g_training_ground_training_troop_stack_index", ":stack_index"), (try_begin), (eq, "$g_mt_mode", ctm_mounted), (assign, ":training_default_weapon_3", "itm_practice_horse"), (store_add, "$g_training_ground_training_scene", "scn_training_ground_horse_track_1", "$g_encountered_party"), (val_sub, "$g_training_ground_training_scene", training_grounds_begin), (else_try), (store_add, "$g_training_ground_training_scene", "scn_training_ground_ranged_melee_1", "$g_encountered_party"), (val_sub, "$g_training_ground_training_scene", training_grounds_begin), (try_end), (modify_visitors_at_site, "$g_training_ground_training_scene"), (reset_visitors), (set_visitor, 0, "trp_player"), (assign, ":selected_weapon", -1), (try_for_range, ":cur_slot", 0, 4),#equipment slots (troop_get_inventory_slot, ":cur_item", "trp_player", ":cur_slot"), (ge, ":cur_item", 0), (item_get_type, ":item_type", ":cur_item"), (try_begin), (eq, ":item_type", ":mission_weapon_type"), (eq, ":selected_weapon", -1), (assign, ":selected_weapon", ":cur_item"), (try_end), (try_end), (mission_tpl_entry_clear_override_items, "mt_training_ground_training", 0), (mission_tpl_entry_add_override_item, "mt_training_ground_training", 0, "itm_practice_boots"), (try_begin), (ge, ":training_default_weapon_1", 0), (try_begin), (ge, ":selected_weapon", 0), (mission_tpl_entry_add_override_item, "mt_training_ground_training", 0, ":selected_weapon"), (else_try), (mission_tpl_entry_add_override_item, "mt_training_ground_training", 0, ":training_default_weapon_1"), (try_end), (try_end), (try_begin), (ge, ":training_default_weapon_2", 0), (mission_tpl_entry_add_override_item, "mt_training_ground_training", 0, ":training_default_weapon_2"), (try_end), (try_begin), (ge, ":training_default_weapon_3", 0), (mission_tpl_entry_add_override_item, "mt_training_ground_training", 0, ":training_default_weapon_3"), (try_end), (assign, ":cur_visitor_point", 5), (troop_get_slot, ":num_fit", "trp_stack_selection_amounts", 1), (store_add, ":end_cond", 5, ":num_fit"), (val_min, ":end_cond", 13), (try_for_range, ":cur_visitor_point", 5, ":end_cond"), (call_script, "script_remove_random_fit_party_member_from_stack_selection"), (set_visitor, ":cur_visitor_point", reg0), (val_add, ":cur_visitor_point", 1), (try_end), (try_begin), (eq, "$g_mt_mode", ctm_melee), (assign, ":total_difficulty", 0), (try_for_range, ":i", 0, ":training_param"), (troop_get_slot, ":cur_troop", "trp_temp_array_a", ":i"), (store_add, ":cur_entry_point", ":i", 1), (set_visitor, ":cur_entry_point", ":cur_troop"), (mission_tpl_entry_clear_override_items, "mt_training_ground_training", ":cur_entry_point"), (mission_tpl_entry_add_override_item, "mt_training_ground_training", ":cur_entry_point", "itm_practice_boots"), (call_script, "script_get_random_melee_training_weapon"), (mission_tpl_entry_add_override_item, "mt_training_ground_training", ":cur_entry_point", reg0), (try_begin), (ge, reg1, 0), (mission_tpl_entry_add_override_item, "mt_training_ground_training", ":cur_entry_point", reg1), (try_end), (store_character_level, ":cur_troop_level", ":cur_troop"), (val_add, ":cur_troop_level", 10), (val_mul, ":cur_troop_level", ":cur_troop_level"), (val_add, ":total_difficulty", ":cur_troop_level"), (try_end), (assign, "$g_training_ground_training_num_enemies", ":training_param"), (assign, "$g_training_ground_training_hardness", ":total_difficulty"), (store_add, ":number_multiplier", "$g_training_ground_training_num_enemies", 4), (val_mul, "$g_training_ground_training_hardness", ":number_multiplier"), (val_div, "$g_training_ground_training_hardness", 2400), (str_store_string, s0, "@Your opponents are ready for the fight."), (else_try), (eq, "$g_mt_mode", ctm_mounted), (try_begin), (eq, ":mission_weapon_type", itp_type_bow), (assign, "$g_training_ground_training_hardness", 350), (assign, "$g_training_ground_training_num_gourds_to_destroy", 30), (else_try), (eq, ":mission_weapon_type", itp_type_thrown), (assign, "$g_training_ground_training_hardness", 400), (assign, "$g_training_ground_training_num_gourds_to_destroy", 30), (else_try), (eq, ":mission_weapon_type", itp_type_one_handed_wpn), (assign, "$g_training_ground_training_hardness", 200), (assign, "$g_training_ground_training_num_gourds_to_destroy", 45), (else_try), (eq, ":mission_weapon_type", itp_type_polearm), (assign, "$g_training_ground_training_hardness", 280), (assign, "$g_training_ground_training_num_gourds_to_destroy", 35), (try_end), (str_store_string, s0, "@Try to destroy as many targets as you can. You have two and a half minutes to clear the track."), (else_try), (eq, "$g_mt_mode", ctm_ranged), (store_mul, "$g_training_ground_ranged_distance", ":training_param", 100), (assign, ":hardness_modifier", ":training_param"), (val_mul, ":hardness_modifier", ":hardness_modifier"), (try_begin), (eq, ":mission_weapon_type", itp_type_bow), (val_mul, ":hardness_modifier", 3), (val_div, ":hardness_modifier", 2), (else_try), (eq, ":mission_weapon_type", itp_type_thrown), (val_mul, ":hardness_modifier", 5), (val_div, ":hardness_modifier", 2), (val_mul, ":hardness_modifier", ":training_param"), (val_div, ":hardness_modifier", 2), (try_end), (store_mul, "$g_training_ground_training_hardness", 100, ":hardness_modifier"), (val_div, "$g_training_ground_training_hardness", 6000), (str_store_string, s0, "@Stay behind the line on the ground and shoot the targets. Try not to waste any shots."), (try_end), (jump_to_menu, "mnu_training_ground_description"), ]), #script_print_party_to_s0: # INPUT: # param1: Party-id #OUTPUT: # string register 0. ## ("print_party_to_s0", ## [ ## (store_script_param_1, ":party"), #Party_id ## (party_get_num_companion_stacks, ":num_stacks",":party"), ## (str_store_string, s50, "str_none"), ## (try_for_range, ":i_stack", 0, ":num_stacks"), ## (party_stack_get_troop_id, ":stack_troop",":party",":i_stack"), ## (party_stack_get_size, ":stack_size",":party",":i_stack"), ## (str_store_troop_name_by_count, s61, ":stack_troop", ":stack_size"), ## (try_begin), ## (troop_is_hero, ":stack_troop"), ## (str_store_string_reg, s51, s61), ## (else_try), ## (assign, reg60, ":stack_size"), ## (str_store_string, s63, "str_reg60_s61"), ## (try_end), ## (try_begin), ## (eq, ":i_stack", 0), ## (str_store_string_reg, s50, s51), ## (else_try), ## (str_store_string, s50, "str_s50_comma_s51"), ## (try_end), ## (try_end), ## (str_store_string_reg, s0, s50), ## ]), #script_party_count_fit_regulars: # Returns the number of unwounded regular companions in a party # INPUT: # param1: Party-id ("party_count_fit_regulars", [ (store_script_param_1, ":party"), #Party_id (party_get_num_companion_stacks, ":num_stacks",":party"), (assign, reg0, 0), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop",":party",":i_stack"), (neg|troop_is_hero, ":stack_troop"), (party_stack_get_size, ":stack_size",":party",":i_stack"), (party_stack_get_num_wounded, ":num_wounded",":party",":i_stack"), (val_sub, ":stack_size", ":num_wounded"), (val_add, reg0, ":stack_size"), (try_end), ]), #script_party_count_fit_for_battle: # Returns the number of unwounded companions in a party # INPUT: # param1: Party-id # OUTPUT: reg0 = result ("party_count_fit_for_battle", [ (store_script_param_1, ":party"), #Party_id (party_get_num_companion_stacks, ":num_stacks",":party"), (assign, reg0, 0), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop",":party",":i_stack"), (assign, ":num_fit",0), (try_begin), (troop_is_hero, ":stack_troop"), # (store_troop_health, ":troop_hp", ":stack_troop"), (try_begin), (neg|troop_is_wounded, ":stack_troop"), # (ge, ":troop_hp", 20), (assign, ":num_fit",1), (try_end), (else_try), (party_stack_get_size, ":num_fit",":party",":i_stack"), (party_stack_get_num_wounded, ":num_wounded",":party",":i_stack"), (val_sub, ":num_fit", ":num_wounded"), (try_end), (val_add, reg0, ":num_fit"), (try_end), ]), #script_party_count_members_with_full_health # Returns the number of unwounded regulars, and heroes other than player with 100% hitpoints in a party # INPUT: # param1: Party-id # OUTPUT: reg0 = result ("party_count_members_with_full_health", [ (store_script_param_1, ":party"), #Party_id (party_get_num_companion_stacks, ":num_stacks",":party"), (assign, reg0, 0), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop",":party",":i_stack"), (assign, ":num_fit",0), (try_begin), (troop_is_hero, ":stack_troop"), (neq, ":stack_troop", "trp_player"), (store_troop_health, ":troop_hp", ":stack_troop"), (try_begin), (ge, ":troop_hp", 80), (assign, ":num_fit",1), (try_end), (else_try), (party_stack_get_size, ":num_fit",":party",":i_stack"), (party_stack_get_num_wounded, ":num_wounded",":party",":i_stack"), (val_sub, ":num_fit", ":num_wounded"), (val_max, ":num_fit", 0), (try_end), (val_add, reg0, ":num_fit"), (try_end), ]), ## ("get_fit_stack_with_rank", ## [ ## (store_script_param_1, ":party"), #Party_id ## (store_script_param_2, ":rank"), #Rank ## (party_get_num_companion_stacks, ":num_stacks",":party"), ## (assign, reg0, -1), ## (assign, ":num_total", 0), ## (try_for_range, ":i_stack", 0, ":num_stacks"), ## (eq, reg(0), -1), #continue only if we haven't found the result yet. ## (party_stack_get_troop_id, ":stack_troop",":party",":i_stack"), ## (assign, ":num_fit",0), ## (try_begin), ## (troop_is_hero, ":stack_troop"), ## (store_troop_health, ":troop_hp", ":stack_troop"), ## (try_begin), ## (ge, ":troop_hp", 20), ## (assign, ":num_fit",1), ## (try_end), ## (else_try), ## (party_stack_get_size, ":num_fit",":party",":i_stack"), ## (party_stack_get_num_wounded, ":num_wounded",":party",":i_stack"), ## (val_sub, ":num_fit", ":num_wounded"), ## (try_end), ## (val_add, ":num_total", ":num_fit"), ## (try_begin), ## (lt, ":rank", ":num_total"), ## (assign, reg(0), ":i_stack"), ## (try_end), ## (try_end), ## ]), #script_get_stack_with_rank: # Returns the stack no, containing unwounded regular companions with rank rank. # INPUT: # param1: Party-id # param2: rank ("get_stack_with_rank", [ (store_script_param_1, ":party"), #Party_id (store_script_param_2, ":rank"), #Rank (party_get_num_companion_stacks, ":num_stacks",":party"), (assign, reg(0), -1), (assign, ":num_total", 0), (try_for_range, ":i_stack", 0, ":num_stacks"), (eq, reg(0), -1), #continue only if we haven't found the result yet. (party_stack_get_troop_id, ":stack_troop",":party",":i_stack"), (neg|troop_is_hero, ":stack_troop"), (party_stack_get_size, ":stack_size",":party",":i_stack"), (party_stack_get_num_wounded, ":num_wounded",":party",":i_stack"), (val_sub, ":stack_size", ":num_wounded"), (val_add, ":num_total", ":stack_size"), (try_begin), (lt, ":rank", ":num_total"), (assign, reg(0), ":i_stack"), (try_end), (try_end), ]), #script_inflict_casualties_to_party: # INPUT: # param1: Party-id # param2: number of rounds #OUTPUT: # This script doesn't return a value but populates the parties p_temp_wounded and p_temp_killed with the wounded and killed. #Example: # (script_inflict_casualties_to_party, "_p_main_party" ,50), # Simulate 50 rounds of casualties to main_party. ("inflict_casualties_to_party", [ (party_clear, "p_temp_casualties"), (store_script_param_1, ":party"), #Party_id (call_script, "script_party_count_fit_regulars", ":party"), (assign, ":num_fit", reg(0)), #reg(47) = number of fit regulars. (store_script_param_2, ":num_attack_rounds"), #number of attacks (try_for_range, ":unused", 0, ":num_attack_rounds"), (gt, ":num_fit", 0), (store_random_in_range, ":attacked_troop_rank", 0 , ":num_fit"), #attack troop with rank reg(46) (assign, reg1, ":attacked_troop_rank"), (call_script, "script_get_stack_with_rank", ":party", ":attacked_troop_rank"), (assign, ":attacked_stack", reg(0)), #reg(53) = stack no to attack. (party_stack_get_troop_id, ":attacked_troop",":party",":attacked_stack"), (store_character_level, ":troop_toughness", ":attacked_troop"), (val_add, ":troop_toughness", 5), #troop-toughness = level + 5 (assign, ":casualty_chance", 10000), (val_div, ":casualty_chance", ":troop_toughness"), #dying chance (try_begin), (store_random_in_range, ":rand_num", 0 ,10000), (lt, ":rand_num", ":casualty_chance"), #check chance to be a casualty (store_random_in_range, ":rand_num2", 0, 2), #check if this troop will be wounded or killed (try_begin), (troop_is_hero,":attacked_troop"), #currently troop can't be a hero, but no harm in keeping this. (store_troop_health, ":troop_hp",":attacked_troop"), (val_sub, ":troop_hp", 45), (val_max, ":troop_hp", 1), (troop_set_health, ":attacked_troop", ":troop_hp"), (else_try), (lt, ":rand_num2", 1), #wounded (party_add_members, "p_temp_casualties", ":attacked_troop", 1), (party_wound_members, "p_temp_casualties", ":attacked_troop", 1), (party_wound_members, ":party", ":attacked_troop", 1), (else_try), #killed (party_add_members, "p_temp_casualties", ":attacked_troop", 1), (party_remove_members, ":party", ":attacked_troop", 1), (try_end), (val_sub, ":num_fit", 1), #adjust number of fit regulars. (try_end), (try_end), ]), #script_move_members_with_ratio: # INPUT: # param1: Source Party-id # param2: Target Party-id # pin_number = ratio of members to move, multiplied by 1000 #OUTPUT: # This script doesn't return a value but moves some of the members of source party to target party according to the given ratio. ("move_members_with_ratio", [ (store_script_param_1, ":source_party"), #Source Party_id (store_script_param_2, ":target_party"), #Target Party_id (party_get_num_prisoner_stacks, ":num_stacks",":source_party"), (try_for_range_backwards, ":stack_no", 0, ":num_stacks"), (party_prisoner_stack_get_troop_id, ":stack_troop",":source_party",":stack_no"), (party_prisoner_stack_get_size, ":stack_size",":source_party",":stack_no"), (store_mul, ":number_to_move",":stack_size","$pin_number"), (val_div, ":number_to_move", 1000), (party_remove_prisoners, ":source_party", ":stack_troop", ":number_to_move"), (assign, ":number_moved", reg0), (party_add_prisoners, ":target_party", ":stack_troop", ":number_moved"), (try_end), (party_get_num_companion_stacks, ":num_stacks",":source_party"), (try_for_range_backwards, ":stack_no", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop",":source_party",":stack_no"), (party_stack_get_size, ":stack_size",":source_party",":stack_no"), (store_mul, ":number_to_move",":stack_size","$pin_number"), (val_div, ":number_to_move", 1000), (party_remove_members, ":source_party", ":stack_troop", ":number_to_move"), (assign, ":number_moved", reg0), (party_add_members, ":target_party", ":stack_troop", ":number_moved"), (try_end), ]), # script_count_parties_of_faction_and_party_type: # counts number of active parties with a template and faction. # Input: arg1 = faction_no, arg2 = party_type # Output: reg0 = count ("count_parties_of_faction_and_party_type", [ (store_script_param_1, ":faction_no"), (store_script_param_2, ":party_type"), (assign, reg0, 0), (try_for_parties, ":party_no"), (party_is_active, ":party_no"), (party_get_slot, ":cur_party_type", ":party_no", slot_party_type), (store_faction_of_party, ":cur_faction", ":party_no"), (eq, ":cur_party_type", ":party_type"), (eq, ":cur_faction", ":faction_no"), (val_add, reg0, 1), (try_end), ]), # script_faction_get_number_of_armies # Input: arg1 = faction_no # Output: reg0 = number_of_armies ("faction_get_number_of_armies", [ (store_script_param_1, ":faction_no"), (assign, ":num_armies", 0), (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (store_troop_faction, ":hero_faction_no", ":troop_no"), (eq, ":hero_faction_no", ":faction_no"), (troop_get_slot, ":hero_party", ":troop_no", slot_troop_leaded_party), (ge, ":hero_party", 0), (call_script, "script_party_count_fit_regulars", ":hero_party"), (assign, ":party_size", reg0), (call_script, "script_party_get_ideal_size", ":hero_party"), (assign, ":ideal_size", reg0), (val_mul, ":ideal_size", 60), (val_div, ":ideal_size", 100), (gt, ":party_size", ":ideal_size"), (val_add, ":num_armies", 1), (try_end), (assign, reg0, ":num_armies"), ]), # script_faction_recalculate_strength # Input: arg1 = faction_no # Output: reg0 = strength ("faction_recalculate_strength", [ (store_script_param_1, ":faction_no"), (call_script, "script_faction_get_number_of_armies", ":faction_no"), (assign, ":num_armies", reg0), (assign, ":num_castles", 0), (assign, ":num_towns", 0), (try_for_range, ":center_no", centers_begin, centers_end), (store_faction_of_party, ":center_faction", ":center_no"), (eq, ":center_faction", ":faction_no"), (try_begin), (party_slot_eq, ":center_no", slot_party_type, spt_castle), (val_add, ":num_castles", 1), (else_try), (party_slot_eq, ":center_no", slot_party_type, spt_town), (val_add, ":num_towns", 1), (try_end), (try_end), (faction_set_slot, ":faction_no", slot_faction_num_armies, ":num_armies"), (faction_set_slot, ":faction_no", slot_faction_num_castles, ":num_castles"), (faction_set_slot, ":faction_no", slot_faction_num_towns, ":num_towns"), ]), #script_select_random_town: # This script selects a random town in range [towns_begin, towns_end) # INPUTS: # none #OUTPUT: # reg0: id of the selected random town ## ("select_random_town", ## [ ## (assign, ":num_towns", towns_end), ## (val_sub,":num_towns", towns_begin), ## (store_random, ":random_town", ":num_towns"), ## (val_add,":random_town", towns_begin), ## (assign, reg0, ":random_town"), ## ]), # ("select_random_spawn_point", # [ # (assign, reg(20), spawn_points_end), # (val_sub,reg(20), spawn_points_begin), # (store_random, reg(21), reg(20)), # (val_add,reg(21), spawn_points_begin), # (assign, "$pout_town", reg(21)), # ]), #script_cf_select_random_town_with_faction: # This script selects a random town in range [towns_begin, towns_end) # such that faction of the town is equal to given_faction # INPUT: # arg1 = faction_no #OUTPUT: # This script may return false if there is no matching town. # reg0 = town_no ("cf_select_random_town_with_faction", [ (store_script_param_1, ":faction_no"), (assign, ":result", -1), # First count num matching spawn points (assign, ":no_towns", 0), (try_for_range,":cur_town", towns_begin, towns_end), (store_faction_of_party, ":cur_faction", ":cur_town"), (eq, ":cur_faction", ":faction_no"), (val_add, ":no_towns", 1), (try_end), (gt, ":no_towns", 0), #Fail if there are no towns (store_random_in_range, ":random_town", 0, ":no_towns"), (assign, ":no_towns", 0), (try_for_range,":cur_town", towns_begin, towns_end), (eq, ":result", -1), (store_faction_of_party, ":cur_faction", ":cur_town"), (eq, ":cur_faction", ":faction_no"), (val_add, ":no_towns", 1), (gt, ":no_towns", ":random_town"), (assign, ":result", ":cur_town"), (try_end), (assign, reg0, ":result"), ]), #script_cf_select_random_village_with_faction: # This script selects a random village in range [villages_begin, villages_end) # such that faction of the village is equal to given_faction # INPUT: # arg1 = faction_no #OUTPUT: # This script may return false if there is no matching village. # reg0 = village_no ("cf_select_random_village_with_faction", [ (store_script_param_1, ":faction_no"), (assign, ":result", -1), # First count num matching spawn points (assign, ":no_villages", 0), (try_for_range,":cur_village", villages_begin, villages_end), (store_faction_of_party, ":cur_faction", ":cur_village"), (eq, ":cur_faction", ":faction_no"), (val_add, ":no_villages", 1), (try_end), (gt, ":no_villages", 0), #Fail if there are no villages (store_random_in_range, ":random_village", 0, ":no_villages"), (assign, ":no_villages", 0), (try_for_range,":cur_village", villages_begin, villages_end), (eq, ":result", -1), (store_faction_of_party, ":cur_faction", ":cur_village"), (eq, ":cur_faction", ":faction_no"), (val_add, ":no_villages", 1), (gt, ":no_villages", ":random_village"), (assign, ":result", ":cur_village"), (try_end), (assign, reg0, ":result"), ]), #script_cf_select_random_walled_center_with_faction: # This script selects a random center in range [centers_begin, centers_end) # such that faction of the town is equal to given_faction # INPUT: # arg1 = faction_no # arg2 = preferred_center_no #OUTPUT: # This script may return false if there is no matching town. # reg0 = town_no (Can fail) ("cf_select_random_walled_center_with_faction", [ (store_script_param, ":faction_no", 1), (store_script_param, ":preferred_center_no", 2), (assign, ":result", -1), # First count num matching spawn points (assign, ":no_centers", 0), (try_for_range,":cur_center", walled_centers_begin, walled_centers_end), (store_faction_of_party, ":cur_faction", ":cur_center"), (eq, ":cur_faction", ":faction_no"), (val_add, ":no_centers", 1), (eq, ":cur_center", ":preferred_center_no"), (val_add, ":no_centers", 99), (try_end), (gt, ":no_centers", 0), #Fail if there are no centers (store_random_in_range, ":random_center", 0, ":no_centers"), (try_for_range,":cur_center", walled_centers_begin, walled_centers_end), (eq, ":result", -1), (store_faction_of_party, ":cur_faction", ":cur_center"), (eq, ":cur_faction", ":faction_no"), (val_sub, ":random_center", 1), (try_begin), (eq, ":cur_center", ":preferred_center_no"), (val_sub, ":random_center", 99), (try_end), (lt, ":random_center", 0), (assign, ":result", ":cur_center"), (try_end), (assign, reg0, ":result"), ]), #script_cf_select_random_walled_center_with_faction_and_owner_priority_no_siege: # INPUT: # arg1 = faction_no # arg2 = owner_troop_no #OUTPUT: # This script may return false if there is no matching town. # reg0 = center_no (Can fail) ("cf_select_random_walled_center_with_faction_and_owner_priority_no_siege", [ (store_script_param, ":faction_no", 1), (store_script_param, ":troop_no", 2), (assign, ":result", -1), (assign, ":no_centers", 0), (try_for_range,":cur_center", walled_centers_begin, walled_centers_end), (store_faction_of_party, ":cur_faction", ":cur_center"), (eq, ":cur_faction", ":faction_no"), (party_slot_eq, ":cur_center", slot_center_is_besieged_by, -1), (val_add, ":no_centers", 1), (party_slot_eq, ":cur_center", slot_town_lord, ":troop_no"), (val_add, ":no_centers", 1000), (try_end), (gt, ":no_centers", 0), #Fail if there are no centers (store_random_in_range, ":random_center", 0, ":no_centers"), (try_for_range,":cur_center", walled_centers_begin, walled_centers_end), (eq, ":result", -1), (store_faction_of_party, ":cur_faction", ":cur_center"), (eq, ":cur_faction", ":faction_no"), (party_slot_eq, ":cur_center", slot_center_is_besieged_by, -1), (val_sub, ":random_center", 1), (try_begin), (party_slot_eq, ":cur_center", slot_town_lord, ":troop_no"), (val_sub, ":random_center", 1000), (try_end), (lt, ":random_center", 0), (assign, ":result", ":cur_center"), (try_end), (assign, reg0, ":result"), ]), #script_cf_select_random_walled_center_with_faction_and_less_strength_priority: # This script selects a random center in range [centers_begin, centers_end) # such that faction of the town is equal to given_faction # INPUT: # arg1 = faction_no # arg2 = preferred_center_no #OUTPUT: # This script may return false if there is no matching town. # reg0 = town_no (Can fail) ("cf_select_random_walled_center_with_faction_and_less_strength_priority", [ (store_script_param, ":faction_no", 1), (store_script_param, ":preferred_center_no", 2), (assign, ":result", -1), # First count num matching spawn points (assign, ":no_centers", 0), (try_for_range, ":cur_center", walled_centers_begin, walled_centers_end), (store_faction_of_party, ":cur_faction", ":cur_center"), (eq, ":cur_faction", ":faction_no"), (party_slot_eq, ":cur_center", slot_center_is_besieged_by, -1), (val_add, ":no_centers", 1), (try_begin), (eq, ":cur_center", ":preferred_center_no"), (val_add, ":no_centers", 99), (try_end), ## (call_script, "script_party_calculate_regular_strength", ":cur_center"), ## (assign, ":strength", reg0), ## (lt, ":strength", 80), ## (store_sub, ":strength", 100, ":strength"), ## (val_div, ":strength", 20), ## (val_add, ":no_centers", ":strength"), (try_end), (gt, ":no_centers", 0), #Fail if there are no centers (store_random_in_range, ":random_center", 0, ":no_centers"), (try_for_range, ":cur_center", walled_centers_begin, walled_centers_end), (eq, ":result", -1), (store_faction_of_party, ":cur_faction", ":cur_center"), (eq, ":cur_faction", ":faction_no"), (party_slot_eq, ":cur_center", slot_center_is_besieged_by, -1), (val_sub, ":random_center", 1), (try_begin), (eq, ":cur_center", ":preferred_center_no"), (val_sub, ":random_center", 99), (try_end), ## (try_begin), ## (call_script, "script_party_calculate_regular_strength", ":cur_center"), ## (assign, ":strength", reg0), ## (lt, ":strength", 80), ## (store_sub, ":strength", 100, ":strength"), ## (val_div, ":strength", 20), ## (val_sub, ":random_center", ":strength"), ## (try_end), (lt, ":random_center", 0), (assign, ":result", ":cur_center"), (try_end), (assign, reg0, ":result"), ]), #script_cf_select_random_town_at_peace_with_faction: # This script selects a random town in range [towns_begin, towns_end) # such that faction of the town is friendly to given_faction # INPUT: # arg1 = faction_no #OUTPUT: # This script may return false if there is no matching town. # reg0 = town_no ("cf_select_random_town_at_peace_with_faction", [ (store_script_param_1, ":faction_no"), (assign, ":result", -1), # First count num matching towns (assign, ":no_towns", 0), (try_for_range,":cur_town", towns_begin, towns_end), (store_faction_of_party, ":cur_faction", ":cur_town"), (store_relation,":reln", ":cur_faction", ":faction_no"), (ge, ":reln", 0), (val_add, ":no_towns", 1), (try_end), (gt, ":no_towns", 0), #Fail if there are no towns (store_random_in_range, ":random_town", 0, ":no_towns"), (assign, ":no_towns", 0), (try_for_range,":cur_town", towns_begin, towns_end), (eq, ":result", -1), (store_faction_of_party, ":cur_faction", ":cur_town"), (store_relation,":reln", ":cur_faction", ":faction_no"), (ge, ":reln", 0), (val_add, ":no_towns", 1), (gt, ":no_towns", ":random_town"), (assign, ":result", ":cur_town"), (try_end), (assign, reg0, ":result"), ]), #script_cf_select_random_town_at_peace_with_faction_in_trade_route # INPUT: # arg1 = town_no # arg2 = faction_no #OUTPUT: # This script may return false if there is no matching town. # reg0 = town_no ("cf_select_random_town_at_peace_with_faction_in_trade_route", [ (store_script_param, ":town_no", 1), (store_script_param, ":faction_no", 2), (assign, ":result", -1), (assign, ":no_towns", 0), (try_for_range, ":cur_slot", slot_town_trade_routes_begin, slot_town_trade_routes_end), (party_get_slot, ":cur_town", ":town_no", ":cur_slot"), (gt, ":cur_town", 0), (store_faction_of_party, ":cur_faction", ":cur_town"), (store_relation, ":reln", ":cur_faction", ":faction_no"), (ge, ":reln", 0), (val_add, ":no_towns", 1), (try_end), (gt, ":no_towns", 0), #Fail if there are no towns (store_random_in_range, ":random_town", 0, ":no_towns"), (try_for_range, ":cur_slot", slot_town_trade_routes_begin, slot_town_trade_routes_end), (eq, ":result", -1), (party_get_slot, ":cur_town", ":town_no", ":cur_slot"), (gt, ":cur_town", 0), (store_faction_of_party, ":cur_faction", ":cur_town"), (store_relation, ":reln", ":cur_faction", ":faction_no"), (ge, ":reln", 0), (val_sub, ":random_town", 1), (lt, ":random_town", 0), (assign, ":result", ":cur_town"), (try_end), (assign, reg0, ":result"), ]), ## ("cf_select_faction_spawn_point", ## [ ## # First count num matching spawn points ## (assign, reg(24), 0), ## (try_for_range,reg(25), spawn_points_begin, spawn_points_end), ## (store_faction_of_party, reg(23), reg(25)), ## (eq, reg(23), "$pin_faction"), ## (val_add, reg(24), 1), ## (end_try,0), ## # reg4 now holds num towns of this faction. ## (gt, reg(24), 0), #Fail if there are no towns ## (store_random, reg(26), reg(24)), ## ## (assign, reg(24), 0), # reg24 = num points of this faction. ## (try_for_range,reg(25), spawn_points_begin, spawn_points_end), ## (store_faction_of_party, reg(23), reg(25)), ## (eq, reg(23), "$pin_faction"), ## (try_begin,0), ## (eq, reg(24), reg(26)), ## (assign, "$pout_town", reg(25)), # result is this town ## (end_try,0), ## (val_add, reg(24), 1), ## (end_try,0), ## ]), #script_spawn_party_at_random_town: # This script selects a random town in range [towns_begin, towns_end) # such that faction of the town is equal to given_faction # and spawns a new party there. # INPUT: # $pin_faction: given_faction # $pin_party_template: given_party_template #OUTPUT: # This script may return false if party cannot be spawned. # $pout_party: id of the spawned party ## ("spawn_party_at_random_town", ## [ ## (call_script,"script_select_random_spawn_point"), ## (set_spawn_radius,1), ## (spawn_around_party,"$pout_town","$pin_party_template"), ## (assign, "$pout_party", reg(0)), ## ]), #script_cf_spawn_party_at_faction_town: # This script selects a random town in range [towns_begin, towns_end) # such that faction of the town is equal to given_faction # and spawns a new party there. # INPUT: # $pin_faction: given_faction # $pin_party_template: given_party_template #OUTPUT: # This script may return false if party cannot be spawned. # $pout_party: id of the spawned party ## ("cf_spawn_party_at_faction_town", ## [ ## (call_script,"script_cf_select_faction_spawn_point"), ## (set_spawn_radius,1), ## (spawn_around_party,"$pout_town","$pin_party_template"), ## (assign, "$pout_party", reg(0)), ## ]), #script_spawn_party_at_random_town_if_below_limit: # This script checks if number of parties # of specified template is less than limit, # If so, it selects a random town in range [towns_begin, towns_end) # and spawns a new party there. # INPUT: # $pin_party_template: given_party_template # $pin_limit: limit value #OUTPUT: # $pout_party: id of the spawned party # $pout_town: id of the selected faction town # Note: # This script may return false if number of parties # of specified template is greater or equal to limit, # or if party cannot be spawned. ## ("cf_spawn_party_at_random_town_if_below_limit", ## [ ## (store_num_parties_of_template, reg(22), "$pin_party_template"), ## (lt,reg(22),"$pin_limit"), #check if we are below limit. ## (call_script,"script_select_random_spawn_point"), ## (set_spawn_radius,1), ## (spawn_around_party,"$pout_town","$pin_party_template"), ## (assign, "$pout_party", reg(0)), ## ]), ## #script_spawn_party_at_faction_town_if_below_limit: ## # This script checks if number of parties ## # of specified template is less than limit, ## # If so, it selects a random town in range [towns_begin, towns_end) ## # such that faction of the town is equal to given_faction ## # and spawns a new party there. ## # INPUT: ## # $pin_faction: given_faction ## # $pin_party_template: given_party_template ## # $pin_limit: limit value ## ## #OUTPUT: ## # $pout_party: id of the spawned party ## # $pout_town: id of the selected faction town ## # Note: ## # This script may return false if number of parties ## # of specified template is greater or equal to limit, ## # or if party cannot be spawned. ## ("cf_spawn_party_at_faction_town_if_below_limit", ## [ ## (store_num_parties_of_template, reg(22), "$pin_party_template"), ## (lt,reg(22),"$pin_limit"), #check if we are below limit. ## (call_script,"script_cf_select_faction_spawn_point"), ## (set_spawn_radius,1), ## (spawn_around_party,"$pout_town","$pin_party_template"), ## (assign, "$pout_party", reg(0)), ## ]), # script_shuffle_troop_slots: # Shuffles a range of slots of a given troop. # Used for exploiting a troop as an array. # Input: arg1 = troop_no, arg2 = slot_begin, arg3 = slot_end ("shuffle_troop_slots", [ (store_script_param, ":troop_no", 1), (store_script_param, ":slots_begin", 2), (store_script_param, ":slots_end", 3), (try_for_range, ":cur_slot_no", ":slots_begin", ":slots_end"), (store_random_in_range, ":random_slot_no", ":slots_begin", ":slots_end"), #reg(58) = random slot. Now exchange slots reg(57) and reg(58) (troop_get_slot, ":cur_slot_value", ":troop_no", ":cur_slot_no"), #temporarily store the value in slot reg(57) in reg(59) (troop_get_slot, ":random_slot_value", ":troop_no", ":random_slot_no"), #temporarily store the value in slot reg(58) in reg(60) (troop_set_slot, ":troop_no", ":cur_slot_no", ":random_slot_value"), # Now exchange the two... (troop_set_slot, ":troop_no", ":random_slot_no", ":cur_slot_value"), (try_end), ]), # script_get_random_quest # Input: arg1 = troop_no (of the troop in conversation), arg2 = min_importance (of the quest) # Output: reg0 = quest_no (the slots of the quest will be filled after calling this script) ("get_random_quest", [ (store_script_param_1, ":giver_troop"), (store_character_level, ":player_level", "trp_player"), (store_troop_faction, ":giver_faction_no", ":giver_troop"), (troop_get_slot, ":giver_party_no", ":giver_troop", slot_troop_leaded_party), (troop_get_slot, ":giver_reputation", ":giver_troop", slot_lord_reputation_type), (assign, ":giver_center_no", -1), (try_begin), (gt, ":giver_party_no", 0), (party_get_attached_to, ":giver_center_no", ":giver_party_no"), (else_try), (is_between, "$g_encountered_party", centers_begin, centers_end), (assign, ":giver_center_no", "$g_encountered_party"), (try_end), (try_begin), (troop_slot_eq, ":giver_troop", slot_troop_occupation, slto_kingdom_hero), (try_begin), (ge, "$g_talk_troop_faction_relation", 0), (assign, ":quests_begin", lord_quests_begin), (assign, ":quests_end", lord_quests_end), (else_try), (assign, ":quests_begin", enemy_lord_quests_begin), (assign, ":quests_end", enemy_lord_quests_end), (try_end), (else_try), (is_between, ":giver_troop", village_elders_begin, village_elders_end), (assign, ":quests_begin", village_elder_quests_begin), (assign, ":quests_end", village_elder_quests_end), (else_try), (is_between, ":giver_troop", mayors_begin, mayors_end), (assign, ":quests_begin", mayor_quests_begin), (assign, ":quests_end", mayor_quests_end), (else_try), (assign, ":quests_begin", lady_quests_begin), (assign, ":quests_end", lady_quests_end), (try_end), (assign, ":result", -1), (try_for_range, ":unused", 0, 20), #Repeat trial twenty times (eq, ":result", -1), (assign, ":quest_target_troop", -1), (assign, ":quest_target_center", -1), (assign, ":quest_target_faction", -1), (assign, ":quest_object_faction", -1), (assign, ":quest_object_troop", -1), (assign, ":quest_object_center", -1), (assign, ":quest_target_party", -1), (assign, ":quest_target_party_template", -1), (assign, ":quest_target_amount", -1), (assign, ":quest_target_dna", -1), (assign, ":quest_target_item", -1), (assign, ":quest_importance", 1), (assign, ":quest_xp_reward", 0), (assign, ":quest_gold_reward", 0), (assign, ":quest_convince_value", 0), (assign, ":quest_expiration_days", 0), (assign, ":quest_dont_give_again_period", 0), (store_random_in_range, ":quest_no", ":quests_begin", ":quests_end"), #TODO: Remove this when test is done # (assign, ":quest_no", "qst_meet_spy_in_enemy_town"), #TODO: Remove this when test is done end (neg|check_quest_active,":quest_no"), (neg|quest_slot_ge, ":quest_no", slot_quest_dont_give_again_remaining_days, 1), (try_begin), # Village Elder quests (eq, ":quest_no", "qst_deliver_grain"), (try_begin), (is_between, ":giver_center_no", villages_begin, villages_end), #The quest giver is the village elder (call_script, "script_get_troop_item_amount", ":giver_troop", "itm_grain"), (eq, reg0, 0), (neg|party_slot_ge, ":giver_center_no", slot_town_prosperity, 40), (assign, ":quest_target_center", ":giver_center_no"), (store_random_in_range, ":quest_target_amount", 4, 8), (assign, ":quest_expiration_days", 30), (assign, ":quest_dont_give_again_period", 20), (assign, ":result", ":quest_no"), (try_end), (else_try), (eq, ":quest_no", "qst_deliver_cattle"), (try_begin), (is_between, ":giver_center_no", villages_begin, villages_end), #The quest giver is the village elder (party_get_slot, ":num_cattle", ":giver_center_no", slot_village_number_of_cattle), (lt, ":num_cattle", 50), (assign, ":quest_target_center", ":giver_center_no"), (store_random_in_range, ":quest_target_amount", 5, 10), (assign, ":quest_expiration_days", 30), (assign, ":quest_dont_give_again_period", 20), (assign, ":result", ":quest_no"), (try_end), (else_try), (eq, ":quest_no", "qst_train_peasants_against_bandits"), (try_begin), (is_between, ":giver_center_no", villages_begin, villages_end), #The quest giver is the village elder (store_skill_level, ":player_trainer", "skl_trainer", "trp_player"), (gt, ":player_trainer", 0), (store_random_in_range, ":quest_target_amount", 5, 8), (assign, ":quest_target_center", ":giver_center_no"), (assign, ":quest_expiration_days", 20), (assign, ":quest_dont_give_again_period", 40), (assign, ":result", ":quest_no"), (try_end), (else_try), # Mayor quests (eq, ":quest_no", "qst_escort_merchant_caravan"), (is_between, ":giver_center_no", centers_begin, centers_end), (store_random_party_in_range, ":quest_target_center", towns_begin, towns_end), (store_distance_to_party_from_party, ":dist", ":giver_center_no",":quest_target_center"), (assign, ":quest_gold_reward", ":dist"), (val_add, ":quest_gold_reward", 25), (val_mul, ":quest_gold_reward", 25), (val_div, ":quest_gold_reward", 20), (store_random_in_range, ":quest_target_amount", 6, 12), (assign, "$escort_merchant_caravan_mode", 0), (assign, ":result", ":quest_no"), (else_try), (eq, ":quest_no", "qst_deliver_wine"), (is_between, ":giver_center_no", centers_begin, centers_end), (store_random_party_in_range, ":quest_target_center", towns_begin, towns_end), (store_random_in_range, ":random_no", 0, 2), (try_begin), (eq, ":random_no", 0), (assign, ":quest_target_item", "itm_quest_wine"), (else_try), (assign, ":quest_target_item", "itm_quest_ale"), (try_end), (store_random_in_range, ":quest_target_amount", 6, 12), (store_distance_to_party_from_party, ":dist", ":giver_center_no",":quest_target_center"), (assign, ":quest_gold_reward", ":dist"), (val_add, ":quest_gold_reward", 2), (assign, ":multiplier", 5), (val_add, ":multiplier", ":quest_target_amount"), (val_mul, ":quest_gold_reward", ":multiplier"), (val_div, ":quest_gold_reward", 100), (val_mul, ":quest_gold_reward", 10), (store_item_value,"$qst_deliver_wine_debt",":quest_target_item"), (val_mul,"$qst_deliver_wine_debt",":quest_target_amount"), (val_mul,"$qst_deliver_wine_debt", 6), (val_div,"$qst_deliver_wine_debt",5), (assign, ":quest_expiration_days", 7), (assign, ":quest_dont_give_again_period", 20), (assign, ":result", ":quest_no"), (else_try), (eq, ":quest_no", "qst_troublesome_bandits"), (is_between, ":giver_center_no", centers_begin, centers_end), (store_character_level, ":quest_gold_reward", "trp_player"), (val_add, ":quest_gold_reward", 20), (val_mul, ":quest_gold_reward", 35), (val_div, ":quest_gold_reward",100), (val_mul, ":quest_gold_reward", 10), (assign, ":quest_expiration_days", 30), (assign, ":quest_dont_give_again_period", 30), (assign, ":result", ":quest_no"), (else_try), (eq, ":quest_no", "qst_kidnapped_girl"), (is_between, ":giver_center_no", centers_begin, centers_end), (store_random_in_range, ":quest_target_center", villages_begin, villages_end), (store_character_level, ":quest_target_amount"), (val_add, ":quest_target_amount", 15), (store_distance_to_party_from_party, ":dist", ":giver_center_no", ":quest_target_center"), (val_add, ":dist", 15), (val_mul, ":dist", 2), (val_mul, ":quest_target_amount", ":dist"), (val_div, ":quest_target_amount",100), (val_mul, ":quest_target_amount",10), (assign, ":quest_gold_reward", ":quest_target_amount"), (val_div, ":quest_gold_reward", 40), (val_mul, ":quest_gold_reward", 10), (assign, ":quest_dont_give_again_period", 30), (assign, ":result", ":quest_no"), (else_try), (eq, ":quest_no", "qst_move_cattle_herd"), (is_between, ":giver_center_no", centers_begin, centers_end), (call_script, "script_cf_select_random_town_at_peace_with_faction", ":giver_faction_no"), (neq, ":giver_center_no", reg0), (assign, ":quest_target_center", reg0), (store_distance_to_party_from_party, ":dist",":giver_center_no",":quest_target_center"), (assign, ":quest_gold_reward", ":dist"), (val_add, ":quest_gold_reward", 25), (val_mul, ":quest_gold_reward", 50), (val_div, ":quest_gold_reward", 20), (assign, ":quest_expiration_days", 20), (assign, ":quest_dont_give_again_period", 20), (assign, ":result", ":quest_no"), (else_try), (eq, ":quest_no", "qst_persuade_lords_to_make_peace"), (is_between, ":giver_center_no", centers_begin, centers_end), (store_faction_of_party, ":cur_object_faction", ":giver_center_no"), (call_script, "script_cf_faction_get_random_enemy_faction", ":cur_object_faction"), (assign, ":cur_target_faction", reg0), (call_script, "script_cf_get_random_lord_except_king_with_faction", ":cur_object_faction"), (assign, ":cur_object_troop", reg0), (call_script, "script_cf_get_random_lord_except_king_with_faction", ":cur_target_faction"), (assign, ":quest_target_troop", reg0), (assign, ":quest_object_troop", ":cur_object_troop"), (assign, ":quest_target_faction", ":cur_target_faction"), (assign, ":quest_object_faction", ":cur_object_faction"), (assign, ":quest_gold_reward", 12000), (assign, ":quest_convince_value", 7000), (assign, ":quest_expiration_days", 30), (assign, ":quest_dont_give_again_period", 100), (assign, ":result", ":quest_no"), (else_try), (eq, ":quest_no", "qst_deal_with_looters"), (is_between, ":player_level", 0, 15), (is_between, ":giver_center_no", centers_begin, centers_end), (store_faction_of_party, ":cur_object_faction", ":giver_center_no"), (store_num_parties_destroyed_by_player, ":num_looters_destroyed", "pt_looters"), (party_template_set_slot,"pt_looters",slot_party_template_num_killed,":num_looters_destroyed"), (quest_set_slot,"$random_merchant_quest_no",slot_quest_current_state,0), (quest_set_slot,"$random_merchant_quest_no",slot_quest_target_party_template,"pt_looters"), (assign, ":quest_gold_reward", 500), (assign, ":quest_xp_reward", 500), (assign, ":quest_expiration_days", 20), (assign, ":quest_dont_give_again_period", 30), (assign, ":result", ":quest_no"), (else_try), (eq, ":quest_no", "qst_deal_with_night_bandits"), (is_between, ":player_level", 0, 15), (is_between, ":giver_center_no", centers_begin, centers_end), (party_slot_ge, ":giver_center_no", slot_center_has_bandits, 1), (assign, ":quest_target_center", ":giver_center_no"), (assign, ":quest_expiration_days", 4), (assign, ":quest_dont_give_again_period", 15), (assign, ":result", ":quest_no"), (else_try), # Lady quests (eq, ":quest_no", "qst_rescue_lord_by_replace"), (try_begin), (ge, "$g_talk_troop_faction_relation", 0), (is_between, ":player_level", 5, 25), (troop_get_slot, ":cur_target_troop", ":giver_troop", slot_troop_father), (try_begin), (eq, ":cur_target_troop", 0), (troop_get_slot, ":cur_target_troop", ":giver_troop", slot_troop_spouse), (try_end), #(troop_slot_eq, ":cur_target_troop", slot_troop_is_prisoner, 1),#Skip if the lady's father/husband is not in prison (troop_slot_ge, ":cur_target_troop", slot_troop_prisoner_of_party, 0), (call_script, "script_search_troop_prisoner_of_party", ":cur_target_troop"), (assign, ":cur_target_center", reg0), (is_between, ":cur_target_center", towns_begin, towns_end),#Skip if he is not in a town (assign, ":quest_target_center", ":cur_target_center"), (assign, ":quest_target_troop", ":cur_target_troop"), (assign, ":quest_expiration_days", 30), (assign, ":quest_dont_give_again_period", 73), (assign, ":result", ":quest_no"), (try_end), (else_try), (eq, ":quest_no", "qst_deliver_message_to_prisoner_lord"), (try_begin), (ge, "$g_talk_troop_faction_relation", 0), (is_between, ":player_level", 5, 25), (troop_get_slot, ":cur_target_troop", ":giver_troop", slot_troop_father), (try_begin), (eq, ":cur_target_troop", 0), (troop_get_slot, ":cur_target_troop", ":giver_troop", slot_troop_spouse), (try_end), #(troop_slot_eq, ":cur_target_troop", slot_troop_is_prisoner, 1),#Skip if the lady's father/husband is not in prison (troop_slot_ge, ":cur_target_troop", slot_troop_prisoner_of_party, 0), (call_script, "script_search_troop_prisoner_of_party", ":cur_target_troop"), (assign, ":cur_target_center", reg0), (is_between, ":cur_target_center", towns_begin, towns_end),#Skip if he is not in a town (assign, ":quest_target_center", ":cur_target_center"), (assign, ":quest_target_troop", ":cur_target_troop"), (assign, ":quest_expiration_days", 30), (assign, ":quest_dont_give_again_period", 30), (assign, ":result", ":quest_no"), (try_end), (else_try), (eq, ":quest_no", "qst_duel_for_lady"), (try_begin), (ge, "$g_talk_troop_faction_relation", 0), (ge, ":player_level", 10), (call_script, "script_cf_troop_get_random_enemy_troop_with_occupation", ":giver_troop", slto_kingdom_hero),#Can fail (assign, ":cur_target_troop", reg0), (neg|troop_slot_eq, ":giver_troop", slot_troop_spouse, ":cur_target_troop"), #must not be in the family (neg|troop_slot_eq, ":giver_troop", slot_troop_father, ":cur_target_troop"), #(troop_slot_eq, ":cur_target_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":cur_target_troop", slot_troop_prisoner_of_party, 0), (troop_slot_ge, ":cur_target_troop", slot_troop_leaded_party, 0), (neg|troop_slot_eq, ":cur_target_troop", slot_lord_reputation_type, lrep_goodnatured), (neg|troop_slot_eq, ":cur_target_troop", slot_lord_reputation_type, lrep_upstanding), (assign, ":quest_target_troop", ":cur_target_troop"), (assign, ":quest_expiration_days", 30), (assign, ":quest_dont_give_again_period", 50), (assign, ":result", ":quest_no"), (try_end), # Enemy Lord Quests (else_try), (eq, ":quest_no", "qst_lend_surgeon"), (try_begin), (eq, "$g_defending_against_siege", 0),#Skip if the center is under siege (because of resting) (neq, ":giver_reputation", lrep_quarrelsome), (neq, ":giver_reputation", lrep_debauched), (assign, ":max_surgery_level", 0), (assign, ":best_surgeon", -1), (party_get_num_companion_stacks, ":num_stacks","p_main_party"), (try_for_range, ":i_stack", 1, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop","p_main_party",":i_stack"), (troop_is_hero, ":stack_troop"), (store_skill_level, ":cur_surgery_skill", skl_surgery, ":stack_troop"), (gt, ":cur_surgery_skill", ":max_surgery_level"), (assign, ":max_surgery_level", ":cur_surgery_skill"), (assign, ":best_surgeon", ":stack_troop"), (try_end), (store_character_level, ":cur_level", "trp_player"), (assign, ":required_skill", 5), (val_div, ":cur_level", 10), (val_add, ":required_skill", ":cur_level"), (ge, ":max_surgery_level", ":required_skill"), #Skip if party skill level is less than the required value (assign, ":quest_object_troop", ":best_surgeon"), (assign, ":quest_importance", 1), (assign, ":quest_xp_reward", 10), (assign, ":quest_gold_reward", 10), (assign, ":quest_dont_give_again_period", 50), (assign, ":result", ":quest_no"), (try_end), # Lord Quests (else_try), (eq, ":quest_no", "qst_meet_spy_in_enemy_town"), (try_begin), (eq, "$players_kingdom", ":giver_faction_no"), (neq, ":giver_reputation", lrep_goodnatured), (call_script, "script_troop_get_player_relation", ":giver_troop"), (assign, ":giver_relation", reg0), (gt, ":giver_relation", 3), (call_script, "script_cf_faction_get_random_enemy_faction", ":giver_faction_no"), (assign, ":enemy_faction", reg0), (store_relation, ":reln", ":enemy_faction", "fac_player_supporters_faction"), (lt, ":reln", 0), (call_script, "script_cf_select_random_town_with_faction", ":enemy_faction"), (assign, ":cur_target_center", reg0), #Just to make sure that there is a free walker (call_script, "script_cf_center_get_free_walker", ":cur_target_center"), (assign, ":quest_target_center", ":cur_target_center"), (store_random_in_range, ":quest_target_amount", secret_signs_begin, secret_signs_end), (assign, ":result", ":quest_no"), (assign, ":quest_gold_reward", 500), (assign, ":quest_expiration_days", 30), (assign, ":quest_dont_give_again_period", 50), (quest_set_slot, "qst_meet_spy_in_enemy_town", slot_quest_gold_reward, 500), (try_end), (else_try), (eq, ":quest_no", "qst_raid_caravan_to_start_war"), (try_begin), (eq, "$players_kingdom", ":giver_faction_no"), (this_or_next|eq, ":giver_reputation", lrep_cunning), (this_or_next|eq, ":giver_reputation", lrep_quarrelsome), ( eq, ":giver_reputation", lrep_debauched), (gt, ":player_level", 10), (neg|faction_slot_eq, ":giver_faction_no", slot_faction_leader, ":giver_troop"),#Can not take the quest from the king (call_script, "script_cf_faction_get_random_friendly_faction", ":giver_faction_no"),#Can fail (assign, ":quest_target_faction", reg0), (store_troop_faction, ":quest_object_faction", ":giver_troop"), (assign, ":quest_target_party_template", "pt_kingdom_caravan_party"), (assign, ":quest_target_amount", 2), (assign, ":result", ":quest_no"), (assign, ":quest_expiration_days", 30), (assign, ":quest_dont_give_again_period", 100), (try_end), (else_try), (eq, ":quest_no", "qst_deliver_message"), (try_begin), (ge, "$g_talk_troop_faction_relation", 0), (lt, ":player_level", 20), (call_script, "script_cf_get_random_lord_in_a_center_with_faction", ":giver_faction_no"),#Can fail (assign, ":cur_target_troop", reg0), (neq, ":cur_target_troop", ":giver_troop"),#Skip himself (call_script, "script_get_troop_attached_party", ":cur_target_troop"), (assign, ":cur_target_center", reg0),#cur_target_center will definitely be a valid center (neq,":giver_center_no", ":cur_target_center"),#Skip current center (assign, ":quest_target_center", ":cur_target_center"), (assign, ":quest_target_troop", ":cur_target_troop"), (assign, ":quest_xp_reward", 30), (assign, ":quest_gold_reward", 40), (assign, ":result", ":quest_no"), (assign, ":quest_expiration_days", 30), (try_end), (else_try), (eq, ":quest_no", "qst_escort_lady"), (try_begin), (ge, "$g_talk_troop_faction_relation", 0), (ge, ":player_level", 10), (troop_get_slot, ":cur_object_troop", ":giver_troop", slot_troop_daughter), (store_random_in_range, ":random_no", 0, 2), (try_begin), (this_or_next|eq, ":cur_object_troop", 0), (eq, ":random_no", 0), (troop_get_slot, ":cur_object_troop_2", ":giver_troop", slot_troop_spouse), (gt, ":cur_object_troop_2", 0), (assign, ":cur_object_troop", ":cur_object_troop_2"), (try_end), (gt, ":cur_object_troop", 0),#Skip lords without a lady (troop_get_type, ":cur_troop_gender", ":cur_object_troop"), (eq, ":cur_troop_gender", 1),#Skip if it is not female (gt, ":giver_center_no", 0),#Skip if lord is outside the center (troop_slot_eq, ":cur_object_troop", slot_troop_cur_center, ":giver_center_no"),#Skip if the lady is not at the same center (call_script, "script_cf_select_random_town_with_faction", ":giver_faction_no"),#Can fail (assign, ":cur_target_center", reg0), (neq, ":cur_target_center", ":giver_center_no"), (hero_can_join),#Skip if player has no available slots (assign, ":quest_object_troop", ":cur_object_troop"), (assign, ":quest_target_center", ":cur_target_center"), (assign, ":quest_expiration_days", 20), (assign, ":quest_dont_give_again_period", 30), (assign, ":result", ":quest_no"), (try_end), ## (else_try), ## (eq, ":quest_no", "qst_hunt_down_raiders"), ## (try_begin), ## (gt, ":player_level", 10), ## (faction_slot_eq, ":giver_faction_no", slot_faction_leader, ":giver_troop"), ## (call_script, "script_cf_select_random_town_with_faction", ":giver_faction_no"),#Can fail ## (assign, ":cur_object_center", reg0), ## (neq, ":cur_object_center", ":giver_center_no"),#Skip current center ## (call_script, "script_get_random_enemy_center", ":giver_party_no"), ## (assign, ":cur_target_center", reg0), ## (ge, ":cur_target_center", 0), ## (store_faction_of_party, ":cur_target_faction", ":cur_target_center"), ## (is_between, ":cur_target_faction", kingdoms_begin, kingdoms_end), ## ## (assign, ":quest_object_center", ":cur_object_center"), ## (assign, ":quest_target_center", ":cur_target_center"), ## (assign, ":quest_importance", 1), ## (assign, ":quest_xp_reward", 1500), ## (assign, ":quest_gold_reward", 1000), ## (assign, ":result", ":quest_no"), ## (try_end), ## (else_try), ## (eq, ":quest_no", "qst_bring_back_deserters"), ## (try_begin), ## (gt, ":player_level", 5), ## (faction_get_slot, ":cur_target_party_template", ":giver_faction_no", slot_faction_deserter_party_template), ## (faction_get_slot, ":cur_target_troop", ":giver_faction_no", slot_faction_deserter_troop), ## (gt, ":cur_target_party_template", 0),#Skip factions with no deserter party templates ## (store_num_parties_of_template, ":num_deserters", ":cur_target_party_template"), ## (ge, ":num_deserters", 2),#Skip if there are less than 2 active deserter parties ## ## (assign, ":quest_target_troop", ":cur_target_troop"), ## (assign, ":quest_target_party_template", ":cur_target_party_template"), ## (assign, ":quest_target_amount", 5), ## (assign, ":quest_importance", 1), ## (assign, ":quest_xp_reward", 500), ## (assign, ":quest_gold_reward", 300), ## (assign, ":result", ":quest_no"), ## (try_end), ## (else_try), ## (eq, ":quest_no", "qst_deliver_supply_to_center_under_siege"), ## (try_begin), ## (gt, ":player_level", 10), ## (gt, ":giver_center_no", 0),#Skip if lord is outside the center ## (call_script, "script_cf_get_random_siege_location_with_faction", ":giver_faction_no"),#Can fail ## (assign, ":quest_target_center", reg0), ## (assign, ":quest_target_amount", 10), ## (assign, ":quest_importance", 1), ## (assign, ":quest_xp_reward", 500), ## (assign, ":quest_gold_reward", 300), ## (assign, ":result", ":quest_no"), ## (try_end), ## (else_try), ## (eq, ":quest_no", "qst_rescue_lady_under_siege"), ## (try_begin), ## (gt, ":player_level", 15), ## (troop_get_slot, ":cur_object_troop", ":giver_troop", slot_troop_daughter), ## (store_random_in_range, ":random_no", 0, 2), ## (try_begin), ## (this_or_next|eq, ":cur_object_troop", 0), ## (eq, ":random_no", 0), ## (troop_get_slot, ":cur_object_troop_2", ":giver_troop", slot_troop_spouse), ## (gt, ":cur_object_troop_2", 0), ## (assign, ":cur_object_troop", ":cur_object_troop_2"), ## (try_end), ## (gt, ":cur_object_troop", 0),#Skip lords without a lady ## (troop_get_type, ":cur_troop_gender", ":cur_object_troop"), ## (eq, ":cur_troop_gender", 1),#Skip if lady is not female ## (troop_get_slot, ":cur_target_center", ":cur_object_troop", slot_troop_cur_center), ## (is_between, ":cur_target_center", centers_begin, centers_end),#Skip if she is not in a center ## (neq,":giver_center_no", ":cur_target_center"),#Skip current center ## (call_script, "script_cf_get_random_siege_location_with_faction", ":giver_faction_no"),#Can fail ## (assign, ":cur_target_center", reg0), ## (troop_set_slot, ":cur_object_troop", slot_troop_cur_center, ":cur_target_center"),#Move lady to the siege location ## (assign, ":quest_object_troop", ":cur_object_troop"), ## (assign, ":quest_target_center", ":cur_target_center"), ## (assign, ":quest_target_troop", ":giver_troop"), ## (assign, ":quest_importance", 1), ## (assign, ":quest_xp_reward", 200), ## (assign, ":quest_gold_reward", 750), ## (assign, ":result", ":quest_no"), ## (try_end), ## (else_try), ## (eq, ":quest_no", "qst_deliver_message_to_lover"), ## (try_begin), ## (is_between, ":player_level", 5, 30), ## (troop_get_slot, ":cur_target_troop", ":giver_troop", slot_troop_lover), ## (gt, ":cur_target_troop", 0),#Skip lords without a lover ## (troop_get_slot, ":cur_target_center", ":cur_target_troop", slot_troop_cur_center), ## (is_between, ":cur_target_center", centers_begin, centers_end),#Skip if she is not in a center ## (neq,":giver_center_no", ":cur_target_center"),#Skip current center ## (assign, ":quest_target_troop", ":cur_target_troop"), ## (assign, ":quest_target_center", ":cur_target_center"), ## (assign, ":result", ":quest_no"), ## (try_end), ## (else_try), ## (eq, ":quest_no", "qst_bring_reinforcements_to_siege"), ## (try_begin), ## (gt, ":player_level", 10), ## (call_script, "script_cf_get_random_siege_location_with_attacker_faction", ":giver_faction_no"),#Can fail ## (assign, ":cur_target_center", reg0), ## (store_random_in_range, ":random_no", 5, 11), ## (troops_can_join, ":random_no"),#Skip if the player doesn't have enough room ## (call_script, "script_cf_get_number_of_random_troops_from_party", ":giver_party_no", ":random_no"),#Can fail ## (assign, ":cur_object_troop", reg0), ## (party_get_battle_opponent, ":cur_target_party", ":cur_target_center"), ## (party_get_num_companion_stacks, ":num_stacks", ":cur_target_party"), ## (gt, ":num_stacks", 0),#Skip if the besieger party has no troops ## (party_stack_get_troop_id, ":cur_target_troop", ":cur_target_party", 0), ## (troop_is_hero, ":cur_target_troop"),#Skip if the besieger party has no heroes ## (neq, ":cur_target_troop", ":giver_troop"),#Skip if the quest giver is the same troop ## (assign, ":quest_target_troop", ":cur_target_troop"), ## (assign, ":quest_object_troop", ":cur_object_troop"), ## (assign, ":quest_target_party", ":cur_target_party"), ## (assign, ":quest_target_center", ":cur_target_center"), ## (assign, ":quest_target_amount", ":random_no"), ## (assign, ":quest_importance", 1), ## (assign, ":quest_xp_reward", 400), ## (assign, ":quest_gold_reward", 200), ## (assign, ":result", ":quest_no"), ## (try_end), (else_try), (eq, ":quest_no", "qst_deliver_message_to_enemy_lord"), (try_begin), (ge, "$g_talk_troop_faction_relation", 0), (is_between, ":player_level", 5,25), (call_script, "script_cf_get_random_lord_from_another_faction_in_a_center", ":giver_faction_no"),#Can fail (assign, ":cur_target_troop", reg0), (call_script, "script_get_troop_attached_party", ":cur_target_troop"), (assign, ":quest_target_center", reg0),#quest_target_center will definitely be a valid center (assign, ":quest_target_troop", ":cur_target_troop"), (assign, ":quest_importance", 1), (assign, ":quest_xp_reward", 200), (assign, ":quest_gold_reward", 0), (assign, ":result", ":quest_no"), (assign, ":quest_expiration_days", 40), (try_end), ## (else_try), ## (eq, ":quest_no", "qst_bring_prisoners_to_enemy"), ## (try_begin), ## (gt, ":player_level", 10), ## (is_between, ":giver_center_no", centers_begin, centers_end),#Skip if the quest giver is not at a center ## (store_random_in_range, ":random_no", 5, 11), ## (troops_can_join_as_prisoner, ":random_no"),#Skip if the player doesn't have enough room ## (call_script, "script_get_random_enemy_town", ":giver_center_no"), ## (assign, ":cur_target_center", reg0), ## (ge, ":cur_target_center", 0),#Skip if there are no enemy towns ## (store_faction_of_party, ":cur_target_faction", ":cur_target_center"), ## (faction_get_slot, ":cur_object_troop", ":cur_target_faction", slot_faction_tier_5_troop), ## (assign, ":quest_target_center", ":cur_target_center"), ## (assign, ":quest_object_troop", ":cur_object_troop"), ## (assign, ":quest_target_amount", ":random_no"), ## (assign, ":quest_importance", 1), ## (assign, ":quest_xp_reward", 300), ## (assign, ":quest_gold_reward", 200), ## (assign, ":result", ":quest_no"), ## (try_end), (else_try), (eq, ":quest_no", "qst_deal_with_bandits_at_lords_village"), (try_begin), (neq, ":giver_reputation", lrep_debauched), (neq, ":giver_reputation", lrep_quarrelsome), (ge, "$g_talk_troop_faction_relation", 0), (assign, ":end_cond", villages_end), (assign, ":cur_target_center", -1), (try_for_range, ":cur_village", villages_begin, ":end_cond"), (party_slot_eq, ":cur_village", slot_town_lord, ":giver_troop"), (party_slot_eq, ":cur_village", slot_village_infested_by_bandits, 1), (assign, ":cur_target_center", ":cur_village"), (assign, ":end_cond", 0), (try_end), (ge, ":cur_target_center", 0), (neg|check_quest_active, "qst_eliminate_bandits_infesting_village"), (assign, ":quest_target_center", ":cur_target_center"), (assign, ":result", ":quest_no"), (assign, ":quest_expiration_days", 30), (try_end), (else_try), (eq, ":quest_no", "qst_raise_troops"), (try_begin), (neq, ":giver_reputation", lrep_martial), (neq, ":giver_faction_no", "fac_player_supporters_faction"), #we need tier_1_troop a valid value (ge, "$g_talk_troop_faction_relation", 0), (store_character_level, ":cur_level", "trp_player"), (gt, ":cur_level", 5), (troop_slot_ge, "trp_player", slot_troop_renown, 100), (store_random_in_range, ":quest_target_amount", 5, 8), (party_get_free_companions_capacity, ":free_capacity", "p_main_party"), (le, ":quest_target_amount", ":free_capacity"), (faction_get_slot, ":quest_object_troop", ":giver_faction_no", slot_faction_tier_1_troop), (store_random_in_range, ":level_up", 20, 40), (val_add, ":level_up", ":cur_level"), (val_div, ":level_up", 10), (store_mul, ":quest_gold_reward", ":quest_target_amount", 10), (assign, ":quest_target_troop", ":quest_object_troop"), (try_for_range, ":unused", 0, ":level_up"), (troop_get_upgrade_troop, ":level_up_troop", ":quest_target_troop", 0), (gt, ":level_up_troop", 0), (assign, ":quest_target_troop", ":level_up_troop"), (val_mul, ":quest_gold_reward", ":quest_gold_reward", 7), (val_div, ":quest_gold_reward", ":quest_gold_reward", 4), (try_end), ## (try_begin), ## (ge, ":cur_level", 15), ## (faction_get_slot, ":cur_target_troop", ":giver_faction_no", slot_faction_tier_5_troop), ## (assign, ":quest_gold_reward", 300), ## (else_try), ## (faction_get_slot, ":cur_target_troop", ":giver_faction_no", slot_faction_tier_4_troop), ## (assign, ":quest_gold_reward", 150), ## (try_end), ## (gt, ":cur_target_troop", 0), (assign, ":quest_xp_reward", ":quest_gold_reward"), (val_mul, ":quest_xp_reward", 3), (val_div, ":quest_xp_reward", 10), (assign, ":result", ":quest_no"), (assign, ":quest_expiration_days", 120), (assign, ":quest_dont_give_again_period", 15), (try_end), (else_try), (eq, ":quest_no", "qst_collect_taxes"), (try_begin), (neq, ":giver_reputation", lrep_goodnatured), (neq, ":giver_reputation", lrep_upstanding), (ge, "$g_talk_troop_faction_relation", 0), (call_script, "script_cf_troop_get_random_leaded_town_or_village_except_center", ":giver_troop", ":giver_center_no"), (assign, ":quest_target_center", reg0), (assign, ":quest_importance", 1), (assign, ":quest_gold_reward", 0), (assign, ":quest_xp_reward", 100), (assign, ":result", ":quest_no"), (assign, ":quest_expiration_days", 50), (assign, ":quest_dont_give_again_period", 20), (try_end), (else_try), (eq, ":quest_no", "qst_hunt_down_fugitive"), (try_begin), (ge, "$g_talk_troop_faction_relation", 0), (call_script, "script_cf_select_random_village_with_faction", ":giver_faction_no"), (assign, ":quest_target_center", reg0), (store_random_in_range, ":quest_target_dna", 0, 1000000), (assign, ":result", ":quest_no"), (assign, ":quest_expiration_days", 30), (assign, ":quest_dont_give_again_period", 30), (try_end), ## (else_try), ## (eq, ":quest_no", "qst_capture_messenger"), ## (try_begin), ## (call_script, "script_cf_faction_get_random_enemy_faction", ":giver_faction_no"), ## (assign, ":cur_target_faction", reg0), ## (faction_get_slot, ":cur_target_troop", ":cur_target_faction", slot_faction_messenger_troop), ## (gt, ":cur_target_troop", 0),#Checking the validiy of cur_target_troop ## (store_num_parties_destroyed_by_player, ":quest_target_amount", "pt_messenger_party"), ## ## (assign, ":quest_target_troop", ":cur_target_troop"), ## (assign, ":quest_target_party_template", ":cur_target_party_template"), ## (assign, ":quest_importance", 1), ## (assign, ":quest_xp_reward", 700), ## (assign, ":quest_gold_reward", 400), ## (assign, ":result", ":quest_no"), ## (try_end), (else_try), (eq, ":quest_no", "qst_kill_local_merchant"), (try_begin), (this_or_next|eq, ":giver_reputation", lrep_quarrelsome), (this_or_next|eq, ":giver_reputation", lrep_cunning), ( eq, ":giver_reputation", lrep_debauched), (neg|faction_slot_eq, ":giver_faction_no", slot_faction_leader, ":giver_troop"),#Can not take the quest from the king (ge, "$g_talk_troop_faction_relation", 0), (gt, ":player_level", 5), (is_between, ":giver_center_no", towns_begin, towns_end), (assign, ":quest_importance", 1), (assign, ":quest_xp_reward", 300), (assign, ":quest_gold_reward", 1000), (assign, ":result", ":quest_no"), (assign, ":quest_expiration_days", 10), (assign, ":quest_dont_give_again_period", 30), (try_end), (else_try), (eq, ":quest_no", "qst_bring_back_runaway_serfs"), (try_begin), (neq, ":giver_reputation", lrep_goodnatured), (neq, ":giver_reputation", lrep_upstanding), (ge, "$g_talk_troop_faction_relation", 0), (ge, ":player_level", 5), (gt, ":giver_center_no", 0),#Skip if lord is outside the center (eq, "$g_defending_against_siege", 0),#Skip if the center is under siege (because of resting) (assign, ":cur_object_center", -1), (try_for_range, ":cur_village", villages_begin, villages_end), (party_slot_eq, ":cur_village", slot_town_lord, ":giver_troop"), (store_distance_to_party_from_party, ":dist", ":cur_village", ":giver_center_no"), (lt, ":dist", 25), (assign, ":cur_object_center", ":cur_village"), (try_end), (ge, ":cur_object_center", 0),#Skip if the quest giver is not the owner of any villages around the center (call_script, "script_cf_select_random_town_with_faction", ":giver_faction_no"), (assign, ":cur_target_center", reg0), (neq, ":cur_target_center", ":giver_center_no"),#Skip current center (store_distance_to_party_from_party, ":dist", ":cur_target_center", ":giver_center_no"), (ge, ":dist", 20), (assign, ":quest_target_party_template", "pt_runaway_serfs"), (assign, ":quest_object_center", ":cur_object_center"), (assign, ":quest_target_center", ":cur_target_center"), (assign, ":quest_importance", 1), (assign, ":quest_xp_reward", 200), (assign, ":quest_gold_reward", 150), (assign, ":result", ":quest_no"), (assign, ":quest_expiration_days", 30), (assign, ":quest_dont_give_again_period", 20), (assign, "$qst_bring_back_runaway_serfs_num_parties_returned", 0), (assign, "$qst_bring_back_runaway_serfs_num_parties_fleed", 0), (try_end), (else_try), (eq, ":quest_no", "qst_follow_spy"), (try_begin), (ge, "$g_talk_troop_faction_relation", 0), (neq, ":giver_reputation", lrep_goodnatured), (party_get_skill_level, ":tracking_skill", "p_main_party", "skl_tracking"), (ge, ":tracking_skill", 2), (ge, ":player_level", 10), (eq, "$g_defending_against_siege", 0), #Skip if the center is under siege (because of resting) (gt, ":giver_party_no", 0), #Skip if the quest giver doesn't have a party (gt, ":giver_center_no", 0), #skip if the quest giver is not in a center (party_slot_eq, "$g_encountered_party", slot_party_type, spt_town), #skip if we are not in a town. (party_get_position, pos2, "p_main_party"), (assign, ":min_distance", 99999), (try_for_range, ":unused_2", 0, 10), (call_script, "script_cf_get_random_enemy_center", ":giver_party_no"), (assign, ":random_object_center", reg0), (party_get_position, pos3, ":random_object_center"), (map_get_random_position_around_position, pos4, pos3, 6), (get_distance_between_positions, ":cur_distance", pos2, pos4), (lt, ":cur_distance", ":min_distance"), (assign, ":min_distance", ":cur_distance"), (assign, ":cur_object_center", ":random_object_center"), (copy_position, pos63, pos4), #Do not change pos63 until quest is accepted (try_end), (gt, ":cur_object_center", 0), #Skip if there are no enemy centers (assign, ":quest_object_center", ":cur_object_center"), (assign, ":quest_dont_give_again_period", 50), (assign, ":result", ":quest_no"), (assign, "$qst_follow_spy_run_away", 0), (assign, "$qst_follow_spy_meeting_state", 0), (assign, "$qst_follow_spy_meeting_counter", 0), (assign, "$qst_follow_spy_spy_back_in_town", 0), (assign, "$qst_follow_spy_partner_back_in_town", 0), (assign, "$qst_follow_spy_no_active_parties", 0), (try_end), (else_try), (eq, ":quest_no", "qst_capture_enemy_hero"), (try_begin), (eq, "$players_kingdom", ":giver_faction_no"), (neg|faction_slot_eq, "$players_kingdom", slot_faction_marshall, "trp_player"), (ge, ":player_level", 15), (call_script, "script_cf_faction_get_random_enemy_faction", ":giver_faction_no"),#Can fail (assign, ":quest_target_faction", reg0), (assign, ":quest_expiration_days", 30), (assign, ":quest_dont_give_again_period", 80), (assign, ":quest_gold_reward", 2000), (assign, ":result", ":quest_no"), (try_end), (else_try), (eq, ":quest_no", "qst_lend_companion"), (try_begin), (ge, "$g_talk_troop_faction_relation", 0), (assign, ":total_heroes", 0), (party_get_num_companion_stacks, ":num_stacks","p_main_party"), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop","p_main_party",":i_stack"), (troop_is_hero, ":stack_troop"), (is_between, ":stack_troop", companions_begin, companions_end), (store_character_level, ":stack_level", ":stack_troop"), (ge, ":stack_level", 15), (assign, ":is_quest_hero", 0), (try_for_range, ":i_quest", 0, all_quests_end), (check_quest_active, ":i_quest"), (this_or_next|quest_slot_eq, ":i_quest", slot_quest_target_troop, ":stack_troop"), (quest_slot_eq, ":i_quest", slot_quest_object_troop, ":stack_troop"), (assign, ":is_quest_hero", 1), (try_end), (eq, ":is_quest_hero", 0), (val_add, ":total_heroes", 1), (try_end), (gt, ":total_heroes", 0),#Skip if party has no eligible heroes (store_random_in_range, ":random_hero", 0, ":total_heroes"), (assign, ":total_heroes", 0), (assign, ":cur_target_troop", -1), (try_for_range, ":i_stack", 0, ":num_stacks"), (eq, ":cur_target_troop", -1), (party_stack_get_troop_id, ":stack_troop","p_main_party",":i_stack"), (troop_is_hero, ":stack_troop"), (neq, ":stack_troop", "trp_player"), (store_character_level, ":stack_level", ":stack_troop"), (ge, ":stack_level", 15), (assign, ":is_quest_hero", 0), (try_for_range, ":i_quest", 0, all_quests_end), (check_quest_active, ":i_quest"), (this_or_next|quest_slot_eq, ":i_quest", slot_quest_target_troop, ":stack_troop"), (quest_slot_eq, ":i_quest", slot_quest_object_troop, ":stack_troop"), (assign, ":is_quest_hero", 1), (try_end), (eq, ":is_quest_hero", 0), (val_add, ":total_heroes", 1), (gt, ":total_heroes", ":random_hero"), (assign, ":cur_target_troop", ":stack_troop"), (try_end), (assign, ":quest_target_troop", ":cur_target_troop"), (store_current_day, ":quest_target_amount"), (val_add, ":quest_target_amount", 8), (assign, ":quest_importance", 1), (assign, ":quest_xp_reward", 300), (assign, ":quest_gold_reward", 400), (assign, ":result", ":quest_no"), (assign, ":quest_dont_give_again_period", 30), (try_end), (else_try), (eq, ":quest_no", "qst_collect_debt"), (try_begin), (ge, "$g_talk_troop_faction_relation", 0), # Find a vassal (within the same kingdom?) (call_script, "script_cf_get_random_lord_in_a_center_with_faction", ":giver_faction_no"),#Can fail (assign, ":quest_target_troop", reg0), (neq, ":quest_target_troop", ":giver_troop"),#Skip himself (call_script, "script_get_troop_attached_party", ":quest_target_troop"), (assign, ":quest_target_center", reg0),#cur_target_center will definitely be a valid center (neq,":giver_center_no", ":quest_target_center"),#Skip current center (assign, ":quest_xp_reward", 30), (assign, ":quest_gold_reward", 40), (assign, ":result", ":quest_no"), (store_random_in_range, ":quest_target_amount", 6, 9), (val_mul, ":quest_target_amount", 500), (store_div, ":quest_convince_value", ":quest_target_amount", 5), (assign, ":quest_expiration_days", 90), (assign, ":quest_dont_give_again_period", 20), (try_end), ## (else_try), ## (eq, ":quest_no", "qst_capture_conspirators"), ## (try_begin), ## (eq, 1,0), #TODO: disable this for now ## (ge, ":player_level", 10), ## (is_between, ":giver_center_no", towns_begin, towns_end),#Skip if quest giver's center is not a town ## (party_slot_eq, ":giver_center_no", slot_town_lord, ":giver_troop"),#Skip if the current center is not ruled by the quest giver ## (call_script, "script_cf_get_random_kingdom_hero", ":giver_faction_no"),#Can fail ## ## (assign, ":quest_target_troop", reg0), ## (assign, ":quest_target_center", ":giver_center_no"), ## (assign, ":quest_importance", 1), ## (assign, ":quest_xp_reward", 10), ## (assign, ":quest_gold_reward", 10), ## (assign, ":result", ":quest_no"), ## (store_character_level, ":cur_level"), ## (val_div, ":cur_level", 5), ## (val_max, ":cur_level", 3), ## (store_add, ":max_parties", 4, ":cur_level"), ## (store_random_in_range, "$qst_capture_conspirators_num_parties_to_spawn", 4, ":max_parties"), ## (assign, "$qst_capture_conspirators_num_troops_to_capture", 0), ## (assign, "$qst_capture_conspirators_num_parties_spawned", 0), ## (assign, "$qst_capture_conspirators_leave_meeting_counter", 0), ## (assign, "$qst_capture_conspirators_party_1", 0), ## (assign, "$qst_capture_conspirators_party_2", 0), ## (assign, "$qst_capture_conspirators_party_3", 0), ## (assign, "$qst_capture_conspirators_party_4", 0), ## (assign, "$qst_capture_conspirators_party_5", 0), ## (assign, "$qst_capture_conspirators_party_6", 0), ## (assign, "$qst_capture_conspirators_party_7", 0), ## (try_end), ## (else_try), ## (eq, ":quest_no", "qst_defend_nobles_against_peasants"), ## (try_begin), ## (eq, 1,0), #TODO: disable this for now ## (ge, ":player_level", 10), ## (is_between, ":giver_center_no", towns_begin, towns_end),#Skip if quest giver's center is not a town ## (party_slot_eq, ":giver_center_no", slot_town_lord, ":giver_troop"),#Skip if the current center is not ruled by the quest giver ## ## (assign, ":quest_target_center", ":giver_center_no"), ## (assign, ":quest_importance", 1), ## (assign, ":quest_xp_reward", 10), ## (assign, ":quest_gold_reward", 10), ## (assign, ":result", ":quest_no"), ## (store_character_level, ":cur_level"), ## (val_div, ":cur_level", 5), ## (val_max, ":cur_level", 4), ## (store_add, ":max_parties", 4, ":cur_level"), ## (store_random_in_range, "$qst_defend_nobles_against_peasants_num_peasant_parties_to_spawn", 4, ":cur_level"), ## (store_random_in_range, "$qst_defend_nobles_against_peasants_num_noble_parties_to_spawn", 4, ":cur_level"), ## (assign, "$qst_defend_nobles_against_peasants_num_nobles_to_save", 0), ## (assign, "$qst_defend_nobles_against_peasants_num_nobles_saved", 0), ## (assign, "$qst_defend_nobles_against_peasants_peasant_party_1", 0), ## (assign, "$qst_defend_nobles_against_peasants_peasant_party_2", 0), ## (assign, "$qst_defend_nobles_against_peasants_peasant_party_3", 0), ## (assign, "$qst_defend_nobles_against_peasants_peasant_party_4", 0), ## (assign, "$qst_defend_nobles_against_peasants_peasant_party_5", 0), ## (assign, "$qst_defend_nobles_against_peasants_peasant_party_6", 0), ## (assign, "$qst_defend_nobles_against_peasants_peasant_party_7", 0), ## (assign, "$qst_defend_nobles_against_peasants_peasant_party_8", 0), ## (assign, "$qst_defend_nobles_against_peasants_noble_party_1", 0), ## (assign, "$qst_defend_nobles_against_peasants_noble_party_2", 0), ## (assign, "$qst_defend_nobles_against_peasants_noble_party_3", 0), ## (assign, "$qst_defend_nobles_against_peasants_noble_party_4", 0), ## (assign, "$qst_defend_nobles_against_peasants_noble_party_5", 0), ## (assign, "$qst_defend_nobles_against_peasants_noble_party_6", 0), ## (assign, "$qst_defend_nobles_against_peasants_noble_party_7", 0), ## (assign, "$qst_defend_nobles_against_peasants_noble_party_8", 0), ## (try_end), (else_try), (eq, ":quest_no", "qst_incriminate_loyal_commander"), (try_begin), (neq, ":giver_reputation", lrep_upstanding), (neq, ":giver_reputation", lrep_goodnatured), (eq, "$players_kingdom", ":giver_faction_no"), (ge, ":player_level", 10), (faction_slot_eq, ":giver_faction_no", slot_faction_leader, ":giver_troop"), (assign, ":try_times", 1), (assign, ":found", 0), (try_for_range, ":unused", 0, ":try_times"), (call_script, "script_cf_faction_get_random_enemy_faction", ":giver_faction_no"),#Can fail (assign, ":cur_target_faction", reg0), (faction_get_slot, ":cur_target_troop", ":cur_target_faction", slot_faction_leader), (assign, ":num_centerless_heroes", 0), (try_for_range, ":cur_kingdom_hero", kingdom_heroes_begin, kingdom_heroes_end), (troop_slot_eq, ":cur_kingdom_hero", slot_troop_occupation, slto_kingdom_hero), #(troop_slot_eq, ":cur_kingdom_hero", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":cur_kingdom_hero", slot_troop_prisoner_of_party, 0), (neq, ":cur_target_troop", ":cur_kingdom_hero"), (store_troop_faction, ":cur_kingdom_hero_faction", ":cur_kingdom_hero"), (eq, ":cur_target_faction", ":cur_kingdom_hero_faction"), ## (call_script, "script_get_number_of_hero_centers", ":cur_kingdom_hero"), ## (eq, reg0, 0), (val_add, ":num_centerless_heroes", 1), (try_end), (gt, ":num_centerless_heroes", 0), (assign, ":cur_object_troop", -1), (store_random_in_range, ":random_kingdom_hero", 0, ":num_centerless_heroes"), (try_for_range, ":cur_kingdom_hero", kingdom_heroes_begin, kingdom_heroes_end), (eq, ":cur_object_troop", -1), (troop_slot_eq, ":cur_kingdom_hero", slot_troop_occupation, slto_kingdom_hero), (neq, ":cur_target_troop", ":cur_kingdom_hero"), (store_troop_faction, ":cur_kingdom_hero_faction", ":cur_kingdom_hero"), (eq, ":cur_target_faction", ":cur_kingdom_hero_faction"), ## (call_script, "script_get_number_of_hero_centers", ":cur_kingdom_hero"), ## (eq, reg0, 0), (val_sub, ":random_kingdom_hero", 1), (lt, ":random_kingdom_hero", 0), (assign, ":cur_object_troop", ":cur_kingdom_hero"), (try_end), (assign, ":cur_target_center", -1), (call_script, "script_get_troop_attached_party", ":cur_target_troop"), (is_between, reg0, towns_begin, towns_end), (party_slot_eq, reg0, slot_town_lord, ":cur_target_troop"), (assign, ":cur_target_center", reg0), (assign, ":try_times", -1),#Exit the second loop (assign, ":found", 1), (try_end), (eq, ":found", 1), (assign, "$incriminate_quest_sacrificed_troop", 0), (party_get_num_companion_stacks, ":num_stacks", "p_main_party"), (try_for_range, ":i_stack", 1, ":num_stacks"), (eq ,"$incriminate_quest_sacrificed_troop", 0), (party_stack_get_troop_id, ":stack_troop","p_main_party",":i_stack"), (neg|troop_is_hero, ":stack_troop"), (store_character_level, ":stack_troop_level", ":stack_troop"), (ge, ":stack_troop_level", 25), (assign, "$incriminate_quest_sacrificed_troop", ":stack_troop"), (try_end), (gt, "$incriminate_quest_sacrificed_troop", 0), (assign, ":quest_target_troop", ":cur_target_troop"), (assign, ":quest_object_troop", ":cur_object_troop"), (assign, ":quest_target_center", ":cur_target_center"), (assign, ":quest_target_faction", ":cur_target_faction"), (assign, ":quest_importance", 1), (assign, ":quest_xp_reward", 700), (assign, ":quest_gold_reward", 1000), (assign, ":result", ":quest_no"), (assign, ":quest_expiration_days", 30), (assign, ":quest_dont_give_again_period", 180), (try_end), (else_try), (eq, ":quest_no", "qst_capture_prisoners"), (try_begin), (eq, "$players_kingdom", ":giver_faction_no"), (call_script, "script_cf_faction_get_random_enemy_faction", ":giver_faction_no"),#Can fail (assign, ":cur_target_faction", reg0), (store_add, ":max_tier_no", slot_faction_tier_5_troop, 1), (store_random_in_range, ":random_tier_no", slot_faction_tier_2_troop, ":max_tier_no"), (faction_get_slot, ":cur_target_troop", ":cur_target_faction", ":random_tier_no"), (gt, ":cur_target_troop", 0), (store_random_in_range, ":quest_target_amount", 3, 7), (assign, ":quest_target_troop", ":cur_target_troop"), (assign, ":quest_target_faction", ":cur_target_faction"), (assign, ":quest_importance", 1), (store_character_level, ":quest_gold_reward", ":cur_target_troop"), (val_add, ":quest_gold_reward", 5), (val_mul, ":quest_gold_reward", ":quest_gold_reward"), (val_div, ":quest_gold_reward", 5), (val_mul, ":quest_gold_reward", ":quest_target_amount"), (assign, ":quest_xp_reward", ":quest_gold_reward"), (assign, ":result", ":quest_no"), (assign, ":quest_expiration_days", 90), (assign, ":quest_dont_give_again_period", 20), (try_end), (try_end), (try_end), (try_begin), (neq, ":result", -1), (try_begin), (ge, ":quest_target_center", 0), (store_faction_of_party, ":quest_target_faction", ":quest_target_center"), (try_end), (quest_set_slot, ":result", slot_quest_target_troop, ":quest_target_troop"), (quest_set_slot, ":result", slot_quest_target_center, ":quest_target_center"), (quest_set_slot, ":result", slot_quest_object_troop, ":quest_object_troop"), (quest_set_slot, ":result", slot_quest_target_faction, ":quest_target_faction"), (quest_set_slot, ":result", slot_quest_object_faction, ":quest_object_faction"), (quest_set_slot, ":result", slot_quest_object_center, ":quest_object_center"), (quest_set_slot, ":result", slot_quest_target_party, ":quest_target_party"), (quest_set_slot, ":result", slot_quest_target_party_template, ":quest_target_party_template"), (quest_set_slot, ":result", slot_quest_target_amount, ":quest_target_amount"), (quest_set_slot, ":result", slot_quest_importance, ":quest_importance"), (quest_set_slot, ":result", slot_quest_xp_reward, ":quest_xp_reward"), (quest_set_slot, ":result", slot_quest_gold_reward, ":quest_gold_reward"), (quest_set_slot, ":result", slot_quest_convince_value, ":quest_convince_value"), (quest_set_slot, ":result", slot_quest_expiration_days, ":quest_expiration_days"), (quest_set_slot, ":result", slot_quest_dont_give_again_period, ":quest_dont_give_again_period"), (quest_set_slot, ":result", slot_quest_current_state, 0), (quest_set_slot, ":result", slot_quest_giver_troop, ":giver_troop"), (quest_set_slot, ":result", slot_quest_giver_center, ":giver_center_no"), (quest_set_slot, ":result", slot_quest_target_dna, ":quest_target_dna"), (quest_set_slot, ":result", slot_quest_target_item, ":quest_target_item"), (try_end), (assign, reg0, ":result"), ]), # script_cf_get_random_enemy_center_within_range # Input: arg1 = party_no, arg2 = range (in kms) # Output: reg0 = center_no ("cf_get_random_enemy_center_within_range", [ (store_script_param, ":party_no", 1), (store_script_param, ":range", 2), (assign, ":num_centers", 0), (store_faction_of_party, ":faction_no", ":party_no"), (try_for_range, ":cur_center", centers_begin, centers_end), (store_faction_of_party, ":cur_faction", ":cur_center"), (store_relation, ":cur_relation", ":faction_no", ":cur_faction"), (lt, ":cur_relation", 0), (store_distance_to_party_from_party, ":dist", ":party_no", ":cur_center"), (le, ":dist", ":range"), (val_add, ":num_centers", 1), (try_end), (gt, ":num_centers", 0), (store_random_in_range, ":random_center", 0, ":num_centers"), (assign, ":end_cond", centers_end), (try_for_range, ":cur_center", centers_begin, ":end_cond"), (store_faction_of_party, ":cur_faction", ":cur_center"), (store_relation, ":cur_relation", ":faction_no", ":cur_faction"), (lt, ":cur_relation", 0), (store_distance_to_party_from_party, ":dist", ":party_no", ":cur_center"), (le, ":dist", ":range"), (val_sub, ":random_center", 1), (lt, ":random_center", 0), (assign, ":result", ":cur_center"), (assign, ":end_cond", 0),#break (try_end), (assign, reg0, ":result"), ]), # script_cf_faction_get_random_enemy_faction # Input: arg1 = faction_no # Output: reg0 = faction_no (Can fail) ("cf_faction_get_random_enemy_faction", [ (store_script_param_1, ":faction_no"), (assign, ":result", -1), (assign, ":count_factions", 0), (try_for_range, ":cur_faction", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":cur_faction", slot_faction_state, sfs_active), (store_relation, ":cur_relation", ":faction_no", ":cur_faction"), (le, ":cur_relation", -1), (val_add, ":count_factions", 1), (try_end), (store_random_in_range,":random_faction",0,":count_factions"), (assign, ":count_factions", 0), (try_for_range, ":cur_faction", kingdoms_begin, kingdoms_end), (eq, ":result", -1), (faction_slot_eq, ":cur_faction", slot_faction_state, sfs_active), (store_relation, ":cur_relation", ":faction_no", ":cur_faction"), (le, ":cur_relation", -1), (val_add, ":count_factions", 1), (gt, ":count_factions", ":random_faction"), (assign, ":result", ":cur_faction"), (try_end), (neq, ":result", -1), (assign, reg0, ":result"), ]), # script_cf_faction_get_random_friendly_faction # Input: arg1 = faction_no # Output: reg0 = faction_no (Can fail) ("cf_faction_get_random_friendly_faction", [ (store_script_param_1, ":faction_no"), (assign, ":result", -1), (assign, ":count_factions", 0), (try_for_range, ":cur_faction", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":cur_faction", slot_faction_state, sfs_active), (neq, ":cur_faction", ":faction_no"), (store_relation, ":cur_relation", ":faction_no", ":cur_faction"), (ge, ":cur_relation", 0), (val_add, ":count_factions", 1), (try_end), (store_random_in_range,":random_faction",0,":count_factions"), (assign, ":count_factions", 0), (try_for_range, ":cur_faction", kingdoms_begin, kingdoms_end), (eq, ":result", -1), (faction_slot_eq, ":cur_faction", slot_faction_state, sfs_active), (neq, ":cur_faction", ":faction_no"), (store_relation, ":cur_relation", ":faction_no", ":cur_faction"), (ge, ":cur_relation", 0), (val_add, ":count_factions", 1), (gt, ":count_factions", ":random_faction"), (assign, ":result", ":cur_faction"), (try_end), (neq, ":result", -1), (assign, reg0, ":result"), ]), # script_cf_troop_get_random_enemy_troop_with_occupation # Input: arg1 = troop_no, # Output: reg0 = enemy_troop_no (Can fail) ("cf_troop_get_random_enemy_troop_with_occupation", [ (store_script_param_1, ":troop_no"), (store_script_param_2, ":occupation"), (assign, ":result", -1), (assign, ":count_enemies", 0), (try_for_range, ":cur_slot", slot_troop_enemies_begin, slot_troop_enemies_end), (troop_get_slot, ":cur_enemy", ":troop_no", ":cur_slot"), (gt, ":cur_enemy", 0), (troop_slot_eq, ":cur_enemy", slot_troop_occupation, ":occupation"), (val_add, ":count_enemies", 1), (try_end), (store_random_in_range,":random_enemy",0,":count_enemies"), (assign, ":count_enemies", 0), (try_for_range, ":cur_slot", slot_troop_enemies_begin, slot_troop_enemies_end), (eq, ":result", -1), (troop_get_slot, ":cur_enemy", ":troop_no", ":cur_slot"), (gt, ":cur_enemy", 0), (troop_slot_eq, ":cur_enemy", slot_troop_occupation, ":occupation"), (val_add, ":count_enemies", 1), (gt, ":count_enemies", ":random_enemy"), (assign, ":result", ":cur_enemy"), (try_end), (neq, ":result", -1), (assign, reg0, ":result"), ]), ## # script_cf_troop_get_random_enemy_troop_as_a_town_lord ## # Input: arg1 = troop_no ## # Output: reg0 = enemy_troop_no (Can fail) ## ("cf_troop_get_random_enemy_troop_as_a_town_lord", ## [ ## (store_script_param_1, ":troop_no"), ## ## (assign, ":result", -1), ## (assign, ":count_enemies", 0), ## (try_for_range, ":cur_slot", slot_troop_enemies_begin, slot_troop_enemies_end), ## (troop_get_slot, ":cur_enemy", ":troop_no", ":cur_slot"), ## (gt, ":cur_enemy", 0), ## (troop_slot_eq, ":cur_enemy", slot_troop_occupation, slto_kingdom_hero), ## (call_script, "script_get_number_of_hero_centers", ":cur_enemy"), ## (gt, reg0, 0), ## (val_add, ":count_enemies", 1), ## (try_end), ## (store_random_in_range,":random_enemy",0,":count_enemies"), ## (assign, ":count_enemies", 0), ## (try_for_range, ":cur_slot", slot_troop_enemies_begin, slot_troop_enemies_end), ## (eq, ":result", -1), ## (troop_get_slot, ":cur_enemy", ":troop_no", ":cur_slot"), ## (gt, ":cur_enemy", 0), ## (troop_slot_eq, ":cur_enemy", slot_troop_occupation, slto_kingdom_hero), ## (call_script, "script_get_number_of_hero_centers", ":cur_enemy"), ## (gt, reg0, 0), ## (val_add, ":count_enemies", 1), ## (gt, ":count_enemies", ":random_enemy"), ## (assign, ":result", ":cur_enemy"), ## (try_end), ## (neq, ":result", -1), ## (assign, reg0, ":result"), ## ]), ## # script_cf_get_random_enemy_with_valid_slot ## # Input: arg1 = faction_no, arg2 = slot_no ## # Output: reg0 = faction_no (Can fail) ## ("cf_get_random_enemy_with_valid_slot", ## [ ## (store_script_param_1, ":faction_no"), ## (store_script_param_2, ":slot_no"), ## ## (assign, ":result", -1), ## (assign, ":count_factions", 0), ## (try_for_range, ":cur_faction", kingdoms_begin, kingdoms_end), ## (store_relation, ":cur_relation", ":faction_no", ":cur_faction"), ## (le, ":cur_relation", -10), ## (faction_get_slot, ":cur_value", ":cur_faction", ":slot_no"), ## (gt, ":cur_value", 0),#Checking validity ## (val_add, ":count_factions", 1), ## (try_end), ## (store_random_in_range,":random_faction",0,":count_factions"), ## (assign, ":count_factions", 0), ## (try_for_range, ":cur_faction", kingdoms_begin, kingdoms_end), ## (eq, ":result", -1), ## (store_relation, ":cur_relation", ":faction_no", ":cur_faction"), ## (le, ":cur_relation", -10), ## (faction_get_slot, ":cur_value", ":cur_faction", ":slot_no"), ## (gt, ":cur_value", 0),#Checking validity ## (val_add, ":count_factions", 1), ## (gt, ":count_factions", ":random_faction"), ## (assign, ":result", ":cur_faction"), ## (try_end), ## ## (neq, ":result", -1), ## (assign, reg0, ":result"), ## ]), ## # script_cf_get_random_kingdom_hero ## # Input: arg1 = faction_no ## # Output: reg0 = troop_no (Can fail) ## ("cf_get_random_kingdom_hero", ## [ ## (store_script_param_1, ":faction_no"), ## (assign, ":count_heroes", 0), ## (try_for_range, ":center_no", centers_begin, centers_end), ## (store_faction_of_party, ":cur_faction", ":center_no"), ## (eq, ":cur_faction", ":faction_no"), ## (party_get_slot, ":cur_lord", ":center_no", slot_town_lord), ## (is_between, ":cur_lord", heroes_begin, heroes_end), ## (val_add, ":count_heroes", 1), ## (try_end), ## (store_random_in_range, ":random_hero", 0, ":count_heroes"), ## (assign, ":result", -1), ## (assign, ":count_heroes", 0), ## (try_for_range, ":center_no", centers_begin, centers_end), ## (eq, ":result", -1), ## (store_faction_of_party, ":cur_faction", ":center_no"), ## (eq, ":cur_faction", ":faction_no"), ## (party_get_slot, ":cur_lord", ":center_no", slot_town_lord), ## (is_between, ":cur_lord", heroes_begin, heroes_end), ## (val_add, ":count_heroes", 1), ## (lt, ":random_hero", ":count_heroes"), ## (assign, ":result", ":cur_lord"), ## (try_end), ## (neq, ":result", -1), ## (assign, reg0, ":result"), ## ]), # script_cf_get_random_kingdom_hero_as_lover # Input: arg1 = troop_no (of the lady) # Output: reg0 = troop_no (of the hero) (Can fail) ("cf_get_random_kingdom_hero_as_lover", [ # (store_script_param_1, ":cur_lady"), # (troop_get_slot, ":cur_father", ":cur_lady", slot_troop_father), # (troop_get_slot, ":fathers_rank", ":cur_father", slot_troop_kingdom_rank), (assign, ":result", -1), (assign, ":count_heroes", 0), (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (troop_slot_eq, ":troop_no", slot_troop_lover, 0), (troop_slot_eq, ":troop_no", slot_troop_spouse, 0), # (troop_get_slot, ":cur_rank", ":troop_no", slot_troop_kingdom_rank), # (lt, ":cur_rank", ":fathers_rank"), # Only heroes with lower ranks may be the lovers of the daughters (val_add, ":count_heroes", 1), (try_end), (store_random_in_range,":random_hero",0,":count_heroes"), (assign, ":count_heroes", 0), (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (eq, ":result", -1), (troop_slot_eq, ":troop_no", slot_troop_lover, 0), (troop_slot_eq, ":troop_no", slot_troop_spouse, 0), # (troop_get_slot, ":cur_rank", ":troop_no", slot_troop_kingdom_rank), # (lt, ":cur_rank", ":fathers_rank"), # Only heroes with lower ranks may be the lovers of the daughters (val_add, ":count_heroes", 1), (gt, ":count_heroes", ":random_hero"), (assign, ":result", ":troop_no"), (try_end), (neq, ":result", -1), (assign, reg0, ":result"), ]), ## # script_cf_get_random_siege_location_with_faction ## # Input: arg1 = faction_no ## # Output: reg0 = center_no, Can Fail! ## ("cf_get_random_siege_location_with_faction", ## [ ## (store_script_param_1, ":faction_no"), ## (assign, ":result", -1), ## (assign, ":count_sieges", 0), ## (try_for_range, ":center_no", walled_centers_begin, walled_centers_end), ## (party_get_battle_opponent, ":besieger_party", ":center_no"), ## (gt, ":besieger_party", 0), ## (store_faction_of_party, ":cur_faction_no", ":center_no"), ## (eq, ":cur_faction_no", ":faction_no"), ## (val_add, ":count_sieges", 1), ## (try_end), ## (store_random_in_range,":random_center",0,":count_sieges"), ## (assign, ":count_sieges", 0), ## (try_for_range, ":center_no", walled_centers_begin, walled_centers_end), ## (eq, ":result", -1), ## (party_get_battle_opponent, ":besieger_party", ":center_no"), ## (gt, ":besieger_party", 0), ## (store_faction_of_party, ":cur_faction_no", ":center_no"), ## (eq, ":cur_faction_no", ":faction_no"), ## (val_add, ":count_sieges", 1), ## (gt, ":count_sieges", ":random_center"), ## (assign, ":result", ":center_no"), ## (try_end), ## (neq, ":result", -1), ## (assign, reg0, ":result"), ## ]), ## # script_cf_get_random_siege_location_with_attacker_faction ## # Input: arg1 = faction_no ## # Output: reg0 = center_no, Can Fail! ## ("cf_get_random_siege_location_with_attacker_faction", ## [ ## (store_script_param_1, ":faction_no"), ## (assign, ":result", -1), ## (assign, ":count_sieges", 0), ## (try_for_range, ":center_no", walled_centers_begin, walled_centers_end), ## (party_get_battle_opponent, ":besieger_party", ":center_no"), ## (gt, ":besieger_party", 0), ## (store_faction_of_party, ":cur_faction_no", ":besieger_party"), ## (eq, ":cur_faction_no", ":faction_no"), ## (val_add, ":count_sieges", 1), ## (try_end), ## (store_random_in_range,":random_center",0,":count_sieges"), ## (assign, ":count_sieges", 0), ## (try_for_range, ":center_no", walled_centers_begin, walled_centers_end), ## (eq, ":result", -1), ## (party_get_battle_opponent, ":besieger_party", ":center_no"), ## (gt, ":besieger_party", 0), ## (store_faction_of_party, ":cur_faction_no", ":besieger_party"), ## (eq, ":cur_faction_no", ":faction_no"), ## (val_add, ":count_sieges", 1), ## (gt, ":count_sieges", ":random_center"), ## (assign, ":result", ":center_no"), ## (try_end), ## (neq, ":result", -1), ## (assign, reg0, ":result"), ## ]), ## # script_cf_get_number_of_random_troops_from_party ## # Input: arg1 = party_no, arg2 = number of troops to remove ## # Output: reg0 = troop_no, Can fail if there are no slots having the required number of units! ## ("cf_get_number_of_random_troops_from_party", ## [ ## (store_script_param_1, ":party_no"), ## (store_script_param_2, ":no_to_remove"), ## ## (assign, ":result", -1), ## (assign, ":count_stacks", 0), ## ## (party_get_num_companion_stacks, ":num_stacks",":party_no"), ## (try_for_range, ":i_stack", 0, ":num_stacks"), ## (party_stack_get_size, ":stack_size",":party_no",":i_stack"), ## (party_stack_get_num_wounded, ":num_wounded",":party_no",":i_stack"), ## (val_sub, ":stack_size", ":num_wounded"), ## (ge, ":stack_size", ":no_to_remove"), ## (party_stack_get_troop_id, ":stack_troop",":party_no",":i_stack"), ## (neg|troop_is_hero, ":stack_troop"), ## (val_add, ":count_stacks", 1), ## (try_end), ## (store_random_in_range,":random_stack",0,":count_stacks"), ## (assign, ":count_stacks", 0), ## (try_for_range, ":i_stack", 0, ":num_stacks"), ## (eq, ":result", -1), ## (party_stack_get_size, ":stack_size",":party_no",":i_stack"), ## (party_stack_get_num_wounded, ":num_wounded",":party_no",":i_stack"), ## (val_sub, ":stack_size", ":num_wounded"), ## (ge, ":stack_size", ":no_to_remove"), ## (party_stack_get_troop_id, ":stack_troop",":party_no",":i_stack"), ## (neg|troop_is_hero, ":stack_troop"), ## (val_add, ":count_stacks", 1), ## (gt, ":count_stacks", ":random_stack"), ## (assign, ":result", ":stack_troop"), ## (try_end), ## ## (neq, ":result", -1), ## (assign, reg0, ":result"), ## ]), # script_cf_get_random_lord_in_a_center_with_faction # Input: arg1 = faction_no # Output: reg0 = troop_no, Can Fail! ("cf_get_random_lord_in_a_center_with_faction", [ (store_script_param_1, ":faction_no"), (assign, ":result", -1), (assign, ":count_lords", 0), (try_for_range, ":lord_no", heroes_begin, heroes_end), (store_troop_faction, ":lord_faction_no", ":lord_no"), (eq, ":faction_no", ":lord_faction_no"), (troop_slot_eq, ":lord_no", slot_troop_occupation, slto_kingdom_hero), #(troop_slot_eq, ":lord_no", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":lord_no", slot_troop_prisoner_of_party, 0), (troop_get_slot, ":lord_party", ":lord_no", slot_troop_leaded_party), (ge, ":lord_party", 0), (party_get_attached_to, ":lord_attachment", ":lord_party"), (is_between, ":lord_attachment", centers_begin, centers_end), #is troop in a center? (val_add, ":count_lords", 1), (try_end), (store_random_in_range, ":random_lord", 0, ":count_lords"), (assign, ":count_lords", 0), (try_for_range, ":lord_no", heroes_begin, heroes_end), (eq, ":result", -1), (store_troop_faction, ":lord_faction_no", ":lord_no"), (eq, ":faction_no", ":lord_faction_no"), (troop_slot_eq, ":lord_no", slot_troop_occupation, slto_kingdom_hero), #(troop_slot_eq, ":lord_no", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":lord_no", slot_troop_prisoner_of_party, 0), (troop_get_slot, ":lord_party", ":lord_no", slot_troop_leaded_party), (ge, ":lord_party", 0), (party_get_attached_to, ":lord_attachment", ":lord_party"), (is_between, ":lord_attachment", centers_begin, centers_end), #is troop in a center? (val_add, ":count_lords", 1), (lt, ":random_lord", ":count_lords"), (assign, ":result", ":lord_no"), (try_end), (neq, ":result", -1), (assign, reg0, ":result"), ]), # script_cf_get_random_lord_except_king_with_faction # Input: arg1 = faction_no # Output: reg0 = troop_no, Can Fail! ("cf_get_random_lord_except_king_with_faction", [ (store_script_param_1, ":faction_no"), (assign, ":result", -1), (assign, ":count_lords", 0), (try_for_range, ":lord_no", heroes_begin, heroes_end), (store_troop_faction, ":lord_faction_no", ":lord_no"), (eq, ":faction_no", ":lord_faction_no"), (neg|faction_slot_eq, ":faction_no", slot_faction_leader, ":lord_no"), (troop_slot_eq, ":lord_no", slot_troop_occupation, slto_kingdom_hero), #(troop_slot_eq, ":lord_no", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":lord_no", slot_troop_prisoner_of_party, 0), (troop_get_slot, ":lord_party", ":lord_no", slot_troop_leaded_party), (ge, ":lord_party", 0), (val_add, ":count_lords", 1), (try_end), (store_random_in_range, ":random_lord", 0, ":count_lords"), (assign, ":count_lords", 0), (try_for_range, ":lord_no", heroes_begin, heroes_end), (eq, ":result", -1), (store_troop_faction, ":lord_faction_no", ":lord_no"), (eq, ":faction_no", ":lord_faction_no"), (neg|faction_slot_eq, ":faction_no", slot_faction_leader, ":lord_no"), (troop_slot_eq, ":lord_no", slot_troop_occupation, slto_kingdom_hero), #(troop_slot_eq, ":lord_no", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":lord_no", slot_troop_prisoner_of_party, 0), (troop_get_slot, ":lord_party", ":lord_no", slot_troop_leaded_party), (ge, ":lord_party", 0), (val_add, ":count_lords", 1), (lt, ":random_lord", ":count_lords"), (assign, ":result", ":lord_no"), (try_end), (neq, ":result", -1), (assign, reg0, ":result"), ]), # script_cf_get_random_lord_from_another_faction_in_a_center # Input: arg1 = faction_no # Output: reg0 = troop_no, Can Fail! ("cf_get_random_lord_from_another_faction_in_a_center", [ (store_script_param_1, ":faction_no"), (assign, ":result", -1), (assign, ":count_lords", 0), (try_for_range, ":lord_no", heroes_begin, heroes_end), (store_troop_faction, ":lord_faction_no", ":lord_no"), (neq, ":lord_faction_no", ":faction_no"), (store_relation, ":our_relation", ":lord_faction_no", "fac_player_supporters_faction"), (store_relation, ":lord_relation", ":lord_faction_no", ":faction_no"), (lt, ":lord_relation", 0), (ge, ":our_relation", 0), (troop_slot_eq, ":lord_no", slot_troop_occupation, slto_kingdom_hero), #(troop_slot_eq, ":lord_no", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":lord_no", slot_troop_prisoner_of_party, 0), (troop_get_slot, ":lord_party", ":lord_no", slot_troop_leaded_party), (ge, ":lord_party", 0), (party_get_attached_to, ":lord_attachment", ":lord_party"), (is_between, ":lord_attachment", centers_begin, centers_end), #is troop in a center? (val_add, ":count_lords", 1), (try_end), (store_random_in_range, ":random_lord", 0, ":count_lords"), (assign, ":count_lords", 0), (try_for_range, ":lord_no", heroes_begin, heroes_end), (eq, ":result", -1), (store_troop_faction, ":lord_faction_no", ":lord_no"), (neq, ":lord_faction_no", ":faction_no"), (store_relation, ":our_relation", ":lord_faction_no", "fac_player_supporters_faction"), (store_relation, ":lord_relation", ":lord_faction_no", ":faction_no"), (lt, ":lord_relation", 0), (ge, ":our_relation", 0), (troop_slot_eq, ":lord_no", slot_troop_occupation, slto_kingdom_hero), #(troop_slot_eq, ":lord_no", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":lord_no", slot_troop_prisoner_of_party, 0), (troop_get_slot, ":lord_party", ":lord_no", slot_troop_leaded_party), (ge, ":lord_party", 0), (party_get_attached_to, ":lord_attachment", ":lord_party"), (is_between, ":lord_attachment", centers_begin, centers_end), #is troop in a center? (val_add, ":count_lords", 1), (lt, ":random_lord", ":count_lords"), (assign, ":result", ":lord_no"), (try_end), (neq, ":result", -1), (assign, reg0, ":result"), ]), # script_get_closest_walled_center # Input: arg1 = party_no # Output: reg0 = center_no (closest) ("get_closest_walled_center", [ (store_script_param_1, ":party_no"), (assign, ":min_distance", 9999999), (assign, reg0, -1), (try_for_range, ":center_no", walled_centers_begin, walled_centers_end), (store_distance_to_party_from_party, ":party_distance", ":party_no", ":center_no"), (lt, ":party_distance", ":min_distance"), (assign, ":min_distance", ":party_distance"), (assign, reg0, ":center_no"), (try_end), ]), # script_get_closest_center # Input: arg1 = party_no # Output: reg0 = center_no (closest) ("get_closest_center", [ (store_script_param_1, ":party_no"), (assign, ":min_distance", 9999999), (assign, reg0, -1), (try_for_range, ":center_no", centers_begin, centers_end), (store_distance_to_party_from_party, ":party_distance", ":party_no", ":center_no"), (lt, ":party_distance", ":min_distance"), (assign, ":min_distance", ":party_distance"), (assign, reg0, ":center_no"), (try_end), ]), # script_get_closest_center_of_faction # Input: arg1 = party_no, arg2 = kingdom_no # Output: reg0 = center_no (closest) ("get_closest_center_of_faction", [ (store_script_param_1, ":party_no"), (store_script_param_2, ":kingdom_no"), (assign, ":min_distance", 99999), (assign, ":result", -1), (try_for_range, ":center_no", centers_begin, centers_end), (store_faction_of_party, ":faction_no", ":center_no"), (eq, ":faction_no", ":kingdom_no"), (store_distance_to_party_from_party, ":party_distance", ":party_no", ":center_no"), (lt, ":party_distance", ":min_distance"), (assign, ":min_distance", ":party_distance"), (assign, ":result", ":center_no"), (try_end), (assign, reg0, ":result"), ]), # script_get_closest_walled_center_of_faction # Input: arg1 = party_no, arg2 = kingdom_no # Output: reg0 = center_no (closest) ("get_closest_walled_center_of_faction", [ (store_script_param_1, ":party_no"), (store_script_param_2, ":kingdom_no"), (assign, ":min_distance", 99999), (assign, ":result", -1), (try_for_range, ":center_no", walled_centers_begin, walled_centers_end), (store_faction_of_party, ":faction_no", ":center_no"), (eq, ":faction_no", ":kingdom_no"), (store_distance_to_party_from_party, ":party_distance", ":party_no", ":center_no"), (lt, ":party_distance", ":min_distance"), (assign, ":min_distance", ":party_distance"), (assign, ":result", ":center_no"), (try_end), (assign, reg0, ":result"), ]), ## # script_get_closest_town_of_faction ## # Input: arg1 = party_no, arg2 = kingdom_no ## # Output: reg0 = center_no (closest) ## ("get_closest_town_of_faction", ## [ ## (store_script_param_1, ":party_no"), ## (store_script_param_2, ":kingdom_no"), ## (assign, ":min_distance", 9999999), ## (assign, ":result", -1), ## (try_for_range, ":center_no", walled_centers_begin, walled_centers_end), ## (store_faction_of_party, ":faction_no", ":center_no"), ## (eq, ":faction_no", ":kingdom_no"), ## (party_slot_eq, ":center_no", slot_party_type, spt_town), ## (store_distance_to_party_from_party, ":party_distance", ":party_no", ":center_no"), ## (lt, ":party_distance", ":min_distance"), ## (assign, ":min_distance", ":party_distance"), ## (assign, ":result", ":center_no"), ## (try_end), ## (assign, reg0, ":result"), ## ]), # script_let_nearby_parties_join_current_battle # Input: arg1 = besiege_mode, arg2 = dont_add_friends # Output: none ("let_nearby_parties_join_current_battle", [ (store_script_param, ":besiege_mode", 1), (store_script_param, ":dont_add_friends", 2), (assign, ":join_distance", 5), (try_begin), (is_currently_night), (assign, ":join_distance", 3), (try_end), (try_for_parties, ":party_no"), (party_get_battle_opponent, ":opponent",":party_no"), (lt, ":opponent", 0), #party is not itself involved in a battle (party_get_attached_to, ":attached_to",":party_no"), (lt, ":attached_to", 0), #party is not attached to another party (get_party_ai_behavior, ":behavior", ":party_no"), (neq, ":behavior", ai_bhvr_in_town), (store_distance_to_party_from_party, ":distance", ":party_no", "p_main_party"), (lt, ":distance", ":join_distance"), (store_faction_of_party, ":faction_no", ":party_no"), (store_faction_of_party, ":enemy_faction", "$g_enemy_party"), (try_begin), (eq, ":faction_no", "fac_player_supporters_faction"), (assign, ":reln_with_player", 100), (else_try), (store_relation, ":reln_with_player", ":faction_no", "fac_player_supporters_faction"), (try_end), (try_begin), (eq, ":faction_no", ":enemy_faction"), (assign, ":reln_with_enemy", 100), (else_try), (store_relation, ":reln_with_enemy", ":faction_no", ":enemy_faction"), (try_end), (assign, ":enemy_side", 1), (try_begin), (neq, "$g_enemy_party", "$g_encountered_party"), (assign, ":enemy_side", 2), (try_end), (try_begin), (eq, ":besiege_mode", 0), (lt, ":reln_with_player", 0), (gt, ":reln_with_enemy", 0), (party_get_slot, ":party_type", ":party_no"), (eq, ":party_type", spt_kingdom_hero_party), (get_party_ai_behavior, ":ai_bhvr", ":party_no"), (neq, ":ai_bhvr", ai_bhvr_avoid_party), (party_quick_attach_to_current_battle, ":party_no", ":enemy_side"), #attach as enemy (str_store_party_name, s1, ":party_no"), (display_message, "str_s1_joined_battle_enemy"), (else_try), (eq, ":dont_add_friends", 0), (gt, ":reln_with_player", 0), (lt, ":reln_with_enemy", 0), (assign, ":do_join", 1), (try_begin), (eq, ":besiege_mode", 1), (assign, ":do_join", 0), (eq, ":faction_no", "$players_kingdom"), (faction_slot_eq, "$players_kingdom", slot_faction_marshall, "trp_player"), (assign, ":do_join", 1), (try_end), (eq, ":do_join", 1), (party_get_slot, ":party_type", ":party_no"), (eq, ":party_type", spt_kingdom_hero_party), (party_stack_get_troop_id, ":leader", ":party_no", 0), # (troop_get_slot, ":player_relation", ":leader", slot_troop_player_relation), (call_script, "script_troop_get_player_relation", ":leader"), (assign, ":player_relation", reg0), (ge, ":player_relation", 0), (party_quick_attach_to_current_battle, ":party_no", 0), #attach as friend (str_store_party_name, s1, ":party_no"), (display_message, "str_s1_joined_battle_friend"), (try_end), (try_end), ]), # script_party_wound_all_members_aux # Input: arg1 = party_no ("party_wound_all_members_aux", [ (store_script_param_1, ":party_no"), (party_get_num_companion_stacks, ":num_stacks",":party_no"), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop",":party_no",":i_stack"), (try_begin), (neg|troop_is_hero, ":stack_troop"), (party_stack_get_size, ":stack_size",":party_no",":i_stack"), (party_wound_members, ":party_no", ":stack_troop", ":stack_size"), (else_try), (troop_set_health, ":stack_troop", 0), (try_end), (try_end), (party_get_num_attached_parties, ":num_attached_parties", ":party_no"), (try_for_range, ":attached_party_rank", 0, ":num_attached_parties"), (party_get_attached_party_with_rank, ":attached_party", ":party_no", ":attached_party_rank"), (call_script, "script_party_wound_all_members_aux", ":attached_party"), (try_end), ]), # script_party_wound_all_members # Input: arg1 = party_no ("party_wound_all_members", [ (store_script_param_1, ":party_no"), (call_script, "script_party_wound_all_members_aux", ":party_no"), ]), # script_calculate_battle_advantage # Output: reg0 = battle advantage ("calculate_battle_advantage", [ (call_script, "script_party_count_fit_for_battle", "p_collective_friends"), (assign, ":friend_count", reg(0)), (party_get_skill_level, ":player_party_tactics", "p_main_party", skl_tactics), (party_get_skill_level, ":ally_party_tactics", "p_collective_friends", skl_tactics), (val_max, ":player_party_tactics", ":ally_party_tactics"), (call_script, "script_party_count_fit_for_battle", "p_collective_enemy"), (assign, ":enemy_count", reg(0)), (party_get_skill_level, ":enemy_party_tactics", "p_collective_enemy", skl_tactics), (val_add, ":friend_count", 1), (val_add, ":enemy_count", 1), (try_begin), (ge, ":friend_count", ":enemy_count"), (val_mul, ":friend_count", 100), (store_div, ":ratio", ":friend_count", ":enemy_count"), (store_sub, ":raw_advantage", ":ratio", 100), (else_try), (val_mul, ":enemy_count", 100), (store_div, ":ratio", ":enemy_count", ":friend_count"), (store_sub, ":raw_advantage", 100, ":ratio"), (try_end), (val_mul, ":raw_advantage", 2), (val_mul, ":player_party_tactics", 30), (val_mul, ":enemy_party_tactics", 30), (val_add, ":raw_advantage", ":player_party_tactics"), (val_sub, ":raw_advantage", ":enemy_party_tactics"), (val_div, ":raw_advantage", 100), (assign, reg0, ":raw_advantage"), (display_message, "@Battle Advantage = {reg0}.", 0xFFFFFFFF), ]), # script_cf_check_enemies_nearby # Input: none # Output: none, fails when enemies are nearby ("cf_check_enemies_nearby", [ (get_player_agent_no, ":player_agent"), (agent_is_alive, ":player_agent"), (agent_get_position, pos1, ":player_agent"), (assign, ":result", 0), (set_fixed_point_multiplier, 100), (try_for_agents,":cur_agent"), (neq, ":cur_agent", ":player_agent"), (agent_is_alive, ":cur_agent"), (agent_is_human, ":cur_agent"), (neg|agent_is_ally, ":cur_agent"), (agent_get_position, pos2, ":cur_agent"), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 1500), #15 meters (assign, ":result", 1), (try_end), (eq, ":result", 0), ]), # script_get_heroes_attached_to_center_aux # For internal use only ("get_heroes_attached_to_center_aux", [ (store_script_param_1, ":center_no"), (store_script_param_2, ":party_no_to_collect_heroes"), (party_get_num_companion_stacks, ":num_stacks",":center_no"), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop",":center_no",":i_stack"), (troop_is_hero, ":stack_troop"), (party_add_members, ":party_no_to_collect_heroes", ":stack_troop", 1), (try_end), (party_get_num_attached_parties, ":num_attached_parties", ":center_no"), (try_for_range, ":attached_party_rank", 0, ":num_attached_parties"), (party_get_attached_party_with_rank, ":attached_party", ":center_no", ":attached_party_rank"), (call_script, "script_get_heroes_attached_to_center_aux", ":attached_party", ":party_no_to_collect_heroes"), (try_end), ]), # script_get_heroes_attached_to_center # Input: arg1 = center_no, arg2 = party_no_to_collect_heroes # Output: none, adds heroes to the party_no_to_collect_heroes party ("get_heroes_attached_to_center", [ (store_script_param_1, ":center_no"), (store_script_param_2, ":party_no_to_collect_heroes"), (party_clear, ":party_no_to_collect_heroes"), (call_script, "script_get_heroes_attached_to_center_aux", ":center_no", ":party_no_to_collect_heroes"), #rebellion changes begin -Arma (try_for_range, ":pretender", pretenders_begin, pretenders_end), (neq, ":pretender", "$supported_pretender"), (troop_slot_eq, ":pretender", slot_troop_cur_center, ":center_no"), (party_add_members, ":party_no_to_collect_heroes", ":pretender", 1), (try_end), # (try_for_range, ":rebel_faction", rebel_factions_begin, rebel_factions_end), # (faction_slot_eq, ":rebel_faction", slot_faction_state, sfs_inactive_rebellion), # (faction_slot_eq, ":rebel_faction", slot_faction_inactive_leader_location, ":center_no"), # (faction_get_slot, ":pretender", ":rebel_faction", slot_faction_leader), # (party_add_members, ":party_no_to_collect_heroes", ":pretender", 1), # (try_end), #rebellion changes end ]), # script_get_heroes_attached_to_center_as_prisoner_aux # For internal use only ("get_heroes_attached_to_center_as_prisoner_aux", [ (store_script_param_1, ":center_no"), (store_script_param_2, ":party_no_to_collect_heroes"), (party_get_num_prisoner_stacks, ":num_stacks",":center_no"), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_prisoner_stack_get_troop_id, ":stack_troop",":center_no",":i_stack"), (troop_is_hero, ":stack_troop"), (party_add_members, ":party_no_to_collect_heroes", ":stack_troop", 1), (try_end), (party_get_num_attached_parties, ":num_attached_parties", ":center_no"), (try_for_range, ":attached_party_rank", 0, ":num_attached_parties"), (party_get_attached_party_with_rank, ":attached_party", ":center_no", ":attached_party_rank"), (call_script, "script_get_heroes_attached_to_center_as_prisoner_aux", ":attached_party", ":party_no_to_collect_heroes"), (try_end), ]), # script_get_heroes_attached_to_center_as_prisoner # Input: arg1 = center_no, arg2 = party_no_to_collect_heroes # Output: none, adds heroes to the party_no_to_collect_heroes party ("get_heroes_attached_to_center_as_prisoner", [ (store_script_param_1, ":center_no"), (store_script_param_2, ":party_no_to_collect_heroes"), (party_clear, ":party_no_to_collect_heroes"), (call_script, "script_get_heroes_attached_to_center_as_prisoner_aux", ":center_no", ":party_no_to_collect_heroes"), ]), ## ## # script_cf_get_party_leader ## # Input: arg1 = party_no ## # Output: reg0 = troop_no of the leader (Can fail) ## ("cf_get_party_leader", ## [ ## (store_script_param_1, ":party_no"), ## ## (party_get_num_companion_stacks, ":num_stacks",":party_no"), ## (gt, ":num_stacks", 0), ## (party_stack_get_troop_id, ":stack_troop", ":party_no", 0), ## (troop_is_hero, ":stack_troop"), ## (assign, reg0, ":stack_troop"), ## ]), # script_give_center_to_faction # Input: arg1 = center_no, arg2 = faction ("give_center_to_faction", [ (store_script_param_1, ":center_no"), (store_script_param_2, ":faction_no"), (try_begin), (check_quest_active, "qst_join_siege_with_army"), (quest_slot_eq, "qst_join_siege_with_army", slot_quest_target_center, ":center_no"), (call_script, "script_abort_quest", "qst_join_siege_with_army", 0), #Reactivating follow army quest (faction_get_slot, ":faction_marshall", "$players_kingdom", slot_faction_marshall), (str_store_troop_name_link, s9, ":faction_marshall"), (setup_quest_text, "qst_follow_army"), (str_store_string, s2, "@{s9} wants you to resume following his army until further notice."), (call_script, "script_start_quest", "qst_follow_army", ":faction_marshall"), (assign, "$g_player_follow_army_warnings", 0), (try_end), (store_faction_of_party, ":old_faction", ":center_no"), (call_script, "script_give_center_to_faction_aux", ":center_no", ":faction_no"), (call_script, "script_update_village_market_towns"), (try_for_range, ":cur_faction", kingdoms_begin, kingdoms_end), (call_script, "script_faction_recalculate_strength", ":cur_faction"), (try_end), (assign, "$g_recalculate_ais", 1), (call_script, "script_activate_deactivate_player_faction", ":old_faction"), (try_begin), (eq, ":faction_no", "fac_player_supporters_faction"), (faction_slot_eq, "fac_player_supporters_faction", slot_faction_leader, "trp_player"), (call_script, "script_give_center_to_lord", ":center_no", "trp_player", 0), (try_for_range, ":cur_village", villages_begin, villages_end), (store_faction_of_party, ":cur_village_faction", ":cur_village"), (eq, ":cur_village_faction", "fac_player_supporters_faction"), (neg|party_slot_eq, ":cur_village", slot_town_lord, "trp_player"), (call_script, "script_give_center_to_lord", ":cur_village", "trp_player", 0), (try_end), (try_end), ]), # script_give_center_to_faction_aux # Input: arg1 = center_no, arg2 = faction ("give_center_to_faction_aux", [ (store_script_param_1, ":center_no"), (store_script_param_2, ":faction_no"), (store_faction_of_party, ":old_faction", ":center_no"), (party_set_slot, ":center_no", slot_center_ex_faction, ":old_faction"), (party_set_faction, ":center_no", ":faction_no"), (try_begin), (party_slot_eq, ":center_no", slot_party_type, spt_village), (party_get_slot, ":farmer_party", ":center_no", slot_village_farmer_party), (gt, ":farmer_party", 0), (party_is_active, ":farmer_party"), (party_set_faction, ":farmer_party", ":faction_no"), (try_end), (party_get_slot, ":old_town_lord", ":center_no", slot_town_lord), (party_set_slot, ":center_no", slot_town_lord, stl_unassigned), (party_set_banner_icon, ":center_no", 0),#Removing banner (call_script, "script_update_faction_notes", ":old_faction"), (call_script, "script_update_faction_notes", ":faction_no"), (call_script, "script_update_center_notes", ":center_no"), (try_begin), (ge, ":old_town_lord", 0), (call_script, "script_update_troop_notes", ":old_town_lord"), (try_end), (try_for_range, ":other_center", centers_begin, centers_end), (party_slot_eq, ":other_center", slot_village_bound_center, ":center_no"), (call_script, "script_give_center_to_faction_aux", ":other_center", ":faction_no"), (try_end), ]), # script_change_troop_faction # Input: arg1 = troop_no, arg2 = faction ("change_troop_faction", [ (store_script_param_1, ":troop_no"), (store_script_param_2, ":faction_no"), (try_begin), #Reactivating inactive or defeated faction (is_between, ":faction_no", kingdoms_begin, kingdoms_end), (neg|faction_slot_eq, ":faction_no", slot_faction_state, sfs_active), (faction_set_slot, ":faction_no", slot_faction_state, sfs_active), (call_script, "script_store_average_center_value_per_faction"), (try_end), (troop_set_faction, ":troop_no", ":faction_no"), (try_for_range, ":center_no", walled_centers_begin, walled_centers_end), (party_slot_eq, ":center_no", slot_town_lord, ":troop_no"), (party_set_faction, ":center_no", ":faction_no"), (try_for_range, ":village_no", villages_begin, villages_end), (party_slot_eq, ":village_no", slot_village_bound_center, ":center_no"), (party_set_faction, ":village_no", ":faction_no"), (party_get_slot, ":farmer_party_no", ":village_no", slot_village_farmer_party), (try_begin), (gt, ":farmer_party_no", 0), (party_is_active, ":farmer_party_no"), (party_set_faction, ":farmer_party_no", ":faction_no"), (try_end), (try_begin), (party_get_slot, ":old_town_lord", ":village_no", slot_town_lord), (neq, ":old_town_lord", ":troop_no"), (party_set_slot, ":village_no", slot_town_lord, stl_unassigned), (try_end), (try_end), (try_end), (try_for_range, ":village_no", villages_begin, villages_end), (party_slot_eq, ":village_no", slot_town_lord, ":troop_no"), (store_faction_of_party, ":village_faction", ":village_no"), (try_begin), (neq, ":village_faction", ":faction_no"), (party_set_slot, ":village_no", slot_town_lord, stl_unassigned), (try_end), (try_end), (try_begin), (troop_get_slot, ":leaded_party", ":troop_no", slot_troop_leaded_party), (ge, ":leaded_party", 0), (party_set_faction, ":leaded_party", ":faction_no"), (party_get_num_prisoner_stacks, ":num_stacks", ":leaded_party"), (try_for_range_backwards, ":troop_iterator", 0, ":num_stacks"), (party_prisoner_stack_get_troop_id, ":cur_troop_id", ":leaded_party", ":troop_iterator"), (store_troop_faction, ":cur_faction", ":cur_troop_id"), (troop_is_hero, ":cur_troop_id"), (eq, ":cur_faction", ":faction_no"), (call_script, "script_remove_troop_from_prison", ":cur_troop_id"), (party_remove_prisoners, ":leaded_party", ":cur_troop_id", 1), (try_end), (try_end), (call_script, "script_update_all_notes"), (call_script, "script_update_village_market_towns"), (assign, "$g_recalculate_ais", 1), ]), # script_give_center_to_lord # Input: arg1 = center_no, arg2 = lord_troop, arg3 = add_garrison_to_center ("give_center_to_lord", [ (store_script_param, ":center_no", 1), (store_script_param, ":lord_troop_id", 2), (store_script_param, ":add_garrison", 3), (party_get_slot, ":old_lord_troop_id", ":center_no", slot_town_lord), (store_troop_faction, ":lord_troop_faction", ":lord_troop_id"), (try_begin), (eq, ":lord_troop_id", "trp_player"), (gt, "$players_kingdom", 0), (party_set_faction, ":center_no", "$players_kingdom"), (else_try), (eq, ":lord_troop_id", "trp_player"), (le, "$players_kingdom", 0), (party_set_faction, ":center_no", "fac_player_supporters_faction"), (else_try), (party_set_faction, ":center_no", ":lord_troop_faction"), (try_end), (party_set_slot, ":center_no", slot_town_lord, ":lord_troop_id"), (try_begin), (party_slot_eq, ":center_no", slot_party_type, spt_village), (party_get_slot, ":farmer_party_no", ":center_no", slot_village_farmer_party), (gt, ":farmer_party_no", 0), (party_is_active, ":farmer_party_no"), (store_faction_of_party, ":center_faction", ":center_no"), (party_set_faction, ":farmer_party_no", ":center_faction"), (try_end), (try_begin), (this_or_next|party_slot_eq, ":center_no", slot_party_type, spt_town), (party_slot_eq, ":center_no", slot_party_type, spt_castle), #normal_banner_begin (troop_get_slot, ":cur_banner", ":lord_troop_id", slot_troop_banner_scene_prop), (gt, ":cur_banner", 0), (val_sub, ":cur_banner", banner_scene_props_begin), (val_add, ":cur_banner", banner_map_icons_begin), (party_set_banner_icon, ":center_no", ":cur_banner"), # custom_banner_begin # (troop_get_slot, ":flag_icon", ":lord_troop_id", slot_troop_custom_banner_map_flag_type), # (ge, ":flag_icon", 0), # (val_add, ":flag_icon", custom_banner_map_icons_begin), # (party_set_banner_icon, ":center_no", ":flag_icon"), (try_end), (try_begin), (eq, ":lord_troop_id", "trp_player"), (neq, ":old_lord_troop_id", "trp_player"), (party_get_slot, ":center_relation", ":center_no", slot_center_player_relation), (is_between, ":center_relation", -4, 5), (call_script, "script_change_player_relation_with_center", ":center_no", 5), (gt, ":old_lord_troop_id", 0), (call_script, "script_change_player_relation_with_troop", ":old_lord_troop_id", -25), (try_end), (call_script, "script_update_troop_notes", ":lord_troop_id"), (call_script, "script_update_center_notes", ":center_no"), (call_script, "script_update_faction_notes", ":lord_troop_faction"), (try_begin), (ge, ":old_lord_troop_id", 0), (call_script, "script_update_troop_notes", ":old_lord_troop_id"), (store_troop_faction, ":old_lord_troop_faction", ":old_lord_troop_id"), (call_script, "script_update_faction_notes", ":old_lord_troop_faction"), (try_end), (try_begin), (eq, ":add_garrison", 1), (this_or_next|party_slot_eq, ":center_no", slot_party_type, spt_town), (party_slot_eq, ":center_no", slot_party_type, spt_castle), (assign, ":garrison_strength", 3), (try_begin), (party_slot_eq, ":center_no", slot_party_type, spt_town), (assign, ":garrison_strength", 9), (try_end), (try_for_range, ":unused", 0, ":garrison_strength"), (call_script, "script_cf_reinforce_party", ":center_no"), (try_end), ## ADD some XP initially (try_for_range, ":unused", 0, 7), (store_random_in_range, ":xp", 1500, 2000), (party_upgrade_with_xp, ":center_no", ":xp", 0), (try_end), (try_end), (try_begin), (party_slot_eq, ":center_no", slot_party_type, spt_castle), (try_for_range, ":cur_village", villages_begin, villages_end), (party_slot_eq, ":cur_village", slot_village_bound_center, ":center_no"), (call_script, "script_give_center_to_lord", ":cur_village", ":lord_troop_id", 0), (try_end), (try_end), ]), ## # script_give_town_to_besiegers ## # Input: arg1 = center_no, arg2 = besieger_party ## ("give_town_to_besiegers", ## [ ## (store_script_param_1, ":center_no"), ## (store_script_param_2, ":besieger_party"), ## (store_faction_of_party, ":besieger_faction", ":besieger_party"), ## ## (try_begin), ## (call_script, "script_cf_get_party_leader", ":besieger_party"), ## (assign, ":new_leader", reg0), ## (else_try), ## (call_script, "script_select_kingdom_hero_for_new_center", ":besieger_faction"), ## (assign, ":new_leader", reg0), ## (try_end), ## ## (call_script, "script_give_center_to_lord", ":center_no", ":new_leader"), ## ## (try_for_parties, ":party_no"), ## (get_party_ai_object, ":object", ":party_no"), ## (get_party_ai_behavior, ":behavior", ":party_no"), ## (eq, ":object", ":center_no"), ## (this_or_next|eq, ":behavior", ai_bhvr_travel_to_party), ## (eq, ":behavior", ai_bhvr_attack_party), ## (party_set_ai_behavior, ":party_no", ai_bhvr_hold), ## (party_set_slot, ":party_no", slot_party_ai_state, spai_undefined), ## (party_set_flags, ":party_no", pf_default_behavior, 0), ## (try_end), ## ## #Staying at the center for a while ## (party_set_ai_behavior, ":besieger_party", ai_bhvr_hold), ## (party_set_slot, ":besieger_party", slot_party_ai_state, spai_undefined), ## (party_set_flags, ":besieger_party", pf_default_behavior, 0), ## ## (faction_get_slot, ":reinforcement_a", ":besieger_faction", slot_faction_reinforcements_a), ## (faction_get_slot, ":reinforcement_b", ":besieger_faction", slot_faction_reinforcements_b), ## (party_add_template, ":center_no", ":reinforcement_a"), ## (party_add_template, ":center_no", ":reinforcement_b"), ## ]), ## # script_get_number_of_hero_centers # Input: arg1 = troop_no # Output: reg0 = number of centers that are ruled by the hero ("get_number_of_hero_centers", [ (store_script_param_1, ":troop_no"), (assign, ":result", 0), (try_for_range, ":center_no", centers_begin, centers_end), (party_slot_eq, ":center_no", slot_town_lord, ":troop_no"), (val_add, ":result", 1), (try_end), (assign, reg0, ":result"), ]), ## # script_cf_get_new_center_leader_chance_for_troop ## # Input: arg1 = troop_no ## # Output: reg0 = chance of the troop to rule a new center ## ("cf_get_new_center_leader_chance_for_troop", ## [ ## (store_script_param_1, ":troop_no"), ## (troop_get_slot, ":troop_rank", ":troop_no", slot_troop_kingdom_rank), ## (try_begin), ## (eq, ":troop_rank", 4), ## (assign, ":troop_chance", 1000), ## (else_try), ## (eq, ":troop_rank", 3), ## (assign, ":troop_chance", 800), ## (else_try), ## (eq, ":troop_rank", 2), ## (assign, ":troop_chance", 400), ## (else_try), ## (eq, ":troop_rank", 1), ## (assign, ":troop_chance", 100), ## (else_try), ## (assign, ":troop_chance", 10), ## (try_end), ## ## (call_script, "script_get_number_of_hero_centers", ":troop_no"), ## (assign, ":number_of_hero_centers", reg0), ## (try_begin), ## (gt, ":number_of_hero_centers", 0), ## (val_mul, ":number_of_hero_centers", 2), ## (val_mul, ":number_of_hero_centers", ":number_of_hero_centers"), ## (val_div, ":troop_chance", ":number_of_hero_centers"), ## (try_end), ## (assign, reg0, ":troop_chance"), ## (eq, reg0, 0), ## (assign, reg0, 1), ## ]), ## # script_select_kingdom_hero_for_new_center ## # Input: arg1 = faction_no ## # Output: reg0 = troop_no as the new leader ## ("select_kingdom_hero_for_new_center", ## [ ## (store_script_param_1, ":kingdom"), ## ## (assign, ":min_num_centers", -1), ## (assign, ":min_num_centers_troop", -1), ## ## (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), ## (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), ## (store_troop_faction, ":troop_faction", ":troop_no"), ## (eq, ":troop_faction", ":kingdom"), ## (call_script, "script_get_number_of_hero_centers", ":troop_no"), ## (assign, ":num_centers", reg0), ## (try_begin), ## (lt, ":num_centers", ":min_num_centers"), ## (assign, ":min_num_centers", ":num_centers"), ## (assign, ":min_num_centers_troop", ":troop_no"), ## (try_end), ## (try_end), ## (assign, reg0, ":min_num_centers_troop"), ## ]), # script_cf_get_random_enemy_center # Input: arg1 = party_no # Output: reg0 = center_no ("cf_get_random_enemy_center", [ (store_script_param_1, ":party_no"), (assign, ":result", -1), (assign, ":total_enemy_centers", 0), (store_faction_of_party, ":party_faction", ":party_no"), (try_for_range, ":center_no", centers_begin, centers_end), (store_faction_of_party, ":center_faction", ":center_no"), (store_relation, ":party_relation", ":center_faction", ":party_faction"), (lt, ":party_relation", 0), (val_add, ":total_enemy_centers", 1), (try_end), (gt, ":total_enemy_centers", 0), (store_random_in_range, ":random_center", 0, ":total_enemy_centers"), (assign, ":total_enemy_centers", 0), (try_for_range, ":center_no", centers_begin, centers_end), (eq, ":result", -1), (store_faction_of_party, ":center_faction", ":center_no"), (store_relation, ":party_relation", ":center_faction", ":party_faction"), (lt, ":party_relation", 0), (val_sub, ":random_center", 1), (lt, ":random_center", 0), (assign, ":result", ":center_no"), (try_end), (assign, reg0, ":result"), ]), ## # script_get_random_enemy_town ## # Input: arg1 = party_no ## # Output: reg0 = center_no ## ("get_random_enemy_town", ## [ ## (store_script_param_1, ":party_no"), ## ## (assign, ":result", -1), ## (assign, ":total_enemy_centers", 0), ## (store_faction_of_party, ":party_faction", ":party_no"), ## ## (try_for_range, ":center_no", towns_begin, towns_end), ## (store_faction_of_party, ":center_faction", ":center_no"), ## (neq, ":center_faction", ":party_faction"), ## (val_add, ":total_enemy_centers", 1), ## (try_end), ## ## (try_begin), ## (eq, ":total_enemy_centers", 0), ## (else_try), ## (store_random_in_range, ":random_center", 0, ":total_enemy_centers"), ## (assign, ":total_enemy_centers", 0), ## (try_for_range, ":center_no", towns_begin, towns_end), ## (eq, ":result", -1), ## (store_faction_of_party, ":center_faction", ":center_no"), ## (neq, ":center_faction", ":party_faction"), ## (store_relation, ":party_relation", ":center_faction", ":party_faction"), ## (le, ":party_relation", -10), ## (val_add, ":total_enemy_centers", 1), ## (lt, ":random_center", ":total_enemy_centers"), ## (assign, ":result", ":center_no"), ## (try_end), ## (try_end), ## (assign, reg0, ":result"), ## ]), # script_find_travel_location # Input: arg1 = center_no # Output: reg0 = new_center_no (to travel within the same faction) ("find_travel_location", [ (store_script_param_1, ":center_no"), (store_faction_of_party, ":faction_no", ":center_no"), (assign, ":total_weight", 0), (try_for_range, ":cur_center_no", centers_begin, centers_end), (neq, ":center_no", ":cur_center_no"), (store_faction_of_party, ":center_faction_no", ":cur_center_no"), (eq, ":faction_no", ":center_faction_no"), (store_distance_to_party_from_party, ":cur_distance", ":center_no", ":cur_center_no"), (val_add, ":cur_distance", 1), (assign, ":new_weight", 100000), (val_div, ":new_weight", ":cur_distance"), (val_add, ":total_weight", ":new_weight"), (try_end), (assign, reg0, -1), (try_begin), (eq, ":total_weight", 0), (else_try), (store_random_in_range, ":random_weight", 0 , ":total_weight"), (assign, ":total_weight", 0), (assign, ":done", 0), (try_for_range, ":cur_center_no", centers_begin, centers_end), (eq, ":done", 0), (neq, ":center_no", ":cur_center_no"), (store_faction_of_party, ":center_faction_no", ":cur_center_no"), (eq, ":faction_no", ":center_faction_no"), (store_distance_to_party_from_party, ":cur_distance", ":center_no", ":cur_center_no"), (val_add, ":cur_distance", 1), (assign, ":new_weight", 100000), (val_div, ":new_weight", ":cur_distance"), (val_add, ":total_weight", ":new_weight"), (lt, ":random_weight", ":total_weight"), (assign, reg0, ":cur_center_no"), (assign, ":done", 1), (try_end), (try_end), ]), # script_get_relation_between_parties # Input: arg1 = party_no_1, arg2 = party_no_2 # Output: reg0 = relation between parties ("get_relation_between_parties", [ (store_script_param_1, ":party_no_1"), (store_script_param_2, ":party_no_2"), (store_faction_of_party, ":party_no_1_faction", ":party_no_1"), (store_faction_of_party, ":party_no_2_faction", ":party_no_2"), (try_begin), (eq, ":party_no_1_faction", ":party_no_2_faction"), (assign, reg0, 100), (else_try), (store_relation, ":relation", ":party_no_1_faction", ":party_no_2_faction"), (assign, reg0, ":relation"), (try_end), ]), # script_calculate_weekly_party_wage # Input: arg1 = party_no # Output: reg0 = weekly wage ("calculate_weekly_party_wage", [ (store_script_param_1, ":party_no"), (assign, ":result", 0), (party_get_num_companion_stacks, ":num_stacks",":party_no"), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop",":party_no",":i_stack"), (party_stack_get_size, ":stack_size",":party_no",":i_stack"), (call_script, "script_npc_get_troop_wage", ":stack_troop", ":party_no"), (assign, ":cur_wage", reg0), (val_mul, ":cur_wage", ":stack_size"), (val_add, ":result", ":cur_wage"), (try_end), (assign, reg0, ":result"), ]), # script_calculate_player_faction_wage # Input: arg1 = party_no # Output: reg0 = weekly wage ("calculate_player_faction_wage", [(assign, ":nongarrison_wages", 0), (assign, ":garrison_wages", 0), (try_for_parties, ":party_no"), (assign, ":garrison_troop", 0), (try_begin), (this_or_next|party_slot_eq, ":party_no", slot_party_type, spt_town), (party_slot_eq, ":party_no", slot_party_type, spt_castle), (party_slot_eq, ":party_no", slot_town_lord, "trp_player"), (assign, ":garrison_troop", 1), (try_end), (party_get_attached_to, ":attached_party", ":party_no"), (this_or_next|eq, ":party_no", "p_main_party"), (this_or_next|eq, ":attached_party", "p_main_party"), (eq, ":garrison_troop", 1), (party_get_num_companion_stacks, ":num_stacks",":party_no"), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop",":party_no",":i_stack"), (party_stack_get_size, ":stack_size",":party_no",":i_stack"), (call_script, "script_game_get_troop_wage", ":stack_troop", ":party_no"), (assign, ":cur_wage", reg0), (val_mul, ":cur_wage", ":stack_size"), (try_begin), (eq, ":garrison_troop", 1), (val_add, ":garrison_wages", ":cur_wage"), (else_try), (val_add, ":nongarrison_wages", ":cur_wage"), (try_end), (try_end), (try_end), (val_div, ":garrison_wages", 2),#Half payment for garrisons (store_sub, ":total_payment", 14, "$g_cur_week_half_daily_wage_payments"), #between 0 and 7 (val_mul, ":nongarrison_wages", ":total_payment"), (val_div, ":nongarrison_wages", 14), (store_add, reg0, ":nongarrison_wages", ":garrison_wages"), ]), # script_calculate_hero_weekly_net_income_and_add_to_wealth # Input: arg1 = troop_no # Output: none ("calculate_hero_weekly_net_income_and_add_to_wealth", [ (store_script_param_1, ":troop_no"), (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), (troop_get_slot, ":cur_wealth", ":troop_no", slot_troop_wealth), (assign, ":weekly_income", 750), #let every hero receive 750 denars by default (store_character_level, ":troop_level", ":troop_no"), (store_mul, ":level_income", ":troop_level", 10), (val_add, ":weekly_income", ":level_income"), (store_troop_faction,":faction_no", ":troop_no"), (try_begin), #check if troop is kingdom leader (faction_slot_eq, ":faction_no", slot_faction_leader, ":troop_no"), (val_add, ":weekly_income", 1500), (try_end), (assign, ":cur_weekly_wage", 0), (try_begin), (gt, ":party_no",0), (call_script, "script_calculate_weekly_party_wage", ":party_no"), (assign, ":cur_weekly_wage", reg0), (try_end), (val_sub, ":weekly_income", ":cur_weekly_wage"), (val_add, ":cur_wealth", ":weekly_income"), (val_max, ":cur_wealth", 0), (troop_set_slot, ":troop_no", slot_troop_wealth, ":cur_wealth"), ]), # script_cf_reinforce_party # Input: arg1 = party_no, # Output: none # Adds reinforcement to party according to its type and faction ("cf_reinforce_party", [ (store_script_param_1, ":party_no"), (store_faction_of_party, ":party_faction", ":party_no"), (party_get_slot, ":party_type",":party_no", slot_party_type), #Rebellion changes begin: (try_begin), (eq, ":party_type", spt_kingdom_hero_party), (party_stack_get_troop_id, ":leader", ":party_no"), (troop_get_slot, ":party_faction", ":leader", slot_troop_original_faction), # (this_or_next|is_between, ":party_faction", rebel_factions_begin, rebel_factions_end), # (faction_get_slot, ":target_faction", ":party_faction", slot_faction_rebellion_target), # (assign, ":party_faction", ":target_faction"), # (assign, ":party_faction", "fac_kingdom_1"), (try_end), #Rebellion changes end (try_begin), (eq, ":party_faction", "fac_player_supporters_faction"), (party_get_slot, ":town_lord", ":party_no", slot_town_lord), (try_begin), (gt, ":town_lord", 0), (troop_get_slot, ":party_faction", ":town_lord", slot_troop_original_faction), (else_try), (party_get_slot, ":party_faction", ":party_no", slot_center_original_faction), (try_end), (try_end), (faction_get_slot, ":party_template_a", ":party_faction", slot_faction_reinforcements_a), (faction_get_slot, ":party_template_b", ":party_faction", slot_faction_reinforcements_b), (faction_get_slot, ":party_template_c", ":party_faction", slot_faction_reinforcements_c), (assign, ":party_template", 0), (store_random_in_range, ":rand", 0, 100), (try_begin), (this_or_next|eq, ":party_type", spt_town), (eq, ":party_type", spt_castle), #CASTLE OR TOWN (try_begin), (lt, ":rand", 65), (assign, ":party_template", ":party_template_a"), (else_try), (assign, ":party_template", ":party_template_b"), (try_end), (else_try), (eq, ":party_type", spt_kingdom_hero_party), (try_begin), (lt, ":rand", 50), (assign, ":party_template", ":party_template_a"), (else_try), (lt, ":rand", 75), (assign, ":party_template", ":party_template_b"), (else_try), (assign, ":party_template", ":party_template_c"), (try_end), (else_try), (try_end), (try_begin), (gt, ":party_template", 0), (party_add_template, ":party_no", ":party_template"), (try_end), ]), # script_hire_men_to_kingdom_hero_party # Input: arg1 = troop_no (hero of the party) # Output: none ("hire_men_to_kingdom_hero_party", [ (store_script_param_1, ":troop_no"), (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), (troop_get_slot, ":cur_wealth", ":troop_no", slot_troop_wealth), (assign, ":hiring_budget", ":cur_wealth"), (val_mul, ":hiring_budget", 3), (val_div, ":hiring_budget", 4), (assign, ":num_rounds", 1), (call_script, "script_party_get_ideal_size", ":party_no"), (assign, ":ideal_size", reg0), (store_mul, ":ideal_top_size", ":ideal_size", 3), (val_div, ":ideal_top_size", 2), (party_get_num_companions, ":party_size", ":party_no"), (try_for_range, ":unused", 0 , ":num_rounds"), (try_begin), (lt, ":party_size", ":ideal_size"), (gt, ":hiring_budget", reinforcement_cost), (gt, ":party_no", 0), (call_script, "script_cf_reinforce_party", ":party_no"), (val_sub, ":cur_wealth", reinforcement_cost), (troop_set_slot, ":troop_no", slot_troop_wealth, ":cur_wealth"), (else_try), (gt, ":party_size", ":ideal_top_size"), (store_troop_faction, ":troop_faction", ":troop_no"), (party_get_num_companion_stacks, ":num_stacks", ":party_no"), (assign, ":total_regulars", 0), (assign, ":total_regular_levels", 0), (try_for_range_backwards, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop", ":party_no", ":i_stack"), (neg|troop_is_hero, ":stack_troop"), (party_stack_get_size, ":stack_size", ":party_no", ":i_stack"), (store_character_level, ":stack_level", ":stack_troop"), (store_troop_faction, ":stack_faction", ":stack_troop"), (try_begin), (eq, ":troop_faction", ":stack_faction"), (val_mul, ":stack_level", 3), #reducing the chance of the faction troops' removal (try_end), (val_mul, ":stack_level", ":stack_size"), (val_add, ":total_regulars", ":stack_size"), (val_add, ":total_regular_levels", ":stack_level"), (try_end), (gt, ":total_regulars", 0), (store_div, ":average_level", ":total_regular_levels", ":total_regulars"), (try_for_range_backwards, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop", ":party_no", ":i_stack"), (neg|troop_is_hero, ":stack_troop"), (party_stack_get_size, ":stack_size", ":party_no", ":i_stack"), (store_character_level, ":stack_level", ":stack_troop"), (store_troop_faction, ":stack_faction", ":stack_troop"), (try_begin), (eq, ":troop_faction", ":stack_faction"), (val_mul, ":stack_level", 3), (try_end), (store_sub, ":level_dif", ":average_level", ":stack_level"), (val_div, ":level_dif", 3), (store_add, ":prune_chance", 10, ":level_dif"), (gt, ":prune_chance", 0), (call_script, "script_get_percentage_with_randomized_round", ":stack_size", ":prune_chance"), (gt, reg0, 0), (party_remove_members, ":party_no", ":stack_troop", reg0), (try_end), (try_end), (try_end), ]), # script_get_percentage_with_randomized_round # Input: arg1 = value, arg2 = percentage # Output: none ("get_percentage_with_randomized_round", [ (store_script_param, ":value", 1), (store_script_param, ":percentage", 2), (store_mul, ":result", ":value", ":percentage"), (val_div, ":result", 100), (store_mul, ":used_amount", ":result", 100), (val_div, ":used_amount", ":percentage"), (store_sub, ":left_amount", ":value", ":used_amount"), (try_begin), (gt, ":left_amount", 0), (store_mul, ":chance", ":left_amount", ":percentage"), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", ":chance"), (val_add, ":result", 1), (try_end), (assign, reg0, ":result"), ]), # script_cf_create_merchant_party # Input: arg1 = troop_no, # Output: $pout_party = party_no ## ("cf_create_merchant_party", ## [ ## (store_script_param_1, ":troop_no"), ## (store_troop_faction, ":troop_faction", ":troop_no"), ## ## (call_script, "script_cf_select_random_town_at_peace_with_faction", ":troop_faction"), ## (assign, ":center_no", reg0), ## ## (assign, "$pout_party", -1), ## (set_spawn_radius,0), ## (spawn_around_party,":center_no", "pt_merchant_party"), ## (assign, "$pout_party", reg0), ## ## (party_set_faction, "$pout_party", ":troop_faction"), ## (party_set_slot, "$pout_party", slot_party_type, spt_merchant_caravan), ## (party_set_slot, "$pout_party", slot_party_ai_state, spai_undefined), ## (troop_set_slot, ":troop_no", slot_troop_leaded_party, "$pout_party"), ## (party_add_leader, "$pout_party", ":troop_no"), ## (str_store_troop_name, s5, ":troop_no"), ## (party_set_name, "$pout_party", "str_s5_s_caravan"), ## (party_set_ai_behavior, "$pout_party", ai_bhvr_travel_to_party), ## (party_set_ai_object, "$pout_party", ":center_no"), ## (party_set_flags, "$pout_party", pf_default_behavior, 0), ## (store_sub, ":item_to_price_slot", slot_town_trade_good_prices_begin, trade_goods_begin), ## (try_for_range, ":cur_goods", trade_goods_begin, trade_goods_end), ## (store_add, ":cur_goods_price_slot", ":cur_goods", ":item_to_price_slot"), ## (party_set_slot, "$pout_party", ":cur_goods_price_slot", average_price_factor), ## (try_end), ## (troop_set_slot, ":troop_no", slot_troop_wealth, 2000), ## ]), # script_create_cattle_herd # Input: arg1 = center_no, arg2 = amount (0 = default) # Output: reg0 = party_no ("create_cattle_herd", [ (store_script_param_1, ":center_no"), (store_script_param_2, ":amount"), (assign, ":herd_party", -1), (set_spawn_radius,1), (spawn_around_party,":center_no", "pt_cattle_herd"), (assign, ":herd_party", reg0), (party_get_position, pos1, ":center_no"), (call_script, "script_map_get_random_position_around_position_within_range", 1, 2), (party_set_position, ":herd_party", pos2), (party_set_slot, ":herd_party", slot_party_type, spt_cattle_herd), (party_set_slot, ":herd_party", slot_party_ai_state, spai_undefined), (party_set_ai_behavior, ":herd_party", ai_bhvr_hold), (party_set_slot, ":herd_party", slot_party_commander_party, -1), #we need this because 0 is player's party! (try_begin), (gt, ":amount", 0), (party_clear, ":herd_party"), (party_add_members, ":herd_party", "trp_cattle", ":amount"), (try_end), (assign, reg0, ":herd_party"), ]), #script_buy_cattle_from_village # Input: arg1 = village_no, arg2 = amount, arg3 = single_cost # Output: reg0 = party_no ("buy_cattle_from_village", [ (store_script_param, ":village_no", 1), (store_script_param, ":amount", 2), (store_script_param, ":single_cost", 3), #Changing price of the cattle (try_for_range, ":unused", 0, ":amount"), (call_script, "script_game_event_buy_item", "itm_cattle_meat", 0), (call_script, "script_game_event_buy_item", "itm_cattle_meat", 0), (try_end), (party_get_slot, ":num_cattle", ":village_no", slot_village_number_of_cattle), (val_sub, ":num_cattle", ":amount"), (party_set_slot, ":village_no", slot_village_number_of_cattle, ":num_cattle"), (store_mul, ":cost", ":single_cost", ":amount"), (troop_remove_gold, "trp_player", ":cost"), (assign, ":continue", 1), (try_for_parties, ":cur_party"), (eq, ":continue", 1), (party_slot_eq, ":cur_party", slot_party_type, spt_cattle_herd), (store_distance_to_party_from_party, ":dist", ":village_no", ":cur_party"), (lt, ":dist", 6), (assign, ":subcontinue", 1), (try_begin), (check_quest_active, "qst_move_cattle_herd"), (quest_slot_eq, "qst_move_cattle_herd", slot_quest_target_party, ":cur_party"), (assign, ":subcontinue", 0), (try_end), (eq, ":subcontinue", 1), (party_add_members, ":cur_party", "trp_cattle", ":amount"), (assign, ":continue", 0), (assign, reg0, ":cur_party"), (try_end), (try_begin), (eq, ":continue", 1), (call_script, "script_create_cattle_herd", ":village_no", ":amount"), (try_end), ]), #script_kill_cattle_from_herd # Input: arg1 = party_no, arg2 = amount # Output: none (fills trp_temp_troop's inventory) ("kill_cattle_from_herd", [ (store_script_param_1, ":party_no"), (store_script_param_2, ":amount"), (troop_clear_inventory, "trp_temp_troop"), (store_mul, ":meat_amount", ":amount", 2), (troop_add_items, "trp_temp_troop", "itm_cattle_meat", ":meat_amount"), (troop_get_inventory_capacity, ":inv_size", "trp_temp_troop"), (try_for_range, ":i_slot", 0, ":inv_size"), (troop_get_inventory_slot, ":item_id", "trp_temp_troop", ":i_slot"), (eq, ":item_id", "itm_cattle_meat"), (troop_set_inventory_slot_modifier, "trp_temp_troop", ":i_slot", imod_fresh), (try_end), (party_get_num_companions, ":num_cattle", ":party_no"), (try_begin), (ge, ":amount", ":num_cattle"), (remove_party, ":party_no"), (else_try), (party_remove_members, ":party_no", "trp_cattle", ":amount"), (try_end), ]), # script_create_kingdom_hero_party # Input: arg1 = troop_no, arg2 = center_no # Output: $pout_party = party_no ("create_kingdom_hero_party", [ (store_script_param, ":troop_no", 1), (store_script_param, ":center_no", 2), (store_troop_faction, ":troop_faction_no", ":troop_no"), (assign, "$pout_party", -1), (set_spawn_radius,0), (spawn_around_party,":center_no", "pt_kingdom_hero_party"), (assign, "$pout_party", reg0), (party_set_faction, "$pout_party", ":troop_faction_no"), (party_set_slot, "$pout_party", slot_party_type, spt_kingdom_hero_party), (call_script, "script_party_set_ai_state", "$pout_party", spai_undefined, -1), (troop_set_slot, ":troop_no", slot_troop_leaded_party, "$pout_party"), (party_add_leader, "$pout_party", ":troop_no"), (str_store_troop_name, s5, ":troop_no"), (party_set_name, "$pout_party", "str_s5_s_party"), (party_set_slot, "$pout_party", slot_party_commander_party, -1), #we need this because 0 is player's party! #Setting the flag icon #normal_banner_begin (troop_get_slot, ":cur_banner", ":troop_no", slot_troop_banner_scene_prop), (try_begin), (gt, ":cur_banner", 0), (val_sub, ":cur_banner", banner_scene_props_begin), (val_add, ":cur_banner", banner_map_icons_begin), (party_set_banner_icon, "$pout_party", ":cur_banner"), #custom_banner_begin # (troop_get_slot, ":flag_icon", ":troop_no", slot_troop_custom_banner_map_flag_type), # (try_begin), # (ge, ":flag_icon", 0), # (val_add, ":flag_icon", custom_banner_map_icons_begin), # (party_set_banner_icon, "$pout_party", ":flag_icon"), (try_end), (try_begin), (troop_slot_eq, ":troop_no", slot_troop_spawned_before, 0), (troop_set_slot, ":troop_no", slot_troop_spawned_before, 1), (assign, ":num_tries", 20), (try_begin), (store_troop_faction, ":troop_kingdom", ":troop_no"), (faction_slot_eq, ":troop_kingdom", slot_faction_leader, ":troop_no"), (assign, ":num_tries", 50), (try_end), (try_for_range, ":unused", 0, ":num_tries"), (call_script, "script_hire_men_to_kingdom_hero_party", ":troop_no"), (try_end), (store_random_in_range, ":xp_rounds", 2, 6), (troop_get_slot, ":renown", ":troop_no", slot_troop_renown), (store_div, ":renown_xp_rounds", ":renown", 100), (val_add, ":xp_rounds", ":renown_xp_rounds"), (try_for_range, ":unused", 0, ":xp_rounds"), (call_script, "script_upgrade_hero_party", "$pout_party", 4000), (try_end), (try_end), ]), # script_create_kingdom_party_if_below_limit # Input: arg1 = faction_no, arg2 = party_type (variables beginning with spt_) # Output: reg0 = party_no ("create_kingdom_party_if_below_limit", [ (store_script_param_1, ":faction_no"), (store_script_param_2, ":party_type"), (call_script, "script_count_parties_of_faction_and_party_type", ":faction_no", ":party_type"), (assign, ":party_count", reg0), (assign, ":party_count_limit", 0), (try_begin), ## (eq, ":party_type", spt_forager), ## (assign, ":party_count_limit", 1), ## (else_try), ## (eq, ":party_type", spt_scout), ## (assign, ":party_count_limit", 1), ## (else_try), ## (eq, ":party_type", spt_patrol), ## (assign, ":party_count_limit", 1), ## (else_try), ## (eq, ":party_type", spt_messenger), ## (assign, ":party_count_limit", 1), ## (else_try), (eq, ":party_type", spt_kingdom_caravan), (assign, ":party_count_limit", 5), ## (else_try), ## (eq, ":party_type", spt_prisoner_train), ## (assign, ":party_count_limit", 1), (try_end), (assign, reg0, -1), (try_begin), (lt, ":party_count", ":party_count_limit"), (call_script,"script_cf_create_kingdom_party", ":faction_no", ":party_type"), (try_end), ]), # script_cf_create_kingdom_party # Input: arg1 = faction_no, arg2 = party_type (variables beginning with spt_) # Output: reg0 = party_no ("cf_create_kingdom_party", [ (store_script_param_1, ":faction_no"), (store_script_param_2, ":party_type"), (str_store_faction_name, s7, ":faction_no"), (assign, ":party_name_str", "str_no_string"), ## (faction_get_slot, ":reinforcements_a", ":faction_no", slot_faction_reinforcements_a), (faction_get_slot, ":reinforcements_b", ":faction_no", slot_faction_reinforcements_b), ## (faction_get_slot, ":reinforcements_c", ":faction_no", slot_faction_reinforcements_c), (try_begin), ## (eq, ":party_type", spt_forager), ## (assign, ":party_template", "pt_forager_party"), # (assign, ":party_name_str", "str_s7_foragers"), ## (else_try), ## (eq, ":party_type", spt_scout), ## (assign, ":party_template", "pt_scout_party"), # (assign, ":party_name_str", "str_s7_scouts"), ## (else_try), ## (eq, ":party_type", spt_patrol), ## (assign, ":party_template", "pt_patrol_party"), # (assign, ":party_name_str", "str_s7_patrol"), ## (else_try), (eq, ":party_type", spt_kingdom_caravan), (assign, ":party_template", "pt_kingdom_caravan_party"), # (assign, ":party_name_str", "str_s7_caravan"), ## (else_try), ## (eq, ":party_type", spt_messenger), ## (assign, ":party_template", "pt_messenger_party"), # (assign, ":party_name_str", "str_s7_messenger"), ## (else_try), ## (eq, ":party_type", spt_raider), ## (assign, ":party_template", "pt_raider_party"), ## (assign, ":party_name_str", "str_s7_raiders"), ## (else_try), ## (eq, ":party_type", spt_prisoner_train), ## (assign, ":party_template", "pt_prisoner_train_party"), # (assign, ":party_name_str", "str_s7_prisoner_train"), (try_end), (assign, ":result", -1), (try_begin), (try_begin), (eq, ":party_type", spt_kingdom_caravan), (call_script,"script_cf_select_random_town_with_faction", ":faction_no", -1), (set_spawn_radius, 0), (else_try), #not used at the moment (call_script,"script_cf_select_random_walled_center_with_faction", ":faction_no", -1), (set_spawn_radius, 1), (try_end), (assign, ":spawn_center", reg0), (is_between, ":spawn_center", centers_begin, centers_end), (spawn_around_party,":spawn_center",":party_template"), (assign, ":result", reg0), (party_set_faction, ":result", ":faction_no"), (try_begin), (eq, ":party_type", spt_kingdom_caravan), (party_set_slot, ":result", slot_party_home_center, ":spawn_center"), (try_end), (party_set_slot, ":result", slot_party_type, ":party_type"), (party_set_slot, ":result", slot_party_ai_state, spai_undefined), (try_begin), (neq, ":party_name_str", "str_no_string"), (party_set_name, ":result", ":party_name_str"), (try_end), (try_begin), ## (eq, ":party_type", spt_forager), ## (party_add_template, ":result", ":reinforcements_a"), ## (else_try), ## (eq, ":party_type", spt_scout), ## (party_add_template, ":result", ":reinforcements_c"), ## (else_try), ## (eq, ":party_type", spt_patrol), ## (party_add_template, ":result", ":reinforcements_a"), ## (party_add_template, ":result", ":reinforcements_b"), ## (else_try), (eq, ":party_type", spt_kingdom_caravan), (party_add_template, ":result", ":reinforcements_b"), (party_add_template, ":result", ":reinforcements_b"), (party_set_ai_behavior,":result",ai_bhvr_travel_to_party), (party_set_ai_object,":result",":spawn_center"), (party_set_flags, ":result", pf_default_behavior, 1), (store_sub, ":item_to_price_slot", slot_town_trade_good_prices_begin, trade_goods_begin), (try_for_range, ":cur_goods", trade_goods_begin, trade_goods_end), (store_add, ":cur_goods_price_slot", ":cur_goods", ":item_to_price_slot"), (party_set_slot, ":result", ":cur_goods_price_slot", average_price_factor), (try_end), ## (else_try), ## (eq, ":party_type", spt_messenger), ## (faction_get_slot, ":messenger_troop", ":faction_no", slot_faction_messenger_troop), ## (party_add_leader, ":result", ":messenger_troop"), ## (party_set_ai_behavior,":result",ai_bhvr_travel_to_party), ## (party_set_ai_object,":result",":spawn_center"), ## (party_set_flags, ":result", pf_default_behavior, 0), ## (else_try), ## (eq, ":party_type", spt_raider), ## (party_add_template, ":result", ":reinforcements_c"), ## (party_add_template, ":result", ":reinforcements_b"), ## (party_add_template, ":result", "pt_raider_captives"), ## (else_try), ## (eq, ":party_type", spt_prisoner_train), ## (party_add_template, ":result", ":reinforcements_b"), ## (party_add_template, ":result", ":reinforcements_a"), ## (try_begin), ## (call_script,"script_cf_faction_get_random_enemy_faction",":faction_no"), ## (store_random_in_range,":r",0,3), ## (try_begin), ## (lt, ":r", 1), ## (faction_get_slot, ":captive_reinforcements", reg0, slot_faction_reinforcements_b), ## (else_try), ## (faction_get_slot, ":captive_reinforcements", reg0, slot_faction_reinforcements_a), ## (try_end), ## (party_add_template, ":result", ":captive_reinforcements",1), ## (else_try), ## (party_add_template, ":result", "pt_default_prisoners"), ## (try_end), (try_end), (try_end), (ge, ":result", 0), (assign, reg0, ":result"), ]), # script_get_troop_attached_party # Input: arg1 = troop_no # Output: reg0 = party_no (-1 if troop's party is not attached to a party) ("get_troop_attached_party", [ (store_script_param_1, ":troop_no"), (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), (assign, ":attached_party_no", -1), (try_begin), (ge, ":party_no", 0), (party_get_attached_to, ":attached_party_no", ":party_no"), (try_end), (assign, reg0, ":attached_party_no"), ]), # script_center_get_food_consumption # Input: arg1 = center_no # Output: reg0: food consumption (1 food item counts as 100 units) ("center_get_food_consumption", [ (store_script_param_1, ":center_no"), (assign, ":food_consumption", 0), (try_begin), (party_slot_eq, ":center_no", slot_party_type, spt_town), (assign, ":food_consumption", 500), (else_try), (party_slot_eq, ":center_no", slot_party_type, spt_castle), (assign, ":food_consumption", 50), (try_end), (assign, reg0, ":food_consumption"), ]), # script_center_get_food_store_limit # Input: arg1 = center_no # Output: reg0: food consumption (1 food item counts as 100 units) ("center_get_food_store_limit", [ (store_script_param_1, ":center_no"), (assign, ":food_store_limit", 0), (try_begin), (party_slot_eq, ":center_no", slot_party_type, spt_town), (assign, ":food_store_limit", 50000), (else_try), (party_slot_eq, ":center_no", slot_party_type, spt_castle), (assign, ":food_store_limit", 1500), (try_end), (assign, reg0, ":food_store_limit"), ]), # script_refresh_village_merchant_inventory # Input: arg1 = village_no # Output: none ("refresh_village_merchant_inventory", [ (store_script_param_1, ":village_no"), (party_get_slot, ":merchant_troop", ":village_no", slot_town_elder), (reset_item_probabilities,0), (store_sub, ":item_to_price_slot", slot_town_trade_good_prices_begin, trade_goods_begin), (try_for_range, ":cur_goods", trade_goods_begin, trade_goods_end), (store_add, ":cur_price_slot", ":cur_goods", ":item_to_price_slot"), (party_get_slot, ":cur_price", ":village_no", ":cur_price_slot"), (assign, ":cur_probability", 100), (val_mul, ":cur_probability", average_price_factor), (val_div, ":cur_probability", ":cur_price"), (val_mul, ":cur_probability", average_price_factor), (val_div, ":cur_probability", ":cur_price"), (val_mul, ":cur_probability", average_price_factor), (val_div, ":cur_probability", ":cur_price"), (val_mul, ":cur_probability", average_price_factor), (val_div, ":cur_probability", ":cur_price"), (set_item_probability_in_merchandise, ":cur_goods", ":cur_probability"), (try_end), (set_item_probability_in_merchandise, "itm_spice", 0), (set_item_probability_in_merchandise, "itm_velvet", 0), (troop_add_merchandise, ":merchant_troop", itp_type_goods, 3), (troop_ensure_inventory_space, ":merchant_troop", 80), #Adding 1 prosperity to the village while reducing each 3000 gold from the elder (store_troop_gold, ":gold",":merchant_troop"), (try_begin), (gt, ":gold", 3500), (store_div, ":prosperity_added", ":gold", 3000), (store_mul, ":gold_removed", ":prosperity_added", 3000), (troop_remove_gold, ":merchant_troop", ":gold_removed"), (call_script, "script_change_center_prosperity", ":village_no", ":prosperity_added"), (try_end), ]), # script_refresh_village_defenders # Input: arg1 = village_no # Output: none ("refresh_village_defenders", [ (store_script_param_1, ":village_no"), (assign, ":ideal_size", 50), (try_begin), (party_get_num_companions, ":party_size", ":village_no"), (lt, ":party_size", ":ideal_size"), (party_add_template, ":village_no", "pt_village_defenders"), (try_end), ]), # script_village_set_state # Input: arg1 = center_no arg2:new_state # Output: reg0: food consumption (1 food item counts as 100 units) ("village_set_state", [ (store_script_param_1, ":village_no"), (store_script_param_2, ":new_state"), # (party_get_slot, ":old_state", ":village_no", slot_village_state), (try_begin), (eq, ":new_state", 0), (party_set_extra_text, ":village_no", "str_empty_string"), (party_set_slot, ":village_no", slot_village_raided_by, -1), (else_try), (eq, ":new_state", svs_being_raided), (party_set_extra_text, ":village_no", "@(Being Raided)"), (else_try), (eq, ":new_state", svs_looted), (party_set_extra_text, ":village_no", "@(Looted)"), (party_set_slot, ":village_no", slot_village_raided_by, -1), (call_script, "script_change_center_prosperity", ":village_no", -30), (else_try), (eq, ":new_state", svs_under_siege), (party_set_extra_text, ":village_no", "@(Under Siege)"), (try_end), (party_set_slot, ":village_no", slot_village_state, ":new_state"), ]), # script_process_village_raids # Input: none # Output: none # called from triggers every two hours ("process_village_raids", [ (try_for_range, ":village_no", villages_begin, villages_end), (party_get_slot, ":village_raid_progress", ":village_no", slot_village_raid_progress), (try_begin), (party_slot_eq, ":village_no", slot_village_state, 0), #village is normal (val_sub, ":village_raid_progress", 5), (val_max, ":village_raid_progress", 0), (party_set_slot, ":village_no", slot_village_raid_progress, ":village_raid_progress"), (else_try), (party_slot_eq, ":village_no", slot_village_state, svs_being_raided), #village is being raided # End raid unless there is an enemy party nearby (assign, ":raid_ended", 1), (party_get_slot, ":raider_party", ":village_no", slot_village_raided_by), (try_begin), (ge, ":raider_party", 0), (party_is_active, ":raider_party"), (this_or_next|neq, ":raider_party", "p_main_party"), (eq, "$g_player_is_captive", 0), (store_distance_to_party_from_party, ":distance", ":village_no", ":raider_party"), (lt, ":distance", raid_distance), (assign, ":raid_ended", 0), (try_end), (try_begin), (eq, ":raid_ended", 1), (call_script, "script_village_set_state", ":village_no", 0), #clear raid flag (party_set_slot, ":village_no", slot_village_smoke_added, 0), (party_clear_particle_systems, ":village_no"), (else_try), (assign, ":raid_progress_increase", 11), (party_get_slot, ":looter_party", ":village_no", slot_village_raided_by), (try_begin), (party_get_skill_level, ":looting_skill", ":looter_party", "skl_looting"), (val_add, ":raid_progress_increase", ":looting_skill"), (try_end), (try_begin), (party_slot_eq, ":village_no", slot_center_has_watch_tower, 1), (val_mul, ":raid_progress_increase", 75), (val_div, ":raid_progress_increase", 100), (try_end), (val_add, ":village_raid_progress", ":raid_progress_increase"), (party_set_slot, ":village_no", slot_village_raid_progress, ":village_raid_progress"), (try_begin), (ge, ":village_raid_progress", 50), (party_slot_eq, ":village_no", slot_village_smoke_added, 0), (party_add_particle_system, ":village_no", "psys_map_village_fire"), (party_add_particle_system, ":village_no", "psys_map_village_fire_smoke"), (party_set_icon, ":village_no", "icon_village_burnt_a"), (party_set_slot, ":village_no", slot_village_smoke_added, 1), (try_end), (try_begin), (gt, ":village_raid_progress", 100), (str_store_party_name_link, s1, ":village_no"), (party_stack_get_troop_id, ":raid_leader", ":looter_party"), (ge, ":raid_leader", 0), (str_store_party_name, s2, ":looter_party"), (display_log_message, "@The village of {s1} has been looted by {s2}."), (call_script, "script_village_set_state", ":village_no", svs_looted), (party_set_slot, ":village_no", slot_village_raid_progress, 0), (party_set_slot, ":village_no", slot_village_recover_progress, 0), (try_begin), (store_faction_of_party, ":village_faction", ":village_no"), (this_or_next|party_slot_eq, ":village_no", slot_town_lord, "trp_player"), (eq, ":village_faction", "fac_player_supporters_faction"), (call_script, "script_add_notification_menu", "mnu_notification_village_raided", ":village_no", ":raid_leader"), (try_end), (call_script, "script_add_log_entry", logent_village_raided, ":raid_leader", ":village_no", -1, -1), (try_end), (try_end), (else_try), (party_slot_eq, ":village_no", slot_village_state, svs_looted), #village is looted (party_get_slot, ":recover_progress", ":village_no", slot_village_recover_progress), (val_add, ":recover_progress", 1), (party_set_slot, ":village_no", slot_village_recover_progress, ":recover_progress"), #village looted (try_begin), (ge, ":recover_progress", 10), (party_slot_eq, ":village_no", slot_village_smoke_added, 1), (party_clear_particle_systems, ":village_no"), (party_add_particle_system, ":village_no", "psys_map_village_looted_smoke"), (party_set_slot, ":village_no", slot_village_smoke_added, 2), (try_end), (try_begin), (gt, ":recover_progress", 50), (party_slot_eq, ":village_no", slot_village_smoke_added, 2), (party_clear_particle_systems, ":village_no"), (party_set_slot, ":village_no", slot_village_smoke_added, 3), (party_set_icon, ":village_no", "icon_village_deserted_a"), (try_end), (try_begin), (gt, ":recover_progress", 100), (call_script, "script_village_set_state", ":village_no", 0),#village back to normal (party_set_slot, ":village_no", slot_village_recover_progress, 0), (party_clear_particle_systems, ":village_no"), (party_set_slot, ":village_no", slot_village_smoke_added, 0), (party_set_icon, ":village_no", "icon_village_a"), (try_end), (try_end), (try_end), ]), # script_process_sieges # Input: none # Output: none #called from triggers ("process_sieges", [ (try_for_range, ":center_no", walled_centers_begin, walled_centers_end), #Reducing siege hardness every day by 20 (party_get_slot, ":siege_hardness", ":center_no", slot_center_siege_hardness), (val_sub, ":siege_hardness", 20), (val_max, ":siege_hardness", 0), (party_set_slot, ":center_no", slot_center_siege_hardness, ":siege_hardness"), (party_get_slot, ":town_food_store", ":center_no", slot_party_food_store), (call_script, "script_center_get_food_store_limit", ":center_no"), (assign, ":food_store_limit", reg0), (try_begin), (party_get_slot, ":besieger_party", ":center_no", slot_center_is_besieged_by), (ge, ":besieger_party", 0), #town is under siege #Reduce prosperity of besieged center by -1 with a 33% chance every day. (try_begin), (store_random_in_range, ":random_no", 0, 3), (eq, ":random_no", 0), (call_script, "script_change_center_prosperity", ":center_no", -1), (try_end), (store_faction_of_party, ":center_faction", ":center_no"), # Lift siege unless there is an enemy party nearby (assign, ":siege_lifted", 0), (try_begin), (try_begin), (neg|party_is_active, ":besieger_party"), (assign, ":siege_lifted", 1), (else_try), (store_distance_to_party_from_party, ":besieger_distance", ":center_no", ":besieger_party"), (gt, ":besieger_distance", 5), (assign, ":siege_lifted", 1), (try_end), (eq, ":siege_lifted", 1), (try_for_range, ":enemy_hero", kingdom_heroes_begin, kingdom_heroes_end), (troop_slot_eq, ":enemy_hero", slot_troop_occupation, slto_kingdom_hero), (troop_get_slot, ":enemy_party", ":enemy_hero", slot_troop_leaded_party), (ge, ":enemy_party", 0), (party_is_active, ":enemy_party"), (store_faction_of_party, ":party_faction", ":enemy_party"), (store_relation, ":reln", ":party_faction", ":center_faction"), (lt, ":reln", 0), (store_distance_to_party_from_party, ":distance", ":center_no", ":enemy_party"), (lt, ":distance", 4), (assign, ":besieger_party", ":enemy_party"), (party_set_slot, ":center_no", slot_center_is_besieged_by, ":enemy_party"), (assign, ":siege_lifted", 0), (try_end), (try_end), (try_begin), (eq, ":siege_lifted", 1), (call_script, "script_lift_siege", ":center_no", 1), (else_try), (call_script, "script_center_get_food_consumption", ":center_no"), (assign, ":food_consumption", reg0), (val_sub, ":town_food_store", ":food_consumption"), # reduce food only under siege??? (try_begin), (le, ":town_food_store", 0), #town is starving (store_random_in_range, ":r", 0, 100), (lt, ":r", 10), (call_script, "script_party_wound_all_members", ":center_no"), # town falls with 10% chance if starving (try_end), (try_end), (else_try), #town is not under siege... (val_add, ":town_food_store", 30), #add 30 food (significant for castles only. (try_end), (val_min, ":town_food_store", ":food_store_limit"), (val_max, ":town_food_store", 0), (party_set_slot, ":center_no", slot_party_food_store, ":town_food_store"), (try_end), ]), # script_lift_siege # Input: arg1 = center_no, arg2 = display_message # Output: none #called from triggers ("lift_siege", [ (store_script_param, ":center_no", 1), (store_script_param, ":display_message", 2), (party_set_slot, ":center_no", slot_center_is_besieged_by, -1), #clear siege (call_script, "script_village_set_state", ":center_no", 0), #clear siege flag (try_begin), (eq, ":center_no", "$g_player_besiege_town"), (assign, "$g_siege_method", 0), #remove siege progress (try_end), (try_begin), (eq, ":display_message", 1), (str_store_party_name_link, s3, ":center_no"), (display_message, "@{s3} is no longer under siege."), (try_end), ]), # script_process_alarms # Input: none # Output: none #called from triggers ("process_alarms", [(try_for_range, ":center_no", centers_begin, centers_end), (party_set_slot, ":center_no", slot_center_last_spotted_enemy, -1), (try_end), (assign, ":spotting_range", 2), (try_begin), (is_currently_night), (assign, ":spotting_range", 1), (try_end), (try_begin), (party_slot_eq, ":center_no", slot_center_has_watch_tower, 1), (val_mul, ":spotting_range", 2), (try_end), (try_for_parties, ":party_no"), (party_slot_eq, ":party_no", slot_party_type, spt_kingdom_hero_party), (neg|party_is_in_any_town, ":party_no"), (store_faction_of_party, ":party_faction", ":party_no"), (try_for_range, ":center_no", centers_begin, centers_end), (store_distance_to_party_from_party, ":distance", ":party_no", ":center_no"), (le, ":distance", ":spotting_range"), (store_faction_of_party, ":center_faction", ":center_no"), (store_relation, ":reln", ":center_faction", ":party_faction"), (lt, ":reln", 0), (party_set_slot, ":center_no", slot_center_last_spotted_enemy, ":party_no"), (try_end), (try_end), (try_for_range, ":center_no", centers_begin, centers_end), (store_faction_of_party, ":center_faction", ":center_no"), (this_or_next|party_slot_eq, ":center_no", slot_town_lord, "trp_player"), (eq, ":center_faction", "$players_kingdom"), (party_get_slot, ":enemy_party", ":center_no", slot_center_last_spotted_enemy), (ge, ":enemy_party", 0), (store_distance_to_party_from_party, ":dist", "p_main_party", ":center_no"), (assign, ":has_messenger", 0), (try_begin), (this_or_next|party_slot_eq, ":center_no", slot_town_lord, "trp_player"), (eq, ":center_faction", "fac_player_supporters_faction"), (party_slot_eq, ":center_no", slot_center_has_messenger_post, 1), (assign, ":has_messenger", 1), (try_end), (this_or_next|lt, ":dist", 30), (eq, ":has_messenger", 1), (str_store_party_name_link, s1, ":center_no"), (display_message, "@Enemies spotted near {s1}."), (try_end), ]), # script_party_set_ai_state # Input: arg1 = party_no, arg2 = new_ai_state, arg3 = action_object (if necessary) # Output: none (Can fail) ("party_set_ai_state", [ (store_script_param, ":party_no", 1), (store_script_param, ":new_ai_state", 2), (store_script_param, ":new_ai_object", 3), (party_get_slot, ":old_ai_state", ":party_no", slot_party_ai_state), (party_get_slot, ":old_ai_object", ":party_no", slot_party_ai_object), (party_get_attached_to, ":attached_to_party", ":party_no"), (assign, ":party_is_in_town", 0), (try_begin), (is_between, ":attached_to_party", centers_begin, centers_end), (assign, ":party_is_in_town", ":attached_to_party"), (try_end), (party_set_slot, ":party_no", slot_party_follow_me, 0), (try_begin), (eq, ":old_ai_state", ":new_ai_state"), (eq, ":old_ai_object", ":new_ai_object"), #do nothing. Nothing is changed. (else_try), (try_begin), (eq, ":new_ai_state", spai_accompanying_army), (party_set_ai_behavior, ":party_no", ai_bhvr_escort_party), (party_set_ai_object, ":party_no", ":new_ai_object"), (party_set_flags, ":party_no", pf_default_behavior, 0), (try_begin), (gt, ":party_is_in_town", 0), (party_detach, ":party_no"), (try_end), (else_try), (eq, ":new_ai_state", spai_besieging_center), (party_get_position, pos1, ":new_ai_object"), (map_get_random_position_around_position, pos2, pos1, 2), (party_set_ai_behavior, ":party_no", ai_bhvr_travel_to_point), (party_set_ai_target_position, ":party_no", pos2), (party_set_ai_object, ":party_no", ":new_ai_object"), (party_set_flags, ":party_no", pf_default_behavior, 0), (party_set_slot, ":party_no", slot_party_follow_me, 1), (party_set_slot, ":party_no", slot_party_ai_substate, 0), (try_begin), (gt, ":party_is_in_town", 0), (neq, ":party_is_in_town", ":new_ai_object"), (party_detach, ":party_no"), (try_end), (else_try), (eq, ":new_ai_state", spai_holding_center), (party_set_ai_behavior, ":party_no", ai_bhvr_travel_to_party), (party_set_ai_object, ":party_no", ":new_ai_object"), (party_set_flags, ":party_no", pf_default_behavior, 0), (try_begin), (gt, ":party_is_in_town", 0), (neq, ":party_is_in_town", ":new_ai_object"), (party_detach, ":party_no"), (try_end), (else_try), (eq, ":new_ai_state", spai_patrolling_around_center), (party_get_position, pos1, ":new_ai_object"), (map_get_random_position_around_position, pos2, pos1, 1), (party_set_ai_behavior, ":party_no", ai_bhvr_travel_to_point), (party_set_ai_target_position, ":party_no", pos2), (party_set_ai_object, ":party_no", ":new_ai_object"), (party_set_ai_patrol_radius, ":party_no", 5), (party_set_flags, ":party_no", pf_default_behavior, 0), (party_set_slot, ":party_no", slot_party_follow_me, 1), (party_set_slot, ":party_no", slot_party_ai_substate, 0), (try_begin), (gt, ":party_is_in_town", 0), (party_detach, ":party_no"), (try_end), (else_try), (eq, ":new_ai_state", spai_recruiting_troops), (party_get_position, pos1, ":new_ai_object"), (map_get_random_position_around_position, pos2, pos1, 2), (party_set_ai_behavior, ":party_no", ai_bhvr_travel_to_point), (party_set_ai_target_position, ":party_no", pos2), (party_set_ai_object, ":party_no", ":new_ai_object"), (party_set_flags, ":party_no", pf_default_behavior, 0), (party_set_slot, ":party_no", slot_party_ai_substate, 0), (try_begin), (gt, ":party_is_in_town", 0), (neq, ":party_is_in_town", ":new_ai_object"), (party_detach, ":party_no"), (try_end), (else_try), (eq, ":new_ai_state", spai_raiding_around_center), (party_get_position, pos1, ":new_ai_object"), (map_get_random_position_around_position, pos2, pos1, 1), (party_set_ai_behavior, ":party_no", ai_bhvr_patrol_location), (party_set_ai_patrol_radius, ":party_no", 10), (party_set_ai_target_position, ":party_no", pos2), (party_set_ai_object, ":party_no", ":new_ai_object"), (party_set_flags, ":party_no", pf_default_behavior, 0), (party_set_slot, ":party_no", slot_party_follow_me, 1), (party_set_slot, ":party_no", slot_party_ai_substate, 0), (try_begin), (gt, ":party_is_in_town", 0), (neq, ":party_is_in_town", ":new_ai_object"), (party_detach, ":party_no"), (try_end), (else_try), ## (eq, ":new_ai_state", spai_raiding_village), ## (party_get_position, pos1, ":new_ai_object"), ## (map_get_random_position_around_position, pos2, pos1, 1), ## (party_set_ai_behavior, ":party_no", ai_bhvr_travel_to_point), ## (party_set_ai_target_position, ":party_no", pos2), ## (party_set_ai_object, ":party_no", ":new_ai_object"), ## (party_set_flags, ":party_no", pf_default_behavior, 0), ## (party_set_slot, ":party_no", slot_party_follow_me, 1), ## (try_begin), ## (gt, ":party_is_in_town", 0), ## (neq, ":party_is_in_town", ":new_ai_object"), ## (party_detach, ":party_no"), ## (try_end), ## (else_try), (eq, ":new_ai_state", spai_engaging_army), (party_set_ai_behavior, ":party_no", ai_bhvr_attack_party), (party_set_ai_object, ":party_no", ":new_ai_object"), (party_set_flags, ":party_no", pf_default_behavior, 0), (try_begin), (gt, ":party_is_in_town", 0), (party_detach, ":party_no"), (try_end), (else_try), (eq, ":new_ai_state", spai_retreating_to_center), (party_set_ai_behavior, ":party_no", ai_bhvr_travel_to_party), (party_set_ai_object, ":party_no", ":new_ai_object"), (party_set_flags, ":party_no", pf_default_behavior, 1), (party_set_slot, ":party_no", slot_party_commander_party, -1), (try_begin), (gt, ":party_is_in_town", 0), (neq, ":party_is_in_town", ":new_ai_object"), (party_detach, ":party_no"), (try_end), (else_try), (eq, ":new_ai_state", spai_undefined), (party_set_ai_behavior, ":party_no", ai_bhvr_hold), (party_set_flags, ":party_no", pf_default_behavior, 0), (try_end), (try_end), (party_set_slot, ":party_no", slot_party_ai_state, ":new_ai_state"), (party_set_slot, ":party_no", slot_party_ai_object, ":new_ai_object"), ]), # script_decide_kingdom_party_ais # Input: none # Output: none #called from triggers ("decide_kingdom_party_ais", [ (try_for_range, ":faction_no", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":faction_no", slot_faction_state, sfs_active), (neq, ":faction_no", "fac_player_supporters_faction"), (faction_get_slot, ":faction_ai_state", ":faction_no", slot_faction_ai_state), (neq, ":faction_ai_state", sfai_default), (faction_get_slot, ":faction_ai_object", ":faction_no", slot_faction_ai_object), (faction_get_slot, ":faction_marshall", ":faction_no", slot_faction_marshall), (gt, ":faction_marshall", 0), (neq, ":faction_marshall", "trp_player"), (troop_get_slot, ":faction_marshall_party", ":faction_marshall", slot_troop_leaded_party), (gt, ":faction_marshall_party", 0), (try_begin), (eq, ":faction_ai_state", sfai_gathering_army), (call_script, "script_party_set_ai_state", ":faction_marshall_party", spai_undefined, -1), (party_set_ai_initiative, ":faction_marshall_party", 100), (else_try), (eq, ":faction_ai_state", sfai_attacking_center), (call_script, "script_party_set_ai_state", ":faction_marshall_party", spai_besieging_center, ":faction_ai_object"), (party_set_ai_initiative, ":faction_marshall_party", 50), (else_try), (eq, ":faction_ai_state", sfai_raiding_village), (call_script, "script_party_set_ai_state", ":faction_marshall_party", spai_raiding_around_center, ":faction_ai_object"), (party_set_ai_initiative, ":faction_marshall_party", 50), (else_try), (eq, ":faction_ai_state", sfai_attacking_enemies_around_center), (call_script, "script_party_set_ai_state", ":faction_marshall_party", spai_patrolling_around_center, ":faction_ai_object"), (party_set_ai_initiative, ":faction_marshall_party", 50), (else_try), (eq, ":faction_ai_state", sfai_attacking_enemy_army), (call_script, "script_party_set_ai_state", ":faction_marshall_party", spai_engaging_army, ":faction_ai_object"), (party_set_ai_initiative, ":faction_marshall_party", 50), (try_end), (party_set_slot, ":faction_marshall_party", slot_party_commander_party, -1), (try_end), (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (try_begin), (store_troop_faction, ":troop_faction", ":troop_no"), (neg|faction_slot_eq, ":troop_faction", slot_faction_marshall, ":troop_no"), (troop_get_slot, ":troop_party", ":troop_no", slot_troop_leaded_party), (gt, ":troop_party", 0), (party_is_active, ":troop_party"), (party_set_ai_initiative, ":troop_party", 100), (try_end), (call_script, "script_calculate_troop_ai", ":troop_no"), (try_end), (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (call_script, "script_calculate_troop_ai_under_command", ":troop_no"), (try_end), ]), # script_party_decide_next_ai_state_under_command # Input: arg1 = party_no # Output: none #called from triggers ("party_decide_next_ai_state_under_command", [ (store_script_param_1, ":party_no"), (party_get_slot, ":commander_party", ":party_no", slot_party_commander_party), (try_begin), (party_is_active, ":commander_party"), (party_get_slot, ":commander_ai_state", ":commander_party", slot_party_ai_state), (party_get_slot, ":commander_ai_object", ":commander_party", slot_party_ai_object), (store_faction_of_party, ":faction_no", ":party_no"), (store_distance_to_party_from_party, ":distance_to_commander", ":party_no", ":commander_party"), (try_begin), (gt, ":distance_to_commander", 5), (call_script, "script_party_set_ai_state", ":party_no", spai_accompanying_army, ":commander_party"), (else_try), (try_begin), (eq, ":commander_party", "p_main_party"), (call_script, "script_party_set_ai_state", ":party_no", spai_accompanying_army, "p_main_party"), (else_try), (eq, ":commander_ai_state", spai_besieging_center), (store_distance_to_party_from_party, ":distance_to_object", ":party_no", ":commander_ai_object"), (le, ":distance_to_object", 5), (call_script, "script_party_set_ai_state", ":party_no", spai_besieging_center, ":commander_ai_object"), (else_try), #find current center (party_get_attached_to, ":cur_center_no", ":commander_party"), (assign, ":handled", 0), (try_begin), (lt, ":cur_center_no", 0), (party_get_cur_town, ":cur_center_no", ":commander_party"), (try_end), (try_begin), (eq, ":commander_ai_state", spai_holding_center), (call_script, "script_party_set_ai_state", ":party_no", spai_holding_center, ":commander_ai_object"), (assign, ":handled", 1), (else_try), (eq, ":commander_ai_state", spai_undefined), (is_between, ":cur_center_no", centers_begin, centers_end), (call_script, "script_party_set_ai_state", ":party_no", spai_holding_center, ":cur_center_no"), (assign, ":handled", 1), (try_end), (eq, ":handled", 1), (else_try), (faction_get_slot, ":faction_marshall", ":faction_no", slot_faction_marshall), (ge, ":faction_marshall", 0), (troop_slot_eq, ":faction_marshall", slot_troop_leaded_party, ":commander_party"), (call_script, "script_party_set_ai_state", ":party_no", spai_accompanying_army, ":commander_party"), (else_try), (this_or_next|eq, ":commander_ai_state", spai_patrolling_around_center), (this_or_next|eq, ":commander_ai_state", spai_raiding_around_center), (eq, ":commander_ai_state", spai_engaging_army), (call_script, "script_party_set_ai_state", ":party_no", spai_accompanying_army, ":commander_party"), (else_try), #Commander doesn't need accompany. Cancel (call_script, "script_party_set_ai_state", ":party_no", spai_undefined, -1), (party_set_slot, ":party_no", slot_party_commander_party, -1), (try_end), (try_end), (try_end), ]), # script_kingdom_hero_decide_next_ai_state_follow_or_not # Input: arg1 = troop_no # Output: none #called from triggers ("kingdom_hero_decide_next_ai_state_follow_or_not", [ (store_script_param_1, ":troop_no"), (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), (try_begin), (party_get_slot, ":old_ai_state", ":party_no", slot_party_ai_state), (assign, ":cancel", 0), (try_begin), #if we are retreating to a center keep retreating (eq, ":old_ai_state", spai_retreating_to_center), (neg|party_is_in_any_town, ":party_no"), (assign, ":cancel", 1), (try_end), (eq, ":cancel", 0), (party_get_slot, ":our_strength", ":party_no", slot_party_cached_strength), (store_div, ":min_strength_behind", ":our_strength", 2), (assign, ":under_siege", 0), #find current center (party_get_attached_to, ":cur_center_no", ":party_no"), (try_begin), (lt, ":cur_center_no", 0), (party_get_cur_town, ":cur_center_no", ":party_no"), (try_end), (try_begin), (neg|is_between, ":cur_center_no", centers_begin, centers_end), (assign, ":cur_center_no", -1), (assign, ":cur_center_nearby_strength", 0), (store_sub, ":cur_center_left_strength", 1000000),#must be higher than our strength (else_try), (party_get_slot, ":cur_center_nearby_strength", ":cur_center_no", slot_party_nearby_friend_strength), (store_sub, ":cur_center_left_strength", ":cur_center_nearby_strength", ":our_strength"), (party_get_slot, ":besieger_party", ":cur_center_no", slot_center_is_besieged_by), (gt, ":besieger_party", 0), (party_is_active, ":besieger_party"), (assign, ":under_siege", 1), (try_end), (store_troop_faction, ":faction_no", ":troop_no"), (faction_get_slot, ":faction_ai_state", ":faction_no", slot_faction_ai_state), (party_get_slot, ":commander_party", ":party_no", slot_party_commander_party), (try_begin), (ge, ":commander_party", 0), (try_begin), (party_is_active, ":commander_party"), (try_begin), (store_faction_of_party, ":commander_faction", ":commander_party"), (neq, ":faction_no", ":commander_faction"), (assign, ":continue", 0), (try_begin), (neq, ":commander_party", "p_main_party"), (assign, ":continue", 1), (else_try), (neq, "$players_kingdom", ":faction_no"), (assign, ":continue", 1), (try_end), (eq, ":continue", 1), (assign, ":commander_party", -1), (try_end), (else_try), (assign, ":commander_party", -1), (try_end), (try_end), (faction_get_slot, ":num_towns", ":faction_no", slot_faction_num_towns), (store_mul, ":faction_center_value", ":num_towns", 2), (faction_get_slot, ":num_castles", ":faction_no", slot_faction_num_castles), (val_add, ":faction_center_value", ":num_castles"), (val_mul, ":faction_center_value", 10), (val_max, ":faction_center_value", 5), (troop_get_slot, ":readiness", ":troop_no", slot_troop_readiness_to_join_army), (assign, ":chance_to_follow_other_party", 0), (assign, ":target_to_follow_other_party", -1), (try_begin), #follow other party (eq, ":under_siege", 0), (ge, ":cur_center_left_strength", ":min_strength_behind"), (assign, ":continue", 0), (try_begin), (ge, ":commander_party", 0), (gt, "$party_relative_strength", 30), (assign, ":continue", 1), (else_try), (gt, "$party_relative_strength", 50), (lt, "$ratio_of_prisoners", 50), (assign, ":continue", 1), (try_end), (eq, ":continue", 1), (try_begin), (eq, ":faction_no", "fac_player_supporters_faction"), (neg|troop_slot_eq, ":troop_no", slot_troop_player_order_state, spai_undefined), (assign, ":continue", 0), (try_end), (eq, ":continue", 1), (faction_get_slot, ":faction_marshall", ":faction_no", slot_faction_marshall), (ge, ":faction_marshall", 0), #(troop_slot_eq, ":faction_marshall", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":faction_marshall", slot_troop_prisoner_of_party, 0), (troop_get_slot, ":faction_marshall_party", ":faction_marshall", slot_troop_leaded_party), (neq, ":faction_marshall", ":troop_no"), (ge, ":faction_marshall_party", 0), (try_begin), (eq, ":faction_ai_state", sfai_gathering_army), (assign, ":old_target_to_follow_other_party", -1), (try_begin), (ge, ":commander_party", 0), (assign, ":old_target_to_follow_other_party", ":commander_party"), (try_end), (assign, ":continue", 0), (try_begin), (ge, ":readiness", 60), (assign, ":continue", 1), (else_try), (ge, ":readiness", 10), (eq, ":old_target_to_follow_other_party", ":faction_marshall_party"), (assign, ":continue", 1), (try_end), (try_begin), (eq, ":continue", 1), (store_distance_to_party_from_party, ":dist", ":faction_marshall_party", ":party_no"), (store_sub, ":chance", 120, ":dist"), ## (val_mul, ":chance", 3), ## (val_div, ":chance", 2), (val_min, ":chance", 100), (val_max, ":chance", 20), (store_sub, ":faction_advantage_effect", "$g_average_center_value_per_faction", ":faction_center_value"), (val_mul, ":faction_advantage_effect", 2), (val_add, ":chance", ":faction_advantage_effect"), (val_max, ":chance", 10), (assign, ":target_to_follow_other_party", ":faction_marshall_party"), (assign, ":chance_to_follow_other_party", ":chance"), (try_begin), (eq, ":old_target_to_follow_other_party", ":target_to_follow_other_party"), (val_mul, ":chance_to_follow_other_party", 1000), (try_end), (try_end), (else_try), (this_or_next|eq, ":faction_ai_state", sfai_attacking_center), (this_or_next|eq, ":faction_ai_state", sfai_raiding_village), (this_or_next|eq, ":faction_ai_state", sfai_attacking_enemies_around_center), (eq, ":faction_ai_state", sfai_attacking_enemy_army), (eq, ":commander_party", ":faction_marshall_party"), (ge, ":readiness", 10), (assign, ":target_to_follow_other_party", ":faction_marshall_party"), (assign, ":chance_to_follow_other_party", 100000), (try_end), (try_end), (try_begin), #follow other party with initiative (le, ":chance_to_follow_other_party", 0), (eq, ":under_siege", 0), (ge, ":cur_center_left_strength", ":min_strength_behind"), (assign, ":continue", 0), (try_begin), (ge, ":commander_party", 0), (gt, "$party_relative_strength", 40), (assign, ":continue", 1), (else_try), (gt, "$party_relative_strength", 75), (lt, "$ratio_of_prisoners", 50), (assign, ":continue", 1), (try_end), (eq, ":continue", 1), (try_begin), (eq, ":faction_no", "fac_player_supporters_faction"), (neg|troop_slot_eq, ":troop_no", slot_troop_player_order_state, spai_undefined), (neg|troop_slot_eq, ":troop_no", slot_troop_player_order_state, spai_accompanying_army), (assign, ":continue", 0), (try_end), (eq, ":continue", 1), (neg|faction_slot_eq, ":faction_no", slot_faction_leader, ":troop_no"), (assign, ":old_target_to_follow_other_party", -1), (try_begin), (ge, ":commander_party", 0), (assign, ":old_target_to_follow_other_party", ":commander_party"), (try_end), (troop_get_slot, ":hero_renown", ":troop_no", slot_troop_renown), (assign, ":num_available_to_follow", 0), (try_begin), (eq, "p_main_party", ":old_target_to_follow_other_party"), (val_add, ":num_available_to_follow", 1), (eq, "p_main_party", ":old_target_to_follow_other_party"), (val_add, ":num_available_to_follow", 999), (try_end), (try_for_range, ":other_hero", kingdom_heroes_begin, kingdom_heroes_end), (neq, ":other_hero", ":troop_no"), (store_troop_faction, ":troop_faction", ":other_hero"), (eq, ":troop_faction", ":faction_no"), (troop_get_slot, ":other_party", ":other_hero", slot_troop_leaded_party), (ge, ":other_party", 0), (troop_get_slot, ":other_hero_renown", ":other_hero", slot_troop_renown), (lt, ":hero_renown", ":other_hero_renown"), (neg|party_slot_ge, ":other_party", slot_party_commander_party, 0), #other party is not under command itself. (store_distance_to_party_from_party, ":dist", ":other_party", ":party_no"), (lt, ":dist", 25), (party_slot_eq, ":other_party", slot_party_follow_me, 1), (val_add, ":num_available_to_follow", 1), (eq, ":other_party", ":old_target_to_follow_other_party"), (val_add, ":num_available_to_follow", 999), (try_end), (gt, ":num_available_to_follow", 0), (store_random_in_range, ":random_party_to_follow", 0, ":num_available_to_follow"), (try_begin), (eq, "p_main_party", ":old_target_to_follow_other_party"), (val_sub, ":random_party_to_follow", 1), (try_begin), (eq, "p_main_party", ":old_target_to_follow_other_party"), (val_sub, ":random_party_to_follow", 999), (try_end), (lt, ":random_party_to_follow", 0), (store_mul, ":chance", 100, "$g_average_center_value_per_faction"),#this value is calculated at the beginning of the game (val_div, ":chance", ":faction_center_value"), (val_max, ":chance", 10), (assign, ":chance_to_follow_other_party", ":chance"), (val_mul, ":chance_to_follow_other_party", 2),#trp_player is always the leader (assign, ":target_to_follow_other_party", "p_main_party"), (eq, ":old_target_to_follow_other_party", ":target_to_follow_other_party"), (val_mul, ":chance_to_follow_other_party", 100), (try_end), (try_for_range, ":other_hero", kingdom_heroes_begin, kingdom_heroes_end), (eq, ":target_to_follow_other_party", -1), (neq, ":other_hero", ":troop_no"), (store_troop_faction, ":troop_faction", ":other_hero"), (eq, ":troop_faction", ":faction_no"), (troop_get_slot, ":other_party", ":other_hero", slot_troop_leaded_party), (ge, ":other_party", 0), (troop_get_slot, ":other_hero_renown", ":other_hero", slot_troop_renown), (lt, ":hero_renown", ":other_hero_renown"), (neg|party_slot_ge, ":other_party", slot_party_commander_party, 0), #other party is not under command itself. (store_distance_to_party_from_party, ":dist", ":other_party", ":party_no"), (lt, ":dist", 25), (party_slot_eq, ":other_party", slot_party_follow_me, 1), (val_sub, ":random_party_to_follow", 1), (try_begin), (eq, ":other_party", ":old_target_to_follow_other_party"), (val_sub, ":random_party_to_follow", 999), (try_end), (lt, ":random_party_to_follow", 0), (store_mul, ":chance", 100, "$g_average_center_value_per_faction"),#this value is calculated at the beginning of the game (val_div, ":chance", ":faction_center_value"), (val_max, ":chance", 10), (assign, ":chance_to_follow_other_party", ":chance"), (try_begin), (faction_slot_eq, ":faction_no", slot_faction_leader, ":other_hero"), (val_mul, ":chance_to_follow_other_party", 2), (try_end), (assign, ":target_to_follow_other_party", ":other_party"), (eq, ":old_target_to_follow_other_party", ":target_to_follow_other_party"), (val_mul, ":chance_to_follow_other_party", 100), (try_end), (try_end), (assign, ":sum_chances", ":chance_to_follow_other_party"), (val_add, ":sum_chances", 600), (store_random_in_range, ":random_no", 0, ":sum_chances"), (try_begin), (val_sub, ":random_no", ":chance_to_follow_other_party"), (lt, ":random_no", 0), (party_set_slot, ":party_no", slot_party_commander_party, ":target_to_follow_other_party"), (else_try), (party_set_slot, ":party_no", slot_party_commander_party, -1), (try_end), (try_end), ]), # script_kingdom_hero_decide_next_ai_state # Input: arg1 = troop_no # Output: none #called from triggers ("kingdom_hero_decide_next_ai_state", [ (store_script_param_1, ":troop_no"), (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), (try_begin), (party_get_slot, ":our_strength", ":party_no", slot_party_cached_strength), (store_div, ":min_strength_behind", ":our_strength", 2), (party_get_slot, ":our_follower_strength", ":party_no", slot_party_follower_strength), (store_troop_faction, ":faction_no", ":troop_no"), #find current center (assign, ":besieger_party", -1), (party_get_attached_to, ":cur_center_no", ":party_no"), (try_begin), (lt, ":cur_center_no", 0), (party_get_cur_town, ":cur_center_no", ":party_no"), (try_end), (try_begin), (neg|is_between, ":cur_center_no", centers_begin, centers_end), (assign, ":cur_center_no", -1), (assign, ":cur_center_nearby_strength", 0), (store_sub, ":cur_center_left_strength", 1000000),#must be higher than our strength (else_try), (party_get_slot, ":cur_center_nearby_strength", ":cur_center_no", slot_party_nearby_friend_strength), (store_sub, ":cur_center_left_strength", ":cur_center_nearby_strength", ":our_strength"), (party_get_slot, ":besieger_party", ":cur_center_no", slot_center_is_besieged_by), (try_begin), (neg|party_is_active, ":besieger_party"), (assign, ":besieger_party", -1), (try_end), (store_faction_of_party, ":cur_center_faction", ":cur_center_no"), (store_relation, ":cur_center_relation", ":cur_center_faction", ":faction_no"), (try_end), (party_get_slot, ":old_ai_state", ":party_no", slot_party_ai_state), (party_get_slot, ":old_ai_object", ":party_no", slot_party_ai_object), (assign, ":cancel", 0), (try_begin), #if we are retreating to a center keep retreating (eq, ":old_ai_state", spai_retreating_to_center), (neg|party_is_in_any_town, ":party_no"), (assign, ":cancel", 1), (try_end), (eq, ":cancel", 0), ## (faction_get_slot, ":faction_ai_state", ":faction_no", slot_faction_ai_state), ## (faction_get_slot, ":faction_ai_object", ":faction_no", slot_faction_ai_object), (faction_get_slot, ":num_towns", ":faction_no", slot_faction_num_towns), (store_mul, ":faction_center_value", ":num_towns", 2), (faction_get_slot, ":num_castles", ":faction_no", slot_faction_num_castles), (val_add, ":faction_center_value", ":num_castles"), (val_mul, ":faction_center_value", 10), (val_max, ":faction_center_value", 5), (assign, ":chance_move_to_home_center", 0), (assign, ":target_move_to_home_center", -1), (assign, ":chance_move_to_other_center", 0), (assign, ":target_move_to_other_center", -1), (assign, ":chance_besiege_enemy_center", 0), (assign, ":target_besiege_enemy_center", -1), (assign, ":chance_patrol_around_center", 0), (assign, ":target_patrol_around_center", -1), (assign, ":chance_raid_around_center", 0), (assign, ":target_raid_around_center", -1), (assign, ":chance_recruit_troops", 0), (assign, ":target_recruit_troops", -1), (try_begin),#Moving to home center (eq, ":besieger_party", -1), (assign, ":old_target_move_to_home_center", -1), (try_begin), (eq, ":old_ai_state", spai_holding_center), (assign, ":old_target_move_to_home_center", ":old_ai_object"), (try_end), (try_begin), (is_between, ":cur_center_no", centers_begin, centers_end), #already in our center (party_slot_eq, ":cur_center_no", slot_town_lord, ":troop_no"), (assign, ":target_move_to_home_center", ":cur_center_no"), (assign, ":chance_move_to_home_center", 100), (try_end), (try_begin), (eq, ":target_move_to_home_center", -1), (this_or_next|gt, "$party_relative_strength", 20),#stay inside if strength is too low (eq, ":cur_center_no", -1), (ge, ":cur_center_left_strength", ":min_strength_behind"),#stay inside if center strength is too low (call_script, "script_cf_troop_get_random_leaded_walled_center_with_less_strength_priority", ":troop_no", ":old_target_move_to_home_center"),#Can fail (assign, ":target_move_to_home_center", reg0), (assign, ":chance_move_to_home_center", 50), (try_begin), (eq, ":old_target_move_to_home_center", ":target_move_to_home_center"), (val_mul, ":chance_move_to_home_center", 100), (try_end), (try_end), (try_end), (try_begin),#Moving to other center (try_begin), (ge, ":besieger_party", 0), (ge, ":cur_center_relation", 0), (assign, ":chance_move_to_other_center", 50000), (assign, ":target_move_to_other_center", ":cur_center_no"), (else_try), (assign, ":old_target_move_to_other_center", -1), (try_begin), (eq, ":old_ai_state", spai_holding_center), (assign, ":old_target_move_to_other_center", ":old_ai_object"), (try_end), ## (try_begin), ## (party_slot_eq, ":party_no", slot_party_ai_state, spai_holding_center), ## (party_get_slot, ":target_move_to_other_center", ":party_no", slot_party_ai_object), ## (try_begin), ## (call_script, "script_party_calculate_regular_strength", ":target_move_to_other_center"), ## (assign, ":strength", reg0), ## (le, ":strength", 10), ## (assign, ":chance_move_to_other_center", 500), ## (else_try), ## (assign, ":chance_move_to_other_center", 30), ## (try_end), ## (try_end), (try_begin), (eq, ":target_move_to_other_center", -1), (try_begin), (this_or_next|le, "$party_relative_strength", 20),#stay inside if strength is too low (lt, ":cur_center_left_strength", ":min_strength_behind"),#stay inside if center strength is too low (is_between, ":cur_center_no", centers_begin, centers_end), (ge, ":cur_center_relation", 0), (assign, ":chance_move_to_other_center", 500), (assign, ":target_move_to_other_center", ":cur_center_no"), (else_try), (call_script, "script_cf_select_random_walled_center_with_faction_and_less_strength_priority", ":faction_no", ":old_target_move_to_other_center"), (assign, ":target_move_to_other_center", reg0), (assign, ":chance_move_to_other_center", 10), (party_get_slot, ":lord_of_center", ":target_move_to_other_center", slot_town_lord), (try_begin), (call_script, "script_cf_troop_check_troop_is_enemy", ":troop_no", ":lord_of_center"), (assign, ":chance_move_to_other_center", 1), (try_end), (try_begin), (eq, ":old_target_move_to_other_center", ":target_move_to_other_center"), (val_mul, ":chance_move_to_other_center", 1000), (try_end), (try_end), (try_end), (try_end), (try_end), (try_begin), (lt, "$party_relative_strength", 50), (store_sub, ":factor", 100, "$party_relative_strength"), (try_begin), (gt, ":chance_move_to_home_center", 0), (val_mul, ":chance_move_to_home_center", 200), (val_div, ":chance_move_to_home_center", ":factor"), (else_try), (val_mul, ":chance_move_to_other_center", 200), (val_div, ":chance_move_to_other_center", ":factor"), (try_end), (try_end), (try_begin), (gt, "$ratio_of_prisoners", 50), (try_begin), (gt, ":chance_move_to_home_center", 0), (val_mul, ":chance_move_to_home_center", 2), (else_try), (val_mul, ":chance_move_to_other_center", 2), (try_end), (try_end), (try_begin), #Recruiting troops (eq, ":besieger_party", -1), (ge, ":cur_center_left_strength", ":min_strength_behind"),#stay inside if center strength is too low (assign, ":old_target_recruit_troops", -1), (try_begin), (eq, ":old_ai_state", spai_recruiting_troops), (assign, ":old_target_recruit_troops", ":old_ai_object"), (try_end), (troop_get_slot, ":original_faction", ":troop_no", slot_troop_original_faction), (faction_get_slot, ":original_faction_culture", ":original_faction", slot_faction_culture), (assign, ":num_villages", 0), (try_for_range, ":village_no", villages_begin, villages_end), (store_faction_of_party, ":village_faction_no", ":village_no"), (store_relation, ":reln", ":village_faction_no", ":faction_no"), (this_or_next|ge, ":reln", 0), (party_slot_eq, ":village_no", slot_center_culture, ":original_faction_culture"), (assign, ":faction_factor", 1), (try_begin), (eq, ":village_faction_no", ":faction_no"), (assign, ":faction_factor", 20), (try_end), (assign, ":amount_factor", 1), (party_get_slot, ":volunteer_amount", ":village_no", slot_center_npc_volunteer_troop_amount), (try_begin), (gt, ":volunteer_amount", 0), (val_add, ":volunteer_amount", 5), (val_add, ":amount_factor", ":volunteer_amount"), (try_end), (store_distance_to_party_from_party, ":dist", ":village_no", ":party_no"), (store_sub, ":dist_factor", 100, ":dist"), (val_max, ":dist_factor", 10), (assign, ":raid_factor", 100), (try_begin), (party_slot_eq, ":village_no", slot_village_state, svs_being_raided), (assign, ":raid_factor", 1), (try_end), (store_mul, ":village_point", ":faction_factor", ":dist_factor"), (val_mul, ":village_point", ":raid_factor"), (val_mul, ":village_point", ":amount_factor"), (try_begin), (eq, ":village_no", ":old_target_recruit_troops"), (val_mul, ":village_point", 100), (try_end), (val_add, ":num_villages", ":village_point"), (try_end), (gt, ":num_villages", 0), (store_random_in_range, ":random_village_no", 0, ":num_villages"), (try_for_range, ":village_no", villages_begin, villages_end), (eq, ":target_recruit_troops", -1), (store_faction_of_party, ":village_faction_no", ":village_no"), (store_relation, ":reln", ":village_faction_no", ":faction_no"), (this_or_next|ge, ":reln", 0), (party_slot_eq, ":village_no", slot_center_culture, ":original_faction_culture"), (assign, ":faction_factor", 1), (try_begin), (eq, ":village_faction_no", ":faction_no"), (assign, ":faction_factor", 20), (try_end), (assign, ":amount_factor", 1), (party_get_slot, ":volunteer_amount", ":village_no", slot_center_npc_volunteer_troop_amount), (try_begin), (gt, ":volunteer_amount", 0), (val_add, ":volunteer_amount", 5), (val_add, ":amount_factor", ":volunteer_amount"), (try_end), (store_distance_to_party_from_party, ":dist", ":village_no", ":party_no"), (store_sub, ":dist_factor", 100, ":dist"), (val_max, ":dist_factor", 10), (assign, ":raid_factor", 100), (try_begin), (party_slot_eq, ":village_no", slot_village_state, svs_being_raided), (assign, ":raid_factor", 1), (try_end), (store_mul, ":village_point", ":faction_factor", ":dist_factor"), (val_mul, ":village_point", ":raid_factor"), (val_mul, ":village_point", ":amount_factor"), (try_begin), (eq, ":village_no", ":old_target_recruit_troops"), (val_mul, ":village_point", 100), (try_end), (val_sub, ":random_village_no", ":village_point"), (lt, ":random_village_no", 0), (assign, ":target_recruit_troops", ":village_no"), (assign, ":chance_recruit_troops", 3), (try_begin), (eq, ":old_target_recruit_troops", ":target_recruit_troops"), (val_mul, ":chance_recruit_troops", 1000), (try_end), (try_end), (try_end), (try_begin), #raid villages (eq, ":besieger_party", -1), (ge, ":cur_center_left_strength", ":min_strength_behind"),#stay inside if center strength is too low (gt, "$party_relative_strength", 75), (lt, "$ratio_of_prisoners", 50), (assign, ":old_target_raid_around_center", -1), (try_begin), (eq, ":old_ai_state", spai_raiding_around_center), (assign, ":old_target_raid_around_center", ":old_ai_object"), (try_end), (assign, ":num_villages", 0), (try_for_range, ":enemy_village_no", villages_begin, villages_end), (call_script, "script_get_center_faction_relation_including_player", ":enemy_village_no", ":faction_no"), (lt, reg0, 0), (assign, ":raided_by_self", 0), (try_begin), (party_slot_eq, ":enemy_village_no", slot_village_state, svs_being_raided), (party_slot_eq, ":enemy_village_no", slot_village_raided_by, ":party_no"), (assign, ":raided_by_self", 1), (try_end), (this_or_next|party_slot_eq, ":enemy_village_no", slot_village_state, 0), #village is not already raided (eq, ":raided_by_self", 1), (store_distance_to_party_from_party, ":dist", ":enemy_village_no", ":party_no"), (store_sub, ":dist_factor", 75, ":dist"), (val_max, ":dist_factor", 3), (val_add, ":num_villages", ":dist_factor"), (eq, ":enemy_village_no", ":old_target_raid_around_center"), (val_add, ":num_villages", 10000), (try_end), (gt, ":num_villages", 0), (store_random_in_range, ":random_village_no", 0, ":num_villages"), (try_for_range, ":enemy_village_no", villages_begin, villages_end), (eq, ":target_raid_around_center", -1), (call_script, "script_get_center_faction_relation_including_player", ":enemy_village_no", ":faction_no"), (lt, reg0, 0), (assign, ":raided_by_self", 0), (try_begin), (party_slot_eq, ":enemy_village_no", slot_village_state, svs_being_raided), (party_slot_eq, ":enemy_village_no", slot_village_raided_by, ":party_no"), (assign, ":raided_by_self", 1), (try_end), (this_or_next|party_slot_eq, ":enemy_village_no", slot_village_state, 0), #village is not already raided (eq, ":raided_by_self", 1), (store_distance_to_party_from_party, ":dist", ":enemy_village_no", ":party_no"), (store_sub, ":dist_factor", 75, ":dist"), (val_max, ":dist_factor", 3), (val_sub, ":random_village_no", ":dist_factor"), (try_begin), (eq, ":enemy_village_no", ":old_target_raid_around_center"), (val_sub, ":random_village_no", 10000), (try_end), (lt, ":random_village_no", 0), (assign, ":target_raid_around_center", ":enemy_village_no"), (assign, ":chance_raid_around_center", 30), (try_begin), (eq, ":old_target_raid_around_center", ":target_raid_around_center"), (val_mul, ":chance_raid_around_center", 100), (try_end), (try_end), (try_end), (try_begin), #besiege center (eq, ":besieger_party", -1), (ge, ":cur_center_left_strength", ":min_strength_behind"),#stay inside if center strength is too low (assign, ":continue", 0), (try_begin), (eq, ":old_ai_state", spai_besieging_center), (gt, "$party_relative_strength", 30), (assign, ":continue", 1), (else_try), (gt, "$party_relative_strength", 75), (lt, "$ratio_of_prisoners", 50), (assign, ":continue", 1), (try_end), (eq, ":continue", 1), (assign, ":our_estimated_str", ":our_follower_strength"), (val_add, ":our_estimated_str", ":our_strength"), (assign, ":old_target_besiege_enemy_center", -1), (try_begin), (eq, ":old_ai_state", spai_besieging_center), (assign, ":old_target_besiege_enemy_center", ":old_ai_object"), (try_end), (assign, ":best_besiege_center", -1), (assign, ":best_besiege_center_score", 0), (try_for_range, ":enemy_walled_center", walled_centers_begin, walled_centers_end), (party_get_slot, ":other_besieger_party", ":enemy_walled_center", slot_center_is_besieged_by), (assign, ":besieger_own_faction", 0), (try_begin), (ge, ":other_besieger_party", 0), (party_is_active, ":other_besieger_party"), (store_faction_of_party, ":besieger_faction", ":other_besieger_party"), (eq, ":besieger_faction", ":faction_no"), (assign, ":besieger_own_faction", 1), (try_end), (this_or_next|eq, ":other_besieger_party", -1), (eq, ":besieger_own_faction", 1), (call_script, "script_get_center_faction_relation_including_player", ":enemy_walled_center", ":faction_no"), (assign, ":reln", reg0), (lt, ":reln", 0), (val_mul, ":reln", -1), (val_add, ":reln", 50), (store_distance_to_party_from_party, ":dist", ":enemy_walled_center", ":party_no"), (store_sub, ":dist_factor", 75, ":dist"), (val_max, ":dist_factor", 3), (party_get_slot, ":center_str", ":enemy_walled_center", slot_party_cached_strength), (party_get_slot, ":center_near_str", ":enemy_walled_center", slot_party_nearby_friend_strength), (val_add, ":center_str", ":center_near_str"), (store_mul, ":relative_center_str", ":center_str", 100), (val_div, ":relative_center_str", ":our_estimated_str"), (store_sub, ":center_score", 1000, ":relative_center_str"), (val_max, ":center_score", 1), (val_mul, ":center_score", ":reln"), (val_mul, ":center_score", ":dist_factor"), (try_begin), (party_slot_eq, ":enemy_walled_center", slot_town_lord, "trp_player"), (call_script, "script_troop_get_player_relation", ":troop_no"), (assign, ":player_relation", reg0), #(troop_get_slot, ":player_relation", ":troop_no", slot_troop_player_relation), (lt, ":player_relation", 0), (store_sub, ":multiplier", 50, ":player_relation"), (val_mul, ":center_score", ":multiplier"), (val_div, ":center_score", 50), (try_end), (try_begin), (eq, ":enemy_walled_center", ":old_target_besiege_enemy_center"), (val_mul, ":center_score", 100), (try_end), (try_begin), (gt, ":center_score", ":best_besiege_center_score"), (assign, ":best_besiege_center_score", ":center_score"), (assign, ":best_besiege_center", ":enemy_walled_center"), (try_end), (try_end), (ge, ":best_besiege_center", 0), (assign, ":chance_besiege_enemy_center", 20), (assign, ":target_besiege_enemy_center", ":best_besiege_center"), (try_begin), (eq, ":old_target_besiege_enemy_center", ":target_besiege_enemy_center"), (val_mul, ":chance_besiege_enemy_center", 100), (try_end), (try_end), (try_begin), #patrol alarmed center. (eq, ":besieger_party", -1), (ge, ":cur_center_left_strength", ":min_strength_behind"),#stay inside if center strength is too low (ge, "$party_relative_strength", 60), (try_begin), (party_slot_eq, ":party_no", slot_party_ai_state, spai_patrolling_around_center), (party_get_slot, ":target_patrol_around_center", ":party_no", slot_party_ai_object), (try_end), (assign, ":old_target_patrol_around_center", -1), (try_begin), (eq, ":old_ai_state", spai_patrolling_around_center), (assign, ":old_target_patrol_around_center", ":old_ai_object"), (try_end), (assign, ":best_patrol_score", 0), (assign, ":best_patrol_target", -1), (try_for_range, ":center_no", centers_begin, centers_end), #find closest center that has spotted enemies. (store_faction_of_party, ":center_faction", ":center_no"), (eq, ":center_faction", ":faction_no"), (store_distance_to_party_from_party, ":distance", ":party_no", ":center_no"), (store_sub, ":this_center_score", 100, ":distance"), (val_max, ":this_center_score", 1), (try_begin), (party_slot_ge, ":center_no", slot_center_last_spotted_enemy, 0), (val_mul, ":this_center_score", 100), (try_end), (try_begin), (party_slot_eq, ":center_no", slot_town_lord, ":troop_no"), (val_mul, ":this_center_score", 2), (try_end), (try_begin), (eq, ":center_no", ":old_target_patrol_around_center"), (val_mul, ":this_center_score", 1000), (try_end), (try_begin), (gt, ":this_center_score", ":best_patrol_score"), (assign, ":best_patrol_score", ":this_center_score"), (assign, ":best_patrol_target", ":center_no"), (try_end), (try_end), (try_begin), (gt, ":best_patrol_score", 0), (assign, ":target_patrol_around_center", ":best_patrol_target"), (try_end), (try_begin), (is_between, ":target_patrol_around_center", centers_begin, centers_end), (assign, ":chance_patrol_around_center", 80), (try_end), (try_begin), (troop_slot_ge, ":troop_no", slot_troop_change_to_faction, 1), (val_mul, ":chance_patrol_around_center", 10), (try_end), (try_begin), (eq, ":old_target_patrol_around_center", ":target_patrol_around_center"), (val_mul, ":chance_patrol_around_center", 100), (try_end), (try_end), ## (try_begin), #cancel actions ## (party_get_slot, ":ai_state", ":party_no", slot_party_ai_state), ## (party_get_slot, ":ai_object", ":party_no", slot_party_ai_object), ## (neq, ":ai_state", spai_undefined), ## (assign, ":cancel_cur_action", 0), ## (try_begin), ## (eq, ":ai_state", spai_patrolling_around_center), ## (neg|party_slot_ge, ":ai_object", slot_center_last_spotted_enemy, 0), ## (store_random_in_range, ":rand", 0, 100), ## (lt, ":rand", 25), ## (assign, ":cancel_cur_action", 1), ## (else_try), ## (this_or_next|eq, ":ai_state", spai_besieging_center), ## (eq, ":ai_state", spai_raiding_around_center), ## (store_faction_of_party, ":ai_object_faction", ":ai_object"), ## (store_relation, ":ai_object_relation", ":ai_object_faction", ":faction_no"), ## (ge, ":ai_object_relation", 0), ## (assign, ":cancel_cur_action", 1), ## (try_end), ## (eq, ":cancel_cur_action", 0), ## (assign, ":chance_stay", 100), ## (try_end), ## (try_begin), ## (eq, ":siege_going_badly", 1), ## (assign, ":chance_besiege_enemy_center", 0), ## (assign, ":chance_stay", 0), ## (try_end), ## (try_begin), ## (eq, ":siege_going_well", 1), ## (assign, ":chance_move_to_home_center", 0), ## (assign, ":chance_move_to_other_center", 0), ## (assign, ":chance_patrol_around_center", 0), ## (assign, ":chance_besiege_enemy_center", 0), ## (assign, ":chance_help_besieged_center", 0), ## (try_end), (assign, ":sum_chances", ":chance_move_to_home_center"), (val_add, ":sum_chances", ":chance_move_to_other_center"), (val_add, ":sum_chances", ":chance_recruit_troops"), (val_add, ":sum_chances", ":chance_raid_around_center"), (val_add, ":sum_chances", ":chance_besiege_enemy_center"), (val_add, ":sum_chances", ":chance_patrol_around_center"), ## (val_add, ":sum_chances", ":chance_stay"), (val_max, ":sum_chances", 1), (store_random_in_range, ":random_no", 0, ":sum_chances"), (try_begin), (val_sub, ":random_no", ":chance_move_to_home_center"), (lt, ":random_no", 0), (call_script, "script_party_set_ai_state", ":party_no", spai_holding_center, ":target_move_to_home_center"), (party_set_flags, ":party_no", pf_default_behavior, 1), (party_set_slot, ":party_no", slot_party_commander_party, -1), (else_try), (val_sub, ":random_no", ":chance_move_to_other_center"), (lt, ":random_no", 0), (call_script, "script_party_set_ai_state", ":party_no", spai_holding_center, ":target_move_to_other_center"), (party_set_slot, ":party_no", slot_party_commander_party, -1), (else_try), (val_sub, ":random_no", ":chance_recruit_troops"), (lt, ":random_no", 0), (call_script, "script_party_set_ai_state", ":party_no", spai_recruiting_troops, ":target_recruit_troops"), (party_set_slot, ":party_no", slot_party_commander_party, -1), (else_try), (val_sub, ":random_no", ":chance_raid_around_center"), (lt, ":random_no", 0), (call_script, "script_party_set_ai_state", ":party_no", spai_raiding_around_center, ":target_raid_around_center"), (party_set_slot, ":party_no", slot_party_commander_party, -1), (else_try), (val_sub, ":random_no", ":chance_besiege_enemy_center"), (lt, ":random_no", 0), (call_script, "script_party_set_ai_state", ":party_no", spai_besieging_center, ":target_besiege_enemy_center"), (else_try), (val_sub, ":random_no", ":chance_patrol_around_center"), (lt, ":random_no", 0), (call_script, "script_party_set_ai_state", ":party_no", spai_patrolling_around_center, ":target_patrol_around_center"), (party_set_slot, ":party_no", slot_party_commander_party, -1), (else_try), (call_script, "script_party_set_ai_state", ":party_no", spai_undefined, -1), (party_set_slot, ":party_no", slot_party_commander_party, -1), (try_end), (try_end), ]), # script_process_kingdom_parties_ai # This is called more frequently than decide_kingdom_parties_ai # Input: none # Output: none #called from triggers ("process_kingdom_parties_ai", [ (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), #(troop_slot_eq, ":troop_no", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":troop_no", slot_troop_prisoner_of_party, 0), (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), (gt, ":party_no", 0), (call_script, "script_process_hero_ai", ":troop_no"), (try_end), ]), # script_process_hero_ai # This is called more frequently than script_decide_kingdom_party_ais # Input: none # Output: none #called from triggers ("process_hero_ai", [ (store_script_param_1, ":troop_no"), (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), (store_faction_of_party, ":faction_no", ":party_no"), (party_get_slot, ":ai_state", ":party_no", slot_party_ai_state), (party_get_slot, ":ai_object", ":party_no", slot_party_ai_object), (try_begin), (eq, ":ai_state", spai_besieging_center), (try_begin), (party_slot_eq, ":ai_object", slot_center_is_besieged_by, -1), (store_distance_to_party_from_party, ":distance", ":party_no", ":ai_object"), (lt, ":distance", 3), (try_begin), (party_slot_ge, ":party_no", slot_party_commander_party, 0), (party_get_slot, ":commander_party", ":party_no", slot_party_commander_party), (party_set_slot, ":ai_object", slot_center_is_besieged_by, ":commander_party"), (else_try), (party_set_slot, ":ai_object", slot_center_is_besieged_by, ":party_no"), (try_end), (store_current_hours, ":cur_hours"), (party_set_slot, ":ai_object", slot_center_siege_begin_hours, ":cur_hours"), (str_store_party_name_link, s1, ":ai_object"), (str_store_troop_name_link, s2, ":troop_no"), (str_store_faction_name_link, s3, ":faction_no"), (display_log_message, "@{s1} has been besieged by {s2} of {s3}."), (try_begin), (store_faction_of_party, ":ai_object_faction", ":ai_object"), (this_or_next|party_slot_eq, ":ai_object", slot_town_lord, "trp_player"), (eq, ":ai_object_faction", "fac_player_supporters_faction"), (call_script, "script_add_notification_menu", "mnu_notification_center_under_siege", ":ai_object", ":troop_no"), (try_end), (call_script, "script_village_set_state", ":ai_object", svs_under_siege), (assign, "$g_recalculate_ais", 1), (try_end), (else_try), (eq, ":ai_state", spai_recruiting_troops), (try_begin), (store_distance_to_party_from_party, ":distance", ":party_no", ":ai_object"), (lt, ":distance", 3), (store_current_hours, ":cur_hours"), (party_get_slot, ":substate", ":party_no", slot_party_ai_substate), (val_add, ":substate", 1), (party_set_slot, ":party_no", slot_party_ai_substate, ":substate"), (try_begin), (ge, ":substate", 4), (party_set_slot, ":party_no", slot_party_ai_substate, ":cur_hours"), (call_script, "script_party_set_ai_state", ":party_no", spai_undefined, -1), (party_set_flags, ":party_no", pf_default_behavior, 0), (party_set_slot, ":party_no", slot_party_commander_party, -1), (party_get_slot, ":troop_type", ":ai_object", slot_center_npc_volunteer_troop_type), (party_get_slot, ":troop_amount", ":ai_object", slot_center_npc_volunteer_troop_amount), (party_set_slot, ":ai_object", slot_center_npc_volunteer_troop_amount, -1), (party_add_members, ":party_no", ":troop_type", ":troop_amount"), (try_end), (try_end), (else_try), (eq, ":ai_state", spai_raiding_around_center), (party_slot_eq, ":party_no", slot_party_ai_substate, 0), (assign, ":selected_village", 0), (try_for_range, ":enemy_village_no", villages_begin, villages_end), (eq, ":selected_village", 0), (store_faction_of_party, ":enemy_village_faction", ":enemy_village_no"), (try_begin), (party_slot_eq, ":enemy_village_no", slot_town_lord, "trp_player"), (store_relation, ":reln", "fac_player_supporters_faction", ":faction_no"), (else_try), (store_relation, ":reln", ":enemy_village_faction", ":faction_no"), (try_end), (lt, ":reln", 0), (store_distance_to_party_from_party, ":dist", ":enemy_village_no", ":party_no"), (lt, ":dist", 15), (party_slot_eq, ":enemy_village_no", slot_village_state, 0), #village is not already raided #CHANGE STATE TO RAID THIS VILLAGE (assign, ":selected_village", ":enemy_village_no"), (try_end), (try_begin), (eq, ":selected_village", 0), (is_between, ":ai_object", villages_begin, villages_end), (assign, ":selected_village", ":ai_object"), (try_end), (try_begin), (gt, ":selected_village", 0), (call_script, "script_party_set_ai_state", ":party_no", spai_raiding_around_center, ":selected_village"), (try_begin), (faction_slot_eq, ":faction_no", slot_faction_marshall, ":troop_no"), (faction_slot_eq, ":faction_no", slot_faction_ai_state, sfai_raiding_village), (faction_set_slot, ":faction_no", slot_faction_ai_object, ":selected_village"), (try_end), (party_get_position, pos1, ":selected_village"), (map_get_random_position_around_position, pos2, pos1, 1), (party_set_ai_behavior, ":party_no", ai_bhvr_travel_to_point), (party_set_ai_target_position, ":party_no", pos2), (party_set_ai_object, ":party_no", ":selected_village"), (party_set_slot, ":party_no", slot_party_ai_substate, 1), (try_end), (else_try), (eq, ":ai_state", spai_raiding_around_center),#substate is 1 (try_begin), (store_distance_to_party_from_party, ":distance", ":party_no", ":ai_object"), (lt, ":distance", 2), (try_begin), (party_slot_eq, ":ai_object", slot_village_state, 0), (call_script, "script_village_set_state", ":ai_object", svs_being_raided), (party_set_slot, ":ai_object", slot_village_raided_by, ":party_no"), (try_begin), (store_faction_of_party, ":village_faction", ":ai_object"), (this_or_next|party_slot_eq, ":ai_object", slot_town_lord, "trp_player"), (eq, ":village_faction", "fac_player_supporters_faction"), (store_distance_to_party_from_party, ":dist", "p_main_party", ":ai_object"), (this_or_next|lt, ":dist", 30), (party_slot_eq, ":ai_object", slot_center_has_messenger_post, 1), (call_script, "script_add_notification_menu", "mnu_notification_village_raid_started", ":ai_object", ":troop_no"), (try_end), (else_try), (party_slot_eq, ":ai_object", slot_village_state, svs_being_raided), (else_try), #if anything other than being_raided leave (party_set_slot, ":party_no", slot_party_ai_substate, 0), (try_end), (try_end), (else_try), (eq, ":ai_state", spai_retreating_to_center), (try_begin), (party_get_battle_opponent, ":enemy_party", ":party_no"), (ge, ":enemy_party", 0), #we are in a battle! we may be caught in a loop! (call_script, "script_party_set_ai_state", ":party_no", spai_undefined, -1), (party_set_flags, ":party_no", pf_default_behavior, 0), (party_set_slot, ":party_no", slot_party_commander_party, -1), (try_end), (else_try), (eq, ":ai_state", spai_patrolling_around_center), (try_begin), (party_slot_eq, ":party_no", slot_party_ai_substate, 0), (store_distance_to_party_from_party, ":distance", ":party_no", ":ai_object"), (lt, ":distance", 3), (party_set_slot, ":party_no", slot_party_ai_substate, 1), (party_set_ai_behavior, ":party_no", ai_bhvr_patrol_party), (party_set_ai_object, ":party_no", ":ai_object"), (try_end), (else_try), (eq, ":ai_state", spai_holding_center), (party_get_attached_to, ":cur_town", ":party_no"), # Make the party sortie outside, so that it will drive away any enemies?? (try_begin), (is_between, ":cur_town", walled_centers_begin, walled_centers_end), (assign, ":sortie_chance", 50), (try_begin), (party_get_attached_to, ":cur_town", ":party_no"), (party_slot_ge, ":party_no", slot_center_is_besieged_by, 0), #town is under siege (assign, ":sortie_chance", 5), (try_end), (store_random_in_range, ":rand", 0, 100), (lt, ":rand", ":sortie_chance"), (assign, ":enemies_nearby", 0), (call_script, "script_party_calculate_regular_strength", ":party_no"), (assign, ":our_strength", reg0), (try_for_range, ":enemy_hero", kingdom_heroes_begin, kingdom_heroes_end), (store_troop_faction, ":enemy_hero_faction", ":enemy_hero"), (store_relation, ":reln", ":enemy_hero_faction", ":faction_no"), (lt, ":reln", 0), (troop_get_slot, ":enemy_party", ":enemy_hero", slot_troop_leaded_party), (gt, ":enemy_party", 0), (party_is_active, ":enemy_party"), (store_distance_to_party_from_party, ":dist", ":enemy_party", ":party_no"), (lt, ":dist", 7), (call_script, "script_party_calculate_regular_strength", "p_collective_enemy"), (gt, reg0, ":our_strength"), (assign, ":enemies_nearby", 1), (try_end), (eq, ":enemies_nearby", 0), (party_set_ai_behavior, ":party_no", ai_bhvr_travel_to_party), (party_set_ai_object, ":party_no", ":ai_object"), (party_set_flags, ":party_no", pf_default_behavior, 0), (party_detach, ":party_no"), (try_end), (try_end), ]), # script_select_faction_marshall # Input: arg1: faction_no # Output: none #called from triggers ("select_faction_marshall", [ (store_script_param_1, ":faction_no"), (faction_get_slot, ":faction_leader", ":faction_no", slot_faction_leader), (faction_get_slot, ":old_faction_marshall", ":faction_no", slot_faction_marshall), (assign, ":total_renown", 0), (try_for_range, ":loop_var", "trp_kingdom_heroes_including_player_begin", kingdom_heroes_end), (assign, ":cur_troop", ":loop_var"), (assign, ":continue", 0), (try_begin), (eq, ":loop_var", "trp_kingdom_heroes_including_player_begin"), (assign, ":cur_troop", "trp_player"), (try_begin), (eq, ":faction_no", "$players_kingdom"), (assign, ":continue", 1), (try_end), (else_try), (troop_slot_eq, ":cur_troop", slot_troop_occupation, slto_kingdom_hero), (store_troop_faction, ":cur_faction", ":cur_troop"), (eq, ":cur_faction", ":faction_no"), (troop_get_slot, ":cur_party", ":cur_troop", slot_troop_leaded_party), (gt, ":cur_party", 0), (party_is_active, ":cur_party"), (call_script, "script_party_count_fit_for_battle", ":cur_party"), (assign, ":party_fit_for_battle", reg0), (call_script, "script_party_get_ideal_size", ":cur_party"), (assign, ":ideal_size", reg0), (store_mul, ":relative_strength", ":party_fit_for_battle", 100), (val_div, ":relative_strength", ":ideal_size"), (ge, ":relative_strength", 25), (assign, ":continue", 1), (try_end), (eq, ":continue", 1), (troop_get_slot, ":renown", ":cur_troop", slot_troop_renown), (try_begin), (eq, ":cur_troop", "trp_player"), (neq, ":old_faction_marshall", "trp_player"), (assign, ":renown", 0), (try_end), (try_begin), (eq, ":cur_troop", ":faction_leader"), (val_mul, ":renown", 3), (val_div, ":renown", 4), (try_end), (try_begin), (eq, ":cur_troop", ":old_faction_marshall"), (val_mul, ":renown", 1000), (try_end), (val_add, ":total_renown", ":renown"), (try_end), (assign, ":result", -1), (try_begin), (gt, ":total_renown", 0), (store_random_in_range, ":random_renown", 0, ":total_renown"), (try_for_range, ":loop_var", "trp_kingdom_heroes_including_player_begin", kingdom_heroes_end), (eq, ":result", -1), (assign, ":cur_troop", ":loop_var"), (assign, ":continue", 0), (try_begin), (eq, ":loop_var", "trp_kingdom_heroes_including_player_begin"), (assign, ":cur_troop", "trp_player"), (try_begin), (eq, ":faction_no", "$players_kingdom"), (assign, ":continue", 1), (try_end), (else_try), (troop_slot_eq, ":cur_troop", slot_troop_occupation, slto_kingdom_hero), (store_troop_faction, ":cur_faction", ":cur_troop"), (eq, ":cur_faction", ":faction_no"), (troop_get_slot, ":cur_party", ":cur_troop", slot_troop_leaded_party), (gt, ":cur_party", 0), (party_is_active, ":cur_party"), (call_script, "script_party_count_fit_for_battle", ":cur_party"), (assign, ":party_fit_for_battle", reg0), (call_script, "script_party_get_ideal_size", ":cur_party"), (assign, ":ideal_size", reg0), (store_mul, ":relative_strength", ":party_fit_for_battle", 100), (val_div, ":relative_strength", ":ideal_size"), (ge, ":relative_strength", 25), (assign, ":continue", 1), (try_end), (eq, ":continue", 1), (troop_get_slot, ":renown", ":cur_troop", slot_troop_renown), (try_begin), (eq, ":cur_troop", "trp_player"), (neq, ":old_faction_marshall", "trp_player"), (assign, ":renown", 0), (try_end), (try_begin), (eq, ":cur_troop", ":faction_leader"), (val_mul, ":renown", 3), (val_div, ":renown", 4), (try_end), (try_begin), (eq, ":cur_troop", ":old_faction_marshall"), (val_mul, ":renown", 1000), (try_end), (val_sub, ":random_renown", ":renown"), (lt, ":random_renown", 0), (assign, ":result", ":cur_troop"), (try_end), (try_end), (try_begin), (eq, "$cheat_mode", 1), (ge, ":result", 0), (str_store_troop_name, s1, ":result"), (str_store_faction_name, s2, ":faction_no"), (display_message, "@{s1} is chosen as the marshall of {s2}."), (try_end), (assign, reg0, ":result"), ]), # script_get_center_faction_relation_including_player # Input: arg1: center_no, arg2: target_faction_no # Output: reg0: relation #called from triggers ("get_center_faction_relation_including_player", [ (store_script_param, ":center_no", 1), (store_script_param, ":target_faction_no", 2), (store_faction_of_party, ":center_faction", ":center_no"), (store_relation, ":reln", ":center_faction", ":target_faction_no"), (try_begin), (party_slot_eq, ":center_no", slot_town_lord, "trp_player"), (store_relation, ":reln", "fac_player_supporters_faction", ":target_faction_no"), (try_end), (assign, reg0, ":reln"), ]), # script_decide_faction_ai # Input: arg1: faction_no # Output: none #called from triggers ("decide_faction_ai", [ (store_script_param_1, ":faction_no"), (faction_get_slot, ":old_faction_ai_state", ":faction_no", slot_faction_ai_state), (faction_get_slot, ":old_faction_ai_object", ":faction_no", slot_faction_ai_object), (faction_get_slot, ":old_faction_ai_last_offensive_time", ":faction_no", slot_faction_ai_last_offensive_time), (assign, ":faction_marshall_party", -1), (assign, ":faction_marshall_army_strength", 1),#0 might cause division by zero problems (assign, ":faction_marshall_num_followers", 1), (call_script, "script_select_faction_marshall", ":faction_no"), (assign, ":faction_marshall", reg0), (assign, ":marshall_changed", 0), (try_begin), (neg|faction_slot_eq, ":faction_no", slot_faction_marshall, ":faction_marshall"), (assign, ":marshall_changed", 1), (eq, "$players_kingdom", ":faction_no"), (str_store_troop_name_link, s1, ":faction_marshall"), (str_store_faction_name_link, s2, ":faction_no"), (display_message, "@{s1} is the new marshall of {s2}."), (call_script, "script_check_and_finish_active_army_quests_for_faction", ":faction_no"), (try_end), (faction_set_slot, ":faction_no", slot_faction_marshall, ":faction_marshall"), (try_begin), (gt, ":faction_marshall", 0), (troop_get_slot, ":faction_marshall_party", ":faction_marshall", slot_troop_leaded_party), (gt, ":faction_marshall_party", 0), (party_get_slot, ":faction_marshall_army_strength", ":faction_marshall_party", slot_party_cached_strength), (party_get_slot, ":follower_strength", ":faction_marshall_party", slot_party_follower_strength), (val_add, ":faction_marshall_army_strength", ":follower_strength"), (try_for_range, ":cur_troop", kingdom_heroes_begin, kingdom_heroes_end), (troop_slot_eq, ":cur_troop", slot_troop_occupation, slto_kingdom_hero), (troop_get_slot, ":cur_party", ":cur_troop", slot_troop_leaded_party), (gt, ":cur_party", 0), (party_is_active, ":cur_party"), (party_slot_eq, ":cur_party", slot_party_commander_party, ":faction_marshall_party"), (val_add, ":faction_marshall_num_followers", 1), (try_end), (try_end), (faction_get_slot, ":marshall_num_old_followers", ":faction_no", slot_faction_ai_offensive_max_followers), (val_max, ":marshall_num_old_followers", 1), (store_mul, ":offensive_rating", ":faction_marshall_num_followers", 100), (val_mul, ":offensive_rating", ":faction_marshall_num_followers"), (val_div, ":offensive_rating", ":marshall_num_old_followers"), (val_div, ":offensive_rating", ":marshall_num_old_followers"), (val_min, ":offensive_rating", 100),#Max 100% efficiency (faction_get_slot, ":num_armies", ":faction_no", slot_faction_num_armies), (faction_get_slot, ":num_castles", ":faction_no", slot_faction_num_castles), (faction_get_slot, ":num_towns", ":faction_no", slot_faction_num_towns), (store_current_hours, ":cur_hours"), (store_sub, ":offensive_hours", ":cur_hours", ":old_faction_ai_last_offensive_time"), (assign, ":num_enemies", 0), (try_for_range, ":cur_kingdom", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":cur_kingdom", slot_faction_state, sfs_active), (store_relation, ":reln", ":cur_kingdom", ":faction_no"), (lt, ":reln", 0), (val_add, ":num_enemies", 1), (try_end), (assign, ":chance_defend", 0), (assign, ":chance_gathering_army", 0), (assign, ":chance_attacking_center", 0), (assign, ":chance_raiding_village", 0), (assign, ":chance_attacking_enemy_army", 0), (assign, ":chance_attacking_enemies_around_center", 0), (assign, ":target_attacking_center", -1), (assign, ":target_raiding_village", -1), (assign, ":target_attacking_enemy_army", -1), (assign, ":target_attacking_enemies_around_center", -1), (try_begin),#Defend (eq, ":old_faction_ai_state", sfai_default), (assign, ":chance_defend", 100), (else_try), (eq, ":old_faction_ai_state", sfai_gathering_army), (gt, ":offensive_hours", 180), (assign, ":chance_defend", 10000),#army can not be gathered, cancel #else, keep it as 0 (else_try), (store_div, ":chance_defend", ":offensive_hours", 10), (store_mul, ":marshall_change_effect", ":marshall_changed", 300), (val_add, ":chance_defend", ":marshall_change_effect"), (try_end), (try_begin),#Gathering army (eq, ":old_faction_ai_state", sfai_default), (gt, ":faction_marshall_party", 0), (try_begin), #No chance of gathering an army if there are no enemies (gt, ":num_enemies", 0), (store_mul, ":num_enemies_effect", ":num_enemies", 20), (val_add, ":chance_gathering_army", ":num_enemies_effect"), #Last offensive (store_sub, ":last_offensive_effect", ":offensive_hours", 24 * 4), (val_min, ":last_offensive_effect", 200), (val_add, ":chance_gathering_army", ":last_offensive_effect"), #Number of walled centers (inversely related) (store_mul, ":center_value", ":num_towns", 2), (val_add, ":center_value", ":num_castles"), (val_mul, ":center_value", 10), (val_max, ":center_value", 5), (store_sub, ":num_centers_effect", "$g_average_center_value_per_faction", ":center_value"), (val_add, ":chance_gathering_army", ":num_centers_effect"), #Number of armies (inversely related) (store_mul, ":num_armies_effect", ":num_armies", 4), (store_sub, ":num_armies_effect", 80, ":num_armies_effect"), (val_add, ":chance_gathering_army", ":num_armies_effect"), #Number of walled centers under siege (assign, ":num_centers_under_siege", 0), (try_for_range, ":cur_center", walled_centers_begin, walled_centers_end), (party_slot_ge, ":cur_center", slot_center_is_besieged_by, 0), (store_faction_of_party, ":center_faction", ":cur_center"), (eq, ":center_faction", ":faction_no"), (val_add, ":num_centers_under_siege", 1), (try_end), (store_mul, ":num_centers_under_siege_effect", ":num_centers_under_siege", 100), (val_add, ":chance_gathering_army", ":num_centers_under_siege_effect"), (try_end), (else_try), (eq, ":old_faction_ai_state", sfai_gathering_army), (this_or_next|lt, ":offensive_hours", 60), (lt, ":faction_marshall_num_followers", 4), (assign, ":chance_gathering_army", 3000), (try_end), (try_begin),#Attacking center (neq, ":old_faction_ai_state", sfai_default), (gt, ":faction_marshall_party", 0), (assign, ":old_target_attacking_center", -1), (try_begin), (eq, ":old_faction_ai_state", sfai_attacking_center), (assign, ":old_target_attacking_center", ":old_faction_ai_object"), (try_end), (assign, ":best_besiege_center", -1), (assign, ":best_besiege_center_score", 0), (try_for_range, ":enemy_walled_center", walled_centers_begin, walled_centers_end), (party_get_slot, ":besieger_party", ":enemy_walled_center", slot_center_is_besieged_by), (assign, ":besieger_own_faction", 0), (try_begin), (ge, ":besieger_party", 0), (party_is_active, ":besieger_party"), (store_faction_of_party, ":besieger_faction", ":besieger_party"), (eq, ":besieger_faction", ":faction_no"), (assign, ":besieger_own_faction", 1), (try_end), (this_or_next|eq, ":besieger_party", -1), (eq, ":besieger_own_faction", 1), (call_script, "script_get_center_faction_relation_including_player", ":enemy_walled_center", ":faction_no"), (assign, ":reln", reg0), (lt, ":reln", 0), (val_mul, ":reln", -1), (val_add, ":reln", 50), (store_distance_to_party_from_party, ":dist", ":enemy_walled_center", ":faction_marshall_party"), (val_add, ":dist", 20), (party_get_slot, ":center_str", ":enemy_walled_center", slot_party_cached_strength), (party_get_slot, ":center_near_str", ":enemy_walled_center", slot_party_nearby_friend_strength), (val_add, ":center_str", ":center_near_str"), (val_add, ":center_str", 1), (store_mul, ":center_score", 1000, ":faction_marshall_army_strength"), (val_div, ":center_score", ":center_str"), (gt, ":center_score", 1500), (val_min, ":center_score", 20000),#20 times stronger means an easy victory, distance is more important (try_begin), (party_slot_eq, ":enemy_walled_center", slot_town_lord, "trp_player"), (call_script, "script_troop_get_player_relation", ":faction_marshall"), (assign, ":player_relation", reg0), #(troop_get_slot, ":player_relation", ":faction_marshall", slot_troop_player_relation), (lt, ":player_relation", 0), (store_sub, ":multiplier", 50, ":player_relation"), (val_mul, ":center_score", ":multiplier"), (val_div, ":center_score", 50), (try_end), (try_begin), (party_slot_eq, ":enemy_walled_center", slot_center_original_faction, ":faction_no"), (val_mul, ":center_score", 2), (try_end), (try_begin), (party_slot_eq, ":enemy_walled_center", slot_center_ex_faction, ":faction_no"), (val_mul, ":center_score", 2), (try_end), (val_mul, ":center_score", ":reln"), (val_div, ":center_score", ":dist"), (try_begin), (eq, ":enemy_walled_center", ":old_target_attacking_center"), (val_mul, ":center_score", 100), (try_end), (try_begin), (gt, ":center_score", ":best_besiege_center_score"), (assign, ":best_besiege_center_score", ":center_score"), (assign, ":best_besiege_center", ":enemy_walled_center"), (try_end), (try_end), (ge, ":best_besiege_center", 0), #Center with equal strength at 30 kms away will have a center_score of 1300 (with -40 reln) (store_div, ":chance_attacking_center", ":best_besiege_center_score", 15), (val_min, ":chance_attacking_center", 1000), (assign, ":target_attacking_center", ":best_besiege_center"), (try_begin), (eq, ":old_target_attacking_center", ":target_attacking_center"), (val_mul, ":chance_attacking_center", 100), (try_end), (val_mul, ":chance_attacking_center", ":offensive_rating"), (val_div, ":chance_attacking_center", 100), (try_end), (try_begin),#Raiding village (neq, ":old_faction_ai_state", sfai_default), (gt, ":faction_marshall_party", 0), (assign, ":old_target_raiding_village", -1), (try_begin), (eq, ":old_faction_ai_state", sfai_raiding_village), (assign, ":old_target_raiding_village", ":old_faction_ai_object"), (try_end), (assign, ":num_village_points", 0), (try_for_range, ":enemy_village_no", villages_begin, villages_end), (call_script, "script_get_center_faction_relation_including_player", ":enemy_village_no", ":faction_no"), (lt, reg0, 0), (store_distance_to_party_from_party, ":dist", ":enemy_village_no", ":faction_marshall_party"), (lt, ":dist", 120), (this_or_next|party_slot_eq, ":enemy_village_no", slot_village_state, 0), #village is not already raided (party_slot_eq, ":enemy_village_no", slot_village_state, svs_being_raided), (store_sub, ":dist_point", 150, ":dist"), (val_add, ":num_village_points", ":dist_point"), (eq, ":enemy_village_no", ":old_target_raiding_village"), (val_add, ":num_village_points", 10000), (try_end), (gt, ":num_village_points", 0), (store_random_in_range, ":random_village_no", 0, ":num_village_points"), (try_for_range, ":enemy_village_no", villages_begin, villages_end), (eq, ":target_raiding_village", -1), (call_script, "script_get_center_faction_relation_including_player", ":enemy_village_no", ":faction_no"), (lt, reg0, 0), (store_distance_to_party_from_party, ":dist", ":enemy_village_no", ":faction_marshall_party"), (lt, ":dist", 120), (this_or_next|party_slot_eq, ":enemy_village_no", slot_village_state, 0), #village is not already raided (party_slot_eq, ":enemy_village_no", slot_village_state, svs_being_raided), (store_sub, ":dist_point", 150, ":dist"), (val_sub, ":random_village_no", ":dist_point"), (try_begin), (eq, ":enemy_village_no", ":old_target_raiding_village"), (val_sub, ":random_village_no", 10000), (try_end), (lt, ":random_village_no", 0), (assign, ":target_raiding_village", ":enemy_village_no"), (assign, ":chance_raiding_village", 20), (try_begin), (eq, ":old_target_raiding_village", ":target_raiding_village"), (val_mul, ":chance_raiding_village", 100), (try_end), (val_mul, ":chance_raiding_village", ":offensive_rating"), (val_div, ":chance_raiding_village", 100), (try_end), (try_end), (try_begin),#Attacking enemy army (neq, ":old_faction_ai_state", sfai_default), (gt, ":faction_marshall_party", 0), (assign, ":old_target_attacking_enemy_army", -1), (try_begin), (eq, ":old_faction_ai_state", sfai_attacking_enemy_army), (assign, ":old_target_attacking_enemy_army", ":old_faction_ai_object"), (try_end), (assign, ":best_attack_army", -1), (assign, ":best_attack_army_score", 0), (try_for_range, ":cur_kingdom", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":cur_kingdom", slot_faction_state, sfs_active), (faction_get_slot, ":cur_kingdom_marshall", ":cur_kingdom", slot_faction_marshall), (ge, ":cur_kingdom_marshall", 0), (troop_slot_eq, ":cur_kingdom_marshall", slot_troop_occupation, slto_kingdom_hero), (troop_get_slot, ":cur_kingdom_marshall_party", ":cur_kingdom_marshall", slot_troop_leaded_party), (ge, ":cur_kingdom_marshall_party", 0), (party_is_active, ":cur_kingdom_marshall_party"), (store_troop_faction, ":cur_kingdom_marshall_faction", ":cur_kingdom_marshall"), (store_relation, ":rel", ":cur_kingdom_marshall_faction", ":faction_no"), (lt, ":rel", 0), (this_or_next|faction_slot_eq, ":cur_kingdom_marshall_faction", slot_faction_ai_state, sfai_attacking_center), (faction_slot_eq, ":cur_kingdom_marshall_faction", slot_faction_ai_state, sfai_raiding_village), (party_get_slot, ":cur_kingdom_marshall_party_follower_strength", ":cur_kingdom_marshall_party", slot_party_follower_strength), (party_get_slot, ":cur_kingdom_marshall_party_strength", ":cur_kingdom_marshall_party", slot_party_cached_strength), (val_add, ":cur_kingdom_marshall_party_strength", ":cur_kingdom_marshall_party_follower_strength"), (store_mul, ":attack_army_score", ":cur_kingdom_marshall_party_strength", 1000), (val_div, ":attack_army_score", ":faction_marshall_army_strength"), (try_begin), (gt, ":attack_army_score", 850), (store_sub, ":attack_army_score", 1700, ":attack_army_score"), (try_end), (gt, ":attack_army_score", 0), (val_mul, ":attack_army_score", 2), (try_begin), (faction_slot_eq, ":cur_kingdom_marshall_faction", slot_faction_ai_state, sfai_attacking_center), (val_mul, ":attack_army_score", 10), (else_try), (faction_slot_eq, ":cur_kingdom_marshall_faction", slot_faction_ai_state, sfai_raiding_village), (val_mul, ":attack_army_score", 3), (try_end), (try_begin), (eq, ":old_target_attacking_enemy_army", ":cur_kingdom_marshall_party"), (val_mul, ":attack_army_score", 100), (try_end), (store_distance_to_party_from_party, ":dist", ":cur_kingdom_marshall_party", ":faction_marshall_party"), (val_add, ":dist", 20), (val_div, ":attack_army_score", ":dist"), (gt, ":attack_army_score", ":best_attack_army_score"), (assign, ":best_attack_army", ":cur_kingdom_marshall_party"), (assign, ":best_attack_army_score", ":attack_army_score"), (try_end), (ge, ":best_attack_army", 0), #Army having with equal strength and 30 kms away will have a best_attack_army_score of 28 (store_mul, ":chance_attacking_enemy_army", ":best_attack_army_score", 2), (val_min, ":chance_attacking_enemy_army", 1500), (assign, ":target_attacking_enemy_army", ":best_attack_army"), (try_begin), (eq, ":old_target_attacking_enemy_army", ":target_attacking_enemy_army"), (val_mul, ":chance_attacking_enemy_army", 100), (try_end), (val_mul, ":chance_attacking_enemy_army", ":offensive_rating"), (val_div, ":chance_attacking_enemy_army", 100), (try_end), (try_begin),#Attacking enemies around center (neq, ":old_faction_ai_state", sfai_default), (gt, ":faction_marshall_party", 0), (assign, ":old_target_attacking_enemies_around_center", -1), (try_begin), (eq, ":old_faction_ai_state", sfai_attacking_enemies_around_center), (assign, ":old_target_attacking_enemies_around_center", ":old_faction_ai_object"), (try_end), (assign, ":best_attack_army_center", -1), (assign, ":best_attack_army_score", 0), (try_for_range, ":center_no", centers_begin, centers_end), (store_faction_of_party, ":center_faction", ":center_no"), (eq, ":center_faction", ":faction_no"), (party_get_slot, ":nearby_enemy_strength", ":center_no", slot_party_nearby_enemy_strength), (store_mul, ":attack_army_score", ":nearby_enemy_strength", 1000), (val_div, ":attack_army_score", ":faction_marshall_army_strength"), (try_begin), (gt, ":attack_army_score", 850), (store_sub, ":attack_army_score", 1700, ":attack_army_score"), (try_end), (gt, ":attack_army_score", 0), (val_mul, ":attack_army_score", 4), (try_begin), (party_slot_eq, ":center_no", slot_party_type, spt_village), (try_begin), (party_slot_eq, ":center_no", slot_village_state, svs_being_raided), (val_mul, ":attack_army_score", 3), (try_end), (else_try), (try_begin), (party_slot_ge, ":center_no", slot_center_is_besieged_by, 0), (val_mul, ":attack_army_score", 10), (try_end), (try_end), (try_begin), (eq, ":old_target_attacking_enemies_around_center", ":center_no"), (val_mul, ":attack_army_score", 100), (try_end), (store_distance_to_party_from_party, ":dist", ":center_no", ":faction_marshall_party"), (val_add, ":dist", 20), (val_div, ":attack_army_score", ":dist"), (gt, ":attack_army_score", ":best_attack_army_score"), (assign, ":best_attack_army_center", ":center_no"), (assign, ":best_attack_army_score", ":attack_army_score"), (try_end), (ge, ":best_attack_army_center", 0), #Center having enemies at equal strength and 30 kms away will have a best_attack_army_score of 56 (store_mul, ":chance_attacking_enemies_around_center", ":best_attack_army_score", 2), (val_min, ":chance_attacking_enemies_around_center", 2000), (assign, ":target_attacking_enemies_around_center", ":best_attack_army_center"), (try_begin), (eq, ":old_target_attacking_enemies_around_center", ":target_attacking_enemies_around_center"), (val_mul, ":chance_attacking_enemies_around_center", 1000), (try_end), (val_mul, ":chance_attacking_enemies_around_center", ":offensive_rating"), (val_div, ":chance_attacking_enemies_around_center", 100), (try_begin), (gt, ":chance_attacking_enemies_around_center", ":chance_attacking_enemy_army"), (assign, ":end_cond", kingdoms_end), (try_for_range, ":cur_kingdom", kingdoms_begin, ":end_cond"), (faction_slot_eq, ":cur_kingdom", slot_faction_state, sfs_active), (faction_get_slot, ":cur_kingdom_marshall", ":cur_kingdom", slot_faction_marshall), (ge, ":cur_kingdom_marshall", 0), (troop_slot_eq, ":cur_kingdom_marshall", slot_troop_occupation, slto_kingdom_hero), (troop_get_slot, ":cur_kingdom_marshall_party", ":cur_kingdom_marshall", slot_troop_leaded_party), (ge, ":cur_kingdom_marshall_party", 0), (party_is_active, ":cur_kingdom_marshall_party"), (store_troop_faction, ":cur_kingdom_marshall_faction", ":cur_kingdom_marshall"), (store_relation, ":rel", ":cur_kingdom_marshall_faction", ":faction_no"), (lt, ":rel", 0), (store_distance_to_party_from_party, ":distance", ":cur_kingdom_marshall_party", ":target_attacking_enemies_around_center"), (lt, ":distance", 10), (assign, ":chance_attacking_enemy_army", ":chance_attacking_enemies_around_center"), (assign, ":target_attacking_enemy_army", ":cur_kingdom_marshall_party"), (assign, ":chance_attacking_enemies_around_center", 0), (assign, ":target_attacking_enemies_around_center", -1), (assign, ":end_cond", 0),#break (try_end), (try_end), (try_end), (assign, ":sum_weights", 0), (val_add, ":sum_weights", ":chance_defend"), (val_add, ":sum_weights", ":chance_gathering_army"), (val_add, ":sum_weights", ":chance_attacking_center"), (val_add, ":sum_weights", ":chance_raiding_village"), (val_add, ":sum_weights", ":chance_attacking_enemy_army"), (val_add, ":sum_weights", ":chance_attacking_enemies_around_center"), (store_random_in_range, ":random_no", 0, ":sum_weights"), (val_sub, ":random_no", ":chance_defend"), (try_begin), (lt, ":random_no", 0), (faction_set_slot, ":faction_no", slot_faction_ai_state, sfai_default), (faction_set_slot, ":faction_no", slot_faction_ai_object, -1), (try_begin), (neq, ":old_faction_ai_state", sfai_default), (call_script, "script_check_and_finish_active_army_quests_for_faction", ":faction_no"), (faction_set_slot, ":faction_no", slot_faction_ai_last_offensive_time, ":cur_hours"), (try_end), (try_begin), (eq, "$cheat_mode", 1), (str_store_faction_name, s1, ":faction_no"), (display_message, "@{s1} decided to do nothing."), (try_end), (else_try), (val_sub, ":random_no", ":chance_gathering_army"), (lt, ":random_no", 0), (faction_set_slot, ":faction_no", slot_faction_ai_state, sfai_gathering_army), (faction_set_slot, ":faction_no", slot_faction_ai_object, -1), (try_begin), (neq, ":old_faction_ai_state", sfai_gathering_army), (faction_set_slot, ":faction_no", slot_faction_ai_last_offensive_time, ":cur_hours"), (faction_set_slot, ":faction_no", slot_faction_ai_offensive_max_followers, 1), (try_end), (try_begin), (eq, "$cheat_mode", 1), (str_store_faction_name, s1, ":faction_no"), (display_message, "@{s1} decided to gather army."), (try_end), (else_try), (val_sub, ":random_no", ":chance_attacking_center"), (lt, ":random_no", 0), (faction_set_slot, ":faction_no", slot_faction_ai_state, sfai_attacking_center), (faction_set_slot, ":faction_no", slot_faction_ai_object, ":target_attacking_center"), (try_begin), (gt, ":faction_marshall_num_followers", ":marshall_num_old_followers"), (faction_set_slot, ":faction_no", slot_faction_ai_offensive_max_followers, ":faction_marshall_num_followers"), (try_end), (try_begin), (eq, "$cheat_mode", 1), (str_store_faction_name, s1, ":faction_no"), (str_store_party_name, s2, ":target_attacking_center"), (display_message, "@{s1} decided to besiege {s2}."), (try_end), (else_try), (val_sub, ":random_no", ":chance_raiding_village"), (lt, ":random_no", 0), (faction_set_slot, ":faction_no", slot_faction_ai_state, sfai_raiding_village), (faction_set_slot, ":faction_no", slot_faction_ai_object, ":target_raiding_village"), (try_begin), (gt, ":faction_marshall_num_followers", ":marshall_num_old_followers"), (faction_set_slot, ":faction_no", slot_faction_ai_offensive_max_followers, ":faction_marshall_num_followers"), (try_end), (try_begin), (eq, "$cheat_mode", 1), (str_store_faction_name, s1, ":faction_no"), (str_store_party_name, s2, ":target_raiding_village"), (display_message, "@{s1} decided to raid {s2}."), (try_end), (else_try), (val_sub, ":random_no", ":chance_attacking_enemy_army"), (lt, ":random_no", 0), (faction_set_slot, ":faction_no", slot_faction_ai_state, sfai_attacking_enemy_army), (faction_set_slot, ":faction_no", slot_faction_ai_object, ":target_attacking_enemy_army"), (try_begin), (gt, ":faction_marshall_num_followers", ":marshall_num_old_followers"), (faction_set_slot, ":faction_no", slot_faction_ai_offensive_max_followers, ":faction_marshall_num_followers"), (try_end), (try_begin), (eq, "$cheat_mode", 1), (str_store_faction_name, s1, ":faction_no"), (str_store_party_name, s2, ":target_attacking_enemy_army"), (display_message, "@{s1} decided to attack {s2}."), (try_end), (else_try), (val_sub, ":random_no", ":chance_attacking_enemies_around_center"), (lt, ":random_no", 0), (faction_set_slot, ":faction_no", slot_faction_ai_state, sfai_attacking_enemies_around_center), (faction_set_slot, ":faction_no", slot_faction_ai_object, ":target_attacking_enemies_around_center"), (try_begin), (gt, ":faction_marshall_num_followers", ":marshall_num_old_followers"), (faction_set_slot, ":faction_no", slot_faction_ai_offensive_max_followers, ":faction_marshall_num_followers"), (try_end), (try_begin), (eq, "$cheat_mode", 1), (str_store_faction_name, s1, ":faction_no"), (str_store_party_name, s2, ":target_attacking_enemies_around_center"), (display_message, "@{s1} decided to attack enemies around {s2}."), (try_end), (try_end), (try_begin), (eq, "$players_kingdom", ":faction_no"), (neg|faction_slot_eq, ":faction_no", slot_faction_ai_state, sfai_attacking_center), (check_quest_active, "qst_join_siege_with_army"), (call_script, "script_abort_quest", "qst_join_siege_with_army", 0), (try_end), ]), # script_check_and_finish_active_army_quests_for_faction # Input: faction_no # Output: none ("check_and_finish_active_army_quests_for_faction", [ (store_script_param_1, ":faction_no"), (try_begin), (eq, "$players_kingdom", ":faction_no"), (try_begin), (check_quest_active, "qst_report_to_army"), (call_script, "script_cancel_quest", "qst_report_to_army"), (try_end), (assign, ":one_active", 0), (try_for_range, ":quest_no", army_quests_begin, army_quests_end), (check_quest_active, ":quest_no"), (call_script, "script_cancel_quest", ":quest_no"), (assign, ":one_active", 1), (try_end), (try_begin), (check_quest_active, "qst_follow_army"), (assign, ":one_active", 1), (call_script, "script_end_quest", "qst_follow_army"), (try_end), (eq, ":one_active", 1), (faction_get_slot, ":last_offensive_time", ":faction_no", slot_faction_ai_last_offensive_time), (store_current_hours, ":cur_hours"), (store_sub, ":total_time_served", ":cur_hours", ":last_offensive_time"), (store_mul, ":xp_reward", ":total_time_served", 5), (val_div, ":xp_reward", 50), (val_mul, ":xp_reward", 50), (val_add, ":xp_reward", 50), (add_xp_as_reward, ":xp_reward"), (try_end), ]), # script_troop_get_player_relation # Input: arg1 = troop_no # Output: reg0 = effective relation (modified by troop reputation, honor, etc.) ("troop_get_player_relation", [ (store_script_param_1, ":troop_no"), (troop_get_slot, ":reputation", ":troop_no", slot_lord_reputation_type), (troop_get_slot, ":effective_relation", ":troop_no", slot_troop_player_relation), (assign, ":honor_bonus", 0), (try_begin), (eq, ":reputation", lrep_quarrelsome), (val_add, ":effective_relation", -3), (try_end), (try_begin), (ge, "$player_honor", 0), (try_begin), (this_or_next|eq, ":reputation", lrep_upstanding), ( eq, ":reputation", lrep_goodnatured), (store_div, ":honor_bonus", "$player_honor", 3), (try_end), (try_end), (try_begin), (lt, "$player_honor", 0), (try_begin), (this_or_next|eq, ":reputation", lrep_upstanding), ( eq, ":reputation", lrep_goodnatured), (store_div, ":honor_bonus", "$player_honor", 3), (else_try), (eq, ":reputation", lrep_martial), (store_div, ":honor_bonus", "$player_honor", 5), (try_end), (try_end), (val_add, ":effective_relation", ":honor_bonus"), (assign, reg0, ":effective_relation"), ]), # script_change_troop_renown # Input: arg1 = troop_no, arg2 = relation difference # Output: none ("change_troop_renown", [ (store_script_param_1, ":troop_no"), (store_script_param_2, ":renown_change"), (troop_get_slot, ":old_renown", ":troop_no", slot_troop_renown), (store_add, ":new_renown", ":old_renown", ":renown_change"), (val_max, ":new_renown", 0), (troop_set_slot, ":troop_no", slot_troop_renown, ":new_renown"), (try_begin), (eq, ":troop_no", "trp_player"), (str_store_troop_name, s1, ":troop_no"), (assign, reg12, ":renown_change"), (val_abs, reg12), (try_begin), (gt, ":renown_change", 0), (display_message, "@You gained {reg12} renown."), (else_try), (lt, ":renown_change", 0), (display_message, "@You lose {reg12} renown."), (try_end), (try_end), (call_script, "script_update_troop_notes", ":troop_no"), ]), # script_change_player_relation_with_troop # Input: arg1 = troop_no, arg2 = relation difference # Output: none ("change_player_relation_with_troop", [ (store_script_param_1, ":troop_no"), (store_script_param_2, ":difference"), (try_begin), (neq, ":troop_no", "trp_player"), (neg|is_between, ":troop_no", soldiers_begin, soldiers_end), (neq, ":difference", 0), (call_script, "script_troop_get_player_relation", ":troop_no"), (assign, ":old_effective_relation", reg0), (troop_get_slot, ":player_relation", ":troop_no", slot_troop_player_relation), (val_add, ":player_relation", ":difference"), (val_clamp, ":player_relation", -100, 101), (try_begin), (troop_set_slot, ":troop_no", slot_troop_player_relation, ":player_relation"), (str_store_troop_name_link, s1, ":troop_no"), (call_script, "script_troop_get_player_relation", ":troop_no"), (assign, ":new_effective_relation", reg0), (neq, ":old_effective_relation", ":new_effective_relation"), (assign, reg1, ":old_effective_relation"), (assign, reg2, ":new_effective_relation"), (try_begin), (gt, ":difference", 0), (display_message, "str_troop_relation_increased"), (else_try), (lt, ":difference", 0), (display_message, "str_troop_relation_detoriated"), (try_end), (try_begin), (eq, ":troop_no", "$g_talk_troop"), (assign, "$g_talk_troop_relation", ":new_effective_relation"), (call_script, "script_setup_talk_info"), (try_end), (call_script, "script_update_troop_notes", ":troop_no"), (try_end), (try_end), ]), # script_change_player_relation_with_center # Input: arg1 = party_no, arg2 = relation difference # Output: none ("change_player_relation_with_center", [ (store_script_param_1, ":center_no"), (store_script_param_2, ":difference"), (party_get_slot, ":player_relation", ":center_no", slot_center_player_relation), (assign, reg1, ":player_relation"), (val_add, ":player_relation", ":difference"), (val_clamp, ":player_relation", -100, 100), (assign, reg2, ":player_relation"), (party_set_slot, ":center_no", slot_center_player_relation, ":player_relation"), (str_store_party_name_link, s1, ":center_no"), (try_begin), (gt, ":difference", 0), (display_message, "@Your relation with {s1} has improved."), (else_try), (lt, ":difference", 0), (display_message, "@Your relation with {s1} has deteriorated."), (try_end), (try_begin), (party_slot_eq, ":center_no", slot_party_type, spt_village), (call_script, "script_update_volunteer_troops_in_village", ":center_no"), (try_end), (try_begin), (this_or_next|is_between, "$g_talk_troop", village_elders_begin, village_elders_end), (is_between, "$g_talk_troop", mayors_begin, mayors_end), (assign, "$g_talk_troop_relation", ":player_relation"), (call_script, "script_setup_talk_info"), (try_end), ]), # script_change_player_relation_with_faction # Input: arg1 = faction_no, arg2 = relation difference # Output: none ("change_player_relation_with_faction", [ (store_script_param_1, ":faction_no"), (store_script_param_2, ":difference"), (store_relation, ":player_relation", ":faction_no", "fac_player_supporters_faction"), (assign, reg1, ":player_relation"), (val_add, ":player_relation", ":difference"), (assign, reg2, ":player_relation"), (set_relation, ":faction_no", "fac_player_faction", ":player_relation"), (set_relation, ":faction_no", "fac_player_supporters_faction", ":player_relation"), (str_store_faction_name_link, s1, ":faction_no"), (try_begin), (gt, ":difference", 0), (display_message, "str_faction_relation_increased"), (else_try), (lt, ":difference", 0), (display_message, "str_faction_relation_detoriated"), (try_end), (call_script, "script_update_all_notes"), ]), # script_set_player_relation_with_faction # Input: arg1 = faction_no, arg2 = relation # Output: none ("set_player_relation_with_faction", [ (store_script_param_1, ":faction_no"), (store_script_param_2, ":relation"), (store_relation, ":player_relation", ":faction_no", "fac_player_supporters_faction"), (store_sub, ":reln_dif", ":relation", ":player_relation"), (call_script, "script_change_player_relation_with_faction", ":faction_no", ":reln_dif"), ]), # script_change_player_relation_with_faction_ex # changes relations with other factions also (according to their relations between each other) # Input: arg1 = faction_no, arg2 = relation difference # Output: none ("change_player_relation_with_faction_ex", [ (store_script_param_1, ":faction_no"), (store_script_param_2, ":difference"), (store_relation, ":player_relation", ":faction_no", "fac_player_supporters_faction"), (assign, reg1, ":player_relation"), (val_add, ":player_relation", ":difference"), (assign, reg2, ":player_relation"), (set_relation, ":faction_no", "fac_player_faction", ":player_relation"), (set_relation, ":faction_no", "fac_player_supporters_faction", ":player_relation"), (str_store_faction_name_link, s1, ":faction_no"), (try_begin), (gt, ":difference", 0), (display_message, "str_faction_relation_increased"), (else_try), (lt, ":difference", 0), (display_message, "str_faction_relation_detoriated"), (try_end), (try_for_range, ":other_faction", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":other_faction", slot_faction_state, sfs_active), (neq, ":faction_no", ":other_faction"), (store_relation, ":other_faction_relation", ":faction_no", ":other_faction"), (store_relation, ":player_relation", ":other_faction", "fac_player_supporters_faction"), (store_mul, ":relation_change", ":difference", ":other_faction_relation"), (val_div, ":relation_change", 100), (val_add, ":player_relation", ":relation_change"), (set_relation, ":other_faction", "fac_player_faction", ":player_relation"), (set_relation, ":other_faction", "fac_player_supporters_faction", ":player_relation"), (try_end), (try_begin), (faction_slot_eq, "fac_player_supporters_faction", slot_faction_state, sfs_active), (try_for_range, ":kingdom_no", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":kingdom_no", slot_faction_state, sfs_active), (call_script, "script_update_faction_notes", ":kingdom_no"), (try_end), (try_end), ]), # script_cf_get_random_active_faction_except_player_faction_and_faction # Input: arg1 = except_faction_no # Output: reg0 = random_faction ("cf_get_random_active_faction_except_player_faction_and_faction", [ (store_script_param_1, ":except_faction_no"), (assign, ":num_factions", 0), (try_for_range, ":faction_no", kingdoms_begin, kingdoms_end), (neq, ":faction_no", "fac_player_supporters_faction"), (neq, ":faction_no", ":except_faction_no"), (faction_slot_eq, ":faction_no", slot_faction_state, sfs_active), (val_add, ":num_factions", 1), (try_end), (gt, ":num_factions", 0), (assign, ":selected_faction", -1), (store_random_in_range, ":random_faction", 0, ":num_factions"), (try_for_range, ":faction_no", kingdoms_begin, kingdoms_end), (ge, ":random_faction", 0), (neq, ":faction_no", "fac_player_supporters_faction"), (neq, ":faction_no", ":except_faction_no"), (faction_slot_eq, ":faction_no", slot_faction_state, sfs_active), (val_sub, ":random_faction", 1), (lt, ":random_faction", 0), (assign, ":selected_faction", ":faction_no"), (try_end), (assign, reg0, ":selected_faction"), ]), # script_make_kingdom_hostile_to_player # Input: arg1 = faction_no, arg2 = relation difference # Output: none ("make_kingdom_hostile_to_player", [ (store_script_param_1, ":kingdom_no"), (store_script_param_2, ":difference"), (try_begin), (lt, ":difference", 0), (store_relation, ":player_relation", ":kingdom_no", "fac_player_supporters_faction"), (val_min, ":player_relation", 0), (val_add, ":player_relation", ":difference"), (call_script, "script_set_player_relation_with_faction", ":kingdom_no", ":player_relation"), (try_end), ]), # script_change_player_honor # Input: arg1 = honor difference # Output: none ("change_player_honor", [ (store_script_param_1, ":honor_dif"), (val_add, "$player_honor", ":honor_dif"), (try_begin), (gt, ":honor_dif", 0), (display_message, "@You gain honour."), (else_try), (lt, ":honor_dif", 0), (display_message, "@You lose honour."), (try_end), ## (val_mul, ":honor_dif", 1000), ## (assign, ":temp_honor", 0), ## (assign, ":num_nonlinear_steps", 10), ## (try_begin), ## (gt, "$player_honor", 0), ## (lt, ":honor_dif", 0), ## (assign, ":num_nonlinear_steps", 0), ## (else_try), ## (lt, "$player_honor", 0), ## (gt, ":honor_dif", 0), ## (assign, ":num_nonlinear_steps", 3), ## (try_end), ## ## (try_begin), ## (ge, "$player_honor", 0), ## (assign, ":temp_honor", "$player_honor"), ## (else_try), ## (val_sub, ":temp_honor", "$player_honor"), ## (try_end), ## (try_for_range, ":unused",0,":num_nonlinear_steps"), ## (ge, ":temp_honor", 10000), ## (val_div, ":temp_honor", 2), ## (val_div, ":honor_dif", 2), ## (try_end), ## (val_add, "$player_honor", ":honor_dif"), ]), # script_change_player_party_morale # Input: arg1 = morale difference # Output: none ("change_player_party_morale", [ (store_script_param_1, ":morale_dif"), (party_get_morale, ":cur_morale", "p_main_party"), (store_add, ":new_morale", ":cur_morale", ":morale_dif"), (val_clamp, ":new_morale", 0, 100), (party_set_morale, "p_main_party", ":new_morale"), (try_begin), (lt, ":new_morale", ":cur_morale"), (store_sub, reg1, ":cur_morale", ":new_morale"), (display_message, "str_party_lost_morale"), (else_try), (gt, ":new_morale", ":cur_morale"), (store_sub, reg1, ":new_morale", ":cur_morale"), (display_message, "str_party_gained_morale"), (try_end), ]), # script_cf_player_has_item_without_modifier # Input: arg1 = item_id, arg2 = modifier # Output: none (can_fail) ("cf_player_has_item_without_modifier", [ (store_script_param, ":item_id", 1), (store_script_param, ":modifier", 2), (player_has_item, ":item_id"), #checking if any of the meat is not rotten (assign, ":has_without_modifier", 0), (troop_get_inventory_capacity, ":inv_size", "trp_player"), (try_for_range, ":i_slot", 0, ":inv_size"), (troop_get_inventory_slot, ":cur_item", "trp_player", ":i_slot"), (eq, ":cur_item", ":item_id"), (troop_get_inventory_slot_modifier, ":cur_modifier", "trp_player", ":i_slot"), (neq, ":cur_modifier", ":modifier"), (assign, ":has_without_modifier", 1), (assign, ":inv_size", 0), #break (try_end), (eq, ":has_without_modifier", 1), ]), # script_get_player_party_morale_values # Output: reg0 = player_party_morale_target ("get_player_party_morale_values", [ (party_get_num_companion_stacks, ":num_stacks","p_main_party"), (assign, ":num_men", 0), (try_for_range, ":i_stack", 1, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop","p_main_party",":i_stack"), (try_begin), (troop_is_hero, ":stack_troop"), (val_add, ":num_men", 3), (else_try), (party_stack_get_size, ":stack_size","p_main_party",":i_stack"), (val_add, ":num_men", ":stack_size"), (try_end), (try_end), (assign, "$g_player_party_morale_modifier_party_size", ":num_men"), (store_skill_level, ":player_leadership", "skl_leadership", "trp_player"), (store_mul, "$g_player_party_morale_modifier_leadership", ":player_leadership", 7), (assign, ":new_morale", "$g_player_party_morale_modifier_leadership"), (val_sub, ":new_morale", "$g_player_party_morale_modifier_party_size"), (val_add, ":new_morale", 50), (assign, "$g_player_party_morale_modifier_food", 0), (try_for_range, ":cur_edible", food_begin, food_end), (call_script, "script_cf_player_has_item_without_modifier", ":cur_edible", imod_rotten), (item_get_slot, ":food_bonus", ":cur_edible", slot_item_food_bonus), (val_add, "$g_player_party_morale_modifier_food", ":food_bonus"), (try_end), (val_add, ":new_morale", "$g_player_party_morale_modifier_food"), (try_begin), (eq, "$g_player_party_morale_modifier_food", 0), (assign, "$g_player_party_morale_modifier_no_food", 30), (val_sub, ":new_morale", "$g_player_party_morale_modifier_no_food"), (else_try), (assign, "$g_player_party_morale_modifier_no_food", 0), (try_end), (assign, "$g_player_party_morale_modifier_debt", 0), (try_begin), (gt, "$g_player_debt_to_party_members", 0), (call_script, "script_calculate_player_faction_wage"), (assign, ":total_wages", reg0), (store_mul, "$g_player_party_morale_modifier_debt", "$g_player_debt_to_party_members", 10), (val_div, "$g_player_party_morale_modifier_debt", ":total_wages"), (val_clamp, "$g_player_party_morale_modifier_debt", 1, 31), (val_sub, ":new_morale", "$g_player_party_morale_modifier_debt"), (try_end), (val_clamp, ":new_morale", 0, 100), (assign, reg0, ":new_morale"), ]), # script_diplomacy_start_war_between_kingdoms # Input: arg1 = kingdom_1, arg2 = kingdom_2, arg3 = initializing_war_peace_cond # Output: none ("diplomacy_start_war_between_kingdoms", #sets relations between two kingdoms and their vassals. [ (store_script_param, ":kingdom_a", 1), (store_script_param, ":kingdom_b", 2), (store_script_param, ":initializing_war_peace_cond", 3), (store_relation, ":relation", ":kingdom_a", ":kingdom_b"), (val_min, ":relation", -10), (val_add, ":relation", -30), (set_relation, ":kingdom_a", ":kingdom_b", ":relation"), (try_begin), (eq, "$players_kingdom", ":kingdom_a"), (store_relation, ":relation", "fac_player_supporters_faction", ":kingdom_b"), (val_min, ":relation", -30), (call_script, "script_set_player_relation_with_faction", ":kingdom_b", ":relation"), (else_try), (eq, "$players_kingdom", ":kingdom_b"), (store_relation, ":relation", "fac_player_supporters_faction", ":kingdom_a"), (val_min, ":relation", -30), (call_script, "script_set_player_relation_with_faction", ":kingdom_a", ":relation"), (try_end), (try_begin), (eq, ":initializing_war_peace_cond", 1), (try_begin), (store_random_in_range, ":random_no", 0, 2), (this_or_next|eq, ":kingdom_a", "fac_player_supporters_faction"), (eq, ":random_no", 0), (assign, ":local_temp", ":kingdom_a"), (assign, ":kingdom_a", ":kingdom_b"), (assign, ":kingdom_b", ":local_temp"), (try_end), (str_store_faction_name_link, s1, ":kingdom_a"), (str_store_faction_name_link, s2, ":kingdom_b"), (display_log_message, "@{s1} has declared war against {s2}."), (call_script, "script_add_notification_menu", "mnu_notification_war_declared", ":kingdom_a", ":kingdom_b"), (call_script, "script_update_faction_notes", ":kingdom_a"), (call_script, "script_update_faction_notes", ":kingdom_b"), (assign, "$g_recalculate_ais", 1), (try_end), ]), # script_party_calculate_and_set_nearby_friend_strength # Input: party_no # Output: none ("party_calculate_and_set_nearby_friend_strength", [ (store_script_param, ":party_no", 1), (assign, ":follower_strength", 0), (assign, ":friend_strength", 0), (assign, ":enemy_strength", 0), (store_faction_of_party, ":party_faction", ":party_no"), (store_add, ":end_cond", kingdom_heroes_end, 1), (try_for_range, ":iteration", kingdom_heroes_begin, ":end_cond"), (try_begin), (eq, ":iteration", kingdom_heroes_end), (assign, ":cur_troop", "trp_player"), (else_try), (assign, ":cur_troop", ":iteration"), (try_end), (troop_slot_eq, ":cur_troop", slot_troop_occupation, slto_kingdom_hero), (troop_get_slot, ":cur_troop_party", ":cur_troop", slot_troop_leaded_party), (ge, ":cur_troop_party", 0), (party_is_active, ":cur_troop_party"), (neq, ":party_no", ":cur_troop_party"), (party_get_slot, ":str", ":cur_troop_party", slot_party_cached_strength), (try_begin), (party_get_slot, ":commander_party", ":cur_troop_party", slot_party_commander_party), (eq, ":commander_party", ":party_no"), (val_add, ":follower_strength", ":str"), (try_end), (store_distance_to_party_from_party, ":distance", ":cur_troop_party", ":party_no"), (lt, ":distance", 10), (store_troop_faction, ":army_faction", ":cur_troop"), (store_relation, ":rel", ":army_faction", ":party_faction"), (try_begin), (this_or_next|eq, ":army_faction", ":party_faction"), (gt, ":rel", 0), (val_add, ":friend_strength", ":str"), (else_try), (lt, ":rel", 0), (val_add, ":enemy_strength", ":str"), (try_end), (try_end), (party_set_slot, ":party_no", slot_party_follower_strength, ":follower_strength"), (party_set_slot, ":party_no", slot_party_nearby_friend_strength, ":friend_strength"), (party_set_slot, ":party_no", slot_party_nearby_enemy_strength, ":enemy_strength"), ]), # script_init_ai_calculation # Input: none # Output: none ("init_ai_calculation", [ (try_for_range, ":cur_troop", heroes_begin, heroes_end), (troop_slot_eq, ":cur_troop", slot_troop_occupation, slto_kingdom_hero), (troop_get_slot, ":cur_party", ":cur_troop", slot_troop_leaded_party), (ge, ":cur_party", 0), (call_script, "script_party_calculate_strength", ":cur_party", 0), #will update slot_party_cached_strength (try_end), (call_script, "script_party_calculate_strength", "p_main_party", 0), #will update slot_party_cached_strength (try_for_range, ":cur_center", walled_centers_begin, walled_centers_end), (call_script, "script_party_calculate_strength", ":cur_center", 0), #will update slot_party_cached_strength (try_end), (try_for_range, ":cur_center", walled_centers_begin, walled_centers_end), (call_script, "script_party_calculate_and_set_nearby_friend_strength", ":cur_center"), (try_end), (try_for_range, ":cur_troop", heroes_begin, heroes_end), (troop_get_slot, ":cur_troop_party", ":cur_troop", slot_troop_leaded_party), (gt, ":cur_troop_party", 0), (call_script, "script_party_calculate_and_set_nearby_friend_strength", ":cur_troop_party"), (try_end), (call_script, "script_party_calculate_and_set_nearby_friend_strength", "p_main_party"), ]), # script_recalculate_ais # Input: none # Output: none ("recalculate_ais", [ (call_script, "script_init_ai_calculation"), (try_for_range, ":faction_no", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":faction_no", slot_faction_state, sfs_active), (neg|faction_slot_eq, ":faction_no", slot_faction_marshall, "trp_player"), (call_script, "script_decide_faction_ai", ":faction_no"), (try_end), (call_script, "script_decide_kingdom_party_ais"), ]), # script_recalculate_ai_for_troop # Input: none # Output: none ("recalculate_ai_for_troop", [ (store_script_param, ":troop_no", 1), (call_script, "script_init_ai_calculation"), (call_script, "script_calculate_troop_ai", ":troop_no"), (call_script, "script_calculate_troop_ai_under_command", ":troop_no"), ]), # script_calculate_troop_ai # Input: troop_no # Output: none ("calculate_troop_ai", [ (store_script_param, ":troop_no", 1), (try_begin), (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), #(troop_slot_eq, ":troop_no", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":troop_no", slot_troop_prisoner_of_party, 0), (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), (gt, ":party_no", 0), (party_slot_eq, ":party_no", slot_party_following_player, 0), (store_faction_of_party, ":faction_no", ":party_no"), (assign, ":continue", 1), (try_begin), (faction_slot_eq, ":faction_no", slot_faction_marshall, ":troop_no"), # do not calculate AI if troop is marshall. (neg|faction_slot_eq, ":faction_no", slot_faction_ai_state, sfai_default), (assign, ":continue", 0), (try_end), (eq, ":continue", 1), (call_script, "script_party_count_fit_for_battle", ":party_no"), (assign, ":party_fit_for_battle", reg0), (call_script, "script_party_get_ideal_size", ":party_no"), (assign, ":ideal_size", reg0), (store_mul, "$party_relative_strength", ":party_fit_for_battle", 100), (val_div, "$party_relative_strength", ":ideal_size"), (try_begin), (faction_slot_eq, ":faction_no", slot_faction_num_towns, 0), (faction_slot_eq, ":faction_no", slot_faction_num_castles, 0), (assign, "$ratio_of_prisoners", 0), #do not let prisoners have an effect on ai calculation (else_try), (party_get_num_prisoners, ":num_prisoners", ":party_no"), (store_div, "$ratio_of_prisoners", ":num_prisoners", ":party_fit_for_battle"), (try_end), (call_script, "script_kingdom_hero_decide_next_ai_state_follow_or_not", ":troop_no"), (party_slot_eq, ":party_no", slot_party_commander_party, -1), (call_script, "script_kingdom_hero_decide_next_ai_state", ":troop_no"), (try_end), ]), # script_calculate_troop_ai_under_command # Input: troop_no # Output: none ("calculate_troop_ai_under_command", [ (store_script_param, ":troop_no", 1), (try_begin), (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), #(troop_slot_eq, ":troop_no", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":troop_no", slot_troop_prisoner_of_party, 0), (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), (gt, ":party_no", 0), (party_slot_ge, ":party_no", slot_party_commander_party, 0), (party_set_ai_initiative, ":party_no", 50), (call_script, "script_party_decide_next_ai_state_under_command", ":party_no"), (try_end), ]), # script_diplomacy_start_peace_between_kingdoms # Input: arg1 = kingdom_1, arg2 = kingdom_2, arg3 = initializing_war_peace_cond # Output: none ("diplomacy_start_peace_between_kingdoms", #sets relations between two kingdoms [ (store_script_param, ":kingdom_a", 1), (store_script_param, ":kingdom_b", 2), (store_script_param, ":initializing_war_peace_cond", 3), (store_relation, ":relation", ":kingdom_a", ":kingdom_b"), (val_max, ":relation", 0), (set_relation, ":kingdom_a", ":kingdom_b", ":relation"), (call_script, "script_exchange_prisoners_between_factions", ":kingdom_a", ":kingdom_b"), (try_begin), (eq, "$players_kingdom", ":kingdom_a"), (store_relation, ":relation", "fac_player_supporters_faction", ":kingdom_b"), (val_max, ":relation", 0), (call_script, "script_set_player_relation_with_faction", ":kingdom_b", ":relation"), (call_script, "script_event_kingdom_make_peace_with_kingdom", ":kingdom_b", "fac_player_supporters_faction"), (else_try), (eq, "$players_kingdom", ":kingdom_b"), (store_relation, ":relation", "fac_player_supporters_faction", ":kingdom_a"), (val_max, ":relation", 0), (call_script, "script_set_player_relation_with_faction", ":kingdom_a", ":relation"), (call_script, "script_event_kingdom_make_peace_with_kingdom", ":kingdom_a", "fac_player_supporters_faction"), (try_end), (try_begin), (eq, ":initializing_war_peace_cond", 1), (str_store_faction_name_link, s1, ":kingdom_a"), (str_store_faction_name_link, s2, ":kingdom_b"), (display_log_message, "@{s1} and {s2} have made peace with each other."), (call_script, "script_update_faction_notes", ":kingdom_a"), (call_script, "script_update_faction_notes", ":kingdom_b"), (call_script, "script_add_notification_menu", "mnu_notification_peace_declared", ":kingdom_a", ":kingdom_b"), (call_script, "script_event_kingdom_make_peace_with_kingdom", ":kingdom_a", ":kingdom_b"), (call_script, "script_event_kingdom_make_peace_with_kingdom", ":kingdom_b", ":kingdom_a"), (assign, "$g_recalculate_ais", 1), (try_end), ]), # script_event_kingdom_make_peace_with_kingdom # Input: arg1 = source_kingdom, arg2 = target_kingdom # Output: none ("event_kingdom_make_peace_with_kingdom", [ (store_script_param_1, ":source_kingdom"), (store_script_param_2, ":target_kingdom"), (try_begin), (check_quest_active, "qst_capture_prisoners"), (try_begin), (eq, "$players_kingdom", ":source_kingdom"), (quest_slot_eq, "qst_capture_prisoners", slot_quest_target_faction, ":target_kingdom"), (call_script, "script_cancel_quest", "qst_capture_prisoners"), (else_try), (eq, "$players_kingdom", ":target_kingdom"), (quest_slot_eq, "qst_capture_prisoners", slot_quest_target_faction, ":source_kingdom"), (call_script, "script_cancel_quest", "qst_capture_prisoners"), (try_end), (try_end), ]), # script_randomly_start_war_peace # Input: arg1 = initializing_war_peace_cond (1 = true, 0 = false) # Output: none ("randomly_start_war_peace", [ (store_script_param_1, ":initializing_war_peace_cond"), (assign, ":total_resources", 0), (assign, ":total_active_kingdoms", 0), (try_for_range, ":cur_kingdom", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":cur_kingdom", slot_faction_state, sfs_active), (val_add, ":total_active_kingdoms", 1), (faction_get_slot, ":num_towns", ":cur_kingdom", slot_faction_num_towns), (store_mul, ":kingdom_resources_value", ":num_towns", 2), (faction_get_slot, ":num_castles", ":cur_kingdom", slot_faction_num_castles), (val_add, ":kingdom_resources_value", ":num_castles"), (val_mul, ":kingdom_resources_value", 10), (val_max, ":kingdom_resources_value", 1), (val_mul, ":kingdom_resources_value", 1000), (faction_get_slot, ":num_armies", ":cur_kingdom", slot_faction_num_armies), (val_max, ":num_armies", 1), (val_div, ":kingdom_resources_value", ":num_armies"), (val_add, ":total_resources", ":kingdom_resources_value"), (try_end), (val_max, ":total_active_kingdoms", 1), (store_div, ":average_resources", ":total_resources", ":total_active_kingdoms"), (try_for_range, ":cur_kingdom", kingdoms_begin, kingdoms_end), ## (neq, ":cur_kingdom", "fac_player_supporters_faction"), (faction_slot_eq, ":cur_kingdom", slot_faction_state, sfs_active), (assign, ":num_ongoing_wars", 0), (try_for_range, ":other_kingdom", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":other_kingdom", slot_faction_state, sfs_active), (store_relation, ":other_relation", ":cur_kingdom", ":other_kingdom"), (lt, ":other_relation", 0), (val_add, ":num_ongoing_wars", 1), (try_end), (faction_get_slot, ":num_towns", ":cur_kingdom", slot_faction_num_towns), (store_mul, ":kingdom_1_resources_value", ":num_towns", 2), (faction_get_slot, ":num_castles", ":cur_kingdom", slot_faction_num_castles), (val_add, ":kingdom_1_resources_value", ":num_castles"), (val_mul, ":kingdom_1_resources_value", 10), (val_max, ":kingdom_1_resources_value", 1), (val_mul, ":kingdom_1_resources_value", 1000), (faction_get_slot, ":num_armies", ":cur_kingdom", slot_faction_num_armies), (val_max, ":num_armies", 1), (val_div, ":kingdom_1_resources_value", ":num_armies"), (store_add, ":start_cond", ":cur_kingdom", 1), (try_for_range, ":cur_kingdom_2", ":start_cond", kingdoms_end), ## (neq, ":cur_kingdom", "fac_player_supporters_faction"), (faction_slot_eq, ":cur_kingdom_2", slot_faction_state, sfs_active), (assign, ":num_ongoing_wars_2", 0), (try_for_range, ":other_kingdom", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":other_kingdom", slot_faction_state, sfs_active), (store_relation, ":other_relation", ":cur_kingdom_2", ":other_kingdom"), (lt, ":other_relation", 0), (val_add, ":num_ongoing_wars_2", 1), (try_end), (store_add, ":total_ongoing_wars", ":num_ongoing_wars", ":num_ongoing_wars_2"), (faction_get_slot, ":num_towns", ":cur_kingdom_2", slot_faction_num_towns), (store_mul, ":kingdom_2_resources_value", ":num_towns", 2), (faction_get_slot, ":num_castles", ":cur_kingdom_2", slot_faction_num_castles), (val_add, ":kingdom_2_resources_value", ":num_castles"), (val_mul, ":kingdom_2_resources_value", 10), (val_max, ":kingdom_2_resources_value", 1), (val_mul, ":kingdom_2_resources_value", 1000), (faction_get_slot, ":num_armies", ":cur_kingdom_2", slot_faction_num_armies), (val_max, ":num_armies", 1), (val_div, ":kingdom_2_resources_value", ":num_armies"), (assign, ":max_resources_value", ":kingdom_1_resources_value"), (val_max, ":max_resources_value", ":kingdom_2_resources_value"), (val_mul, ":max_resources_value", 100), (val_div, ":max_resources_value", ":average_resources"), (assign, ":cur_king", -1), (try_begin), (eq, ":cur_kingdom", "fac_player_supporters_faction"), (faction_get_slot, ":cur_king", ":cur_kingdom_2", slot_faction_leader), (assign, ":cur_relation", reg0), (store_sub, ":relation_effect", 200, ":cur_relation"), (val_mul, ":kingdom_1_resources_value", ":relation_effect"), (val_div, ":kingdom_1_resources_value", 200), (else_try), (eq, ":cur_kingdom_2", "fac_player_supporters_faction"), (faction_get_slot, ":cur_king", ":cur_kingdom", slot_faction_leader), (try_end), (try_begin), (ge, ":cur_king", 0), (call_script, "script_troop_get_player_relation", ":cur_king"), (assign, ":cur_relation", reg0), (store_sub, ":relation_effect", 200, ":cur_relation"), (val_mul, ":max_resources_value", ":relation_effect"), (val_div, ":max_resources_value", 200), (try_end), #max_resources_value is the obtained value that gives us how tempting the kingdom's values are #average is 100 (val_clamp, ":max_resources_value", 20, 500), #not letting more than 5 times higher chance of declaring war or peace (store_random_in_range, ":random_no", 0, 10000), (store_relation, ":cur_relation", ":cur_kingdom", ":cur_kingdom_2"), (try_begin), (lt, ":cur_relation", 0), #AT WAR (store_mul, ":chance_to_make_peace", ":total_ongoing_wars", 50), (val_mul, ":chance_to_make_peace", 100), (val_div, ":chance_to_make_peace", ":max_resources_value"), (try_begin), #disable random peace for special conditions (this_or_next|eq, ":cur_kingdom", "fac_player_supporters_faction"), (eq, ":cur_kingdom_2", "fac_player_supporters_faction"), (assign, ":continue", 0), (try_begin), (gt, "$supported_pretender", 0), (this_or_next|eq, ":cur_kingdom", "$supported_pretender_old_faction"), (eq, ":cur_kingdom_2", "$supported_pretender_old_faction"), (assign, ":continue", 1), (else_try), (is_between, "$players_oath_renounced_against_kingdom", kingdoms_begin, kingdoms_end), (this_or_next|eq, ":cur_kingdom", "$players_oath_renounced_against_kingdom"), (eq, ":cur_kingdom_2", "$players_oath_renounced_against_kingdom"), (assign, ":continue", 1), (try_end), (eq, ":continue", 1), (assign, ":chance_to_make_peace", 0), (try_end), (try_begin), (lt, ":random_no", ":chance_to_make_peace"), (assign, ":continue", 1), (try_begin), (check_quest_active, "qst_persuade_lords_to_make_peace"), (quest_get_slot, ":quest_target_faction", "qst_persuade_lords_to_make_peace", slot_quest_target_faction), (quest_get_slot, ":quest_object_faction", "qst_persuade_lords_to_make_peace", slot_quest_object_faction), (this_or_next|eq, ":cur_kingdom", ":quest_target_faction"), (eq, ":cur_kingdom", ":quest_object_faction"), (this_or_next|eq, ":cur_kingdom_2", ":quest_target_faction"), (eq, ":cur_kingdom_2", ":quest_object_faction"), (assign, ":continue", 0), #Do not declare war if the quest is active for the specific kingdoms (try_end), (eq, ":continue", 1), (try_begin), (eq, ":cur_kingdom", "fac_player_supporters_faction"), (call_script, "script_add_notification_menu", "mnu_question_peace_offer", ":cur_kingdom_2", 0), (else_try), (eq, ":cur_kingdom_2", "fac_player_supporters_faction"), (call_script, "script_add_notification_menu", "mnu_question_peace_offer", ":cur_kingdom", 0), (else_try), (call_script, "script_diplomacy_start_peace_between_kingdoms", ":cur_kingdom", ":cur_kingdom_2", ":initializing_war_peace_cond"), (try_end), (try_end), (else_try), # AT PEACE (assign, ":chance_to_declare_war", 6), (val_sub, ":chance_to_declare_war", ":total_ongoing_wars"), (val_mul, ":chance_to_declare_war", 50), (val_mul, ":chance_to_declare_war", ":max_resources_value"), (val_div, ":chance_to_declare_war", 100), (try_begin), (lt, ":random_no", ":chance_to_declare_war"), (assign, ":continue", 1), (try_begin), (check_quest_active, "qst_raid_caravan_to_start_war"), (quest_get_slot, ":quest_target_faction", "qst_raid_caravan_to_start_war", slot_quest_target_faction), (quest_get_slot, ":quest_object_faction", "qst_raid_caravan_to_start_war", slot_quest_object_faction), (this_or_next|eq, ":cur_kingdom", ":quest_target_faction"), (eq, ":cur_kingdom", ":quest_object_faction"), (this_or_next|eq, ":cur_kingdom_2", ":quest_target_faction"), (eq, ":cur_kingdom_2", ":quest_object_faction"), (assign, ":continue", 0), #Do not declare war if the quest is active for the specific kingdoms (try_end), (eq, ":continue", 1), (call_script, "script_diplomacy_start_war_between_kingdoms", ":cur_kingdom", ":cur_kingdom_2", ":initializing_war_peace_cond"), (try_end), (try_end), (try_end), (try_end), ]), # script_exchange_prisoners_between_factions # Input: arg1 = faction_no_1, arg2 = faction_no_2 ("exchange_prisoners_between_factions", [ (store_script_param_1, ":faction_no_1"), (store_script_param_2, ":faction_no_2"), (assign, ":faction_no_3", -1), (assign, ":faction_no_4", -1), (try_begin), (this_or_next|eq, "$players_kingdom", ":faction_no_1"), (eq, "$players_kingdom", ":faction_no_2"), (assign, ":faction_no_3", "fac_player_faction"), (assign, ":faction_no_4", "fac_player_supporters_faction"), (try_end), (try_for_parties, ":party_no"), (store_faction_of_party, ":party_faction", ":party_no"), (this_or_next|eq, ":party_faction", ":faction_no_1"), (this_or_next|eq, ":party_faction", ":faction_no_2"), (this_or_next|eq, ":party_faction", ":faction_no_3"), (eq, ":party_faction", ":faction_no_4"), (party_get_num_prisoner_stacks, ":num_stacks", ":party_no"), (try_for_range_backwards, ":troop_iterator", 0, ":num_stacks"), (party_prisoner_stack_get_troop_id, ":cur_troop_id", ":party_no", ":troop_iterator"), (store_troop_faction, ":cur_faction", ":cur_troop_id"), (this_or_next|eq, ":cur_faction", ":faction_no_1"), (this_or_next|eq, ":cur_faction", ":faction_no_2"), (this_or_next|eq, ":cur_faction", ":faction_no_3"), (eq, ":cur_faction", ":faction_no_4"), (try_begin), (troop_is_hero, ":cur_troop_id"), (call_script, "script_remove_troop_from_prison", ":cur_troop_id"), (try_end), (party_prisoner_stack_get_size, ":stack_size", ":party_no", ":troop_iterator"), (party_remove_prisoners, ":party_no", ":cur_troop_id", ":stack_size"), (try_end), (try_end), ]), # script_add_notification_menu # Input: arg1 = menu_no, arg2 = menu_var_1, arg3 = menu_var_2 # Output: none ("add_notification_menu", [ (store_script_param, ":menu_no", 1), (store_script_param, ":menu_var_1", 2), (store_script_param, ":menu_var_2", 3), (assign, ":end_cond", 1), (try_for_range, ":cur_slot", 0, ":end_cond"), (try_begin), (troop_slot_ge, "trp_notification_menu_types", ":cur_slot", 1), (val_add, ":end_cond", 1), (else_try), (troop_set_slot, "trp_notification_menu_types", ":cur_slot", ":menu_no"), (troop_set_slot, "trp_notification_menu_var1", ":cur_slot", ":menu_var_1"), (troop_set_slot, "trp_notification_menu_var2", ":cur_slot", ":menu_var_2"), (try_end), (try_end), ]), # script_finish_quest # Input: arg1 = quest_no, arg2 = finish_percentage # Output: none ("finish_quest", [ (store_script_param_1, ":quest_no"), (store_script_param_2, ":finish_percentage"), (quest_get_slot, ":quest_giver", ":quest_no", slot_quest_giver_troop), (quest_get_slot, ":quest_importance", ":quest_no", slot_quest_importance), (quest_get_slot, ":quest_xp_reward", ":quest_no", slot_quest_xp_reward), (quest_get_slot, ":quest_gold_reward", ":quest_no", slot_quest_gold_reward), (try_begin), (lt, ":finish_percentage", 100), (val_mul, ":quest_xp_reward", ":finish_percentage"), (val_div, ":quest_xp_reward", 100), (val_mul, ":quest_gold_reward", ":finish_percentage"), (val_div, ":quest_gold_reward", 100), #Changing the relation factor. Negative relation if less than 75% of the quest is finished. #Positive relation if more than 75% of the quest is finished. (assign, ":importance_multiplier", ":finish_percentage"), (val_sub, ":importance_multiplier", 75), (val_mul, ":quest_importance", ":importance_multiplier"), (val_div, ":quest_importance", 100), (else_try), (val_div, ":quest_importance", 4), (val_add, ":quest_importance", 1), (call_script, "script_change_player_relation_with_troop", ":quest_giver", ":quest_importance"), (try_end), (add_xp_as_reward, ":quest_xp_reward"), (call_script, "script_troop_add_gold", "trp_player", ":quest_gold_reward"), (call_script, "script_end_quest", ":quest_no"), ]), # script_get_information_about_troops_position # Input: arg1 = troop_no, arg2 = time (0 if present tense, 1 if past tense) # Output: s1 = String, reg0 = knows-or-not ("get_information_about_troops_position", [ (store_script_param_1, ":troop_no"), (store_script_param_2, reg3), (troop_get_type, reg4, ":troop_no"), (str_store_troop_name, s2, ":troop_no"), (assign, ":found", 0), (troop_get_slot, ":center_no", ":troop_no", slot_troop_cur_center), (try_begin), (gt, ":center_no", 0), (is_between, ":center_no", centers_begin, centers_end), (str_store_party_name_link, s3, ":center_no"), (str_store_string, s1, "@{s2} {reg3?was:is currently} at {s3}."), (assign, ":found", 1), (else_try), (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), (gt, ":party_no", 0), (call_script, "script_get_troop_attached_party", ":troop_no"), (assign, ":center_no", reg0), (try_begin), (is_between, ":center_no", centers_begin, centers_end), (str_store_party_name_link, s3, ":center_no"), (str_store_string, s1, "@{s2} {reg3?was:is currently} at {s3}."), (assign, ":found", 1), (else_try), (get_party_ai_behavior, ":ai_behavior", ":party_no"), (eq, ":ai_behavior", ai_bhvr_travel_to_party), (get_party_ai_object, ":ai_object", ":party_no"), (is_between, ":ai_object", centers_begin, centers_end), (call_script, "script_get_closest_center", ":party_no"), (str_store_party_name_link, s4, reg0), (str_store_party_name_link, s3, ":ai_object"), (str_store_string, s1, "@{s2} {reg3?was:is} travelling to {s3} and {reg4?she:he} {reg3?was:should be} close to {s4}{reg3?: at the moment}."), (assign, ":found", 1), (else_try), (call_script, "script_get_closest_center", ":party_no"), (str_store_party_name_link, s3, reg0), (str_store_string, s1, "@{s2} {reg3?was:is} in wilderness and {reg4?she:he} {reg3?was:should be} close to {s3}{reg3?: at the moment}."), (assign, ":found", 1), (try_end), (else_try), #(troop_slot_ge, ":troop_no", slot_troop_is_prisoner, 1), (troop_slot_ge, ":troop_no", slot_troop_prisoner_of_party, 0), (try_for_range, ":center_no", walled_centers_begin, walled_centers_end), (party_count_prisoners_of_type, ":num_prisoners", ":center_no", ":troop_no"), (gt, ":num_prisoners", 0), (assign, ":found", 1), (str_store_party_name_link, s3, ":center_no"), (str_store_string, s1, "@{s2} {reg3?was:is} being held captive at {s3}."), (try_end), (try_begin), (eq, ":found", 0), (str_store_string, s1, "@{s2} {reg3?was:has been} taken captive by {reg4?her:his} enemies."), (assign, ":found", 1), (try_end), (try_end), (try_begin), (eq, ":found", 0), (str_store_string, s1, "@{reg3?{s2}'s location was unknown:I don't know where {s2} is}."), (try_end), (assign, reg0, ":found"), ]), # script_recruit_troop_as_companion # Input: arg1 = troop_no, # Output: none ("recruit_troop_as_companion", [ (store_script_param_1, ":troop_no"), (troop_set_slot, ":troop_no", slot_troop_occupation, slto_player_companion), (troop_set_slot, ":troop_no", slot_troop_cur_center, -1), (troop_set_auto_equip, ":troop_no",0), (party_add_members, "p_main_party", ":troop_no", 1), (str_store_troop_name, s6, ":troop_no"), (display_message, "@{s6} has joined your party"), ]), # script_setup_random_scene # Input: arg1 = center_no, arg2 = mission_template_no # Output: none ("setup_random_scene", [ (party_get_current_terrain, ":terrain_type", "p_main_party"), (assign, ":scene_to_use", "scn_random_scene"), (try_begin), (eq, ":terrain_type", rt_steppe), (assign, ":scene_to_use", "scn_random_scene_steppe"), (else_try), (eq, ":terrain_type", rt_plain), (assign, ":scene_to_use", "scn_random_scene_plain"), (else_try), (eq, ":terrain_type", rt_snow), (assign, ":scene_to_use", "scn_random_scene_snow"), (else_try), (eq, ":terrain_type", rt_desert), (assign, ":scene_to_use", "scn_random_scene_desert"), (else_try), (eq, ":terrain_type", rt_steppe_forest), (assign, ":scene_to_use", "scn_random_scene_steppe_forest"), (else_try), (eq, ":terrain_type", rt_forest), (assign, ":scene_to_use", "scn_random_scene_plain_forest"), (else_try), (eq, ":terrain_type", rt_snow_forest), (assign, ":scene_to_use", "scn_random_scene_snow_forest"), (else_try), (eq, ":terrain_type", rt_desert_forest), (assign, ":scene_to_use", "scn_random_scene_desert_forest"), (try_end), (jump_to_scene,":scene_to_use"), ]), # script_enter_dungeon # Input: arg1 = center_no, arg2 = mission_template_no # Output: none ("enter_dungeon", [ (store_script_param_1, ":center_no"), (store_script_param_2, ":mission_template_no"), (set_jump_mission,":mission_template_no"), (party_get_slot, ":dungeon_scene", ":center_no", slot_town_prison), (modify_visitors_at_site,":dungeon_scene"),(reset_visitors), (assign, ":cur_pos", 16), (call_script, "script_get_heroes_attached_to_center_as_prisoner", ":center_no", "p_temp_party"), (party_get_num_companion_stacks, ":num_stacks","p_temp_party"), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop","p_temp_party",":i_stack"), (lt, ":cur_pos", 32), # spawn up to entry point 32 (set_visitor, ":cur_pos", ":stack_troop"), (val_add,":cur_pos", 1), (try_end), (set_jump_entry, 0), (jump_to_scene,":dungeon_scene"), (scene_set_slot, ":dungeon_scene", slot_scene_visited, 1), (change_screen_mission), ]), # script_enter_court # Input: arg1 = center_no # Output: none ("enter_court", [ (store_script_param_1, ":center_no"), (assign, "$talk_context", tc_court_talk), (set_jump_mission,"mt_visit_town_castle"), (party_get_slot, ":castle_scene", ":center_no", slot_town_castle), (modify_visitors_at_site,":castle_scene"), (reset_visitors), #Adding guards (store_faction_of_party, ":center_faction", ":center_no"), (faction_get_slot, ":guard_troop", ":center_faction", slot_faction_guard_troop), (try_begin), (le, ":guard_troop", 0), (assign, ":guard_troop", "trp_swadian_sergeant"), (try_end), (set_visitor, 6, ":guard_troop"), (set_visitor, 7, ":guard_troop"), (assign, ":cur_pos", 16), (call_script, "script_get_heroes_attached_to_center", ":center_no", "p_temp_party"), (party_get_num_companion_stacks, ":num_stacks","p_temp_party"), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop","p_temp_party",":i_stack"), (lt, ":cur_pos", 32), # spawn up to entry point 32 (set_visitor, ":cur_pos", ":stack_troop"), (val_add,":cur_pos", 1), (try_end), (try_for_range, ":cur_troop", heroes_begin, heroes_end), (troop_slot_eq, ":cur_troop", slot_troop_occupation, slto_kingdom_lady), (troop_slot_eq, ":cur_troop", slot_troop_cur_center, ":center_no"), (lt, ":cur_pos", 32), # spawn up to entry point 32 (set_visitor, ":cur_pos", ":cur_troop"), (val_add,":cur_pos", 1), (try_end), (jump_to_scene,":castle_scene"), (scene_set_slot, ":castle_scene", slot_scene_visited, 1), (change_screen_mission), ]), # script_find_high_ground_around_pos1 # Input: pos1 should hold center_position_no # arg1: team_no # arg2: search_radius (in meters) # Output: pos52 contains highest ground within <search_radius> meters of team leader # Destroys position registers: pos10, pos11, pos15 ("find_high_ground_around_pos1", [ (store_script_param, ":team_no", 1), (store_script_param, ":search_radius", 2), (val_mul, ":search_radius", 100), (get_scene_boundaries, pos10,pos11), (team_get_leader, ":ai_leader", ":team_no"), (agent_get_position, pos1, ":ai_leader"), (set_fixed_point_multiplier, 100), (position_get_x, ":o_x", pos1), (position_get_y, ":o_y", pos1), (store_sub, ":min_x", ":o_x", ":search_radius"), (store_sub, ":min_y", ":o_y", ":search_radius"), (store_add, ":max_x", ":o_x", ":search_radius"), (store_add, ":max_y", ":o_y", ":search_radius"), (position_get_x, ":scene_min_x", pos10), (position_get_x, ":scene_max_x", pos11), (position_get_y, ":scene_min_y", pos10), (position_get_y, ":scene_max_y", pos11), (val_max, ":min_x", ":scene_min_x"), (val_max, ":min_y", ":scene_min_y"), (val_min, ":max_x", ":scene_max_x"), (val_min, ":max_y", ":scene_max_y"), (store_div, ":min_x_meters", ":min_x", 100), (store_div, ":min_y_meters", ":min_y", 100), (store_div, ":max_x_meters", ":max_x", 100), (store_div, ":max_y_meters", ":max_y", 100), (assign, ":highest_pos_z", -10000), (copy_position, pos52, pos1), (init_position, pos15), (try_for_range, ":i_x", ":min_x_meters", ":max_x_meters"), (store_mul, ":i_x_cm", ":i_x", 100), (try_for_range, ":i_y", ":min_y_meters", ":max_y_meters"), (store_mul, ":i_y_cm", ":i_y", 100), (position_set_x, pos15, ":i_x_cm"), (position_set_y, pos15, ":i_y_cm"), (position_set_z, pos15, 10000), (position_set_z_to_ground_level, pos15), (position_get_z, ":cur_pos_z", pos15), (try_begin), (gt, ":cur_pos_z", ":highest_pos_z"), (copy_position, pos52, pos15), (assign, ":highest_pos_z", ":cur_pos_z"), (try_end), (try_end), (try_end), ]), # script_select_battle_tactic # Input: none # Output: none ("select_battle_tactic", [ (assign, "$ai_team_1_battle_tactic", 0), (get_player_agent_no, ":player_agent"), (agent_get_team, ":player_team", ":player_agent"), (try_begin), (num_active_teams_le, 2), (try_begin), (eq, ":player_team", 0), (assign, "$ai_team_1", 1), (else_try), (assign, "$ai_team_1", 0), (try_end), (assign, "$ai_team_2", -1), (else_try), (try_begin), (eq, ":player_team", 0), (assign, "$ai_team_1", 1), (else_try), (assign, "$ai_team_1", 0), (try_end), (store_add, "$ai_team_2", ":player_team", 2), (try_end), (call_script, "script_select_battle_tactic_aux", "$ai_team_1"), (assign, "$ai_team_1_battle_tactic", reg0), (try_begin), (ge, "$ai_team_2", 0), (call_script, "script_select_battle_tactic_aux", "$ai_team_2"), (assign, "$ai_team_2_battle_tactic", reg0), (try_end), ]), # script_select_battle_tactic_aux # Input: team_no # Output: battle_tactic ("select_battle_tactic_aux", [ (store_script_param, ":team_no", 1), (assign, ":battle_tactic", 0), (assign, ":defense_not_an_option", 0), (get_player_agent_no, ":player_agent"), (agent_get_team, ":player_team", ":player_agent"), (try_begin), (eq, "$cant_leave_encounter", 1), (teams_are_enemies, ":team_no", ":player_team"), (assign, ":defense_not_an_option", 1), (try_end), (call_script, "script_team_get_class_percentages", ":team_no", 0), # (assign, ":ai_perc_infantry", reg0), (assign, ":ai_perc_archers", reg1), (assign, ":ai_perc_cavalry", reg2), (call_script, "script_team_get_class_percentages", ":team_no", 1),#enemies of the ai_team # (assign, ":enemy_perc_infantry", reg0), # (assign, ":enemy_perc_archers", reg1), # (assign, ":enemy_perc_cavalry", reg2), (store_random_in_range, ":rand", 0, 100), (try_begin), (this_or_next|lt, ":rand", 20), (assign, ":continue", 0), (try_begin), (teams_are_enemies, ":team_no", ":player_team"), (party_slot_eq, "$g_enemy_party", slot_party_type, spt_kingdom_hero_party), (assign, ":continue", 1), (else_try), (neg|teams_are_enemies, ":team_no", ":player_team"), (gt, "$g_ally_party", 0), (party_slot_eq, "$g_ally_party", slot_party_type, spt_kingdom_hero_party), (assign, ":continue", 1), (try_end), (eq, ":continue", 1), (try_begin), (eq, ":defense_not_an_option", 0), (gt, ":ai_perc_archers", 50), (lt, ":ai_perc_cavalry", 35), (assign, ":battle_tactic", btactic_hold), (else_try), (lt, ":rand", 80), (assign, ":battle_tactic", btactic_follow_leader), (try_end), (try_end), (assign, reg0, ":battle_tactic"), ]), # script_battle_tactic_init # Input: none # Output: none ("battle_tactic_init", [ (call_script, "script_battle_tactic_init_aux", "$ai_team_1", "$ai_team_1_battle_tactic"), (try_begin), (ge, "$ai_team_2", 0), (call_script, "script_battle_tactic_init_aux", "$ai_team_2", "$ai_team_2_battle_tactic"), (try_end), ]), # script_battle_tactic_init_aux # Input: team_no, battle_tactic # Output: none ("battle_tactic_init_aux", [ (store_script_param, ":team_no", 1), (store_script_param, ":battle_tactic", 2), (team_get_leader, ":ai_leader", ":team_no"), (try_begin), (eq, ":battle_tactic", btactic_hold), (agent_get_position, pos1, ":ai_leader"), (call_script, "script_find_high_ground_around_pos1", ":team_no", 30), (copy_position, pos1, pos52), (call_script, "script_find_high_ground_around_pos1", ":team_no", 30), # call again just in case we are not at peak point. (copy_position, pos1, pos52), (call_script, "script_find_high_ground_around_pos1", ":team_no", 30), # call again just in case we are not at peak point. (team_give_order, ":team_no", grc_everyone, mordr_hold), (team_set_order_position, ":team_no", grc_everyone, pos52), (team_give_order, ":team_no", grc_archers, mordr_advance), (team_give_order, ":team_no", grc_archers, mordr_advance), (else_try), (eq, ":battle_tactic", btactic_follow_leader), (team_get_leader, ":ai_leader", ":team_no"), (agent_set_speed_limit, ":ai_leader", 8), (agent_get_position, pos60, ":ai_leader"), (team_give_order, ":team_no", grc_everyone, mordr_hold), (team_set_order_position, ":team_no", grc_everyone, pos60), (try_end), ]), # script_battle_tactic_apply # Input: none # Output: none ("battle_tactic_apply", [ (call_script, "script_battle_tactic_apply_aux", "$ai_team_1", "$ai_team_1_battle_tactic"), (assign, "$ai_team_1_battle_tactic", reg0), (try_begin), (ge, "$ai_team_2", 0), (call_script, "script_battle_tactic_apply_aux", "$ai_team_2", "$ai_team_2_battle_tactic"), (assign, "$ai_team_2_battle_tactic", reg0), (try_end), ]), # script_battle_tactic_apply_aux # Input: team_no, battle_tactic # Output: battle_tactic ("battle_tactic_apply_aux", [ (store_script_param, ":team_no", 1), (store_script_param, ":battle_tactic", 2), (store_mission_timer_a, ":mission_time"), (try_begin), (eq, ":battle_tactic", btactic_hold), (copy_position, pos1, pos52), (call_script, "script_get_closest3_distance_of_enemies_at_pos1", ":team_no", 1), (assign, ":avg_dist", reg0), (assign, ":min_dist", reg1), (try_begin), (this_or_next|lt, ":min_dist", 1000), (lt, ":avg_dist", 4000), (assign, ":battle_tactic", 0), (team_give_order, ":team_no", grc_everyone, mordr_charge), (try_end), (else_try), (eq, ":battle_tactic", btactic_follow_leader), (team_get_leader, ":ai_leader", ":team_no"), (agent_set_speed_limit, ":ai_leader", 9), (call_script, "script_team_get_average_position_of_enemies", ":team_no"), (copy_position, pos60, pos0), (agent_get_position, pos61, ":ai_leader"), (position_transform_position_to_local, pos62, pos61, pos60), #pos62 = vector to enemy w.r.t leader (position_normalize_origin, ":distance_to_enemy", pos62), (convert_from_fixed_point, ":distance_to_enemy"), (assign, reg17, ":distance_to_enemy"), (position_get_x, ":dir_x", pos62), (position_get_y, ":dir_y", pos62), (val_mul, ":dir_x", 23), (val_mul, ":dir_y", 23), #move 23 meters (position_set_x, pos62, ":dir_x"), (position_set_y, pos62, ":dir_y"), (position_transform_position_to_parent, pos63, pos61, pos62), #pos63 is 23m away from leader in the direction of the enemy. (position_set_z_to_ground_level, pos63), (team_give_order, ":team_no", grc_everyone, mordr_hold), (team_set_order_position, ":team_no", grc_everyone, pos63), # (team_give_order, ":team_no", grc_everyone, mordr_follow), (agent_get_position, pos1, ":ai_leader"), # (call_script, "script_get_closest3_distance_of_enemies_at_pos1", ":team_no"), # (assign, ":avg_dist", reg0), # (assign, ":min_dist", reg1), (try_begin), (lt, ":distance_to_enemy", 50), (ge, ":mission_time", 30), (assign, ":battle_tactic", 0), (team_give_order, ":team_no", grc_everyone, mordr_charge), (agent_set_speed_limit, ":ai_leader", 60), (try_end), (try_end), (try_begin), # charge everyone after a while (neq, ":battle_tactic", 0), (ge, ":mission_time", 300), (assign, ":battle_tactic", 0), (team_give_order, ":team_no", grc_everyone, mordr_charge), (team_get_leader, ":ai_leader", ":team_no"), (agent_set_speed_limit, ":ai_leader", 60), (try_end), (assign, reg0, ":battle_tactic"), ]), ## # script_siege_defender_tactic_apply ## # Input: none ## # Output: none ## ("siege_defender_tactic_apply", ## [ ## (try_begin), ## (eq, "$defender_team", 1), ## (ge, "$belfry_positioned", 2), ## ## (assign, ":enemy_too_weak", 0), ## (try_begin), ## (ge, "$attacker_reinforcement_stage", 2), ## (call_script, "script_calculate_team_strength", "$defender_team"), ## (assign, ":defender_strength", reg0), ## (call_script, "script_calculate_team_strength", "$attacker_team"), ## (assign, ":attacker_strength", reg0), ## (store_mul, ":attacker_strength_multiplied", ":attacker_strength", 2), ## (ge, ":defender_strength", ":attacker_strength_multiplied"), ## (assign, ":enemy_too_weak", 1), ## (try_end), ## ## (try_begin), ## (eq, ":enemy_too_weak", 1), ## (neq, "$ai_battle_tactic", btactic_charge), ## (assign, "$ai_battle_tactic", btactic_charge), ## (team_give_order, "$defender_team", grc_infantry, mordr_charge), ## (else_try), ## (neq, "$ai_battle_tactic", btactic_charge), ## (neq, "$ai_battle_tactic", btactic_hold), ## (assign, "$ai_battle_tactic", btactic_hold), ## (team_give_order, "$defender_team", grc_infantry, mordr_hold), ## (team_give_order, "$defender_team", grc_heroes, mordr_hold), ## (entry_point_get_position,pos1,10), ## (team_set_order_position, "$defender_team", grc_infantry, pos1), ## (team_set_order_position, "$defender_team", grc_heroes, pos1), ## (try_end), ## (try_end), ## ]), # script_team_get_class_percentages # Input: arg1: team_no, arg2: try for team's enemies # Output: reg0: percentage infantry, reg1: percentage archers, reg2: percentage cavalry ("team_get_class_percentages", [ (assign, ":num_infantry", 0), (assign, ":num_archers", 0), (assign, ":num_cavalry", 0), (assign, ":num_total", 0), (store_script_param, ":team_no", 1), (store_script_param, ":negate", 2), (try_for_agents,":cur_agent"), (agent_is_alive, ":cur_agent"), (agent_is_human, ":cur_agent"), (agent_get_team, ":agent_team", ":cur_agent"), (assign, ":continue", 0), (try_begin), (eq, ":negate", 1), (teams_are_enemies, ":agent_team", ":team_no"), (assign, ":continue", 1), (else_try), (eq, ":agent_team", ":team_no"), (assign, ":continue", 1), (try_end), (eq, ":continue", 1), (val_add, ":num_total", 1), (agent_get_class, ":agent_class", ":cur_agent"), (try_begin), (eq, ":agent_class", grc_infantry), (val_add, ":num_infantry", 1), (else_try), (eq, ":agent_class", grc_archers), (val_add, ":num_archers", 1), (else_try), (eq, ":agent_class", grc_cavalry), (val_add, ":num_cavalry", 1), (try_end), (try_end), (try_begin), (eq, ":num_total", 0), (assign, ":num_total", 1), (try_end), (store_mul, ":perc_infantry",":num_infantry",100), (val_div, ":perc_infantry",":num_total"), (store_mul, ":perc_archers",":num_archers",100), (val_div, ":perc_archers",":num_total"), (store_mul, ":perc_cavalry",":num_cavalry",100), (val_div, ":perc_cavalry",":num_total"), (assign, reg0, ":perc_infantry"), (assign, reg1, ":perc_archers"), (assign, reg2, ":perc_cavalry"), ]), # script_get_closest3_distance_of_enemies_at_pos1 # Input: arg1: team_no, pos1 # Output: reg0: distance in cms. ("get_closest3_distance_of_enemies_at_pos1", [ (assign, ":min_distance_1", 100000), (assign, ":min_distance_2", 100000), (assign, ":min_distance_3", 100000), (store_script_param, ":team_no", 1), (try_for_agents,":cur_agent"), (agent_is_alive, ":cur_agent"), (agent_is_human, ":cur_agent"), (agent_get_team, ":agent_team", ":cur_agent"), (teams_are_enemies, ":agent_team", ":team_no"), (agent_get_position, pos2, ":cur_agent"), (get_distance_between_positions,":cur_dist",pos2,pos1), (try_begin), (lt, ":cur_dist", ":min_distance_1"), (assign, ":min_distance_3", ":min_distance_2"), (assign, ":min_distance_2", ":min_distance_1"), (assign, ":min_distance_1", ":cur_dist"), (else_try), (lt, ":cur_dist", ":min_distance_2"), (assign, ":min_distance_3", ":min_distance_2"), (assign, ":min_distance_2", ":cur_dist"), (else_try), (lt, ":cur_dist", ":min_distance_3"), (assign, ":min_distance_3", ":cur_dist"), (try_end), (try_end), (assign, ":total_distance", 0), (assign, ":total_count", 0), (try_begin), (lt, ":min_distance_1", 100000), (val_add, ":total_distance", ":min_distance_1"), (val_add, ":total_count", 1), (try_end), (try_begin), (lt, ":min_distance_2", 100000), (val_add, ":total_distance", ":min_distance_2"), (val_add, ":total_count", 1), (try_end), (try_begin), (lt, ":min_distance_3", 100000), (val_add, ":total_distance", ":min_distance_3"), (val_add, ":total_count", 1), (try_end), (assign, ":average_distance", 100000), (try_begin), (gt, ":total_count", 0), (store_div, ":average_distance", ":total_distance", ":total_count"), (try_end), (assign, reg0, ":average_distance"), (assign, reg1, ":min_distance_1"), (assign, reg2, ":min_distance_2"), (assign, reg3, ":min_distance_3"), ]), # script_team_get_average_position_of_enemies # Input: arg1: team_no, # Output: pos0: average position. ("team_get_average_position_of_enemies", [ (store_script_param_1, ":team_no"), (init_position, pos0), (assign, ":num_enemies", 0), (assign, ":accum_x", 0), (assign, ":accum_y", 0), (assign, ":accum_z", 0), (try_for_agents,":enemy_agent"), (agent_is_alive, ":enemy_agent"), (agent_is_human, ":enemy_agent"), (agent_get_team, ":enemy_team", ":enemy_agent"), (teams_are_enemies, ":team_no", ":enemy_team"), (agent_get_position, pos62, ":enemy_agent"), (position_get_x, ":x", pos62), (position_get_y, ":y", pos62), (position_get_z, ":z", pos62), (val_add, ":accum_x", ":x"), (val_add, ":accum_y", ":y"), (val_add, ":accum_z", ":z"), (val_add, ":num_enemies", 1), (try_end), (store_div, ":average_x", ":accum_x", ":num_enemies"), (store_div, ":average_y", ":accum_y", ":num_enemies"), (store_div, ":average_z", ":accum_z", ":num_enemies"), (position_set_x, pos0, ":average_x"), (position_set_y, pos0, ":average_y"), (position_set_z, pos0, ":average_z"), (assign, reg0, ":num_enemies"), ]), # script_search_troop_prisoner_of_party # Input: arg1 = troop_no # Output: reg0 = party_no (-1 if troop is not a prisoner.) ("search_troop_prisoner_of_party", [ (store_script_param_1, ":troop_no"), (assign, ":prisoner_of", -1), (try_for_parties, ":party_no"), (eq, ":prisoner_of", -1), (this_or_next|eq, ":party_no", "p_main_party"), (ge, ":party_no", centers_begin), (party_count_prisoners_of_type, ":troop_found", ":party_no", ":troop_no"), (gt, ":troop_found", 0), (assign, ":prisoner_of", ":party_no"), (try_end), (assign, reg0, ":prisoner_of"), ]), ## # script_clear_last_quest ## # Input: arg1 = troop_no ## # Output: none ## ("clear_last_quest", ## [ ## (store_script_param_1, ":troop_no"), ## ## (troop_set_slot, ":troop_no",slot_troop_last_quest, 0), ## (troop_set_slot, ":troop_no",slot_troop_last_quest_betrayed, 0) ## ]), # script_change_debt_to_troop # Input: arg1 = troop_no, arg2 = new debt amount # Output: none ("change_debt_to_troop", [ (store_script_param_1, ":troop_no"), (store_script_param_2, ":new_debt"), (troop_get_slot, ":cur_debt", ":troop_no", slot_troop_player_debt), (assign, reg1, ":cur_debt"), (val_add, ":cur_debt", ":new_debt"), (assign, reg2, ":cur_debt"), (troop_set_slot, ":troop_no", slot_troop_player_debt, ":cur_debt"), (str_store_troop_name_link, s1, ":troop_no"), (display_message, "@You now owe {reg2} denars to {s1}."), ]), # script_abort_quest # Input: arg1 = quest_no, arg2 = apply relation penalty # Output: none ("abort_quest", [ (store_script_param_1, ":quest_no"), (store_script_param_2, ":abort_type"), #0=aborted by event, 1=abort by talking 2=abort by expire (assign, ":quest_return_penalty", -1), (assign, ":quest_expire_penalty", -2), # (quest_get_slot, ":quest_object_troop", ":quest_no", slot_quest_object_troop), (try_begin), (this_or_next|eq, ":quest_no", "qst_deliver_message"), (eq, ":quest_no", "qst_deliver_message_to_enemy_lord"), (assign, ":quest_return_penalty", -2), (assign, ":quest_expire_penalty", -3), (else_try), (eq, ":quest_no", "qst_escort_lady"), (quest_get_slot, ":quest_object_troop", "qst_escort_lady", slot_quest_object_troop), (party_remove_members, "p_main_party", ":quest_object_troop", 1), (assign, ":quest_return_penalty", -2), (assign, ":quest_expire_penalty", -3), ## (else_try), ## (eq, ":quest_no", "qst_rescue_lady_under_siege"), ## (party_remove_members, "p_main_party", ":quest_object_troop", 1), ## (else_try), ## (eq, ":quest_no", "qst_deliver_message_to_lover"), ## (else_try), ## (eq, ":quest_no", "qst_bring_prisoners_to_enemy"), ## (try_begin), ## (check_quest_succeeded, ":quest_no"), ## (quest_get_slot, ":quest_target_amount", ":quest_no", slot_quest_target_amount), ## (quest_get_slot, ":quest_object_troop", ":quest_no", slot_quest_object_troop), ## (quest_get_slot, ":quest_giver_troop", ":quest_no", slot_quest_giver_troop), ## (call_script, "script_game_get_join_cost", ":quest_object_troop"), ## (assign, ":reward", reg0), ## (val_mul, ":reward", ":quest_target_amount"), ## (val_div, ":reward", 2), ## (else_try), ## (quest_get_slot, ":reward", ":quest_no", slot_quest_target_amount), ## (try_end), ## (call_script, "script_change_debt_to_troop", ":quest_giver_troop", ":reward"), ## (else_try), ## (eq, ":quest_no", "qst_bring_reinforcements_to_siege"), ## (quest_get_slot, ":quest_target_amount", ":quest_no", slot_quest_target_amount), ## (quest_get_slot, ":quest_object_troop", ":quest_no", slot_quest_object_troop), ## (quest_get_slot, ":quest_giver_troop", ":quest_no", slot_quest_giver_troop), ## (call_script, "script_game_get_join_cost", ":quest_object_troop"), ## (assign, ":reward", reg0), ## (val_mul, ":reward", ":quest_target_amount"), ## (val_mul, ":reward", 2), ## (call_script, "script_change_debt_to_troop", ":quest_giver_troop", ":reward"), ## (else_try), ## (eq, ":quest_no", "qst_deliver_supply_to_center_under_siege"), ## (quest_get_slot, ":quest_target_amount", ":quest_no", slot_quest_target_amount), ## (quest_get_slot, ":quest_giver_troop", ":quest_no", slot_quest_giver_troop), ## (store_item_value, ":reward", "itm_siege_supply"), ## (val_mul, ":reward", ":quest_target_amount"), ## (call_script, "script_change_debt_to_troop", ":quest_giver_troop", ":reward"), (else_try), (eq, ":quest_no", "qst_raise_troops"), (quest_get_slot, ":quest_giver_troop", ":quest_no", slot_quest_giver_troop), (call_script, "script_change_debt_to_troop", ":quest_giver_troop", 100), (assign, ":quest_return_penalty", -4), (assign, ":quest_expire_penalty", -5), (else_try), (eq, ":quest_no", "qst_deal_with_looters"), (try_for_parties, ":cur_party_no"), (party_get_template_id, ":cur_party_template", ":cur_party_no"), (eq, ":cur_party_template", "pt_looters"), (party_set_flags, ":cur_party_no", pf_quest_party, 0), (try_end), (assign, ":quest_return_penalty", -4), (assign, ":quest_expire_penalty", -5), (else_try), (eq, ":quest_no", "qst_deal_with_bandits_at_lords_village"), (quest_get_slot, ":quest_giver_troop", ":quest_no", slot_quest_giver_troop), (call_script, "script_change_debt_to_troop", ":quest_giver_troop", 200), (assign, ":quest_return_penalty", -5), (assign, ":quest_expire_penalty", -6), (else_try), (eq, ":quest_no", "qst_collect_taxes"), (quest_get_slot, ":gold_reward", ":quest_no", slot_quest_gold_reward), (quest_set_slot, ":quest_no", slot_quest_gold_reward, 0), (quest_get_slot, ":quest_giver_troop", ":quest_no", slot_quest_giver_troop), (call_script, "script_change_debt_to_troop", ":quest_giver_troop", ":gold_reward"), (assign, ":quest_return_penalty", -4), (assign, ":quest_expire_penalty", -6), ## (else_try), ## (eq, ":quest_no", "qst_capture_messenger"), ## (else_try), ## (eq, ":quest_no", "qst_bring_back_deserters"), (else_try), (eq, ":quest_no", "qst_hunt_down_fugitive"), (assign, ":quest_return_penalty", -3), (assign, ":quest_expire_penalty", -4), (else_try), (eq, ":quest_no", "qst_kill_local_merchant"), (else_try), (eq, ":quest_no", "qst_bring_back_runaway_serfs"), (assign, ":quest_return_penalty", -1), (assign, ":quest_expire_penalty", -1), (else_try), (eq, ":quest_no", "qst_lend_companion"), (else_try), (eq, ":quest_no", "qst_collect_debt"), (try_begin), (quest_slot_eq, "qst_collect_debt", slot_quest_current_state, 1), #debt collected but not delivered (quest_get_slot, ":debt", "qst_collect_debt", slot_quest_target_amount), (quest_get_slot, ":quest_giver", "qst_collect_debt", slot_quest_giver_troop), (call_script, "script_change_debt_to_troop", ":quest_giver", ":debt"), (assign, ":quest_return_penalty", -3), (assign, ":quest_expire_penalty", -6), (else_try), (assign, ":quest_return_penalty", -3), (assign, ":quest_expire_penalty", -4), (try_end), (else_try), (eq, ":quest_no", "qst_deal_with_bandits_at_lords_village"), (assign, ":quest_return_penalty", -6), (assign, ":quest_expire_penalty", -6), (else_try), (eq, ":quest_no", "qst_raid_caravan_to_start_war"), (assign, ":quest_return_penalty", -10), (assign, ":quest_expire_penalty", -13), (else_try), (eq, ":quest_no", "qst_persuade_lords_to_make_peace"), (assign, ":quest_return_penalty", -10), (assign, ":quest_expire_penalty", -13), (else_try), (eq, ":quest_no", "qst_deal_with_night_bandits"), (assign, ":quest_return_penalty", -1), (assign, ":quest_expire_penalty", -1), (else_try), (eq, ":quest_no", "qst_follow_spy"), (assign, ":quest_return_penalty", -2), (assign, ":quest_expire_penalty", -3), (try_begin), (party_is_active, "$qst_follow_spy_spy_party"), (remove_party, "$qst_follow_spy_spy_party"), (try_end), (try_begin), (party_is_active, "$qst_follow_spy_spy_partners_party"), (remove_party, "$qst_follow_spy_spy_partners_party"), (try_end), (else_try), (eq, ":quest_no", "qst_capture_enemy_hero"), (assign, ":quest_return_penalty", -3), (assign, ":quest_expire_penalty", -4), ## (else_try), ## (eq, ":quest_no", "qst_lend_companion"), ## (quest_get_slot, ":quest_target_troop", "qst_lend_companion", slot_quest_target_troop), ## (party_add_members, "p_main_party", ":quest_target_troop", 1), ## (else_try), ## (eq, ":quest_no", "qst_capture_conspirators"), ## (else_try), ## (eq, ":quest_no", "qst_defend_nobles_against_peasants"), (else_try), (eq, ":quest_no", "qst_incriminate_loyal_commander"), (assign, ":quest_return_penalty", -5), (assign, ":quest_expire_penalty", -6), ## (else_try), ## (eq, ":quest_no", "qst_hunt_down_raiders"), ## (else_try), ## (eq, ":quest_no", "qst_capture_prisoners"), ## #Enemy lord quests (else_try), (eq, ":quest_no", "qst_lend_surgeon"), #Kingdom lady quests (else_try), (eq, ":quest_no", "qst_rescue_lord_by_replace"), (assign, ":quest_return_penalty", -1), (assign, ":quest_expire_penalty", -1), (else_try), (eq, ":quest_no", "qst_deliver_message_to_prisoner_lord"), (assign, ":quest_return_penalty", 0), (assign, ":quest_expire_penalty", -1), (else_try), (eq, ":quest_no", "qst_duel_for_lady"), (assign, ":quest_return_penalty", -1), (assign, ":quest_expire_penalty", -1), #Kingdom Army quests (else_try), (eq, ":quest_no", "qst_follow_army"), (assign, ":quest_return_penalty", -4), (assign, ":quest_expire_penalty", -5), (else_try), (eq, ":quest_no", "qst_deliver_cattle_to_army"), (assign, ":quest_return_penalty", -1), (assign, ":quest_expire_penalty", -2), (else_try), (eq, ":quest_no", "qst_join_siege_with_army"), (assign, ":quest_return_penalty", -1), (assign, ":quest_expire_penalty", -2), (else_try), (eq, ":quest_no", "qst_scout_waypoints"), (assign, ":quest_return_penalty", -1), (assign, ":quest_expire_penalty", -2), #Village Elder quests (else_try), (eq, ":quest_no", "qst_deliver_grain"), (assign, ":quest_return_penalty", -6), (assign, ":quest_expire_penalty", -7), (else_try), (eq, ":quest_no", "qst_deliver_cattle"), (assign, ":quest_return_penalty", -3), (assign, ":quest_expire_penalty", -4), (else_try), (eq, ":quest_no", "qst_train_peasants_against_bandits"), (assign, ":quest_return_penalty", -4), (assign, ":quest_expire_penalty", -5), #Mayor quests (else_try), (eq, ":quest_no", "qst_deliver_wine"), (assign, ":quest_return_penalty", -1), (assign, ":quest_expire_penalty", -3), (val_add, "$debt_to_merchants_guild", "$qst_deliver_wine_debt"), (else_try), (eq, ":quest_no", "qst_move_cattle_herd"), (assign, ":quest_return_penalty", -1), (assign, ":quest_expire_penalty", -3), (else_try), (eq, ":quest_no", "qst_escort_merchant_caravan"), (assign, ":quest_return_penalty", -1), (assign, ":quest_expire_penalty", -3), (else_try), (eq, ":quest_no", "qst_troublesome_bandits"), (assign, ":quest_return_penalty", -1), (assign, ":quest_expire_penalty", -2), #Other quests (else_try), (eq, ":quest_no", "qst_join_faction"), (assign, ":quest_return_penalty", -3), (assign, ":quest_expire_penalty", -3), (try_begin), (call_script, "script_get_number_of_hero_centers", "trp_player"), (gt, reg0, 0), (call_script, "script_change_player_relation_with_faction", "$g_invite_faction", -10), (try_end), (assign, "$g_invite_faction", 0), (assign, "$g_invite_faction_lord", 0), (assign, "$g_invite_offered_center", 0), (else_try), (eq, ":quest_no", "qst_eliminate_bandits_infesting_village"), (assign, ":quest_return_penalty", -3), (assign, ":quest_expire_penalty", -3), (try_end), (try_begin), (gt, ":abort_type", 0), (quest_get_slot, ":quest_giver", ":quest_no", slot_quest_giver_troop), (assign, ":relation_penalty", ":quest_return_penalty"), (try_begin), (eq, ":abort_type", 2), (assign, ":relation_penalty", ":quest_expire_penalty"), (try_end), (try_begin), (this_or_next|is_between, ":quest_giver", village_elders_begin, village_elders_end), (is_between, ":quest_giver", mayors_begin, mayors_end), (quest_get_slot, ":quest_giver_center", ":quest_no", slot_quest_giver_center), (call_script, "script_change_player_relation_with_center", ":quest_giver_center", ":relation_penalty"), (else_try), (call_script, "script_change_player_relation_with_troop", ":quest_giver", ":relation_penalty"), (try_end), (try_end), (fail_quest, ":quest_no"), #NPC companion changes begin (try_begin), (gt, ":abort_type", 0), (call_script, "script_objectionable_action", tmt_honest, "str_fail_quest"), (try_end), #NPC companion changes end (call_script, "script_end_quest", ":quest_no"), ]), ## # script_event_center_captured ## # Input: arg1 = center_no, arg2 = old_faction_no ## # Output: none ## ("event_center_captured", ## [ ## # (store_script_param_1, ":center_no"), ## # (store_script_param_2, ":old_faction_no"), ## # (store_faction_of_party, ":faction_no"), ## ## (try_begin), ## (check_quest_active, "qst_deliver_message"), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_escort_lady"), ## (quest_slot_eq, "qst_escort_lady", slot_quest_target_center, ":center_no"), ## (call_script, "script_abort_quest", "qst_escort_lady"), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_rescue_lady_under_siege"), ## (quest_slot_eq, "qst_rescue_lady_under_siege", slot_quest_target_center, ":center_no"), ## (quest_slot_eq, "qst_rescue_lady_under_siege", slot_quest_current_state, 0), ## (call_script, "script_abort_quest", "qst_rescue_lady_under_siege", 1), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_deliver_message_to_lover"), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_deliver_message_to_enemy_lord"), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_bring_prisoners_to_enemy"), ## (quest_slot_eq, "qst_bring_prisoners_to_enemy", slot_quest_target_center, ":center_no"), ## (neg|check_quest_succeeded, "qst_bring_prisoners_to_enemy"), ## (call_script, "script_abort_quest", "qst_bring_prisoners_to_enemy"), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_bring_reinforcements_to_siege"), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_deliver_supply_to_center_under_siege"), ## (quest_slot_eq, "qst_deliver_supply_to_center_under_siege", slot_quest_target_center, ":center_no"), ## (call_script, "script_abort_quest", "qst_deliver_supply_to_center_under_siege", 1), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_raise_troops"), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_capture_messenger"), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_bring_back_deserters"), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_kill_local_merchant"), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_bring_back_runaway_serfs"), ## (quest_slot_eq, "qst_bring_back_runaway_serfs", slot_quest_object_center, ":center_no"), ## (neg|check_quest_succeeded, "qst_bring_back_runaway_serfs"), ## (neg|check_quest_failed, "qst_bring_back_runaway_serfs"), ## (call_script, "script_abort_quest", "qst_bring_back_runaway_serfs"), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_follow_spy"), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_capture_enemy_hero"), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_lend_companion"), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_capture_conspirators"), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_defend_nobles_against_peasants"), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_incriminate_loyal_commander"), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_hunt_down_raiders"), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_capture_prisoners"), ## (try_end), ## #Enemy lord quests ## (try_begin), ## (check_quest_active, "qst_lend_surgeon"), ## (try_end), ## #Kingdom lady quests ## (try_begin), ## (check_quest_active, "qst_rescue_lord_by_replace"), ## (quest_get_slot, ":quest_target_troop", "qst_rescue_lord_by_replace", slot_quest_target_troop), ## (troop_slot_eq, ":quest_target_troop", slot_troop_is_prisoner, 0), ## (neg|check_quest_succeeded, "qst_rescue_lord_by_replace"), ## (call_script, "script_abort_quest", "qst_rescue_lord_by_replace"), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_deliver_message_to_prisoner_lord"), ## (try_end), ## (try_begin), ## (check_quest_active, "qst_duel_for_lady"), ## (try_end), ## ]), # script_cf_is_quest_troop # Input: arg1 = troop_no # Output: none (can fail) ("cf_is_quest_troop", [ (store_script_param_1, ":troop_no"), (assign, ":is_quest_troop", 0), (try_for_range, ":cur_quest", all_quests_begin, all_quests_end), (check_quest_active, ":cur_quest"), (quest_get_slot, ":quest_troop_1", ":cur_quest", slot_quest_target_troop), (quest_get_slot, ":quest_troop_2", ":cur_quest", slot_quest_object_troop), (quest_get_slot, ":quest_troop_3", ":cur_quest", slot_quest_giver_troop), (this_or_next|eq, ":quest_troop_1", ":troop_no"), (this_or_next|eq, ":quest_troop_2", ":troop_no"), (eq, ":quest_troop_3", ":troop_no"), (assign, ":is_quest_troop", 1), (try_end), (eq, ":is_quest_troop", 1), ]), ## # script_calculate_team_strength ## # Input: arg1 = team_no ## # Output: strength ## ("calculate_team_strength", ## [ ## (store_script_param_1, ":team_no"), ## (assign, ":total_strength", 0), ## (try_for_agents, ":cur_agent"), ## (agent_get_team, ":agent_team", ":cur_agent"), ## (eq, ":team_no", ":agent_team"), ## (agent_is_human, ":cur_agent"), ## (agent_is_alive, ":cur_agent"), ## ## (agent_get_troop_id, ":cur_troop", ":cur_agent"), ## (store_character_level, ":cur_level", ":cur_troop"), ## (val_add, ":cur_level", 5), ## (try_begin), ## (troop_is_hero, ":cur_troop"), ## (val_add, ":cur_level", 5), ## (try_end), ## (val_add, ":total_strength", ":cur_level"), ## (try_end), ## (assign, reg0, ":total_strength"), ## ]), # script_check_friendly_kills # Input: none # Output: none (changes the morale of the player's party) ("check_friendly_kills", [(get_player_agent_own_troop_kill_count, ":count"), (try_begin), (neq, "$g_player_current_own_troop_kills", ":count"), (val_sub, ":count", "$g_player_current_own_troop_kills"), (val_add, "$g_player_current_own_troop_kills", ":count"), (val_mul, ":count", -1), (call_script, "script_change_player_party_morale", ":count"), (try_end), ]), # script_simulate_retreat # Input: arg1 = players_side_damage, arg2 = enemy_side_damage, s5 = title_string # Output: none ("simulate_retreat", [ (call_script, "script_music_set_situation_with_culture", mtf_sit_killed), (set_show_messages, 0), (store_script_param, ":players_side_damage", 1), (store_script_param, ":enemy_side_damage", 2), (assign, ":players_side_strength", 0), (assign, ":enemy_side_strength", 0), (assign, ":do_calculate", 1), (try_begin), (try_for_agents, ":cur_agent"), (agent_is_human, ":cur_agent"), (agent_is_alive, ":cur_agent"), (agent_set_slot, ":cur_agent", slot_agent_is_alive_before_retreat, 1),#needed for simulation (agent_get_troop_id, ":cur_troop", ":cur_agent"), (store_character_level, ":cur_level", ":cur_troop"), (val_add, ":cur_level", 5), (try_begin), (troop_is_hero, ":cur_troop"), (val_add, ":cur_level", 5), (try_end), (try_begin), (agent_is_ally, ":cur_agent"), (val_add, ":players_side_strength", ":cur_level"), (else_try), (val_add, ":enemy_side_strength", ":cur_level"), (try_end), (try_end), (eq, "$pin_player_fallen", 0), (lt, ":enemy_side_strength", ":players_side_strength"), (assign, ":do_calculate", 0), (try_end), (try_begin), (eq, ":do_calculate", 1), (assign, "$g_last_mission_player_damage", 0), (party_clear, "p_temp_party"), (party_clear, "p_temp_party_2"), (call_script, "script_simulate_battle_with_agents_aux", 0, ":players_side_damage"), (call_script, "script_simulate_battle_with_agents_aux", 1, ":enemy_side_damage"), (assign, ":display_casualties", 0), (try_begin), (gt, "$g_last_mission_player_damage", 0), (assign, ":display_casualties", 1), (assign, reg1, "$g_last_mission_player_damage"), (str_store_string, s12, "str_casualty_display_hp"), (else_try), (str_clear, s12), (try_end), (call_script, "script_print_casualties_to_s0", "p_temp_party", 1), (try_begin), (party_get_num_companion_stacks, ":num_stacks", "p_temp_party"), (gt, ":num_stacks", 0), (assign, ":display_casualties", 1), (try_end), (str_store_string_reg, s10, s0), (call_script, "script_print_casualties_to_s0", "p_temp_party_2", 1), (try_begin), (party_get_num_companion_stacks, ":num_stacks", "p_temp_party_2"), (gt, ":num_stacks", 0), (assign, ":display_casualties", 1), (try_end), (str_store_string_reg, s11, s0), (try_begin), (eq, ":display_casualties", 1), (dialog_box,"str_casualty_display", s5), (try_end), (try_end), (set_show_messages, 1), #Calculating morale penalty (can be between 0-30) (assign, ":ally_casualties", 0), (assign, ":enemy_casualties", 0), (assign, ":total_allies", 0), (try_for_agents, ":cur_agent"), (agent_is_human, ":cur_agent"), (try_begin), (agent_is_ally, ":cur_agent"), (val_add, ":total_allies", 1), (try_begin), (neg|agent_is_alive, ":cur_agent"), (val_add, ":ally_casualties", 1), (try_end), (else_try), (neg|agent_is_alive, ":cur_agent"), (val_add, ":enemy_casualties", 1), (try_end), (try_end), (store_add, ":total_casualties", ":ally_casualties", ":enemy_casualties"), (try_begin), (gt, ":total_casualties", 0), (store_mul, ":morale_adder", ":ally_casualties", 100), (val_div, ":morale_adder", ":total_casualties"), (val_mul, ":morale_adder", ":ally_casualties"), (val_div, ":morale_adder", ":total_allies"), (val_mul, ":morale_adder", -30), (val_div, ":morale_adder", 100), (call_script, "script_change_player_party_morale", ":morale_adder"), (try_end), ]), # script_simulate_battle_with_agents_aux # For internal use only # Input: arg1 = attacker_side (0 = ally, 1 = enemy), arg2 = damage amount # Output: none ("simulate_battle_with_agents_aux", [ (store_script_param_1, ":attacker_side"), (store_script_param_2, ":damage"), (get_player_agent_no, ":player_agent"), (try_for_agents, ":cur_agent"), (neq, ":player_agent", ":cur_agent"), (agent_is_human, ":cur_agent"), #do not check agent_is_alive, check slot_agent_is_alive_before_retreat instead, so that dead agents can still hit enemies (agent_slot_eq, ":cur_agent", slot_agent_is_alive_before_retreat, 1), (try_begin), (agent_is_ally, ":cur_agent"), (assign, ":cur_agents_side", 0), (else_try), (assign, ":cur_agents_side", 1), (try_end), (eq, ":cur_agents_side", ":attacker_side"), (agent_get_position, pos2, ":cur_agent"), (assign, ":closest_agent", -1), (assign, ":min_distance", 100000), (try_for_agents, ":cur_agent_2"), (agent_is_human, ":cur_agent_2"), (agent_is_alive, ":cur_agent_2"), (try_begin), (agent_is_ally, ":cur_agent_2"), (assign, ":cur_agents_side_2", 0), (else_try), (assign, ":cur_agents_side_2", 1), (try_end), (this_or_next|neq, ":cur_agent_2", ":player_agent"), (eq, "$pin_player_fallen", 0), (neq, ":attacker_side", ":cur_agents_side_2"), (agent_get_position, pos3, ":cur_agent_2"), (get_distance_between_positions, ":cur_distance", pos2, pos3), (lt, ":cur_distance", ":min_distance"), (assign, ":min_distance", ":cur_distance"), (assign, ":closest_agent", ":cur_agent_2"), (try_end), (ge, ":closest_agent", 0), #Fight (agent_get_class, ":agent_class", ":cur_agent"), (assign, ":agents_speed", 1), (assign, ":agents_additional_hit", 0), (try_begin), (eq, ":agent_class", grc_archers), (assign, ":agents_additional_hit", 2), (else_try), (eq, ":agent_class", grc_cavalry), (assign, ":agents_speed", 2), (try_end), (agent_get_class, ":agent_class", ":closest_agent"), (assign, ":agents_speed_2", 1), (try_begin), (eq, ":agent_class", grc_cavalry), (assign, ":agents_speed_2", 2), (try_end), (assign, ":agents_hit", 18000), (val_add, ":min_distance", 3000), (val_div, ":agents_hit", ":min_distance"), (val_mul, ":agents_hit", 2),# max 10, min 2 hits within 150 meters (val_mul, ":agents_hit", ":agents_speed"), (val_div, ":agents_hit", ":agents_speed_2"), (val_add, ":agents_hit", ":agents_additional_hit"), (assign, ":cur_damage", ":damage"), (agent_get_troop_id, ":closest_troop", ":closest_agent"), (agent_get_troop_id, ":cur_troop", ":cur_agent"), (store_character_level, ":closest_level", ":closest_troop"), (store_character_level, ":cur_level", ":cur_troop"), (store_sub, ":level_dif", ":cur_level", ":closest_level"), (val_div, ":level_dif", 5), (val_add, ":cur_damage", ":level_dif"), (try_begin), (eq, ":closest_agent", ":player_agent"), (val_div, ":cur_damage", 2), (store_agent_hit_points, ":init_player_hit_points", ":player_agent", 1), (try_end), (try_for_range, ":unused", 0, ":agents_hit"), (store_random_in_range, ":random_damage", 0, 100), (lt, ":random_damage", ":cur_damage"), (agent_deliver_damage_to_agent, ":cur_agent", ":closest_agent"), (try_end), (try_begin), (eq, ":closest_agent", ":player_agent"), (store_agent_hit_points, ":final_player_hit_points", ":player_agent", 1), (store_sub, ":hit_points_difference", ":init_player_hit_points", ":final_player_hit_points"), (val_add, "$g_last_mission_player_damage", ":hit_points_difference"), (try_end), (neg|agent_is_alive, ":closest_agent"), (try_begin), (eq, ":attacker_side", 1), (party_add_members, "p_temp_party", ":closest_troop", 1), (try_begin), (agent_is_wounded, ":closest_agent"), (party_wound_members, "p_temp_party", ":closest_troop", 1), (try_end), (else_try), (party_add_members, "p_temp_party_2", ":closest_troop", 1), (try_begin), (agent_is_wounded, ":closest_agent"), (party_wound_members, "p_temp_party_2", ":closest_troop", 1), (try_end), (try_end), (try_end), ]), # script_map_get_random_position_around_position_within_range # Input: arg1 = minimum_distance in km, arg2 = maximum_distance in km, pos1 = origin position # Output: pos2 = result position ("map_get_random_position_around_position_within_range", [ (store_script_param_1, ":min_distance"), (store_script_param_2, ":max_distance"), (val_mul, ":min_distance", 100), (assign, ":continue", 1), (try_for_range, ":unused", 0, 20), (eq, ":continue", 1), (map_get_random_position_around_position, pos2, pos1, ":max_distance"), (get_distance_between_positions, ":distance", pos2, pos1), (ge, ":distance", ":min_distance"), (assign, ":continue", 0), (try_end), ]), # script_get_number_of_unclaimed_centers_by_player # Input: none # Output: reg0 = number of unclaimed centers, reg1 = last unclaimed center_no ("get_number_of_unclaimed_centers_by_player", [ (assign, ":unclaimed_centers", 0), (assign, reg1, -1), (try_for_range, ":center_no", centers_begin, centers_end), (store_faction_of_party, ":faction_no", ":center_no"), (eq, ":faction_no", "fac_player_supporters_faction"), (party_slot_eq, ":center_no", slot_town_claimed_by_player, 0), (party_get_num_companion_stacks, ":num_stacks", ":center_no"), (ge, ":num_stacks", 1), #castle is garrisoned (assign, reg1, ":center_no"), (val_add, ":unclaimed_centers", 1), (try_end), (assign, reg0, ":unclaimed_centers"), ]), # script_troop_count_number_of_enemy_troops # Input: arg1 = troop_no # Output: reg0 = number_of_enemy_troops ("troop_count_number_of_enemy_troops", [ (store_script_param_1, ":troop_no"), (assign, ":enemy_count", 0), (try_for_range, ":i_enemy_slot", slot_troop_enemies_begin, slot_troop_enemies_end), (troop_slot_ge, ":troop_no", ":i_enemy_slot", 1), (val_add, ":enemy_count", 1), (try_end), (assign, reg0, ":enemy_count"), ]), # script_cf_troop_check_troop_is_enemy # Input: arg1 = troop_no, arg2 = checked_troop_no # Output: none (Can fail) ("cf_troop_check_troop_is_enemy", [ (store_script_param_1, ":troop_no"), (store_script_param_2, ":checked_troop_no"), (assign, ":result", 0), (try_for_range, ":i_enemy_slot", slot_troop_enemies_begin, slot_troop_enemies_end), (troop_slot_eq, ":troop_no", ":i_enemy_slot", ":checked_troop_no"), (assign, ":result", 1), (try_end), (eq, ":result", 1), ]), # script_troop_get_leaded_center_with_index # Input: arg1 = troop_no, arg2 = center index within range between zero and the number of centers that troop owns # Output: reg0 = center_no ("troop_get_leaded_center_with_index", [ (store_script_param_1, ":troop_no"), (store_script_param_2, ":random_center"), (assign, ":result", -1), (assign, ":center_count", 0), (try_for_range, ":center_no", centers_begin, centers_end), (eq, ":result", -1), (party_slot_eq, ":center_no", slot_town_lord, ":troop_no"), (val_add, ":center_count", 1), (gt, ":center_count", ":random_center"), (assign, ":result", ":center_no"), (try_end), (assign, reg0, ":result"), ]), # script_cf_troop_get_random_leaded_walled_center_with_less_strength_priority # Input: arg1 = troop_no, arg2 = preferred_center_no # Output: reg0 = center_no (Can fail) ("cf_troop_get_random_leaded_walled_center_with_less_strength_priority", [ (store_script_param, ":troop_no", 1), (store_script_param, ":preferred_center_no", 2), (assign, ":num_centers", 0), (try_for_range, ":center_no", walled_centers_begin, walled_centers_end), (party_slot_eq, ":center_no", slot_town_lord, ":troop_no"), (party_slot_eq, ":center_no", slot_center_is_besieged_by, -1), (val_add, ":num_centers", 1), (try_begin), (eq, ":center_no", ":preferred_center_no"), (val_add, ":num_centers", 99), (try_end), ## (call_script, "script_party_calculate_regular_strength", ":center_no"), ## (assign, ":strength", reg0), ## (lt, ":strength", 80), ## (store_sub, ":strength", 100, ":strength"), ## (val_div, ":strength", 20), ## (val_add, ":num_centers", ":strength"), (try_end), (gt, ":num_centers", 0), (store_random_in_range, ":random_center", 0, ":num_centers"), (assign, ":result", -1), (try_for_range, ":center_no", walled_centers_begin, walled_centers_end), (eq, ":result", -1), (party_slot_eq, ":center_no", slot_town_lord, ":troop_no"), (party_slot_eq, ":center_no", slot_center_is_besieged_by, -1), (val_sub, ":random_center", 1), (try_begin), (eq, ":center_no", ":preferred_center_no"), (val_sub, ":random_center", 99), (try_end), ## (try_begin), ## (call_script, "script_party_calculate_regular_strength", ":center_no"), ## (assign, ":strength", reg0), ## (lt, ":strength", 80), ## (store_sub, ":strength", 100, ":strength"), ## (val_div, ":strength", 20), ## (val_sub, ":random_center", ":strength"), ## (try_end), (lt, ":random_center", 0), (assign, ":result", ":center_no"), (try_end), (assign, reg0, ":result"), ]), # script_cf_troop_get_random_leaded_town_or_village_except_center # Input: arg1 = troop_no, arg2 = except_center_no # Output: reg0 = center_no (Can fail) ("cf_troop_get_random_leaded_town_or_village_except_center", [ (store_script_param_1, ":troop_no"), (store_script_param_2, ":except_center_no"), (assign, ":num_centers", 0), (try_for_range, ":center_no", centers_begin, centers_end), (neg|party_slot_eq, ":center_no", slot_party_type, spt_castle), (party_slot_eq, ":center_no", slot_town_lord, ":troop_no"), (neq, ":center_no", ":except_center_no"), (val_add, ":num_centers", 1), (try_end), (gt, ":num_centers", 0), (store_random_in_range, ":random_center", 0, ":num_centers"), (assign, ":end_cond", centers_end), (try_for_range, ":center_no", centers_begin, ":end_cond"), (neg|party_slot_eq, ":center_no", slot_party_type, spt_castle), (party_slot_eq, ":center_no", slot_town_lord, ":troop_no"), (neq, ":center_no", ":except_center_no"), (val_sub, ":random_center", 1), (lt, ":random_center", 0), (assign, ":target_center", ":center_no"), (assign, ":end_cond", 0), (try_end), (assign, reg0, ":target_center"), ]), # script_troop_write_owned_centers_to_s2 # Input: arg1 = troop_no # Output: none ("troop_write_owned_centers_to_s2", [ (store_script_param_1, ":troop_no"), (call_script, "script_get_number_of_hero_centers", ":troop_no"), (assign, ":no_centers", reg0), (str_store_troop_name, s5, ":troop_no"), (try_begin), (gt, ":no_centers", 1), (try_for_range, ":i_center", 1, ":no_centers"), (call_script, "script_troop_get_leaded_center_with_index", ":troop_no", ":i_center"), (str_store_party_name_link, s50, reg0), (try_begin), (eq, ":i_center", 1), (call_script, "script_troop_get_leaded_center_with_index", ":troop_no", 0), (str_store_party_name_link, s51, reg0), (str_store_string, s51, "str_s50_and_s51"), (else_try), (str_store_string, s51, "str_s50_comma_s51"), (try_end), (try_end), (str_store_string, s2, "str_s5_is_the_ruler_of_s51"), (else_try), (eq, ":no_centers", 1), (call_script, "script_troop_get_leaded_center_with_index", ":troop_no", 0), (str_store_party_name_link, s51, reg0), (str_store_string, s2, "str_s5_is_the_ruler_of_s51"), (else_try), (store_troop_faction, ":faction_no", ":troop_no"), (str_store_faction_name_link, s6, ":faction_no"), (str_store_string, s2, "str_s5_is_a_nobleman_of_s6"), (try_end), ]), # script_troop_write_family_relations_to_s1 # Input: arg1 = troop_no # Output: none ("troop_write_family_relations_to_s1", [ (store_script_param_1, ":troop_no"), (assign, ":num_family", 0), (try_for_range, ":slot_no", slot_troop_family_begin, slot_troop_family_end), (troop_slot_ge, ":troop_no", ":slot_no", 1), (val_add, ":num_family", 1), (try_end), (troop_get_type, ":gender", ":troop_no"), (try_begin), (eq, ":gender", 0), (str_store_string, s5, "str_he"), (else_try), (str_store_string, s5, "str_she"), (try_end), (try_begin), (gt, ":num_family", 1), (try_for_range, ":i_family", 1, ":num_family"), (call_script, "script_write_family_relation_as_s3s_s2_to_s4", ":troop_no", ":i_family"), (str_store_string_reg, s50, s4), (try_begin), (eq, ":i_family", 1), (call_script, "script_write_family_relation_as_s3s_s2_to_s4", ":troop_no", 0), (str_store_string_reg, s51, s4), (str_store_string, s51, "str_s50_and_s51"), (else_try), (str_store_string, s51, "str_s50_comma_s51"), (try_end), (try_end), (str_store_string, s1, "str_s5_is_s51"), (else_try), (eq, ":num_family", 1), (call_script, "script_write_family_relation_as_s3s_s2_to_s4", ":troop_no", 0), (str_store_string_reg, s51, s4), (str_store_string, s1, "str_s5_is_s51"), (else_try), (str_store_string, s1, "str_blank_string"), (try_end), ]), # script_write_family_relation_as_s3s_s2_to_s4 # Inputs: arg1 = troop_no, arg2 = family_no (valid slot no after slot_troop_family_begin) # Outputs: s50 = s3s_s2 text ("write_family_relation_as_s3s_s2_to_s4", [ (store_script_param_1, ":troop_no"), (store_script_param_2, ":family_no"), (troop_get_type, ":gender", ":troop_no"), (assign, ":slot_no", slot_troop_family_begin), (try_for_range, ":unused", slot_troop_family_begin, slot_troop_family_end), (this_or_next|gt, ":family_no", 0), (troop_slot_eq, ":troop_no", ":slot_no", 0), (try_begin), (troop_slot_ge, ":troop_no", ":slot_no", 1), (val_sub, ":family_no", 1), (try_end), (val_add, ":slot_no", 1), (try_end), (try_begin), (eq, ":slot_no", slot_troop_spouse), (try_begin), (eq, ":gender", 0), (str_store_string, s2, "str_husband"), (else_try), (str_store_string, s2, "str_wife"), (try_end), (else_try), (this_or_next|eq, ":slot_no", slot_troop_son), (eq, ":slot_no", slot_troop_daughter), (try_begin), (eq, ":gender", 0), (str_store_string, s2, "str_father"), (else_try), (str_store_string, s2, "str_mother"), (try_end), (else_try), (this_or_next|eq, ":slot_no", slot_troop_father), (eq, ":slot_no", slot_troop_mother), (try_begin), (eq, ":gender", 0), (str_store_string, s2, "str_son"), (else_try), (str_store_string, s2, "str_daughter"), (try_end), (else_try), (eq, ":slot_no", slot_troop_sibling), (try_begin), (eq, ":gender", 0), (str_store_string, s2, "str_brother"), (else_try), (str_store_string, s2, "str_sister"), (try_end), (try_end), (troop_get_slot, ":cur_family", ":troop_no", ":slot_no"), (str_store_troop_name_link, s3, ":cur_family"), (str_store_string, s4, "str_s3s_s2"), ]), # script_complete_family_relations # Inputs: none # Outputs: none ("complete_family_relations", [ #Completing family relations (try_for_range, ":troop_id", heroes_begin, heroes_end), (troop_get_type, ":troop_gender", ":troop_id"), (try_begin), (troop_get_slot, ":cur_spouse", ":troop_id", slot_troop_spouse), (gt, ":cur_spouse", 0), (troop_set_slot, ":cur_spouse", slot_troop_spouse, ":troop_id"), #Adding children from troop to new spouse (troop_get_slot, ":cur_daughter", ":troop_id", slot_troop_daughter), (troop_get_slot, ":cur_son", ":troop_id", slot_troop_son), (try_begin), (gt, ":cur_daughter", 0), (troop_set_slot, ":cur_spouse", slot_troop_daughter, ":cur_daughter"), (try_end), (try_begin), (gt, ":cur_son", 0), (troop_set_slot, ":cur_spouse", slot_troop_son, ":cur_son"), (try_end), #Adding children from new spouse to troop (troop_get_slot, ":cur_daughter", ":cur_spouse", slot_troop_daughter), (troop_get_slot, ":cur_son", ":cur_spouse", slot_troop_son), (try_begin), (gt, ":cur_daughter", 0), (troop_set_slot, ":troop_id", slot_troop_daughter, ":cur_daughter"), (try_end), (try_begin), (gt, ":cur_son", 0), (troop_set_slot, ":troop_id", slot_troop_son, ":cur_son"), (try_end), (try_end), (try_begin), (troop_get_slot, ":cur_sibling", ":troop_id", slot_troop_sibling), (gt, ":cur_sibling", 0), (troop_set_slot, ":cur_sibling", slot_troop_sibling, ":troop_id"), #Adding parents from troop to new sibling (troop_get_slot, ":cur_mother", ":troop_id", slot_troop_mother), (troop_get_slot, ":cur_father", ":troop_id", slot_troop_father), (try_begin), (gt, ":cur_mother", 0), (troop_set_slot, ":cur_sibling", slot_troop_mother, ":cur_mother"), (try_end), (try_begin), (gt, ":cur_father", 0), (troop_set_slot, ":cur_sibling", slot_troop_father, ":cur_father"), (try_end), #Adding parents from new sibling to troop (troop_get_slot, ":cur_mother", ":cur_sibling", slot_troop_mother), (troop_get_slot, ":cur_father", ":cur_sibling", slot_troop_father), (try_begin), (gt, ":cur_mother", 0), (troop_set_slot, ":troop_id", slot_troop_mother, ":cur_mother"), (try_end), (try_begin), (gt, ":cur_father", 0), (troop_set_slot, ":troop_id", slot_troop_father, ":cur_father"), (try_end), (try_end), (try_begin), (troop_get_slot, ":cur_child", ":troop_id", slot_troop_son), (gt, ":cur_child", 0), (try_begin), (eq, ":troop_gender", 0), (troop_set_slot, ":cur_child", slot_troop_father, ":troop_id"), (else_try), (troop_set_slot, ":cur_child", slot_troop_mother, ":troop_id"), (try_end), #Adding mother/father and sibling from troop to new son (troop_get_slot, ":cur_mother_father", ":troop_id", slot_troop_spouse), (troop_get_slot, ":cur_sibling", ":troop_id", slot_troop_daughter), (try_begin), (gt, ":cur_mother_father", 0), (try_begin), (eq, ":troop_gender", 1), (troop_set_slot, ":cur_child", slot_troop_father, ":cur_mother_father"), (else_try), (troop_set_slot, ":cur_child", slot_troop_mother, ":cur_mother_father"), (try_end), (try_end), (try_begin), (gt, ":cur_sibling", 0), (troop_set_slot, ":cur_child", slot_troop_sibling, ":cur_sibling"), (try_end), #Adding son/daughter and spouse from new son to troop (try_begin), (eq, ":troop_gender", 0), (troop_get_slot, ":cur_spouse", ":cur_child", slot_troop_mother), (else_try), (troop_get_slot, ":cur_spouse", ":cur_child", slot_troop_father), (try_end), (troop_get_slot, ":cur_daughter", ":cur_child", slot_troop_sibling), (try_begin), (gt, ":cur_spouse", 0), (troop_set_slot, ":troop_id", slot_troop_spouse, ":cur_spouse"), (try_end), (try_begin), (gt, ":cur_daughter", 0), (troop_set_slot, ":troop_id", slot_troop_daughter, ":cur_daughter"), (try_end), (try_end), (try_begin), (troop_get_slot, ":cur_child", ":troop_id", slot_troop_daughter), (gt, ":cur_child", 0), (try_begin), (eq, ":troop_gender", 0), (troop_set_slot, ":cur_child", slot_troop_father, ":troop_id"), (else_try), (troop_set_slot, ":cur_child", slot_troop_mother, ":troop_id"), (try_end), #Adding mother/father and sibling from troop to new daughter (troop_get_slot, ":cur_mother_father", ":troop_id", slot_troop_spouse), (troop_get_slot, ":cur_sibling", ":troop_id", slot_troop_son), (try_begin), (gt, ":cur_mother_father", 0), (try_begin), (eq, ":troop_gender", 1), (troop_set_slot, ":cur_child", slot_troop_father, ":cur_mother_father"), (else_try), (troop_set_slot, ":cur_child", slot_troop_mother, ":cur_mother_father"), (try_end), (try_end), (try_begin), (gt, ":cur_sibling", 0), (troop_set_slot, ":cur_child", slot_troop_sibling, ":cur_sibling"), (try_end), #Adding son/daughter and spouse from new daughter to troop (try_begin), (eq, ":troop_gender", 0), (troop_get_slot, ":cur_spouse", ":cur_child", slot_troop_mother), (else_try), (troop_get_slot, ":cur_spouse", ":cur_child", slot_troop_father), (try_end), (troop_get_slot, ":cur_son", ":cur_child", slot_troop_sibling), (try_begin), (gt, ":cur_spouse", 0), (troop_set_slot, ":troop_id", slot_troop_spouse, ":cur_spouse"), (try_end), (try_begin), (gt, ":cur_son", 0), (troop_set_slot, ":troop_id", slot_troop_son, ":cur_son"), (try_end), (try_end), (try_begin), (troop_get_slot, ":cur_father", ":troop_id", slot_troop_father), (gt, ":cur_father", 0), (try_begin), (eq, ":troop_gender", 0), (troop_set_slot, ":cur_father", slot_troop_son, ":troop_id"), (else_try), (troop_set_slot, ":cur_father", slot_troop_daughter, ":troop_id"), (try_end), #Adding son/daughter and spouse from troop to new father (troop_get_slot, ":cur_spouse", ":troop_id", slot_troop_mother), (troop_get_slot, ":cur_son_daughter", ":troop_id", slot_troop_sibling), (try_begin), (gt, ":cur_spouse", 0), (troop_set_slot, ":cur_father", slot_troop_spouse, ":cur_spouse"), (try_end), (try_begin), (gt, ":cur_son_daughter", 0), (try_begin), (eq, ":troop_gender", 0), (troop_set_slot, ":cur_father", slot_troop_daughter, ":cur_son_daughter"), (else_try), (troop_set_slot, ":cur_father", slot_troop_son, ":cur_son_daughter"), (try_end), (try_end), #Adding mother/father and sibling from new father to troop (try_begin), (eq, ":troop_gender", 0), (troop_get_slot, ":cur_sibling", ":cur_father", slot_troop_daughter), (else_try), (troop_get_slot, ":cur_sibling", ":cur_father", slot_troop_son), (try_end), (troop_get_slot, ":cur_mother", ":cur_father", slot_troop_spouse), (try_begin), (gt, ":cur_sibling", 0), (troop_set_slot, ":troop_id", slot_troop_sibling, ":cur_sibling"), (try_end), (try_begin), (gt, ":cur_mother", 0), (troop_set_slot, ":troop_id", slot_troop_mother, ":cur_mother"), (try_end), (try_end), (try_begin), (troop_get_slot, ":cur_mother", ":troop_id", slot_troop_mother), (gt, ":cur_mother", 0), (try_begin), (eq, ":troop_gender", 0), (troop_set_slot, ":cur_mother", slot_troop_son, ":troop_id"), (else_try), (troop_set_slot, ":cur_mother", slot_troop_daughter, ":troop_id"), (try_end), #Adding son/daughter and spouse from troop to new mother (troop_get_slot, ":cur_spouse", ":troop_id", slot_troop_father), (troop_get_slot, ":cur_son_daughter", ":troop_id", slot_troop_sibling), (try_begin), (gt, ":cur_spouse", 0), (troop_set_slot, ":cur_mother", slot_troop_spouse, ":cur_spouse"), (try_end), (try_begin), (gt, ":cur_son_daughter", 0), (try_begin), (eq, ":troop_gender", 0), (troop_set_slot, ":cur_mother", slot_troop_daughter, ":cur_son_daughter"), (else_try), (troop_set_slot, ":cur_mother", slot_troop_son, ":cur_son_daughter"), (try_end), (try_end), #Adding mother/father and sibling from new mother to troop (try_begin), (eq, ":troop_gender", 0), (troop_get_slot, ":cur_sibling", ":cur_mother", slot_troop_daughter), (else_try), (troop_get_slot, ":cur_sibling", ":cur_mother", slot_troop_son), (try_end), (troop_get_slot, ":cur_father", ":cur_mother", slot_troop_spouse), (try_begin), (gt, ":cur_sibling", 0), (troop_set_slot, ":troop_id", slot_troop_sibling, ":cur_sibling"), (try_end), (try_begin), (gt, ":cur_father", 0), (troop_set_slot, ":troop_id", slot_troop_father, ":cur_father"), (try_end), (try_end), (try_end), ]), # script_collect_friendly_parties # Fills the party p_collective_friends with the members of parties attached to main_party and ally_party_no ("collect_friendly_parties", [ (party_collect_attachments_to_party, "p_main_party", "p_collective_friends"), (try_begin), (gt, "$g_ally_party", 0), (party_collect_attachments_to_party, "$g_ally_party", "p_temp_party"), (assign, "$g_move_heroes", 1), (call_script, "script_party_add_party", "p_collective_friends", "p_temp_party"), (try_end), ]), # script_encounter_calculate_fit # Input: arg1 = troop_no # Output: none ("encounter_calculate_fit", [ # (assign, "$g_enemy_fit_for_battle_old", "$g_enemy_fit_for_battle"), # (assign, "$g_friend_fit_for_battle_old", "$g_friend_fit_for_battle"), # (assign, "$g_main_party_fit_for_battle_old", "$g_main_party_fit_for_battle"), (call_script, "script_party_count_fit_for_battle", "p_main_party"), # (assign, "$g_main_party_fit_for_battle", reg(0)), (call_script, "script_collect_friendly_parties"), (call_script, "script_party_count_fit_for_battle", "p_collective_friends"), (assign, "$g_friend_fit_for_battle", reg(0)), (party_clear, "p_collective_ally"), (try_begin), (gt, "$g_ally_party", 0), (party_is_active, "$g_ally_party"), (party_collect_attachments_to_party, "$g_ally_party", "p_collective_ally"), # (call_script, "script_party_count_fit_for_battle", "p_collective_ally"), # (val_add, "$g_friend_fit_for_battle", reg(0)), (try_end), (party_clear, "p_collective_enemy"), (try_begin), (party_is_active, "$g_enemy_party"), (party_collect_attachments_to_party, "$g_enemy_party", "p_collective_enemy"), (try_end), (call_script, "script_party_count_fit_for_battle", "p_collective_enemy"), (assign, "$g_enemy_fit_for_battle", reg(0)), (assign, reg11, "$g_enemy_fit_for_battle"), (assign, reg10, "$g_friend_fit_for_battle"), ]), # script_encounter_init_variables # Input: arg1 = troop_no # Output: none ("encounter_init_variables", [ (assign, "$capture_screen_shown", 0), (assign, "$loot_screen_shown", 0), (assign, "$thanked_by_ally_leader", 0), (assign, "$g_battle_result", 0), (assign, "$cant_leave_encounter", 0), (assign, "$cant_talk_to_enemy", 0), (assign, "$last_defeated_hero", 0), (assign, "$last_freed_hero", 0), (call_script, "script_encounter_calculate_fit"), (call_script, "script_party_copy", "p_main_party_backup", "p_main_party"), (call_script, "script_party_calculate_strength", "p_main_party", 0), (assign, "$g_starting_strength_main_party", reg0), (call_script, "script_party_copy", "p_encountered_party_backup", "p_collective_enemy"), (call_script, "script_party_calculate_strength", "p_collective_enemy", 0), (assign, "$g_starting_strength_enemy_party", reg0), # (assign, "$g_starting_strength_ally_party", 0), (assign, "$g_strength_contribution_of_player", 100), (call_script, "script_party_copy", "p_collective_friends_backup", "p_collective_friends"), (call_script, "script_party_calculate_strength", "p_collective_friends", 0), (assign, "$g_starting_strength_friends", reg0), (store_mul, "$g_strength_contribution_of_player","$g_starting_strength_main_party", 100), # reduce contribution if we are helping someone. (val_div, "$g_strength_contribution_of_player","$g_starting_strength_friends"), # (try_begin), # (gt, "$g_ally_party", 0), # (call_script, "script_party_copy", "p_ally_party_backup", "p_collective_ally"), # (call_script, "script_party_calculate_strength", "p_collective_ally"), # (assign, "$g_starting_strength_ally_party", reg0), # (store_add, ":starting_strength_factor_combined","$g_starting_strength_ally_party","$g_starting_strength_main_party"), # (store_mul, "$g_strength_contribution_of_player","$g_starting_strength_main_party", 80), #reduce contribution if we are helping someone. # (val_div, "$g_strength_contribution_of_player",":starting_strength_factor_combined"), # (try_end), ]), # script_calculate_renown_value # Input: arg1 = troop_no # Output: fills $battle_renown_value ("calculate_renown_value", [ (call_script, "script_party_calculate_strength", "p_main_party", 0), (assign, ":main_party_strength", reg0), (call_script, "script_party_calculate_strength", "p_collective_enemy", 0), (assign, ":enemy_strength", reg0), (call_script, "script_party_calculate_strength", "p_collective_friends", 0), (assign, ":friends_strength", reg0), (val_add, ":friends_strength", 1), (store_mul, ":enemy_strength_ratio", ":enemy_strength", 100), (val_div, ":enemy_strength_ratio", ":friends_strength"), (assign, ":renown_val", ":enemy_strength"), (val_mul, ":renown_val", ":enemy_strength_ratio"), (val_div, ":renown_val", 100), (val_mul, ":renown_val", ":main_party_strength"), (val_div, ":renown_val",":friends_strength"), (store_div, "$battle_renown_value", ":renown_val", 5), (val_min, "$battle_renown_value", 2500), (convert_to_fixed_point, "$battle_renown_value"), (store_sqrt, "$battle_renown_value", "$battle_renown_value"), (convert_from_fixed_point, "$battle_renown_value"), (assign, reg8, "$battle_renown_value"), (display_message, "@Renown value for this battle is {reg8}.",0xFFFFFFFF), ]), ## # script_calculate_weekly_wage_for_player ## # Input: none ## # Output: none ## ("calculate_weekly_wage_for_player", ## [ ## (call_script, "script_calculate_weekly_party_wage", "p_main_party"), ## (assign, ":result", reg0), ## (try_for_parties, ":party_no"), ## (store_faction_of_party, ":party_faction", ":party_no"), ## (eq, ":party_faction", "fac_player_supporters_faction"), ## (call_script, "script_calculate_weekly_party_wage", ":party_no"), ## (val_add, ":result", reg0), ## (try_end), ## (assign, reg0, ":result"), ## ]), # script_get_first_agent_with_troop_id # Input: arg1 = troop_no # Output: agent_id ("cf_get_first_agent_with_troop_id", [ (store_script_param_1, ":troop_no"), # (store_script_param_2, ":agent_no_to_begin_searching_after"), (assign, ":result", -1), (try_for_agents, ":cur_agent"), (eq, ":result", -1), ## (try_begin), ## (eq, ":cur_agent", ":agent_no_to_begin_searching_after"), ## (assign, ":agent_no_to_begin_searching_after", -1), ## (try_end), ## (eq, ":agent_no_to_begin_searching_after", -1), (agent_get_troop_id, ":cur_troop_no", ":cur_agent"), (eq, ":cur_troop_no", ":troop_no"), (assign, ":result", ":cur_agent"), (try_end), (assign, reg0, ":result"), (neq, reg0, -1), ]), # script_cf_team_get_average_position_of_agents_with_type_to_pos1 # Input: arg1 = team_no, arg2 = class_no (grc_everyone, grc_infantry, grc_cavalry, grc_archers, grc_heroes) # Output: none, pos1 = average_position (0,0,0 if there are no matching agents) ("cf_team_get_average_position_of_agents_with_type_to_pos1", [ (store_script_param_1, ":team_no"), (store_script_param_2, ":class_no"), (assign, ":total_pos_x", 0), (assign, ":total_pos_y", 0), (assign, ":total_pos_z", 0), (assign, ":num_agents", 0), (set_fixed_point_multiplier, 100), (try_for_agents, ":cur_agent"), (agent_is_alive, ":cur_agent"), (agent_is_human, ":cur_agent"), (agent_get_team, ":cur_team_no", ":cur_agent"), (eq, ":cur_team_no", ":team_no"), (agent_get_class, ":cur_class_no", ":cur_agent"), (this_or_next|eq, ":class_no", grc_everyone), (eq, ":class_no", ":cur_class_no"), (agent_get_position, pos1, ":cur_agent"), (position_get_x, ":cur_pos_x", pos1), (val_add, ":total_pos_x", ":cur_pos_x"), (position_get_y, ":cur_pos_y", pos1), (val_add, ":total_pos_y", ":cur_pos_y"), (position_get_z, ":cur_pos_z", pos1), (val_add, ":total_pos_z", ":cur_pos_z"), (val_add, ":num_agents", 1), (try_end), (gt, ":num_agents", 1), (val_div, ":total_pos_x", ":num_agents"), (val_div, ":total_pos_y", ":num_agents"), (val_div, ":total_pos_z", ":num_agents"), (init_position, pos1), (position_move_x, pos1, ":total_pos_x"), (position_move_y, pos1, ":total_pos_y"), (position_move_z, pos1, ":total_pos_z"), ]), # script_cf_turn_windmill_fans # Input: arg1 = instance_no (none = 0) # Output: none ("cf_turn_windmill_fans", [(store_script_param_1, ":instance_no"), (scene_prop_get_instance, ":windmill_fan_object", "spr_windmill_fan_turning", ":instance_no"), (ge, ":windmill_fan_object", 0), (prop_instance_get_position, pos1, ":windmill_fan_object"), (position_rotate_y, pos1, 10), (prop_instance_animate_to_position, ":windmill_fan_object", pos1, 100), (val_add, ":instance_no", 1), (call_script, "script_cf_turn_windmill_fans", ":instance_no"), ]), # script_print_party_members # Input: arg1 = party_no # Output: s51 = output string. "noone" if the party is empty ("print_party_members", [(store_script_param_1, ":party_no"), (party_get_num_companion_stacks, ":num_stacks",":party_no"), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop",":party_no",":i_stack"), (troop_is_hero, ":stack_troop"), (try_begin), (eq, ":i_stack", 0), (str_store_troop_name, s51, ":stack_troop"), (try_end), (str_store_troop_name, s50, ":stack_troop"), (try_begin), (eq, ":i_stack", 1), (str_store_string, s51, "str_s50_and_s51"), (else_try), (gt, ":i_stack", 1), (str_store_string, s51, "str_s50_comma_s51"), (try_end), (try_end), (try_begin), (eq, ":num_stacks", 0), (str_store_string, s51, "str_noone"), (try_end), ]), # script_round_value # Input: arg1 = value # Output: reg0 = rounded_value ("round_value", [ (store_script_param_1, ":value"), (try_begin), (lt, ":value", 100), (neq, ":value", 0), (val_add, ":value", 5), (val_div, ":value", 10), (val_mul, ":value", 10), (try_begin), (eq, ":value", 0), (assign, ":value", 5), (try_end), (else_try), (lt, ":value", 300), (val_add, ":value", 25), (val_div, ":value", 50), (val_mul, ":value", 50), (else_try), (val_add, ":value", 50), (val_div, ":value", 100), (val_mul, ":value", 100), (try_end), (assign, reg0, ":value"), ]), ## # script_print_productions_above_or_below_50 ## # Input: arg1 = center_no, arg2 = sign of the production, 1 if produced goods, -1 if consumed goods ## # Output: s51 = output string. "nothing" if there are no productions above or below 50 ## ("print_productions_above_or_below_50", ## [(store_script_param_1, ":center_no"), ## (store_script_param_2, ":sign"), ## (store_sub, ":item_to_slot", slot_town_trade_good_productions_begin, trade_goods_begin), ## (assign, ":cur_print_index", 0), ## (try_for_range, ":cur_goods", trade_goods_begin, trade_goods_end), ## (store_add, ":cur_good_slot", ":cur_goods", ":item_to_slot"), ## (party_get_slot, ":cur_production", ":center_no", ":cur_good_slot"), ## (val_mul, ":cur_production", ":sign"), ## (ge, ":cur_production", 50), ## (try_begin), ## (eq, ":cur_print_index", 0), ## (str_store_item_name, s51, ":cur_goods"), ## (try_end), ## (str_store_item_name, s50, ":cur_goods"), ## (try_begin), ## (eq, ":cur_print_index", 1), ## (str_store_string, s51, "str_s50_and_s51"), ## (else_try), ## (gt, ":cur_print_index", 1), ## (str_store_string, s51, "str_s50_comma_s51"), ## (try_end), ## (val_add, ":cur_print_index", 1), ## (try_end), ## (try_begin), ## (eq, ":cur_print_index", 0), ## (str_store_string, s51, "str_nothing"), ## (try_end), ## ]), # script_change_banners_and_chest # Input: none # Output: none ("change_banners_and_chest", [(party_get_slot, ":cur_leader", "$g_encountered_party", slot_town_lord), (try_begin), (ge, ":cur_leader", 0), #normal_banner_begin (troop_get_slot, ":troop_banner_object", ":cur_leader", slot_troop_banner_scene_prop), (gt, ":troop_banner_object", 0), (replace_scene_props, banner_scene_props_begin, ":troop_banner_object"), (else_try), (replace_scene_props, banner_scene_props_begin, "spr_empty"), #custom_banner_begin # (troop_get_slot, ":flag_spr", ":cur_leader", slot_troop_custom_banner_flag_type), # (ge, ":flag_spr", 0), # (val_add, ":flag_spr", custom_banner_flag_scene_props_begin), # (replace_scene_props, banner_scene_props_begin, ":flag_spr"), # (else_try), # (replace_scene_props, banner_scene_props_begin, "spr_empty"), (try_end), (try_begin), (neq, ":cur_leader", "trp_player"), (replace_scene_props, "spr_player_chest", "spr_locked_player_chest"), (try_end), ]), # script_remove_siege_objects # Input: none # Output: none ("remove_siege_objects", [ (replace_scene_props, "spr_battlement_a_destroyed", "spr_battlement_a"), (replace_scene_props, "spr_snowy_castle_battlement_a_destroyed", "spr_snowy_castle_battlement_a"), (replace_scene_props, "spr_castle_e_battlement_a_destroyed", "spr_castle_e_battlement_a"), (replace_scene_props, "spr_castle_battlement_a_destroyed", "spr_castle_battlement_a"), (replace_scene_props, "spr_castle_battlement_b_destroyed", "spr_castle_battlement_b"), (replace_scene_props, "spr_earth_wall_a2", "spr_earth_wall_a"), (replace_scene_props, "spr_earth_wall_b2", "spr_earth_wall_b"), (replace_scene_props, "spr_belfry_platform_b", "spr_empty"), (replace_scene_props, "spr_belfry_platform_a", "spr_empty"), (replace_scene_props, "spr_belfry_a", "spr_empty"), (replace_scene_props, "spr_belfry_wheel", "spr_empty"), (replace_scene_props, "spr_siege_ladder_12m", "spr_empty"), (replace_scene_props, "spr_siege_ladder_14m", "spr_empty"), (replace_scene_props, "spr_mangonel", "spr_empty"), (replace_scene_props, "spr_trebuchet_old", "spr_empty"), (replace_scene_props, "spr_trebuchet_new", "spr_empty"), (replace_scene_props, "spr_stone_ball", "spr_empty"), (replace_scene_props, "spr_Village_fire_big", "spr_empty"), ]), # script_describe_relation_to_s63 # Input: arg1 = relation (-100 .. 100) # Output: none ("describe_relation_to_s63", [(store_script_param_1, ":relation"), (store_add, ":normalized_relation", ":relation", 100), (val_add, ":normalized_relation", 5), (store_div, ":str_offset", ":normalized_relation", 10), (val_clamp, ":str_offset", 0, 20), (store_add, ":str_id", "str_relation_mnus_100", ":str_offset"), (str_store_string, s63, ":str_id"), ]), # script_describe_center_relation_to_s3 # Input: arg1 = relation (-100 .. 100) # Output: none ("describe_center_relation_to_s3", [(store_script_param_1, ":relation"), (store_add, ":normalized_relation", ":relation", 100), (val_add, ":normalized_relation", 5), (store_div, ":str_offset", ":normalized_relation", 10), (val_clamp, ":str_offset", 0, 20), (store_add, ":str_id", "str_center_relation_mnus_100", ":str_offset"), (str_store_string, s3, ":str_id"), ]), # script_center_ambiance_sounds # Input: none # Output: none # to be called every two seconds ("center_ambiance_sounds", [ (assign, ":sound_1", -1), (assign, ":sound_2", -1), (assign, ":sound_3", -1), (assign, ":sound_4", -1), (assign, ":sound_5", -1), (try_begin), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_village), (try_begin), (neg|is_currently_night), (assign, ":sound_3", "snd_distant_dog_bark"), (assign, ":sound_3", "snd_distant_chicken"), (else_try), (assign, ":sound_1", "snd_distant_dog_bark"), (assign, ":sound_2", "snd_distant_owl"), (try_end), (else_try), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_town), (try_begin), (neg|is_currently_night), (assign, ":sound_1", "snd_distant_carpenter"), (assign, ":sound_2", "snd_distant_blacksmith"), (assign, ":sound_3", "snd_distant_dog_bark"), (else_try), (assign, ":sound_1", "snd_distant_dog_bark"), (try_end), (try_end), (try_begin), (store_random_in_range, ":r", 0, 7), (try_begin), (eq, ":r", 1), (ge, ":sound_1", 0), (play_sound, ":sound_1"), (else_try), (eq, ":r", 2), (ge, ":sound_2", 0), (play_sound, ":sound_2"), (else_try), (eq, ":r", 3), (ge, ":sound_3", 0), (play_sound, ":sound_3"), (else_try), (eq, ":r", 4), (ge, ":sound_4", 0), (play_sound, ":sound_4"), (else_try), (eq, ":r", 5), (ge, ":sound_5", 0), (play_sound, ":sound_5"), (try_end), (try_end), ]), # script_center_set_walker_to_type # Input: arg1 = center_no, arg2 = walker_no, arg3 = walker_type, # Output: none ("center_set_walker_to_type", [ (store_script_param, ":center_no", 1), (store_script_param, ":walker_no", 2), (store_script_param, ":walker_type", 3), (store_add, ":type_slot", slot_center_walker_0_type, ":walker_no"), (party_set_slot, ":center_no", ":type_slot", ":walker_type"), (try_begin), (party_slot_eq, ":center_no", slot_party_type, spt_village), (store_random_in_range, ":walker_troop_id", village_walkers_begin, village_walkers_end), (else_try), (store_random_in_range, ":walker_troop_id", town_walkers_begin, town_walkers_end), (try_end), (try_begin), (eq,":walker_type",walkert_spy), (assign,":original_walker",":walker_troop_id"), (val_add,":walker_troop_id",4), # select spy troop id # restore spy inventory (try_for_range,":item_no","itm_horse_meat","itm_wooden_stick"), (store_item_kind_count,":num_items",":item_no",":original_walker"), (ge,":num_items",1), (store_item_kind_count,":num_items",":item_no",":walker_troop_id"), (lt,":num_items",1), (troop_add_items,":walker_troop_id",":item_no",1), (try_end), # determine spy recognition item (store_random_in_range,":spy_item_type",itp_type_head_armor,itp_type_hand_armor), (assign,":num",0), (try_for_range,":item_no","itm_horse_meat","itm_wooden_stick"), (store_item_kind_count,":num_items",":item_no",":walker_troop_id"), (ge,":num_items",1), (item_get_type, ":itp", ":item_no"), (eq,":itp",":spy_item_type"), (val_add,":num",1), (troop_remove_items,":walker_troop_id",":item_no",":num_items"), (try_end), (store_random_in_range,":random_item",0,":num"), (assign,":num",-1), (try_for_range,":item_no","itm_horse_meat","itm_wooden_stick"), (store_item_kind_count,":num_items",":item_no",":original_walker"), (ge,":num_items",1), (item_get_type, ":itp", ":item_no"), (eq,":itp",":spy_item_type"), (val_add,":num",1), (eq,":num",":random_item"), (troop_add_items,":walker_troop_id",":item_no",1), (assign,":spy_item",":item_no"), (try_end), (assign,"$spy_item_worn",":spy_item"), (assign,"$spy_quest_troop",":walker_troop_id"), (troop_equip_items,":walker_troop_id"), (try_end), (store_add, ":troop_slot", slot_center_walker_0_troop, ":walker_no"), (party_set_slot, ":center_no", ":troop_slot", ":walker_troop_id"), (store_random_in_range, ":walker_dna", 0, 1000000), (store_add, ":dna_slot", slot_center_walker_0_dna, ":walker_no"), (party_set_slot, ":center_no", ":dna_slot", ":walker_dna"), ]), # script_cf_center_get_free_walker # Input: arg1 = center_no # Output: reg0 = walker no (can fail) ("cf_center_get_free_walker", [ (store_script_param, ":center_no", 1), (assign, ":num_free_walkers", 0), (try_for_range, ":walker_no", 0, num_town_walkers), (store_add, ":type_slot", slot_center_walker_0_type, ":walker_no"), (party_slot_eq, ":center_no", ":type_slot", walkert_default), (val_add, ":num_free_walkers", 1), (try_end), (gt, ":num_free_walkers", 0), (assign, reg0, -1), (store_random_in_range, ":random_rank", 0, ":num_free_walkers"), (try_for_range, ":walker_no", 0, num_town_walkers), (store_add, ":type_slot", slot_center_walker_0_type, ":walker_no"), (party_slot_eq, ":center_no", ":type_slot", walkert_default), (val_sub, ":num_free_walkers", 1), (eq, ":num_free_walkers", ":random_rank"), (assign, reg0, ":walker_no"), (try_end), ]), # script_center_remove_walker_type_from_walkers # Input: arg1 = center_no, arg2 = walker_type, # Output: reg0 = 1 if comment found, 0 otherwise; s61 will contain comment string if found ("center_remove_walker_type_from_walkers", [ (store_script_param, ":center_no", 1), (store_script_param, ":walker_type", 2), (try_for_range, ":walker_no", 0, num_town_walkers), (store_add, ":type_slot", slot_center_walker_0_type, ":walker_no"), (party_slot_eq, ":center_no", ":type_slot", ":walker_type"), (call_script, "script_center_set_walker_to_type", ":center_no", ":walker_no", walkert_default), (try_end), ]), # script_init_town_walkers # Input: none # Output: none ("init_town_walkers", [(try_begin), (eq, "$town_nighttime", 0), (try_for_range, ":walker_no", 0, num_town_walkers), (store_add, ":troop_slot", slot_center_walker_0_troop, ":walker_no"), (party_get_slot, ":walker_troop_id", "$current_town", ":troop_slot"), (gt, ":walker_troop_id", 0), (store_add, ":entry_no", town_walker_entries_start, ":walker_no"), (set_visitor, ":entry_no", ":walker_troop_id"), (try_end), ## (try_for_range, ":cur_walker", 0, 8), ## (try_begin), ## (lt, ":cur_walker", ":num_walkers"), ## (store_random_in_range, ":walker_troop", town_walkers_begin, town_walkers_end), ## (else_try), ## (assign, ":walker_troop", -1), ## (try_end), ## (try_begin), ## (eq, ":cur_walker", 0), ## (assign, reg0, ":walker_troop"), ## (else_try), ## (eq, ":cur_walker", 1), ## (assign, reg1, ":walker_troop"), ## (else_try), ## (eq, ":cur_walker", 2), ## (assign, reg2, ":walker_troop"), ## (else_try), ## (eq, ":cur_walker", 3), ## (assign, reg3, ":walker_troop"), ## (else_try), ## (eq, ":cur_walker", 4), ## (assign, reg4, ":walker_troop"), ## (else_try), ## (eq, ":cur_walker", 5), ## (assign, reg5, ":walker_troop"), ## (else_try), ## (eq, ":cur_walker", 6), ## (assign, reg6, ":walker_troop"), ## (else_try), ## (eq, ":cur_walker", 7), ## (assign, reg7, ":walker_troop"), ## (try_end), ## (try_end), ## (shuffle_range, 0, 8), ## (set_visitor, 32, reg0), ## (set_visitor, 33, reg1), ## (set_visitor, 34, reg2), ## (set_visitor, 35, reg3), ## (set_visitor, 36, reg4), ## (set_visitor, 37, reg5), ## (set_visitor, 38, reg6), ## (set_visitor, 39, reg7), ## (try_end), ]), # script_cf_enter_center_location_bandit_check # Input: none # Output: none ("cf_enter_center_location_bandit_check", [ (neq, "$town_nighttime", 0), (party_slot_ge, "$current_town", slot_center_has_bandits, 1), (eq, "$g_defending_against_siege", 0),#Skip if the center is under siege (because of resting) (eq, "$sneaked_into_town", 0),#Skip if sneaked (try_begin), (party_slot_eq, "$current_town", slot_party_type, spt_village), (party_get_slot, ":cur_scene", "$current_town", slot_castle_exterior), (else_try), (party_get_slot, ":cur_scene", "$current_town", slot_town_center), (try_end), (modify_visitors_at_site, ":cur_scene"), (reset_visitors), (party_get_slot, ":bandit_troop", "$current_town", slot_center_has_bandits), (store_character_level, ":level", "trp_player"), (set_jump_mission, "mt_bandits_at_night"), (try_begin), (party_slot_eq, "$current_town", slot_party_type, spt_village), (assign, ":spawn_amount", 2), (store_div, ":level_fac", ":level", 10), (val_add, ":spawn_amount", ":level_fac"), (try_for_range, ":unused", 0, 3), (gt, ":level", 10), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", ":level"), (val_add, ":spawn_amount", 1), (try_end), (set_visitors, 4, ":bandit_troop", ":spawn_amount"), (assign, "$num_center_bandits", ":spawn_amount"), (set_jump_entry, 2), (else_try), (assign, ":spawn_amount", 1), (assign, "$num_center_bandits", 0), (try_begin), (gt, ":level", 15), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", ":level"), (assign, ":spawn_amount", 2), (try_end), (val_add, "$num_center_bandits", ":spawn_amount"), (set_visitors, 11, ":bandit_troop", ":spawn_amount"), (assign, ":spawn_amount", 1), (try_begin), (gt, ":level", 20), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", ":level"), (assign, ":spawn_amount", 2), (try_end), (set_visitors, 27, ":bandit_troop", ":spawn_amount"), (val_add, "$num_center_bandits", ":spawn_amount"), (try_begin), (gt, ":level", 9), (assign, ":spawn_amount", 1), (try_begin), (gt, ":level", 25), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", ":level"), (assign, ":spawn_amount", 2), (try_end), (set_visitors, 28, ":bandit_troop", ":spawn_amount"), (val_add, "$num_center_bandits", ":spawn_amount"), (try_end), (assign, "$town_entered", 1), (assign, "$all_doors_locked", 1), (try_end), (display_message, "@You have run into a trap!", 0xFFFF2222), (display_message, "@You are attacked by a group of bandits!", 0xFFFF2222), (jump_to_scene, ":cur_scene"), (change_screen_mission), ]), # script_init_town_agent # Input: none # Output: none ("init_town_agent", [ (store_script_param, ":agent_no", 1), (agent_get_troop_id, ":troop_no", ":agent_no"), (set_fixed_point_multiplier, 100), (assign, ":stand_animation", -1), (try_begin), (this_or_next|is_between, ":troop_no", armor_merchants_begin, armor_merchants_end), (is_between, ":troop_no", weapon_merchants_begin, weapon_merchants_end), (try_begin), (troop_get_type, ":cur_troop_gender", ":troop_no"), (eq, ":cur_troop_gender", 0), (agent_set_animation, ":agent_no", "anim_stand_townguard"), (else_try), (agent_set_animation, ":agent_no", "anim_stand_townguard"), (end_try), (else_try), (is_between, ":troop_no", kingdom_ladies_begin, kingdom_ladies_end), (assign, ":stand_animation", "anim_stand_lady"), (else_try), (is_between, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (assign, ":stand_animation", "anim_stand_lord"), (else_try), (is_between, ":troop_no", soldiers_begin, soldiers_end), (assign, ":stand_animation", "anim_stand_townguard"), (try_end), (try_begin), (ge, ":stand_animation", 0), (agent_set_stand_animation, ":agent_no", ":stand_animation"), (agent_set_animation, ":agent_no", ":stand_animation"), (store_random_in_range, ":random_no", 0, 100), (agent_set_animation_progress, ":agent_no", ":random_no"), (try_end), ]), # script_init_town_walker_agents # Input: none # Output: none ("init_town_walker_agents", [(assign, ":num_walkers", 0), (try_for_agents, ":cur_agent"), (agent_get_troop_id, ":cur_troop", ":cur_agent"), (is_between, ":cur_troop", walkers_begin, walkers_end), (val_add, ":num_walkers", 1), (agent_get_position, pos1, ":cur_agent"), (try_for_range, ":i_e_p", 9, 40),#Entry points (entry_point_get_position, pos2, ":i_e_p"), (get_distance_between_positions, ":distance", pos1, pos2), (lt, ":distance", 200), (agent_set_slot, ":cur_agent", 0, ":i_e_p"), (try_end), (call_script, "script_set_town_walker_destination", ":cur_agent"), (try_end), ]), # script_agent_get_town_walker_details # This script assumes this is one of town walkers. # Input: agent_id # Output: reg0: town_walker_type, reg1: town_walker_dna ("agent_get_town_walker_details", [(store_script_param, ":agent_no", 1), (agent_get_entry_no, ":entry_no", ":agent_no"), (store_sub, ":walker_no", ":entry_no", town_walker_entries_start), (store_add, ":type_slot", slot_center_walker_0_type, ":walker_no"), (party_get_slot, ":walker_type", "$current_town", ":type_slot"), (store_add, ":dna_slot", slot_center_walker_0_dna, ":walker_no"), (party_get_slot, ":walker_dna", "$current_town", ":dna_slot"), (assign, reg0, ":walker_type"), (assign, reg1, ":walker_dna"), (assign, reg2, ":walker_no"), ]), # script_tick_town_walkers # Input: none # Output: none ("tick_town_walkers", [(try_for_agents, ":cur_agent"), (agent_get_troop_id, ":cur_troop", ":cur_agent"), (is_between, ":cur_troop", walkers_begin, walkers_end), (agent_get_slot, ":target_entry_point", ":cur_agent", 0), (entry_point_get_position, pos1, ":target_entry_point"), (try_begin), (lt, ":target_entry_point", 32), (init_position, pos2), (position_set_y, pos2, 250), (position_transform_position_to_parent, pos1, pos1, pos2), (try_end), (agent_get_position, pos2, ":cur_agent"), (get_distance_between_positions, ":distance", pos1, pos2), (lt, ":distance", 400), (assign, ":random_no", 0), (try_begin), (lt, ":target_entry_point", 32), (store_random_in_range, ":random_no", 0, 100), (try_end), (lt, ":random_no", 20), (call_script, "script_set_town_walker_destination", ":cur_agent"), (try_end), ]), # script_set_town_walker_destination # Input: arg1 = agent_no # Output: none ("set_town_walker_destination", [(store_script_param_1, ":agent_no"), (assign, reg0, 9), (assign, reg1, 10), (assign, reg2, 12), (assign, reg3, 32), (assign, reg4, 33), (assign, reg5, 34), (assign, reg6, 35), (assign, reg7, 36), (assign, reg8, 37), (assign, reg9, 38), (assign, reg10, 39), (try_for_agents, ":cur_agent"), (agent_get_troop_id, ":cur_troop", ":cur_agent"), (is_between, ":cur_troop", walkers_begin, walkers_end), (agent_get_slot, ":target_entry_point", ":cur_agent", 0), (try_begin), (eq, ":target_entry_point", 9), (assign, reg0, 0), (else_try), (eq, ":target_entry_point", 10), (assign, reg1, 0), (else_try), (eq, ":target_entry_point", 12), (assign, reg2, 0), (else_try), (eq, ":target_entry_point", 32), (assign, reg3, 0), (else_try), (eq, ":target_entry_point", 33), (assign, reg4, 0), (else_try), (eq, ":target_entry_point", 34), (assign, reg5, 0), (else_try), (eq, ":target_entry_point", 35), (assign, reg6, 0), (else_try), (eq, ":target_entry_point", 36), (assign, reg7, 0), (else_try), (eq, ":target_entry_point", 37), (assign, reg8, 0), (else_try), (eq, ":target_entry_point", 38), (assign, reg9, 0), (else_try), (eq, ":target_entry_point", 39), (assign, reg10, 0), (try_end), (try_end), (assign, ":try_limit", 100), (assign, ":target_entry_point", 0), (try_for_range, ":unused", 0, ":try_limit"), (shuffle_range, 0, 11), (gt, reg0, 0), (assign, ":target_entry_point", reg0), (assign, ":try_limit", 0), (try_end), (try_begin), (gt, ":target_entry_point", 0), (agent_set_slot, ":agent_no", 0, ":target_entry_point"), (entry_point_get_position, pos1, ":target_entry_point"), (try_begin), (lt, ":target_entry_point", 32), (init_position, pos2), (position_set_y, pos2, 250), (position_transform_position_to_parent, pos1, pos1, pos2), (try_end), (agent_set_scripted_destination, ":agent_no", pos1, 0), (agent_set_speed_limit, ":agent_no", 5), (try_end), ]), # script_town_init_doors # Input: door_state (-1 = closed, 1 = open, 0 = use $town_nighttime) # Output: none (required for siege mission templates) ("town_init_doors", [(store_script_param, ":door_state", 1), (try_begin), (assign, ":continue", 0), (try_begin), (eq, ":door_state", 1), (assign, ":continue", 1), (else_try), (eq, ":door_state", 0), (eq, "$town_nighttime", 0), (assign, ":continue", 1), (try_end), (eq, ":continue", 1),# open doors (assign, ":end_cond", 1), (try_for_range, ":i_instance", 0, ":end_cond"), (scene_prop_get_instance, ":object", "spr_towngate_door_left", ":i_instance"), (ge, ":object", 0), (val_add, ":end_cond", 1), (prop_instance_get_position, pos1, ":object"), (position_rotate_z, pos1, -100), (prop_instance_animate_to_position, ":object", pos1, 1), (try_end), (assign, ":end_cond", 1), (try_for_range, ":i_instance", 0, ":end_cond"), (scene_prop_get_instance, ":object", "spr_towngate_rectangle_door_left", ":i_instance"), (ge, ":object", 0), (val_add, ":end_cond", 1), (prop_instance_get_position, pos1, ":object"), (position_rotate_z, pos1, -80), (prop_instance_animate_to_position, ":object", pos1, 1), (try_end), (assign, ":end_cond", 1), (try_for_range, ":i_instance", 0, ":end_cond"), (scene_prop_get_instance, ":object", "spr_towngate_door_right", ":i_instance"), (ge, ":object", 0), (val_add, ":end_cond", 1), (prop_instance_get_position, pos1, ":object"), (position_rotate_z, pos1, 100), (prop_instance_animate_to_position, ":object", pos1, 1), (try_end), (assign, ":end_cond", 1), (try_for_range, ":i_instance", 0, ":end_cond"), (scene_prop_get_instance, ":object", "spr_towngate_rectangle_door_right", ":i_instance"), (ge, ":object", 0), (val_add, ":end_cond", 1), (prop_instance_get_position, pos1, ":object"), (position_rotate_z, pos1, 80), (prop_instance_animate_to_position, ":object", pos1, 1), (try_end), (try_end), ]), # script_siege_init_ai_and_belfry # Input: none # Output: none (required for siege mission templates) ("siege_init_ai_and_belfry", [(assign, "$cur_belfry_pos", 50), (assign, ":cur_belfry_object_pos", slot_scene_belfry_props_begin), (store_current_scene, ":cur_scene"), #Collecting belfry objects (try_for_range, ":i_belfry_instance", 0, 3), (scene_prop_get_instance, ":belfry_object", "spr_belfry_a", ":i_belfry_instance"), (ge, ":belfry_object", 0), (scene_set_slot, ":cur_scene", ":cur_belfry_object_pos", ":belfry_object"), (val_add, ":cur_belfry_object_pos", 1), (try_end), (try_for_range, ":i_belfry_instance", 0, 3), (scene_prop_get_instance, ":belfry_object", "spr_belfry_platform_a", ":i_belfry_instance"), (ge, ":belfry_object", 0), (scene_set_slot, ":cur_scene", ":cur_belfry_object_pos", ":belfry_object"), (val_add, ":cur_belfry_object_pos", 1), (try_end), (try_for_range, ":i_belfry_instance", 0, 3), (scene_prop_get_instance, ":belfry_object", "spr_belfry_platform_b", ":i_belfry_instance"), (ge, ":belfry_object", 0), (scene_set_slot, ":cur_scene", ":cur_belfry_object_pos", ":belfry_object"), (val_add, ":cur_belfry_object_pos", 1), (try_end), (assign, "$belfry_rotating_objects_begin", ":cur_belfry_object_pos"), (try_for_range, ":i_belfry_instance", 0, 5), (scene_prop_get_instance, ":belfry_object", "spr_belfry_wheel", ":i_belfry_instance"), (ge, ":belfry_object", 0), (scene_set_slot, ":cur_scene", ":cur_belfry_object_pos", ":belfry_object"), (val_add, ":cur_belfry_object_pos", 1), (try_end), (assign, "$last_belfry_object_pos", ":cur_belfry_object_pos"), #Lifting up the platform at the beginning (scene_prop_get_instance, ":belfry_object_to_rotate", "spr_belfry_platform_a", 0), #Moving the belfry objects to their starting position (entry_point_get_position,pos1,55), (entry_point_get_position,pos3,50), (try_for_range, ":i_belfry_object_pos", slot_scene_belfry_props_begin, "$last_belfry_object_pos"), (assign, ":pos_no", pos_belfry_begin), (val_add, ":pos_no", ":i_belfry_object_pos"), (val_sub, ":pos_no", slot_scene_belfry_props_begin), (scene_get_slot, ":cur_belfry_object", ":cur_scene", ":i_belfry_object_pos"), (prop_instance_get_position, pos2, ":cur_belfry_object"), (try_begin), (eq, ":cur_belfry_object", ":belfry_object_to_rotate"), (position_rotate_x, pos2, 90), (try_end), (position_transform_position_to_local, ":pos_no", pos1, pos2), (position_transform_position_to_parent, pos4, pos3, ":pos_no"), (prop_instance_animate_to_position, ":cur_belfry_object", pos4, 1), (try_end), (assign, "$belfry_positioned", 0), (assign, "$belfry_num_slots_positioned", 0), (assign, "$belfry_num_men_pushing", 0), ]), # script_cf_siege_move_belfry # Input: none # Output: none (required for siege mission templates) ("cf_siege_move_belfry", [(neq, "$last_belfry_object_pos", slot_scene_belfry_props_begin), (entry_point_get_position,pos1,50), (entry_point_get_position,pos4,55), (get_distance_between_positions, ":total_distance", pos4, pos1), (store_current_scene, ":cur_scene"), (scene_get_slot, ":first_belfry_object", ":cur_scene", slot_scene_belfry_props_begin), (prop_instance_get_position, pos2, ":first_belfry_object"), (entry_point_get_position,pos1,"$cur_belfry_pos"), (position_transform_position_to_parent, pos3, pos1, pos_belfry_begin), (position_transform_position_to_parent, pos5, pos4, pos_belfry_begin), (get_distance_between_positions, ":cur_distance", pos2, pos3), (get_distance_between_positions, ":distance_left", pos2, pos5), (try_begin), (le, ":cur_distance", 10), (val_add, "$cur_belfry_pos", 1), (entry_point_get_position,pos1,"$cur_belfry_pos"), (position_transform_position_to_parent, pos3, pos1, pos_belfry_begin), (get_distance_between_positions, ":cur_distance", pos2, pos3), (try_end), (neq, "$cur_belfry_pos", 50), (assign, ":base_speed", 20), (store_div, ":slow_range", ":total_distance", 60), (store_sub, ":distance_moved", ":total_distance", ":distance_left"), (try_begin), (lt, ":distance_moved", ":slow_range"), (store_mul, ":base_speed", ":distance_moved", -60), (val_div, ":base_speed", ":slow_range"), (val_add, ":base_speed", 80), (else_try), (lt, ":distance_left", ":slow_range"), (store_mul, ":base_speed", ":distance_left", -60), (val_div, ":base_speed", ":slow_range"), (val_add, ":base_speed", 80), (try_end), (store_mul, ":belfry_speed", ":cur_distance", ":base_speed"), (try_begin), (eq, "$belfry_num_men_pushing", 0), (assign, ":belfry_speed", 1000000), (else_try), (val_div, ":belfry_speed", "$belfry_num_men_pushing"), (try_end), (try_begin), (le, "$cur_belfry_pos", 55), (init_position, pos3), (position_rotate_x, pos3, ":distance_moved"), (scene_get_slot, ":base_belfry_object", ":cur_scene", slot_scene_belfry_props_begin), (prop_instance_get_position, pos4, ":base_belfry_object"), (entry_point_get_position,pos1,"$cur_belfry_pos"), (try_for_range, ":i_belfry_object_pos", slot_scene_belfry_props_begin, "$last_belfry_object_pos"), (scene_get_slot, ":cur_belfry_object", ":cur_scene", ":i_belfry_object_pos"), (try_begin), (ge, ":i_belfry_object_pos", "$belfry_rotating_objects_begin"), (prop_instance_get_starting_position, pos5, ":base_belfry_object"), (prop_instance_get_starting_position, pos6, ":cur_belfry_object"), (position_transform_position_to_local, pos7, pos5, pos6), (position_transform_position_to_parent, pos5, pos4, pos7), (position_transform_position_to_parent, pos6, pos5, pos3), (prop_instance_set_position, ":cur_belfry_object", pos6), (else_try), (assign, ":pos_no", pos_belfry_begin), (val_add, ":pos_no", ":i_belfry_object_pos"), (val_sub, ":pos_no", slot_scene_belfry_props_begin), (position_transform_position_to_parent, pos2, pos1, ":pos_no"), (prop_instance_animate_to_position, ":cur_belfry_object", pos2, ":belfry_speed"), (try_end), (try_end), (try_end), (gt, "$cur_belfry_pos", 55), (assign, "$belfry_positioned", 1), ]), # script_cf_siege_rotate_belfry_platform # Input: none # Output: none (required for siege mission templates) ("cf_siege_rotate_belfry_platform", [(eq, "$belfry_positioned", 1), (scene_prop_get_instance, ":belfry_object", "spr_belfry_platform_a", 0), (prop_instance_get_position, pos1, ":belfry_object"), (position_rotate_x, pos1, -90), (prop_instance_animate_to_position, ":belfry_object", pos1, 400), (assign, "$belfry_positioned", 2), ]), # script_cf_siege_assign_men_to_belfry # Input: none # Output: none (required for siege mission templates) ("cf_siege_assign_men_to_belfry", [ (store_mission_timer_a, ":cur_seconds"), (neq, "$last_belfry_object_pos", slot_scene_belfry_props_begin), (assign, ":end_trigger", 0), (try_begin), (lt, "$belfry_positioned", 3), (get_player_agent_no, ":player_agent"), (store_current_scene, ":cur_scene"), (scene_get_slot, ":first_belfry_object", ":cur_scene", slot_scene_belfry_props_begin), (prop_instance_get_position, pos2, ":first_belfry_object"), (assign, ":slot_1_positioned", 0), (assign, ":slot_2_positioned", 0), (assign, ":slot_3_positioned", 0), (assign, ":slot_4_positioned", 0), (assign, ":slot_5_positioned", 0), (assign, ":slot_6_positioned", 0), (assign, "$belfry_num_slots_positioned", 0), (assign, "$belfry_num_men_pushing", 0), (try_for_agents, ":cur_agent"), (agent_is_alive, ":cur_agent"), (agent_is_human, ":cur_agent"), (try_begin), (agent_get_slot, ":x_pos", ":cur_agent", slot_agent_target_x_pos), (neq, ":x_pos", 0), (agent_get_slot, ":y_pos", ":cur_agent", slot_agent_target_y_pos), (try_begin), (eq, ":x_pos", -600), (try_begin), (eq, ":y_pos", 0), (assign, ":slot_1_positioned", 1), (else_try), (eq, ":y_pos", -200), (assign, ":slot_2_positioned", 1), (else_try), (assign, ":slot_3_positioned", 1), (try_end), (else_try), (try_begin), (eq, ":y_pos", 0), (assign, ":slot_4_positioned", 1), (else_try), (eq, ":y_pos", -200), (assign, ":slot_5_positioned", 1), (else_try), (assign, ":slot_6_positioned", 1), (try_end), (try_end), (val_add, "$belfry_num_slots_positioned", 1), (init_position, pos1), (position_move_x, pos1, ":x_pos"), (position_move_y, pos1, ":y_pos"), (init_position, pos3), (position_move_x, pos3, ":x_pos"), (position_move_y, pos3, -1000), (position_transform_position_to_parent, pos4, pos2, pos1), (position_transform_position_to_parent, pos5, pos2, pos3), (agent_get_position, pos6, ":cur_agent"), (get_distance_between_positions, ":target_distance", pos6, pos4), (get_distance_between_positions, ":waypoint_distance", pos6, pos5), (try_begin), (this_or_next|lt, ":target_distance", ":waypoint_distance"), (lt, ":waypoint_distance", 600), (agent_set_scripted_destination, ":cur_agent", pos4, 1), (else_try), (agent_set_scripted_destination, ":cur_agent", pos5, 1), (try_end), (try_begin), (le, ":target_distance", 300), (val_add, "$belfry_num_men_pushing", 1), (try_end), (else_try), (agent_get_team, ":cur_agent_team", ":cur_agent"), (this_or_next|eq, "$attacker_team", ":cur_agent_team"), ( eq, "$attacker_team_2", ":cur_agent_team"), (try_begin), (gt, ":cur_seconds", 20), (agent_get_position, pos1, ":cur_agent"), (agent_set_scripted_destination, ":cur_agent", pos1, 0), (else_try), (try_begin), (team_get_movement_order, ":order1", "$attacker_team", grc_infantry), (team_get_movement_order, ":order2", "$attacker_team", grc_cavalry), (team_get_movement_order, ":order3", "$attacker_team", grc_archers), (this_or_next|neq, ":order1", mordr_stand_ground), (this_or_next|neq, ":order2", mordr_stand_ground), (neq, ":order3", mordr_stand_ground), (set_show_messages, 0), (team_give_order, "$attacker_team", grc_everyone, mordr_stand_ground), (set_show_messages, 1), (try_end), (try_end), (try_end), (try_end), (try_begin), (lt, "$belfry_num_slots_positioned", 6), (try_for_agents, ":cur_agent"), (agent_is_alive, ":cur_agent"), (agent_get_team, ":cur_agent_team", ":cur_agent"), (this_or_next|eq, "$attacker_team", ":cur_agent_team"), ( eq, "$attacker_team_2", ":cur_agent_team"), (neq, ":player_agent", ":cur_agent"), (agent_get_class, ":agent_class", ":cur_agent"), (this_or_next|eq, ":agent_class", grc_infantry), (eq, ":agent_class", grc_cavalry), (agent_get_slot, ":x_pos", ":cur_agent", 1), (eq, ":x_pos", 0), (assign, ":y_pos", 0), (try_begin), (eq, ":slot_1_positioned", 0), (assign, ":x_pos", -600), (assign, ":y_pos", 0), (val_add, ":slot_1_positioned", 1), (else_try), (eq, ":slot_2_positioned", 0), (assign, ":x_pos", -600), (assign, ":y_pos", -200), (val_add, ":slot_2_positioned", 1), (else_try), (eq, ":slot_3_positioned", 0), (assign, ":x_pos", -600), (assign, ":y_pos", -400), (val_add, ":slot_3_positioned", 1), (else_try), (eq, ":slot_4_positioned", 0), (assign, ":x_pos", 600), (assign, ":y_pos", 0), (val_add, ":slot_4_positioned", 1), (else_try), (eq, ":slot_5_positioned", 0), (assign, ":x_pos", 600), (assign, ":y_pos", -200), (val_add, ":slot_5_positioned", 1), (else_try), (eq, ":slot_6_positioned", 0), (assign, ":x_pos", 600), (assign, ":y_pos", -400), (val_add, ":slot_6_positioned", 1), (try_end), (val_add, "$belfry_num_slots_positioned", 1), (agent_set_slot, ":cur_agent", 1, ":x_pos"), (agent_set_slot, ":cur_agent", 2, ":y_pos"), (try_end), (try_end), (try_begin), (store_mission_timer_a, ":cur_timer"), (gt, ":cur_timer", 20), (lt, "$belfry_num_slots_positioned", 6), (try_for_agents, ":cur_agent"), (agent_is_alive, ":cur_agent"), (agent_get_team, ":cur_agent_team", ":cur_agent"), (this_or_next|eq, "$attacker_team", ":cur_agent_team"), ( eq, "$attacker_team_2", ":cur_agent_team"), (neq, ":player_agent", ":cur_agent"), (agent_get_slot, ":x_pos", ":cur_agent", 1), (eq, ":x_pos", 0), (assign, ":y_pos", 0), (try_begin), (eq, ":slot_1_positioned", 0), (assign, ":x_pos", -600), (assign, ":y_pos", 0), (val_add, ":slot_1_positioned", 1), (else_try), (eq, ":slot_2_positioned", 0), (assign, ":x_pos", -600), (assign, ":y_pos", -200), (val_add, ":slot_2_positioned", 1), (else_try), (eq, ":slot_3_positioned", 0), (assign, ":x_pos", -600), (assign, ":y_pos", -400), (val_add, ":slot_3_positioned", 1), (else_try), (eq, ":slot_4_positioned", 0), (assign, ":x_pos", 600), (assign, ":y_pos", 0), (val_add, ":slot_4_positioned", 1), (else_try), (eq, ":slot_5_positioned", 0), (assign, ":x_pos", 600), (assign, ":y_pos", -200), (val_add, ":slot_5_positioned", 1), (else_try), (eq, ":slot_6_positioned", 0), (assign, ":x_pos", 600), (assign, ":y_pos", -400), (val_add, ":slot_6_positioned", 1), (try_end), (val_add, "$belfry_num_slots_positioned", 1), (agent_set_slot, ":cur_agent", 1, ":x_pos"), (agent_set_slot, ":cur_agent", 2, ":y_pos"), (try_end), (try_end), (else_try), (assign, ":end_trigger", 1), (try_for_agents, ":cur_agent"), (agent_clear_scripted_mode, ":cur_agent"), (try_end), (set_show_messages, 0), (team_give_order, "$attacker_team", grc_everyone, mordr_charge), (set_show_messages, 1), (try_end), (eq, ":end_trigger", 1), ]), # script_siege_move_archers_to_archer_positions # Input: none # Output: none ("siege_move_archers_to_archer_positions", [ (try_for_agents, ":agent_no"), (agent_is_alive, ":agent_no"), (agent_slot_eq, ":agent_no", slot_agent_is_not_reinforcement, 0), (agent_is_defender, ":agent_no"), (agent_get_class, ":agent_class", ":agent_no"), (agent_get_troop_id, ":agent_troop", ":agent_no"), (eq, ":agent_class", grc_archers), (try_begin), (agent_slot_eq, ":agent_no", slot_agent_target_entry_point, 0), (store_random_in_range, ":random_entry_point", 40, 44), (agent_set_slot, ":agent_no", slot_agent_target_entry_point, ":random_entry_point"), (try_end), (try_begin), (agent_get_position, pos0, ":agent_no"), (entry_point_get_position, pos1, ":random_entry_point"), (get_distance_between_positions, ":dist", pos0, pos1), (lt, ":dist", 300), (agent_clear_scripted_mode, ":agent_no"), (agent_set_slot, ":agent_no", slot_agent_is_in_scripted_mode, 0), (agent_set_slot, ":agent_no", slot_agent_is_not_reinforcement, 1), (str_store_troop_name, s1, ":agent_troop"), (assign, reg0, ":agent_no"), # (display_message, "@{s1} ({reg0}) reached pos"), (else_try), (agent_get_simple_behavior, ":agent_sb", ":agent_no"), (agent_get_combat_state, ":agent_cs", ":agent_no"), (this_or_next|eq, ":agent_sb", aisb_ranged), (eq, ":agent_sb", aisb_go_to_pos),#scripted mode (eq, ":agent_cs", 7), # 7 = no visible targets (state for ranged units) (try_begin), (agent_slot_eq, ":agent_no", slot_agent_is_in_scripted_mode, 0), (agent_set_scripted_destination, ":agent_no", pos1, 0), (agent_set_slot, ":agent_no", slot_agent_is_in_scripted_mode, 1), (str_store_troop_name, s1, ":agent_troop"), (assign, reg0, ":agent_no"), # (display_message, "@{s1} ({reg0}) moving to pos"), (try_end), (else_try), (try_begin), (agent_slot_eq, ":agent_no", slot_agent_is_in_scripted_mode, 1), (agent_clear_scripted_mode, ":agent_no"), (agent_set_slot, ":agent_no", slot_agent_is_in_scripted_mode, 0), (str_store_troop_name, s1, ":agent_troop"), (assign, reg0, ":agent_no"), # (display_message, "@{s1} ({reg0}) seeing target or changed mode"), (try_end), (try_end), (try_end), ]), # script_store_movement_order_name_to_s1 # Input: arg1 = team_no, arg2 = class_no # Output: s1 = order_name ("store_movement_order_name_to_s1", [(store_script_param_1, ":team_no"), (store_script_param_2, ":class_no"), (team_get_movement_order, ":cur_order", ":team_no", ":class_no"), (try_begin), (eq, ":cur_order", mordr_hold), (str_store_string, s1, "@Holding"), (else_try), (eq, ":cur_order", mordr_follow), (str_store_string, s1, "@Following"), (else_try), (eq, ":cur_order", mordr_charge), (str_store_string, s1, "@Charging"), (else_try), (eq, ":cur_order", mordr_advance), (str_store_string, s1, "@Advancing"), (else_try), (eq, ":cur_order", mordr_fall_back), (str_store_string, s1, "@Falling Back"), (else_try), (eq, ":cur_order", mordr_stand_closer), (str_store_string, s1, "@Standing Closer"), (else_try), (eq, ":cur_order", mordr_spread_out), (str_store_string, s1, "@Spreading Out"), (else_try), (eq, ":cur_order", mordr_stand_ground), (str_store_string, s1, "@Standing"), (else_try), (str_store_string, s1, "@N/A"), (try_end), ]), # script_store_riding_order_name_to_s1 # Input: arg1 = team_no, arg2 = class_no # Output: s1 = order_name ("store_riding_order_name_to_s1", [(store_script_param_1, ":team_no"), (store_script_param_2, ":class_no"), (team_get_riding_order, ":cur_order", ":team_no", ":class_no"), (try_begin), (eq, ":cur_order", rordr_free), (str_store_string, s1, "@Free"), (else_try), (eq, ":cur_order", rordr_mount), (str_store_string, s1, "@Mount"), (else_try), (eq, ":cur_order", rordr_dismount), (str_store_string, s1, "@Dismount"), (else_try), (str_store_string, s1, "@N/A"), (try_end), ]), # script_store_weapon_usage_order_name_to_s1 # Input: arg1 = team_no, arg2 = class_no # Output: s1 = order_name ("store_weapon_usage_order_name_to_s1", [(store_script_param_1, ":team_no"), (store_script_param_2, ":class_no"), (team_get_weapon_usage_order, ":cur_order", ":team_no", ":class_no"), (team_get_hold_fire_order, ":cur_hold_fire", ":team_no", ":class_no"), (try_begin), (eq, ":cur_order", wordr_use_any_weapon), (eq, ":cur_hold_fire", aordr_fire_at_will), (str_store_string, s1, "@Any Weapon"), (else_try), (eq, ":cur_order", wordr_use_blunt_weapons), (eq, ":cur_hold_fire", aordr_fire_at_will), (str_store_string, s1, "@Blunt Weapons"), (else_try), (eq, ":cur_order", wordr_use_any_weapon), (eq, ":cur_hold_fire", aordr_hold_your_fire), (str_store_string, s1, "str_hold_fire"), (else_try), (eq, ":cur_order", wordr_use_blunt_weapons), (eq, ":cur_hold_fire", aordr_hold_your_fire), (str_store_string, s1, "str_blunt_hold_fire"), (else_try), (str_store_string, s1, "@N/A"), (try_end), ]), # script_team_give_order_from_order_panel # Input: arg1 = leader_agent_no, arg2 = class_no # Output: none ("team_give_order_from_order_panel", [(store_script_param_1, ":leader_agent_no"), (store_script_param_2, ":order"), (agent_get_team, ":team_no", ":leader_agent_no"), (set_show_messages, 0), (try_begin), (eq, "$g_formation_infantry_selected", 1), (team_give_order, ":team_no", grc_infantry, ":order"), (try_end), (try_begin), (eq, "$g_formation_archers_selected", 1), (team_give_order, ":team_no", grc_archers, ":order"), (try_end), (try_begin), (eq, "$g_formation_cavalry_selected", 1), (team_give_order, ":team_no", grc_cavalry, ":order"), (try_end), (try_begin), (eq, ":order", mordr_hold), (agent_get_position, pos1, ":leader_agent_no"), (try_begin), (eq, "$g_formation_infantry_selected", 1), (team_set_order_position, ":team_no", grc_infantry, pos1), (try_end), (try_begin), (eq, "$g_formation_archers_selected", 1), (team_set_order_position, ":team_no", grc_archers, pos1), (try_end), (try_begin), (eq, "$g_formation_cavalry_selected", 1), (team_set_order_position, ":team_no", grc_cavalry, pos1), (try_end), (try_end), (set_show_messages, 1), ]), # script_update_order_panel # Input: arg1 = team_no # Output: none ("update_order_panel", [(store_script_param_1, ":team_no"), (set_fixed_point_multiplier, 1000), (assign, ":old_is_infantry_listening", 0), (try_begin), (class_is_listening_order, ":team_no", grc_infantry), (assign, ":old_is_infantry_listening", 1), (try_end), (assign, ":old_is_archers_listening", 0), (try_begin), (class_is_listening_order, ":team_no", grc_archers), (assign, ":old_is_archers_listening", 1), (try_end), (assign, ":old_is_cavalry_listening", 0), (try_begin), (class_is_listening_order, ":team_no", grc_cavalry), (assign, ":old_is_cavalry_listening", 1), (try_end), (call_script, "script_store_movement_order_name_to_s1", ":team_no", grc_infantry), (overlay_set_text, "$g_presentation_infantry_movement", s1), (call_script, "script_store_riding_order_name_to_s1", ":team_no", grc_infantry), (overlay_set_text, "$g_presentation_infantry_riding", s1), (call_script, "script_store_weapon_usage_order_name_to_s1", ":team_no", grc_infantry), (overlay_set_text, "$g_presentation_infantry_weapon_usage", s1), (call_script, "script_store_movement_order_name_to_s1", ":team_no", grc_archers), (overlay_set_text, "$g_presentation_archers_movement", s1), (call_script, "script_store_riding_order_name_to_s1", ":team_no", grc_archers), (overlay_set_text, "$g_presentation_archers_riding", s1), (call_script, "script_store_weapon_usage_order_name_to_s1", ":team_no", grc_archers), (overlay_set_text, "$g_presentation_archers_weapon_usage", s1), (call_script, "script_store_movement_order_name_to_s1", ":team_no", grc_cavalry), (overlay_set_text, "$g_presentation_cavalry_movement", s1), (call_script, "script_store_riding_order_name_to_s1", ":team_no", grc_cavalry), (overlay_set_text, "$g_presentation_cavalry_riding", s1), (call_script, "script_store_weapon_usage_order_name_to_s1", ":team_no", grc_cavalry), (overlay_set_text, "$g_presentation_cavalry_weapon_usage", s1), (try_begin), (eq, ":old_is_infantry_listening", 1), (eq, ":old_is_archers_listening", 1), (eq, ":old_is_cavalry_listening", 1), (team_set_order_listener, ":team_no", grc_everyone), (else_try), (eq, ":old_is_infantry_listening", 1), (team_set_order_listener, ":team_no", grc_infantry), (else_try), (eq, ":old_is_archers_listening", 1), (team_set_order_listener, ":team_no", grc_archers), (else_try), (eq, ":old_is_cavalry_listening", 1), (team_set_order_listener, ":team_no", grc_cavalry), (try_end), (position_set_y, pos1, 660), (position_set_x, pos1, 250), (overlay_set_position, "$g_presentation_infantry_movement", pos1), (position_set_x, pos1, 400), (overlay_set_position, "$g_presentation_infantry_riding", pos1), (position_set_x, pos1, 550), (overlay_set_position, "$g_presentation_infantry_weapon_usage", pos1), (position_set_y, pos1, 620), (position_set_x, pos1, 250), (overlay_set_position, "$g_presentation_archers_movement", pos1), (position_set_x, pos1, 400), (overlay_set_position, "$g_presentation_archers_riding", pos1), (position_set_x, pos1, 550), (overlay_set_position, "$g_presentation_archers_weapon_usage", pos1), (position_set_y, pos1, 580), (position_set_x, pos1, 250), (overlay_set_position, "$g_presentation_cavalry_movement", pos1), (position_set_x, pos1, 400), (overlay_set_position, "$g_presentation_cavalry_riding", pos1), (position_set_x, pos1, 550), (overlay_set_position, "$g_presentation_cavalry_weapon_usage", pos1), ]), # script_update_agent_position_on_map # Input: arg1 = agent_no, pos2 = map_size_pos # Output: none ("update_agent_position_on_map", [(store_script_param_1, ":agent_no"), (agent_get_slot, ":agent_overlay", ":agent_no", slot_agent_map_overlay_id), (get_player_agent_no, ":player_agent"), (try_begin), (le, ":agent_overlay", 0), (set_fixed_point_multiplier, 1000), (try_begin), (eq, ":agent_no", ":player_agent"), (create_mesh_overlay, reg1, "mesh_player_dot"), (position_set_x, pos1, 500), (position_set_y, pos1, 500), (overlay_set_size, reg1, pos1), (else_try), (create_mesh_overlay, reg1, "mesh_white_dot"), (position_set_x, pos1, 200), (position_set_y, pos1, 200), (overlay_set_size, reg1, pos1), (try_end), (overlay_set_alpha, reg1, 0x88), (agent_set_slot, ":agent_no", slot_agent_map_overlay_id, reg1), (assign, ":agent_overlay", reg1), (try_end), (try_begin), (neq, ":agent_no", ":player_agent"), (agent_get_party_id, ":agent_party", ":agent_no"), ############################### # Changed by Form Ranks kit # (try_begin), (assign, ":continue", 0), (try_for_range, ":i", 1, "$formation_max_array_no"), (store_add, ":slot", slot_party_array_parties_begin, ":i"), (party_get_slot, ":array_party", "p_main_party", ":slot"), (eq, ":array_party", ":agent_party"), (assign, ":continue", 1), (try_end), (this_or_next|eq, ":agent_party", "p_main_party"), (eq, ":continue", 1), # # Change of Form Ranks kit end ############################### (agent_get_class, ":agent_class", ":agent_no"), (try_begin), (eq, ":agent_class", grc_archers), (overlay_set_color, ":agent_overlay", 0x34c6e4), (else_try), (eq, ":agent_class", grc_cavalry), (overlay_set_color, ":agent_overlay", 0x569619), (else_try), #grc_infantry (overlay_set_color, ":agent_overlay", 0x8d5220), (try_end), (else_try), (agent_is_ally, ":agent_no"), (overlay_set_color, ":agent_overlay", 0x5555FF), (else_try), (overlay_set_color, ":agent_overlay", 0xFF0000), (try_end), (try_end), (try_begin), (eq, ":agent_no", ":player_agent"), (agent_get_look_position, pos1, ":agent_no"), (position_get_rotation_around_z, ":rot", pos1), (init_position, pos10), (position_rotate_z, pos10, ":rot"), (overlay_set_mesh_rotation, ":agent_overlay", pos10), (call_script, "script_convert_3d_pos_to_map_pos"), (else_try), (agent_get_position, pos1, ":agent_no"), (call_script, "script_convert_3d_pos_to_map_pos"), (try_end), (overlay_set_position, ":agent_overlay", pos0), ]), # script_convert_3d_pos_to_map_pos # Input: pos1 = 3d_pos, pos2 = map_size_pos # Output: pos0 = map_pos ("convert_3d_pos_to_map_pos", [(set_fixed_point_multiplier, 1000), (position_transform_position_to_local, pos3, pos2, pos1), (position_get_x, ":agent_x_pos", pos3), (position_get_y, ":agent_y_pos", pos3), (val_div, ":agent_x_pos", "$g_battle_map_scale"), (val_div, ":agent_y_pos", "$g_battle_map_scale"), (set_fixed_point_multiplier, 1000), (store_sub, ":map_x", 980, "$g_battle_map_width"), (store_sub, ":map_y", 730, "$g_battle_map_height"), (val_add, ":agent_x_pos", ":map_x"), (val_add, ":agent_y_pos", ":map_y"), (position_set_x, pos0, ":agent_x_pos"), (position_set_y, pos0, ":agent_y_pos"), ]), # further follow-up needed... # script_update_order_flags_on_map # Input: none # Output: none ("update_order_flags_on_map", [(set_fixed_point_multiplier, 1000), (get_player_agent_no, ":player_agent"), (agent_get_team, ":player_team", ":player_agent"), (assign, ":old_is_infantry_listening", 0), (try_begin), (class_is_listening_order, ":player_team", grc_infantry), (assign, ":old_is_infantry_listening", 1), (try_end), (assign, ":old_is_archers_listening", 0), (try_begin), (class_is_listening_order, ":player_team", grc_archers), (assign, ":old_is_archers_listening", 1), (try_end), (assign, ":old_is_cavalry_listening", 0), (try_begin), (class_is_listening_order, ":player_team", grc_cavalry), (assign, ":old_is_cavalry_listening", 1), (try_end), (get_scene_boundaries, pos2, pos3), (team_get_movement_order, ":cur_order", ":player_team", grc_infantry), (try_begin), (eq, ":cur_order", mordr_hold), (team_get_order_position, pos1, ":player_team", grc_infantry), (call_script, "script_convert_3d_pos_to_map_pos"), (overlay_set_alpha, "$g_battle_map_infantry_order_flag", 0xFF), (overlay_set_position, "$g_battle_map_infantry_order_flag", pos0), (else_try), (overlay_set_alpha, "$g_battle_map_infantry_order_flag", 0), (try_end), (team_get_movement_order, ":cur_order", ":player_team", grc_archers), (try_begin), (eq, ":cur_order", mordr_hold), (team_get_order_position, pos1, ":player_team", grc_archers), (call_script, "script_convert_3d_pos_to_map_pos"), (overlay_set_alpha, "$g_battle_map_archers_order_flag", 0xFF), (overlay_set_position, "$g_battle_map_archers_order_flag", pos0), (else_try), (overlay_set_alpha, "$g_battle_map_archers_order_flag", 0), (try_end), (team_get_movement_order, ":cur_order", ":player_team", grc_cavalry), (try_begin), (eq, ":cur_order", mordr_hold), (team_get_order_position, pos1, ":player_team", grc_cavalry), (call_script, "script_convert_3d_pos_to_map_pos"), (overlay_set_alpha, "$g_battle_map_cavalry_order_flag", 0xFF), (overlay_set_position, "$g_battle_map_cavalry_order_flag", pos0), (else_try), (overlay_set_alpha, "$g_battle_map_cavalry_order_flag", 0), (try_end), (try_begin), (eq, ":old_is_infantry_listening", 1), (eq, ":old_is_archers_listening", 1), (eq, ":old_is_cavalry_listening", 1), (team_set_order_listener, ":player_team", grc_everyone), (else_try), (eq, ":old_is_infantry_listening", 1), (team_set_order_listener, ":player_team", grc_infantry), (else_try), (eq, ":old_is_archers_listening", 1), (team_set_order_listener, ":player_team", grc_archers), (else_try), (eq, ":old_is_cavalry_listening", 1), (team_set_order_listener, ":player_team", grc_cavalry), (try_end), ]), # script_update_order_panel_checked_classes # Input: none # Output: none ("update_order_panel_checked_classes", [(get_player_agent_no, ":player_agent"), (agent_get_team, ":player_team", ":player_agent"), (try_begin), (class_is_listening_order, ":player_team", grc_infantry), (overlay_set_val, "$g_presentation_obj_4", 1), (assign, "$g_formation_infantry_selected", 1), (overlay_animate_to_alpha, "$g_presentation_obj_1", 250, 0x44), (else_try), (overlay_set_val, "$g_presentation_obj_4", 0), (assign, "$g_formation_infantry_selected", 0), (overlay_animate_to_alpha, "$g_presentation_obj_1", 250, 0), (try_end), (try_begin), (class_is_listening_order, ":player_team", grc_archers), (overlay_set_val, "$g_presentation_obj_5", 1), (assign, "$g_formation_archers_selected", 1), (overlay_animate_to_alpha, "$g_presentation_obj_2", 250, 0x44), (else_try), (overlay_set_val, "$g_presentation_obj_5", 0), (assign, "$g_formation_archers_selected", 0), (overlay_animate_to_alpha, "$g_presentation_obj_2", 250, 0), (try_end), (try_begin), (class_is_listening_order, ":player_team", grc_cavalry), (overlay_set_val, "$g_presentation_obj_6", 1), (assign, "$g_formation_cavalry_selected", 1), (overlay_animate_to_alpha, "$g_presentation_obj_3", 250, 0x44), (else_try), (overlay_set_val, "$g_presentation_obj_6", 0), (assign, "$g_formation_cavalry_selected", 0), (overlay_animate_to_alpha, "$g_presentation_obj_3", 250, 0), (try_end), ]), # script_update_order_panel_statistics_and_map # Input: none # Output: none ("update_order_panel_statistics_and_map", #TODO: Call this in every battle mission template, once per second [(set_fixed_point_multiplier, 1000), (assign, ":num_us_ready_infantry", 0), (assign, ":num_us_ready_archers", 0), (assign, ":num_us_ready_cavalry", 0), (assign, ":num_us_wounded_infantry", 0), (assign, ":num_us_wounded_archers", 0), (assign, ":num_us_wounded_cavalry", 0), (assign, ":num_us_dead_infantry", 0), (assign, ":num_us_dead_archers", 0), (assign, ":num_us_dead_cavalry", 0), (assign, ":num_allies_ready_men", 0), (assign, ":num_allies_wounded_men", 0), (assign, ":num_allies_dead_men", 0), (assign, ":num_enemies_ready_men", 0), (assign, ":num_enemies_wounded_men", 0), (assign, ":num_enemies_dead_men", 0), (get_player_agent_no, ":player_agent"), (agent_get_team, ":player_team", ":player_agent"), (assign, ":old_is_infantry_listening", 0), (try_begin), (class_is_listening_order, ":player_team", grc_infantry), (assign, ":old_is_infantry_listening", 1), (try_end), (assign, ":old_is_archers_listening", 0), (try_begin), (class_is_listening_order, ":player_team", grc_archers), (assign, ":old_is_archers_listening", 1), (try_end), (assign, ":old_is_cavalry_listening", 0), (try_begin), (class_is_listening_order, ":player_team", grc_cavalry), (assign, ":old_is_cavalry_listening", 1), (try_end), (get_scene_boundaries, pos2, pos3), (try_for_agents,":cur_agent"), (agent_is_human, ":cur_agent"), (agent_get_class, ":agent_class", ":cur_agent"), (agent_get_party_id, ":agent_party", ":cur_agent"), (agent_get_slot, ":agent_overlay", ":cur_agent", slot_agent_map_overlay_id), (try_begin), (eq, ":agent_party", "p_main_party"), (try_begin), (agent_is_alive, ":cur_agent"), (call_script, "script_update_agent_position_on_map", ":cur_agent"), (try_begin), (eq, ":agent_class", grc_archers), (val_add, ":num_us_ready_archers", 1), (else_try), (eq, ":agent_class", grc_cavalry), (val_add, ":num_us_ready_cavalry", 1), (else_try), #infantry (val_add, ":num_us_ready_infantry", 1), (try_end), (else_try), (overlay_set_alpha, ":agent_overlay", 0), (agent_is_wounded, ":cur_agent"), (try_begin), (eq, ":agent_class", grc_archers), (val_add, ":num_us_wounded_archers", 1), (else_try), (eq, ":agent_class", grc_cavalry), (val_add, ":num_us_wounded_cavalry", 1), (else_try), #infantry (val_add, ":num_us_wounded_infantry", 1), (try_end), (else_try), (try_begin), (eq, ":agent_class", grc_archers), (val_add, ":num_us_dead_archers", 1), (else_try), (eq, ":agent_class", grc_cavalry), (val_add, ":num_us_dead_cavalry", 1), (else_try), #infantry (val_add, ":num_us_dead_infantry", 1), (try_end), (try_end), (else_try), (agent_is_ally, ":cur_agent"), (try_begin), (agent_is_alive, ":cur_agent"), (call_script, "script_update_agent_position_on_map", ":cur_agent"), (val_add, ":num_allies_ready_men", 1), (else_try), (overlay_set_alpha, ":agent_overlay", 0), (agent_is_wounded, ":cur_agent"), (val_add, ":num_allies_wounded_men", 1), (else_try), (val_add, ":num_allies_dead_men", 1), (try_end), (else_try), (try_begin), (agent_is_alive, ":cur_agent"), (call_script, "script_update_agent_position_on_map", ":cur_agent"), (val_add, ":num_enemies_ready_men", 1), (else_try), (overlay_set_alpha, ":agent_overlay", 0), (agent_is_wounded, ":cur_agent"), (val_add, ":num_enemies_wounded_men", 1), (else_try), (val_add, ":num_enemies_dead_men", 1), (try_end), (try_end), (try_end), (assign, reg1, ":num_us_ready_infantry"), (assign, reg2, ":num_us_ready_archers"), (assign, reg3, ":num_us_ready_cavalry"), (store_add, ":num_us_ready_men", ":num_us_ready_infantry", ":num_us_ready_archers"), (val_add, ":num_us_ready_men", ":num_us_ready_cavalry"), (store_add, ":num_us_wounded_men", ":num_us_wounded_infantry", ":num_us_wounded_archers"), (val_add, ":num_us_wounded_men", ":num_us_wounded_cavalry"), (store_add, ":num_us_dead_men", ":num_us_dead_infantry", ":num_us_dead_archers"), (val_add, ":num_us_dead_men", ":num_us_dead_cavalry"), (assign, reg4, ":num_us_ready_men"), (assign, reg5, ":num_us_wounded_men"), (assign, reg6, ":num_us_dead_men"), (assign, reg7, ":num_allies_ready_men"), (assign, reg8, ":num_allies_wounded_men"), (assign, reg9, ":num_allies_dead_men"), (assign, reg10, ":num_enemies_ready_men"), (assign, reg11, ":num_enemies_wounded_men"), (assign, reg12, ":num_enemies_dead_men"), (overlay_set_text, "$g_presentation_obj_7", "@Infantry ({reg1})"), (overlay_set_text, "$g_presentation_obj_8", "@Archers ({reg2})"), (overlay_set_text, "$g_presentation_obj_9", "@Cavalry ({reg3})"), (overlay_set_text, "$g_battle_us_ready", "@{reg4}"), (overlay_set_text, "$g_battle_us_wounded", "@{reg5}"), (overlay_set_text, "$g_battle_us_dead", "@{reg6}"), (overlay_set_text, "$g_battle_allies_ready", "@{reg7}"), (overlay_set_text, "$g_battle_allies_wounded", "@{reg8}"), (overlay_set_text, "$g_battle_allies_dead", "@{reg9}"), (overlay_set_text, "$g_battle_enemies_ready", "@{reg10}"), (overlay_set_text, "$g_battle_enemies_wounded", "@{reg11}"), (overlay_set_text, "$g_battle_enemies_dead", "@{reg12}"), (assign, ":stat_position_x", 100), (assign, ":stat_position_y", 100), (val_add, ":stat_position_x", 150), (val_add, ":stat_position_y", 80), (position_set_x, pos1, ":stat_position_x"), (position_set_y, pos1, ":stat_position_y"), (overlay_set_position, "$g_battle_us_ready", pos1), (val_add, ":stat_position_x", 150), (position_set_x, pos1, ":stat_position_x"), (overlay_set_position, "$g_battle_us_wounded", pos1), (val_add, ":stat_position_x", 150), (position_set_x, pos1, ":stat_position_x"), (overlay_set_position, "$g_battle_us_dead", pos1), (val_add, ":stat_position_x", -300), (val_add, ":stat_position_y", -40), (position_set_x, pos1, ":stat_position_x"), (position_set_y, pos1, ":stat_position_y"), (overlay_set_position, "$g_battle_allies_ready", pos1), (val_add, ":stat_position_x", 150), (position_set_x, pos1, ":stat_position_x"), (overlay_set_position, "$g_battle_allies_wounded", pos1), (val_add, ":stat_position_x", 150), (position_set_x, pos1, ":stat_position_x"), (overlay_set_position, "$g_battle_allies_dead", pos1), (val_add, ":stat_position_x", -300), (val_add, ":stat_position_y", -40), (position_set_x, pos1, ":stat_position_x"), (position_set_y, pos1, ":stat_position_y"), (overlay_set_position, "$g_battle_enemies_ready", pos1), (val_add, ":stat_position_x", 150), (position_set_x, pos1, ":stat_position_x"), (overlay_set_position, "$g_battle_enemies_wounded", pos1), (val_add, ":stat_position_x", 150), (position_set_x, pos1, ":stat_position_x"), (overlay_set_position, "$g_battle_enemies_dead", pos1), (call_script, "script_update_order_flags_on_map"), (try_begin), (eq, ":old_is_infantry_listening", 1), (eq, ":old_is_archers_listening", 1), (eq, ":old_is_cavalry_listening", 1), (team_set_order_listener, ":player_team", grc_everyone), (else_try), (eq, ":old_is_infantry_listening", 1), (team_set_order_listener, ":player_team", grc_infantry), (else_try), (eq, ":old_is_archers_listening", 1), (team_set_order_listener, ":player_team", grc_archers), (else_try), (eq, ":old_is_cavalry_listening", 1), (team_set_order_listener, ":player_team", grc_cavalry), (try_end), ]), # script_consume_food # Input: arg1: order of the food to be consumed # Output: none ("consume_food", [(store_script_param, ":selected_food", 1), (troop_get_inventory_capacity, ":capacity", "trp_player"), (try_for_range, ":cur_slot", 0, ":capacity"), (troop_get_inventory_slot, ":cur_item", "trp_player", ":cur_slot"), (is_between, ":cur_item", food_begin, food_end), (troop_get_inventory_slot_modifier, ":item_modifier", "trp_player", ":cur_slot"), (neq, ":item_modifier", imod_rotten), (item_slot_eq, ":cur_item", slot_item_is_checked, 0), (item_set_slot, ":cur_item", slot_item_is_checked, 1), (val_sub, ":selected_food", 1), (lt, ":selected_food", 0), (assign, ":capacity", 0), (troop_inventory_slot_get_item_amount, ":cur_amount", "trp_player", ":cur_slot"), (val_sub, ":cur_amount", 1), (troop_inventory_slot_set_item_amount, "trp_player", ":cur_slot", ":cur_amount"), (try_end), ]), # script_calculate_troop_score_for_center # Input: arg1 = troop_no, arg2 = center_no # Output: reg0 = score ("calculate_troop_score_for_center", [(store_script_param, ":troop_no", 1), (store_script_param, ":center_no", 2), (assign, ":num_center_points", 1), (try_for_range, ":cur_center", centers_begin, centers_end), (assign, ":center_owned", 0), (try_begin), (eq, ":troop_no", "trp_player"), (party_slot_eq, ":cur_center", slot_town_lord, stl_reserved_for_player), (assign, ":center_owned", 1), (try_end), (this_or_next|party_slot_eq, ":cur_center", slot_town_lord, ":troop_no"), (eq, ":center_owned", 1), (try_begin), (party_slot_eq, ":cur_center", slot_party_type, spt_town), (val_add, ":num_center_points", 4), (else_try), (party_slot_eq, ":cur_center", slot_party_type, spt_castle), (val_add, ":num_center_points", 2), (else_try), (val_add, ":num_center_points", 1), (try_end), (try_end), (troop_get_slot, ":troop_renown", ":troop_no", slot_troop_renown), (store_add, ":score", 500, ":troop_renown"), (val_div, ":score", ":num_center_points"), (store_random_in_range, ":random", 50, 100), (val_mul, ":score", ":random"), (try_begin), (party_slot_eq, ":center_no", slot_center_last_taken_by_troop, ":troop_no"), (val_mul, ":score", 3), (val_div, ":score", 2), (try_end), (try_begin), (eq, ":troop_no", "trp_player"), (faction_get_slot, ":faction_leader", "$players_kingdom"), (call_script, "script_troop_get_player_relation", ":faction_leader"), (assign, ":leader_relation", reg0), #(troop_get_slot, ":leader_relation", ":faction_leader", slot_troop_player_relation), (val_mul, ":leader_relation", 2), (val_add, ":score", ":leader_relation"), (try_end), (assign, reg0, ":score"), ]), # script_assign_lords_to_empty_centers # Input: none # Output: none ("assign_lords_to_empty_centers", [(try_for_range, ":cur_center", centers_begin, centers_end), (party_get_slot, ":center_lord", ":cur_center", slot_town_lord), (this_or_next|eq, ":center_lord", stl_unassigned), (eq, ":center_lord", stl_rejected_by_player), (store_faction_of_party, ":center_faction", ":cur_center"), (is_between, ":center_faction", kingdoms_begin, kingdoms_end), (neg|faction_slot_eq, ":center_faction", slot_faction_leader, "trp_player"), (assign, ":best_lord", -1), (assign, ":best_lord_score", -1), (try_begin), (eq, ":center_lord", stl_unassigned), (try_begin), (eq, "$players_kingdom", ":center_faction"), (eq, "$player_has_homage", 1), (assign, ":best_lord", stl_reserved_for_player), (call_script, "script_calculate_troop_score_for_center", "trp_player", ":cur_center"), (assign, ":best_lord_score", reg0), (try_end), (try_end), (try_for_range, ":cur_troop", kingdom_heroes_begin, kingdom_heroes_end), (troop_slot_eq, ":cur_troop", slot_troop_occupation, slto_kingdom_hero), (store_troop_faction, ":troop_faction", ":cur_troop"), (eq, ":troop_faction", ":center_faction"), (call_script, "script_calculate_troop_score_for_center", ":cur_troop", ":cur_center"), (assign, ":score", reg0), (gt, ":score", ":best_lord_score"), (assign, ":best_lord_score", ":score"), (assign, ":best_lord", ":cur_troop"), (try_end), (try_begin), (ge, ":best_lord", 0), (call_script, "script_give_center_to_lord", ":cur_center", ":best_lord", 1), (else_try), (eq, ":best_lord", stl_reserved_for_player), (party_set_slot, ":cur_center", slot_town_lord, stl_reserved_for_player), (try_begin), (party_slot_eq, ":cur_center", slot_party_type, spt_castle), (try_for_range, ":cur_village", villages_begin, villages_end), (party_slot_eq, ":cur_village", slot_village_bound_center, ":cur_center"), (party_set_slot, ":cur_village", slot_town_lord, stl_reserved_for_player), (try_end), (try_end), (try_end), (try_end), ]), # script_create_village_farmer_party # Input: arg1 = village_no # Output: reg0 = party_no ("create_village_farmer_party", [(store_script_param, ":village_no", 1), (party_get_slot, ":town_no", ":village_no", slot_village_market_town), (store_faction_of_party, ":party_faction", ":town_no"), (set_spawn_radius, 0), (spawn_around_party, ":village_no", "pt_village_farmers"), (assign, ":new_party", reg0), (party_set_faction, ":new_party", ":party_faction"), (party_set_slot, ":new_party", slot_party_home_center, ":village_no"), (party_set_slot, ":new_party", slot_party_type, spt_village_farmer), (party_set_slot, ":new_party", slot_party_ai_state, spai_trading_with_town), (party_set_slot, ":new_party", slot_party_ai_object, ":town_no"), (party_set_ai_behavior, ":new_party", ai_bhvr_travel_to_party), (party_set_ai_object, ":new_party", ":town_no"), (party_set_flags, ":new_party", pf_default_behavior, 0), (store_sub, ":item_to_price_slot", slot_town_trade_good_prices_begin, trade_goods_begin), (try_for_range, ":cur_goods", trade_goods_begin, trade_goods_end), (store_add, ":cur_good_price_slot", ":cur_goods", ":item_to_price_slot"), (party_get_slot, ":cur_village_price", ":village_no", ":cur_good_price_slot"), (party_set_slot, ":new_party", ":cur_good_price_slot", ":cur_village_price"), (try_end), (assign, reg0, ":new_party"), ]), #script_do_party_center_trade # INPUT: arg1 = party_no, arg2 = center_no, arg3 = percentage_change_in_center # OUTPUT: reg0 = total_change ("do_party_center_trade", [ (store_script_param, ":party_no", 1), (store_script_param, ":center_no", 2), (store_script_param, ":percentage_change", 3), (assign, ":total_change", 0), (store_sub, ":item_to_price_slot", slot_town_trade_good_prices_begin, trade_goods_begin), (try_for_range, ":cur_good", trade_goods_begin, trade_goods_end), (store_add, ":cur_good_price_slot", ":cur_good", ":item_to_price_slot"), (party_get_slot, ":cur_merchant_price", ":party_no", ":cur_good_price_slot"), (party_get_slot, ":cur_center_price", ":center_no", ":cur_good_price_slot"), (store_sub, ":price_dif", ":cur_merchant_price", ":cur_center_price"), (assign, ":cur_change", ":price_dif"), (val_abs, ":cur_change"), (val_add, ":total_change", ":cur_change"), (val_mul, ":cur_change", ":percentage_change"), (val_div, ":cur_change", 100), (try_begin), (lt, ":price_dif", 0), (val_mul, ":cur_change", -1), (try_end), (val_add, ":cur_center_price", ":cur_change"), (party_set_slot, ":center_no", ":cur_good_price_slot", ":cur_center_price"), (party_set_slot, ":party_no", ":cur_good_price_slot", ":cur_center_price"), (try_end), (assign, reg0, ":total_change"), ]), #script_player_join_faction # INPUT: arg1 = faction_no # OUTPUT: none ("player_join_faction", [ (store_script_param, ":faction_no", 1), (assign,"$players_kingdom",":faction_no"), (faction_set_slot, "fac_player_supporters_faction", slot_faction_ai_state, sfai_default), ## (try_for_range, ":kingdom_hero", kingdom_heroes_begin, kingdom_heroes_end), ## (store_troop_faction, ":kingdom_hero_faction", ":kingdom_hero"), ## (eq, ":kingdom_hero_faction", "fac_player_supporters_faction"), ## (call_script, "script_change_troop_faction", ":kingdom_hero", ":faction_no"), ## (try_end), (assign, "$players_oath_renounced_against_kingdom", 0), (assign, "$players_oath_renounced_given_center", 0), (assign, "$players_oath_renounced_begin_time", 0), (try_for_range,":other_kingdom",kingdoms_begin,kingdoms_end), (faction_slot_eq, ":other_kingdom", slot_faction_state, sfs_active), (neq, ":other_kingdom", "fac_player_supporters_faction"), (try_begin), (neq, ":other_kingdom", ":faction_no"), (store_relation, ":other_kingdom_reln", ":other_kingdom", ":faction_no"), (else_try), (store_relation, ":other_kingdom_reln", "fac_player_supporters_faction", ":other_kingdom"), (val_max, ":other_kingdom_reln", 12), (try_end), (call_script, "script_set_player_relation_with_faction", ":other_kingdom", ":other_kingdom_reln"), (try_end), (try_for_range, ":cur_center", centers_begin, centers_end), #Give center to kingdom if player is the owner (party_slot_eq, ":cur_center", slot_town_lord, "trp_player"), (party_set_faction, ":cur_center", ":faction_no"), (try_end), (try_for_range, ":quest_no", lord_quests_begin, lord_quests_end), (check_quest_active, ":quest_no"), (quest_get_slot, ":quest_giver_troop", ":quest_no", slot_quest_giver_troop), (store_troop_faction, ":quest_giver_faction", ":quest_giver_troop"), (store_relation, ":quest_giver_faction_relation", "fac_player_supporters_faction", ":quest_giver_faction"), (lt, ":quest_giver_faction_relation", 0), (call_script, "script_abort_quest", ":quest_no", 0), (try_end), (try_begin), (neq, ":faction_no", "fac_player_supporters_faction"), (faction_set_slot, "fac_player_supporters_faction", slot_faction_state, sfs_inactive), (faction_set_slot, "fac_player_supporters_faction", slot_faction_leader, "trp_player"), (try_end), (call_script, "script_store_average_center_value_per_faction"), (call_script, "script_update_all_notes"), (assign, "$g_recalculate_ais", 1), ]), #script_player_leave_faction # INPUT: arg1 = give_back_fiefs # OUTPUT: none ("player_leave_faction", [ (store_script_param, ":give_back_fiefs", 1), (call_script, "script_check_and_finish_active_army_quests_for_faction", "$players_kingdom"), (assign, ":old_kingdom", "$players_kingdom"), (assign, ":old_has_homage", "$player_has_homage"), (assign, "$players_kingdom", 0), (assign, "$player_has_homage", 0), (try_begin), (neq, ":give_back_fiefs", 0), (try_for_range, ":cur_center", centers_begin, centers_end), (party_slot_eq, ":cur_center", slot_town_lord, "trp_player"), (call_script, "script_give_center_to_faction", ":cur_center", ":old_kingdom"), (try_end), (else_try), (try_for_range, ":cur_center", centers_begin, centers_end), (party_slot_eq, ":cur_center", slot_town_lord, "trp_player"), (call_script, "script_give_center_to_faction", ":cur_center", "fac_player_supporters_faction"), (try_end), (try_for_range, ":cur_center", villages_begin, villages_end), (party_get_slot, ":cur_bound_center", ":cur_center", slot_village_bound_center), (party_slot_eq, ":cur_center", slot_town_lord, "trp_player"), (neg|party_slot_eq, ":cur_bound_center", slot_town_lord, "trp_player"), (call_script, "script_give_center_to_faction", ":cur_center", ":old_kingdom"), (try_end), (store_relation, ":reln", "fac_player_supporters_faction", ":old_kingdom"), (store_sub, ":req_dif", -40, ":reln"), (call_script, "script_change_player_relation_with_faction", ":old_kingdom", ":req_dif"), (try_end), (try_begin), (eq, ":old_has_homage", 1), (faction_get_slot, ":faction_leader", ":old_kingdom", slot_faction_leader), (call_script, "script_change_player_relation_with_troop", ":faction_leader", -20), (try_end), (call_script, "script_update_all_notes"), (assign, "$g_recalculate_ais", 1), ]), #script_activate_deactivate_player_faction # INPUT: arg1 = last_interaction_with_faction # OUTPUT: none ("activate_deactivate_player_faction", [ (store_script_param, ":last_interaction_with_faction", 1), (try_begin), (assign, ":has_center", 0), (try_for_range, ":cur_center", centers_begin, centers_end), (store_faction_of_party, ":cur_center_faction", ":cur_center"), (eq, ":cur_center_faction", "fac_player_supporters_faction"), (assign, ":has_center", 1), (try_end), (try_begin), (eq, ":has_center", 1), (neg|faction_slot_eq, "fac_player_supporters_faction", slot_faction_state, sfs_active), (faction_set_slot, "fac_player_supporters_faction", slot_faction_state, sfs_active), (faction_set_slot, "fac_player_supporters_faction", slot_faction_leader, "trp_player"), (str_store_faction_name, s1, ":last_interaction_with_faction"), (faction_set_name, "fac_player_supporters_faction", "@{s1} Rebels"), (faction_set_color, "fac_player_supporters_faction", 0xAAAAAA), (assign, "$players_kingdom", "fac_player_supporters_faction"), (assign, "$g_player_banner_granted", 1), (call_script, "script_store_average_center_value_per_faction"), (call_script, "script_update_all_notes"), (call_script, "script_add_notification_menu", "mnu_notification_player_faction_active", 0, 0), (else_try), (eq, ":has_center", 0), (faction_slot_eq, "fac_player_supporters_faction", slot_faction_state, sfs_active), (le, "$supported_pretender", 0), (faction_set_slot, "fac_player_supporters_faction", slot_faction_state, sfs_inactive), (faction_set_slot, "fac_player_supporters_faction", slot_faction_leader, "trp_player"), (assign, "$players_kingdom", 0), (assign, "$players_oath_renounced_against_kingdom", 0), (assign, "$players_oath_renounced_given_center", 0), (assign, "$players_oath_renounced_begin_time", 0), (call_script, "script_store_average_center_value_per_faction"), (call_script, "script_update_all_notes"), (call_script, "script_add_notification_menu", "mnu_notification_player_faction_deactive", 0, 0), (try_end), (try_end), ]), #script_agent_reassign_team # INPUT: arg1 = agent_no # OUTPUT: none ("agent_reassign_team", [ (store_script_param, ":agent_no", 1), (get_player_agent_no, ":player_agent"), (try_begin), (ge, ":player_agent", 0), (agent_is_human, ":agent_no"), (agent_is_ally, ":agent_no"), (agent_get_party_id, ":party_no", ":agent_no"), (neq, ":party_no", "p_main_party"), (assign, ":continue", 1), (store_faction_of_party, ":party_faction", ":party_no"), (try_begin), (eq, ":party_faction", "$players_kingdom"), (is_between, "$players_kingdom", kingdoms_begin, kingdoms_end), (faction_slot_eq, "$players_kingdom", slot_faction_marshall, "trp_player"), (assign, ":continue", 0), (else_try), (party_stack_get_troop_id, ":leader_troop_id", ":party_no", 0), (neg|is_between, ":leader_troop_id", kingdom_heroes_begin, kingdom_heroes_end), (assign, ":continue", 0), (try_end), (eq, ":continue", 1), (agent_get_team, ":player_team", ":player_agent"), (val_add, ":player_team", 2), (agent_set_team, ":agent_no", ":player_team"), (try_end), ]), #script_start_quest # INPUT: arg1 = quest_no, arg2 = giver_troop_no, s2 = description_text # OUTPUT: none ("start_quest", [(store_script_param, ":quest_no", 1), (store_script_param, ":giver_troop_no", 2), (try_begin), (is_between, ":giver_troop_no", kingdom_heroes_begin, kingdom_heroes_end), (str_store_troop_name_link, s62, ":giver_troop_no"), (else_try), (str_store_troop_name, s62, ":giver_troop_no"), (try_end), (str_store_string, s63, "@Given by: {s62}"), (store_current_hours, ":cur_hours"), (str_store_date, s60, ":cur_hours"), (str_store_string, s60, "@Given on: {s60}"), (add_quest_note_from_sreg, ":quest_no", 0, s60, 0), (add_quest_note_from_sreg, ":quest_no", 1, s63, 0), (add_quest_note_from_sreg, ":quest_no", 2, s2, 0), (try_begin), (quest_slot_ge, ":quest_no", slot_quest_expiration_days, 1), (quest_get_slot, reg0, ":quest_no", slot_quest_expiration_days), (add_quest_note_from_sreg, ":quest_no", 7, "@You have {reg0} days to finish this quest.", 0), (try_end), #Adding dont_give_again_for_days value (try_begin), (quest_slot_ge, ":quest_no", slot_quest_dont_give_again_period, 1), (quest_get_slot, ":dont_give_again_period", ":quest_no", slot_quest_dont_give_again_period), (quest_set_slot, ":quest_no", slot_quest_dont_give_again_remaining_days, ":dont_give_again_period"), (try_end), (start_quest, ":quest_no", ":giver_troop_no"), (display_message, "str_quest_log_updated"), ]), #script_conclude_quest # INPUT: arg1 = quest_no # OUTPUT: none ("conclude_quest", [(store_script_param, ":quest_no", 1), (conclude_quest, ":quest_no"), (quest_get_slot, ":quest_giver_troop", ":quest_no", slot_quest_giver_troop), (str_store_troop_name, s59, ":quest_giver_troop"), (add_quest_note_from_sreg, ":quest_no", 7, "@This quest has been concluded. Talk to {s59} to finish it.", 0), ]), #script_succeed_quest # INPUT: arg1 = quest_no # OUTPUT: none ("succeed_quest", [(store_script_param, ":quest_no", 1), (succeed_quest, ":quest_no"), (quest_get_slot, ":quest_giver_troop", ":quest_no", slot_quest_giver_troop), (str_store_troop_name, s59, ":quest_giver_troop"), (add_quest_note_from_sreg, ":quest_no", 7, "@This quest has been successfully completed. Talk to {s59} to claim your reward.", 0), ]), #script_fail_quest # INPUT: arg1 = quest_no # OUTPUT: none ("fail_quest", [(store_script_param, ":quest_no", 1), (fail_quest, ":quest_no"), (quest_get_slot, ":quest_giver_troop", ":quest_no", slot_quest_giver_troop), (str_store_troop_name, s59, ":quest_giver_troop"), (add_quest_note_from_sreg, ":quest_no", 7, "@This quest has failed. Talk to {s59} to explain the situation.", 0), ]), #script_report_quest_troop_positions # INPUT: arg1 = quest_no, arg2 = troop_no, arg3 = note_index # OUTPUT: none ("report_quest_troop_positions", [(store_script_param, ":quest_no", 1), (store_script_param, ":troop_no", 2), (store_script_param, ":note_index", 3), (call_script, "script_get_information_about_troops_position", ":troop_no", 1), (str_store_string, s5, "@At the time quest was given:^{s1}"), (add_quest_note_from_sreg, ":quest_no", ":note_index", s5, 1), (call_script, "script_update_troop_location_notes", ":troop_no", 1), ]), #script_end_quest # INPUT: arg1 = quest_no # OUTPUT: none ("end_quest", [(store_script_param, ":quest_no", 1), (str_clear, s1), (add_quest_note_from_sreg, ":quest_no", 0, s1, 0), (add_quest_note_from_sreg, ":quest_no", 1, s1, 0), (add_quest_note_from_sreg, ":quest_no", 2, s1, 0), (add_quest_note_from_sreg, ":quest_no", 3, s1, 0), (add_quest_note_from_sreg, ":quest_no", 4, s1, 0), (add_quest_note_from_sreg, ":quest_no", 5, s1, 0), (add_quest_note_from_sreg, ":quest_no", 6, s1, 0), (add_quest_note_from_sreg, ":quest_no", 7, s1, 0), (try_begin), (neg|check_quest_failed, ":quest_no"), (val_add, "$g_total_quests_completed", 1), (try_end), (complete_quest, ":quest_no"), (try_begin), (is_between, ":quest_no", mayor_quests_begin, mayor_quests_end), (assign, "$merchant_quest_last_offerer", -1), (assign, "$merchant_offered_quest", -1), (try_end), ]), #script_cancel_quest # INPUT: arg1 = quest_no # OUTPUT: none ("cancel_quest", [(store_script_param, ":quest_no", 1), (str_clear, s1), (add_quest_note_from_sreg, ":quest_no", 0, s1, 0), (add_quest_note_from_sreg, ":quest_no", 1, s1, 0), (add_quest_note_from_sreg, ":quest_no", 2, s1, 0), (add_quest_note_from_sreg, ":quest_no", 3, s1, 0), (add_quest_note_from_sreg, ":quest_no", 4, s1, 0), (add_quest_note_from_sreg, ":quest_no", 5, s1, 0), (add_quest_note_from_sreg, ":quest_no", 6, s1, 0), (add_quest_note_from_sreg, ":quest_no", 7, s1, 0), (cancel_quest, ":quest_no"), (try_begin), (is_between, ":quest_no", mayor_quests_begin, mayor_quests_end), (assign, "$merchant_quest_last_offerer", -1), (assign, "$merchant_offered_quest", -1), (try_end), ]), ## #script_get_available_mercenary_troop_and_amount_of_center ## # INPUT: arg1 = center_no ## # OUTPUT: reg0 = mercenary_troop_type, reg1 = amount ## ("get_available_mercenary_troop_and_amount_of_center", ## [(store_script_param, ":center_no", 1), ## (party_get_slot, ":mercenary_troop", ":center_no", slot_center_mercenary_troop_type), ## (party_get_slot, ":mercenary_amount", ":center_no", slot_center_mercenary_troop_amount), ## (party_get_free_companions_capacity, ":free_capacity", "p_main_party"), ## (val_min, ":mercenary_amount", ":free_capacity"), ## (store_troop_gold, ":cur_gold", "trp_player"), ## (call_script, "script_game_get_join_cost", ":mercenary_troop"), ## (assign, ":join_cost", reg0), ## (try_begin), ## (gt, ":join_cost", 0), ## (val_div, ":cur_gold", ":join_cost"), ## (val_min, ":mercenary_amount", ":cur_gold"), ## (try_end), ## (assign, reg0, ":mercenary_troop"), ## (assign, reg1, ":mercenary_amount"), ## ]), ## #script_update_village_market_towns # INPUT: none # OUTPUT: none ("update_village_market_towns", [(try_for_range, ":cur_village", villages_begin, villages_end), (store_faction_of_party, ":village_faction", ":cur_village"), (assign, ":min_dist", 999999), (assign, ":min_dist_town", -1), (try_for_range, ":cur_town", towns_begin, towns_end), (store_faction_of_party, ":town_faction", ":cur_town"), (eq, ":town_faction", ":village_faction"), (store_distance_to_party_from_party, ":cur_dist", ":cur_village", ":cur_town"), (lt, ":cur_dist", ":min_dist"), (assign, ":min_dist", ":cur_dist"), (assign, ":min_dist_town", ":cur_town"), (try_end), (gt, ":min_dist_town", -1), (party_set_slot, ":cur_village", slot_village_market_town, ":min_dist_town"), (try_end), ]), #script_update_mercenary_units_of_towns # INPUT: none # OUTPUT: none ("update_mercenary_units_of_towns", [(try_for_range, ":town_no", towns_begin, towns_end), (store_random_in_range, ":troop_no", mercenary_troops_begin, mercenary_troops_end), (party_set_slot, ":town_no", slot_center_mercenary_troop_type, ":troop_no"), (store_random_in_range, ":amount", 3, 8), (party_set_slot, ":town_no", slot_center_mercenary_troop_amount, ":amount"), (try_end), ]), #script_update_volunteer_troops_in_village # INPUT: arg1 = center_no # OUTPUT: none ("update_volunteer_troops_in_village", [ (store_script_param, ":center_no", 1), (party_get_slot, ":player_relation", ":center_no", slot_center_player_relation), (party_get_slot, ":center_culture", ":center_no", slot_center_culture), (faction_get_slot, ":volunteer_troop", ":center_culture", slot_faction_tier_1_troop), (assign, ":volunteer_troop_tier", 1), (store_div, ":tier_upgrades", ":player_relation", 10), (try_for_range, ":unused", 0, ":tier_upgrades"), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", 10), (store_random_in_range, ":random_no", 0, 2), (troop_get_upgrade_troop, ":upgrade_troop_no", ":volunteer_troop", ":random_no"), (try_begin), (le, ":upgrade_troop_no", 0), (troop_get_upgrade_troop, ":upgrade_troop_no", ":volunteer_troop", 0), (try_end), (gt, ":upgrade_troop_no", 0), (val_add, ":volunteer_troop_tier", 1), (assign, ":volunteer_troop", ":upgrade_troop_no"), (try_end), (assign, ":upper_limit", 7), (try_begin), (ge, ":player_relation", 5), (assign, ":upper_limit", ":player_relation"), (val_div, ":upper_limit", 2), (val_add, ":upper_limit", 10), (else_try), (lt, ":player_relation", 0), (assign, ":upper_limit", 0), (try_end), (val_mul, ":upper_limit", 3), (store_add, ":amount_random_divider", 2, ":volunteer_troop_tier"), (val_div, ":upper_limit", ":amount_random_divider"), (store_random_in_range, ":amount", 0, ":upper_limit"), (party_set_slot, ":center_no", slot_center_volunteer_troop_type, ":volunteer_troop"), (party_set_slot, ":center_no", slot_center_volunteer_troop_amount, ":amount"), ]), #script_update_npc_volunteer_troops_in_village # INPUT: arg1 = center_no # OUTPUT: none ("update_npc_volunteer_troops_in_village", [ (store_script_param, ":center_no", 1), (party_get_slot, ":center_culture", ":center_no", slot_center_culture), (faction_get_slot, ":volunteer_troop", ":center_culture", slot_faction_tier_1_troop), (assign, ":volunteer_troop_tier", 1), (try_for_range, ":unused", 0, 5), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", 10), (store_random_in_range, ":random_no", 0, 2), (troop_get_upgrade_troop, ":upgrade_troop_no", ":volunteer_troop", ":random_no"), (try_begin), (le, ":upgrade_troop_no", 0), (troop_get_upgrade_troop, ":upgrade_troop_no", ":volunteer_troop", 0), (try_end), (gt, ":upgrade_troop_no", 0), (val_add, ":volunteer_troop_tier", 1), (assign, ":volunteer_troop", ":upgrade_troop_no"), (try_end), (assign, ":upper_limit", 12), (store_add, ":amount_random_divider", 2, ":volunteer_troop_tier"), (val_div, ":upper_limit", ":amount_random_divider"), (store_random_in_range, ":amount", 0, ":upper_limit"), (party_set_slot, ":center_no", slot_center_npc_volunteer_troop_type, ":volunteer_troop"), (party_set_slot, ":center_no", slot_center_npc_volunteer_troop_amount, ":amount"), ]), #script_update_companion_candidates_in_taverns # INPUT: none # OUTPUT: none ("update_companion_candidates_in_taverns", [ (try_for_range, ":troop_no", companions_begin, companions_end), (troop_set_slot, ":troop_no", slot_troop_cur_center, -1), (troop_slot_eq, ":troop_no", slot_troop_occupation, 0), (store_random_in_range, ":town_no", towns_begin, towns_end), (try_begin), (neg|troop_slot_eq, ":troop_no", slot_troop_home, ":town_no"), (neg|troop_slot_eq, ":troop_no", slot_troop_first_encountered, ":town_no"), (troop_set_slot, ":troop_no", slot_troop_cur_center, ":town_no"), (try_begin), (eq, "$cheat_mode", 1), (str_store_troop_name, 4, ":troop_no"), (str_store_party_name, 5, ":town_no"), (display_message, "@{s4} is in {s5}"), (try_end), (try_end), (try_end), ]), #script_update_ransom_brokers # INPUT: none # OUTPUT: none ("update_ransom_brokers", [(try_for_range, ":town_no", towns_begin, towns_end), (party_set_slot, ":town_no", slot_center_ransom_broker, 0), (try_end), (try_for_range, ":troop_no", ransom_brokers_begin, ransom_brokers_end), (store_random_in_range, ":town_no", towns_begin, towns_end), (party_set_slot, ":town_no", slot_center_ransom_broker, ":troop_no"), (try_end), (party_set_slot,"p_town_2",slot_center_ransom_broker,"trp_ramun_the_slave_trader"), ]), #script_update_tavern_travelers # INPUT: none # OUTPUT: none ("update_tavern_travelers", [(try_for_range, ":town_no", towns_begin, towns_end), (party_set_slot, ":town_no", slot_center_tavern_traveler, 0), (try_end), (try_for_range, ":troop_no", tavern_travelers_begin, tavern_travelers_end), (store_random_in_range, ":town_no", towns_begin, towns_end), (party_set_slot, ":town_no", slot_center_tavern_traveler, ":troop_no"), (assign, ":end_cond", 15), (try_for_range, ":unused", 0, ":end_cond"), (store_random_in_range, ":info_faction", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":info_faction", slot_faction_state, sfs_active), (neq, ":info_faction", "$players_kingdom"), (neq, ":info_faction", "fac_player_supporters_faction"), (party_set_slot, ":town_no", slot_center_traveler_info_faction, ":info_faction"), (assign, ":end_cond", 0), (try_end), (try_end), ]), #script_update_villages_infested_by_bandits # INPUT: none # OUTPUT: none ("update_villages_infested_by_bandits", [(try_for_range, ":village_no", villages_begin, villages_end), (try_begin), (check_quest_active, "qst_eliminate_bandits_infesting_village"), (quest_slot_eq, "qst_eliminate_bandits_infesting_village", slot_quest_target_center, ":village_no"), (quest_get_slot, ":cur_state", "qst_eliminate_bandits_infesting_village", slot_quest_current_state), (val_add, ":cur_state", 1), (try_begin), (lt, ":cur_state", 3), (quest_set_slot, "qst_eliminate_bandits_infesting_village", slot_quest_current_state, ":cur_state"), (else_try), (party_set_slot, ":village_no", slot_village_infested_by_bandits, 0), (call_script, "script_abort_quest", "qst_eliminate_bandits_infesting_village", 2), (try_end), (else_try), (check_quest_active, "qst_deal_with_bandits_at_lords_village"), (quest_slot_eq, "qst_deal_with_bandits_at_lords_village", slot_quest_target_center, ":village_no"), (quest_get_slot, ":cur_state", "qst_deal_with_bandits_at_lords_village", slot_quest_current_state), (val_add, ":cur_state", 1), (try_begin), (lt, ":cur_state", 3), (quest_set_slot, "qst_deal_with_bandits_at_lords_village", slot_quest_current_state, ":cur_state"), (else_try), (party_set_slot, ":village_no", slot_village_infested_by_bandits, 0), (call_script, "script_abort_quest", "qst_deal_with_bandits_at_lords_village", 2), (try_end), (else_try), (party_set_slot, ":village_no", slot_village_infested_by_bandits, 0), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", 3), (store_random_in_range, ":random_no", 0, 3), (try_begin), (eq, ":random_no", 0), (assign, ":bandit_troop", "trp_bandit"), (else_try), (eq, ":random_no", 1), (assign, ":bandit_troop", "trp_mountain_bandit"), (else_try), (assign, ":bandit_troop", "trp_forest_bandit"), (try_end), (party_set_slot, ":village_no", slot_village_infested_by_bandits, ":bandit_troop"), #Reduce prosperity of the village by 3 (call_script, "script_change_center_prosperity", ":village_no", -3), (try_begin), (eq, "$cheat_mode", 1), (str_store_party_name, s1, ":village_no"), (display_message, "@{s1} is infested by bandits."), (try_end), (try_end), (try_end), ]), #script_update_booksellers # INPUT: none # OUTPUT: none ("update_booksellers", [(try_for_range, ":town_no", towns_begin, towns_end), (party_set_slot, ":town_no", slot_center_tavern_bookseller, 0), (try_end), (try_for_range, ":troop_no", tavern_booksellers_begin, tavern_booksellers_end), (store_random_in_range, ":town_no", towns_begin, towns_end), (party_set_slot, ":town_no", slot_center_tavern_bookseller, ":troop_no"), (try_end), ]), #script_update_tavern_minstels # INPUT: none # OUTPUT: none ("update_tavern_minstels", [(try_for_range, ":town_no", towns_begin, towns_end), (party_set_slot, ":town_no", slot_center_tavern_minstrel, 0), (try_end), (try_for_range, ":troop_no", tavern_minstrels_begin, tavern_minstrels_end), (store_random_in_range, ":town_no", towns_begin, towns_end), (party_set_slot, ":town_no", slot_center_tavern_minstrel, ":troop_no"), (try_end), ]), #script_update_faction_notes # INPUT: faction_no # OUTPUT: none ("update_faction_notes", [(store_script_param, ":faction_no", 1), (try_begin), (is_between, ":faction_no", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":faction_no", slot_faction_state, sfs_active), (faction_get_slot, ":faction_leader", ":faction_no", slot_faction_leader), (str_store_faction_name, s5, ":faction_no"), (str_store_troop_name_link, s6, ":faction_leader"), (assign, ":num_centers", 0), (str_store_string, s8, "@nowhere"), (try_for_range_backwards, ":cur_center", centers_begin, centers_end), (store_faction_of_party, ":center_faction", ":cur_center"), (eq, ":center_faction", ":faction_no"), (try_begin), (eq, ":num_centers", 0), (str_store_party_name_link, s8, ":cur_center"), (else_try), (eq, ":num_centers", 1), (str_store_party_name_link, s7, ":cur_center"), (str_store_string, s8, "@{s7} and {s8}"), (else_try), (str_store_party_name_link, s7, ":cur_center"), (str_store_string, s8, "@{s7}, {s8}"), (try_end), (val_add, ":num_centers", 1), (try_end), (assign, ":num_members", 0), (str_store_string, s10, "@noone"), (try_for_range_backwards, ":loop_var", "trp_kingdom_heroes_including_player_begin", kingdom_heroes_end), (assign, ":cur_troop", ":loop_var"), (try_begin), (eq, ":loop_var", "trp_kingdom_heroes_including_player_begin"), (assign, ":cur_troop", "trp_player"), (assign, ":troop_faction", "$players_kingdom"), (else_try), (store_troop_faction, ":troop_faction", ":cur_troop"), (try_end), (eq, ":troop_faction", ":faction_no"), (neq, ":cur_troop", ":faction_leader"), (troop_slot_eq, ":cur_troop", slot_troop_occupation, slto_kingdom_hero), (try_begin), (eq, ":num_members", 0), (str_store_troop_name_link, s10, ":cur_troop"), (else_try), (eq, ":num_members", 1), (str_store_troop_name_link, s9, ":cur_troop"), (str_store_string, s10, "@{s9} and {s10}"), (else_try), (str_store_troop_name_link, s9, ":cur_troop"), (str_store_string, s10, "@{s9}, {s10}"), (try_end), (val_add, ":num_members", 1), (try_end), (str_store_string, s12, "@noone"), (assign, ":num_enemies", 0), (try_for_range_backwards, ":cur_faction", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":cur_faction", slot_faction_state, sfs_active), (store_relation, ":cur_relation", ":cur_faction", ":faction_no"), (lt, ":cur_relation", 0), (try_begin), (eq, ":num_enemies", 0), (str_store_faction_name_link, s12, ":cur_faction"), (else_try), (eq, ":num_enemies", 1), (str_store_faction_name_link, s11, ":cur_faction"), (str_store_string, s12, "@{s11} and {s12}"), (else_try), (str_store_faction_name_link, s11, ":cur_faction"), (str_store_string, s12, "@{s11}, {s12}"), (try_end), (val_add, ":num_enemies", 1), (try_end), (add_faction_note_from_sreg, ":faction_no", 0, "@{s5} is ruled by {s6}.^It occupies {s8}.^Its vassals are {s10}.^{s5} is at war with {s12}.", 0), (else_try), (is_between, ":faction_no", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":faction_no", slot_faction_state, sfs_defeated), (str_store_faction_name, s5, ":faction_no"), (add_faction_note_from_sreg, ":faction_no", 0, "@{s5} has been defeated!", 0), (str_clear, s1), (add_faction_note_from_sreg, ":faction_no", 1, s1, 0), (else_try), (str_clear, s1), (add_faction_note_from_sreg, ":faction_no", 0, s1, 0), (add_faction_note_from_sreg, ":faction_no", 1, s1, 0), (try_end), (try_begin), (is_between, ":faction_no", "fac_kingdom_1", kingdoms_end), #Excluding player kingdom (add_faction_note_tableau_mesh, ":faction_no", "tableau_faction_note_mesh"), (else_try), (add_faction_note_tableau_mesh, ":faction_no", "tableau_faction_note_mesh_banner"), (try_end), ]), #script_update_faction_traveler_notes # INPUT: faction_no # OUTPUT: none ("update_faction_traveler_notes", [(store_script_param, ":faction_no", 1), (assign, ":total_men", 0), (try_for_parties, ":cur_party"), (store_faction_of_party, ":center_faction", ":cur_party"), (eq, ":center_faction", ":faction_no"), (party_get_num_companions, ":num_men", ":cur_party"), (val_add, ":total_men", ":num_men"), (try_end), (str_store_faction_name, s5, ":faction_no"), (assign, reg1, ":total_men"), (add_faction_note_from_sreg, ":faction_no", 1, "@{s5} has a strength of {reg1} men in total.", 1), ]), #script_update_troop_notes # INPUT: troop_no # OUTPUT: none ("update_troop_notes", [(store_script_param, ":troop_no", 1), (str_store_troop_name, s54, ":troop_no"), (try_begin), (eq, ":troop_no", "trp_player"), (this_or_next|eq, "$player_has_homage", 1), ( eq, "$players_kingdom", "fac_player_supporters_faction"), (assign, ":troop_faction", "$players_kingdom"), (else_try), (store_troop_faction, ":troop_faction", ":troop_no"), (try_end), (try_begin), (neq, ":troop_no", "trp_player"), (neg|is_between, ":troop_faction", kingdoms_begin, kingdoms_end), (str_clear, s54), (add_troop_note_from_sreg, ":troop_no", 0, s54, 0), (add_troop_note_from_sreg, ":troop_no", 1, s54, 0), (add_troop_note_from_sreg, ":troop_no", 2, s54, 0), (else_try), (is_between, ":troop_no", kingdom_ladies_begin, kingdom_ladies_end), (str_clear, s54), (add_troop_note_from_sreg, ":troop_no", 0, s54, 0), (add_troop_note_from_sreg, ":troop_no", 1, s54, 0), (add_troop_note_from_sreg, ":troop_no", 2, s54, 0), (else_try), (is_between, ":troop_no", pretenders_begin, pretenders_end), (neg|troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), (neq, ":troop_no", "$supported_pretender"), (troop_get_slot, ":orig_faction", ":troop_no", slot_troop_original_faction), (try_begin), (faction_slot_eq, ":orig_faction", slot_faction_state, sfs_active), (faction_slot_eq, ":orig_faction", slot_faction_has_rebellion_chance, 1), (str_store_faction_name_link, s56, ":orig_faction"), (add_troop_note_from_sreg, ":troop_no", 0, "@{s54} is a claimant to the throne of {s56}.", 0), (add_troop_note_tableau_mesh, ":troop_no", "tableau_troop_note_mesh"), (else_try), (str_clear, s54), (add_troop_note_from_sreg, ":troop_no", 0, s54, 0), (add_troop_note_from_sreg, ":troop_no", 1, s54, 0), (add_troop_note_from_sreg, ":troop_no", 2, s54, 0), (try_end), (else_try), (faction_get_slot, ":faction_leader", ":troop_faction", slot_faction_leader), (str_store_troop_name_link, s55, ":faction_leader"), (str_store_faction_name_link, s56, ":troop_faction"), (assign, reg4, 0), (assign, reg6, 0), (try_begin), (eq, ":troop_faction", "fac_player_faction"), (assign, reg6, 1), (else_try), (eq, ":faction_leader", ":troop_no"), (assign, reg4, 1), (try_end), (assign, ":num_centers", 0), (str_store_string, s58, "@nowhere"), (try_for_range_backwards, ":cur_center", centers_begin, centers_end), (party_slot_eq, ":cur_center", slot_town_lord, ":troop_no"), (try_begin), (eq, ":num_centers", 0), (str_store_party_name_link, s58, ":cur_center"), (else_try), (eq, ":num_centers", 1), (str_store_party_name_link, s57, ":cur_center"), (str_store_string, s58, "@{s57} and {s58}"), (else_try), (str_store_party_name_link, s57, ":cur_center"), (str_store_string, s58, "@{s57}, {s58}"), (try_end), (val_add, ":num_centers", 1), (try_end), (troop_get_type, reg3, ":troop_no"), (troop_get_slot, reg5, ":troop_no", slot_troop_renown), (str_clear, s59), (try_begin), # (troop_get_slot, ":relation", ":troop_no", slot_troop_player_relation), (call_script, "script_troop_get_player_relation", ":troop_no"), (assign, ":relation", reg0), (store_add, ":normalized_relation", ":relation", 100), (val_add, ":normalized_relation", 5), (store_div, ":str_offset", ":normalized_relation", 10), (val_clamp, ":str_offset", 0, 20), (store_add, ":str_id", "str_relation_mnus_100_ns", ":str_offset"), (neq, ":str_id", "str_relation_plus_0_ns"), (str_store_string, s60, "@{reg3?She:He}"), (str_store_string, s59, ":str_id"), (str_store_string, s59, "@^{s59}"), (try_end), (assign, reg9, ":num_centers"), (add_troop_note_from_sreg, ":troop_no", 0, "@{reg6?:{reg4?{s54} is the ruler of {s56}.^:{s54} is a vassal of {s55} of {s56}.^}}Renown: {reg5}.^{reg9?{reg3?She:He} is the {reg3?lady:lord} of {s58}.:{reg3?She:He} has no fiefs.}{s59}", 0), (add_troop_note_tableau_mesh, ":troop_no", "tableau_troop_note_mesh"), (try_end), ]), #script_update_troop_location_notes # INPUT: troop_no # OUTPUT: none ("update_troop_location_notes", [(store_script_param, ":troop_no", 1), (store_script_param, ":see_or_hear", 2), (call_script, "script_get_information_about_troops_position", ":troop_no", 1), (try_begin), (neq, reg0, 0), (troop_get_type, reg1, ":troop_no"), (try_begin), (eq, ":see_or_hear", 0), (add_troop_note_from_sreg, ":troop_no", 2, "@The last time you saw {reg1?her:him}, {s1}", 1), (else_try), (add_troop_note_from_sreg, ":troop_no", 2, "@The last time you heard about {reg1?her:him}, {s1}", 1), (try_end), (try_end), ]), #script_update_center_notes # INPUT: center_no # OUTPUT: none ("update_center_notes", [(store_script_param, ":center_no", 1), (party_get_slot, ":lord_troop", ":center_no", slot_town_lord), (try_begin), (ge, ":lord_troop", 0), (store_troop_faction, ":lord_faction", ":lord_troop"), (str_store_troop_name_link, s1, ":lord_troop"), (try_begin), (eq, ":lord_troop", "trp_player"), (gt, "$players_kingdom", 0), (str_store_faction_name_link, s2, "$players_kingdom"), (else_try), (str_store_faction_name_link, s2, ":lord_faction"), (try_end), (str_store_party_name, s50, ":center_no"), (try_begin), (party_slot_eq, ":center_no", slot_party_type, spt_town), (str_store_string, s51, "@The town of {s50}"), (else_try), (party_slot_eq, ":center_no", slot_party_type, spt_village), (party_get_slot, ":bound_center", ":center_no", slot_village_bound_center), (str_store_party_name_link, s52, ":bound_center"), (str_store_string, s51, "@The village of {s50} near {s52}"), (else_try), (str_store_string, s51, "@{s50}"), (try_end), (str_store_string, s2, "@{s51} belongs to {s1} of {s2}.^"), (else_try), (str_clear, s2), (try_end), (try_begin), (is_between, ":center_no", villages_begin, villages_end), (else_try), (assign, ":num_villages", 0), (try_for_range_backwards, ":village_no", villages_begin, villages_end), (party_slot_eq, ":village_no", slot_village_bound_center, ":center_no"), (try_begin), (eq, ":num_villages", 0), (str_store_party_name_link, s8, ":village_no"), (else_try), (eq, ":num_villages", 1), (str_store_party_name_link, s7, ":village_no"), (str_store_string, s8, "@{s7} and {s8}"), (else_try), (str_store_party_name_link, s7, ":village_no"), (str_store_string, s8, "@{s7}, {s8}"), (try_end), (val_add, ":num_villages", 1), (try_end), (try_begin), (eq, ":num_villages", 0), (str_store_string, s2, "@{s2}It has no villages.^"), (else_try), (store_sub, reg0, ":num_villages", 1), (str_store_string, s2, "@{s2}{reg0?Its villages are:Its village is} {s8}.^"), (try_end), (try_end), (call_script, "script_get_prosperity_text_to_s50", ":center_no"), (add_party_note_from_sreg, ":center_no", 0, "@{s2}Its prosperity is: {s50}", 0), (add_party_note_tableau_mesh, ":center_no", "tableau_center_note_mesh"), ]), #script_update_center_recon_notes # INPUT: center_no # OUTPUT: none ("update_center_recon_notes", [(store_script_param, ":center_no", 1), (try_begin), (this_or_next|is_between, ":center_no", towns_begin, towns_end), (is_between, ":center_no", castles_begin, castles_end), (party_get_slot, ":center_food_store", ":center_no", slot_party_food_store), (call_script, "script_center_get_food_consumption", ":center_no"), (assign, ":food_consumption", reg0), (store_div, reg6, ":center_food_store", ":food_consumption"), (party_collect_attachments_to_party, ":center_no", "p_collective_ally"), (party_get_num_companions, reg5, "p_collective_ally"), (add_party_note_from_sreg, ":center_no", 1, "@Current garrison consists of {reg5} men.^Has food stock for {reg6} days.", 1), (try_end), ]), #script_update_all_notes # INPUT: none # OUTPUT: none ("update_all_notes", [ (call_script, "script_update_troop_notes", "trp_player"), (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (call_script, "script_update_troop_notes", ":troop_no"), (try_end), (try_for_range, ":center_no", centers_begin, centers_end), (call_script, "script_update_center_notes", ":center_no"), (try_end), (try_for_range, ":faction_no", kingdoms_begin, kingdoms_end), (call_script, "script_update_faction_notes", ":faction_no"), (try_end), ]), #script_shield_item_set_banner # INPUT: agent_no # OUTPUT: none ("shield_item_set_banner", [ (store_script_param, ":tableau_no",1), (store_script_param, ":agent_no", 2), (store_script_param, ":troop_no", 3), (assign, ":banner_troop", -1), (assign, ":banner_mesh", "mesh_banners_default_b"), (try_begin), (lt, ":agent_no", 0), (try_begin), (ge, ":troop_no", 0), (this_or_next|troop_slot_ge, ":troop_no", slot_troop_banner_scene_prop, 1), ( eq, ":troop_no", "trp_player"), (assign, ":banner_troop", ":troop_no"), (else_try), (is_between, ":troop_no", companions_begin, companions_end), (assign, ":banner_troop", "trp_player"), (else_try), (assign, ":banner_mesh", "mesh_banners_default_a"), (try_end), (else_try), (agent_get_troop_id, ":troop_id", ":agent_no"), (this_or_next|troop_slot_ge, ":troop_id", slot_troop_banner_scene_prop, 1), ( eq, ":troop_no", "trp_player"), (assign, ":banner_troop", ":troop_id"), (else_try), (agent_get_party_id, ":agent_party", ":agent_no"), # modified by formations here to ensure player troops' heraldry showed correctly (party_get_slot, ":num", "p_main_party", slot_party_array_parties_begin), (try_for_range, ":array", 1, ":num"), (store_add, ":array_slot", ":array", slot_party_array_parties_begin), (party_get_slot, ":array_party", "p_main_party", ":array_slot"), (eq, ":agent_party", ":array_party"), (assign, ":agent_party", "p_main_party"), (try_end), # formation changes end (try_begin), (lt, ":agent_party", 0), (is_between, ":troop_id", companions_begin, companions_end), (main_party_has_troop, ":troop_id"), (assign, ":agent_party", "p_main_party"), (try_end), (ge, ":agent_party", 0), (party_get_template_id, ":party_template", ":agent_party"), (try_begin), (eq, ":party_template", "pt_deserters"), (assign, ":banner_mesh", "mesh_banners_default_c"), (else_try), (is_between, ":agent_party", centers_begin, centers_end), (party_get_slot, ":town_lord", "$g_encountered_party", slot_town_lord), (ge, ":town_lord", 0), (assign, ":banner_troop", ":town_lord"), (else_try), (this_or_next|party_slot_eq, ":agent_party", slot_party_type, spt_kingdom_hero_party), ( eq, ":agent_party", "p_main_party"), (party_get_num_companion_stacks, ":num_stacks", ":agent_party"), (gt, ":num_stacks", 0), (party_stack_get_troop_id, ":leader_troop_id", ":agent_party", 0), (this_or_next|troop_slot_ge, ":leader_troop_id", slot_troop_banner_scene_prop, 1), ( eq, ":leader_troop_id", "trp_player"), (assign, ":banner_troop", ":leader_troop_id"), (try_end), (else_try), #Check if we are in a tavern (eq, "$talk_context", tc_tavern_talk), (neq, ":troop_no", "trp_player"), (assign, ":banner_mesh", "mesh_banners_default_d"), (else_try), #can't find party, this can be a town guard (neq, ":troop_no", "trp_player"), (is_between, "$g_encountered_party", walled_centers_begin, walled_centers_end), (party_get_slot, ":town_lord", "$g_encountered_party", slot_town_lord), (ge, ":town_lord", 0), (assign, ":banner_troop", ":town_lord"), (try_end), (try_begin), (ge, ":banner_troop", 0), (try_begin), (neg|troop_slot_ge, ":banner_troop", slot_troop_banner_scene_prop, 1), (assign, ":banner_mesh", "mesh_banners_default_b"), (else_try), (troop_get_slot, ":banner_spr", ":banner_troop", slot_troop_banner_scene_prop), (store_add, ":banner_scene_props_end", banner_scene_props_end_minus_one, 1), (is_between, ":banner_spr", banner_scene_props_begin, ":banner_scene_props_end"), (val_sub, ":banner_spr", banner_scene_props_begin), (store_add, ":banner_mesh", ":banner_spr", arms_meshes_begin), (try_end), (try_end), (cur_item_set_tableau_material, ":tableau_no", ":banner_mesh"), ]), ## #script_shield_item_set_banner ## # INPUT: agent_no ## # OUTPUT: none ## ("shield_item_set_banner", ## [ ## (store_script_param, ":tableau_no",1), ## (store_script_param, ":agent_no", 2), ## (store_script_param, ":troop_no", 3), ## (assign, ":banner_troop", -1), ## (try_begin), ## (lt, ":agent_no", 0), ## (try_begin), ## (ge, ":troop_no", 0), ## (troop_slot_ge, ":troop_no", slot_troop_banner_scene_prop, 0), ## (assign, ":banner_troop", ":troop_no"), ## (else_try), ## (assign, ":banner_troop", -2), ## (try_end), ## (else_try), ## (agent_get_troop_id, ":troop_id", ":agent_no"), ## (troop_slot_ge, ":troop_id", slot_troop_custom_banner_flag_type, 0), ## (assign, ":banner_troop", ":troop_id"), ## (else_try), ## (agent_get_party_id, ":agent_party", ":agent_no"), ## (try_begin), ## (lt, ":agent_party", 0), ## (is_between, ":troop_id", companions_begin, companions_end), ## (main_party_has_troop, ":troop_id"), ## (assign, ":agent_party", "p_main_party"), ## (try_end), ## (ge, ":agent_party", 0), ## (party_get_template_id, ":party_template", ":agent_party"), ## (try_begin), ## (eq, ":party_template", "pt_deserters"), ## (assign, ":banner_troop", -3), ## (else_try), ## (is_between, ":agent_party", centers_begin, centers_end), ## (party_get_slot, ":town_lord", "$g_encountered_party", slot_town_lord), ## (ge, ":town_lord", 0), ## (assign, ":banner_troop", ":town_lord"), ## (else_try), ## (this_or_next|party_slot_eq, ":agent_party", slot_party_type, spt_kingdom_hero_party), ## ( eq, ":agent_party", "p_main_party"), ## (party_get_num_companion_stacks, ":num_stacks", ":agent_party"), ## (gt, ":num_stacks", 0), ## (party_stack_get_troop_id, ":leader_troop_id", ":agent_party", 0), ## (troop_slot_ge, ":leader_troop_id", slot_troop_banner_scene_prop, 1), ## (assign, ":banner_troop", ":leader_troop_id"), ## (try_end), ## (else_try), #Check if we are in a tavern ## (eq, "$talk_context", tc_tavern_talk), ## (neq, ":troop_no", "trp_player"), ## (assign, ":banner_troop", -4), ## (else_try), #can't find party, this can be a town guard ## (neq, ":troop_no", "trp_player"), ## (is_between, "$g_encountered_party", walled_centers_begin, walled_centers_end), ## (party_get_slot, ":town_lord", "$g_encountered_party", slot_town_lord), ## (ge, ":town_lord", 0), ## (assign, ":banner_troop", ":town_lord"), ## (try_end), ## (cur_item_set_tableau_material, ":tableau_no", ":banner_troop"), ## ]), #script_add_troop_to_cur_tableau # INPUT: troop_no # OUTPUT: none ("add_troop_to_cur_tableau", [ (store_script_param, ":troop_no",1), (set_fixed_point_multiplier, 100), (assign, ":banner_mesh", -1), (troop_get_slot, ":banner_spr", ":troop_no", slot_troop_banner_scene_prop), (store_add, ":banner_scene_props_end", banner_scene_props_end_minus_one, 1), (try_begin), (is_between, ":banner_spr", banner_scene_props_begin, ":banner_scene_props_end"), (val_sub, ":banner_spr", banner_scene_props_begin), (store_add, ":banner_mesh", ":banner_spr", banner_meshes_begin), (try_end), (cur_tableau_clear_override_items), # (cur_tableau_set_override_flags, af_override_fullhelm), (cur_tableau_set_override_flags, af_override_head|af_override_weapons), (init_position, pos2), (cur_tableau_set_camera_parameters, 1, 6, 6, 10, 10000), (init_position, pos5), (assign, ":eye_height", 162), (store_mul, ":camera_distance", ":troop_no", 87323), # (val_mod, ":camera_distance", 5), (assign, ":camera_distance", 139), (store_mul, ":camera_yaw", ":troop_no", 124337), (val_mod, ":camera_yaw", 50), (val_add, ":camera_yaw", -25), (store_mul, ":camera_pitch", ":troop_no", 98123), (val_mod, ":camera_pitch", 20), (val_add, ":camera_pitch", -14), (assign, ":animation", anim_stand_man), ## (troop_get_inventory_slot, ":horse_item", ":troop_no", ek_horse), ## (try_begin), ## (gt, ":horse_item", 0), ## (assign, ":eye_height", 210), ## (cur_tableau_add_horse, ":horse_item", pos2, anim_horse_stand, 0), ## (assign, ":animation", anim_ride_0), ## (position_set_z, pos5, 125), ## (try_begin), ## (is_between, ":camera_yaw", -10, 10), #make sure horse head doesn't obstruct face. ## (val_min, ":camera_pitch", -5), ## (try_end), ## (try_end), (position_set_z, pos5, ":eye_height"), # camera looks towards -z axis (position_rotate_x, pos5, -90), (position_rotate_z, pos5, 180), # now apply yaw and pitch (position_rotate_y, pos5, ":camera_yaw"), (position_rotate_x, pos5, ":camera_pitch"), (position_move_z, pos5, ":camera_distance", 0), (position_move_x, pos5, 5, 0), (try_begin), (ge, ":banner_mesh", 0), (init_position, pos1), (position_set_z, pos1, -1500), (position_set_x, pos1, 265), (position_set_y, pos1, 400), (position_transform_position_to_parent, pos3, pos5, pos1), (cur_tableau_add_mesh, ":banner_mesh", pos3, 400, 0), (try_end), (cur_tableau_add_troop, ":troop_no", pos2, ":animation" , 0), (cur_tableau_set_camera_position, pos5), (copy_position, pos8, pos5), (position_rotate_x, pos8, -90), #y axis aligned with camera now. z is up (position_rotate_z, pos8, 30), (position_rotate_x, pos8, -60), (cur_tableau_add_sun_light, pos8, 175,150,125), ]), #script_add_troop_to_cur_tableau_for_character # INPUT: troop_no # OUTPUT: none ("add_troop_to_cur_tableau_for_character", [ (store_script_param, ":troop_no",1), (set_fixed_point_multiplier, 100), (cur_tableau_clear_override_items), (cur_tableau_set_override_flags, af_override_fullhelm), ## (cur_tableau_set_override_flags, af_override_head|af_override_weapons), (init_position, pos2), (cur_tableau_set_camera_parameters, 1, 4, 8, 10, 10000), (init_position, pos5), (assign, ":cam_height", 150), # (val_mod, ":camera_distance", 5), (assign, ":camera_distance", 360), (assign, ":camera_yaw", -15), (assign, ":camera_pitch", -18), (assign, ":animation", anim_stand_man), (position_set_z, pos5, ":cam_height"), # camera looks towards -z axis (position_rotate_x, pos5, -90), (position_rotate_z, pos5, 180), # now apply yaw and pitch (position_rotate_y, pos5, ":camera_yaw"), (position_rotate_x, pos5, ":camera_pitch"), (position_move_z, pos5, ":camera_distance", 0), (position_move_x, pos5, 5, 0), (try_begin), (troop_is_hero, ":troop_no"), (cur_tableau_add_troop, ":troop_no", pos2, ":animation", -1), (else_try), (store_mul, ":random_seed", ":troop_no", 126233), (val_mod, ":random_seed", 1000), (val_add, ":random_seed", 1), (cur_tableau_add_troop, ":troop_no", pos2, ":animation", ":random_seed"), (try_end), (cur_tableau_set_camera_position, pos5), (copy_position, pos8, pos5), (position_rotate_x, pos8, -90), #y axis aligned with camera now. z is up (position_rotate_z, pos8, 30), (position_rotate_x, pos8, -60), (cur_tableau_add_sun_light, pos8, 175,150,125), ]), #script_add_troop_to_cur_tableau_for_inventory # INPUT: troop_no # OUTPUT: none ("add_troop_to_cur_tableau_for_inventory", [ (store_script_param, ":troop_no",1), (store_mod, ":side", ":troop_no", 4), #side flag is inside troop_no value (val_div, ":troop_no", 4), #removing the flag bit (val_mul, ":side", 90), #to degrees (set_fixed_point_multiplier, 100), (cur_tableau_clear_override_items), (init_position, pos2), (position_rotate_z, pos2, ":side"), (cur_tableau_set_camera_parameters, 1, 4, 6, 10, 10000), (init_position, pos5), (assign, ":cam_height", 105), # (val_mod, ":camera_distance", 5), (assign, ":camera_distance", 380), (assign, ":camera_yaw", -15), (assign, ":camera_pitch", -18), (assign, ":animation", anim_stand_man), (position_set_z, pos5, ":cam_height"), # camera looks towards -z axis (position_rotate_x, pos5, -90), (position_rotate_z, pos5, 180), # now apply yaw and pitch (position_rotate_y, pos5, ":camera_yaw"), (position_rotate_x, pos5, ":camera_pitch"), (position_move_z, pos5, ":camera_distance", 0), (position_move_x, pos5, 5, 0), (try_begin), (troop_is_hero, ":troop_no"), (cur_tableau_add_troop, ":troop_no", pos2, ":animation", -1), (else_try), (store_mul, ":random_seed", ":troop_no", 126233), (val_mod, ":random_seed", 1000), (val_add, ":random_seed", 1), (cur_tableau_add_troop, ":troop_no", pos2, ":animation", ":random_seed"), (try_end), (cur_tableau_set_camera_position, pos5), (copy_position, pos8, pos5), (position_rotate_x, pos8, -90), #y axis aligned with camera now. z is up (position_rotate_z, pos8, 30), (position_rotate_x, pos8, -60), (cur_tableau_add_sun_light, pos8, 175,150,125), ]), #script_add_troop_to_cur_tableau_for_party # INPUT: troop_no # OUTPUT: none ("add_troop_to_cur_tableau_for_party", [ (store_script_param, ":troop_no",1), (store_mod, ":hide_weapons", ":troop_no", 2), #hide_weapons flag is inside troop_no value (val_div, ":troop_no", 2), #removing the flag bit (set_fixed_point_multiplier, 100), (cur_tableau_clear_override_items), (try_begin), (eq, ":hide_weapons", 1), (cur_tableau_set_override_flags, af_override_fullhelm|af_override_head|af_override_weapons), (try_end), (init_position, pos2), (cur_tableau_set_camera_parameters, 1, 6, 6, 10, 10000), (init_position, pos5), (assign, ":cam_height", 105), # (val_mod, ":camera_distance", 5), (assign, ":camera_distance", 450), (assign, ":camera_yaw", 15), (assign, ":camera_pitch", -18), (assign, ":animation", anim_stand_man), (troop_get_inventory_slot, ":horse_item", ":troop_no", ek_horse), (try_begin), (gt, ":horse_item", 0), (eq, ":hide_weapons", 0), (cur_tableau_add_horse, ":horse_item", pos2, "anim_horse_stand", 0), (assign, ":animation", "anim_ride_0"), (assign, ":camera_yaw", 23), (assign, ":cam_height", 150), (assign, ":camera_distance", 550), (try_end), (position_set_z, pos5, ":cam_height"), # camera looks towards -z axis (position_rotate_x, pos5, -90), (position_rotate_z, pos5, 180), # now apply yaw and pitch (position_rotate_y, pos5, ":camera_yaw"), (position_rotate_x, pos5, ":camera_pitch"), (position_move_z, pos5, ":camera_distance", 0), (position_move_x, pos5, 5, 0), (try_begin), (troop_is_hero, ":troop_no"), (cur_tableau_add_troop, ":troop_no", pos2, ":animation", -1), (else_try), (store_mul, ":random_seed", ":troop_no", 126233), (val_mod, ":random_seed", 1000), (val_add, ":random_seed", 1), (cur_tableau_add_troop, ":troop_no", pos2, ":animation", ":random_seed"), (try_end), (cur_tableau_set_camera_position, pos5), (copy_position, pos8, pos5), (position_rotate_x, pos8, -90), #y axis aligned with camera now. z is up (position_rotate_z, pos8, 30), (position_rotate_x, pos8, -60), (cur_tableau_add_sun_light, pos8, 175,150,125), ]), #script_get_prosperity_text_to_s50 # INPUT: center_no # OUTPUT: none ("get_prosperity_text_to_s50", [(store_script_param, ":center_no", 1), (party_get_slot, ":prosperity", ":center_no", slot_town_prosperity), (val_div, ":prosperity", 20), (try_begin), (eq, ":prosperity", 0), (str_store_string, s50, "@Very Poor"), (else_try), (eq, ":prosperity", 1), (str_store_string, s50, "@Poor"), (else_try), (eq, ":prosperity", 2), (str_store_string, s50, "@Average"), (else_try), (eq, ":prosperity", 3), (str_store_string, s50, "@Rich"), (else_try), (str_store_string, s50, "@Very Rich"), (try_end), ]), #script_spawn_bandits # INPUT: none # OUTPUT: none ("spawn_bandits", [(set_spawn_radius,1), (try_begin), (store_num_parties_of_template, ":num_parties", "pt_mountain_bandits"), (lt,":num_parties",14), (store_random,":spawn_point",num_mountain_bandit_spawn_points), (val_add,":spawn_point","p_mountain_bandit_spawn_point"), (spawn_around_party,":spawn_point","pt_mountain_bandits"), (try_end), (try_begin), (store_num_parties_of_template, ":num_parties", "pt_forest_bandits"), (lt,":num_parties",14), (store_random,":spawn_point",num_mountain_bandit_spawn_points), (val_add,":spawn_point","p_forest_bandit_spawn_point"), (spawn_around_party,":spawn_point","pt_forest_bandits"), (try_end), (try_begin), (store_num_parties_of_template, ":num_parties", "pt_sea_raiders"), (lt,":num_parties",14), (store_random,":spawn_point",num_sea_raider_spawn_points), (val_add,":spawn_point","p_sea_raider_spawn_point_1"), (spawn_around_party,":spawn_point","pt_sea_raiders"), (try_end), (try_begin), (store_num_parties_of_template, ":num_parties", "pt_steppe_bandits"), (lt,":num_parties",14), (store_random,":spawn_point",num_steppe_bandit_spawn_points), (val_add,":spawn_point","p_steppe_bandit_spawn_point"), (spawn_around_party,":spawn_point","pt_steppe_bandits"), (try_end), (try_begin), (store_num_parties_of_template, ":num_parties", "pt_looters"), (lt,":num_parties",23), (store_random_in_range,":spawn_point",villages_begin,villages_end), #spawn looters twice to have lots of them at the beginning (spawn_around_party,":spawn_point","pt_looters"), (assign, ":spawned_party_id", reg0), (try_begin), (check_quest_active, "qst_deal_with_looters"), (party_set_flags, ":spawned_party_id", pf_quest_party, 1), (else_try), (party_set_flags, ":spawned_party_id", pf_quest_party, 0), (try_end), (try_end), (try_begin), (store_num_parties_of_template, ":num_parties", "pt_deserters"), (lt,":num_parties",15), (set_spawn_radius, 4), (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", 5), (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), (store_troop_faction, ":troop_faction", ":troop_no"), (neq, ":troop_faction", "fac_player_supporters_faction"), (gt, ":party_no", 0), (neg|party_is_in_any_town, ":party_no"), ## (party_get_attached_to, ":attached_party_no", ":party_no"), ## (lt, ":attached_party_no", 0),#in wilderness (spawn_around_party, ":party_no", "pt_deserters"), (assign, ":new_party", reg0), (store_troop_faction, ":faction_no", ":troop_no"), (faction_get_slot, ":tier_1_troop", ":faction_no", slot_faction_tier_1_troop), (store_character_level, ":level", "trp_player"), (store_mul, ":max_number_to_add", ":level", 2), (val_add, ":max_number_to_add", 11), (store_random_in_range, ":number_to_add", 10, ":max_number_to_add"), (party_add_members, ":new_party", ":tier_1_troop", ":number_to_add"), (store_random_in_range, ":random_no", 1, 4), (try_for_range, ":unused", 0, ":random_no"), (party_upgrade_with_xp, ":new_party", 1000000, 0), (try_end), ## (str_store_party_name, s1, ":party_no"), ## (call_script, "script_get_closest_center", ":party_no"), ## (try_begin), ## (gt, reg0, 0), ## (str_store_party_name, s2, reg0), ## (else_try), ## (str_store_string, s2, "@unknown place"), ## (try_end), ## (assign, reg1, ":number_to_add"), ## (display_message, "@{reg1} Deserters spawned from {s1}, near {s2}."), (try_end), (try_end), ]), #script_count_mission_casualties_from_agents # INPUT: none # OUTPUT: none ("count_mission_casualties_from_agents", [(party_clear, "p_player_casualties"), (party_clear, "p_enemy_casualties"), (party_clear, "p_ally_casualties"), (assign, "$any_allies_at_the_last_battle", 0), (try_for_agents, ":cur_agent"), (agent_is_human, ":cur_agent"), # This section is added/modified to cope with the array system (assign, ":array", 0), (agent_get_party_id, ":agent_party", ":cur_agent"), (try_begin), (neq, ":agent_party", "p_main_party"), (agent_is_ally, ":cur_agent"), (party_get_slot, ":array_parties", "p_main_party", slot_party_array_parties_begin), (try_for_range, ":i", 1, ":array_parties"), (store_add, ":array_slot", slot_party_array_parties_begin, ":i"), (party_slot_eq, "p_main_party", ":array_slot", ":agent_party"), (assign, ":array", 1), (try_end), (neq, ":array", 1), (assign, "$any_allies_at_the_last_battle", 1), (try_end), (neg|agent_is_alive, ":cur_agent"), (agent_get_troop_id, ":agent_troop_id", ":cur_agent"), (try_begin), (this_or_next|eq, ":agent_party", "p_main_party"), (eq, ":array", 1), # array system changes end (party_add_members, "p_player_casualties", ":agent_troop_id", 1), (try_begin), (agent_is_wounded, ":cur_agent"), (party_wound_members, "p_player_casualties", ":agent_troop_id", 1), (try_end), (else_try), (agent_is_ally, ":cur_agent"), (party_add_members, "p_ally_casualties", ":agent_troop_id", 1), (try_begin), (agent_is_wounded, ":cur_agent"), (party_wound_members, "p_ally_casualties", ":agent_troop_id", 1), (try_end), (else_try), (party_add_members, "p_enemy_casualties", ":agent_troop_id", 1), (try_begin), (agent_is_wounded, ":cur_agent"), (party_wound_members, "p_enemy_casualties", ":agent_troop_id", 1), (try_end), (try_end), (try_end), ]), #script_get_max_skill_of_player_party # INPUT: arg1 = skill_no # OUTPUT: reg0 = max_skill, reg1 = skill_owner_troop_no ("get_max_skill_of_player_party", [(store_script_param, ":skill_no", 1), (party_get_num_companion_stacks, ":num_stacks","p_main_party"), (store_skill_level, ":max_skill", ":skill_no", "trp_player"), (assign, ":skill_owner", "trp_player"), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop","p_main_party",":i_stack"), (troop_is_hero, ":stack_troop"), (neg|troop_is_wounded, ":stack_troop"), (store_skill_level, ":cur_skill", ":skill_no", ":stack_troop"), (gt, ":cur_skill", ":max_skill"), (assign, ":max_skill", ":cur_skill"), (assign, ":skill_owner", ":stack_troop"), (try_end), (assign, reg0, ":max_skill"), (assign, reg1, ":skill_owner"), ]), #script_upgrade_hero_party # INPUT: arg1 = party_id, arg2 = xp_amount ("upgrade_hero_party", [(store_script_param, ":party_no", 1), (store_script_param, ":xp_amount", 2), (party_upgrade_with_xp, ":party_no", ":xp_amount", 0), ]), #script_get_improvement_details # INPUT: arg1 = improvement # OUTPUT: reg0 = base_cost ("get_improvement_details", [(store_script_param, ":improvement_no", 1), (try_begin), (eq, ":improvement_no", slot_center_has_manor), (str_store_string, s0, "@Manor"), (str_store_string, s1, "@A manor lets you rest at the village and pay your troops half wages while you rest."), (assign, reg0, 8000), (else_try), (eq, ":improvement_no", slot_center_has_fish_pond), (str_store_string, s0, "@Mill"), (str_store_string, s1, "@A mill increases village prosperity by 5%."), (assign, reg0, 6000), (else_try), (eq, ":improvement_no", slot_center_has_watch_tower), (str_store_string, s0, "@Watch Tower"), (str_store_string, s1, "@A watch tower lets the villagers raise alarm earlier. The time it takes for enemies to loot the village increases by 25%."), (assign, reg0, 5000), (else_try), (eq, ":improvement_no", slot_center_has_school), (str_store_string, s0, "@School"), (str_store_string, s1, "@A shool increases the loyality of the villagers to you by +1 every month."), (assign, reg0, 9000), (else_try), (eq, ":improvement_no", slot_center_has_messenger_post), (str_store_string, s0, "@Messenger Post"), (str_store_string, s1, "@A messenger post lets the inhabitants send you a message whenever enemies are nearby, even if you are far away from here."), (assign, reg0, 4000), (else_try), (eq, ":improvement_no", slot_center_has_prisoner_tower), (str_store_string, s0, "@Prison Tower"), (str_store_string, s1, "@A prison tower reduces the chance of captives held here running away successfully."), (assign, reg0, 7000), (try_end), ]), #script_cf_troop_agent_is_alive # INPUT: arg1 = troop_id ("cf_troop_agent_is_alive", [(store_script_param, ":troop_no", 1), (assign, ":alive_count", 0), (try_for_agents, ":cur_agent"), (agent_get_troop_id, ":cur_agent_troop", ":cur_agent"), (eq, ":troop_no", ":cur_agent_troop"), (agent_is_alive, ":cur_agent"), (val_add, ":alive_count", 1), (try_end), (gt, ":alive_count", 0), ]), #script_cf_village_recruit_volunteers_cond # INPUT: none # OUTPUT: none ("cf_village_recruit_volunteers_cond", [(neg|party_slot_eq, "$current_town", slot_village_state, svs_looted), (neg|party_slot_eq, "$current_town", slot_village_state, svs_being_raided), (neg|party_slot_ge, "$current_town", slot_village_infested_by_bandits, 1), (store_faction_of_party, ":village_faction", "$current_town"), (party_get_slot, ":center_relation", "$current_town", slot_center_player_relation), (store_relation, ":village_faction_relation", ":village_faction", "fac_player_faction"), (ge, ":center_relation", 0), (this_or_next|ge, ":center_relation", 5), (this_or_next|eq, ":village_faction", "$players_kingdom"), (this_or_next|ge, ":village_faction_relation", 0), (this_or_next|eq, ":village_faction", "$supported_pretender_old_faction"), ( eq, "$players_kingdom", 0), (party_slot_ge, "$current_town", slot_center_volunteer_troop_amount, 0), (party_slot_ge, "$current_town", slot_center_volunteer_troop_type, 1), (party_get_free_companions_capacity, ":free_capacity", "p_main_party"), (ge, ":free_capacity", 1), ]), #script_village_recruit_volunteers_recruit # INPUT: none # OUTPUT: none ("village_recruit_volunteers_recruit", [(party_get_slot, ":volunteer_troop", "$current_town", slot_center_volunteer_troop_type), (party_get_slot, ":volunteer_amount", "$current_town", slot_center_volunteer_troop_amount), (party_get_free_companions_capacity, ":free_capacity", "p_main_party"), (val_min, ":volunteer_amount", ":free_capacity"), (store_troop_gold, ":gold", "trp_player"), (store_div, ":gold_capacity", ":gold", 10),#10 denars per man (val_min, ":volunteer_amount", ":gold_capacity"), (party_add_members, "p_main_party", ":volunteer_troop", ":volunteer_amount"), (party_set_slot, "$current_town", slot_center_volunteer_troop_amount, -1), (store_mul, ":cost", ":volunteer_amount", 10),#10 denars per man (troop_remove_gold, "trp_player", ":cost"), ]), #script_get_troop_item_amount # INPUT: arg1 = troop_no, arg2 = item_no # OUTPUT: reg0 = item_amount ("get_troop_item_amount", [(store_script_param, ":troop_no", 1), (store_script_param, ":item_no", 2), (troop_get_inventory_capacity, ":inv_cap", ":troop_no"), (assign, ":count", 0), (try_for_range, ":i_slot", 0, ":inv_cap"), (troop_get_inventory_slot, ":cur_item", ":troop_no", ":i_slot"), (eq, ":cur_item", ":item_no"), (val_add, ":count", 1), (try_end), (assign, reg0, ":count"), ]), #script_get_name_from_dna_to_s50 # INPUT: arg1 = dna # OUTPUT: s50 = name ("get_name_from_dna_to_s50", [(store_script_param, ":dna", 1), (store_sub, ":num_names", names_end, names_begin), (store_sub, ":num_surnames", surnames_end, surnames_begin), (assign, ":selected_name", ":dna"), (val_mod, ":selected_name", ":num_names"), (assign, ":selected_surname", ":dna"), (val_div, ":selected_surname", ":num_names"), (val_mod, ":selected_surname", ":num_surnames"), (val_add, ":selected_name", names_begin), (val_add, ":selected_surname", surnames_begin), (str_store_string, s50, ":selected_name"), (str_store_string, s50, ":selected_surname"), ]), #script_change_center_prosperity # INPUT: arg1 = center_no, arg2 = difference # OUTPUT: none ("change_center_prosperity", [(store_script_param, ":center_no", 1), (store_script_param, ":difference", 2), (party_get_slot, ":prosperity", ":center_no", slot_town_prosperity), (store_add, ":new_prosperity", ":prosperity", ":difference"), (val_clamp, ":new_prosperity", 0, 100), (store_div, ":old_state", ":prosperity", 20), (store_div, ":new_state", ":new_prosperity", 20), (try_begin), (neq, ":old_state", ":new_state"), (str_store_party_name_link, s2, ":center_no"), (call_script, "script_get_prosperity_text_to_s50", ":center_no"), (str_store_string, s3, s50), (party_set_slot, ":center_no", slot_town_prosperity, ":new_prosperity"), (call_script, "script_get_prosperity_text_to_s50", ":center_no"), (str_store_string, s4, s50), (display_message, "@Prosperity of {s2} has changed from {s3} to {s4}."), (call_script, "script_update_center_notes", ":center_no"), (else_try), (party_set_slot, ":center_no", slot_town_prosperity, ":new_prosperity"), (try_end), ]), #script_get_center_ideal_prosperity # INPUT: arg1 = center_no # OUTPUT: reg0 = ideal_prosperity ("get_center_ideal_prosperity", [(store_script_param, ":center_no", 1), (assign, ":ideal", 40), (try_begin), (is_between, ":center_no", villages_begin, villages_end), (try_begin), (party_slot_eq, ":center_no", slot_center_has_fish_pond, 1), (val_add, ":ideal", 5), (try_end), (party_get_slot, ":land_quality", ":center_no", slot_village_land_quality), (val_mul, ":land_quality", 3), (val_add, ":ideal", ":land_quality"), (party_get_slot, ":num_cattle", ":center_no", slot_village_number_of_cattle), (val_div, ":num_cattle", 20), (val_add, ":ideal", ":num_cattle"), (else_try), (try_for_range, ":village_no", villages_begin, villages_end), (party_slot_eq, ":village_no", slot_village_bound_center, ":center_no"), (party_get_slot, ":prosperity", ":village_no", slot_town_prosperity), (val_div, ":prosperity", 20), (val_add, ":ideal", ":prosperity"), (try_end), (try_end), (assign, reg0, ":ideal"), ]), #script_get_poorest_village_of_faction # INPUT: arg1 = center_no # OUTPUT: reg0 = ideal_prosperity ("get_poorest_village_of_faction", [(store_script_param, ":faction_no", 1), (assign, ":min_prosperity_village", -1), (assign, ":min_prosperity", 101), (try_for_range, ":village_no", villages_begin, villages_end), (store_faction_of_party, ":village_faction", ":village_no"), (eq, ":village_faction", ":faction_no"), (party_get_slot, ":prosperity", ":village_no", slot_town_prosperity), (lt, ":prosperity", ":min_prosperity"), (assign, ":min_prosperity", ":prosperity"), (assign, ":min_prosperity_village", ":village_no"), (try_end), (assign, reg0, ":min_prosperity_village"), ]), #script_troop_add_gold # INPUT: arg1 = troop_no, arg2 = amount # OUTPUT: none ("troop_add_gold", [(store_script_param, ":troop_no", 1), (store_script_param, ":amount", 2), (troop_add_gold, ":troop_no", ":amount"), (try_begin), (eq, ":troop_no", "trp_player"), (play_sound, "snd_money_received"), (try_end), ]), #NPC companion changes begin ("initialize_npcs", [ # set strings (troop_set_slot, "trp_npc1", slot_troop_morality_type, tmt_egalitarian), #borcha (troop_set_slot, "trp_npc1", slot_troop_morality_value, 4), #borcha (troop_set_slot, "trp_npc1", slot_troop_2ary_morality_type, tmt_aristocratic), #borcha (troop_set_slot, "trp_npc1", slot_troop_2ary_morality_value, -1), (troop_set_slot, "trp_npc1", slot_troop_personalityclash_object, "trp_npc7"), #borcha - deshavi (troop_set_slot, "trp_npc1", slot_troop_personalityclash2_object, "trp_npc16"), #borcha - klethi (troop_set_slot, "trp_npc1", slot_troop_personalitymatch_object, "trp_npc2"), #borcha - marnid (troop_set_slot, "trp_npc1", slot_troop_home, "p_village_71"), #Tshibtin (troop_set_slot, "trp_npc1", slot_troop_payment_request, 300), (troop_set_slot, "trp_npc2", slot_troop_morality_type, tmt_humanitarian), #marnid (troop_set_slot, "trp_npc2", slot_troop_morality_value, 2), (troop_set_slot, "trp_npc2", slot_troop_2ary_morality_type, tmt_honest), (troop_set_slot, "trp_npc2", slot_troop_2ary_morality_value, 1), (troop_set_slot, "trp_npc2", slot_troop_personalityclash_object, "trp_npc5"), #marnid - beheshtur (troop_set_slot, "trp_npc2", slot_troop_personalityclash2_object, "trp_npc9"), #marnid - alayen (troop_set_slot, "trp_npc2", slot_troop_personalitymatch_object, "trp_npc1"), #marnid - borcha (troop_set_slot, "trp_npc2", slot_troop_home, "p_town_1"), #Sargoth (troop_set_slot, "trp_npc2", slot_troop_payment_request, 0), # (troop_set_slot, "trp_npc3", slot_troop_morality_type, tmt_humanitarian), #Ymira (troop_set_slot, "trp_npc3", slot_troop_morality_value, 4), (troop_set_slot, "trp_npc3", slot_troop_2ary_morality_type, tmt_aristocratic), (troop_set_slot, "trp_npc3", slot_troop_2ary_morality_value, -1), (troop_set_slot, "trp_npc3", slot_troop_personalityclash_object, "trp_npc14"), #Ymira - artimenner (troop_set_slot, "trp_npc3", slot_troop_personalityclash2_object, "trp_npc8"), #Ymira - matheld (troop_set_slot, "trp_npc3", slot_troop_personalitymatch_object, "trp_npc9"), #Ymira - alayen (troop_set_slot, "trp_npc3", slot_troop_home, "p_town_3"), #Veluca (troop_set_slot, "trp_npc3", slot_troop_payment_request, 0), (troop_set_slot, "trp_npc4", slot_troop_morality_type, tmt_aristocratic), #Rolf (troop_set_slot, "trp_npc4", slot_troop_morality_value, 4), (troop_set_slot, "trp_npc4", slot_troop_2ary_morality_type, tmt_honest), (troop_set_slot, "trp_npc4", slot_troop_2ary_morality_value, -1), (troop_set_slot, "trp_npc4", slot_troop_personalityclash_object, "trp_npc10"), #Rolf - bunduk (troop_set_slot, "trp_npc4", slot_troop_personalityclash2_object, "trp_npc7"), #Rolf - deshavi (troop_set_slot, "trp_npc4", slot_troop_personalitymatch_object, "trp_npc5"), #Rolf - beheshtur (troop_set_slot, "trp_npc4", slot_troop_home, "p_village_34"), #Ehlerdah (troop_set_slot, "trp_npc4", slot_troop_payment_request, 300), (troop_set_slot, "trp_npc5", slot_troop_morality_type, tmt_egalitarian), #beheshtur (troop_set_slot, "trp_npc5", slot_troop_morality_value, 3), #beheshtur (troop_set_slot, "trp_npc5", slot_troop_2ary_morality_type, -1), (troop_set_slot, "trp_npc5", slot_troop_2ary_morality_value, 0), (troop_set_slot, "trp_npc5", slot_troop_personalityclash_object, "trp_npc2"), #beheshtur - marnid (troop_set_slot, "trp_npc5", slot_troop_personalityclash2_object, "trp_npc11"), #beheshtur- katrin (troop_set_slot, "trp_npc5", slot_troop_personalitymatch_object, "trp_npc4"), #beheshtur - rolf (troop_set_slot, "trp_npc5", slot_troop_home, "p_town_14"), #Halmar (troop_set_slot, "trp_npc5", slot_troop_payment_request, 400), (troop_set_slot, "trp_npc6", slot_troop_morality_type, tmt_humanitarian), #firenz (troop_set_slot, "trp_npc6", slot_troop_morality_value, 2), #beheshtur (troop_set_slot, "trp_npc6", slot_troop_2ary_morality_type, tmt_honest), (troop_set_slot, "trp_npc6", slot_troop_2ary_morality_value, 1), (troop_set_slot, "trp_npc6", slot_troop_personalityclash_object, "trp_npc11"), #firenz (troop_set_slot, "trp_npc6", slot_troop_personalityclash2_object, "trp_npc13"), #firenz - nizar (troop_set_slot, "trp_npc6", slot_troop_personalitymatch_object, "trp_npc12"), #firenz - jeremus (troop_set_slot, "trp_npc6", slot_troop_home, "p_town_4"), #Suno (troop_set_slot, "trp_npc6", slot_troop_payment_request, 0), (troop_set_slot, "trp_npc7", slot_troop_morality_type, tmt_egalitarian), #deshavi (troop_set_slot, "trp_npc7", slot_troop_morality_value, 3), #beheshtur (troop_set_slot, "trp_npc7", slot_troop_2ary_morality_type, -1), (troop_set_slot, "trp_npc7", slot_troop_2ary_morality_value, 0), (troop_set_slot, "trp_npc7", slot_troop_personalityclash_object, "trp_npc1"), #deshavi (troop_set_slot, "trp_npc7", slot_troop_personalityclash2_object, "trp_npc4"), #deshavi - rolf (troop_set_slot, "trp_npc7", slot_troop_personalitymatch_object, "trp_npc16"), #deshavi - klethi (troop_set_slot, "trp_npc7", slot_troop_home, "p_village_5"), #Kulum # (troop_set_slot, "trp_npc7", slot_troop_payment_request, 300), (troop_set_slot, "trp_npc8", slot_troop_morality_type, tmt_aristocratic), #matheld (troop_set_slot, "trp_npc8", slot_troop_morality_value, 3), #beheshtur (troop_set_slot, "trp_npc8", slot_troop_2ary_morality_type, -1), (troop_set_slot, "trp_npc8", slot_troop_2ary_morality_value, 0), (troop_set_slot, "trp_npc8", slot_troop_personalityclash_object, "trp_npc12"), #matheld (troop_set_slot, "trp_npc8", slot_troop_personalityclash2_object, "trp_npc3"), #matheld - ymira (troop_set_slot, "trp_npc8", slot_troop_personalitymatch_object, "trp_npc13"), #matheld - nizar (troop_set_slot, "trp_npc8", slot_troop_home, "p_sea_raider_spawn_point_2"), #Gundig's Point (troop_set_slot, "trp_npc8", slot_troop_payment_request, 500), (troop_set_slot, "trp_npc9", slot_troop_morality_type, tmt_aristocratic), #alayen (troop_set_slot, "trp_npc9", slot_troop_morality_value, 2), #beheshtur (troop_set_slot, "trp_npc9", slot_troop_2ary_morality_type, tmt_honest), (troop_set_slot, "trp_npc9", slot_troop_2ary_morality_value, 1), (troop_set_slot, "trp_npc9", slot_troop_personalityclash_object, "trp_npc13"), #alayen (troop_set_slot, "trp_npc9", slot_troop_personalityclash2_object, "trp_npc2"), #alayen - marnid (troop_set_slot, "trp_npc9", slot_troop_personalitymatch_object, "trp_npc3"), #alayen - ymira (troop_set_slot, "trp_npc9", slot_troop_home, "p_town_13"), #Rivacheg (troop_set_slot, "trp_npc9", slot_troop_payment_request, 300), (troop_set_slot, "trp_npc10", slot_troop_morality_type, tmt_humanitarian), #bunduk (troop_set_slot, "trp_npc10", slot_troop_morality_value, 2), (troop_set_slot, "trp_npc10", slot_troop_2ary_morality_type, tmt_egalitarian), (troop_set_slot, "trp_npc10", slot_troop_2ary_morality_value, 1), (troop_set_slot, "trp_npc10", slot_troop_personalityclash_object, "trp_npc4"), #bunduk (troop_set_slot, "trp_npc10", slot_troop_personalityclash2_object, "trp_npc14"), #bunduk - lazalet (troop_set_slot, "trp_npc10", slot_troop_personalitymatch_object, "trp_npc11"), #bunduk - katrin (troop_set_slot, "trp_npc10", slot_troop_home, "p_castle_28"), #Grunwalder Castle (troop_set_slot, "trp_npc10", slot_troop_payment_request, 200), (troop_set_slot, "trp_npc11", slot_troop_morality_type, tmt_egalitarian), #katrin (troop_set_slot, "trp_npc11", slot_troop_morality_value, 3), (troop_set_slot, "trp_npc11", slot_troop_2ary_morality_type, -1), (troop_set_slot, "trp_npc11", slot_troop_2ary_morality_value, 0), (troop_set_slot, "trp_npc11", slot_troop_personalityclash_object, "trp_npc6"), #katrin (troop_set_slot, "trp_npc11", slot_troop_personalityclash2_object, "trp_npc5"), #katrin - beheshtur (troop_set_slot, "trp_npc11", slot_troop_personalitymatch_object, "trp_npc10"), #bunduk - katrin (troop_set_slot, "trp_npc11", slot_troop_home, "p_town_6"), #Praven (troop_set_slot, "trp_npc11", slot_troop_payment_request, 100), (troop_set_slot, "trp_npc12", slot_troop_morality_type, tmt_humanitarian), #jerem (troop_set_slot, "trp_npc12", slot_troop_morality_value, 3), (troop_set_slot, "trp_npc12", slot_troop_2ary_morality_type, -1), (troop_set_slot, "trp_npc12", slot_troop_2ary_morality_value, 0), (troop_set_slot, "trp_npc12", slot_troop_personalityclash_object, "trp_npc8"), #jerem (troop_set_slot, "trp_npc12", slot_troop_personalityclash2_object, "trp_npc15"), #jeremus - artimenner (troop_set_slot, "trp_npc12", slot_troop_personalitymatch_object, "trp_npc6"), #jeremus - firenz (troop_set_slot, "trp_npc12", slot_troop_home, "p_castle_16"), #undetermined #University (troop_set_slot, "trp_npc12", slot_troop_payment_request, 0), (troop_set_slot, "trp_npc13", slot_troop_morality_type, tmt_aristocratic), #nizar (troop_set_slot, "trp_npc13", slot_troop_morality_value, 3), (troop_set_slot, "trp_npc13", slot_troop_2ary_morality_type, -1), (troop_set_slot, "trp_npc13", slot_troop_2ary_morality_value, 0), (troop_set_slot, "trp_npc13", slot_troop_personalityclash_object, "trp_npc9"), #nizar (troop_set_slot, "trp_npc13", slot_troop_personalityclash2_object, "trp_npc6"), #nizar - firenz (troop_set_slot, "trp_npc13", slot_troop_personalitymatch_object, "trp_npc8"), #nizar - matheld (troop_set_slot, "trp_npc13", slot_troop_home, "p_castle_15"), #Ergellon Castle (troop_set_slot, "trp_npc13", slot_troop_payment_request, 300), (troop_set_slot, "trp_npc14", slot_troop_morality_type, tmt_aristocratic), #lazalit (troop_set_slot, "trp_npc14", slot_troop_morality_value, 4), (troop_set_slot, "trp_npc14", slot_troop_2ary_morality_type, tmt_egalitarian), (troop_set_slot, "trp_npc14", slot_troop_2ary_morality_value, -1), (troop_set_slot, "trp_npc14", slot_troop_personalityclash_object, "trp_npc3"), #lazalit (troop_set_slot, "trp_npc14", slot_troop_personalityclash2_object, "trp_npc10"), #lazalit - bunduk (troop_set_slot, "trp_npc14", slot_troop_personalitymatch_object, "trp_npc15"), #lazalit - artimenner (troop_set_slot, "trp_npc14", slot_troop_home, "p_castle_18"), #Ismirala Castle (troop_set_slot, "trp_npc14", slot_troop_payment_request, 400), (troop_set_slot, "trp_npc15", slot_troop_morality_type, tmt_egalitarian), #artimenner (troop_set_slot, "trp_npc15", slot_troop_morality_value, 2), (troop_set_slot, "trp_npc15", slot_troop_2ary_morality_type, tmt_honest), (troop_set_slot, "trp_npc15", slot_troop_2ary_morality_value, 1), (troop_set_slot, "trp_npc15", slot_troop_personalityclash_object, "trp_npc16"), #artimenner - klethi (troop_set_slot, "trp_npc15", slot_troop_personalityclash2_object, "trp_npc12"), #artimenner - jeremus (troop_set_slot, "trp_npc15", slot_troop_personalitymatch_object, "trp_npc14"), #lazalit - artimenner (troop_set_slot, "trp_npc15", slot_troop_home, "p_castle_1"), #Culmarr Castle (troop_set_slot, "trp_npc15", slot_troop_payment_request, 300), (troop_set_slot, "trp_npc16", slot_troop_morality_type, tmt_aristocratic), #klethi (troop_set_slot, "trp_npc16", slot_troop_morality_value, 4), (troop_set_slot, "trp_npc16", slot_troop_2ary_morality_type, tmt_humanitarian), (troop_set_slot, "trp_npc16", slot_troop_2ary_morality_value, -1), (troop_set_slot, "trp_npc16", slot_troop_personalityclash_object, "trp_npc15"), #klethi (troop_set_slot, "trp_npc16", slot_troop_personalityclash2_object, "trp_npc1"), #klethi - borcha (troop_set_slot, "trp_npc16", slot_troop_personalitymatch_object, "trp_npc7"), #deshavi - klethi (troop_set_slot, "trp_npc16", slot_troop_home, "p_village_20"), #Uslum (troop_set_slot, "trp_npc16", slot_troop_payment_request, 200), (store_sub, "$number_of_npc_slots", slot_troop_strings_end, slot_troop_intro), (try_for_range, ":npc", companions_begin, companions_end), (try_for_range, ":slot_addition", 0, "$number_of_npc_slots"), (store_add, ":slot", ":slot_addition", slot_troop_intro), (store_mul, ":string_addition", ":slot_addition", 16), (store_add, ":string", "str_npc1_intro", ":string_addition"), (val_add, ":string", ":npc"), (val_sub, ":string", companions_begin), (troop_set_slot, ":npc", ":slot", ":string"), (try_end), (try_end), #Troop commentary changes begin (try_for_range, ":lord", "trp_knight_1_1", "trp_heroes_end"), (store_random_in_range, ":reputation", 0, 8), (try_begin), (eq, ":reputation", 0), (assign, ":reputation", 1), (try_end), (troop_set_slot, ":lord", slot_lord_reputation_type, ":reputation"), (try_end), #Troop commentary changes end #Post 0907 changes begin (call_script, "script_add_log_entry", logent_game_start, "trp_player", -1, -1, -1), #Post 0907 changes end #Rebellion changes begin (troop_set_slot, "trp_kingdom_1_pretender", slot_troop_original_faction, "fac_kingdom_1"), (troop_set_slot, "trp_kingdom_2_pretender", slot_troop_original_faction, "fac_kingdom_2"), (troop_set_slot, "trp_kingdom_3_pretender", slot_troop_original_faction, "fac_kingdom_3"), (troop_set_slot, "trp_kingdom_4_pretender", slot_troop_original_faction, "fac_kingdom_4"), (troop_set_slot, "trp_kingdom_5_pretender", slot_troop_original_faction, "fac_kingdom_5"), (troop_set_slot, "trp_kingdom_1_pretender", slot_troop_support_base, "p_town_4"), #suno (troop_set_slot, "trp_kingdom_2_pretender", slot_troop_support_base, "p_town_11"), #curaw (troop_set_slot, "trp_kingdom_3_pretender", slot_troop_support_base, "p_town_18"), #town_18 (troop_set_slot, "trp_kingdom_4_pretender", slot_troop_support_base, "p_town_12"), #wercheg (troop_set_slot, "trp_kingdom_5_pretender", slot_troop_support_base, "p_town_3"), #veluca (try_for_range, ":pretender", pretenders_begin, pretenders_end), (troop_set_slot, ":pretender", slot_lord_reputation_type, lrep_none), (try_end), #Rebellion changes end ]), ("objectionable_action", [ (store_script_param_1, ":action_type"), (store_script_param_2, ":action_string"), # (str_store_string, 12, ":action_string"), # (display_message, "@Objectionable action check: {s12}"), (assign, ":grievance_minimum", -2), (try_for_range, ":npc", companions_begin, companions_end), (main_party_has_troop, ":npc"), ###Primary morality check (try_begin), (troop_slot_eq, ":npc", slot_troop_morality_type, ":action_type"), (troop_get_slot, ":value", ":npc", slot_troop_morality_value), (try_begin), (troop_slot_eq, ":npc", slot_troop_morality_state, tms_acknowledged), # npc is betrayed, major penalty to player honor and morale (troop_get_slot, ":grievance", ":npc", slot_troop_morality_penalties), (val_mul, ":value", 2), (val_add, ":grievance", ":value"), (troop_set_slot, ":npc", slot_troop_morality_penalties, ":grievance"), (else_try), (this_or_next|troop_slot_eq, ":npc", slot_troop_morality_state, tms_dismissed), (eq, "$disable_npc_complaints", 1), # npc is quietly disappointed (troop_get_slot, ":grievance", ":npc", slot_troop_morality_penalties), (val_add, ":grievance", ":value"), (troop_set_slot, ":npc", slot_troop_morality_penalties, ":grievance"), (else_try), # npc raises the issue for the first time (troop_slot_eq, ":npc", slot_troop_morality_state, tms_no_problem), (gt, ":value", ":grievance_minimum"), (assign, "$npc_with_grievance", ":npc"), (assign, "$npc_grievance_string", ":action_string"), (assign, "$npc_grievance_slot", slot_troop_morality_state), (assign, ":grievance_minimum", ":value"), (assign, "$npc_praise_not_complaint", 0), (try_begin), (lt, ":value", 0), (assign, "$npc_praise_not_complaint", 1), (try_end), (try_end), ###Secondary morality check (else_try), (troop_slot_eq, ":npc", slot_troop_2ary_morality_type, ":action_type"), (troop_get_slot, ":value", ":npc", slot_troop_2ary_morality_value), (try_begin), (troop_slot_eq, ":npc", slot_troop_2ary_morality_state, tms_acknowledged), # npc is betrayed, major penalty to player honor and morale (troop_get_slot, ":grievance", ":npc", slot_troop_morality_penalties), (val_mul, ":value", 2), (val_add, ":grievance", ":value"), (troop_set_slot, ":npc", slot_troop_morality_penalties, ":grievance"), (else_try), (this_or_next|troop_slot_eq, ":npc", slot_troop_2ary_morality_state, tms_dismissed), (eq, "$disable_npc_complaints", 1), # npc is quietly disappointed (troop_get_slot, ":grievance", ":npc", slot_troop_morality_penalties), (val_add, ":grievance", ":value"), (troop_set_slot, ":npc", slot_troop_morality_penalties, ":grievance"), (else_try), # npc raises the issue for the first time (troop_slot_eq, ":npc", slot_troop_2ary_morality_state, tms_no_problem), (gt, ":value", ":grievance_minimum"), (assign, "$npc_with_grievance", ":npc"), (assign, "$npc_grievance_string", ":action_string"), (assign, "$npc_grievance_slot", slot_troop_2ary_morality_state), (assign, ":grievance_minimum", ":value"), (assign, "$npc_praise_not_complaint", 0), (try_begin), (lt, ":value", 0), (assign, "$npc_praise_not_complaint", 1), (try_end), (try_end), (try_end), (try_begin), (gt, "$npc_with_grievance", 0), (eq, "$npc_praise_not_complaint", 0), (str_store_troop_name, 4, "$npc_with_grievance"), (display_message, "@{s4} looks upset."), (try_end), (try_end), ]), ("post_battle_personality_clash_check", [ # (display_message, "@Post-victory personality clash check"), (try_for_range, ":npc", companions_begin, companions_end), (eq, "$disable_npc_complaints", 0), (main_party_has_troop, ":npc"), (neg|troop_is_wounded, ":npc"), (troop_get_slot, ":other_npc", ":npc", slot_troop_personalityclash2_object), (main_party_has_troop, ":other_npc"), (neg|troop_is_wounded, ":other_npc"), # (store_random_in_range, ":random", 0, 3), (try_begin), (troop_slot_eq, ":npc", slot_troop_personalityclash2_state, 0), (try_begin), # (eq, ":random", 0), (assign, "$npc_with_personality_clash_2", ":npc"), (try_end), (try_end), (try_end), (try_for_range, ":npc", companions_begin, companions_end), (troop_slot_eq, ":npc", slot_troop_personalitymatch_state, 0), (eq, "$disable_npc_complaints", 0), (main_party_has_troop, ":npc"), (neg|troop_is_wounded, ":npc"), (troop_get_slot, ":other_npc", ":npc", slot_troop_personalitymatch_object), (main_party_has_troop, ":other_npc"), (neg|troop_is_wounded, ":other_npc"), (assign, "$npc_with_personality_match", ":npc"), (try_end), (try_begin), (gt, "$npc_with_personality_clash_2", 0), (assign, "$npc_map_talk_context", slot_troop_personalityclash2_state), (start_map_conversation, "$npc_with_personality_clash_2"), (else_try), (gt, "$npc_with_personality_match", 0), (assign, "$npc_map_talk_context", slot_troop_personalitymatch_state), (start_map_conversation, "$npc_with_personality_match"), (try_end), ]), #script_event_player_defeated_enemy_party # INPUT: none # OUTPUT: none ("event_player_defeated_enemy_party", [(try_begin), (check_quest_active, "qst_raid_caravan_to_start_war"), (neg|check_quest_concluded, "qst_raid_caravan_to_start_war"), (party_slot_eq, "$g_enemy_party", slot_party_type, spt_kingdom_caravan), (store_faction_of_party, ":enemy_faction", "$g_enemy_party"), (quest_slot_eq, "qst_raid_caravan_to_start_war", slot_quest_target_faction, ":enemy_faction"), (quest_get_slot, ":cur_state", "qst_raid_caravan_to_start_war", slot_quest_current_state), (quest_get_slot, ":quest_target_amount", "qst_raid_caravan_to_start_war", slot_quest_target_amount), (val_add, ":cur_state", 1), (quest_set_slot, "qst_raid_caravan_to_start_war", slot_quest_current_state, ":cur_state"), (try_begin), (ge, ":cur_state", ":quest_target_amount"), (quest_get_slot, ":quest_target_faction", "qst_raid_caravan_to_start_war", slot_quest_target_faction), (quest_get_slot, ":quest_giver_troop", "qst_raid_caravan_to_start_war", slot_quest_giver_troop), (store_troop_faction, ":quest_giver_faction", ":quest_giver_troop"), (call_script, "script_diplomacy_start_war_between_kingdoms", ":quest_target_faction", ":quest_giver_faction", 1), (call_script, "script_succeed_quest", "qst_raid_caravan_to_start_war"), (try_end), (try_end), ]), #script_event_player_captured_as_prisoner # INPUT: none # OUTPUT: none ("event_player_captured_as_prisoner", [ (try_begin), (check_quest_active, "qst_raid_caravan_to_start_war"), (neg|check_quest_concluded, "qst_raid_caravan_to_start_war"), (quest_get_slot, ":quest_target_faction", "qst_raid_caravan_to_start_war", slot_quest_target_faction), (store_faction_of_party, ":capturer_faction", "$capturer_party"), (eq, ":quest_target_faction", ":capturer_faction"), (call_script, "script_fail_quest", "qst_raid_caravan_to_start_war"), (try_end), #Removing followers of the player (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), (gt, ":party_no", 0), (party_slot_eq, ":party_no", slot_party_commander_party, "p_main_party"), (call_script, "script_party_set_ai_state", ":party_no", spai_undefined, -1), (party_set_slot, ":party_no", slot_party_commander_party, -1), (assign, "$g_recalculate_ais", 1), (try_end), ]), #NPC morale both returns a string and reg0 as the morale value ("npc_morale", [ (store_script_param_1, ":npc"), (troop_get_slot, ":morality_grievances", ":npc", slot_troop_morality_penalties), (troop_get_slot, ":personality_grievances", ":npc", slot_troop_personalityclash_penalties), (party_get_morale, ":party_morale", "p_main_party"), (store_sub, ":troop_morale", ":party_morale", ":morality_grievances"), (val_sub, ":troop_morale", ":personality_grievances"), (val_add, ":troop_morale", 50), (assign, reg8, ":troop_morale"), (val_mul, ":troop_morale", 3), (val_div, ":troop_morale", 4), (val_clamp, ":troop_morale", 0, 100), (assign, reg5, ":party_morale"), (assign, reg6, ":morality_grievances"), (assign, reg7, ":personality_grievances"), (assign, reg9, ":troop_morale"), # (str_store_troop_name, s11, ":npc"), # (display_message, "@{s11}'s morale = PM{reg5} + 50 - MG{reg6} - PG{reg7} = {reg8} x 0.75 = {reg9}"), (try_begin), (lt, ":morality_grievances", 3), (str_store_string, 7, "str_happy"), (else_try), (lt, ":morality_grievances", 15), (str_store_string, 7, "str_content"), (else_try), (lt, ":morality_grievances", 30), (str_store_string, 7, "str_concerned"), (else_try), (lt, ":morality_grievances", 45), (str_store_string, 7, "str_not_happy"), (else_try), (str_store_string, 7, "str_miserable"), (try_end), (try_begin), (lt, ":personality_grievances", 3), (str_store_string, 6, "str_happy"), (else_try), (lt, ":personality_grievances", 15), (str_store_string, 6, "str_content"), (else_try), (lt, ":personality_grievances", 30), (str_store_string, 6, "str_concerned"), (else_try), (lt, ":personality_grievances", 45), (str_store_string, 6, "str_not_happy"), (else_try), (str_store_string, 6, "str_miserable"), (try_end), (try_begin), (gt, ":troop_morale", 80), (str_store_string, 8, "str_happy"), (str_store_string, 63, "str_bar_enthusiastic"), (else_try), (gt, ":troop_morale", 60), (str_store_string, 8, "str_content"), (str_store_string, 63, "str_bar_content"), (else_try), (gt, ":troop_morale", 40), (str_store_string, 8, "str_concerned"), (str_store_string, 63, "str_bar_weary"), (else_try), (gt, ":troop_morale", 20), (str_store_string, 8, "str_not_happy"), (str_store_string, 63, "str_bar_disgruntled"), (else_try), (str_store_string, 8, "str_miserable"), (str_store_string, 63, "str_bar_miserable"), (try_end), (str_store_string, 21, "str_npc_morale_report"), (assign, reg0, ":troop_morale"), ]), #NPC morale both returns a string and reg0 as the morale value # ("retire_companion", [ (store_script_param_1, ":npc"), (store_script_param_2, ":length"), (remove_member_from_party, ":npc", "p_main_party"), (troop_set_slot, ":npc", slot_troop_personalityclash_penalties, 0), (troop_set_slot, ":npc", slot_troop_morality_penalties, 0), (troop_get_slot, ":renown", "trp_player", slot_troop_renown), (store_add, ":return_renown", ":renown", ":length"), (troop_set_slot, ":npc", slot_troop_occupation, slto_retirement), (troop_set_slot, ":npc", slot_troop_return_renown, ":return_renown"), ]), #NPC companion changes end #script_reduce_companion_morale_for_clash #script_calculate_ransom_amount_for_troop # INPUT: arg1 = troop_no for companion1 arg2 = troop_no for companion2 arg3 = slot_for_clash_state # slot_for_clash_state means: 1=give full penalty to companion1; 2=give full penalty to companion2; 3=give penalty equally ("reduce_companion_morale_for_clash", [ (store_script_param, ":companion_1", 1), (store_script_param, ":companion_2", 2), (store_script_param, ":slot_for_clash_state", 3), (troop_get_slot, ":clash_state", ":companion_1", ":slot_for_clash_state"), (troop_get_slot, ":grievance_1", ":companion_1", slot_troop_personalityclash_penalties), (troop_get_slot, ":grievance_2", ":companion_2", slot_troop_personalityclash_penalties), (try_begin), (eq, ":clash_state", pclash_penalty_to_self), (val_add, ":grievance_1", 5), (else_try), (eq, ":clash_state", pclash_penalty_to_other), (val_add, ":grievance_2", 5), (else_try), (eq, ":clash_state", pclash_penalty_to_both), (val_add, ":grievance_1", 3), (val_add, ":grievance_2", 3), (try_end), (troop_set_slot, ":companion_1", slot_troop_personalityclash_penalties, ":grievance_1"), (troop_set_slot, ":companion_2", slot_troop_personalityclash_penalties, ":grievance_2"), ]), #Hunting scripts end #script_calculate_ransom_amount_for_troop # INPUT: arg1 = troop_no # OUTPUT: reg0 = ransom_amount ("calculate_ransom_amount_for_troop", [(store_script_param, ":troop_no", 1), (store_troop_faction, ":faction_no", ":troop_no"), (assign, ":ransom_amount", 400), (try_begin), (faction_slot_eq, ":faction_no", slot_faction_leader, ":troop_no"), (val_add, ":ransom_amount", 4000), (try_end), (assign, ":num_center_points", 0), (try_for_range, ":cur_center", centers_begin, centers_end), (party_slot_eq, ":cur_center", slot_town_lord, ":troop_no"), (try_begin), (party_slot_eq, ":cur_center", slot_party_type, spt_town), (val_add, ":num_center_points", 4), (else_try), (party_slot_eq, ":cur_center", slot_party_type, spt_castle), (val_add, ":num_center_points", 2), (else_try), (val_add, ":num_center_points", 1), (try_end), (try_end), (val_mul, ":num_center_points", 500), (val_add, ":ransom_amount", ":num_center_points"), (troop_get_slot, ":renown", ":troop_no", slot_troop_renown), (val_mul, ":renown", 2), (val_add, ":ransom_amount", ":renown"), (store_mul, ":ransom_max_amount", ":ransom_amount", 3), (val_div, ":ransom_max_amount", 2), (store_random_in_range, ":random_ransom_amount", ":ransom_amount", ":ransom_max_amount"), (val_div, ":random_ransom_amount", 100), (val_mul, ":random_ransom_amount", 100), (assign, reg0, ":random_ransom_amount"), ]), #script_offer_ransom_amount_to_player_for_prisoners_in_party # INPUT: arg1 = party_no # OUTPUT: reg0 = result (1 = offered, 0 = not offered) ("offer_ransom_amount_to_player_for_prisoners_in_party", [(store_script_param, ":party_no", 1), (assign, ":result", 0), (party_get_num_prisoner_stacks, ":num_stacks", ":party_no"), (try_for_range, ":i_stack", 0, ":num_stacks"), (eq, ":result", 0), (party_prisoner_stack_get_troop_id, ":stack_troop", ":party_no", ":i_stack"), (troop_is_hero, ":stack_troop"), (troop_slot_eq, ":stack_troop", slot_troop_occupation, slto_kingdom_hero), (store_troop_faction, ":stack_troop_faction", ":stack_troop"), (store_random_in_range, ":random_no", 0, 100), (try_begin), (faction_slot_eq, ":stack_troop_faction", slot_faction_state, sfs_active), (le, ":random_no", 5), (neq, "$g_ransom_offer_rejected", 1), (assign, ":num_stacks", 0), #break (assign, ":result", 1), (assign, "$g_ransom_offer_troop", ":stack_troop"), (assign, "$g_ransom_offer_party", ":party_no"), (jump_to_menu, "mnu_enemy_offer_ransom_for_prisoner"), (try_end), (try_end), (assign, reg0, ":result"), ]), # script_event_hero_taken_prisoner_by_player # Input: arg1 = troop_no # Output: none ("event_hero_taken_prisoner_by_player", [ (store_script_param_1, ":troop_no"), (try_begin), (check_quest_active, "qst_persuade_lords_to_make_peace"), (try_begin), (quest_slot_eq, "qst_persuade_lords_to_make_peace", slot_quest_target_troop, ":troop_no"), (val_mul, ":troop_no", -1), (quest_set_slot, "qst_persuade_lords_to_make_peace", slot_quest_target_troop, ":troop_no"), (val_mul, ":troop_no", -1), (else_try), (quest_slot_eq, "qst_persuade_lords_to_make_peace", slot_quest_object_troop, ":troop_no"), (val_mul, ":troop_no", -1), (quest_set_slot, "qst_persuade_lords_to_make_peace", slot_quest_object_troop, ":troop_no"), (val_mul, ":troop_no", -1), (try_end), (neg|check_quest_concluded, "qst_persuade_lords_to_make_peace"), (neg|quest_slot_ge, "qst_persuade_lords_to_make_peace", slot_quest_target_troop, 0), (neg|quest_slot_ge, "qst_persuade_lords_to_make_peace", slot_quest_object_troop, 0), (call_script, "script_succeed_quest", "qst_persuade_lords_to_make_peace"), (try_end), (call_script, "script_update_troop_location_notes", ":troop_no", 0), ]), # script_cf_check_hero_can_escape_from_player # Input: arg1 = troop_no # Output: none (can fail) ("cf_check_hero_can_escape_from_player", [ (store_script_param_1, ":troop_no"), (assign, ":quest_target", 0), (try_begin), (check_quest_active, "qst_persuade_lords_to_make_peace"), (this_or_next|quest_slot_eq, "qst_persuade_lords_to_make_peace", slot_quest_target_troop, ":troop_no"), (quest_slot_eq, "qst_persuade_lords_to_make_peace", slot_quest_object_troop, ":troop_no"), (assign, ":quest_target", 1), (try_end), (eq, ":quest_target", 0), (store_random_in_range, ":rand", 0, 100), (lt, ":rand", hero_escape_after_defeat_chance), ]), # script_cf_party_remove_random_regular_troop # Input: arg1 = party_no # Output: troop_id that has been removed (can fail) ("cf_party_remove_random_regular_troop", [(store_script_param_1, ":party_no"), (party_get_num_companion_stacks, ":num_stacks", ":party_no"), (assign, ":num_troops", 0), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop", ":party_no", ":i_stack"), (neg|troop_is_hero, ":stack_troop"), (party_stack_get_size, ":stack_size", ":party_no", ":i_stack"), (val_add, ":num_troops", ":stack_size"), (try_end), (assign, reg0, -1), (gt, ":num_troops", 0), (store_random_in_range, ":random_troop", 0, ":num_troops"), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop", ":party_no", ":i_stack"), (neg|troop_is_hero, ":stack_troop"), (party_stack_get_size, ":stack_size", ":party_no", ":i_stack"), (val_sub, ":random_troop", ":stack_size"), (lt, ":random_troop", 0), (assign, ":num_stacks", 0), #break (party_remove_members, ":party_no", ":stack_troop", 1), (assign, reg0, ":stack_troop"), (try_end), ]), # script_place_player_banner_near_inventory # Input: none # Output: none ("place_player_banner_near_inventory", [ #normal_banner_begin (troop_get_slot, ":troop_banner_object", "trp_player", slot_troop_banner_scene_prop), #custom_banner_begin # (troop_get_slot, ":flag_spr", "trp_player", slot_troop_custom_banner_flag_type), (try_begin), #normal_banner_begin (gt, ":troop_banner_object", 0), (scene_prop_get_instance, ":flag_object", ":troop_banner_object", 0), #custom_banner_begin # (ge, ":flag_spr", 0), # (val_add, ":flag_spr", custom_banner_flag_scene_props_begin), # (scene_prop_get_instance, ":flag_object", ":flag_spr", 0), (try_begin), (ge, ":flag_object", 0), (get_player_agent_no, ":player_agent"), (agent_get_look_position, pos1, ":player_agent"), (position_move_y, pos1, -500), (position_rotate_z, pos1, 180), (position_set_z_to_ground_level, pos1), (position_move_z, pos1, 300), (prop_instance_set_position, ":flag_object", pos1), (try_end), (scene_prop_get_instance, ":pole_object", "spr_banner_pole", 0), (try_begin), (ge, ":pole_object", 0), (position_move_z, pos1, -320), (prop_instance_set_position, ":pole_object", pos1), (try_end), (else_try), (init_position, pos1), (position_move_z, pos1, -1000000), (scene_prop_get_instance, ":flag_object", banner_scene_props_begin, 0), (try_begin), (ge, ":flag_object", 0), (prop_instance_set_position, ":flag_object", pos1), (try_end), (scene_prop_get_instance, ":pole_object", "spr_banner_pole", 0), (try_begin), (ge, ":pole_object", 0), (prop_instance_set_position, ":pole_object", pos1), (try_end), (try_end), ]), # script_place_player_banner_near_inventory_bms # Input: none # Output: none ("place_player_banner_near_inventory_bms", [ #normal_banner_begin (troop_get_slot, ":troop_banner_object", "trp_player", slot_troop_banner_scene_prop), #custom_banner_begin # (troop_get_slot, ":flag_spr", "trp_player", slot_troop_custom_banner_flag_type), (try_begin), #normal_banner_begin (gt, ":troop_banner_object", 0), (replace_scene_props, banner_scene_props_begin, ":troop_banner_object"), #custom_banner_begin # (ge, ":flag_spr", 0), # (val_add, ":flag_spr", custom_banner_flag_scene_props_begin), # (replace_scene_props, banner_scene_props_begin, ":flag_spr"), (try_end), ]), # script_stay_captive_for_hours # Input: arg1 = num_hours # Output: none ("stay_captive_for_hours", [(store_script_param, ":num_hours", 1), (store_current_hours, ":cur_hours"), (val_add, ":cur_hours", ":num_hours"), (val_max, "$g_check_autos_at_hour", ":cur_hours"), (val_add, ":num_hours", 1), (rest_for_hours, ":num_hours", 0, 0), ]), # script_set_parties_around_player_ignore_player # Input: arg1 = ignore_range, arg2 = num_hours_to_ignore # Output: none ("set_parties_around_player_ignore_player", [(store_script_param, ":ignore_range", 1), (store_script_param, ":num_hours", 2), (try_for_parties, ":party_no"), (party_is_active, ":party_no"), (store_distance_to_party_from_party, ":dist", "p_main_party", ":party_no"), (lt, ":dist", ":ignore_range"), (party_ignore_player, ":party_no", ":num_hours"), (try_end), ]), # script_randomly_make_prisoner_heroes_escape_from_party # Input: arg1 = party_no, arg2 = escape_chance_mul_1000 # Output: none ("randomly_make_prisoner_heroes_escape_from_party", [(store_script_param, ":party_no", 1), (store_script_param, ":escape_chance", 2), (assign, ":quest_troop_1", -1), (assign, ":quest_troop_2", -1), (try_begin), (check_quest_active, "qst_rescue_lord_by_replace"), (quest_get_slot, ":quest_troop_1", "qst_rescue_lord_by_replace", slot_quest_target_troop), (try_end), (try_begin), (check_quest_active, "qst_deliver_message_to_prisoner_lord"), (quest_get_slot, ":quest_troop_2", "qst_deliver_message_to_prisoner_lord", slot_quest_target_troop), (try_end), (party_get_num_prisoner_stacks, ":num_stacks", ":party_no"), (try_for_range_backwards, ":i_stack", 0, ":num_stacks"), (party_prisoner_stack_get_troop_id, ":stack_troop", ":party_no", ":i_stack"), (troop_is_hero, ":stack_troop"), (neq, ":stack_troop", ":quest_troop_1"), (neq, ":stack_troop", ":quest_troop_2"), (troop_slot_eq, ":stack_troop", slot_troop_occupation, slto_kingdom_hero), (store_random_in_range, ":random_no", 0, 1000), (lt, ":random_no", ":escape_chance"), (party_remove_prisoners, ":party_no", ":stack_troop", 1), (call_script, "script_remove_troop_from_prison", ":stack_troop"), (str_store_troop_name_link, s1, ":stack_troop"), (try_begin), (eq, ":party_no", "p_main_party"), (str_store_string, s2, "@your party"), (else_try), (str_store_party_name, s2, ":party_no"), (try_end), (assign, reg0, 0), (try_begin), (this_or_next|eq, ":party_no", "p_main_party"), (party_slot_eq, ":party_no", slot_town_lord, "trp_player"), (assign, reg0, 1), (try_end), (store_troop_faction, ":troop_faction", ":stack_troop"), (str_store_faction_name_link, s3, ":troop_faction"), (display_message, "@{reg0?One of your prisoners, :}{s1} of {s3} has escaped from captivity!"), (try_end), ]), # script_fill_tournament_participants_troop # Input: arg1 = center_no, arg2 = player_at_center # Output: none (fills trp_tournament_participants) ("fill_tournament_participants_troop", [(store_script_param, ":center_no", 1), (store_script_param, ":player_at_center", 2), (assign, ":cur_slot", 0), (try_begin), (eq, ":player_at_center", 1), (party_get_num_companion_stacks, ":num_stacks", "p_main_party"), (try_for_range, ":stack_no", 0, ":num_stacks"), (party_stack_get_troop_id, ":cur_troop", "p_main_party", ":stack_no"), (troop_is_hero, ":cur_troop"), (neq, ":cur_troop", "trp_kidnapped_girl"), (troop_set_slot, "trp_tournament_participants", ":cur_slot", ":cur_troop"), (val_add, ":cur_slot", 1), (try_end), (try_end), (party_collect_attachments_to_party, ":center_no", "p_temp_party"), (party_get_num_companion_stacks, ":num_stacks", "p_temp_party"), (try_for_range, ":stack_no", 0, ":num_stacks"), (party_stack_get_troop_id, ":cur_troop", "p_temp_party", ":stack_no"), (troop_is_hero, ":cur_troop"), (troop_set_slot, "trp_tournament_participants", ":cur_slot", ":cur_troop"), (val_add, ":cur_slot", 1), (try_end), (try_begin), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", 50), (troop_set_slot, "trp_tournament_participants", ":cur_slot", "trp_xerina"), (val_add, ":cur_slot", 1), (try_end), (try_begin), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", 50), (troop_set_slot, "trp_tournament_participants", ":cur_slot", "trp_dranton"), (val_add, ":cur_slot", 1), (try_end), (try_begin), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", 50), (troop_set_slot, "trp_tournament_participants", ":cur_slot", "trp_kradus"), (val_add, ":cur_slot", 1), (try_end), (assign, ":begin_slot", ":cur_slot"), (try_for_range, ":cur_slot", ":begin_slot", 64), (store_random_in_range, ":random_no", 0, 6), (try_begin), (eq, ":random_no", 0), (troop_set_slot, "trp_tournament_participants", ":cur_slot", "trp_regular_fighter"), (else_try), (eq, ":random_no", 1), (troop_set_slot, "trp_tournament_participants", ":cur_slot", "trp_veteran_fighter"), (else_try), (eq, ":random_no", 2), (troop_set_slot, "trp_tournament_participants", ":cur_slot", "trp_champion_fighter"), (else_try), (eq, ":random_no", 3), (troop_set_slot, "trp_tournament_participants", ":cur_slot", "trp_sword_sister"), (else_try), (eq, ":random_no", 4), (troop_set_slot, "trp_tournament_participants", ":cur_slot", "trp_hired_blade"), (else_try), (troop_set_slot, "trp_tournament_participants", ":cur_slot", "trp_mercenary_swordsman"), (try_end), (try_end), ]), # script_get_num_tournament_participants # Input: none # Output: reg0 = num_participants ("get_num_tournament_participants", [(assign, ":num_participants", 0), (try_for_range, ":cur_slot", 0, 64), (troop_slot_ge, "trp_tournament_participants", ":cur_slot", 0), (val_add, ":num_participants", 1), (try_end), (assign, reg0, ":num_participants"), ]), # script_get_random_tournament_participant # Input: none # Output: reg0 = troop_no ("get_random_tournament_participant", [(call_script, "script_get_num_tournament_participants"), (assign, ":num_participants", reg0), (store_random_in_range, ":random_troop", 0, ":num_participants"), (assign, ":continue", 1), (try_for_range, ":cur_slot", 0, 64), (eq, ":continue", 1), (troop_slot_ge, "trp_tournament_participants", ":cur_slot", 0), (val_sub, ":random_troop", 1), (lt, ":random_troop", 0), (assign, ":continue", 0), (troop_get_slot, ":troop_no", "trp_tournament_participants", ":cur_slot"), (troop_set_slot, "trp_tournament_participants", ":cur_slot", -1), (try_end), (assign, reg0, ":troop_no"), ]), # script_add_tournament_participant # Input: arg1 = troop_no # Output: none ("add_tournament_participant", [(store_script_param, ":troop_no", 1), (assign, ":continue", 1), (try_for_range, ":cur_slot", 0, 64), (eq, ":continue", 1), (troop_slot_eq, "trp_tournament_participants", ":cur_slot", -1), (troop_set_slot, "trp_tournament_participants", ":cur_slot", ":troop_no"), (assign, ":continue", 0), (try_end), ]), # script_get_random_tournament_team_amount_and_size # Input: none # Output: reg0 = number_of_teams, reg1 = team_size ("get_random_tournament_team_amount_and_size", [ (call_script, "script_get_num_tournament_participants"), (assign, ":num_participants", reg0), (party_get_slot, ":town_max_teams", "$current_town", slot_town_tournament_max_teams), (val_add, ":town_max_teams", 1), (party_get_slot, ":town_max_team_size", "$current_town", slot_town_tournament_max_team_size), (val_add, ":town_max_team_size", 1), (assign, ":max_teams", ":num_participants"), (val_min, ":max_teams", ":town_max_teams"), (assign, ":max_size", ":num_participants"), (val_min, ":max_size", ":town_max_team_size"), (assign, ":min_size", 1), (try_begin), (ge, ":num_participants", 32), (assign, ":min_size", 2), (val_min, ":min_size", ":town_max_team_size"), (try_end), (assign, ":end_cond", 500), (try_for_range, ":unused", 0, ":end_cond"), (store_random_in_range, ":random_teams", 2, ":max_teams"), (store_random_in_range, ":random_size", ":min_size", ":max_size"), (store_mul, ":total_men", ":random_teams", ":random_size"), (le, ":total_men", ":num_participants"), (store_sub, ":left_men", ":num_participants", ":total_men"), (neq, ":left_men", 1), (assign, ":end_cond", 0), (try_end), (try_begin), (gt, ":end_cond", 0), (assign, ":random_teams", 2), (assign, ":random_size", 1), (try_end), (assign, reg0, ":random_teams"), (assign, reg1, ":random_size"), ]), # script_get_troop_priority_point_for_tournament # Input: arg1 = troop_no # Output: reg0 = troop_point ("get_troop_priority_point_for_tournament", [(store_script_param, ":troop_no", 1), (assign, ":troop_point", 0), (try_begin), (ge, ":troop_no", 0), (val_add, ":troop_point", 40000), (try_begin), (eq, ":troop_no", "trp_player"), (val_add, ":troop_point", 80000), (try_end), (try_begin), (troop_is_hero, ":troop_no"), (val_add, ":troop_point", 20000), (try_end), (try_begin), (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_player_companion), (val_add, ":troop_point", 10000), (else_try), (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), (troop_get_slot, ":renown", ":troop_no", slot_troop_renown), (val_add, ":troop_point", ":renown"), (val_add, ":troop_point", 1000), #in order to make it more prior than tournament heroes with higher levels (else_try), (store_character_level, ":level", ":troop_no"), (val_add, ":troop_point", ":level"), (try_end), (try_end), (assign, reg0, ":troop_point"), ]), # script_sort_tournament_participant_troops # Input: none # Output: none (sorts trp_tournament_participants) ("sort_tournament_participant_troops", [(try_for_range, ":cur_slot", 0, 63), (store_add, ":cur_slot_2_begin", ":cur_slot", 1), (try_for_range, ":cur_slot_2", ":cur_slot_2_begin", 64), (troop_get_slot, ":troop_1", "trp_tournament_participants", ":cur_slot"), (troop_get_slot, ":troop_2", "trp_tournament_participants", ":cur_slot_2"), (call_script, "script_get_troop_priority_point_for_tournament", ":troop_1"), (assign, ":troop_1_point", reg0), (call_script, "script_get_troop_priority_point_for_tournament", ":troop_2"), (assign, ":troop_2_point", reg0), (gt, ":troop_2_point", ":troop_1_point"), (troop_set_slot, "trp_tournament_participants", ":cur_slot", ":troop_2"), (troop_set_slot, "trp_tournament_participants", ":cur_slot_2", ":troop_1"), (try_end), (try_end), ]), # script_remove_tournament_participants_randomly # Input: arg1 = number_to_be_removed # Output: none ("remove_tournament_participants_randomly", [(store_script_param, ":number_to_be_removed", 1), (try_for_range, ":unused", 0, ":number_to_be_removed"), (assign, ":total_weight", 0), (try_for_range, ":cur_slot", 0, 64), (troop_get_slot, ":troop_no", "trp_tournament_participants", ":cur_slot"), (ge, ":troop_no", 0), (store_character_level, ":level", ":troop_no"), (val_min, ":level", 38), (store_sub, ":weight", 40, ":level"), (val_add, ":total_weight", ":weight"), (try_end), (store_random_in_range, ":random_weight", 0, ":total_weight"), (assign, ":continue", 1), (try_for_range, ":cur_slot", 0, 64), (eq, ":continue", 1), (troop_get_slot, ":troop_no", "trp_tournament_participants", ":cur_slot"), (ge, ":troop_no", 0), (store_character_level, ":level", ":troop_no"), (val_min, ":level", 38), (store_sub, ":weight", 40, ":level"), (val_sub, ":random_weight", ":weight"), (lt, ":random_weight", 0), (troop_set_slot, "trp_tournament_participants", ":cur_slot", -1), (assign, ":continue", 0), (try_end), (try_end), ]), # script_end_tournament_fight # Input: arg1 = player_team_won (1 or 0) # Output: none ("end_tournament_fight", [(store_script_param, ":player_team_won", 1), (call_script, "script_get_num_tournament_participants"), (assign, ":num_participants", reg0), (store_div, ":needed_to_remove_randomly", ":num_participants", 2), #Must remove other participants randomly earlier than adding the winners back to participants (call_script, "script_remove_tournament_participants_randomly", ":needed_to_remove_randomly"), (assign, ":num_needed", "$g_tournament_num_participants_for_fight"), (val_div, ":num_needed", 2), (get_player_agent_no, ":player_agent"), (agent_get_team, ":player_team", ":player_agent"), (try_for_agents, ":agent_no"), (agent_is_human, ":agent_no"), (agent_get_troop_id, ":troop_id", ":agent_no"), (neg|is_between, ":troop_id", arena_masters_begin, arena_masters_end),#omit tournament master (agent_get_team, ":agent_team", ":agent_no"), (assign, ":cur_point", 0), (try_begin), (eq, ":player_team_won", 1), (eq, ":agent_team", ":player_team"), (val_add, ":cur_point", 5000000),#Make sure that team members are chosen (try_end), (agent_get_kill_count, ":kill_count", ":agent_no", 1), #everyone is knocked unconscious (store_mul, ":kill_point", ":kill_count", 160000),#Make sure that kill count is the second most important variable (val_add, ":cur_point", ":kill_point"), (call_script, "script_get_troop_priority_point_for_tournament", ":troop_id"), (val_add, ":cur_point", reg0), (try_begin),#reset player's point if kill count is one after the first 2 rounds, or if it is zero (eq, ":agent_no", ":player_agent"), (eq, ":player_team_won", 0), (assign, ":not_passed", 1), (try_begin), (ge, ":kill_count", 2), (assign, ":not_passed", 0), (else_try), (eq, ":kill_count", 1), (le, "$g_tournament_cur_tier", 1), (assign, ":not_passed", 0), (try_end), (eq, ":not_passed", 1), (assign, ":cur_point", 0), (try_end), (agent_set_slot, ":agent_no", slot_agent_tournament_point, ":cur_point"), (try_end), (try_for_range, ":unused", 0, ":num_needed"), (assign, ":best_point", 0), (assign, ":best_agent_no", -1), (try_for_agents, ":agent_no"), (agent_is_human, ":agent_no"), (agent_get_slot, ":point", ":agent_no", slot_agent_tournament_point), (gt, ":point", ":best_point"), (assign, ":best_agent_no", ":agent_no"), (assign, ":best_point", ":point"), (try_end), (agent_set_slot, ":best_agent_no", slot_agent_tournament_point, 0),#Do not select the same agent again (agent_get_troop_id, ":troop_id", ":best_agent_no"), (call_script, "script_add_tournament_participant", ":troop_id"), (try_end), (assign, "$g_tournament_player_team_won", ":player_team_won"), (jump_to_menu, "mnu_town_tournament"), ]), # script_get_win_amount_for_tournament_bet # Input: none # Output: reg0 = win_amount_with_100_denars ("get_win_amount_for_tournament_bet", [ (party_get_slot, ":player_odds", "$current_town", slot_town_player_odds), (try_begin), (eq, "$g_tournament_cur_tier", 0), (assign, ":win_amount", 120), (else_try), (eq, "$g_tournament_cur_tier", 1), (assign, ":win_amount", 90), (else_try), (eq, "$g_tournament_cur_tier", 2), (assign, ":win_amount", 60), (else_try), (eq, "$g_tournament_cur_tier", 3), (assign, ":win_amount", 40), (else_try), (eq, "$g_tournament_cur_tier", 4), (assign, ":win_amount", 20), (else_try), (assign, ":win_amount", 8), (try_end), (val_mul, ":win_amount", ":player_odds"), (val_div, ":win_amount", 100), (val_add, ":win_amount", 100), #win amount when 100 denars is placed (assign, reg0, ":win_amount"), ]), # script_tournament_place_bet # Input: arg1 = bet_amount # Output: none ("tournament_place_bet", [ (store_script_param, ":bet_amount", 1), (call_script, "script_get_win_amount_for_tournament_bet"), (assign, ":win_amount", reg0), (val_mul, ":win_amount", ":bet_amount"), (val_div, ":win_amount", 100), (val_sub, ":win_amount", ":bet_amount"), (val_add, "$g_tournament_bet_placed", ":bet_amount"), (val_add, "$g_tournament_bet_win_amount", ":win_amount"), (troop_remove_gold, "trp_player", ":bet_amount"), (assign, "$g_tournament_last_bet_tier", "$g_tournament_cur_tier"), ]), # script_calculate_amount_of_cattle_can_be_stolen # Input: arg1 = village_no # Output: reg0 = max_amount ("calculate_amount_of_cattle_can_be_stolen", [ (store_script_param, ":village_no", 1), (call_script, "script_get_max_skill_of_player_party", "skl_looting"), (assign, ":max_skill", reg0), (store_mul, ":can_steal", ":max_skill", 2), (call_script, "script_party_count_fit_for_battle", "p_main_party"), (store_add, ":num_men_effect", reg0, 10), (val_div, ":num_men_effect", 10), (val_add, ":can_steal", ":num_men_effect"), (party_get_slot, ":num_cattle", ":village_no", slot_village_number_of_cattle), (val_min, ":can_steal", ":num_cattle"), (assign, reg0, ":can_steal"), ]), # script_draw_banner_to_region # Input: arg1 = troop_no, arg2 = center_pos_x, arg3 = center_pos_y, arg4 = width, arg5 = height, arg6 = stretch_width, arg7 = stretch_height, arg8 = default_scale, arg9 = max_charge_scale, arg10 = drawn_item_type # drawn_item_type is 0 for banners, 1 for shields, 2 for heater shield, 3 for armor # arguments will be used as fixed point values # Output: none ("draw_banner_to_region", [ (store_script_param, ":troop_no", 1), (store_script_param, ":center_pos_x", 2), (store_script_param, ":center_pos_y", 3), (store_script_param, ":width", 4), (store_script_param, ":height", 5), (store_script_param, ":stretch_width", 6), (store_script_param, ":stretch_height", 7), (store_script_param, ":default_scale", 8), (store_script_param, ":max_charge_scale", 9), (store_script_param, ":drawn_item_type", 10), (troop_get_slot, ":bg_type", ":troop_no", slot_troop_custom_banner_bg_type), (val_add, ":bg_type", custom_banner_backgrounds_begin), (troop_get_slot, ":bg_color_1", ":troop_no", slot_troop_custom_banner_bg_color_1), (troop_get_slot, ":bg_color_2", ":troop_no", slot_troop_custom_banner_bg_color_2), (troop_get_slot, ":num_charges", ":troop_no", slot_troop_custom_banner_num_charges), (troop_get_slot, ":positioning", ":troop_no", slot_troop_custom_banner_positioning), (call_script, "script_get_troop_custom_banner_num_positionings", ":troop_no"), (assign, ":num_positionings", reg0), (val_mod, ":positioning", ":num_positionings"), (init_position, pos2), (position_set_x, pos2, ":width"), (position_set_y, pos2, ":height"), (assign, ":default_value", 1), (convert_to_fixed_point, ":default_value"), (position_set_z, pos2, ":default_value"), (init_position, pos1), (position_set_x, pos1, ":center_pos_x"), (position_set_y, pos1, ":center_pos_y"), (position_move_z, pos1, -20), (init_position, pos3), (position_set_x, pos3, ":default_scale"), (position_set_y, pos3, ":default_scale"), (position_set_z, pos3, ":default_value"), (try_begin), (this_or_next|eq, ":bg_type", "mesh_custom_banner_bg"), (this_or_next|eq, ":bg_type", "mesh_custom_banner_fg01"), (this_or_next|eq, ":bg_type", "mesh_custom_banner_fg02"), (this_or_next|eq, ":bg_type", "mesh_custom_banner_fg03"), (this_or_next|eq, ":bg_type", "mesh_custom_banner_fg08"), (this_or_next|eq, ":bg_type", "mesh_custom_banner_fg09"), (this_or_next|eq, ":bg_type", "mesh_custom_banner_fg10"), (this_or_next|eq, ":bg_type", "mesh_custom_banner_fg11"), (this_or_next|eq, ":bg_type", "mesh_custom_banner_fg12"), (this_or_next|eq, ":bg_type", "mesh_custom_banner_fg13"), (this_or_next|eq, ":bg_type", "mesh_custom_banner_fg16"), (eq, ":bg_type", "mesh_custom_banner_fg17"), (cur_tableau_add_mesh_with_scale_and_vertex_color, ":bg_type", pos1, pos2, 0, ":bg_color_1"), (else_try), (cur_tableau_add_mesh_with_scale_and_vertex_color, ":bg_type", pos1, pos3, 0, ":bg_color_1"), (try_end), (position_move_z, pos1, -20), (position_move_x, pos2, ":width"), (position_move_y, pos2, ":height"), (cur_tableau_add_mesh_with_scale_and_vertex_color, "mesh_custom_banner_bg", pos1, pos2, 0, ":bg_color_2"), (assign, ":charge_stretch", ":stretch_width"), (val_min, ":charge_stretch", ":stretch_height"), (val_min, ":charge_stretch", ":max_charge_scale"), (call_script, "script_get_custom_banner_charge_type_position_scale_color", "trp_player", ":positioning"), (try_begin), (this_or_next|eq, ":drawn_item_type", 2), #heater shield (eq, ":drawn_item_type", 3), #armor (assign, ":change_center_pos", 0), (try_begin), (eq, ":num_charges", 1), (assign, ":change_center_pos", 1), (else_try), (eq, ":num_charges", 2), (eq, ":positioning", 1), (assign, ":change_center_pos", 1), (else_try), (eq, ":num_charges", 3), (eq, ":positioning", 1), (assign, ":change_center_pos", 1), (try_end), (try_begin), (eq, ":change_center_pos", 1), (val_add, ":center_pos_y", 30), (try_end), (try_end), (try_begin), (ge, ":num_charges", 1), (val_mul, reg1, ":charge_stretch"), (val_div, reg1, 10000), (position_get_x, ":x", pos0), (position_get_y, ":y", pos0), (val_mul, ":x", ":stretch_width"), (val_mul, ":y", ":stretch_height"), (val_div, ":x", 10000), (val_div, ":y", 10000), (val_add, ":x", ":center_pos_x"), (val_add, ":y", ":center_pos_y"), (position_set_x, pos0, ":x"), (position_set_y, pos0, ":y"), (assign, ":scale_value", reg1), (convert_to_fixed_point, ":scale_value"), (store_mul, ":scale_value_inverse", ":scale_value", -1), (init_position, pos4), (position_set_x, pos4, ":scale_value"), (position_set_y, pos4, ":scale_value"), (position_set_z, pos4, ":scale_value"), (store_div, ":orientation", reg0, 256), #orientation flags (try_begin), (this_or_next|eq, ":orientation", 1), (eq, ":orientation", 3), (position_set_x, pos4, ":scale_value_inverse"), (try_end), (try_begin), (this_or_next|eq, ":orientation", 2), (eq, ":orientation", 3), (position_set_y, pos4, ":scale_value_inverse"), (try_end), (val_mod, reg0, 256), #remove orientation flags (cur_tableau_add_mesh_with_scale_and_vertex_color, reg0, pos0, pos4, 0, reg2), (try_end), (try_begin), (ge, ":num_charges", 2), (val_mul, reg4, ":charge_stretch"), (val_div, reg4, 10000), (position_get_x, ":x", pos1), (position_get_y, ":y", pos1), (val_mul, ":x", ":stretch_width"), (val_mul, ":y", ":stretch_height"), (val_div, ":x", 10000), (val_div, ":y", 10000), (val_add, ":x", ":center_pos_x"), (val_add, ":y", ":center_pos_y"), (position_set_x, pos1, ":x"), (position_set_y, pos1, ":y"), (assign, ":scale_value", reg4), (convert_to_fixed_point, ":scale_value"), (store_mul, ":scale_value_inverse", ":scale_value", -1), (init_position, pos4), (position_set_x, pos4, ":scale_value"), (position_set_y, pos4, ":scale_value"), (position_set_z, pos4, ":scale_value"), (store_div, ":orientation", reg3, 256), #orientation flags (try_begin), (this_or_next|eq, ":orientation", 1), (eq, ":orientation", 3), (position_set_x, pos4, ":scale_value_inverse"), (try_end), (try_begin), (this_or_next|eq, ":orientation", 2), (eq, ":orientation", 3), (position_set_y, pos4, ":scale_value_inverse"), (try_end), (val_mod, reg3, 256), #remove orientation flags (cur_tableau_add_mesh_with_scale_and_vertex_color, reg3, pos1, pos4, 0, reg5), (try_end), (try_begin), (ge, ":num_charges", 3), (val_mul, reg7, ":charge_stretch"), (val_div, reg7, 10000), (position_get_x, ":x", pos2), (position_get_y, ":y", pos2), (val_mul, ":x", ":stretch_width"), (val_mul, ":y", ":stretch_height"), (val_div, ":x", 10000), (val_div, ":y", 10000), (val_add, ":x", ":center_pos_x"), (val_add, ":y", ":center_pos_y"), (position_set_x, pos2, ":x"), (position_set_y, pos2, ":y"), (assign, ":scale_value", reg7), (convert_to_fixed_point, ":scale_value"), (store_mul, ":scale_value_inverse", ":scale_value", -1), (init_position, pos4), (position_set_x, pos4, ":scale_value"), (position_set_y, pos4, ":scale_value"), (position_set_z, pos4, ":scale_value"), (store_div, ":orientation", reg6, 256), #orientation flags (try_begin), (this_or_next|eq, ":orientation", 1), (eq, ":orientation", 3), (position_set_x, pos4, ":scale_value_inverse"), (try_end), (try_begin), (this_or_next|eq, ":orientation", 2), (eq, ":orientation", 3), (position_set_y, pos4, ":scale_value_inverse"), (try_end), (val_mod, reg6, 256), #remove orientation flags (cur_tableau_add_mesh_with_scale_and_vertex_color, reg6, pos2, pos4, 0, reg8), (try_end), (try_begin), (ge, ":num_charges", 4), (val_mul, reg10, ":charge_stretch"), (val_div, reg10, 10000), (position_get_x, ":x", pos3), (position_get_y, ":y", pos3), (val_mul, ":x", ":stretch_width"), (val_mul, ":y", ":stretch_height"), (val_div, ":x", 10000), (val_div, ":y", 10000), (val_add, ":x", ":center_pos_x"), (val_add, ":y", ":center_pos_y"), (position_set_x, pos3, ":x"), (position_set_y, pos3, ":y"), (assign, ":scale_value", reg10), (convert_to_fixed_point, ":scale_value"), (store_mul, ":scale_value_inverse", ":scale_value", -1), (init_position, pos4), (position_set_x, pos4, ":scale_value"), (position_set_y, pos4, ":scale_value"), (position_set_z, pos4, ":scale_value"), (store_div, ":orientation", reg9, 256), #orientation flags (try_begin), (this_or_next|eq, ":orientation", 1), (eq, ":orientation", 3), (position_set_x, pos4, ":scale_value_inverse"), (try_end), (try_begin), (this_or_next|eq, ":orientation", 2), (eq, ":orientation", 3), (position_set_y, pos4, ":scale_value_inverse"), (try_end), (val_mod, reg9, 256), #remove orientation flags (cur_tableau_add_mesh_with_scale_and_vertex_color, reg9, pos3, pos4, 0, reg11), (try_end), ]), # script_get_troop_custom_banner_num_positionings # Input: arg1 = troop_no # Output: reg0 = num_positionings ("get_troop_custom_banner_num_positionings", [ (store_script_param, ":troop_no", 1), (troop_get_slot, ":num_charges", ":troop_no", slot_troop_custom_banner_num_charges), (try_begin), (eq, ":num_charges", 1), (assign, ":num_positionings", 2), (else_try), (eq, ":num_charges", 2), (assign, ":num_positionings", 4), (else_try), (eq, ":num_charges", 3), (assign, ":num_positionings", 6), (else_try), (assign, ":num_positionings", 2), (try_end), (assign, reg0, ":num_positionings"), ]), # script_get_custom_banner_charge_type_position_scale_color # Input: arg1 = troop_no, arg2 = positioning_index # Output: reg0 = type_1 # reg1 = scale_1 # reg2 = color_1 # reg3 = type_2 # reg4 = scale_2 # reg5 = color_2 # reg6 = type_3 # reg7 = scale_3 # reg8 = color_3 # reg9 = type_4 # reg10 = scale_4 # reg11 = color_4 ("get_custom_banner_charge_type_position_scale_color", [ (store_script_param, ":troop_no", 1), (store_script_param, ":positioning", 2), (troop_get_slot, ":num_charges", ":troop_no", slot_troop_custom_banner_num_charges), (init_position, pos0), (init_position, pos1), (init_position, pos2), (init_position, pos3), (troop_get_slot, reg0, ":troop_no", slot_troop_custom_banner_charge_type_1), (val_add, reg0, custom_banner_charges_begin), (troop_get_slot, reg2, ":troop_no", slot_troop_custom_banner_charge_color_1), (troop_get_slot, reg3, ":troop_no", slot_troop_custom_banner_charge_type_2), (val_add, reg3, custom_banner_charges_begin), (troop_get_slot, reg5, ":troop_no", slot_troop_custom_banner_charge_color_2), (troop_get_slot, reg6, ":troop_no", slot_troop_custom_banner_charge_type_3), (val_add, reg6, custom_banner_charges_begin), (troop_get_slot, reg8, ":troop_no", slot_troop_custom_banner_charge_color_3), (troop_get_slot, reg9, ":troop_no", slot_troop_custom_banner_charge_type_4), (val_add, reg9, custom_banner_charges_begin), (troop_get_slot, reg11, ":troop_no", slot_troop_custom_banner_charge_color_4), (try_begin), (eq, ":num_charges", 1), (try_begin), (eq, ":positioning", 0), (assign, reg1, 100), (else_try), (assign, reg1, 50), (try_end), (else_try), (eq, ":num_charges", 2), (try_begin), (eq, ":positioning", 0), (position_set_y, pos0, 25), (position_set_y, pos1, -25), (assign, reg1, 40), (assign, reg4, 40), (else_try), (eq, ":positioning", 1), (position_set_x, pos0, -25), (position_set_x, pos1, 25), (assign, reg1, 40), (assign, reg4, 40), (else_try), (eq, ":positioning", 2), (position_set_x, pos0, -25), (position_set_y, pos0, 25), (position_set_x, pos1, 25), (position_set_y, pos1, -25), (assign, reg1, 50), (assign, reg4, 50), (else_try), (position_set_x, pos0, -25), (position_set_y, pos0, -25), (position_set_x, pos1, 25), (position_set_y, pos1, 25), (assign, reg1, 50), (assign, reg4, 50), (try_end), (else_try), (eq, ":num_charges", 3), (try_begin), (eq, ":positioning", 0), (position_set_y, pos0, 33), (position_set_y, pos2, -33), (assign, reg1, 30), (assign, reg4, 30), (assign, reg7, 30), (else_try), (eq, ":positioning", 1), (position_set_x, pos0, -33), (position_set_x, pos2, 33), (assign, reg1, 30), (assign, reg4, 30), (assign, reg7, 30), (else_try), (eq, ":positioning", 2), (position_set_x, pos0, -30), (position_set_y, pos0, 30), (position_set_x, pos2, 30), (position_set_y, pos2, -30), (assign, reg1, 35), (assign, reg4, 35), (assign, reg7, 35), (else_try), (eq, ":positioning", 3), (position_set_x, pos0, -30), (position_set_y, pos0, -30), (position_set_x, pos2, 30), (position_set_y, pos2, 30), (assign, reg1, 35), (assign, reg4, 35), (assign, reg7, 35), (else_try), (eq, ":positioning", 4), (position_set_x, pos0, -25), (position_set_y, pos0, -25), (position_set_y, pos1, 25), (position_set_x, pos2, 25), (position_set_y, pos2, -25), (assign, reg1, 50), (assign, reg4, 50), (assign, reg7, 50), (else_try), (position_set_x, pos0, -25), (position_set_y, pos0, 25), (position_set_y, pos1, -25), (position_set_x, pos2, 25), (position_set_y, pos2, 25), (assign, reg1, 50), (assign, reg4, 50), (assign, reg7, 50), (try_end), (else_try), (try_begin), (eq, ":positioning", 0), (position_set_x, pos0, -25), (position_set_y, pos0, 25), (position_set_x, pos1, 25), (position_set_y, pos1, 25), (position_set_x, pos2, -25), (position_set_y, pos2, -25), (position_set_x, pos3, 25), (position_set_y, pos3, -25), (assign, reg1, 50), (assign, reg4, 50), (assign, reg7, 50), (assign, reg10, 50), (else_try), (position_set_y, pos0, 30), (position_set_x, pos1, -30), (position_set_x, pos2, 30), (position_set_y, pos3, -30), (assign, reg1, 35), (assign, reg4, 35), (assign, reg7, 35), (assign, reg10, 35), (try_end), (try_end), ]), # script_get_random_custom_banner # Input: arg1 = troop_no # Output: none ("get_random_custom_banner", [ (store_script_param, ":troop_no", 1), (store_random_in_range, ":num_charges", 1, 5), (troop_set_slot, ":troop_no", slot_troop_custom_banner_num_charges, ":num_charges"), (store_random_in_range, ":random_color_index", 0, 42), (call_script, "script_get_custom_banner_color_from_index", ":random_color_index"), (assign, ":color_1", reg0), (troop_set_slot, ":troop_no", slot_troop_custom_banner_bg_color_1, ":color_1"), (assign, ":end_cond", 1), (try_for_range, ":unused", 0, ":end_cond"), (store_random_in_range, ":random_color_index", 0, 42), (call_script, "script_get_custom_banner_color_from_index", ":random_color_index"), (assign, ":color_2", reg0), (try_begin), (call_script, "script_cf_check_color_visibility", ":color_1", ":color_2"), (troop_set_slot, ":troop_no", slot_troop_custom_banner_bg_color_2, ":color_2"), (else_try), (val_add, ":end_cond", 1), (try_end), (try_end), (assign, ":end_cond", 4), (assign, ":cur_charge", 0), (try_for_range, ":unused", 0, ":end_cond"), (store_random_in_range, ":random_color_index", 0, 42), (call_script, "script_get_custom_banner_color_from_index", ":random_color_index"), (assign, ":charge_color", reg0), (try_begin), (call_script, "script_cf_check_color_visibility", ":charge_color", ":color_1"), (call_script, "script_cf_check_color_visibility", ":charge_color", ":color_2"), (store_add, ":cur_slot", ":cur_charge", slot_troop_custom_banner_charge_color_1), (troop_set_slot, ":troop_no", ":cur_slot", ":charge_color"), (store_random_in_range, ":random_charge", custom_banner_charges_begin, custom_banner_charges_end), (val_sub, ":random_charge", custom_banner_charges_begin), (store_add, ":cur_slot", ":cur_charge", slot_troop_custom_banner_charge_type_1), (troop_set_slot, ":troop_no", ":cur_slot", ":random_charge"), (val_add, ":cur_charge", 1), (else_try), (val_add, ":end_cond", 1), (try_end), (try_end), (store_random_in_range, ":random_bg", custom_banner_backgrounds_begin, custom_banner_backgrounds_end), (val_sub, ":random_bg", custom_banner_backgrounds_begin), (troop_set_slot, ":troop_no", slot_troop_custom_banner_bg_type, ":random_bg"), (store_random_in_range, ":random_flag", custom_banner_flag_types_begin, custom_banner_flag_types_end), (val_sub, ":random_flag", custom_banner_flag_types_begin), (troop_set_slot, ":troop_no", slot_troop_custom_banner_flag_type, ":random_flag"), (store_random_in_range, ":random_positioning", 0, 4), (troop_set_slot, ":troop_no", slot_troop_custom_banner_positioning, ":random_positioning"), ]), # script_get_custom_banner_color_from_index # Input: arg1 = color_index # Output: reg0 = color ("get_custom_banner_color_from_index", [ (store_script_param, ":color_index", 1), (assign, ":cur_color", 0xFF000000), (assign, ":red", 0x00), (assign, ":green", 0x00), (assign, ":blue", 0x00), (store_mod, ":mod_i_color", ":color_index", 7), (try_begin), (eq, ":mod_i_color", 0), (assign, ":blue", 0xFF), (else_try), (eq, ":mod_i_color", 1), (assign, ":red", 0xEE), (else_try), (eq, ":mod_i_color", 2), (assign, ":red", 0xFB), (assign, ":green", 0xAC), (else_try), (eq, ":mod_i_color", 3), (assign, ":red", 0x5F), (assign, ":blue", 0xFF), (else_try), (eq, ":mod_i_color", 4), (assign, ":red", 0x05), (assign, ":green", 0x44), (else_try), (eq, ":mod_i_color", 5), (assign, ":red", 0xEE), (assign, ":green", 0xEE), (assign, ":blue", 0xEE), (else_try), (assign, ":red", 0x22), (assign, ":green", 0x22), (assign, ":blue", 0x22), (try_end), (store_div, ":cur_tone", ":color_index", 7), (store_sub, ":cur_tone", 8, ":cur_tone"), (val_mul, ":red", ":cur_tone"), (val_div, ":red", 8), (val_mul, ":green", ":cur_tone"), (val_div, ":green", 8), (val_mul, ":blue", ":cur_tone"), (val_div, ":blue", 8), (val_mul, ":green", 0x100), (val_mul, ":red", 0x10000), (val_add, ":cur_color", ":blue"), (val_add, ":cur_color", ":green"), (val_add, ":cur_color", ":red"), (assign, reg0, ":cur_color"), ]), # script_cf_check_color_visibility # Input: arg1 = color_1, arg2 = color_2 # Output: none ("cf_check_color_visibility", [ (store_script_param, ":color_1", 1), (store_script_param, ":color_2", 2), (store_mod, ":blue_1", ":color_1", 256), (store_div, ":green_1", ":color_1", 256), (val_mod, ":green_1", 256), (store_div, ":red_1", ":color_1", 256 * 256), (val_mod, ":red_1", 256), (store_mod, ":blue_2", ":color_2", 256), (store_div, ":green_2", ":color_2", 256), (val_mod, ":green_2", 256), (store_div, ":red_2", ":color_2", 256 * 256), (val_mod, ":red_2", 256), (store_sub, ":red_dif", ":red_1", ":red_2"), (val_abs, ":red_dif"), (store_sub, ":green_dif", ":green_1", ":green_2"), (val_abs, ":green_dif"), (store_sub, ":blue_dif", ":blue_1", ":blue_2"), (val_abs, ":blue_dif"), (assign, ":max_dif", 0), (val_max, ":max_dif", ":red_dif"), (val_max, ":max_dif", ":green_dif"), (val_max, ":max_dif", ":blue_dif"), (ge, ":max_dif", 64), ]), # script_get_next_active_kingdom # Input: arg1 = faction_no # Output: reg0 = faction_no (does not choose player faction) ("get_next_active_kingdom", [ (store_script_param, ":faction_no", 1), (assign, ":end_cond", kingdoms_end), (try_for_range, ":unused", kingdoms_begin, ":end_cond"), (val_add, ":faction_no", 1), (try_begin), (ge, ":faction_no", kingdoms_end), (assign, ":faction_no", kingdoms_begin), (try_end), (faction_slot_eq, ":faction_no", slot_faction_state, sfs_active), (neq, ":faction_no", "fac_player_supporters_faction"), (assign, ":end_cond", 0), (try_end), (assign, reg0, ":faction_no"), ]), # script_store_average_center_value_per_faction # Input: none # Output: none (sets $g_average_center_value_per_faction) ("store_average_center_value_per_faction", [ (store_sub, ":num_towns", towns_end, towns_begin), (store_sub, ":num_castles", castles_end, castles_begin), (assign, ":num_factions", 0), (try_for_range, ":faction_no", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":faction_no", slot_faction_state, sfs_active), (val_add, ":num_factions", 1), (try_end), (val_max, ":num_factions", 1), (store_mul, "$g_average_center_value_per_faction", ":num_towns", 2), (val_add, "$g_average_center_value_per_faction", ":num_castles"), (val_mul, "$g_average_center_value_per_faction", 10), (val_div, "$g_average_center_value_per_faction", ":num_factions"), ]), # script_remove_cattles_if_herd_is_close_to_party # Input: arg1 = party_no, arg2 = maximum_number_of_cattles_required # Output: reg0 = number_of_cattles_removed ("remove_cattles_if_herd_is_close_to_party", [ (store_script_param, ":party_no", 1), (store_script_param, ":max_req", 2), (assign, ":cur_req", ":max_req"), (try_for_parties, ":cur_party"), (gt, ":cur_req", 0), (party_slot_eq, ":cur_party", slot_party_type, spt_cattle_herd), (store_distance_to_party_from_party, ":dist", ":cur_party", ":party_no"), (lt, ":dist", 3), #Do not use the quest herd (assign, ":subcontinue", 1), (try_begin), (check_quest_active, "qst_move_cattle_herd"), (quest_slot_eq, "qst_move_cattle_herd", slot_quest_target_party, ":cur_party"), (assign, ":subcontinue", 0), (try_end), (eq, ":subcontinue", 1), (party_count_companions_of_type, ":num_cattle", ":cur_party", "trp_cattle"), (try_begin), (le, ":num_cattle", ":cur_req"), (assign, ":num_added", ":num_cattle"), (remove_party, ":cur_party"), (else_try), (assign, ":num_added", ":cur_req"), (party_remove_members, ":cur_party", "trp_cattle", ":cur_req"), (try_end), (val_sub, ":cur_req", ":num_added"), (try_begin), (party_slot_eq, ":party_no", slot_party_type, spt_village), (party_get_slot, ":village_cattle_amount", ":party_no", slot_village_number_of_cattle), (val_add, ":village_cattle_amount", ":num_added"), (party_set_slot, ":party_no", slot_village_number_of_cattle, ":village_cattle_amount"), (try_end), (assign, reg3, ":num_added"), (str_store_party_name_link, s1, ":party_no"), (display_message, "@You brought {reg3} heads of cattle to {s1}."), (try_end), (store_sub, reg0, ":max_req", ":cur_req"), ]), # script_get_rumor_to_s61 # Input: rumor_id # Output: reg0 = 1 if rumor found, 0 otherwise; s61 will contain rumor string if found ("get_rumor_to_s61", [ (store_script_param, ":base_rumor_id", 1), # the script returns the same rumor for the same rumor id, so that one cannot hear all rumors by # speaking to a single person. (store_current_hours, ":cur_hours"), (store_div, ":cur_day", ":cur_hours", 24), (assign, ":rumor_found", 0), (assign, ":num_tries", 3), (try_for_range, ":try_no", 0, ":num_tries"), (store_mul, ":rumor_id", ":try_no", 6781), (val_add, ":rumor_id", ":base_rumor_id"), (store_mod, ":rumor_type", ":rumor_id", 7), (val_add, ":rumor_id", ":cur_hours"), (try_begin), (eq, ":rumor_type", 0), (try_begin), (store_sub, ":range", towns_end, towns_begin), (store_mod, ":random_center", ":rumor_id", ":range"), (val_add, ":random_center", towns_begin), (party_slot_ge, ":random_center", slot_town_has_tournament, 1), (neq, ":random_center", "$current_town"), (str_store_party_name, s62, ":random_center"), (str_store_string, s61, "@I heard that there will be a tournament in {s62} soon."), (assign, ":rumor_found", 1), (try_end), (else_try), (eq, ":rumor_type", 1), (try_begin), (store_sub, ":range", kingdom_heroes_end, kingdom_heroes_begin), (store_mod, ":random_hero", ":rumor_id", ":range"), (val_add, ":random_hero", kingdom_heroes_begin), (troop_get_slot, ":personality", ":random_hero", slot_lord_reputation_type), (gt, ":personality", 0), (store_add, ":rumor_string", ":personality", "str_gossip_about_character_default"), (str_store_troop_name, s6, ":random_hero"), (str_store_string, s61, ":rumor_string"), (assign, ":rumor_found", 1), (try_end), (else_try), (eq, ":rumor_type", 2), (try_begin), (store_sub, ":range", trade_goods_end, trade_goods_begin), (store_add, ":random_trade_good", ":rumor_id", ":cur_day"), (store_mod, ":random_trade_good", ":random_trade_good", ":range"), (store_add, ":random_trade_good_slot", ":random_trade_good", slot_town_trade_good_prices_begin), (val_add, ":random_trade_good", trade_goods_begin), (store_mul, ":min_price", average_price_factor, 3), (val_div, ":min_price", 4), (assign, ":min_price_center", -1), (try_for_range, ":sub_try_no", 0, 10), (store_sub, ":range", towns_end, towns_begin), (store_add, ":center_rumor_id", ":rumor_id", ":sub_try_no"), (store_mod, ":random_center", ":center_rumor_id", ":range"), (val_add, ":random_center", towns_begin), (neq, ":random_center", "$g_encountered_party"), (party_get_slot, ":cur_price", ":random_center", ":random_trade_good_slot"), (lt, ":cur_price", ":min_price"), (assign, ":min_price", ":cur_price"), (assign, ":min_price_center", ":random_center"), (try_end), (ge, ":min_price_center", 0), (str_store_item_name, s62, ":random_trade_good"), (str_store_party_name, s63, ":min_price_center"), (str_store_string, s61, "@I heard that one can buy {s62} very cheap at {s63}."), (assign, ":rumor_found", 1), (try_end), (else_try), (eq, ":rumor_type", 3), (try_begin), (store_sub, ":range", trade_goods_end, trade_goods_begin), (store_add, ":random_trade_good", ":rumor_id", ":cur_day"), (store_mod, ":random_trade_good", ":random_trade_good", ":range"), (store_add, ":random_trade_good_slot", ":random_trade_good", slot_town_trade_good_prices_begin), (val_add, ":random_trade_good", trade_goods_begin), (store_mul, ":max_price", average_price_factor, 5), (val_div, ":max_price", 4), (assign, ":max_price_center", -1), (try_for_range, ":sub_try_no", 0, 10), (store_sub, ":range", towns_end, towns_begin), (store_add, ":center_rumor_id", ":rumor_id", ":sub_try_no"), (store_mod, ":random_center", ":center_rumor_id", ":range"), (val_add, ":random_center", towns_begin), (neq, ":random_center", "$g_encountered_party"), (party_get_slot, ":cur_price", ":random_center", ":random_trade_good_slot"), (gt, ":cur_price", ":max_price"), (assign, ":max_price", ":cur_price"), (assign, ":max_price_center", ":random_center"), (try_end), (ge, ":max_price_center", 0), (str_store_item_name, s62, ":random_trade_good"), (str_store_party_name, s63, ":max_price_center"), (str_store_string, s61, "@I heard that they pay a very high price for {s62} at {s63}."), (assign, ":rumor_found", 1), (try_end), (try_end), (try_begin), (gt, ":rumor_found", 0), (assign, ":num_tries", 0), (try_end), (try_end), (assign, reg0, ":rumor_found"), ]), ("lord_comment_to_s43", [(store_script_param, ":lord", 1), (store_script_param, ":default_string", 2), (troop_get_slot,":reputation", ":lord", slot_lord_reputation_type), (val_add,":reputation", ":default_string"), (str_store_string,43,":reputation"), ]), #Troop Commentaries begin # script_add_log_entry # Input: arg1 = entry_type, arg2 = event_actor, arg3 = center_object, arg4 = troop_object, arg5 = faction_object # Output: none ("add_log_entry", [(store_script_param, ":entry_type", 1), (store_script_param, ":actor", 2), (store_script_param, ":center_object", 3), (store_script_param, ":troop_object", 4), (store_script_param, ":faction_object", 5), (assign, ":center_object_lord", -1), (assign, ":center_object_faction", -1), (assign, ":troop_object_faction", -1), (try_begin), (gt, ":center_object", 0), (party_get_slot, ":center_object_lord", ":center_object", slot_town_lord), (store_faction_of_party, ":center_object_faction", ":center_object"), (try_end), (try_begin), (ge, ":troop_object", 0), (store_troop_faction, ":troop_object_faction", ":troop_object"), (try_end), (val_add, "$num_log_entries", 1), (store_current_hours, ":entry_time"), (troop_set_slot, "trp_log_array_entry_type", "$num_log_entries", ":entry_type"), (troop_set_slot, "trp_log_array_entry_time", "$num_log_entries", ":entry_time"), (troop_set_slot, "trp_log_array_actor", "$num_log_entries", ":actor"), (troop_set_slot, "trp_log_array_center_object", "$num_log_entries", ":center_object"), (troop_set_slot, "trp_log_array_center_object_lord", "$num_log_entries", ":center_object_lord"), (troop_set_slot, "trp_log_array_center_object_faction", "$num_log_entries", ":center_object_faction"), (troop_set_slot, "trp_log_array_troop_object", "$num_log_entries", ":troop_object"), (troop_set_slot, "trp_log_array_troop_object_faction", "$num_log_entries", ":troop_object_faction"), (troop_set_slot, "trp_log_array_faction_object", "$num_log_entries", ":faction_object"), (try_begin), (eq, "$cheat_mode", 1), (assign, reg3, "$num_log_entries"), (assign, reg4, ":entry_type"), (display_message, "@Log entry {reg3}: type {reg4}"), (try_begin), (gt, ":center_object", 0), (str_store_party_name, s4, ":center_object"), (display_message, "@Center: {s4}"), (try_end), (try_begin), (gt, ":troop_object", 0), (str_store_troop_name, s4, ":troop_object"), (display_message, "@Troop: {s4}"), (try_end), (try_begin), (gt, ":center_object_lord", 0), (str_store_troop_name, s4, ":center_object_lord"), (display_message, "@Lord: {s4}"), (try_end), (try_end), (try_begin), (this_or_next|gt, "$g_ally_party", 0), (eq, ":entry_type", logent_player_participated_in_siege), (try_begin), (eq, "$cheat_mode", 1), (display_message, "@Ally party is present"), (try_end), (try_for_range, ":hero", kingdom_heroes_begin, kingdom_heroes_end), (party_count_companions_of_type, ":hero_present", "p_collective_friends", ":hero"), (gt, ":hero_present", 0), (troop_set_slot, ":hero", slot_troop_present_at_event, "$num_log_entries"), # (store_sub, ":skip_up_to_here", "$num_log_entries", 1), # (troop_set_slot, ":hero", slot_troop_last_comment_slot, ":skip_up_to_here"), (try_begin), (eq, "$cheat_mode", 1), (str_store_troop_name, 4, ":hero"), (display_message, "@{s4} is present at event"), (try_end), (try_end), (try_end), ]), # script_get_relevant_comment_for_log_entry # Input: arg1 = log_entry_no, # Output: reg0 = comment_id; reg1 = relevance # Notes: 50 is the default relevance. # A comment with relevance less than 30 will always be skipped. # A comment with relevance 75 or more will never be skipped. # A comment with relevance 50 has about 50% chance to be skipped. # If there is more than one comment that is not skipped, the system will randomize their relevance values, and then choose the highest one. # Also note that the relevance of events decreases as time passes. After three months, relevance reduces to 50%, after 6 months, 25%, etc... ("get_relevant_comment_for_log_entry", [(store_script_param, ":log_entry_no", 1), (troop_get_slot, ":entry_type", "trp_log_array_entry_type", ":log_entry_no"), (troop_get_slot, ":entry_time", "trp_log_array_entry_time", ":log_entry_no"), (troop_get_slot, ":actor", "trp_log_array_actor", ":log_entry_no"), ## (troop_get_slot, ":center_object", "trp_log_array_center_object", ":log_entry_no"), (troop_get_slot, ":center_object_lord", "trp_log_array_center_object_lord", ":log_entry_no"), (troop_get_slot, ":center_object_faction", "trp_log_array_center_object_faction", ":log_entry_no"), (troop_get_slot, ":troop_object", "trp_log_array_troop_object", ":log_entry_no"), (troop_get_slot, ":troop_object_faction", "trp_log_array_troop_object_faction", ":log_entry_no"), (troop_get_slot, ":faction_object", "trp_log_array_faction_object", ":log_entry_no"), (assign, ":relevance", 0), (assign, ":comment", -1), (assign, ":suggested_relation_change", 0), (troop_get_slot, ":reputation", "$g_talk_troop", slot_lord_reputation_type), (store_current_hours, ":current_time"), (store_sub, ":entry_hours_elapsed", ":current_time", ":entry_time"), #Post 0907 changes begin (assign, ":players_kingdom_relation", 0), ##the below is so that lords will not congratulate player on attacking neutrals (try_begin), (eq, "$cheat_mode", 1), (try_begin), (assign, reg5, ":log_entry_no"), (assign, reg6, ":entry_type"), (assign, reg8, ":entry_time"), (gt, "$players_kingdom", 0), (try_begin), (gt, ":troop_object_faction", 0), (store_relation, ":players_kingdom_relation", "$players_kingdom", ":troop_object_faction"), (assign, reg7, ":players_kingdom_relation"), (display_message, "@Event #{reg5}, type {reg6}, time {reg8}: player's kingdom relation to troop object = {reg7}"), (else_try), (gt, ":center_object_faction", 0), (store_relation, ":players_kingdom_relation", "$players_kingdom", ":center_object_faction"), (assign, reg7, ":players_kingdom_relation"), (display_message, "@Event #{reg5}, type {reg6}, time {reg8}: player's kingdom relation to center object faction = {reg7}"), (else_try), (gt, ":faction_object", 0), (store_relation, ":players_kingdom_relation", "$players_kingdom", ":faction_object"), (assign, reg7, ":players_kingdom_relation"), (display_message, "@Event #{reg5}, type {reg6}, time {reg8}: player's kingdom relation to faction object = {reg7}"), (else_try), (display_message, "@Event #{reg5}, type {reg6}, time {reg8}. No relevant kingdom relation"), (try_end), (else_try), (display_message, "@Event #{reg5}, type {reg6}, time {reg8}. Player unaffiliated"), (try_end), (try_end), (try_begin), (eq, ":entry_type", logent_game_start), (eq, "$g_talk_troop_met", 0), (is_between, "$g_talk_troop_faction_relation", -5, 5), (is_between, "$g_talk_troop_relation", -5, 5), (assign, ":relevance", 25), (troop_get_slot, ":plyr_renown", "trp_player", slot_troop_renown), #normal_banner_begin (troop_get_slot, ":banner", "trp_player", slot_troop_banner_scene_prop), #custom_banner_begin # (troop_get_slot, ":banner", "trp_player", slot_troop_custom_banner_flag_type), (store_random_in_range, ":renown_check", 100, 200), (try_begin), (eq, ":reputation", lrep_none), (gt, "$players_kingdom", 0), (assign, ":comment", "str_comment_intro_liege_affiliated"), (else_try), (gt, ":plyr_renown", ":renown_check"), (assign, ":comment", "str_comment_intro_famous_liege"), (val_add, ":comment", ":reputation"), (else_try), #normal_banner_begin (gt, ":banner", 0), #custom_banner_begin # (ge, ":banner", 0), (assign, ":comment", "str_comment_intro_noble_liege"), (val_add, ":comment", ":reputation"), (else_try), (assign, ":comment", "str_comment_intro_common_liege"), (val_add, ":comment", ":reputation"), (try_end), #Post 0907 changes end (else_try), (eq, ":entry_type", logent_village_raided), (eq, ":actor", "trp_player"), (try_begin), (eq, ":center_object_lord", "$g_talk_troop"), (assign, ":relevance", 200), (assign, ":suggested_relation_change", -1), (assign, ":comment", "str_comment_you_raided_my_village_default"), (try_begin), (lt, "$g_talk_troop_faction_relation", -5), (this_or_next|eq, ":reputation", lrep_goodnatured), (eq, ":reputation", lrep_upstanding), (assign, ":comment", "str_comment_you_raided_my_village_enemy_benevolent"), (else_try), (lt, "$g_talk_troop_faction_relation", -5), (this_or_next|eq, ":reputation", lrep_cunning), (eq, ":reputation", lrep_selfrighteous), (assign, ":comment", "str_comment_you_raided_my_village_enemy_coldblooded"), (else_try), (lt, "$g_talk_troop_faction_relation", -5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_raided_my_village_enemy_spiteful"), (else_try), (lt, "$g_talk_troop_faction_relation", -5), (assign, ":comment", "str_comment_you_raided_my_village_enemy"), (else_try), (lt, "$g_talk_troop_relation", -5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_raided_my_village_unfriendly_spiteful"), (else_try), (gt, "$g_talk_troop_relation", 5), (assign, ":comment", "str_comment_you_raided_my_village_friendly"), (try_end), (try_end), (else_try), (eq, ":entry_type", logent_village_extorted), (eq, ":actor", "trp_player"), (try_begin), (eq, ":center_object_lord", "$g_talk_troop"), (assign, ":relevance", 30), (assign, ":suggested_relation_change", -1), (assign, ":comment", "str_comment_you_robbed_my_village_default"), (try_begin), (lt, "$g_talk_troop_faction_relation", -5), (this_or_next|eq, ":reputation", lrep_cunning), (eq, ":reputation", lrep_selfrighteous), (assign, ":comment", "str_comment_you_robbed_my_village_enemy_coldblooded"), (else_try), (lt, "$g_talk_troop_faction_relation", -5), (assign, ":comment", "str_comment_you_robbed_my_village_enemy"), (else_try), (gt, "$g_talk_troop_relation", 5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_robbed_my_village_friendly_spiteful"), (else_try), (gt, "$g_talk_troop_relation", 5), (assign, ":comment", "str_comment_you_robbed_my_village_friendly"), (try_end), (try_end), (else_try), (eq, ":entry_type", logent_caravan_accosted), (eq, ":actor", "trp_player"), (eq, ":faction_object", "$g_talk_troop_faction"), (faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"), (assign, ":relevance", 30), (assign, ":suggested_relation_change", -1), (assign, ":comment", "str_comment_you_accosted_my_caravan_default"), (try_begin), (lt, "$g_talk_troop_faction_relation", -5), (assign, ":comment", "str_comment_you_accosted_my_caravan_enemy"), (try_end), (else_try), (eq, ":entry_type", logent_helped_peasants), (eq, ":actor", "trp_player"), (try_begin), (eq, ":center_object_lord", "$g_talk_troop"), (assign, ":relevance", 40), (assign, ":suggested_relation_change", 0), (try_begin), (this_or_next|eq, ":reputation", lrep_goodnatured), (eq, ":reputation", lrep_upstanding), (assign, ":comment", "str_comment_you_helped_villagers_benevolent"), (assign, ":suggested_relation_change", 1), (else_try), (gt, "$g_talk_troop_relation", 5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_helped_villagers_friendly_cruel"), (assign, ":suggested_relation_change", -1), (else_try), (lt, "$g_talk_troop_relation", -5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_helped_villagers_unfriendly_spiteful"), (assign, ":suggested_relation_change", -1), (else_try), (gt, "$g_talk_troop_relation", 5), (assign, ":comment", "str_comment_you_helped_villagers_friendly"), (else_try), (this_or_next|eq, ":reputation", lrep_selfrighteous), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_helped_villagers_cruel"), (assign, ":suggested_relation_change", -1), (else_try), (assign, ":comment", "str_comment_you_helped_villagers_default"), (try_end), (try_end), ###Combat events (else_try), (eq, ":entry_type", logent_castle_captured_by_player), (try_begin), (eq, ":center_object_lord", "$g_talk_troop"), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_captured_my_castle_enemy_spiteful"), (assign, ":relevance", 200), (else_try), (eq, ":center_object_lord", "$g_talk_troop"), (this_or_next|eq, ":reputation", lrep_martial), (eq, ":reputation", lrep_goodnatured), (assign, ":comment", "str_comment_you_captured_my_castle_enemy_chivalrous"), (assign, ":relevance", 200), (else_try), (eq, ":center_object_lord", "$g_talk_troop"), (assign, ":comment", "str_comment_you_captured_my_castle_enemy"), (assign, ":relevance", 200), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, ":players_kingdom_relation", 0), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_captured_a_castle_allied_spiteful"), (assign, ":relevance", 75), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, ":players_kingdom_relation", 0), (gt, "$g_talk_troop_relation", 5), (assign, ":comment", "str_comment_you_captured_a_castle_allied_friendly"), (assign, ":relevance", 75), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, ":players_kingdom_relation", 0), (lt, "$g_talk_troop_relation", -5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_captured_a_castle_allied_unfriendly_spiteful"), (assign, ":relevance", 75), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, ":players_kingdom_relation", 0), (lt, "$g_talk_troop_relation", -5), (assign, ":comment", "str_comment_you_captured_a_castle_allied_unfriendly"), (assign, ":relevance", 75), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, ":players_kingdom_relation", 0), (assign, ":comment", "str_comment_you_captured_a_castle_allied"), (assign, ":relevance", 75), (try_end), #Post 0907 changes begin (else_try), (this_or_next|eq, ":entry_type", logent_lord_defeated_by_player), (eq, ":entry_type", logent_lord_helped_by_player), (troop_slot_eq, "$g_talk_troop", slot_troop_present_at_event, ":log_entry_no"), (try_begin), (lt, "$g_talk_troop_relation", -5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_we_defeated_a_lord_unfriendly_spiteful"), (assign, ":relevance", 150), (else_try), (lt, "$g_talk_troop_relation", -5), (assign, ":comment", "str_comment_we_defeated_a_lord_unfriendly"), (assign, ":relevance", 150), (else_try), (this_or_next|eq, ":reputation", lrep_selfrighteous), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_we_defeated_a_lord_cruel"), (assign, ":relevance", 150), (else_try), (eq, ":reputation", lrep_quarrelsome), (assign, ":comment", "str_comment_we_defeated_a_lord_cruel"), (assign, ":relevance", 150), (else_try), (eq, ":reputation", lrep_upstanding), (assign, ":comment", "str_comment_we_defeated_a_lord_upstanding"), (assign, ":relevance", 150), (else_try), (assign, ":comment", "str_comment_we_defeated_a_lord_default"), (assign, ":relevance", 150), (try_end), (else_try), (this_or_next|eq, ":entry_type", logent_castle_captured_by_player), (eq, ":entry_type", logent_player_participated_in_siege), (troop_slot_eq, "$g_talk_troop", slot_troop_present_at_event, ":log_entry_no"), (try_begin), (lt, "$g_talk_troop_relation", -5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_we_fought_in_siege_unfriendly_spiteful"), (assign, ":relevance", 150), (else_try), (lt, "$g_talk_troop_relation", -5), (assign, ":comment", "str_comment_we_fought_in_siege_unfriendly"), (assign, ":relevance", 150), (else_try), (this_or_next|eq, ":reputation", lrep_selfrighteous), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_we_fought_in_siege_cruel"), (assign, ":relevance", 150), (else_try), (eq, ":reputation", lrep_quarrelsome), (assign, ":comment", "str_comment_we_fought_in_siege_quarrelsome"), (assign, ":relevance", 150), (else_try), (eq, ":reputation", lrep_upstanding), (assign, ":comment", "str_comment_we_fought_in_siege_upstanding"), (assign, ":relevance", 150), (else_try), (assign, ":comment", "str_comment_we_fought_in_siege_default"), (assign, ":relevance", 150), (try_end), (else_try), (eq, ":entry_type", logent_player_participated_in_major_battle), (troop_slot_eq, "$g_talk_troop", slot_troop_present_at_event, ":log_entry_no"), (try_begin), (lt, "$g_talk_troop_relation", -5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_we_fought_in_major_battle_unfriendly_spiteful"), (assign, ":relevance", 150), (else_try), (lt, "$g_talk_troop_relation", -5), (assign, ":comment", "str_comment_we_fought_in_major_battle_unfriendly"), (assign, ":relevance", 150), (else_try), (this_or_next|eq, ":reputation", lrep_selfrighteous), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_we_fought_in_major_battle_cruel"), (assign, ":relevance", 150), (else_try), (eq, ":reputation", lrep_quarrelsome), (assign, ":comment", "str_comment_we_fought_in_major_battle_cruel"), (assign, ":relevance", 150), (else_try), (eq, ":reputation", lrep_upstanding), (assign, ":comment", "str_comment_we_fought_in_major_battle_upstanding"), (assign, ":relevance", 150), (else_try), (assign, ":comment", "str_comment_we_fought_in_major_battle_default"), (assign, ":relevance", 150), (try_end), #Post 0907 changes end (else_try), (eq, ":entry_type", logent_lord_defeated_by_player), (try_begin), (eq, ":troop_object", "$g_talk_troop"), (this_or_next|eq, ":reputation", lrep_martial), (eq, ":reputation", lrep_goodnatured), (assign, ":comment", "str_comment_you_defeated_me_enemy_chivalrous"), (assign, ":relevance", 200), (else_try), (eq, ":troop_object", "$g_talk_troop"), (this_or_next|eq, ":reputation", lrep_debauched), (eq, ":reputation", lrep_quarrelsome), (assign, ":comment", "str_comment_you_defeated_me_enemy_spiteful"), (assign, ":relevance", 200), (else_try), (eq, ":troop_object", "$g_talk_troop"), (assign, ":comment", "str_comment_you_defeated_me_enemy"), (assign, ":relevance", 200), (else_try), (eq, ":troop_object_faction", "$g_talk_troop_faction"), (this_or_next|eq, ":reputation", lrep_upstanding), (eq, ":reputation", lrep_cunning), (assign, ":comment", "str_comment_you_defeated_my_friend_enemy_pragmatic"), (assign, ":relevance", 85), (else_try), (eq, ":troop_object_faction", "$g_talk_troop_faction"), (this_or_next|eq, ":reputation", lrep_martial), (eq, ":reputation", lrep_goodnatured), (assign, ":comment", "str_comment_you_defeated_my_friend_enemy_chivalrous"), (assign, ":relevance", 85), (else_try), (eq, ":troop_object_faction", "$g_talk_troop_faction"), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_defeated_my_friend_enemy_spiteful"), (assign, ":relevance", 85), (else_try), (eq, ":troop_object_faction", "$g_talk_troop_faction"), (assign, ":comment", "str_comment_you_defeated_my_friend_enemy"), (assign, ":relevance", 85), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, ":players_kingdom_relation", 0), (faction_slot_eq, "$players_kingdom", slot_faction_leader, "$g_talk_troop"), (assign, ":comment", "str_comment_you_defeated_a_lord_allied_liege"), (assign, ":relevance", 70), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, ":players_kingdom_relation", 0), (lt, "$g_talk_troop_relation", -5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_defeated_a_lord_allied_unfriendly_spiteful"), (assign, ":relevance", 65), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, ":players_kingdom_relation", 0), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_defeated_a_lord_allied_spiteful"), (assign, ":relevance", 65), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, ":players_kingdom_relation", 0), (lt, "$g_talk_troop_relation", -5), (this_or_next|eq, ":reputation", lrep_upstanding), (eq, ":reputation", lrep_martial), (assign, ":comment", "str_comment_you_defeated_a_lord_allied_unfriendly_chivalrous"), (assign, ":relevance", 65), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, ":players_kingdom_relation", 0), (assign, ":comment", "str_comment_you_defeated_a_lord_allied"), (assign, ":relevance", 65), (try_end), (else_try), (eq, ":entry_type", logent_lord_defeated_by_player), (try_begin), (eq, ":troop_object", "$g_talk_troop"), (this_or_next|eq, ":reputation", lrep_martial), (eq, ":reputation", lrep_goodnatured), (assign, ":comment", "str_comment_you_defeated_me_enemy_chivalrous"), (assign, ":relevance", 200), (else_try), (eq, ":troop_object", "$g_talk_troop"), (this_or_next|eq, ":reputation", lrep_debauched), (eq, ":reputation", lrep_quarrelsome), (assign, ":comment", "str_comment_you_defeated_me_enemy_spiteful"), (assign, ":relevance", 200), (else_try), (eq, ":troop_object", "$g_talk_troop"), (assign, ":comment", "str_comment_you_defeated_me_enemy"), (assign, ":relevance", 200), (else_try), (eq, ":troop_object_faction", "$g_talk_troop_faction"), (this_or_next|eq, ":reputation", lrep_upstanding), (eq, ":reputation", lrep_cunning), (assign, ":comment", "str_comment_you_defeated_my_friend_enemy_pragmatic"), (assign, ":relevance", 85), (else_try), (eq, ":troop_object_faction", "$g_talk_troop_faction"), (this_or_next|eq, ":reputation", lrep_martial), (eq, ":reputation", lrep_goodnatured), (assign, ":comment", "str_comment_you_defeated_my_friend_enemy_chivalrous"), (assign, ":relevance", 85), (else_try), (eq, ":troop_object_faction", "$g_talk_troop_faction"), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_defeated_my_friend_enemy_spiteful"), (assign, ":relevance", 85), (else_try), (eq, ":troop_object_faction", "$g_talk_troop_faction"), (assign, ":comment", "str_comment_you_defeated_my_friend_enemy"), (assign, ":relevance", 85), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, ":players_kingdom_relation", 0), (faction_slot_eq, "$players_kingdom", slot_faction_leader, "$g_talk_troop"), (assign, ":comment", "str_comment_you_defeated_a_lord_allied_liege"), (assign, ":relevance", 70), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, ":players_kingdom_relation", 0), (lt, "$g_talk_troop_relation", -5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_defeated_a_lord_allied_unfriendly_spiteful"), (assign, ":relevance", 65), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, ":players_kingdom_relation", 0), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_defeated_a_lord_allied_spiteful"), (assign, ":relevance", 65), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, ":players_kingdom_relation", 0), (lt, "$g_talk_troop_relation", -5), (this_or_next|eq, ":reputation", lrep_upstanding), (eq, ":reputation", lrep_martial), (assign, ":comment", "str_comment_you_defeated_a_lord_allied_unfriendly_chivalrous"), (assign, ":relevance", 65), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, ":players_kingdom_relation", 0), (assign, ":comment", "str_comment_you_defeated_a_lord_allied"), (assign, ":relevance", 65), (try_end), #Post 0907 changes begin (else_try), (eq, ":entry_type", logent_lord_helped_by_player), (neq, ":troop_object", "$g_talk_troop"), (eq, ":troop_object_faction", "$g_talk_troop_faction"), (try_begin), (lt, "$g_talk_troop_relation", -5), (this_or_next|eq, ":reputation", lrep_upstanding), (eq, ":reputation", lrep_martial), (assign, ":comment", "str_comment_you_helped_my_ally_unfriendly_chivalrous"), (assign, ":relevance", 65), (assign, ":suggested_relation_change", 2), (else_try), (lt, "$g_talk_troop_relation", -5), (assign, ":comment", "str_comment_you_helped_my_ally_unfriendly"), (assign, ":relevance", 0), (else_try), (eq, ":reputation", lrep_none), (assign, ":comment", "str_comment_you_helped_my_ally_liege"), (assign, ":relevance", 65), (assign, ":suggested_relation_change", 3), (else_try), (lt, "$g_talk_troop_relation", -5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_helped_my_ally_unfriendly_spiteful"), (assign, ":relevance", 65), (else_try), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_helped_my_ally_spiteful"), (assign, ":relevance", 65), (else_try), (this_or_next|eq, ":reputation", lrep_martial), (eq, ":reputation", lrep_upstanding), (assign, ":comment", "str_comment_you_helped_my_ally_chivalrous"), (assign, ":relevance", 65), (assign, ":suggested_relation_change", 2), (else_try), (eq, ":troop_object", "$g_talk_troop"), (assign, ":comment", "str_comment_you_helped_my_ally_default"), (try_end), #Post 0907 changes begin (else_try), (eq, ":entry_type", logent_player_defeated_by_lord), (troop_slot_eq, "$g_talk_troop", slot_troop_present_at_event, ":log_entry_no"), (try_begin), (lt, "$g_talk_troop_relation", -5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_we_were_defeated_unfriendly_spiteful"), (assign, ":relevance", 150), (else_try), (lt, "$g_talk_troop_relation", -5), (assign, ":comment", "str_comment_we_were_defeated_unfriendly"), (assign, ":relevance", 150), (else_try), (this_or_next|eq, ":reputation", lrep_selfrighteous), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_we_were_defeated_cruel"), (assign, ":relevance", 150), (else_try), (assign, ":comment", "str_comment_we_were_defeated_default"), (assign, ":relevance", 150), (try_end), (else_try), (eq, ":entry_type", logent_player_defeated_by_lord), (try_begin), (eq, ":troop_object", "$g_talk_troop"), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_I_defeated_you_enemy_spiteful"), (assign, ":relevance", 200), (else_try), (eq, ":troop_object", "$g_talk_troop"), (eq, ":reputation", lrep_martial), (assign, ":comment", "str_comment_I_defeated_you_enemy_chivalrous"), (assign, ":relevance", 200), (else_try), (eq, ":troop_object", "$g_talk_troop"), (this_or_next|eq, ":reputation", lrep_goodnatured), (eq, ":reputation", lrep_upstanding), (assign, ":comment", "str_comment_I_defeated_you_enemy_benevolent"), (assign, ":relevance", 200), (else_try), (eq, ":troop_object", "$g_talk_troop"), (this_or_next|eq, ":reputation", lrep_selfrighteous), (eq, ":reputation", lrep_cunning), (assign, ":comment", "str_comment_I_defeated_you_enemy_coldblooded"), (assign, ":relevance", 200), (else_try), (eq, ":troop_object", "$g_talk_troop"), (assign, ":comment", "str_comment_I_defeated_you_enemy"), (assign, ":relevance", 200), (else_try), (eq, ":troop_object", "$g_talk_troop"), (assign, ":comment", "str_comment_I_defeated_you_enemy"), (assign, ":relevance", 200), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (gt, "$g_talk_troop_relation", 5), (assign, ":comment", "str_comment_you_were_defeated_allied_friendly_spiteful"), (assign, ":relevance", 80), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (this_or_next|eq, ":reputation", lrep_selfrighteous), (eq, ":reputation", lrep_debauched), (lt, "$g_talk_troop_relation", -5), (assign, ":comment", "str_comment_you_were_defeated_allied_unfriendly_cruel"), (assign, ":relevance", 80), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (le, "$g_talk_troop_relation", 5), (assign, ":comment", "str_comment_you_were_defeated_allied_spiteful"), (assign, ":relevance", 80), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (eq, ":reputation", lrep_selfrighteous), (assign, ":comment", "str_comment_you_were_defeated_allied_pitiless"), (assign, ":relevance", 65), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (eq, ":reputation", lrep_upstanding), (lt, "$g_talk_troop_relation", -15), (assign, ":comment", "str_comment_you_were_defeated_allied_unfriendly_upstanding"), (assign, ":relevance", 65), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, "$g_talk_troop_relation", -10), (assign, ":comment", "str_comment_you_were_defeated_allied_unfriendly"), (assign, ":relevance", 65), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (assign, ":comment", "str_comment_you_were_defeated_allied"), (assign, ":relevance", 65), (try_end), #Post 0907 changes end #Post 0907 changes begin (else_try), (eq, ":entry_type", logent_player_retreated_from_lord), (troop_slot_eq, "$g_talk_troop", slot_troop_present_at_event, ":log_entry_no"), (try_begin), (lt, "$g_talk_troop_relation", -5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_abandoned_us_unfriendly_spiteful"), (assign, ":relevance", 150), (assign, ":suggested_relation_change", -5), (else_try), (lt, "$g_talk_troop_relation", -5), (eq, ":reputation", lrep_selfrighteous), (assign, ":comment", "str_comment_you_abandoned_us_unfriendly_pitiless"), (assign, ":relevance", 150), (assign, ":suggested_relation_change", -5), (else_try), (lt, "$g_talk_troop_relation", -5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_abandoned_us_spiteful"), (assign, ":suggested_relation_change", -5), (else_try), (eq, ":reputation", lrep_martial), (assign, ":comment", "str_comment_you_abandoned_us_chivalrous"), (assign, ":relevance", 150), (assign, ":suggested_relation_change", -2), (else_try), (this_or_next|eq, ":reputation", lrep_upstanding), (eq, ":reputation", lrep_goodnatured), (assign, ":comment", "str_comment_you_abandoned_us_benefitofdoubt"), (assign, ":relevance", 150), (assign, ":suggested_relation_change", -1), (else_try), (assign, ":comment", "str_comment_you_abandoned_us_default"), (assign, ":relevance", 150), (assign, ":suggested_relation_change", -2), (try_end), #Post 0907 changes end (else_try), (this_or_next|eq, ":entry_type", logent_player_retreated_from_lord), (eq, ":entry_type", logent_player_retreated_from_lord_cowardly), (eq, ":troop_object", "$g_talk_troop"), (try_begin), (eq, "$cheat_mode", 1), (assign, reg7, ":entry_hours_elapsed"), (display_message, "@Elapsed hours: {reg7}"), (try_end), (gt, ":entry_hours_elapsed", 2), (try_begin), (this_or_next|eq, ":reputation", lrep_selfrighteous), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_ran_from_me_enemy_spiteful"), (assign, ":relevance", 25), (else_try), (eq, ":reputation", lrep_martial), (assign, ":comment", "str_comment_you_ran_from_me_enemy_chivalrous"), (assign, ":relevance", 25), (else_try), (this_or_next|eq, ":reputation", lrep_goodnatured), (eq, ":reputation", lrep_upstanding), (assign, ":comment", "str_comment_you_ran_from_me_enemy_benevolent"), (assign, ":relevance", 25), (else_try), (eq, ":reputation", lrep_cunning), (assign, ":comment", "str_comment_you_ran_from_me_enemy_coldblooded"), (assign, ":relevance", 25), (else_try), (assign, ":comment", "str_comment_you_ran_from_me_enemy"), (assign, ":relevance", 25), (try_end), (else_try), (eq, ":entry_type", logent_player_retreated_from_lord_cowardly), (try_begin), (eq, "$players_kingdom", "$g_talk_troop_faction"), (neq, ":troop_object", "$g_talk_troop"), (lt, "$g_talk_troop_relation", 5), (eq, ":reputation", lrep_martial), (assign, ":comment", "str_comment_you_ran_from_foe_allied_chivalrous"), (assign, ":relevance", 80), (assign, ":suggested_relation_change", -3), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (neq, ":troop_object", "$g_talk_troop"), (eq, ":reputation", lrep_upstanding), (assign, ":comment", "str_comment_you_ran_from_foe_allied_upstanding"), (assign, ":relevance", 80), (assign, ":suggested_relation_change", -1), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (neq, ":troop_object", "$g_talk_troop"), (lt, "$g_talk_troop_relation", 5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_ran_from_foe_allied_spiteful"), (assign, ":relevance", 80), (try_end), (else_try), (eq, ":entry_type", logent_lord_defeated_but_let_go_by_player), (try_begin), (eq, ":troop_object", "$g_talk_troop"), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_let_me_go_spiteful"), (assign, ":relevance", 300), (assign, ":suggested_relation_change", -15), (else_try), (eq, ":troop_object", "$g_talk_troop"), (ge, "$g_talk_troop_faction_relation", 0), (assign, ":comment", "str_comment_you_let_me_go_default"), (assign, ":relevance", 300), (assign, ":suggested_relation_change", 2), (else_try), (eq, ":troop_object", "$g_talk_troop"), (lt, "$g_talk_troop_faction_relation", 0), (this_or_next|eq, ":reputation", lrep_martial), (eq, ":reputation", lrep_upstanding), (assign, ":suggested_relation_change", 5), (assign, ":relevance", 300), (assign, ":comment", "str_comment_you_let_me_go_enemy_chivalrous"), (else_try), (eq, ":troop_object", "$g_talk_troop"), (lt, "$g_talk_troop_faction_relation", 0), (this_or_next|eq, ":reputation", lrep_selfrighteous), (eq, ":reputation", lrep_cunning), (assign, ":relevance", 300), (assign, ":comment", "str_comment_you_let_me_go_enemy_coldblooded"), (else_try), (eq, ":troop_object", "$g_talk_troop"), (lt, "$g_talk_troop_faction_relation", 0), (assign, ":relevance", 300), (assign, ":comment", "str_comment_you_let_me_go_enemy"), (assign, ":suggested_relation_change", 1), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, ":players_kingdom_relation", 0), (neq, ":troop_object", "$g_talk_troop"), (this_or_next|eq, ":reputation", lrep_martial), (eq, ":reputation", lrep_goodnatured), (assign, ":comment", "str_comment_you_let_go_a_lord_allied_chivalrous"), (assign, ":relevance", 80), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, ":players_kingdom_relation", 0), (neq, ":troop_object", "$g_talk_troop"), (eq, ":reputation", lrep_upstanding), (assign, ":comment", "str_comment_you_let_go_a_lord_allied_upstanding"), (assign, ":relevance", 80), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, ":players_kingdom_relation", 0), (neq, ":troop_object", "$g_talk_troop"), (this_or_next|eq, ":reputation", lrep_cunning), (eq, ":reputation", lrep_selfrighteous), (assign, ":comment", "str_comment_you_let_go_a_lord_allied_coldblooded"), (assign, ":relevance", 80), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, ":players_kingdom_relation", 0), (neq, ":troop_object", "$g_talk_troop"), (lt, "$g_talk_troop_relation", -5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_let_go_a_lord_allied_unfriendly_spiteful"), (assign, ":relevance", 80), (else_try), (eq, "$players_kingdom", "$g_talk_troop_faction"), (lt, ":players_kingdom_relation", 0), (neq, ":troop_object", "$g_talk_troop"), (assign, ":comment", "str_comment_you_let_go_a_lord_allied"), (assign, ":relevance", 80), (try_end), #Internal faction relations (else_try), (eq, ":entry_type", logent_pledged_allegiance), (eq, ":actor", "trp_player"), (try_begin), (eq, ":faction_object", "$g_talk_troop_faction"), (neq, ":troop_object", "$g_talk_troop"), (assign, ":relevance", 200), (try_begin), (lt, "$g_talk_troop_relation", -5), (eq, ":reputation", lrep_martial), (assign, ":comment", "str_comment_pledged_allegiance_allied_martial_unfriendly"), (else_try), (eq, ":reputation", lrep_martial), (assign, ":comment", "str_comment_pledged_allegiance_allied_martial"), (else_try), (lt, "$g_talk_troop_relation", -5), (eq, ":reputation", lrep_quarrelsome), (assign, ":comment", "str_comment_pledged_allegiance_allied_quarrelsome_unfriendly"), (else_try), (eq, ":reputation", lrep_quarrelsome), (assign, ":comment", "str_comment_pledged_allegiance_allied_quarrelsome"), (else_try), (lt, "$g_talk_troop_relation", -5), (eq, ":reputation", lrep_selfrighteous), (assign, ":comment", "str_comment_pledged_allegiance_allied_selfrighteous_unfriendly"), (else_try), (eq, ":reputation", lrep_selfrighteous), (assign, ":comment", "str_comment_pledged_allegiance_allied_selfrighteous"), (else_try), (lt, "$g_talk_troop_relation", -5), (eq, ":reputation", lrep_cunning), (assign, ":comment", "str_comment_pledged_allegiance_allied_cunning_unfriendly"), (else_try), (eq, ":reputation", lrep_cunning), (assign, ":comment", "str_comment_pledged_allegiance_allied_cunning"), (else_try), (lt, "$g_talk_troop_relation", -5), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_pledged_allegiance_allied_debauched_unfriendly"), (else_try), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_pledged_allegiance_allied_debauched"), (else_try), (lt, "$g_talk_troop_relation", -5), (eq, ":reputation", lrep_goodnatured), (assign, ":comment", "str_comment_pledged_allegiance_allied_goodnatured_unfriendly"), (else_try), (eq, ":reputation", lrep_goodnatured), (assign, ":comment", "str_comment_pledged_allegiance_allied_goodnatured"), (else_try), (lt, "$g_talk_troop_relation", -5), (eq, ":reputation", lrep_upstanding), (assign, ":comment", "str_comment_pledged_allegiance_allied_upstanding_unfriendly"), (else_try), (eq, ":reputation", lrep_upstanding), (assign, ":comment", "str_comment_pledged_allegiance_allied_upstanding"), (try_end), (try_end), (else_try), (eq, ":entry_type", logent_fief_granted_village), (eq, ":actor", "trp_player"), (try_begin), (eq, ":faction_object", "$g_talk_troop_faction"), (neq, ":troop_object", "$g_talk_troop"), (eq, ":faction_object", "$players_kingdom"), (assign, ":relevance", 110), (try_begin), (gt, "$g_talk_troop_relation", 5), (this_or_next|eq, ":reputation", lrep_selfrighteous), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_our_king_granted_you_a_fief_allied_friendly_cruel"), (else_try), (gt, "$g_talk_troop_relation", 5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_cunning), (assign, ":comment", "str_comment_our_king_granted_you_a_fief_allied_friendly_cynical"), (else_try), (gt, "$g_talk_troop_relation", 5), (assign, ":comment", "str_comment_our_king_granted_you_a_fief_allied_friendly"), (else_try), (is_between, "$g_talk_troop_relation", -5, 5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_our_king_granted_you_a_fief_allied_spiteful"), (assign, ":suggested_relation_change", -2), (else_try), (lt, "$g_talk_troop_relation", -5), (eq, ":reputation", lrep_upstanding), (assign, ":comment", "str_comment_our_king_granted_you_a_fief_allied_unfriendly_upstanding"), (else_try), (lt, "$g_talk_troop_relation", -5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_our_king_granted_you_a_fief_allied_unfriendly_spiteful"), (else_try), (assign, ":comment", "str_comment_our_king_granted_you_a_fief_allied"), (try_end), (try_end), (else_try), (eq, ":entry_type", logent_renounced_allegiance), (eq, ":actor", "trp_player"), (try_begin), (eq, ":faction_object", "$g_talk_troop_faction"), (neq, ":troop_object", "$g_talk_troop"), (try_begin), (ge, "$g_talk_troop_faction_relation", 0), (neq, "$g_talk_troop_faction", "$players_kingdom"), (assign, ":relevance", 180), (try_begin), (gt, "$g_talk_troop_relation", 5), (assign, ":comment", "str_comment_you_renounced_your_alliegance_friendly"), (else_try), (ge, "$g_talk_troop_relation", 0), (eq, ":reputation", lrep_goodnatured), (assign, ":comment", "str_comment_you_renounced_your_alliegance_friendly"), (try_end), (else_try), (lt, "$g_talk_troop_faction_relation", 0), (assign, ":relevance", 300), (try_begin), (ge, "$g_talk_troop_relation", 0), (this_or_next|eq, ":reputation", lrep_selfrighteous), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_renounced_your_alliegance_unfriendly_moralizing"), (else_try), (gt, "$g_talk_troop_relation", 5), (this_or_next|eq, ":reputation", lrep_goodnatured), (eq, ":reputation", lrep_upstanding), (assign, ":comment", "str_comment_you_renounced_your_alliegance_enemy_friendly"), (else_try), (gt, "$g_talk_troop_relation", 5), (assign, ":comment", "str_comment_you_renounced_your_alliegance_enemy"), (else_try), (is_between, "$g_talk_troop_relation", -5, 5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_renounced_your_alliegance_unfriendly_spiteful"), (assign, ":suggested_relation_change", -2), (else_try), (lt, "$g_talk_troop_relation", -5), (this_or_next|eq, ":reputation", lrep_quarrelsome), (this_or_next|eq, ":reputation", lrep_selfrighteous), (eq, ":reputation", lrep_debauched), (assign, ":comment", "str_comment_you_renounced_your_alliegance_unfriendly_spiteful"), (else_try), (assign, ":comment", "str_comment_you_renounced_your_alliegance_default"), (try_end), (try_end), (try_end), (try_end), (assign, reg0, ":comment"), (assign, reg1, ":relevance"), (assign, reg2, ":suggested_relation_change"), ]), # script_get_relevant_comment_to_s42 # Input: none # Output: reg0 = 1 if comment found, 0 otherwise; s61 will contain comment string if found ("get_relevant_comment_to_s42", [ (troop_get_slot, ":reputation", "$g_talk_troop", slot_lord_reputation_type), (try_begin), (eq, "$cheat_mode", 1), (store_add, ":rep_string", ":reputation", "str_personality_archetypes"), (str_store_string, s15, ":rep_string"), (display_message, "@Reputation type: {s15}"), (try_end), (assign, ":highest_score_so_far", 50), (assign, ":best_comment_so_far", -1), (assign, ":comment_found", 0), (assign, ":best_log_entry", -1), (assign, ":comment_relation_change", 0), (store_current_hours, ":current_time"), #prevents multiple comments in conversations in same hour # (troop_get_slot, ":talk_troop_last_comment_time", "$g_talk_troop", slot_troop_last_comment_time), #"$num_log_entries should also be set to one, not zero. This is included in the initialize npcs script, although could be moved to game_start (troop_get_slot, ":talk_troop_last_comment_slot", "$g_talk_troop", slot_troop_last_comment_slot), (troop_set_slot, "$g_talk_troop", slot_troop_last_comment_slot, "$num_log_entries"), (store_add, ":log_entries_plus_one", "$num_log_entries", 1), (try_for_range, ":log_entry_no", 1, ":log_entries_plus_one"), # It should be log entries plus one, so that the try_ sequence does not stop short of the last log entry # $Num_log_entries is now the number of the last log entry, which begins at "1" rather than "0" # This is so that (le, ":log_entry_no", ":talk_troop_last_comment_slot") works properly (troop_get_slot, ":entry_time", "trp_log_array_entry_time", ":log_entry_no"), # (val_max, ":entry_time", 1), #This is needed for pre-game events to be commented upon, if hours are used rather than the order of events (store_sub, ":entry_hours_elapsed", ":current_time", ":entry_time"), (try_begin), (le, ":log_entry_no", ":talk_troop_last_comment_slot"), # (le, ":entry_time", ":talk_troop_last_comment_time"), (try_begin), (eq, ":log_entry_no", ":talk_troop_last_comment_slot"), (eq, "$cheat_mode", 1), (assign, reg5, ":log_entry_no"), (display_message, "@Entries up to #{reg5} skipped"), (try_end), # I suggest using the log entry number as opposed to time so that events in the same hour can be commented upon # This feels more natural, for example, if there are other lords in the court when the player pledges allegiance (else_try), # (le, ":entry_hours_elapsed", 3), #don't comment on really fresh events # (else_try), (call_script, "script_get_relevant_comment_for_log_entry", ":log_entry_no"), (gt, reg1, 10), (assign, ":score", reg1), (assign, ":comment", reg0), (store_random_in_range, ":rand", 70, 140), (val_mul, ":score", ":rand"), (store_add, ":entry_time_score", ":entry_hours_elapsed", 500), #approx. one month (val_mul, ":score", 1000), (val_div, ":score", ":entry_time_score"), ###Relevance decreases over time - halved after one month, one-third after two, etc (try_begin), (gt, ":score", ":highest_score_so_far"), (assign, ":highest_score_so_far", ":score"), (assign, ":best_comment_so_far", ":comment"), (assign, ":best_log_entry", ":log_entry_no"), (assign, ":comment_relation_change", reg2), (try_end), (try_end), (try_end), (try_begin), (gt, ":best_comment_so_far", 0), (assign, ":comment_found", 1), #comment found print it to s61 now. (troop_get_slot, ":actor", "trp_log_array_actor", ":best_log_entry"), (troop_get_slot, ":center_object", "trp_log_array_center_object", ":best_log_entry"), (troop_get_slot, ":center_object_lord", "trp_log_array_center_object_lord", ":best_log_entry"), (troop_get_slot, ":center_object_faction", "trp_log_array_center_object_faction", ":best_log_entry"), (troop_get_slot, ":troop_object", "trp_log_array_troop_object", ":best_log_entry"), (troop_get_slot, ":troop_object_faction", "trp_log_array_troop_object_faction", ":best_log_entry"), (troop_get_slot, ":faction_object", "trp_log_array_faction_object", ":best_log_entry"), (try_begin), (ge, ":actor", 0), (str_store_troop_name, s50, ":actor"), (try_end), (try_begin), (ge, ":center_object", 0), (str_store_party_name, s51, ":center_object"), (try_end), (try_begin), (ge, ":center_object_lord", 0), (str_store_troop_name, s52, ":center_object_lord"), (try_end), (try_begin), (ge, ":center_object_faction", 0), (str_store_faction_name, s53, ":center_object_faction"), (try_end), (try_begin), (ge, ":troop_object", 0), (str_store_troop_name, s54, ":troop_object"), (try_end), (try_begin), (ge, ":troop_object_faction", 0), (str_store_faction_name, s55, ":troop_object_faction"), (try_end), (try_begin), (ge, ":faction_object", 0), (str_store_faction_name, s56, ":faction_object"), (try_end), (str_store_string, s42, ":best_comment_so_far"), (try_end), (assign, reg0, ":comment_found"), (assign, "$log_comment_relation_change", ":comment_relation_change"), ]), #Troop Commentaries end #Rebellion changes begin ("find_rival_from_faction", [ (store_script_param, ":source_lord", 1), (store_script_param, ":target_faction", 2), (assign, ":rival", 0), (troop_get_slot, ":source_reputation", ":source_lord", slot_lord_reputation_type), (try_for_range, ":target_lord", kingdom_heroes_begin, kingdom_heroes_end), (store_troop_faction, ":test_faction", ":target_lord"), (eq, ":test_faction", ":target_faction"), (troop_get_slot, ":target_reputation", ":target_lord", slot_lord_reputation_type), (try_begin), (eq, ":source_reputation", lrep_martial), (eq, ":target_reputation", lrep_martial), (assign, ":rival", ":target_lord"), (else_try), (eq, ":source_reputation", lrep_debauched), (eq, ":target_reputation", lrep_upstanding), (assign, ":rival", ":target_lord"), (else_try), (eq, ":source_reputation", lrep_selfrighteous), (eq, ":target_reputation", lrep_goodnatured), (assign, ":rival", ":target_lord"), (else_try), (eq, ":source_reputation", lrep_cunning), (eq, ":target_reputation", lrep_quarrelsome), (assign, ":rival", ":target_lord"), (else_try), (eq, ":source_reputation", lrep_quarrelsome), (eq, ":target_reputation", lrep_cunning), (assign, ":rival", ":target_lord"), (else_try), (eq, ":source_reputation", lrep_goodnatured), (eq, ":target_reputation", lrep_selfrighteous), (assign, ":rival", ":target_lord"), (else_try), (eq, ":source_reputation", lrep_upstanding), (eq, ":target_reputation", lrep_debauched), (assign, ":rival", ":target_lord"), (try_end), (try_end), (assign, reg0, ":rival"), ]), ("rebellion_arguments", [ (store_script_param, ":lord", 1), (store_script_param, ":argument", 2), (assign, ":argument_value", 0), (troop_get_slot, ":reputation", ":lord", slot_lord_reputation_type), (try_begin), (eq, ":reputation", lrep_martial), (try_begin), (eq, ":argument", argument_claim), (assign, ":argument_value", 30), (else_try), (eq, ":argument", argument_ruler), (assign, ":argument_value", 10), (else_try), (eq, ":argument", argument_benefit), (assign, ":argument_value", -20), (else_try), (eq, ":argument", argument_victory), (assign, ":argument_value", -30), (try_end), (else_try), (eq, ":reputation", lrep_quarrelsome), (try_begin), (eq, ":argument", argument_claim), (assign, ":argument_value", -20), (else_try), (eq, ":argument", argument_ruler), (assign, ":argument_value", -30), (else_try), (eq, ":argument", argument_benefit), (assign, ":argument_value", 30), (else_try), (eq, ":argument", argument_victory), (assign, ":argument_value", 10), (try_end), (else_try), (eq, ":reputation", lrep_selfrighteous), (try_begin), (eq, ":argument", argument_claim), (assign, ":argument_value", -20), (else_try), (eq, ":argument", argument_ruler), (assign, ":argument_value", -30), (else_try), (eq, ":argument", argument_benefit), (assign, ":argument_value", 20), (else_try), (eq, ":argument", argument_victory), (assign, ":argument_value", 20), (try_end), (else_try), (eq, ":reputation", lrep_cunning), (try_begin), (eq, ":argument", argument_claim), (assign, ":argument_value", -30), (else_try), (eq, ":argument", argument_ruler), (assign, ":argument_value", 20), (else_try), (eq, ":argument", argument_benefit), (assign, ":argument_value", -20), (else_try), (eq, ":argument", argument_victory), (assign, ":argument_value", 20), (try_end), (else_try), (eq, ":reputation", lrep_debauched), (try_begin), (eq, ":argument", argument_claim), (assign, ":argument_value", -20), (else_try), (eq, ":argument", argument_ruler), (assign, ":argument_value", -20), (else_try), (eq, ":argument", argument_benefit), (assign, ":argument_value", 20), (else_try), (eq, ":argument", argument_victory), (assign, ":argument_value", 10), (try_end), (else_try), (eq, ":reputation", lrep_goodnatured), (try_begin), (eq, ":argument", argument_claim), (assign, ":argument_value", 10), (else_try), (eq, ":argument", argument_ruler), (assign, ":argument_value", 20), (else_try), (eq, ":argument", argument_benefit), (assign, ":argument_value", -15), (else_try), (eq, ":argument", argument_victory), (assign, ":argument_value", -25), (try_end), (else_try), (eq, ":reputation", lrep_upstanding), (try_begin), (eq, ":argument", argument_claim), (assign, ":argument_value", 10), (else_try), (eq, ":argument", argument_ruler), (assign, ":argument_value", 0), (else_try), (eq, ":argument", argument_benefit), (assign, ":argument_value", -40), (else_try), (eq, ":argument", argument_victory), (assign, ":argument_value", 10), (try_end), (try_end), (assign, reg0, ":argument_value"), ]), #Rebellion changes end # script_get_culture_with_party_faction_for_music # Input: arg1 = party_no # Output: reg0 = culture ("get_culture_with_party_faction_for_music", [ (store_script_param, ":party_no", 1), (store_faction_of_party, ":faction_no", ":party_no"), (try_begin), (this_or_next|eq, ":faction_no", "fac_player_faction"), (eq, ":faction_no", "fac_player_supporters_faction"), (assign, ":faction_no", "$players_kingdom"), (try_end), (try_begin), (is_between, ":party_no", centers_begin, centers_end), (this_or_next|eq, ":faction_no", "fac_player_supporters_faction"), (neg|is_between, ":faction_no", kingdoms_begin, kingdoms_end), (party_get_slot, ":faction_no", ":party_no", slot_center_original_faction), (try_end), (try_begin), (eq, ":faction_no", "fac_kingdom_1"), (assign, ":result", mtf_culture_1), (else_try), (eq, ":faction_no", "fac_kingdom_2"), (assign, ":result", mtf_culture_2), (else_try), (eq, ":faction_no", "fac_kingdom_3"), (assign, ":result", mtf_culture_3), (else_try), (eq, ":faction_no", "fac_kingdom_4"), (assign, ":result", mtf_culture_4), (else_try), (eq, ":faction_no", "fac_kingdom_5"), (assign, ":result", mtf_culture_5), (else_try), (this_or_next|eq, ":faction_no", "fac_outlaws"), (this_or_next|eq, ":faction_no", "fac_peasant_rebels"), (this_or_next|eq, ":faction_no", "fac_deserters"), (this_or_next|eq, ":faction_no", "fac_mountain_bandits"), (eq, ":faction_no", "fac_forest_bandits"), (assign, ":result", mtf_culture_6), (else_try), (assign, ":result", 0), #no culture, including player with no bindings to another kingdom (try_end), (assign, reg0, ":result"), ]), # script_music_set_situation_with_culture # Input: arg1 = music_situation # Output: none ("music_set_situation_with_culture", [ (store_script_param, ":situation", 1), (assign, ":culture", 0), #no culture (try_begin), (this_or_next|eq, ":situation", mtf_sit_town), (this_or_next|eq, ":situation", mtf_sit_day), (this_or_next|eq, ":situation", mtf_sit_night), (this_or_next|eq, ":situation", mtf_sit_town_infiltrate), (eq, ":situation", mtf_sit_encounter_hostile), (call_script, "script_get_culture_with_party_faction_for_music", "$g_encountered_party"), (val_or, ":culture", reg0), (else_try), (this_or_next|eq, ":situation", mtf_sit_ambushed), (eq, ":situation", mtf_sit_fight), (call_script, "script_get_culture_with_party_faction_for_music", "$g_encountered_party"), (val_or, ":culture", reg0), (call_script, "script_get_culture_with_party_faction_for_music", "p_main_party"), (val_or, ":culture", reg0), (call_script, "script_get_closest_center", "p_main_party"), (call_script, "script_get_culture_with_party_faction_for_music", reg0), (val_or, ":culture", reg0), (else_try), (eq, ":situation", mtf_sit_travel), (call_script, "script_get_culture_with_party_faction_for_music", "p_main_party"), (val_or, ":culture", reg0), (call_script, "script_get_closest_center", "p_main_party"), (call_script, "script_get_culture_with_party_faction_for_music", reg0), (val_or, ":culture", reg0), (else_try), (eq, ":situation", mtf_sit_victorious), (call_script, "script_get_culture_with_party_faction_for_music", "p_main_party"), (val_or, ":culture", reg0), (else_try), (eq, ":situation", mtf_sit_killed), (call_script, "script_get_culture_with_party_faction_for_music", "$g_encountered_party"), (val_or, ":culture", reg0), (try_end), (try_begin), (this_or_next|eq, ":situation", mtf_sit_town), (eq, ":situation", mtf_sit_day), (try_begin), (is_currently_night), (assign, ":situation", mtf_sit_night), (try_end), (try_end), (music_set_situation, ":situation"), (music_set_culture, ":culture"), ]), # script_combat_music_set_situation_with_culture # Input: none # Output: none ("combat_music_set_situation_with_culture", [ (assign, ":situation", mtf_sit_fight), (assign, ":num_allies", 0), (assign, ":num_enemies", 0), (try_for_agents, ":agent_no"), (agent_is_alive, ":agent_no"), (agent_is_human, ":agent_no"), (agent_get_troop_id, ":agent_troop_id", ":agent_no"), (store_character_level, ":troop_level", ":agent_troop_id"), (val_add, ":troop_level", 10), (val_mul, ":troop_level", ":troop_level"), (try_begin), (agent_is_ally, ":agent_no"), (val_add, ":num_allies", ":troop_level"), (else_try), (val_add, ":num_enemies", ":troop_level"), (try_end), (try_end), (val_mul, ":num_allies", 4), #play ambushed music if we are 2 times outnumbered. (val_div, ":num_allies", 3), (try_begin), (lt, ":num_allies", ":num_enemies"), (assign, ":situation", mtf_sit_ambushed), (try_end), (call_script, "script_music_set_situation_with_culture", ":situation"), ]), # script_play_victorious_sound # Input: none # Output: none ("play_victorious_sound", [ (call_script, "script_music_set_situation_with_culture", mtf_sit_victorious), # (play_cue_track, "track_victorious_neutral_1"), # (play_track, "track_victorious_neutral_1", 1), ]), # script_set_items_for_tournament # Input: arg1 = horse_chance, arg2 = lance_chance (with horse only), arg3 = sword_chance, arg4 = axe_chance, arg5 = bow_chance (without horse only), arg6 = javelin_chance (with horse only), arg7 = mounted_bow_chance (with horse only), arg8 = crossbow_sword_chance, arg9 = armor_item_begin, arg10 = helm_item_begin # Output: none (sets mt_arena_melee_fight items) ("set_items_for_tournament", [ (store_script_param, ":horse_chance", 1), (store_script_param, ":lance_chance", 2), (store_script_param, ":sword_chance", 3), (store_script_param, ":axe_chance", 4), (store_script_param, ":bow_chance", 5), (store_script_param, ":javelin_chance", 6), (store_script_param, ":mounted_bow_chance", 7), (store_script_param, ":crossbow_sword_chance", 8), (store_script_param, ":armor_item_begin", 9), (store_script_param, ":helm_item_begin", 10), (store_add, ":total_chance", ":sword_chance", ":axe_chance"), (val_add, ":total_chance", ":crossbow_sword_chance"), (try_for_range, ":i_ep", 0, 32), (mission_tpl_entry_clear_override_items, "mt_arena_melee_fight", ":i_ep"), (assign, ":has_horse", 0), (store_div, ":cur_team", ":i_ep", 8), (try_begin), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", ":horse_chance"), (assign, ":has_horse", 1), (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_practice_horse"), (try_end), (try_begin), (eq, ":has_horse", 1), (store_add, ":cur_total_chance", ":total_chance", ":lance_chance"), (val_add, ":cur_total_chance", ":javelin_chance"), (val_add, ":cur_total_chance", ":mounted_bow_chance"), (else_try), (store_add, ":cur_total_chance", ":total_chance", ":bow_chance"), (try_end), (store_random_in_range, ":random_no", 0, ":cur_total_chance"), (store_add, ":cur_shield_item", "itm_arena_shield_red", ":cur_team"), (try_begin), (val_sub, ":random_no", ":sword_chance"), (lt, ":random_no", 0), (try_begin), (store_random_in_range, ":sub_random_no", 0, 100), (lt, ":sub_random_no", 50), (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_practice_sword"), (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", ":cur_shield_item"), # (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_practice_shield"), (else_try), (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_heavy_practice_sword"), (try_end), (else_try), (val_sub, ":random_no", ":axe_chance"), (lt, ":random_no", 0), (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_practice_axe"), (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", ":cur_shield_item"), # (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_practice_shield"), (else_try), (val_sub, ":random_no", ":crossbow_sword_chance"), (lt, ":random_no", 0), (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_practice_sword"), (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_practice_crossbow"), (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_practice_bolts"), (else_try), (eq, ":has_horse", 0), (val_sub, ":random_no", ":bow_chance"), (lt, ":random_no", 0), (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_practice_bow"), (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_practice_arrows"), (else_try), (eq, ":has_horse", 1), (val_sub, ":random_no", ":lance_chance"), (lt, ":random_no", 0), (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_practice_lance"), (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", ":cur_shield_item"), # (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_practice_shield"), (else_try), (eq, ":has_horse", 1), (val_sub, ":random_no", ":javelin_chance"), (lt, ":random_no", 0), (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_practice_javelin"), (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", ":cur_shield_item"), # (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_practice_shield"), (else_try), (eq, ":has_horse", 1), (val_sub, ":random_no", ":mounted_bow_chance"), (lt, ":random_no", 0), (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_practice_bow"), (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_practice_arrows"), (try_end), (try_begin), (ge, ":armor_item_begin", 0), (store_add, ":cur_armor_item", ":armor_item_begin", ":cur_team"), (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", ":cur_armor_item"), (try_end), (try_begin), (ge, ":helm_item_begin", 0), (store_add, ":cur_helm_item", ":helm_item_begin", ":cur_team"), (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", ":cur_helm_item"), (try_end), (try_end), ]), # script_custom_battle_end # Input: none # Output: none ("custom_battle_end", [ (assign, "$g_custom_battle_team1_death_count", 0), (assign, "$g_custom_battle_team2_death_count", 0), (try_for_agents, ":cur_agent"), (agent_is_human, ":cur_agent"), (neg|agent_is_alive, ":cur_agent"), (agent_get_team, ":cur_team", ":cur_agent"), (try_begin), (eq, ":cur_team", 0), (val_add, "$g_custom_battle_team1_death_count", 1), (else_try), (val_add, "$g_custom_battle_team2_death_count", 1), (try_end), (try_end), ]), # script_remove_troop_from_prison # Input: troop_no # Output: none ("remove_troop_from_prison", [(store_script_param, ":troop_no", 1), (troop_set_slot, ":troop_no", slot_troop_prisoner_of_party, -1), (try_begin), (check_quest_active, "qst_rescue_lord_by_replace"), (quest_slot_eq, "qst_rescue_lord_by_replace", slot_quest_target_troop, ":troop_no"), (call_script, "script_cancel_quest", "qst_rescue_lord_by_replace"), (try_end), (try_begin), (check_quest_active, "qst_deliver_message_to_prisoner_lord"), (quest_slot_eq, "qst_deliver_message_to_prisoner_lord", slot_quest_target_troop, ":troop_no"), (call_script, "script_cancel_quest", "qst_deliver_message_to_prisoner_lord"), (try_end), ]), ############################## # Form Ranks Scripts Section Begin # # script_formation_agent_init # Called when agent spawned. Initialize slot_agent_formations_states. # To be developed # Input: arg1: agent_no # Output: none ("formation_agent_init", [(store_script_param, ":agent_no", 1), #TO DO: add code for multi arrays, update $formation_max_array_no # set array leader -- added elsewhere (agent_get_party_id, ":party_no", ":agent_no"), (agent_get_team, ":team_no", ":agent_no"), (agent_get_troop_id, ":troop_id", ":agent_no"), (assign, ":formation_states", 0), (try_begin), #(eq, ":team_no", ":main_team"), #(agent_is_ally, ":agent_no"), (agent_is_human, ":agent_no"), (assign, ":array_no", -1), (assign, ":array_leader", 0), (try_begin), (eq, "p_main_party", ":party_no"), (assign, ":array_no", 0), (try_end), (try_for_range, ":i", 1, "$formation_max_array_no"), (store_add, ":slot", slot_party_array_parties_begin, ":i"), (party_get_slot, ":array_party", "p_main_party", ":slot"), (try_begin), (party_slot_eq, ":array_party", slot_array_party_leader, ":troop_id"), (assign, ":array_no", ":i"), (assign, ":array_leader", 1), (try_end), (eq, ":array_party", ":party_no"), (assign, ":array_no", ":i"), (try_end), (neq, ":array_no", -1), (val_add, ":formation_states", ":array_no"), (try_begin), (neq, ":array_leader", 0), (val_add, ":formation_states", safs_array_leader), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_leader), (party_set_slot, formation_vector, reg0, ":agent_no"), (try_end), (else_try), (agent_is_human, ":agent_no"), (assign, ":formation_states", safs_full_mask), # agent to be assigned array (try_end), (agent_set_slot, ":agent_no", slot_agent_formation_states, ":formation_states"), ]), # scrip_formation_array_init # Called before change formation # Input: arg1: team_no, arg2: array_no # Output: reg0: num_of_men ("formation_array_init", [(store_script_param_1, ":team_no"), (store_script_param_2, ":array_no"), (assign, ":num_of_men", 0), #(get_player_agent_no, ":player"), (try_for_agents, ":agent"), #(neq, ":agent", ":player"), (agent_is_alive, ":agent"), (agent_is_human, ":agent"), (agent_get_team, ":agent_team", ":agent"), (eq, ":agent_team", ":team_no"), (agent_get_slot, ":formation_states", ":agent", slot_agent_formation_states), (assign, ":agent_array", 0), (store_and, ":agent_array", ":formation_states", safs_array_no), (eq, ":agent_array", ":array_no"), (val_or, ":formation_states", safs_in_formation), (val_sub, ":formation_states", safs_in_formation), (agent_set_slot, ":agent", slot_agent_formation_states, ":formation_states"), (val_add, ":num_of_men", 1), (try_end), (assign, reg0, ":num_of_men"), # (display_message, "@Total {reg0} men.", formation_debug_color), ]), # script_formation_formulate_arrays # To assign soldiers to arrays for non-player teams # Input: none # Output: none ("formation_formulate_arrays", [(get_player_agent_no, ":player"), (agent_get_team, ":player_team", ":player"), (val_add, "$spawn_wave", 1), (try_begin), (eq, "$spawn_wave", 1), # initialize temp vector (assign, ":base", slot_formation_tmp_team_stat_begin), (try_for_range, ":team_no", 0, 4), (try_for_range, ":offset", 0, slot_formation_tmp_team_stat_section_size), (store_add, ":slot", ":offset", ":base"), (party_set_slot, formation_temp_vector, ":slot", 0), (try_end), (val_add, ":base", slot_formation_tmp_team_stat_section_size), (try_end), (try_end), (try_for_agents, ":agent_no"), (agent_is_alive, ":agent_no"), (agent_is_human, ":agent_no"), (agent_get_slot, ":formation_states", ":agent_no", slot_agent_formation_states), (eq, ":formation_states", safs_full_mask), # agent not assigned array yet (agent_get_team, ":team_no", ":agent_no"), (agent_get_troop_id, ":troop_id", ":agent_no"), (agent_get_class, ":class", ":agent_no"), (store_character_level, ":level", ":troop_id"), (store_mul, ":stat_slot", slot_formation_tmp_team_stat_section_size, ":team_no"), (val_add, ":stat_slot", slot_formation_tmp_team_stat_begin), (try_begin), (eq, ":class", grc_infantry), (try_begin), (ge, ":level", 15), (val_add, ":stat_slot", slot_formation_tmp_team_infantry_high), (party_get_slot, ":num", formation_temp_vector, ":stat_slot"), (val_add, ":num", 1), (try_begin), (assign, ":stage", 0), (store_and, ":stage", ":num", sftt_formation_stage_mask), (val_div, ":stage", sftt_formation_stage), (gt, ":stage", 0), # new agents added, # set formation stage to reform formation (val_add, ":num", 7*sftt_formation_stage), (try_end), (party_set_slot, formation_temp_vector, ":stat_slot", ":num"), (else_try), (val_add, ":stat_slot", slot_formation_tmp_team_infantry_low), (party_get_slot, ":num", formation_temp_vector, ":stat_slot"), (val_add, ":num", 1), (try_begin), (assign, ":stage", 0), (store_and, ":stage", ":num", sftt_formation_stage_mask), (val_div, ":stage", sftt_formation_stage), (gt, ":stage", 0), # new agents added, # set formation stage to reform formation (val_add, ":num", 7*sftt_formation_stage), (try_end), (party_set_slot, formation_temp_vector, ":stat_slot", ":num"), (try_end), (else_try), (eq, ":class", grc_archers), (val_add, ":stat_slot", slot_formation_tmp_team_archer), (party_get_slot, ":num", formation_temp_vector, ":stat_slot"), (val_add, ":num", 1), (try_begin), (assign, ":stage", 0), (store_and, ":stage", ":num", sftt_formation_stage_mask), (val_div, ":stage", sftt_formation_stage), (gt, ":stage", 0), # new agents added, # set formation stage to reform formation (val_add, ":num", 7*sftt_formation_stage), (try_end), (party_set_slot, formation_temp_vector, ":stat_slot", ":num"), (else_try), (troop_is_guarantee_ranged, ":troop_id"), (val_add, ":stat_slot", slot_formation_tmp_team_horse_archer_1), (party_get_slot, ":num", formation_temp_vector, ":stat_slot"), (val_add, ":num", 1), (try_begin), (assign, ":stage", 0), (store_and, ":stage", ":num", sftt_formation_stage_mask), (val_div, ":stage", sftt_formation_stage), (gt, ":stage", 0), # new agents added, # set formation stage to reform formation (val_add, ":num", 7*sftt_formation_stage), (try_end), (party_set_slot, formation_temp_vector, ":stat_slot", ":num"), (else_try), (val_add, ":stat_slot", slot_formation_tmp_team_cavalry_1), (party_get_slot, ":num", formation_temp_vector, ":stat_slot"), (val_add, ":num", 1), (try_begin), (assign, ":stage", 0), (store_and, ":stage", ":num", sftt_formation_stage_mask), (val_div, ":stage", sftt_formation_stage), (gt, ":stage", 0), # new agents added, # set formation stage to reform formation (val_add, ":num", 7*sftt_formation_stage), (try_end), (party_set_slot, formation_temp_vector, ":stat_slot", ":num"), (try_end), (try_end), (assign, ":base", slot_formation_tmp_team_stat_begin), (assign, ":base_1", slot_formation_teams_begin), (try_for_range, ":team_no", 0, 4), (eq, "$spawn_wave", 1), (try_begin), (neq, ":team_no", ":player_team"), (assign, ":max_array_no", 0), (store_add, ":infantry_high_slot", ":base", slot_formation_tmp_team_infantry_high), (try_begin), (party_get_slot, ":num", formation_temp_vector, ":infantry_high_slot"), (gt, ":num", 0), (store_mul, ":array_no", ":max_array_no", sftt_array_no_base), (val_add, ":num", ":array_no"), (party_set_slot, formation_temp_vector, ":infantry_high_slot", ":num"), (val_add, ":max_array_no", 1), (try_end), (store_add, ":infantry_low_slot", ":base", slot_formation_tmp_team_infantry_low), (try_begin), (party_get_slot, ":num", formation_temp_vector, ":infantry_low_slot"), (gt, ":num", 0), (store_mul, ":array_no", ":max_array_no", sftt_array_no_base), (val_add, ":num", ":array_no"), (party_set_slot, formation_temp_vector, ":infantry_low_slot", ":num"), (val_add, ":max_array_no", 1), (try_end), (store_add, ":archer_slot", ":base", slot_formation_tmp_team_archer), (try_begin), (party_get_slot, ":num", formation_temp_vector, ":archer_slot"), (gt, ":num", 0), (store_mul, ":array_no", ":max_array_no", sftt_array_no_base), (val_add, ":num", ":array_no"), (party_set_slot, formation_temp_vector, ":archer_slot", ":num"), (val_add, ":max_array_no", 1), (try_end), (store_add, ":cavalry_slot", ":base", slot_formation_tmp_team_cavalry_1), (try_begin), (neg|party_slot_ge, formation_temp_vector, ":cavalry_slot", 20), (party_get_slot, ":num", formation_temp_vector, ":cavalry_slot"), (gt, ":num", 0), (store_mul, ":array_no", ":max_array_no", sftt_array_no_base), (val_add, ":num", ":array_no"), (party_set_slot, formation_temp_vector, ":cavalry_slot", ":num"), (val_add, ":max_array_no", 1), (else_try), (party_slot_ge, formation_temp_vector, ":cavalry_slot", 20), (party_get_slot, ":num", formation_temp_vector, ":cavalry_slot"), (val_div, ":num", 2), (store_mul, ":array_no", ":max_array_no", sftt_array_no_base), (val_add, ":num", ":array_no"), (party_set_slot, formation_temp_vector, ":cavalry_slot", ":num"), (val_add, ":cavalry_slot", 1), (val_add, ":num", sftt_array_no_base+1), # plus 1 in case the original number is odd (party_set_slot, formation_temp_vector, ":cavalry_slot", ":num"), (val_add, ":max_array_no", 2), (try_end), (store_add, ":horse_archer_slot", ":base", slot_formation_tmp_team_horse_archer_1), (try_begin), (neg|party_slot_ge, formation_temp_vector, ":horse_archer_slot", 20), (party_get_slot, ":num", formation_temp_vector, ":horse_archer_slot"), (gt, ":num", 0), (store_mul, ":array_no", ":max_array_no", sftt_array_no_base), (val_add, ":num", ":array_no"), (party_set_slot, formation_temp_vector, ":horse_archer_slot", ":num"), (val_add, ":max_array_no", 1), (else_try), (party_slot_ge, formation_temp_vector, ":horse_archer_slot", 20), (party_get_slot, ":num", formation_temp_vector, ":horse_archer_slot"), (val_div, ":num", 2), (store_mul, ":array_no", ":max_array_no", sftt_array_no_base), (val_add, ":num", ":array_no"), (party_set_slot, formation_temp_vector, ":horse_archer_slot", ":num"), (val_add, ":horse_archer_slot", 1), (val_add, ":num", sftt_array_no_base+1), # plus 1 in case the original number is odd (party_set_slot, formation_temp_vector, ":horse_archer_slot", ":num"), (val_add, ":max_array_no", 2), (try_end), (store_add, ":base_2", ":base_1", slot_formation_team_arrays_begin), (try_for_range, ":array_no", 0, ":max_array_no"), (store_add, ":leader_slot", ":base_2", slot_formation_array_leader), (party_set_slot, formation_vector, ":leader_slot", -1), (val_add, ":base_2", sfa_array_section_size), (try_end), (store_add, ":slot", ":base_1", slot_formation_team_max_array_no), (party_set_slot, formation_vector, ":slot", ":max_array_no"), (try_end), (val_add, ":base_1", sft_team_section_size), (val_add, ":base", slot_formation_tmp_team_stat_section_size), (else_try), debug_point, (store_add, ":cavalry_slot", ":base", slot_formation_tmp_team_cavalry_1), (party_get_slot, ":stat_1", formation_temp_vector, ":cavalry_slot"), (val_add, ":cavalry_slot", 1), (party_get_slot, ":stat_2", formation_temp_vector, ":cavalry_slot"), (assign, ":num_1", 0), (assign, ":num_2", 0), (store_and, ":num_1", ":stat_1", sftt_num_mask), (store_and, ":num_2", ":stat_2", sftt_num_mask), (try_begin), (store_sub, ":dif", ":num_1", ":num_2"), (gt, ":dif", 5), (val_div, ":dif", 2), (val_sub, ":stat_1", ":dif"), (val_add, ":stat_2", ":dif"), (try_begin), (assign, ":stage", 0), (store_and, ":stage", ":stat_2", sftt_formation_stage_mask), (val_div, ":stage", sftt_formation_stage), (gt, ":stage", 0), # new agents added, # set formation stage to reform formation (val_add, ":stat_2", 7*sftt_formation_stage), (try_end), (party_set_slot, formation_temp_vector, ":cavalry_slot", ":stat_2"), (val_sub, ":cavalry_slot", 1), (party_set_slot, formation_temp_vector, ":cavalry_slot", ":stat_1"), (try_end), (store_add, ":horse_archer_slot", ":base", slot_formation_tmp_team_cavalry_1), (party_get_slot, ":stat_1", formation_temp_vector, ":horse_archer_slot"), (val_add, ":cavalry_slot", 1), (party_get_slot, ":stat_2", formation_temp_vector, ":horse_archer_slot"), (assign, ":num_1", 0), (assign, ":num_2", 0), (store_and, ":num_1", ":stat_1", sftt_num_mask), (store_and, ":num_2", ":stat_2", sftt_num_mask), (try_begin), (store_sub, ":dif", ":num_1", ":num_2"), (gt, ":dif", 5), (val_div, ":dif", 2), (val_sub, ":stat_1", ":dif"), (val_add, ":stat_2", ":dif"), (try_begin), (assign, ":stage", 0), (store_and, ":stage", ":stat_2", sftt_formation_stage_mask), (val_div, ":stage", sftt_formation_stage), (gt, ":stage", 0), # new agents added, # set formation stage to reform formation (val_add, ":stat_2", 7*sftt_formation_stage), (try_end), (party_set_slot, formation_temp_vector, ":horse_archer_slot", ":stat_2"), (val_sub, ":cavalry_slot", 1), (party_set_slot, formation_temp_vector, ":horse_archer_slot", ":stat_1"), (try_end), (val_add, ":base", slot_formation_tmp_team_stat_section_size), (try_end), (try_for_agents, ":agent"), (agent_is_alive, ":agent"), (agent_is_human, ":agent"), (agent_get_slot, ":formation_states", ":agent", slot_agent_formation_states), (eq, ":formation_states", safs_full_mask), # agent not assigned array yet (agent_get_team, ":team_no", ":agent"), (agent_get_class, ":class", ":agent"), (neq, ":team_no", ":player_team"), (try_begin), (eq, ":class", grc_infantry), (try_begin), (ge, ":level", 15), (call_script, "script_cf_formation_agent_assign_array", ":agent", ":team_no", slot_formation_tmp_team_infantry_high), (else_try), (call_script, "script_cf_formation_agent_assign_array", ":agent", ":team_no", slot_formation_tmp_team_infantry_low), (try_end), (else_try), (eq, ":class", grc_archers), (call_script, "script_cf_formation_agent_assign_array", ":agent", ":team_no", slot_formation_tmp_team_archer), (else_try), (agent_get_troop_id, ":troop_id", ":agent"), (troop_is_guarantee_ranged, ":troop_id"), (try_begin), (call_script, "script_cf_formation_agent_assign_array", ":agent", ":team_no", slot_formation_tmp_team_horse_archer_1), (else_try), (call_script, "script_cf_formation_agent_assign_array", ":agent", ":team_no", slot_formation_tmp_team_horse_archer_2), (try_end), (else_try), (try_begin), (call_script, "script_cf_formation_agent_assign_array", ":agent", ":team_no", slot_formation_tmp_team_cavalry_1), (else_try), (call_script, "script_cf_formation_agent_assign_array", ":agent", ":team_no", slot_formation_tmp_team_cavalry_2), (try_end), (try_end), (try_end), (try_for_range, ":team_no", 0, 4), (eq, "$spawn_wave", 1), (neq, ":team_no", ":player_team"), (call_script, "script_convert_to_slot_no", ":team_no", -1, slot_formation_team_max_array_no), (party_get_slot, ":max_array_no", formation_vector, reg0), (store_add, ":mark", slot_formation_array_marks_begin, ":max_array_no"), (val_sub, ":mark", 1), (party_get_slot, ":mark", formation_vector, ":mark"), (val_mul, ":mark", 2), (val_sub, ":mark", 1), (call_script, "script_cf_formation_elect_array_leader", ":team_no", ":mark"), (try_end), ] ), # script_cf_formation_agent_assign_array_by_class # Assign agent to paticular array # Input: arg1: agent_no, arg2: team_no # arg3: slot_offset - class-array slot defined for ai, # see module_constants.py for slots starting # with slot_formation_tmp_team_ # Output: none # Fail: If the array has already reached the number upon formulation ("cf_formation_agent_assign_array", [(store_script_param_1, ":agent_no"), (store_script_param_2, ":team_no"), (store_script_param, ":slot_offset", 3), (store_mul, ":stat_slot", slot_formation_tmp_team_stat_section_size, ":team_no"), (val_add, ":stat_slot", slot_formation_tmp_team_stat_begin), (val_add, ":stat_slot", ":slot_offset"), (party_get_slot, ":stat", formation_temp_vector, ":stat_slot"), (assign, ":array_no", 0), (store_and, ":array_no", ":stat", sftt_array_no_mask), (val_div, ":array_no", sftt_array_no_base), (assign, ":num", 0), (store_and, ":num", ":stat", sftt_num_mask), (assign, ":assigned", 0), (store_and, ":assigned", ":stat", sftt_num_assigned_mask), (val_div, ":assigned", sftt_num_assigned_base), (lt, ":assigned", ":num"), (val_add, ":stat", sftt_num_assigned_base), (party_set_slot, formation_temp_vector, ":stat_slot", ":stat"), (agent_set_slot, ":agent_no", slot_agent_formation_states, ":array_no"), ] ), # script_formation_elect_array_leader # Elect a new leader from members of arrays # Input: arg1: team_no, arg2: array_selection # Output: reg0 - agent no of the new leader for the array of smallest no. ("cf_formation_elect_array_leader", [(store_script_param_1, ":team_no"), (store_script_param_2, ":array_selection"), (call_script, "script_convert_to_slot_no", ":team_no", -1, slot_formation_team_max_array_no), (party_get_slot, ":max_array_no", formation_vector, reg0), (try_for_range, ":array_no", 0, ":max_array_no"), (store_add, ":mark", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":mark"), (val_and, ":mark", ":array_selection"), (neq, ":mark", 0), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_leader), (party_set_slot, formation_vector, reg0, -1), (try_end), (try_for_agents, ":agent"), (agent_is_alive, ":agent"), (agent_is_human, ":agent"), (agent_get_team, ":agent_team", ":agent"), (eq, ":agent_team", ":team_no"), (agent_get_slot, ":formation_states", ":agent", slot_agent_formation_states), (store_and, ":array_no", ":formation_states", safs_array_no), (store_add, ":mark", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":mark"), (val_and, ":mark", ":array_selection"), (neq, ":mark", 0), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_leader), (party_get_slot, ":array_leader", formation_vector, reg0), (try_begin), (neq, ":array_leader", -1), (agent_get_troop_id, ":leader_troop", ":array_leader"), (store_character_level, ":leader_level", ":leader_troop"), (agent_get_troop_id, ":troop_id", ":agent"), (store_character_level, ":level", ":troop_id"), (le, ":level", ":leader_level"), (else_try), (party_set_slot, formation_vector, reg0, ":agent"), (try_end), (try_end), (assign, reg0, -1), (try_for_range_backwards, ":array_no", 0, ":max_array_no"), (store_add, ":mark", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":mark"), (val_and, ":mark", ":array_selection"), (neq, ":mark", 0), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_leader), (party_get_slot, ":array_leader", formation_vector, reg0), (neq, ":array_leader", -1), (agent_get_slot, ":formation_states", ":array_leader", slot_agent_formation_states), (val_or, ":formation_states", safs_array_leader), (agent_set_slot, ":array_leader", slot_agent_formation_states, ":formation_states"), (assign, reg0, ":array_leader"), (try_end), (neq, reg0, -1), ] ), # script_formation_ai_tactics # script for AI tactics applying formations # Input: none # Output: none ("formation_ai_tactics", [(get_player_agent_no, ":player"), (agent_get_team, ":player_team", ":player"), (try_for_range, ":team_no", 0, 4), (neq, ":team_no", ":player_team"), (team_get_leader, ":team_leader", ":team_no"), (neq, ":team_leader", -1), (agent_get_position, pos2, ":team_leader"), (call_script, "script_find_high_ground_around_pos1", ":team_no", 5), (copy_position, pos2, pos52), (call_script, "script_team_get_average_position_of_enemies", ":team_no"), (try_begin), (position_is_behind_position, pos0, pos2), (position_rotate_z, pos2, 180), (try_end), (position_transform_position_to_local, pos3, pos2, pos0), (position_get_x, ":pos_x", pos3), (position_get_y, ":pos_y", pos3), (set_fixed_point_multiplier, 100), (convert_to_fixed_point, ":pos_x"), (store_div, ":tan", ":pos_x", ":pos_y"), (call_script, "script_arctan", ":tan"), (val_mul, reg0, -1), (position_rotate_z, pos2, reg0), (try_begin), (init_position, pos4), (position_move_y, pos4, -400), (position_transform_position_to_parent, pos1, pos2, pos4), (position_copy_rotation, pos1, pos2), (call_script, "script_cf_formation_ai_deploy_array_generic", ":team_no", slot_formation_tmp_team_archer, ft_line, 0), (copy_position, pos2, pos1), (try_end), (try_begin), (init_position, pos4), (position_move_y, pos4, 400), (position_transform_position_to_parent, pos1, pos2, pos4), (position_copy_rotation, pos1, pos2), (call_script, "script_cf_formation_ai_deploy_array_generic", ":team_no", slot_formation_tmp_team_infantry_high, ft_phalanx, 0), (copy_position, pos2, pos1), (try_end), (try_begin), (init_position, pos4), (position_move_y, pos4, 400), (position_transform_position_to_parent, pos1, pos2, pos4), (position_copy_rotation, pos1, pos2), (call_script, "script_cf_formation_ai_deploy_array_generic", ":team_no", slot_formation_tmp_team_infantry_low, ft_phalanx, 0), (copy_position, pos2, pos1), (try_end), (try_begin), (init_position, pos4), (position_move_x, pos4, -4000), (position_move_y, pos4, 1000), (position_transform_position_to_parent, pos1, pos2, pos4), (position_copy_rotation, pos1, pos2), (position_rotate_z, pos1, 45), (call_script, "script_cf_formation_ai_deploy_array_generic", ":team_no", slot_formation_tmp_team_cavalry_1, ft_wedge, 1), (try_end), (try_begin), (init_position, pos4), (position_move_x, pos4, 4000), (position_move_y, pos4, 1000), (position_transform_position_to_parent, pos1, pos2, pos4), (position_copy_rotation, pos1, pos2), (position_rotate_z, pos1, -45), (call_script, "script_cf_formation_ai_deploy_array_generic", ":team_no", slot_formation_tmp_team_cavalry_2, ft_wedge, 1), (try_end), (try_begin), (init_position, pos4), (position_move_x, pos4, -6000), (position_transform_position_to_parent, pos1, pos2, pos4), (position_copy_rotation, pos1, pos2), (call_script, "script_cf_formation_ai_deploy_array_generic", ":team_no", slot_formation_tmp_team_horse_archer_1, ft_wedge, 1), (try_end), (try_begin), (init_position, pos4), (position_move_x, pos4, 6000), (position_transform_position_to_parent, pos1, pos2, pos4), (position_copy_rotation, pos1, pos2), (call_script, "script_cf_formation_ai_deploy_array_generic", ":team_no", slot_formation_tmp_team_horse_archer_2, ft_wedge, 1), (try_end), (try_end), ] ), # script_cf_formation_ai_deploy_array_generic # Use the built-in tactical charge script for the corresponding formation # Input: arg1: team_no, arg2: slot_offset, arg3: formation_type # arg4: density - 0 to 3 # arg4: pos1 - the position to deploy array # Output: none ("cf_formation_ai_deploy_array_generic", [(store_script_param_1, ":team_no"), (store_script_param_2, ":slot_offset"), (store_script_param, ":formation_type", 3), (store_script_param, ":density", 4), (position_get_x, ":pos_x", pos1), (position_get_y, ":pos_y", pos1), (position_get_rotation_around_z, ":rotation", pos1), (store_mul, ":slot", ":team_no", slot_formation_tmp_team_stat_section_size), (val_add, ":slot", slot_formation_tmp_team_stat_begin), (val_add, ":slot", ":slot_offset"), (party_get_slot, ":state", formation_temp_vector, ":slot"), (neq, ":state", 0), (assign, ":formation_stage", 0), (store_and, ":formation_stage", ":state", sftt_formation_stage_mask), (val_div, ":formation_stage", sftt_formation_stage), (assign, ":array_no", 0), (store_and, ":array_no", ":state", sftt_array_no_mask), (val_div, ":array_no", sftt_array_no_base), (store_add, ":mark", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":mark"), (try_begin), # form ranks first (eq, ":formation_stage", 0), (call_script, "script_cf_apply_formation", ":team_no", ":array_no", ":formation_type"), (init_position, pos1), (position_move_x, pos1, ":pos_x"), (position_move_y, pos1, ":pos_y"), (position_rotate_z, pos1, ":rotation"), (call_script, "script_formation_move_to_pos", ":team_no", ":array_no"), (else_try), # when formation ready, start tactical charge (eq, ":formation_stage", 6), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_states), (party_get_slot, ":array_states", formation_vector, reg0), (val_or, ":array_states", sfas_tactical_charge), (party_set_slot, formation_vector, reg0, ":array_states"), (val_sub, ":density", 2), # By default the formation are formed with density 2 (call_script, "script_formation_density_change", ":team_no", ":array_no", ":density"), (else_try), # formation need to be reformed, and then recover back to current state (ge, ":formation_stage", 8), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", 0), (store_add, ":ref_x_slot", reg0, slot_formation_array_ref_x_pos), (store_add, ":ref_y_slot", reg0, slot_formation_array_ref_y_pos), (store_add, ":rotation_slot", reg0, slot_formation_array_ref_rotation), (store_add, ":states_slot", reg0, slot_formation_array_states), (party_get_slot, ":ref_x", formation_vector, ":ref_x_slot"), (party_get_slot, ":ref_y", formation_vector, ":ref_y_slot"), (party_get_slot, ":rotation", formation_vector, ":rotation_slot"), (party_get_slot, ":array_states", formation_vector, ":states_slot"), (assign, ":density", 0), (store_and, ":density", ":array_states", sfas_formation_density), (val_div, ":density", sfas_density_unit), (val_sub, ":density", 2), (call_script, "script_cf_apply_formation", ":team_no", ":array_no", ":formation_type"), (call_script, "script_formation_density_change", ":team_no", ":array_no", ":density"), (init_position, pos1), (position_move_x, pos1, ":ref_x"), (position_move_y, pos1, ":ref_y"), (position_rotate_z, pos1, ":rotation"), (call_script, "script_formation_move_to_pos", ":team_no", ":array_no"), # recover states (party_set_slot, formation_vector, ":states_slot", ":array_states"), (try_end), (try_begin), (lt, ":formation_stage", 7), (val_add, ":state", sftt_formation_stage), (party_set_slot, formation_temp_vector, ":slot", ":state"), (else_try), # reformed array set back to normal stage (gt, ":formation_stage", 7), (val_sub, ":state", 7*sftt_formation_stage), (party_set_slot, formation_temp_vector, ":slot", ":state"), (try_end), ] ), # script_formation_reassign_array # Script to reassign men of array with no leader to another array # Input: arg1: team_no, arg2: array_no, # Output: reg0 - no of array assigned to ("formation_reassign_array", [(store_script_param_1, ":team_no"), (store_script_param_2, ":array_no"), #(call_script, "script_convert_to_slot_no", ":team_no", -1, slot_formation_team_max_array_no), #(party_get_slot, ":max_array_no", formation_vector, reg0), (call_script, "script_convert_to_slot_no", ":team_no", -1, slot_formation_team_array_selection), (party_get_slot, ":array_selection", formation_vector, reg0), (store_add, ":mark", slot_formation_array_marks_begin, ":array_no"), (val_or, ":array_selection", ":mark"), (val_sub, ":array_selection", ":mark"), (party_set_slot, formation_vector, reg0, ":array_selection"), (assign, ":dest_array", 0), # assign to main battle by default # below not yet done, need further update #(try_for_range, ":array", 1, ":max_array_no"), # (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_leader), # (party_get_slot, ":leader", formation_vector, reg0), # (agent_is_alive, ":leader"), # a valid candidate array # (agent_get_class, ":class", ":leader"), #(try_end), (assign, ":agent_array", 0), (try_for_agents, ":agent"), (agent_is_alive, ":agent"), (agent_is_human, ":agent"), (agent_get_team, ":agent_team", ":agent"), (eq, ":agent_team", ":team_no"), (agent_get_slot, ":formation_states", ":agent", slot_agent_formation_states), (store_and, ":agent_array", ":formation_states", safs_array_no), (eq, ":agent_array", ":array_no"), (val_sub, ":formation_states", ":agent_array"), (val_add, ":formation_states", ":dest_array"), (val_or, ":formation_states", safs_in_formation), (val_sub, ":formation_states", safs_in_formation), (agent_clear_scripted_mode, ":agent"), (agent_set_slot, ":agent", slot_agent_is_in_scripted_mode, 0), (agent_set_slot, ":agent", slot_agent_formation_states, ":formation_states"), (try_end), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_num_of_men), (party_set_slot, formation_vector, reg0, 0), (assign, reg0, ":dest_array"), ]), # script_cf_apply_formation # Script to set formations active. Can fail! # Input: arg1: team_no, arg2: array_no, # arg3: formation_type, # Output: none ("cf_apply_formation", [(store_script_param, ":team_no", 1), (store_script_param, ":array_no", 2), (store_script_param, ":formation_type", 3), # Initialize array for formation and count number of men (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_num_of_men), (assign, ":slot", reg0), (call_script, "script_formation_array_init", ":team_no", ":array_no"), (party_set_slot, formation_vector, ":slot", reg0), (try_begin), (eq, reg0, 0), (store_add, ":array_string", formation_array_names_begin, ":array_no"), (str_store_string, s1, ":array_string"), (display_message, "@{s1} has no one left standing!!", formation_message_color), (try_end), (neq, reg0, 0), # Store formation type and auto-rotation state (val_add, ":slot", 1), (store_add, ":array_states", ":formation_type", sfas_density_unit*2), #(try_begin), # (eq, ":auto_rotation", 1), # (val_add, ":array_states", sfas_auto_rotate), #(try_end), (party_set_slot, formation_vector, ":slot", ":array_states"), # Calculate the formation, assign position to soldiers (store_add, ":formation_script", formation_scripts_begin, ":formation_type"), (call_script, ":formation_script", ":team_no", ":array_no", reg0), # Mark that this array is in formation (store_add, ":slot", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":slot"), (call_script, "script_convert_to_slot_no", ":team_no", -1, slot_formation_team_array_selection), (party_get_slot, ":array_selection", formation_vector, reg0), (val_or, ":array_selection", ":mark"), (party_set_slot, formation_vector, reg0, ":array_selection"), # Set reference position as the leader's position (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_leader), (assign, ":slot", reg0), (party_get_slot, ":leader", formation_vector, ":slot"), (agent_get_position, pos1, ":leader"), (position_get_x, ":ref_x", pos1), (position_get_y, ":ref_y", pos1), (position_get_rotation_around_z, ":rotation", pos1), (store_sub, ":next", slot_formation_array_ref_x_pos, slot_formation_array_leader), (val_add, ":slot", ":next"), (party_set_slot, formation_vector, ":slot", ":ref_x"), (store_sub, ":next", slot_formation_array_ref_y_pos, slot_formation_array_ref_x_pos), (val_add, ":slot", ":next"), (party_set_slot, formation_vector, ":slot", ":ref_y"), (store_sub, ":next", slot_formation_array_ref_rotation, slot_formation_array_ref_y_pos), (val_add, ":slot", ":next"), (party_set_slot, formation_vector, ":slot", ":rotation"), ]), # script_maintain_formation # Called every 1sec # Input: none # Output: none ("maintain_formation", [(assign, ":base", slot_formation_teams_begin), (set_fixed_point_multiplier, 100), # initialize counters, reference positions, auto-rotation (try_for_range, ":team_no", 0, 4), (store_add, ":slot", ":base", slot_formation_team_array_selection), (try_begin), (neg|party_slot_eq, formation_vector, ":slot", 0), (call_script, "script_team_get_average_position_of_enemies", ":team_no"), (copy_position, pos62, pos0), (get_player_agent_no, ":player"), (val_add, ":slot", 1), (party_get_slot, ":max_array_no", formation_vector, ":slot"), # pick pos20 - pos51 to store reference positions (store_mul, ":ref_pos", ":team_no", formation_arrays), (val_add, ":ref_pos", 20), # use formation_temp_vector to record men number of current arrays (store_mul, ":num_tmp_pt", ":team_no", formation_arrays*2), (try_for_range, ":array_no", 0, ":max_array_no"), (store_mul, ":offset", ":array_no", sfa_array_section_size), (val_add, ":offset", slot_formation_team_arrays_begin), (store_add, ":slot", ":offset", ":base"), # consider charge, fall back and auto rotation (store_add, ":states_slot", ":slot", slot_formation_array_states), (party_get_slot, ":array_states", formation_vector, ":states_slot"), (store_add, ":leader_slot", ":slot", slot_formation_array_leader), (party_get_slot, ":leader", formation_vector, ":leader_slot"), (assign, ":charge", 0), (assign, ":fall_back", 0), (assign, ":speed", 0), (store_and, ":charge", ":array_states", sfas_charge), (store_and, ":fall_back", ":array_states", sfas_fall_back), (try_begin), (neq, ":charge", 0), (try_begin), (neq, ":fall_back", 0), (agent_get_position, pos1, ":leader"), (call_script, "script_formation_move_to_pos", ":team_no", ":array_no"), (val_sub, ":array_states", sfas_charge+sfas_fall_back), (party_set_slot, formation_vector, ":states_slot", ":array_states"), (else_try), (store_and, ":speed", ":array_states", sfas_speed), (val_div, ":speed", sfas_speed_base), (call_script, "script_formation_move", ":team_no", ":array_no", 0, ":speed"), (try_end), (else_try), (neq, ":fall_back", 0), (store_and, ":speed", ":array_states", sfas_speed), (val_div, ":speed", -sfas_speed_base), (call_script, "script_formation_move", ":team_no", ":array_no", 0, ":speed"), (try_end), (store_add, ":ref_x_slot", ":slot", slot_formation_array_ref_x_pos), (init_position, ":ref_pos"), (party_get_slot, ":ref_x", formation_vector, ":ref_x_slot"), (position_set_x, ":ref_pos", ":ref_x"), (store_add, ":ref_y_slot", ":slot", slot_formation_array_ref_y_pos), (party_get_slot, ":ref_y", formation_vector, ":ref_y_slot"), (position_set_y, ":ref_pos", ":ref_y"), (store_add, ":rotation_slot", ":slot", slot_formation_array_ref_rotation), #(position_get_x, reg0, ":ref_pos"), #(position_get_y, reg1, ":ref_pos"), #(assign, reg2, ":ref_pos"), #(display_message, "@ref_pos: {reg2}, ref: ({reg0}, {reg1}).", formation_debug_color), (party_get_slot, ":rotation", formation_vector, ":rotation_slot"), (position_get_rotation_around_z, ":cur_rot", ":ref_pos"), (val_sub, ":rotation", ":cur_rot"), (position_rotate_z, ":ref_pos", ":rotation"), # Turn ref_pos so that it faces enemies (try_begin), (party_get_slot, ":array_states", formation_vector, ":states_slot"), (val_and, ":array_states", sfas_auto_rotate), (neq, ":array_states", 0), #(agent_get_position, pos61, ":leader"), #(position_copy_rotation, pos61, ":ref_pos"), (assign, ":turned", 0), (try_begin), (position_is_behind_position, pos62, ":ref_pos"), #(position_rotate_z, pos61, 180), (position_rotate_z, ":ref_pos", 180), (assign, ":turned", 1), (try_end), (position_transform_position_to_local, pos2, ":ref_pos", pos62), (position_get_x, ":dir_x", pos2), (position_get_y, ":dir_y", pos2), (convert_from_fixed_point, ":dir_y"), (assign, ":tan", 0), (assign, ":rotation", 0), (store_div, ":tan", ":dir_x", ":dir_y"), (call_script, "script_arctan", ":tan"), (store_mul, ":rotation", reg0, -1), (this_or_next|gt, ":rotation", 5), (this_or_next|gt, -5, ":rotation"), (eq, ":turned", 1), (position_rotate_z, ":ref_pos", ":rotation"), (position_get_rotation_around_z, reg0, ":ref_pos"), (party_set_slot, formation_vector, ":rotation_slot", reg0), (try_end), (party_set_slot, formation_temp_vector, ":num_tmp_pt", 0), # set the engage state and war cry of array (party_get_slot, ":array_states", formation_vector, ":states_slot"), (val_and, ":array_states", sfas_engaged+sfas_roar), (store_add, ":engage_pt", ":num_tmp_pt", formation_arrays), (party_set_slot, formation_temp_vector, ":engage_pt", ":array_states"), (val_add, ":num_tmp_pt", 1), (val_add, ":ref_pos", 1), #(val_add, ":offset", sfa_array_section_size), (try_end), (set_show_messages, 0), (team_give_order, ":team_no", grc_everyone, mordr_charge), (set_show_messages, 1), (try_end), (val_add, ":base", sft_team_section_size), (try_end), # renew agent destinations, count number of men, (get_player_agent_no, ":player"), (try_for_agents, ":agent"), (neq, ":agent", ":player"), (agent_is_alive, ":agent"), (agent_is_human, ":agent"), (agent_get_team, ":team_no", ":agent"), (assign, ":in_formation", 0), (agent_get_slot, ":formation_states", ":agent", slot_agent_formation_states), (store_and, ":in_formation", ":formation_states", safs_in_formation), (neq, ":in_formation", 0), #(display_message, "@reached!", formation_debug_color), (store_and, ":array_no", ":formation_states", safs_array_no), (store_mul, ":ref_pos", ":team_no", formation_arrays), (val_add, ":ref_pos", 20), (val_add, ":ref_pos",":array_no"), (store_mul, ":num_tmp_pt", ":team_no", formation_arrays*2), (val_add, ":num_tmp_pt", ":array_no"), (party_get_slot, ":num", formation_temp_vector, ":num_tmp_pt"), (val_add, ":num", 1), (party_set_slot, formation_temp_vector, ":num_tmp_pt", ":num"), (agent_get_slot, ":target_x", ":agent", slot_agent_formation_x_pos), (agent_get_slot, ":target_y", ":agent", slot_agent_formation_y_pos), (copy_position, pos9, ":ref_pos"), (position_set_x, pos9, ":target_x"), (position_set_y, pos9, ":target_y"), #(position_get_x, reg0, ":ref_pos"), #(position_get_y, reg1, ":ref_pos"), #(assign, reg2, ":ref_pos"), #(display_message, "@ref_pos: {reg2}, ref: ({reg0}, {reg1}).", formation_debug_color), (position_transform_position_to_parent, pos10, ":ref_pos", pos9), (position_copy_rotation, pos10, ":ref_pos"), (agent_get_position, pos11, ":agent"), (store_add, ":engage_pt", ":num_tmp_pt", formation_arrays), (party_get_slot, ":engage_states", formation_temp_vector, ":engage_pt"), (assign, ":engage", 0), (assign, ":roar", 0), (store_and, ":engage", sfas_engaged, ":engage_states"), (store_and, ":roar", sfas_roar, ":engage_states"), (assign, ":roar_stage", 0), (try_begin), (neq, ":roar", 0), (store_and, ":roar_stage", ":formation_states", safs_roar_stage), (val_sub, ":formation_states", ":roar_stage"), (try_begin), (neq, ":roar_stage", 0), (val_sub, ":roar_stage", safs_roar_stage_second), (try_end), (eq, ":roar_stage", 0), (store_random_in_range, ":dice", 0, 10), (lt, ":dice", 5), (agent_get_troop_id, ":agent_troop", ":agent"), (troop_get_type, ":gender", ":agent_troop"), (eq, ":gender", 0), (agent_play_sound, ":agent", "snd_man_warcry"), (assign, ":roar_stage", safs_roar_stage), (try_end), (val_add, ":formation_states", ":roar_stage"), (agent_set_slot, ":agent", slot_agent_formation_states, ":formation_states"), (try_begin), (set_fixed_point_multiplier, 100), (assign, ":pos_error", 0), (get_distance_between_positions, ":pos_error", pos10, pos11), # the agent is allow to stand at a position with an error of 5 metres # if the formation is engaged with enemy (try_begin), (eq, ":engage", 0), (assign, ":tolerance", -1), (else_try), (assign, ":tolerance", 800), (try_end), (gt, ":pos_error", ":tolerance"), #(try_begin), # (agent_get_class, ":class", ":agent"), # (eq, ":class", grc_cavalry), # (agent_get_wielded_item, ":item", ":agent", 0), # (item_get_type, ":item_type", ":item"), # (eq, ":item_type", itp_type_polearm), # debug_point, # (agent_get_wielded_item, ":shield", ":agent", 1), # (agent_get_troop_id, ":troop_id", ":agent"), # (troop_remove_item, ":troop_id", ":shield"), #(try_end), (agent_set_scripted_destination, ":agent", pos10, 1), (agent_set_slot, ":agent", slot_agent_is_in_scripted_mode, 1), (val_mul, ":pos_error", 36), # the following rounds pos_error to integral kilometres (store_mod, ":remain", ":pos_error", 1000), (try_begin), (gt, ":remain", 500), (val_add, ":pos_error", 500), (try_end), (val_div, ":pos_error", 1000), (agent_set_speed_limit, ":agent", ":pos_error"), #(try_begin), # (store_mul, ":speed_slot", ":team_no", formation_arrays*2), # (val_add, ":speed_slot", ":array_no"), # (val_add, ":speed_slot", formation_arrays), # (val_sub, ":pos_error", 200), # (party_slot_ge, formation_temp_vector, ":speed_slot", ":pos_error"), #(else_try), #(try_end), #(val_mul, ":pos_error", 3600), #(val_div, ":pos_error", 100000),# convert to kilometers/hour #(agent_set_speed_limit, ":agent", ":pos_error"), #(else_try), # # Rotate the agent to face enemies. Not sure if it works... # (position_is_behind_position, pos62, pos11), # (position_rotate_z, pos11, 90), # (agent_set_scripted_destination, ":agent", pos11, 0), # (agent_set_slot, ":agent", slot_agent_is_in_scripted_mode, 1), # Above proved no effect (else_try), (agent_clear_scripted_mode, ":agent"), (agent_set_slot, ":agent", slot_agent_is_in_scripted_mode, 0), (try_end), (try_end), (get_player_agent_no, ":player"), (agent_get_team, ":player_team", ":player"), (store_sub, ":base", 0, formation_arrays*2), # check for arrays with no leader (try_for_range, ":team_no", 0, 4), (val_add, ":base", formation_arrays*2), (call_script, "script_convert_to_slot_no", ":team_no", -1, slot_formation_team_array_selection), (party_get_slot, ":array_selection", formation_vector, reg0), (neq, ":array_selection", 0), (val_add, reg0, 1), (party_get_slot, ":max_array_no", formation_vector, reg0), (try_for_range, ":array_no", 0, ":max_array_no"), (store_add, ":slot", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":slot"), (val_and, ":mark", ":array_selection"), (neq, ":mark", 0), (store_add, ":slot", ":base", ":array_no"), (party_get_slot, ":cur_num", formation_temp_vector, ":slot"), (try_begin), (eq, ":cur_num", 0), # Mark that this array is no longer in formation (store_add, ":slot", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":slot"), (call_script, "script_dismiss_battle_array", ":team_no", ":mark"), (call_script, "script_convert_to_slot_no", ":team_no", -1, slot_formation_team_array_selection), (party_get_slot, ":array_selection", formation_vector, reg0), (val_or, ":array_selection", ":mark"), (val_sub, ":array_selection", ":mark"), (party_set_slot, formation_vector, reg0, ":array_selection"), #(get_player_agent_no, ":player"), #(agent_get_team, ":player_team", ":player"), (try_begin), (eq, ":team_no", ":player_team"), (store_add, ":array_string", formation_array_names_begin, ":array_no"), (str_store_string, s1, ":array_string"), (display_message, "@{s1} has fought till the last man!", formation_message_color), (try_end), (else_try), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_leader), (party_get_slot, ":leader", formation_vector, reg0), (try_begin), (neg|agent_is_alive, ":leader"), (agent_set_slot, ":leader", slot_agent_formation_states, 0), # leader down!! (store_add, ":mark", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":mark"), (call_script, "script_cf_formation_elect_array_leader", ":team_no", ":mark"), (neq, ":team_no", ":player_team"), (store_add, ":array_string", formation_array_names_begin, ":array_no"), (str_store_string, s1, ":array_string"), (agent_get_troop_id, ":troop_id", reg0), (str_store_troop_name, s2, ":troop_id"), (display_message, "@The commander of {s1} is down! {s2} has taken over command.", formation_message_color), (try_end), (try_end), #(neq, ":cur_num", 0), #(val_add, ":slot", 1), #(party_get_slot, ":array_states", formation_vector, ":slot"), #(val_and, ":array_states", sfas_formation_type), #(store_add, ":formation_script", ":array_states", formation_scripts_begin), #(call_script, ":formation_script", ":team_no", ":array_no", ":cur_num"), (try_end), (try_end), ]), # script_formation_move_key_reaction # React to player key press # Input: arg1:x_offset, arg2: y_offset, arg3: move name string id # Output: none ("formation_move_key_reaction", [(store_script_param, ":x_offset", 1), (store_script_param, ":y_offset", 2), (store_script_param, ":move_name", 3), (get_player_agent_no, ":player"), (agent_get_team, ":team_no", ":player"), (str_clear, s1), (assign, ":cnt", 0), (try_for_range_backwards, ":array_no", 0, formation_arrays), (store_add, ":mark", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":mark"), (val_and, ":mark", "$formation_array_selected"), (neq, ":mark", 0), (store_add, ":formation_array_string", formation_array_names_begin, ":array_no"), (call_script, "script_convert_to_slot_no", ":team_no", -1, slot_formation_team_array_selection), (party_get_slot, ":array_selection", formation_vector, reg0), (val_and, ":mark", ":array_selection"), (neq, ":mark", 0), (call_script, "script_formation_move", ":team_no", ":array_no", ":x_offset", ":y_offset"), (str_store_string, s2, ":formation_array_string"), (val_add, ":cnt", 1), (try_begin), (eq, ":cnt", 2), (str_store_string, s1, "@{s2} and {s1}"), (else_try), (str_store_string, s1, "@{s2}, {s1}"), (try_end), (try_end), (try_begin), (eq, ":cnt", "$formation_max_array_no"), (str_store_string, s1, "@All battles, "), (try_end), (str_store_string, s2, ":move_name"), (display_message, "@{s1}{s2}!!", formation_order_color), ]), # script_formation_move_to_pos # Input: arg1: team_no, arg2:array_no, # arg3: pos1 = position to move formation to # Output: none ("formation_move_to_pos", [(store_script_param_1, ":team_no"), (store_script_param_2, ":array_no"), (set_fixed_point_multiplier, 100), (position_get_x, ":ref_x", pos1), (val_max, ":ref_x", "$battle_x_min"), (val_min, ":ref_x", "$battle_x_max"), (position_get_y, ":ref_y", pos1), (val_max, ":ref_y", "$battle_y_min"), (val_min, ":ref_y", "$battle_y_max"), (position_get_rotation_around_z, ":rotation", pos1), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_ref_x_pos), (party_set_slot, formation_vector, reg0, ":ref_x"), (val_add, reg0, 1), (party_set_slot, formation_vector, reg0, ":ref_y"), (val_add, reg0, 1), (party_set_slot, formation_vector, reg0, ":rotation"), ] ), # script_formation_move # Input: arg1: team_no, arg2: array_no, # arg3: x_offset, arg4: y_offset, -- both relative to ref_pos # Output: none ("formation_move", [(store_script_param, ":team_no", 1), (store_script_param, ":array_no", 2), (store_script_param, ":x_offset", 3), (store_script_param, ":y_offset", 4), (set_fixed_point_multiplier, 100), (convert_to_fixed_point, ":x_offset"), (convert_to_fixed_point, ":y_offset"), (init_position, pos10), (position_set_x, pos10, ":x_offset"), (position_set_y, pos10, ":y_offset"), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_ref_x_pos), (assign, ":slot", reg0), (init_position, pos9), (party_get_slot, ":ref_x", formation_vector, ":slot"), (position_set_x, pos9, ":ref_x"), (val_add, ":slot", 1), (party_get_slot, ":ref_y", formation_vector, ":slot"), (position_set_y, pos9, ":ref_y"), (val_add, ":slot", 1), (party_get_slot, ":rotation", formation_vector, ":slot"), (position_get_rotation_around_z, ":cur_rot", pos9), (val_sub, ":rotation", ":cur_rot"), (position_rotate_z, pos9, ":rotation"), (position_transform_position_to_parent, pos11, pos9, pos10), (position_get_x, ":new_x", pos11), (position_get_y, ":new_y", pos11), (try_begin), (gt, ":new_x", "$battle_x_max"), (assign, ":new_x", "$battle_x_max"), (else_try), (lt, ":new_x", "$battle_x_min"), (assign, ":new_x", "$battle_x_min"), (try_end), (try_begin), (gt, ":new_y", "$battle_y_max"), (assign, ":new_y", "$battle_y_max"), (else_try), (lt, ":new_y", "$battle_y_min"), (assign, ":new_y", "$battle_y_min"), (try_end), (val_sub, ":slot", 1), (party_set_slot, formation_vector, ":slot", ":new_y"), (val_sub, ":slot", 1), (party_set_slot, formation_vector, ":slot", ":new_x"), ]), # script_formation_turn_key_reaction # React to player key press # Input: arg1:rotation, arg3: turn name string id # Output: none ("formation_turn_key_reaction", [(store_script_param, ":rotation", 1), (store_script_param, ":turn_name", 2), (str_clear, s1), (get_player_agent_no, ":player"), (agent_get_team, ":team_no", ":player"), (assign, ":cnt", 0), (try_for_range_backwards, ":array_no", 0, formation_arrays), (store_add, ":mark", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":mark"), (val_and, ":mark", "$formation_array_selected"), (neq, ":mark", 0), (call_script, "script_convert_to_slot_no", ":team_no", -1, slot_formation_team_array_selection), (party_get_slot, ":array_selection", formation_vector, reg0), (val_and, ":mark", ":array_selection"), (neq, ":mark", 0), (store_add, ":formation_array_string", formation_array_names_begin, ":array_no"), (str_store_string, s2, ":formation_array_string"), (val_add, ":cnt", 1), (try_begin), (eq, ":cnt", 2), (str_store_string, s1, "@{s2} and {s1}"), (else_try), (str_store_string, s1, "@{s2}, {s1}"), (try_end), (call_script, "script_formation_turn", ":team_no", ":array_no", ":rotation"), (try_end), (try_begin), (eq, ":cnt", "$formation_max_array_no"), (str_store_string, s1, "@All battles, "), (try_end), (str_store_string, s2, ":turn_name"), (display_message, "@{s1}{s2}!!", formation_order_color), ]), # script_formation_turn # Input: arg1: team_no, arg2: array_no, # arg3: rotation # Output: none ("formation_turn", [(store_script_param, ":team_no", 1), (store_script_param, ":array_no", 2), (store_script_param, ":rotation", 3), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_ref_rotation), (party_get_slot, ":cur_rot", formation_vector, reg0), (val_add, ":cur_rot", ":rotation"), (party_set_slot, formation_vector, reg0, ":cur_rot"), ]), # script_formation_charge_key_reaction # Input: arg1: acceleration, arg2: order_string # Output: none ("formation_charge_key_reaction", [(store_script_param_1, ":acceleration"), (store_script_param_2, ":order"), (get_player_agent_no, ":player"), (agent_get_team, ":team_no", ":player"), (assign, ":cnt", 0), (str_clear, s1), (try_for_range_backwards, ":array_no", 0, formation_arrays), (store_add, ":mark", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":mark"), (val_and, ":mark", "$formation_array_selected"), (neq, ":mark", 0), (call_script, "script_convert_to_slot_no", ":team_no", -1, slot_formation_team_array_selection), (party_get_slot, ":in_formation", formation_vector, reg0), (val_and, ":mark", ":in_formation"), (neq, ":mark", 0), (store_add, ":formation_array_string", formation_array_names_begin, ":array_no"), (str_store_string, s2, ":formation_array_string"), (val_add, ":cnt", 1), (try_begin), (eq, ":cnt", 2), (str_store_string, s1, "@{s2} and {s1}"), (else_try), (str_store_string, s1, "@{s2}, {s1}"), (try_end), (try_begin), (eq, ":cnt", 1), (call_script, "script_formation_accelerate", ":team_no", ":array_no", ":acceleration"), (assign, ":speed", reg0), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_states), (party_get_slot, ":charge_states", formation_vector, reg0), (val_and, ":charge_states", sfas_charge+sfas_fall_back+sfas_speed), (else_try), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_states), (party_get_slot, ":array_states", formation_vector, reg0), (val_or, ":array_states", sfas_charge+sfas_fall_back+sfas_speed), (val_sub, ":array_states", sfas_charge+sfas_fall_back+sfas_speed), (val_add, ":array_states", ":charge_states"), (party_set_slot, formation_vector, reg0, ":array_states"), (try_end), (try_end), (try_begin), (eq, ":cnt", "$formation_max_array_no"), (str_store_string, s1, "@All battles, "), (try_end), (str_store_string, s2, ":order"), (val_and, ":charge_states", sfas_charge+sfas_fall_back), (try_begin), (eq, ":charge_states", 0), (display_message, "@{s1}halt!!", formation_order_color), (else_try), (assign, reg0, ":speed"), (eq, ":charge_states", sfas_charge), (display_message, "@{s1}charge!! (With speed {reg0} m/s)", formation_order_color), (else_try), (display_message, "@{s1}fall back!! (With speed {reg0} m/s", formation_order_color), (try_end), ], ), # script_formation_accelerate # Accelerate the speed of charging or falling back # Input: arg1: team_no, arg2: array_no, # arg3: acceleration in speed bits # Output: reg0: current speed ("formation_accelerate", [(store_script_param, ":team_no", 1), (store_script_param, ":array_no", 2), (store_script_param, ":acceleration", 3), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_states), (party_get_slot, ":formation_states", formation_vector, reg0), (assign, ":slot", reg0), (assign, ":speed", 0), (assign, ":charge", 0), (assign, ":fall_back", 0), (assign, reg0, 0), (try_begin), (eq, ":acceleration", 0), # halt command (val_or, ":formation_states", sfas_charge+sfas_fall_back+sfas_speed), (val_sub, ":formation_states", sfas_charge+sfas_fall_back+sfas_speed), (else_try), (store_and, ":charge", ":formation_states", sfas_charge), (store_and, ":fall_back", ":formation_states", sfas_fall_back), (neq, ":charge", 0), (store_and, ":speed", ":formation_states", sfas_speed), (val_sub, ":formation_states", ":speed"), (val_mul, ":acceleration", sfas_speed_unit), (val_add, ":speed", ":acceleration"), (try_begin), (gt, ":speed", sfas_speed), (assign, ":speed", sfas_speed), (else_try), (eq, ":speed", 0), (val_sub, ":formation_states", sfas_charge), (try_end), (val_add, ":formation_states", ":speed"), (val_div, ":speed", sfas_speed_base), (assign, reg0, ":speed"), (else_try), (neq, ":fall_back", 0), (val_mul, ":acceleration", -sfas_speed_unit), (store_and, ":speed", ":formation_states", sfas_speed), (val_sub, ":formation_states", ":speed"), (val_add, ":speed", ":acceleration"), (try_begin), (gt, ":speed", sfas_speed), (assign, ":speed", sfas_speed), (else_try), (eq, ":speed", 0), (val_sub, ":formation_states", sfas_fall_back), (try_end), (val_add, ":formation_states", ":speed"), (val_div, ":speed", sfas_speed_base), (assign, reg0, ":speed"), (else_try), (try_begin), (gt, ":acceleration", 0), (val_add, ":formation_states", sfas_charge+sfas_speed_unit), (else_try), (val_add, ":formation_states", sfas_fall_back+sfas_speed_unit), (try_end), (store_div, reg0, sfas_speed_unit, sfas_speed_base), (try_end), (party_set_slot, formation_vector, ":slot", ":formation_states"), #(store_and, ":speed", ":formation_states", sfas_speed), #(val_div, ":speed", sfas_speed_base), #(set_fixed_point_multiplier, 100), #(convert_to_fixed_point, ":speed"), #(store_mul, ":speed_slot", ":team_no", formation_arrays*2), #(val_add, ":speed_slot", ":array_no"), #(val_add, ":speed_slot", formation_arrays), #(party_set_slot, formation_temp_vector, ":speed_slot", ":speed"), ]), # script_formation_density_key_reaction # Script that reacts to density key # Input: arg1: option - -1 stand closer, 1 spread out # arg2: order_name # Output: none ("formation_density_key_reaction", [(store_script_param, ":option", 1), (store_script_param, ":order_name", 2), (get_player_agent_no, ":player"), (agent_get_team, ":team_no", ":player"), (call_script, "script_convert_to_slot_no", ":team_no", -1, slot_formation_team_array_selection), (party_get_slot, ":array_selection", formation_vector, reg0), (val_and, ":array_selection", "$formation_array_selected"), (call_script, "script_formation_density_change", ":team_no", ":array_selection", ":option"), (str_clear, s1), (assign, ":cnt", 0), (try_for_range_backwards, ":array_no", 0, formation_arrays), (store_add, ":mark", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":mark"), (val_and, ":mark", ":array_selection"), (neq, ":mark", 0), (call_script, "script_convert_to_slot_no", ":team_no", -1, slot_formation_team_array_selection), (party_get_slot, ":in_formation", formation_vector, reg0), (val_and, ":mark", ":in_formation"), (neq, ":mark", 0), (store_add, ":array_name", formation_array_names_begin, ":array_no"), (str_store_string, s2, ":array_name"), (val_add, ":cnt", 1), (try_begin), (eq, ":cnt", 2), (str_store_string, s1, "@{s2} and {s1}"), (else_try), (str_store_string, s1, "@{s2}, {s1}"), (try_end), (try_end), (try_begin), (eq, ":cnt", "$formation_max_array_no"), (str_store_string, s1, "@All battles, "), (try_end), (str_store_string, s2, ":order_name"), (display_message, "@{s1}{s2}!!", formation_order_color), ] ), # script_formation_density_change # Script changes the tightness of the formation # Input: arg1: team_no, arg2: array_selection # arg3: option - -1 stand closer, 1 spread out # Output: none ("formation_density_change", [(store_script_param, ":team_no", 1), (store_script_param, ":array_selection", 2), (store_script_param, ":option", 3), # calculate ratio to change density of all arrays selected (try_for_range, ":array_no", 0, formation_arrays), (store_add, ":mark", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":mark"), (val_and, ":mark", ":array_selection"), (neq, ":mark", 0), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_states), (assign, ":slot", reg0), (party_get_slot, ":states", formation_vector, ":slot"), (assign, ":density", 0), (store_and, ":density", ":states", sfas_formation_density), (store_div, ":cur_ratio", ":density", sfas_density_unit), (store_add, ":density", ":cur_ratio", ":option"), (val_add, ":cur_ratio", 1), (store_add, ":new_ratio", ":cur_ratio", ":option"), # set the temporary vector to store density change ratios (try_begin), (store_mul, ":tmp_ratio_pt", ":team_no", formation_arrays), (val_add, ":tmp_ratio_pt", slot_formation_tmp_density), (val_add, ":tmp_ratio_pt", ":array_no"), (ge, ":density", 0), (le, ":density", 3), # out of boundary, no change (store_mul, ":change", ":option", sfas_density_unit), (val_add, ":states", ":change"), (party_set_slot, formation_vector, ":slot", ":states"), (store_mul, ":ratio", ":new_ratio", sftd_ratio_base), (val_div, ":ratio", ":cur_ratio"), (party_set_slot, formation_temp_vector, ":tmp_ratio_pt", ":ratio"), (else_try), (party_set_slot, formation_temp_vector, ":tmp_ratio_pt", sftd_ratio_base), (try_end), (try_end), (get_player_agent_no, ":player"), (try_for_agents, ":agent"), (neq, ":agent", ":player"), (agent_get_team, ":agent_team", ":agent"), (eq, ":team_no", ":agent_team"), (agent_get_slot, ":array_no", ":agent", slot_agent_formation_states), (val_and, ":array_no", safs_array_no), (val_add, ":array_no", slot_formation_array_marks_begin), (party_get_slot, ":mark", formation_vector, ":array_no"), (val_and, ":mark", ":array_selection"), (neq, ":mark", 0), (agent_get_slot, ":x_pos", ":agent", slot_agent_formation_x_pos), (agent_get_slot, ":y_pos", ":agent", slot_agent_formation_y_pos), (store_mul, ":tmp_ratio_pt", ":team_no", formation_arrays), (val_add, ":tmp_ratio_pt", slot_formation_tmp_density), (val_add, ":tmp_ratio_pt", ":array_no"), (party_get_slot, ":ratio", formation_temp_vector, ":tmp_ratio_pt"), (val_mul, ":x_pos", ":ratio"), (val_div, ":x_pos", sftd_ratio_base), (val_mul, ":y_pos", ":ratio"), (val_div, ":y_pos", sftd_ratio_base), (agent_set_slot, ":agent", slot_agent_formation_x_pos, ":x_pos"), (agent_set_slot, ":agent", slot_agent_formation_y_pos, ":y_pos"), (try_end), ] ), # script_calculate_formation_row # Script calculates line positions relative to ref_pos. # Internal function commonly used by line, phalanx, wedge and square formations # Input: arg1: team_no, arg2: array_no, # arg3: column_width - in centimeters, # arg4: width - in number of men, # arg5: row_width - distance between rows in centimetres # arg6: inc - to increase line width by row or not (for wedge) # Output: none ("calculate_formation_row", [(store_script_param, ":team_no", 1), (store_script_param, ":array_no", 2), #(team_get_leader, ":leader", "team_no"), (store_script_param, ":column_width", 3), #(assign, ":column_width", 50), (store_script_param, ":width", 4), (store_script_param, ":row_width", 5), (store_script_param, ":inc", 6), (set_fixed_point_multiplier, 100), (assign, ":dist", 0), (assign, ":step", 0), (try_begin), (store_mod, ":odd", ":width", 2), (eq, ":odd", 0), (store_div, ":offset", ":column_width", 2), (else_try), (assign, ":offset", 0), (try_end), (assign, ":dir", 1), (assign, ":num", 0), (get_player_agent_no, ":player"), (try_for_agents, ":agent"), (neq, ":agent", ":player"), (agent_get_team, ":agent_team", ":agent"), (eq, ":agent_team", ":team_no"), #(agent_is_ally, ":agent"), (agent_is_alive, ":agent"), (agent_is_human, ":agent"), # Make sure the agent is not in another line (agent_get_slot, ":formation_states", ":agent", slot_agent_formation_states), (assign, ":agent_array", 0), (store_and, ":agent_array", ":formation_states", safs_array_no), (eq, ":agent_array", ":array_no"), (try_begin), (eq, ":width", ":num"), (val_sub, ":dist", ":row_width"), (assign, ":num", 0), (val_add, ":width", ":inc"), (assign, ":step", 0), (try_begin), (store_mod, ":odd", ":width", 2), (eq, ":odd", 0), (store_div, ":offset", ":column_width", 2), (else_try), (assign, ":offset", 0), (try_end), (assign, ":dir", 1), (try_end), (assign, ":in_formation", 0), (store_and, ":in_formation", ":formation_states", safs_in_formation), (eq, ":in_formation", 0), (store_mul, ":move", ":step", ":dir"), (val_add, ":offset", ":move"), (agent_set_slot, ":agent", slot_agent_formation_x_pos, ":offset"), (agent_set_slot, ":agent", slot_agent_formation_y_pos, ":dist"), # Make sure other lines don't include this agent (val_or, ":formation_states", safs_in_formation), (agent_set_slot, ":agent", slot_agent_formation_states, ":formation_states"), (val_add, ":step", ":column_width"), (val_mul, ":dir", -1), (val_add, ":num", 1), (try_end), ]), # script_formation_move_to_pos_key_reaction # Script called when move to position key is clicked # Input: pos1 = destination # Output: none ("formation_move_to_pos_key_reaction", [(set_fixed_point_multiplier, 100), (get_player_agent_no, ":player"), (agent_get_team, ":team_no", ":player"), (init_position, pos2), (position_set_x, pos2, -500), (position_set_y, pos2, 0), (position_transform_position_to_parent, pos3, pos1, pos2), (position_copy_rotation, pos3, pos1), (position_set_x, pos2, 0), (assign, ":pre1", 0), (assign, ":pre2", 0), (try_for_range, ":array_no", 0, formation_arrays), (store_add, ":mark", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":mark"), (val_and, ":mark", "$formation_array_selected"), (neq, ":mark", 0), (call_script, "script_convert_to_slot_no", ":team_no", -1, slot_formation_team_array_selection), (party_get_slot, ":in_formation", formation_vector, reg0), (val_and, ":mark", ":in_formation"), (neq, ":mark", 0), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_num_of_men), (party_get_slot, ":num_of_men", formation_vector, reg0), (store_mul, ":width", ":num_of_men", sfas_density_base), (val_div, ":width", 6), # Just some estimated number that could well separate different arrays but not too dispersal (position_move_x, pos2, ":width"), (position_move_x, pos2, ":pre2"), (position_move_x, pos2, 75), # one metre boundaries (position_rotate_z, pos3, 180), (position_transform_position_to_parent, pos1, pos3, pos2), (call_script, "script_formation_move_to_pos", ":team_no", ":array_no"), (assign, ":pre2", ":pre1"), (assign, ":pre1", ":width"), (try_end), (str_clear, s1), (assign, ":cnt", 0), (try_for_range_backwards, ":array_no", 0, formation_arrays), (store_add, ":mark", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":mark"), (val_and, ":mark", "$formation_array_selected"), (neq, ":mark", 0), (store_add, ":array_string", formation_array_names_begin, ":array_no"), (str_store_string, s2, ":array_string"), (val_add, ":cnt", 1), (try_begin), (eq, ":cnt", 2), (str_store_string, s1, "@{s2} and {s1}"), (else_try), (str_store_string, s1, "@{s2}, {s1}"), (try_end), (try_end), (try_begin), (eq, ":cnt", "$formation_max_array_no"), (str_store_string, s1, "@All battles, "), (try_end), (display_message, "@{s1}hold this position!!", formation_order_color), ] ), # script_apply_formation_key_reaction # Script called when apply formation key is clicked # Input: arg1: formation_type # Output: none ("apply_formation_key_reaction", [(store_script_param_1, ":formation_type"), (get_player_agent_no, ":player"), (agent_get_team, ":team_no", ":player"), (assign, ":pl", 0), (str_clear, s1), (try_for_range_backwards, ":array_no", 0, formation_arrays), (store_add, ":mark", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":mark"), (val_and, ":mark", "$formation_array_selected"), (neq, ":mark", 0), (store_add, ":formation_array_string", formation_array_names_begin, ":array_no"), (str_store_string, s2, ":formation_array_string"), (val_add, ":pl", 1), (try_begin), (eq, ":pl", 2), (str_store_string, s1, "@{s2} and {s1}"), (else_try), (str_store_string, s1, "@{s2}, {s1}"), (try_end), (call_script, "script_cf_apply_formation", ":team_no", ":array_no", ":formation_type"), (try_end), (try_begin), (eq, ":pl", "$formation_max_array_no"), (str_store_string, s1, "@All battles, "), (try_end), (try_begin), (gt, ":pl", 1), (store_add, ":formation_string", formation_commands_pl_begin, ":formation_type"), (str_store_string, s2, ":formation_string"), (else_try), (store_add, ":formation_string", formation_commands_begin, ":formation_type"), (str_store_string, s2, ":formation_string"), (try_end), (display_message, "@{s1}form {s2}!"), ] ), # script_formation_auto_rotation_key_reaction # Script called when auto rotation key clicked # Input: arg1: value - 1 = on, 0 = off, -1 = toggle # Output: none ("formation_auto_rotation_key_reaction", [(store_script_param_1, ":result"), (get_player_agent_no, ":player"), (agent_get_team, ":team_no", ":player"), (str_clear, s1), (assign, ":cnt", 0), (try_for_range_backwards, ":array_no", 0, formation_arrays), (store_add, ":mark", ":array_no", slot_formation_array_marks_begin), (party_get_slot, ":mark", formation_vector, ":mark"), (val_and, ":mark", "$formation_array_selected"), (neq, ":mark", 0), (party_get_slot, ":in_formation", formation_vector, ":array_no"), (call_script, "script_convert_to_slot_no", ":team_no", -1, slot_formation_team_array_selection), (party_get_slot, ":array_selection", formation_vector, reg0), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_states), (party_get_slot, ":formation_states", formation_vector, reg0), (assign, ":auto_rotation", 0), (val_and, ":in_formation", ":array_selection"), (store_and, ":auto_rotation", ":formation_states", sfas_auto_rotate), (store_add, ":array_string", formation_array_names_begin, ":array_no"), (str_store_string, s2, ":array_string"), (val_add, ":cnt", 1), (try_begin), (eq, ":cnt", 2), (str_store_string, s1, "@{s2} and {s1}"), (else_try), (str_store_string, s1, "@{s2}, {s1}"), (try_end), (try_begin), (eq, ":result", -1), (val_or, ":formation_states", sfas_auto_rotate), (try_begin), (eq, ":auto_rotation", 0), (assign, ":result", 1), (else_try), (val_sub, ":formation_states", sfas_auto_rotate), (assign, ":result", 0), (try_end), (else_try), (eq, ":result", 1), (val_or, ":formation_states", sfas_auto_rotate), (else_try), (val_or, ":formation_states", sfas_auto_rotate), (val_sub, ":formation_states", sfas_auto_rotate), (try_end), (party_set_slot, formation_vector, reg0, ":formation_states"), (try_end), (try_begin), (eq, ":cnt", "$formation_max_array_no"), (str_store_string, s1, "@All battles, "), (try_end), (try_begin), (eq, ":result", 1), (display_message, "@{s1}turn to enemies' direction!", formation_message_color), (else_try), (display_message, "@{s1}stick to current direction!", formation_message_color), (try_end), ] ), # script_formation_tactical_charge_key_reaction # Script called when tactical charge key clicked # Input: none # Output: none ("formation_tactical_charge_key_reaction", [(get_player_agent_no, ":player"), (agent_get_team, ":team_no", ":player"), (call_script, "script_convert_to_slot_no", ":team_no", -1, slot_formation_team_array_selection), (party_get_slot, ":array_selection", formation_vector, reg0), (val_and, ":array_selection", "$formation_array_selected"), (str_clear, s1), (assign, ":cnt", 0), (assign, ":result", -1), (try_for_range_backwards, ":array_no", 0, formation_arrays), (store_add, ":mark", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":mark"), (val_and, ":mark", ":array_selection"), (neq, ":mark", 0), (val_add, ":cnt", 1), (store_add, ":array_string", formation_array_names_begin, ":array_no"), (str_store_string, s2, ":array_string"), (try_begin), (eq, ":cnt", 2), (str_store_string, s1, "@{s2} and {s1}"), (else_try), (str_store_string, s1, "@{s2}, {s1}"), (try_end), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_states), (party_get_slot, ":array_states", formation_vector, reg0), (try_begin), (eq, ":cnt", 1), (store_and, ":result", ":array_states", sfas_tactical_charge), (store_sub, ":result", sfas_tactical_charge, ":result"), (try_end), (val_or, ":array_states", sfas_tactical_charge), (val_sub, ":array_states", sfas_tactical_charge), (val_add, ":array_states", ":result"), (party_set_slot, formation_vector, reg0, ":array_states"), (try_end), (try_begin), (eq, ":cnt", "$formation_max_array_no"), (str_store_string, s1, "@All battles, "), (try_end), (try_begin), (neq, ":result", 0), (display_message, "@{s1}charge!!(Tactical)", formation_order_color), (else_try), (display_message, "@{s1}stop charging!!", formation_order_color), (try_end), ] ), # script_formation_dismiss_key_reacion # Script called when dismiss key clicked # Input: none # Output: none ("formation_dismiss_key_reaction", [(str_clear, s1), (assign, ":cnt", 0), (try_for_range_backwards, ":array_no", 0, formation_arrays), (store_add, ":mark", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":mark"), (val_and, ":mark", "$formation_array_selected"), (neq, ":mark", 0), (store_add, ":array_string", ":array_no", formation_array_names_begin), (str_store_string, s2, ":array_string"), (val_add, ":cnt", 1), (try_begin), (eq, ":cnt", 2), (str_store_string, s1, "@{s2} and {s1}"), (else_try), (str_store_string, s1, "@{s2}, {s1}"), (try_end), (try_end), (try_begin), (eq, ":cnt", "$formation_max_array_no"), (str_store_string, s1, "@All battles, "), (try_end), (display_message, "@{s1}dismiss formation!!", formation_order_color), (get_player_agent_no, ":player"), (agent_get_team, ":team_no", ":player"), (call_script, "script_dismiss_battle_array", ":team_no", "$formation_array_selected"), ] ), # script_formation_clean_up # Script that's called by the end of mission # Input: none # Output: none ("formation_clean_up", [(get_player_agent_no, ":player"), (agent_get_team, ":team_no", ":player"), (call_script, "script_dismiss_battle_array", ":team_no", "$formation_all_arrays"), (assign, "$formation_vector_active", 0), (remove_party, formation_vector), (remove_party, formation_temp_vector), ]), # script_get_closest_distance_of_enemy_at_pos1 # Find an enemy standing closest to the center of enemies # Input: arg1: team_no, arg2: pos1 # Output: reg0 - distance to the closest enemy in cms, pos2 - closest enemy position ("get_closest_distance_of_enemy_at_pos1", [(store_script_param_1, ":team_no"), (set_fixed_point_multiplier, 100), (assign, reg0, 100000), (try_for_agents, ":agent"), (agent_is_alive, ":agent"), (agent_is_human, ":agent"), (agent_get_team, ":agent_team", ":agent"), (teams_are_enemies, ":team_no", ":agent_team"), (agent_get_position, pos2, ":agent"), (get_distance_between_positions, ":dist", pos1, pos2), (lt, ":dist", reg0), (assign, reg0, ":dist"), (copy_position, pos3, pos2), (try_end), (copy_position, pos2, pos3), ] ), # script_formation_tactical_charge_generic # Infantry formations can use this as tactical charge script # Input: arg1: team_no, arg2: array_no, # Output: none ("formation_tactical_charge_generic", [(store_script_param_1, ":team_no"), (store_script_param_2, ":array_no"), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_ref_x_pos), (party_get_slot, ":ref_x", formation_vector, reg0), (val_add, reg0, 1), (party_get_slot, ":ref_y", formation_vector, reg0), (val_add, reg0, 1), (party_get_slot, ":rotation", formation_vector, reg0), (set_fixed_point_multiplier, 100), (init_position, pos1), (position_set_x, pos1, ":ref_x"), (position_set_y, pos1, ":ref_y"), (position_rotate_z, pos1, ":rotation"), (position_set_z_to_ground_level, pos1), (copy_position, pos2, pos1), (try_begin), (call_script, "script_cf_calculate_enemy_infantry_centroid", ":team_no"), (get_distance_between_positions, ":dist", pos1, pos2), (else_try), (assign, ":dist", 100), (try_end), (try_begin), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_states), (party_get_slot, ":array_states", formation_vector, reg0), (assign, ":density", 0), (store_and, ":density", ":array_states", sfas_formation_density), (val_div, ":density", sfas_density_unit), (lt, ":dist", 10), # infantry in melee (store_sub, ":density", 1, ":density"), (try_begin), (neq, ":density", 0), (call_script, "script_formation_density_change", ":team_no", ":array_no", ":density"), (try_end), (else_try), (store_sub, ":density", 0, ":density"), (neq, ":density", 0), (call_script, "script_formation_density_change", ":team_no", ":array_no", ":density"), (try_end), (copy_position, pos1, pos2), (call_script, "script_get_closest_distance_of_enemy_at_pos1", ":team_no"), (set_fixed_point_multiplier, 100), (try_begin), (gt, reg0, 300), (lt, reg0, 500), (position_is_behind_position, pos2, pos1), # change formation to engaged stage (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_states), (party_get_slot, ":array_states", formation_vector, reg0), (val_or, ":array_states", sfas_engaged), (party_set_slot, formation_vector, reg0, ":array_states"), # stop march (call_script, "script_formation_accelerate", ":team_no", ":array_no", 0), (else_try), # march with a speed of 2m/s (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_states), (party_get_slot, ":array_states", formation_vector, reg0), (val_or, ":array_states", sfas_engaged), (val_sub, ":array_states", sfas_engaged), (val_or, ":array_states", sfas_auto_rotate), (party_set_slot, formation_vector, reg0, ":array_states"), (assign, ":speed", 0), (assign, ":fall_back", 0), (store_and, ":speed", ":array_states", sfas_speed), (store_and, ":fall_back", ":array_states", sfas_fall_back), (val_div, ":speed", sfas_speed_unit), (try_begin), (this_or_next|neq, ":fall_back", 0), (lt, ":speed", 2), (call_script, "script_formation_accelerate", ":team_no", ":array_no", 1), (else_try), (gt, ":speed", 2), (call_script, "script_formation_accelerate", ":team_no", ":array_no", -1), (try_end), (try_end), ] ), # script_cf_calculate_enemy_infantry_centroid # Input: arg1: team_no # Output: pos1 = Centroid ("cf_calculate_enemy_infantry_centroid", [(store_script_param_1, ":team_no"), (set_fixed_point_multiplier, 100), (init_position, pos1), (assign, ":acc_x", 0), (assign, ":acc_y", 0), (assign, ":cnt", 0), (try_for_agents, ":agent"), (agent_is_alive, ":agent"), (agent_is_human, ":agent"), (agent_get_team, ":agent_team", ":agent"), (teams_are_enemies, ":team_no", ":agent_team"), (agent_get_class, ":class", ":agent"), (neq, ":class", grc_cavalry), (agent_get_position, pos2, ":agent"), (position_get_x, ":pos_x", pos2), (position_get_y, ":pos_y", pos2), (val_add, ":acc_x", ":pos_x"), (val_add, ":acc_y", ":pos_y"), (val_add, ":cnt", 1), (try_end), (neq, ":cnt", 0), (val_div, ":acc_x", ":cnt"), (val_div, ":acc_y", ":cnt"), (position_set_x, pos1, ":acc_x"), (position_set_y, pos1, ":acc_y"), ] ), # script_cf_calculate_enemy_infantry_linear_regression_pos # Model enmey cluster as a line segment and find the estimation # Input: arg1: team_no # Output: pos1 = Middle point of the line segment, reg0 = number of enemies ("cf_calculate_enemy_infantry_linear_regression_pos", [(store_script_param_1, ":team_no"), (set_fixed_point_multiplier, 100), (init_position, pos1), (assign, ":acc_x", 0), (assign, ":acc_y", 0), (assign, ":cnt", 0), (try_for_agents, ":agent"), (agent_is_alive, ":agent"), (agent_is_human, ":agent"), (agent_get_team, ":agent_team", ":agent"), (agent_get_class, ":class", ":agent"), (neq, ":class", grc_cavalry), (teams_are_enemies, ":team_no", ":agent_team"), (agent_get_position, pos2, ":agent"), (position_get_x, ":pos_x", pos2), (position_get_y, ":pos_y", pos2), (val_add, ":acc_x", ":pos_x"), (val_add, ":acc_y", ":pos_y"), (val_add, ":cnt", 1), (try_end), (neq, ":cnt", 0), (val_div, ":acc_x", ":cnt"), (val_div, ":acc_y", ":cnt"), (position_set_x, pos1, ":acc_x"), (position_set_y, pos1, ":acc_y"), (assign, ":param1", -1), (val_mul, ":param1", ":cnt"), (val_mul, ":param1", ":acc_x"), (val_mul, ":param1", ":acc_y"), (val_div, ":param1", 10000), (assign, ":param2", -1), (val_mul, ":param2", ":cnt"), (val_mul, ":param2", ":acc_x"), (val_mul, ":param2", ":acc_x"), (val_div, ":param2", 10000), (try_for_agents, ":agent"), (agent_is_alive, ":agent"), (agent_is_human, ":agent"), (agent_get_team, ":agent_team", ":agent"), (agent_get_class, ":class", ":agent"), (neq, ":class", grc_cavalry), (teams_are_enemies, ":team_no", ":agent_team"), (agent_get_position, pos2, ":agent"), (position_get_x, ":pos_x", pos2), (convert_from_fixed_point, ":pos_x"), (position_get_y, ":pos_y", pos2), (convert_from_fixed_point, ":pos_y"), (store_mul, ":tmp", ":pos_x", ":pos_y"), (val_add, ":param1", ":tmp"), (store_mul, ":tmp", ":pos_x", ":pos_x"), (val_add, ":param2", ":tmp"), (try_end), # rotate pos1 so that its x-axis lies along side the regression line (copy_position, pos3, pos1), (position_move_x, pos3, ":param2"), (position_move_y, pos3, ":param1"), (position_transform_position_to_local, pos4, pos1, pos3), (position_get_x, ":pos_x", pos4), (position_get_y, ":pos_y", pos4), (convert_from_fixed_point, ":pos_x"), (store_div, ":tan", ":pos_y", ":pos_x"), (call_script, "script_arctan", ":tan"), (position_rotate_z, pos1, reg0), (assign, reg0, ":cnt"), ] ), # script_formation_tactical_charge_cavalry # Tactical charge script for cavalries # Input: arg1: team_no, arg2: array_no # Output: none ("formation_tactical_charge_cavalry", [(store_script_param_1, ":team_no"), (store_script_param_2, ":array_no"), (try_begin), (call_script, "script_cf_calculate_enemy_infantry_linear_regression_pos", ":team_no"), (gt, reg0, 10), (store_mul, ":tmp_slot", ":team_no", formation_arrays*2), (val_add, ":tmp_slot", ":array_no"), (party_get_slot, ":cur_num", formation_temp_vector, ":tmp_slot"), (gt, ":cur_num", 10), (set_fixed_point_multiplier, 100), (init_position, pos2), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_ref_x_pos), (store_sub, ":slot", reg0, slot_formation_array_ref_x_pos), (party_get_slot, ":ref_x", formation_vector, reg0), (position_set_x, pos2, ":ref_x"), (val_add, reg0, 1), (party_get_slot, ":ref_y", formation_vector, reg0), (position_set_y, pos2, ":ref_y"), (val_add, reg0, 1), (party_get_slot, ":rotation", formation_vector, reg0), # In case the formation stuck at boundaries, drive it out (try_begin), (eq, ":ref_x", "$battle_x_min"), (try_begin), (eq, ":ref_y", "$battle_y_min"), (assign, ":rotation", -45), (else_try), (assign, ":rotation", -135), (try_end), (else_try), (try_begin), (eq, ":ref_y", "$battle_y_min"), (assign, ":rotation", 45), (else_try), (this_or_next|eq, ":ref_y", "$battle_y_max"), (eq, ":ref_x", "$battle_x_max"), (assign, ":rotation", 135), (try_end), (try_end), (position_get_rotation_around_z, ":cur_rot", pos2), (val_sub, ":rotation", ":cur_rot"), (position_rotate_z, pos2, ":rotation"), (party_set_slot, formation_vector, reg0, ":rotation"), (get_distance_between_positions, ":dist", pos1, pos2), (store_add, ":states_slot", ":slot", slot_formation_array_states), (party_get_slot, ":array_states", formation_vector, ":states_slot"), (assign, ":speed", 0), (assign, ":fall_back", 0), (assign, ":density", 0), (store_and, ":speed", ":array_states", sfas_speed), (val_div, ":speed", sfas_speed_unit), (store_and, ":fall_back", ":array_states", sfas_fall_back), (store_and, ":density", ":array_states", sfas_formation_density), (val_div, ":density", sfas_density_unit), (try_begin), (store_sub, ":density", 1, ":density"), (neq, ":density", 0), (call_script, "script_formation_density_change", ":team_no", ":array_no", ":density"), (try_end), (try_begin), (le, ":dist", 3500), (val_or, ":array_states", sfas_engaged), (try_begin), (le, ":dist", 2500), (val_or, ":array_states", sfas_roar), (try_end), (party_set_slot, formation_vector, ":states_slot", ":array_states"), (try_begin), (this_or_next|neq, ":fall_back", 0), (lt, ":speed", 8), (call_script, "script_formation_accelerate", ":team_no", ":array_no", 1), (else_try), (gt, ":speed", 8), (call_script, "script_formation_accelerate", ":team_no", ":array_no", -1), (try_end), (else_try), (val_or, ":array_states", sfas_roar), (val_sub, ":array_states", sfas_roar), (val_or, ":array_states", sfas_engaged), (val_sub, ":array_states", sfas_engaged), (party_set_slot, formation_vector, ":states_slot", ":array_states"), (try_begin), (position_is_behind_position, pos2, pos1), (position_rotate_z, pos1, 180), (try_end), (position_transform_position_to_local, pos3, pos1, pos2), (set_fixed_point_multiplier, 100), (position_get_x, ":pos_x", pos3), (position_get_y, ":pos_y", pos3), (convert_to_fixed_point, ":pos_x"), (store_div, ":tan", ":pos_x", ":pos_y"), (call_script, "script_arctan", ":tan"), (val_abs, reg0), (assign, ":cut_in_angle", reg0), (assign, ":charge_speed", 5), (try_begin), (lt, ":cut_in_angle", 30), (assign, ":charge_speed", 7), (try_end), (try_begin), (this_or_next|neq, ":fall_back", 0), (lt, ":speed", ":charge_speed"), (call_script, "script_formation_accelerate", ":team_no", ":array_no", 1), (else_try), (gt, ":speed", ":charge_speed"), (call_script, "script_formation_accelerate", ":team_no", ":array_no", -1), (try_end), (try_begin), #(le, reg0, 80), #(ge, ":dist", 6000), (init_position, pos4), (position_set_x, pos4, 0), (position_set_y, pos4, ":dist"), (position_transform_position_to_parent, pos6, pos1, pos4), #(neg|position_is_behind_position, pos6, pos2), (position_transform_position_to_local, pos5, pos2, pos1), (position_get_x, ":pos_x", pos5), (position_get_y, ":pos_y", pos5), (set_fixed_point_multiplier, 100), (convert_to_fixed_point, ":pos_y"), (try_begin), (eq, ":pos_x", 0), (assign, ":pos_x", 1), (try_end), (try_begin), (gt, ":pos_x", 0), (assign, ":sign", -1), (else_try), (assign, ":sign", 1), (try_end), (val_abs, ":pos_x"), (store_div, ":tan", ":pos_y", ":pos_x"), (call_script, "script_arctan", ":tan"), (store_sub, reg0, 90, reg0), (try_begin), # (gt, reg0, tactical_charge_cut_in), # (store_mul, ":rotation", ":sign", tactical_charge_cut_in), # (call_script, "script_formation_turn", ":team_no", ":array_no", ":rotation"), #(else_try), (gt, reg0, tactical_charge_adjust_in), (try_begin), (gt, reg0, 30), (lt, reg0, 120), (store_mul, ":rotation", ":sign", tactical_charge_cut_in), (else_try), (store_mul, ":rotation", ":sign", tactical_charge_adjust_in), (try_end), (call_script, "script_formation_turn", ":team_no", ":array_no", ":rotation"), (try_end), (else_try), (store_mul, ":perimeter", ":dist", 2*Pi), (store_div, ":time", ":perimeter", ":speed"), (val_div, ":time", 100*tactical_charge_listen_interval), (store_div, ":omega", 360, ":time"), (position_transform_position_to_local, pos5, pos2, pos1), (position_get_x, ":pos_x", pos5), (position_get_y, ":pos_y", pos5), (assign, ":sign", 1), (try_begin), (gt, ":pos_x", 0), (assign, ":sign", -1), (try_end), (convert_from_fixed_point, ":pos_x"), (store_div, ":tan", ":pos_y", ":pos_x"), (call_script, "script_arctan", ":tan"), (val_abs, reg0), (try_begin), (this_or_next|gt, reg0, 3), (lt, ":dist", 4500), (gt, ":pos_y", 0), (val_sub, ":omega", tactical_charge_adjust_out), (else_try), (gt, reg0, 3), (val_add, ":omega", tactical_charge_adjust_in), (try_end), (val_mul, ":omega", ":sign"), (call_script, "script_formation_turn", ":team_no", ":array_no", ":omega"), (try_end), (try_end), (else_try), # enemies are small or formation scattered (store_add, ":mark", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":mark"), (call_script, "script_dismiss_battle_array", ":team_no", ":mark"), (try_end), ] ), # script_formation_check_array_ammo # Check the ratio of agents having ammo left # Input: arg1: team_no, arg2: array_no, # Output: reg0 - ratio in percentage ("formation_check_array_ammo", [(store_script_param_1, ":team_no"), (store_script_param_2, ":array_no"), (assign, ":cnt", 0), (assign, ":cnt_1", 0), (try_for_agents, ":agent"), (agent_is_alive, ":agent"), (agent_is_human, ":agent"), (agent_get_team, ":agent_team", ":agent"), (eq, ":agent_team", ":team_no"), (agent_get_slot, ":formation_states", ":agent", slot_agent_formation_states), (val_and, ":formation_states", safs_array_no), (eq, ":formation_states", ":array_no"), (agent_get_ammo, ":ammo", ":agent"), (val_add, ":cnt", 1), (neq, ":ammo", 0), (val_add, ":cnt_1", 1), (try_end), (val_mul, ":cnt_1", 100), (store_div, reg0, ":cnt_1", ":cnt"), ] ), # script_formation_tactical_charge_ranged # Infantry formations can use this as tactical charge script # Input: arg1: team_no, arg2: array_no, # Output: none ("formation_tactical_charge_ranged", [(store_script_param_1, ":team_no"), (store_script_param_2, ":array_no"), (try_begin), (call_script, "script_formation_check_array_ammo", ":team_no", ":array_no"), (gt, reg0, 50), (set_fixed_point_multiplier, 100), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_ref_x_pos), (party_get_slot, ":ref_x", formation_vector, reg0), (val_add, reg0, 1), (party_get_slot, ":ref_y", formation_vector, reg0), #(val_add, reg0, 1), #(party_get_slot, ":rotation", formation_vector, reg0), (init_position, pos1), (position_set_x, pos1, ":ref_x"), (position_set_y, pos1, ":ref_y"), (position_set_z_to_ground_level, pos1), (call_script, "script_get_closest3_distance_of_enemies_at_pos1", ":team_no"), (set_fixed_point_multiplier, 100), (assign, ":dist", reg0), (try_begin), (lt, ":dist", 1000), # change formation to engaged stage (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_states), (party_get_slot, ":array_states", formation_vector, reg0), (val_or, ":array_states", sfas_engaged), (party_set_slot, formation_vector, reg0, ":array_states"), (try_end), (try_begin), (lt, ":dist", 4500), # stop march (call_script, "script_formation_accelerate", ":team_no", ":array_no", 0), (else_try), # march with a speed of 2m/s (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_states), (party_get_slot, ":array_states", formation_vector, reg0), (val_or, ":array_states", sfas_engaged), (val_sub, ":array_states", sfas_engaged), (val_or, ":array_states", sfas_auto_rotate), (party_set_slot, formation_vector, reg0, ":array_states"), (assign, ":speed", 0), (assign, ":fall_back", 0), (store_and, ":speed", ":array_states", sfas_speed), (store_and, ":fall_back", ":array_states", sfas_fall_back), (val_div, ":speed", sfas_speed_unit), (try_begin), (this_or_next|neq, ":fall_back", 0), (lt, ":speed", 2), (call_script, "script_formation_accelerate", ":team_no", ":array_no", 1), (else_try), (gt, ":speed", 2), (call_script, "script_formation_accelerate", ":team_no", ":array_no", -1), (try_end), (try_end), (else_try), # ammo not enough, charge (store_add, ":mark", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":mark"), (call_script, "script_dismiss_battle_array", ":team_no", ":mark"), (try_end), ] ), ################################################################## # Notes: intending to align the following scripts the same as in string file # and in constants assignment, so that scripts can be called by # index instead of trying all names. # In such case do not insert scripts in between. # If you want to add new formations: # Append new formation scripts right after the last formation script, # and change module_strings.py, module_constants.py accordingly. # All formation scripts shall take the same parameters: # arg1: team_no, arg2:array_no, arg3: num_of_men ################################################################### # script_formation_tactical_charge_line # Tactical unit for charge of line formation # Input: arg1: team_no, arg2: array_no # Output: none ("formation_tactical_charge_line", [(store_script_param_1, ":team_no"), (store_script_param_2, ":array_no"), (call_script, "script_formation_tactical_charge_ranged", ":team_no", ":array_no"), ] ), ########DO NOT INSERT scripts here!!############### # #### ############################################ ## ## ############################################# ### ############################################## ### ####### DO NOT INSERT SCRIPTS HERE!!!! ####### ## ## ############################################# # #### ############################################ ########DO NOT INSERT scripts here!!############### # script_formation_tactical_charge_phalanx # Tactical unit for charge of line formation # Input: arg1: team_no, arg2: array_no # Output: none ("formation_tactical_charge_phalanx", [(store_script_param_1, ":team_no"), (store_script_param_2, ":array_no"), (call_script, "script_formation_tactical_charge_generic", ":team_no", ":array_no"), ] ), ########DO NOT INSERT scripts here!!############### # #### ############################################ ## ## ############################################# ### ############################################## ### ####### DO NOT INSERT SCRIPTS HERE!!!! ####### ## ## ############################################# # #### ############################################ ########DO NOT INSERT scripts here!!############### # script_formation_tactical_charge_wedge # Tactical unit for charge of line formation # Input: arg1: team_no, arg2: array_no # Output: none ("formation_tactical_charge_wedge", [(store_script_param_1, ":team_no"), (store_script_param_2, ":array_no"), (call_script, "script_formation_tactical_charge_cavalry", ":team_no", ":array_no"), ] ), ########DO NOT INSERT scripts here!!############### # #### ############################################ ## ## ############################################# ### ############################################## ### ####### DO NOT INSERT SCRIPTS HERE!!!! ####### ## ## ############################################# # #### ############################################ ########DO NOT INSERT scripts here!!############### # script_formation_tactical_charge_square # Tactical unit for charge of line formation # Input: arg1: team_no, arg2: array_no # Output: none ("formation_tactical_charge_square", [(store_script_param_1, ":team_no"), (store_script_param_2, ":array_no"), (call_script, "script_formation_tactical_charge_generic", ":team_no", ":array_no"), ] ), ########DO NOT INSERT scripts here!!############### # #### ############################################ ## ## ############################################# ### ############################################## ### ####### DO NOT INSERT SCRIPTS HERE!!!! ####### ## ## ############################################# # #### ############################################ ########DO NOT INSERT scripts here!!############### # script_formation_line # Calculate line formation # Input: arg1: team_no, arg2: array_no, # arg3: num_of_men # Output: none ("formation_line", [(store_script_param_1, ":team_no"), (store_script_param_2, ":array_no"), (store_script_param, ":num_of_men", 3), (call_script, "script_calculate_formation_row", ":team_no", ":array_no", sfas_density_base*3, ":num_of_men", sfas_density_base*3, 0), ] ), ########DO NOT INSERT scripts here!!############### # #### ############################################ ## ## ############################################# ### ############################################## ### ####### DO NOT INSERT SCRIPTS HERE!!!! ####### ## ## ############################################# # #### ############################################ ########DO NOT INSERT scripts here!!############### # script_formation_phalanx # Calculate phalanx formation # Input: arg1: team_no, arg2: array_no, # arg3: num_of_men # Output: none ("formation_phalanx", [(store_script_param, ":team_no", 1), (store_script_param, ":array_no", 2), (store_script_param, ":num_of_men", 3), (try_begin), (ge, ":num_of_men", 4), (store_div, ":width", ":num_of_men", 4), (else_try), (assign, ":width", ":num_of_men"), (try_end), (call_script, "script_calculate_formation_row", ":team_no", ":array_no", sfas_density_base*3, ":width", sfas_density_base*3, 0), ] ), ########DO NOT INSERT scripts here!!############### # #### ############################################ ## ## ############################################# ### ############################################## ### ####### DO NOT INSERT SCRIPTS HERE!!!! ####### ## ## ############################################# # #### ############################################ ########DO NOT INSERT scripts here!!############### # script_formation_wedge # Calculate wedge formation # Input: arg1: team_no, arg2: array_no, # arg3: num_of_men # Output: none ("formation_wedge", [(store_script_param, ":team_no", 1), (store_script_param, ":array_no", 2), #(store_script_param, ":num_of_men", 3), (call_script, "script_calculate_formation_row", ":team_no", ":array_no", sfas_density_base*3, 1, sfas_density_base*4*3, 2), ] ), ########DO NOT INSERT scripts here!!############### # #### ############################################ ## ## ############################################# ### ############################################## ### ####### DO NOT INSERT SCRIPTS HERE!!!! ####### ## ## ############################################# # #### ############################################ ########DO NOT INSERT scripts here!!############### # script_formation_square # Calculate square formation # Input: arg1: team_no, arg2: array_no # arg3: num_of_men # Output: none ("formation_square", [(store_script_param, ":team_no", 1), (store_script_param, ":array_no", 2), (store_script_param, ":num_of_men", 3), (set_fixed_point_multiplier, 100), (convert_to_fixed_point, ":num_of_men"), (store_sqrt, ":width", ":num_of_men"), (convert_from_fixed_point, ":width"), (call_script, "script_calculate_formation_row", ":team_no", ":array_no", sfas_density_base*3, ":width", sfas_density_base*3, 0), ] ), ########DO NOT INSERT scripts here!!############### # #### ############################################ ## ## ############################################# ### ############################################## ### ####### DO NOT INSERT SCRIPTS HERE!!!! ####### ## ## ############################################# # #### ############################################ ########DO NOT INSERT scripts here!!############### # script_dismiss_battle_array # Input: arg1: team_no, arg2:array_selection # Output: none ("dismiss_battle_array", [(store_script_param_1, ":team_no"), (store_script_param_2, ":array_selection"), #debug_point, (call_script, "script_convert_to_slot_no", ":team_no", -1, slot_formation_team_array_selection), (party_get_slot, ":array_in_formation", formation_vector, reg0), (val_or, ":array_in_formation", ":array_selection"), (val_sub, ":array_in_formation", ":array_selection"), (party_set_slot, formation_vector, reg0, ":array_in_formation"), (get_player_agent_no, ":player"), (try_for_agents, ":agent"), (neq, ":agent", ":player"), (agent_get_team, ":agent_team", ":agent"), (eq, ":agent_team", ":team_no"), (agent_is_alive, ":agent"), (agent_is_human, ":agent"), (agent_get_slot, ":formation_states", ":agent", slot_agent_formation_states), (assign, ":agent_array", 0), (store_and, ":agent_array", ":formation_states", safs_array_no), (val_add, ":agent_array", slot_formation_array_marks_begin), (party_get_slot, ":agent_array", formation_vector, ":agent_array"), (val_and, ":agent_array", ":array_selection"), (neq, ":agent_array", 0), (val_or, ":formation_states", safs_in_formation), (val_sub, ":formation_states", safs_in_formation), (agent_set_slot, ":agent", slot_agent_formation_states, ":formation_states"), (agent_clear_scripted_mode, ":agent"), (agent_set_slot, ":agent", slot_agent_is_in_scripted_mode, 0), (try_end), ]), ###########Do not insert scripts above############## # script_convert_to_slot_no # Convert to slot no in formation vector # Input: arg1: team_no - -1 if not in team slots, # arg2: array_no - -1 if not in array slots, # arg3: slot name # Output: reg0 = slot no ("convert_to_slot_no", [(store_script_param, ":team_no", 1), (store_script_param, ":array_no", 2), (store_script_param, ":slot", 3), (try_begin), (eq, ":team_no", -1), (else_try), (store_mul, ":base", ":team_no", sft_team_section_size), (val_add, ":base", slot_formation_teams_begin), (eq, ":array_no", -1), (val_add, ":slot", ":base"), (else_try), (store_mul, ":offset", ":array_no", sfa_array_section_size), (val_add, ":offset", slot_formation_team_arrays_begin), (val_add, ":slot", ":base"), (val_add, ":slot", ":offset"), (try_end), (assign, reg0, ":slot"), ]), # script_arctan # Input: arg1: fixed_point # Output: reg0 = angle in degrees ("arctan", [(store_script_param_1, ":fixed_point"), (set_fixed_point_multiplier, 100), (assign, reg0, 90), (assign, ":tangent", 0), (assign, ":lower_bound", -89), (assign, ":upper_bound", 90), (try_for_range, ":angle", ":lower_bound", ":upper_bound"), (assign, ":fixed_angle", ":angle"), (convert_to_fixed_point, ":fixed_angle"), (store_tan, ":tangent", ":fixed_angle"), (try_begin), (ge, ":tangent", ":fixed_point"), (assign, reg0, ":angle"), (assign, ":upper_bound", ":angle"), (try_end), (try_end), ]), #### Presentation scripts ############# # script_update_formation_key_config_buttons # Refresh button content in prsnt_formation_key_config # Input: none # Output: none ("update_formation_key_config_buttons", concatenate_scripts([ [(party_get_slot, ":key", "p_main_party", slot_party_formation_keys_begin+y), (try_begin), ]+concatenate_scripts([ [ (eq, ":key", all_keys_list[x][0]), (overlay_set_text, "$g_presentation_obj_"+str(y*2+2), all_keys_list[x][1], 0), (overlay_set_color, "$g_presentation_obj_"+str(y*2+2), 0x0), (else_try), ] for x in range(0, len(all_keys_list)) ])+[ (eq, ":key", 0xff), (overlay_set_text, "$g_presentation_obj_"+str(y*2+2), "@Disabled"), (overlay_set_color, "$g_presentation_obj_"+str(y*2+2), 0x800000), (else_try), (overlay_set_text, "$g_presentation_obj_"+str(y*2+2), "@Undefined!"), (overlay_set_color, "$g_presentation_obj_"+str(y*2+2), 0xFF0000), (try_end), ] for y in range(0, len(formation_keys_list)) ]) ), # script_update_formation_order_panel # Input: arg1 = team_no # Output: none ("update_formation_order_panel", [(store_script_param_1, ":team_no"), (set_fixed_point_multiplier, 1000), (assign, ":tactical_charge", 0), (assign, ":charge", 0), (assign, ":fall_back", 0), (assign, ":formation_type", 0), (assign, ":density", 0), (assign, ":auto_rotation", 0), (position_set_y, pos1, 660), ]+concatenate_scripts([ [ (call_script, "script_convert_to_slot_no", ":team_no", -1, slot_formation_team_array_selection), (party_get_slot, ":array_selection", formation_vector, reg0), (party_get_slot, ":mark", formation_vector, slot_formation_array_marks_begin+x), (val_and, ":mark", ":array_selection"), (try_begin), (eq, ":mark", 0), (overlay_set_text, "$g_presentation_array_formation_"+str(x+1), "@Dismissed"), (overlay_set_text, "$g_presentation_array_movement_"+str(x+1), "@Charging"), (overlay_set_text, "$g_presentation_array_density_"+str(x+1), "@Scattered"), (overlay_set_text, "$g_presentation_array_facing_"+str(x+1), "@Free"), (else_try), (call_script, "script_convert_to_slot_no", ":team_no", x, slot_formation_array_states), (party_get_slot, ":array_states", formation_vector, reg0), (store_and, ":formation_type", ":array_states", sfas_formation_type), (store_add, ":formation_name", formation_commands_begin, ":formation_type"), (overlay_set_text, "$g_presentation_array_formation_"+str(x+1), ":formation_name"), (try_begin), (store_and, ":tactical_charge", ":array_states", sfas_tactical_charge), (neq, ":tactical_charge", 0), (overlay_set_text, "$g_presentation_array_movement_"+str(x+1), "@Charging(Tactical)"), (else_try), (store_and, ":charge", ":array_states", sfas_charge), (neq, ":charge", 0), (store_and, reg1, ":array_states", sfas_speed), (val_div, reg1, sfas_speed_base), (overlay_set_text, "$g_presentation_array_movement_"+str(x+1), "@Charging({reg1}m/s)"), (else_try), (store_and, ":fall_back", ":array_states", sfas_fall_back), (neq, ":fall_back", 0), (store_and, reg1, ":array_states", sfas_speed), (val_div, reg1, sfas_speed_base), (overlay_set_text, "$g_presentation_array_movement_"+str(x+1), "@Retreating({reg1}m/s)"), (else_try), (overlay_set_text, "$g_presentation_array_movement_"+str(x+1), "@Holding"), (try_end), (store_and, ":density", ":array_states", sfas_formation_density), (val_div, ":density", sfas_density_unit), (try_begin), (eq, ":density", 0), (overlay_set_text, "$g_presentation_array_density_"+str(x+1), "@Densest"), (else_try), (eq, ":density", 1), (overlay_set_text, "$g_presentation_array_density_"+str(x+1), "@Dense"), (else_try), (eq, ":density", 2), (overlay_set_text, "$g_presentation_array_density_"+str(x+1), "@Sparse"), (else_try), (overlay_set_text, "$g_presentation_array_density_"+str(x+1), "@Sparsest"), (try_end), (store_and, ":auto_rotation", ":array_states", sfas_auto_rotate), (try_begin), (neq, ":auto_rotation", 0), (overlay_set_text, "$g_presentation_array_facing_"+str(x+1), "@Toward enemies"), (else_try), (overlay_set_text, "$g_presentation_array_facing_"+str(x+1), "@Free"), (try_end), (try_end), (set_fixed_point_multiplier, 1000), #(position_set_x, pos2, 900), #(position_set_y, pos2, 900), #(position_set_x, pos1, 215), #(overlay_set_position, "$g_presentation_array_formation_"+str(x+1), pos1), #(overlay_set_size, "$g_presentation_array_formation_"+str(x+1), pos2), #(position_set_x, pos1, 330), #(overlay_set_position, "$g_presentation_array_movement_"+str(x+1), pos1), #(overlay_set_size, "$g_presentation_array_movement_"+str(x+1), pos2), #(position_set_x, pos1, 430), #(overlay_set_position, "$g_presentation_array_density_"+str(x+1), pos1), #(overlay_set_size, "$g_presentation_array_density_"+str(x+1), pos2), #(position_set_x, pos1, 540), #(overlay_set_position, "$g_presentation_array_facing_"+str(x+1), pos1), #(overlay_set_size, "$g_presentation_array_facing_"+str(x+1), pos2), #(position_move_y, pos1, -5), ] for x in range(0, formation_arrays) ])+[ ]), # further follow-up needed... # script_update_formation_order_flags_on_map # Input: none # Output: none ("update_formation_order_flags_on_map", [(get_player_agent_no, ":player_agent"), (agent_get_team, ":player_team", ":player_agent"), (get_scene_boundaries, pos2, pos3), ]+concatenate_scripts([ [ (try_begin), (set_fixed_point_multiplier, 100), (call_script, "script_convert_to_slot_no", ":player_team", -1, slot_formation_team_array_selection), (party_get_slot, ":array_selection", formation_vector, reg0), (party_get_slot, ":mark", formation_vector, slot_formation_array_marks_begin+x), (val_and, ":mark", ":array_selection"), (neq, ":mark", 0), (call_script, "script_convert_to_slot_no", ":player_team", x, 0), (store_add, ":x_slot", reg0, slot_formation_array_ref_x_pos), (party_get_slot, ":ref_x", formation_vector, ":x_slot"), (store_add, ":y_slot", reg0, slot_formation_array_ref_y_pos), (party_get_slot, ":ref_y", formation_vector, ":y_slot"), (position_set_x, pos1, ":ref_x"), (position_set_y, pos1, ":ref_y"), (call_script, "script_convert_3d_pos_to_map_pos"), (overlay_set_alpha, "$g_battle_map_array_"+str(x+1)+"_flag", 0xFF), (overlay_set_position, "$g_battle_map_array_"+str(x+1)+"_flag", pos0), (else_try), (overlay_set_alpha, "$g_battle_map_array_"+str(x+1)+"_flag", 0), (try_end), ] for x in range(0, formation_arrays) ])+[ ]), # script_update_formation_order_panel_checked_arrays # Input: none # Output: none ("update_formation_order_panel_checked_arrays", [#(get_player_agent_no, ":player_agent"), #(agent_get_team, ":player_team", ":player_agent"), ]+concatenate_scripts([ [ (try_begin), (party_get_slot, ":mark", formation_vector, slot_formation_array_marks_begin+x), (val_and, ":mark", "$formation_array_selected"), (neq, ":mark", 0), (overlay_set_val, "$g_presentation_obj_"+str(x+1+formation_arrays), 1), (overlay_animate_to_alpha, "$g_presentation_obj_"+str(x+1), 250, 0x44), (else_try), (overlay_set_val, "$g_presentation_obj_"+str(x+1+formation_arrays), 0), (overlay_animate_to_alpha, "$g_presentation_obj_"+str(x+1), 250, 0), (try_end), ] for x in range(0, formation_arrays) ])+[ ]), # script_update_formation_order_panel_statistics_and_map # Input: none # Output: none ("update_formation_order_panel_statistics_and_map", #TODO: Call this in every battle mission template, once per second [(set_fixed_point_multiplier, 1000), (get_player_agent_no, ":player_agent"), (agent_get_team, ":player_team", ":player_agent"), (get_scene_boundaries, pos2, pos3), (try_for_agents,":cur_agent"), (agent_is_human, ":cur_agent"), #(agent_get_class, ":agent_class", ":cur_agent"), (agent_get_party_id, ":agent_party", ":cur_agent"), (agent_get_slot, ":agent_overlay", ":cur_agent", slot_agent_map_overlay_id), (try_begin), (eq, ":agent_party", "p_main_party"), (try_begin), (agent_is_alive, ":cur_agent"), (call_script, "script_update_agent_position_on_map", ":cur_agent"), (else_try), (overlay_set_alpha, ":agent_overlay", 0), (try_end), (else_try), (agent_is_ally, ":cur_agent"), (try_begin), (agent_is_alive, ":cur_agent"), (call_script, "script_update_agent_position_on_map", ":cur_agent"), (else_try), (overlay_set_alpha, ":agent_overlay", 0), (try_end), (else_try), (try_begin), (agent_is_alive, ":cur_agent"), (call_script, "script_update_agent_position_on_map", ":cur_agent"), (else_try), (overlay_set_alpha, ":agent_overlay", 0), (try_end), (try_end), (try_end), (store_mul, ":base", ":player_team", formation_arrays*2), (val_add, ":base", slot_formation_tmp_maintain), ]+concatenate_scripts([ [ (store_add, ":num_slot", ":base", x), (party_get_slot, reg1, formation_temp_vector, ":num_slot"), (store_add, ":array_name", formation_order_panel_array_names_begin, x), (str_store_string, s1, ":array_name"), (overlay_set_text, "$g_presentation_obj_"+str(x+1+formation_arrays*2), "@{s1} ({reg1})"), ] for x in range(0, formation_arrays) ])+[ (call_script, "script_update_formation_order_flags_on_map"), ]), # Form Ranks Scripts Section End ################################## ]
Python
file = open("module_scripts.py","r") lines = file.readlines() file.close() file = open("module_scripts.py","w") level = 0 for line in lines: line = line.strip() acceptableindex = line.find("#") if (acceptableindex == -1): acceptableindex = len(line) level -= line.count("try_end", 0, acceptableindex) level -= line.count("end_try", 0, acceptableindex) level -= line.count("else_try", 0, acceptableindex) newlevel = level level_positive_change = 0 newlevel += line.count("else_try", 0, acceptableindex) newlevel += line.count("(", 0, acceptableindex) newlevel += line.count("[", 0, acceptableindex) newlevel += line.count("try_begin", 0, acceptableindex) newlevel += line.count("try_for", 0, acceptableindex) level_positive_change = newlevel - level newlevel -= line.count(")", 0, acceptableindex) newlevel -= line.count("]", 0, acceptableindex) if (level_positive_change == 0): level = newlevel for i in xrange(level): file.write(" ") level = newlevel file.write("%s\n"%line) file.close()
Python
icon_player = 0 icon_player_horseman = 1 icon_gray_knight = 2 icon_vaegir_knight = 3 icon_flagbearer_a = 4 icon_flagbearer_b = 5 icon_peasant = 6 icon_khergit = 7 icon_khergit_horseman_b = 8 icon_axeman = 9 icon_woman = 10 icon_woman_b = 11 icon_town = 12 icon_town_steppe = 13 icon_village_a = 14 icon_village_burnt_a = 15 icon_village_deserted_a = 16 icon_camp = 17 icon_ship = 18 icon_ship_on_land = 19 icon_castle_a = 20 icon_castle_b = 21 icon_castle_c = 22 icon_castle_d = 23 icon_town_snow = 24 icon_village_snow_a = 25 icon_village_snow_burnt_a = 26 icon_village_snow_deserted_a = 27 icon_castle_snow_a = 28 icon_castle_snow_b = 29 icon_mule = 30 icon_cattle = 31 icon_training_ground = 32 icon_bridge_a = 33 icon_bridge_b = 34 icon_bridge_snow_a = 35 icon_custom_banner_01 = 36 icon_custom_banner_02 = 37 icon_custom_banner_03 = 38 icon_banner_01 = 39 icon_banner_02 = 40 icon_banner_03 = 41 icon_banner_04 = 42 icon_banner_05 = 43 icon_banner_06 = 44 icon_banner_07 = 45 icon_banner_08 = 46 icon_banner_09 = 47 icon_banner_10 = 48 icon_banner_11 = 49 icon_banner_12 = 50 icon_banner_13 = 51 icon_banner_14 = 52 icon_banner_15 = 53 icon_banner_16 = 54 icon_banner_17 = 55 icon_banner_18 = 56 icon_banner_19 = 57 icon_banner_20 = 58 icon_banner_21 = 59 icon_banner_22 = 60 icon_banner_23 = 61 icon_banner_24 = 62 icon_banner_25 = 63 icon_banner_26 = 64 icon_banner_27 = 65 icon_banner_28 = 66 icon_banner_29 = 67 icon_banner_30 = 68 icon_banner_31 = 69 icon_banner_32 = 70 icon_banner_33 = 71 icon_banner_34 = 72 icon_banner_35 = 73 icon_banner_36 = 74 icon_banner_37 = 75 icon_banner_38 = 76 icon_banner_39 = 77 icon_banner_40 = 78 icon_banner_41 = 79 icon_banner_42 = 80 icon_banner_43 = 81 icon_banner_44 = 82 icon_banner_45 = 83 icon_banner_46 = 84 icon_banner_47 = 85 icon_banner_48 = 86 icon_banner_49 = 87 icon_banner_50 = 88 icon_banner_51 = 89 icon_banner_52 = 90 icon_banner_53 = 91 icon_banner_54 = 92 icon_banner_55 = 93 icon_banner_56 = 94 icon_banner_57 = 95 icon_banner_58 = 96 icon_banner_59 = 97 icon_banner_60 = 98 icon_banner_61 = 99 icon_banner_62 = 100 icon_banner_63 = 101 icon_banner_64 = 102 icon_banner_65 = 103 icon_banner_66 = 104 icon_banner_67 = 105 icon_banner_68 = 106 icon_banner_69 = 107 icon_banner_70 = 108 icon_banner_71 = 109 icon_banner_72 = 110 icon_banner_73 = 111 icon_banner_74 = 112 icon_banner_75 = 113 icon_banner_76 = 114 icon_banner_77 = 115 icon_banner_78 = 116 icon_banner_79 = 117 icon_banner_80 = 118 icon_banner_81 = 119 icon_banner_82 = 120 icon_banner_83 = 121 icon_banner_84 = 122 icon_banner_85 = 123 icon_banner_86 = 124 icon_banner_87 = 125 icon_banner_88 = 126 icon_banner_89 = 127 icon_banner_90 = 128 icon_banner_91 = 129 icon_banner_92 = 130 icon_banner_93 = 131 icon_banner_94 = 132 icon_banner_95 = 133 icon_banner_96 = 134 icon_banner_97 = 135 icon_banner_98 = 136 icon_banner_99 = 137 icon_banner_100 = 138 icon_banner_101 = 139 icon_banner_102 = 140 icon_banner_103 = 141 icon_banner_104 = 142 icon_banner_105 = 143 icon_banner_106 = 144 icon_banner_107 = 145 icon_banner_108 = 146 icon_banner_109 = 147 icon_banner_110 = 148 icon_banner_111 = 149 icon_banner_112 = 150 icon_banner_113 = 151 icon_banner_114 = 152 icon_banner_115 = 153 icon_banner_116 = 154 icon_banner_117 = 155 icon_banner_118 = 156 icon_banner_119 = 157 icon_banner_120 = 158 icon_banner_121 = 159 icon_banner_122 = 160 icon_banner_123 = 161 icon_banner_124 = 162 icon_banner_125 = 163 icon_banner_126 = 164
Python
from header_common import * from header_operations import * from header_parties import * from header_items import * from header_skills import * from header_triggers import * from header_troops import * from header_music import * from module_constants import * #################################################################################################################### # Simple triggers are the alternative to old style triggers. They do not preserve state, and thus simpler to maintain. # # Each simple trigger contains the following fields: # 1) Check interval: How frequently this trigger will be checked # 2) Operation block: This must be a valid operation block. See header_operations.py for reference. #################################################################################################################### simple_triggers = [ # This trigger is deprecated. Use "script_game_event_party_encounter" in module_scripts.py instead (ti_on_party_encounter, [ ]), # This trigger is deprecated. Use "script_game_event_simulate_battle" in module_scripts.py instead (ti_simulate_battle, [ ]), (1, [ (gt,"$auto_besiege_town",0), (gt,"$g_player_besiege_town", 0), (ge, "$g_siege_method", 1), (store_current_hours, ":cur_hours"), (eq, "$g_siege_force_wait", 0), (ge, ":cur_hours", "$g_siege_method_finish_hours"), (neg|is_currently_night), (rest_for_hours, 0, 0, 0), #stop resting ]), (0, [ (eq,"$g_player_is_captive",1), (gt, "$capturer_party", 0), (party_is_active, "$capturer_party"), (party_relocate_near_party, "p_main_party", "$capturer_party", 0), ]), #Auto-menu (0, [ (try_begin), (gt, "$g_last_rest_center", 0), (party_get_battle_opponent, ":besieger_party", "$g_last_rest_center"), (gt, ":besieger_party", 0), (store_faction_of_party, ":encountered_faction", "$g_last_rest_center"), (store_relation, ":faction_relation", ":encountered_faction", "fac_player_supporters_faction"), (store_faction_of_party, ":besieger_party_faction", ":besieger_party"), (store_relation, ":besieger_party_relation", ":besieger_party_faction", "fac_player_supporters_faction"), (ge, ":faction_relation", 0), (lt, ":besieger_party_relation", 0), (start_encounter, "$g_last_rest_center"), (rest_for_hours, 0, 0, 0), #stop resting (else_try), (store_current_hours, ":cur_hours"), (assign, ":check", 0), (try_begin), (neq, "$g_check_autos_at_hour", 0), (ge, ":cur_hours", "$g_check_autos_at_hour"), (assign, ":check", 1), (assign, "$g_check_autos_at_hour", 0), (try_end), (this_or_next|eq, ":check", 1), (map_free), (try_begin), (ge,"$auto_menu",1), (jump_to_menu,"$auto_menu"), (assign,"$auto_menu",-1), (else_try), (ge,"$auto_enter_town",1), (start_encounter, "$auto_enter_town"), (else_try), (ge,"$auto_besiege_town",1), (assign, reg0, 200|opmask_variable), (display_message, "@content of supposed variable: {reg0}", formation_debug_color), #(display_message, "@Error here?", formation_debug_color), (start_encounter, "$auto_besiege_town"), (else_try), (ge,"$g_camp_mode", 1), (assign, "$g_camp_mode", 0), (assign, "$g_player_icon_state", pis_normal), (display_message, "@Breaking camp..."), (try_end), (try_end), ]), #Notification menus (0, [ (troop_slot_ge, "trp_notification_menu_types", 0, 1), (troop_get_slot, ":menu_type", "trp_notification_menu_types", 0), (troop_get_slot, "$g_notification_menu_var1", "trp_notification_menu_var1", 0), (troop_get_slot, "$g_notification_menu_var2", "trp_notification_menu_var2", 0), (jump_to_menu, ":menu_type"), (assign, ":end_cond", 2), (try_for_range, ":cur_slot", 1, ":end_cond"), (try_begin), (troop_slot_ge, "trp_notification_menu_types", ":cur_slot", 1), (val_add, ":end_cond", 1), (try_end), (store_sub, ":cur_slot_minus_one", ":cur_slot", 1), (troop_get_slot, ":local_temp", "trp_notification_menu_types", ":cur_slot"), (troop_set_slot, "trp_notification_menu_types", ":cur_slot_minus_one", ":local_temp"), (troop_get_slot, ":local_temp", "trp_notification_menu_var1", ":cur_slot"), (troop_set_slot, "trp_notification_menu_var1", ":cur_slot_minus_one", ":local_temp"), (troop_get_slot, ":local_temp", "trp_notification_menu_var2", ":cur_slot"), (troop_set_slot, "trp_notification_menu_var2", ":cur_slot_minus_one", ":local_temp"), (try_end), ]), #Music, (1, [ (map_free), (call_script, "script_music_set_situation_with_culture", mtf_sit_travel), ]), #Player raiding a village # This trigger will check if player's raid has been completed and will lead control to village menu. (1, [ (ge,"$g_player_raiding_village",1), (try_begin), (neq, "$g_player_is_captive", 0), (rest_for_hours, 0, 0, 0), #stop resting - abort (assign,"$g_player_raiding_village",0), (else_try), (map_free), #we have been attacked during raid (assign,"$g_player_raiding_village",0), (else_try), (this_or_next|party_slot_eq, "$g_player_raiding_village", slot_village_state, svs_looted), (party_slot_eq, "$g_player_raiding_village", slot_village_state, svs_deserted), (start_encounter, "$g_player_raiding_village"), (rest_for_hours, 0), (assign,"$g_player_raiding_village",0), (assign,"$g_player_raid_complete",1), (else_try), (party_slot_eq, "$g_player_raiding_village", slot_village_state, svs_being_raided), (rest_for_hours, 3, 5, 1), #rest while attackable (else_try), (rest_for_hours, 0, 0, 0), #stop resting - abort (assign,"$g_player_raiding_village",0), (assign,"$g_player_raid_complete",0), (try_end), ]), #Pay day. (24 * 7, [ (call_script, "script_calculate_player_faction_wage"), (assign, ":total_wages", reg0), (store_add, ":total_debt", ":total_wages", "$g_player_debt_to_party_members"), (try_begin), (gt, ":total_debt", 0), (jump_to_menu,"mnu_pay_day"), (try_end), (assign, "$g_cur_week_half_daily_wage_payments", 0),#Reseting the weekly half wage payments ]), #Mercenary Pay day. (6, [ (store_current_hours, ":cur_hours"), (try_begin), (ge, ":cur_hours", "$mercenary_service_next_pay_time"), (call_script, "script_party_calculate_strength", "p_main_party", 0), (assign, ":offer_value", reg0), (val_div, ":offer_value", 2), (val_add, ":offer_value", 30), (call_script, "script_round_value", ":offer_value"), (val_add, "$mercenary_service_accumulated_pay", reg0), (store_add, "$mercenary_service_next_pay_time", ":cur_hours", 7 * 24), (try_end), ]), # Oath fulfilled? (24, [ (le, "$auto_menu", 0), (gt, "$players_kingdom", 0), (neq, "$players_kingdom", "fac_player_supporters_faction"), (eq, "$player_has_homage", 0), (store_current_day, ":cur_day"), (gt, ":cur_day", "$mercenary_service_next_renew_day"), (jump_to_menu, "mnu_oath_fulfilled"), ]), # Reducing luck by 1 in every 180 hours (180, [ (val_sub, "$g_player_luck", 1), (val_max, "$g_player_luck", 0), ]), # Banner selection menu (24, [ (eq, "$g_player_banner_granted", 1), (troop_slot_eq, "trp_player", slot_troop_banner_scene_prop, 0), (le,"$auto_menu",0), #normal_banner_begin (start_presentation, "prsnt_banner_selection"), #custom_banner_begin # (start_presentation, "prsnt_custom_banner"), ]), # Party Morale: Move morale towards target value. (24, [ (call_script, "script_get_player_party_morale_values"), (assign, ":target_morale", reg0), (party_get_morale, ":cur_morale", "p_main_party"), (store_sub, ":dif", ":target_morale", ":cur_morale"), (store_div, ":dif_to_add", ":dif", 5), (store_mul, ":dif_to_add_correction", ":dif_to_add", 5), (try_begin),#finding ceiling of the value (neq, ":dif_to_add_correction", ":dif"), (try_begin), (gt, ":dif", 0), (val_add, ":dif_to_add", 1), (else_try), (val_sub, ":dif_to_add", 1), (try_end), (try_end), (val_add, ":cur_morale", ":dif_to_add"), (party_set_morale, "p_main_party", ":cur_morale"), ]), #Party AI: pruning some of the prisoners in each center (once a week) (24*7, [ (try_for_range, ":center_no", centers_begin, centers_end), (party_get_num_prisoner_stacks, ":num_prisoner_stacks",":center_no"), (try_for_range_backwards, ":stack_no", 0, ":num_prisoner_stacks"), (party_prisoner_stack_get_troop_id, ":stack_troop",":center_no",":stack_no"), (neg|troop_is_hero, ":stack_troop"), (party_prisoner_stack_get_size, ":stack_size",":center_no",":stack_no"), (store_random_in_range, ":rand_no", 0, 40), (val_mul, ":stack_size", ":rand_no"), (val_div, ":stack_size", 100), (party_remove_prisoners, ":center_no", ":stack_troop", ":stack_size"), (try_end), (try_end), ]), #Adding net incomes to heroes (once a week) #Increasing debts to heroes by 1% (once a week) #Adding net incomes to centers (once a week) (24*7, [ (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (troop_get_slot, ":cur_debt", ":troop_no", slot_troop_player_debt),#Increasing debt (val_mul, ":cur_debt", 101), (val_div, ":cur_debt", 100), (troop_set_slot, ":troop_no", slot_troop_player_debt, ":cur_debt"), (call_script, "script_calculate_hero_weekly_net_income_and_add_to_wealth", ":troop_no"),#Adding net income (try_end), (try_for_range, ":center_no", walled_centers_begin, walled_centers_end), #If non-player center, adding income to wealth (neg|party_slot_eq, ":center_no", slot_town_lord, "trp_player"), #center does not belong to player. (party_slot_ge, ":center_no", slot_town_lord, 1), #center belongs to someone. (party_get_slot, ":cur_wealth", ":center_no", slot_town_wealth), (party_get_slot, ":prosperity", ":center_no", slot_town_prosperity), (store_mul, ":added_wealth", ":prosperity", 15), (val_add, ":added_wealth", 700), (try_begin), (party_slot_eq, ":center_no", slot_party_type, spt_town), (val_mul, ":added_wealth", 3), (val_div, ":added_wealth", 2), (try_end), (val_add, ":cur_wealth", ":added_wealth"), (call_script, "script_calculate_weekly_party_wage", ":center_no"), (val_sub, ":cur_wealth", reg0), (val_max, ":cur_wealth", 0), (party_set_slot, ":center_no", slot_town_wealth, ":cur_wealth"), (try_end), ]), #Hiring men with hero wealths (once a day) #Hiring men with center wealths (once a day) (24, [ (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), (ge, ":party_no", 1), (party_get_attached_to, ":cur_attached_party", ":party_no"), (is_between, ":cur_attached_party", centers_begin, centers_end), (party_slot_eq, ":cur_attached_party", slot_center_is_besieged_by, -1), #center not under siege (call_script, "script_hire_men_to_kingdom_hero_party", ":troop_no"), #Hiring men with current wealth (try_end), (try_for_range, ":center_no", walled_centers_begin, walled_centers_end), (neg|party_slot_eq, ":center_no", slot_town_lord, "trp_player"), #center does not belong to player. (party_slot_ge, ":center_no", slot_town_lord, 1), #center belongs to someone. (party_get_slot, ":cur_wealth", ":center_no", slot_town_wealth), (party_slot_eq, ":center_no", slot_center_is_besieged_by, -1), #center not under siege (assign, ":hiring_budget", ":cur_wealth"), (val_div, ":hiring_budget", 5), (gt, ":hiring_budget", reinforcement_cost), (call_script, "script_cf_reinforce_party", ":center_no"), (val_sub, ":cur_wealth", reinforcement_cost), (party_set_slot, ":center_no", slot_town_wealth, ":cur_wealth"), (try_end), ]), #Converging center prosperity to ideal prosperity once in every 15 days (24*15, [(try_for_range, ":center_no", centers_begin, centers_end), (call_script, "script_get_center_ideal_prosperity", ":center_no"), (assign, ":ideal_prosperity", reg0), (party_get_slot, ":prosperity", ":center_no", slot_town_prosperity), (try_begin), (gt, ":prosperity", ":ideal_prosperity"), (call_script, "script_change_center_prosperity", ":center_no", -1), (else_try), (lt, ":prosperity", ":ideal_prosperity"), (call_script, "script_change_center_prosperity", ":center_no", 1), (try_end), (try_end), ]), #Checking if the troops are resting at a half payment point (6, [(store_current_day, ":cur_day"), (try_begin), (neq, ":cur_day", "$g_last_half_payment_check_day"), (assign, "$g_last_half_payment_check_day", ":cur_day"), (try_begin), (eq, "$g_half_payment_checkpoint", 1), (val_add, "$g_cur_week_half_daily_wage_payments", 1), #half payment for yesterday (try_end), (assign, "$g_half_payment_checkpoint", 1), (try_end), (assign, ":resting_at_manor_or_walled_center", 0), (try_begin), (neg|map_free), (ge, "$g_last_rest_center", 0), (this_or_next|party_slot_eq, "$g_last_rest_center", slot_center_has_manor, 1), (is_between, "$g_last_rest_center", walled_centers_begin, walled_centers_end), (assign, ":resting_at_manor_or_walled_center", 1), (try_end), (eq, ":resting_at_manor_or_walled_center", 0), (assign, "$g_half_payment_checkpoint", 0), ]), # Give some xp to hero parties (48, [ (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (store_random_in_range, ":rand", 0, 100), (lt, ":rand", 30), (troop_get_slot, ":hero_party", ":troop_no", slot_troop_leaded_party), (gt, ":hero_party", centers_end), (party_is_active, ":hero_party"), (store_skill_level, ":trainer_level", skl_trainer, ":troop_no"), (val_add, ":trainer_level", 2), (store_mul, ":xp_gain", ":trainer_level", 500), (party_upgrade_with_xp, ":hero_party", ":xp_gain"), (try_end), (try_for_range, ":center_no", walled_centers_begin, walled_centers_end), (store_random_in_range, ":rand", 0, 100), (lt, ":rand", 10), (party_get_slot, ":center_lord", ":center_no", slot_town_lord), (neq, ":center_lord", "trp_player"), (party_upgrade_with_xp, ":center_no", 3000), (try_end), ]), # Process sieges (24, [ (call_script, "script_process_sieges"), ]), # Process village raids (2, [ (call_script, "script_process_village_raids"), ]), # Decide vassal ai (7, [ (call_script, "script_init_ai_calculation"), (call_script, "script_decide_kingdom_party_ais"), ]), # Hold regular marshall elections for players_kingdom (24, [ (val_add, "$g_election_date", 1), (ge, "$g_election_date", 90), (is_between, "$players_kingdom", kingdoms_begin, kingdoms_end), (neq, "$players_kingdom", "fac_player_supporters_faction"), (assign, "$g_presentation_input", -1), (assign, "$g_presentation_marshall_selection_1_vote", 0), (assign, "$g_presentation_marshall_selection_2_vote", 0), (assign, "$g_presentation_marshall_selection_max_renown_1", -10000), (assign, "$g_presentation_marshall_selection_max_renown_2", -10000), (assign, "$g_presentation_marshall_selection_max_renown_3", -10000), (assign, "$g_presentation_marshall_selection_max_renown_1_troop", -10000), (assign, "$g_presentation_marshall_selection_max_renown_2_troop", -10000), (assign, "$g_presentation_marshall_selection_max_renown_3_troop", -10000), (assign, ":num_men", 0), (try_for_range, ":loop_var", "trp_kingdom_heroes_including_player_begin", kingdom_heroes_end), (assign, ":cur_troop", ":loop_var"), (assign, ":continue", 0), (try_begin), (eq, ":loop_var", "trp_kingdom_heroes_including_player_begin"), (assign, ":cur_troop", "trp_player"), (try_begin), (eq, "$g_player_is_captive", 0), (assign, ":continue", 1), (try_end), (else_try), (store_troop_faction, ":cur_troop_faction", ":cur_troop"), (eq, "$players_kingdom", ":cur_troop_faction"), #(troop_slot_eq, ":cur_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":cur_troop", slot_troop_prisoner_of_party, 0), (troop_slot_ge, ":cur_troop", slot_troop_leaded_party, 1), (troop_slot_eq, ":cur_troop", slot_troop_occupation, slto_kingdom_hero), (neg|faction_slot_eq, ":cur_troop_faction", slot_faction_leader, ":cur_troop"), (troop_get_slot, ":cur_party", ":cur_troop", slot_troop_leaded_party), (gt, ":cur_party", 0), (party_is_active, ":cur_party"), (call_script, "script_party_count_fit_for_battle", ":cur_party"), (assign, ":party_fit_for_battle", reg0), (call_script, "script_party_get_ideal_size", ":cur_party"), (assign, ":ideal_size", reg0), (store_mul, ":relative_strength", ":party_fit_for_battle", 100), (val_div, ":relative_strength", ":ideal_size"), (ge, ":relative_strength", 25), (assign, ":continue", 1), (try_end), (eq, ":continue", 1), (val_add, ":num_men", 1), (troop_get_slot, ":renown", ":cur_troop", slot_troop_renown), (try_begin), (gt, ":renown", "$g_presentation_marshall_selection_max_renown_1"), (assign, "$g_presentation_marshall_selection_max_renown_3", "$g_presentation_marshall_selection_max_renown_2"), (assign, "$g_presentation_marshall_selection_max_renown_2", "$g_presentation_marshall_selection_max_renown_1"), (assign, "$g_presentation_marshall_selection_max_renown_1", ":renown"), (assign, "$g_presentation_marshall_selection_max_renown_3_troop", "$g_presentation_marshall_selection_max_renown_2_troop"), (assign, "$g_presentation_marshall_selection_max_renown_2_troop", "$g_presentation_marshall_selection_max_renown_1_troop"), (assign, "$g_presentation_marshall_selection_max_renown_1_troop", ":cur_troop"), (else_try), (gt, ":renown", "$g_presentation_marshall_selection_max_renown_2"), (assign, "$g_presentation_marshall_selection_max_renown_3", "$g_presentation_marshall_selection_max_renown_2"), (assign, "$g_presentation_marshall_selection_max_renown_2", ":renown"), (assign, "$g_presentation_marshall_selection_max_renown_3_troop", "$g_presentation_marshall_selection_max_renown_2_troop"), (assign, "$g_presentation_marshall_selection_max_renown_2_troop", ":cur_troop"), (else_try), (gt, ":renown", "$g_presentation_marshall_selection_max_renown_3"), (assign, "$g_presentation_marshall_selection_max_renown_3", ":renown"), (assign, "$g_presentation_marshall_selection_max_renown_3_troop", ":cur_troop"), (try_end), (try_end), (ge, "$g_presentation_marshall_selection_max_renown_1_troop", 0), (ge, "$g_presentation_marshall_selection_max_renown_2_troop", 0), (ge, "$g_presentation_marshall_selection_max_renown_3_troop", 0), (gt, ":num_men", 2), #at least 1 voter (assign, "$g_election_date", 0), (assign, "$g_presentation_marshall_selection_ended", 0), (try_begin), (neq, "$g_presentation_marshall_selection_max_renown_1_troop", "trp_player"), (neq, "$g_presentation_marshall_selection_max_renown_2_troop", "trp_player"), (start_presentation, "prsnt_marshall_selection"), (else_try), (jump_to_menu, "mnu_marshall_selection_candidate_ask"), (try_end), ]), # Changing readiness to join army (10, [ (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (assign, ":modifier", 1), (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), (try_begin), (gt, ":party_no", 0), (party_get_slot, ":commander_party", ":party_no", slot_party_commander_party), (ge, ":commander_party", 0), (store_faction_of_party, ":faction_no", ":party_no"), (faction_get_slot, ":faction_marshall", ":faction_no", slot_faction_marshall), (ge, ":faction_marshall", 0), (troop_get_slot, ":marshall_party", ":faction_marshall", slot_troop_leaded_party), (eq, ":commander_party", ":marshall_party"), (assign, ":modifier", -1), (try_end), (troop_get_slot, ":readiness", ":troop_no", slot_troop_readiness_to_join_army), (val_add, ":readiness", ":modifier"), (val_clamp, ":readiness", 0, 100), (troop_set_slot, ":troop_no", slot_troop_readiness_to_join_army, ":readiness"), (assign, ":modifier", 1), (try_begin), (gt, ":party_no", 0), (store_troop_faction, ":troop_faction", ":troop_no"), (eq, ":troop_faction", "fac_player_supporters_faction"), (neg|troop_slot_eq, ":troop_no", slot_troop_player_order_state, spai_undefined), (party_get_slot, ":party_ai_state", ":party_no", slot_party_ai_state), (party_get_slot, ":party_ai_object", ":party_no", slot_party_ai_object), #Check if party is following player orders (try_begin), (troop_slot_eq, ":troop_no", slot_troop_player_order_state, ":party_ai_state"), (troop_slot_eq, ":troop_no", slot_troop_player_order_object, ":party_ai_object"), (assign, ":modifier", -1), (else_try), #Leaving following player orders if the current party order is not the same. (troop_set_slot, ":troop_no", slot_troop_player_order_state, spai_undefined), (troop_set_slot, ":troop_no", slot_troop_player_order_object, -1), (try_end), (try_end), (troop_get_slot, ":readiness", ":troop_no", slot_troop_readiness_to_follow_orders), (val_add, ":readiness", ":modifier"), (val_clamp, ":readiness", 0, 100), (troop_set_slot, ":troop_no", slot_troop_readiness_to_follow_orders, ":readiness"), (try_begin), (lt, ":readiness", 10), (troop_set_slot, ":troop_no", slot_troop_player_order_state, spai_undefined), (troop_set_slot, ":troop_no", slot_troop_player_order_object, -1), (try_end), (try_end), ]), # Process vassal ai (2, [ (call_script, "script_process_kingdom_parties_ai"), ]), # Process alarms (3, [ (call_script, "script_process_alarms"), ]), # Process siege ai (3, [ (store_current_hours, ":cur_hours"), (try_for_range, ":center_no", walled_centers_begin, walled_centers_end), (party_get_slot, ":besieger_party", ":center_no", slot_center_is_besieged_by), (gt, ":besieger_party", 0), (party_is_active, ":besieger_party"), (store_faction_of_party, ":besieger_faction", ":besieger_party"), (party_slot_ge, ":center_no", slot_center_is_besieged_by, 1), (party_get_slot, ":siege_begin_hours", ":center_no", slot_center_siege_begin_hours), (store_sub, ":siege_begin_hours", ":cur_hours", ":siege_begin_hours"), (assign, ":launch_attack", 0), (assign, ":call_attack_back", 0), (assign, ":attacker_strength", 0), (assign, ":marshall_attacking", 0), (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), #(troop_slot_eq, ":troop_no", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":troop_no", slot_troop_prisoner_of_party, 0), (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), (gt, ":party_no", 0), (store_troop_faction, ":troop_faction_no", ":troop_no"), (eq, ":troop_faction_no", ":besieger_faction"), (assign, ":continue", 0), (try_begin), (party_slot_eq, ":party_no", slot_party_ai_state, spai_besieging_center), (party_slot_eq, ":party_no", slot_party_ai_object, ":center_no"), (assign, ":continue", 1), (else_try), (party_get_slot, ":commander_party", ":party_no", slot_party_commander_party), (gt, ":commander_party", 0), (party_is_active, ":commander_party"), (party_slot_eq, ":commander_party", slot_party_ai_state, spai_besieging_center), (party_slot_eq, ":commander_party", slot_party_ai_object, ":center_no"), (assign, ":continue", 1), (try_end), (eq, ":continue", 1), (party_get_battle_opponent, ":opponent", ":party_no"), (this_or_next|lt, ":opponent", 0), (eq, ":opponent", ":center_no"), (try_begin), (faction_slot_eq, ":besieger_faction", slot_faction_marshall, ":troop_no"), (assign, ":marshall_attacking", 1), (try_end), (call_script, "script_party_calculate_regular_strength", ":party_no"), (val_add, ":attacker_strength", reg0), (try_end), (try_begin), (gt, ":attacker_strength", 0), (party_collect_attachments_to_party, ":center_no", "p_collective_enemy"), (call_script, "script_party_calculate_regular_strength", "p_collective_enemy"), (assign, ":defender_strength", reg0), (try_begin), (eq, "$auto_enter_town", ":center_no"), (eq, "$g_player_is_captive", 0), (call_script, "script_party_calculate_regular_strength", "p_main_party"), (val_add, ":defender_strength", reg0), (val_mul, ":attacker_strength", 2), #double the power of attackers if the player is in the campaign (try_end), (party_get_slot, ":siege_hardness", ":center_no", slot_center_siege_hardness), (val_add, ":siege_hardness", 100), (val_mul, ":defender_strength", ":siege_hardness"), (val_div, ":defender_strength", 100), (val_max, ":defender_strength", 1), (try_begin), (eq, ":marshall_attacking", 1), (eq, ":besieger_faction", "$players_kingdom"), (check_quest_active, "qst_follow_army"), (val_mul, ":attacker_strength", 2), #double the power of attackers if the player is in the campaign (try_end), (store_mul, ":strength_ratio", ":attacker_strength", 100), (val_div, ":strength_ratio", ":defender_strength"), (store_sub, ":random_up_limit", ":strength_ratio", 300), (try_begin), (gt, ":random_up_limit", -100), #never attack if the strength ratio is less than 200% (store_div, ":siege_begin_hours_effect", ":siege_begin_hours", 3), (val_add, ":random_up_limit", ":siege_begin_hours_effect"), (try_end), (val_div, ":random_up_limit", 5), (val_max, ":random_up_limit", 0), (store_sub, ":random_down_limit", 200, ":strength_ratio"), (val_max, ":random_down_limit", 0), (try_begin), (store_random_in_range, ":rand", 0, 100), (lt, ":rand", ":random_up_limit"), (gt, ":siege_begin_hours", 24),#initial preparation (assign, ":launch_attack", 1), (else_try), (store_random_in_range, ":rand", 0, 100), (lt, ":rand", ":random_down_limit"), (assign, ":call_attack_back", 1), (try_end), (else_try), (assign, ":call_attack_back", 1), (try_end), (try_begin), (eq, ":launch_attack", 1), (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), #(troop_slot_eq, ":troop_no", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":troop_no", slot_troop_prisoner_of_party, 0), (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), (gt, ":party_no", 0), (assign, ":continue", 0), (try_begin), (party_slot_eq, ":party_no", slot_party_ai_state, spai_besieging_center), (party_slot_eq, ":party_no", slot_party_ai_object, ":center_no"), (party_slot_eq, ":party_no", slot_party_ai_substate, 0), (assign, ":continue", 1), (else_try), (party_get_slot, ":commander_party", ":party_no", slot_party_commander_party), (gt, ":commander_party", 0), (party_is_active, ":commander_party"), (party_slot_eq, ":commander_party", slot_party_ai_state, spai_besieging_center), (party_slot_eq, ":commander_party", slot_party_ai_object, ":center_no"), (call_script, "script_party_set_ai_state", ":party_no", spai_besieging_center, ":center_no"), (assign, ":continue", 1), (try_end), (eq, ":continue", 1), (party_set_ai_behavior, ":party_no", ai_bhvr_attack_party), (party_set_ai_object, ":party_no", ":center_no"), (party_set_flags, ":party_no", pf_default_behavior, 1), (party_set_slot, ":party_no", slot_party_ai_substate, 1), (try_end), (else_try), (eq, ":call_attack_back", 1), (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), #(troop_slot_eq, ":troop_no", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":troop_no", slot_troop_prisoner_of_party, 0), (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), (gt, ":party_no", 0), (party_slot_eq, ":party_no", slot_party_ai_state, spai_besieging_center), (party_slot_eq, ":party_no", slot_party_ai_object, ":center_no"), (party_slot_eq, ":party_no", slot_party_ai_substate, 1), (call_script, "script_party_set_ai_state", ":party_no", spai_undefined, -1), (call_script, "script_party_set_ai_state", ":party_no", spai_besieging_center, ":center_no"), #resetting siege begin time if at least 1 party retreats (party_set_slot, ":center_no", slot_center_siege_begin_hours, ":cur_hours"), (try_end), (try_end), (try_end), ]), # Decide faction ai (36, [ (assign, "$g_recalculate_ais", 1), ]), # Decide faction ai flag check (0, [ (eq, "$g_recalculate_ais", 1), (assign, "$g_recalculate_ais", 0), (call_script, "script_recalculate_ais"), ]), # Count faction armies (24, [ (try_for_range, ":faction_no", kingdoms_begin, kingdoms_end), (call_script, "script_faction_recalculate_strength", ":faction_no"), (try_end), ]), # Reset hero quest status # Change hero relation (36, [ (try_for_range, ":troop_no", heroes_begin, heroes_end), (troop_set_slot, ":troop_no", slot_troop_does_not_give_quest, 0), (try_end), (try_for_range, ":troop_no", village_elders_begin, village_elders_end), (troop_set_slot, ":troop_no", slot_troop_does_not_give_quest, 0), (try_end), ]), # Refresh merchant inventories (24, [ (try_for_range, ":village_no", villages_begin, villages_end), (call_script, "script_refresh_village_merchant_inventory", ":village_no"), (try_end), ]), #Refreshing village defenders #Clearing slot_village_player_can_not_steal_cattle flags (48, [ (try_for_range, ":village_no", villages_begin, villages_end), (call_script, "script_refresh_village_defenders", ":village_no"), (party_set_slot, ":village_no", slot_village_player_can_not_steal_cattle, 0), (try_end), ]), # Refresh number of cattle in villages (24, [(try_for_range, ":village_no", villages_begin, villages_end), (party_get_slot, ":num_cattle", ":village_no", slot_village_number_of_cattle), (store_random_in_range, ":random_no", 0, 100), (try_begin), (lt, ":random_no", 3),#famine (assign, ":num_cattle", 0), (try_begin), # (eq, "$cheat_mode", 1), # (str_store_party_name, s1, ":village_no"), # (display_message, "@Cattle in {s1} are exterminated due to famine."), (try_end), (else_try), (lt, ":random_no", 10),#double growth (store_random_in_range, ":random_no", 111, 121), (val_mul, ":num_cattle", ":random_no"), (val_div, ":num_cattle", 100), (store_random_in_range, ":random_no", 1, 3), (val_add, ":num_cattle", ":random_no"), (else_try), (lt, ":random_no", 50),#negative growth (store_random_in_range, ":random_no", 3, 8), (val_sub, ":num_cattle", ":random_no"), (else_try),#positive growth (store_random_in_range, ":random_no", 101, 111), (val_mul, ":num_cattle", ":random_no"), (val_div, ":num_cattle", 100), (store_random_in_range, ":random_no", 1, 3), (val_add, ":num_cattle", ":random_no"), (try_end), (val_clamp, ":num_cattle", 0, 101), (party_set_slot, ":village_no", slot_village_number_of_cattle, ":num_cattle"), #Reassigning the cattle production in the village (store_sub, ":production", ":num_cattle", 10), (val_div, ":production", 2), (call_script, "script_center_change_trade_good_production", ":village_no", "itm_cattle_meat", ":production", 0), (try_end), ]), # Accumulate taxes (24 * 7, [ (try_for_range, ":center_no", centers_begin, centers_end), (party_get_slot, ":accumulated_rents", ":center_no", slot_center_accumulated_rents), (assign, ":cur_rents", 0), (try_begin), (party_slot_eq, ":center_no", slot_party_type, spt_village), (try_begin), (party_slot_eq, ":center_no", slot_village_state, svs_normal), (assign, ":cur_rents", 500), (try_end), (else_try), (party_slot_eq, ":center_no", slot_party_type, spt_castle), (assign, ":cur_rents", 250), (else_try), (party_slot_eq, ":center_no", slot_party_type, spt_town), (assign, ":cur_rents", 1000), (try_end), (party_get_slot, ":prosperity", ":center_no", slot_town_prosperity), (store_add, ":multiplier", 10, ":prosperity"), (val_mul, ":cur_rents", ":multiplier"), (val_div, ":cur_rents", 110),#Prosperity of 100 gives the default values (val_add, ":accumulated_rents", ":cur_rents"), (party_set_slot, ":center_no", slot_center_accumulated_rents, ":accumulated_rents"), (try_end), #Adding earnings to town lords' wealths. (try_for_range, ":center_no", centers_begin, centers_end), (party_get_slot, ":town_lord", ":center_no", slot_town_lord), (neq, ":town_lord", "trp_player"), (is_between, ":town_lord", kingdom_heroes_begin, kingdom_heroes_end), (party_get_slot, ":accumulated_rents", ":center_no", slot_center_accumulated_rents), (party_get_slot, ":accumulated_tariffs", ":center_no", slot_center_accumulated_tariffs), (troop_get_slot, ":troop_wealth", ":town_lord", slot_troop_wealth), (val_add, ":troop_wealth", ":accumulated_rents"), (val_add, ":troop_wealth", ":accumulated_tariffs"), (troop_set_slot, ":town_lord", slot_troop_wealth, ":troop_wealth"), (party_set_slot, ":center_no", slot_center_accumulated_rents, 0), (party_set_slot, ":center_no", slot_center_accumulated_tariffs, 0), (try_begin), (eq, "$cheat_mode", 1), (assign, reg1, ":troop_wealth"), (add_troop_note_from_sreg, ":town_lord", 1, "@Current wealth: {reg1}", 0), (try_end), (try_end), ]), # (7 * 24, # [ ## (call_script, "script_get_number_of_unclaimed_centers_by_player"), ## (assign, ":unclaimed_centers", reg0), ## (gt, ":unclaimed_centers", 0), # You are holding an estate without a lord. # (try_for_range, ":troop_no", heroes_begin, heroes_end), # (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), # (troop_get_slot, ":relation", ":troop_no", slot_troop_player_relation), # (val_sub, ":relation", 1), # (val_max, ":relation", -100), # (troop_set_slot, ":troop_no", slot_troop_player_relation, ":relation"), # (try_end), # You relation with all kingdoms other than your own has decreased by 1. # (try_for_range, ":faction_no", kingdoms_begin, kingdoms_end), # (neq, ":faction_no", "$players_kingdom"), # (store_relation,":faction_relation",":faction_no","fac_player_supporters_faction"), # (val_sub, ":faction_relation", 1), # (val_max, ":faction_relation", -100), # WARNING: Never use set_relation! # (set_relation, ":faction_no", "fac_player_supporters_faction", ":faction_relation"), # (try_end), # ]), # Offer player to join faction (32, [ (eq, "$players_kingdom", 0), (le, "$g_invite_faction", 0), (eq, "$g_player_is_captive", 0), (store_random_in_range, ":kingdom_no", kingdoms_begin, kingdoms_end), (assign, ":min_distance", 999999), (try_for_range, ":center_no", walled_centers_begin, walled_centers_end), (store_faction_of_party, ":center_faction", ":center_no"), (eq, ":center_faction", ":kingdom_no"), (store_distance_to_party_from_party, ":cur_distance", "p_main_party", ":center_no"), (val_min, ":min_distance", ":cur_distance"), (try_end), (lt, ":min_distance", 30), (store_relation, ":kingdom_relation", ":kingdom_no", "fac_player_supporters_faction"), (faction_get_slot, ":kingdom_lord", ":kingdom_no", slot_faction_leader), (call_script, "script_troop_get_player_relation", ":kingdom_lord"), (assign, ":lord_relation", reg0), #(troop_get_slot, ":lord_relation", ":kingdom_lord", slot_troop_player_relation), (call_script, "script_get_number_of_hero_centers", "trp_player"), (assign, ":num_centers_owned", reg0), (try_begin), (eq, ":num_centers_owned", 0), (troop_get_slot, ":player_renown", "trp_player", slot_troop_renown), (ge, ":player_renown", 160), (ge, ":kingdom_relation", 0), (ge, ":lord_relation", 0), (store_random_in_range, ":rand", 0, 100), (lt, ":rand", 50), (call_script, "script_get_poorest_village_of_faction", ":kingdom_no"), (assign, "$g_invite_offered_center", reg0), (ge, "$g_invite_offered_center", 0), (assign, "$g_invite_faction", ":kingdom_no"), (jump_to_menu, "mnu_invite_player_to_faction"), (else_try), (gt, ":num_centers_owned", 0), (neq, "$players_oath_renounced_against_kingdom", ":kingdom_no"), (ge, ":kingdom_relation", -80), (ge, ":lord_relation", -30), (store_random_in_range, ":rand", 0, 100), (lt, ":rand", 20), (assign, "$g_invite_faction", ":kingdom_no"), (assign, "$g_invite_offered_center", -1), (jump_to_menu, "mnu_invite_player_to_faction_without_center"), (try_end), ]), # Change kingdom relations (24 * 7, [(call_script, "script_randomly_start_war_peace", 1), ]), # During rebellion, removing troops from player faction randomly because of low relation points (5, [ (gt, "$supported_pretender", 0), (try_for_range, ":cur_troop", kingdom_heroes_begin, kingdom_heroes_end), (store_troop_faction, ":cur_faction", ":cur_troop"), (eq, ":cur_faction", "fac_player_supporters_faction"), (neg|troop_slot_ge, ":cur_troop", slot_troop_change_to_faction, 1), (call_script, "script_troop_get_player_relation", ":cur_troop"), (assign, ":player_relation", reg0), #(troop_get_slot, ":player_relation", ":cur_troop", slot_troop_player_relation), (lt, ":player_relation", -5), (neq, "$supported_pretender", ":cur_troop"), (val_mul, ":player_relation", -1), (val_sub, ":player_relation", 5), (store_random_in_range, ":random_no", 0, 2000), (lt, ":random_no", ":player_relation"), (call_script, "script_cf_get_random_active_faction_except_player_faction_and_faction", -1), (troop_set_slot, ":cur_troop", slot_troop_change_to_faction, reg0), (try_end), ]), # Reset kingdom lady current centers ## (28, ## [ ## (try_for_range, ":troop_no", heroes_begin, heroes_end), ## (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_lady), ## ## # Find the active quest ladies ## (assign, ":not_ok", 0), ## (try_for_range, ":quest_no", lord_quests_begin, lord_quests_end), ## (eq, ":not_ok", 0), ## (check_quest_active, ":quest_no"), ## (quest_slot_eq, ":quest_no", slot_quest_object_troop, ":troop_no"), ## (assign, ":not_ok", 1), ## (try_end), ## (eq, ":not_ok", 0), ## ## (troop_get_slot, ":troop_center", ":troop_no", slot_troop_cur_center), ## (assign, ":is_under_siege", 0), ## (try_begin), ## (is_between, ":troop_center", walled_centers_begin, walled_centers_end), ## (party_get_battle_opponent, ":besieger_party", ":troop_center"), ## (gt, ":besieger_party", 0), ## (assign, ":is_under_siege", 1), ## (try_end), ## ## (eq, ":is_under_siege", 0),# Omit ladies in centers under siege ## ## (try_begin), ## (store_random_in_range, ":random_num",0, 100), ## (lt, ":random_num", 20), ## (store_troop_faction, ":cur_faction", ":troop_no"), ## (call_script, "script_cf_select_random_town_with_faction", ":cur_faction"),#Can fail ## (troop_set_slot, ":troop_no", slot_troop_cur_center, reg0), ## (try_end), ## ## (store_random_in_range, ":random_num",0, 100), ## (lt, ":random_num", 50), ## (troop_get_slot, ":lord_no", ":troop_no", slot_troop_father), ## (try_begin), ## (eq, ":lord_no", 0), ## (troop_get_slot, ":lord_no", ":troop_no", slot_troop_spouse), ## (try_end), ## (gt, ":lord_no", 0), ## (troop_get_slot, ":cur_party", ":lord_no", slot_troop_leaded_party), ## (gt, ":cur_party", 0), ## (party_get_attached_to, ":cur_center", ":cur_party"), ## (gt, ":cur_center", 0), ## ## (troop_set_slot, ":troop_no", slot_troop_cur_center, ":cur_center"), ## (try_end), ## ]), # Attach Lord Parties to the town they are in (0.1, [ (try_for_range, ":troop_no", heroes_begin, heroes_end), (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), (troop_get_slot, ":troop_party_no", ":troop_no", slot_troop_leaded_party), (ge, ":troop_party_no", 1), (party_get_attached_to, ":cur_attached_town", ":troop_party_no"), (lt, ":cur_attached_town", 1), (party_get_cur_town, ":destination", ":troop_party_no"), (is_between, ":destination", centers_begin, centers_end), (call_script, "script_get_relation_between_parties", ":destination", ":troop_party_no"), (try_begin), (ge, reg0, 0), (party_attach_to_party, ":troop_party_no", ":destination"), (else_try), (party_set_ai_behavior, ":troop_party_no", ai_bhvr_hold), (try_end), (try_begin), (this_or_next|party_slot_eq, ":destination", slot_party_type, spt_town), (party_slot_eq, ":destination", slot_party_type, spt_castle), (store_faction_of_party, ":troop_faction_no", ":troop_party_no"), (store_faction_of_party, ":destination_faction_no", ":destination"), (eq, ":troop_faction_no", ":destination_faction_no"), (party_get_num_prisoner_stacks, ":num_stacks", ":troop_party_no"), (gt, ":num_stacks", 0), (assign, "$g_move_heroes", 1), (call_script, "script_party_prisoners_add_party_prisoners", ":destination", ":troop_party_no"),#Moving prisoners to the center (assign, "$g_move_heroes", 1), (call_script, "script_party_remove_all_prisoners", ":troop_party_no"), (try_end), (try_end), ]), # Check escape chances of hero prisoners. (48, [ (call_script, "script_randomly_make_prisoner_heroes_escape_from_party", "p_main_party", 50), (try_for_range, ":center_no", walled_centers_begin, walled_centers_end), ## (party_slot_eq, ":center_no", slot_town_lord, "trp_player"), (assign, ":chance", 30), (try_begin), (party_slot_eq, ":center_no", slot_center_has_prisoner_tower, 1), (assign, ":chance", 5), (try_end), (call_script, "script_randomly_make_prisoner_heroes_escape_from_party", ":center_no", ":chance"), (try_end), ]), # Asking the ownership of captured centers to the player (3, [ (assign, "$g_center_taken_by_player_faction", -1), (try_for_range, ":center_no", centers_begin, centers_end), (eq, "$g_center_taken_by_player_faction", -1), (store_faction_of_party, ":center_faction", ":center_no"), (eq, ":center_faction", "fac_player_supporters_faction"), (this_or_next|party_slot_eq, ":center_no", slot_town_lord, stl_reserved_for_player), (this_or_next|party_slot_eq, ":center_no", slot_town_lord, stl_unassigned), (party_slot_eq, ":center_no", slot_town_lord, stl_rejected_by_player), (assign, "$g_center_taken_by_player_faction", ":center_no"), (try_end), (ge, "$g_center_taken_by_player_faction", 0), (faction_get_slot, ":leader", "fac_player_supporters_faction", slot_faction_leader), (start_map_conversation, ":leader"), ]), # Respawn hero party after kingdom hero is released from captivity. (48, [ (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), #(troop_slot_eq, ":troop_no", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":troop_no", slot_troop_prisoner_of_party, 0), (neg|troop_slot_ge, ":troop_no", slot_troop_leaded_party, 1), (store_troop_faction, ":cur_faction", ":troop_no"), (try_begin), (call_script, "script_cf_select_random_walled_center_with_faction_and_owner_priority_no_siege", ":cur_faction", ":troop_no"),#Can fail (assign, ":center_no", reg0), (call_script, "script_create_kingdom_hero_party", ":troop_no", ":center_no"), (party_attach_to_party, "$pout_party", ":center_no"), (else_try), (neg|faction_slot_eq, ":cur_faction", slot_faction_state, sfs_active), (try_begin), (is_between, ":troop_no", kings_begin, kings_end), (troop_set_slot, ":troop_no", slot_troop_change_to_faction, "fac_commoners"), (else_try), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", 10), (call_script, "script_cf_get_random_active_faction_except_player_faction_and_faction", ":cur_faction"), (troop_set_slot, ":troop_no", slot_troop_change_to_faction, reg0), (try_end), (try_end), (try_end), ]), # Spawn merchant caravan parties ## (3, ## [ ## (try_for_range, ":troop_no", merchants_begin, merchants_end), ## (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_merchant), ## (troop_slot_eq, ":troop_no", slot_troop_is_prisoner, 0), ## (neg|troop_slot_ge, ":troop_no", slot_troop_leaded_party, 1), ## ## (call_script, "script_cf_create_merchant_party", ":troop_no"), ## (try_end), ## ]), # Spawn village farmer parties (24, [ (try_for_range, ":village_no", villages_begin, villages_end), (party_slot_eq, ":village_no", slot_village_state, svs_normal), (party_get_slot, ":farmer_party", ":village_no", slot_village_farmer_party), (this_or_next|eq, ":farmer_party", 0), (neg|party_is_active, ":farmer_party"), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", 30), (call_script, "script_create_village_farmer_party", ":village_no"), (party_set_slot, ":village_no", slot_village_farmer_party, reg0), # (str_store_party_name, s1, ":village_no"), # (display_message, "@Village farmers created at {s1}."), (try_end), ]), (72, [ # Updating trade good prices according to the productions (call_script, "script_update_trade_good_prices"), # Updating player odds (try_for_range, ":cur_center", centers_begin, centers_end), (party_get_slot, ":player_odds", ":cur_center", slot_town_player_odds), (try_begin), (gt, ":player_odds", 1000), (val_mul, ":player_odds", 95), (val_div, ":player_odds", 100), (val_max, ":player_odds", 1000), (else_try), (lt, ":player_odds", 1000), (val_mul, ":player_odds", 105), (val_div, ":player_odds", 100), (val_min, ":player_odds", 1000), (try_end), (party_set_slot, ":cur_center", slot_town_player_odds, ":player_odds"), (try_end), ]), #Troop AI: Merchants thinking (8, [ (try_for_parties, ":party_no"), (party_slot_eq, ":party_no", slot_party_type, spt_kingdom_caravan), (party_is_in_any_town, ":party_no"), (store_faction_of_party, ":merchant_faction", ":party_no"), (faction_get_slot, ":num_towns", ":merchant_faction", slot_faction_num_towns), (try_begin), (le, ":num_towns", 0), (remove_party, ":party_no"), (else_try), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", 35), (party_get_cur_town, ":cur_center", ":party_no"), (assign, ":can_leave", 1), (try_begin), (is_between, ":cur_center", walled_centers_begin, walled_centers_end), (neg|party_slot_eq, ":cur_center", slot_center_is_besieged_by, -1), (assign, ":can_leave", 0), (try_end), (eq, ":can_leave", 1), (assign, ":do_trade", 0), (try_begin), (party_get_slot, ":cur_ai_state", ":party_no", slot_party_ai_state), (eq, ":cur_ai_state", spai_trading_with_town), (party_get_slot, ":cur_ai_object", ":party_no", slot_party_ai_object), (eq, ":cur_center", ":cur_ai_object"), (assign, ":do_trade", 1), (try_end), (assign, ":target_center", -1), (try_begin), #Make sure escorted caravan continues to its original destination. (eq, "$caravan_escort_party_id", ":party_no"), (neg|party_is_in_town, ":party_no", "$caravan_escort_destination_town"), (assign, ":target_center", "$caravan_escort_destination_town"), (else_try), (call_script, "script_cf_select_random_town_at_peace_with_faction_in_trade_route", ":cur_center", ":merchant_faction"), (assign, ":target_center", reg0), (try_end), (is_between, ":target_center", towns_begin, towns_end), (neg|party_is_in_town, ":party_no", ":target_center"), (try_begin), (eq, ":do_trade", 1), (call_script, "script_do_merchant_town_trade", ":party_no", ":cur_center"), (try_end), (party_set_ai_behavior, ":party_no", ai_bhvr_travel_to_party), (party_set_ai_object, ":party_no", ":target_center"), (party_set_flags, ":party_no", pf_default_behavior, 0), (party_set_slot, ":party_no", slot_party_ai_state, spai_trading_with_town), (party_set_slot, ":party_no", slot_party_ai_object, ":target_center"), (try_end), (try_end), ]), #Troop AI: Village farmers thinking (8, [ (try_for_parties, ":party_no"), (party_slot_eq, ":party_no", slot_party_type, spt_village_farmer), (party_is_in_any_town, ":party_no"), (party_get_slot, ":home_center", ":party_no", slot_party_home_center), (party_get_cur_town, ":cur_center", ":party_no"), (assign, ":can_leave", 1), (try_begin), (is_between, ":cur_center", walled_centers_begin, walled_centers_end), (neg|party_slot_eq, ":cur_center", slot_center_is_besieged_by, -1), (assign, ":can_leave", 0), (try_end), (eq, ":can_leave", 1), (try_begin), (eq, ":cur_center", ":home_center"), (try_begin), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", 5), (call_script, "script_do_party_center_trade", ":party_no", ":home_center", 50), (assign, ":total_change", reg0), (party_get_slot, ":prosperity", ":home_center", slot_town_prosperity), (val_add, ":prosperity", 30), (val_mul, ":total_change", ":prosperity"), (val_div, ":total_change", 2600), #(30 + prosperity) / 130 * 5% of the sales. #Adding tax revenue to the center (party_get_slot, ":accumulated_tariffs", ":home_center", slot_center_accumulated_tariffs), (val_add, ":accumulated_tariffs", ":total_change"), (party_set_slot, ":home_center", slot_center_accumulated_tariffs, ":accumulated_tariffs"), #Moving farmers to the home town (party_get_slot, ":market_town", ":home_center", slot_village_market_town), (party_set_slot, ":party_no", slot_party_ai_object, ":market_town"), (party_set_slot, ":party_no", slot_party_ai_state, spai_trading_with_town), (party_set_ai_behavior, ":party_no", ai_bhvr_travel_to_party), (party_set_ai_object, ":party_no", ":market_town"), ## (try_begin), ## (eq, "$cheat_mode", 1), ## (str_store_party_name, s1, ":home_center"), ## (assign, reg1, ":total_change"), ## (display_message, "@Village farmers traded with {s1} merchants. Tax={reg1}"), ## (try_end), (try_end), (else_try), (try_begin), (party_get_slot, ":cur_ai_object", ":party_no", slot_party_ai_object), (eq, ":cur_center", ":cur_ai_object"), (call_script, "script_do_party_center_trade", ":party_no", ":cur_ai_object", 10), (assign, ":total_change", reg0), (party_get_slot, ":prosperity", ":cur_ai_object", slot_town_prosperity), (val_add, ":prosperity", 30), (val_mul, ":total_change", ":prosperity"), (val_div, ":total_change", 2600), #(30 + prosperity) / 130 * 5% of the sales. #Adding tax revenue to the center (party_get_slot, ":accumulated_tariffs", ":cur_ai_object", slot_center_accumulated_tariffs), (val_add, ":accumulated_tariffs", ":total_change"), (party_set_slot, ":cur_ai_object", slot_center_accumulated_tariffs, ":accumulated_tariffs"), #Adding tax revenue to the home center (party_get_slot, ":accumulated_tariffs", ":home_center", slot_center_accumulated_tariffs), (val_add, ":accumulated_tariffs", ":total_change"), (party_set_slot, ":home_center", slot_center_accumulated_tariffs, ":accumulated_tariffs"), #Increasing food stocks of the town (party_get_slot, ":town_food_store", ":cur_ai_object", slot_party_food_store), (call_script, "script_center_get_food_store_limit", ":cur_ai_object"), (assign, ":food_store_limit", reg0), (val_add, ":town_food_store", 1000), (val_min, ":town_food_store", ":food_store_limit"), (party_set_slot, ":cur_ai_object", slot_party_food_store, ":town_food_store"), #Adding 1 to village prosperity (try_begin), (store_random_in_range, ":rand", 0, 100), (lt, ":rand", 35), (call_script, "script_change_center_prosperity", ":home_center", 1), (try_end), (try_end), #Moving farmers to their home village (party_set_slot, ":party_no", slot_party_ai_object, ":home_center"), (party_set_slot, ":party_no", slot_party_ai_state, spai_trading_with_town), (party_set_ai_behavior, ":party_no", ai_bhvr_travel_to_party), (party_set_ai_object, ":party_no", ":home_center"), ## (try_begin), ## (eq, "$cheat_mode", 1), ## (str_store_party_name, s1, ":cur_ai_object"), ## (assign, reg1, ":total_change"), ## (display_message, "@Village farmers traded with {s1} merchants. Tax={reg1} to both sides"), ## (try_end), (try_end), (try_end), ]), #Increase castle food stores (2, [ (try_for_range, ":center_no", castles_begin, castles_end), (party_slot_eq, ":center_no", slot_center_is_besieged_by, -1), #castle is not under siege (party_get_slot, ":center_food_store", ":center_no", slot_party_food_store), (val_add, ":center_food_store", 100), (call_script, "script_center_get_food_store_limit", ":center_no"), (assign, ":food_store_limit", reg0), (val_min, ":center_food_store", ":food_store_limit"), (party_set_slot, ":center_no", slot_party_food_store, ":center_food_store"), (try_end), ]), #cache party strengths (to avoid re-calculating) ## (2, ## [ ## (try_for_range, ":cur_troop", heroes_begin, heroes_end), ## (troop_slot_eq, ":cur_troop", slot_troop_occupation, slto_kingdom_hero), ## (troop_get_slot, ":cur_party", ":cur_troop", slot_troop_leaded_party), ## (ge, ":cur_party", 0), ## (call_script, "script_party_calculate_strength", ":cur_party", 0), #will update slot_party_cached_strength ## (try_end), ## ]), ## ## (6, ## [ ## (try_for_range, ":cur_center", walled_centers_begin, walled_centers_end), ## (call_script, "script_party_calculate_strength", ":cur_center", 0), #will update slot_party_cached_strength ## (try_end), ## ]), ## (1, ## [ ## (try_for_range, ":cur_center", walled_centers_begin, walled_centers_end), ## (store_random_in_range, ":rand", 0, 100), ## (lt, ":rand", 10), ## (store_faction_of_party, ":center_faction", ":cur_center"), ## (assign, ":friend_strength", 0), ## (try_for_range, ":cur_troop", heroes_begin, heroes_end), ## (troop_slot_eq, ":cur_troop", slot_troop_occupation, slto_kingdom_hero), ## (troop_get_slot, ":cur_troop_party", ":cur_troop", slot_troop_leaded_party), ## (gt, ":cur_troop_party", 0), ## (store_distance_to_party_from_party, ":distance", ":cur_troop_party", ":cur_center"), ## (lt, ":distance", 10), ## (store_troop_faction, ":army_faction", ":cur_troop"), ## (store_relation, ":rel", ":army_faction", ":center_faction"), ## (try_begin), ## (gt, ":rel", 10), ## (party_get_slot, ":str", ":cur_troop_party", slot_party_cached_strength), ## (val_add, ":friend_strength", ":str"), ## (try_end), ## (try_end), ## (party_set_slot, ":cur_center", slot_party_nearby_friend_strength, ":friend_strength"), ## (try_end), ## ]), # Make heroes running away from someone retreat to friendly centers (0.5, [ (try_for_range, ":cur_troop", heroes_begin, heroes_end), (troop_slot_eq, ":cur_troop", slot_troop_occupation, slto_kingdom_hero), (troop_get_slot, ":cur_party", ":cur_troop", slot_troop_leaded_party), (gt, ":cur_party", 0), (try_begin), (party_is_active, ":cur_party"), (try_begin), (get_party_ai_current_behavior, ":ai_bhvr", ":cur_party"), (eq, ":ai_bhvr", ai_bhvr_avoid_party), (store_faction_of_party, ":party_faction", ":cur_party"), (party_get_slot, ":commander_party", ":cur_party", slot_party_commander_party), (faction_get_slot, ":faction_marshall", ":party_faction", slot_faction_marshall), (neq, ":faction_marshall", ":cur_troop"), (assign, ":continue", 1), (try_begin), (ge, ":faction_marshall", 0), (troop_get_slot, ":faction_marshall_party", ":faction_marshall", slot_troop_leaded_party), (ge, ":faction_marshall_party", 0), (eq, ":commander_party", ":faction_marshall_party"), (assign, ":continue", 0), (try_end), (eq, ":continue", 1), (assign, ":done", 0), (try_for_range, ":cur_center", walled_centers_begin, walled_centers_end), (eq, ":done", 0), (party_slot_eq, ":cur_center", slot_center_is_besieged_by, -1), (store_faction_of_party, ":center_faction", ":cur_center"), (store_relation, ":cur_relation", ":center_faction", ":party_faction"), (gt, ":cur_relation", 0), (store_distance_to_party_from_party, ":cur_distance", ":cur_party", ":cur_center"), (lt, ":cur_distance", 20), (party_get_position, pos1, ":cur_party"), (party_get_position, pos2, ":cur_center"), (neg|position_is_behind_position, pos2, pos1), (call_script, "script_party_set_ai_state", ":cur_party", spai_retreating_to_center, ":cur_center"), (assign, ":done", 1), (try_end), (try_end), (else_try), (troop_set_slot, ":cur_troop", slot_troop_leaded_party, -1), (try_end), (try_end), ]), # Centers give alarm if the player is around (0.5, [ (store_current_hours, ":cur_hours"), (store_mod, ":cur_hours_mod", ":cur_hours", 11), (store_sub, ":hour_limit", ":cur_hours", 5), (party_get_num_companions, ":num_men", "p_main_party"), (party_get_num_prisoners, ":num_prisoners", "p_main_party"), (val_add, ":num_men", ":num_prisoners"), (convert_to_fixed_point, ":num_men"), (store_sqrt, ":num_men_effect", ":num_men"), (convert_from_fixed_point, ":num_men_effect"), (try_begin), (eq, ":cur_hours_mod", 0), #Reduce alarm by 2 in every 11 hours. (try_for_range, ":cur_faction", kingdoms_begin, kingdoms_end), (faction_get_slot, ":player_alarm", ":cur_faction", slot_faction_player_alarm), (val_sub, ":player_alarm", 1), (val_max, ":player_alarm", 0), (faction_set_slot, ":cur_faction", slot_faction_player_alarm, ":player_alarm"), (try_end), (try_end), (eq, "$g_player_is_captive", 0), (try_for_range, ":cur_center", centers_begin, centers_end), (store_faction_of_party, ":cur_faction", ":cur_center"), (store_relation, ":reln", ":cur_faction", "fac_player_supporters_faction"), (lt, ":reln", 0), (store_distance_to_party_from_party, ":dist", "p_main_party", ":cur_center"), (lt, ":dist", 5), (store_mul, ":dist_sqr", ":dist", ":dist"), (store_sub, ":dist_effect", 20, ":dist_sqr"), (store_sub, ":reln_effect", 20, ":reln"), (store_mul, ":total_effect", ":dist_effect", ":reln_effect"), (val_mul, ":total_effect", ":num_men_effect"), (store_div, ":spot_chance", ":total_effect", 10), (store_random_in_range, ":random_spot", 0, 1000), (lt, ":random_spot", ":spot_chance"), (faction_get_slot, ":player_alarm", ":cur_faction", slot_faction_player_alarm), (val_add, ":player_alarm", 1), (val_min, ":player_alarm", 100), (faction_set_slot, ":cur_faction", slot_faction_player_alarm, ":player_alarm"), (try_begin), (neg|party_slot_ge, ":cur_center", slot_center_last_player_alarm_hour, ":hour_limit"), (str_store_party_name_link, s1, ":cur_center"), (display_message, "@Your party is spotted by {s1}."), (party_set_slot, ":cur_center", slot_center_last_player_alarm_hour, ":cur_hours"), (try_end), (try_end), ]), # Consuming food at every 14 hours (14, [#(store_sub, ":num_food", food_end, food_begin), (eq, "$g_player_is_captive", 0), (party_get_num_companion_stacks, ":num_stacks","p_main_party"), (assign, ":num_men", 0), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_stack_get_size, ":stack_size","p_main_party",":i_stack"), (val_add, ":num_men", ":stack_size"), (try_end), (val_div, ":num_men", 3), (try_begin), (eq, ":num_men", 0), (val_add, ":num_men", 1), (try_end), (assign, ":consumption_amount", ":num_men"), (assign, ":no_food_displayed", 0), (try_for_range, ":unused", 0, ":consumption_amount"), (assign, ":available_food", 0), (try_for_range, ":cur_food", food_begin, food_end), (item_set_slot, ":cur_food", slot_item_is_checked, 0), (call_script, "script_cf_player_has_item_without_modifier", ":cur_food", imod_rotten), (val_add, ":available_food", 1), (try_end), (try_begin), (gt, ":available_food", 0), (store_random_in_range, ":selected_food", 0, ":available_food"), (call_script, "script_consume_food", ":selected_food"), (else_try), (eq, ":no_food_displayed", 0), (display_message, "@Party has nothing to eat!", 0xFF0000), (call_script, "script_change_player_party_morale", -3), (assign, ":no_food_displayed", 1), #NPC companion changes begin (try_begin), (call_script, "script_party_count_fit_regulars", "p_main_party"), (gt, reg0, 0), (call_script, "script_objectionable_action", tmt_egalitarian, "str_men_hungry"), (try_end), #NPC companion changes end (try_end), (try_end), ]), # Setting item modifiers for food (24, [ (troop_get_inventory_capacity, ":inv_size", "trp_player"), (try_for_range, ":i_slot", 0, ":inv_size"), (troop_get_inventory_slot, ":item_id", "trp_player", ":i_slot"), (eq, ":item_id", "itm_cattle_meat"), (troop_get_inventory_slot_modifier, ":modifier", "trp_player", ":i_slot"), (try_begin), (ge, ":modifier", imod_fresh), (lt, ":modifier", imod_rotten), (val_add, ":modifier", 1), (troop_set_inventory_slot_modifier, "trp_player", ":i_slot", ":modifier"), (else_try), (lt, ":modifier", imod_fresh), (troop_set_inventory_slot_modifier, "trp_player", ":i_slot", imod_fresh), (try_end), (try_end), ]), # Assigning lords to centers with no leaders (72, [(call_script, "script_assign_lords_to_empty_centers"), ]), # Updating player icon in every frame (0, [(troop_get_inventory_slot, ":cur_horse", "trp_player", 8), #horse slot (assign, ":new_icon", -1), (try_begin), (eq, "$g_player_icon_state", pis_normal), (try_begin), (ge, ":cur_horse", 0), (assign, ":new_icon", "icon_player_horseman"), (else_try), (assign, ":new_icon", "icon_player"), (try_end), (else_try), (eq, "$g_player_icon_state", pis_camping), (assign, ":new_icon", "icon_camp"), (else_try), (eq, "$g_player_icon_state", pis_ship), (assign, ":new_icon", "icon_ship"), (try_end), (neq, ":new_icon", "$g_player_party_icon"), (assign, "$g_player_party_icon", ":new_icon"), (party_set_icon, "p_main_party", ":new_icon"), ]), #Update how good a target player is for bandits (2, [ (store_troop_gold, ":total_value", "trp_player"), (store_div, ":bandit_attraction", ":total_value", (10000/100)), #10000 gold = excellent_target (troop_get_inventory_capacity, ":inv_size", "trp_player"), (try_for_range, ":i_slot", 0, ":inv_size"), (troop_get_inventory_slot, ":item_id", "trp_player", ":i_slot"), (ge, ":item_id", 0), (try_begin), (is_between, ":item_id", trade_goods_begin, trade_goods_end), (store_item_value, ":item_value", ":item_id"), (val_add, ":total_value", ":item_value"), (try_end), (try_end), (val_clamp, ":bandit_attraction", 0, 100), (party_set_bandit_attraction, "p_main_party", ":bandit_attraction"), ]), # Checking escape chances of prisoners that joined the party recently. (6, [(gt, "$g_prisoner_recruit_troop_id", 0), (gt, "$g_prisoner_recruit_size", 0), (gt, "$g_prisoner_recruit_last_time", 0), (is_currently_night), (try_begin), (store_skill_level, ":leadership", "skl_leadership", "trp_player"), (val_mul, ":leadership", 5), (store_sub, ":chance", 66, ":leadership"), (gt, ":chance", 0), (assign, ":num_escaped", 0), (try_for_range, ":unused", 0, "$g_prisoner_recruit_size"), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", ":chance"), (val_add, ":num_escaped", 1), (try_end), (party_remove_members, "p_main_party", "$g_prisoner_recruit_troop_id", ":num_escaped"), (assign, ":num_escaped", reg0), (gt, ":num_escaped", 0), (try_begin), (gt, ":num_escaped", 1), (assign, reg2, 1), (else_try), (assign, reg2, 0), (try_end), (assign, reg1, ":num_escaped"), (str_store_troop_name_by_count, s1, "$g_prisoner_recruit_troop_id", ":num_escaped"), (display_log_message, "@{reg1} {s1} {reg2?have:has} escaped from your party during the night."), (try_end), (assign, "$g_prisoner_recruit_troop_id", 0), (assign, "$g_prisoner_recruit_size", 0), ]), # Offering ransom fees for player's prisoner heroes (24, [(neq, "$g_ransom_offer_rejected", 1), (call_script, "script_offer_ransom_amount_to_player_for_prisoners_in_party", "p_main_party"), (eq, reg0, 0),#no prisoners offered (assign, ":end_cond", walled_centers_end), (try_for_range, ":center_no", walled_centers_begin, ":end_cond"), (party_slot_eq, ":center_no", slot_town_lord, "trp_player"), (call_script, "script_offer_ransom_amount_to_player_for_prisoners_in_party", ":center_no"), (eq, reg0, 1),#a prisoner is offered (assign, ":end_cond", 0),#break (try_end), ]), # Exchanging hero prisoners between factions and clearing old ransom offers (72, [(assign, "$g_ransom_offer_rejected", 0), (try_for_range, ":center_no", walled_centers_begin, walled_centers_end), (party_get_slot, ":town_lord", ":center_no", slot_town_lord), (gt, ":town_lord", 0), (party_get_num_prisoner_stacks, ":num_stacks", ":center_no"), (try_for_range_backwards, ":i_stack", 0, ":num_stacks"), (party_prisoner_stack_get_troop_id, ":stack_troop", ":center_no", ":i_stack"), (troop_is_hero, ":stack_troop"), (troop_slot_eq, ":stack_troop", slot_troop_occupation, slto_kingdom_hero), (store_random_in_range, ":random_no", 0, 100), (try_begin), (le, ":random_no", 10), (call_script, "script_calculate_ransom_amount_for_troop", ":stack_troop"), (assign, ":ransom_amount", reg0), (troop_get_slot, ":wealth", ":town_lord", slot_troop_wealth), (val_add, ":wealth", ":ransom_amount"), (troop_set_slot, ":town_lord", slot_troop_wealth, ":wealth"), (party_remove_prisoners, ":center_no", ":stack_troop", 1), (call_script, "script_remove_troop_from_prison", ":stack_troop"), (store_troop_faction, ":faction_no", ":town_lord"), (store_troop_faction, ":troop_faction", ":stack_troop"), (str_store_troop_name, s1, ":stack_troop"), (str_store_faction_name, s2, ":faction_no"), (str_store_faction_name, s3, ":troop_faction"), (display_log_message, "@{s1} of {s3} has been released from captivity."), (try_end), (try_end), (try_end), ]), # Adding mercenary troops to the towns (72, [(call_script, "script_update_mercenary_units_of_towns"), #NPC changes begin # removes (call_script, "script_update_companion_candidates_in_taverns"), #NPC changes end (call_script, "script_update_ransom_brokers"), (call_script, "script_update_tavern_travelers"), (call_script, "script_update_tavern_minstels"), (call_script, "script_update_booksellers"), (call_script, "script_update_villages_infested_by_bandits"), (try_for_range, ":village_no", villages_begin, villages_end), (call_script, "script_update_volunteer_troops_in_village", ":village_no"), (call_script, "script_update_npc_volunteer_troops_in_village", ":village_no"), (try_end), ]), # Setting random walker types (36, [(try_for_range, ":center_no", centers_begin, centers_end), (this_or_next|party_slot_eq, ":center_no", slot_party_type, spt_town), ( party_slot_eq, ":center_no", slot_party_type, spt_village), (call_script, "script_center_remove_walker_type_from_walkers", ":center_no", walkert_needs_money), (call_script, "script_center_remove_walker_type_from_walkers", ":center_no", walkert_needs_money_helped), (store_random_in_range, ":rand", 0, 100), (try_begin), (lt, ":rand", 70), (neg|party_slot_ge, ":center_no", slot_town_prosperity, 60), (call_script, "script_cf_center_get_free_walker", ":center_no"), (call_script, "script_center_set_walker_to_type", ":center_no", reg0, walkert_needs_money), (try_end), (try_end), ]), # Checking center upgrades (12, [(try_for_range, ":center_no", centers_begin, centers_end), (party_get_slot, ":cur_improvement", ":center_no", slot_center_current_improvement), (gt, ":cur_improvement", 0), (party_get_slot, ":cur_improvement_end_time", ":center_no", slot_center_improvement_end_hour), (store_current_hours, ":cur_hours"), (ge, ":cur_hours", ":cur_improvement_end_time"), (party_set_slot, ":center_no", ":cur_improvement", 1), (party_set_slot, ":center_no", slot_center_current_improvement, 0), (call_script, "script_get_improvement_details", ":cur_improvement"), (try_begin), (party_slot_eq, ":center_no", slot_town_lord, "trp_player"), (str_store_party_name, s4, ":center_no"), (display_log_message, "@Building of {s0} in {s4} has been completed."), (try_end), (try_begin), (is_between, ":center_no", villages_begin, villages_end), (eq, ":cur_improvement", slot_center_has_fish_pond), (call_script, "script_change_center_prosperity", ":center_no", 5), (try_end), (try_end), ]), # Adding tournaments to towns # Adding bandits to towns and villages (24, [(assign, ":num_active_tournaments", 0), (try_for_range, ":center_no", towns_begin, towns_end), (party_get_slot, ":has_tournament", ":center_no", slot_town_has_tournament), (try_begin), (eq, ":has_tournament", 1),#tournament ended, simulate (call_script, "script_fill_tournament_participants_troop", ":center_no", 0), (call_script, "script_sort_tournament_participant_troops"),#may not be needed (call_script, "script_get_num_tournament_participants"), (store_sub, ":needed_to_remove_randomly", reg0, 1), (call_script, "script_remove_tournament_participants_randomly", ":needed_to_remove_randomly"), (call_script, "script_sort_tournament_participant_troops"), (troop_get_slot, ":winner_troop", "trp_tournament_participants", 0), (try_begin), (is_between, ":winner_troop", kingdom_heroes_begin, kingdom_heroes_end), (str_store_troop_name_link, s1, ":winner_troop"), (str_store_party_name_link, s2, ":center_no"), (display_message, "@{s1} has won the tournament at {s2}."), (call_script, "script_change_troop_renown", ":winner_troop", 20), (try_end), (try_end), (val_sub, ":has_tournament", 1), (val_max, ":has_tournament", 0), (party_set_slot, ":center_no", slot_town_has_tournament, ":has_tournament"), (try_begin), (gt, ":has_tournament", 0), (val_add, ":num_active_tournaments", 1), (try_end), (try_end), (try_for_range, ":center_no", centers_begin, centers_end), (this_or_next|party_slot_eq, ":center_no", slot_party_type, spt_town), (party_slot_eq, ":center_no", slot_party_type, spt_village), (party_get_slot, ":has_bandits", ":center_no", slot_center_has_bandits), (try_begin), (le, ":has_bandits", 0), (assign, ":continue", 0), (try_begin), (check_quest_active, "qst_deal_with_night_bandits"), (quest_slot_eq, "qst_deal_with_night_bandits", slot_quest_target_center, ":center_no"), (neg|check_quest_succeeded, "qst_deal_with_night_bandits"), (assign, ":continue", 1), (else_try), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", 3), (assign, ":continue", 1), (try_end), (try_begin), (eq, ":continue", 1), (store_random_in_range, ":random_no", 0, 3), (try_begin), (eq, ":random_no", 0), (assign, ":bandit_troop", "trp_bandit"), (else_try), (eq, ":random_no", 1), (assign, ":bandit_troop", "trp_mountain_bandit"), (else_try), (assign, ":bandit_troop", "trp_forest_bandit"), (try_end), (party_set_slot, ":center_no", slot_center_has_bandits, ":bandit_troop"), (try_begin), (eq, "$cheat_mode", 1), (str_store_party_name, s1, ":center_no"), (display_message, "@{s1} is infested by bandits (at night)."), (try_end), (try_end), (else_try), (try_begin), (assign, ":random_chance", 40), (try_begin), (party_slot_eq, ":center_no", slot_party_type, spt_town), (assign, ":random_chance", 20), (try_end), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", ":random_chance"), (party_set_slot, ":center_no", slot_center_has_bandits, 0), (try_begin), (eq, "$cheat_mode", 1), (str_store_party_name, s1, ":center_no"), (display_message, "@{s1} is no longer infested by bandits (at night)."), (try_end), (try_end), (try_end), (try_end), (try_begin), (lt, ":num_active_tournaments", 3), (store_random_in_range, ":random_no", 0, 100), #Add new tournaments with a 30% chance if there are less than 3 tournaments going on (lt, ":random_no", 30), (store_random_in_range, ":random_town", towns_begin, towns_end), (store_random_in_range, ":random_days", 12, 15), (party_set_slot, ":random_town", slot_town_has_tournament, ":random_days"), (try_begin), (eq, "$cheat_mode", 1), (str_store_party_name, s1, ":random_town"), (display_message, "@{s1} is holding a tournament."), (try_end), (try_end), ]), # Asking to give center to player (8, [ (assign, ":done", 0), (try_for_range, ":center_no", centers_begin, centers_end), (eq, ":done", 0), (party_slot_eq, ":center_no", slot_town_lord, stl_reserved_for_player), (assign, "$g_center_to_give_to_player", ":center_no"), (try_begin), (eq, "$g_center_to_give_to_player", "$g_castle_requested_by_player"), (assign, "$g_castle_requested_by_player", 0), (jump_to_menu, "mnu_requested_castle_granted_to_player"), (else_try), (jump_to_menu, "mnu_give_center_to_player"), (try_end), (assign, ":done", 1), (else_try), (eq, ":center_no", "$g_castle_requested_by_player"), (party_slot_ge, ":center_no", slot_town_lord, kingdom_heroes_begin), (assign, "$g_castle_requested_by_player", 0), (store_faction_of_party, ":faction", ":center_no"), (eq, ":faction", "$players_kingdom"), (assign, "$g_center_to_give_to_player", ":center_no"), (jump_to_menu, "mnu_requested_castle_granted_to_another"), (assign, ":done", 1), (try_end), ]), # Taking denars from player while resting in not owned centers (1, [(neg|map_free), (is_currently_night), (ge, "$g_last_rest_center", 0), (neg|party_slot_eq, "$g_last_rest_center", slot_town_lord, "trp_player"), (store_current_hours, ":cur_hours"), (ge, ":cur_hours", "$g_last_rest_payment_until"), (store_add, "$g_last_rest_payment_until", ":cur_hours", 24), (store_troop_gold, ":gold", "trp_player"), (party_get_num_companions, ":num_men", "p_main_party"), (store_div, ":total_cost", ":num_men", 4), (val_add, ":total_cost", 1), (try_begin), (ge, ":gold", ":total_cost"), (display_message, "@You pay for accommodation."), (troop_remove_gold, "trp_player", ":total_cost"), (else_try), (gt, ":gold", 0), (troop_remove_gold, "trp_player", ":gold"), (try_end), ]), # Spawn some bandits. (36, [ (call_script, "script_spawn_bandits"), ]), # Make parties larger as game progresses. (24, [ (call_script, "script_update_party_creation_random_limits"), ]), # Check if a faction is defeated every day (24, [ (assign, ":num_active_factions", 0), (try_for_range, ":cur_kingdom", kingdoms_begin, kingdoms_end), (faction_set_slot, ":cur_kingdom", slot_faction_number_of_parties, 0), (try_end), (try_for_parties, ":cur_party"), (store_faction_of_party, ":party_faction", ":cur_party"), (is_between, ":party_faction", kingdoms_begin, kingdoms_end), (this_or_next|is_between, ":cur_party", centers_begin, centers_end), (party_slot_eq, ":cur_party", slot_party_type, spt_kingdom_hero_party), (faction_get_slot, ":kingdom_num_parties", ":party_faction", slot_faction_number_of_parties), (val_add, ":kingdom_num_parties", 1), (faction_set_slot, ":party_faction", slot_faction_number_of_parties, ":kingdom_num_parties"), (try_end), (try_for_range, ":cur_kingdom", kingdoms_begin, kingdoms_end), ## (try_begin), ## (eq, "$cheat_mode", 1), ## (str_store_faction_name, s1, ":cur_kingdom"), ## (faction_get_slot, reg1, ":cur_kingdom", slot_faction_number_of_parties), ## (display_message, "@Number of parties belonging to {s1}: {reg1}"), ## (try_end), (faction_slot_eq, ":cur_kingdom", slot_faction_state, sfs_active), (val_add, ":num_active_factions", 1), (faction_slot_eq, ":cur_kingdom", slot_faction_number_of_parties, 0), (assign, ":faction_removed", 0), (try_begin), (eq, ":cur_kingdom", "fac_player_supporters_faction"), (try_begin), (le, "$supported_pretender", 0), (faction_set_slot, ":cur_kingdom", slot_faction_state, sfs_inactive), (assign, ":faction_removed", 1), (try_end), (else_try), (neq, "$players_kingdom", ":cur_kingdom"), (faction_set_slot, ":cur_kingdom", slot_faction_state, sfs_defeated), (try_for_parties, ":cur_party"), (store_faction_of_party, ":party_faction", ":cur_party"), (eq, ":party_faction", ":cur_kingdom"), (party_get_slot, ":home_center", ":cur_party", slot_party_home_center), (store_faction_of_party, ":home_center_faction", ":home_center"), (party_set_faction, ":cur_party", ":home_center_faction"), (try_end), (assign, ":kingdom_pretender", -1), (try_for_range, ":cur_pretender", pretenders_begin, pretenders_end), (troop_slot_eq, ":cur_pretender", slot_troop_original_faction, ":cur_kingdom"), (assign, ":kingdom_pretender", ":cur_pretender"), (try_end), (try_begin), (is_between, ":kingdom_pretender", pretenders_begin, pretenders_end), (neq, ":kingdom_pretender", "$supported_pretender"), (troop_set_slot, ":kingdom_pretender", slot_troop_cur_center, 0), #remove pretender from the world (try_end), (assign, ":faction_removed", 1), (try_begin), (eq, "$players_oath_renounced_against_kingdom", ":cur_kingdom"), (assign, "$players_oath_renounced_against_kingdom", 0), (assign, "$players_oath_renounced_given_center", 0), (assign, "$players_oath_renounced_begin_time", 0), (call_script, "script_add_notification_menu", "mnu_notification_oath_renounced_faction_defeated", ":cur_kingdom", 0), (try_end), #This menu must be at the end because faction banner will change after this menu if the player's supported pretender's original faction is cur_kingdom (call_script, "script_add_notification_menu", "mnu_notification_faction_defeated", ":cur_kingdom", 0), (try_end), (try_begin), (eq, ":faction_removed", 1), (val_sub, ":num_active_factions", 1), (call_script, "script_store_average_center_value_per_faction"), (try_end), (try_for_range, ":cur_kingdom_2", kingdoms_begin, kingdoms_end), (call_script, "script_update_faction_notes", ":cur_kingdom_2"), (try_end), (try_end), (try_begin), (eq, ":num_active_factions", 1), (try_for_range, ":cur_kingdom", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":cur_kingdom", slot_faction_state, sfs_active), (call_script, "script_add_notification_menu", "mnu_notification_one_faction_left", ":cur_kingdom", 0), (try_end), (try_end), ]), # Reduce renown slightly by 0.5% every week (7 * 24, [ (troop_get_slot, ":player_renown", "trp_player", slot_troop_renown), (store_div, ":renown_decrease", ":player_renown", 200), (val_sub, ":player_renown", ":renown_decrease"), (troop_set_slot, "trp_player", slot_troop_renown, ":player_renown"), ]), # Read books if player is resting. (1, [(neg|map_free), (gt, "$g_player_reading_book", 0), (player_has_item, "$g_player_reading_book"), (store_attribute_level, ":int", "trp_player", ca_intelligence), (item_get_slot, ":int_req", "$g_player_reading_book", slot_item_intelligence_requirement), (le, ":int_req", ":int"), (item_get_slot, ":book_reading_progress", "$g_player_reading_book", slot_item_book_reading_progress), (item_get_slot, ":book_read", "$g_player_reading_book", slot_item_book_read), (eq, ":book_read", 0), (val_add, ":book_reading_progress", 7), (item_set_slot, "$g_player_reading_book", slot_item_book_reading_progress, ":book_reading_progress"), (ge, ":book_reading_progress", 1000), (item_set_slot, "$g_player_reading_book", slot_item_book_read, 1), (str_store_item_name, s1, "$g_player_reading_book"), (str_clear, s2), (try_begin), (eq, "$g_player_reading_book", "itm_book_tactics"), (troop_raise_skill, "trp_player", "skl_tactics", 1), (str_store_string, s2, "@ Your tactics skill has increased by 1."), (else_try), (eq, "$g_player_reading_book", "itm_book_persuasion"), (troop_raise_skill, "trp_player", "skl_persuasion", 1), (str_store_string, s2, "@ Your persuasion skill has increased by 1."), (else_try), (eq, "$g_player_reading_book", "itm_book_leadership"), (troop_raise_skill, "trp_player", "skl_leadership", 1), (str_store_string, s2, "@ Your leadership skill has increased by 1."), (else_try), (eq, "$g_player_reading_book", "itm_book_intelligence"), (troop_raise_attribute, "trp_player", ca_intelligence, 1), (str_store_string, s2, "@ Your intelligence has increased by 1."), (else_try), (eq, "$g_player_reading_book", "itm_book_trade"), (troop_raise_skill, "trp_player", "skl_trade", 1), (str_store_string, s2, "@ Your trade skill has increased by 1."), (else_try), (eq, "$g_player_reading_book", "itm_book_weapon_mastery"), (troop_raise_skill, "trp_player", "skl_weapon_master", 1), (str_store_string, s2, "@ Your weapon master skill has increased by 1."), (else_try), (eq, "$g_player_reading_book", "itm_book_engineering"), (troop_raise_skill, "trp_player", "skl_engineer", 1), (str_store_string, s2, "@ Your engineer skill has increased by 1."), (try_end), (dialog_box, "@You have finished reading {s1}.{s2}", "@Book Read"), (assign, "$g_player_reading_book", 0), ]), # Removing cattle herds if they are way out of range (12, [(try_for_parties, ":cur_party"), (party_slot_eq, ":cur_party", slot_party_type, spt_cattle_herd), (store_distance_to_party_from_party, ":dist",":cur_party", "p_main_party"), (try_begin), (gt, ":dist", 30), (remove_party, ":cur_party"), (try_begin), #Fail quest if the party is the quest party (check_quest_active, "qst_move_cattle_herd"), (neg|check_quest_concluded, "qst_move_cattle_herd"), (quest_slot_eq, "qst_move_cattle_herd", slot_quest_target_party, ":cur_party"), (call_script, "script_fail_quest", "qst_move_cattle_herd"), (end_try), (else_try), (gt, ":dist", 10), (party_set_slot, ":cur_party", slot_cattle_driven_by_player, 0), (party_set_ai_behavior, ":cur_party", ai_bhvr_hold), (try_end), (try_end), ]), #####!!!!! # Village upgrade triggers # School (30 * 24, [(try_for_range, ":cur_village", villages_begin, villages_end), (party_slot_eq, ":cur_village", slot_town_lord, "trp_player"), (party_get_slot, ":cur_relation", ":cur_village", slot_center_player_relation), (val_add, ":cur_relation", 1), (val_min, ":cur_relation", 100), (party_set_slot, ":cur_village", slot_center_player_relation, ":cur_relation"), (try_end), ]), # Quest triggers: # Remaining days text update (24, [(try_for_range, ":cur_quest", all_quests_begin, all_quests_end), (try_begin), (check_quest_active, ":cur_quest"), (try_begin), (neg|check_quest_concluded, ":cur_quest"), (quest_slot_ge, ":cur_quest", slot_quest_expiration_days, 1), (quest_get_slot, ":exp_days", ":cur_quest", slot_quest_expiration_days), (val_sub, ":exp_days", 1), (try_begin), (eq, ":exp_days", 0), (call_script, "script_abort_quest", ":cur_quest", 1), (else_try), (quest_set_slot, ":cur_quest", slot_quest_expiration_days, ":exp_days"), (assign, reg0, ":exp_days"), (add_quest_note_from_sreg, ":cur_quest", 7, "@You have {reg0} days to finish this quest.", 0), (try_end), (try_end), (else_try), (quest_slot_ge, ":cur_quest", slot_quest_dont_give_again_remaining_days, 1), (quest_get_slot, ":value", ":cur_quest", slot_quest_dont_give_again_remaining_days), (val_sub, ":value", 1), (quest_set_slot, ":cur_quest", slot_quest_dont_give_again_remaining_days, ":value"), (try_end), (try_end), ]), # Report to army quest (6, [ (is_between, "$players_kingdom", kingdoms_begin, kingdoms_end), (eq, "$g_player_is_captive", 0), (neg|faction_slot_eq, "$players_kingdom", slot_faction_ai_state, sfai_default), (neg|check_quest_active, "qst_report_to_army"), (neg|check_quest_active, "qst_follow_army"), (neg|quest_slot_ge, "qst_report_to_army", slot_quest_dont_give_again_remaining_days, 1), (faction_get_slot, ":faction_marshall", "$players_kingdom", slot_faction_marshall), (gt, ":faction_marshall", 0), (troop_get_slot, ":faction_marshall_party", ":faction_marshall", slot_troop_leaded_party), (gt, ":faction_marshall_party", 0), (assign, ":has_no_quests", 1), (try_for_range, ":cur_quest", lord_quests_begin, lord_quests_end), (check_quest_active, ":cur_quest"), (quest_slot_eq, ":cur_quest", slot_quest_giver_troop, ":faction_marshall"), (assign, ":has_no_quests", 0), (try_end), (eq, ":has_no_quests", 1), (try_for_range, ":cur_quest", army_quests_begin, army_quests_end), (check_quest_active, ":cur_quest"), (assign, ":has_no_quests", 0), (try_end), (eq, ":has_no_quests", 1), (store_character_level, ":level", "trp_player"), (ge, ":level", 8), (assign, ":cur_target_amount", 2), (try_for_range, ":cur_center", centers_begin, centers_end), (party_slot_eq, ":cur_center", slot_town_lord, "trp_player"), (try_begin), (party_slot_eq, ":cur_center", slot_party_type, spt_town), (val_add, ":cur_target_amount", 3), (else_try), (party_slot_eq, ":cur_center", slot_party_type, spt_castle), (val_add, ":cur_target_amount", 1), (else_try), (val_add, ":cur_target_amount", 1), (try_end), (try_end), (val_mul, ":cur_target_amount", 4), (val_min, ":cur_target_amount", 60), (quest_set_slot, "qst_report_to_army", slot_quest_giver_troop, ":faction_marshall"), (quest_set_slot, "qst_report_to_army", slot_quest_target_troop, ":faction_marshall"), (quest_set_slot, "qst_report_to_army", slot_quest_target_amount, ":cur_target_amount"), (quest_set_slot, "qst_report_to_army", slot_quest_expiration_days, 4), (quest_set_slot, "qst_report_to_army", slot_quest_dont_give_again_period, 28), (jump_to_menu, "mnu_kingdom_army_quest_report_to_army"), ]), # Army quest initializer (3, [ (assign, "$g_random_army_quest", -1), (check_quest_active, "qst_follow_army", 1), (is_between, "$players_kingdom", kingdoms_begin, kingdoms_end), #Rebellion changes begin # (neg|is_between, "$players_kingdom", rebel_factions_begin, rebel_factions_end), #Rebellion changes end (neg|faction_slot_eq, "$players_kingdom", slot_faction_ai_state, sfai_default), (faction_get_slot, ":faction_marshall", "$players_kingdom", slot_faction_marshall), (neq, ":faction_marshall", "trp_player"), (gt, ":faction_marshall", 0), (troop_get_slot, ":faction_marshall_party", ":faction_marshall", slot_troop_leaded_party), (gt, ":faction_marshall_party", 0), (store_distance_to_party_from_party, ":dist", ":faction_marshall_party", "p_main_party"), (try_begin), (lt, ":dist", 15), (assign, "$g_player_follow_army_warnings", 0), (store_current_hours, ":cur_hours"), (faction_get_slot, ":last_offensive_time", "$players_kingdom", slot_faction_ai_last_offensive_time), (store_sub, ":passed_time", ":cur_hours", ":last_offensive_time"), (assign, ":result", -1), (try_begin), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", 30), (troop_slot_eq, ":faction_marshall", slot_troop_does_not_give_quest, 0), (try_for_range, ":unused", 0, 20), #Repeat trial twenty times (eq, ":result", -1), (store_random_in_range, ":quest_no", army_quests_begin, army_quests_end), (neg|quest_slot_ge, ":quest_no", slot_quest_dont_give_again_remaining_days, 1), (try_begin), (eq, ":quest_no", "qst_deliver_cattle_to_army"), (try_begin), (faction_slot_eq, "$players_kingdom", slot_faction_ai_state, sfai_attacking_center), (gt, ":passed_time", 120),#5 days (store_random_in_range, ":quest_target_amount", 5, 10), (assign, ":result", ":quest_no"), (quest_set_slot, ":result", slot_quest_target_amount, ":quest_target_amount"), (quest_set_slot, ":result", slot_quest_expiration_days, 10), (quest_set_slot, ":result", slot_quest_dont_give_again_period, 30), (try_end), (else_try), (eq, ":quest_no", "qst_join_siege_with_army"), (try_begin), (faction_slot_eq, "$players_kingdom", slot_faction_ai_state, sfai_attacking_center), (faction_get_slot, ":ai_object", "$players_kingdom", slot_faction_ai_object), (is_between, ":ai_object", walled_centers_begin, walled_centers_end), (party_get_battle_opponent, ":besieged_center", ":faction_marshall_party"), (eq, ":besieged_center", ":ai_object"), #army is assaulting the center (assign, ":result", ":quest_no"), (quest_set_slot, ":result", slot_quest_target_center, ":ai_object"), (quest_set_slot, ":result", slot_quest_expiration_days, 2), (quest_set_slot, ":result", slot_quest_dont_give_again_period, 15), (try_end), (else_try), (eq, ":quest_no", "qst_scout_waypoints"), (try_begin), (assign, ":end_cond", 100), (assign, "$qst_scout_waypoints_wp_1", -1), (assign, "$qst_scout_waypoints_wp_2", -1), (assign, "$qst_scout_waypoints_wp_3", -1), (assign, ":continue", 0), (try_for_range, ":unused", 0, ":end_cond"), (try_begin), (lt, "$qst_scout_waypoints_wp_1", 0), (call_script, "script_cf_get_random_enemy_center_within_range", ":faction_marshall_party", 50), (assign, "$qst_scout_waypoints_wp_1", reg0), (try_end), (try_begin), (lt, "$qst_scout_waypoints_wp_2", 0), (call_script, "script_cf_get_random_enemy_center_within_range", ":faction_marshall_party", 50), (neq, "$qst_scout_waypoints_wp_1", reg0), (assign, "$qst_scout_waypoints_wp_2", reg0), (try_end), (try_begin), (lt, "$qst_scout_waypoints_wp_3", 0), (call_script, "script_cf_get_random_enemy_center_within_range", ":faction_marshall_party", 50), (neq, "$qst_scout_waypoints_wp_1", reg0), (neq, "$qst_scout_waypoints_wp_2", reg0), (assign, "$qst_scout_waypoints_wp_3", reg0), (try_end), (neq, "$qst_scout_waypoints_wp_1", "$qst_scout_waypoints_wp_2"), (neq, "$qst_scout_waypoints_wp_1", "$qst_scout_waypoints_wp_2"), (neq, "$qst_scout_waypoints_wp_2", "$qst_scout_waypoints_wp_3"), (ge, "$qst_scout_waypoints_wp_1", 0), (ge, "$qst_scout_waypoints_wp_2", 0), (ge, "$qst_scout_waypoints_wp_3", 0), (assign, ":end_cond", 0), (assign, ":continue", 1), (try_end), (eq, ":continue", 1), (assign, "$qst_scout_waypoints_wp_1_visited", 0), (assign, "$qst_scout_waypoints_wp_2_visited", 0), (assign, "$qst_scout_waypoints_wp_3_visited", 0), (assign, ":result", ":quest_no"), (quest_set_slot, ":result", slot_quest_expiration_days, 7), (quest_set_slot, ":result", slot_quest_dont_give_again_period, 25), (try_end), (try_end), (try_end), (try_begin), (neq, ":result", -1), (quest_set_slot, ":result", slot_quest_current_state, 0), (quest_set_slot, ":result", slot_quest_giver_troop, ":faction_marshall"), (try_begin), (eq, ":result", "qst_join_siege_with_army"), (jump_to_menu, "mnu_kingdom_army_quest_join_siege_order"), (else_try), (assign, "$g_random_army_quest", ":result"), (quest_set_slot, "$g_random_army_quest", slot_quest_giver_troop, ":faction_marshall"), (jump_to_menu, "mnu_kingdom_army_quest_messenger"), (try_end), (try_end), (try_end), (else_try), (val_add, "$g_player_follow_army_warnings", 1), (try_begin), (lt, "$g_player_follow_army_warnings", 12), (try_begin), (store_mod, ":follow_mod", "$g_player_follow_army_warnings", 4), (eq, ":follow_mod", 0), (str_store_troop_name_link, s1, ":faction_marshall"), (try_begin), (lt, "$g_player_follow_army_warnings", 8), (display_message, "@You must follow {s1}!"), (else_try), (display_message, "@You must follow {s1}! This is your last warning!"), (try_end), (try_end), (else_try), (jump_to_menu, "mnu_kingdom_army_follow_failed"), (try_end), (try_end), ]), # Move cattle herd (0.5, [(check_quest_active,"qst_move_cattle_herd"), (neg|check_quest_concluded,"qst_move_cattle_herd"), (quest_get_slot, ":target_party", "qst_move_cattle_herd", slot_quest_target_party), (quest_get_slot, ":target_center", "qst_move_cattle_herd", slot_quest_target_center), (store_distance_to_party_from_party, ":dist",":target_party", ":target_center"), (lt, ":dist", 3), (remove_party, ":target_party"), (call_script, "script_succeed_quest", "qst_move_cattle_herd"), ]), (2, [ (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), (ge, ":party_no", 1), (party_slot_eq, ":party_no", slot_party_following_player, 1), (store_current_hours, ":cur_time"), (neg|party_slot_ge, ":party_no", slot_party_follow_player_until_time, ":cur_time"), (party_set_slot, ":party_no", slot_party_commander_party, -1), (party_set_slot, ":party_no", slot_party_following_player, 0), (assign, ":dont_follow_period", 200), (store_add, ":dont_follow_time", ":cur_time", ":dont_follow_period"), (party_set_slot, ":party_no", slot_party_dont_follow_player_until_time, ":dont_follow_time"), (try_end), ]), # Deliver cattle and deliver cattle to army (0.5, [ (try_begin), (check_quest_active,"qst_deliver_cattle"), (neg|check_quest_succeeded, "qst_deliver_cattle"), (quest_get_slot, ":target_center", "qst_deliver_cattle", slot_quest_target_center), (quest_get_slot, ":target_amount", "qst_deliver_cattle", slot_quest_target_amount), (quest_get_slot, ":cur_amount", "qst_deliver_cattle", slot_quest_current_state), (store_sub, ":left_amount", ":target_amount", ":cur_amount"), (call_script, "script_remove_cattles_if_herd_is_close_to_party", ":target_center", ":left_amount"), (val_add, ":cur_amount", reg0), (quest_set_slot, "qst_deliver_cattle", slot_quest_current_state, ":cur_amount"), (le, ":target_amount", ":cur_amount"), (call_script, "script_succeed_quest", "qst_deliver_cattle"), (try_end), (try_begin), (check_quest_active, "qst_deliver_cattle_to_army"), (neg|check_quest_succeeded, "qst_deliver_cattle_to_army"), (quest_get_slot, ":giver_troop", "qst_deliver_cattle_to_army", slot_quest_giver_troop), (troop_get_slot, ":target_party", ":giver_troop", slot_troop_leaded_party), (try_begin), (gt, ":target_party", 0), (quest_get_slot, ":target_amount", "qst_deliver_cattle_to_army", slot_quest_target_amount), (quest_get_slot, ":cur_amount", "qst_deliver_cattle_to_army", slot_quest_current_state), (store_sub, ":left_amount", ":target_amount", ":cur_amount"), (call_script, "script_remove_cattles_if_herd_is_close_to_party", ":target_party", ":left_amount"), (val_add, ":cur_amount", reg0), (quest_set_slot, "qst_deliver_cattle_to_army", slot_quest_current_state, ":cur_amount"), (try_begin), (le, ":target_amount", ":cur_amount"), (call_script, "script_succeed_quest", "qst_deliver_cattle_to_army"), (try_end), (else_try), (call_script, "script_abort_quest", "qst_deliver_cattle_to_army", 0), (try_end), (try_end), ]), # Train peasants against bandits (1, [ (neg|map_free), (check_quest_active, "qst_train_peasants_against_bandits"), (neg|check_quest_concluded, "qst_train_peasants_against_bandits"), (eq, "$qst_train_peasants_against_bandits_currently_training", 1), (val_add, "$qst_train_peasants_against_bandits_num_hours_trained", 1), (call_script, "script_get_max_skill_of_player_party", "skl_trainer"), (assign, ":trainer_skill", reg0), (store_sub, ":needed_hours", 20, ":trainer_skill"), (val_mul, ":needed_hours", 3), (val_div, ":needed_hours", 5), (ge, "$qst_train_peasants_against_bandits_num_hours_trained", ":needed_hours"), (assign, "$qst_train_peasants_against_bandits_num_hours_trained", 0), (rest_for_hours, 0, 0, 0), #stop resting (jump_to_menu, "mnu_train_peasants_against_bandits_ready"), ]), # Scout waypoints (1, [ (check_quest_active,"qst_scout_waypoints"), (neg|check_quest_succeeded, "qst_scout_waypoints"), (try_begin), (eq, "$qst_scout_waypoints_wp_1_visited", 0), (store_distance_to_party_from_party, ":distance", "$qst_scout_waypoints_wp_1", "p_main_party"), (le, ":distance", 3), (assign, "$qst_scout_waypoints_wp_1_visited", 1), (str_store_party_name_link, s1, "$qst_scout_waypoints_wp_1"), (display_message, "@{s1} is scouted."), (try_end), (try_begin), (eq, "$qst_scout_waypoints_wp_2_visited", 0), (store_distance_to_party_from_party, ":distance", "$qst_scout_waypoints_wp_2", "p_main_party"), (le, ":distance", 3), (assign, "$qst_scout_waypoints_wp_2_visited", 1), (str_store_party_name_link, s1, "$qst_scout_waypoints_wp_2"), (display_message, "@{s1} is scouted."), (try_end), (try_begin), (eq, "$qst_scout_waypoints_wp_3_visited", 0), (store_distance_to_party_from_party, ":distance", "$qst_scout_waypoints_wp_3", "p_main_party"), (le, ":distance", 3), (assign, "$qst_scout_waypoints_wp_3_visited", 1), (str_store_party_name_link, s1, "$qst_scout_waypoints_wp_3"), (display_message, "@{s1} is scouted."), (try_end), (eq, "$qst_scout_waypoints_wp_1_visited", 1), (eq, "$qst_scout_waypoints_wp_2_visited", 1), (eq, "$qst_scout_waypoints_wp_3_visited", 1), (call_script, "script_succeed_quest", "qst_scout_waypoints"), ]), # Kill local merchant (3, [(neg|map_free), (check_quest_active, "qst_kill_local_merchant"), (quest_slot_eq, "qst_kill_local_merchant", slot_quest_current_state, 0), (quest_set_slot, "qst_kill_local_merchant", slot_quest_current_state, 1), (rest_for_hours, 0, 0, 0), #stop resting (assign, "$auto_enter_town", "$qst_kill_local_merchant_center"), (assign, "$quest_auto_menu", "mnu_kill_local_merchant_begin"), ]), # Collect taxes (1, [(neg|map_free), (check_quest_active, "qst_collect_taxes"), (eq, "$g_player_is_captive", 0), (eq, "$qst_collect_taxes_currently_collecting", 1), (quest_get_slot, ":quest_current_state", "qst_collect_taxes", slot_quest_current_state), (this_or_next|eq, ":quest_current_state", 1), (this_or_next|eq, ":quest_current_state", 2), (eq, ":quest_current_state", 3), (quest_get_slot, ":left_hours", "qst_collect_taxes", slot_quest_target_amount), (val_sub, ":left_hours", 1), (quest_set_slot, "qst_collect_taxes", slot_quest_target_amount, ":left_hours"), (call_script, "script_get_max_skill_of_player_party", "skl_trade"), (try_begin), (lt, ":left_hours", 0), (assign, ":quest_current_state", 4), (quest_set_slot, "qst_collect_taxes", slot_quest_current_state, 4), (rest_for_hours, 0, 0, 0), #stop resting (jump_to_menu, "mnu_collect_taxes_complete"), (else_try), #Continue collecting taxes (assign, ":max_collected_tax", "$qst_collect_taxes_hourly_income"), (party_get_slot, ":prosperity", "$g_encountered_party", slot_town_prosperity), (store_add, ":multiplier", 30, ":prosperity"), (val_mul, ":max_collected_tax", ":multiplier"), (val_div, ":max_collected_tax", 80),#Prosperity of 50 gives the default values (try_begin), (eq, "$qst_collect_taxes_halve_taxes", 1), (val_div, ":max_collected_tax", 2), (try_end), (val_max, ":max_collected_tax", 2), (store_random_in_range, ":collected_tax", 1, ":max_collected_tax"), (quest_get_slot, ":cur_collected", "qst_collect_taxes", slot_quest_gold_reward), (val_add, ":cur_collected", ":collected_tax"), (quest_set_slot, "qst_collect_taxes", slot_quest_gold_reward, ":cur_collected"), (call_script, "script_troop_add_gold", "trp_player", ":collected_tax"), (try_end), (try_begin), (eq, ":quest_current_state", 1), (val_sub, "$qst_collect_taxes_menu_counter", 1), (le, "$qst_collect_taxes_menu_counter", 0), (quest_set_slot, "qst_collect_taxes", slot_quest_current_state, 2), (jump_to_menu, "mnu_collect_taxes_revolt_warning"), (else_try), #Chance of revolt against player (eq, ":quest_current_state", 2), (val_sub, "$qst_collect_taxes_unrest_counter", 1), (le, "$qst_collect_taxes_unrest_counter", 0), (eq, "$qst_collect_taxes_halve_taxes", 0), (quest_set_slot, "qst_collect_taxes", slot_quest_current_state, 3), (store_div, ":unrest_chance", 10000, "$qst_collect_taxes_total_hours"), (val_add, ":unrest_chance",30), (store_random_in_range, ":unrest_roll", 0, 1000), (try_begin), (lt, ":unrest_roll", ":unrest_chance"), (jump_to_menu, "mnu_collect_taxes_revolt"), (try_end), (try_end), ]), #persuade_lords_to_make_peace begin (72, [(gt, "$g_force_peace_faction_1", 0), (gt, "$g_force_peace_faction_2", 0), (try_begin), (store_relation, ":relation", "$g_force_peace_faction_1", "$g_force_peace_faction_2"), (lt, ":relation", 0), (call_script, "script_diplomacy_start_peace_between_kingdoms", "$g_force_peace_faction_1", "$g_force_peace_faction_2", 1), (try_end), (assign, "$g_force_peace_faction_1", 0), (assign, "$g_force_peace_faction_2", 0), ]), #NPC changes begin (1, [ #Resolve one issue each hour (try_begin), ### Here do NPC that is quitting (gt, "$npc_is_quitting", 0), (try_begin), (main_party_has_troop, "$npc_is_quitting"), (neq, "$g_player_is_captive", 1), (start_map_conversation, "$npc_is_quitting"), (else_try), (assign, "$npc_is_quitting", 0), (try_end), (else_try), #### Grievance (gt, "$npc_with_grievance", 0), (eq, "$disable_npc_complaints", 0), (try_begin), (main_party_has_troop, "$npc_with_grievance"), (neq, "$g_player_is_captive", 1), (assign, "$npc_map_talk_context", slot_troop_morality_state), (start_map_conversation, "$npc_with_grievance"), (else_try), (assign, "$npc_with_grievance", 0), (try_end), (else_try), (gt, "$npc_with_personality_clash", 0), (eq, "$disable_npc_complaints", 0), (troop_get_slot, ":object", "$npc_with_personality_clash", slot_troop_personalityclash_object), (try_begin), (main_party_has_troop, "$npc_with_personality_clash"), (main_party_has_troop, ":object"), (neq, "$g_player_is_captive", 1), (assign, "$npc_map_talk_context", slot_troop_personalityclash_state), (start_map_conversation, "$npc_with_personality_clash"), (else_try), (assign, "$npc_with_personality_clash", 0), (try_end), (else_try), ###check for regional background (eq, "$disable_local_histories", 0), (try_for_range, ":npc", companions_begin, companions_end), (main_party_has_troop, ":npc"), (troop_slot_eq, ":npc", slot_troop_home_speech_delivered, 0), # (eq, "$npc_map_talk_context", 0), (troop_get_slot, ":home", ":npc", slot_troop_home), (gt, ":home", 0), (store_distance_to_party_from_party, ":distance", ":home", "p_main_party"), (lt, ":distance", 7), (assign, "$npc_map_talk_context", slot_troop_home), (start_map_conversation, ":npc"), (try_end), (try_end), ]), #NPC changes end ##(1, ## [(store_random_in_range, ":random_troop", kingdom_heroes_begin, kingdom_heroes_end), ## (store_random_in_range, ":random_faction", kingdoms_begin, kingdoms_end), ## (store_troop_faction, ":troop_faction", ":random_troop"), ## (neq, ":troop_faction", ":random_faction"), ## (faction_slot_eq, ":random_faction", slot_faction_state, sfs_active), ## (troop_set_slot, ":random_troop", slot_troop_change_to_faction, ":random_faction"), ## (str_store_troop_name, s1, ":random_troop"), ## (str_store_faction_name, s2, ":troop_faction"), ## (str_store_faction_name, s3, ":random_faction"), ## (display_message, "@{s1} is willing to switch from {s2} to {s3}."), ## ]), (4, [(try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (troop_slot_ge, ":troop_no", slot_troop_change_to_faction, 1), (store_troop_faction, ":faction_no", ":troop_no"), (troop_get_slot, ":new_faction_no", ":troop_no", slot_troop_change_to_faction), (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), (assign, ":continue", 0), (try_begin), (le, ":party_no", 0), #(troop_slot_eq, ":troop_no", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":troop_no", slot_troop_prisoner_of_party, 0), (assign, ":continue", 1), (else_try), (gt, ":party_no", 0), #checking if the party is outside the centers (party_get_attached_to, ":cur_center_no", ":party_no"), (try_begin), (lt, ":cur_center_no", 0), (party_get_cur_town, ":cur_center_no", ":party_no"), (try_end), (this_or_next|neg|is_between, ":cur_center_no", centers_begin, centers_end), (party_slot_eq, ":cur_center_no", slot_town_lord, ":troop_no"), #checking if the party is away from his original faction parties (assign, ":end_cond", kingdom_heroes_end), (try_for_range, ":enemy_troop_no", kingdom_heroes_begin, ":end_cond"), (troop_get_slot, ":enemy_party_no", ":enemy_troop_no", slot_troop_leaded_party), (gt, ":enemy_party_no", 0), (store_faction_of_party, ":enemy_faction_no", ":enemy_party_no"), (eq, ":enemy_faction_no", ":faction_no"), (store_distance_to_party_from_party, ":dist", ":party_no", ":enemy_party_no"), (lt, ":dist", 4), (assign, ":end_cond", 0), (try_end), (neq, ":end_cond", 0), (assign, ":continue", 1), (try_end), (eq, ":continue", 1), (call_script, "script_change_troop_faction", ":troop_no", ":new_faction_no"), (troop_set_slot, ":troop_no", slot_troop_change_to_faction, 0), (try_begin), (is_between, ":new_faction_no", kingdoms_begin, kingdoms_end), (str_store_troop_name_link, s1, ":troop_no"), (str_store_faction_name_link, s2, ":faction_no"), (str_store_faction_name_link, s3, ":new_faction_no"), (display_message, "@{s1} has switched from {s2} to {s3}."), (try_begin), (eq, ":faction_no", "$players_kingdom"), (call_script, "script_add_notification_menu", "mnu_notification_troop_left_players_faction", ":troop_no", ":new_faction_no"), (else_try), (eq, ":new_faction_no", "$players_kingdom"), (call_script, "script_add_notification_menu", "mnu_notification_troop_joined_players_faction", ":troop_no", ":faction_no"), (try_end), (try_end), (try_end), ]) ]
Python
import random from header_common import * from header_items import * from header_troops import * from header_skills import * from ID_factions import * from ID_items import * from ID_scenes import * #################################################################################################################### # Each troop contains the following fields: # 1) Troop id (string): used for referencing troops in other files. The prefix trp_ is automatically added before each troop-id . # 2) Toop name (string). # 3) Plural troop name (string). # 4) Troop flags (int). See header_troops.py for a list of available flags # 5) Scene (int) (only applicable to heroes) For example: scn_reyvadin_castle|entry(1) puts troop in reyvadin castle's first entry point # 6) Reserved (int). Put constant "reserved" or 0. # 7) Faction (int) # 8) Inventory (list): Must be a list of items # 9) Attributes (int): Example usage: # str_6|agi_6|int_4|cha_5|level(5) # 10) Weapon proficiencies (int): Example usage: # wp_one_handed(55)|wp_two_handed(90)|wp_polearm(36)|wp_archery(80)|wp_crossbow(24)|wp_throwing(45) # The function wp(x) will create random weapon proficiencies close to value x. # To make an expert archer with other weapon proficiencies close to 60 you can use something like: # wp_archery(160) | wp(60) # 11) Skills (int): See header_skills.py to see a list of skills. Example: # knows_ironflesh_3|knows_power_strike_2|knows_athletics_2|knows_riding_2 # 12) Face code (int): You can obtain the face code by pressing ctrl+E in face generator screen # 13) Face code (int)(2) (only applicable to regular troops, can be omitted for heroes): # The game will create random faces between Face code 1 and face code 2 for generated troops # town_1 Sargoth # town_2 Tihr # town_3 Veluca # town_4 Suno # town_5 Jelkala # town_6 Praven # town_7 Uxkhal # town_8 Reyvadin # town_9 Khudan # town_10 Tulga # town_11 Curaw # town_12 Wercheg # town_13 Rivacheg # town_14 Halmar #################################################################################################################### # Some constant and function declarations to be used below... def wp(x): n = 0 r = 10 + int(x / 10) n |= wp_one_handed(x + random.randrange(r)) n |= wp_two_handed(x + random.randrange(r)) n |= wp_polearm(x + random.randrange(r)) n |= wp_archery(x + random.randrange(r)) n |= wp_crossbow(x + random.randrange(r)) n |= wp_throwing(x + random.randrange(r)) return n def wp_melee(x): n = 0 r = 10 + int(x / 10) n |= wp_one_handed(x + random.randrange(r)) n |= wp_two_handed(x + random.randrange(r)) n |= wp_polearm(x + random.randrange(r)) return n #Skills knows_common = knows_riding_1|knows_trade_2|knows_inventory_management_2|knows_prisoner_management_1|knows_leadership_1 def_attrib = str_7 | agi_5 | int_4 | cha_4 knows_lord_1 = knows_riding_3|knows_trade_2|knows_inventory_management_2|knows_tactics_4|knows_prisoner_management_4|knows_leadership_7 knows_warrior_npc = knows_weapon_master_2|knows_ironflesh_1|knows_athletics_1|knows_power_strike_2|knows_riding_2|knows_shield_1|knows_inventory_management_2 knows_merchant_npc = knows_riding_2|knows_trade_3|knows_inventory_management_3 #knows persuasion knows_tracker_npc = knows_weapon_master_1|knows_athletics_2|knows_spotting_2|knows_pathfinding_2|knows_tracking_2|knows_ironflesh_1|knows_inventory_management_2 lord_attrib = str_20|agi_20|int_20|cha_20|level(38) knight_attrib_1 = str_15|agi_14|int_8|cha_16|level(22) knight_attrib_2 = str_16|agi_16|int_10|cha_18|level(26) knight_attrib_3 = str_18|agi_17|int_12|cha_20|level(30) knight_attrib_4 = str_19|agi_19|int_13|cha_22|level(35) knight_attrib_5 = str_20|agi_20|int_15|cha_25|level(41) knight_skills_1 = knows_riding_3|knows_ironflesh_2|knows_power_strike_3|knows_athletics_1|knows_tactics_2|knows_prisoner_management_1|knows_leadership_3 knight_skills_2 = knows_riding_4|knows_ironflesh_3|knows_power_strike_4|knows_athletics_2|knows_tactics_3|knows_prisoner_management_2|knows_leadership_5 knight_skills_3 = knows_riding_5|knows_ironflesh_4|knows_power_strike_5|knows_athletics_3|knows_tactics_4|knows_prisoner_management_2|knows_leadership_6 knight_skills_4 = knows_riding_6|knows_ironflesh_5|knows_power_strike_6|knows_athletics_4|knows_tactics_5|knows_prisoner_management_3|knows_leadership_7 knight_skills_5 = knows_riding_7|knows_ironflesh_6|knows_power_strike_7|knows_athletics_5|knows_tactics_6|knows_prisoner_management_3|knows_leadership_9 #These face codes are generated by the in-game face generator. #Enable edit mode and press ctrl+E in face generator screen to obtain face codes. reserved = 0 no_scene = 0 swadian_face_younger_1 = 0x0000000000000001124000000020000000000000001c00800000000000000000 swadian_face_young_1 = 0x0000000400000001124000000020000000000000001c00800000000000000000 swadian_face_middle_1 = 0x0000000800000001124000000020000000000000001c00800000000000000000 swadian_face_old_1 = 0x0000000d00000001124000000020000000000000001c00800000000000000000 swadian_face_older_1 = 0x0000000fc0000001124000000020000000000000001c00800000000000000000 swadian_face_younger_2 = 0x00000000000062c76ddcdf7feefbffff00000000001efdbc0000000000000000 swadian_face_young_2 = 0x00000003c00062c76ddcdf7feefbffff00000000001efdbc0000000000000000 swadian_face_middle_2 = 0x00000007c00062c76ddcdf7feefbffff00000000001efdbc0000000000000000 swadian_face_old_2 = 0x0000000bc00062c76ddcdf7feefbffff00000000001efdbc0000000000000000 swadian_face_older_2 = 0x0000000fc00062c76ddcdf7feefbffff00000000001efdbc0000000000000000 vaegir_face_younger_1 = 0x0000000000000001124000000020000000000000001c00800000000000000000 vaegir_face_young_1 = 0x0000000400000001124000000020000000000000001c00800000000000000000 vaegir_face_middle_1 = 0x0000000800000001124000000020000000000000001c00800000000000000000 vaegir_face_old_1 = 0x0000000d00000001124000000020000000000000001c00800000000000000000 vaegir_face_older_1 = 0x0000000fc0000001124000000020000000000000001c00800000000000000000 vaegir_face_younger_2 = 0x000000003f00230c4deeffffffffffff00000000001efff90000000000000000 vaegir_face_young_2 = 0x00000003bf00230c4deeffffffffffff00000000001efff90000000000000000 vaegir_face_middle_2 = 0x00000007bf00230c4deeffffffffffff00000000001efff90000000000000000 vaegir_face_old_2 = 0x0000000cbf00230c4deeffffffffffff00000000001efff90000000000000000 vaegir_face_older_2 = 0x0000000ff100230c4deeffffffffffff00000000001efff90000000000000000 khergit_face_younger_1 = 0x0000000009003109207000000000000000000000001c80470000000000000000 khergit_face_young_1 = 0x00000003c9003109207000000000000000000000001c80470000000000000000 khergit_face_middle_1 = 0x00000007c9003109207000000000000000000000001c80470000000000000000 khergit_face_old_1 = 0x0000000b89003109207000000000000000000000001c80470000000000000000 khergit_face_older_1 = 0x0000000fc9003109207000000000000000000000001c80470000000000000000 khergit_face_younger_2 = 0x000000003f0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000 khergit_face_young_2 = 0x00000003bf0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000 khergit_face_middle_2 = 0x000000077f0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000 khergit_face_old_2 = 0x0000000b3f0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000 khergit_face_older_2 = 0x0000000fff0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000 nord_face_younger_1 = 0x0000000000000001124000000020000000000000001c00800000000000000000 nord_face_young_1 = 0x0000000400000001124000000020000000000000001c00800000000000000000 nord_face_middle_1 = 0x0000000800000001124000000020000000000000001c00800000000000000000 nord_face_old_1 = 0x0000000d00000001124000000020000000000000001c00800000000000000000 nord_face_older_1 = 0x0000000fc0000001124000000020000000000000001c00800000000000000000 nord_face_younger_2 = 0x00000000310023084deeffffffffffff00000000001efff90000000000000000 nord_face_young_2 = 0x00000003b10023084deeffffffffffff00000000001efff90000000000000000 nord_face_middle_2 = 0x00000008310023084deeffffffffffff00000000001efff90000000000000000 nord_face_old_2 = 0x0000000c710023084deeffffffffffff00000000001efff90000000000000000 nord_face_older_2 = 0x0000000ff10023084deeffffffffffff00000000001efff90000000000000000 rhodok_face_younger_1 = 0x0000000009002003140000000000000000000000001c80400000000000000000 rhodok_face_young_1 = 0x0000000449002003140000000000000000000000001c80400000000000000000 rhodok_face_middle_1 = 0x0000000849002003140000000000000000000000001c80400000000000000000 rhodok_face_old_1 = 0x0000000cc9002003140000000000000000000000001c80400000000000000000 rhodok_face_older_1 = 0x0000000fc9002003140000000000000000000000001c80400000000000000000 rhodok_face_younger_2 = 0x00000000000062c76ddcdf7feefbffff00000000001efdbc0000000000000000 rhodok_face_young_2 = 0x00000003c00062c76ddcdf7feefbffff00000000001efdbc0000000000000000 rhodok_face_middle_2 = 0x00000007c00062c76ddcdf7feefbffff00000000001efdbc0000000000000000 rhodok_face_old_2 = 0x0000000bc00062c76ddcdf7feefbffff00000000001efdbc0000000000000000 rhodok_face_older_2 = 0x0000000fc00062c76ddcdf7feefbffff00000000001efdbc0000000000000000 man_face_younger_1 = 0x0000000000000001124000000020000000000000001c00800000000000000000 man_face_young_1 = 0x0000000400000001124000000020000000000000001c00800000000000000000 man_face_middle_1 = 0x0000000800000001124000000020000000000000001c00800000000000000000 man_face_old_1 = 0x0000000d00000001124000000020000000000000001c00800000000000000000 man_face_older_1 = 0x0000000fc0000001124000000020000000000000001c00800000000000000000 man_face_younger_2 = 0x000000003f0052064deeffffffffffff00000000001efff90000000000000000 man_face_young_2 = 0x00000003bf0052064deeffffffffffff00000000001efff90000000000000000 man_face_middle_2 = 0x00000007bf0052064deeffffffffffff00000000001efff90000000000000000 man_face_old_2 = 0x0000000bff0052064deeffffffffffff00000000001efff90000000000000000 man_face_older_2 = 0x0000000fff0052064deeffffffffffff00000000001efff90000000000000000 merchant_face_1 = man_face_young_1 merchant_face_2 = man_face_older_2 woman_face_1 = 0x0000000000000001000000000000000000000000001c00000000000000000000 woman_face_2 = 0x00000003bf0030067ff7fbffefff6dff00000000001f6dbf0000000000000000 refugee_face1 = woman_face_1 refugee_face2 = woman_face_2 girl_face1 = woman_face_1 girl_face2 = woman_face_2 mercenary_face_1 = 0x0000000000000000000000000000000000000000001c00000000000000000000 mercenary_face_2 = 0x0000000cff00730b6db6db6db7fbffff00000000001efffe0000000000000000 vaegir_face1 = vaegir_face_young_1 vaegir_face2 = vaegir_face_older_2 bandit_face1 = man_face_young_1 bandit_face2 = man_face_older_2 undead_face1 = 0x00000000002000000000000000000000 undead_face2 = 0x000000000020010000001fffffffffff #NAMES: # troops = [ ["player","Player","Player",tf_hero|tf_unmoveable_in_party_window,no_scene,reserved,fac_player_faction, [], str_4|agi_4|int_4|cha_4,wp(15),0,0x000000018000000136db6db6db6db6db00000000001db6db0000000000000000], ["temp_troop","Temp Troop","Temp Troop",tf_hero,no_scene,reserved,fac_commoners,[],def_attrib,0,knows_common|knows_inventory_management_10,0], ["game","Game","Game",tf_hero,no_scene,reserved,fac_commoners,[],def_attrib,0,knows_common,0], ["unarmed_troop","Unarmed Troop","Unarmed Troops",tf_hero,no_scene,reserved,fac_commoners,[itm_arrows,itm_short_bow],def_attrib|str_14,0,knows_common|knows_power_draw_2,0], #################################################################################################################### # Troops before this point are hardwired into the game and their order should not be changed! #################################################################################################################### ["random_town_sequence","Random Town Sequence","Random Town Sequence",tf_hero,no_scene,reserved,fac_commoners,[],def_attrib,0,knows_common|knows_inventory_management_10,0], ["tournament_participants","Tournament Participants","Tournament Participants",tf_hero,no_scene,reserved,fac_commoners,[],def_attrib,0,knows_common|knows_inventory_management_10,0], ["tutorial_maceman","Maceman","Maceman",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners, [itm_tutorial_club,itm_leather_jerkin,itm_hide_boots], str_6|agi_6|level(1),wp(50),knows_common,mercenary_face_1,mercenary_face_2], ["tutorial_archer","Archer","Archer",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_ranged,no_scene,reserved,fac_commoners, [itm_tutorial_short_bow,itm_tutorial_arrows,itm_linen_tunic,itm_hide_boots], str_6|agi_6|level(5),wp(100),knows_common|knows_power_draw_4,mercenary_face_1,mercenary_face_2], ["tutorial_swordsman","Swordsman","Swordsman",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners, [itm_tutorial_sword,itm_leather_vest,itm_hide_boots], str_6|agi_6|level(5),wp(80),knows_common,mercenary_face_1,mercenary_face_2], ["novice_fighter","Novice Fighter","Novice Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners, [itm_hide_boots], str_6|agi_6|level(5),wp(60),knows_common,mercenary_face_1, mercenary_face_2], ["regular_fighter","Regular Fighter","Regular Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners, [itm_hide_boots], str_8|agi_8|level(11),wp(90),knows_common|knows_ironflesh_1|knows_power_strike_1|knows_athletics_1|knows_riding_1|knows_shield_2,mercenary_face_1, mercenary_face_2], ["veteran_fighter","Veteran Fighter","Veteran Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,0,fac_commoners, [itm_hide_boots], str_10|agi_10|level(17),wp(110),knows_common|knows_ironflesh_3|knows_power_strike_2|knows_athletics_2|knows_riding_2|knows_shield_3,mercenary_face_1, mercenary_face_2], ["champion_fighter","Champion Fighter","Champion Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners, [itm_hide_boots], str_12|agi_11|level(22),wp(140),knows_common|knows_ironflesh_4|knows_power_strike_3|knows_athletics_3|knows_riding_3|knows_shield_4,mercenary_face_1, mercenary_face_2], ["arena_training_fighter_1","Novice Fighter","Novice Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners, [itm_hide_boots], str_6|agi_6|level(5),wp(60),knows_common,mercenary_face_1, mercenary_face_2], ["arena_training_fighter_2","Novice Fighter","Novice Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners, [itm_hide_boots], str_7|agi_6|level(7),wp(70),knows_common,mercenary_face_1, mercenary_face_2], ["arena_training_fighter_3","Regular Fighter","Regular Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners, [itm_hide_boots], str_8|agi_7|level(9),wp(80),knows_common,mercenary_face_1, mercenary_face_2], ["arena_training_fighter_4","Regular Fighter","Regular Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners, [itm_hide_boots], str_8|agi_8|level(11),wp(90),knows_common,mercenary_face_1, mercenary_face_2], ["arena_training_fighter_5","Regular Fighter","Regular Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners, [itm_hide_boots], str_9|agi_8|level(13),wp(100),knows_common,mercenary_face_1, mercenary_face_2], ["arena_training_fighter_6","Veteran Fighter","Veteran Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners, [itm_hide_boots], str_10|agi_9|level(15),wp(110),knows_common,mercenary_face_1, mercenary_face_2], ["arena_training_fighter_7","Veteran Fighter","Veteran Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners, [itm_hide_boots], str_10|agi_10|level(17),wp(120),knows_common,mercenary_face_1, mercenary_face_2], ["arena_training_fighter_8","Veteran Fighter","Veteran Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners, [itm_hide_boots], str_11|agi_10|level(19),wp(130),knows_common,mercenary_face_1, mercenary_face_2], ["arena_training_fighter_9","Champion Fighter","Champion Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners, [itm_hide_boots], str_12|agi_11|level(21),wp(140),knows_common,mercenary_face_1, mercenary_face_2], ["arena_training_fighter_10","Champion Fighter","Champion Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners, [itm_hide_boots], str_12|agi_12|level(23),wp(150),knows_common,mercenary_face_1, mercenary_face_2], ["cattle","Cattle","Cattle",0,no_scene,reserved,fac_neutral, [], def_attrib|level(1),wp(60),0,mercenary_face_1, mercenary_face_2], #soldiers: #This troop is the troop marked as soldiers_begin ["farmer","Farmer","Farmers",tf_guarantee_armor,no_scene,reserved,fac_commoners, [itm_cleaver,itm_knife,itm_pitch_fork,itm_sickle,itm_club,itm_stones,itm_leather_cap,itm_felt_hat,itm_felt_hat,itm_linen_tunic,itm_coarse_tunic,itm_nomad_boots,itm_wrapping_boots], def_attrib|level(4),wp(60),knows_common,man_face_middle_1, man_face_old_2], ["townsman","Townsman","Townsmen",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners, [itm_cleaver,itm_knife,itm_club,itm_quarter_staff,itm_dagger,itm_stones,itm_leather_cap,itm_linen_tunic,itm_coarse_tunic,itm_leather_apron,itm_nomad_boots,itm_wrapping_boots], def_attrib|level(4),wp(60),knows_common,mercenary_face_1, mercenary_face_2], ["watchman","Watchman","Watchmen",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_shield,no_scene,reserved,fac_commoners, [itm_bolts,itm_spiked_club,itm_fighting_pick,itm_sword_medieval_a,itm_boar_spear,itm_hunting_crossbow,itm_light_crossbow,itm_tab_shield_round_a,itm_tab_shield_round_b,itm_padded_cloth,itm_leather_jerkin,itm_leather_cap,itm_padded_coif,itm_footman_helmet,itm_nomad_boots,itm_wrapping_boots], def_attrib|level(9),wp(75),knows_common|knows_shield_1,mercenary_face_1, mercenary_face_2], ["caravan_guard","Caravan Guard","Caravan Guards",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse|tf_guarantee_shield,no_scene,0,fac_commoners, [itm_spear,itm_fighting_pick,itm_sword_medieval_a,itm_voulge,itm_tab_shield_round_b,itm_tab_shield_round_c,itm_leather_jerkin,itm_leather_vest,itm_hide_boots,itm_padded_coif,itm_nasal_helmet,itm_footman_helmet,itm_saddle_horse], def_attrib|level(14),wp(85),knows_common|knows_riding_2|knows_ironflesh_1|knows_shield_3,mercenary_face_1, mercenary_face_2], ["mercenary_swordsman","Mercenary Swordsman","Mercenary Swordsmen",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield,no_scene,reserved,fac_commoners, [itm_bastard_sword_a,itm_sword_medieval_b,itm_sword_medieval_b_small,itm_tab_shield_heater_c,itm_mail_hauberk,itm_haubergeon,itm_hide_boots,itm_kettle_hat,itm_mail_coif,itm_flat_topped_helmet, itm_helmet_with_neckguard], def_attrib|level(20),wp(100),knows_common|knows_riding_3|knows_ironflesh_2|knows_shield_3|knows_power_strike_2,mercenary_face_1, mercenary_face_2], ["hired_blade","Hired Blade","Hired Blades",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield,no_scene,reserved,fac_commoners, [itm_bastard_sword_b,itm_sword_medieval_c,itm_tab_shield_heater_cav_a,itm_haubergeon,itm_mail_chausses,itm_iron_greaves,itm_guard_helmet,itm_great_helmet,itm_bascinet, itm_leather_gloves], def_attrib|level(25),wp(130),knows_common|knows_riding_3|knows_athletics_5|knows_shield_4|knows_power_strike_4|knows_ironflesh_3,mercenary_face_1, mercenary_face_2], ["mercenary_crossbowman","Mercenary Crossbowman","Mercenary Crossbowmen",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_ranged,no_scene,reserved,fac_commoners, [itm_bolts,itm_spiked_club,itm_fighting_pick,itm_sword_medieval_a,itm_boar_spear,itm_crossbow,itm_tab_shield_pavise_a,itm_tab_shield_round_b,itm_padded_cloth,itm_leather_jerkin,itm_leather_cap,itm_padded_coif,itm_footman_helmet,itm_nomad_boots,itm_wrapping_boots], def_attrib|level(19),wp_melee(90)|wp_crossbow(120),knows_common|knows_athletics_2|knows_shield_1,mercenary_face_1, mercenary_face_2], ["mercenary_horseman","Mercenary Horseman","Mercenary Horsemen",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield,no_scene,reserved,fac_commoners, [itm_lance,itm_bastard_sword_a,itm_sword_medieval_b,itm_tab_shield_heater_c,itm_mail_shirt,itm_haubergeon,itm_hide_boots,itm_norman_helmet,itm_mail_coif,itm_helmet_with_neckguard,itm_saddle_horse,itm_courser,itm_hunter], def_attrib|level(20),wp(100),knows_common|knows_riding_4|knows_ironflesh_2|knows_shield_2|knows_power_strike_2,mercenary_face_1, mercenary_face_2], ["mercenary_cavalry","Mercenary Cavalry","Mercenary Cavalry",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield,no_scene,reserved,fac_commoners, [itm_lance,itm_bastard_sword_a,itm_sword_medieval_b,itm_tab_shield_heater_c,itm_mail_hauberk,itm_banded_armor,itm_hide_boots,itm_kettle_hat,itm_mail_coif,itm_flat_topped_helmet,itm_helmet_with_neckguard,itm_saddle_horse,itm_courser,itm_hunter], def_attrib|level(25),wp(120),knows_common|knows_riding_5|knows_ironflesh_3|knows_shield_3|knows_power_strike_3,mercenary_face_1, mercenary_face_2], ["mercenaries_end","mercenaries_end","mercenaries_end",0,no_scene,reserved,fac_commoners, [], def_attrib|level(4),wp(60),knows_common,mercenary_face_1, mercenary_face_2], #peasant - retainer - footman - man-at-arms - knight ["swadian_recruit","Swadian Recruit","Swadian Recruits",tf_guarantee_armor,0,0,fac_neutral, [itm_scythe,itm_hatchet,itm_pickaxe,itm_club,itm_stones,itm_tab_shield_heater_a,itm_leather_cap,itm_felt_hat,itm_felt_hat, itm_shirt,itm_coarse_tunic,itm_leather_apron,itm_nomad_boots,itm_wrapping_boots], def_attrib|level(4),wp(60),knows_common,swadian_face_younger_1, swadian_face_middle_2], ["swadian_militia","Swadian Militia","Swadian Militia",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_shield,0,0,fac_neutral, [itm_bolts,itm_spiked_club,itm_fighting_pick,itm_boar_spear,itm_hunting_crossbow,itm_tab_shield_heater_a, itm_padded_cloth,itm_leather_armor,itm_leather_cap,itm_arming_cap,itm_padded_coif,itm_ankle_boots,itm_wrapping_boots], def_attrib|level(9),wp(75),knows_common,swadian_face_young_1, swadian_face_old_2], ["swadian_footman","Swadian Footman","Swadian Footmen",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_shield,0,0,fac_neutral, [itm_spear,itm_fighting_pick,itm_sword_medieval_b_small,itm_sword_medieval_a,itm_tab_shield_heater_b, itm_leather_jerkin,itm_padded_leather,itm_leather_armor,itm_ankle_boots,itm_padded_coif,itm_footman_helmet], def_attrib|level(14),wp_melee(85),knows_common|knows_ironflesh_1|knows_shield_2,swadian_face_young_1, swadian_face_old_2], ["swadian_infantry","Swadian Infantry","Swadian Infantry",tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_neutral, [itm_pike,itm_fighting_pick,itm_bastard_sword_a,itm_sword_medieval_a,itm_sword_medieval_b_small,itm_tab_shield_heater_c, itm_mail_with_surcoat,itm_haubergeon,itm_hide_boots,itm_ankle_boots,itm_kettle_hat,itm_mail_coif,itm_flat_topped_helmet,itm_helmet_with_neckguard], def_attrib|level(20),wp_melee(105),knows_common|knows_riding_3|knows_ironflesh_2|knows_shield_3,swadian_face_middle_1, swadian_face_old_2], ["swadian_sergeant","Swadian Sergeant","Swadian Sergeants",tf_mounted|tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_neutral, [itm_awlpike,itm_bastard_sword_b,itm_morningstar,itm_sword_medieval_c,itm_tab_shield_heater_d, itm_coat_of_plates,itm_mail_with_surcoat,itm_mail_chausses,itm_iron_greaves,itm_guard_helmet,itm_helmet_with_neckguard,itm_bascinet,itm_guard_helmet,itm_leather_gloves], def_attrib|level(25),wp_melee(135),knows_common|knows_shield_3|knows_ironflesh_3|knows_power_strike_3,swadian_face_middle_1, swadian_face_older_2], ["swadian_skirmisher","Swadian Skirmisher","Swadian Skirmishers",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_neutral, [itm_bolts,itm_light_crossbow,itm_hunting_crossbow,itm_dagger,itm_club,itm_voulge,itm_tab_shield_heater_a, itm_leather_armor,itm_padded_cloth,itm_ankle_boots,itm_padded_coif,itm_arming_cap,itm_footman_helmet], def_attrib|level(14),wp(80),knows_common|knows_riding_2|knows_ironflesh_1,swadian_face_young_1, swadian_face_middle_2], ["swadian_crossbowman","Swadian Crossbowman","Swadian Crossbowmen",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_neutral, [itm_bolts,itm_crossbow,itm_light_crossbow,itm_fighting_pick,itm_dagger,itm_sword_medieval_a,itm_voulge,itm_tab_shield_heater_b, itm_leather_jerkin,itm_leather_armor,itm_hide_boots,itm_ankle_boots,itm_padded_coif,itm_nasal_helmet,itm_footman_helmet], def_attrib|level(19),wp_melee(90)|wp_crossbow(100),knows_common|knows_riding_2|knows_ironflesh_1,swadian_face_young_1, swadian_face_old_2], ["swadian_sharpshooter","Swadian Sharpshooter","Swadian Sharpshooters",tf_guarantee_ranged|tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_neutral, [itm_bolts,itm_arrows,itm_crossbow,itm_crossbow,itm_heavy_crossbow,itm_sword_medieval_b_small,itm_sword_medieval_a,itm_voulge,itm_tab_shield_heater_c, itm_haubergeon,itm_padded_leather,itm_hide_boots,itm_norman_helmet,itm_nasal_helmet,itm_kettle_hat,itm_kettle_hat,itm_leather_gloves], def_attrib|str_14|level(24),wp_melee(100)|wp_crossbow(130),knows_common|knows_power_draw_3|knows_ironflesh_1,swadian_face_middle_1, swadian_face_older_2], ["swadian_man_at_arms","Swadian Man at Arms","Swadian Men at Arms",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield,0,0,fac_neutral, [itm_lance,itm_fighting_pick,itm_bastard_sword_a,itm_sword_medieval_b,itm_sword_medieval_c_small,itm_tab_shield_heater_cav_a, itm_haubergeon,itm_mail_with_surcoat,itm_hide_boots,itm_norman_helmet,itm_mail_coif,itm_flat_topped_helmet,itm_helmet_with_neckguard,itm_warhorse,itm_warhorse,itm_hunter], def_attrib|level(20),wp_melee(100),knows_common|knows_riding_4|knows_ironflesh_2|knows_shield_2|knows_power_strike_3,swadian_face_young_1, swadian_face_old_2], ["swadian_knight","Swadian Knight","Swadian Knights",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield,0,0,fac_neutral, [itm_heavy_lance,itm_bastard_sword_b,itm_morningstar,itm_sword_medieval_c,itm_tab_shield_heater_cav_b, itm_coat_of_plates,itm_cuir_bouilli,itm_mail_with_surcoat,itm_mail_chausses,itm_iron_greaves,itm_guard_helmet,itm_great_helmet,itm_bascinet,itm_hunter,itm_warhorse,itm_leather_gloves,itm_mail_mittens], def_attrib|level(25),wp_melee(130),knows_common|knows_riding_5|knows_shield_3|knows_ironflesh_4|knows_power_strike_5,swadian_face_middle_1, swadian_face_older_2], ["swadian_messenger","Swadian Messenger","Swadian Messengers",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_horse|tf_guarantee_ranged,0,0,fac_neutral, [itm_sword_medieval_a,itm_leather_jerkin,itm_leather_boots,itm_courser,itm_leather_gloves,itm_light_crossbow,itm_bolts], def_attrib|agi_21|level(25),wp(130),knows_common|knows_riding_7|knows_horse_archery_5,swadian_face_young_1, swadian_face_old_2], ["swadian_deserter","Swadian Deserter","Swadian Deserters",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_deserters, [itm_bolts,itm_light_crossbow,itm_hunting_crossbow,itm_dagger,itm_club,itm_voulge,itm_wooden_shield,itm_leather_jerkin,itm_padded_cloth,itm_hide_boots,itm_padded_coif,itm_nasal_helmet,itm_footman_helmet], def_attrib|level(14),wp(80),knows_common|knows_riding_2|knows_ironflesh_1,swadian_face_young_1, swadian_face_old_2], ["swadian_prison_guard","Prison Guard","Prison Guards",tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_neutral, [itm_awlpike,itm_pike,itm_great_sword,itm_morningstar,itm_sword_medieval_b,itm_tab_shield_heater_c,itm_coat_of_plates,itm_plate_armor,itm_mail_chausses,itm_iron_greaves,itm_guard_helmet,itm_helmet_with_neckguard,itm_bascinet,itm_guard_helmet,itm_leather_gloves], def_attrib|level(25),wp(130),knows_common|knows_shield_3|knows_ironflesh_3|knows_power_strike_3,swadian_face_young_1, swadian_face_old_2], ["swadian_castle_guard","Castle Guard","Castle Guards",tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_neutral, [itm_awlpike,itm_pike,itm_great_sword,itm_morningstar,itm_sword_medieval_b,itm_tab_shield_heater_c,itm_tab_shield_heater_d,itm_coat_of_plates,itm_plate_armor,itm_mail_chausses,itm_iron_greaves,itm_guard_helmet,itm_helmet_with_neckguard,itm_bascinet,itm_guard_helmet,itm_leather_gloves], def_attrib|level(25),wp(130),knows_common|knows_shield_3|knows_ironflesh_3|knows_power_strike_3,swadian_face_young_1, swadian_face_old_2], # Vaegir watchman? ["vaegir_recruit","Vaegir Recruit","Vaegir Recruits",tf_guarantee_boots|tf_guarantee_armor,0,0,fac_neutral, [itm_scythe,itm_hatchet,itm_cudgel,itm_axe,itm_stones,itm_tab_shield_kite_a, itm_tab_shield_kite_a,itm_rawhide_coat,itm_nomad_armor,itm_nomad_boots], def_attrib|level(4),wp(60),knows_common, vaegir_face_younger_1, vaegir_face_middle_2], ["vaegir_footman","Vaegir Footman","Vaegir Footmen",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_shield,0,0,fac_neutral, [itm_spiked_club,itm_hand_axe,itm_sword_viking_1,itm_two_handed_axe,itm_tab_shield_kite_a,itm_tab_shield_kite_b,itm_spear,itm_nomad_cap,itm_skullcap,itm_rawhide_coat,itm_nomad_armor,itm_nomad_boots], def_attrib|level(9),wp(75),knows_common, vaegir_face_young_1, vaegir_face_middle_2], ["vaegir_skirmisher","Vaegir Skirmisher","Vaegir Skirmishers",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_neutral, [itm_arrows,itm_spiked_mace,itm_axe,itm_sword_khergit_1,itm_short_bow,itm_short_bow,itm_hunting_bow,itm_javelin,itm_javelin,itm_steppe_cap,itm_nomad_cap,itm_leather_vest,itm_leather_vest,itm_nomad_armor,itm_nomad_boots], def_attrib|str_10|level(14),wp(60),knows_ironflesh_1|knows_power_draw_1|knows_power_throw_1,vaegir_face_young_1, vaegir_face_old_2], ["vaegir_archer","Vaegir Archer","Vaegir Archers",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_neutral, [itm_arrows,itm_axe,itm_sword_khergit_1,itm_nomad_bow,itm_nomad_bow,itm_short_bow,itm_leather_jerkin,itm_leather_vest,itm_nomad_boots,itm_spiked_helmet,itm_nordic_helmet,itm_nasal_helmet,itm_nomad_cap], def_attrib|str_12|level(19),wp_melee(70)|wp_archery(110),knows_ironflesh_1|knows_power_draw_2|knows_athletics_2|knows_power_throw_1,vaegir_face_young_1, vaegir_face_older_2], ["vaegir_marksman","Vaegir Marksman","Vaegir Marksmen",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_neutral, [itm_arrows,itm_axe,itm_voulge,itm_sword_khergit_2,itm_strong_bow,itm_nomad_bow,itm_nomad_bow,itm_leather_vest,itm_studded_leather_coat,itm_nomad_boots,itm_spiked_helmet,itm_nordic_helmet,itm_nasal_helmet,itm_nomad_cap], def_attrib|str_14|level(24),wp_melee(80)|wp_archery(140),knows_ironflesh_2|knows_power_draw_4|knows_athletics_3|knows_power_throw_1,vaegir_face_young_1, vaegir_face_older_2], ["vaegir_veteran","Vaegir Veteran","Vaegir Veterans",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_shield,0,0,fac_neutral, [itm_spiked_mace,itm_two_handed_axe,itm_sword_viking_1,itm_tab_shield_kite_b,itm_tab_shield_kite_c,itm_spear, itm_steppe_cap,itm_nomad_cap,itm_leather_jerkin,itm_studded_leather_coat,itm_nomad_boots,itm_saddle_horse], def_attrib|level(14),wp_melee(85),knows_athletics_1|knows_ironflesh_1|knows_shield_2,vaegir_face_young_1, vaegir_face_old_2], ["vaegir_infantry","Vaegir Infantry","Vaegir Infantries",tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_neutral, [itm_pike,itm_battle_axe,itm_sword_viking_2,itm_sword_khergit_2,itm_tab_shield_kite_c,itm_spear, itm_mail_hauberk,itm_lamellar_vest,itm_nomad_boots,itm_spiked_helmet,itm_nordic_helmet,itm_nasal_helmet,itm_nomad_cap], def_attrib|level(19),wp_melee(100),knows_athletics_2|knows_ironflesh_2|knows_power_strike_2|knows_shield_2,vaegir_face_young_1, vaegir_face_older_2], ["vaegir_guard","Vaegir Guard","Vaegir Guards",tf_mounted|tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_neutral, [itm_ashwood_pike,itm_battle_fork,itm_bardiche,itm_battle_axe,itm_fighting_axe,itm_tab_shield_kite_d, itm_banded_armor,itm_lamellar_vest,itm_lamellar_armor,itm_mail_chausses,itm_iron_greaves,itm_nordic_helmet,itm_nordic_helmet,itm_nordic_helmet,itm_spiked_helmet,itm_leather_gloves], def_attrib|level(24),wp_melee(130),knows_athletics_3|knows_shield_2|knows_ironflesh_3|knows_power_strike_2,vaegir_face_middle_1, vaegir_face_older_2], ["vaegir_horseman","Vaegir Horseman","Vaegir Horsemen",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield,0,0,fac_neutral, [itm_battle_axe,itm_sword_khergit_2,itm_lance,itm_tab_shield_kite_cav_a,itm_spear, itm_studded_leather_coat,itm_lamellar_vest,itm_nomad_boots,itm_spiked_helmet,itm_nordic_helmet,itm_nasal_helmet,itm_nomad_cap,itm_steppe_horse,itm_hunter], def_attrib|level(19),wp(100),knows_riding_3|knows_ironflesh_2|knows_power_strike_1,vaegir_face_young_1, vaegir_face_older_2], ["vaegir_knight","Vaegir Knight","Vaegir Knights",tf_mounted|tf_guarantee_boots|tf_guarantee_gloves|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield,0,0,fac_neutral, [itm_bardiche,itm_war_axe,itm_fighting_axe,itm_lance,itm_lance,itm_tab_shield_kite_cav_b, itm_banded_armor,itm_lamellar_vest,itm_lamellar_armor,itm_mail_chausses,itm_iron_greaves,itm_nordic_helmet,itm_nordic_helmet,itm_nordic_helmet,itm_spiked_helmet,itm_hunter, itm_warhorse,itm_leather_gloves], def_attrib|level(24),wp(130),knows_riding_4|knows_shield_2|knows_ironflesh_3|knows_power_strike_2,vaegir_face_middle_1, vaegir_face_older_2], ["vaegir_messenger","Vaegir Messenger","Vaegir Messengers",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_horse|tf_guarantee_ranged,0,0,fac_neutral, [itm_sword_medieval_b,itm_leather_jerkin,itm_leather_boots,itm_courser,itm_leather_gloves,itm_short_bow,itm_arrows], def_attrib|agi_21|level(25),wp(130),knows_common|knows_riding_7|knows_horse_archery_5|knows_power_draw_5,vaegir_face_young_1, vaegir_face_older_2], ["vaegir_deserter","Vaegir Deserter","Vaegir Deserters",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_deserters, [itm_arrows,itm_spiked_mace,itm_axe,itm_falchion,itm_short_bow,itm_short_bow,itm_hunting_bow,itm_javelin,itm_javelin,itm_steppe_cap,itm_nomad_cap,itm_leather_vest,itm_leather_vest,itm_nomad_armor,itm_nomad_boots], def_attrib|str_10|level(14),wp(80),knows_ironflesh_1|knows_power_draw_1,vaegir_face_young_1, vaegir_face_older_2], ["vaegir_prison_guard","Prison Guard","Prison Guards", tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_neutral, [itm_ashwood_pike,itm_battle_fork,itm_bardiche,itm_battle_axe,itm_fighting_axe,itm_tab_shield_kite_b,itm_studded_leather_coat,itm_lamellar_armor,itm_mail_chausses,itm_iron_greaves,itm_nordic_helmet,itm_nordic_helmet,itm_nordic_helmet,itm_spiked_helmet,itm_leather_gloves], def_attrib|level(24),wp(130),knows_athletics_3|knows_shield_2|knows_ironflesh_3,vaegir_face_middle_1, vaegir_face_older_2], ["vaegir_castle_guard","Castle Guard","Castle Guards", tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_neutral, [itm_ashwood_pike,itm_battle_fork,itm_bardiche,itm_battle_axe,itm_fighting_axe,itm_tab_shield_kite_d,itm_studded_leather_coat,itm_lamellar_armor,itm_mail_chausses,itm_iron_greaves,itm_nordic_helmet,itm_nordic_helmet,itm_nordic_helmet,itm_spiked_helmet,itm_leather_gloves], def_attrib|level(24),wp(130),knows_athletics_3|knows_shield_2|knows_ironflesh_3,vaegir_face_middle_1, vaegir_face_older_2], ["khergit_tribesman","Khergit Tribesman","Khergit Tribesmen",tf_mounted|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_khergits, [itm_arrows,itm_club,itm_spear,itm_hunting_bow, itm_steppe_cap,itm_nomad_cap,itm_leather_vest,itm_steppe_armor,itm_nomad_boots,itm_steppe_horse,itm_sumpter_horse], def_attrib|level(5),wp(50),knows_common|knows_riding_3|knows_power_draw_2|knows_horse_archery_2,khergit_face_younger_1, khergit_face_old_2], ["khergit_skirmisher","Khergit Skirmisher","Khergit Skirmishers",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse|tf_guarantee_ranged,0,0,fac_khergits, [itm_arrows,itm_sword_khergit_1,itm_winged_mace,itm_spear,itm_nomad_bow,itm_javelin,itm_tab_shield_small_round_a, itm_steppe_cap,itm_nomad_cap,itm_leather_steppe_cap_a,itm_khergit_armor,itm_steppe_armor,itm_leather_vest,itm_nomad_boots,itm_steppe_horse,itm_saddle_horse], def_attrib|level(10),wp(60)|wp_archery(80)|wp_throwing(80),knows_common|knows_riding_4|knows_power_draw_3|knows_power_throw_1|knows_horse_archery_3,khergit_face_younger_1, khergit_face_old_2], ["khergit_horseman","Khergit Horseman","Khergit Horsemen",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_ranged|tf_guarantee_horse,0,0,fac_khergits, [itm_arrows,itm_light_lance,itm_nomad_bow,itm_sword_khergit_2,itm_tab_shield_small_round_a,itm_tab_shield_small_round_b,itm_spear, itm_leather_steppe_cap_a, itm_leather_steppe_cap_b,itm_nomad_robe,itm_nomad_vest,itm_nomad_boots,itm_hide_boots,itm_spiked_helmet,itm_nomad_cap,itm_steppe_horse,itm_hunter], def_attrib|level(14),wp(80),knows_common|knows_riding_5|knows_power_draw_4|knows_ironflesh_1|knows_power_throw_1,khergit_face_young_1, khergit_face_older_2], ["khergit_horse_archer","Khergit Horse Archer","Khergit Horse Archers",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_ranged|tf_guarantee_horse,0,0,fac_khergits, [itm_arrows,itm_sword_khergit_2,itm_winged_mace,itm_spear,itm_khergit_bow,itm_tab_shield_small_round_a,itm_tab_shield_small_round_a,itm_tab_shield_small_round_b,itm_bodkin_arrows,itm_arrows,itm_javelin, itm_leather_steppe_cap_b,itm_leather_steppe_cap_c,itm_tribal_warrior_outfit,itm_nomad_robe,itm_hide_boots,itm_tab_shield_small_round_a,itm_tab_shield_small_round_b,itm_steppe_horse], def_attrib|level(14),wp(80)|wp_archery(110),knows_riding_5|knows_power_draw_3|knows_ironflesh_1|knows_horse_archery_4|knows_power_throw_1,khergit_face_young_1, khergit_face_older_2], ["khergit_veteran_horse_archer","Khergit Veteran Horse Archer","Khergit Veteran Horse Archers",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_ranged|tf_guarantee_horse|tf_guarantee_shield,0,0,fac_khergits, [itm_sword_khergit_3,itm_winged_mace,itm_spear,itm_khergit_bow,itm_nomad_bow,itm_nomad_bow,itm_arrows,itm_khergit_arrows,itm_khergit_arrows,itm_javelin,itm_tab_shield_small_round_b,itm_tab_shield_small_round_c, itm_leather_steppe_cap_c,itm_leather_warrior_cap,itm_lamellar_vest,itm_tribal_warrior_outfit,itm_hide_boots,itm_saddle_horse,itm_courser], def_attrib|level(21),wp(90)|wp_archery(130),knows_riding_6|knows_power_draw_4|knows_ironflesh_2|knows_horse_archery_5|knows_power_throw_3,khergit_face_middle_1, khergit_face_older_2], ["khergit_lancer","Khergit Lancer","Khergit Lancers",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse|tf_guarantee_shield,0,0,fac_khergits, [itm_arrows,itm_sword_khergit_4,itm_winged_mace,itm_spear,itm_lance,itm_lance,itm_khergit_bow, itm_strong_bow,itm_short_bow,itm_khergit_arrows,itm_arrows, itm_khergit_guard_helmet,itm_khergit_cavalry_helmet,itm_lamellar_vest,itm_lamellar_armor,itm_hide_boots,itm_leather_gloves,itm_tab_shield_small_round_b,itm_tab_shield_small_round_c,itm_courser], def_attrib|level(23),wp(120),knows_riding_6|knows_power_strike_2|knows_power_draw_2|knows_power_throw_2|knows_ironflesh_2|knows_horse_archery_1,khergit_face_middle_1, khergit_face_older_2], ["khergit_messenger","Khergit Messenger","Khergit Messengers",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_horse|tf_guarantee_ranged,0,0,fac_neutral, [itm_sword_khergit_2,itm_leather_jerkin,itm_leather_boots,itm_courser,itm_leather_gloves,itm_short_bow,itm_arrows], def_attrib|agi_21|level(25),wp(130),knows_common|knows_riding_7|knows_horse_archery_5|knows_power_draw_5,khergit_face_young_1, khergit_face_older_2], ["khergit_deserter","Khergit Deserter","Khergit Deserters",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_deserters, [itm_arrows,itm_spiked_mace,itm_axe,itm_sword_khergit_1,itm_short_bow,itm_short_bow,itm_hunting_bow,itm_javelin,itm_javelin,itm_steppe_cap,itm_nomad_cap,itm_leather_vest,itm_leather_vest,itm_nomad_armor,itm_nomad_boots], def_attrib|str_10|level(14),wp(80),knows_ironflesh_1|knows_power_draw_1,khergit_face_young_1, khergit_face_older_2], ["khergit_prison_guard","Prison Guard","Prison Guards", tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_neutral, [itm_sword_khergit_3,itm_tab_shield_small_round_b,itm_tab_shield_small_round_a,itm_lamellar_vest,itm_lamellar_armor,itm_hide_boots,itm_iron_greaves,itm_khergit_guard_helmet,itm_khergit_cavalry_helmet,itm_leather_warrior_cap], def_attrib|level(24),wp(130),knows_athletics_3|knows_shield_2|knows_ironflesh_3,khergit_face_middle_1, khergit_face_older_2], ["khergit_castle_guard","Castle Guard","Castle Guards", tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_neutral, [itm_sword_khergit_4,itm_tab_shield_small_round_b,itm_tab_shield_small_round_a,itm_lamellar_vest,itm_lamellar_armor,itm_hide_boots,itm_iron_greaves,itm_khergit_guard_helmet,itm_khergit_cavalry_helmet,itm_leather_warrior_cap], def_attrib|level(24),wp(130),knows_athletics_3|knows_shield_2|knows_ironflesh_3,khergit_face_middle_1, khergit_face_older_2], ["nord_recruit","Nord Recruit","Nord Recruits",tf_guarantee_boots|tf_guarantee_armor,0,0,fac_outlaws, [itm_axe,itm_hatchet,itm_spear,itm_tab_shield_round_a,itm_tab_shield_round_a, itm_shirt,itm_coarse_tunic,itm_hide_boots,itm_nomad_boots], def_attrib|level(6),wp(50),knows_power_strike_1|knows_power_throw_1|knows_riding_1|knows_athletics_1,nord_face_younger_1, nord_face_old_2], ["nord_footman","Nord Footman","Nord Footmen",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_shield,0,0,fac_outlaws, [itm_fighting_axe,itm_one_handed_war_axe_a,itm_spear,itm_tab_shield_round_a,itm_tab_shield_round_b,itm_javelin,itm_throwing_axes, itm_leather_cap,itm_skullcap,itm_nomad_vest,itm_shirt,itm_leather_boots,itm_nomad_boots], def_attrib|level(10),wp(70),knows_ironflesh_2|knows_power_strike_2|knows_power_throw_2|knows_riding_2|knows_athletics_2|knows_shield_1,nord_face_young_1, nord_face_old_2], ["nord_trained_footman","Nord Trained Footman","Nord Trained Footmen",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_shield|tf_guarantee_helmet,0,0,fac_outlaws, [itm_arrows,itm_one_handed_war_axe_a,itm_one_handed_war_axe_b,itm_one_handed_battle_axe_a,itm_tab_shield_round_b, itm_skullcap,itm_nasal_helmet,itm_byrnie,itm_studded_leather_coat,itm_leather_jerkin,itm_leather_boots], def_attrib|level(14),wp(100),knows_ironflesh_3|knows_power_strike_3|knows_power_throw_2|knows_riding_2|knows_athletics_3|knows_shield_2,nord_face_young_1, nord_face_old_2], ["nord_warrior","Nord Warrior","Nord Warriors",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_shield|tf_guarantee_helmet,0,0,fac_outlaws, [itm_arrows,itm_sword_viking_1,itm_one_handed_war_axe_b,itm_one_handed_battle_axe_a,itm_tab_shield_round_c,itm_javelin, itm_nasal_helmet,itm_byrnie,itm_mail_shirt,itm_mail_hauberk,itm_studded_leather_coat,itm_hunter_boots,itm_leather_boots], def_attrib|level(19),wp(115),knows_ironflesh_4|knows_power_strike_4|knows_power_throw_3|knows_riding_2|knows_athletics_4|knows_shield_3,nord_face_young_1, nord_face_older_2], ["nord_veteran","Nord Veteran","Nord Veterans",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_shield|tf_guarantee_helmet,0,0,fac_outlaws, [itm_arrows,itm_sword_viking_2,itm_sword_viking_2_small,itm_one_handed_battle_axe_b,itm_spiked_mace,itm_tab_shield_round_d,itm_javelin,itm_throwing_axes, itm_nordic_helmet,itm_nasal_helmet,itm_byrnie,itm_mail_hauberk,itm_splinted_leather_greaves,itm_leather_boots,itm_leather_gloves], def_attrib|level(24),wp(130),knows_ironflesh_5|knows_power_strike_5|knows_power_throw_4|knows_riding_3|knows_athletics_5|knows_shield_4,nord_face_young_1, nord_face_older_2], ["nord_champion","Nord Huscarl","Nord Huscarls",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_shield|tf_guarantee_helmet,0,0,fac_outlaws, [itm_arrows,itm_sword_viking_3,itm_sword_viking_3_small,itm_great_axe,itm_one_handed_battle_axe_c,itm_tab_shield_round_e,itm_javelin,itm_throwing_axes,itm_throwing_axes, itm_nordic_helmet,itm_banded_armor,itm_mail_boots,itm_leather_boots,itm_mail_mittens], def_attrib|level(28),wp(145),knows_ironflesh_6|knows_power_strike_7|knows_power_throw_5|knows_riding_2|knows_athletics_6|knows_shield_5,nord_face_middle_1, nord_face_older_2], ["nord_huntsman","Nord Huntsman","Nord Huntsmen",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_neutral, [itm_arrows,itm_hatchet,itm_hunting_bow,itm_shirt,itm_shirt,itm_hide_boots], def_attrib|str_10|level(11),wp_melee(60)|wp_archery(70),knows_ironflesh_1|knows_power_draw_1|knows_athletics_2,nord_face_young_1, nord_face_old_2], ["nord_archer","Nord Archer","Nord Archers",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_neutral, [itm_arrows,itm_axe,itm_short_bow,itm_leather_jerkin,itm_shirt,itm_leather_boots,itm_nasal_helmet,itm_leather_cap], def_attrib|str_11|level(15),wp_melee(80)|wp_archery(90),knows_ironflesh_1|knows_power_draw_2|knows_athletics_3,nord_face_young_1, nord_face_old_2], ["nord_veteran_archer","Nord Veteran Archer","Nord Veteran Archers",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_neutral, [itm_arrows,itm_one_handed_war_axe_a,itm_sword_viking_1,itm_long_bow,itm_leather_jerkin,itm_padded_leather,itm_leather_boots,itm_nasal_helmet,itm_leather_cap], def_attrib|str_12|level(19),wp_melee(95)|wp_archery(110),knows_power_strike_1|knows_ironflesh_2|knows_power_draw_3|knows_athletics_4,nord_face_middle_1, nord_face_older_2], ["nord_messenger","Nord Messenger","Nord Messengers",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_horse|tf_guarantee_ranged,0,0,fac_neutral, [itm_sword_viking_2,itm_leather_jerkin,itm_leather_boots,itm_courser,itm_leather_gloves,itm_short_bow,itm_arrows], def_attrib|agi_21|level(25),wp(130),knows_common|knows_riding_7|knows_horse_archery_5|knows_power_draw_5,nord_face_young_1, nord_face_older_2], ["nord_deserter","Nord Deserter","Nord Deserters",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_deserters, [itm_arrows,itm_spiked_mace,itm_axe,itm_falchion,itm_short_bow,itm_short_bow,itm_hunting_bow,itm_javelin,itm_javelin,itm_steppe_cap,itm_nomad_cap,itm_leather_vest,itm_leather_vest,itm_nomad_armor,itm_nomad_boots], def_attrib|str_10|level(14),wp(80),knows_ironflesh_1|knows_power_draw_1,nord_face_young_1, nord_face_older_2], ["nord_prison_guard","Prison Guard","Prison Guards", tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_neutral, [itm_ashwood_pike,itm_battle_fork,itm_battle_axe,itm_fighting_axe,itm_tab_shield_round_d,itm_mail_hauberk,itm_mail_chausses,itm_iron_greaves,itm_nordic_helmet,itm_nordic_helmet,itm_nordic_helmet,itm_spiked_helmet,itm_leather_gloves], def_attrib|level(24),wp(130),knows_athletics_3|knows_shield_2|knows_ironflesh_3,nord_face_middle_1, nord_face_older_2], ["nord_castle_guard","Castle Guard","Castle Guards", tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_neutral, [itm_ashwood_pike,itm_battle_fork,itm_battle_axe,itm_fighting_axe,itm_tab_shield_round_d,itm_tab_shield_round_e,itm_mail_hauberk,itm_heraldic_mail_with_tabard,itm_mail_chausses,itm_iron_greaves,itm_nordic_helmet,itm_nordic_helmet,itm_nordic_helmet,itm_spiked_helmet,itm_leather_gloves], def_attrib|level(24),wp(130),knows_athletics_3|knows_shield_2|knows_ironflesh_3,nord_face_middle_1, nord_face_older_2], ["rhodok_tribesman","Rhodok Tribesman","Rhodok Tribesmen",tf_guarantee_boots|tf_guarantee_armor,0,0,fac_kingdom_5, [itm_pitch_fork,itm_tab_shield_pavise_a, itm_shirt,itm_coarse_tunic,itm_wrapping_boots,itm_nomad_boots,itm_head_wrappings], def_attrib|level(4),wp(55),knows_common|knows_power_draw_2|knows_ironflesh_1,rhodok_face_younger_1, rhodok_face_old_2], ["rhodok_spearman","Rhodok Spearman","Rhodok Spearmen",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_shield,0,0,fac_kingdom_5, [itm_spear,itm_tab_shield_pavise_a,itm_tab_shield_pavise_a, itm_leather_cap,itm_common_hood,itm_leather_vest,itm_leather_vest,itm_wrapping_boots,itm_nomad_boots], def_attrib|level(9),wp(80),knows_common|knows_ironflesh_2|knows_shield_1|knows_power_strike_2|knows_athletics_1,rhodok_face_young_1, rhodok_face_old_2], ["rhodok_trained_spearman","Rhodok Trained Spearman","Rhodok Trained Spearmen",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_shield,0,0,fac_kingdom_5, [itm_pike,itm_spear,itm_tab_shield_pavise_b, itm_leather_cap,itm_leather_vest,itm_ragged_outfit,itm_padded_cloth,itm_gambeson,itm_nomad_boots], def_attrib|level(14),wp(105),knows_common|knows_ironflesh_3|knows_shield_2|knows_power_strike_2|knows_athletics_2,rhodok_face_young_1, rhodok_face_older_2], ["rhodok_veteran_spearman","Rhodok Veteran Spearman","Rhodok Veteran Spearmen",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_shield,0,0,fac_kingdom_5, [itm_ashwood_pike,itm_war_spear,itm_pike,itm_club_with_spike_head,itm_tab_shield_pavise_c,itm_sword_medieval_a, itm_leather_cap,itm_byrnie,itm_ragged_outfit,itm_nomad_boots], def_attrib|level(19),wp(115),knows_common|knows_ironflesh_5|knows_shield_3|knows_power_strike_4|knows_athletics_3,rhodok_face_young_1, rhodok_face_older_2], ["rhodok_sergeant","Rhodok Sergeant","Rhodok Sergeants",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_shield,0,0,fac_kingdom_5, [itm_glaive,itm_war_spear,itm_sword_medieval_b,itm_tab_shield_pavise_d, itm_kettle_hat, itm_guard_helmet,itm_spiked_helmet,itm_byrnie,itm_surcoat_over_mail,itm_banded_armor,itm_nomad_boots,], def_attrib|level(24),wp(130),knows_common|knows_ironflesh_7|knows_shield_5|knows_power_strike_5|knows_athletics_5,rhodok_face_middle_1, rhodok_face_older_2], ["rhodok_crossbowman","Rhodok Crossbowman","Rhodok Crossbowmen",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_ranged,0,0,fac_kingdom_5, [itm_sword_medieval_a,itm_falchion,itm_club_with_spike_head,itm_tab_shield_pavise_a,itm_crossbow,itm_bolts, itm_leather_jerkin,itm_ragged_outfit,itm_nomad_boots], def_attrib|level(10),wp(85),knows_common|knows_ironflesh_2|knows_shield_1|knows_power_strike_1|knows_athletics_2,rhodok_face_young_1, rhodok_face_older_2], ["rhodok_trained_crossbowman","Rhodok Trained Crossbowman","Rhodok Trained Crossbowmen",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_ranged|tf_guarantee_shield,0,0,fac_kingdom_5, [itm_sword_medieval_a,itm_sword_medieval_b_small,itm_club_with_spike_head,itm_tab_shield_pavise_a,itm_tab_shield_pavise_a,itm_crossbow,itm_bolts, itm_leather_cap,itm_leather_jerkin,itm_ragged_outfit,itm_nomad_boots], def_attrib|level(15),wp_melee(90)|wp_crossbow(105),knows_common|knows_ironflesh_3|knows_shield_2|knows_power_strike_2|knows_athletics_3,rhodok_face_young_1, rhodok_face_older_2], ["rhodok_veteran_crossbowman","Rhodok Veteran Crossbowman","Rhodok Veteran Crossbowmen",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_ranged|tf_guarantee_shield,0,0,fac_kingdom_5, [itm_sword_medieval_a,itm_sword_medieval_b_small,itm_fighting_pick,itm_club_with_spike_head,itm_tab_shield_pavise_a,itm_tab_shield_pavise_b,itm_tab_shield_pavise_c,itm_heavy_crossbow,itm_bolts, itm_leather_cap,itm_leather_jerkin,itm_padded_leather,itm_nomad_boots], def_attrib|level(20),wp_melee(100)|wp_crossbow(120),knows_common|knows_ironflesh_4|knows_shield_3|knows_power_strike_3|knows_athletics_4,rhodok_face_middle_1, rhodok_face_older_2], ["rhodok_sharpshooter","Rhodok Sharpshooter","Rhodok Sharpshooters",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_ranged|tf_guarantee_shield,0,0,fac_kingdom_5, [itm_sword_medieval_b,itm_military_pick,itm_tab_shield_pavise_c,itm_sniper_crossbow,itm_steel_bolts, itm_kettle_hat,itm_leather_cap,itm_byrnie,itm_padded_leather,itm_leather_boots], def_attrib|level(25),wp_melee(110)|wp_crossbow(140),knows_common|knows_ironflesh_5|knows_shield_4|knows_power_strike_4|knows_athletics_6,rhodok_face_middle_1, rhodok_face_older_2], ["rhodok_messenger","Rhodok Messenger","Rhodok Messengers",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_horse|tf_guarantee_ranged,0,0,fac_neutral, [itm_sword_medieval_b,itm_leather_jerkin,itm_leather_boots,itm_courser,itm_leather_gloves,itm_short_bow,itm_arrows], def_attrib|agi_21|level(25),wp(130),knows_common|knows_riding_7|knows_horse_archery_5|knows_power_draw_5,rhodok_face_middle_1, rhodok_face_older_2], ["rhodok_deserter","Rhodok Deserter","Rhodok Deserters",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_deserters, [itm_arrows,itm_spiked_mace,itm_axe,itm_falchion,itm_short_bow,itm_short_bow,itm_hunting_bow,itm_javelin,itm_javelin,itm_steppe_cap,itm_nomad_cap,itm_leather_vest,itm_leather_vest,itm_nomad_armor,itm_nomad_boots], def_attrib|str_10|level(14),wp(80),knows_ironflesh_1|knows_power_draw_1,rhodok_face_middle_1, rhodok_face_older_2], ["rhodok_prison_guard","Prison Guard","Prison Guards", tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_neutral, [itm_ashwood_pike,itm_battle_fork,itm_battle_axe,itm_fighting_axe,itm_tab_shield_pavise_b,itm_mail_hauberk,itm_byrnie,itm_mail_chausses,itm_iron_greaves,itm_guard_helmet,itm_leather_gloves], def_attrib|level(24),wp(130),knows_athletics_3|knows_shield_2|knows_ironflesh_3,rhodok_face_middle_1, rhodok_face_older_2], ["rhodok_castle_guard","Castle Guard","Castle Guards", tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_neutral, [itm_ashwood_pike,itm_battle_fork,itm_battle_axe,itm_fighting_axe,itm_tab_shield_pavise_c,itm_mail_hauberk,itm_byrnie,itm_mail_chausses,itm_iron_greaves,itm_guard_helmet,itm_leather_gloves], def_attrib|level(24),wp(130),knows_athletics_3|knows_shield_2|knows_ironflesh_3,rhodok_face_middle_1, rhodok_face_older_2], # Ryan BEGIN ["looter","Looter","Looters",0,0,0,fac_outlaws, [itm_hatchet,itm_club,itm_butchering_knife,itm_falchion,itm_rawhide_coat,itm_stones,itm_nomad_armor,itm_nomad_armor,itm_woolen_cap,itm_woolen_cap,itm_nomad_boots,itm_wrapping_boots], def_attrib|level(4),wp(20),knows_common,bandit_face1, bandit_face2], # Ryan END ["bandit","Bandit","Bandits",tf_guarantee_armor,0,0,fac_outlaws, [itm_arrows,itm_spiked_mace,itm_sword_viking_1,itm_short_bow,itm_falchion,itm_nordic_shield,itm_rawhide_coat,itm_leather_cap,itm_leather_jerkin,itm_nomad_armor,itm_nomad_boots,itm_wrapping_boots,itm_saddle_horse], def_attrib|level(10),wp(60),knows_common|knows_power_draw_1,bandit_face1, bandit_face2], ["brigand","Brigand","Brigands",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_outlaws, [itm_arrows,itm_spiked_mace,itm_sword_viking_1,itm_falchion,itm_wooden_shield,itm_hide_covered_round_shield,itm_long_bow,itm_leather_cap,itm_leather_jerkin,itm_nomad_boots,itm_saddle_horse], def_attrib|level(16),wp(90),knows_common|knows_power_draw_3,bandit_face1, bandit_face2], ["mountain_bandit","Mountain Bandit","Mountain Bandits",tf_guarantee_armor|tf_guarantee_boots,0,0,fac_outlaws, [itm_arrows,itm_sword_viking_1,itm_spear,itm_winged_mace,itm_maul,itm_falchion,itm_short_bow,itm_javelin,itm_fur_covered_shield,itm_hide_covered_round_shield, itm_felt_hat,itm_head_wrappings,itm_skullcap,itm_khergit_armor,itm_nomad_armor,itm_rawhide_coat,itm_nomad_vest,itm_hide_boots,itm_nomad_boots,itm_wooden_shield,itm_nordic_shield,itm_saddle_horse], def_attrib|level(11),wp(90),knows_common|knows_power_draw_2,rhodok_face_young_1, rhodok_face_old_2], ["forest_bandit","Forest Bandit","Forest Bandits",tf_guarantee_armor|tf_guarantee_ranged|tf_guarantee_boots,0,0,fac_outlaws, [itm_arrows,itm_axe,itm_hatchet,itm_quarter_staff,itm_short_bow,itm_hunting_bow, itm_common_hood,itm_black_hood,itm_shirt,itm_padded_leather,itm_leather_jerkin,itm_ragged_outfit,itm_hide_boots,itm_leather_boots], def_attrib|level(11),wp(90),knows_common|knows_power_draw_3,swadian_face_young_1, swadian_face_old_2], ["sea_raider","Sea Raider","Sea Raiders",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_shield,0,0,fac_outlaws, [itm_arrows,itm_sword_viking_1,itm_sword_viking_2,itm_fighting_axe,itm_battle_axe,itm_spear,itm_nordic_shield,itm_nordic_shield,itm_nordic_shield,itm_wooden_shield,itm_long_bow,itm_javelin,itm_throwing_axes, itm_nordic_helmet,itm_nordic_helmet,itm_nasal_helmet,itm_leather_jerkin,itm_byrnie,itm_leather_jerkin,itm_leather_boots, itm_nomad_boots], def_attrib|level(16),wp(110),knows_ironflesh_2|knows_power_strike_2|knows_power_draw_3|knows_power_throw_2|knows_riding_1|knows_athletics_2,nord_face_young_1, nord_face_old_2], ["steppe_bandit","Steppe Bandit","Steppe Bandits",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse|tf_guarantee_ranged|tf_mounted,0,0,fac_outlaws, [itm_arrows,itm_sword_khergit_1,itm_winged_mace,itm_spear, itm_light_lance,itm_nomad_bow,itm_nomad_bow,itm_short_bow,itm_jarid,itm_leather_steppe_cap_a,itm_leather_steppe_cap_b,itm_leather_steppe_cap_c,itm_khergit_armor,itm_nomad_armor,itm_steppe_armor,itm_leather_vest,itm_hide_boots,itm_nomad_boots,itm_leather_covered_round_shield,itm_leather_covered_round_shield,itm_saddle_horse,itm_steppe_horse,itm_steppe_horse], def_attrib|level(12),wp(100),knows_riding_4|knows_horse_archery_3|knows_power_draw_3,khergit_face_young_1, khergit_face_old_2], ["black_khergit_horseman","Black Khergit Horseman","Black Khergit Horsemen",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_black_khergits, [itm_arrows,itm_sword_khergit_2,itm_scimitar,itm_scimitar,itm_winged_mace,itm_spear,itm_lance,itm_khergit_bow,itm_khergit_bow,itm_nomad_bow,itm_nomad_bow,itm_steppe_cap,itm_nomad_cap,itm_khergit_war_helmet,itm_khergit_war_helmet,itm_mail_hauberk,itm_lamellar_armor,itm_hide_boots,itm_plate_covered_round_shield,itm_plate_covered_round_shield,itm_saddle_horse,itm_steppe_horse], def_attrib|level(21),wp(100),knows_riding_3|knows_ironflesh_3|knows_horse_archery_3|knows_power_draw_3,khergit_face_young_1, khergit_face_old_2], ["manhunter","Manhunter","Manhunters",tf_guarantee_armor,0,0,fac_manhunters, [itm_spiked_mace,itm_club,itm_woolen_cap,itm_rawhide_coat,itm_coarse_tunic,itm_nomad_armor,itm_nordic_shield,itm_nomad_boots,itm_wrapping_boots,itm_sumpter_horse], def_attrib|level(10),wp(50),knows_common,bandit_face1, bandit_face2], ## ["deserter","Deserter","Deserters",tf_guarantee_boots|tf_guarantee_armor,0,0,fac_swadian_deserters, ## [itm_arrows,itm_spear,itm_fighting_pick,itm_short_bow,itm_sword,itm_voulge,itm_nordic_shield,itm_round_shield,itm_kettle_hat,itm_leather_cap,itm_padded_cloth,itm_leather_armor,itm_scale_armor,itm_saddle_horse], ## def_attrib|level(12),wp(60),knows_common,bandit_face1, bandit_face2], #fac_slavers ## ["slave_keeper","Slave Keeper","Slave Keepers",tf_guarantee_armor,0,0,fac_slavers, ## [itm_cudgel,itm_club,itm_woolen_cap,itm_rawhide_coat,itm_coarse_tunic,itm_nomad_armor,itm_nordic_shield,itm_nomad_boots,itm_wrapping_boots,itm_sumpter_horse], ## def_attrib|level(10),wp(60),knows_common,bandit_face1, bandit_face2], ["slave_driver","Slave Driver","Slave Drivers",tf_guarantee_armor,0,0,fac_slavers, [itm_spiked_mace,itm_club,itm_woolen_cap,itm_rawhide_coat,itm_coarse_tunic,itm_nomad_armor,itm_nordic_shield,itm_nomad_boots,itm_wrapping_boots,itm_sumpter_horse], def_attrib|level(14),wp(80),knows_common,bandit_face1, bandit_face2], ["slave_hunter","Slave Hunter","Slave Hunters",tf_guarantee_armor,0,0,fac_slavers, [itm_winged_mace,itm_club,itm_woolen_cap,itm_rawhide_coat,itm_coarse_tunic,itm_nomad_armor,itm_nordic_shield,itm_nomad_boots,itm_wrapping_boots,itm_sumpter_horse], def_attrib|level(18),wp(90),knows_common,bandit_face1, bandit_face2], ["slave_crusher","Slave Crusher","Slave Crushers",tf_mounted|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_slavers, [itm_maul,itm_winged_mace,itm_leather_vest,itm_nordic_shield,itm_nomad_boots,itm_leather_boots,itm_saddle_horse], def_attrib|level(22),wp(110),knows_common|knows_power_strike_2,bandit_face1, bandit_face2], ["slaver_chief","Slaver Chief","Slaver Chiefs",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse,0,0,fac_slavers, [itm_maul,itm_winged_mace,itm_mail_hauberk,itm_steel_shield,itm_nomad_boots,itm_leather_boots,itm_hunter], def_attrib|level(26),wp(130),knows_common|knows_riding_3|knows_power_strike_3,bandit_face1, bandit_face2], #Rhodok tribal, Hunter, warrior, veteran, warchief # ["undead_walker","undead_walker","undead_walkers",tf_undead|tf_allways_fall_dead,0,0,fac_undeads, # [], # def_attrib|level(3),wp(60),knows_common,undead_face1, undead_face2], # ["undead_horseman","undead_horseman","undead_horsemen",tf_undead|tf_allways_fall_dead|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse,0,0,fac_undeads, # [], # def_attrib|level(19),wp(100),knows_common,undead_face1, undead_face2], # ["undead_nomad","undead_nomad","undead_nomads",tf_undead|tf_allways_fall_dead|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_black_khergits, # [], # def_attrib|level(21),wp(100),knows_common|knows_riding_4,khergit_face1, khergit_face2], # ["undead","undead","undead",tf_undead|tf_allways_fall_dead,0,0,fac_undeads, # [], # def_attrib|level(3),wp(60),knows_common,undead_face1, undead_face2], # ["hell_knight","hell_knight","hell_knights",tf_undead|tf_allways_fall_dead|tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_undeads, # [], # def_attrib|level(23),wp(100),knows_common|knows_riding_3,undead_face1, undead_face2], ["follower_woman","Camp Follower","Camp Follower",tf_female|tf_guarantee_armor,0,0,fac_commoners, [itm_bolts,itm_light_crossbow,itm_short_bow,itm_crossbow,itm_nordic_shield,itm_hide_covered_round_shield,itm_hatchet,itm_hand_axe,itm_voulge,itm_fighting_pick,itm_club,itm_dress,itm_woolen_dress, itm_skullcap, itm_wrapping_boots], def_attrib|level(5),wp(70),knows_common,refugee_face1,refugee_face2], ["hunter_woman","Huntress","Huntresses",tf_female|tf_guarantee_armor,0,0,fac_commoners, [itm_bolts,itm_arrows,itm_light_crossbow,itm_short_bow,itm_crossbow,itm_nordic_shield,itm_hide_covered_round_shield,itm_hatchet,itm_hand_axe,itm_voulge,itm_fighting_pick,itm_club,itm_dress,itm_woolen_dress, itm_skullcap, itm_wrapping_boots], def_attrib|level(10),wp(85),knows_common,refugee_face1,refugee_face2], ["fighter_woman","Camp Defender","Camp Defenders",tf_female|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_commoners, [itm_bolts,itm_arrows,itm_light_crossbow,itm_short_bow,itm_crossbow,itm_fur_covered_shield,itm_hide_covered_round_shield,itm_hatchet,itm_voulge,itm_leather_jerkin,itm_leather_vest, itm_skullcap, itm_wrapping_boots], def_attrib|level(16),wp(100),knows_common|knows_riding_3|knows_athletics_2|knows_ironflesh_1,refugee_face1,refugee_face2], ["sword_sister","Sword Sister","Sword Sisters",tf_female|tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_shield|tf_guarantee_horse,0,0,fac_commoners, [itm_bolts,itm_sword_medieval_b,itm_sword_khergit_3,itm_plate_covered_round_shield,itm_tab_shield_small_round_c, itm_crossbow,itm_plate_armor,itm_coat_of_plates,itm_mail_chausses,itm_iron_greaves,itm_guard_helmet,itm_helmet_with_neckguard,itm_courser,itm_leather_gloves], def_attrib|level(22),wp(140),knows_common|knows_riding_5|knows_athletics_3|knows_ironflesh_2|knows_shield_2,refugee_face1,refugee_face2], ["refugee","Refugee","Refugees",tf_female|tf_guarantee_armor,0,0,fac_commoners, [itm_knife,itm_pitch_fork,itm_sickle,itm_hatchet,itm_club,itm_dress,itm_robe,itm_woolen_dress, itm_headcloth, itm_woolen_hood, itm_wrapping_boots], def_attrib|level(1),wp(45),knows_common,refugee_face1,refugee_face2], ["peasant_woman","Peasant Woman","Peasant Women",tf_female|tf_guarantee_armor,0,0,fac_commoners, [itm_knife,itm_pitch_fork,itm_sickle,itm_hatchet,itm_club,itm_dress,itm_woolen_dress, itm_headcloth, itm_woolen_hood, itm_wrapping_boots], def_attrib|level(1),wp(40),knows_common,refugee_face1,refugee_face2], ["caravan_master","Caravan Master","Caravan Masters",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_commoners, [itm_sword_medieval_c,itm_fur_coat,itm_hide_boots,itm_saddle_horse, itm_saddle_horse,itm_saddle_horse,itm_saddle_horse, itm_leather_jacket, itm_leather_cap], def_attrib|level(9),wp(100),knows_common|knows_riding_4|knows_ironflesh_3,mercenary_face_1, mercenary_face_2], ["kidnapped_girl","Kidnapped Girl","Kidnapped Girls",tf_hero|tf_female|tf_randomize_face|tf_unmoveable_in_party_window,0,reserved,fac_commoners, [itm_dress,itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2,woman_face_1, woman_face_2], #This troop is the troop marked as soldiers_end ["town_walker_1","Townsman","Townsmen",tf_guarantee_boots|tf_guarantee_armor,0,0,fac_commoners, [itm_short_tunic, itm_linen_tunic,itm_fur_coat, itm_coarse_tunic, itm_tabard, itm_leather_vest, itm_arena_tunic_white, itm_leather_apron, itm_shirt, itm_arena_tunic_green, itm_arena_tunic_blue, itm_woolen_hose, itm_nomad_boots, itm_blue_hose, itm_hide_boots, itm_ankle_boots, itm_leather_boots, itm_fur_hat, itm_leather_cap, itm_straw_hat, itm_felt_hat], def_attrib|level(4),wp(60),knows_common,man_face_young_1, man_face_old_2], ["town_walker_2","Townswoman","Townswomen",tf_female|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_commoners, [itm_blue_dress, itm_dress, itm_woolen_dress, itm_peasant_dress, itm_woolen_hose, itm_blue_hose, itm_wimple_a, itm_wimple_with_veil, itm_female_hood], def_attrib|level(2),wp(40),knows_common,woman_face_1,woman_face_2], ["village_walker_1","Villager","Villagers",tf_guarantee_boots|tf_guarantee_armor,0,0,fac_commoners, [itm_short_tunic, itm_linen_tunic, itm_coarse_tunic, itm_leather_vest, itm_leather_apron, itm_shirt, itm_woolen_hose, itm_nomad_boots, itm_blue_hose, itm_hide_boots, itm_ankle_boots, itm_leather_boots, itm_fur_hat, itm_leather_cap, itm_straw_hat, itm_felt_hat], def_attrib|level(4),wp(60),knows_common,man_face_younger_1, man_face_older_2], ["village_walker_2","Villager","Villagers",tf_female|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_commoners, [itm_blue_dress, itm_dress, itm_woolen_dress, itm_peasant_dress, itm_woolen_hose, itm_blue_hose, itm_wimple_a, itm_wimple_with_veil, itm_female_hood], def_attrib|level(2),wp(40),knows_common,woman_face_1,woman_face_2], ["spy_walker_1","Townsman","Townsmen",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_commoners, [itm_short_tunic, itm_linen_tunic, itm_coarse_tunic, itm_tabard, itm_leather_vest, itm_robe, itm_leather_apron, itm_shirt, itm_woolen_hose, itm_nomad_boots, itm_blue_hose, itm_hide_boots, itm_ankle_boots, itm_leather_boots, itm_fur_hat, itm_leather_cap, itm_straw_hat, itm_felt_hat], def_attrib|level(4),wp(60),knows_common,man_face_middle_1, man_face_old_2], ["spy_walker_2","Townswoman","Townswomen",tf_female|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_commoners, [itm_blue_dress, itm_dress, itm_woolen_dress, itm_peasant_dress, itm_woolen_hose, itm_blue_hose, itm_wimple_a, itm_wimple_with_veil, itm_female_hood], def_attrib|level(2),wp(40),knows_common,woman_face_1,woman_face_2], # Ryan END # Zendar ["tournament_master","Tournament Master","Tournament Master",tf_hero, scn_zendar_center|entry(1),reserved, fac_commoners,[itm_nomad_armor,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common,0x000000000008414401e28f534c8a2d09], ["trainer","Trainer","Trainer",tf_hero, scn_zendar_center|entry(2),reserved, fac_commoners,[itm_leather_jerkin,itm_hide_boots],def_attrib|level(2),wp(20),knows_common,0x00000000000430c701ea98836781647f], ["Constable_Hareck","Constable Hareck","Constable Hareck",tf_hero, scn_zendar_center|entry(5),reserved, fac_commoners,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,0x00000000000c41c001fb15234eb6dd3f], # Ryan BEGIN ["Ramun_the_slave_trader","Ramun, the slave trader","Ramun, the slave trader",tf_hero, no_scene,reserved, fac_commoners,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,0x0000000fd5105592385281c55b8e44eb00000000001d9b220000000000000000], ["guide","Quick Jimmy","Quick Jimmy",tf_hero, no_scene,0, fac_commoners,[itm_coarse_tunic,itm_hide_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x00000000000c318301f24e38a36e38e3], # Ryan END ["Xerina","Xerina","Xerina",tf_hero|tf_female, scn_the_happy_boar|entry(5),reserved, fac_commoners,[itm_leather_jerkin,itm_hide_boots],def_attrib|str_15|agi_15|level(39),wp(312),knows_power_strike_5|knows_ironflesh_5|knows_riding_6|knows_power_draw_4|knows_athletics_8|knows_shield_3,0x00000001ac0820074920561d0b51e6ed00000000001d40ed0000000000000000], ["Dranton","Dranton","Dranton",tf_hero, scn_the_happy_boar|entry(2),reserved, fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|str_15|agi_14|level(42),wp(324),knows_power_strike_5|knows_ironflesh_7|knows_riding_4|knows_power_draw_4|knows_athletics_4|knows_shield_3,0x0000000a460c3002470c50f3502879f800000000001ce0a00000000000000000], ["Kradus","Kradus","Kradus",tf_hero, scn_the_happy_boar|entry(3),reserved, fac_commoners,[itm_padded_leather,itm_hide_boots],def_attrib|str_15|agi_14|level(43),wp(270),knows_power_strike_5|knows_ironflesh_7|knows_riding_4|knows_power_draw_4|knows_athletics_4|knows_shield_3,0x0000000f5b1052c61ce1a9521db1375200000000001ed31b0000000000000000], #Tutorial ["tutorial_trainer","Training Ground Master","Training Ground Master",tf_hero, scn_training_ground|entry(2),reserved, fac_commoners,[itm_robe,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common,0x000000000008414401e28f534c8a2d09], #Sargoth #halkard, hardawk. lord_taucard lord_caupard. lord_paugard #Salt mine ["Galeas","Galeas","Galeas",tf_hero, 0, reserved, fac_commoners,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,0x000000000004718201c073191a9bb10c], #Dhorak keep ["farmer_from_bandit_village","Farmer","Farmers",tf_guarantee_armor,no_scene,reserved,fac_commoners, [itm_linen_tunic,itm_coarse_tunic,itm_shirt,itm_nomad_boots,itm_wrapping_boots], def_attrib|level(4),wp(60),knows_common,man_face_middle_1, man_face_older_2], ["trainer_1","Trainer","Trainer",tf_hero, scn_training_ground_ranged_melee_1|entry(6),reserved, fac_commoners,[itm_leather_jerkin,itm_hide_boots],def_attrib|level(2),wp(20),knows_common,0x0000000d0d1030c74ae8d661b651c6840000000000000e220000000000000000], ["trainer_2","Trainer","Trainer",tf_hero, scn_training_ground_ranged_melee_2|entry(6),reserved, fac_commoners,[itm_nomad_vest,itm_hide_boots],def_attrib|level(2),wp(20),knows_common,0x0000000e5a04360428ec253846640b5d0000000000000ee80000000000000000], ["trainer_3","Trainer","Trainer",tf_hero, scn_training_ground_ranged_melee_3|entry(6),reserved, fac_commoners,[itm_padded_leather,itm_hide_boots],def_attrib|level(2),wp(20),knows_common,0x0000000e4a0445822ca1a11ab1e9eaea0000000000000f510000000000000000], ["trainer_4","Trainer","Trainer",tf_hero, scn_training_ground_ranged_melee_4|entry(6),reserved, fac_commoners,[itm_leather_jerkin,itm_hide_boots],def_attrib|level(2),wp(20),knows_common,0x0000000e600452c32ef8e5bb92cf1c970000000000000fc20000000000000000], ["trainer_5","Trainer","Trainer",tf_hero, scn_training_ground_ranged_melee_5|entry(6),reserved, fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|level(2),wp(20),knows_common,0x0000000e77082000150049a34c42ec960000000000000e080000000000000000], # Ransom brokers. ["ransom_broker_1","Ransom_Broker","Ransom_Broker",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], ["ransom_broker_2","Ransom_Broker","Ransom_Broker",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_tabard,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], ["ransom_broker_3","Ransom_Broker","Ransom_Broker",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], ["ransom_broker_4","Ransom_Broker","Ransom_Broker",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_short_tunic,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], ["ransom_broker_5","Ransom_Broker","Ransom_Broker",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_gambeson,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], ["ransom_broker_6","Ransom_Broker","Ransom_Broker",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_blue_gambeson,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], ["ransom_broker_7","Ransom_Broker","Ransom_Broker",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_red_gambeson,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], ["ransom_broker_8","Ransom_Broker","Ransom_Broker",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_fur_coat,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], ["ransom_broker_9","Ransom_Broker","Ransom_Broker",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], ["ransom_broker_10","Ransom_Broker","Ransom_Broker",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], # Tavern traveler. ["tavern_traveler_1","Traveller","Traveller",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_fur_coat,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], ["tavern_traveler_2","Traveller","Traveller",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_tabard,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], ["tavern_traveler_3","Traveller","Traveller",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], ["tavern_traveler_4","Traveller","Traveller",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_blue_gambeson,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], ["tavern_traveler_5","Traveller","Traveller",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_short_tunic,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], ["tavern_traveler_6","Traveller","Traveller",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_fur_coat,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], ["tavern_traveler_7","Traveller","Traveller",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], ["tavern_traveler_8","Traveller","Traveller",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_tabard,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], ["tavern_traveler_9","Traveller","Traveller",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_fur_coat,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], ["tavern_traveler_10","Traveller","Traveller",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], # Tavern traveler. ["tavern_bookseller_1","Book_Merchant","Book_Merchant",tf_hero|tf_is_merchant|tf_randomize_face, 0, reserved, fac_commoners,[itm_fur_coat,itm_hide_boots, itm_book_tactics, itm_book_persuasion, itm_book_wound_treatment_reference, itm_book_leadership, itm_book_intelligence, itm_book_training_reference, itm_book_surgery_reference],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], ["tavern_bookseller_2","Book_Merchant","Book_Merchant",tf_hero|tf_is_merchant|tf_randomize_face, 0, reserved, fac_commoners,[itm_fur_coat,itm_hide_boots, itm_book_wound_treatment_reference, itm_book_leadership, itm_book_intelligence, itm_book_trade, itm_book_engineering, itm_book_weapon_mastery],def_attrib|level(5),wp(20),knows_common,merchant_face_1, merchant_face_2], # Tavern minstrel. ["tavern_minstrel_1","Minstrel","Minstrel",tf_hero|tf_randomize_face, 0, reserved, fac_commoners,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,merchant_face_1,merchant_face_2], #NPC system changes begin #Companions ["npc1","Borcha","Borcha",tf_hero|tf_unmoveable_in_party_window, 0, reserved, fac_commoners,[itm_khergit_armor,itm_nomad_boots,itm_knife], str_8|agi_7|int_12|cha_7|level(3),wp(60),knows_tracker_npc| knows_ironflesh_1|knows_power_strike_1|knows_pathfinding_3|knows_athletics_2|knows_tracking_1|knows_riding_2, #skills 2/3 player at that level 0x00000004bf086143259d061a9046e23500000000001db52c0000000000000000], ["npc2","Marnid","Marnid", tf_hero|tf_unmoveable_in_party_window, 0,reserved, fac_commoners,[itm_linen_tunic,itm_hide_boots,itm_club], str_7|agi_7|int_11|cha_6|level(1),wp(40),knows_merchant_npc| knows_trade_2|knows_weapon_master_1|knows_ironflesh_1|knows_wound_treatment_1|knows_athletics_2|knows_first_aid_1|knows_leadership_1, 0x000000019d004001570b893712c8d28d00000000001dc8990000000000000000], ["npc3","Ymira","Ymira",tf_female|tf_hero|tf_unmoveable_in_party_window, 0, reserved, fac_commoners,[itm_dress,itm_woolen_hose,itm_knife], str_6|agi_9|int_11|cha_6|level(1),wp(20),knows_merchant_npc| knows_wound_treatment_1|knows_trade_1|knows_first_aid_3|knows_surgery_1|knows_athletics_1|knows_riding_1, 0x0000000083040001583b6db8dec5925b00000000001d80980000000000000000], ["npc4","Rolf","Rolf",tf_hero|tf_unmoveable_in_party_window, 0, reserved, fac_commoners,[itm_leather_jerkin,itm_nomad_boots, itm_sword_medieval_a], str_10|agi_9|int_13|cha_10|level(10),wp(110),knows_warrior_npc| knows_weapon_master_2|knows_power_strike_2|knows_riding_2|knows_athletics_2|knows_power_throw_2|knows_first_aid_1|knows_surgery_1|knows_tactics_2|knows_leadership_2, 0x000000057f1074002c75c6a8a58ad72e00000000001e1a890000000000000000], ["npc5","Baheshtur","Baheshtur",tf_hero|tf_unmoveable_in_party_window, 0, reserved, fac_commoners,[itm_nomad_vest,itm_nomad_boots, itm_sword_khergit_1], str_9|agi_9|int_12|cha_7|level(5),wp(90),knows_warrior_npc| knows_riding_2|knows_horse_archery_3|knows_power_draw_3|knows_leadership_2|knows_weapon_master_1, 0x000000088910318b5c6f972328324a6200000000001cd3310000000000000000], ["npc6","Firentis","Firentis",tf_hero|tf_unmoveable_in_party_window, 0, reserved, fac_commoners,[itm_tabard,itm_nomad_boots, itm_sword_medieval_a], str_10|agi_12|int_10|cha_5|level(6),wp(105),knows_warrior_npc| knows_riding_2|knows_weapon_master_2|knows_power_strike_2|knows_athletics_3|knows_trainer_1|knows_leadership_1, 0x00000002050052036a1895d0748f3ca30000000000000f0b0000000000000000], ["npc7","Deshavi","Deshavi",tf_female|tf_hero|tf_unmoveable_in_party_window, 0, reserved, fac_commoners,[itm_ragged_outfit,itm_wrapping_boots, itm_hunting_bow, itm_arrows, itm_quarter_staff], str_8|agi_9|int_10|cha_6|level(2),wp(80),knows_tracker_npc| knows_tracking_2|knows_athletics_2|knows_spotting_1|knows_pathfinding_1|knows_power_draw_2, 0x00000001fc08400533a15297634d44f400000000001e02db0000000000000000], ["npc8","Matheld","Matheld",tf_female|tf_hero|tf_unmoveable_in_party_window, 0, reserved, fac_commoners,[itm_tribal_warrior_outfit,itm_nomad_boots, itm_sword_viking_1], str_9|agi_10|int_9|cha_10|level(7),wp(90),knows_warrior_npc| knows_weapon_master_3|knows_power_strike_2|knows_athletics_2|knows_leadership_3|knows_tactics_1, 0x00000005800c000637db8314e331e76e00000000001c46db0000000000000000], ["npc9","Alayen","Alayen",tf_hero|tf_unmoveable_in_party_window, 0, reserved, fac_commoners,[itm_tabard,itm_nomad_boots, itm_sword_medieval_b_small], str_11|agi_8|int_7|cha_8|level(2),wp(100),knows_warrior_npc| knows_weapon_master_1|knows_riding_1|knows_athletics_1|knows_leadership_1|knows_tactics_1|knows_power_strike_1, 0x000000030100300f499d5b391b6db8d300000000001dc2e10000000000000000], ["npc10","Bunduk","Bunduk",tf_hero|tf_unmoveable_in_party_window, 0, reserved, fac_commoners,[itm_padded_leather,itm_nomad_boots, itm_crossbow, itm_bolts, itm_pickaxe], str_12|agi_8|int_9|cha_11|level(9),wp(105),knows_warrior_npc| knows_weapon_master_3|knows_tactics_1|knows_leadership_1|knows_ironflesh_3|knows_trainer_2|knows_first_aid_2, 0x0000000a3f081006572c91c71c8d46cb00000000001e468a0000000000000000], ["npc11","Katrin","Katrin",tf_female|tf_hero|tf_unmoveable_in_party_window, 0, reserved, fac_commoners,[itm_leather_apron, itm_falchion, itm_wrapping_boots], str_8|agi_11|int_10|cha_10|level(8),wp(70),knows_merchant_npc| knows_weapon_master_1|knows_first_aid_1|knows_wound_treatment_2|knows_ironflesh_3|knows_inventory_management_5, 0x0000000d7f0400035915aa226b4d975200000000001ea49e0000000000000000], ["npc12","Jeremus","Jeremus",tf_hero|tf_unmoveable_in_party_window, 0, reserved, fac_commoners,[itm_pilgrim_disguise,itm_nomad_boots, itm_staff], str_8|agi_7|int_13|cha_7|level(4),wp(30), knows_merchant_npc| knows_ironflesh_1|knows_power_strike_1|knows_surgery_4|knows_wound_treatment_3|knows_first_aid_3, 0x000000078000500e4f8ba62a9cd5d36d00000000001e36250000000000000000], ["npc13","Nizar","Nizar",tf_hero|tf_unmoveable_in_party_window, 0, reserved, fac_commoners,[itm_nomad_robe,itm_nomad_boots, itm_scimitar, itm_courser], str_7|agi_7|int_12|cha_8|level(3),wp(80),knows_warrior_npc| knows_riding_2|knows_leadership_2|knows_athletics_2|knows_ironflesh_2|knows_power_strike_1|knows_weapon_master_1, 0x00000004bf0475c85f4e9592de4e574c00000000001e369c0000000000000000], ["npc14","Lezalit","Lezalit",tf_hero|tf_unmoveable_in_party_window, 0, reserved, fac_commoners,[itm_nobleman_outfit,itm_nomad_boots, itm_sword_medieval_b_small], str_9|agi_8|int_11|cha_8|level(5),wp(100),knows_warrior_npc| knows_trainer_4|knows_weapon_master_3|knows_leadership_2|knows_power_strike_1, 0x00000001a410259144d5d1d6eb55e96a00000000001db0db0000000000000000], ["npc15","Artimenner","Artimenner",tf_hero|tf_unmoveable_in_party_window, 0, reserved, fac_commoners,[itm_rich_outfit,itm_nomad_boots, itm_sword_medieval_b_small], str_9|agi_9|int_12|cha_8|level(7),wp(80),knows_warrior_npc| knows_tactics_2|knows_engineer_4|knows_trade_3|knows_tracking_1|knows_spotting_1, 0x0000000f2e1021862b4b9123594eab5300000000001d55360000000000000000], ["npc16","Klethi","Klethi",tf_female|tf_hero|tf_unmoveable_in_party_window, 0, reserved, fac_commoners,[itm_peasant_dress,itm_nomad_boots, itm_dagger, itm_throwing_knives], str_7|agi_11|int_8|cha_7|level(2),wp(80),knows_tracker_npc| knows_power_throw_3|knows_athletics_2|knows_power_strike_1, 0x00000000000c100739ce9c805d2f381300000000001cc7ad0000000000000000], #NPC system changes end ["kingdom_heroes_including_player_begin", "kingdom_heroes_including_player_begin", "kingdom_heroes_including_player_begin", tf_hero, 0,reserved, fac_kingdom_1,[], lord_attrib,wp(220),knows_lord_1, 0x000000000010918a01f248377289467d], #governers olgrel rasevas Horse Bodywear Footwear_in Footwear_out Armor Weapon Shield Headwaer ["kingdom_1_lord", "King Harlaus", "Kingdom 1 Lord", tf_hero, 0,reserved, fac_kingdom_1,[itm_charger, itm_rich_outfit, itm_blue_hose, itm_iron_greaves, itm_plate_armor, itm_gauntlets, itm_bastard_sword_b, itm_tab_shield_heater_cav_b, itm_great_helmet], knight_attrib_5,wp(220),knight_skills_5|knows_trainer_5, 0x0000000f45041105241acd2b5a66a86900000000001e98310000000000000000,swadian_face_older_2], ["kingdom_2_lord", "King Yaroglek", "Kingdom 2 Lord", tf_hero, 0,reserved, fac_kingdom_2,[itm_hunter, itm_courtly_outfit, itm_leather_boots, itm_mail_chausses, itm_heraldic_mail_with_surcoat, itm_gauntlets, itm_military_pick, itm_tab_shield_kite_cav_b, itm_helmet_with_neckguard], knight_attrib_5,wp(220),knight_skills_5|knows_trainer_4, 0x0000000ec50001400a2269f919dee11700000000001cc57d0000000000000000, vaegir_face_old_2], ["kingdom_3_lord", "Sanjar Khan", "Kingdom 3 Lord", tf_hero, 0,reserved, fac_kingdom_3,[itm_courser, itm_nomad_robe, itm_leather_boots, itm_splinted_greaves, itm_khergit_guard_armor, itm_scale_gauntlets, itm_sword_khergit_3, itm_tab_shield_small_round_c, itm_guard_helmet], knight_attrib_5,wp(220),knight_skills_5|knows_trainer_6, 0x0000000cee0051cc44be2d14d370c65c00000000001ed6df0000000000000000,khergit_face_old_2], ["kingdom_4_lord", "King Ragnar", "Kingdom 4 Lord", tf_hero, 0,reserved, fac_kingdom_4,[itm_hunter, itm_nobleman_outfit, itm_leather_boots, itm_mail_boots, itm_cuir_bouilli, itm_gauntlets, itm_great_axe, itm_tab_shield_round_e, itm_nordic_helmet], knight_attrib_5,wp(220),knight_skills_5|knows_trainer_4, 0x0000000e2c0c028a068e8c18557b12a500000000001c0fe80000000000000000, nord_face_older_2], ["kingdom_5_lord", "King Graveth", "Kingdom 5 Lord", tf_hero, 0,reserved, fac_kingdom_5,[itm_warhorse, itm_tabard, itm_leather_boots, itm_splinted_leather_greaves, itm_heraldic_mail_with_tabard, itm_gauntlets, itm_bastard_sword_b, itm_tab_shield_heater_cav_b, itm_spiked_helmet], knight_attrib_3,wp(220),knight_skills_4|knows_trainer_5, 0x0000000efc04119225848dac5d50d62400000000001d48b80000000000000000, rhodok_face_old_2], # Imbrea Belinda Ruby Qaelmas Rose Willow # Alin Ganzo Zelka Rabugti # Qlurzach Ruhbus Givea_alsev Belanz Bendina # Dunga Agatha Dibus Crahask # Horse Bodywear Armor Footwear_in Footwear_out Headwear Weapon Shield #Swadian civilian clothes: itm_courtly_outfit itm_gambeson itm_blue_gambeson itm_red_gambeson itm_nobleman_outfit itm_rich_outfit itm_short_tunic itm_tabard ["knight_1_1", "Lord Klargus", "knight_1_1", tf_hero, 0, reserved, fac_kingdom_1, [itm_saddle_horse, itm_courtly_outfit, itm_heraldic_mail_with_surcoat, itm_nomad_boots, itm_splinted_greaves, itm_great_helmet, itm_sword_medieval_c, itm_scale_gauntlets, itm_tab_shield_heater_cav_a], knight_attrib_1,wp(130),knight_skills_1|knows_trainer_1|knows_trainer_3, 0x0000000c3e08601414ab4dc6e39296b200000000001e231b0000000000000000, swadian_face_middle_2], ["knight_1_2", "Lord Plais", "knight_1_2", tf_hero, 0, reserved, fac_kingdom_1, [itm_steppe_horse, itm_gambeson, itm_heraldic_mail_with_surcoat, itm_blue_hose, itm_mail_boots, itm_nasal_helmet, itm_scale_gauntlets, itm_fighting_pick, itm_tab_shield_heater_c], knight_attrib_2,wp(160),knight_skills_2, 0x0000000c0f08000458739a9a1476199800000000001fb6f10000000000000000, swadian_face_old_2], ["knight_1_3", "Lord Mirchaud", "knight_1_3", tf_hero, 0, reserved, fac_kingdom_1, [itm_courser, itm_blue_gambeson, itm_mail_hauberk, itm_woolen_hose, itm_mail_chausses, itm_guard_helmet, itm_gauntlets, itm_sword_two_handed_b, itm_tab_shield_heater_cav_b], knight_attrib_3,wp(190),knight_skills_3, 0x0000000c0610351048e325361d7236cd00000000001d532a0000000000000000, swadian_face_older_2], ["knight_1_4", "Lord Stamar", "knight_1_4", tf_hero, 0, reserved, fac_kingdom_1, [itm_courser, itm_red_gambeson, itm_heraldic_mail_with_surcoat, itm_nomad_boots, itm_iron_greaves, itm_guard_helmet, itm_gauntlets, itm_bastard_sword_a, itm_tab_shield_heater_cav_b], knight_attrib_4,wp(220),knight_skills_4, 0x0000000c03104490280a8cb2a24196ab00000000001eb4dc0000000000000000, swadian_face_older_2], ["knight_1_5", "Lord Ryis", "knight_1_5", tf_hero, 0, reserved, fac_kingdom_1, [itm_warhorse, itm_nobleman_outfit, itm_coat_of_plates, itm_leather_boots, itm_splinted_leather_greaves, itm_winged_great_helmet, itm_gauntlets,itm_bastard_sword_b, itm_sword_two_handed_a, itm_tab_shield_heater_d], knight_attrib_5,wp(250),knight_skills_5, 0x0000000c330855054aa9aa431a48d74600000000001ed5240000000000000000, swadian_face_older_2], ["knight_1_6", "Lord Meltor", "knight_1_6", tf_hero, 0, reserved, fac_kingdom_1, [itm_saddle_horse, itm_rich_outfit, itm_heraldic_mail_with_surcoat, itm_nomad_boots, itm_mail_boots, itm_guard_helmet, itm_gauntlets, itm_fighting_pick, itm_tab_shield_heater_c], knight_attrib_1,wp(130),knight_skills_1, 0x0000000c2a0805442b2c6cc98c8dbaac00000000001d389b0000000000000000, swadian_face_middle_2], ["knight_1_7", "Lord Beranz", "knight_1_7", tf_hero, 0, reserved, fac_kingdom_1, [itm_saddle_horse, itm_ragged_outfit, itm_heraldic_mail_with_surcoat, itm_nomad_boots, itm_splinted_greaves, itm_guard_helmet, itm_gauntlets, itm_sword_medieval_c, itm_sword_two_handed_a, itm_tab_shield_heater_c], knight_attrib_2,wp(160),knight_skills_2, 0x0000000c380c30c2392a8e5322a5392c00000000001e5c620000000000000000, swadian_face_old_2], ["knight_1_8", "Lord Rafard", "knight_1_8", tf_hero, 0, reserved, fac_kingdom_1, [itm_saddle_horse, itm_short_tunic, itm_heraldic_mail_with_tabard, itm_leather_boots, itm_mail_chausses, itm_nasal_helmet, itm_scale_gauntlets, itm_bastard_sword_a, itm_tab_shield_heater_cav_a], knight_attrib_3,wp(190),knight_skills_3|knows_trainer_6, 0x0000000c3f10000532d45203954e192200000000001e47630000000000000000, swadian_face_older_2], ["knight_1_9", "Lord Regas", "knight_1_9", tf_hero, 0, reserved, fac_kingdom_1, [itm_hunter, itm_rich_outfit, itm_mail_hauberk, itm_woolen_hose, itm_mail_chausses, itm_great_helmet, itm_gauntlets, itm_sword_viking_3, itm_sword_two_handed_a, itm_tab_shield_heater_d], knight_attrib_4,wp(210),knight_skills_4, 0x0000000c5c0840034895654c9b660c5d00000000001e34530000000000000000, swadian_face_older_2], ["knight_1_10", "Lord Grainwad", "knight_1_0", tf_hero, 0, reserved, fac_kingdom_1, [itm_hunter, itm_tabard, itm_heraldic_mail_with_surcoat, itm_leather_boots, itm_mail_boots, itm_flat_topped_helmet, itm_gauntlets, itm_bastard_sword_b, itm_sword_two_handed_b, itm_tab_shield_heater_cav_b], knight_attrib_5,wp(290),knight_skills_5|knows_trainer_5, 0x0000000c1e001500589dae4094aa291c00000000001e37a80000000000000000, swadian_face_older_2], ["knight_1_11", "Lord Devlian", "knight_1_1", tf_hero, 0, reserved, fac_kingdom_1, [itm_saddle_horse, itm_courtly_outfit, itm_heraldic_mail_with_surcoat, itm_nomad_boots, itm_splinted_greaves, itm_great_helmet, itm_gauntlets, itm_sword_medieval_c, itm_tab_shield_heater_c], knight_attrib_1,wp(130),knight_skills_1, 0x000000095108144657a1ba3ad456e8cb00000000001e325a0000000000000000, swadian_face_middle_2], ["knight_1_12", "Lord Rafarch", "knight_1_2", tf_hero, 0, reserved, fac_kingdom_1, [itm_steppe_horse, itm_gambeson, itm_heraldic_mail_with_surcoat, itm_blue_hose, itm_mail_boots, itm_nasal_helmet, itm_scale_gauntlets, itm_fighting_pick, itm_tab_shield_heater_cav_b], knight_attrib_2,wp(190),knight_skills_2|knows_trainer_4, 0x0000000c010c42c14d9d6918bdb336e200000000001dd6a30000000000000000, swadian_face_old_2], ["knight_1_13", "Lord Rochabarth", "knight_1_3", tf_hero, 0, reserved, fac_kingdom_1, [itm_courser, itm_blue_gambeson, itm_mail_hauberk, itm_woolen_hose, itm_mail_chausses, itm_winged_great_helmet, itm_gauntlets, itm_sword_two_handed_a, itm_tab_shield_heater_cav_a], knight_attrib_3,wp(210),knight_skills_3, 0x0000000c150045c6365d8565932a8d6400000000001ec6940000000000000000, swadian_face_older_2], ["knight_1_14", "Lord Delinard", "knight_1_4", tf_hero, 0, reserved, fac_kingdom_1, [itm_courser, itm_red_gambeson, itm_heraldic_mail_with_surcoat, itm_nomad_boots, itm_iron_greaves, itm_guard_helmet, itm_gauntlets, itm_bastard_sword_a, itm_tab_shield_heater_cav_b], knight_attrib_4,wp(240),knight_skills_4, 0x0000000c0f0c320627627238dcd6599400000000001c573d0000000000000000, swadian_face_older_2], ["knight_1_15", "Lord Haringoth", "knight_1_5", tf_hero, 0, reserved, fac_kingdom_1, [itm_warhorse, itm_nobleman_outfit, itm_coat_of_plates, itm_leather_boots, itm_splinted_leather_greaves, itm_flat_topped_helmet, itm_gauntlets, itm_bastard_sword_b, itm_tab_shield_heater_d], knight_attrib_5,wp(260),knight_skills_5|knows_trainer_3, 0x0000000cb700210214ce89db276aa2f400000000001d36730000000000000000, swadian_face_older_2], ["knight_1_16", "Lord Despin", "knight_1_6", tf_hero, 0, reserved, fac_kingdom_1, [itm_saddle_horse, itm_rich_outfit, itm_heraldic_mail_with_surcoat, itm_nomad_boots, itm_mail_boots, itm_great_helmet, itm_gauntlets, itm_fighting_pick, itm_sword_two_handed_a, itm_tab_shield_heater_cav_a], knight_attrib_1,wp(120),knight_skills_1, 0x00000008200012033d9b6d4a92ada53500000000001cc1180000000000000000, swadian_face_middle_2], ["knight_1_17", "Lord Montewar", "knight_1_7", tf_hero, 0, reserved, fac_kingdom_1, [itm_saddle_horse, itm_ragged_outfit, itm_heraldic_mail_with_surcoat, itm_nomad_boots, itm_splinted_greaves, itm_great_helmet, itm_gauntlets, itm_sword_medieval_c, itm_sword_two_handed_a, itm_tab_shield_heater_cav_a], knight_attrib_2,wp(150),knight_skills_2, 0x0000000c4d0840d24a9b2ab4ac2a332400000000001d34db0000000000000000, swadian_face_old_2], ["knight_1_18", "Lord Clais", "knight_1_8", tf_hero, 0, reserved, fac_kingdom_1, [itm_saddle_horse, itm_short_tunic, itm_heraldic_mail_with_surcoat, itm_leather_boots, itm_mail_chausses, itm_winged_great_helmet, itm_gauntlets, itm_bastard_sword_a, itm_sword_two_handed_a, itm_tab_shield_heater_d], knight_attrib_3,wp(180),knight_skills_3|knows_trainer_4, 0x0000000c370c1194546469ca6c4e450e00000000001ebac40000000000000000, swadian_face_older_2], ["knight_1_19", "Lord Deglan", "knight_1_9", tf_hero, 0, reserved, fac_kingdom_1, [itm_hunter, itm_rich_outfit, itm_mail_hauberk, itm_woolen_hose, itm_mail_chausses, itm_guard_helmet, itm_gauntlets, itm_sword_medieval_c, itm_tab_shield_heater_d], knight_attrib_4,wp(200),knight_skills_4|knows_trainer_6, 0x0000000c0c1064864ba34e2ae291992b00000000001da8720000000000000000, swadian_face_older_2], ["knight_1_20", "Lord Tredian", "knight_1_0", tf_hero, 0, reserved, fac_kingdom_1, [itm_hunter, itm_tabard, itm_heraldic_mail_with_surcoat, itm_leather_boots, itm_mail_boots, itm_winged_great_helmet, itm_gauntlets, itm_bastard_sword_b, itm_sword_two_handed_b, itm_tab_shield_heater_cav_b], knight_attrib_5,wp(240),knight_skills_5|knows_trainer_5, 0x0000000c0a08038736db74c6a396a8e500000000001db8eb0000000000000000, swadian_face_older_2], ["knight_2_1", "Lord Vuldrat", "knight_2_1", tf_hero, 0, reserved, fac_kingdom_2, [itm_saddle_horse, itm_fur_coat, itm_padded_cloth, itm_nomad_boots, itm_splinted_leather_greaves, itm_skullcap, itm_mail_mittens, itm_sword_viking_3, itm_tab_shield_kite_c], knight_attrib_1,wp(130),knight_skills_1|knows_trainer_3, 0x00000005590011c33d9b6d4a92ada53500000000001cc1180000000000000000, vaegir_face_middle_2], ["knight_2_2", "Lord Naldera", "knight_2_2", tf_hero, 0, reserved, fac_kingdom_2, [itm_saddle_horse, itm_rich_outfit, itm_lamellar_armor, itm_woolen_hose, itm_mail_chausses, itm_nasal_helmet, itm_mail_mittens, itm_shortened_military_scythe, itm_tab_shield_kite_cav_a], knight_attrib_2,wp(160),knight_skills_2, 0x0000000c2a0015d249b68b46a98e176400000000001d95a40000000000000000, vaegir_face_old_2], ["knight_2_3", "Lord Meriga", "knight_2_3", tf_hero, 0, reserved, fac_kingdom_2, [itm_hunter, itm_short_tunic, itm_mail_hauberk, itm_woolen_hose, itm_mail_chausses, itm_nordic_helmet, itm_scale_gauntlets, itm_great_bardiche, itm_tab_shield_kite_cav_b], knight_attrib_3,wp(190),knight_skills_3, 0x0000000c131031c546a38a2765b4c86000000000001e58d30000000000000000, vaegir_face_older_2], ["knight_2_4", "Lord Khavel", "knight_2_4", tf_hero, 0, reserved, fac_kingdom_2, [itm_saddle_horse, itm_courtly_outfit, itm_lamellar_armor, itm_leather_boots, itm_mail_boots, itm_khergit_guard_helmet, itm_scale_gauntlets, itm_bastard_sword_b, itm_tab_shield_kite_cav_b], knight_attrib_4,wp(220),knight_skills_4, 0x0000000c2f0832c748f272540d8ab65900000000001d34e60000000000000000, vaegir_face_older_2], ["knight_2_5", "Lord Doru", "knight_2_5", tf_hero, 0, reserved, fac_kingdom_2, [itm_hunter, itm_rich_outfit, itm_haubergeon, itm_leather_boots, itm_mail_chausses, itm_segmented_helmet, itm_scale_gauntlets, itm_bastard_sword_b, itm_tab_shield_kite_d], knight_attrib_5,wp(250),knight_skills_5, 0x0000000e310061435d76bb5f55bad9ad00000000001ed8ec0000000000000000, vaegir_face_older_2], ["knight_2_6", "Lord Belgaru", "knight_2_6", tf_hero, 0, reserved, fac_kingdom_2, [itm_saddle_horse, itm_nomad_vest, itm_padded_cloth, itm_woolen_hose, itm_mail_chausses, itm_khergit_guard_helmet, itm_mail_mittens, itm_sword_viking_3, itm_tab_shield_kite_c], knight_attrib_1,wp(130),knight_skills_1|knows_trainer_3, 0x0000000a0100421038da7157aa4e430a00000000001da8bc0000000000000000, vaegir_face_middle_2], ["knight_2_7", "Lord Ralcha", "Ralcha", tf_hero, 0, reserved, fac_kingdom_2, [itm_steppe_horse, itm_leather_jacket, itm_mail_hauberk, itm_leather_boots, itm_mail_boots, itm_nordic_helmet, itm_scale_gauntlets, itm_great_bardiche, itm_tab_shield_kite_cav_a], knight_attrib_2,wp(160),knight_skills_2|knows_trainer_4, 0x0000000c04100153335ba9390b2d277500000000001d89120000000000000000, vaegir_face_old_2], ["knight_2_8", "Lord Vlan", "knight_2_8", tf_hero, 0, reserved, fac_kingdom_2, [itm_hunter, itm_nomad_robe, itm_nomad_vest, itm_woolen_hose, itm_mail_chausses, itm_nasal_helmet, itm_scale_gauntlets, itm_shortened_military_scythe, itm_tab_shield_kite_d], knight_attrib_3,wp(200),knight_skills_3|knows_trainer_5, 0x0000000c00046581234e8da2cdd248db00000000001f569c0000000000000000, vaegir_face_older_2], ["knight_2_9", "Lord Mleza", "knight_2_9", tf_hero, 0, reserved, fac_kingdom_2, [itm_saddle_horse, itm_rich_outfit, itm_haubergeon, itm_leather_boots, itm_mail_chausses, itm_kettle_hat, itm_scale_gauntlets, itm_great_bardiche, itm_tab_shield_kite_d], knight_attrib_4,wp(230),knight_skills_4, 0x0000000c160451d2136469c4d9b159ad00000000001e28f10000000000000000, vaegir_face_older_2], ["knight_2_10", "Lord Nelag", "knight_2_0", tf_hero, 0, reserved, fac_kingdom_2, [itm_warhorse, itm_fur_coat, itm_lamellar_armor, itm_woolen_hose, itm_mail_boots, itm_great_helmet, itm_scale_gauntlets, itm_military_pick, itm_tab_shield_kite_cav_b], knight_attrib_5,wp(260),knight_skills_5|knows_trainer_6, 0x0000000f7c00520e66b76edd5cd5eb6e00000000001f691e0000000000000000, vaegir_face_older_2], ["knight_2_11", "Lord Crahask", "knight_2_1", tf_hero, 0, reserved, fac_kingdom_2, [itm_saddle_horse, itm_leather_jacket, itm_padded_cloth, itm_nomad_boots, itm_splinted_leather_greaves, itm_khergit_guard_helmet, itm_scale_gauntlets, itm_sword_viking_3, itm_tab_shield_kite_cav_a], knight_attrib_1,wp(130),knight_skills_1, 0x0000000c1d0821d236acd6991b74d69d00000000001e476c0000000000000000, vaegir_face_middle_2], ["knight_2_12", "Lord Bracha", "knight_2_2", tf_hero, 0, reserved, fac_kingdom_2, [itm_saddle_horse, itm_rich_outfit, itm_lamellar_armor, itm_woolen_hose, itm_mail_chausses, itm_nasal_helmet, itm_mail_mittens, itm_great_bardiche, itm_tab_shield_kite_cav_a], knight_attrib_2,wp(170),knight_skills_2, 0x0000000c0f04024b2509d5d53944c6a300000000001d5b320000000000000000, vaegir_face_old_2], ["knight_2_13", "Lord Druli", "knight_2_3", tf_hero, 0, reserved, fac_kingdom_2, [itm_hunter, itm_short_tunic, itm_mail_hauberk, itm_woolen_hose, itm_mail_chausses, itm_nordic_helmet, itm_scale_gauntlets, itm_great_bardiche, itm_tab_shield_kite_cav_b], knight_attrib_3,wp(190),knight_skills_3, 0x0000000c680432d3392230cb926d56ca00000000001da69b0000000000000000, vaegir_face_older_2], ["knight_2_14", "Lord Marmun", "knight_2_4", tf_hero, 0, reserved, fac_kingdom_2, [itm_saddle_horse, itm_courtly_outfit, itm_lamellar_armor, itm_leather_boots, itm_mail_boots, itm_guard_helmet, itm_scale_gauntlets, itm_shortened_military_scythe, itm_tab_shield_kite_cav_b], knight_attrib_4,wp(220),knight_skills_4|knows_trainer_6, 0x0000000c27046000471bd2e93375b52c00000000001dd5220000000000000000, vaegir_face_older_2], ["knight_2_15", "Lord Gastya", "knight_2_5", tf_hero, 0, reserved, fac_kingdom_2, [itm_hunter, itm_rich_outfit, itm_haubergeon, itm_leather_boots, itm_mail_chausses, itm_segmented_helmet, itm_scale_gauntlets, itm_bastard_sword_b, itm_shortened_military_scythe, itm_tab_shield_kite_cav_b], knight_attrib_5,wp(250),knight_skills_5, 0x0000000de50052123b6bb36de5d6eb7400000000001dd72c0000000000000000, vaegir_face_older_2], ["knight_2_16", "Lord Harish", "knight_2_6", tf_hero, 0, reserved, fac_kingdom_2, [itm_saddle_horse, itm_nomad_vest, itm_padded_cloth, itm_woolen_hose, itm_mail_chausses, itm_nordic_helmet, itm_mail_mittens, itm_great_bardiche, itm_tab_shield_kite_c], knight_attrib_1,wp(120),knight_skills_1, 0x000000085f00000539233512e287391d00000000001db7200000000000000000, vaegir_face_middle_2], ["knight_2_17", "Lord Taisa", "Ralcha", tf_hero, 0, reserved, fac_kingdom_2, [itm_steppe_horse, itm_leather_jacket, itm_mail_hauberk, itm_leather_boots, itm_mail_boots, itm_guard_helmet, itm_scale_gauntlets, itm_great_bardiche, itm_tab_shield_kite_cav_a], knight_attrib_2,wp(150),knight_skills_2, 0x0000000a070c4387374bd19addd2a4ab00000000001e32cc0000000000000000, vaegir_face_old_2], ["knight_2_18", "Lord Valishin", "knight_2_8", tf_hero, 0, reserved, fac_kingdom_2, [itm_hunter, itm_nomad_robe, itm_nomad_vest, itm_woolen_hose, itm_mail_chausses, itm_nasal_helmet, itm_scale_gauntlets, itm_great_bardiche, itm_tab_shield_kite_cav_a], knight_attrib_3,wp(180),knight_skills_3, 0x0000000b670012c23d9b6d4a92ada53500000000001cc1180000000000000000, vaegir_face_older_2], ["knight_2_19", "Lord Rudin", "knight_2_9", tf_hero, 0, reserved, fac_kingdom_2, [itm_saddle_horse, itm_rich_outfit, itm_haubergeon, itm_leather_boots, itm_mail_chausses, itm_guard_helmet, itm_scale_gauntlets, itm_fighting_pick, itm_shortened_military_scythe, itm_tab_shield_kite_d], knight_attrib_4,wp(210),knight_skills_4|knows_trainer_4, 0x0000000e070050853b0a6e4994ae272a00000000001db4e10000000000000000, vaegir_face_older_2], ["knight_2_20", "Lord Kumipa", "knight_2_0", tf_hero, 0, reserved, fac_kingdom_2, [itm_warhorse, itm_fur_coat, itm_lamellar_armor, itm_woolen_hose, itm_mail_boots, itm_great_helmet, itm_scale_gauntlets, itm_great_bardiche, itm_tab_shield_kite_cav_b], knight_attrib_5,wp(240),knight_skills_5|knows_trainer_5, 0x0000000f800021c63b0a6e4994ae272a00000000001db4e10000000000000000, vaegir_face_older_2], #khergit civilian clothes: itm_leather_vest, itm_nomad_vest, itm_nomad_robe, itm_lamellar_vest,itm_tribal_warrior_outfit ["knight_3_1", "Lord Alagur", "knight_3_1", tf_hero, 0, reserved, fac_kingdom_3, [itm_saddle_horse, itm_leather_vest, itm_studded_leather_coat,itm_nomad_boots, itm_mail_boots, itm_khergit_guard_helmet, itm_scale_gauntlets, itm_leather_gloves, itm_sword_khergit_3, itm_tab_shield_small_round_c, itm_khergit_bow, itm_arrows], knight_attrib_1,wp(130),knight_skills_1|knows_trainer_3|knows_power_draw_4, 0x000000043000318b54b246b7094dc39c00000000001d31270000000000000000, khergit_face_middle_2], ["knight_3_2", "Lord Tonju", "knight_3_2", tf_hero, 0, reserved, fac_kingdom_3, [itm_saddle_horse, itm_nomad_vest, itm_lamellar_armor, itm_hide_boots, itm_mail_boots, itm_khergit_cavalry_helmet, itm_scale_gauntlets, itm_leather_gloves, itm_shortened_military_scythe, itm_tab_shield_small_round_b, itm_khergit_bow, itm_arrows], knight_attrib_2,wp(160),knight_skills_2|knows_power_draw_4, 0x0000000c280461004929b334ad632aa200000000001e05120000000000000000, khergit_face_old_2], ["knight_3_3", "Lord Belir", "knight_3_3", tf_hero, 0, reserved, fac_kingdom_3, [itm_saddle_horse, itm_nomad_robe, itm_lamellar_armor,itm_nomad_boots, itm_splinted_leather_greaves, itm_khergit_guard_helmet, itm_scale_gauntlets, itm_fighting_pick, itm_tab_shield_small_round_c, itm_khergit_bow, itm_arrows], knight_attrib_3,wp(190),knight_skills_3|knows_trainer_5|knows_power_draw_4, 0x0000000e880062c53b0a6e4994ae272a00000000001db4e10000000000000000, khergit_face_older_2], ["knight_3_4", "Lord Asugan", "knight_3_4", tf_hero, 0, reserved, fac_kingdom_3, [itm_courser, itm_lamellar_vest, itm_mail_and_plate, itm_hide_boots, itm_splinted_greaves, itm_khergit_cavalry_helmet, itm_scale_gauntlets, itm_shortened_military_scythe, itm_tab_shield_small_round_c], knight_attrib_4,wp(220),knight_skills_4|knows_power_draw_4, 0x0000000c23085386391b5ac72a96d95c00000000001e37230000000000000000, khergit_face_older_2], ["knight_3_5", "Lord Brula", "knight_3_5", tf_hero, 0, reserved, fac_kingdom_3, [itm_charger, itm_ragged_outfit, itm_lamellar_vest, itm_hide_boots, itm_mail_boots, itm_khergit_guard_helmet, itm_scale_gauntlets, itm_sword_khergit_3, itm_tab_shield_small_round_c], knight_attrib_5,wp(250),knight_skills_5|knows_power_draw_4, 0x0000000efe0051ca4b377b4964b6eb6500000000001f696c0000000000000000, khergit_face_older_2], ["knight_3_6", "Lord Imirza", "knight_3_6", tf_hero, 0, reserved, fac_kingdom_3, [itm_saddle_horse, itm_tribal_warrior_outfit,itm_hide_boots, itm_splinted_leather_greaves, itm_khergit_cavalry_helmet, itm_scale_gauntlets, itm_sword_khergit_4, itm_tab_shield_small_round_b], knight_attrib_1,wp(130),knight_skills_1|knows_power_draw_4, 0x00000006f600418b54b246b7094dc31a00000000001d37270000000000000000, khergit_face_middle_2], ["knight_3_7", "Lord Urumuda","knight_3_7", tf_hero, 0, reserved, fac_kingdom_3, [itm_courser, itm_leather_vest,itm_leather_boots, itm_hide_boots, itm_skullcap, itm_khergit_guard_helmet, itm_scale_gauntlets, itm_sword_khergit_3, itm_tab_shield_small_round_b], knight_attrib_2,wp(160),knight_skills_2|knows_power_draw_4, 0x0000000bdd00510a44be2d14d370c65c00000000001ed6df0000000000000000, khergit_face_old_2], ["knight_3_8", "Lord Kramuk", "knight_3_8", tf_hero, 0, reserved, fac_kingdom_3, [itm_saddle_horse, itm_nomad_vest, itm_lamellar_armor, itm_woolen_hose, itm_splinted_greaves, itm_khergit_cavalry_helmet, itm_scale_gauntlets, itm_great_bardiche, itm_tab_shield_small_round_c], knight_attrib_3,wp(190),knight_skills_3|knows_power_draw_4, 0x0000000abc00518b5af4ab4b9c8e596400000000001dc76d0000000000000000, khergit_face_older_2], ["knight_3_9", "Lord Chaurka","knight_3_9", tf_hero, 0, reserved, fac_kingdom_3, [itm_hunter, itm_nomad_robe, itm_lamellar_vest, itm_leather_boots, itm_splinted_leather_greaves, itm_khergit_guard_helmet, itm_scale_gauntlets, itm_military_pick, itm_tab_shield_small_round_c], knight_attrib_4,wp(220),knight_skills_4|knows_power_draw_4, 0x0000000a180441c921a30ea68b54971500000000001e54db0000000000000000, khergit_face_older_2], ["knight_3_10", "Lord Sebula","knight_3_0", tf_hero, 0, reserved, fac_kingdom_3, [itm_warhorse, itm_lamellar_vest, itm_lamellar_armor, itm_hide_boots, itm_mail_chausses, itm_khergit_guard_helmet, itm_scale_gauntlets, itm_sword_khergit_4, itm_shortened_military_scythe, itm_tab_shield_small_round_c], knight_attrib_5,wp(250),knight_skills_5|knows_trainer_6|knows_power_draw_4, 0x0000000a3b00418c5b36c686d920a76100000000001c436f0000000000000000, khergit_face_older_2], ["knight_3_11", "Lord Tulug", "knight_3_1", tf_hero, 0, reserved, fac_kingdom_3, [itm_saddle_horse, itm_leather_vest, itm_studded_leather_coat, itm_nomad_boots, itm_mail_boots, itm_khergit_cavalry_helmet, itm_leather_gloves, itm_sword_khergit_4, itm_tab_shield_small_round_b, itm_khergit_bow, itm_arrows], knight_attrib_1,wp(150),knight_skills_1|knows_power_draw_4, 0x00000007d100534b44962d14d370c65c00000000001ed6df0000000000000000, khergit_face_middle_2], ["knight_3_12", "Lord Nasugei", "knight_3_2", tf_hero, 0, reserved, fac_kingdom_3, [itm_saddle_horse, itm_nomad_vest, itm_lamellar_armor, itm_hide_boots, itm_mail_boots, itm_khergit_guard_helmet, itm_leather_gloves, itm_sword_khergit_3, itm_tab_shield_small_round_b], knight_attrib_2,wp(190),knight_skills_2|knows_power_draw_4, 0x0000000bf400610c5b33d3c9258edb6c00000000001eb96d0000000000000000, khergit_face_old_2], ["knight_3_13", "Lord Urubay","knight_3_3", tf_hero, 0, reserved, fac_kingdom_3, [itm_saddle_horse, itm_nomad_robe, itm_lamellar_vest, itm_nomad_boots, itm_splinted_leather_greaves, itm_khergit_cavalry_helmet, itm_scale_gauntlets, itm_fighting_pick, itm_tab_shield_small_round_c, itm_khergit_bow, itm_arrows], knight_attrib_3,wp(200),knight_skills_3|knows_trainer_3|knows_power_draw_4, 0x0000000bfd0061c65b6eb33b25d2591d00000000001f58eb0000000000000000, khergit_face_older_2], ["knight_3_14", "Lord Hugu", "knight_3_4", tf_hero, 0, reserved, fac_kingdom_3, [itm_courser, itm_lamellar_vest, itm_lamellar_vest, itm_hide_boots, itm_splinted_greaves, itm_khergit_guard_helmet, itm_scale_gauntlets, itm_shortened_military_scythe, itm_tab_shield_small_round_c, itm_khergit_bow, itm_arrows], knight_attrib_4,wp(300),knight_skills_4|knows_trainer_6|knows_power_draw_4, 0x0000000b6900514144be2d14d370c65c00000000001ed6df0000000000000000, khergit_face_older_2], ["knight_3_15", "Lord Tansugai", "knight_3_5", tf_hero, 0, reserved, fac_kingdom_3, [itm_charger, itm_ragged_outfit, itm_lamellar_vest, itm_hide_boots, itm_mail_boots, itm_khergit_cavalry_helmet, itm_sword_khergit_4, itm_shortened_military_scythe, itm_tab_shield_small_round_c], knight_attrib_5,wp(240),knight_skills_5|knows_trainer_4|knows_power_draw_4, 0x0000000c360c524b6454465b59b9d93500000000001ea4860000000000000000, khergit_face_older_2], ["knight_3_16", "Lord Tirida","knight_3_6", tf_hero, 0, reserved, fac_kingdom_3, [itm_saddle_horse, itm_tribal_warrior_outfit, itm_lamellar_vest, itm_hide_boots, itm_splinted_leather_greaves, itm_khergit_guard_helmet, itm_leather_gloves, itm_sword_khergit_4, itm_tab_shield_small_round_b, itm_khergit_bow, itm_arrows], knight_attrib_1,wp(120),knight_skills_1|knows_power_draw_4, 0x0000000c350c418438ab85b75c61b8d300000000001d21530000000000000000, khergit_face_middle_2], ["knight_3_17", "Lord Ulusamai", "knight_3_7", tf_hero, 0, reserved, fac_kingdom_3, [itm_courser, itm_leather_vest, itm_lamellar_vest, itm_leather_boots, itm_mail_boots, itm_khergit_guard_helmet, itm_leather_gloves, itm_great_bardiche, itm_tab_shield_small_round_c, itm_khergit_bow, itm_arrows], knight_attrib_2,wp(150),knight_skills_2|knows_power_draw_4, 0x0000000c3c0821c647264ab6e68dc4d500000000001e42590000000000000000, khergit_face_old_2], ["knight_3_18", "Lord Karaban", "knight_3_8", tf_hero, 0, reserved, fac_kingdom_3, [itm_saddle_horse, itm_nomad_vest, itm_lamellar_vest, itm_hide_boots, itm_splinted_greaves, itm_khergit_guard_helmet, itm_scale_gauntlets, itm_war_axe, itm_tab_shield_small_round_c, itm_khergit_bow, itm_arrows], knight_attrib_3,wp(180),knight_skills_3|knows_trainer_4|knows_power_draw_4, 0x0000000c0810500347ae7acd0d3ad74a00000000001e289a0000000000000000, khergit_face_older_2], ["knight_3_19", "Lord Akadan","knight_3_9", tf_hero, 0, reserved, fac_kingdom_3, [itm_hunter, itm_nomad_robe, itm_lamellar_vest, itm_leather_boots, itm_splinted_leather_greaves, itm_khergit_cavalry_helmet, itm_scale_gauntlets, itm_sword_khergit_4, itm_shortened_military_scythe, itm_tab_shield_small_round_c], knight_attrib_4,wp(210),knight_skills_4|knows_trainer_5|knows_power_draw_4, 0x0000000c1500510528f50d52d20b152300000000001d66db0000000000000000, khergit_face_older_2], ["knight_3_20", "Lord Dundush","knight_3_0", tf_hero, 0, reserved, fac_kingdom_3, [itm_warhorse, itm_lamellar_vest, itm_lamellar_armor, itm_hide_boots, itm_mail_chausses, itm_khergit_guard_helmet, itm_scale_gauntlets, itm_sword_khergit_4, itm_tab_shield_small_round_c, itm_khergit_bow, itm_arrows], knight_attrib_5,wp(240),knight_skills_5|knows_power_draw_4, 0x0000000f7800620d66b76edd5cd5eb6e00000000001f691e0000000000000000, khergit_face_older_2], ["knight_4_1", "Lord Aedin", "knight_4_1", tf_hero, 0, reserved, fac_kingdom_4, [itm_rich_outfit, itm_banded_armor, itm_woolen_hose, itm_mail_boots, itm_nordic_helmet, itm_mail_mittens, itm_great_axe, itm_tab_shield_round_d, itm_throwing_axes], knight_attrib_1,wp(130),knight_skills_1, 0x0000000c13002254340eb1d91159392d00000000001eb75a0000000000000000, nord_face_middle_2], ["knight_4_2", "Lord Irya", "knight_4_2", tf_hero, 0, reserved, fac_kingdom_4, [ itm_short_tunic, itm_banded_armor, itm_blue_hose, itm_splinted_greaves, itm_nordic_helmet, itm_scale_gauntlets, itm_one_handed_battle_axe_c, itm_tab_shield_round_d, itm_throwing_axes], knight_attrib_2,wp(160),knight_skills_2|knows_trainer_3, 0x0000000c1610218368e29744e9a5985b00000000001db2a10000000000000000, nord_face_old_2], ["knight_4_3", "Lord Olaf", "knight_4_3", tf_hero, 0, reserved, fac_kingdom_4, [itm_warhorse, itm_rich_outfit, itm_heraldic_mail_with_tabard, itm_nomad_boots, itm_mail_chausses, itm_scale_gauntlets, itm_nasal_helmet, itm_great_axe, itm_tab_shield_round_e, itm_throwing_axes], knight_attrib_3,wp(190),knight_skills_3, 0x0000000c03040289245a314b744b30a400000000001eb2a90000000000000000, nord_face_older_2], ["knight_4_4", "Lord Reamald", "knight_4_4", tf_hero, 0, reserved, fac_kingdom_4, [itm_hunter, itm_leather_vest, itm_banded_armor, itm_woolen_hose, itm_mail_boots, itm_scale_gauntlets, itm_nordic_helmet, itm_fighting_pick, itm_tab_shield_round_e, itm_throwing_axes], knight_attrib_4,wp(210),knight_skills_4, 0x0000000c3f1001ca3d6955b26a8939a300000000001e39b60000000000000000, nord_face_older_2], ["knight_4_5", "Lord Turya", "knight_4_5", tf_hero, 0, reserved, fac_kingdom_4, [ itm_fur_coat, itm_heraldic_mail_with_surcoat, itm_leather_boots, itm_splinted_leather_greaves, itm_scale_gauntlets, itm_nordic_helmet, itm_bastard_sword_b, itm_tab_shield_round_e, itm_throwing_axes, itm_throwing_axes], knight_attrib_5,wp(250),knight_skills_5, 0x0000000ff508330546dc4a59422d450c00000000001e51340000000000000000, nord_face_older_2], ["knight_4_6", "Lord Gundur", "knight_4_6", tf_hero, 0, reserved, fac_kingdom_4, [ itm_nomad_robe, itm_banded_armor, itm_nomad_boots, itm_mail_chausses, itm_nordic_helmet, itm_mail_mittens, itm_war_axe, itm_tab_shield_round_d], knight_attrib_1,wp(130),knight_skills_1, 0x00000005b00011813d9b6d4a92ada53500000000001cc1180000000000000000, nord_face_middle_2], ["knight_4_7", "Lord Harald", "knight_4_7", tf_hero, 0, reserved, fac_kingdom_4, [ itm_fur_coat, itm_studded_leather_coat, itm_nomad_boots, itm_mail_boots, itm_nasal_helmet, itm_mail_mittens, itm_sword_viking_3, itm_shortened_military_scythe, itm_tab_shield_round_d], knight_attrib_2,wp(160),knight_skills_2|knows_trainer_4, 0x00000006690002873d9b6d4a92ada53500000000001cc1180000000000000000, nord_face_old_2], ["knight_4_8", "Lord Knudarr", "knight_4_8", tf_hero, 0, reserved, fac_kingdom_4, [ itm_rich_outfit, itm_mail_and_plate, itm_woolen_hose, itm_mail_chausses, itm_segmented_helmet, itm_scale_gauntlets, itm_war_axe, itm_tab_shield_round_e, itm_throwing_axes], knight_attrib_3,wp(190),knight_skills_3, 0x0000000f830051c53b026e4994ae272a00000000001db4e10000000000000000, nord_face_older_2], ["knight_4_9", "Lord Haeda", "knight_4_9", tf_hero, 0, reserved, fac_kingdom_4, [itm_warhorse, itm_nomad_robe, itm_haubergeon, itm_blue_hose, itm_mail_boots, itm_guard_helmet, itm_scale_gauntlets, itm_arrows, itm_long_bow, itm_one_handed_battle_axe_c, itm_tab_shield_round_e], knight_attrib_4,wp(220),knight_skills_4|knows_trainer_5|knows_power_draw_4, 0x0000000c230401c6349c2e9b2168eb1a00000000001eb0630000000000000000, nord_face_older_2], ["knight_4_10", "Lord Turegor", "knight_4_0", tf_hero, 0, reserved, fac_kingdom_4, [itm_hunter, itm_courtly_outfit, itm_coat_of_plates, itm_nomad_boots, itm_splinted_greaves, itm_scale_gauntlets, itm_winged_great_helmet,itm_great_axe, itm_tab_shield_round_e], knight_attrib_5,wp(250),knight_skills_5|knows_trainer_6, 0x000000084b0002063d9b6d4a92ada53500000000001cc1180000000000000000, nord_face_older_2], ["knight_4_11", "Lord Logarson", "knight_4_1", tf_hero, 0, reserved, fac_kingdom_4, [ itm_rich_outfit, itm_banded_armor, itm_woolen_hose, itm_mail_boots, itm_nordic_helmet, itm_mail_mittens, itm_great_bardiche, itm_tab_shield_round_d], knight_attrib_1,wp(140),knight_skills_1, 0x0000000ca100224d56a5d5c65c70c40a00000000001d54de0000000000000000, nord_face_middle_2], ["knight_4_12", "Lord Aeric", "knight_4_2", tf_hero, 0, reserved, fac_kingdom_4, [ itm_short_tunic, itm_banded_armor, itm_blue_hose, itm_splinted_greaves, itm_nordic_helmet, itm_mail_mittens, itm_one_handed_battle_axe_c, itm_tab_shield_round_d], knight_attrib_2,wp(200),knight_skills_2, 0x0000000b9500020824936cc51cb5bb2500000000001dd4d80000000000000000, nord_face_old_2], ["knight_4_13", "Lord Faarn", "knight_4_3", tf_hero, 0, reserved, fac_kingdom_4, [itm_warhorse, itm_rich_outfit, itm_heraldic_mail_with_tabard, itm_nomad_boots, itm_mail_chausses, itm_scale_gauntlets, itm_nasal_helmet, itm_war_axe, itm_tab_shield_round_e], knight_attrib_3,wp(250),knight_skills_3|knows_trainer_3, 0x0000000a300012c439233512e287391d00000000001db7200000000000000000, nord_face_older_2], ["knight_4_14", "Lord Bulba", "knight_4_4", tf_hero, 0, reserved, fac_kingdom_4, [ itm_leather_vest, itm_banded_armor, itm_woolen_hose, itm_mail_boots, itm_nordic_helmet, itm_scale_gauntlets, itm_fighting_pick, itm_tab_shield_round_e, itm_throwing_axes], knight_attrib_4,wp(200),knight_skills_4, 0x0000000c0700414f2cb6aa36ea50a69d00000000001dc55c0000000000000000, nord_face_older_2], ["knight_4_15", "Lord Rayeck", "knight_4_5", tf_hero, 0, reserved, fac_kingdom_4, [itm_hunter, itm_leather_jacket, itm_heraldic_mail_with_tabard, itm_leather_boots, itm_scale_gauntlets, itm_splinted_leather_greaves, itm_nordic_helmet, itm_shortened_military_scythe, itm_tab_shield_round_e], knight_attrib_5,wp(290),knight_skills_5|knows_trainer_6, 0x0000000d920801831715d1aa9221372300000000001ec6630000000000000000, nord_face_older_2], ["knight_4_16", "Lord Dirigun", "knight_4_6", tf_hero, 0, reserved, fac_kingdom_4, [ itm_nomad_robe, itm_banded_armor, itm_nomad_boots, itm_mail_chausses, itm_nordic_helmet, itm_mail_mittens, itm_war_axe, itm_tab_shield_round_d, itm_throwing_axes], knight_attrib_1,wp(120),knight_skills_1, 0x000000099700124239233512e287391d00000000001db7200000000000000000, nord_face_middle_2], ["knight_4_17", "Lord Marayirr", "knight_4_7", tf_hero, 0, reserved, fac_kingdom_4, [ itm_fur_coat, itm_banded_armor, itm_nomad_boots, itm_mail_boots, itm_nasal_helmet, itm_mail_mittens, itm_sword_viking_3, itm_tab_shield_round_d, itm_throwing_axes], knight_attrib_2,wp(150),knight_skills_2|knows_trainer_4, 0x0000000c2f0442036d232a2324b5b81400000000001e55630000000000000000, nord_face_old_2], ["knight_4_18", "Lord Gearth", "knight_4_8", tf_hero, 0, reserved, fac_kingdom_4, [ itm_rich_outfit, itm_mail_and_plate, itm_woolen_hose, itm_mail_chausses, itm_segmented_helmet, itm_scale_gauntlets, itm_sword_viking_3, itm_shortened_military_scythe, itm_tab_shield_round_d], knight_attrib_3,wp(180),knight_skills_3, 0x0000000c0d00118866e22e3d9735a72600000000001eacad0000000000000000, nord_face_older_2], ["knight_4_19", "Lord Surdun", "knight_4_9", tf_hero, 0, reserved, fac_kingdom_4, [itm_warhorse, itm_nomad_robe, itm_haubergeon, itm_blue_hose, itm_mail_boots, itm_guard_helmet, itm_scale_gauntlets, itm_one_handed_battle_axe_c, itm_tab_shield_round_e, itm_throwing_axes], knight_attrib_4,wp(210),knight_skills_4|knows_trainer_5, 0x0000000c0308225124e26d4a6295965a00000000001d23e40000000000000000, nord_face_older_2], ["knight_4_20", "Lord Gerlad", "knight_4_0", tf_hero, 0, reserved, fac_kingdom_4, [itm_hunter, itm_courtly_outfit, itm_coat_of_plates, itm_nomad_boots, itm_splinted_greaves, itm_scale_gauntlets, itm_winged_great_helmet,itm_great_axe, itm_tab_shield_round_e, itm_throwing_axes], knight_attrib_5,wp(240),knight_skills_5, 0x0000000f630052813b6bb36de5d6eb7400000000001dd72c0000000000000000, nord_face_older_2], ["knight_5_1", "Lord Matheas", "knight_5_1", tf_hero, 0, reserved, fac_kingdom_5, [itm_saddle_horse, itm_tabard, itm_heraldic_mail_with_surcoat, itm_leather_boots, itm_mail_boots, itm_guard_helmet, itm_leather_gloves, itm_fighting_pick, itm_tab_shield_heater_c], knight_attrib_1,wp(130),knight_skills_1|knows_trainer_3, 0x0000000a1b0c00483adcbaa5ac9a34a200000000001ca2d40000000000000000, rhodok_face_middle_2], ["knight_5_2", "Lord Gutlans", "knight_5_2", tf_hero, 0, reserved, fac_kingdom_5, [itm_courser, itm_red_gambeson, itm_heraldic_mail_with_tabard, itm_leather_boots, itm_mail_boots, itm_nasal_helmet, itm_leather_gloves, itm_military_pick, itm_sword_two_handed_a, itm_tab_shield_heater_c], knight_attrib_2,wp(160),knight_skills_2|knows_trainer_4, 0x0000000c390c659229136db45a75251300000000001f16930000000000000000, rhodok_face_old_2], ["knight_5_3", "Lord Laruqen", "knight_5_3", tf_hero, 0, reserved, fac_kingdom_5, [itm_hunter, itm_short_tunic, itm_mail_and_plate, itm_nomad_boots, itm_splinted_leather_greaves, itm_kettle_hat, itm_gauntlets, itm_shortened_military_scythe, itm_tab_shield_heater_d], knight_attrib_3,wp(190),knight_skills_3, 0x0000000c2f10415108b1aacba27558d300000000001d329c0000000000000000, rhodok_face_older_2], ["knight_5_4", "Lord Raichs", "knight_5_4", tf_hero, 0, reserved, fac_kingdom_5, [itm_hunter, itm_leather_jacket, itm_brigandine_a, itm_woolen_hose, itm_splinted_greaves, itm_flat_topped_helmet, itm_gauntlets, itm_bastard_sword_a, itm_tab_shield_heater_d], knight_attrib_4,wp(220),knight_skills_4, 0x0000000c3c005110345c59d56975ba1200000000001e24e40000000000000000, rhodok_face_older_2], ["knight_5_5", "Lord Reland", "knight_5_5", tf_hero, 0, reserved, fac_kingdom_5, [itm_hunter, itm_rich_outfit, itm_heraldic_mail_with_tabard, itm_leather_boots, itm_mail_boots, itm_great_helmet, itm_gauntlets, itm_shortened_military_scythe, itm_tab_shield_heater_d], knight_attrib_5,wp(250),knight_skills_5, 0x0000000c060400c454826e471092299a00000000001d952d0000000000000000, rhodok_face_older_2], ["knight_5_6", "Lord Tarchias", "knight_5_6", tf_hero, 0, reserved, fac_kingdom_5, [itm_sumpter_horse, itm_ragged_outfit, itm_heraldic_mail_with_tabard, itm_woolen_hose, itm_splinted_greaves, itm_gauntlets, itm_skullcap, itm_sword_two_handed_b, itm_tab_shield_heater_c], knight_attrib_1,wp(130),knight_skills_1, 0x0000000c040804d2293c46a6a5669ce400000000001db7120000000000000000, rhodok_face_middle_2], ["knight_5_7", "Lord Gharmall", "knight_5_7", tf_hero, 0, reserved, fac_kingdom_5, [itm_saddle_horse, itm_coarse_tunic, itm_heraldic_mail_with_surcoat, itm_leather_boots, itm_mail_chausses, itm_gauntlets, itm_nasal_helmet, itm_bastard_sword_a, itm_tab_shield_heater_c], knight_attrib_2,wp(160),knight_skills_2, 0x0000000c3a0455c443d46e4c8b91291a00000000001ca51b0000000000000000, rhodok_face_old_2], ["knight_5_8", "Lord Talbar", "knight_5_8", tf_hero, 0, reserved, fac_kingdom_5, [itm_saddle_horse, itm_courtly_outfit, itm_heraldic_mail_with_tabard, itm_woolen_hose, itm_mail_boots, itm_nasal_helmet, itm_gauntlets, itm_military_pick, itm_sword_two_handed_b, itm_tab_shield_heater_c], knight_attrib_3,wp(190),knight_skills_3|knows_trainer_3, 0x0000000c2c0844d42914d19b2369b4ea00000000001e331b0000000000000000, rhodok_face_older_2], ["knight_5_9", "Lord Rimusk", "knight_5_9", tf_hero, 0, reserved, fac_kingdom_5, [itm_warhorse, itm_leather_jacket, itm_heraldic_mail_with_tabard, itm_leather_boots, itm_splinted_leather_greaves, itm_kettle_hat, itm_gauntlets, itm_great_bardiche, itm_tab_shield_heater_d], knight_attrib_4,wp(220),knight_skills_4|knows_trainer_6, 0x0000000c130461054af448eb19cd40e400000000001d488a0000000000000000, rhodok_face_older_2], ["knight_5_10", "Lord Falsevor", "knight_5_0", tf_hero, 0, reserved, fac_kingdom_5, [itm_warhorse, itm_rich_outfit, itm_heraldic_mail_with_tabard, itm_blue_hose, itm_mail_chausses, itm_great_helmet, itm_gauntlets, itm_bastard_sword_a, itm_tab_shield_heater_d], knight_attrib_5,wp(250),knight_skills_5|knows_trainer_4, 0x00000008e20011063d9b6d4a92ada53500000000001cc1180000000000000000, rhodok_face_older_2], ["knight_5_11", "Lord Etrosq", "knight_5_1", tf_hero, 0, reserved, fac_kingdom_5, [itm_saddle_horse, itm_tabard, itm_heraldic_mail_with_surcoat, itm_leather_boots, itm_mail_boots, itm_skullcap, itm_leather_gloves, itm_fighting_pick, itm_tab_shield_heater_c], knight_attrib_1,wp(130),knight_skills_1, 0x0000000c170c14874752adb6eb3228d500000000001c955c0000000000000000, rhodok_face_middle_2], ["knight_5_12", "Lord Kurnias", "knight_5_2", tf_hero, 0, reserved, fac_kingdom_5, [itm_courser, itm_red_gambeson, itm_heraldic_mail_with_tabard, itm_leather_boots, itm_mail_boots, itm_nasal_helmet, itm_leather_gloves, itm_military_pick, itm_tab_shield_heater_c], knight_attrib_2,wp(160),knight_skills_2|knows_trainer_5, 0x0000000c080c13d056ec8da85e3126ed00000000001d4ce60000000000000000, rhodok_face_old_2], ["knight_5_13", "Lord Tellrog", "knight_5_3", tf_hero, 0, reserved, fac_kingdom_5, [itm_hunter, itm_short_tunic, itm_mail_and_plate, itm_nomad_boots, itm_splinted_leather_greaves, itm_winged_great_helmet, itm_gauntlets, itm_sword_two_handed_a, itm_tab_shield_heater_d], knight_attrib_3,wp(190),knight_skills_3, 0x0000000cbf10100562a4954ae731588a00000000001d6b530000000000000000, rhodok_face_older_2], ["knight_5_14", "Lord Tribidan", "knight_5_4", tf_hero, 0, reserved, fac_kingdom_5, [itm_hunter, itm_leather_jacket, itm_brigandine_a, itm_woolen_hose, itm_splinted_greaves, itm_flat_topped_helmet, itm_gauntlets, itm_bastard_sword_a, itm_tab_shield_heater_d], knight_attrib_4,wp(220),knight_skills_4, 0x0000000c330805823baa77556c4e331a00000000001cb9110000000000000000, rhodok_face_older_2], ["knight_5_15", "Lord Gerluchs", "knight_5_5", tf_hero, 0, reserved, fac_kingdom_5, [itm_hunter, itm_rich_outfit, itm_heraldic_mail_with_tabard, itm_leather_boots, itm_mail_boots, itm_great_helmet, itm_gauntlets, itm_sword_two_handed_a, itm_tab_shield_heater_d], knight_attrib_5,wp(250),knight_skills_5, 0x0000000d51000106370c4d4732b536de00000000001db9280000000000000000, rhodok_face_older_2], ["knight_5_16", "Lord Fudreim", "knight_5_6", tf_hero, 0, reserved, fac_kingdom_5, [itm_sumpter_horse, itm_ragged_outfit, itm_heraldic_mail_with_tabard, itm_woolen_hose, itm_splinted_greaves, itm_guard_helmet, itm_leather_gloves, itm_fighting_pick, itm_tab_shield_heater_c], knight_attrib_1,wp(120),knight_skills_1, 0x0000000c06046151435b5122a37756a400000000001c46e50000000000000000, rhodok_face_middle_2], ["knight_5_17", "Lord Nealcha", "knight_5_7", tf_hero, 0, reserved, fac_kingdom_5, [itm_saddle_horse, itm_coarse_tunic, itm_heraldic_mail_with_surcoat, itm_leather_boots, itm_mail_chausses, itm_nasal_helmet, itm_leather_gloves, itm_bastard_sword_a, itm_tab_shield_heater_c], knight_attrib_2,wp(150),knight_skills_2, 0x0000000c081001d3465c89a6a452356300000000001cda550000000000000000, rhodok_face_old_2], ["knight_5_18", "Lord Fraichin", "knight_5_8", tf_hero, 0, reserved, fac_kingdom_5, [itm_saddle_horse, itm_courtly_outfit, itm_heraldic_mail_with_tabard, itm_woolen_hose, itm_mail_boots, itm_nasal_helmet, itm_gauntlets, itm_military_pick, itm_tab_shield_heater_d], knight_attrib_3,wp(180),knight_skills_3, 0x0000000a3d0c13c3452aa967276dc95c00000000001dad350000000000000000, rhodok_face_older_2], ["knight_5_19", "Lord Trimbau", "knight_5_9", tf_hero, 0, reserved, fac_kingdom_5, [itm_warhorse, itm_leather_jacket, itm_heraldic_mail_with_tabard, itm_leather_boots, itm_splinted_leather_greaves, itm_kettle_hat, itm_gauntlets, itm_fighting_pick, itm_sword_two_handed_a, itm_tab_shield_heater_d], knight_attrib_4,wp(210),knight_skills_4|knows_trainer_5, 0x0000000c3f08038245545e3b236a68de00000000001e37230000000000000000, rhodok_face_older_2], ["knight_5_20", "Lord Reichsin", "knight_5_0", tf_hero, 0, reserved, fac_kingdom_5, [itm_warhorse, itm_rich_outfit, itm_heraldic_mail_with_tabard, itm_blue_hose, itm_mail_chausses, itm_great_helmet, itm_gauntlets, itm_bastard_sword_b, itm_tab_shield_heater_d], knight_attrib_5,wp(240),knight_skills_5|knows_trainer_6, 0x0000000d8a00514544be2d14d370c65c00000000001ed6df0000000000000000, rhodok_face_older_2], ["kingdom_1_pretender", "Lady Isolla of Suno", "Kingdom 1 Lord", tf_hero|tf_female|tf_unmoveable_in_party_window, 0,reserved, fac_kingdom_1,[itm_charger, itm_rich_outfit, itm_blue_hose, itm_iron_greaves, itm_mail_shirt, itm_sword_medieval_c_small, itm_tab_shield_small_round_c, itm_bascinet], lord_attrib,wp(220),knows_lord_1, 0x00000000ef00000237dc71b90c31631200000000001e371b0000000000000000], #claims pre-salic descent ["kingdom_2_pretender", "Prince Valdym the Bastard", "Kingdom 2 Lord", tf_hero|tf_unmoveable_in_party_window, 0,reserved, fac_kingdom_2,[itm_hunter, itm_courtly_outfit, itm_leather_boots, itm_mail_chausses, itm_lamellar_armor, itm_military_pick, itm_tab_shield_heater_b, itm_flat_topped_helmet], lord_attrib,wp(220),knows_lord_1, 0x00000000200412142452ed631b30365c00000000001c94e80000000000000000, vaegir_face_middle_2], #had his patrimony falsified ["kingdom_3_pretender", "Dustum Khan", "Kingdom 3 Lord", tf_hero|tf_unmoveable_in_party_window, 0,reserved, fac_kingdom_3,[itm_courser, itm_nomad_robe, itm_leather_boots, itm_splinted_greaves, itm_khergit_guard_armor, itm_sword_khergit_2, itm_tab_shield_small_round_c, itm_segmented_helmet], lord_attrib,wp(220),knows_lord_1, 0x000000065504310b30d556b51238f66100000000001c256d0000000000000000, khergit_face_middle_2], #of the family ["kingdom_4_pretender", "Lethwin Far-Seeker", "Kingdom 4 Lord", tf_hero|tf_unmoveable_in_party_window, 0,reserved, fac_kingdom_4,[itm_hunter, itm_tabard, itm_leather_boots, itm_mail_boots, itm_brigandine_a, itm_sword_medieval_c, itm_tab_shield_heater_cav_a, itm_kettle_hat], lord_attrib,wp(220),knows_lord_1, 0x00000004340c01841d89949529a6776a00000000001c910a0000000000000000, nord_face_young_2], #dispossessed and wronged ["kingdom_5_pretender", "Lord Kastor of Veluca", "Kingdom 5 Lord", tf_hero|tf_unmoveable_in_party_window, 0,reserved, fac_kingdom_5,[itm_warhorse, itm_nobleman_outfit, itm_leather_boots, itm_splinted_leather_greaves, itm_mail_hauberk, itm_sword_medieval_c, itm_tab_shield_heater_d, itm_spiked_helmet], lord_attrib,wp(220),knows_lord_1, 0x0000000bed1031051da9abc49ecce25e00000000001e98680000000000000000, rhodok_face_old_2], #republican ## ["kingdom_1_lord_a", "Kingdom 1 Lord A", "Kingdom 1 Lord A", tf_hero, 0,reserved, fac_kingdom_1,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x00000000000c710201fa51b7286db721], ## ["kingdom_1_lord_b", "Kingdom 1 Lord B", "Kingdom 1 Lord B", tf_hero, 0,reserved, fac_kingdom_2,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x00000000000c710201fa51b7286db721], ## ["kingdom_1_lord_c", "Kingdom 1 Lord C", "Kingdom 1 Lord C", tf_hero, 0,reserved, fac_kingdom_3,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x00000000000c710201fa51b7286db721], ## ["kingdom_1_lord_d", "Kingdom 1 Lord D", "Kingdom 1 Lord D", tf_hero, 0,reserved, fac_kingdom_1,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x00000000000c710201fa51b7286db721], ## ["kingdom_1_lord_e", "Kingdom 1 Lord E", "Kingdom 1 Lord E", tf_hero, 0,reserved, fac_kingdom_1,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x00000000000c710201fa51b7286db721], ## ["kingdom_1_lord_f", "Kingdom 1 Lord F", "Kingdom 1 Lord F", tf_hero, 0,reserved, fac_kingdom_1,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x00000000000c710201fa51b7286db721], ## ["kingdom_1_lord_g", "Kingdom 1 Lord G", "Kingdom 1 Lord G", tf_hero, 0,reserved, fac_kingdom_1,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x00000000000c710201fa51b7286db721], ## ["kingdom_1_lord_h", "Kingdom 1 Lord H", "Kingdom 1 Lord H", tf_hero, 0,reserved, fac_kingdom_2,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x00000000000c710201fa51b7286db721], ## ["kingdom_1_lord_i", "Kingdom 1 Lord I", "Kingdom 1 Lord I", tf_hero, 0,reserved, fac_kingdom_2,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x00000000000c710201fa51b7286db721], ## ["kingdom_1_lord_j", "Kingdom 1 Lord J", "Kingdom 1 Lord J", tf_hero, 0,reserved, fac_kingdom_2,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x00000000000c710201fa51b7286db721], ## ["kingdom_1_lord_k", "Kingdom 1 Lord K", "Kingdom 1 Lord K", tf_hero, 0,reserved, fac_kingdom_2,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x00000000000c710201fa51b7286db721], ## ["kingdom_1_lord_l", "Kingdom 1 Lord L", "Kingdom 1 Lord L", tf_hero, 0,reserved, fac_kingdom_3,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x00000000000c710201fa51b7286db721], ## ["kingdom_1_lord_m", "Kingdom 1 Lord M", "Kingdom 1 Lord M", tf_hero, 0,reserved, fac_kingdom_3,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x00000000000c710201fa51b7286db721], ## ["kingdom_1_lord_n", "Kingdom 1 Lord N", "Kingdom 1 Lord N", tf_hero, 0,reserved, fac_kingdom_3,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x00000000000c710201fa51b7286db721], # ["town_1_ruler_a", "King Harlaus", "King Harlaus", tf_hero, scn_town_1_castle|entry(9),reserved, fac_swadians,[itm_saddle_horse,itm_courtly_outfit,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000010908101e36db44b75b6dd], # ["town_2_ruler_a", "Duke Taugard", "Duke Taugard", tf_hero, scn_town_2_castle|entry(9),reserved, fac_swadians,[itm_saddle_horse,itm_courtly_outfit,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000000310401e06db86375f6da], # ["town_3_ruler_a", "Count Grimar", "Count Grimar", tf_hero, scn_town_3_castle|entry(9),reserved, fac_swadians,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000004430301e46136eb75bc0a], # ["town_4_ruler_a", "Count Haxalye", "Count Haxalye", tf_hero, scn_town_4_castle|entry(9),reserved, fac_swadians,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000010918701e77136e905bc0e # ["town_5_ruler_a", "Count Belicha", "Count Belicha", tf_hero, scn_town_5_castle|entry(9),reserved, fac_swadians,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000000421c801e7713729c5b8ce], # ["town_6_ruler_a", "Count Nourbis", "Count Nourbis", tf_hero, scn_town_6_castle|entry(9),reserved, fac_swadians,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000000c640501e371b72bcdb724], # ["town_7_ruler_a", "Count Rhudolg", "Count Rhudolg", tf_hero, scn_town_7_castle|entry(9),reserved, fac_swadians,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000000c710201fa51b7286db721], # ["town_8_ruler_b", "King Yaroglek", "King_yaroglek", tf_hero, scn_town_8_castle|entry(9),reserved, fac_vaegirs,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000000128801f294ca6d66d555], # ["town_9_ruler_b", "Count Aolbrug", "Count_Aolbrug", tf_hero, scn_town_9_castle|entry(9),reserved, fac_vaegirs,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000004234401f26a271c8d38ea], # ["town_10_ruler_b","Count Rasevas", "Count_Rasevas", tf_hero, scn_town_10_castle|entry(9),reserved, fac_vaegirs,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000001032c201f38e269372471c], # ["town_11_ruler_b","Count Leomir", "Count_Leomir", tf_hero, scn_town_11_castle|entry(9),reserved, fac_vaegirs,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000000c538001f55148936d3895], # ["town_12_ruler_b","Count Haelbrad","Count_Haelbrad",tf_hero, scn_town_12_castle|entry(9),reserved, fac_vaegirs,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000000410c701f38598ac8aaaab], # ["town_13_ruler_b","Count Mira", "Count_Mira", tf_hero, scn_town_13_castle|entry(9),reserved, fac_vaegirs,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000004204401f390c515555594], # ["town_14_ruler_b","Count Camechaw","Count_Camechaw",tf_hero, scn_town_14_castle|entry(9),reserved, fac_vaegirs,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000008318101f390c515555594], ## ["kingdom_2_lord_a", "Kingdom 2 Lord A", "Kingdom 2 Lord A", tf_hero, 0,reserved, fac_kingdom_10,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x000000000008318101f390c515555594], ## ["kingdom_2_lord_b", "Kingdom 2 Lord B", "Kingdom 2 Lord B", tf_hero, 0,reserved, fac_kingdom_11,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x000000000008318101f390c515555594], ## ["kingdom_2_lord_c", "Kingdom 2 Lord C", "Kingdom 2 Lord C", tf_hero, 0,reserved, fac_kingdom_12,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x000000000008318101f390c515555594], ## ["kingdom_2_lord_d", "Kingdom 2 Lord D", "Kingdom 2 Lord D", tf_hero, 0,reserved, fac_kingdom_10,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x000000000008318101f390c515555594], ## ["kingdom_2_lord_e", "Kingdom 2 Lord E", "Kingdom 2 Lord E", tf_hero, 0,reserved, fac_kingdom_10,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x000000000008318101f390c515555594], ## ["kingdom_2_lord_f", "Kingdom 2 Lord F", "Kingdom 2 Lord F", tf_hero, 0,reserved, fac_kingdom_10,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x000000000008318101f390c515555594], ## ["kingdom_2_lord_g", "Kingdom 2 Lord G", "Kingdom 2 Lord G", tf_hero, 0,reserved, fac_kingdom_10,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x000000000008318101f390c515555594], ## ["kingdom_2_lord_h", "Kingdom 2 Lord H", "Kingdom 2 Lord H", tf_hero, 0,reserved, fac_kingdom_11,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x000000000008318101f390c515555594], ## ["kingdom_2_lord_i", "Kingdom 2 Lord I", "Kingdom 2 Lord I", tf_hero, 0,reserved, fac_kingdom_11,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x000000000008318101f390c515555594], ## ["kingdom_2_lord_j", "Kingdom 2 Lord J", "Kingdom 2 Lord J", tf_hero, 0,reserved, fac_kingdom_11,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x000000000008318101f390c515555594], ## ["kingdom_2_lord_k", "Kingdom 2 Lord K", "Kingdom 2 Lord K", tf_hero, 0,reserved, fac_kingdom_10,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x000000000008318101f390c515555594], ## ["kingdom_2_lord_l", "Kingdom 2 Lord L", "Kingdom 2 Lord L", tf_hero, 0,reserved, fac_kingdom_12,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x000000000008318101f390c515555594], ## ["kingdom_2_lord_m", "Kingdom 2 Lord M", "Kingdom 2 Lord M", tf_hero, 0,reserved, fac_kingdom_12,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x000000000008318101f390c515555594], ## ["kingdom_2_lord_n", "Kingdom 2 Lord N", "Kingdom 2 Lord N", tf_hero, 0,reserved, fac_kingdom_12,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots,itm_coat_of_plates],lord_attrib|level(38),wp(220),knows_common, 0x000000000008318101f390c515555594], #Royal family members ["knight_1_1_wife","Lady Anna","knight_1_1_wife",tf_hero|tf_female|tf_unmoveable_in_party_window,0,reserved,fac_kingdom_1, [ itm_lady_dress_ruby , itm_turret_hat_ruby, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000055910200107632d675a92b92d00000000001e45620000000000000000], ["knight_2_1_wife","Lady Junitha","knight_2_1_wife",tf_hero|tf_female|tf_unmoveable_in_party_window,0,reserved,fac_kingdom_2, [ itm_lady_dress_green, itm_turret_hat_green, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x00000007c0101002588caf17142ab93d00000000001ddfa40000000000000000], ["knight_3_1_wife","Lady Borge","knight_3_1_wife",tf_hero|tf_female|tf_unmoveable_in_party_window,0,reserved,fac_kingdom_3, [ itm_nomad_vest, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000056e082002471c91c8aa2a130b00000000001d48a40000000000000000], ["knight_4_1_wife","Lady Jadeth","knight_4_1_wife",tf_hero|tf_female|tf_unmoveable_in_party_window,0,reserved,fac_kingdom_4, [ itm_court_dress , itm_wimple_with_veil, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000054b100003274d65d2d239eb1300000000001d49080000000000000000], ["knight_5_1_wife","Lady Brina","knight_5_1_wife",tf_hero|tf_female|tf_unmoveable_in_party_window,0,reserved,fac_kingdom_5, [ itm_lady_dress_green, itm_turret_hat_green, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x00000007e900200416ed96e88b8d595a00000000001cb8ac0000000000000000], ["knight_1_2_wife","Lady Nelda","knight_1_1_wife",tf_hero|tf_female|tf_unmoveable_in_party_window,0,reserved,fac_kingdom_1, [ itm_lady_dress_ruby , itm_turret_hat_ruby, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000054f08100232636aa90d6e194b00000000001e43130000000000000000], ["knight_2_2_wife","Lady Katia","knight_2_1_wife",tf_hero|tf_female|tf_unmoveable_in_party_window,0,reserved,fac_kingdom_2, [ itm_lady_dress_green, itm_turret_hat_green, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x00000008c00c20032aa5ae36b4259b9300000000001da6a50000000000000000], ["knight_3_2_wife","Lady Tuan","knight_3_1_wife",tf_hero|tf_female|tf_unmoveable_in_party_window,0,reserved,fac_kingdom_3, [ itm_nomad_vest, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x00000008ec0820062ce4d246b38e632e00000000001d52910000000000000000], ["knight_4_2_wife","Lady Miar","knight_4_1_wife",tf_hero|tf_female|tf_unmoveable_in_party_window,0,reserved,fac_kingdom_4, [ itm_court_dress , itm_wimple_with_veil, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000058610000664d3693664f0c54b00000000001d332d0000000000000000], ["knight_5_2_wife","Lady Aliena","knight_5_1_wife",tf_hero|tf_female|tf_unmoveable_in_party_window,0,reserved,fac_kingdom_5, [ itm_lady_dress_green, itm_turret_hat_green, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000057008200222d432cf6d4a2ae300000000001d37a10000000000000000], ["knight_1_1_daughter","Lady Bela","knight_1_1_daughter",tf_hero|tf_female|tf_unmoveable_in_party_window,0,reserved,fac_kingdom_1, [ itm_lady_dress_blue, itm_turret_hat_blue, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000018f0410064854c742db74b52200000000001d448b0000000000000000], ["knight_2_1_daughter","Lady Seomis","knight_2_1_daughter",tf_hero|tf_female|tf_unmoveable_in_party_window,0,reserved,fac_kingdom_2, [ itm_peasant_dress , itm_wimple_with_veil, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x0000000007080004782a6cc4ecae4d1e00000000001eb6e30000000000000000], ["knight_3_1_daughter","Lady Chedina","knight_3_1_daughter",tf_hero|tf_female|tf_unmoveable_in_party_window,0,reserved,fac_kingdom_3, [ itm_nomad_robe , itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x00000000320c30023ce23a145a8f27a300000000001ea6dc0000000000000000], ["knight_4_1_daughter","Lady Dria","knight_4_1_daughter",tf_hero|tf_female|tf_unmoveable_in_party_window,0,reserved,fac_kingdom_4, [ itm_peasant_dress, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x00000000000c000469a4d5cda4b1349c00000000001cd6600000000000000000], ["knight_5_1_daughter","Lady Aneth","knight_5_1_daughter",tf_hero|tf_female|tf_unmoveable_in_party_window,0,reserved,fac_kingdom_5, [ itm_lady_dress_ruby , itm_wimple_with_veil, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x00000001b9002002364dd8aa5475d76400000000001db8d30000000000000000], ["knight_1_2_daughter","Lady Elina","knight_1_1_daughter",tf_hero|tf_female|tf_unmoveable_in_party_window,0,reserved,fac_kingdom_1, [ itm_lady_dress_blue, itm_turret_hat_blue, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000000204200629b131e90d6a8ae400000000001e28dd0000000000000000], ["knight_2_2_daughter","Lady Drina","knight_2_1_daughter",tf_hero|tf_female|tf_unmoveable_in_party_window,0,reserved,fac_kingdom_2, [ itm_peasant_dress , itm_wimple_with_veil, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000054008200638db99d89eccbd3500000000001ec91d0000000000000000], ["knight_3_2_daughter","Lady Ayasu","knight_3_1_daughter",tf_hero|tf_female|tf_unmoveable_in_party_window,0,reserved,fac_kingdom_3, [ itm_nomad_robe , itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000002a0c200348a28f2a54aa391c00000000001e46d10000000000000000], ["knight_4_2_daughter","Lady Glunde","knight_4_1_daughter",tf_hero|tf_female|tf_unmoveable_in_party_window,0,reserved,fac_kingdom_4, [ itm_peasant_dress, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x00000000000000021564d196e2aa279400000000001dc4ed0000000000000000], ["knight_5_2_daughter","Lady Reada","knight_5_1_daughter",tf_hero|tf_female|tf_unmoveable_in_party_window,0,reserved,fac_kingdom_5, [ itm_lady_dress_ruby , itm_wimple_with_veil, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000057a0000014123dae69e8e48e200000000001e08db0000000000000000], # ["kingdom_11_lord_daughter","kingdom_11_lord_daughter","kingdom_11_lord_daughter",tf_hero|tf_female,0,reserved,fac_kingdom_10, [ itm_lady_dress_blue , itm_turret_hat_blue, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000000008300701c08d34a450ce43], # ["kingdom_13_lord_daughter","kingdom_13_lord_daughter","kingdom_13_lord_daughter",tf_hero|tf_female,0,reserved,fac_kingdom_10, [ itm_lady_dress_green, itm_turret_hat_green, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000000008000401db10a45b41d6d8], ## ["kingdom_1_lady_a","kingdom_1_lady_a","kingdom_1_lady_a",tf_hero|tf_female,0,reserved,fac_kingdom_1, [ itm_lady_dress_blue , itm_turret_hat_blue, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000000008500201d8ad93708e4694], ## ["kingdom_1_lady_b","kingdom_1_lady_b","kingdom_1_lady_b",tf_hero|tf_female,0,reserved,fac_kingdom_1, [ itm_lady_dress_ruby , itm_turret_hat_ruby, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000000004000101c3ae68e0e944ac], ## ["kingdom_2_lady_a","Kingdom 2 Lady a","Kingdom 2 Lady a",tf_hero|tf_female,0,reserved,fac_kingdom_2, [ itm_lady_dress_green, itm_turret_hat_green, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000000008100501d8ad93708e4694], ## ["kingdom_2_lady_b","Kingdom 2 Lady b","Kingdom 2 Lady b",tf_hero|tf_female,0,reserved,fac_kingdom_2, [ itm_lady_dress_blue , itm_turret_hat_blue, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000000004000401d8ad93708e4694], ## ["kingdom_3_lady_a","Kingdom 3 Lady a","Kingdom 3 Lady a",tf_hero|tf_female,0,reserved,fac_kingdom_3, [ itm_lady_dress_ruby , itm_turret_hat_ruby, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000000010500301d8ad93708e4694], ## ## ["kingdom_3_lady_b","Kingdom 3 Lady b","Kingdom 3 Lady b",tf_hero|tf_female,0,reserved,fac_kingdom_3, [ itm_lady_dress_ruby , itm_turret_hat_ruby, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000000000100601d8b08d76d14a24], ## ["kingdom_4_lady_a","Kingdom 4 Lady a","Kingdom 4 Lady a",tf_hero|tf_female,0,reserved,fac_kingdom_4, [ itm_lady_dress_green, itm_turret_hat_green, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000000010500601d8ad93708e4694], ## ["kingdom_4_lady_b","Kingdom 4 Lady b","Kingdom 4 Lady b",tf_hero|tf_female,0,reserved,fac_kingdom_4, [ itm_lady_dress_blue , itm_turret_hat_blue, itm_leather_boots], def_attrib|level(2),wp(50),knows_common|knows_riding_2, 0x000000000008500201d8ad93708e4694], ["heroes_end", "heroes end", "heroes end", tf_hero, 0,reserved, fac_neutral,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000008318101f390c515555594], #Merchants AT SILAH ZIRH BOT Head_wear ## ["merchant_1", "merchant_1_F", "merchant_1_F",tf_hero|tf_female, 0,0, fac_kingdom_1,[itm_courser, itm_fighting_axe, itm_leather_jerkin, itm_leather_boots, itm_straw_hat], def_attrib|level(15),wp(100),knows_inventory_management_10, 0x000000000008200201e54c137a940c91], ## ["merchant_2", "merchant_2", "merchant_2", tf_hero, 0,0, fac_kingdom_2,[itm_saddle_horse, itm_arming_sword, itm_light_leather, itm_woolen_hose, ], def_attrib|level(15),wp(100),knows_inventory_management_10, 0x000000000000000601db6db6db6db6db], ## ["merchant_3", "merchant_3", "merchant_3", tf_hero, 0,0, fac_kingdom_3,[itm_courser, itm_nordic_sword, itm_leather_jerkin, itm_woolen_hose, ], def_attrib|level(15),wp(100),knows_inventory_management_10, 0x000000000008100701db6db6db6db6db], ## ["merchant_4", "merchant_4_F", "merchant_4_F",tf_hero|tf_female, 0,0, fac_kingdom_4,[itm_saddle_horse, itm_falchion, itm_light_leather, itm_blue_hose, ], def_attrib|level(15),wp(100),knows_inventory_management_10, 0x000000000010500401e54c137a945c91], ## ["merchant_5", "merchant_5", "merchant_5", tf_hero, 0,0, fac_kingdom_5,[itm_saddle_horse, itm_sword, itm_ragged_outfit, itm_hide_boots, ], def_attrib|level(15),wp(100),knows_inventory_management_10, 0x000000000008038001e54c135a945c91], ## ["merchant_6", "merchant_6", "merchant_6", tf_hero, 0,0, fac_kingdom_1,[itm_saddle_horse, itm_scimitar, itm_leather_jerkin, itm_leather_boots, ], def_attrib|level(15),wp(100),knows_inventory_management_10, 0x000000000000248e01e54c1b5a945c91], ## ["merchant_7", "merchant_7_F", "merchant_7_F",tf_hero|tf_female, 0,0, fac_kingdom_2,[itm_hunter, itm_arming_sword, itm_padded_leather, itm_blue_hose, ], def_attrib|level(15),wp(100),knows_inventory_management_10, 0x000000000004200601c98ad39c97557a], ## ["merchant_8", "merchant_8", "merchant_8", tf_hero, 0,0, fac_kingdom_3,[itm_saddle_horse, itm_nordic_sword, itm_light_leather, itm_leather_boots, itm_woolen_hood], def_attrib|level(15),wp(100),knows_inventory_management_10, 0x00000000001095ce01d6aad3a497557a], ## ["merchant_9", "merchant_9", "merchant_9", tf_hero, 0,0, fac_kingdom_4,[itm_saddle_horse, itm_sword, itm_padded_leather, itm_hide_boots, ], def_attrib|level(15),wp(100),knows_inventory_management_10, 0x000000000010519601ec26ae99898697], ## ["merchant_10","merchant_10","merchant_10",tf_hero, 0,0, fac_merchants,[itm_hunter, itm_bastard_sword, itm_light_leather, itm_woolen_hose, ], def_attrib|level(15),wp(100),knows_inventory_management_10, 0x00000000000884c401f6837d3294e28a], ## ["merchant_11","merchant_11","merchant_11",tf_hero, 0,0, fac_merchants,[itm_saddle_horse, itm_sword, itm_leather_jacket, itm_woolen_hose, ], def_attrib|level(15),wp(100),knows_inventory_management_10, 0x00000000000c450501e289dd2c692694], ## ["merchant_12","merchant_12","merchant_12",tf_hero, 0,0, fac_merchants,[itm_hunter, itm_falchion, itm_leather_jerkin, itm_hide_boots, ], def_attrib|level(15),wp(100),knows_inventory_management_10, 0x00000000000c660a01e5af3cb2763401], ## ["merchant_13","merchant_13","merchant_13",tf_hero, 0,0, fac_merchants,[itm_sumpter_horse, itm_nordic_sword, itm_padded_leather, itm_leather_boots, ], def_attrib|level(15),wp(100),knows_inventory_management_10, 0x00000000001001d601ec912a89e4d534], ## ["merchant_14","merchant_14","merchant_14",tf_hero, 0,0, fac_merchants,[itm_courser, itm_bastard_sword, itm_light_leather, itm_hide_boots, ], def_attrib|level(15),wp(100),knows_inventory_management_10, 0x000000000004335601ea2c04a8b6a394], ## ["merchant_15","merchant_15","merchant_15",tf_hero, 0,0, fac_merchants,[itm_saddle_horse, itm_sword, itm_padded_leather, itm_woolen_hose, itm_fur_hat], def_attrib|level(15),wp(100),knows_inventory_management_10, 0x000000000008358e01dbf27b6436089d], ## ["merchant_16","merchant_16_F","merchant_16_F",tf_hero|tf_female, 0,0, fac_merchants,[itm_hunter, itm_bastard_sword, itm_light_leather, itm_hide_boots, ], def_attrib|level(15),wp(100),knows_inventory_management_10, 0x00000000000c300101db0b9921494add], ## ["merchant_17","merchant_17","merchant_17",tf_hero, 0,0, fac_merchants,[itm_saddle_horse, itm_sword, itm_leather_jacket, itm_blue_hose, ], def_attrib|level(15),wp(100),knows_inventory_management_10, 0x000000000008740f01e945c360976a0a], ## ["merchant_18","merchant_18","merchant_18",tf_hero, 0,0, fac_merchants,[itm_saddle_horse, itm_nordic_sword, itm_padded_leather, itm_leather_boots, ], def_attrib|level(15),wp(100),knows_inventory_management_10, 0x000000000008020c01fc2db3b4c97685], ## ["merchant_19","merchant_19","merchant_19",tf_hero, 0,0, fac_merchants,[itm_saddle_horse, itm_falchion, itm_leather_jerkin, itm_woolen_hose, ], def_attrib|level(15),wp(100),knows_inventory_management_10, 0x000000000008118301f02af91892725b], ## ["merchant_20","merchant_20_F","merchant_20_F",tf_hero|tf_female, 0,0, fac_merchants,[itm_courser, itm_arming_sword, itm_padded_leather, itm_leather_boots, ], def_attrib|level(15),wp(100),knows_inventory_management_10, 0x000000000010500401f6837d27688212], #Seneschals ["town_1_seneschal", "Town 1 Seneschal", "Town 1 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[ itm_coarse_tunic, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, 0x00000000000c218501ef4f5d2ccb0026], ["town_2_seneschal", "Town 2 Seneschal", "Town 2 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[ itm_padded_leather, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, 0x00000000000c03cc01cc34a9a467fdfd], ["town_3_seneschal", "Town 3 Seneschal", "Town 3 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[ itm_coarse_tunic, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, 0x00000000000c500e01dbb2115a55f3cd], ["town_4_seneschal", "Town 4 Seneschal", "Town 4 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[ itm_blue_gambeson, itm_blue_hose], def_attrib|level(2),wp(20),knows_common, 0x000000000008035201e6eebaf3f3eb2b], ["town_5_seneschal", "Town 5 Seneschal", "Town 5 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[ itm_leather_jerkin, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, 0x000000000000249101e7898999ac54c6], ["town_6_seneschal", "Town 6 Seneschal", "Town 6 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[ itm_red_gambeson, itm_nomad_boots], def_attrib|level(2),wp(20),knows_common, 0x000000000010360b01cef8b57553d34e], ["town_7_seneschal", "Town 7 Seneschal", "Town 7 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[ itm_leather_jerkin, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, 0x000000000000018101f9487aa831dce4], ["town_8_seneschal", "Town 8 Seneschal", "Town 8 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[ itm_red_gambeson, itm_nomad_boots], def_attrib|level(2),wp(20),knows_common, 0x000000000004715201ea236c60a2bcae], ["town_9_seneschal", "Town 9 Seneschal", "Town 9 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[ itm_coarse_tunic, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, 0x00000000000440c601e1cd45cfb38550], ["town_10_seneschal", "Town 10 Seneschal", "Town 10 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[ itm_leather_jerkin, itm_blue_hose], def_attrib|level(2),wp(20),knows_common, 0x000000000010230c01ef41badb50465e], ["town_11_seneschal", "Town 11 Seneschal", "Town 11 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[ itm_leather_jacket, itm_nomad_boots], def_attrib|level(2),wp(20),knows_common, 0x000000000008061301fb89acfb95332f], ["town_12_seneschal", "Town 12 Seneschal", "Town 12 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[ itm_coarse_tunic, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, 0x00000000000c13ce01dc4723ab936c82], ["town_13_seneschal", "Town 13 Seneschal", "Town 13 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[ itm_leather_jerkin, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, 0x000000000008548e01d952a9b25d6d5a], ["town_14_seneschal", "Town 14 Seneschal", "Town 14 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[ itm_blue_gambeson, itm_blue_hose], def_attrib|level(2),wp(20),knows_common, 0x000000000004728b01c293c694944b05], ["town_15_seneschal", "Town 15 Seneschal", "Town 14 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[ itm_blue_gambeson, itm_blue_hose], def_attrib|level(2),wp(20),knows_common, 0x000000000004728b01c293c694944b05], ["town_16_seneschal", "Town 16 Seneschal", "Town 14 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[ itm_blue_gambeson, itm_blue_hose], def_attrib|level(2),wp(20),knows_common, 0x000000000004728b01c293c694944b05], ["town_17_seneschal", "Town 17 Seneschal", "Town 14 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[ itm_blue_gambeson, itm_blue_hose], def_attrib|level(2),wp(20),knows_common, 0x000000000004728b01c293c694944b05], ["town_18_seneschal", "Town 18 Seneschal", "Town 14 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[ itm_blue_gambeson, itm_blue_hose], def_attrib|level(2),wp(20),knows_common, 0x000000000004728b01c293c694944b05], ["castle_1_seneschal", "Castle 1 Seneschal", "Castle 1 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_coarse_tunic, itm_hide_boots], def_attrib|level(2),wp(20),knows_common, 0x000000000010360b01cef8b57553d34e], ["castle_2_seneschal", "Castle 2 Seneschal", "Castle 2 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_nomad_armor, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, 0x000000000008061301fb89acfb95332f], ["castle_3_seneschal", "Castle 3 Seneschal", "Castle 3 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_padded_leather, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, 0x000000000008548e01d952a9b25d6d5a], ["castle_4_seneschal", "Castle 4 Seneschal", "Castle 4 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_linen_tunic, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, 0x000000000004715201ea236c60a2bcae], ["castle_5_seneschal", "Castle 5 Seneschal", "Castle 5 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_leather_jerkin, itm_hide_boots], def_attrib|level(2),wp(20),knows_common, 0x00000000000c500e01dbb2115a55f3cd], ["castle_6_seneschal", "Castle 6 Seneschal", "Castle 6 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_coarse_tunic, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, 0x00000000000c03cc01cc34a9a467fdfd], ["castle_7_seneschal", "Castle 7 Seneschal", "Castle 7 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_blue_gambeson, itm_blue_hose], def_attrib|level(2),wp(20),knows_common, 0x00000000000c13ce01dc4723ab936c82], ["castle_8_seneschal", "Castle 8 Seneschal", "Castle 8 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_padded_leather, itm_hide_boots], def_attrib|level(2),wp(20),knows_common, 0x00000000000c218501ef4f5d2ccb0026], ["castle_9_seneschal", "Castle 9 Seneschal", "Castle 9 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_leather_jacket, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, 0x000000000008035201e6eebaf3f3eb2b], ["castle_10_seneschal", "Castle 10 Seneschal", "Castle 10 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_padded_leather, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, 0x00000000000440c601e1cd45cfb38550], ["castle_11_seneschal", "Castle 11 Seneschal", "Castle 11 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_padded_leather, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, 0x00000000000440c601e1cd45cfb38550], ["castle_12_seneschal", "Castle 2 Seneschal", "Castle 2 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_nomad_armor, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, 0x000000000008061301fb89acfb95332f], ["castle_13_seneschal", "Castle 3 Seneschal", "Castle 3 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_padded_leather, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, 0x000000000008548e01d952a9b25d6d5a], ["castle_14_seneschal", "Castle 4 Seneschal", "Castle 4 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_linen_tunic, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, 0x000000000004715201ea236c60a2bcae], ["castle_15_seneschal", "Castle 5 Seneschal", "Castle 5 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_leather_jerkin, itm_hide_boots], def_attrib|level(2),wp(20),knows_common, 0x00000000000c500e01dbb2115a55f3cd], ["castle_16_seneschal", "Castle 6 Seneschal", "Castle 6 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_coarse_tunic, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, 0x00000000000c03cc01cc34a9a467fdfd], ["castle_17_seneschal", "Castle 7 Seneschal", "Castle 7 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_blue_gambeson, itm_blue_hose], def_attrib|level(2),wp(20),knows_common, 0x00000000000c13ce01dc4723ab936c82], ["castle_18_seneschal", "Castle 8 Seneschal", "Castle 8 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_padded_leather, itm_hide_boots], def_attrib|level(2),wp(20),knows_common, 0x00000000000c218501ef4f5d2ccb0026], ["castle_19_seneschal", "Castle 9 Seneschal", "Castle 9 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_leather_jacket, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, 0x000000000008035201e6eebaf3f3eb2b], ["castle_20_seneschal", "Castle 20 Seneschal", "Castle 20 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_padded_leather, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, 0x00000000000440c601e1cd45cfb38550], ["castle_21_seneschal", "Castle 11 Seneschal", "Castle 11 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_padded_leather, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, 0x00000000000440c601e1cd45cfb38550], ["castle_22_seneschal", "Castle 2 Seneschal", "Castle 2 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_nomad_armor, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, 0x000000000008061301fb89acfb95332f], ["castle_23_seneschal", "Castle 3 Seneschal", "Castle 3 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_padded_leather, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, 0x000000000008548e01d952a9b25d6d5a], ["castle_24_seneschal", "Castle 4 Seneschal", "Castle 4 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_linen_tunic, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, 0x000000000004715201ea236c60a2bcae], ["castle_25_seneschal", "Castle 5 Seneschal", "Castle 5 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_leather_jerkin, itm_hide_boots], def_attrib|level(2),wp(20),knows_common, 0x00000000000c500e01dbb2115a55f3cd], ["castle_26_seneschal", "Castle 6 Seneschal", "Castle 6 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_coarse_tunic, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, 0x00000000000c03cc01cc34a9a467fdfd], ["castle_27_seneschal", "Castle 7 Seneschal", "Castle 7 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_blue_gambeson, itm_blue_hose], def_attrib|level(2),wp(20),knows_common, 0x00000000000c13ce01dc4723ab936c82], ["castle_28_seneschal", "Castle 8 Seneschal", "Castle 8 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_padded_leather, itm_hide_boots], def_attrib|level(2),wp(20),knows_common, 0x00000000000c218501ef4f5d2ccb0026], ["castle_29_seneschal", "Castle 9 Seneschal", "Castle 9 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_leather_jacket, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, 0x000000000008035201e6eebaf3f3eb2b], ["castle_30_seneschal", "Castle 20 Seneschal", "Castle 20 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_padded_leather, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, 0x00000000000440c601e1cd45cfb38550], ["castle_31_seneschal", "Castle 11 Seneschal", "Castle 11 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_padded_leather, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, 0x00000000000440c601e1cd45cfb38550], ["castle_32_seneschal", "Castle 2 Seneschal", "Castle 2 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_nomad_armor, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, 0x000000000008061301fb89acfb95332f], ["castle_33_seneschal", "Castle 3 Seneschal", "Castle 3 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_padded_leather, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, 0x000000000008548e01d952a9b25d6d5a], ["castle_34_seneschal", "Castle 4 Seneschal", "Castle 4 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_linen_tunic, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, 0x000000000004715201ea236c60a2bcae], ["castle_35_seneschal", "Castle 5 Seneschal", "Castle 5 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_leather_jerkin, itm_hide_boots], def_attrib|level(2),wp(20),knows_common, 0x00000000000c500e01dbb2115a55f3cd], ["castle_36_seneschal", "Castle 6 Seneschal", "Castle 6 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_coarse_tunic, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, 0x00000000000c03cc01cc34a9a467fdfd], ["castle_37_seneschal", "Castle 7 Seneschal", "Castle 7 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_blue_gambeson, itm_blue_hose], def_attrib|level(2),wp(20),knows_common, 0x00000000000c13ce01dc4723ab936c82], ["castle_38_seneschal", "Castle 8 Seneschal", "Castle 8 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_padded_leather, itm_hide_boots], def_attrib|level(2),wp(20),knows_common, 0x00000000000c218501ef4f5d2ccb0026], ["castle_39_seneschal", "Castle 9 Seneschal", "Castle 9 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_leather_jacket, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, 0x000000000008035201e6eebaf3f3eb2b], ["castle_40_seneschal", "Castle 20 Seneschal", "Castle 20 Seneschal", tf_hero|tf_is_merchant, 0,reserved, fac_neutral,[itm_padded_leather, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, 0x00000000000440c601e1cd45cfb38550], #Arena Masters ["town_1_arena_master", "Tournament Master","Tournament Master",tf_hero|tf_randomize_face, scn_town_1_arena|entry(52),reserved, fac_commoners,[itm_coarse_tunic, itm_hide_boots], def_attrib|level(2),wp(20),knows_common,man_face_middle_1, man_face_older_2], ["town_2_arena_master", "Tournament Master","Tournament Master",tf_hero|tf_randomize_face, scn_town_2_arena|entry(52),reserved, fac_commoners,[itm_linen_tunic, itm_nomad_boots], def_attrib|level(2),wp(20),knows_common,man_face_middle_1, man_face_older_2], ["town_3_arena_master", "Tournament Master","Tournament Master",tf_hero|tf_randomize_face, scn_town_3_arena|entry(52),reserved, fac_commoners,[itm_nomad_armor, itm_hide_boots], def_attrib|level(2),wp(20),knows_common,man_face_middle_1, man_face_older_2], ["town_4_arena_master", "Tournament Master","Tournament Master",tf_hero|tf_randomize_face, scn_town_4_arena|entry(52),reserved, fac_commoners,[itm_coarse_tunic, itm_hide_boots], def_attrib|level(2),wp(20),knows_common,man_face_middle_1, man_face_older_2], ["town_5_arena_master", "Tournament Master","Tournament Master",tf_hero|tf_randomize_face, scn_town_5_arena|entry(52),reserved, fac_commoners,[itm_linen_tunic, itm_nomad_boots], def_attrib|level(2),wp(20),knows_common,man_face_middle_1, man_face_older_2], ["town_6_arena_master", "Tournament Master","Tournament Master",tf_hero|tf_randomize_face, scn_town_6_arena|entry(52),reserved, fac_commoners,[itm_leather_jerkin, itm_leather_boots], def_attrib|level(2),wp(20),knows_common,man_face_middle_1, man_face_older_2], ["town_7_arena_master", "Tournament Master","Tournament Master",tf_hero|tf_randomize_face, scn_town_7_arena|entry(52),reserved, fac_commoners,[itm_padded_leather, itm_nomad_boots], def_attrib|level(2),wp(20),knows_common,man_face_middle_1, man_face_older_2], ["town_8_arena_master", "Tournament Master","Tournament Master",tf_hero|tf_randomize_face, scn_town_8_arena|entry(52),reserved, fac_commoners,[itm_linen_tunic, itm_hide_boots], def_attrib|level(2),wp(20),knows_common,man_face_middle_1, man_face_older_2], ["town_9_arena_master", "Tournament Master","Tournament Master",tf_hero|tf_randomize_face, scn_town_9_arena|entry(52),reserved, fac_commoners,[itm_padded_leather, itm_leather_boots], def_attrib|level(2),wp(20),knows_common,man_face_middle_1, man_face_older_2], ["town_10_arena_master","Tournament Master","Tournament Master",tf_hero|tf_randomize_face, scn_town_10_arena|entry(52),reserved, fac_commoners,[itm_nomad_armor, itm_nomad_boots], def_attrib|level(2),wp(20),knows_common,man_face_middle_1, man_face_older_2], ["town_11_arena_master","Tournament Master","Tournament Master",tf_hero|tf_randomize_face, scn_town_11_arena|entry(52),reserved, fac_commoners,[itm_coarse_tunic, itm_hide_boots], def_attrib|level(2),wp(20),knows_common,man_face_middle_1, man_face_older_2], ["town_12_arena_master","Tournament Master","Tournament Master",tf_hero|tf_randomize_face, scn_town_12_arena|entry(52),reserved, fac_commoners,[itm_leather_jerkin, itm_hide_boots], def_attrib|level(2),wp(20),knows_common,man_face_middle_1, man_face_older_2], ["town_13_arena_master","Tournament Master","Tournament Master",tf_hero|tf_randomize_face, scn_town_13_arena|entry(52),reserved, fac_commoners,[itm_coarse_tunic, itm_nomad_boots], def_attrib|level(2),wp(20),knows_common,man_face_middle_1, man_face_older_2], ["town_14_arena_master","Tournament Master","Tournament Master",tf_hero|tf_randomize_face, scn_town_14_arena|entry(52),reserved, fac_commoners,[itm_padded_leather, itm_hide_boots], def_attrib|level(2),wp(20),knows_common,man_face_middle_1, man_face_older_2], ["town_15_arena_master","Tournament Master","Tournament Master",tf_hero|tf_randomize_face, scn_town_15_arena|entry(52),reserved, fac_commoners,[itm_padded_leather, itm_hide_boots], def_attrib|level(2),wp(20),knows_common,man_face_middle_1, man_face_older_2], ["town_16_arena_master","Tournament Master","Tournament Master",tf_hero|tf_randomize_face, scn_town_16_arena|entry(52),reserved, fac_commoners,[itm_fur_coat, itm_hide_boots], def_attrib|level(2),wp(20),knows_common,man_face_middle_1, man_face_older_2], ["town_17_arena_master","Tournament Master","Tournament Master",tf_hero|tf_randomize_face, scn_town_17_arena|entry(52),reserved, fac_commoners,[itm_padded_leather, itm_hide_boots], def_attrib|level(2),wp(20),knows_common,man_face_middle_1, man_face_older_2], ["town_18_arena_master","Tournament Master","Tournament Master",tf_hero|tf_randomize_face, scn_town_18_arena|entry(52),reserved, fac_commoners,[itm_padded_leather, itm_hide_boots], def_attrib|level(2),wp(20),knows_common,man_face_middle_1, man_face_older_2], # Underground ## ["town_1_crook","Town 1 Crook","Town 1 Crook",tf_hero, 0,0, fac_neutral,[itm_linen_tunic, itm_leather_boots ],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x000000000004428401f46e44a27144e3], ## ["town_2_crook","Town 2 Crook","Town 2 Crook",tf_hero|tf_female, 0,0, fac_neutral,[itm_lady_dress_ruby, itm_turret_hat_ruby ],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x000000000004300101c36db6db6db6db], ## ["town_3_crook","Town 3 Crook","Town 3 Crook",tf_hero, 0,0, fac_neutral,[itm_leather_apron, itm_hide_boots ],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x00000000000c530701f17944a25164e1], ## ["town_4_crook","Town 4 Crook","Town 4 Crook",tf_hero, 0,0, fac_neutral,[itm_coarse_tunic, itm_hide_boots ],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000000c840501f36db6db7134db], ## ["town_5_crook","Town 5 Crook","Town 5 Crook",tf_hero, 0,0, fac_neutral,[itm_red_gambeson, itm_blue_hose ],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000000c000601f36db6db7134db], ## ["town_6_crook","Town 6 Crook","Town 6 Crook",tf_hero, 0,0, fac_neutral,[itm_coarse_tunic, itm_hide_boots ],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000000c10c801db6db6dd7598aa], ## ["town_7_crook","Town 7 Crook","Town 7 Crook",tf_hero|tf_female, 0,0, fac_neutral,[itm_woolen_dress, itm_woolen_hood ],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x000000000010214101de2f64db6db58d], ## ## ["town_8_crook","Town 8 Crook","Town 8 Crook",tf_hero, 0,0, fac_neutral,[itm_leather_jacket, itm_leather_boots ],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x000000000010318401c96db4db6db58d], ## ["town_9_crook","Town 9 Crook","Town 9 Crook",tf_hero, 0,0, fac_neutral,[itm_linen_tunic, itm_hide_boots ],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x000000000008520501f16db4db6db58d], ## ["town_10_crook","Town 10 Crook","Town 10 Crook",tf_hero, 0,0, fac_neutral,[itm_coarse_tunic, itm_nomad_boots ],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x000000000008600701f35144db6db8a2], ## ["town_11_crook","Town 11 Crook","Town 11 Crook",tf_hero|tf_female, 0,0, fac_neutral,[itm_blue_dress, itm_wimple_with_veil ],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x000000000008408101f386c4db4dd514], ## ["town_12_crook","Town 12 Crook","Town 12 Crook",tf_hero, 0,0, fac_neutral,[itm_coarse_tunic, itm_hide_boots ],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000000870c501f386c4f34dbaa1], ## ["town_13_crook","Town 13 Crook","Town 13 Crook",tf_hero, 0,0, fac_neutral,[itm_blue_gambeson, itm_nomad_boots ],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000000c114901f245caf34dbaa1], ## ["town_14_crook","Town 14 Crook","Town 14 Crook",tf_hero|tf_female, 0,0, fac_neutral,[itm_woolen_dress, itm_turret_hat_ruby ],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000001021c001f545a49b6eb2bc], # Armor Merchants #arena_masters_end = zendar_armorer ["town_1_armorer","Armorer", "Armorer", tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_linen_tunic, itm_leather_boots ],def_attrib|level(2),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_2_armorer","Armorer", "Armorer", tf_hero|tf_randomize_face|tf_female|tf_is_merchant, 0, 0, fac_commoners,[itm_woolen_dress, itm_straw_hat ],def_attrib|level(2),wp(20),knows_inventory_management_10, woman_face_1, woman_face_2], ["town_3_armorer","Armorer", "Armorer", tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_arena_tunic_red, itm_hide_boots ],def_attrib|level(2),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_4_armorer","Armorer", "Armorer", tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_red_gambeson, itm_leather_boots ],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_5_armorer","Armorer", "Armorer", tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_linen_tunic, itm_nomad_boots ],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_6_armorer","Armorer", "Armorer", tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_fur_coat, itm_nomad_boots ],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_7_armorer","Armorer", "Armorer", tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_leather_jerkin, itm_blue_hose ],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_8_armorer","Armorer", "Armorer", tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_padded_leather, itm_leather_boots ],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_9_armorer","Armorer", "Armorer", tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_blue_gambeson, itm_nomad_boots ],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_10_armorer","Armorer", "Armorer", tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_leather_jerkin, itm_hide_boots ],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_11_armorer","Armorer", "Armorer", tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_fur_coat, itm_leather_boots ],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_12_armorer","Armorer", "Armorer", tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_red_gambeson, itm_nomad_boots ],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_13_armorer","Armorer", "Armorer", tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_leather_jacket, itm_hide_boots ],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_14_armorer","Armorer", "Armorer", tf_hero|tf_randomize_face|tf_female|tf_is_merchant, 0, 0, fac_commoners,[itm_woolen_dress, itm_headcloth ],def_attrib|level(5),wp(20),knows_inventory_management_10, woman_face_1, woman_face_2], ["town_15_armorer","Armorer", "Armorer", tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_blue_gambeson, itm_leather_boots ],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_16_armorer","Armorer", "Armorer", tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_fur_coat, itm_nomad_boots ],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_17_armorer","Armorer", "Armorer", tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_fur_coat, itm_hide_boots ],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_18_armorer","Armorer", "Armorer", tf_hero|tf_randomize_face|tf_female|tf_is_merchant, 0, 0, fac_commoners,[itm_woolen_dress, itm_headcloth ],def_attrib|level(5),wp(20),knows_inventory_management_10, woman_face_1, woman_face_2], # Weapon merchants ["town_1_weaponsmith", "Weaponsmith","Weaponsmith",tf_hero|tf_randomize_face|tf_female|tf_is_merchant, 0, 0, fac_commoners,[itm_linen_tunic, itm_hide_boots,itm_straw_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, woman_face_1, woman_face_2], ["town_2_weaponsmith", "Weaponsmith","Weaponsmith",tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_shirt, itm_nomad_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_3_weaponsmith", "Weaponsmith","Weaponsmith",tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_fur_coat, itm_hide_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_4_weaponsmith", "Weaponsmith","Weaponsmith",tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_shirt, itm_hide_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_5_weaponsmith", "Weaponsmith","Weaponsmith",tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_leather_jerkin, itm_wrapping_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_6_weaponsmith", "Weaponsmith","Weaponsmith",tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_linen_tunic, itm_hide_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_7_weaponsmith", "Weaponsmith","Weaponsmith",tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_shirt, itm_hide_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_8_weaponsmith", "Weaponsmith","Weaponsmith",tf_hero|tf_randomize_face|tf_female|tf_is_merchant, 0, 0, fac_commoners,[itm_woolen_dress, itm_wrapping_boots,itm_straw_hat],def_attrib|level(5),wp(20),knows_inventory_management_10, woman_face_1, woman_face_2], ["town_9_weaponsmith", "Weaponsmith","Weaponsmith",tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_leather_jerkin, itm_leather_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_10_weaponsmith","Weaponsmith","Weaponsmith",tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_linen_tunic, itm_hide_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_11_weaponsmith","Weaponsmith","Weaponsmith",tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_leather_jacket, itm_woolen_hose],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_12_weaponsmith","Weaponsmith","Weaponsmith",tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_shirt, itm_hide_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_13_weaponsmith","Weaponsmith","Weaponsmith",tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_arena_tunic_red, itm_wrapping_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_14_weaponsmith","Weaponsmith","Weaponsmith",tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_arena_tunic_blue, itm_wrapping_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_15_weaponsmith","Weaponsmith","Weaponsmith",tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_leather_jacket, itm_woolen_hose],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_16_weaponsmith","Weaponsmith","Weaponsmith",tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_shirt, itm_hide_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_17_weaponsmith","Weaponsmith","Weaponsmith",tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_arena_tunic_green, itm_wrapping_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], ["town_18_weaponsmith","Weaponsmith","Weaponsmith",tf_hero|tf_randomize_face| tf_is_merchant, 0, 0, fac_commoners,[itm_linen_tunic, itm_wrapping_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2], #Tavern keepers ["town_1_tavernkeeper", "Tavern_Keeper","Tavern_Keeper",tf_hero|tf_randomize_face, scn_town_1_tavern|entry(9),0, fac_commoners,[itm_leather_apron, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_common, mercenary_face_1, mercenary_face_2], ["town_2_tavernkeeper", "Tavern_Keeper","Tavern_Keeper",tf_hero|tf_randomize_face, scn_town_2_tavern|entry(9),0, fac_commoners,[itm_leather_apron, itm_leather_boots],def_attrib|level(2),wp(20),knows_common, mercenary_face_1, mercenary_face_2], ["town_3_tavernkeeper", "Tavern_Keeper","Tavern_Keeper",tf_hero|tf_randomize_face|tf_female, scn_town_3_tavern|entry(9),0, fac_commoners,[itm_woolen_dress, itm_hide_boots],def_attrib|level(2),wp(20),knows_common, woman_face_1, woman_face_2], ["town_4_tavernkeeper", "Tavern_Keeper","Tavern_Keeper",tf_hero|tf_randomize_face, scn_town_4_tavern|entry(9),0, fac_commoners,[itm_leather_apron, itm_leather_boots],def_attrib|level(2),wp(20),knows_common, mercenary_face_1, mercenary_face_2], ["town_5_tavernkeeper", "Tavern_Keeper","Tavern_Keeper",tf_hero|tf_randomize_face, scn_town_5_tavern|entry(9),0, fac_commoners,[itm_leather_apron, itm_hide_boots],def_attrib|level(2),wp(20),knows_common, mercenary_face_1, mercenary_face_2], ["town_6_tavernkeeper", "Tavern_Keeper","Tavern_Keeper",tf_hero|tf_randomize_face|tf_female, scn_town_6_tavern|entry(9),0, fac_commoners,[itm_woolen_dress, itm_hide_boots],def_attrib|level(2),wp(20),knows_common, woman_face_1, woman_face_2], ["town_7_tavernkeeper", "Tavern_Keeper","Tavern_Keeper",tf_hero|tf_randomize_face|tf_female, scn_town_7_tavern|entry(9),0, fac_commoners,[itm_woolen_dress, itm_leather_boots, itm_headcloth],def_attrib|level(2),wp(20),knows_common, woman_face_1, woman_face_2], ["town_8_tavernkeeper", "Tavern_Keeper","Tavern_Keeper",tf_hero|tf_randomize_face, scn_town_8_tavern|entry(9),0, fac_commoners,[itm_leather_apron, itm_leather_boots],def_attrib|level(2),wp(20),knows_common, mercenary_face_1, mercenary_face_2], ["town_9_tavernkeeper", "Tavern_Keeper","Tavern_Keeper",tf_hero|tf_randomize_face|tf_female, scn_town_9_tavern|entry(9),0, fac_commoners,[itm_woolen_dress, itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, woman_face_1, woman_face_2], ["town_10_tavernkeeper","Tavern_Keeper","Tavern_Keeper",tf_hero|tf_randomize_face|tf_female, scn_town_10_tavern|entry(9),0, fac_commoners,[itm_woolen_dress, itm_hide_boots],def_attrib|level(2),wp(20),knows_common, woman_face_1, woman_face_2], ["town_11_tavernkeeper","Tavern_Keeper","Tavern_Keeper",tf_hero|tf_randomize_face|tf_female, scn_town_11_tavern|entry(9),0, fac_commoners,[itm_woolen_dress, itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, woman_face_1, woman_face_2], ["town_12_tavernkeeper","Tavern_Keeper","Tavern_Keeper",tf_hero|tf_randomize_face, scn_town_12_tavern|entry(9),0, fac_commoners,[itm_leather_apron, itm_hide_boots],def_attrib|level(2),wp(20),knows_common, mercenary_face_1, mercenary_face_2], ["town_13_tavernkeeper","Tavern_Keeper","Tavern_Keeper",tf_hero|tf_randomize_face|tf_female, scn_town_13_tavern|entry(9),0, fac_commoners,[itm_woolen_dress, itm_hide_boots, itm_headcloth],def_attrib|level(2),wp(20),knows_common, woman_face_1, woman_face_2], ["town_14_tavernkeeper","Tavern_Keeper","Tavern_Keeper",tf_hero|tf_randomize_face, scn_town_14_tavern|entry(9),0, fac_commoners,[itm_shirt, itm_leather_boots],def_attrib|level(2),wp(20),knows_common, mercenary_face_1, mercenary_face_2], ["town_15_tavernkeeper","Tavern_Keeper","Tavern_Keeper",tf_hero|tf_randomize_face|tf_female, scn_town_15_tavern|entry(9),0, fac_commoners,[itm_woolen_dress, itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, woman_face_1, woman_face_2], ["town_16_tavernkeeper","Tavern_Keeper","Tavern_Keeper",tf_hero|tf_randomize_face, scn_town_16_tavern|entry(9),0, fac_commoners,[itm_leather_apron, itm_hide_boots],def_attrib|level(2),wp(20),knows_common, mercenary_face_1, mercenary_face_2], ["town_17_tavernkeeper","Tavern_Keeper","Tavern_Keeper",tf_hero|tf_randomize_face|tf_female, scn_town_17_tavern|entry(9),0, fac_commoners,[itm_woolen_dress, itm_hide_boots, itm_headcloth],def_attrib|level(2),wp(20),knows_common, woman_face_1, woman_face_2], ["town_18_tavernkeeper","Tavern_Keeper","Tavern_Keeper",tf_hero|tf_randomize_face, scn_town_18_tavern|entry(9),0, fac_commoners,[itm_shirt, itm_leather_boots],def_attrib|level(2),wp(20),knows_common, mercenary_face_1, mercenary_face_2], #Goods Merchants ["town_1_merchant", "Merchant","Merchant", tf_hero|tf_randomize_face|tf_is_merchant, scn_town_1_store|entry(9),0, fac_commoners, [itm_coarse_tunic, itm_leather_boots ],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_2_merchant", "Merchant","Merchant", tf_hero|tf_randomize_face|tf_is_merchant, scn_town_2_store|entry(9),0, fac_commoners, [itm_leather_apron, itm_leather_boots ],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_3_merchant", "Merchant","Merchant",tf_female|tf_hero|tf_randomize_face|tf_is_merchant, scn_town_3_store|entry(9),0, fac_commoners, [itm_dress, itm_leather_boots, itm_straw_hat ],def_attrib|level(2),wp(20),knows_inventory_management_10, woman_face_1, woman_face_2], ["town_4_merchant", "Merchant","Merchant", tf_hero|tf_randomize_face|tf_is_merchant, scn_town_4_store|entry(9),0, fac_commoners, [itm_leather_apron, itm_leather_boots ],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_5_merchant", "Merchant","Merchant", tf_hero|tf_randomize_face|tf_is_merchant, scn_town_5_store|entry(9),0, fac_commoners, [itm_nomad_armor, itm_leather_boots ],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_6_merchant", "Merchant","Merchant",tf_female|tf_hero|tf_randomize_face|tf_is_merchant, scn_town_6_store|entry(9),0, fac_commoners, [itm_woolen_dress, itm_leather_boots ],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_7_merchant", "Merchant","Merchant", tf_hero|tf_randomize_face|tf_is_merchant, scn_town_7_store|entry(9),0, fac_commoners, [itm_leather_jerkin,itm_leather_boots ],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_8_merchant", "Merchant","Merchant", tf_hero|tf_randomize_face|tf_is_merchant, scn_town_8_store|entry(9),0, fac_commoners, [itm_leather_apron, itm_leather_boots ],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_9_merchant", "Merchant","Merchant", tf_hero|tf_randomize_face|tf_is_merchant, scn_town_9_store|entry(9),0, fac_commoners, [itm_leather_apron, itm_leather_boots ],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_10_merchant","Merchant","Merchant", tf_hero|tf_randomize_face|tf_is_merchant, scn_town_10_store|entry(9),0, fac_commoners, [itm_leather_jerkin,itm_leather_boots ],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_11_merchant","Merchant","Merchant", tf_hero|tf_randomize_face|tf_is_merchant, scn_town_11_store|entry(9),0, fac_commoners, [itm_leather_apron, itm_leather_boots ],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_12_merchant","Merchant","Merchant",tf_female|tf_hero|tf_randomize_face|tf_is_merchant, scn_town_12_store|entry(9),0, fac_commoners, [itm_woolen_dress, itm_leather_boots, itm_female_hood ],def_attrib|level(2),wp(20),knows_inventory_management_10, woman_face_1, woman_face_2], ["town_13_merchant","Merchant","Merchant",tf_female|tf_hero|tf_randomize_face|tf_is_merchant, scn_town_13_store|entry(9),0, fac_commoners, [itm_dress, itm_leather_boots, itm_straw_hat ],def_attrib|level(2),wp(20),knows_inventory_management_10, woman_face_1, woman_face_2], ["town_14_merchant","Merchant","Merchant", tf_hero|tf_randomize_face|tf_is_merchant, scn_town_14_store|entry(9),0, fac_commoners, [itm_leather_apron, itm_leather_boots ],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_15_merchant","Merchant","Merchant", tf_hero|tf_randomize_face|tf_is_merchant, scn_town_15_store|entry(9),0, fac_commoners, [itm_leather_apron, itm_leather_boots ],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_16_merchant","Merchant","Merchant",tf_female|tf_hero|tf_randomize_face|tf_is_merchant, scn_town_16_store|entry(9),0, fac_commoners, [itm_woolen_dress, itm_leather_boots, itm_female_hood ],def_attrib|level(2),wp(20),knows_inventory_management_10, woman_face_1, woman_face_2], ["town_17_merchant","Merchant","Merchant",tf_female|tf_hero|tf_randomize_face|tf_is_merchant, scn_town_17_store|entry(9),0, fac_commoners, [itm_dress, itm_leather_boots, itm_straw_hat ],def_attrib|level(2),wp(20),knows_inventory_management_10, woman_face_1, woman_face_2], ["town_18_merchant","Merchant","Merchant", tf_hero|tf_randomize_face|tf_is_merchant, scn_town_18_store|entry(9),0, fac_commoners, [itm_leather_apron, itm_leather_boots ],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["salt_mine_merchant","Barezan","Barezan", tf_hero|tf_is_merchant, scn_salt_mine|entry(1),0, fac_commoners, [itm_leather_apron, itm_leather_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x00000000000c528601ea69b6e46dbdb6], # Horse Merchants ["town_1_horse_merchant","Horse Merchant","Town 1 Horse Merchant",tf_hero|tf_randomize_face|tf_is_merchant|tf_female, 0, 0, fac_commoners,[itm_blue_dress, itm_blue_hose, itm_female_hood], def_attrib|level(2),wp(20),knows_inventory_management_10, woman_face_1, woman_face_2], ["town_2_horse_merchant","Horse Merchant","Town 2 Horse Merchant",tf_hero|tf_randomize_face|tf_is_merchant, 0, 0, fac_commoners,[itm_linen_tunic, itm_nomad_boots,], def_attrib|level(5),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_3_horse_merchant","Horse Merchant","Town 3 Horse Merchant",tf_hero|tf_randomize_face|tf_is_merchant, 0, 0, fac_commoners,[itm_nomad_armor, itm_hide_boots], def_attrib|level(5),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_4_horse_merchant","Horse Merchant","Town 4 Horse Merchant",tf_hero|tf_randomize_face|tf_is_merchant, 0, 0, fac_commoners,[itm_leather_jerkin, itm_nomad_boots], def_attrib|level(5),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_5_horse_merchant","Horse Merchant","Town 5 Horse Merchant",tf_hero|tf_randomize_face|tf_is_merchant|tf_female, 0, 0, fac_commoners,[itm_dress, itm_woolen_hose, itm_woolen_hood], def_attrib|level(5),wp(20),knows_inventory_management_10, woman_face_1, woman_face_2], ["town_6_horse_merchant","Horse Merchant","Town 6 Horse Merchant",tf_hero|tf_randomize_face|tf_is_merchant, 0, 0, fac_commoners,[itm_coarse_tunic, itm_hide_boots], def_attrib|level(5),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_7_horse_merchant","Horse Merchant","Town 7 Horse Merchant",tf_hero|tf_randomize_face|tf_is_merchant, 0, 0, fac_commoners,[itm_coarse_tunic, itm_leather_boots], def_attrib|level(5),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_8_horse_merchant","Horse Merchant","Town 8 Horse Merchant",tf_hero|tf_randomize_face|tf_is_merchant, 0, 0, fac_commoners,[itm_coarse_tunic, itm_hide_boots], def_attrib|level(5),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_9_horse_merchant","Horse Merchant","Town 9 Horse Merchant",tf_hero|tf_randomize_face|tf_is_merchant, 0, 0, fac_commoners,[itm_leather_jerkin, itm_woolen_hose], def_attrib|level(5),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_10_horse_merchant","Horse Merchant","Town 10 Horse Merchant",tf_hero|tf_randomize_face|tf_is_merchant|tf_female, 0, 0, fac_commoners,[itm_blue_dress, itm_blue_hose, itm_straw_hat], def_attrib|level(5),wp(20),knows_inventory_management_10, woman_face_1, woman_face_2], ["town_11_horse_merchant","Horse Merchant","Town 11 Horse Merchant",tf_hero|tf_randomize_face|tf_is_merchant, 0, 0, fac_commoners,[itm_nomad_armor, itm_leather_boots], def_attrib|level(5),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_12_horse_merchant","Horse Merchant","Town 12 Horse Merchant",tf_hero|tf_randomize_face|tf_is_merchant, 0, 0, fac_commoners,[itm_leather_jacket, itm_hide_boots], def_attrib|level(5),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_13_horse_merchant","Horse Merchant","Town 13 Horse Merchant",tf_hero|tf_randomize_face|tf_is_merchant, 0, 0, fac_commoners,[itm_coarse_tunic, itm_nomad_boots], def_attrib|level(5),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_14_horse_merchant","Horse Merchant","Town 14 Horse Merchant",tf_hero|tf_randomize_face|tf_is_merchant|tf_female, 0, 0, fac_commoners,[itm_peasant_dress, itm_blue_hose, itm_headcloth], def_attrib|level(5),wp(20),knows_inventory_management_10, woman_face_1, woman_face_2], ["town_15_horse_merchant","Horse Merchant","Town 15 Horse Merchant",tf_hero|tf_randomize_face|tf_is_merchant, 0, 0, fac_commoners,[itm_nomad_armor, itm_leather_boots], def_attrib|level(5),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_16_horse_merchant","Horse Merchant","Town 16 Horse Merchant",tf_hero|tf_randomize_face|tf_is_merchant, 0, 0, fac_commoners,[itm_leather_jacket, itm_hide_boots], def_attrib|level(5),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_17_horse_merchant","Horse Merchant","Town 17 Horse Merchant",tf_hero|tf_randomize_face|tf_is_merchant, 0, 0, fac_commoners,[itm_coarse_tunic, itm_nomad_boots], def_attrib|level(5),wp(20),knows_inventory_management_10, man_face_young_1, man_face_older_2], ["town_18_horse_merchant","Horse Merchant","Town 18 Horse Merchant",tf_hero|tf_randomize_face|tf_is_merchant|tf_female, 0, 0, fac_commoners,[itm_peasant_dress, itm_blue_hose, itm_headcloth], def_attrib|level(5),wp(20),knows_inventory_management_10, woman_face_1, woman_face_2], #Town Mayors #itm_courtly_outfit itm_gambeson itm_blue_gambeson itm_red_gambeson itm_nobleman_outfit itm_rich_outfit ["town_1_mayor", "Guild_Master", "Guild_Master", tf_hero|tf_randomize_face, 0,reserved, fac_neutral,[ itm_courtly_outfit, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, man_face_middle_1, mercenary_face_2], ["town_2_mayor", "Guild_Master", "Guild_Master", tf_hero|tf_randomize_face, 0,reserved, fac_neutral,[ itm_gambeson, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, man_face_middle_1, mercenary_face_2], ["town_3_mayor", "Guild_Master", "Guild_Master", tf_hero|tf_randomize_face, 0,reserved, fac_neutral,[ itm_blue_gambeson, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, man_face_middle_1, mercenary_face_2], ["town_4_mayor", "Guild_Master", "Guild_Master", tf_hero|tf_randomize_face, 0,reserved, fac_neutral,[ itm_fur_coat, itm_blue_hose], def_attrib|level(2),wp(20),knows_common, man_face_middle_1, mercenary_face_2], ["town_5_mayor", "Guild_Master", "Guild_Master", tf_hero|tf_randomize_face, 0,reserved, fac_neutral,[ itm_nobleman_outfit, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, man_face_middle_1, mercenary_face_2], ["town_6_mayor", "Guild_Master", "Guild_Master", tf_hero|tf_randomize_face, 0,reserved, fac_neutral,[ itm_red_gambeson, itm_nomad_boots], def_attrib|level(2),wp(20),knows_common, man_face_middle_1, mercenary_face_2], ["town_7_mayor", "Guild_Master", "Guild_Master", tf_hero|tf_randomize_face, 0,reserved, fac_neutral,[ itm_rich_outfit, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, man_face_middle_1, mercenary_face_2], ["town_8_mayor", "Guild_Master", "Guild_Master", tf_hero|tf_randomize_face, 0,reserved, fac_neutral,[ itm_red_gambeson, itm_nomad_boots], def_attrib|level(2),wp(20),knows_common, man_face_middle_1, mercenary_face_2], ["town_9_mayor", "Guild_Master", "Guild_Master", tf_hero|tf_randomize_face, 0,reserved, fac_neutral,[ itm_courtly_outfit, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, man_face_middle_1, mercenary_face_2], ["town_10_mayor", "Guild_Master", "Guild_Master", tf_hero|tf_randomize_face, 0,reserved, fac_neutral,[ itm_leather_jerkin, itm_blue_hose], def_attrib|level(2),wp(20),knows_common, man_face_middle_1, mercenary_face_2], ["town_11_mayor", "Guild_Master", "Guild_Master", tf_hero|tf_randomize_face, 0,reserved, fac_neutral,[ itm_leather_jacket, itm_nomad_boots], def_attrib|level(2),wp(20),knows_common, man_face_middle_1, mercenary_face_2], ["town_12_mayor", "Guild_Master", "Guild_Master", tf_hero|tf_randomize_face, 0,reserved, fac_neutral,[ itm_red_gambeson, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, man_face_middle_1, mercenary_face_2], ["town_13_mayor", "Guild_Master", "Guild_Master", tf_hero|tf_randomize_face, 0,reserved, fac_neutral,[ itm_nobleman_outfit, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, man_face_middle_1, mercenary_face_2], ["town_14_mayor", "Guild_Master", "Guild_Master", tf_hero|tf_randomize_face, 0,reserved, fac_neutral,[ itm_blue_gambeson, itm_blue_hose], def_attrib|level(2),wp(20),knows_common, man_face_middle_1, mercenary_face_2], ["town_15_mayor", "Guild_Master", "Guild_Master", tf_hero|tf_randomize_face, 0,reserved, fac_neutral,[ itm_leather_jacket, itm_nomad_boots], def_attrib|level(2),wp(20),knows_common, man_face_middle_1, mercenary_face_2], ["town_16_mayor", "Guild_Master", "Guild_Master", tf_hero|tf_randomize_face, 0,reserved, fac_neutral,[ itm_fur_coat, itm_leather_boots], def_attrib|level(2),wp(20),knows_common, man_face_middle_1, mercenary_face_2], ["town_17_mayor", "Guild_Master", "Guild_Master", tf_hero|tf_randomize_face, 0,reserved, fac_neutral,[ itm_nobleman_outfit, itm_woolen_hose], def_attrib|level(2),wp(20),knows_common, man_face_middle_1, mercenary_face_2], ["town_18_mayor", "Guild_Master", "Guild_Master", tf_hero|tf_randomize_face, 0,reserved, fac_neutral,[ itm_blue_gambeson, itm_blue_hose], def_attrib|level(2),wp(20),knows_common, man_face_middle_1, mercenary_face_2], #Village stores ["village_1_elder", "Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_hide_boots, itm_felt_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_2_elder", "Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_3_elder", "Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_nomad_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_4_elder", "Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_nomad_boots, itm_leather_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_5_elder", "Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_6_elder", "Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_hide_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_7_elder", "Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_fur_coat, itm_nomad_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_8_elder", "Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_wrapping_boots, itm_felt_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_9_elder", "Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_hide_boots, itm_leather_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_10_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_11_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_nomad_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_12_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots, itm_leather_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_13_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_nomad_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_14_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_15_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_hide_boots, itm_felt_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_16_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_hide_boots, itm_leather_warrior_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_17_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_fur_coat, itm_nomad_boots,itm_fur_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_18_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_hide_boots, itm_leather_warrior_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_19_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_nomad_boots, itm_fur_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_20_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_hide_boots, itm_leather_warrior_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_21_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots, itm_leather_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_22_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_fur_coat, itm_nomad_boots,itm_fur_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_23_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_hide_boots, itm_felt_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_24_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_25_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_fur_coat, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_26_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots, itm_leather_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_27_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_wrapping_boots, itm_felt_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_28_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_29_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_hide_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_30_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots, itm_leather_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_31_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_nomad_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_32_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_33_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots, itm_leather_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_34_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_nomad_boots,itm_fur_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_35_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_36_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_hide_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_37_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_38_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_hide_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_39_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_nomad_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_40_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_41_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_nomad_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_42_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_43_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots, itm_leather_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_44_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_nomad_boots,itm_fur_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_45_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_46_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_hide_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_47_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_48_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_hide_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_49_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_fur_coat, itm_nomad_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_50_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_51_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots, itm_leather_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_52_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_nomad_boots,itm_fur_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_53_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_hide_boots, itm_felt_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_54_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_55_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_56_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots, itm_leather_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_57_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_wrapping_boots, itm_felt_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_58_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_fur_coat, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_59_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_hide_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_60_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots, itm_leather_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_61_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots, itm_leather_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_62_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_nomad_boots,itm_fur_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_63_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_hide_boots, itm_felt_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_64_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_65_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_fur_coat, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_66_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots, itm_leather_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_67_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_wrapping_boots, itm_felt_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_68_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_69_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_hide_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_70_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots, itm_leather_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_71_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots, itm_leather_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_72_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_nomad_boots,itm_fur_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_73_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_hide_boots, itm_felt_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_74_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_75_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_76_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_fur_coat, itm_wrapping_boots, itm_leather_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_77_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_wrapping_boots, itm_felt_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_78_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_79_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_hide_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_80_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots, itm_leather_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_81_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_nomad_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_82_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_83_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_fur_coat, itm_wrapping_boots, itm_leather_cap],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_84_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_nomad_boots,itm_fur_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_85_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_86_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_hide_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_87_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_88_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_fur_coat, itm_hide_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_89_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_coarse_tunic, itm_nomad_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], ["village_90_elder","Village_Elder", "village_1_elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_robe, itm_wrapping_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2], # Place extra merchants before this point ["merchants_end","merchants_end","merchants_end",tf_hero, 0,0, fac_commoners,[],def_attrib|level(2),wp(20),knows_inventory_management_10,0], # Chests ["zendar_chest","Zendar Chest","Zendar Chest",tf_hero|tf_inactive, 0,reserved, fac_neutral, [],def_attrib|level(18),wp(60),knows_common, 0], ["tutorial_chest_1","Melee Weapons Chest","Melee Weapons Chest",tf_hero|tf_inactive, 0,reserved, fac_neutral,[itm_tutorial_sword, itm_tutorial_axe, itm_tutorial_spear, itm_tutorial_club, itm_tutorial_battle_axe],def_attrib|level(18),wp(60),knows_common, 0], ["tutorial_chest_2","Ranged Weapons Chest","Ranged Weapons Chest",tf_hero|tf_inactive, 0,reserved, fac_neutral,[itm_tutorial_short_bow, itm_tutorial_arrows, itm_tutorial_crossbow, itm_tutorial_bolts, itm_tutorial_throwing_daggers],def_attrib|level(18),wp(60),knows_common, 0], ["bonus_chest_1","Bonus Chest","Bonus Chest",tf_hero|tf_inactive, 0,reserved, fac_neutral,[itm_strange_armor,itm_strange_short_sword],def_attrib|level(18),wp(60),knows_common, 0], ["bonus_chest_2","Bonus Chest","Bonus Chest",tf_hero|tf_inactive, 0,reserved, fac_neutral,[itm_strange_boots,itm_strange_sword],def_attrib|level(18),wp(60),knows_common, 0], ["bonus_chest_3","Bonus Chest","Bonus Chest",tf_hero|tf_inactive, 0,reserved, fac_neutral,[itm_strange_helmet,itm_strange_great_sword],def_attrib|level(18),wp(60),knows_common, 0], # These are used as arrays in the scripts. ["temp_array_a","temp_array_a","temp_array_a",tf_hero|tf_inactive, 0,reserved, fac_neutral,[],def_attrib|level(18),wp(60),knows_common, 0], ["temp_array_b","temp_array_b","temp_array_b",tf_hero|tf_inactive, 0,reserved, fac_neutral,[],def_attrib|level(18),wp(60),knows_common, 0], ["temp_array_c","temp_array_c","temp_array_c",tf_hero|tf_inactive, 0,reserved, fac_neutral,[],def_attrib|level(18),wp(60),knows_common, 0], ["stack_selection_amounts","stack_selection_amounts","stack_selection_amounts",tf_hero|tf_inactive,0,reserved,fac_neutral,[],def_attrib,0,knows_common,0], ["stack_selection_ids","stack_selection_ids","stack_selection_ids",tf_hero|tf_inactive,0,reserved,fac_neutral,[],def_attrib,0,knows_common,0], ["notification_menu_types","notification_menu_types","notification_menu_types",tf_hero|tf_inactive,0,reserved,fac_neutral,[],def_attrib,0,knows_common,0], ["notification_menu_var1","notification_menu_var1","notification_menu_var1",tf_hero|tf_inactive,0,reserved,fac_neutral,[],def_attrib,0,knows_common,0], ["notification_menu_var2","notification_menu_var2","notification_menu_var2",tf_hero|tf_inactive,0,reserved,fac_neutral,[],def_attrib,0,knows_common,0], ["banner_background_color_array","banner_background_color_array","banner_background_color_array",tf_hero|tf_inactive,0,reserved,fac_neutral,[],def_attrib,0,knows_common,0], ## ["black_khergit_guard","Black Khergit Guard","Black Khergit Guard",tf_mounted|tf_guarantee_ranged|tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_helmet|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_black_khergits, ## [itm_arrows,itm_nomad_sabre,itm_scimitar,itm_winged_mace,itm_lance,itm_khergit_bow,itm_khergit_guard_helmet,itm_khergit_cavalry_helmet,itm_khergit_guard_boots,itm_khergit_guard_armor,itm_nomad_shield,itm_steppe_horse,itm_warhorse], ## def_attrib|level(28),wp(140),knows_riding_6|knows_ironflesh_4|knows_horse_archery_6|knows_power_draw_6,khergit_face1, khergit_face2], # Add Extra Quest NPCs below this point ["local_merchant","Local Merchant","Local Merchants",tf_guarantee_boots|tf_guarantee_armor, 0,0, fac_commoners,[itm_leather_apron,itm_leather_boots,itm_butchering_knife],def_attrib|level(5),wp(40),knows_power_strike_1, merchant_face_1, merchant_face_2], ["tax_rebel","Peasant Rebel","Peasant Rebels",tf_guarantee_armor,0,reserved,fac_commoners, [itm_cleaver,itm_knife,itm_pitch_fork,itm_sickle,itm_club,itm_stones,itm_leather_cap,itm_felt_hat,itm_felt_hat,itm_linen_tunic,itm_coarse_tunic,itm_nomad_boots,itm_wrapping_boots], def_attrib|level(4),wp(60),knows_common,vaegir_face1, vaegir_face2], ["trainee_peasant","Peasant","Peasants",tf_guarantee_armor,0,reserved,fac_commoners, [itm_cleaver,itm_knife,itm_pitch_fork,itm_sickle,itm_club,itm_stones,itm_leather_cap,itm_felt_hat,itm_felt_hat,itm_linen_tunic,itm_coarse_tunic,itm_nomad_boots,itm_wrapping_boots], def_attrib|level(4),wp(60),knows_common,vaegir_face1, vaegir_face2], ["fugitive","Nervous Man","Nervous Men",tf_guarantee_boots|tf_guarantee_armor,0,0,fac_commoners, [itm_short_tunic,itm_linen_tunic,itm_coarse_tunic, itm_tabard, itm_leather_vest, itm_woolen_hose, itm_nomad_boots, itm_blue_hose, itm_wrapping_boots, itm_fur_hat, itm_leather_cap, itm_sword_medieval_b, itm_throwing_daggers], def_attrib|str_24|agi_25|level(26),wp(180),knows_common|knows_power_throw_6|knows_power_strike_6|knows_ironflesh_9,man_face_middle_1, man_face_old_2], ["spy","Ordinary Townsman","Ordinary Townsmen", tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_horse,0,0,fac_neutral, [itm_sword_viking_1,itm_leather_jerkin,itm_leather_boots,itm_courser,itm_leather_gloves], def_attrib|agi_11|level(20),wp(130),knows_common,man_face_middle_1, man_face_older_2], ["spy_partner","Unremarkable Townsman","Unremarkable Townsmen", tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_horse,0,0,fac_neutral, [itm_sword_medieval_b,itm_leather_jerkin,itm_leather_boots,itm_courser,itm_leather_gloves], def_attrib|agi_11|level(10),wp(130),knows_common,vaegir_face1, vaegir_face2], ## ["conspirator","Conspirator","Conspirators", tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_horse,0,0,fac_neutral, ## [itm_sword,itm_leather_jerkin,itm_leather_boots,itm_hunter,itm_leather_gloves], ## def_attrib|agi_11|level(10),wp(130),knows_common,vaegir_face1, vaegir_face2], ## ["conspirator_leader","Conspirator","Conspirators", tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_horse,0,0,fac_neutral, ## [itm_sword,itm_leather_jerkin,itm_leather_boots,itm_hunter,itm_leather_gloves], ## def_attrib|agi_11|level(10),wp(130),knows_common,vaegir_face1, vaegir_face2], ## ["peasant_rebel","Peasant Rebel","Peasant Rebels",tf_guarantee_armor,0,reserved,fac_peasant_rebels, ## [itm_cleaver,itm_knife,itm_pitch_fork,itm_sickle,itm_club,itm_stones,itm_leather_cap,itm_felt_hat,itm_felt_hat,itm_linen_tunic,itm_coarse_tunic,itm_nomad_boots,itm_wrapping_boots], ## def_attrib|level(4),wp(60),knows_common,vaegir_face1, vaegir_face2], ## ["noble_refugee","Noble Refugee","Noble Refugees",tf_guarantee_boots|tf_guarantee_armor,0,0,fac_noble_refugees, ## [itm_sword,itm_leather_jacket,itm_hide_boots, itm_saddle_horse, itm_leather_jacket, itm_leather_cap], ## def_attrib|level(9),wp(100),knows_common,swadian_face1, swadian_face2], ## ["noble_refugee_woman","Noble Refugee Woman","Noble Refugee Women",tf_female|tf_guarantee_armor|tf_guarantee_boots,0,0,fac_noble_refugees, ## [itm_knife,itm_dagger,itm_hunting_crossbow,itm_dress,itm_robe,itm_woolen_dress, itm_headcloth, itm_woolen_hood, itm_wrapping_boots], ## def_attrib|level(3),wp(45),knows_common,refugee_face1,refugee_face2], ["quick_battle_6_player", "quick_battle_6_player", "quick_battle_6_player", tf_hero, 0, reserved, fac_player_faction, [itm_padded_cloth,itm_nomad_boots, itm_splinted_leather_greaves, itm_skullcap, itm_sword_medieval_b, itm_crossbow, itm_bolts, itm_plate_covered_round_shield], knight_attrib_1,wp(130),knight_skills_1, 0x000000000008010b01f041a9249f65fd], #Player history array ["log_array_entry_type", "Local Merchant","Local Merchant",tf_guarantee_boots|tf_guarantee_armor, 0,0, fac_commoners,[itm_leather_apron,itm_leather_boots,itm_butchering_knife],def_attrib|level(5),wp(40),knows_power_strike_1, merchant_face_1, merchant_face_2], ["log_array_entry_time", "Local Merchant","Local Merchant",tf_guarantee_boots|tf_guarantee_armor, 0,0, fac_commoners,[itm_leather_apron,itm_leather_boots,itm_butchering_knife],def_attrib|level(5),wp(40),knows_power_strike_1, merchant_face_1, merchant_face_2], ["log_array_actor", "Local Merchant","Local Merchant",tf_guarantee_boots|tf_guarantee_armor, 0,0, fac_commoners,[itm_leather_apron,itm_leather_boots,itm_butchering_knife],def_attrib|level(5),wp(40),knows_power_strike_1, merchant_face_1, merchant_face_2], ["log_array_center_object", "Local Merchant","Local Merchant",tf_guarantee_boots|tf_guarantee_armor, 0,0, fac_commoners,[itm_leather_apron,itm_leather_boots,itm_butchering_knife],def_attrib|level(5),wp(40),knows_power_strike_1, merchant_face_1, merchant_face_2], ["log_array_center_object_lord", "Local Merchant","Local Merchant",tf_guarantee_boots|tf_guarantee_armor, 0,0, fac_commoners,[itm_leather_apron,itm_leather_boots,itm_butchering_knife],def_attrib|level(5),wp(40),knows_power_strike_1, merchant_face_1, merchant_face_2], ["log_array_center_object_faction", "Local Merchant","Local Merchant",tf_guarantee_boots|tf_guarantee_armor, 0,0, fac_commoners,[itm_leather_apron,itm_leather_boots,itm_butchering_knife],def_attrib|level(5),wp(40),knows_power_strike_1, merchant_face_1, merchant_face_2], ["log_array_troop_object", "Local Merchant","Local Merchant",tf_guarantee_boots|tf_guarantee_armor, 0,0, fac_commoners,[itm_leather_apron,itm_leather_boots,itm_butchering_knife],def_attrib|level(5),wp(40),knows_power_strike_1, merchant_face_1, merchant_face_2], ["log_array_troop_object_faction", "Local Merchant","Local Merchant",tf_guarantee_boots|tf_guarantee_armor, 0,0, fac_commoners,[itm_leather_apron,itm_leather_boots,itm_butchering_knife],def_attrib|level(5),wp(40),knows_power_strike_1, merchant_face_1, merchant_face_2], ["log_array_faction_object", "Local Merchant","Local Merchant",tf_guarantee_boots|tf_guarantee_armor, 0,0, fac_commoners,[itm_leather_apron,itm_leather_boots,itm_butchering_knife],def_attrib|level(5),wp(40),knows_power_strike_1, merchant_face_1, merchant_face_2], ] #Troop upgrade declarations upgrade(troops,"farmer", "watchman") upgrade(troops,"townsman","watchman") upgrade2(troops,"watchman","caravan_guard","mercenary_crossbowman") upgrade2(troops,"caravan_guard","mercenary_swordsman","mercenary_horseman") upgrade(troops,"mercenary_swordsman","hired_blade") upgrade(troops,"mercenary_horseman","mercenary_cavalry") upgrade(troops,"swadian_recruit","swadian_militia") upgrade2(troops,"swadian_militia","swadian_footman","swadian_skirmisher") upgrade2(troops,"swadian_footman","swadian_man_at_arms","swadian_infantry") upgrade(troops,"swadian_infantry","swadian_sergeant") upgrade(troops,"swadian_skirmisher","swadian_crossbowman") upgrade(troops,"swadian_crossbowman","swadian_sharpshooter") upgrade(troops,"swadian_man_at_arms","swadian_knight") upgrade(troops,"vaegir_recruit","vaegir_footman") upgrade2(troops,"vaegir_footman","vaegir_veteran","vaegir_skirmisher") upgrade(troops,"vaegir_skirmisher","vaegir_archer") upgrade(troops,"vaegir_archer","vaegir_marksman") upgrade2(troops,"vaegir_veteran","vaegir_horseman","vaegir_infantry") upgrade(troops,"vaegir_infantry","vaegir_guard") upgrade(troops,"vaegir_horseman","vaegir_knight") upgrade(troops,"khergit_tribesman","khergit_skirmisher") upgrade(troops,"khergit_skirmisher","khergit_horseman") upgrade2(troops,"khergit_horseman","khergit_lancer","khergit_horse_archer") upgrade(troops,"khergit_horse_archer","khergit_veteran_horse_archer") upgrade2(troops,"nord_recruit","nord_footman","nord_huntsman") upgrade(troops,"nord_footman","nord_trained_footman") upgrade(troops,"nord_trained_footman","nord_warrior") upgrade(troops,"nord_warrior","nord_veteran") upgrade(troops,"nord_veteran","nord_champion") upgrade(troops,"nord_huntsman","nord_archer") upgrade(troops,"nord_archer","nord_veteran_archer") upgrade2(troops,"rhodok_tribesman","rhodok_spearman","rhodok_crossbowman") upgrade(troops,"rhodok_spearman","rhodok_trained_spearman") upgrade(troops,"rhodok_trained_spearman","rhodok_veteran_spearman") upgrade(troops,"rhodok_veteran_spearman","rhodok_sergeant") upgrade(troops,"rhodok_crossbowman","rhodok_trained_crossbowman") upgrade(troops,"rhodok_trained_crossbowman","rhodok_sharpshooter") upgrade2(troops,"looter","mountain_bandit", "forest_bandit") upgrade2(troops,"bandit","brigand","mercenary_swordsman") upgrade(troops,"manhunter","slave_driver") #upgrade(troops,"forest_bandit","mercenary_crossbowman") upgrade(troops,"slave_driver","slave_hunter") upgrade(troops,"slave_hunter","slave_crusher") upgrade(troops,"slave_crusher","slaver_chief") upgrade(troops,"follower_woman","hunter_woman") upgrade(troops,"hunter_woman","fighter_woman") upgrade(troops,"fighter_woman","sword_sister") upgrade(troops,"refugee","follower_woman") upgrade(troops,"peasant_woman","follower_woman")
Python
from module_constants import * from header_items import * from header_operations import * from header_triggers import * #################################################################################################################### # Each item record contains the following fields: # 1) Item id: used for referencing items in other files. # The prefix itm_ is automatically added before each item id. # 2) Item name. Name of item as it'll appear in inventory window # 3) List of meshes. Each mesh record is a tuple containing the following fields: # 3.1) Mesh name. # 3.2) Modifier bits that this mesh matches. # Note that the first mesh record is the default. # 4) Item flags. See header_items.py for a list of available flags. # 5) Item capabilities. Used for which animations this item is used with. See header_items.py for a list of available flags. # 6) Item value. # 7) Item stats: Bitwise-or of various stats about the item such as: # weight, abundance, difficulty, head_armor, body_armor,leg_armor, etc... # 8) Modifier bits: Modifiers that can be applied to this item. # 9) [Optional] Triggers: List of simple triggers to be associated with the item. #################################################################################################################### # Some constants for ease of use. imodbits_none = 0 imodbits_horse_basic = imodbit_swaybacked|imodbit_lame|imodbit_spirited|imodbit_heavy|imodbit_stubborn imodbits_cloth = imodbit_tattered | imodbit_ragged | imodbit_sturdy | imodbit_thick | imodbit_hardened imodbits_armor = imodbit_rusty | imodbit_battered | imodbit_crude | imodbit_thick | imodbit_reinforced |imodbit_lordly imodbits_plate = imodbit_cracked | imodbit_rusty | imodbit_battered | imodbit_crude | imodbit_thick | imodbit_reinforced |imodbit_lordly imodbits_polearm = imodbit_cracked | imodbit_bent | imodbit_balanced imodbits_shield = imodbit_cracked | imodbit_battered |imodbit_thick | imodbit_reinforced imodbits_sword = imodbit_rusty | imodbit_chipped | imodbit_balanced |imodbit_tempered imodbits_sword_high = imodbit_rusty | imodbit_chipped | imodbit_balanced |imodbit_tempered|imodbit_masterwork imodbits_axe = imodbit_rusty | imodbit_chipped | imodbit_balanced |imodbit_heavy imodbits_mace = imodbit_rusty | imodbit_chipped | imodbit_balanced |imodbit_heavy imodbits_pick = imodbit_rusty | imodbit_chipped | imodbit_balanced | imodbit_heavy imodbits_bow = imodbit_cracked | imodbit_bent | imodbit_strong |imodbit_masterwork imodbits_crossbow = imodbit_cracked | imodbit_bent | imodbit_masterwork imodbits_missile = imodbit_bent | imodbit_large_bag imodbits_thrown = imodbit_bent | imodbit_heavy| imodbit_balanced| imodbit_large_bag imodbits_horse_good = imodbit_spirited|imodbit_heavy imodbits_good = imodbit_sturdy | imodbit_thick | imodbit_hardened | imodbit_reinforced imodbits_bad = imodbit_rusty | imodbit_chipped | imodbit_tattered | imodbit_ragged | imodbit_cracked | imodbit_bent # Replace winged mace/spiked mace with: Flanged mace / Knobbed mace? # Fauchard (majowski glaive) items = [ # item_name, mesh_name, item_properties, item_capabilities, slot_no, cost, bonus_flags, weapon_flags, scale, view_dir, pos_offset ["no_item","INVALID ITEM", [("practice_sword",0)], itp_type_one_handed_wpn|itp_primary|itp_secondary, itc_longsword, 3,weight(1.5)|spd_rtng(103)|weapon_length(90)|swing_damage(16,blunt)|thrust_damage(10,blunt),imodbits_none], ["horse_meat","Horse Meat", [("raw_meat",0)], itp_type_goods|itp_consumable|itp_food, 0, 12,weight(40)|food_quality(30)|max_ammo(40),imodbits_none], # Items before this point are hardwired and their order should not be changed! ["practice_sword","Practice Sword", [("practice_sword",0)], itp_type_one_handed_wpn|itp_primary|itp_secondary|itp_wooden_parry|itp_wooden_attack, itc_longsword, 3,weight(1.5)|spd_rtng(103)|weapon_length(90)|swing_damage(16,blunt)|thrust_damage(10,blunt),imodbits_none], ["heavy_practice_sword","Heavy Practice Sword", [("heavy_practicesword",0)], itp_type_two_handed_wpn|itp_two_handed|itp_primary|itp_wooden_parry|itp_wooden_attack, itc_greatsword, 21, weight(6.25)|spd_rtng(94)|weapon_length(128)|swing_damage(26,blunt)|thrust_damage(18,blunt),imodbits_none], ["practice_axe", "Practice Axe", [("hatchet",0)], itp_type_one_handed_wpn| itp_primary|itp_secondary|itp_bonus_against_shield|itp_wooden_parry, itc_scimitar|itcf_carry_axe_left_hip, 24 , weight(2) | spd_rtng(95) | weapon_length(75) | swing_damage(20, blunt) | thrust_damage(0, pierce), imodbits_axe], ["arena_axe", "Axe", [("arena_axe",0)], itp_type_one_handed_wpn|itp_primary|itp_secondary|itp_bonus_against_shield|itp_wooden_parry, itc_scimitar|itcf_carry_axe_left_hip, 137 , weight(1.5)|spd_rtng(100) | weapon_length(69)|swing_damage(23 , blunt) | thrust_damage(0 , pierce),imodbits_axe ], ["arena_sword", "Sword", [("arena_sword_one_handed",0),("sword_medieval_b_scabbard", ixmesh_carry),], itp_type_one_handed_wpn|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 243 , weight(1.5)|spd_rtng(99) | weapon_length(95)|swing_damage(21 , blunt) | thrust_damage(20 , blunt),imodbits_sword_high ], ["arena_sword_two_handed", "Two Handed Sword", [("arena_sword_two_handed",0)], itp_type_two_handed_wpn|itp_two_handed|itp_primary, itc_greatsword|itcf_carry_sword_back, 670 , weight(2.75)|spd_rtng(93) | weapon_length(110)|swing_damage(29 , blunt) | thrust_damage(24 , blunt),imodbits_sword_high ], ["arena_lance", "Lance", [("arena_lance",0)], itp_type_polearm|itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_staff|itcf_carry_spear, 90 , weight(2.5)|spd_rtng(96) | weapon_length(150)|swing_damage(20 , blunt) | thrust_damage(25 , blunt),imodbits_polearm ], ["practice_staff","Practice Staff", [("wooden_staff",0)],itp_type_polearm|itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry|itp_wooden_attack,itc_staff|itcf_carry_sword_back,9, weight(2.5)|spd_rtng(103) | weapon_length(118)|swing_damage(16,blunt) | thrust_damage(16,blunt),imodbits_none], ["practice_lance","Practice Lance", [("joust_of_peace",0)], itp_type_polearm|itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry|itp_wooden_attack, itc_greatlance, 18,weight(4.25)|spd_rtng(58)|weapon_length(218)|swing_damage(0,blunt)|thrust_damage(15,blunt),imodbits_none], ["practice_shield","Practice Shield", [("shield_round_a",0)], itp_type_shield|itp_wooden_parry|itp_wooden_attack, 0, 20,weight(3.5)|body_armor(1)|hit_points(200)|spd_rtng(100)|weapon_length(50),imodbits_none], ["practice_bow","Practice Bow", [("hunting_bow",0), ("hunting_bow_carry",ixmesh_carry)], itp_type_bow |itp_primary|itp_two_handed,itcf_shoot_bow|itcf_carry_bow_back, 0, weight(1.5)|spd_rtng(90) | shoot_speed(40) | thrust_damage(19, blunt),imodbits_bow ], ## ("hunting_bow",0)], itp_type_bow|itp_two_handed|itp_primary|itp_attach_left_hand, itcf_shoot_bow, 4,weight(1.5)|spd_rtng(90)|shoot_speed(40)|thrust_damage(19,blunt),imodbits_none], ["practice_crossbow", "Practice Crossbow", [("crossbow",0)], itp_type_crossbow |itp_primary|itp_two_handed ,itcf_shoot_crossbow|itcf_carry_crossbow_back, 0, weight(3)|spd_rtng(42)| shoot_speed(68) | thrust_damage(32,blunt)|max_ammo(1),imodbits_crossbow], ["practice_javelin", "Practice Javelin", [("javelin",0),("javelins_quiver", ixmesh_carry)], itp_type_thrown |itp_primary|itp_bonus_against_shield ,itcf_throw_javelin|itcf_carry_quiver_back|itcf_show_holster_when_drawn, 0, weight(5) | spd_rtng(91) | shoot_speed(28) | thrust_damage(27, blunt) | max_ammo(50) | weapon_length(75), imodbits_thrown], ["practice_throwing_daggers", "Throwing Daggers", [("throwing_dagger",0)], itp_type_thrown |itp_primary ,itcf_throw_knife, 0 , weight(3.5)|spd_rtng(102) | shoot_speed(25) | thrust_damage(16, blunt)|max_ammo(10)|weapon_length(0),imodbits_thrown ], ["practice_throwing_daggers_100_amount", "Throwing Daggers", [("throwing_dagger",0)], itp_type_thrown |itp_primary ,itcf_throw_knife, 0 , weight(3.5)|spd_rtng(102) | shoot_speed(25) | thrust_damage(16, blunt)|max_ammo(100)|weapon_length(0),imodbits_thrown ], # ["cheap_shirt","Cheap Shirt", [("shirt",0)], itp_type_body_armor|itp_covers_legs, 0, 4,weight(1.25)|body_armor(3),imodbits_none], ["practice_horse","Practice Horse", [("saddle_horse",0)], itp_type_horse, 0, 37,body_armor(10)|horse_speed(40)|horse_maneuver(37)|horse_charge(14),imodbits_none], ["practice_arrows","Practice Arrows", [("arena_arrow",0),("flying_missile",ixmesh_flying_ammo),("quiver", ixmesh_carry)], itp_type_arrows, itcf_carry_quiver_back, 0,weight(1.5)|weapon_length(95)|max_ammo(80),imodbits_missile], ## ["practice_arrows","Practice Arrows", [("arrow",0),("flying_missile",ixmesh_flying_ammo)], itp_type_arrows, 0, 31,weight(1.5)|weapon_length(95)|max_ammo(80),imodbits_none], ["practice_bolts","Practice Bolts", [("bolt",0),("flying_missile",ixmesh_flying_ammo),("bolt_bag", ixmesh_carry),("bolt_bag_b", ixmesh_carry|imodbit_large_bag)], itp_type_bolts, itcf_carry_quiver_right_vertical, 0,weight(2.25)|weapon_length(55)|max_ammo(49),imodbits_missile], ["practice_arrows_10_amount","Practice Arrows", [("arrow",0),("flying_missile",ixmesh_flying_ammo),("quiver", ixmesh_carry)], itp_type_arrows, itcf_carry_quiver_back, 0,weight(1.5)|weapon_length(95)|max_ammo(10),imodbits_missile], ["practice_arrows_100_amount","Practice Arrows", [("arrow",0),("flying_missile",ixmesh_flying_ammo),("quiver", ixmesh_carry)], itp_type_arrows, itcf_carry_quiver_back, 0,weight(1.5)|weapon_length(95)|max_ammo(100),imodbits_missile], ["practice_bolts_9_amount","Practice Bolts", [("bolt",0),("flying_missile",ixmesh_flying_ammo),("bolt_bag", ixmesh_carry),("bolt_bag_b", ixmesh_carry|imodbit_large_bag)], itp_type_bolts, itcf_carry_quiver_right_vertical, 0,weight(2.25)|weapon_length(55)|max_ammo(9),imodbits_missile], ["practice_boots", "Practice Boots", [("boot_nomad_a",0)], itp_type_foot_armor |itp_civilian | itp_attach_armature,0, 11 , weight(1)|abundance(100)|head_armor(0)|body_armor(0)|leg_armor(10), imodbits_cloth ], ["red_tourney_armor","Red Tourney Armor", [("tourn_armor_a",0)], itp_type_body_armor|itp_covers_legs, 0, 152,weight(15.0)|body_armor(20)|leg_armor(6),imodbits_none], ["blue_tourney_armor","Blue Tourney Armor", [("mail_shirt",0)], itp_type_body_armor|itp_covers_legs, 0, 152,weight(15.0)|body_armor(20)|leg_armor(6),imodbits_none], ["green_tourney_armor","Green Tourney Armor", [("leather_vest",0)], itp_type_body_armor|itp_covers_legs, 0, 152,weight(15.0)|body_armor(20)|leg_armor(6),imodbits_none], ["gold_tourney_armor","Gold Tourney Armor", [("padded_armor",0)], itp_type_body_armor|itp_covers_legs, 0, 152,weight(15.0)|body_armor(20)|leg_armor(6),imodbits_none], ["red_tourney_helmet","Red Tourney Helmet",[("flattop_helmet",0)],itp_type_head_armor,0,126, weight(2)|head_armor(16),imodbits_none], ["blue_tourney_helmet","Blue Tourney Helmet",[("segmented_helm",0)],itp_type_head_armor,0,126, weight(2)|head_armor(16),imodbits_none], ["green_tourney_helmet","Green Tourney Helmet",[("hood_c",0)],itp_type_head_armor,0,126, weight(2)|head_armor(16),imodbits_none], ["gold_tourney_helmet","Gold Tourney Helmet",[("hood_a",0)],itp_type_head_armor,0,126, weight(2)|head_armor(16),imodbits_none], ["arena_shield_red", "Shield", [("arena_shield_red",0)], itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 42 , weight(2)|hit_points(360)|body_armor(1)|spd_rtng(100)|weapon_length(60),imodbits_shield ], ["arena_shield_blue", "Shield", [("arena_shield_blue",0)], itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 42 , weight(2)|hit_points(360)|body_armor(1)|spd_rtng(100)|weapon_length(60),imodbits_shield ], ["arena_shield_green", "Shield", [("arena_shield_green",0)], itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 42 , weight(2)|hit_points(360)|body_armor(1)|spd_rtng(100)|weapon_length(60),imodbits_shield ], ["arena_shield_yellow", "Shield", [("arena_shield_yellow",0)], itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 42 , weight(2)|hit_points(360)|body_armor(1)|spd_rtng(100)|weapon_length(60),imodbits_shield ], ["arena_armor_white", "Arena Armor White", [("arena_armorW",0)], itp_type_body_armor |itp_covers_legs ,0, 650 , weight(16)|abundance(100)|head_armor(0)|body_armor(29)|leg_armor(13), imodbits_armor ], ["arena_armor_red", "Arena Armor Red", [("arena_armorR",0)], itp_type_body_armor |itp_covers_legs ,0, 650 , weight(16)|abundance(100)|head_armor(0)|body_armor(29)|leg_armor(13), imodbits_armor ], ["arena_armor_blue", "Arena Armor Blue", [("arena_armorB",0)], itp_type_body_armor |itp_covers_legs ,0, 650 , weight(16)|abundance(100)|head_armor(0)|body_armor(29)|leg_armor(13), imodbits_armor ], ["arena_armor_green", "Arena Armor Green", [("arena_armorG",0)], itp_type_body_armor |itp_covers_legs ,0, 650 , weight(16)|abundance(100)|head_armor(0)|body_armor(29)|leg_armor(13), imodbits_armor ], ["arena_armor_yellow", "Arena Armor Yellow", [("arena_armorY",0)], itp_type_body_armor |itp_covers_legs ,0, 650 , weight(16)|abundance(100)|head_armor(0)|body_armor(29)|leg_armor(13), imodbits_armor ], ["arena_tunic_white", "Arena Tunic White ", [("arena_tunicW",0)], itp_type_body_armor |itp_covers_legs ,0, 47 , weight(2)|abundance(100)|head_armor(0)|body_armor(16)|leg_armor(6), imodbits_cloth ], ["arena_tunic_red", "Arena Tunic Red", [("arena_tunicR",0)], itp_type_body_armor |itp_covers_legs ,0, 27 , weight(2)|abundance(100)|head_armor(0)|body_armor(16)|leg_armor(6), imodbits_cloth ], ["arena_tunic_blue", "Arena Tunic Blue", [("arena_tunicB",0)], itp_type_body_armor |itp_covers_legs ,0, 27 , weight(2)|abundance(100)|head_armor(0)|body_armor(16)|leg_armor(6), imodbits_cloth ], ["arena_tunic_green", "Arena Tunic Green", [("arena_tunicG",0)], itp_type_body_armor |itp_covers_legs ,0, 27 , weight(2)|abundance(100)|head_armor(0)|body_armor(16)|leg_armor(6), imodbits_cloth ], ["arena_tunic_yellow", "Arena Tunic Yellow", [("arena_tunicY",0)], itp_type_body_armor |itp_covers_legs ,0, 27 , weight(2)|abundance(100)|head_armor(0)|body_armor(16)|leg_armor(6), imodbits_cloth ], #headwear ["arena_helmet_red", "Arena Helmet Red", [("arena_helmetR",0)], itp_type_head_armor|itp_fit_to_head ,0, 187 , weight(1.25)|abundance(100)|head_armor(26)|body_armor(0)|leg_armor(0), imodbits_plate ], ["arena_helmet_blue", "Arena Helmet Blue", [("arena_helmetB",0)], itp_type_head_armor|itp_fit_to_head ,0, 187 , weight(1.25)|abundance(100)|head_armor(26)|body_armor(0)|leg_armor(0), imodbits_plate ], ["arena_helmet_green", "Arena Helmet Green", [("arena_helmetG",0)], itp_type_head_armor|itp_fit_to_head ,0, 187 , weight(1.25)|abundance(100)|head_armor(26)|body_armor(0)|leg_armor(0), imodbits_plate ], ["arena_helmet_yellow", "Arena Helmet Yellow", [("arena_helmetY",0)], itp_type_head_armor|itp_fit_to_head ,0, 187 , weight(1.25)|abundance(100)|head_armor(26)|body_armor(0)|leg_armor(0), imodbits_plate ], ["steppe_helmet_white", "Steppe Helmet White", [("steppe_helmetW",0)], itp_type_head_armor|itp_fit_to_head ,0, 187 , weight(1.25)|abundance(100)|head_armor(20)|body_armor(0)|leg_armor(0), imodbits_plate ], ["steppe_helmet_red", "Steppe Helmet Red", [("steppe_helmetR",0)], itp_type_head_armor|itp_fit_to_head ,0, 187 , weight(1.25)|abundance(100)|head_armor(20)|body_armor(0)|leg_armor(0), imodbits_plate ], ["steppe_helmet_blue", "Steppe Helmet Blue", [("steppe_helmetB",0)], itp_type_head_armor|itp_fit_to_head ,0, 187 , weight(1.25)|abundance(100)|head_armor(20)|body_armor(0)|leg_armor(0), imodbits_plate ], ["steppe_helmet_green", "Steppe Helmet Green", [("steppe_helmetG",0)], itp_type_head_armor|itp_fit_to_head ,0, 187 , weight(1.25)|abundance(100)|head_armor(20)|body_armor(0)|leg_armor(0), imodbits_plate ], ["steppe_helmet_yellow", "Steppe Helmet Yellow", [("steppe_helmetY",0)], itp_type_head_armor|itp_fit_to_head ,0, 187 , weight(1.25)|abundance(100)|head_armor(20)|body_armor(0)|leg_armor(0), imodbits_plate ], ["tourney_helm_white", "Tourney Helm White", [("tourney_helmR",0)], itp_type_head_armor|itp_covers_head,0, 760 , weight(2.75)|abundance(100)|head_armor(30)|body_armor(0)|leg_armor(0), imodbits_plate ], ["tourney_helm_red", "Tourney Helm Red", [("tourney_helmR",0)], itp_type_head_armor|itp_covers_head,0, 760 , weight(2.75)|abundance(100)|head_armor(30)|body_armor(0)|leg_armor(0), imodbits_plate ], ["tourney_helm_blue", "Tourney Helm Blue", [("tourney_helmB",0)], itp_type_head_armor|itp_covers_head,0, 760 , weight(2.75)|abundance(100)|head_armor(30)|body_armor(0)|leg_armor(0), imodbits_plate ], ["tourney_helm_green", "Tourney Helm Green", [("tourney_helmG",0)], itp_type_head_armor|itp_covers_head,0, 760 , weight(2.75)|abundance(100)|head_armor(30)|body_armor(0)|leg_armor(0), imodbits_plate ], ["tourney_helm_yellow", "Tourney Helm Yellow", [("tourney_helmY",0)], itp_type_head_armor|itp_covers_head,0, 760 , weight(2.75)|abundance(100)|head_armor(30)|body_armor(0)|leg_armor(0), imodbits_plate ], # A treatise on The Method of Mechanical Theorems Archimedes #This book must be at the beginning of readable books ["book_tactics","De Re Militari", [("book_a",0)], itp_type_book, 0, 4000,weight(2)|abundance(100),imodbits_none], ["book_persuasion","Rhetorica ad Herennium", [("book_b",0)], itp_type_book, 0, 5000,weight(2)|abundance(100),imodbits_none], ["book_leadership","The Life of Alixenus the Great", [("book_d",0)], itp_type_book, 0, 4200,weight(2)|abundance(100),imodbits_none], ["book_intelligence","Essays on Logic", [("book_e",0)], itp_type_book, 0, 2900,weight(2)|abundance(100),imodbits_none], ["book_trade","A Treatise on the Value of Things", [("book_f",0)], itp_type_book, 0, 3100,weight(2)|abundance(100),imodbits_none], ["book_weapon_mastery", "On the Art of Fighting with Swords", [("book_d",0)], itp_type_book, 0, 4200,weight(2)|abundance(100),imodbits_none], ["book_engineering","Method of Mechanical Theorems", [("book_open",0)], itp_type_book, 0, 4000,weight(2)|abundance(100),imodbits_none], #Reference books #This book must be at the beginning of reference books ["book_wound_treatment_reference","The Book of Healing", [("book_c",0)], itp_type_book, 0, 3500,weight(2)|abundance(100),imodbits_none], ["book_training_reference","Manual of Arms", [("book_open",0)], itp_type_book, 0, 3500,weight(2)|abundance(100),imodbits_none], ["book_surgery_reference","The Great Book of Surgery", [("book_c",0)], itp_type_book, 0, 3500,weight(2)|abundance(100),imodbits_none], # ["dry_bread", "wheat_sack", itp_type_goods|itp_consumable, 0, slt_none,view_goods,95,weight(2),max_ammo(50),imodbits_none], #foods (first one is smoked_fish) ["smoked_fish","Smoked Fish", [("smoked_fish",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 59,weight(15)|abundance(110)|food_quality(50)|max_ammo(50),imodbits_none], ["dried_meat","Dried Meat", [("smoked_meat",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 72,weight(15)|abundance(100)|food_quality(70)|max_ammo(50),imodbits_none], ["cattle_meat","Beef", [("raw_meat",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 103,weight(20)|abundance(100)|food_quality(80)|max_ammo(70),imodbits_none], ["pork","Pork", [("fried_pig",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 85,weight(15)|abundance(100)|food_quality(70)|max_ammo(50),imodbits_none], ["bread","Bread", [("bread_a",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 32,weight(20)|abundance(110)|food_quality(40)|max_ammo(50),imodbits_none], ["apples","Apples", [("apple_basket",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 44,weight(20)|abundance(110)|food_quality(40)|max_ammo(50),imodbits_none], ["cheese","Cheese", [("cheese_b",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 95,weight(6)|abundance(110)|food_quality(40)|max_ammo(30),imodbits_none], ["chicken","Chicken", [("chicken_roasted",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 75,weight(10)|abundance(110)|food_quality(40)|max_ammo(50),imodbits_none], ["honey","Honey", [("honey_pot",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 136,weight(5)|abundance(110)|food_quality(40)|max_ammo(30),imodbits_none], ["sausages","Sausages", [("sausages",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 60,weight(10)|abundance(110)|food_quality(40)|max_ammo(40),imodbits_none], ["cabbages","Cabbages", [("cabbage",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 30,weight(15)|abundance(110)|food_quality(40)|max_ammo(50),imodbits_none], ["butter","Butter", [("butter_pot",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 150,weight(6)|abundance(110)|food_quality(40)|max_ammo(30),imodbits_none], #other trade goods (first one is wine) ["wine","Wine", [("amphora_slim",0)], itp_merchandise|itp_type_goods|itp_consumable, 0, 141,weight(30)|abundance(60)|max_ammo(50),imodbits_none], ["ale","Ale", [("ale_barrel",0)], itp_merchandise|itp_type_goods|itp_consumable, 0, 84,weight(30)|abundance(70)|max_ammo(50),imodbits_none], ["spice","Spice", [("spice_sack",0)], itp_merchandise|itp_type_goods, 0, 880,weight(40)|abundance(25),imodbits_none], ["salt","Salt", [("salt_sack",0)], itp_merchandise|itp_type_goods, 0, 255,weight(50)|abundance(120),imodbits_none], ["grain","Wheat", [("wheat_sack",0)], itp_merchandise|itp_type_goods|itp_consumable, 0, 77,weight(50)|abundance(110)|food_quality(40)|max_ammo(50),imodbits_none], ["flour","Flour", [("salt_sack",0)], itp_merchandise|itp_type_goods|itp_consumable, 0, 91,weight(50)|abundance(100)|food_quality(45)|max_ammo(50),imodbits_none], ["iron","Iron", [("iron",0)], itp_merchandise|itp_type_goods, 0,264,weight(60)|abundance(60),imodbits_none], ["oil","Oil", [("oil",0)], itp_merchandise|itp_type_goods, 0, 484,weight(50)|abundance(60),imodbits_none], ["pottery","Pottery", [("jug",0)], itp_merchandise|itp_type_goods, 0, 126,weight(50)|abundance(90),imodbits_none], ["linen","Linen", [("linen",0)], itp_merchandise|itp_type_goods, 0, 250,weight(40)|abundance(90),imodbits_none], ["furs","Furs", [("fur_pack",0)], itp_merchandise|itp_type_goods, 0, 391,weight(40)|abundance(90),imodbits_none], ["wool","Wool", [("wool_sack",0)], itp_merchandise|itp_type_goods, 0, 130,weight(40)|abundance(90),imodbits_none], ["velvet","Velvet", [("velvet",0)], itp_merchandise|itp_type_goods, 0, 1025,weight(40)|abundance(30),imodbits_none], ["tools","Tools", [("iron_hammer",0)], itp_merchandise|itp_type_goods, 0, 410,weight(50)|abundance(90),imodbits_none], #************************************************************************************************ # ITEMS before this point are hardcoded into item_codes.h and their order should not be changed! #************************************************************************************************ # Quest Items ["siege_supply","Supplies", [("ale_barrel",0)], itp_type_goods, 0, 96,weight(40)|abundance(70),imodbits_none], ["quest_wine","Wine", [("amphora_slim",0)], itp_type_goods, 0, 46,weight(40)|abundance(60)|max_ammo(50),imodbits_none], ["quest_ale","Ale", [("ale_barrel",0)], itp_type_goods, 0, 31,weight(40)|abundance(70)|max_ammo(50),imodbits_none], # Tutorial Items ["tutorial_sword", "Sword", [("long_sword",0),("scab_longsw_a", ixmesh_carry)], itp_type_one_handed_wpn|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 0 , weight(1.5)|difficulty(0)|spd_rtng(100) | weapon_length(102)|swing_damage(18 , cut) | thrust_damage(15 , pierce),imodbits_sword ], ["tutorial_axe", "Axe", [("iron_ax",0)], itp_type_two_handed_wpn| itp_two_handed|itp_primary|itp_bonus_against_shield|itp_wooden_parry, itc_nodachi|itcf_carry_axe_back, 0 , weight(4)|difficulty(0)|spd_rtng(91) | weapon_length(108)|swing_damage(19 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["tutorial_spear", "Spear", [("spear",0)], itp_type_polearm| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_spear, 0 , weight(4.5)|difficulty(0)|spd_rtng(80) | weapon_length(158)|swing_damage(0 , cut) | thrust_damage(19 , pierce),imodbits_polearm ], ["tutorial_club", "Club", [("club",0)], itp_type_one_handed_wpn| itp_primary|itp_wooden_parry|itp_wooden_attack, itc_scimitar, 0 , weight(2.5)|difficulty(0)|spd_rtng(95) | weapon_length(95)|swing_damage(11 , blunt) | thrust_damage(0 , pierce),imodbits_none ], ["tutorial_battle_axe", "Battle Axe", [("battle_ax",0)], itp_type_two_handed_wpn| itp_two_handed|itp_primary|itp_bonus_against_shield|itp_wooden_parry, itc_nodachi|itcf_carry_axe_back, 0 , weight(5)|difficulty(0)|spd_rtng(88) | weapon_length(108)|swing_damage(27 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["tutorial_arrows","Arrows", [("arrow",0),("flying_missile",ixmesh_flying_ammo),("quiver", ixmesh_carry)], itp_type_arrows, itcf_carry_quiver_back, 0,weight(3)|abundance(160)|weapon_length(95)|thrust_damage(0,pierce)|max_ammo(20),imodbits_missile], ["tutorial_bolts","Bolts", [("bolt",0),("flying_missile",ixmesh_flying_ammo),("bolt_bag", ixmesh_carry),("bolt_bag_b", ixmesh_carry|imodbit_large_bag)], itp_type_bolts, itcf_carry_quiver_right_vertical, 0,weight(2.25)|abundance(90)|weapon_length(55)|thrust_damage(0,pierce)|max_ammo(18),imodbits_missile], ["tutorial_short_bow", "Short Bow", [("short_bow",0),("short_bow_carry",ixmesh_carry)], itp_type_bow |itp_primary|itp_two_handed ,itcf_shoot_bow|itcf_carry_bow_back, 0 , weight(1)|difficulty(0)|spd_rtng(98) | shoot_speed(49) | thrust_damage(12 , pierce ),imodbits_bow ], ["tutorial_crossbow", "Crossbow", [("crossbow",0)], itp_type_crossbow |itp_primary|itp_two_handed|itp_cant_reload_on_horseback ,itcf_shoot_crossbow|itcf_carry_crossbow_back, 0 , weight(3)|difficulty(0)|spd_rtng(42)| shoot_speed(68) | thrust_damage(32,pierce)|max_ammo(1),imodbits_crossbow ], ["tutorial_throwing_daggers", "Throwing Daggers", [("throwing_dagger",0)], itp_type_thrown |itp_primary ,itcf_throw_knife, 0 , weight(3.5)|difficulty(0)|spd_rtng(102) | shoot_speed(25) | thrust_damage(16 , cut)|max_ammo(14)|weapon_length(0),imodbits_missile ], ["tutorial_saddle_horse", "Saddle Horse", [("saddle_horse",0)], itp_type_horse, 0, 0,abundance(90)|body_armor(3)|difficulty(0)|horse_speed(40)|horse_maneuver(38)|horse_charge(8),imodbits_horse_basic], ["tutorial_shield", "Kite Shield", [("shield_kite_a",0)], itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 118 , weight(2.5)|hit_points(480)|body_armor(1)|spd_rtng(82)|weapon_length(150),imodbits_shield ], ["tutorial_staff_no_attack","Staff", [("wooden_staff",0)],itp_type_polearm|itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry|itp_wooden_attack,itc_parry_polearm|itcf_carry_sword_back,9, weight(3.5)|spd_rtng(120) | weapon_length(115)|swing_damage(0,blunt) | thrust_damage(0,blunt),imodbits_none], ["tutorial_staff","Staff", [("wooden_staff",0)],itp_type_polearm|itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry|itp_wooden_attack,itc_staff|itcf_carry_sword_back,9, weight(3.5)|spd_rtng(120) | weapon_length(115)|swing_damage(16,blunt) | thrust_damage(16,blunt),imodbits_none], # Horses: sumpter horse/ pack horse, saddle horse, steppe horse, warm blood, geldling, stallion, war mount, charger, # Carthorse, hunter, heavy hunter, hackney, palfrey, courser, destrier. ["sumpter_horse","Sumpter Horse", [("sumpter_horse",0)], itp_merchandise|itp_type_horse, 0, 64,abundance(90)|hit_points(110)|body_armor(17)|difficulty(1)|horse_speed(34)|horse_maneuver(33)|horse_charge(9),imodbits_horse_basic], ["saddle_horse","Saddle Horse", [("saddle_horse",0),("horse_c",imodbits_horse_good)], itp_merchandise|itp_type_horse, 0, 112,abundance(90)|body_armor(14)|difficulty(1)|horse_speed(39)|horse_maneuver(36)|horse_charge(8),imodbits_horse_basic], ["steppe_horse","Steppe Horse", [("steppe_horse",0)], itp_merchandise|itp_type_horse, 0, 92,abundance(80)|body_armor(15)|difficulty(2)|horse_speed(37)|horse_maneuver(41)|horse_charge(7),imodbits_horse_basic], ["courser","Courser", [("courser",0)], itp_merchandise|itp_type_horse, 0, 323,abundance(70)|body_armor(16)|difficulty(2)|horse_speed(43)|horse_maneuver(37)|horse_charge(11),imodbits_horse_basic|imodbit_champion], ["hunter","Hunter", [("hunting_horse",0),("hunting_horse",imodbits_horse_good)], itp_merchandise|itp_type_horse, 0, 434,abundance(60)|hit_points(130)|body_armor(29)|difficulty(3)|horse_speed(40)|horse_maneuver(36)|horse_charge(18),imodbits_horse_basic|imodbit_champion], ["warhorse","Warhorse", [("warhorse",0)], itp_merchandise|itp_type_horse, 0, 724,abundance(50)|hit_points(135)|body_armor(52)|difficulty(4)|horse_speed(36)|horse_maneuver(34)|horse_charge(18),imodbits_horse_basic|imodbit_champion], ["charger","Charger", [("charger",0)], itp_merchandise|itp_type_horse, 0, 1411,abundance(40)|hit_points(140)|body_armor(65)|difficulty(4)|horse_speed(35)|horse_maneuver(32)|horse_charge(25),imodbits_horse_basic|imodbit_champion], #whalebone crossbow, yew bow, war bow, arming sword ["arrows","Arrows", [("arrow",0),("flying_missile",ixmesh_flying_ammo),("quiver", ixmesh_carry)], itp_type_arrows|itp_merchandise, itcf_carry_quiver_back, 72,weight(3)|abundance(160)|weapon_length(95)|thrust_damage(1,pierce)|max_ammo(30),imodbits_missile], ["khergit_arrows","Khergit Arrows", [("arrow_b",0),("flying_missile",ixmesh_flying_ammo),("quiver_b", ixmesh_carry)], itp_type_arrows|itp_merchandise, itcf_carry_quiver_back_right, 410,weight(3.5)|abundance(30)|weapon_length(95)|thrust_damage(3,pierce)|max_ammo(30),imodbits_missile], ["barbed_arrows","Barbed Arrows", [("barbed_arrow",0),("flying_missile",ixmesh_flying_ammo),("quiver_d", ixmesh_carry)], itp_type_arrows|itp_merchandise, itcf_carry_quiver_back_right, 124,weight(3)|abundance(70)|weapon_length(95)|thrust_damage(2,pierce)|max_ammo(30),imodbits_missile], ["bodkin_arrows","Bodkin Arrows", [("piercing_arrow",0),("flying_missile",ixmesh_flying_ammo),("quiver_c", ixmesh_carry)], itp_type_arrows|itp_merchandise, itcf_carry_quiver_back_right, 350,weight(3)|abundance(50)|weapon_length(91)|thrust_damage(3,pierce)|max_ammo(29),imodbits_missile], ["bolts","Bolts", [("bolt",0),("flying_missile",ixmesh_flying_ammo),("bolt_bag", ixmesh_carry),("bolt_bag_b", ixmesh_carry|imodbit_large_bag)], itp_type_bolts|itp_merchandise, itcf_carry_quiver_right_vertical, 64,weight(2.25)|abundance(90)|weapon_length(55)|thrust_damage(1,pierce)|max_ammo(25),imodbits_missile], ["steel_bolts","Steel Bolts", [("bolt",0),("flying_missile",ixmesh_flying_ammo),("bolt_bag_c", ixmesh_carry)], itp_type_bolts|itp_merchandise, itcf_carry_quiver_right_vertical, 210,weight(2.5)|abundance(20)|weapon_length(55)|thrust_damage(2,pierce)|max_ammo(25),imodbits_missile], ["cartridges","Cartridges", [("cartridge_a",0)], itp_type_bullets|itp_merchandise, 0, 41,weight(2.25)|abundance(90)|weapon_length(3)|thrust_damage(1,pierce)|max_ammo(40),imodbits_missile], ["pilgrim_disguise", "Pilgrim Disguise", [("pilgrim_outfit",0)], 0| itp_type_body_armor |itp_covers_legs |itp_civilian ,0, 25 , weight(2)|abundance(100)|head_armor(0)|body_armor(19)|leg_armor(8)|difficulty(0) ,imodbits_cloth ], ["pilgrim_hood", "Pilgrim Hood", [("pilgrim_hood",0)], 0| itp_type_head_armor |itp_civilian ,0, 35 , weight(1.25)|abundance(100)|head_armor(14)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], # ARMOR #handwear ["leather_gloves","Leather Gloves", [("lthr_glove_L",0)], itp_merchandise|itp_type_hand_armor,0, 130, weight(0.25)|abundance(120)|body_armor(2)|difficulty(0),imodbits_cloth], ["mail_mittens","Mail Mittens", [("mail_mitten_L",0)], itp_merchandise|itp_type_hand_armor,0, 550, weight(0.5)|abundance(100)|body_armor(4)|difficulty(0),imodbits_armor], ["scale_gauntlets","Scale Gauntlets", [("scale_gaunt_L",0)], itp_merchandise|itp_type_hand_armor,0, 910, weight(0.75)|abundance(100)|body_armor(5)|difficulty(0),imodbits_armor], ["gauntlets","Gauntlets", [("gauntlet_a_L",0),("gauntlet_b_L",imodbit_reinforced)], itp_merchandise|itp_type_hand_armor,0, 1940, weight(1.0)|abundance(100)|body_armor(6)|difficulty(0),imodbits_armor], #footwear ["wrapping_boots", "Wrapping Boots", [("shoe_fur",0)], itp_merchandise| itp_type_foot_armor |itp_civilian | itp_attach_armature ,0, 3 , weight(1)|abundance(100)|head_armor(0)|body_armor(0)|leg_armor(3)|difficulty(0) ,imodbits_cloth ], ["woolen_hose", "Woolen Hose", [("woolen_hose",0)], itp_merchandise| itp_type_foot_armor |itp_civilian | itp_attach_armature ,0, 6 , weight(1)|abundance(100)|head_armor(0)|body_armor(0)|leg_armor(4)|difficulty(0) ,imodbits_cloth ], ["blue_hose", "Blue Hose", [("blue_leggings",0)], itp_merchandise| itp_type_foot_armor |itp_civilian | itp_attach_armature ,0, 11 , weight(1)|abundance(100)|head_armor(0)|body_armor(0)|leg_armor(5)|difficulty(0) ,imodbits_cloth ], ["hunter_boots", "Hunter Boots", [("boot_hunter",0)], itp_merchandise| itp_type_foot_armor |itp_civilian | itp_attach_armature,0, 19 , weight(1.25)|abundance(100)|head_armor(0)|body_armor(0)|leg_armor(9)|difficulty(0) ,imodbits_cloth ], ["hide_boots", "Hide Boots", [("boot_nomad_a",0)], itp_merchandise| itp_type_foot_armor |itp_civilian | itp_attach_armature,0, 34 , weight(1)|abundance(100)|head_armor(0)|body_armor(0)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["ankle_boots", "Ankle Boots", [("ankle_boots_a",0)], itp_merchandise| itp_type_foot_armor |itp_civilian | itp_attach_armature,0, 75 , weight(1)|abundance(100)|head_armor(0)|body_armor(0)|leg_armor(12)|difficulty(0) ,imodbits_cloth ], ["nomad_boots", "Nomad Boots", [("boot_nomad_b",0)], itp_merchandise| itp_type_foot_armor |itp_civilian | itp_attach_armature,0, 116 , weight(1.25)|abundance(100)|head_armor(0)|body_armor(0)|leg_armor(14)|difficulty(0) ,imodbits_cloth ], ["leather_boots", "Leather Boots", [("boot_khergit",0)], itp_merchandise| itp_type_foot_armor |itp_civilian | itp_attach_armature,0, 174 , weight(1.25)|abundance(100)|head_armor(0)|body_armor(0)|leg_armor(16)|difficulty(0) ,imodbits_cloth ], ["mail_chausses", "Mail Chausses", [("chausses_cm",0)], itp_merchandise| itp_type_foot_armor | itp_attach_armature ,0, 410 , weight(3)|abundance(100)|head_armor(0)|body_armor(0)|leg_armor(21)|difficulty(0) ,imodbits_armor ], ["splinted_leather_greaves", "Splinted Leather Greaves", [("lthr_greaves",0)], itp_merchandise| itp_type_foot_armor | itp_attach_armature,0, 760 , weight(3)|abundance(100)|head_armor(0)|body_armor(0)|leg_armor(24)|difficulty(0) ,imodbits_armor ], ["splinted_greaves", "Splinted Greaves", [("spl_greaves",0)], itp_merchandise| itp_type_foot_armor | itp_attach_armature,0, 1153 , weight(3.5)|abundance(100)|head_armor(0)|body_armor(0)|leg_armor(28)|difficulty(7) ,imodbits_armor ], ["mail_boots", "Mail Boots", [("shoe_cm",0)], itp_merchandise| itp_type_foot_armor | itp_attach_armature ,0, 1746 , weight(3)|abundance(100)|head_armor(0)|body_armor(0)|leg_armor(31)|difficulty(8) ,imodbits_armor ], ["iron_greaves", "Iron Greaves", [("iron_greaves",0)], itp_merchandise| itp_type_foot_armor | itp_attach_armature,0, 2374 , weight(3.5)|abundance(100)|head_armor(0)|body_armor(0)|leg_armor(33)|difficulty(9) ,imodbits_armor ], ["black_greaves", "Black Greaves", [("black_greaves",0)], itp_type_foot_armor | itp_attach_armature,0, 3561 , weight(3.5)|abundance(100)|head_armor(0)|body_armor(0)|leg_armor(35)|difficulty(0) ,imodbits_armor ], #bodywear ["lady_dress_ruby", "Lady Dress", [("lady_dress_r",0)], itp_type_body_armor |itp_covers_legs|itp_civilian ,0, 500 , weight(3)|abundance(100)|head_armor(0)|body_armor(10)|leg_armor(10)|difficulty(0) ,imodbits_cloth], ["lady_dress_green", "Lady Dress", [("lady_dress_g",0)], itp_type_body_armor |itp_covers_legs|itp_civilian ,0, 500 , weight(3)|abundance(100)|head_armor(0)|body_armor(10)|leg_armor(10)|difficulty(0) ,imodbits_cloth], ["lady_dress_blue", "Lady Dress", [("lady_dress_b",0)], itp_type_body_armor |itp_covers_legs|itp_civilian ,0, 500 , weight(3)|abundance(100)|head_armor(0)|body_armor(10)|leg_armor(10)|difficulty(0) ,imodbits_cloth], ["courtly_outfit", "Courtly Outfit", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian ,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["nobleman_outfit", "Nobleman Outfit", [("nobleman_outfit_b",0)], itp_type_body_armor|itp_covers_legs|itp_civilian ,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(15)|leg_armor(12)|difficulty(0) ,imodbits_cloth ], ["nomad_armor", "Nomad Armor", [("armor_nomad",0)], itp_merchandise| itp_type_body_armor ,0, 25 , weight(2)|abundance(100)|head_armor(0)|body_armor(24)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["khergit_armor", "Khergit Armor", [("armor_nomad_b",0)], itp_merchandise| itp_type_body_armor ,0, 38 , weight(2)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["leather_jacket", "Leather Jacket", [("leather_jacket",0)], itp_merchandise| itp_type_body_armor |itp_civilian ,0, 50 , weight(3)|abundance(100)|head_armor(0)|body_armor(15)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["rawhide_coat", "Rawhide Coat", [("tunic_fur",0)], itp_merchandise| itp_type_body_armor |itp_civilian |itp_covers_legs ,0, 12 , weight(5)|abundance(100)|head_armor(0)|body_armor(10)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["leather_armor", "Leather Armor", [("lthr_armor_a",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 65 , weight(7)|abundance(100)|head_armor(0)|body_armor(18)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["fur_coat", "Fur Coat", [("fur_coat",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs |itp_civilian,0, 117 , weight(6)|abundance(100)|head_armor(0)|body_armor(13)|leg_armor(6)|difficulty(0) ,imodbits_armor ], #for future: ["coat", "Coat", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["leather_coat", "Leather Coat", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["mail_coat", "Coat of Mail", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["long_mail_coat", "Long Coat of Mail", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["sleeveless_mail_coat", "Sleeveless Coat of Mail", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["sleeveless_coat", "Sleeveless Coat", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["hide_coat", "Hide Coat", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["merchant_outfit", "Merchant Outfit", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["homespun_dress", "Homespun Dress", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["thick_coat", "Thick Coat", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["coat_with_cape", "Coat_with_Cape", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["steppe_outfit", "Steppe Outfit", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["nordic_outfit", "Nordic Outfit", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["nordic_armor", "Nordic Armor", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["hide_armor", "Hide Armor", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["cloaked_tunic", "Cloaked Tunic", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["sleeveless_tunic", "Sleeveless Tunic", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["sleeveless_leather_tunic", "Sleeveless Leather Tunic", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["linen_shirt", "Linen_Shirt", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["wool_coat", "Wool_Coat", [("nobleman_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], #end ["dress", "Dress", [("dress",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs|itp_civilian ,0, 6 , weight(1)|abundance(100)|head_armor(0)|body_armor(6)|leg_armor(2)|difficulty(0) ,imodbits_cloth ], ["blue_dress", "Blue Dress", [("blue_dress",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs|itp_civilian ,0, 6 , weight(1)|abundance(100)|head_armor(0)|body_armor(6)|leg_armor(2)|difficulty(0) ,imodbits_cloth ], ["peasant_dress", "Peasant Dress", [("peasant_dress_b",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs|itp_civilian ,0, 6 , weight(1)|abundance(100)|head_armor(0)|body_armor(6)|leg_armor(2)|difficulty(0) ,imodbits_cloth ], ["woolen_dress", "Woolen Dress", [("woolen_dress",0)], itp_merchandise| itp_type_body_armor|itp_civilian |itp_covers_legs ,0, 10 , weight(1.75)|abundance(100)|head_armor(0)|body_armor(8)|leg_armor(2)|difficulty(0) ,imodbits_cloth ], ["shirt", "Shirt", [("shirt",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs|itp_civilian ,0, 3 , weight(1)|abundance(100)|head_armor(0)|body_armor(5)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["linen_tunic", "Linen Tunic", [("linen_tunic",0)], itp_merchandise| itp_type_body_armor |itp_civilian |itp_covers_legs ,0, 6 , weight(1)|abundance(100)|head_armor(0)|body_armor(6)|leg_armor(1)|difficulty(0) ,imodbits_cloth ], ["short_tunic", "Rich Tunic", [("cvl_costume_a",0)], itp_merchandise| itp_type_body_armor |itp_civilian |itp_covers_legs ,0, 10 , weight(1)|abundance(100)|head_armor(0)|body_armor(7)|leg_armor(1)|difficulty(0) ,imodbits_cloth ], ["robe", "Robe", [("robe",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs |itp_civilian,0, 31 , weight(1.5)|abundance(100)|head_armor(0)|body_armor(8)|leg_armor(6)|difficulty(0) ,imodbits_cloth ], ["coarse_tunic", "Coarse Tunic", [("coarse_tunic",0)], itp_merchandise| itp_type_body_armor |itp_civilian |itp_covers_legs ,0, 47 , weight(2)|abundance(100)|head_armor(0)|body_armor(11)|leg_armor(6)|difficulty(0) ,imodbits_cloth ], ["leather_apron", "Leather Apron", [("leather_apron",0)], itp_merchandise| itp_type_body_armor |itp_civilian |itp_covers_legs ,0, 61 , weight(3)|abundance(100)|head_armor(0)|body_armor(12)|leg_armor(7)|difficulty(0) ,imodbits_cloth ], ["tabard", "Tabard", [("tabard_a",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs |itp_civilian,0, 107 , weight(3)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(6)|difficulty(0) ,imodbits_cloth ], ["leather_vest", "Leather Vest", [("leather_vest",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs|itp_civilian ,0, 146 , weight(4)|abundance(100)|head_armor(0)|body_armor(15)|leg_armor(7)|difficulty(0) ,imodbits_cloth ], ["steppe_armor", "Steppe Armor", [("lamellar_leather",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 195 , weight(5)|abundance(100)|head_armor(0)|body_armor(16)|leg_armor(8)|difficulty(0) ,imodbits_cloth ], ["gambeson", "Gambeson", [("white_gambeson",0)], itp_merchandise| itp_type_body_armor|itp_covers_legs|itp_civilian,0, 260 , weight(5)|abundance(100)|head_armor(0)|body_armor(20)|leg_armor(5)|difficulty(0) ,imodbits_cloth ], ["blue_gambeson", "Blue Gambeson", [("blue_gambeson",0)], itp_merchandise| itp_type_body_armor|itp_covers_legs|itp_civilian,0, 270 , weight(5)|abundance(100)|head_armor(0)|body_armor(21)|leg_armor(5)|difficulty(0) ,imodbits_cloth ], ["red_gambeson", "Red Gambeson", [("red_gambeson",0)], itp_merchandise| itp_type_body_armor|itp_covers_legs|itp_civilian,0, 275 , weight(5)|abundance(100)|head_armor(0)|body_armor(21)|leg_armor(5)|difficulty(0) ,imodbits_cloth ], ["padded_cloth", "Padded Cloth", [("aketon_a",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 297 , weight(11)|abundance(100)|head_armor(0)|body_armor(22)|leg_armor(6)|difficulty(0) ,imodbits_cloth ], ["leather_jerkin", "Leather Jerkin", [("leather_jerkin",0)], itp_merchandise| itp_type_body_armor |itp_civilian |itp_covers_legs ,0, 321 , weight(6)|abundance(100)|head_armor(0)|body_armor(23)|leg_armor(6)|difficulty(0) ,imodbits_cloth ], ["nomad_vest", "Nomad Vest", [("nomad_vest_a",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs|itp_civilian ,0, 360 , weight(7)|abundance(50)|head_armor(0)|body_armor(22)|leg_armor(8)|difficulty(0) ,imodbits_cloth ], ["ragged_outfit", "Ragged Outfit", [("ragged_outfit_a",0)], itp_merchandise| itp_type_body_armor |itp_civilian |itp_covers_legs ,0, 390 , weight(7)|abundance(100)|head_armor(0)|body_armor(23)|leg_armor(9)|difficulty(0) ,imodbits_cloth ], ["padded_leather", "Padded Leather", [("padded_leather",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs|itp_civilian,0, 454 , weight(12)|abundance(100)|head_armor(0)|body_armor(27)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["tribal_warrior_outfit", "Tribal Warrior Outfit", [("tribal_warrior_outfit_a",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs|itp_civilian ,0, 520 , weight(14)|abundance(100)|head_armor(0)|body_armor(30)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], ["nomad_robe", "Nomad Robe", [("nomad_robe_a",0)], itp_merchandise| itp_type_body_armor |itp_civilian |itp_covers_legs |itp_civilian,0, 610 , weight(15)|abundance(100)|head_armor(0)|body_armor(32)|leg_armor(10)|difficulty(0) ,imodbits_cloth ], #["heraldric_armor", "Heraldric Armor", [("tourn_armor_a",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 442 , weight(17)|abundance(100)|head_armor(0)|body_armor(35)|leg_armor(8)|difficulty(7) ,imodbits_armor ], ["studded_leather_coat", "Studded Leather Coat", [("std_lthr_coat",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 690 , weight(14)|abundance(100)|head_armor(0)|body_armor(34)|leg_armor(10)|difficulty(7) ,imodbits_armor ], ["byrnie", "Byrnie", [("byrnie_a",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 795 , weight(17)|abundance(100)|head_armor(0)|body_armor(39)|leg_armor(6)|difficulty(7) ,imodbits_armor ], #["blackwhite_surcoat", "Black and White Surcoat", [("surcoat_blackwhite",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 348 , weight(16)|abundance(100)|head_armor(0)|body_armor(33)|leg_armor(8)|difficulty(7) ,imodbits_armor ], #["green_surcoat", "Green Surcoat", [("surcoat_green",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 348 , weight(16)|abundance(100)|head_armor(0)|body_armor(33)|leg_armor(8)|difficulty(7) ,imodbits_armor ], #["blue_surcoat", "Blue Surcoat", [("surcoat_blue",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 350 , weight(16)|abundance(100)|head_armor(0)|body_armor(33)|leg_armor(8)|difficulty(7) ,imodbits_armor ], #["red_surcoat", "Red Surcoat", [("surcoat_red",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 350 , weight(16)|abundance(100)|head_armor(0)|body_armor(33)|leg_armor(8)|difficulty(7) ,imodbits_armor ], ["haubergeon", "Haubergeon", [("haubergeon_a",0),("haubergeon_b",imodbits_good)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 863 , weight(18)|abundance(100)|head_armor(0)|body_armor(41)|leg_armor(6)|difficulty(6) ,imodbits_armor ], ["mail_shirt", "Mail Shirt", [("mail_shirt",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 920 , weight(19)|abundance(100)|head_armor(0)|body_armor(37)|leg_armor(12)|difficulty(7) ,imodbits_armor ], ["mail_hauberk", "Mail Hauberk", [("hauberk_a",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 1190 , weight(19)|abundance(100)|head_armor(0)|body_armor(40)|leg_armor(12)|difficulty(7) ,imodbits_armor ], ["lamellar_vest", "Lamellar Vest", [("nmd_warrior_a",0)], itp_merchandise| itp_type_body_armor |itp_civilian |itp_covers_legs ,0, 1370 , weight(18)|abundance(100)|head_armor(0)|body_armor(46)|leg_armor(8)|difficulty(7) ,imodbits_cloth ], ["mail_with_surcoat", "Mail with Surcoat", [("mail_long_surcoat",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 1544 , weight(22)|abundance(100)|head_armor(0)|body_armor(42)|leg_armor(14)|difficulty(7) ,imodbits_armor ], ["surcoat_over_mail", "Surcoat over Mail", [("surcoat_over_mail",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 1720 , weight(22)|abundance(100)|head_armor(0)|body_armor(43)|leg_armor(14)|difficulty(7) ,imodbits_armor ], #["lamellar_cuirass", "Lamellar Cuirass", [("lamellar_armor",0)], itp_type_body_armor |itp_covers_legs,0, 1020 , weight(25)|abundance(100)|head_armor(0)|body_armor(43)|leg_armor(15)|difficulty(9) ,imodbits_armor ], ["brigandine_a", "Brigandine", [("brigandine_a",0)], itp_merchandise| itp_type_body_armor|itp_covers_legs,0, 1830 , weight(19)|abundance(100)|head_armor(0)|body_armor(46)|leg_armor(12)|difficulty(0) ,imodbits_armor ], ["lamellar_armor", "Lamellar Armor", [("lamellar_armor_b",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 2410 , weight(25)|abundance(100)|head_armor(0)|body_armor(48)|leg_armor(13)|difficulty(0) ,imodbits_armor ], ["banded_armor", "Banded Armor", [("reinf_jerkin",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 2710 , weight(23)|abundance(100)|head_armor(0)|body_armor(49)|leg_armor(14)|difficulty(8) ,imodbits_armor ], ["cuir_bouilli", "Cuir Bouilli", [("hard_lthr_a",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 3100 , weight(24)|abundance(100)|head_armor(0)|body_armor(50)|leg_armor(15)|difficulty(8) ,imodbits_armor ], ["coat_of_plates", "Coat of Plates", [("coat_of_plates",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 3828 , weight(25)|abundance(100)|head_armor(0)|body_armor(52)|leg_armor(16)|difficulty(8) ,imodbits_armor ], ["plate_armor", "Plate Armor", [("plate_armor",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 6553 , weight(27)|abundance(100)|head_armor(0)|body_armor(55)|leg_armor(17)|difficulty(9) ,imodbits_plate ], ["black_armor", "Black Armor", [("black_armor",0)], itp_type_body_armor |itp_covers_legs ,0, 9496 , weight(28)|abundance(100)|head_armor(0)|body_armor(57)|leg_armor(18)|difficulty(10) ,imodbits_plate ], ["heraldic_mail_with_surcoat", "Heraldic Mail with Surcoat", [("heraldic_armor_a",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 3454 , weight(22)|abundance(100)|head_armor(0)|body_armor(49)|leg_armor(17)|difficulty(7) ,imodbits_armor, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_heraldic_armor_a", ":agent_no", ":troop_no")])]], ##["heraldic_mail_with_tunic", "Heraldic_Mail", [("heraldic_armor_b",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, ## 3520 , weight(22)|abundance(100)|head_armor(0)|body_armor(50)|leg_armor(16)|difficulty(7) ,imodbits_armor, ## [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_heraldic_armor_b", ":agent_no", ":troop_no")])]], ##["heraldic_mail_with_tunic_b", "Heraldic_Mail", [("heraldic_armor_c",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, ## 3610 , weight(22)|abundance(100)|head_armor(0)|body_armor(50)|leg_armor(16)|difficulty(7) ,imodbits_armor, ## [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_heraldic_armor_c", ":agent_no", ":troop_no")])]], ["heraldic_mail_with_tabard", "Heraldic_Mail_with_Tabard", [("heraldic_armor_d",0)], itp_merchandise| itp_type_body_armor |itp_covers_legs ,0, 3654 , weight(21)|abundance(100)|head_armor(0)|body_armor(51)|leg_armor(15)|difficulty(7) ,imodbits_armor, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_heraldic_armor_d", ":agent_no", ":troop_no")])]], ["turret_hat_ruby", "Turret Hat", [("turret_hat_r",0)], itp_type_head_armor |itp_civilian|itp_fit_to_head ,0, 70 , weight(0.5)|abundance(100)|head_armor(8)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["turret_hat_blue", "Turret Hat", [("turret_hat_b",0)], itp_type_head_armor |itp_civilian|itp_fit_to_head ,0, 80 , weight(0.5)|abundance(100)|head_armor(8)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["turret_hat_green", "Barbette", [("turret_hat_g",0)],itp_merchandise|itp_type_head_armor|itp_civilian|itp_fit_to_head,0,70, weight(0.5)|abundance(100)|head_armor(6)|body_armor(0)|leg_armor(0)|difficulty(0),imodbits_cloth], ["head_wrappings","head_wrapping",[("head_wrapping",0)],itp_type_head_armor|itp_fit_to_head,0,16, weight(0.25)|head_armor(3),imodbit_tattered | imodbit_ragged | imodbit_sturdy | imodbit_thick], ["court_hat", "Turret Hat", [("court_hat",0)], itp_type_head_armor |itp_civilian|itp_fit_to_head ,0, 80 , weight(0.5)|abundance(100)|head_armor(8)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["wimple_a", "Wimple", [("wimple_a",0)],itp_merchandise|itp_type_head_armor|itp_civilian|itp_fit_to_head,0,10, weight(0.5)|abundance(100)|head_armor(4)|body_armor(0)|leg_armor(0)|difficulty(0),imodbits_cloth], ["wimple_with_veil", "Wimple with Veil", [("wimple_b",0)],itp_merchandise|itp_type_head_armor|itp_civilian|itp_fit_to_head,0,10, weight(0.5)|abundance(100)|head_armor(4)|body_armor(0)|leg_armor(0)|difficulty(0),imodbits_cloth], ["straw_hat", "Straw Hat", [("straw_hat",0)],itp_merchandise|itp_type_head_armor|itp_civilian,0,9, weight(1)|abundance(100)|head_armor(2)|body_armor(0)|leg_armor(0)|difficulty(0),imodbits_cloth], ["common_hood", "Hood", [("hood_a",0),("hood_b",0),("hood_c",0),("hood_d",0)],itp_merchandise|itp_type_head_armor|itp_civilian,0,9, weight(1)|abundance(100)|head_armor(10)|body_armor(0)|leg_armor(0)|difficulty(0),imodbits_cloth], ["headcloth", "Headcloth", [("headcloth",0)], itp_merchandise| itp_type_head_armor |itp_civilian ,0, 1 , weight(0.5)|abundance(100)|head_armor(4)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["woolen_hood", "Woolen Hood", [("woolen_hood",0)], itp_merchandise| itp_type_head_armor |itp_civilian ,0, 4 , weight(1)|abundance(100)|head_armor(8)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["fur_hat", "Fur Hat", [("hat_fur_a",0)], itp_merchandise| itp_type_head_armor |itp_civilian ,0, 4 , weight(0.5)|abundance(100)|head_armor(8)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["nomad_cap", "Nomad Cap", [("helmet_fur_a",0),("helmet_fur_a",imodbits_good)], itp_merchandise| itp_type_head_armor |itp_civilian ,0, 6 , weight(0.75)|abundance(100)|head_armor(10)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["steppe_cap", "Steppe Cap", [("helmet_fur_b",0)], itp_merchandise| itp_type_head_armor |itp_civilian ,0, 14 , weight(1)|abundance(100)|head_armor(12)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["padded_coif", "Padded Coif", [("padded_coif",0)], itp_merchandise| itp_type_head_armor ,0, 6 , weight(1)|abundance(100)|head_armor(11)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["woolen_cap", "Woolen Cap", [("woolen_cap",0)], itp_merchandise| itp_type_head_armor |itp_civilian ,0, 2 , weight(1)|abundance(100)|head_armor(6)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["felt_hat", "Felt Hat", [("felt_hat_a",0),("felt_hat_b",imodbits_good)], itp_merchandise| itp_type_head_armor |itp_civilian,0, 4 , weight(1)|abundance(100)|head_armor(8)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["leather_cap", "Leather Cap", [("leather_cap",0)], itp_merchandise| itp_type_head_armor|itp_civilian ,0, 6 , weight(1)|abundance(100)|head_armor(10)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["arming_cap", "Arming Cap", [("linen_arming_cap",0)], itp_merchandise| itp_type_head_armor |itp_civilian ,0, 6 , weight(1)|abundance(100)|head_armor(10)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["female_hood", "Lady's Hood", [("woolen_hood",0)], itp_merchandise| itp_type_head_armor |itp_civilian ,0, 9 , weight(1)|abundance(100)|head_armor(10)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["leather_steppe_cap_a", "Leather Steppe Cap", [("nomad_cap_a",0)], itp_merchandise|itp_type_head_armor ,0, 24 , weight(1)|abundance(100)|head_armor(12)|body_armor(0)|leg_armor(0) ,imodbits_cloth ], ["leather_steppe_cap_b", "Leather Steppe Cap", [("leather_steppe_cap_a",0)], itp_merchandise|itp_type_head_armor ,0, 36 , weight(1)|abundance(100)|head_armor(14)|body_armor(0)|leg_armor(0) ,imodbits_cloth ], ["leather_steppe_cap_c", "Leather Steppe Cap", [("leather_steppe_cap_b",0)], itp_merchandise|itp_type_head_armor ,0, 51 , weight(1)|abundance(100)|head_armor(16)|body_armor(0)|leg_armor(0) ,imodbits_cloth ], ["leather_warrior_cap", "Leather Warrior Cap", [("skull_cap_new_b",0)], itp_merchandise| itp_type_head_armor |itp_civilian ,0, 14 , weight(1)|abundance(100)|head_armor(18)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_cloth ], ["skullcap", "Skullcap", [("skull_cap_new_a",0)], itp_merchandise| itp_type_head_armor ,0, 60 , weight(1.0)|abundance(100)|head_armor(20)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_plate ], ["mail_coif", "Mail Coif", [("mail_coif",0)], itp_merchandise| itp_type_head_armor ,0, 71 , weight(1.25)|abundance(100)|head_armor(22)|body_armor(0)|leg_armor(0)|difficulty(7) ,imodbits_armor ], ["footman_helmet", "Footman's_Helmet", [("skull_cap_new",0)], itp_merchandise| itp_type_head_armor ,0, 95 , weight(1.5)|abundance(100)|head_armor(24)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_plate ], ["nasal_helmet", "Nasal Helmet", [("nasal_helmet_b",0)], itp_merchandise| itp_type_head_armor ,0, 121 , weight(1.25)|abundance(100)|head_armor(26)|body_armor(0)|leg_armor(0)|difficulty(7) ,imodbits_plate ], ["norman_helmet", "Helmet with Cap", [("norman_helmet_a",0)], itp_merchandise| itp_type_head_armor|itp_fit_to_head ,0, 147 , weight(1.25)|abundance(100)|head_armor(28)|body_armor(0)|leg_armor(0)|difficulty(7) ,imodbits_plate ], ["segmented_helmet", "Segmented Helmet", [("segmented_helm_new",0)], itp_merchandise| itp_type_head_armor ,0, 174 , weight(1.25)|abundance(100)|head_armor(31)|body_armor(0)|leg_armor(0)|difficulty(7) ,imodbits_plate ], ["kettle_hat", "Kettle Hat", [("kettle_hat_new",0)], itp_merchandise| itp_type_head_armor,0, 193 , weight(1.5)|abundance(100)|head_armor(33)|body_armor(0)|leg_armor(0)|difficulty(7) ,imodbits_plate ], ["helmet_with_neckguard", "Helmet with Neckguard", [("neckguard_helm_new",0)], itp_merchandise| itp_type_head_armor ,0, 233 , weight(1.75)|abundance(100)|head_armor(35)|body_armor(0)|leg_armor(0)|difficulty(7) ,imodbits_plate ], ["spiked_helmet", "Spiked Helmet", [("spiked_helmet_new",0)], itp_merchandise| itp_type_head_armor ,0, 278 , weight(2)|abundance(100)|head_armor(38)|body_armor(0)|leg_armor(0)|difficulty(7) ,imodbits_plate ], ["nordic_helmet", "Nordic Helmet", [("helmet_w_eyeguard_new",0)], itp_merchandise| itp_type_head_armor ,0, 340 , weight(2)|abundance(100)|head_armor(40)|body_armor(0)|leg_armor(0)|difficulty(7) ,imodbits_plate ], ["flat_topped_helmet", "Flat Topped Helmet", [("flattop_helmet_new",0)], itp_merchandise| itp_type_head_armor ,0, 411 , weight(2)|abundance(100)|head_armor(42)|body_armor(0)|leg_armor(0)|difficulty(8) ,imodbits_plate ], #TODO: #["skullcap_b", "Skullcap_b", [("skull_cap_new_b",0)], itp_merchandise| itp_type_head_armor ,0, 71 , weight(1.5)|abundance(100)|head_armor(20)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_plate ], ["bascinet", "Bascinet", [("bascinet_avt_new",0),("bascinet_avt_new1",imodbit_crude|imodbit_rusty),("bascinet_avt_new2",imodbits_good)], itp_merchandise|itp_type_head_armor ,0, 479 , weight(2.25)|abundance(100)|head_armor(45)|body_armor(0)|leg_armor(0)|difficulty(8) ,imodbits_plate ], ["guard_helmet", "Guard Helmet", [("reinf_helmet_new",0)], itp_merchandise| itp_type_head_armor ,0, 555 , weight(2.5)|abundance(100)|head_armor(47)|body_armor(0)|leg_armor(0)|difficulty(9) ,imodbits_plate ], ["black_helmet", "Black Helmet", [("black_helm",0)], itp_type_head_armor ,0, 638 , weight(2.75)|abundance(100)|head_armor(50)|body_armor(0)|leg_armor(0)|difficulty(9) ,imodbits_plate ], ["great_helmet", "Great Helmet", [("great_helm_a",0)], itp_merchandise| itp_type_head_armor|itp_covers_head,0, 980 , weight(2.75)|abundance(100)|head_armor(53)|body_armor(0)|leg_armor(0)|difficulty(10) ,imodbits_plate ], ["winged_great_helmet", "Winged Great Helmet", [("maciejowski_helmet_new",0)], itp_merchandise|itp_type_head_armor|itp_covers_head,0, 1240 , weight(2.75)|abundance(100)|head_armor(55)|body_armor(0)|leg_armor(0)|difficulty(10) ,imodbits_plate ], #WEAPONS ["wooden_stick", "Wooden Stick", [("wooden_stick",0)], itp_type_one_handed_wpn|itp_merchandise| itp_primary|itp_wooden_parry|itp_wooden_attack, itc_scimitar, 4 , weight(2.5)|difficulty(0)|spd_rtng(99) | weapon_length(90)|swing_damage(13 , blunt) | thrust_damage(0 , pierce),imodbits_none ], ["cudgel", "Cudgel", [("club",0)], itp_type_one_handed_wpn|itp_merchandise| itp_primary|itp_wooden_parry|itp_wooden_attack, itc_scimitar, 4 , weight(2.5)|difficulty(0)|spd_rtng(99) | weapon_length(90)|swing_damage(13 , blunt) | thrust_damage(0 , pierce),imodbits_none ], ["hammer", "Hammer", [("iron_hammer",0)], itp_type_one_handed_wpn|itp_merchandise| itp_primary|itp_wooden_parry, itc_scimitar, 7 , weight(2)|difficulty(0)|spd_rtng(100) | weapon_length(55)|swing_damage(14 , blunt) | thrust_damage(0 , pierce),imodbits_mace ], ["club", "Club", [("club",0)], itp_type_one_handed_wpn|itp_merchandise| itp_primary|itp_wooden_parry|itp_wooden_attack, itc_scimitar, 11 , weight(2.5)|difficulty(0)|spd_rtng(95) | weapon_length(95)|swing_damage(15 , blunt) | thrust_damage(0 , pierce),imodbits_none ], ["winged_mace", "Winged Mace", [("winged_mace",0)], itp_type_one_handed_wpn|itp_merchandise| itp_primary|itp_wooden_parry, itc_scimitar|itcf_carry_mace_left_hip, 122 , weight(3.5)|difficulty(0)|spd_rtng(99) | weapon_length(80)|swing_damage(21 , blunt) | thrust_damage(0 , pierce),imodbits_mace ], ["spiked_mace", "Spiked Mace", [("spiked_mace",0)], itp_type_one_handed_wpn|itp_merchandise| itp_primary|itp_wooden_parry, itc_scimitar|itcf_carry_mace_left_hip, 180 , weight(3.5)|difficulty(0)|spd_rtng(95) | weapon_length(90)|swing_damage(22 , blunt) | thrust_damage(0 , pierce),imodbits_pick ], ["military_hammer", "Military Hammer", [("iron_hammer",0)], itp_type_one_handed_wpn|itp_merchandise| itp_primary|itp_wooden_parry, itc_scimitar|itcf_carry_axe_left_hip, 317 , weight(4)|difficulty(0)|spd_rtng(92) | weapon_length(90)|swing_damage(25 , blunt) | thrust_damage(0 , pierce),imodbits_mace ], ["maul", "Maul", [("maul_b",0)], itp_type_two_handed_wpn|itp_merchandise| itp_primary|itp_two_handed|itp_wooden_parry|itp_wooden_attack, itc_nodachi|itcf_carry_spear, 97 , weight(6)|difficulty(11)|spd_rtng(84) | weapon_length(79)|swing_damage(33 , blunt) | thrust_damage(0 , pierce),imodbits_mace ], ["sledgehammer", "Sledgehammer", [("maul_c",0)], itp_type_two_handed_wpn|itp_merchandise|itp_primary|itp_two_handed|itp_wooden_parry|itp_wooden_attack, itc_nodachi|itcf_carry_spear, 101 , weight(7)|difficulty(12)|spd_rtng(82) | weapon_length(82)|swing_damage(35 , blunt) | thrust_damage(0 , pierce),imodbits_mace ], ["warhammer", "Warhammer", [("maul_d",0)], itp_type_two_handed_wpn|itp_merchandise|itp_primary|itp_two_handed|itp_wooden_parry|itp_wooden_attack, itc_nodachi|itcf_carry_spear, 309 , weight(9)|difficulty(14)|spd_rtng(85) | weapon_length(75)|swing_damage(38 , blunt) | thrust_damage(0 , pierce),imodbits_mace ], ["pickaxe", "Pickaxe", [("rusty_pick",0)], itp_type_one_handed_wpn|itp_merchandise|itp_primary|itp_wooden_parry, itc_scimitar|itcf_carry_axe_left_hip, 27 , weight(3)|difficulty(0)|spd_rtng(96) | weapon_length(80)|swing_damage(19 , pierce) | thrust_damage(0 , pierce),imodbits_pick ], ["spiked_club", "Spiked Club", [("spiked_club",0)], itp_type_one_handed_wpn|itp_merchandise|itp_primary|itp_wooden_parry, itc_scimitar|itcf_carry_mace_left_hip, 83 , weight(3)|difficulty(0)|spd_rtng(97) | weapon_length(97)|swing_damage(21 , pierce) | thrust_damage(0 , pierce),imodbits_mace ], ["fighting_pick", "Fighting Pick", [("rusty_pick",0)], itp_type_one_handed_wpn|itp_merchandise|itp_primary|itp_wooden_parry, itc_scimitar|itcf_carry_axe_left_hip, 108 , weight(3.5)|difficulty(0)|spd_rtng(94) | weapon_length(90)|swing_damage(25 , pierce) | thrust_damage(0 , pierce),imodbits_pick ], ["military_pick", "Military Pick", [("steel_pick",0)], itp_type_one_handed_wpn|itp_merchandise|itp_primary|itp_wooden_parry, itc_scimitar|itcf_carry_axe_left_hip, 142 , weight(4)|difficulty(0)|spd_rtng(90) | weapon_length(90)|swing_damage(27 , pierce) | thrust_damage(0 , pierce),imodbits_pick ], ["morningstar", "Morningstar", [("mace_morningstar",0)], itp_type_one_handed_wpn|itp_merchandise|itp_primary|itp_wooden_parry, itc_scimitar|itcf_carry_axe_left_hip, 205 , weight(5.5)|difficulty(13)|spd_rtng(75) | weapon_length(98)|swing_damage(29 , pierce) | thrust_damage(0 , pierce),imodbits_mace ], ["sickle", "Sickle", [("sickle",0)], itp_type_one_handed_wpn|itp_merchandise|itp_primary|itp_secondary|itp_no_parry|itp_wooden_parry, itc_cleaver, 1 , weight(1.5)|difficulty(0)|spd_rtng(99) | weapon_length(40)|swing_damage(20 , cut) | thrust_damage(0 , pierce),imodbits_none ], ["cleaver", "Cleaver", [("cleaver",0)], itp_type_one_handed_wpn|itp_merchandise|itp_primary|itp_secondary|itp_no_parry|itp_wooden_parry, itc_cleaver, 3 , weight(1.5)|difficulty(0)|spd_rtng(103) | weapon_length(30)|swing_damage(24 , cut) | thrust_damage(0 , pierce),imodbits_none ], ["knife", "Knife", [("peasant_knife",0)], itp_type_one_handed_wpn|itp_merchandise|itp_primary|itp_secondary|itp_no_parry, itc_dagger|itcf_carry_dagger_front_left, 4 , weight(0.5)|difficulty(0)|spd_rtng(110) | weapon_length(40)|swing_damage(21 , cut) | thrust_damage(13 , pierce),imodbits_sword ], ["butchering_knife", "Butchering Knife", [("khyber_knife",0)], itp_type_one_handed_wpn|itp_merchandise|itp_primary|itp_secondary|itp_no_parry, itc_dagger|itcf_carry_dagger_front_right, 13 , weight(0.75)|difficulty(0)|spd_rtng(108) | weapon_length(60)|swing_damage(24 , cut) | thrust_damage(17 , pierce),imodbits_sword ], ["dagger", "Dagger", [("dagger",0),("scab_dagger",ixmesh_carry),("dagger_b",imodbits_good),("dagger_b_scabbard",ixmesh_carry|imodbits_good)], itp_type_one_handed_wpn|itp_merchandise|itp_primary|itp_secondary|itp_no_parry, itc_dagger|itcf_carry_dagger_front_left|itcf_show_holster_when_drawn, 17 , weight(0.75)|difficulty(0)|spd_rtng(112) | weapon_length(47)|swing_damage(22 , cut) | thrust_damage(19 , pierce),imodbits_sword_high ], #["nordic_sword", "Nordic Sword", [("viking_sword",0),("scab_vikingsw", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 142 , weight(1.5)|difficulty(0)|spd_rtng(99) | weapon_length(98)|swing_damage(27 , cut) | thrust_damage(19 , pierce),imodbits_sword ], #["arming_sword", "Arming Sword", [("b_long_sword",0),("scab_longsw_b", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 156 , weight(1.5)|difficulty(0)|spd_rtng(101) | weapon_length(100)|swing_damage(25 , cut) | thrust_damage(22 , pierce),imodbits_sword ], #["sword", "Sword", [("long_sword",0),("scab_longsw_a", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 148 , weight(1.5)|difficulty(0)|spd_rtng(100) | weapon_length(102)|swing_damage(26 , cut) | thrust_damage(23 , pierce),imodbits_sword ], ["falchion", "Falchion", [("falchion",0)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_scimitar|itcf_carry_sword_left_hip, 105 , weight(2.5)|difficulty(8)|spd_rtng(96) | weapon_length(73)|swing_damage(30 , cut) | thrust_damage(0 , pierce),imodbits_sword ], #["broadsword", "Broadsword", [("broadsword",0),("scab_broadsword", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_scimitar|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 122 , weight(2.5)|difficulty(8)|spd_rtng(91) | weapon_length(101)|swing_damage(27 , cut) | thrust_damage(0 , pierce),imodbits_sword ], ["scimitar", "Scimitar", [("scimeter",0),("scab_scimeter", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_scimitar|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 108 , weight(1.5)|difficulty(0)|spd_rtng(105) | weapon_length(97)|swing_damage(29 , cut) | thrust_damage(0 , pierce),imodbits_sword_high ], #["nomad_sabre", "Nomad Sabre", [("shashqa",0),("scab_shashqa", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_scimitar|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 115 , weight(1.75)|difficulty(0)|spd_rtng(101) | weapon_length(100)|swing_damage(27 , cut) | thrust_damage(0 , pierce),imodbits_sword ], #["bastard_sword", "Bastard Sword", [("bastard_sword",0),("scab_bastardsw", ixmesh_carry)], itp_type_two_handed_wpn|itp_merchandise| itp_primary, itc_bastardsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 279 , weight(2.25)|difficulty(9)|spd_rtng(102) | weapon_length(120)|swing_damage(33 , cut) | thrust_damage(27 , pierce),imodbits_sword ], ["great_sword", "Great Sword", [("b_bastard_sword",0),("scab_bastardsw_b", ixmesh_carry)], itp_type_two_handed_wpn|itp_merchandise| itp_two_handed|itp_primary, itc_greatsword|itcf_carry_sword_back|itcf_show_holster_when_drawn, 423 , weight(2.75)|difficulty(10)|spd_rtng(95) | weapon_length(125)|swing_damage(39 , cut) | thrust_damage(31 , pierce),imodbits_sword_high ], ["sword_of_war", "Sword of War", [("b_bastard_sword",0),("scab_bastardsw_b", ixmesh_carry)], itp_type_two_handed_wpn|itp_merchandise| itp_two_handed|itp_primary, itc_greatsword|itcf_carry_sword_back|itcf_show_holster_when_drawn, 524 , weight(3)|difficulty(11)|spd_rtng(93) | weapon_length(130)|swing_damage(40 , cut) | thrust_damage(31 , pierce),imodbits_sword_high ], ["hatchet", "Hatchet", [("hatchet",0)], itp_type_one_handed_wpn|itp_merchandise| itp_primary|itp_secondary|itp_bonus_against_shield|itp_wooden_parry, itc_scimitar|itcf_carry_axe_left_hip, 3 , weight(2)|difficulty(0)|spd_rtng(97) | weapon_length(60)|swing_damage(23 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["hand_axe", "Hand Axe", [("hatchet",0)], itp_type_one_handed_wpn|itp_merchandise| itp_primary|itp_secondary|itp_bonus_against_shield|itp_wooden_parry, itc_scimitar|itcf_carry_axe_left_hip, 24 , weight(2)|difficulty(7)|spd_rtng(95) | weapon_length(75)|swing_damage(27 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["fighting_axe", "Fighting Axe", [("fighting_ax",0)], itp_type_one_handed_wpn|itp_merchandise| itp_primary|itp_secondary|itp_bonus_against_shield|itp_wooden_parry, itc_scimitar|itcf_carry_axe_left_hip, 77 , weight(2.5)|difficulty(9)|spd_rtng(92) | weapon_length(90)|swing_damage(31 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["axe", "Axe", [("iron_ax",0)], itp_type_two_handed_wpn|itp_merchandise| itp_two_handed|itp_primary|itp_bonus_against_shield|itp_wooden_parry, itc_nodachi|itcf_carry_axe_back, 65 , weight(4)|difficulty(8)|spd_rtng(91) | weapon_length(108)|swing_damage(32 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["voulge", "Voulge", [("voulge",0)], itp_type_two_handed_wpn|itp_merchandise| itp_two_handed|itp_primary|itp_bonus_against_shield|itp_wooden_parry, itc_nodachi|itcf_carry_axe_back, 129 , weight(4.5)|difficulty(8)|spd_rtng(87) | weapon_length(119)|swing_damage(35 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["battle_axe", "Battle Axe", [("battle_ax",0)], itp_type_two_handed_wpn|itp_merchandise| itp_two_handed|itp_primary|itp_bonus_against_shield|itp_wooden_parry, itc_nodachi|itcf_carry_axe_back, 240 , weight(5)|difficulty(9)|spd_rtng(88) | weapon_length(108)|swing_damage(41 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["war_axe", "War Axe", [("war_ax",0)], itp_type_two_handed_wpn|itp_merchandise| itp_two_handed|itp_primary|itp_bonus_against_shield|itp_wooden_parry, itc_nodachi|itcf_carry_axe_back, 264 , weight(5)|difficulty(10)|spd_rtng(86) | weapon_length(110)|swing_damage(43 , cut) | thrust_damage(0 , pierce),imodbits_axe ], #["double_axe", "Double Axe", [("dblhead_ax",0)], itp_type_two_handed_wpn|itp_merchandise| itp_two_handed|itp_primary|itp_bonus_against_shield|itp_wooden_parry, itc_nodachi|itcf_carry_axe_back, 359 , weight(6.5)|difficulty(12)|spd_rtng(85) | weapon_length(95)|swing_damage(43 , cut) | thrust_damage(0 , pierce),imodbits_axe ], #["great_axe", "Great Axe", [("great_ax",0)], itp_type_two_handed_wpn|itp_merchandise| itp_two_handed|itp_primary|itp_bonus_against_shield|itp_wooden_parry, itc_nodachi|itcf_carry_axe_back, 415 , weight(7)|difficulty(13)|spd_rtng(82) | weapon_length(120)|swing_damage(45 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["sword_two_handed_b", "Two Handed Sword", [("sword_two_handed_b",0)], itp_type_two_handed_wpn|itp_merchandise|itp_always_loot| itp_two_handed|itp_primary, itc_greatsword|itcf_carry_sword_back, 670 , weight(2.75)|difficulty(10)|spd_rtng(93) | weapon_length(110)|swing_damage(40 , cut) | thrust_damage(27 , pierce),imodbits_sword_high ], ["sword_two_handed_a", "Great Sword", [("sword_two_handed_a",0)], itp_type_two_handed_wpn|itp_merchandise|itp_always_loot|itp_two_handed|itp_primary, itc_greatsword|itcf_carry_sword_back, 1123 , weight(2.75)|difficulty(10)|spd_rtng(89) | weapon_length(120)|swing_damage(42 , cut) | thrust_damage(28 , pierce),imodbits_sword_high ], ["bastard_sword_a", "Bastard Sword", [("bastard_sword_a",0),("bastard_sword_a_scabbard", ixmesh_carry)], itp_type_two_handed_wpn|itp_merchandise| itp_primary, itc_bastardsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 294 , weight(2.25)|difficulty(9)|spd_rtng(98) | weapon_length(101)|swing_damage(37 , cut) | thrust_damage(26 , pierce),imodbits_sword_high ], ["bastard_sword_b", "Heavy Bastard Sword", [("bastard_sword_b",0),("bastard_sword_b_scabbard", ixmesh_carry)], itp_type_two_handed_wpn|itp_merchandise| itp_primary, itc_bastardsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 526 , weight(2.25)|difficulty(9)|spd_rtng(96) | weapon_length(105)|swing_damage(37 , cut) | thrust_damage(28 , pierce),imodbits_sword_high ], ["one_handed_war_axe_a", "One Handed War Axe", [("one_handed_war_axe_a",0)], itp_type_one_handed_wpn|itp_merchandise| itp_primary|itp_secondary|itp_bonus_against_shield|itp_wooden_parry, itc_scimitar|itcf_carry_axe_left_hip, 87 , weight(1.5)|difficulty(9)|spd_rtng(100) | weapon_length(60)|swing_damage(32 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["one_handed_war_axe_b", "One Handed War Axe", [("one_handed_war_axe_b",0)], itp_type_one_handed_wpn|itp_merchandise| itp_primary|itp_secondary|itp_bonus_against_shield|itp_wooden_parry, itc_scimitar|itcf_carry_axe_left_hip, 137 , weight(1.5)|difficulty(9)|spd_rtng(98) | weapon_length(61)|swing_damage(34 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["one_handed_battle_axe_a", "One Handed Battle Axe", [("one_handed_battle_axe_a",0)], itp_type_one_handed_wpn|itp_merchandise| itp_primary|itp_secondary|itp_bonus_against_shield|itp_wooden_parry, itc_scimitar|itcf_carry_axe_left_hip, 102 , weight(1.5)|difficulty(9)|spd_rtng(97) | weapon_length(69)|swing_damage(34 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["one_handed_battle_axe_b", "One Handed Battle Axe", [("one_handed_battle_axe_b",0)], itp_type_one_handed_wpn|itp_merchandise| itp_primary|itp_secondary|itp_bonus_against_shield|itp_wooden_parry, itc_scimitar|itcf_carry_axe_left_hip, 171 , weight(1.75)|difficulty(9)|spd_rtng(96) | weapon_length(70)|swing_damage(36 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["one_handed_battle_axe_c", "One Handed Battle Axe", [("one_handed_battle_axe_c",0)], itp_type_one_handed_wpn|itp_merchandise| itp_primary|itp_secondary|itp_bonus_against_shield|itp_wooden_parry, itc_scimitar|itcf_carry_axe_left_hip, 294 , weight(2.0)|difficulty(9)|spd_rtng(95) | weapon_length(72)|swing_damage(38 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["two_handed_axe", "Two_Handed_Axe", [("two_handed_battle_axe_a",0)], itp_type_two_handed_wpn|itp_merchandise| itp_two_handed|itp_primary|itp_bonus_against_shield|itp_wooden_parry, itc_nodachi|itcf_carry_axe_back, 110 , weight(4.5)|difficulty(10)|spd_rtng(90) | weapon_length(90)|swing_damage(40 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["two_handed_battle_axe_2", "Two_Handed_War_Axe", [("two_handed_battle_axe_b",0)], itp_type_two_handed_wpn|itp_merchandise| itp_two_handed|itp_primary|itp_bonus_against_shield|itp_wooden_parry, itc_nodachi|itcf_carry_axe_back, 202 , weight(4.5)|difficulty(10)|spd_rtng(92) | weapon_length(92)|swing_damage(47 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["two_handed_battle_axe_3", "Voulge", [("two_handed_battle_axe_c",0)], itp_type_two_handed_wpn|itp_merchandise| itp_two_handed|itp_primary|itp_bonus_against_shield|itp_wooden_parry, itc_nodachi|itcf_carry_axe_back, 258 , weight(4.5)|difficulty(10)|spd_rtng(87) | weapon_length(100)|swing_damage(48 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["bardiche", "Bardiche", [("two_handed_battle_axe_d",0)], itp_type_two_handed_wpn|itp_merchandise| itp_two_handed|itp_primary|itp_bonus_against_shield|itp_wooden_parry, itc_nodachi|itcf_carry_axe_back, 311 , weight(4.5)|difficulty(10)|spd_rtng(87) | weapon_length(102)|swing_damage(50 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["great_axe", "Great_Axe", [("two_handed_battle_axe_e",0)], itp_type_two_handed_wpn|itp_merchandise| itp_two_handed|itp_primary|itp_bonus_against_shield|itp_wooden_parry, itc_nodachi|itcf_carry_axe_back, 446 , weight(4.5)|difficulty(10)|spd_rtng(90) | weapon_length(96)|swing_damage(51 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["great_bardiche", "Great_Bardiche", [("two_handed_battle_axe_f",0)], itp_type_two_handed_wpn|itp_always_loot|itp_two_handed|itp_primary|itp_bonus_against_shield|itp_wooden_parry, itc_nodachi|itcf_carry_axe_back, 617 , weight(4.5)|difficulty(10)|spd_rtng(90) | weapon_length(116)|swing_damage(47 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["shortened_military_scythe", "Shortened Military Scythe", [("two_handed_battle_scythe_a",0)], itp_type_two_handed_wpn|itp_merchandise|itp_always_loot| itp_two_handed|itp_primary, itc_nodachi|itcf_carry_sword_back, 264 , weight(3.0)|difficulty(10)|spd_rtng(90) | weapon_length(112)|swing_damage(44 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["sword_medieval_a", "Sword", [("sword_medieval_a",0),("sword_medieval_a_scabbard", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 163 , weight(1.5)|difficulty(0)|spd_rtng(99) | weapon_length(95)|swing_damage(27 , cut) | thrust_damage(22 , pierce),imodbits_sword_high ], #["sword_medieval_a_long", "Sword", [("sword_medieval_a_long",0),("sword_medieval_a_long_scabbard", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 156 , weight(1.5)|difficulty(0)|spd_rtng(97) | weapon_length(105)|swing_damage(25 , cut) | thrust_damage(22 , pierce),imodbits_sword ], ["sword_medieval_b", "Sword", [("sword_medieval_b",0),("sword_medieval_b_scabbard", ixmesh_carry),("sword_rusty_a",imodbit_rusty),("sword_rusty_a_scabbard", ixmesh_carry|imodbit_rusty)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 243 , weight(1.5)|difficulty(0)|spd_rtng(99) | weapon_length(95)|swing_damage(28 , cut) | thrust_damage(23 , pierce),imodbits_sword_high ], ["sword_medieval_b_small", "Short Sword", [("sword_medieval_b_small",0),("sword_medieval_b_small_scabbard", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 152 , weight(1.5)|difficulty(0)|spd_rtng(102) | weapon_length(85)|swing_damage(26, cut) | thrust_damage(24, pierce),imodbits_sword_high ], ["sword_medieval_c", "Arming Sword", [("sword_medieval_c",0),("sword_medieval_c_scabbard", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 410 , weight(1.5)|difficulty(0)|spd_rtng(99) | weapon_length(95)|swing_damage(29 , cut) | thrust_damage(24 , pierce),imodbits_sword_high ], ["sword_medieval_c_small", "Short Arming Sword", [("sword_medieval_c_small",0),("sword_medieval_c_small_scabbard", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 243 , weight(1.5)|difficulty(0)|spd_rtng(103) | weapon_length(86)|swing_damage(26, cut) | thrust_damage(24 , pierce),imodbits_sword_high ], #["sword_medieval_d", "sword_medieval_d", [("sword_medieval_d",0),("sword_medieval_d_scabbard", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, # 131 , weight(1.5)|difficulty(0)|spd_rtng(99) | weapon_length(95)|swing_damage(24 , cut) | thrust_damage(21 , pierce),imodbits_sword ], #["sword_medieval_d_long", "sword_medieval_d_long", [("sword_medieval_d_long",0),("sword_medieval_d_long_scabbard", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, # 156 , weight(1.5)|difficulty(0)|spd_rtng(97) | weapon_length(105)|swing_damage(25 , cut) | thrust_damage(22 , pierce),imodbits_sword ], #["sword_medieval_e", "sword_medieval_e", [("sword_medieval_e",0),("sword_medieval_e_scabbard", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, # 131 , weight(1.5)|difficulty(0)|spd_rtng(99) | weapon_length(95)|swing_damage(24 , cut) | thrust_damage(21 , pierce),imodbits_sword ], ["sword_viking_1", "Nordic Sword", [("sword_viking_c",0),("sword_viking_c_scabbard ", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 147 , weight(1.5)|difficulty(0)|spd_rtng(99) | weapon_length(94)|swing_damage(28 , cut) | thrust_damage(20 , pierce),imodbits_sword_high ] , ["sword_viking_2", "Nordic Sword", [("sword_viking_b",0),("sword_viking_b_scabbard", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 276 , weight(1.5)|difficulty(0)|spd_rtng(99) | weapon_length(95)|swing_damage(29 , cut) | thrust_damage(21 , pierce),imodbits_sword_high ], ["sword_viking_2_small", "Nordic Short Sword", [("sword_viking_b_small",0),("sword_viking_b_small_scabbard", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 162 , weight(1.25)|difficulty(0)|spd_rtng(103) | weapon_length(85)|swing_damage(28 , cut) | thrust_damage(21 , pierce),imodbits_sword_high ], ["sword_viking_3", "Nordic Sword", [("sword_viking_a",0),("sword_viking_a_scabbard", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 394 , weight(1.5)|difficulty(0)|spd_rtng(99) | weapon_length(95)|swing_damage(30 , cut) | thrust_damage(21 , pierce),imodbits_sword_high ], #["sword_viking_a_long", "sword_viking_a_long", [("sword_viking_a_long",0),("sword_viking_a_long_scabbard", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, # 142 , weight(1.5)|difficulty(0)|spd_rtng(97) | weapon_length(105)|swing_damage(27 , cut) | thrust_damage(19 , pierce),imodbits_sword ], ["sword_viking_3_small", "Nordic Sword", [("sword_viking_a_small",0),("sword_viking_a_small_scabbard", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 280 , weight(1.25)|difficulty(0)|spd_rtng(103) | weapon_length(86)|swing_damage(29 , cut) | thrust_damage(21 , pierce),imodbits_sword_high ], #["sword_viking_c_long", "sword_viking_c_long", [("sword_viking_c_long",0),("sword_viking_c_long_scabbard ", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, # 142 , weight(1.5)|difficulty(0)|spd_rtng(95) | weapon_length(105)|swing_damage(27 , cut) | thrust_damage(19 , pierce),imodbits_sword ] , ["sword_khergit_1", "Nomad Sabre", [("khergit_sword_b",0),("khergit_sword_b_scabbard", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_scimitar|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 105 , weight(1.25)|difficulty(0)|spd_rtng(100) | weapon_length(97)|swing_damage(29 , cut),imodbits_sword_high ], ["sword_khergit_2", "Sabre", [("khergit_sword_c",0),("khergit_sword_c_scabbard", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_scimitar|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 191 , weight(1.5)|difficulty(0)|spd_rtng(99) | weapon_length(97)|swing_damage(30 , cut),imodbits_sword_high ], ["sword_khergit_3", "Sabre", [("khergit_sword_a",0),("khergit_sword_a_scabbard", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_scimitar|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 294 , weight(1.5)|difficulty(0)|spd_rtng(99) | weapon_length(98)|swing_damage(31 , cut),imodbits_sword_high ], ["sword_khergit_4", "Heavy Sabre", [("khergit_sword_d",0),("khergit_sword_d_scabbard", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_scimitar|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 384 , weight(1.75)|difficulty(0)|spd_rtng(96) | weapon_length(96)|swing_damage(33 , cut),imodbits_sword_high ], ["mace_1", "spiked_club", [("mace_d",0)], itp_type_one_handed_wpn|itp_merchandise| itp_primary|itp_wooden_parry, itc_scimitar|itcf_carry_mace_left_hip, 45 , weight(1.5)|difficulty(0)|spd_rtng(99) | weapon_length(62)|swing_damage(19 , pierce) | thrust_damage(0 , pierce),imodbits_mace ], ["mace_2", "Knobbed_Mace", [("mace_a",0)], itp_type_one_handed_wpn|itp_merchandise| itp_primary|itp_wooden_parry, itc_scimitar|itcf_carry_mace_left_hip, 98 , weight(2.5)|difficulty(0)|spd_rtng(98) | weapon_length(60)|swing_damage(21 , blunt) | thrust_damage(0 , pierce),imodbits_mace ], ["mace_3", "Spiked Mace", [("mace_c",0)], itp_type_one_handed_wpn|itp_merchandise| itp_primary|itp_wooden_parry, itc_scimitar|itcf_carry_mace_left_hip, 152 , weight(2.5)|difficulty(0)|spd_rtng(98) | weapon_length(62)|swing_damage(23 , blunt) | thrust_damage(0 , pierce),imodbits_mace ], ["mace_4", "Winged_Mace", [("mace_b",0)], itp_type_one_handed_wpn|itp_merchandise| itp_primary|itp_wooden_parry, itc_scimitar|itcf_carry_mace_left_hip, 212 , weight(2.5)|difficulty(0)|spd_rtng(98) | weapon_length(60)|swing_damage(24 , blunt) | thrust_damage(0 , pierce),imodbits_mace ], ["club_with_spike_head", "Club_with_Spike", [("mace_e",0)], itp_type_two_handed_wpn|itp_merchandise| itp_primary|itp_wooden_parry, itc_bastardsword|itcf_carry_axe_back, 72 , weight(3.5)|difficulty(9)|spd_rtng(103) | weapon_length(80)|swing_damage(26 , blunt) | thrust_damage(25 , pierce),imodbits_mace ], ["scythe", "Scythe", [("scythe",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_staff|itcf_carry_spear, 43 , weight(3)|difficulty(0)|spd_rtng(79) | weapon_length(182)|swing_damage(19 , cut) | thrust_damage(14 , pierce),imodbits_polearm ], ["pitch_fork", "Pitch Fork", [("pitch_fork",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_spear, 19 , weight(3.5)|difficulty(0)|spd_rtng(83) | weapon_length(154)|swing_damage(0 , blunt) | thrust_damage(18 , pierce),imodbits_polearm ], ["military_fork", "Military Fork", [("military_fork",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_spear, 153 , weight(4.5)|difficulty(0)|spd_rtng(88) | weapon_length(135)|swing_damage(0 , blunt) | thrust_damage(23 , pierce),imodbits_polearm ], ["battle_fork", "Battle Fork", [("battle_fork",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_spear, 282 , weight(4.5)|difficulty(0)|spd_rtng(87) | weapon_length(142)|swing_damage(0 , blunt) | thrust_damage(24 , pierce),imodbits_polearm ], ["boar_spear", "Boar Spear", [("spear",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_spear|itcf_carry_spear, 76 , weight(4)|difficulty(0)|spd_rtng(81) | weapon_length(157)|swing_damage(0 , cut) | thrust_damage(23 , pierce),imodbits_polearm ], #["spear", "Spear", [("spear",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_cutting_spear|itcf_carry_spear, 173 , weight(4.5)|difficulty(0)|spd_rtng(80) | weapon_length(158)|swing_damage(17 , blunt) | thrust_damage(23 , pierce),imodbits_polearm ], ["jousting_lance", "Jousting Lance", [("joust_of_peace",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_greatlance, 158 , weight(5)|difficulty(0)|spd_rtng(61) | weapon_length(218)|swing_damage(0 , cut) | thrust_damage(17 , blunt),imodbits_polearm ], #["lance", "Lance", [("pike",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_spear, 196 , weight(5)|difficulty(0)|spd_rtng(72) | weapon_length(170)|swing_damage(0 , cut) | thrust_damage(20 , pierce),imodbits_polearm ], #["great_lance", "Great Lance", [("heavy_lance",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_greatlance, 237 , weight(5)|difficulty(0)|spd_rtng(55) | weapon_length(215)|swing_damage(0 , cut) | thrust_damage(21 , pierce),imodbits_polearm ], ["double_sided_lance", "Double Sided Lance", [("lance_dblhead",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_staff, 261 , weight(5.5)|difficulty(0)|spd_rtng(80) | weapon_length(130)|swing_damage(0 , cut) | thrust_damage(27 , pierce),imodbits_polearm ], #["pike", "Pike", [("pike",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_two_handed|itp_wooden_parry, itc_spear, # 212 , weight(6)|difficulty(0)|spd_rtng(77) | weapon_length(167)|swing_damage(0 , blunt) | thrust_damage(23 , pierce),imodbits_polearm ], ["glaive", "Glaive", [("glaive",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_two_handed|itp_wooden_parry, itc_staff|itcf_carry_spear, 352 , weight(4.5)|difficulty(0)|spd_rtng(83) | weapon_length(157)|swing_damage(38 , cut) | thrust_damage(21 , pierce),imodbits_polearm ], ["poleaxe", "Poleaxe", [("pole_ax",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_two_handed|itp_wooden_parry, itc_staff, 384 , weight(6.5)|difficulty(0)|spd_rtng(77) | weapon_length(180)|swing_damage(37 , cut) | thrust_damage(21 , pierce),imodbits_polearm ], ["polehammer", "Polehammer", [("pole_hammer",0)], itp_type_polearm| itp_spear|itp_primary|itp_two_handed|itp_wooden_parry, itc_staff, 169 , weight(7)|difficulty(14)|spd_rtng(73) | weapon_length(130)|swing_damage(29 , blunt) | thrust_damage(25 , blunt),imodbits_polearm ], ["staff", "Staff", [("wooden_staff",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry|itp_wooden_attack, itc_staff|itcf_carry_sword_back, 36 , weight(1.5)|difficulty(0)|spd_rtng(100) | weapon_length(130)|swing_damage(18 , blunt) | thrust_damage(19 , blunt),imodbits_polearm ], ["quarter_staff", "Quarter Staff", [("quarter_staff",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry|itp_wooden_attack, itc_staff|itcf_carry_sword_back, 60 , weight(2)|difficulty(0)|spd_rtng(104) | weapon_length(140)|swing_damage(20 , blunt) | thrust_damage(20 , blunt),imodbits_polearm ], ["iron_staff", "Iron Staff", [("iron_staff",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield, itc_staff|itcf_carry_sword_back, 202 , weight(2)|difficulty(0)|spd_rtng(97) | weapon_length(140)|swing_damage(25 , blunt) | thrust_damage(26 , blunt),imodbits_polearm ], ["shortened_spear", "Shortened_Spear", [("spear_g_1-9m",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_staff|itcf_carry_spear, 53 , weight(2.0)|difficulty(0)|spd_rtng(102) | weapon_length(120)|swing_damage(19 , blunt) | thrust_damage(25 , pierce),imodbits_polearm ], ["spear", "Spear", [("spear_h_2-15m",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_staff|itcf_carry_spear, 75 , weight(2.25)|difficulty(0)|spd_rtng(98) | weapon_length(135)|swing_damage(20 , blunt) | thrust_damage(26 , pierce),imodbits_polearm ], ["war_spear", "War_Spear", [("spear_i_2-3m",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_staff|itcf_carry_spear, 90 , weight(2.5)|difficulty(0)|spd_rtng(96) | weapon_length(150)|swing_damage(20 , blunt) | thrust_damage(27 , pierce),imodbits_polearm ], #TODO:["shortened_spear", "shortened_spear", [("spear_e_2-1m",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_staff|itcf_carry_spear, # 65 , weight(2.0)|difficulty(0)|spd_rtng(98) | weapon_length(110)|swing_damage(17 , blunt) | thrust_damage(23 , pierce),imodbits_polearm ], #TODO:["spear_2-4m", "spear", [("spear_e_2-25m",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_staff|itcf_carry_spear, # 67 , weight(2.0)|difficulty(0)|spd_rtng(95) | weapon_length(125)|swing_damage(17 , blunt) | thrust_damage(23 , pierce),imodbits_polearm ], ["spear_e_2-5m", "Military Scythe", [("spear_e_2-5m",0),("spear_c_2-5m",imodbits_bad)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_cutting_spear|itcf_carry_spear, 145 , weight(2.5)|difficulty(10)|spd_rtng(93) | weapon_length(155)|swing_damage(36 , cut) | thrust_damage(25 , pierce),imodbits_polearm ], ["light_lance", "Light Lance", [("spear_b_2-75m",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_cutting_spear, 89 , weight(2.5)|difficulty(0)|spd_rtng(90) | weapon_length(175)|swing_damage(16 , blunt) | thrust_damage(27 , pierce),imodbits_polearm ], ["lance", "Lance", [("spear_d_2-8m",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_cutting_spear, 110 , weight(2.5)|difficulty(0)|spd_rtng(88) | weapon_length(180)|swing_damage(16 , blunt) | thrust_damage(26 , pierce),imodbits_polearm ], ["heavy_lance", "Heavy Lance", [("spear_f_2-9m",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_cutting_spear, 130 , weight(2.75)|difficulty(10)|spd_rtng(85) | weapon_length(190)|swing_damage(16 , blunt) | thrust_damage(26 , pierce),imodbits_polearm ], ["pike", "Pike", [("spear_a_3m",0)], itp_type_polearm|itp_merchandise| itp_cant_use_on_horseback|itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_cutting_spear, 125 , weight(3.0)|difficulty(0)|spd_rtng(81) | weapon_length(245)|swing_damage(16 , blunt) | thrust_damage(26 , pierce),imodbits_polearm ], ##["spear_e_3-25m", "Spear_3-25m", [("spear_e_3-25m",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_penalty_with_shield|itp_wooden_parry, itc_cutting_spear|itcf_carry_spear, ## 150 , weight(4.5)|difficulty(0)|spd_rtng(81) | weapon_length(225)|swing_damage(19 , blunt) | thrust_damage(23 , pierce),imodbits_polearm ], ["ashwood_pike", "Ashwood Pike", [("pike",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_two_handed|itp_wooden_parry, itc_cutting_spear, 205 , weight(3.5)|difficulty(11)|spd_rtng(90) | weapon_length(170)|swing_damage(19 , blunt) | thrust_damage(29, pierce),imodbits_polearm ], ["awlpike", "Awlpike", [("pike",0)], itp_type_polearm|itp_merchandise| itp_spear|itp_primary|itp_two_handed|itp_wooden_parry, itc_cutting_spear|itcf_carry_spear, 378 , weight(3.5)|difficulty(12)|spd_rtng(92) | weapon_length(160)|swing_damage(30 , cut) | thrust_damage(31 , pierce),imodbits_polearm ], # SHIELDS ["wooden_shield", "Wooden Shield", [("shield_round_a",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_round_shield, 42 , weight(2)|hit_points(360)|body_armor(1)|spd_rtng(100)|weapon_length(50),imodbits_shield ], ##["wooden_shield", "Wooden Shield", [("shield_round_a",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_round_shield, 42 , weight(2)|hit_points(360)|body_armor(1)|spd_rtng(100)|weapon_length(50),imodbits_shield, #["round_shield", "Round Shield", [("shield_round_c",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_round_shield, 64 , weight(2)|hit_points(400)|body_armor(1)|spd_rtng(100)|weapon_length(50),imodbits_shield ], ["nordic_shield", "Nordic Shield", [("shield_round_b",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_round_shield, 95 , weight(2)|hit_points(440)|body_armor(1)|spd_rtng(100)|weapon_length(50),imodbits_shield ], #["kite_shield", "Kite Shield", [("shield_kite_a",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 118 , weight(2.5)|hit_points(480)|body_armor(1)|spd_rtng(82)|weapon_length(90),imodbits_shield ], #["kite_shield_", "Kite Shield", [("shield_kite_b",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 118 , weight(2.5)|hit_points(480)|body_armor(1)|spd_rtng(82)|weapon_length(90),imodbits_shield ], #["large_shield", "Large Shield", [("shield_kite_c",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 165 , weight(2.5)|hit_points(520)|body_armor(1)|spd_rtng(80)|weapon_length(92),imodbits_shield ], #["battle_shield", "Battle Shield", [("shield_kite_d",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 196 , weight(3)|hit_points(560)|body_armor(1)|spd_rtng(78)|weapon_length(94),imodbits_shield ], ["fur_covered_shield", "Fur Covered Shield", [("shield_kite_m",0)], itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 227 , weight(3.5)|hit_points(600)|body_armor(1)|spd_rtng(76)|weapon_length(81),imodbits_shield ], #["heraldric_shield", "Heraldric Shield", [("shield_heraldic",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 301 , weight(3.5)|hit_points(640)|body_armor(1)|spd_rtng(83)|weapon_length(65),imodbits_shield ], #["heater_shield", "Heater Shield", [("shield_heater_a",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 477 , weight(3.5)|hit_points(710)|body_armor(4)|spd_rtng(80)|weapon_length(60),imodbits_shield ], ["steel_shield", "Steel Shield", [("shield_dragon",0)], itp_merchandise|itp_type_shield, itcf_carry_round_shield, 697 , weight(4)|hit_points(700)|body_armor(17)|spd_rtng(61)|weapon_length(40),imodbits_shield ], #["nomad_shield", "Nomad Shield", [("shield_wood_b",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_round_shield, 12 , weight(2)|hit_points(260)|body_armor(6)|spd_rtng(110)|weapon_length(30),imodbits_shield ], ["plate_covered_round_shield", "Plate_Covered_Round_Shield", [("shield_round_e",0)], 0, itcf_carry_round_shield, 140 , weight(4)|hit_points(330)|body_armor(16)|spd_rtng(90)|weapon_length(40),imodbits_shield ], ["leather_covered_round_shield", "Leather_Covered_Round_Shield", [("shield_round_d",0)], itp_type_shield|itp_wooden_parry, itcf_carry_round_shield, 80 , weight(2.5)|hit_points(310)|body_armor(8)|spd_rtng(96)|weapon_length(40),imodbits_shield ], ["hide_covered_round_shield", "Hide_Covered_Round_Shield", [("shield_round_f",0)], itp_type_shield|itp_wooden_parry, itcf_carry_round_shield, 40 , weight(2)|hit_points(260)|body_armor(3)|spd_rtng(100)|weapon_length(40),imodbits_shield ], ["shield_heater_c", "Heater Shield", [("shield_heater_c",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 277 , weight(3.5)|hit_points(410)|body_armor(2)|spd_rtng(80)|weapon_length(50),imodbits_shield ], #["shield_heater_d", "Heater Shield", [("shield_heater_d",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 477 , weight(3.5)|hit_points(710)|body_armor(4)|spd_rtng(80)|weapon_length(60),imodbits_shield ], #["shield_kite_g", "Kite Shield g", [("shield_kite_g",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 118 , weight(2.5)|hit_points(480)|body_armor(1)|spd_rtng(82)|weapon_length(90),imodbits_shield ], #["shield_kite_h", "Kite Shield h", [("shield_kite_h",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 118 , weight(2.5)|hit_points(480)|body_armor(1)|spd_rtng(82)|weapon_length(90),imodbits_shield ], #["shield_kite_i", "Kite Shield i ", [("shield_kite_i",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 118 , weight(2.5)|hit_points(480)|body_armor(1)|spd_rtng(82)|weapon_length(90),imodbits_shield ], #["shield_kite_k", "Kite Shield k", [("shield_kite_k",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 118 , weight(2.5)|hit_points(480)|body_armor(1)|spd_rtng(82)|weapon_length(90),imodbits_shield ], ["norman_shield_1", "Kite Shield", [("norman_shield_1",0)], itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 118 , weight(2.5)|hit_points(480)|body_armor(1)|spd_rtng(82)|weapon_length(90),imodbits_shield ], ["norman_shield_2", "Kite Shield", [("norman_shield_2",0)], itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 118 , weight(2.5)|hit_points(480)|body_armor(1)|spd_rtng(82)|weapon_length(90),imodbits_shield ], ["norman_shield_3", "Kite Shield", [("norman_shield_3",0)], itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 118 , weight(2.5)|hit_points(480)|body_armor(1)|spd_rtng(82)|weapon_length(90),imodbits_shield ], ["norman_shield_4", "Kite Shield", [("norman_shield_4",0)], itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 118 , weight(2.5)|hit_points(480)|body_armor(1)|spd_rtng(82)|weapon_length(90),imodbits_shield ], ["norman_shield_5", "Kite Shield", [("norman_shield_5",0)], itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 118 , weight(2.5)|hit_points(480)|body_armor(1)|spd_rtng(82)|weapon_length(90),imodbits_shield ], ["norman_shield_6", "Kite Shield", [("norman_shield_6",0)], itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 118 , weight(2.5)|hit_points(480)|body_armor(1)|spd_rtng(82)|weapon_length(90),imodbits_shield ], ["norman_shield_7", "Kite Shield", [("norman_shield_7",0)], itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 118 , weight(2.5)|hit_points(480)|body_armor(1)|spd_rtng(82)|weapon_length(90),imodbits_shield ], ["norman_shield_8", "Kite Shield", [("norman_shield_8",0)], itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 118 , weight(2.5)|hit_points(480)|body_armor(1)|spd_rtng(82)|weapon_length(90),imodbits_shield ], ["tab_shield_round_a", "Old Round Shield", [("tableau_shield_round_5",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_round_shield, 26 , weight(2.5)|hit_points(350)|body_armor(0)|spd_rtng(93)|weapon_length(50),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_round_shield_5", ":agent_no", ":troop_no")])]], ["tab_shield_round_b", "Plain Round Shield", [("tableau_shield_round_3",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_round_shield, 65 , weight(3)|hit_points(460)|body_armor(2)|spd_rtng(90)|weapon_length(50),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_round_shield_3", ":agent_no", ":troop_no")])]], ["tab_shield_round_c", "Round_Shield", [("tableau_shield_round_2",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_round_shield, 105 , weight(3.5)|hit_points(540)|body_armor(4)|spd_rtng(87)|weapon_length(50),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner","tableau_round_shield_2", ":agent_no", ":troop_no")])]], ["tab_shield_round_d", "Heavy Round_Shield", [("tableau_shield_round_1",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_round_shield, 210 , weight(4)|hit_points(600)|body_armor(6)|spd_rtng(84)|weapon_length(50),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_round_shield_1", ":agent_no", ":troop_no")])]], ["tab_shield_round_e", "Huscarl's Round_Shield", [("tableau_shield_round_4",0)], itp_merchandise|itp_type_shield, itcf_carry_round_shield, 430 , weight(4.5)|hit_points(690)|body_armor(8)|spd_rtng(81)|weapon_length(50),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_round_shield_4", ":agent_no", ":troop_no")])]], ["tab_shield_kite_a", "Old Kite Shield", [("tableau_shield_kite_1" ,0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 33 , weight(2)|hit_points(285)|body_armor(0)|spd_rtng(96)|weapon_length(60),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_kite_shield_1", ":agent_no", ":troop_no")])]], ["tab_shield_kite_b", "Plain Kite Shield", [("tableau_shield_kite_3" ,0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 70 , weight(2.5)|hit_points(365)|body_armor(2)|spd_rtng(93)|weapon_length(60),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_kite_shield_3", ":agent_no", ":troop_no")])]], ["tab_shield_kite_c", "Kite Shield", [("tableau_shield_kite_2" ,0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 156 , weight(3)|hit_points(435)|body_armor(5)|spd_rtng(90)|weapon_length(60),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_kite_shield_2", ":agent_no", ":troop_no")])]], ["tab_shield_kite_d", "Heavy Kite Shield", [("tableau_shield_kite_2" ,0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 320 , weight(3.5)|hit_points(515)|body_armor(8)|spd_rtng(87)|weapon_length(60),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_kite_shield_2", ":agent_no", ":troop_no")])]], ["tab_shield_kite_cav_a", "Horseman's Kite Shield", [("tableau_shield_kite_4" ,0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 205 , weight(2)|hit_points(310)|body_armor(10)|spd_rtng(103)|weapon_length(40),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_kite_shield_4", ":agent_no", ":troop_no")])]], ["tab_shield_kite_cav_b", "Knightly Kite Shield", [("tableau_shield_kite_4" ,0)], itp_merchandise|itp_type_shield, itcf_carry_kite_shield, 360 , weight(2.5)|hit_points(370)|body_armor(16)|spd_rtng(100)|weapon_length(40),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_kite_shield_4", ":agent_no", ":troop_no")])]], ["tab_shield_heater_a", "Old Heater Shield", [("tableau_shield_heater_1" ,0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 36 , weight(2)|hit_points(280)|body_armor(1)|spd_rtng(96)|weapon_length(60),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_heater_shield_1", ":agent_no", ":troop_no")])]], ["tab_shield_heater_b", "Plain Heater Shield", [("tableau_shield_heater_1" ,0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 74 , weight(2.5)|hit_points(360)|body_armor(3)|spd_rtng(93)|weapon_length(60),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_heater_shield_1", ":agent_no", ":troop_no")])]], ["tab_shield_heater_c", "Heater Shield", [("tableau_shield_heater_1" ,0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 160 , weight(3)|hit_points(430)|body_armor(6)|spd_rtng(90)|weapon_length(60),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_heater_shield_1", ":agent_no", ":troop_no")])]], ["tab_shield_heater_d", "Heavy Heater Shield", [("tableau_shield_heater_1" ,0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 332 , weight(3.5)|hit_points(510)|body_armor(9)|spd_rtng(87)|weapon_length(60),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_heater_shield_1", ":agent_no", ":troop_no")])]], ["tab_shield_heater_cav_a", "Horseman's Heater Shield", [("tableau_shield_heater_2" ,0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 229 , weight(2)|hit_points(300)|body_armor(12)|spd_rtng(103)|weapon_length(40),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_heater_shield_2", ":agent_no", ":troop_no")])]], ["tab_shield_heater_cav_b", "Knightly Heater Shield", [("tableau_shield_heater_2" ,0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_kite_shield, 390 , weight(2.5)|hit_points(360)|body_armor(18)|spd_rtng(100)|weapon_length(40),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_heater_shield_2", ":agent_no", ":troop_no")])]], ["tab_shield_pavise_a", "Old Board Shield", [("tableau_shield_pavise_2" ,0)], itp_merchandise|itp_type_shield|itp_cant_use_on_horseback|itp_wooden_parry, itcf_carry_board_shield, 60 , weight(3.5)|hit_points(510)|body_armor(0)|spd_rtng(89)|weapon_length(84),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_pavise_shield_2", ":agent_no", ":troop_no")])]], ["tab_shield_pavise_b", "Plain Board Shield", [("tableau_shield_pavise_2" ,0)], itp_merchandise|itp_type_shield|itp_cant_use_on_horseback|itp_wooden_parry, itcf_carry_board_shield, 114 , weight(4)|hit_points(640)|body_armor(1)|spd_rtng(85)|weapon_length(84),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_pavise_shield_2", ":agent_no", ":troop_no")])]], ["tab_shield_pavise_c", "Board Shield", [("tableau_shield_pavise_1" ,0)], itp_merchandise|itp_type_shield|itp_cant_use_on_horseback|itp_wooden_parry, itcf_carry_board_shield, 210 , weight(4.5)|hit_points(760)|body_armor(2)|spd_rtng(81)|weapon_length(84),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_pavise_shield_1", ":agent_no", ":troop_no")])]], ["tab_shield_pavise_d", "Heavy Board Shield", [("tableau_shield_pavise_1" ,0)], itp_merchandise|itp_type_shield|itp_cant_use_on_horseback|itp_wooden_parry, itcf_carry_board_shield, 370 , weight(5)|hit_points(980)|body_armor(3)|spd_rtng(78)|weapon_length(84),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_pavise_shield_1", ":agent_no", ":troop_no")])]], ["tab_shield_small_round_a", "Plain Cavalry Shield", [("tableau_shield_small_round_3",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_round_shield, 96 , weight(2)|hit_points(310)|body_armor(3)|spd_rtng(105)|weapon_length(40),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_small_round_shield_3", ":agent_no", ":troop_no")])]], ["tab_shield_small_round_b", "Round Cavalry Shield", [("tableau_shield_small_round_1",0)], itp_merchandise|itp_type_shield|itp_wooden_parry, itcf_carry_round_shield, 195 , weight(2.5)|hit_points(370)|body_armor(9)|spd_rtng(103)|weapon_length(40),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_small_round_shield_1", ":agent_no", ":troop_no")])]], ["tab_shield_small_round_c", "Elite Cavalry Shield", [("tableau_shield_small_round_2",0)], itp_merchandise|itp_type_shield, itcf_carry_round_shield, 370 , weight(3)|hit_points(420)|body_armor(14)|spd_rtng(100)|weapon_length(40),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_small_round_shield_2", ":agent_no", ":troop_no")])]], #RANGED ["jarid", "Jarid", [("jarid_new",0),("jarid_quiver", ixmesh_carry)], itp_type_thrown |itp_merchandise|itp_primary|itp_bonus_against_shield ,itcf_throw_javelin|itcf_carry_quiver_back|itcf_show_holster_when_drawn, 209 , weight(4)|difficulty(2)|spd_rtng(89) | shoot_speed(27) | thrust_damage(33 , pierce)|max_ammo(7)|weapon_length(65),imodbits_thrown ], ["javelin", "Javelin", [("javelin",0),("javelins_quiver", ixmesh_carry)], itp_type_thrown |itp_merchandise|itp_primary|itp_bonus_against_shield ,itcf_throw_javelin|itcf_carry_quiver_back|itcf_show_holster_when_drawn, 75 , weight(5)|difficulty(1)|spd_rtng(91) | shoot_speed(28) | thrust_damage(28 , pierce)|max_ammo(7)|weapon_length(75),imodbits_thrown ], ["stones", "Stones", [("throwing_stone",0)], itp_type_thrown |itp_merchandise|itp_primary ,itcf_throw_stone, 1 , weight(4)|difficulty(0)|spd_rtng(97) | shoot_speed(30) | thrust_damage(11 , blunt)|max_ammo(18)|weapon_length(8),imodbit_large_bag ], ["throwing_knives", "Throwing Knives", [("throwing_knife",0)], itp_type_thrown |itp_merchandise|itp_primary ,itcf_throw_knife, 76 , weight(3.5)|difficulty(0)|spd_rtng(121) | shoot_speed(25) | thrust_damage(19 , cut)|max_ammo(15)|weapon_length(0),imodbits_thrown ], ["throwing_daggers", "Throwing Daggers", [("throwing_dagger",0)], itp_type_thrown |itp_merchandise|itp_primary ,itcf_throw_knife, 193 , weight(3.5)|difficulty(0)|spd_rtng(110) | shoot_speed(24) | thrust_damage(25 , cut)|max_ammo(14)|weapon_length(0),imodbits_thrown ], ["throwing_axes", "Throwing Axes", [("francisca",0)], itp_type_thrown |itp_merchandise|itp_primary|itp_bonus_against_shield,itcf_throw_axe,241, weight(5)|difficulty(1)|spd_rtng(99) | shoot_speed(20) | thrust_damage(38,cut)|max_ammo(7)|weapon_length(53),imodbits_thrown ], ["hunting_bow", "Hunting Bow", [("hunting_bow",0),("hunting_bow_carry",ixmesh_carry)], itp_type_bow |itp_merchandise|itp_primary|itp_two_handed,itcf_shoot_bow|itcf_carry_bow_back, 17 , weight(1)|difficulty(0)|spd_rtng(100) | shoot_speed(48) | thrust_damage(15 , pierce),imodbits_bow ], ["short_bow", "Short Bow", [("short_bow",0),("short_bow_carry",ixmesh_carry)], itp_type_bow |itp_merchandise|itp_primary|itp_two_handed ,itcf_shoot_bow|itcf_carry_bow_back, 58 , weight(1)|difficulty(1)|spd_rtng(98) | shoot_speed(52) | thrust_damage(18 , pierce ),imodbits_bow ], ["nomad_bow", "Nomad Bow", [("nomad_bow",0),("nomad_bow_case", ixmesh_carry)], itp_type_bow |itp_merchandise|itp_primary|itp_two_handed ,itcf_shoot_bow|itcf_carry_bowcase_left|itcf_show_holster_when_drawn, 164 , weight(1.25)|difficulty(2)|spd_rtng(96) | shoot_speed(53) | thrust_damage(20 , pierce),imodbits_bow ], ["long_bow", "Long Bow", [("long_bow",0),("long_bow_carry",ixmesh_carry)], itp_type_bow |itp_merchandise|itp_primary|itp_two_handed ,itcf_shoot_bow|itcf_carry_bow_back, 145 , weight(1.75)|difficulty(3)|spd_rtng(82) | shoot_speed(54) | thrust_damage(22 , pierce),imodbits_bow ], ["khergit_bow", "Khergit Bow", [("khergit_bow",0),("khergit_bow_case", ixmesh_carry)], itp_type_bow |itp_merchandise|itp_primary|itp_two_handed,itcf_shoot_bow|itcf_carry_bowcase_left|itcf_show_holster_when_drawn, 269 , weight(1.25)|difficulty(3)|spd_rtng(95) | shoot_speed(56) | thrust_damage(21 ,pierce),imodbits_bow ], ["strong_bow", "Strong Bow", [("strong_bow",0),("strong_bow_case", ixmesh_carry)], itp_type_bow |itp_merchandise|itp_primary|itp_two_handed ,itcf_shoot_bow|itcf_carry_bowcase_left|itcf_show_holster_when_drawn, 437 , weight(1.25)|difficulty(3)|spd_rtng(94) | shoot_speed(57) | thrust_damage(23 ,pierce),imodbit_cracked | imodbit_bent | imodbit_masterwork ], ["war_bow", "War Bow", [("war_bow",0),("war_bow_carry",ixmesh_carry)],itp_type_bow|itp_merchandise|itp_primary|itp_two_handed ,itcf_shoot_bow|itcf_carry_bow_back, 728 , weight(1.5)|difficulty(4)|spd_rtng(93) | shoot_speed(58) | thrust_damage(25 ,pierce),imodbits_bow ], ["hunting_crossbow", "Hunting Crossbow", [("crossbow",0)], itp_type_crossbow |itp_merchandise|itp_primary|itp_two_handed ,itcf_shoot_crossbow|itcf_carry_crossbow_back, 22 , weight(2.25)|difficulty(0)|spd_rtng(47) | shoot_speed(50) | thrust_damage(28 , pierce)|max_ammo(1),imodbits_crossbow ], ["light_crossbow", "Light Crossbow", [("light_crossbow",0)], itp_type_crossbow |itp_merchandise|itp_primary|itp_two_handed ,itcf_shoot_crossbow|itcf_carry_crossbow_back, 67 , weight(2.5)|difficulty(8)|spd_rtng(45) | shoot_speed(59) | thrust_damage(34 , pierce)|max_ammo(1),imodbits_crossbow ], ["crossbow", "Crossbow", [("crossbow",0)], itp_type_crossbow |itp_merchandise|itp_primary|itp_two_handed|itp_cant_use_on_horseback ,itcf_shoot_crossbow|itcf_carry_crossbow_back, 182 , weight(3)|difficulty(8)|spd_rtng(43) | shoot_speed(68) | thrust_damage(38,pierce)|max_ammo(1),imodbits_crossbow ], ["heavy_crossbow", "Heavy Crossbow", [("heavy_crossbow",0)], itp_type_crossbow |itp_merchandise|itp_primary|itp_two_handed|itp_cant_use_on_horseback ,itcf_shoot_crossbow|itcf_carry_crossbow_back, 349 , weight(3.5)|difficulty(9)|spd_rtng(41) | shoot_speed(72) | thrust_damage(46 ,pierce)|max_ammo(1),imodbits_crossbow ], ["sniper_crossbow", "Siege Crossbow", [("heavy_crossbow",0)], itp_type_crossbow |itp_merchandise|itp_primary|itp_two_handed|itp_cant_use_on_horseback ,itcf_shoot_crossbow|itcf_carry_crossbow_back, 683 , weight(3.75)|difficulty(10)|spd_rtng(37) | shoot_speed(74) | thrust_damage(49 ,pierce)|max_ammo(1),imodbits_crossbow ], ["flintlock_pistol", "Flintlock Pistol", [("flintlock_pistol",0)], itp_type_pistol |itp_merchandise|itp_primary ,itcf_shoot_pistol|itcf_reload_pistol, 230 , weight(1.5)|difficulty(0)|spd_rtng(38) | shoot_speed(160) | thrust_damage(41 ,pierce)|max_ammo(1)|accuracy(65),imodbits_none, [(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(position_move_x, pos1,27),(position_move_y, pos1,36),(particle_system_burst, "psys_pistol_smoke", pos1, 15)])]], ["torch", "Torch", [("club",0)], itp_type_one_handed_wpn|itp_primary, itc_scimitar, 11 , weight(2.5)|difficulty(0)|spd_rtng(95) | weapon_length(95)|swing_damage(11 , blunt) | thrust_damage(0 , pierce),imodbits_none, [(ti_on_init_item, [(set_position_delta,0,60,0),(particle_system_add_new, "psys_torch_fire"),(particle_system_add_new, "psys_torch_smoke"),(set_current_color,150, 130, 70),(add_point_light, 10, 30), ])]], ##["short_sword", "Short Sword", ## [("sword_norman",0),("sword_norman_scabbard", ixmesh_carry),("sword_norman_rusty",imodbit_rusty),("sword_norman_rusty_scabbard", ixmesh_carry|imodbit_rusty)], ## itp_type_one_handed_wpn|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 183 , weight(1.25)|difficulty(0)|spd_rtng(103) | weapon_length(75)|swing_damage(25 , cut) | thrust_damage(19 , pierce),imodbits_sword ], ["strange_armor", "Strange Armor", [("samurai_armor",0)], itp_type_body_armor |itp_covers_legs ,0, 1259 , weight(18)|abundance(100)|head_armor(0)|body_armor(38)|leg_armor(19)|difficulty(7) ,imodbits_armor ], ["strange_boots", "Strange Boots", [("samurai_boots",0)], itp_type_foot_armor | itp_attach_armature,0, 465 , weight(1)|abundance(100)|head_armor(0)|body_armor(0)|leg_armor(21)|difficulty(0) ,imodbits_cloth ], ["strange_helmet", "Strange Helmet", [("samurai_helmet",0)], itp_type_head_armor ,0, 824 , weight(2)|abundance(100)|head_armor(44)|body_armor(0)|leg_armor(0)|difficulty(7) ,imodbits_plate ], ["strange_sword", "Strange Sword", [("katana",0),("katana_scabbard",ixmesh_carry)], itp_type_two_handed_wpn| itp_primary, itc_bastardsword|itcf_carry_katana|itcf_show_holster_when_drawn, 679 , weight(2.0)|difficulty(9)|spd_rtng(108) | weapon_length(95)|swing_damage(32 , cut) | thrust_damage(18 , pierce),imodbits_sword ], ["strange_great_sword", "Strange Great Sword", [("no_dachi",0),("no_dachi_scabbard",ixmesh_carry)], itp_type_two_handed_wpn|itp_two_handed|itp_primary, itc_nodachi|itcf_carry_sword_back|itcf_show_holster_when_drawn, 920 , weight(3.5)|difficulty(11)|spd_rtng(92) | weapon_length(125)|swing_damage(38 , cut) | thrust_damage(0 , pierce),imodbits_axe ], ["strange_short_sword", "Strange Short Sword", [("wakizashi",0),("wakizashi_scabbard",ixmesh_carry)], itp_type_one_handed_wpn|itp_primary, itc_longsword|itcf_carry_wakizashi|itcf_show_holster_when_drawn, 321 , weight(1.25)|difficulty(0)|spd_rtng(108) | weapon_length(65)|swing_damage(25 , cut) | thrust_damage(19 , pierce),imodbits_sword ], ["court_dress", "Court Dress", [("court_dress",0)], itp_type_body_armor|itp_covers_legs|itp_civilian ,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(14)|leg_armor(4)|difficulty(0) ,imodbits_cloth ], ["rich_outfit", "Rich Outfit", [("merchant_outf",0)], itp_type_body_armor|itp_covers_legs|itp_civilian ,0, 348 , weight(4)|abundance(100)|head_armor(0)|body_armor(16)|leg_armor(4)|difficulty(0) ,imodbits_cloth ], ["khergit_guard_armor", "Khergit Guard Armor", [("lamellar_armor_a",0)], itp_type_body_armor|itp_covers_legs ,0, 348 , weight(14)|abundance(100)|head_armor(0)|body_armor(34)|leg_armor(8)|difficulty(0) ,imodbits_armor ], #["leather_steppe_cap_c", "Leather Steppe Cap", [("leather_steppe_cap_c",0)], itp_type_head_armor ,0, 51 , weight(2)|abundance(100)|head_armor(18)|body_armor(0)|leg_armor(0) ,imodbits_cloth ], ["felt_steppe_cap", "Felt Steppe Cap", [("felt_steppe_cap",0)], itp_type_head_armor ,0, 237 , weight(2)|abundance(100)|head_armor(16)|body_armor(0)|leg_armor(0) ,imodbits_cloth ], ["khergit_war_helmet", "Khergit War Helmet", [("khergit_war_helmet",0)], itp_type_head_armor ,0, 322 , weight(2)|abundance(100)|head_armor(31)|body_armor(0)|leg_armor(0) ,imodbits_cloth ], ["khergit_helmet", "Khergit Helmet", [("khergit_guard_helmet",0)], itp_type_head_armor ,0, 361 , weight(2)|abundance(100)|head_armor(33)|body_armor(0)|leg_armor(0) ,imodbits_cloth ], #["khergit_sword", "Khergit Sword", [("khergit_sword",0),("khergit_sword_scabbard", ixmesh_carry)], itp_type_one_handed_wpn|itp_primary, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn, 183 , weight(1.25)|difficulty(0)|spd_rtng(100) | weapon_length(97)|swing_damage(23 , cut) | thrust_damage(14 , pierce),imodbits_sword ], ["khergit_guard_boots", "Khergit Guard Boots", [("lamellar_boots_a",0)], itp_type_foot_armor | itp_attach_armature,0, 254 , weight(1)|abundance(100)|head_armor(0)|body_armor(0)|leg_armor(20)|difficulty(0) ,imodbits_cloth ], ["khergit_guard_helmet", "Khergit Guard Helmet", [("lamellar_helmet_a",0)], itp_type_head_armor ,0, 433 , weight(2)|abundance(100)|head_armor(36)|body_armor(0)|leg_armor(0) ,imodbits_cloth ], ["khergit_cavalry_helmet", "Khergit Cavalry Helmet", [("lamellar_helmet_b",0)], itp_type_head_armor ,0, 433 , weight(2)|abundance(100)|head_armor(36)|body_armor(0)|leg_armor(0) ,imodbits_cloth ], ["black_hood", "Black Hood", [("hood_black",0)], itp_type_head_armor|itp_merchandise ,0, 193 , weight(2)|abundance(100)|head_armor(18)|body_armor(0)|leg_armor(0) ,imodbits_cloth ], ["light_leather", "Light Leather", [("light_leather",0)], itp_type_body_armor|itp_covers_legs|itp_merchandise ,0, 352 , weight(5)|abundance(100)|head_armor(0)|body_armor(26)|leg_armor(7)|difficulty(0) ,imodbits_armor ], ["light_leather_boots", "Light Leather Boots", [("light_leather_boots",0)], itp_type_foot_armor |itp_merchandise| itp_attach_armature,0, 91 , weight(1)|abundance(100)|head_armor(0)|body_armor(0)|leg_armor(15)|difficulty(0) ,imodbits_cloth ], ["mail_and_plate", "Mail and Plate", [("mail_and_plate",0)], itp_type_body_armor|itp_covers_legs ,0, 593 , weight(16)|abundance(100)|head_armor(0)|body_armor(34)|leg_armor(12)|difficulty(0) ,imodbits_armor ], ["light_mail_and_plate", "Light Mail and Plate", [("light_mail_and_plate",0)], itp_type_body_armor|itp_covers_legs ,0, 532 , weight(10)|abundance(100)|head_armor(0)|body_armor(32)|leg_armor(12)|difficulty(0) ,imodbits_armor ], ["byzantion_helmet_a", "Byzantion Helmet", [("byzantion_helmet_a",0)], itp_type_head_armor ,0, 278 , weight(2)|abundance(100)|head_armor(20)|body_armor(0)|leg_armor(0) ,imodbits_cloth ], ["magyar_helmet_a", "Magyar Helmet", [("magyar_helmet_a",0)], itp_type_head_armor ,0, 278 , weight(2)|abundance(100)|head_armor(20)|body_armor(0)|leg_armor(0) ,imodbits_cloth ], ["rus_helmet_a", "Rus Helmet", [("rus_helmet_a",0)], itp_type_head_armor ,0, 278 , weight(2)|abundance(100)|head_armor(20)|body_armor(0)|leg_armor(0) ,imodbits_cloth ], ["sipahi_helmet_a", "Sipahi Helmet", [("sipahi_helmet_a",0)], itp_type_head_armor ,0, 278 , weight(2)|abundance(100)|head_armor(20)|body_armor(0)|leg_armor(0) ,imodbits_cloth ], ["shahi", "Shahi", [("shahi",0)], itp_type_head_armor ,0, 278 , weight(2)|abundance(100)|head_armor(20)|body_armor(0)|leg_armor(0) ,imodbits_cloth ], ["rabati", "Rabati", [("rabati",0)], itp_type_head_armor ,0, 278 , weight(2)|abundance(100)|head_armor(20)|body_armor(0)|leg_armor(0) ,imodbits_cloth ], ]
Python
import string import types from module_info import * from module_mission_templates import * from process_common import * from process_operations import * mission_template_name_pos = 0 mission_template_flags_pos = 1 mission_template_types_pos = 2 mission_template_desc_pos = 3 mission_template_groups_pos =4 mission_template_triggers_pos = 5 def save_triggers(file,template_name,triggers,variable_list,variable_uses,tag_uses,quick_strings): file.write("%d\n"%len(triggers)) for i in xrange(len(triggers)): trigger = triggers[i] file.write("%f %f %f "%(trigger[trigger_check_pos],trigger[trigger_delay_pos],trigger[trigger_rearm_pos])) save_statement_block(file, 0, 1, trigger[trigger_conditions_pos] , variable_list,variable_uses,tag_uses,quick_strings) save_statement_block(file, 0, 1, trigger[trigger_consequences_pos], variable_list,variable_uses,tag_uses,quick_strings) file.write("\n") file.write("\n") def save_mission_template_group(file,entry): if (len(entry[5]) > 8): print "ERROR: Too many item_overrides!" error() file.write("%d %d %d %d %d %d "%(entry[0],entry[1],entry[2],entry[3],entry[4], len(entry[5]))) for item_override in entry[5]: add_tag_use(tag_uses,tag_item,item_override) file.write("%d "%(item_override)) file.write("\n") def save_mission_templates(variables,variable_uses,tag_uses,quick_strings): file = open(export_dir + "mission_templates.txt","w") file.write("missionsfile version 1\n") file.write(" %d\n"%(len(mission_templates))) for mission_template in mission_templates: file.write("mst_%s %s %d "%(convert_to_identifier(mission_template[mission_template_name_pos]),convert_to_identifier(mission_template[mission_template_name_pos]),mission_template[mission_template_flags_pos])) file.write(" %d\n"%(mission_template[mission_template_types_pos])) file.write("%s \n"%(string.replace(mission_template[mission_template_desc_pos]," ","_"))) file.write("\n%d "%len(mission_template[mission_template_groups_pos])) for group in mission_template[mission_template_groups_pos]: save_mission_template_group(file,group) save_triggers(file,convert_to_identifier(mission_template[mission_template_name_pos]), mission_template[mission_template_triggers_pos],variables,variable_uses,tag_uses,quick_strings) file.write("\n") file.close() def save_python_header(): file = open("./ID_mission_templates.py","w") for i_mission_template in xrange(len(mission_templates)): file.write("mst_%s = %d\n"%(mission_templates[i_mission_template][0],i_mission_template)) file.close() print "Exporting mission_template data..." save_python_header() variable_uses = [] variables = load_variables(export_dir, variable_uses) tag_uses = load_tag_uses(export_dir) quick_strings = load_quick_strings(export_dir) save_mission_templates(variables,variable_uses,tag_uses,quick_strings) save_variables(export_dir,variables,variable_uses) save_tag_uses(export_dir,tag_uses) save_quick_strings(export_dir,quick_strings) #print "Finished." """ ( "defense_1",mtf_battle_mode,stand_fast, "You wait, your weapons ready, your senses alert. Some of your companions start to sing an old song, trying to forget their fear. You smile and let your thoughts wander away for a second. Then the lookout's cry shatters the melancholy: 'Enemies! They are coming'", [ (2,mtef_leader_only,0,group(1),1), (2,mtef_no_leader,0,group(1),3), (0,mtef_no_leader,0,group(1),0), (4,mtef_enemy_party|mtef_reverse_order,0,group(2)|aif_start_alarmed,5)], [], [ (ti_val(0), ti_val(0), ti_once, [[mission_cookie_eq,0,0],[store_mission_timer_a,1],[ge,reg(1),10],[store_enemy_count,2],[lt,reg(2),3]], [[add_reinforcements_to_entry,3,3],[reset_mission_timer_a],[increment_mission_cookie,0]]), (ti_val(0), ti_val(0), ti_once, [[mission_cookie_eq,0,1],[store_mission_timer_a,1],[ge,reg(1),10],[store_enemy_count,2],[lt,reg(2),3]], [[add_reinforcements_to_entry,3,3],[reset_mission_timer_a],[increment_mission_cookie,0]]), (ti_val(0), ti_val(0), ti_once, [[mission_cookie_eq,5,0],[store_mission_timer_b,1],[ge,reg(1),10],[store_friend_count,2],[lt,reg(2),3]], [[add_reinforcements_to_entry,2,2],[reset_mission_timer_b],[increment_mission_cookie,5]]), (ti_val(0), ti_val(0), ti_once, [[mission_cookie_eq,5,1],[store_mission_timer_b,1],[ge,reg(1),10],[store_friend_count,2],[lt,reg(2),3]], [[add_reinforcements_to_entry,2,2],[reset_mission_timer_b],[increment_mission_cookie,5]]), (ti_val(0), ti_val(0), ti_once, [[all_enemies_defeated,2]], [[set_mission_result,1] ,[finish_mission,1]]), (ti_val(0), ti_val(0), ti_once, [[main_hero_fallen]], [[set_mission_result,-1],[finish_mission,1]]), ], ), ( "chase_1",mtf_battle_mode,chase, "You close up on the enemy thinking that this will be an easy victory. But as you come within shooting range, enemy fighters stop fleeing and turn to meet you. Perhaps they are experienced enough to know that they can't outrun you. Or perhaps their warrior pride triumphed over their fear. Whatever it is, these men now seem to be willing to put up a fight and your job will not be easy", [(0,mtef_leader_only,0,group(1),1),(0,mtef_regulars_only,0,group(1),1),(1,mtef_regulars_only|mtef_enemy_party,0,aisb_hit_run,1),(2,mtef_regulars_only|mtef_enemy_party,0,0,2),(3,mtef_regulars_only|mtef_enemy_party,0,0,1),(4,mtef_regulars_only|mtef_enemy_party,0,group(2),2)], [], [ (ti_val(0), ti_val(0), ti_once, [[all_enemies_defeated,2]], [[set_mission_result,1] ,[finish_mission,1]]), (ti_val(0), ti_val(0), ti_once, [[main_hero_fallen]], [[set_mission_result,-1],[finish_mission,1]]), ], ), ( "slip_siege_fight_1",mtf_battle_mode,retreat_fight, "You lead your retreating party through a back road which, oddly enough, seems to be completely unguarded.\ You decide to proceed with extreme caution. Very soon, you spot a movement in the bushes ahead.\ Not taking any chances, you send an arrow into the bushes. The arrow sinks behind leaves and immediately produces\ a sharp cry followed by some heavy cursing. Within seconds, a score of armored warriors rush out of hiding places.", [(2,mtef_leader_only,0,group(1),1),(2,mtef_no_leader,0,group(1)|aif_start_alarmed,3),(3,mtef_enemy_party|mtef_reverse_order,0,aif_start_alarmed,6)], # [(0,mtef_leader_only,0,group(1),1),(0,mtef_regulars_only,0,group(1),2|mtnf_const|mtnf_rand),(3,mtef_regulars_only|mtef_enemy_party,0,aif_start_alarmed,2|mtnf_const),(4,mtef_regulars_only|mtef_enemy_party,0,aif_start_alarmed,2|mtnf_const|mtnf_rand)], [], [ (ti_val(0), ti_val(0), ti_once, [[all_enemies_defeated,3]], [[set_mission_result,1] ,[finish_mission,1]]), (ti_val(0), ti_val(0), ti_once, [[main_hero_fallen]], [[set_mission_result,-1],[finish_mission,1]]), ], ), """
Python
from module_info import * import os print "Initializing..." try: os.remove(export_dir + 'tag_uses.txt') except: a = [] try: os.remove(export_dir + 'quick_strings.txt') except: a = []
Python
rt_water = 0 rt_mountain = 1 rt_steppe = 2 rt_plain = 3 rt_snow = 4 rt_desert = 5 rt_river = 8 rt_mountain_forest = 9 rt_steppe_forest = 10 rt_forest = 11 rt_snow_forest = 12 rt_desert_forest = 13
Python
import string import types from module_info import * from module_tableau_materials import * from process_common import * from process_operations import * def save_tableau_materials(variable_list,variable_uses,tag_uses,quick_strings): ofile = open(export_dir + "tableau_materials.txt","w") ofile.write("%d\n"%(len(tableaus))) for tableau in tableaus: ofile.write("tab_%s %d %s %d %d %d %d %d %d"%(tableau[0], tableau[1], tableau[2], tableau[3], tableau[4], tableau[5], tableau[6], tableau[7], tableau[8])) save_statement_block(ofile, 0, 1, tableau[9], variable_list, variable_uses, tag_uses, quick_strings) ofile.write("\n") ofile.close() def save_python_header(): ofile = open("./ID_tableau_materials.py","w") for i_tableau in xrange(len(tableaus)): ofile.write("tableau_%s = %d\n"%(tableaus[i_tableau][0],i_tableau)) ofile.close() print "Exporting tableau materials data..." save_python_header() variable_uses = [] variables = load_variables(export_dir, variable_uses) tag_uses = load_tag_uses(export_dir) quick_strings = load_quick_strings(export_dir) save_tableau_materials(variables,variable_uses,tag_uses,quick_strings) save_variables(export_dir,variables,variable_uses) save_tag_uses(export_dir, tag_uses) save_quick_strings(export_dir,quick_strings)
Python
tableau_game_character_sheet = 0 tableau_game_inventory_window = 1 tableau_game_party_window = 2 tableau_round_shield_1 = 3 tableau_round_shield_2 = 4 tableau_round_shield_3 = 5 tableau_round_shield_4 = 6 tableau_round_shield_5 = 7 tableau_small_round_shield_1 = 8 tableau_small_round_shield_2 = 9 tableau_small_round_shield_3 = 10 tableau_kite_shield_1 = 11 tableau_kite_shield_2 = 12 tableau_kite_shield_3 = 13 tableau_kite_shield_4 = 14 tableau_heater_shield_1 = 15 tableau_heater_shield_2 = 16 tableau_pavise_shield_1 = 17 tableau_pavise_shield_2 = 18 tableau_heraldic_armor_a = 19 tableau_heraldic_armor_b = 20 tableau_heraldic_armor_c = 21 tableau_heraldic_armor_d = 22 tableau_troop_note_alpha_mask = 23 tableau_troop_note_color = 24 tableau_troop_character_alpha_mask = 25 tableau_troop_character_color = 26 tableau_troop_inventory_alpha_mask = 27 tableau_troop_inventory_color = 28 tableau_troop_party_alpha_mask = 29 tableau_troop_party_color = 30 tableau_troop_note_mesh = 31 tableau_center_note_mesh = 32 tableau_faction_note_mesh_for_menu = 33 tableau_faction_note_mesh = 34 tableau_faction_note_mesh_banner = 35 tableau_2_factions_mesh = 36 tableau_color_picker = 37 tableau_custom_banner_square_no_mesh = 38 tableau_custom_banner_default = 39 tableau_custom_banner_tall = 40 tableau_custom_banner_square = 41 tableau_custom_banner_short = 42 tableau_background_selection = 43 tableau_positioning_selection = 44 tableau_retirement_troop = 45 tableau_retired_troop_alpha_mask = 46 tableau_retired_troop_color = 47 tableau_retired_troop = 48
Python
variables = [ "$g_move_heroes", ]
Python
import string from process_common import * from module_info import * from module_skins import * import string # WARNING: The following should be the same as the number in face_generator.h num_voice_types = 2 ##################### def replace_spaces(s0): return string.replace(s0," ","_") def write_face_tex(ofile,tex_set): ofile.write(" %d "%len(tex_set)) for tex in tex_set: color = tex[1] hair_mats = tex[2] hair_colors = [] if len(tex) > 3: hair_colors = tex[3] ofile.write(" %s %d %d %d "%(tex[0],color, len(hair_mats), len(hair_colors))) for hair_mat in hair_mats: ofile.write(" %s "%(replace_spaces(hair_mat))) for hair_color in hair_colors: ofile.write(" %d "%(hair_color)) ofile.write("\n") def write_textures(ofile,tex_set): ofile.write(" %d "%len(tex_set)) for tex in tex_set: ofile.write(" %s "%tex) ofile.write("\n") def write_voices(ofile, voices): ofile.write(" %d "%(len(voices))) for voice_rec in voices: ofile.write(" %d %s "%(voice_rec[0],voice_rec[1])) ofile.write("\n") def export_skins(skins): ofile = open(export_dir + "skins.txt","w") ofile.write("skins_file version 1\n") ofile.write("%d\n"%len(skins)) if len(skins) > 16: skins = skins[0:15] for skin in skins: skin_name = skin[0] skin_flags = skin[1] body_name = skin[2] calf_name = skin[3] hand_name = skin[4] head_mesh = skin[5] face_keys = skin[6] hair_meshes = skin[7] beard_meshes = skin[8] hair_textures = skin[9] beard_textures = skin[10] face_textures = skin[11] voices = skin[12] skeleton_name = skin[13] scale = skin[14] blood_particles_1 = 0 blood_particles_2 = 0 constraints = [] if len(skin) > 15: blood_particles_1 = skin[15] if len(skin) > 16: blood_particles_2 = skin[16] if len(skin) > 17: constraints = skin[17] ofile.write("%s %d\n %s %s %s\n"%(skin_name, skin_flags, body_name, calf_name, hand_name)) ofile.write(" %s %d "%(head_mesh,len(face_keys))) for face_key in face_keys: ofile.write("skinkey_%s %d %d %f %f %s "%(convert_to_identifier(face_key[4]), face_key[0],face_key[1],face_key[2],face_key[3],replace_spaces(face_key[4]))) ofile.write("\n%d\n"%len(hair_meshes)) for mesh_name in hair_meshes: ofile.write(" %s "%mesh_name) ofile.write("\n %d\n"%len(beard_meshes)) for bmn in beard_meshes: ofile.write(" %s\n"%bmn) ofile.write("\n") write_textures(ofile,hair_textures) write_textures(ofile,beard_textures) write_face_tex(ofile,face_textures) write_voices(ofile, voices) ofile.write(" %s %f "%(skeleton_name, scale)) ofile.write("\n%d %d\n"%(blood_particles_1, blood_particles_2)) ofile.write("%d\n"%(len(constraints))) for constraint in constraints: ofile.write("\n%f %d %d "%(constraint[0], constraint[1], (len(constraint) - 2))) for i_pair in xrange(len(constraint)): if i_pair > 1: ofile.write(" %f %d"%(constraint[i_pair][0], constraint[i_pair][1])) ofile.write("\n") ofile.close() print "Exporting skins..." export_skins(skins)
Python
import string from module_info import * from module_scripts import * from process_common import * from process_operations import * def save_scripts(variable_list,variable_uses,scripts,tag_uses,quick_strings): file = open(export_dir + "scripts.txt","w") file.write("scriptsfile version 1\n") file.write("%d\n"%len(scripts)) temp_list = [] list_type = type(temp_list) for i_script in xrange(len(scripts)): func = scripts[i_script] if (type(func[1]) == list_type): file.write("%s -1\n"%(convert_to_identifier(func[0]))) save_statement_block(file,convert_to_identifier(func[0]), 0,func[1], variable_list,variable_uses,tag_uses,quick_strings) else: file.write("%s %f\n"%(convert_to_identifier(func[0]), func[1])) save_statement_block(file,convert_to_identifier(func[0]), 0,func[2], variable_list,variable_uses,tag_uses,quick_strings) file.write("\n") file.close() def save_python_header(): file = open("./ID_scripts.py","w") for i_script in xrange(len(scripts)): file.write("script_%s = %d\n"%(convert_to_identifier(scripts[i_script][0]),i_script)) file.write("\n\n") file.close() print "Exporting scripts..." save_python_header() variable_uses = [] variables = load_variables(export_dir, variable_uses) tag_uses = load_tag_uses(export_dir) quick_strings = load_quick_strings(export_dir) save_scripts(variables,variable_uses,scripts,tag_uses,quick_strings) save_variables(export_dir,variables,variable_uses) save_tag_uses(export_dir, tag_uses) save_quick_strings(export_dir,quick_strings)
Python
spr_invalid_object = 0 spr_inventory = 1 spr_empty = 2 spr_chest_a = 3 spr_container_small_chest = 4 spr_container_chest_b = 5 spr_container_chest_c = 6 spr_player_chest = 7 spr_locked_player_chest = 8 spr_light_sun = 9 spr_light = 10 spr_light_red = 11 spr_light_night = 12 spr_torch = 13 spr_torch_night = 14 spr_barrier_20m = 15 spr_barrier_16m = 16 spr_barrier_8m = 17 spr_barrier_4m = 18 spr_barrier_2m = 19 spr_exit_4m = 20 spr_exit_8m = 21 spr_exit_16m = 22 spr_ai_limiter_2m = 23 spr_ai_limiter_4m = 24 spr_ai_limiter_8m = 25 spr_ai_limiter_16m = 26 spr_Shield = 27 spr_shelves = 28 spr_table_tavern = 29 spr_table_castle_a = 30 spr_chair_castle_a = 31 spr_pillow_a = 32 spr_pillow_b = 33 spr_pillow_c = 34 spr_interior_castle_g_square_keep_b = 35 spr_carpet_with_pillows_a = 36 spr_carpet_with_pillows_b = 37 spr_table_round_a = 38 spr_table_round_b = 39 spr_fireplace_b = 40 spr_fireplace_c = 41 spr_sofa_a = 42 spr_sofa_b = 43 spr_ewer_a = 44 spr_end_table_a = 45 spr_fake_houses_steppe_a = 46 spr_fake_houses_steppe_b = 47 spr_fake_houses_steppe_c = 48 spr_boat_destroy = 49 spr_destroy_house_a = 50 spr_destroy_house_b = 51 spr_destroy_house_c = 52 spr_destroy_heap = 53 spr_destroy_castle_a = 54 spr_destroy_castle_b = 55 spr_destroy_castle_c = 56 spr_destroy_castle_d = 57 spr_destroy_windmill = 58 spr_destroy_tree_a = 59 spr_destroy_tree_b = 60 spr_destroy_bridge_a = 61 spr_destroy_bridge_b = 62 spr_Catapult = 63 spr_broom = 64 spr_garlic = 65 spr_garlic_b = 66 spr_destroy_a = 67 spr_destroy_b = 68 spr_bridge_wooden = 69 spr_bridge_wooden_snowy = 70 spr_grave_a = 71 spr_village_house_e = 72 spr_village_house_f = 73 spr_village_house_g = 74 spr_village_house_h = 75 spr_village_house_i = 76 spr_village_house_j = 77 spr_village_wall_a = 78 spr_village_wall_b = 79 spr_village_snowy_house_a = 80 spr_village_snowy_house_b = 81 spr_village_snowy_house_c = 82 spr_village_snowy_house_d = 83 spr_village_snowy_house_e = 84 spr_village_snowy_house_f = 85 spr_town_house_steppe_a = 86 spr_town_house_steppe_b = 87 spr_town_house_steppe_c = 88 spr_town_house_steppe_d = 89 spr_town_house_steppe_e = 90 spr_town_house_steppe_f = 91 spr_town_house_steppe_g = 92 spr_town_house_steppe_h = 93 spr_town_house_steppe_i = 94 spr_carpet_a = 95 spr_carpet_b = 96 spr_carpet_c = 97 spr_carpet_d = 98 spr_carpet_e = 99 spr_carpet_f = 100 spr_awning_a = 101 spr_awning_b = 102 spr_awning_c = 103 spr_awning_long = 104 spr_awning_long_b = 105 spr_awning_d = 106 spr_snowy_barrel_a = 107 spr_snowy_fence = 108 spr_snowy_wood_heap = 109 spr_village_snowy_stable_a = 110 spr_village_straw_house_a = 111 spr_village_stable_a = 112 spr_village_shed_a = 113 spr_village_shed_b = 114 spr_trunks_snowy = 115 spr_dungeon_door_cell_a = 116 spr_dungeon_door_cell_b = 117 spr_dungeon_door_entry_a = 118 spr_dungeon_door_entry_b = 119 spr_dungeon_door_entry_c = 120 spr_dungeon_door_direction_a = 121 spr_dungeon_door_direction_b = 122 spr_dungeon_door_stairs_a = 123 spr_dungeon_door_stairs_b = 124 spr_dungeon_bed_a = 125 spr_dungeon_bed_b = 126 spr_torture_tool_a = 127 spr_torture_tool_b = 128 spr_torture_tool_c = 129 spr_skeleton_head = 130 spr_skeleton_bone = 131 spr_skeleton_a = 132 spr_dungeon_stairs_a = 133 spr_dungeon_stairs_b = 134 spr_dungeon_torture_room_a = 135 spr_dungeon_entry_a = 136 spr_dungeon_entry_b = 137 spr_dungeon_entry_c = 138 spr_dungeon_cell_a = 139 spr_dungeon_cell_b = 140 spr_dungeon_cell_c = 141 spr_dungeon_corridor_a = 142 spr_dungeon_corridor_b = 143 spr_dungeon_corridor_c = 144 spr_dungeon_corridor_d = 145 spr_dungeon_direction_a = 146 spr_dungeon_direction_b = 147 spr_dungeon_room_a = 148 spr_dungeon_tower_stairs_a = 149 spr_dungeon_tower_cell_a = 150 spr_tunnel_a = 151 spr_tunnel_salt = 152 spr_salt_a = 153 spr_tutorial_door_a = 154 spr_tutorial_door_b = 155 spr_tutorial_flag_yellow = 156 spr_tutorial_flag_red = 157 spr_tutorial_flag_blue = 158 spr_interior_prison_a = 159 spr_interior_prison_b = 160 spr_interior_prison_cell_a = 161 spr_interior_prison_d = 162 spr_arena_archery_target_a = 163 spr_archery_butt_a = 164 spr_archery_target_with_hit_a = 165 spr_dummy_a = 166 spr_band_a = 167 spr_arena_sign = 168 spr_castle_h_battlement_a = 169 spr_castle_h_battlement_b = 170 spr_castle_h_battlement_a2 = 171 spr_castle_h_battlement_b2 = 172 spr_castle_h_corner_a = 173 spr_castle_h_stairs_a = 174 spr_castle_h_stairs_b = 175 spr_castle_h_gatehouse_a = 176 spr_castle_h_keep_a = 177 spr_castle_h_keep_b = 178 spr_castle_h_house_a = 179 spr_castle_h_house_b = 180 spr_castle_h_house_c = 181 spr_castle_h_battlement_barrier = 182 spr_castle_f_keep_a = 183 spr_castle_f_battlement_a = 184 spr_castle_f_battlement_a_destroyed = 185 spr_castle_f_battlement_b = 186 spr_castle_f_battlement_corner_a = 187 spr_castle_f_battlement_corner_b = 188 spr_castle_f_stairs_a = 189 spr_castle_f_tower_a = 190 spr_castle_f_wall_stairs_a = 191 spr_castle_f_wall_stairs_b = 192 spr_castle_f_wall_way_a = 193 spr_castle_f_wall_way_b = 194 spr_castle_f_gatehouse_a = 195 spr_castle_g_battlement_a = 196 spr_castle_g_corner_a = 197 spr_castle_g_tower_a = 198 spr_castle_g_gate_house = 199 spr_castle_g_gate_house_door_a = 200 spr_castle_g_gate_house_door_b = 201 spr_castle_g_square_keep_a = 202 spr_mosque_a = 203 spr_stone_minaret_a = 204 spr_stone_house_a = 205 spr_stone_house_b = 206 spr_stone_house_c = 207 spr_stone_house_d = 208 spr_stone_house_e = 209 spr_stone_house_f = 210 spr_banner_pole = 211 spr_custom_banner_01 = 212 spr_custom_banner_02 = 213 spr_banner_a = 214 spr_banner_b = 215 spr_banner_c = 216 spr_banner_d = 217 spr_banner_e = 218 spr_banner_f = 219 spr_banner_g = 220 spr_banner_h = 221 spr_banner_i = 222 spr_banner_j = 223 spr_banner_k = 224 spr_banner_l = 225 spr_banner_m = 226 spr_banner_n = 227 spr_banner_o = 228 spr_banner_p = 229 spr_banner_q = 230 spr_banner_r = 231 spr_banner_s = 232 spr_banner_t = 233 spr_banner_u = 234 spr_banner_ba = 235 spr_banner_bb = 236 spr_banner_bc = 237 spr_banner_bd = 238 spr_banner_be = 239 spr_banner_bf = 240 spr_banner_bg = 241 spr_banner_bh = 242 spr_banner_bi = 243 spr_banner_bj = 244 spr_banner_bk = 245 spr_banner_bl = 246 spr_banner_bm = 247 spr_banner_bn = 248 spr_banner_bo = 249 spr_banner_bp = 250 spr_banner_bq = 251 spr_banner_br = 252 spr_banner_bs = 253 spr_banner_bt = 254 spr_banner_bu = 255 spr_banner_ca = 256 spr_banner_cb = 257 spr_banner_cc = 258 spr_banner_cd = 259 spr_banner_ce = 260 spr_banner_cf = 261 spr_banner_cg = 262 spr_banner_ch = 263 spr_banner_ci = 264 spr_banner_cj = 265 spr_banner_ck = 266 spr_banner_cl = 267 spr_banner_cm = 268 spr_banner_cn = 269 spr_banner_co = 270 spr_banner_cp = 271 spr_banner_cq = 272 spr_banner_cr = 273 spr_banner_cs = 274 spr_banner_ct = 275 spr_banner_cu = 276 spr_banner_da = 277 spr_banner_db = 278 spr_banner_dc = 279 spr_banner_dd = 280 spr_banner_de = 281 spr_banner_df = 282 spr_banner_dg = 283 spr_banner_dh = 284 spr_banner_di = 285 spr_banner_dj = 286 spr_banner_dk = 287 spr_banner_dl = 288 spr_banner_dm = 289 spr_banner_dn = 290 spr_banner_do = 291 spr_banner_dp = 292 spr_banner_dq = 293 spr_banner_dr = 294 spr_banner_ds = 295 spr_banner_dt = 296 spr_banner_du = 297 spr_banner_ea = 298 spr_banner_eb = 299 spr_banner_ec = 300 spr_banner_ed = 301 spr_banner_ee = 302 spr_banner_ef = 303 spr_banner_eg = 304 spr_banner_eh = 305 spr_banner_ei = 306 spr_banner_ej = 307 spr_banner_ek = 308 spr_banner_el = 309 spr_banner_em = 310 spr_banner_en = 311 spr_banner_eo = 312 spr_banner_ep = 313 spr_banner_eq = 314 spr_banner_er = 315 spr_banner_es = 316 spr_banner_et = 317 spr_banner_eu = 318 spr_banner_f01 = 319 spr_banner_f02 = 320 spr_banner_f03 = 321 spr_banner_f04 = 322 spr_banner_f05 = 323 spr_banner_f06 = 324 spr_banner_f07 = 325 spr_banner_f08 = 326 spr_banner_f09 = 327 spr_banner_f10 = 328 spr_banner_f11 = 329 spr_banner_f12 = 330 spr_banner_f13 = 331 spr_banner_f14 = 332 spr_banner_f15 = 333 spr_banner_f16 = 334 spr_banner_f17 = 335 spr_banner_f18 = 336 spr_banner_f19 = 337 spr_banner_f20 = 338 spr_banner_f21 = 339 spr_tavern_chair_a = 340 spr_tavern_chair_b = 341 spr_tavern_table_a = 342 spr_tavern_table_b = 343 spr_fireplace_a = 344 spr_barrel = 345 spr_bench_tavern = 346 spr_bench_tavern_b = 347 spr_bowl_wood = 348 spr_chandelier_table = 349 spr_chandelier_tavern = 350 spr_chest_gothic = 351 spr_chest_b = 352 spr_chest_c = 353 spr_counter_tavern = 354 spr_cup = 355 spr_dish_metal = 356 spr_gothic_chair = 357 spr_gothic_stool = 358 spr_grate = 359 spr_jug = 360 spr_potlamp = 361 spr_weapon_rack = 362 spr_weapon_rack_big = 363 spr_tavern_barrel = 364 spr_tavern_barrel_b = 365 spr_merchant_sign = 366 spr_tavern_sign = 367 spr_sack = 368 spr_skull_a = 369 spr_skull_b = 370 spr_skull_c = 371 spr_skull_d = 372 spr_skeleton_cow = 373 spr_cupboard_a = 374 spr_box_a = 375 spr_bucket_a = 376 spr_straw_a = 377 spr_straw_b = 378 spr_straw_c = 379 spr_cloth_a = 380 spr_cloth_b = 381 spr_mat_a = 382 spr_mat_b = 383 spr_mat_c = 384 spr_mat_d = 385 spr_wood_a = 386 spr_wood_b = 387 spr_wood_heap = 388 spr_wood_heap_b = 389 spr_water_well_a = 390 spr_net_a = 391 spr_net_b = 392 spr_meat_hook = 393 spr_cooking_pole = 394 spr_bowl_a = 395 spr_bucket_b = 396 spr_washtub_a = 397 spr_washtub_b = 398 spr_table_trunk_a = 399 spr_chair_trunk_a = 400 spr_chair_trunk_b = 401 spr_chair_trunk_c = 402 spr_table_trestle_long = 403 spr_table_trestle_small = 404 spr_chair_trestle = 405 spr_wheel = 406 spr_ladder = 407 spr_cart = 408 spr_village_stand = 409 spr_wooden_stand = 410 spr_table_small = 411 spr_table_small_b = 412 spr_small_timber_frame_house_a = 413 spr_timber_frame_house_b = 414 spr_timber_frame_house_c = 415 spr_timber_frame_extension_a = 416 spr_timber_frame_extension_b = 417 spr_stone_stairs_a = 418 spr_stone_stairs_b = 419 spr_railing_a = 420 spr_side_building_a = 421 spr_battlement_a = 422 spr_battlement_a_destroyed = 423 spr_round_tower_a = 424 spr_small_round_tower_a = 425 spr_small_round_tower_roof_a = 426 spr_square_keep_a = 427 spr_square_tower_roof_a = 428 spr_gate_house_a = 429 spr_gate_house_b = 430 spr_small_wall_a = 431 spr_small_wall_b = 432 spr_small_wall_c = 433 spr_small_wall_c_destroy = 434 spr_small_wall_d = 435 spr_small_wall_e = 436 spr_town_house_a = 437 spr_town_house_b = 438 spr_town_house_c = 439 spr_town_house_d = 440 spr_town_house_e = 441 spr_town_house_f = 442 spr_town_house_g = 443 spr_town_house_h = 444 spr_town_house_i = 445 spr_town_house_j = 446 spr_town_house_l = 447 spr_town_house_m = 448 spr_town_house_n = 449 spr_town_house_o = 450 spr_town_house_p = 451 spr_town_house_q = 452 spr_passage_house_a = 453 spr_passage_house_b = 454 spr_passage_house_c = 455 spr_passage_house_d = 456 spr_passage_house_c_door = 457 spr_house_extension_a = 458 spr_house_extension_b = 459 spr_house_extension_c = 460 spr_house_extension_d = 461 spr_house_extension_e = 462 spr_house_extension_f = 463 spr_house_extension_f2 = 464 spr_house_extension_g = 465 spr_house_extension_g2 = 466 spr_house_extension_h = 467 spr_house_roof_door = 468 spr_door_extension_a = 469 spr_stairs_arch_a = 470 spr_town_house_r = 471 spr_town_house_s = 472 spr_town_house_t = 473 spr_town_house_u = 474 spr_town_house_v = 475 spr_town_house_w = 476 spr_town_house_y = 477 spr_town_house_z = 478 spr_town_house_za = 479 spr_windmill = 480 spr_windmill_fan_turning = 481 spr_windmill_fan = 482 spr_fake_house_a = 483 spr_fake_house_b = 484 spr_fake_house_c = 485 spr_fake_house_d = 486 spr_fake_house_e = 487 spr_fake_house_f = 488 spr_fake_house_snowy_a = 489 spr_fake_house_snowy_b = 490 spr_fake_house_snowy_c = 491 spr_fake_house_snowy_d = 492 spr_fake_house_far_a = 493 spr_fake_house_far_b = 494 spr_fake_house_far_c = 495 spr_fake_house_far_d = 496 spr_fake_house_far_e = 497 spr_fake_house_far_f = 498 spr_fake_house_far_snowycrude_a = 499 spr_fake_house_far_snowy_b = 500 spr_fake_house_far_snowy_c = 501 spr_fake_house_far_snowy_d = 502 spr_earth_wall_a = 503 spr_earth_wall_a2 = 504 spr_earth_wall_b = 505 spr_earth_wall_b2 = 506 spr_earth_stairs_a = 507 spr_earth_stairs_b = 508 spr_earth_tower_small_a = 509 spr_earth_gate_house_a = 510 spr_earth_gate_a = 511 spr_earth_square_keep_a = 512 spr_earth_house_a = 513 spr_earth_house_b = 514 spr_earth_house_c = 515 spr_earth_house_d = 516 spr_village_steppe_a = 517 spr_village_steppe_b = 518 spr_village_steppe_c = 519 spr_village_steppe_d = 520 spr_village_steppe_e = 521 spr_village_steppe_f = 522 spr_town_house_aa = 523 spr_snowy_house_a = 524 spr_snowy_house_b = 525 spr_snowy_house_c = 526 spr_snowy_house_d = 527 spr_snowy_house_e = 528 spr_snowy_house_f = 529 spr_snowy_house_g = 530 spr_snowy_house_h = 531 spr_snowy_house_i = 532 spr_snowy_wall_a = 533 spr_snowy_stand = 534 spr_snowy_heap_a = 535 spr_snowy_trunks_a = 536 spr_snowy_castle_tower_a = 537 spr_snowy_castle_battlement_a = 538 spr_snowy_castle_battlement_a_destroyed = 539 spr_snowy_castle_battlement_b = 540 spr_snowy_castle_battlement_corner_a = 541 spr_snowy_castle_battlement_corner_b = 542 spr_snowy_castle_battlement_stairs_a = 543 spr_snowy_castle_battlement_stairs_b = 544 spr_snowy_castle_gate_house_a = 545 spr_snowy_castle_round_tower_a = 546 spr_snowy_castle_square_keep_a = 547 spr_snowy_castle_stairs_a = 548 spr_square_keep_b = 549 spr_square_keep_c = 550 spr_square_keep_d = 551 spr_square_keep_e = 552 spr_square_keep_f = 553 spr_square_extension_a = 554 spr_square_stairs_a = 555 spr_castle_courtyard_house_a = 556 spr_castle_courtyard_house_b = 557 spr_castle_courtyard_house_c = 558 spr_castle_courtyard_a = 559 spr_gatehouse_b = 560 spr_castle_gaillard = 561 spr_castle_e_battlement_a = 562 spr_castle_e_battlement_a_destroyed = 563 spr_castle_e_corner = 564 spr_castle_e_stairs_a = 565 spr_castle_e_tower = 566 spr_castle_e_gate_house_a = 567 spr_castle_e_keep_a = 568 spr_stand_thatched = 569 spr_stand_cloth = 570 spr_castle_e_house_a = 571 spr_castle_e_house_b = 572 spr_castle_e_corner_b = 573 spr_arena_block_a = 574 spr_arena_block_b = 575 spr_arena_block_c = 576 spr_arena_block_d = 577 spr_arena_block_e = 578 spr_arena_block_f = 579 spr_arena_block_g = 580 spr_arena_block_h = 581 spr_arena_block_i = 582 spr_arena_block_j = 583 spr_arena_block_j_awning = 584 spr_arena_palisade_a = 585 spr_arena_wall_a = 586 spr_arena_wall_b = 587 spr_arena_barrier_a = 588 spr_arena_barrier_b = 589 spr_arena_barrier_c = 590 spr_arena_tower_a = 591 spr_arena_tower_b = 592 spr_arena_tower_c = 593 spr_arena_spectator_a = 594 spr_arena_spectator_b = 595 spr_arena_spectator_c = 596 spr_arena_spectator_sitting_a = 597 spr_arena_spectator_sitting_b = 598 spr_arena_spectator_sitting_c = 599 spr_courtyard_gate_a = 600 spr_courtyard_gate_b = 601 spr_courtyard_gate_c = 602 spr_courtyard_gate_snowy = 603 spr_castle_tower_a = 604 spr_castle_battlement_a = 605 spr_castle_battlement_b = 606 spr_castle_battlement_a_destroyed = 607 spr_castle_battlement_b_destroyed = 608 spr_castle_battlement_corner_a = 609 spr_castle_battlement_corner_b = 610 spr_castle_battlement_stairs_a = 611 spr_castle_battlement_stairs_b = 612 spr_castle_gate_house_a = 613 spr_castle_round_tower_a = 614 spr_castle_square_keep_a = 615 spr_castle_stairs_a = 616 spr_castle_drawbridge_open = 617 spr_castle_drawbridge_closed = 618 spr_spike_group_a = 619 spr_spike_a = 620 spr_belfry_a = 621 spr_belfry_old = 622 spr_belfry_platform_a = 623 spr_belfry_platform_b = 624 spr_belfry_platform_old = 625 spr_belfry_wheel = 626 spr_belfry_wheel_old = 627 spr_mangonel = 628 spr_trebuchet_old = 629 spr_trebuchet_new = 630 spr_stone_ball = 631 spr_village_house_a = 632 spr_village_house_b = 633 spr_village_house_c = 634 spr_village_house_d = 635 spr_farm_house_a = 636 spr_farm_house_b = 637 spr_farm_house_c = 638 spr_mountain_house_a = 639 spr_mountain_house_b = 640 spr_village_hut_a = 641 spr_crude_fence = 642 spr_crude_fence_small = 643 spr_crude_fence_small_b = 644 spr_ramp_12m = 645 spr_ramp_14m = 646 spr_siege_ladder_12m = 647 spr_siege_ladder_14m = 648 spr_portcullis = 649 spr_bed_a = 650 spr_bed_b = 651 spr_bed_c = 652 spr_bed_d = 653 spr_bed_e = 654 spr_bed_f = 655 spr_towngate_door_left = 656 spr_towngate_door_right = 657 spr_towngate_rectangle_door_left = 658 spr_towngate_rectangle_door_right = 659 spr_door_screen = 660 spr_door_a = 661 spr_door_b = 662 spr_door_c = 663 spr_door_d = 664 spr_tavern_door_a = 665 spr_tavern_door_b = 666 spr_door_e_left = 667 spr_door_e_right = 668 spr_door_f_left = 669 spr_door_f_right = 670 spr_door_h_left = 671 spr_door_h_right = 672 spr_draw_bridge_a = 673 spr_chain_1m = 674 spr_chain_2m = 675 spr_chain_5m = 676 spr_chain_10m = 677 spr_bridge_modular_a = 678 spr_bridge_modular_b = 679 spr_church_a = 680 spr_church_tower_a = 681 spr_stone_step_a = 682 spr_stone_step_b = 683 spr_stone_step_c = 684 spr_stone_heap = 685 spr_stone_heap_b = 686 spr_panel_door_a = 687 spr_panel_door_b = 688 spr_smoke_stain = 689 spr_brazier_with_fire = 690 spr_cooking_fire = 691 spr_cauldron_a = 692 spr_fry_pan_a = 693 spr_tripod_cauldron_a = 694 spr_tripod_cauldron_b = 695 spr_open_stable_a = 696 spr_open_stable_b = 697 spr_plate_a = 698 spr_plate_b = 699 spr_plate_c = 700 spr_lettuce = 701 spr_hanger = 702 spr_knife_eating = 703 spr_colander = 704 spr_ladle = 705 spr_spoon = 706 spr_skewer = 707 spr_grape_a = 708 spr_grape_b = 709 spr_apple_a = 710 spr_apple_b = 711 spr_maize_a = 712 spr_maize_b = 713 spr_cabbage = 714 spr_cabbage_b = 715 spr_bean = 716 spr_basket_a = 717 spr_feeding_trough_a = 718 spr_marrow_a = 719 spr_marrow_b = 720 spr_squash_plant = 721 spr_cheese_a = 722 spr_cheese_b = 723 spr_cheese_slice_a = 724 spr_bread_a = 725 spr_bread_b = 726 spr_bread_slice_a = 727 spr_fish_a = 728 spr_fish_roasted_a = 729 spr_chicken_roasted = 730 spr_food_steam = 731 spr_city_smoke = 732 spr_city_fire_fly_night = 733 spr_city_fly_day = 734 spr_flue_smoke_tall = 735 spr_flue_smoke_short = 736 spr_moon_beam = 737 spr_fire_small = 738 spr_fire_big = 739 spr_battle_field_smoke = 740 spr_Village_fire_big = 741 spr_candle_a = 742 spr_candle_b = 743 spr_candle_c = 744 spr_lamp_a = 745 spr_lamp_b = 746 spr_hook_a = 747 spr_window_night = 748 spr_fried_pig = 749 spr_village_oven = 750 spr_dungeon_water_drops = 751 spr_shadow_circle_1 = 752 spr_shadow_circle_2 = 753 spr_shadow_square_1 = 754 spr_shadow_square_2 = 755 spr_wheelbarrow = 756 spr_gourd = 757 spr_gourd_spike = 758 spr_obstacle_fence_1 = 759 spr_obstacle_fallen_tree_a = 760 spr_obstacle_fallen_tree_b = 761
Python
qst_deliver_message = 0 qst_deliver_message_to_enemy_lord = 1 qst_raise_troops = 2 qst_escort_lady = 3 qst_deal_with_bandits_at_lords_village = 4 qst_collect_taxes = 5 qst_hunt_down_fugitive = 6 qst_kill_local_merchant = 7 qst_bring_back_runaway_serfs = 8 qst_follow_spy = 9 qst_capture_enemy_hero = 10 qst_lend_companion = 11 qst_collect_debt = 12 qst_incriminate_loyal_commander = 13 qst_raid_caravan_to_start_war = 14 qst_meet_spy_in_enemy_town = 15 qst_capture_prisoners = 16 qst_lend_surgeon = 17 qst_follow_army = 18 qst_report_to_army = 19 qst_deliver_cattle_to_army = 20 qst_join_siege_with_army = 21 qst_scout_waypoints = 22 qst_rescue_lord_by_replace = 23 qst_deliver_message_to_prisoner_lord = 24 qst_duel_for_lady = 25 qst_move_cattle_herd = 26 qst_escort_merchant_caravan = 27 qst_deliver_wine = 28 qst_troublesome_bandits = 29 qst_kidnapped_girl = 30 qst_persuade_lords_to_make_peace = 31 qst_deal_with_looters = 32 qst_deal_with_night_bandits = 33 qst_deliver_grain = 34 qst_deliver_cattle = 35 qst_train_peasants_against_bandits = 36 qst_eliminate_bandits_infesting_village = 37 qst_join_faction = 38 qst_rebel_against_kingdom = 39 qst_quests_end = 40 qsttag_deliver_message = 504403158265495552 qsttag_deliver_message_to_enemy_lord = 504403158265495553 qsttag_raise_troops = 504403158265495554 qsttag_escort_lady = 504403158265495555 qsttag_deal_with_bandits_at_lords_village = 504403158265495556 qsttag_collect_taxes = 504403158265495557 qsttag_hunt_down_fugitive = 504403158265495558 qsttag_kill_local_merchant = 504403158265495559 qsttag_bring_back_runaway_serfs = 504403158265495560 qsttag_follow_spy = 504403158265495561 qsttag_capture_enemy_hero = 504403158265495562 qsttag_lend_companion = 504403158265495563 qsttag_collect_debt = 504403158265495564 qsttag_incriminate_loyal_commander = 504403158265495565 qsttag_raid_caravan_to_start_war = 504403158265495566 qsttag_meet_spy_in_enemy_town = 504403158265495567 qsttag_capture_prisoners = 504403158265495568 qsttag_lend_surgeon = 504403158265495569 qsttag_follow_army = 504403158265495570 qsttag_report_to_army = 504403158265495571 qsttag_deliver_cattle_to_army = 504403158265495572 qsttag_join_siege_with_army = 504403158265495573 qsttag_scout_waypoints = 504403158265495574 qsttag_rescue_lord_by_replace = 504403158265495575 qsttag_deliver_message_to_prisoner_lord = 504403158265495576 qsttag_duel_for_lady = 504403158265495577 qsttag_move_cattle_herd = 504403158265495578 qsttag_escort_merchant_caravan = 504403158265495579 qsttag_deliver_wine = 504403158265495580 qsttag_troublesome_bandits = 504403158265495581 qsttag_kidnapped_girl = 504403158265495582 qsttag_persuade_lords_to_make_peace = 504403158265495583 qsttag_deal_with_looters = 504403158265495584 qsttag_deal_with_night_bandits = 504403158265495585 qsttag_deliver_grain = 504403158265495586 qsttag_deliver_cattle = 504403158265495587 qsttag_train_peasants_against_bandits = 504403158265495588 qsttag_eliminate_bandits_infesting_village = 504403158265495589 qsttag_join_faction = 504403158265495590 qsttag_rebel_against_kingdom = 504403158265495591 qsttag_quests_end = 504403158265495592
Python
from header_common import * from header_operations import * from header_mission_templates import * from header_animations import * from header_sounds import * from header_music import * from module_constants import * #################################################################################################################### # Each mission-template is a tuple that contains the following fields: # 1) Mission-template id (string): used for referencing mission-templates in other files. # The prefix mt_ is automatically added before each mission-template id # # 2) Mission-template flags (int): See header_mission-templates.py for a list of available flags # 3) Mission-type(int): Which mission types this mission template matches. # For mission-types to be used with the default party-meeting system, # this should be 'charge' or 'charge_with_ally' otherwise must be -1. # # 4) Mission description text (string). # 5) List of spawn records (list): Each spawn record is a tuple that contains the following fields: # 5.1) entry-no: Troops spawned from this spawn record will use this entry # 5.2) spawn flags. # 5.3) alter flags. which equipment will be overriden # 5.4) ai flags. # 5.5) Number of troops to spawn. # 5.6) list of equipment to add to troops spawned from here (maximum 8). # 6) List of triggers (list). # See module_triggers.py for infomation about triggers. # # Please note that mission templates is work in progress and can be changed in the future versions. # #################################################################################################################### pilgrim_disguise = [itm_pilgrim_hood,itm_pilgrim_disguise,itm_practice_staff, itm_throwing_daggers] af_castle_lord = af_override_horse | af_override_weapons| af_require_civilian common_battle_mission_start = ( ti_before_mission_start, 0, 0, [], [ (team_set_relation, 0, 2, 1), (team_set_relation, 1, 3, 1), (call_script, "script_change_banners_and_chest"), ]) ################################ # Form ranks triggers section # ############################## # UPDATE TIP: may elimilate formation_vector and # incorporate contents to attached party slots. # Change will be huge. ############################## frk_triggers = [ # formation_vector_init (ti_before_mission_start, 0, 0, [ ], [ #(party_is_active, "p_main_party"), (set_spawn_radius, 5), (spawn_around_party, "p_main_party", "pt_none"), (assign, formation_vector, reg0), (disable_party, reg0), (spawn_around_party, "p_main_party", "pt_none"), (assign, formation_temp_vector, reg0), (disable_party, reg0), ]+concatenate_scripts([ [ (party_get_slot, ":mapped_key", "p_main_party", slot_party_formation_keys_begin+x), (assign, formation_keys_list[x], ":mapped_key"), ] for x in range(0, len(formation_keys_list)) ])+[ (party_get_slot, "$formation_ai_switch", "p_main_party", slot_party_formation_ai_switch), #(party_get_num_attached_parties, reg0, "p_main_party"), #(display_message, "@{reg0} parties attached", formation_debug_color), (assign, "$formation_selected", 0), (assign, "$formation_array_selected", 0), (party_get_slot, "$formation_max_array_no", "p_main_party", slot_party_array_parties_begin), (assign, ":base", 2), (convert_to_fixed_point, ":base"), (assign, ":power", "$formation_max_array_no"), (convert_to_fixed_point, ":power"), (store_pow, "$formation_all_arrays", ":base", ":power"), (convert_from_fixed_point, "$formation_all_arrays"), (val_sub, "$formation_all_arrays", 1), (assign, "$formation_array_selected", "$formation_all_arrays"), (assign, "$formation_vector_active", 1), (assign, "$new_agents_spawn", 0), (assign, "$ai_arrays_ready", 0), (assign, "$spawn_wave", 0), (assign, "$formation_arrays_follow", 0), (try_for_range, ":i", slot_formation_tmp_clustering, slot_formation_tmp_clustering+4), (party_set_slot, formation_temp_vector, ":i", 0), (try_end), #(assign, "$formation_auto_rotation", 0), #(assign, "$formation_charge_speed", 0), ] ), # init_formation (0, 0, ti_once, [ ],[ (set_fixed_point_multiplier, 100), (get_scene_boundaries, pos15, pos16), (position_get_x, "$battle_x_min", pos15), (position_get_y, "$battle_y_min", pos15), (position_get_x, "$battle_x_max", pos16), (position_get_y, "$battle_y_max", pos16), (assign, ":base", slot_formation_teams_begin), (get_player_agent_no, ":player"), (agent_get_team, ":player_team", ":player"), (try_for_range, ":team_no", 0, 4), (store_add, ":slot", ":base", slot_formation_team_array_selection), (party_set_slot, formation_vector, ":slot", 0), (val_add, ":slot", 1), (try_begin), (eq, ":team_no", ":player_team"), (party_set_slot, formation_vector, ":slot", "$formation_max_array_no"), (else_try), (party_set_slot, formation_vector, ":slot", 0), (try_end), (team_get_leader, ":leader", ":team_no"), (store_add, ":slot", ":base", slot_formation_team_arrays_begin), (val_add, ":base", sft_team_section_size), (eq, ":team_no", ":player_team"), (val_add, ":slot", slot_formation_array_leader), (party_set_slot, formation_vector, ":slot", ":leader"), (try_end), (assign, ":mark", 1), (try_for_range, ":slot", slot_formation_array_marks_begin, slot_formation_array_marks_end), (party_set_slot, formation_vector, ":slot", ":mark"), (val_mul, ":mark", 2), (try_end), (get_player_agent_no, ":player"), (agent_get_team, ":team_no", ":player"), (agent_get_position, pos1, ":player"), (set_show_messages, 0), (team_give_order, ":team_no", grc_everyone, mordr_hold), (team_give_order, ":team_no", grc_cavalry, mordr_hold), #(team_give_order, ":team_no", grc_cavalry, mordr_fall_back), (team_give_order, ":team_no", grc_everyone, mordr_spread_out), (team_give_order, ":team_no", grc_everyone, mordr_spread_out), (set_show_messages, 1), ] ), # agent_init_formation (ti_on_agent_spawn, 0.5, 0, [ ], [ (store_trigger_param_1, ":agent_no"), (agent_is_human, ":agent_no"), (agent_is_alive, ":agent_no"), (call_script, "script_formation_agent_init", ":agent_no"), (assign, "$new_agents_spawn", 1), ] ), # select_formation (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_formation_selection"), ], [ (val_add, "$formation_selected", 1), (try_begin), (ge, "$formation_selected", formation_types), (assign, "$formation_selected", 0), (try_end), (store_add, ":formation_string", "$formation_selected", formation_commands_begin), (str_store_string, s1, ":formation_string"), (display_message, "@The {s1} formation is selected.", formation_message_color), ] ), # select_formation_backward (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_formation_selection_backward"), ], [ (val_sub, "$formation_selected", 1), (try_begin), (lt, "$formation_selected", 0), (val_add, "$formation_selected", formation_types), (try_end), (store_add, ":formation_string", "$formation_selected", formation_commands_begin), (str_store_string, s1, ":formation_string"), (display_message, "@The {s1} formation is selected.", formation_message_color), ] ), # select all arrays (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_array_select_all"), ], [ (assign, "$formation_array_selected", "$formation_all_arrays"), ] ), ]+[ # select array (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_array_selection_"+str(x+1)), ], [ (lt, x, "$formation_max_array_no"), (party_get_slot, ":mark", formation_vector, slot_formation_array_marks_begin+x), (try_begin), (this_or_next|key_is_down, key_left_control), (key_is_down, key_right_control), (assign, ":toggle", ":mark"), (val_and, ":mark", "$formation_array_selected"), (val_sub, ":toggle", ":mark"), (val_sub, "$formation_array_selected", ":mark"), (val_add, "$formation_array_selected", ":toggle"), (str_clear, s1), (assign, ":cnt", 0), (try_for_range_backwards, ":array_no", 0, formation_arrays), (store_add, ":mark1", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark1", formation_vector, ":mark1"), (val_and, ":mark1", "$formation_array_selected"), (neq, ":mark1", 0), (store_add, ":array_string", formation_array_names_begin, ":array_no"), (str_store_string, s2, ":array_string"), (val_add, ":cnt", 1), (try_begin), (eq, ":cnt", 2), (str_store_string, s1, "@{s2} and {s1}"), (else_try), (str_store_string, s1, "@{s2}, {s1}"), (try_end), (try_end), (display_message, "@{s1}hear me!!", formation_order_color), (else_try), (assign, "$formation_array_selected", ":mark"), (store_add, ":array_string", formation_array_names_begin, x), (str_store_string, s1, ":array_string"), (display_message, "@{s1}, hear me!!", formation_order_color), (try_end), #(assign, reg0, "$formation_array_selected"), #(display_message, "@array selection: {reg0}", formation_debug_color), ] ) for x in range(0, formation_arrays)]+[ # select_array #(0, 0, 0, [ # (eq, "$formation_vector_active", 1), # (key_clicked, key_h), # ], [ # (val_add, "$formation_array_selected", 1), # (try_begin), # (ge, "$formation_array_selected", "$formation_max_array_no"), # (assign, "$formation_array_selected", 0), # (try_end), # (store_add, ":formation_array_string", "$formation_array_selected", formation_array_names_begin), # (str_store_string, s1, ":formation_array_string"), # (display_message, "@{s1} hear me!", formation_message_color), # ] # ), # select_array_backward #(0, 0, 0, [ # (eq, "$formation_vector_active", 1), # (key_clicked, key_j), # ], [ # (val_sub, "$formation_array_selected", 1), # (try_begin), # (lt, "$formation_array_selected", 0), # (val_add, "$formation_array_selected", "$formation_max_array_no"), # (try_end), # (store_add, ":formation_array_string", "$formation_array_selected", formation_array_names_begin), # (str_store_string, s1, ":formation_array_string"), # (display_message, "@{s1} hear me!", formation_message_color), # ] # ), # toggle_auto_rotation (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_auto_rotation_toggle"), ], [ (call_script, "script_formation_auto_rotation_key_reaction", -1), ] ), # apply_formation (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_apply_formation"), ], [ (call_script, "script_apply_formation_key_reaction", "$formation_selected"), ] ), # formation_charge (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_formation_charge"), ], [ (call_script, "script_formation_charge_key_reaction", 1, "str_formation_charge"), ] ), # formation_fall_back (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_formation_fall_back"), ], [ (call_script, "script_formation_charge_key_reaction", -1, "str_formation_fall_back"), ] ), # formation_halt (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_formation_halt"), ], [ (call_script, "script_formation_charge_key_reaction", 0, "str_formation_halt"), ] ), # formation_move_to_player_pos (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_formation_hold_pos"), ], [ (set_fixed_point_multiplier, 100), (get_player_agent_no, ":player"), (agent_get_position, pos1, ":player"), (call_script, "script_formation_move_to_pos_key_reaction", 1), ] ), # formation_move_forward (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_formation_move_forward"), ], [ (call_script, "script_formation_move_key_reaction", 0, 10, "str_formation_advance"), ] ), # formation_move_backward (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_formation_move_backward"), ], [ (call_script, "script_formation_move_key_reaction", 0, -10, "str_formation_move_back"), ] ), # formation_move_left (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_formation_move_left"), ], [ (call_script, "script_formation_move_key_reaction", -10, 0, "str_formation_move_left"), ] ), # formation_move_right (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_formation_move_right"), ], [ (call_script, "script_formation_move_key_reaction", 10, 0, "str_formation_move_right"), ] ), # formation_turn_left (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_formation_turn_left"), ], [ (call_script, "script_formation_turn_key_reaction", 15, "str_formation_turn_left"), ] ), # formation_turn_right (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_formation_turn_right"), ], [ (call_script, "script_formation_turn_key_reaction", -15, "str_formation_turn_right"), ] ), # formation_tactical_charge (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_formation_tactical_charge"), ], [ (call_script, "script_formation_tactical_charge_key_reaction"), ] ), #formation_tactical_charge_tactics (tactical_charge_listen_interval, 0, 0, [ (eq, "$formation_vector_active", 1) ], [ (assign, ":formation_type", 0), (try_for_range, ":team_no", 0, 4), (call_script, "script_convert_to_slot_no", ":team_no", -1, slot_formation_team_array_selection), (party_get_slot, ":array_selection", formation_vector, reg0), (neq, ":array_selection", 0), (try_for_range, ":array_no", 0, formation_arrays), (store_add, ":mark", slot_formation_array_marks_begin, ":array_no"), (party_get_slot, ":mark", formation_vector, ":mark"), (val_and, ":mark", ":array_selection"), (neq, ":mark", 0), (call_script, "script_convert_to_slot_no", ":team_no", ":array_no", slot_formation_array_states), (party_get_slot, ":array_states", formation_vector, reg0), (store_and, ":formation_type", ":array_states", sfas_formation_type), (val_and, ":array_states", sfas_tactical_charge), (neq, ":array_states", 0), (store_add, ":tactics_script", formation_tactics_scripts_begin, ":formation_type"), (call_script, ":tactics_script", ":team_no", ":array_no"), (try_end), (store_add, ":stage_slot", slot_formation_tmp_clustering, ":team_no"), (party_get_slot, ":stage", formation_temp_vector, ":stage_slot"), (val_add, ":stage", 1), (try_begin), (eq, ":stage", sftc_max_stage), (assign, ":stage", 0), (try_end), (party_set_slot, formation_temp_vector, ":stage_slot", ":stage"), (try_end), ] ), # formation_stand_closer (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_formation_tighten"), ], [ (call_script, "script_formation_density_key_reaction", -1, "str_formation_stand_closer"), ] ), # formation_spread_out (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_formation_disperse"), ], [ (call_script, "script_formation_density_key_reaction", 1, "str_formation_spread_out"), ] ), # formation follow (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_formation_follow"), ], [ (call_script, "script_formation_follow_key_reaction"), ] ), # formation follow cancel (0, 0, 0, [ (eq, "$formation_vector_active", 1),]+[ (this_or_next|key_clicked, formation_keys_list[x]) for x in range(14, len(formation_keys_list)-1) ]+[ (eq, 0, 1), ], [ (val_or, "$formation_arrays_follow", "$formation_array_selected"), (val_sub, "$formation_arrays_follow", "$formation_array_selected"), ] ), # formation follow apply (1, 0, 0, [ (eq, "$formation_vector_active", 1), (neq, "$formation_arrays_follow", 0), ], [ (set_fixed_point_multiplier, 100), (get_player_agent_no, ":player"), (agent_get_position, pos1, ":player"), (call_script, "script_formation_move_to_pos_key_reaction", 0), ] ), # maintain_formation (1, 0, 0, [ (eq, "$formation_vector_active", 1), ],[ (call_script, "script_maintain_formation"), ] ), # dismiss_formation (0, 0, 0, [ (eq, "$formation_vector_active", 1), (key_clicked, "$key_dismiss_formation"), ], [ (call_script, "script_formation_dismiss_key_reaction"), ] ), # view_order_panel (0, 0, 0, [], [ (key_clicked, "$key_formation_view_orders"), (eq, "$formation_vector_active", 1), (start_presentation, "prsnt_battle_formations"), ] ), # order_panel_update (0.1, 0, 0, [], [ (eq, "$g_presentation_battle_formations_active", 1), (eq, "$formation_vector_active", 1), (call_script, "script_update_formation_order_panel_statistics_and_map"), ] ), # formation_clean_up_battle_won (0, 0, ti_once, [ (eq, "$battle_won", 1), ], [ (call_script, "script_formation_clean_up"), ] ), # formation_clean_up_question_answered (ti_question_answered, 0, ti_once, [], [ (store_trigger_param_1,":answer"), (eq,":answer",0), (call_script, "script_formation_clean_up"), ] ), # formation_clean_up_defeated (0, 0, ti_once, [ (main_hero_fallen), ], [ (call_script, "script_formation_clean_up"), ] ), # formation_clean_up_leave_area (ti_on_leave_area, 0, ti_once, [ ], [ (call_script, "script_formation_clean_up"), ] ), # Command cursor init (ti_before_mission_start, 0, 0, [ ], [ (assign, "$command_cursor_key_held", 0), (assign, "$command_cursor_set", 0), ] ), # Command cursor count down key hold (0, 1, 0, [ (eq, "$formation_vector_active", 1), (try_begin), (neg|key_is_down, "$key_formation_hold_pos"), (assign, "$command_cursor_key_held", 0), (try_end), (key_is_down, "$key_formation_hold_pos"), ], [ (assign, "$command_cursor_key_held", 1), ] ), # Command cursor show arrow (0.05, 0, 0, [ (eq, "$formation_vector_active", 1), (key_is_down, "$key_formation_hold_pos"), (eq, "$command_cursor_key_held", 1), ], [ (set_fixed_point_multiplier, 100), (get_player_agent_no, ":player"), (agent_get_look_position, pos1, ":player"), (position_move_z, pos1, 120), (try_begin), (call_script, "script_cf_shift_pos1_along_y_axis_to_ground", 30), (assign, "$command_cursor_set", 1), (particle_system_burst, "psys_fat_arrow", pos1, 1), (position_get_x, "$command_cursor_x_pos", pos1), (position_get_y, "$command_cursor_y_pos", pos1), (agent_get_position, pos2, ":player"), (position_get_rotation_around_z, "$command_cursor_order_rotation", pos2), (else_try), (assign, "$command_cursor_set", 0), (try_end), ] ), # Command cursor give order (0.05, 0, 0, [ (eq, "$formation_vector_active", 1), (neg|key_is_down, "$key_formation_hold_pos"), (eq, "$command_cursor_set", 1), ], [ (set_fixed_point_multiplier, 100), (init_position, pos1), (position_set_x, pos1, "$command_cursor_x_pos"), (position_set_y, pos1, "$command_cursor_y_pos"), (position_set_z_to_ground_level, pos1), (position_rotate_z, pos1, "$command_cursor_order_rotation"), (particle_system_burst, "psys_fat_arrow_rising", pos1, 1), (call_script, "script_formation_move_to_pos_key_reaction", 1), (assign, "$command_cursor_set", 0), ] ), ] frk_ai_triggers = [ # AI tactics assign arrays (5, 0, 0, [ (neq, "$new_agents_spawn", 0), (neq, "$formation_vector_active", 0), #(neq, "$formation_ai_switch", 0), ], [ (call_script, "script_formation_formulate_arrays"), (get_player_agent_no, ":player"), (agent_get_team, ":player_team", ":player"), (call_script, "script_convert_to_slot_no", ":player_team", -1, slot_formation_team_max_array_no), (party_get_slot, "$formation_max_array_no", formation_vector, reg0), (assign, ":power", "$formation_max_array_no"), (convert_to_fixed_point, ":power"), (assign, ":base", 2), (convert_to_fixed_point, ":base"), (store_pow, "$formation_all_arrays", ":base", ":power"), (convert_from_fixed_point, "$formation_all_arrays"), (val_sub, "$formation_all_arrays", 1), (assign, "$new_agents_spawn", 0), (assign, "$ai_arrays_ready", 1), ] ), # AI tactics apply (5, 0, 0, [ (neq, "$formation_vector_active", 0), (eq, "$ai_arrays_ready", 1), (neq, "$formation_ai_switch", 0), ], [ (call_script, "script_formation_ai_tactics"), ] ), ] # # Form ranks triggers section end #################################### common_battle_tab_press = ( ti_tab_pressed, 0, 0, [], [ (try_begin), (eq, "$battle_won", 1), (call_script, "script_count_mission_casualties_from_agents"), (finish_mission,0), (else_try), (call_script, "script_cf_check_enemies_nearby"), (question_box,"str_do_you_want_to_retreat"), (else_try), (display_message,"str_can_not_retreat"), (try_end), ]) common_arena_fight_tab_press = ( ti_tab_pressed, 0, 0, [], [ (question_box,"str_give_up_fight"), ]) common_custom_battle_tab_press = ( ti_tab_pressed, 0, 0, [], [ (try_begin), (neq, "$g_battle_result", 0), (call_script, "script_custom_battle_end"), (finish_mission), (else_try), (question_box,"str_give_up_fight"), (try_end), ]) custom_battle_check_victory_condition = ( 1, 60, ti_once, [ (store_mission_timer_a,reg(1)), (ge,reg(1),10), (all_enemies_defeated, 2), (neg|main_hero_fallen, 0), (set_mission_result,1), (display_message,"str_msg_battle_won"), (assign, "$battle_won",1), (assign, "$g_battle_result", 1), ], [ (call_script, "script_custom_battle_end"), (finish_mission, 1), ]) custom_battle_check_defeat_condition = ( 1, 4, ti_once, [ (main_hero_fallen), (assign,"$g_battle_result",-1), ], [ (call_script, "script_custom_battle_end"), (finish_mission), ]) common_battle_victory_display = ( 10, 0, 0, [], [ (eq,"$battle_won",1), (display_message,"str_msg_battle_won"), ]) common_siege_question_answered = ( ti_question_answered, 0, 0, [], [ (store_trigger_param_1,":answer"), (eq,":answer",0), (assign, "$pin_player_fallen", 0), (get_player_agent_no, ":player_agent"), (agent_get_team, ":agent_team", ":player_agent"), (try_begin), (neq, "$attacker_team", ":agent_team"), (neq, "$attacker_team_2", ":agent_team"), (str_store_string, s5, "str_siege_continues"), (call_script, "script_simulate_retreat", 8, 15), (else_try), (str_store_string, s5, "str_retreat"), (call_script, "script_simulate_retreat", 5, 20), (try_end), (call_script, "script_count_mission_casualties_from_agents"), (finish_mission,0), ]) common_custom_battle_question_answered = ( ti_question_answered, 0, 0, [], [ (store_trigger_param_1,":answer"), (eq,":answer",0), (assign, "$g_battle_result", -1), (call_script, "script_custom_battle_end"), (finish_mission), ]) common_custom_siege_init = ( 0, 0, ti_once, [], [ (assign, "$g_battle_result", 0), (call_script, "script_music_set_situation_with_culture", mtf_sit_siege), ]) common_siege_init = ( 0, 0, ti_once, [], [ (assign,"$battle_won",0), (assign,"$defender_reinforcement_stage",0), (assign,"$attacker_reinforcement_stage",0), (assign,"$g_presentation_battle_active", 0), (call_script, "script_music_set_situation_with_culture", mtf_sit_siege), ]) common_music_situation_update = ( 30, 0, 0, [], [ (call_script, "script_combat_music_set_situation_with_culture"), ]) common_siege_ai_trigger_init = ( 0, 0, ti_once, [ (assign, "$defender_team", 0), (assign, "$attacker_team", 1), (assign, "$defender_team_2", 2), (assign, "$attacker_team_2", 3), ], []) common_siege_ai_trigger_init_2 = ( 0, 0, ti_once, [ (set_show_messages, 0), (entry_point_get_position, pos10, 10), (team_give_order, "$defender_team", grc_infantry, mordr_hold), (team_give_order, "$defender_team", grc_infantry, mordr_stand_closer), (team_give_order, "$defender_team", grc_infantry, mordr_stand_closer), (team_give_order, "$defender_team", grc_archers, mordr_stand_ground), (team_set_order_position, "$defender_team", grc_everyone, pos10), (team_give_order, "$defender_team_2", grc_infantry, mordr_hold), (team_give_order, "$defender_team_2", grc_infantry, mordr_stand_closer), (team_give_order, "$defender_team_2", grc_infantry, mordr_stand_closer), (team_give_order, "$defender_team_2", grc_archers, mordr_stand_ground), (team_set_order_position, "$defender_team_2", grc_everyone, pos10), (set_show_messages, 1), ], []) common_siege_ai_trigger_init_after_2_secs = ( 0, 2, ti_once, [], [ (try_for_agents, ":agent_no"), (agent_set_slot, ":agent_no", slot_agent_is_not_reinforcement, 1), (try_end), ]) common_siege_defender_reinforcement_check = ( 3, 0, 5, [], [(lt, "$defender_reinforcement_stage", 7), (store_mission_timer_a,":mission_time"), (ge,":mission_time",10), (store_normalized_team_count,":num_defenders",0), (lt,":num_defenders",10), (add_reinforcements_to_entry,4, 7), (val_add,"$defender_reinforcement_stage",1), (try_begin), (ge, "$defender_reinforcement_stage", 2), (set_show_messages, 0), (team_give_order, "$defender_team", grc_infantry, mordr_charge), #AI desperate charge:infantry!!! (team_give_order, "$defender_team_2", grc_infantry, mordr_charge), #AI desperate charge:infantry!!! (set_show_messages, 1), (ge, "$defender_reinforcement_stage", 4), (set_show_messages, 0), (team_give_order, "$defender_team", grc_everyone, mordr_charge), #AI desperate charge: everyone!!! (team_give_order, "$defender_team_2", grc_everyone, mordr_charge), #AI desperate charge: everyone!!! (set_show_messages, 1), (try_end), ]) common_siege_defender_reinforcement_archer_reposition = ( 2, 0, 0, [ (gt, "$defender_reinforcement_stage", 0), ], [ (call_script, "script_siege_move_archers_to_archer_positions"), ]) common_siege_attacker_reinforcement_check = ( 1, 0, 5, [ (lt,"$attacker_reinforcement_stage",5), (store_mission_timer_a,":mission_time"), (ge,":mission_time",10), (store_normalized_team_count,":num_attackers",1), (lt,":num_attackers",6) ], [ (add_reinforcements_to_entry, 1, 8), (val_add,"$attacker_reinforcement_stage", 1), ]) common_siege_attacker_do_not_stall = ( 5, 0, 0, [], [ #Make sure attackers do not stall on the ladders... (try_for_agents, ":agent_no"), (agent_is_human, ":agent_no"), (agent_is_alive, ":agent_no"), (agent_get_team, ":agent_team", ":agent_no"), (this_or_next|eq, ":agent_team", "$attacker_team"), (eq, ":agent_team", "$attacker_team_2"), ## (neg|agent_is_defender, ":agent_no"), (agent_ai_set_always_attack_in_melee, ":agent_no", 1), (try_end), ]) common_battle_check_friendly_kills = ( 2, 0, 0, [], [ (call_script, "script_check_friendly_kills"), ]) common_battle_check_victory_condition = ( 1, 60, ti_once, [ (store_mission_timer_a,reg(1)), (ge,reg(1),10), (all_enemies_defeated, 5), (neg|main_hero_fallen, 0), (set_mission_result,1), (display_message,"str_msg_battle_won"), (assign,"$battle_won",1), (assign, "$g_battle_result", 1), (call_script, "script_play_victorious_sound"), ], [ (call_script, "script_count_mission_casualties_from_agents"), (finish_mission, 1), ]) common_battle_victory_display = ( 10, 0, 0, [], [ (eq,"$battle_won",1), (display_message,"str_msg_battle_won"), ]) common_siege_refill_ammo = ( 120, 0, 0, [], [#refill ammo of defenders every two minutes. (get_player_agent_no, ":player_agent"), (try_for_agents,":cur_agent"), (neq, ":cur_agent", ":player_agent"), (agent_is_alive, ":cur_agent"), (agent_is_human, ":cur_agent"), ## (agent_is_defender, ":cur_agent"), (agent_get_team, ":agent_team", ":cur_agent"), (this_or_next|eq, ":agent_team", "$defender_team"), (eq, ":agent_team", "$defender_team_2"), (agent_refill_ammo, ":cur_agent"), (try_end), ]) common_siege_check_defeat_condition = ( 1, 4, ti_once, [ (main_hero_fallen) ], [ (assign, "$pin_player_fallen", 1), (get_player_agent_no, ":player_agent"), (agent_get_team, ":agent_team", ":player_agent"), (try_begin), (neq, "$attacker_team", ":agent_team"), (neq, "$attacker_team_2", ":agent_team"), (str_store_string, s5, "str_siege_continues"), (call_script, "script_simulate_retreat", 8, 15), (else_try), (str_store_string, s5, "str_retreat"), (call_script, "script_simulate_retreat", 5, 20), (try_end), (assign, "$g_battle_result", -1), (set_mission_result,-1), (call_script, "script_count_mission_casualties_from_agents"), (finish_mission,0), ]) common_battle_order_panel = ( 0, 0, 0, [], [ (game_key_clicked, gk_view_orders), (start_presentation, "prsnt_battle"), ]) common_battle_order_panel_tick = ( 0.1, 0, 0, [], [ (eq, "$g_presentation_battle_active", 1), (call_script, "script_update_order_panel_statistics_and_map"), ]) common_battle_inventory = ( ti_inventory_key_pressed, 0, 0, [], [ (display_message,"str_use_baggage_for_inventory"), ]) common_inventory_not_available = ( ti_inventory_key_pressed, 0, 0, [ (display_message, "str_cant_use_inventory_now"), ], []) common_siege_init_ai_and_belfry = ( 0, 0, ti_once, [ (call_script, "script_siege_init_ai_and_belfry"), ], []) common_siege_move_belfry = ( 0, 0, ti_once, [ (call_script, "script_cf_siege_move_belfry"), ], []) common_siege_rotate_belfry = ( 0, 2, ti_once, [ (call_script, "script_cf_siege_rotate_belfry_platform"), ], [ (assign, "$belfry_positioned", 3), ]) common_siege_assign_men_to_belfry = ( 0, 0, ti_once, [ (call_script, "script_cf_siege_assign_men_to_belfry"), ], []) tournament_triggers = [ (ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest"), (assign, "$g_arena_training_num_agents_spawned", 0)]), (ti_inventory_key_pressed, 0, 0, [(display_message,"str_cant_use_inventory_arena")], []), (ti_tab_pressed, 0, 0, [], [(try_begin), (eq, "$g_mt_mode", abm_visit), (set_trigger_result, 1), (else_try), (question_box,"str_give_up_fight"), (try_end), ]), (ti_question_answered, 0, 0, [], [(store_trigger_param_1,":answer"), (eq,":answer",0), (try_begin), (eq, "$g_mt_mode", abm_tournament), (call_script, "script_end_tournament_fight", 0), (else_try), (eq, "$g_mt_mode", abm_training), (get_player_agent_no, ":player_agent"), (agent_get_kill_count, "$g_arena_training_kills", ":player_agent", 1),#use this for conversation (try_end), (finish_mission,0), ]), (1, 0, ti_once, [], [ (eq, "$g_mt_mode", abm_visit), (call_script, "script_music_set_situation_with_culture", mtf_sit_travel), (store_current_scene, reg(1)), (scene_set_slot, reg(1), slot_scene_visited, 1), (mission_enable_talk), (get_player_agent_no, ":player_agent"), (assign, ":team_set", 0), (try_for_agents, ":agent_no"), (neq, ":agent_no", ":player_agent"), (agent_get_troop_id, ":troop_id", ":agent_no"), (is_between, ":troop_id", regular_troops_begin, regular_troops_end), (eq, ":team_set", 0), (agent_set_team, ":agent_no", 1), (assign, ":team_set", 1), (try_end), ]), ## ## (0, 0, 0, [], ## [ ## #refresh hit points for arena visit trainers ## (eq, "$g_mt_mode", abm_visit), ## (get_player_agent_no, ":player_agent"), ## (try_for_agents, ":agent_no"), ## (neq, ":agent_no", ":player_agent"), ## (agent_get_troop_id, ":troop_id", ":agent_no"), ## (is_between, ":troop_id", regular_troops_begin, regular_troops_end), ## (agent_set_hit_points, ":agent_no", 100), ## (try_end), ## ]), ## (1, 4, ti_once, [(eq, "$g_mt_mode", abm_fight), ## (this_or_next|main_hero_fallen), ## (num_active_teams_le,1)], ## [ ## (try_begin), ## (num_active_teams_le,1), ## (neg|main_hero_fallen), ## (assign,"$arena_fight_won",1), ## #Fight won, decrease odds ## (assign, ":player_odds_sub", 0), ## (try_begin), ## (ge,"$arena_bet_amount",1), ## (store_div, ":player_odds_sub", "$arena_win_amount", 2), ## (try_end), ## (party_get_slot, ":player_odds", "$g_encountered_party", slot_town_player_odds), ## (val_add, ":player_odds_sub", 5), ## (val_sub, ":player_odds", ":player_odds_sub"), ## (val_max, ":player_odds", 250), ## (party_set_slot, "$g_encountered_party", slot_town_player_odds, ":player_odds"), ## (else_try), ## #Fight lost, increase odds ## (assign, ":player_odds_add", 0), ## (try_begin), ## (ge,"$arena_bet_amount",1), ## (store_div, ":player_odds_add", "$arena_win_amount", 2), ## (try_end), ## (party_get_slot, ":player_odds", "$g_encountered_party", slot_town_player_odds), ## (val_add, ":player_odds_add", 5), ## (val_add, ":player_odds", ":player_odds_add"), ## (val_min, ":player_odds", 4000), ## (party_set_slot, "$g_encountered_party", slot_town_player_odds, ":player_odds"), ## (try_end), ## (store_remaining_team_no,"$arena_winner_team"), ## (assign, "$g_mt_mode", abm_visit), ## (party_get_slot, ":arena_mission_template", "$current_town", slot_town_arena_template), ## (set_jump_mission, ":arena_mission_template"), ## (party_get_slot, ":arena_scene", "$current_town", slot_town_arena), ## (modify_visitors_at_site, ":arena_scene"), ## (reset_visitors), ## (set_visitor, 35, "trp_veteran_fighter"), ## (set_visitor, 36, "trp_hired_blade"), ## (set_jump_entry, 50), ## (jump_to_scene, ":arena_scene"), ## ]), (0, 0, ti_once, [], [ (eq, "$g_mt_mode", abm_tournament), (play_sound, "snd_arena_ambiance", sf_looping), (call_script, "script_music_set_situation_with_culture", mtf_sit_arena), ]), (1, 4, ti_once, [(eq, "$g_mt_mode", abm_tournament), (this_or_next|main_hero_fallen), (num_active_teams_le, 1)], [ (try_begin), (neg|main_hero_fallen), (call_script, "script_end_tournament_fight", 1), (call_script, "script_play_victorious_sound"), (finish_mission), (else_try), (call_script, "script_end_tournament_fight", 0), (finish_mission), (try_end), ]), (0, 0, ti_once, [], [(eq, "$g_mt_mode", abm_training),(start_presentation, "prsnt_arena_training")]), (0, 0, ti_once, [], [(eq, "$g_mt_mode", abm_training), (assign, "$g_arena_training_max_opponents", 40), (assign, "$g_arena_training_num_agents_spawned", 0), (assign, "$g_arena_training_kills", 0), (assign, "$g_arena_training_won", 0), (call_script, "script_music_set_situation_with_culture", mtf_sit_arena), ]), (1, 4, ti_once, [(eq, "$g_mt_mode", abm_training), (store_mission_timer_a, ":cur_time"), (gt, ":cur_time", 3), (assign, ":win_cond", 0), (try_begin), (ge, "$g_arena_training_num_agents_spawned", "$g_arena_training_max_opponents"),#spawn at most 40 agents (num_active_teams_le, 1), (assign, ":win_cond", 1), (try_end), (this_or_next|eq, ":win_cond", 1), (main_hero_fallen)], [ (get_player_agent_no, ":player_agent"), (agent_get_kill_count, "$g_arena_training_kills", ":player_agent", 1),#use this for conversation (assign, "$g_arena_training_won", 0), (try_begin), (neg|main_hero_fallen), (assign, "$g_arena_training_won", 1),#use this for conversation (try_end), (assign, "$g_mt_mode", abm_visit), (set_jump_mission, "mt_arena_melee_fight"), (party_get_slot, ":arena_scene", "$current_town", slot_town_arena), (modify_visitors_at_site, ":arena_scene"), (reset_visitors), (set_visitor, 35, "trp_veteran_fighter"), (set_visitor, 36, "trp_hired_blade"), (set_jump_entry, 50), (jump_to_scene, ":arena_scene"), ]), (0.2, 0, 0, [ (eq, "$g_mt_mode", abm_training), (assign, ":num_active_fighters", 0), (try_for_agents, ":agent_no"), (agent_is_human, ":agent_no"), (agent_is_alive, ":agent_no"), (agent_get_team, ":team_no", ":agent_no"), (is_between, ":team_no", 0 ,7), (val_add, ":num_active_fighters", 1), (try_end), (lt, ":num_active_fighters", 7), (neg|main_hero_fallen), (store_mission_timer_a, ":cur_time"), (this_or_next|ge, ":cur_time", "$g_arena_training_next_spawn_time"), (this_or_next|lt, "$g_arena_training_num_agents_spawned", 6), (num_active_teams_le, 1), (lt, "$g_arena_training_num_agents_spawned", "$g_arena_training_max_opponents"), ], [ (assign, ":added_troop", "$g_arena_training_num_agents_spawned"), (store_div, ":added_troop", "$g_arena_training_num_agents_spawned", 6), (assign, ":added_troop_sequence", "$g_arena_training_num_agents_spawned"), (val_mod, ":added_troop_sequence", 6), (val_add, ":added_troop", ":added_troop_sequence"), (val_min, ":added_troop", 9), (val_add, ":added_troop", "trp_arena_training_fighter_1"), (assign, ":end_cond", 10000), (get_player_agent_no, ":player_agent"), (agent_get_position, pos5, ":player_agent"), (try_for_range, ":unused", 0, ":end_cond"), (store_random_in_range, ":random_entry_point", 32, 40), (neq, ":random_entry_point", "$g_player_entry_point"), # make sure we don't overwrite player (entry_point_get_position, pos1, ":random_entry_point"), (get_distance_between_positions, ":dist", pos5, pos1), (gt, ":dist", 1200), #must be at least 12 meters away from the player (assign, ":end_cond", 0), (try_end), (add_visitors_to_current_scene, ":random_entry_point", ":added_troop", 1), (store_add, ":new_spawned_count", "$g_arena_training_num_agents_spawned", 1), (store_mission_timer_a, ":cur_time"), (store_add, "$g_arena_training_next_spawn_time", ":cur_time", 14), (store_div, ":time_reduction", ":new_spawned_count", 3), (val_sub, "$g_arena_training_next_spawn_time", ":time_reduction"), ]), (0, 0, 0, [ (eq, "$g_mt_mode", abm_training) ], [ (assign, ":max_teams", 6), (val_max, ":max_teams", 1), (get_player_agent_no, ":player_agent"), (try_for_agents, ":agent_no"), (agent_is_human, ":agent_no"), (agent_is_alive, ":agent_no"), (agent_slot_eq, ":agent_no", slot_agent_arena_team_set, 0), (agent_get_team, ":team_no", ":agent_no"), (is_between, ":team_no", 0 ,7), (try_begin), (eq, ":agent_no", ":player_agent"), (agent_set_team, ":agent_no", 6), #player is always team 6. (else_try), (store_random_in_range, ":selected_team", 0, ":max_teams"), # find strongest team (try_for_range, ":t", 0, 6), (troop_set_slot, "trp_temp_array_a", ":t", 0), (try_end), (try_for_agents, ":other_agent_no"), (agent_is_human, ":other_agent_no"), (agent_is_alive, ":other_agent_no"), (neq, ":agent_no", ":player_agent"), (agent_slot_eq, ":other_agent_no", slot_agent_arena_team_set, 1), (agent_get_team, ":other_agent_team", ":other_agent_no"), (troop_get_slot, ":count", "trp_temp_array_a", ":other_agent_team"), (val_add, ":count", 1), (troop_set_slot, "trp_temp_array_a", ":other_agent_team", ":count"), (try_end), (assign, ":strongest_team", 0), (troop_get_slot, ":strongest_team_count", "trp_temp_array_a", 0), (try_for_range, ":t", 1, 6), (troop_slot_ge, "trp_temp_array_a", ":t", ":strongest_team_count"), (troop_get_slot, ":strongest_team_count", "trp_temp_array_a", ":t"), (assign, ":strongest_team", ":t"), (try_end), (store_random_in_range, ":rand", 5, 100), (try_begin), (lt, ":rand", "$g_arena_training_num_agents_spawned"), (assign, ":selected_team", ":strongest_team"), (try_end), (agent_set_team, ":agent_no", ":selected_team"), (try_end), (agent_set_slot, ":agent_no", slot_agent_arena_team_set, 1), (try_begin), (neq, ":agent_no", ":player_agent"), (val_add, "$g_arena_training_num_agents_spawned", 1), (try_end), (try_end), ]), ] mission_templates = [ ( "town_default",0,-1, "Default town visit", [(0,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise), (1,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]),(2,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (3,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (4,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]),(5,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]),(6,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]),(7,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (8,mtef_scene_source,af_override_horse,0,1,[]),(9,mtef_scene_source,af_override_horse,0,1,[]),(10,mtef_scene_source,af_override_horse,0,1,[]),(11,mtef_scene_source,af_override_horse,0,1,[]), (12,mtef_scene_source,af_override_horse,0,1,[]),(13,mtef_scene_source,0,0,1,[]),(14,mtef_scene_source,0,0,1,[]),(15,mtef_scene_source,0,0,1,[]), (16,mtef_visitor_source,af_override_horse,0,1,[]),(17,mtef_visitor_source,af_override_horse,0,1,[]),(18,mtef_visitor_source,af_override_horse,0,1,[]),(19,mtef_visitor_source,af_override_horse,0,1,[]),(20,mtef_visitor_source,af_override_horse,0,1,[]),(21,mtef_visitor_source,af_override_horse,0,1,[]),(22,mtef_visitor_source,af_override_horse,0,1,[]),(23,mtef_visitor_source,af_override_horse,0,1,[]),(24,mtef_visitor_source,af_override_horse,0,1,[]), (25,mtef_visitor_source,af_override_horse,0,1,[]),(26,mtef_visitor_source,af_override_horse,0,1,[]),(27,mtef_visitor_source,af_override_horse,0,1,[]),(28,mtef_visitor_source,af_override_horse,0,1,[]),(29,mtef_visitor_source,af_override_horse,0,1,[]),(30,mtef_visitor_source,af_override_horse,0,1,[]),(31,mtef_visitor_source,af_override_horse,0,1,[]), ], [ (1, 0, ti_once, [], [ (store_current_scene, ":cur_scene"), (scene_set_slot, ":cur_scene", slot_scene_visited, 1), (try_begin), (eq, "$sneaked_into_town", 1), (call_script, "script_music_set_situation_with_culture", mtf_sit_town_infiltrate), (else_try), (eq, "$talk_context", tc_tavern_talk), (call_script, "script_music_set_situation_with_culture", mtf_sit_tavern), (else_try), (call_script, "script_music_set_situation_with_culture", mtf_sit_travel), (try_end), ]), (ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]), (ti_inventory_key_pressed, 0, 0, [(set_trigger_result,1)], []), (ti_tab_pressed, 0, 0, [(set_trigger_result,1)], []), ], ), # This template is used in party encounters and such. # ( "conversation_encounter",0,-1, "Conversation_encounter", [( 0,mtef_visitor_source,af_override_fullhelm,0,1,[]),( 1,mtef_visitor_source,af_override_fullhelm,0,1,[]), ( 2,mtef_visitor_source,af_override_fullhelm,0,1,[]),( 3,mtef_visitor_source,af_override_fullhelm,0,1,[]),( 4,mtef_visitor_source,af_override_fullhelm,0,1,[]),( 5,mtef_visitor_source,af_override_fullhelm,0,1,[]),( 6,mtef_visitor_source,af_override_fullhelm,0,1,[]), ( 7,mtef_visitor_source,af_override_fullhelm,0,1,[]),( 8,mtef_visitor_source,af_override_fullhelm,0,1,[]),( 9,mtef_visitor_source,af_override_fullhelm,0,1,[]),(10,mtef_visitor_source,af_override_fullhelm,0,1,[]),(11,mtef_visitor_source,af_override_fullhelm,0,1,[]), #prisoners now... (12,mtef_visitor_source,af_override_fullhelm,0,1,[]),(13,mtef_visitor_source,af_override_fullhelm,0,1,[]),(14,mtef_visitor_source,af_override_fullhelm,0,1,[]),(15,mtef_visitor_source,af_override_fullhelm,0,1,[]),(16,mtef_visitor_source,af_override_fullhelm,0,1,[]), #Other party (17,mtef_visitor_source,af_override_fullhelm,0,1,[]),(18,mtef_visitor_source,af_override_fullhelm,0,1,[]),(19,mtef_visitor_source,af_override_fullhelm,0,1,[]),(20,mtef_visitor_source,af_override_fullhelm,0,1,[]),(21,mtef_visitor_source,af_override_fullhelm,0,1,[]), (22,mtef_visitor_source,af_override_fullhelm,0,1,[]),(23,mtef_visitor_source,af_override_fullhelm,0,1,[]),(24,mtef_visitor_source,af_override_fullhelm,0,1,[]),(25,mtef_visitor_source,af_override_fullhelm,0,1,[]),(26,mtef_visitor_source,af_override_fullhelm,0,1,[]), (27,mtef_visitor_source,af_override_fullhelm,0,1,[]),(28,mtef_visitor_source,af_override_fullhelm,0,1,[]),(29,mtef_visitor_source,af_override_fullhelm,0,1,[]),(30,mtef_visitor_source,af_override_fullhelm,0,1,[]),(31,mtef_visitor_source,af_override_fullhelm,0,1,[]), ], [], ), #---------------------------------------------------------------- #mission templates before this point are hardwired into the game. #----------------------------------------------------------------- ( "town_center",0,-1, "Default town visit", [(0,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise), (1,mtef_scene_source|mtef_team_0,0,0,1,[]), (2,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise), (3,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise), (4,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise), (5,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise), (6,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise), (7,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise), (8,mtef_scene_source,af_override_horse,0,1,[]), (9,mtef_visitor_source,af_override_horse,0,1,[]),(10,mtef_visitor_source,af_override_horse,0,1,[]),(11,mtef_visitor_source,af_override_horse,0,1,[]),(12,mtef_visitor_source,af_override_horse,0,1,[]),(13,mtef_scene_source,0,0,1,[]),(14,mtef_scene_source,0,0,1,[]),(15,mtef_scene_source,0,0,1,[]), (16,mtef_visitor_source,af_override_horse,0,1,[]),(17,mtef_visitor_source,af_override_horse,0,1,[]),(18,mtef_visitor_source,af_override_horse,0,1,[]),(19,mtef_visitor_source,af_override_horse,0,1,[]),(20,mtef_visitor_source,af_override_horse,0,1,[]),(21,mtef_visitor_source,af_override_horse,0,1,[]),(22,mtef_visitor_source,af_override_horse,0,1,[]),(23,mtef_visitor_source,af_override_horse,0,1,[]), (24,mtef_visitor_source,af_override_horse,0,1,[]),(25,mtef_visitor_source,af_override_horse,0,1,[]),(26,mtef_visitor_source,af_override_horse,0,1,[]),(27,mtef_visitor_source,af_override_horse,0,1,[]),(28,mtef_visitor_source,af_override_horse,0,1,[]),(29,mtef_visitor_source,af_override_horse,0,1,[]),(30,mtef_visitor_source,af_override_horse,0,1,[]),(31,mtef_visitor_source,af_override_horse,0,1,[]), (32,mtef_visitor_source,af_override_horse,0,1,[]),(33,mtef_visitor_source,af_override_horse,0,1,[]),(34,mtef_visitor_source,af_override_horse,0,1,[]),(35,mtef_visitor_source,af_override_horse,0,1,[]),(36,mtef_visitor_source,af_override_horse,0,1,[]),(37,mtef_visitor_source,af_override_horse,0,1,[]),(38,mtef_visitor_source,af_override_horse,0,1,[]),(39,mtef_visitor_source,af_override_horse,0,1,[]), (40,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),(41,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),(42,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),(43,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (44,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),(45,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),(46,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),(47,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), ], [ (ti_on_agent_spawn, 0, 0, [], [ (store_trigger_param_1, ":agent_no"), (call_script, "script_init_town_agent", ":agent_no"), ]), (1, 0, ti_once, [], [ (try_begin), (eq, "$g_mt_mode", tcm_default), (store_current_scene, ":cur_scene"), (scene_set_slot, ":cur_scene", slot_scene_visited, 1), (try_end), (call_script, "script_init_town_walker_agents"), (try_begin), (eq, "$sneaked_into_town", 1), (call_script, "script_music_set_situation_with_culture", mtf_sit_town_infiltrate), (else_try), (call_script, "script_music_set_situation_with_culture", mtf_sit_travel), (try_end), ]), (ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]), (ti_inventory_key_pressed, 0, 0, [ (try_begin), (eq, "$g_mt_mode", tcm_default), (set_trigger_result,1), (else_try), (eq, "$g_mt_mode", tcm_disguised), (display_message,"str_cant_use_inventory_disguised"), (else_try), (display_message, "str_cant_use_inventory_now"), (try_end), ], []), (ti_tab_pressed, 0, 0, [ (try_begin), (this_or_next|eq, "$g_mt_mode", tcm_default), (eq, "$g_mt_mode", tcm_disguised), (set_trigger_result,1), (else_try), (display_message, "@Cannot leave now."), (try_end), ], []), (ti_on_leave_area, 0, 0, [ (try_begin), (eq, "$g_defending_against_siege", 0), (assign,"$g_leave_town",1), (try_end), ], []), (0, 0, ti_once, [], [(party_slot_eq, "$current_town", slot_party_type, spt_town), (call_script, "script_town_init_doors", 0), (try_begin), (eq, "$town_nighttime", 0), (play_sound, "snd_town_ambiance", sf_looping), (try_end), ]), (3, 0, 0, [(call_script, "script_tick_town_walkers")], []), (2, 0, 0, [(call_script, "script_center_ambiance_sounds")], []), ], ), ( "village_center",0,-1, "village center", [(0,mtef_scene_source|mtef_team_0,0,0,1,[]), (1,mtef_scene_source|mtef_team_0,0,0,1,[]), (2,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (3,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (4,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (5,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (6,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (7,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (8,mtef_visitor_source,af_override_horse,0,1,[]), (9,mtef_visitor_source,af_override_horse,0,1,[]),(10,mtef_visitor_source,af_override_horse,0,1,[]),(11,mtef_visitor_source,af_override_horse,0,1,[]),(12,mtef_visitor_source,af_override_horse,0,1,[]),(13,mtef_visitor_source,0,0,1,[]),(14,mtef_visitor_source,0,0,1,[]),(15,mtef_visitor_source,0,0,1,[]), (16,mtef_visitor_source,af_override_horse,0,1,[]),(17,mtef_visitor_source,af_override_horse,0,1,[]),(18,mtef_visitor_source,af_override_horse,0,1,[]),(19,mtef_visitor_source,af_override_horse,0,1,[]),(20,mtef_visitor_source,af_override_horse,0,1,[]),(21,mtef_visitor_source,af_override_horse,0,1,[]),(22,mtef_visitor_source,af_override_horse,0,1,[]),(23,mtef_visitor_source,af_override_horse,0,1,[]), (24,mtef_visitor_source,af_override_horse,0,1,[]),(25,mtef_visitor_source,af_override_horse,0,1,[]),(26,mtef_visitor_source,af_override_horse,0,1,[]),(27,mtef_visitor_source,af_override_horse,0,1,[]),(28,mtef_visitor_source,af_override_horse,0,1,[]),(29,mtef_visitor_source,af_override_horse,0,1,[]),(30,mtef_visitor_source,af_override_horse,0,1,[]),(31,mtef_visitor_source,af_override_horse,0,1,[]), (32,mtef_visitor_source,af_override_horse,0,1,[]),(33,mtef_visitor_source,af_override_horse,0,1,[]),(34,mtef_visitor_source,af_override_horse,0,1,[]),(35,mtef_visitor_source,af_override_horse,0,1,[]),(36,mtef_visitor_source,af_override_horse,0,1,[]),(37,mtef_visitor_source,af_override_horse,0,1,[]),(38,mtef_visitor_source,af_override_horse,0,1,[]),(39,mtef_visitor_source,af_override_horse,0,1,[]), (40,mtef_visitor_source,af_override_horse,0,1,[]),(41,mtef_visitor_source,af_override_horse,0,1,[]),(42,mtef_visitor_source,af_override_horse,0,1,[]),(43,mtef_visitor_source,af_override_horse,0,1,[]),(44,mtef_visitor_source,af_override_horse,0,1,[]),(45,mtef_visitor_source,af_override_horse,0,1,[]),(46,mtef_visitor_source,af_override_horse,0,1,[]),(47,mtef_visitor_source,af_override_horse,0,1,[]), ], [ (1, 0, ti_once, [], [ (store_current_scene, ":cur_scene"), (scene_set_slot, ":cur_scene", slot_scene_visited, 1), (call_script, "script_init_town_walker_agents"), (call_script, "script_music_set_situation_with_culture", mtf_sit_travel), ]), (ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]), (ti_inventory_key_pressed, 0, 0, [(set_trigger_result,1)], []), (ti_tab_pressed, 0, 0, [(try_begin), (check_quest_active, "qst_hunt_down_fugitive"), (neg|check_quest_succeeded, "qst_hunt_down_fugitive"), (neg|check_quest_failed, "qst_hunt_down_fugitive"), (quest_slot_eq, "qst_hunt_down_fugitive", slot_quest_current_state, 1), (try_begin), (call_script, "script_cf_troop_agent_is_alive", "trp_fugitive"), (call_script, "script_fail_quest", "qst_hunt_down_fugitive"), (else_try), (call_script, "script_succeed_quest", "qst_hunt_down_fugitive"), (try_end), (try_end), (set_trigger_result,1)], []), (ti_on_leave_area, 0, 0, [ (try_begin), (assign,"$g_leave_town",1), (try_end), ], []), (3, 0, 0, [(call_script, "script_tick_town_walkers")], []), (2, 0, 0, [(call_script, "script_center_ambiance_sounds")], []), (1, 0, ti_once, [(check_quest_active, "qst_hunt_down_fugitive"), (neg|check_quest_succeeded, "qst_hunt_down_fugitive"), (neg|check_quest_failed, "qst_hunt_down_fugitive"), (quest_slot_eq, "qst_hunt_down_fugitive", slot_quest_current_state, 1), (assign, ":not_alive", 0), (try_begin), (call_script, "script_cf_troop_agent_is_alive", "trp_fugitive"), (else_try), (assign, ":not_alive", 1), (try_end), (this_or_next|main_hero_fallen), (eq, ":not_alive", 1), ], [(try_begin), (main_hero_fallen), (jump_to_menu, "mnu_village_hunt_down_fugitive_defeated"), (call_script, "script_fail_quest", "qst_hunt_down_fugitive"), (finish_mission, 4), (else_try), (call_script, "script_change_player_relation_with_center", "$current_town", -2), (call_script, "script_succeed_quest", "qst_hunt_down_fugitive"), (try_end), ]), ], ), ( "bandits_at_night",0,-1, "Default town visit", [(0,mtef_scene_source|mtef_team_0, af_override_horse, 0, 1, pilgrim_disguise), (1,mtef_scene_source|mtef_team_0,0,0,1,[]), (2,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (3,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (4,mtef_visitor_source|mtef_team_0, af_override_horse, aif_start_alarmed, 1, []), (5,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (6,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (7,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (8,mtef_scene_source,af_override_horse,0,1,[]), (9,mtef_visitor_source,af_override_horse,0,1,[]),(10,mtef_visitor_source,af_override_horse,0,1,[]),(11,mtef_visitor_source,af_override_horse,aif_start_alarmed,1,[]),(12,mtef_visitor_source,af_override_horse,0,1,[]),(13,mtef_scene_source,0,0,1,[]),(14,mtef_scene_source,0,0,1,[]),(15,mtef_scene_source,0,0,1,[]), (16,mtef_visitor_source,af_override_horse,0,1,[]),(17,mtef_visitor_source,af_override_horse,0,1,[]),(18,mtef_visitor_source,af_override_horse,0,1,[]),(19,mtef_visitor_source,af_override_horse,0,1,[]),(20,mtef_visitor_source,af_override_horse,0,1,[]),(21,mtef_visitor_source,af_override_horse,0,1,[]),(22,mtef_visitor_source,af_override_horse,0,1,[]),(23,mtef_visitor_source,af_override_horse,0,1,[]), (24,mtef_visitor_source,af_override_horse,0,1,[]),(25,mtef_visitor_source,af_override_horse,0,1,[]),(26,mtef_visitor_source,af_override_horse,0,1,[]),(27,mtef_visitor_source,af_override_horse,aif_start_alarmed,1,[]),(28,mtef_visitor_source,af_override_horse,aif_start_alarmed,1,[]),(29,mtef_visitor_source,af_override_horse,0,1,[]),(30,mtef_visitor_source,af_override_horse,0,1,[]),(31,mtef_visitor_source,af_override_horse,0,1,[]), (32,mtef_visitor_source,af_override_horse,0,1,[]),(33,mtef_visitor_source,af_override_horse,0,1,[]),(34,mtef_visitor_source,af_override_horse,0,1,[]),(35,mtef_visitor_source,af_override_horse,0,1,[]),(36,mtef_visitor_source,af_override_horse,0,1,[]),(37,mtef_visitor_source,af_override_horse,0,1,[]),(38,mtef_visitor_source,af_override_horse,0,1,[]),(39,mtef_visitor_source,af_override_horse,0,1,[]), (40,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),(41,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),(42,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),(43,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (44,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),(45,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),(46,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),(47,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), ], [ (ti_on_agent_spawn, 0, 0, [], [ (store_trigger_param_1, ":agent_no"), (agent_get_troop_id, ":troop_no", ":agent_no"), (neq, ":troop_no", "trp_player"), (agent_set_team, ":agent_no", 1), ]), (ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]), common_inventory_not_available, (ti_tab_pressed, 0, 0, [ (display_message, "@Cannot leave now."), ], []), (ti_on_leave_area, 0, 0, [ (try_begin), (eq, "$g_defending_against_siege", 0), (assign,"$g_leave_town",1), (try_end), ], []), (0, 0, ti_once, [], [ (call_script, "script_music_set_situation_with_culture", mtf_sit_ambushed), (set_party_battle_mode), (party_slot_eq, "$current_town", slot_party_type, spt_town), (call_script, "script_town_init_doors", 0), ]), (1, 4, ti_once, [ (store_mission_timer_a,":cur_time"), (ge, ":cur_time", 5), (this_or_next|main_hero_fallen), (num_active_teams_le,1) ], [ (try_begin), (main_hero_fallen), (jump_to_menu, "mnu_town_bandits_failed"), (else_try), (jump_to_menu, "mnu_town_bandits_succeeded"), (try_end), (finish_mission), ]), ], ), ( "village_training", mtf_arena_fight, -1, "village_training", [(2,mtef_visitor_source|mtef_team_0,af_override_everything,aif_start_alarmed,1,[itm_practice_staff, itm_practice_boots]), (4,mtef_visitor_source|mtef_team_1,af_override_everything,aif_start_alarmed,1,[itm_practice_staff, itm_practice_boots]), ], [ (ti_before_mission_start, 0, 0, [], [ (assign, "$g_train_peasants_against_bandits_training_succeeded", 0), (call_script, "script_change_banners_and_chest"), ]), common_arena_fight_tab_press, (ti_question_answered, 0, 0, [], [ (store_trigger_param_1,":answer"), (eq,":answer",0), (finish_mission), ]), common_inventory_not_available, (1, 4, ti_once, [ (this_or_next|main_hero_fallen), (num_active_teams_le, 1) ], [ (try_begin), (neg|main_hero_fallen), (assign, "$g_train_peasants_against_bandits_training_succeeded", 1), (try_end), (finish_mission), ]), ], ), ( "visit_town_castle",0,-1, "You enter the halls of the lord.", [(0,mtef_scene_source|mtef_team_0,af_override_horse|af_override_weapons|af_override_head,0,1,[]), (1,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]),(2,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]),(3,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (4,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), #for doors (5,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(6,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(7,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), (8,mtef_visitor_source,af_override_horse,0,1,[]),(9,mtef_visitor_source,af_override_horse,0,1,[]),(10,mtef_scene_source,af_override_horse,0,1,[]),(11,mtef_scene_source,af_override_horse,0,1,[]), (12,mtef_visitor_source,af_override_horse,0,1,[]),(13,mtef_visitor_source,0,0,1,[]),(14,mtef_visitor_source,0,0,1,[]),(15,mtef_visitor_source,0,0,1,[]), (16,mtef_visitor_source,af_castle_lord,0,1,[]),(17,mtef_visitor_source,af_castle_lord,0,1,[]),(18,mtef_visitor_source,af_castle_lord,0,1,[]),(19,mtef_visitor_source,af_castle_lord,0,1,[]),(20,mtef_visitor_source,af_castle_lord,0,1,[]),(21,mtef_visitor_source,af_castle_lord,0,1,[]),(22,mtef_visitor_source,af_castle_lord,0,1,[]),(23,mtef_visitor_source,af_castle_lord,0,1,[]),(24,mtef_visitor_source,af_castle_lord,0,1,[]), (25,mtef_visitor_source,af_castle_lord,0,1,[]),(26,mtef_visitor_source,af_castle_lord,0,1,[]),(27,mtef_visitor_source,af_castle_lord,0,1,[]),(28,mtef_visitor_source,af_castle_lord,0,1,[]),(29,mtef_visitor_source,af_castle_lord,0,1,[]),(30,mtef_visitor_source,af_castle_lord,0,1,[]),(31,mtef_visitor_source,af_castle_lord,0,1,[]) ], [ (ti_on_agent_spawn, 0, 0, [], [ (store_trigger_param_1, ":agent_no"), (call_script, "script_init_town_agent", ":agent_no"), ]), (ti_before_mission_start, 0, 0, [], [ (call_script, "script_change_banners_and_chest"), ]), (ti_inventory_key_pressed, 0, 0, [(set_trigger_result,1)], []), (ti_tab_pressed, 0, 0, [(set_trigger_result,1)], []), (0, 0, ti_once, [], [ #(set_fog_distance, 150, 0xFF736252) (try_begin), (eq, "$talk_context", tc_court_talk), # (call_script, "script_music_set_situation_with_culture", mtf_sit_lords_hall), (else_try), (call_script, "script_music_set_situation_with_culture", 0), #prison (try_end), ]), ], ), ( "back_alley_kill_local_merchant",mtf_arena_fight,-1, "You enter the back alley", [ (0,mtef_visitor_source|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), (3,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), ], [ common_inventory_not_available, (ti_tab_pressed, 0, 0, [(display_message,"@Cannot leave now.")], []), (ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]), (0, 0, ti_once, [], [ (call_script, "script_music_set_situation_with_culture", mtf_sit_ambushed), ]), (0, 0, ti_once, [ (store_mission_timer_a,":cur_time"), (ge,":cur_time",1), (assign, ":merchant_hp", 0), (assign, ":player_hp", 0), (assign, ":merchant_hp", 0), (assign, ":merchant_agent", -1), (assign, ":player_agent", -1), (try_for_agents, ":agent_no"), (agent_get_troop_id, ":troop_id", ":agent_no"), (try_begin), (eq, ":troop_id", "trp_local_merchant"), (store_agent_hit_points, ":merchant_hp",":agent_no"), (assign, ":merchant_agent", ":agent_no"), (else_try), (eq, ":troop_id", "trp_player"), (store_agent_hit_points, ":player_hp",":agent_no"), (assign, ":player_agent", ":agent_no"), (try_end), (try_end), (ge, ":player_agent", 0), (ge, ":merchant_agent", 0), (agent_is_alive, ":player_agent"), (agent_is_alive, ":merchant_agent"), (is_between, ":merchant_hp", 1, 30), (gt, ":player_hp", 50), (start_mission_conversation, "trp_local_merchant"), ], []), (1, 4, ti_once, [(assign, ":not_alive", 0), (try_begin), (call_script, "script_cf_troop_agent_is_alive", "trp_local_merchant"), (else_try), (assign, ":not_alive", 1), (try_end), (this_or_next|main_hero_fallen), (eq, ":not_alive", 1)], [ (try_begin), (main_hero_fallen), (call_script, "script_fail_quest", "qst_kill_local_merchant"), (else_try), (call_script, "script_change_player_relation_with_center", "$current_town", -4), (call_script, "script_succeed_quest", "qst_kill_local_merchant"), (try_end), (finish_mission), ]), ], ), ( "back_alley_revolt",mtf_battle_mode,charge, "You lead your men to battle.", [(0,mtef_team_0|mtef_use_exact_number,af_override_horse|af_override_weapons|af_override_head,aif_start_alarmed,4,[itm_quarter_staff]), (3,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), ], [ common_inventory_not_available, (ti_tab_pressed, 0, 0, [], [(question_box,"str_do_you_want_to_retreat"), ]), (ti_question_answered, 0, 0, [], [(store_trigger_param_1,":answer"), (eq,":answer",0), (jump_to_menu, "mnu_collect_taxes_failed"), (finish_mission),]), (ti_tab_pressed, 0, 0, [(display_message,"@Cannot leave now.")], []), (ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]), (0, 0, ti_once, [], [ (call_script, "script_music_set_situation_with_culture", mtf_sit_fight), ]), (1, 4, ti_once, [(this_or_next|main_hero_fallen),(num_active_teams_le,1)], [ (try_begin), (main_hero_fallen), (jump_to_menu, "mnu_collect_taxes_failed"), (else_try), (jump_to_menu, "mnu_collect_taxes_rebels_killed"), (try_end), (finish_mission), ]), ], ), ( "lead_charge",mtf_battle_mode,charge, "You lead your men to battle.", [ (1,mtef_defenders|mtef_team_0,0,aif_start_alarmed,12,[]), (0,mtef_defenders|mtef_team_0,0,aif_start_alarmed,0,[]), (4,mtef_attackers|mtef_team_1,0,aif_start_alarmed,12,[]), (4,mtef_attackers|mtef_team_1,0,aif_start_alarmed,0,[]), ], [ (ti_on_agent_spawn, 0, 0, [], [ (store_trigger_param_1, ":agent_no"), (call_script, "script_agent_reassign_team", ":agent_no"), ]), common_battle_tab_press, (ti_question_answered, 0, 0, [], [(store_trigger_param_1,":answer"), (eq,":answer",0), (assign, "$pin_player_fallen", 0), (try_begin), (store_mission_timer_a, ":elapsed_time"), (gt, ":elapsed_time", 20), (str_store_string, s5, "str_retreat"), (call_script, "script_simulate_retreat", 10, 20), (try_end), (call_script, "script_count_mission_casualties_from_agents"), (finish_mission,0),]), (ti_before_mission_start, 0, 0, [], [ (team_set_relation, 0, 2, 1), (team_set_relation, 1, 3, 1), (call_script, "script_place_player_banner_near_inventory_bms"), ]), (0, 0, ti_once, [], [(assign,"$battle_won",0), (assign,"$defender_reinforcement_stage",0), (assign,"$attacker_reinforcement_stage",0), (assign,"$g_presentation_battle_active", 0), (call_script, "script_place_player_banner_near_inventory"), (call_script, "script_combat_music_set_situation_with_culture"), ]), common_music_situation_update, common_battle_check_friendly_kills, (1, 0, 5, [(lt,"$defender_reinforcement_stage",2), (store_mission_timer_a,":mission_time"), (ge,":mission_time",10), (store_normalized_team_count,":num_defenders", 0), (lt,":num_defenders",6), # (assign, reg2, ":num_defenders"), # (display_message,"@num_defenders = {reg2}") ], [(add_reinforcements_to_entry,0,7),(val_add,"$defender_reinforcement_stage",1)]), (1, 0, 5, [(lt,"$attacker_reinforcement_stage",2), (store_mission_timer_a,":mission_time"), (ge,":mission_time",10), (store_normalized_team_count,":num_attackers", 1), (lt,":num_attackers",6), # (assign, reg2, ":num_attackers"), # (display_message,"@num_attackers = {reg2}") ], [(add_reinforcements_to_entry,3,7),(val_add,"$attacker_reinforcement_stage",1)]), common_battle_check_victory_condition, common_battle_victory_display, (1, 4, ti_once, [(main_hero_fallen)], [ (assign, "$pin_player_fallen", 1), (str_store_string, s5, "str_retreat"), (call_script, "script_simulate_retreat", 10, 20), (assign, "$g_battle_result", -1), (set_mission_result,-1), (call_script, "script_count_mission_casualties_from_agents"), (finish_mission,0)]), common_battle_inventory, #AI Triggers (0, 0, ti_once, [ (store_mission_timer_a,":mission_time"),(ge,":mission_time",2), (eq, "$formation_ai_switch", 0), ], [(call_script, "script_select_battle_tactic"), (call_script, "script_battle_tactic_init")]), (5, 0, 0, [ (store_mission_timer_a,":mission_time"),(ge,":mission_time",3), (eq, "$formation_ai_switch", 0), (call_script, "script_battle_tactic_apply"), ], []), common_battle_order_panel, common_battle_order_panel_tick, ]+frk_triggers+frk_ai_triggers, ), ( "village_attack_bandits",mtf_battle_mode,charge, "You lead your men to battle.", [ (3,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (1,mtef_team_0|mtef_use_exact_number,0,aif_start_alarmed, 7,[]), (1,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), ], [ common_battle_tab_press, (ti_question_answered, 0, 0, [], [(store_trigger_param_1,":answer"), (eq,":answer",0), (assign, "$pin_player_fallen", 0), (str_store_string, s5, "str_retreat"), (call_script, "script_simulate_retreat", 10, 20), (assign, "$g_battle_result", -1), (call_script, "script_count_mission_casualties_from_agents"), (finish_mission,0),]), (0, 0, ti_once, [], [(assign, "$battle_won", 0), (assign, "$defender_reinforcement_stage", 0), (assign, "$attacker_reinforcement_stage", 0), (assign, "$g_presentation_battle_active", 0), (try_begin), (eq, "$g_mt_mode", vba_after_training), (add_reinforcements_to_entry, 1, 6), (else_try), (add_reinforcements_to_entry, 1, 29), (try_end), (call_script, "script_combat_music_set_situation_with_culture"), ]), common_music_situation_update, common_battle_check_friendly_kills, common_battle_check_victory_condition, common_battle_victory_display, (1, 4, ti_once, [(main_hero_fallen)], [ (assign, "$pin_player_fallen", 1), (str_store_string, s5, "str_retreat"), (call_script, "script_simulate_retreat", 10, 20), (assign, "$g_battle_result", -1), (set_mission_result, -1), (call_script, "script_count_mission_casualties_from_agents"), (finish_mission, 0)]), common_battle_inventory, common_battle_order_panel, common_battle_order_panel_tick, ], ), ( "village_raid",mtf_battle_mode,charge, "You lead your men to battle.", [ (3,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,12,[]), (3,mtef_defenders|mtef_team_0,0,aif_start_alarmed,0,[]), (1,mtef_attackers|mtef_team_1,0,aif_start_alarmed,12,[]), (1,mtef_attackers|mtef_team_1,0,aif_start_alarmed,0,[]), ], [ common_battle_tab_press, (ti_question_answered, 0, 0, [], [(store_trigger_param_1,":answer"), (eq,":answer",0), (assign, "$pin_player_fallen", 0), (str_store_string, s5, "str_retreat"), (call_script, "script_simulate_retreat", 10, 20), (call_script, "script_count_mission_casualties_from_agents"), (finish_mission,0),]), (0, 0, ti_once, [], [(assign,"$battle_won",0), (assign,"$defender_reinforcement_stage",0), (assign,"$attacker_reinforcement_stage",0), (assign, "$g_presentation_battle_active", 0), (call_script, "script_combat_music_set_situation_with_culture"), ]), common_music_situation_update, common_battle_check_friendly_kills, (1, 0, 5, [(lt,"$defender_reinforcement_stage",2), (store_mission_timer_a,":mission_time"), (ge,":mission_time",10), (store_normalized_team_count,":num_defenders", 0), (lt,":num_defenders",6)], [(add_reinforcements_to_entry,0,6),(val_add,"$defender_reinforcement_stage",1)]), (1, 0, 5, [(lt,"$attacker_reinforcement_stage",2), (store_mission_timer_a,":mission_time"), (ge,":mission_time",10), (store_normalized_team_count,":num_attackers", 1), (lt,":num_attackers",6)], [(add_reinforcements_to_entry,3,6),(val_add,"$attacker_reinforcement_stage",1)]), (1, 60, ti_once, [ (store_mission_timer_a,reg(1)), (ge,reg(1),10), (all_enemies_defeated, 5), (neg|main_hero_fallen, 0), (set_mission_result,1), (display_message,"str_msg_battle_won"), (assign,"$battle_won",1), (assign, "$g_battle_result", 1), (try_begin), (eq, "$g_village_raid_evil", 0), (call_script, "script_play_victorious_sound"), (else_try), (play_track, "track_victorious_evil", 1), (try_end), ], [ (call_script, "script_count_mission_casualties_from_agents"), (finish_mission, 1), ]), common_battle_victory_display, (1, 4, ti_once, [(main_hero_fallen)], [ (assign, "$pin_player_fallen", 1), (str_store_string, s5, "str_retreat"), (call_script, "script_simulate_retreat", 10, 20), (assign, "$g_battle_result", -1), (set_mission_result,-1), (call_script, "script_count_mission_casualties_from_agents"), (finish_mission,0)]), common_battle_inventory, common_battle_order_panel, common_battle_order_panel_tick, ## #AI Tiggers ## (0, 0, ti_once, [ ## (store_mission_timer_a,reg(1)),(ge,reg(1),4), ## (call_script, "script_select_battle_tactic"), ## (call_script, "script_battle_tactic_init"), ## ], []), ## (1, 0, 0, [ ## (store_mission_timer_a,reg(1)),(ge,reg(1),4), ## (call_script, "script_battle_tactic_apply"), ## ], []), ], ), ## ( ## "charge_with_allies",mtf_battle_mode,charge_with_ally, ## "Taking a handful of fighters with you, you set off to patrol the area.", ## [ ## (1,mtef_defenders,0,0|aif_start_alarmed,8,[]), ## (0,mtef_defenders,0,0|aif_start_alarmed,0,[]), ## (4,mtef_attackers,0,aif_start_alarmed,8,[]), ## (4,mtef_attackers,0,aif_start_alarmed,0,[]), ## ], ## [ ## (ti_tab_pressed, 0, 0, [], ## [ ## (try_begin), ## (eq, "$battle_won", 1), ## (finish_mission,0), ## (else_try), ## (call_script, "script_cf_check_enemies_nearby"), ## (question_box,"str_do_you_want_to_retreat"), ## (else_try), ## (display_message,"str_can_not_retreat"), ## (try_end), ## ]), ## (ti_question_answered, 0, 0, [], ## [(store_trigger_param_1,":answer"), ## (eq,":answer",0), ## (assign, "$pin_player_fallen", 0), ## (str_store_string, s5, "str_retreat"), ## (call_script, "script_simulate_retreat", 10, 30), ## (finish_mission,0),]), ## ## (0, 0, ti_once, [], [(assign,"$battle_won",0),(assign,"$defender_reinforcement_stage",0),(assign,"$attacker_reinforcement_stage",0)]), ## (1, 0, 5, [(lt,"$defender_reinforcement_stage",2),(store_mission_timer_a,reg(1)),(ge,reg(1),10),(store_defender_count,reg(2)),(lt,reg(2),3)], ## [(add_reinforcements_to_entry,0,4),(val_add,"$defender_reinforcement_stage",1)]), ## (1, 0, 5, [(lt,"$attacker_reinforcement_stage",2),(store_mission_timer_a,reg(1)),(ge,reg(1),10),(store_attacker_count,reg(2)),(lt,reg(2),3)], ## [(add_reinforcements_to_entry,3,4),(val_add,"$attacker_reinforcement_stage",1)]), ## (1, 60, ti_once, [(store_mission_timer_a,reg(1)), ## (ge,reg(1),10),(all_enemies_defeated,2), ## (neg|main_hero_fallen,0), ## (set_mission_result,1), ## (assign, "$g_battle_result", 1), ## (display_message,"str_msg_battle_won"), ## (assign,"$battle_won",1)], ## [(finish_mission,1)]), ## (10, 0, 0, [], [(eq,"$battle_won",1),(display_message,"str_msg_battle_won")]), ## ## (1, 4, ti_once, [(main_hero_fallen)], ## [ ## (assign, "$pin_player_fallen", 1), ## (str_store_string, s5, "str_retreat"), ## (call_script, "script_simulate_retreat", 20, 30), ## (assign, "$g_battle_result", -1), ## (set_mission_result,-1),(finish_mission,0)]), ## (ti_inventory_key_pressed, 0, 0, [(display_message,"str_use_baggage_for_inventory")], []), ## ], ## ), ## ( ## "charge_with_allies_old",mtf_battle_mode,charge_with_ally, ## "Taking a handful of fighters with you, you set off to patrol the area.", ## [(1,mtef_leader_only,0,0,1,[]), ## (1,mtef_no_leader,0,0|aif_start_alarmed,2,[]), ## (1,mtef_reverse_order|mtef_ally_party,0,0|aif_start_alarmed,3,[]), ## (0,mtef_no_leader,0,0|aif_start_alarmed,0,[]), ## (0,mtef_reverse_order|mtef_ally_party,0,0|aif_start_alarmed,0,[]), ## (3,mtef_reverse_order|mtef_enemy_party,0,aif_start_alarmed,6,[]), ## (4,mtef_reverse_order|mtef_enemy_party,0,aif_start_alarmed,0,[])], ## [ ## (ti_tab_pressed, 0, 0, [], ## [ ## (try_begin), ## (eq, "$battle_won", 1), ## (finish_mission,0), ## (else_try), ## (call_script, "script_cf_check_enemies_nearby"), ## (question_box,"str_do_you_want_to_retreat"), ## (else_try), ## (display_message,"str_can_not_retreat"), ## (try_end), ## ]), ## (ti_question_answered, 0, 0, [], ## [(store_trigger_param_1,":answer"),(eq,":answer",0),(finish_mission,0),]), ## ## (0, 0, ti_once, [], [(assign,"$battle_won",0),(assign,"$enemy_reinforcement_stage",0),(assign,"$friend_reinforcement_stage",0),(assign,"$ally_reinforcement_stage",0)]), ## ## (1, 0, 5, [(lt,"$enemy_reinforcement_stage",2),(store_mission_timer_a,reg(1)),(ge,reg(1),10),(store_enemy_count,reg(2)),(lt,reg(2),3)], ## [(add_reinforcements_to_entry,6,3),(val_add,"$enemy_reinforcement_stage",1)]), ## (1, 0, 5, [(lt,"$friend_reinforcement_stage",2),(store_mission_timer_a,reg(1)),(ge,reg(1),10),(store_friend_count,reg(2)),(lt,reg(2),2)], ## [(add_reinforcements_to_entry,3,1),(val_add,"$friend_reinforcement_stage",1)]), ## (1, 0, 5, [(lt,"$ally_reinforcement_stage",2),(store_mission_timer_a,reg(1)),(ge,reg(1),10),(store_ally_count,reg(2)), (lt,reg(2),2)], ## [(add_reinforcements_to_entry,4,2),(val_add,"$ally_reinforcement_stage",1)]), ## (1, 60, ti_once, [(store_mission_timer_a,reg(1)), ## (ge,reg(1),10), ## (all_enemies_defeated,2), ## (neg|main_hero_fallen,0), ## (set_mission_result,1), ## (assign, "$g_battle_result", 1), ## (display_message,"str_msg_battle_won"), ## (assign,"$battle_won",1), ## ], ## [(finish_mission,1)]), ## (10, 0, 0, [], [(eq,"$battle_won",1),(display_message,"str_msg_battle_won")]), ## (1, 4, ti_once, [(main_hero_fallen,0)], ## [(set_mission_result,-1),(finish_mission,1)]), ## (ti_inventory_key_pressed, 0, 0, [(display_message,"str_use_baggage_for_inventory")], []), ## ], ## ), ## ( ## "lead_charge_old",mtf_battle_mode,charge, ## "You lead your men to battle.", ## [ ## (1,mtef_leader_only,0,0,1,[]), ## (1,mtef_no_leader,0,0|aif_start_alarmed,5,[]), ## (0,mtef_no_leader,0,0|aif_start_alarmed,0,[]), ## (3,mtef_enemy_party|mtef_reverse_order,0,aif_start_alarmed,6,[]), ## (4,mtef_enemy_party|mtef_reverse_order,0,aif_start_alarmed,0,[]), ## ], ## [ ## (ti_tab_pressed, 0, 0, [], ## [ ## (try_begin), ## (eq, "$battle_won", 1), ## (finish_mission,0), ## (else_try), ## (call_script, "script_cf_check_enemies_nearby"), ## (question_box,"str_do_you_want_to_retreat"), ## (else_try), ## (display_message,"str_can_not_retreat"), ## (try_end), ## ]), ## (ti_question_answered, 0, 0, [], ## [(store_trigger_param_1,":answer"),(eq,":answer",0),(finish_mission,0),]), ## ## (0, 0, ti_once, [], [(assign,"$battle_won",0),(assign,"$enemy_reinforcement_stage",0),(assign,"$friend_reinforcement_stage",0)]), ## (1, 0, 5, [(lt,"$enemy_reinforcement_stage",2),(store_mission_timer_a,reg(1)),(ge,reg(1),10),(store_enemy_count,reg(2)),(lt,reg(2),3)], ## [(add_reinforcements_to_entry,4,3),(val_add,"$enemy_reinforcement_stage",1)]), ## (1, 0, 5, [(lt,"$friend_reinforcement_stage",2),(store_mission_timer_a,reg(1)),(ge,reg(1),10),(store_friend_count,reg(2)),(lt,reg(2),3)], ## [(add_reinforcements_to_entry,2,3),(val_add,"$friend_reinforcement_stage",1)]), ## (1, 60, ti_once, [(store_mission_timer_a,reg(1)), ## (ge,reg(1),10),(all_enemies_defeated,2), ## (neg|main_hero_fallen,0), ## (set_mission_result,1), ## (assign, "$g_battle_result", 1), ## (display_message,"str_msg_battle_won"), ## (assign,"$battle_won",1)], ## [(finish_mission,1)]), ## (10, 0, 0, [], [(eq,"$battle_won",1),(display_message,"str_msg_battle_won")]), ## (1, 4, ti_once, [(main_hero_fallen)], ## [ ## (assign, "$g_battle_result", -1), ## (set_mission_result,-1),(finish_mission,1)]), ## (ti_inventory_key_pressed, 0, 0, [(display_message,"str_use_baggage_for_inventory")], []), ## ], ## ), ( "besiege_inner_battle_castle",mtf_battle_mode,-1, "You attack the walls of the castle...", [ (0, mtef_attackers|mtef_use_exact_number|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (6, mtef_attackers|mtef_use_exact_number|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (7, mtef_attackers|mtef_use_exact_number|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (16, mtef_defenders|mtef_use_exact_number|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), (17, mtef_defenders|mtef_use_exact_number|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), (18, mtef_defenders|mtef_use_exact_number|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), (19, mtef_defenders|mtef_use_exact_number|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), (20, mtef_defenders|mtef_use_exact_number|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), ], [ (ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]), common_battle_tab_press, (ti_question_answered, 0, 0, [], [(store_trigger_param_1,":answer"), (eq,":answer",0), (assign, "$pin_player_fallen", 0), (str_store_string, s5, "str_retreat"), (call_script, "script_simulate_retreat", 5, 20), (assign, "$g_battle_result", -1), (set_mission_result,-1), (call_script, "script_count_mission_casualties_from_agents"), (finish_mission,0), ]), (0, 0, ti_once, [], [(assign,"$battle_won",0), (assign,"$g_presentation_battle_active", 0), (call_script, "script_music_set_situation_with_culture", mtf_sit_ambushed), ]), #AI Tiggers (0, 0, ti_once, [ (assign, "$defender_team", 0), (assign, "$attacker_team", 1), (assign, "$defender_team_2", 2), (assign, "$attacker_team_2", 3), ], []), common_battle_check_friendly_kills, common_battle_check_victory_condition, common_battle_victory_display, (1, 4, ti_once, [(main_hero_fallen)], [ (assign, "$pin_player_fallen", 1), (str_store_string, s5, "str_retreat"), (call_script, "script_simulate_retreat", 5, 20), (assign, "$g_battle_result", -1), (set_mission_result,-1), (call_script, "script_count_mission_casualties_from_agents"), (finish_mission,0) ]), common_battle_order_panel, common_battle_order_panel_tick, common_battle_inventory, ], ), ( "besiege_inner_battle_town_center",mtf_battle_mode,-1, "You attack the walls of the castle...", [ (0, mtef_attackers|mtef_use_exact_number|mtef_team_1,af_override_horse,aif_start_alarmed,4,[]), (2, mtef_defenders|mtef_use_exact_number|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), (23, mtef_defenders|mtef_use_exact_number|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), (24, mtef_defenders|mtef_use_exact_number|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), (25, mtef_defenders|mtef_use_exact_number|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), (26, mtef_defenders|mtef_use_exact_number|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), (27, mtef_defenders|mtef_use_exact_number|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), (28, mtef_defenders|mtef_use_exact_number|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), ], [ (ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]), common_battle_tab_press, (ti_question_answered, 0, 0, [], [(store_trigger_param_1,":answer"), (eq,":answer",0), (assign, "$pin_player_fallen", 0), (str_store_string, s5, "str_retreat"), (call_script, "script_simulate_retreat", 5, 20), (assign, "$g_battle_result", -1), (set_mission_result,-1), (call_script, "script_count_mission_casualties_from_agents"), (finish_mission,0), ]), (0, 0, ti_once, [], [(assign,"$battle_won",0), (assign,"$g_presentation_battle_active", 0), (call_script, "script_music_set_situation_with_culture", mtf_sit_ambushed), ]), #AI Tiggers (0, 0, ti_once, [ (assign, "$defender_team", 0), (assign, "$attacker_team", 1), (assign, "$defender_team_2", 2), (assign, "$attacker_team_2", 3), ], []), common_battle_check_friendly_kills, common_battle_check_victory_condition, common_battle_victory_display, (1, 4, ti_once, [(main_hero_fallen)], [ (assign, "$pin_player_fallen", 1), (str_store_string, s5, "str_retreat"), (call_script, "script_simulate_retreat", 5, 20), (assign, "$g_battle_result", -1), (set_mission_result,-1), (call_script, "script_count_mission_casualties_from_agents"), (finish_mission,0) ]), common_battle_order_panel, common_battle_order_panel_tick, common_battle_inventory, ], ), ( "castle_attack_walls_defenders_sally",mtf_battle_mode,-1, "You attack the walls of the castle...", [ (0,mtef_attackers|mtef_team_1,af_override_horse,aif_start_alarmed,12,[]), (0,mtef_attackers|mtef_team_1,af_override_horse,aif_start_alarmed,0,[]), (3,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,12,[]), (3,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,0,[]), ], [ (ti_on_agent_spawn, 0, 0, [], [ (store_trigger_param_1, ":agent_no"), (call_script, "script_agent_reassign_team", ":agent_no"), ]), (ti_before_mission_start, 0, 0, [], [ (team_set_relation, 0, 2, 1), (team_set_relation, 1, 3, 1), (call_script, "script_change_banners_and_chest"), (call_script, "script_remove_siege_objects"), ]), common_battle_tab_press, (ti_question_answered, 0, 0, [], [(store_trigger_param_1,":answer"), (eq,":answer",0), (assign, "$pin_player_fallen", 0), (str_store_string, s5, "str_retreat"), (call_script, "script_simulate_retreat", 5, 20), (call_script, "script_count_mission_casualties_from_agents"), (finish_mission,0),]), (0, 0, ti_once, [], [(assign,"$battle_won",0), (assign,"$g_presentation_battle_active", 0), (call_script, "script_combat_music_set_situation_with_culture"), ]), common_music_situation_update, common_battle_check_friendly_kills, (1, 60, ti_once, [(store_mission_timer_a, reg(1)), (ge, reg(1), 10), (all_enemies_defeated, 2), (neg|main_hero_fallen,0), (set_mission_result,1), (display_message,"str_msg_battle_won"), (assign, "$battle_won", 1), (assign, "$g_battle_result", 1), (assign, "$g_siege_sallied_out_once", 1), (assign, "$g_siege_method", 1), #reset siege timer (call_script, "script_play_victorious_sound"), ], [(call_script, "script_count_mission_casualties_from_agents"), (finish_mission,1)]), common_battle_victory_display, (1, 4, ti_once, [(main_hero_fallen)], [ (assign, "$pin_player_fallen", 1), (str_store_string, s5, "str_retreat"), (call_script, "script_simulate_retreat", 5, 20), (assign, "$g_battle_result", -1), (set_mission_result, -1), (call_script, "script_count_mission_casualties_from_agents"), (finish_mission,0)]), common_battle_order_panel, common_battle_order_panel_tick, common_battle_inventory, ], ), ( "castle_attack_walls_belfry",mtf_battle_mode,-1, "You attack the walls of the castle...", [ (0,mtef_attackers|mtef_team_1,af_override_horse,aif_start_alarmed,12,[]), (0,mtef_attackers|mtef_team_1,af_override_horse,aif_start_alarmed,0,[]), (10,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,0,[]), (11,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,7,[]), (15,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,0,[]), (40,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]), (41,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]), (42,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]), (43,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]), (44,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]), (45,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]), (46,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]), (47,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]), ], [ common_battle_mission_start, common_battle_tab_press, common_siege_question_answered, common_siege_init, common_music_situation_update, common_siege_ai_trigger_init, common_siege_ai_trigger_init_2, (0, 0, ti_once, [ (set_show_messages, 0), (team_give_order, "$attacker_team", grc_everyone, mordr_spread_out), (team_give_order, "$attacker_team", grc_everyone, mordr_spread_out), (team_give_order, "$attacker_team", grc_everyone, mordr_spread_out), (set_show_messages, 1), ], []), common_siege_ai_trigger_init_after_2_secs, common_siege_defender_reinforcement_check, common_siege_defender_reinforcement_archer_reposition, common_siege_attacker_reinforcement_check, common_siege_attacker_do_not_stall, common_battle_check_friendly_kills, common_battle_check_victory_condition, common_battle_victory_display, common_siege_refill_ammo, common_siege_check_defeat_condition, common_battle_order_panel, common_battle_order_panel_tick, common_inventory_not_available, common_siege_init_ai_and_belfry, common_siege_move_belfry, common_siege_rotate_belfry, common_siege_assign_men_to_belfry, ], ), ( "castle_attack_walls_ladder",mtf_battle_mode,-1, "You attack the walls of the castle...", [ (0,mtef_attackers|mtef_team_1,af_override_horse,aif_start_alarmed,12,[]), (0,mtef_attackers|mtef_team_1,af_override_horse,aif_start_alarmed,0,[]), (10,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,0,[]), (11,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,7,[]), (15,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,0,[]), (40,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]), (41,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]), (42,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]), (43,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]), (44,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]), (45,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]), (46,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]), ], [ common_battle_mission_start, common_battle_tab_press, common_siege_question_answered, common_siege_init, common_music_situation_update, common_siege_ai_trigger_init, common_siege_ai_trigger_init_2, common_siege_ai_trigger_init_after_2_secs, common_siege_defender_reinforcement_check, common_siege_defender_reinforcement_archer_reposition, common_siege_attacker_reinforcement_check, common_siege_attacker_do_not_stall, common_battle_check_friendly_kills, common_battle_check_victory_condition, common_battle_victory_display, common_siege_refill_ammo, common_siege_check_defeat_condition, common_battle_order_panel, common_battle_order_panel_tick, common_inventory_not_available, ## (15, 0, 0, ## [ ## (get_player_agent_no, ":player_agent"), ## (agent_get_team, ":agent_team", ":player_agent"), ## (neq, "$attacker_team", ":agent_team"), ## (assign, ":non_ranged", 0), ## (assign, ":ranged", 0), ## (assign, ":ranged_pos_x", 0), ## (assign, ":ranged_pos_y", 0), ## (set_fixed_point_multiplier, 100), ## (try_for_agents, ":agent_no"), ## (eq, ":non_ranged", 0), ## (agent_is_human, ":agent_no"), ## (agent_is_alive, ":agent_no"), ## (neg|agent_is_defender, ":agent_no"), ## (agent_get_class, ":agent_class", ":agent_no"), ## (try_begin), ## (neq, ":agent_class", grc_archers), ## (val_add, ":non_ranged", 1), ## (else_try), ## (val_add, ":ranged", 1), ## (agent_get_position, pos0, ":agent_no"), ## (position_get_x, ":pos_x", pos0), ## (position_get_y, ":pos_y", pos0), ## (val_add, ":ranged_pos_x", ":pos_x"), ## (val_add, ":ranged_pos_y", ":pos_y"), ## (try_end), ## (try_end), ## (try_begin), ## (eq, ":non_ranged", 0), ## (gt, ":ranged", 0), ## (val_div, ":ranged_pos_x", ":ranged"), ## (val_div, ":ranged_pos_y", ":ranged"), ## (entry_point_get_position, pos0, 10), ## (init_position, pos1), ## (position_set_x, pos1, ":ranged_pos_x"), ## (position_set_y, pos1, ":ranged_pos_y"), ## (position_get_z, ":pos_z", pos0), ## (position_set_z, pos1, ":pos_z"), ## (get_distance_between_positions, ":dist", pos0, pos1), ## (gt, ":dist", 1000), #average position of archers is more than 10 meters far from entry point 10 ## (team_give_order, "$attacker_team", grc_archers, mordr_hold), ## (team_set_order_position, "$attacker_team", grc_archers, pos0), ## (else_try), ## (team_give_order, "$attacker_team", grc_everyone, mordr_charge), ## (try_end), ## ], ## []), ], ), ( "castle_visit",0,-1, "Castle visit", [(0,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (1,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (2,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (3,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (4,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (5,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (6,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (7,mtef_scene_source|mtef_team_0,af_override_horse,0,1,[]), (8,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(9,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(10,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(11,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), (12,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(13,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(14,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(15,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), (16,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(17,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(18,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(19,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), (20,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(21,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(22,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(23,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), (24,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(25,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(26,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(27,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), (28,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(29,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(30,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(31,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), (32,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(33,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(34,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(35,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), (36,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(37,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(38,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]),(39,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), # Party members (40,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), (41,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), (42,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), (43,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), (44,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), (45,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), (46,mtef_visitor_source|mtef_team_0,af_override_horse,0,1,[]), ], [ (ti_on_agent_spawn, 0, 0, [], [ (store_trigger_param_1, ":agent_no"), (call_script, "script_init_town_agent", ":agent_no"), ]), (ti_tab_pressed, 0, 0, [(set_trigger_result,1)], []), (ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest"), (call_script, "script_remove_siege_objects"), ]), (0, 0, ti_once, [], [ # (call_script, "script_music_set_situation_with_culture", mtf_sit_lords_hall), ]), # (ti_before_mission_start, 0, 0, [], # [(scene_prop_disable,"spr_ramp_12m"),(scene_prop_disable,"spr_portcullis")]), ], ), ( "training_ground_trainer_talk", 0, -1, "Training.", [ (0,mtef_scene_source|mtef_team_0,af_override_horse|af_override_weapons,0,1,[]), (1,mtef_scene_source|mtef_team_0,af_override_horse|af_override_weapons,0,1,[]), (2,mtef_scene_source|mtef_team_0,af_override_horse|af_override_weapons,0,1,[]), (3,mtef_scene_source|mtef_team_0,af_override_horse|af_override_weapons,0,1,[]), (4,mtef_scene_source|mtef_team_0,af_override_horse|af_override_weapons,0,1,[]), (5,mtef_scene_source|mtef_team_0,af_override_horse|af_override_weapons,0,1,[]), (6,mtef_scene_source|mtef_team_0,0,0,1,[]), ], [ (ti_before_mission_start, 0, 0, [], [ (call_script, "script_change_banners_and_chest"), ]), (ti_inventory_key_pressed, 0, 0, [ (set_trigger_result,1), ], []), (ti_tab_pressed, 0, 0, [ (set_trigger_result,1), ], []), (0.0, 1.0, 2.0, [(lt, "$trainer_help_message", 2), ], [(try_begin), (eq, "$trainer_help_message", 0), (tutorial_box, "str_trainer_help_1", "@Tutorial"), (else_try), (tutorial_box, "str_trainer_help_2", "@Tutorial"), (try_end), (val_add, "$trainer_help_message", 1), ]), ], ), ( "training_ground_trainer_training",mtf_arena_fight,-1, "You will fight a match in the arena.", [ (16, mtef_visitor_source|mtef_team_0,af_override_everything,aif_start_alarmed,1,[itm_practice_shield,itm_practice_sword,itm_practice_boots]), (17, mtef_visitor_source|mtef_team_1,af_override_everything,aif_start_alarmed,1,[itm_practice_staff,itm_practice_boots]), (18, mtef_visitor_source|mtef_team_2,af_override_everything,aif_start_alarmed,1,[itm_practice_staff,itm_practice_boots]), (19, mtef_visitor_source|mtef_team_3,af_override_everything,aif_start_alarmed,1,[itm_heavy_practice_sword,itm_practice_boots]), (20, mtef_visitor_source,0,0,1,[]), ], [ (ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]), common_arena_fight_tab_press, (ti_question_answered, 0, 0, [], [ (store_trigger_param_1, ":answer"), (eq, ":answer", 0), (set_jump_mission, "mt_training_ground_trainer_talk"), (modify_visitors_at_site, "$g_training_ground_melee_training_scene"), (reset_visitors), (set_jump_entry, 5), (jump_to_scene, "$g_training_ground_melee_training_scene"), ]), (1, 3, ti_once, [(main_hero_fallen,0)], [ (set_jump_mission, "mt_training_ground_trainer_talk"), (modify_visitors_at_site, "$g_training_ground_melee_training_scene"), (reset_visitors), (set_jump_entry, 5), (jump_to_scene, "$g_training_ground_melee_training_scene"), ]), (1, 3, ti_once, [ (store_mission_timer_a, reg1), (ge, reg1, 1), (num_active_teams_le, 1), (neg|main_hero_fallen), (assign, "$training_fight_won", 1), ], [ (set_jump_mission, "mt_training_ground_trainer_talk"), (modify_visitors_at_site, "$g_training_ground_melee_training_scene"), (reset_visitors), (set_jump_entry, 5), (jump_to_scene, "$g_training_ground_melee_training_scene"), ]), (ti_inventory_key_pressed, 0, 0, [(display_message,"str_cant_use_inventory_arena")], []), ], ), ( "training_ground_training", mtf_arena_fight, -1, "Training.", [ (0,mtef_visitor_source|mtef_team_0,af_override_everything,aif_start_alarmed,1,[itm_practice_staff]), (1,mtef_visitor_source|mtef_team_1,af_override_everything,aif_start_alarmed,1,[itm_practice_staff]), (2,mtef_visitor_source|mtef_team_1,af_override_everything,aif_start_alarmed,1,[itm_practice_staff]), (3,mtef_visitor_source|mtef_team_1,af_override_everything,aif_start_alarmed,1,[itm_practice_staff]), (4,mtef_visitor_source|mtef_team_1,af_override_everything,aif_start_alarmed,1,[itm_practice_staff]), (8,mtef_visitor_source,af_override_weapons|af_override_horse|af_override_head,0,1,[]), (9,mtef_visitor_source,af_override_weapons|af_override_horse|af_override_head,0,1,[]), (10,mtef_visitor_source,af_override_weapons|af_override_horse|af_override_head,0,1,[]), (11,mtef_visitor_source,af_override_weapons|af_override_horse|af_override_head,0,1,[]), (12,mtef_visitor_source,af_override_weapons|af_override_horse|af_override_head,0,1,[]), (13,mtef_visitor_source,af_override_weapons|af_override_horse|af_override_head,0,1,[]), (14,mtef_visitor_source,af_override_weapons|af_override_horse|af_override_head,0,1,[]), (15,mtef_visitor_source,af_override_weapons|af_override_horse|af_override_head,0,1,[]), ], [ (ti_before_mission_start, 0, 0, [], [ (assign, "$g_last_destroyed_gourds", 0), (call_script, "script_change_banners_and_chest")]), common_arena_fight_tab_press, (ti_question_answered, 0, 0, [], [ (store_trigger_param_1,":answer"), (eq,":answer",0), (assign, "$g_training_ground_training_success_ratio", 0), (jump_to_menu, "mnu_training_ground_training_result"), (finish_mission), ]), common_inventory_not_available, (0, 0, ti_once, [ (try_begin), (eq, "$g_mt_mode", ctm_ranged), (set_fixed_point_multiplier, 100), (entry_point_get_position, pos1, 0), (init_position, pos2), (position_set_y, pos2, "$g_training_ground_ranged_distance"), (position_transform_position_to_parent, pos3, pos1, pos2), (copy_position, pos1, pos3), (assign, ":end_cond", 10), (assign, ":shift_value", 0), (try_for_range, ":cur_i", 0, ":end_cond"), (store_sub, ":cur_instance", ":cur_i", ":shift_value"), (scene_prop_get_instance, ":target_object", "spr_gourd", ":cur_instance"), (copy_position, pos2, pos1), (init_position, pos0), (store_random_in_range, ":random_no", 0, 360), (position_rotate_z, pos2, ":random_no"), (store_random_in_range, ":random_no", 50, 600), (position_move_x, pos2, ":random_no"), (store_random_in_range, ":random_no", 0, 360), (position_transform_position_to_local, pos3, pos1, pos2), (position_rotate_z, pos0, ":random_no"), (position_transform_position_to_parent, pos4, pos0, pos3), (position_transform_position_to_parent, pos2, pos1, pos4), (position_set_z_to_ground_level, pos2), (position_move_z, pos2, 150), (assign, ":valid", 1), (try_for_range, ":cur_instance_2", 0, 10), (eq, ":valid", 1), (neq, ":cur_instance", ":cur_instance_2"), (scene_prop_get_instance, ":target_object_2", "spr_gourd", ":cur_instance_2"), (prop_instance_get_position, pos3, ":target_object_2"), (get_distance_between_positions, ":dist", pos2, pos3), (lt, ":dist", 100), (assign, ":valid", 0), (try_end), (try_begin), (eq, ":valid", 0), (val_add, ":end_cond", 1), (val_add, ":shift_value", 1), (else_try), (prop_instance_set_position, ":target_object", pos2), (prop_instance_animate_to_position, ":target_object", pos2, 1), (scene_prop_get_instance, ":target_object_2", "spr_gourd_spike", ":cur_instance"), (position_move_z, pos2, -150), #moving back to ground level (prop_instance_set_position, ":target_object_2", pos2), (prop_instance_animate_to_position, ":target_object_2", pos2, 1), (try_end), (try_end), (else_try), (eq, "$g_mt_mode", ctm_mounted), (assign, ":num_gourds", 0), #First, placing gourds on the spikes (try_for_range, ":cur_i", 0, 100), (scene_prop_get_instance, ":target_object", "spr_gourd", ":cur_i"), (scene_prop_get_instance, ":target_object_2", "spr_gourd_spike", ":cur_i"), (ge, ":target_object", 0), (ge, ":target_object_2", 0), (val_add, ":num_gourds", 1), (prop_instance_get_position, pos0, ":target_object_2"), (position_move_z, pos0, 150), (prop_instance_set_position, ":target_object", pos0), (prop_instance_animate_to_position, ":target_object", pos0, 1), (try_end), (store_sub, ":end_cond", ":num_gourds", "$g_training_ground_training_num_gourds_to_destroy"), #Second, removing gourds and their spikes randomly (try_for_range, ":cur_i", 0, ":end_cond"), (store_random_in_range, ":random_instance", 0, ":num_gourds"), (scene_prop_get_instance, ":target_object", "spr_gourd", ":random_instance"), (prop_instance_get_position, pos0, ":target_object"), (position_get_z, ":pos_z", pos0), (try_begin), (lt, ":pos_z", -50000), (val_add, ":end_cond", 1), #removed already, try again (else_try), (position_set_z, pos0, -100000), (prop_instance_set_position, ":target_object", pos0), (prop_instance_animate_to_position, ":target_object", pos0, 1), (scene_prop_get_instance, ":target_object_2", "spr_gourd_spike", ":random_instance"), (prop_instance_set_position, ":target_object_2", pos0), (prop_instance_animate_to_position, ":target_object_2", pos0, 1), (try_end), (try_end), (try_end), ], []), (1, 3, ti_once, [ (eq, "$g_mt_mode", ctm_melee), (this_or_next|main_hero_fallen), (num_active_teams_le, 1) ], [ (try_begin), (neg|main_hero_fallen), (assign, "$g_training_ground_training_success_ratio", 100), (else_try), (assign, ":alive_enemies", 0), (try_for_agents, ":agent_no"), (agent_is_alive, ":agent_no"), (agent_is_human, ":agent_no"), (agent_get_team, ":team_no", ":agent_no"), (eq, ":team_no", 1), (val_add, ":alive_enemies", 1), (try_end), (store_sub, ":dead_enemies", "$g_training_ground_training_num_enemies", ":alive_enemies"), (store_mul, "$g_training_ground_training_success_ratio", ":dead_enemies", 100), (val_div, "$g_training_ground_training_success_ratio", "$g_training_ground_training_num_enemies"), (try_end), (jump_to_menu, "mnu_training_ground_training_result"), (finish_mission), ]), (1, 3, ti_once, [ (eq, "$g_mt_mode", ctm_ranged), (get_player_agent_no, ":player_agent"), (agent_get_ammo, ":ammo", ":player_agent"), (store_mission_timer_a, ":cur_seconds"), (this_or_next|main_hero_fallen), (this_or_next|eq, ":ammo", 0), (gt, ":cur_seconds", 116), ], [ (store_mul, "$g_training_ground_training_success_ratio", "$scene_num_total_gourds_destroyed", 10), (jump_to_menu, "mnu_training_ground_training_result"), (finish_mission), ]), (1, 3, ti_once, [ (eq, "$g_mt_mode", ctm_mounted), (get_player_agent_no, ":player_agent"), (agent_get_horse, ":player_horse", ":player_agent"), (store_mission_timer_a, ":cur_seconds"), (this_or_next|lt, ":player_horse", 0), (this_or_next|main_hero_fallen), (this_or_next|ge, "$scene_num_total_gourds_destroyed", "$g_training_ground_training_num_gourds_to_destroy"), (gt, ":cur_seconds", 120), ], [ (store_mul, "$g_training_ground_training_success_ratio", "$scene_num_total_gourds_destroyed", 100), (val_div, "$g_training_ground_training_success_ratio", "$g_training_ground_training_num_gourds_to_destroy"), (jump_to_menu, "mnu_training_ground_training_result"), (finish_mission), ]), (0, 0, 0, [ (gt, "$g_last_destroyed_gourds", 0), (try_begin), (eq, "$g_mt_mode", ctm_ranged), (entry_point_get_position, pos1, 0), (position_move_y, pos1, 100, 0), (get_player_agent_no, ":player_agent"), (agent_get_position, pos2, ":player_agent"), (try_begin), (position_is_behind_position, pos2, pos1), (val_add, "$scene_num_total_gourds_destroyed", "$g_last_destroyed_gourds"), (else_try), (display_message, "@You must stay behind the line on the ground! Point is not counted."), (try_end), (else_try), (val_add, "$scene_num_total_gourds_destroyed", "$g_last_destroyed_gourds"), (try_end), (assign, "$g_last_destroyed_gourds", 0), ], []), ], ), ( "sneak_caught_fight",mtf_arena_fight,-1, "You must fight your way out!", [ (0,mtef_visitor_source|mtef_team_0,af_override_all,aif_start_alarmed,1,pilgrim_disguise), (25,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (26,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (27,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (28,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (29,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (30,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (31,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (32,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), # (9,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), ], [ (ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]), (ti_tab_pressed, 0, 0, [], [(question_box,"str_do_you_wish_to_surrender")]), (ti_question_answered, 0, 0, [], [(store_trigger_param_1,":answer"),(eq,":answer",0),(jump_to_menu,"mnu_captivity_start_castle_defeat"),(finish_mission,0),]), (1, 0, ti_once, [], [ (play_sound,"snd_sneak_town_halt"), (call_script, "script_music_set_situation_with_culture", mtf_sit_fight), ]), (0, 3, 0, [ (main_hero_fallen,0), ], [(jump_to_menu,"mnu_captivity_start_castle_defeat"),(finish_mission,0)]), (5, 1, ti_once, [(num_active_teams_le,1),(neg|main_hero_fallen)], [(assign,"$auto_menu",-1),(jump_to_menu,"mnu_sneak_into_town_caught_dispersed_guards"),(finish_mission,1)]), (ti_on_leave_area, 0, ti_once, [], [(assign,"$auto_menu",-1),(jump_to_menu,"mnu_sneak_into_town_caught_ran_away"),(finish_mission,0)]), (ti_inventory_key_pressed, 0, 0, [(display_message,"str_cant_use_inventory_arena")], []), ], ), ( "ai_training",0,-1, "You start training.", [ # (0,0,af_override_horse,aif_start_alarmed,1,[]), (0,0,0,aif_start_alarmed,30,[]), # (1,mtef_no_leader,0,0|aif_start_alarmed,5,[]), # (0,mtef_no_leader,0,0|aif_start_alarmed,0,[]), # (3,mtef_enemy_party|mtef_reverse_order,0,aif_start_alarmed,6,[]), # (4,mtef_enemy_party|mtef_reverse_order,0,aif_start_alarmed,0,[]), ], [ # (ti_before_mission_start, 0, 0, [], [(set_rain, 1,100)]), (ti_tab_pressed, 0, 0, [], [(finish_mission,0)]), (0, 0, ti_once, [], [(assign,"$g_presentation_battle_active", 0), ]), common_battle_order_panel, common_battle_order_panel_tick, ], ), ( "camera_test",0,-1, "camera Test.", [ # (0,mtef_attackers,0,aif_start_alarmed,5,[]), ], [ (1, 0, 0, [(mission_cam_set_mode,1), (entry_point_get_position, pos3, 3), (mission_cam_set_position, pos3)], []), # (ti_before_mission_start, 0, 0, [], [(set_rain, 1,100)]), (ti_tab_pressed, 0, 0, [], [(finish_mission,0)]), ], ), ( "arena_melee_fight",mtf_arena_fight,-1, "You enter a melee fight in the arena.", [ (0,mtef_visitor_source|mtef_team_0,af_override_all,aif_start_alarmed,1,[itm_practice_bow,itm_practice_arrows,itm_practice_horse,itm_arena_tunic_red, itm_red_tourney_helmet]), (1,mtef_visitor_source|mtef_team_0,af_override_all,aif_start_alarmed,1,[itm_heavy_practice_sword, itm_arena_tunic_red]), (2,mtef_visitor_source|mtef_team_0,af_override_all,aif_start_alarmed,1,[itm_heavy_practice_sword,itm_practice_horse,itm_arena_tunic_red, itm_red_tourney_helmet]), (3,mtef_visitor_source|mtef_team_0,af_override_all,aif_start_alarmed,1,[itm_practice_lance,itm_practice_shield,itm_practice_horse,itm_arena_tunic_red, itm_red_tourney_helmet]), (4,mtef_visitor_source|mtef_team_0,af_override_all,aif_start_alarmed,1,[itm_practice_bow,itm_practice_arrows, itm_arena_tunic_red]), (5,mtef_visitor_source|mtef_team_0,af_override_all,aif_start_alarmed,1,[itm_practice_sword,itm_practice_shield,itm_arena_tunic_red]), (6,mtef_visitor_source|mtef_team_0,af_override_all,aif_start_alarmed,1,[itm_heavy_practice_sword,itm_practice_horse,itm_arena_tunic_red]), (7,mtef_visitor_source|mtef_team_0,af_override_all,aif_start_alarmed,1,[itm_practice_lance,itm_practice_shield,itm_practice_horse,itm_arena_tunic_red, itm_red_tourney_helmet]), (8,mtef_visitor_source|mtef_team_1,af_override_all,aif_start_alarmed,1,[itm_practice_bow,itm_practice_arrows,itm_arena_tunic_blue]), (9,mtef_visitor_source|mtef_team_1,af_override_all,aif_start_alarmed,1,[itm_practice_lance,itm_practice_shield,itm_practice_horse,itm_arena_tunic_blue,itm_blue_tourney_helmet]), (10,mtef_visitor_source|mtef_team_1,af_override_all,aif_start_alarmed,1,[itm_heavy_practice_sword,itm_arena_tunic_blue]), (11,mtef_visitor_source|mtef_team_1,af_override_all,aif_start_alarmed,1,[itm_practice_sword,itm_practice_shield,itm_arena_tunic_blue, itm_blue_tourney_helmet]), (12,mtef_visitor_source|mtef_team_1,af_override_all,aif_start_alarmed,1,[itm_practice_bow,itm_practice_arrows,itm_practice_horse,itm_arena_tunic_blue]), (13,mtef_visitor_source|mtef_team_1,af_override_all,aif_start_alarmed,1,[itm_practice_lance,itm_practice_shield,itm_practice_horse,itm_arena_tunic_blue,itm_blue_tourney_helmet]), (14,mtef_visitor_source|mtef_team_1,af_override_all,aif_start_alarmed,1,[itm_heavy_practice_sword,itm_arena_tunic_blue]), (15,mtef_visitor_source|mtef_team_1,af_override_all,aif_start_alarmed,1,[itm_practice_sword,itm_practice_shield,itm_arena_tunic_blue]), (16,mtef_visitor_source|mtef_team_2,af_override_all,aif_start_alarmed,1,[itm_practice_bow,itm_practice_arrows,itm_practice_horse,itm_arena_tunic_green, itm_green_tourney_helmet]), (17,mtef_visitor_source|mtef_team_2,af_override_all,aif_start_alarmed,1,[itm_heavy_practice_sword,itm_arena_tunic_green, itm_green_tourney_helmet]), (18,mtef_visitor_source|mtef_team_2,af_override_all,aif_start_alarmed,1,[itm_heavy_practice_sword,itm_practice_horse,itm_arena_tunic_green, itm_green_tourney_helmet]), (19,mtef_visitor_source|mtef_team_2,af_override_all,aif_start_alarmed,1,[itm_practice_lance,itm_practice_shield,itm_practice_horse,itm_arena_tunic_green, itm_green_tourney_helmet]), (20,mtef_visitor_source|mtef_team_2,af_override_all,aif_start_alarmed,1,[itm_practice_bow,itm_practice_arrows,itm_arena_tunic_green, itm_green_tourney_helmet]), (21,mtef_visitor_source|mtef_team_2,af_override_all,aif_start_alarmed,1,[itm_practice_sword,itm_practice_shield,itm_arena_tunic_green]), (22,mtef_visitor_source|mtef_team_2,af_override_all,aif_start_alarmed,1,[itm_heavy_practice_sword,itm_practice_horse,itm_arena_tunic_green]), (23,mtef_visitor_source|mtef_team_2,af_override_all,aif_start_alarmed,1,[itm_practice_lance,itm_practice_shield,itm_practice_horse,itm_arena_tunic_green, itm_green_tourney_helmet]), (24,mtef_visitor_source|mtef_team_3,af_override_all,aif_start_alarmed,1,[itm_practice_bow,itm_practice_arrows,itm_practice_horse,itm_arena_tunic_yellow, itm_gold_tourney_helmet]), (25,mtef_visitor_source|mtef_team_3,af_override_all,aif_start_alarmed,1,[itm_heavy_practice_sword,itm_arena_tunic_yellow, itm_gold_tourney_helmet]), (26,mtef_visitor_source|mtef_team_3,af_override_all,aif_start_alarmed,1,[itm_heavy_practice_sword,itm_practice_horse,itm_arena_tunic_yellow, itm_gold_tourney_helmet]), (27,mtef_visitor_source|mtef_team_3,af_override_all,aif_start_alarmed,1,[itm_practice_lance,itm_practice_shield,itm_practice_horse,itm_arena_tunic_yellow, itm_gold_tourney_helmet]), (28,mtef_visitor_source|mtef_team_3,af_override_all,aif_start_alarmed,1,[itm_practice_bow,itm_practice_arrows,itm_arena_tunic_yellow, itm_gold_tourney_helmet]), (29,mtef_visitor_source|mtef_team_3,af_override_all,aif_start_alarmed,1,[itm_practice_sword,itm_practice_shield,itm_arena_tunic_yellow]), (30,mtef_visitor_source|mtef_team_3,af_override_all,aif_start_alarmed,1,[itm_heavy_practice_sword,itm_practice_horse,itm_arena_tunic_yellow]), (31,mtef_visitor_source|mtef_team_3,af_override_all,aif_start_alarmed,1,[itm_practice_lance,itm_practice_shield,itm_practice_horse,itm_arena_tunic_yellow, itm_gold_tourney_helmet]), #32 (32, mtef_visitor_source|mtef_team_1,af_override_all,aif_start_alarmed,1,[itm_heavy_practice_sword]), (33,mtef_visitor_source|mtef_team_2,af_override_all,aif_start_alarmed,1,[itm_practice_staff]), (34,mtef_visitor_source|mtef_team_3,af_override_all,aif_start_alarmed,1,[itm_practice_sword, itm_practice_shield]), (35,mtef_visitor_source|mtef_team_4,af_override_all,aif_start_alarmed,1,[itm_practice_staff]), (36, mtef_visitor_source|mtef_team_1,af_override_all,aif_start_alarmed,1,[itm_practice_bow,itm_practice_arrows]), (37,mtef_visitor_source|mtef_team_2,af_override_all,aif_start_alarmed,1,[itm_practice_sword, itm_practice_shield]), (38,mtef_visitor_source|mtef_team_3,af_override_all,aif_start_alarmed,1,[itm_heavy_practice_sword]), (39,mtef_visitor_source|mtef_team_4,af_override_all,aif_start_alarmed,1,[itm_practice_staff]), #40-49 not used yet (24,mtef_visitor_source|mtef_team_3,af_override_all,aif_start_alarmed,1,[itm_practice_bow,itm_practice_arrows,itm_practice_horse,itm_arena_tunic_yellow, itm_gold_tourney_helmet]), (24,mtef_visitor_source|mtef_team_3,af_override_all,aif_start_alarmed,1,[itm_heavy_practice_sword,itm_arena_tunic_yellow, itm_gold_tourney_helmet]), (24,mtef_visitor_source|mtef_team_3,af_override_all,aif_start_alarmed,1,[itm_heavy_practice_sword,itm_practice_horse,itm_arena_tunic_yellow, itm_gold_tourney_helmet]), (24,mtef_visitor_source|mtef_team_3,af_override_all,aif_start_alarmed,1,[itm_practice_lance,itm_practice_shield,itm_practice_horse,itm_arena_tunic_yellow, itm_gold_tourney_helmet]), (24,mtef_visitor_source|mtef_team_3,af_override_all,aif_start_alarmed,1,[itm_practice_bow,itm_practice_arrows,itm_arena_tunic_yellow, itm_gold_tourney_helmet]), (24,mtef_visitor_source|mtef_team_3,af_override_all,aif_start_alarmed,1,[itm_practice_sword,itm_practice_shield,itm_arena_tunic_yellow]), (24,mtef_visitor_source|mtef_team_3,af_override_all,aif_start_alarmed,1,[itm_heavy_practice_sword,itm_practice_horse,itm_arena_tunic_yellow]), (24,mtef_visitor_source|mtef_team_3,af_override_all,aif_start_alarmed,1,[itm_practice_lance,itm_practice_shield,itm_practice_horse,itm_arena_tunic_yellow, itm_gold_tourney_helmet]), (24,mtef_visitor_source|mtef_team_3,af_override_all,aif_start_alarmed,1,[itm_practice_bow,itm_practice_arrows,itm_practice_horse,itm_arena_tunic_yellow, itm_gold_tourney_helmet]), (24,mtef_visitor_source|mtef_team_3,af_override_all,aif_start_alarmed,1,[itm_practice_bow,itm_practice_arrows,itm_practice_horse,itm_arena_tunic_yellow, itm_gold_tourney_helmet]), (50, mtef_scene_source,af_override_horse|af_override_weapons|af_override_head,0,1,[]), (51, mtef_visitor_source,af_override_horse|af_override_weapons|af_override_head,0,1,[]), (52, mtef_scene_source,af_override_horse,0,1,[]), #not used yet: (53, mtef_scene_source,af_override_horse,0,1,[]),(54, mtef_scene_source,af_override_horse,0,1,[]),(55, mtef_scene_source,af_override_horse,0,1,[]), #used for torunament master scene (56, mtef_visitor_source|mtef_team_0, af_override_all, aif_start_alarmed, 1, [itm_practice_sword, itm_practice_shield, itm_padded_cloth, itm_segmented_helmet]), (57, mtef_visitor_source|mtef_team_0, af_override_all, aif_start_alarmed, 1, [itm_practice_sword, itm_practice_shield, itm_padded_cloth, itm_segmented_helmet]), ], tournament_triggers ), ( "arena_challenge_fight",mtf_arena_fight|mtf_commit_casualties,-1, "You enter a melee fight in the arena.", [ (56, mtef_visitor_source|mtef_team_0, 0, aif_start_alarmed, 1, []), (58, mtef_visitor_source|mtef_team_2, 0, aif_start_alarmed, 1, []), ], [ common_inventory_not_available, (ti_tab_pressed, 0, 0, [(display_message, "@Cannot leave now.")], []), (ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]), (0, 0, ti_once, [], [ (call_script, "script_music_set_situation_with_culture", mtf_sit_arena), ]), (1, 4, ti_once, [(this_or_next|main_hero_fallen),(num_active_teams_le,1)], [ (try_begin), (main_hero_fallen), (call_script, "script_fail_quest", "qst_duel_for_lady"), (else_try), (call_script, "script_succeed_quest", "qst_duel_for_lady"), (try_end), (finish_mission), ]), ], ), ## ( ## "tutorial",0,-1, ## "You enter the training ground.", ## [ ## (1,mtef_leader_only,af_override_horse,0,1,[]), #af_override_weapons ## (2,mtef_scene_source,af_override_horse,0,1,[]), #af_override_weapons ## ], ## [ ## (ti_tab_pressed, 0, 0, [], ## [(question_box,"str_do_you_wish_to_leave_tutorial")]), ## (ti_question_answered, 0, 0, [], ## [(store_trigger_param_1,":answer"), ## (eq,":answer",0), ## (finish_mission,0), ## (leave_encounter), ## (change_screen_return), ## (troop_remove_item, "trp_player", "itm_tutorial_sword"), ## (troop_remove_item, "trp_player", "itm_tutorial_axe"), ## (troop_remove_item, "trp_player", "itm_tutorial_spear"), ## (troop_remove_item, "trp_player", "itm_tutorial_club"), ## (troop_remove_item, "trp_player", "itm_tutorial_battle_axe"), ## (troop_remove_item, "trp_player", "itm_tutorial_arrows"), ## (troop_remove_item, "trp_player", "itm_tutorial_bolts"), ## (troop_remove_item, "trp_player", "itm_tutorial_short_bow"), ## (troop_remove_item, "trp_player", "itm_tutorial_crossbow"), ## (troop_remove_item, "trp_player", "itm_tutorial_throwing_daggers"), ## ## (check_quest_active, "qst_destroy_dummies"), ## (cancel_quest,"qst_destroy_dummies"), ## ]), ### (ti_inventory_key_pressed, 0, 0, [(display_message,"str_cant_use_inventory_tutorial")], []), ## (ti_inventory_key_pressed, 0, 0, [(set_trigger_result,1)], []), ## ## ## (0, 0, ti_once, [], ## [ ## (assign, "$tutorial_enter_melee", 0), ## (assign, "$tutorial_enter_ranged", 0), ## (assign, "$tutorial_enter_mounted", 0), ## (assign, "$tutorial_camp_stage", 0), ## (assign, "$tutorial_quest_taken", 0), ## (assign, "$tutorial_quest_succeeded", 0), ## (assign, "$tutorial_num_total_dummies_destroyed", 0), ## (assign, "$tutorial_melee_chest", 0), ## (assign, "$tutorial_ranged_chest", 0), ## (assign, "$tutorial_award_taken", 0), ## ## ## (entry_point_get_position,2,2),#Trainer ## (entry_point_get_position,16,16),#Horse ## (set_spawn_position, 16), ## (spawn_horse, "itm_tutorial_saddle_horse"), ## ## (troop_remove_item, "trp_tutorial_chest_1", "itm_tutorial_sword"), ## (troop_remove_item, "trp_tutorial_chest_1", "itm_tutorial_axe"), ## (troop_remove_item, "trp_tutorial_chest_1", "itm_tutorial_spear"), ## (troop_remove_item, "trp_tutorial_chest_1", "itm_tutorial_club"), ## (troop_remove_item, "trp_tutorial_chest_1", "itm_tutorial_battle_axe"), ## (troop_remove_item, "trp_tutorial_chest_2", "itm_tutorial_arrows"), ## (troop_remove_item, "trp_tutorial_chest_2", "itm_tutorial_bolts"), ## (troop_remove_item, "trp_tutorial_chest_2", "itm_tutorial_short_bow"), ## (troop_remove_item, "trp_tutorial_chest_2", "itm_tutorial_crossbow"), ## (troop_remove_item, "trp_tutorial_chest_2", "itm_tutorial_throwing_daggers"), ## (troop_add_item, "trp_tutorial_chest_1", "itm_tutorial_sword"), ## (troop_add_item, "trp_tutorial_chest_1", "itm_tutorial_axe"), ## (troop_add_item, "trp_tutorial_chest_1", "itm_tutorial_spear"), ## (troop_add_item, "trp_tutorial_chest_1", "itm_tutorial_club"), ## (troop_add_item, "trp_tutorial_chest_1", "itm_tutorial_battle_axe"), ## (troop_add_item, "trp_tutorial_chest_2", "itm_tutorial_arrows"), ## (troop_add_item, "trp_tutorial_chest_2", "itm_tutorial_bolts"), ## (troop_add_item, "trp_tutorial_chest_2", "itm_tutorial_short_bow"), ## (troop_add_item, "trp_tutorial_chest_2", "itm_tutorial_crossbow"), ## (troop_add_item, "trp_tutorial_chest_2", "itm_tutorial_throwing_daggers"), ## ] ## ), ## ## (1, 0, ti_once, [(store_character_level, ":player_level", "trp_player"), ## (le, ":player_level", 1), ## (get_player_agent_no, ":player_agent"), ## (ge, ":player_agent", 0), ## (agent_get_position, pos1, ":player_agent"), ## (entry_point_get_position,3,3), ## (get_distance_between_positions, ":distance_to_area", 1, 3), ## (lt, ":distance_to_area", 500), ## (eq, "$tutorial_enter_melee", 0),], ## [(tutorial_box,"str_tutorial_enter_melee", "str_tutorial"), (val_add,"$tutorial_enter_melee", 1)]), ## (1, 0, ti_once, [(store_character_level, ":player_level", "trp_player"), ## (le, ":player_level", 1), ## (get_player_agent_no, ":player_agent"), ## (ge, ":player_agent", 0), ## (neg|conversation_screen_is_active), ## (agent_get_position, pos1, ":player_agent"), ## (entry_point_get_position,4,4), ## (get_distance_between_positions, ":distance_to_area", 1, 4), ## (lt, ":distance_to_area", 500), ## (eq, "$tutorial_enter_ranged", 0),], ## [(tutorial_box,"str_tutorial_enter_ranged", "str_tutorial"), (val_add,"$tutorial_enter_ranged", 1)]), ## (1, 0, ti_once, [(store_character_level, ":player_level", "trp_player"), ## (le, ":player_level", 1), ## (get_player_agent_no, ":player_agent"), ## (ge, ":player_agent", 0), ## (neg|conversation_screen_is_active), ## (agent_get_position, pos1, ":player_agent"), ## (entry_point_get_position,5,5), ## (get_distance_between_positions, ":distance_to_area", 1, 5), ## (lt, ":distance_to_area", 500), ## (eq, "$tutorial_enter_mounted", 0),], ## [(tutorial_box,"str_tutorial_enter_mounted", "str_tutorial"), (val_add,"$tutorial_enter_mounted", 1)]), ## ## ## (2, 0, ti_once, [(store_character_level, ":player_level", "trp_player"), ## (le, ":player_level", 1), ## (get_player_agent_no, ":player_agent"), ## (ge, ":player_agent", 0), ## (neg|conversation_screen_is_active), ## (agent_get_position, pos1, ":player_agent"), ## (entry_point_get_position,6,6), ## (get_distance_between_positions, ":distance_to_area", 1, 6), ## (lt, ":distance_to_area", 300), ## (eq, "$tutorial_melee_chest", 0),], ## [(tutorial_box,"str_tutorial_melee_chest", "str_tutorial"), (val_add,"$tutorial_melee_chest", 1)]), ## (2, 0, ti_once, [(store_character_level, ":player_level", "trp_player"), ## (le, ":player_level", 1), ## (get_player_agent_no, ":player_agent"), ## (ge, ":player_agent", 0), ## (agent_get_position, pos1, ":player_agent"), ## (entry_point_get_position,7,7), ## (get_distance_between_positions, ":distance_to_area", 1, 7), ## (lt, ":distance_to_area", 300), ## (eq, "$tutorial_ranged_chest", 0),], ## [(tutorial_box,"str_tutorial_ranged_chest", "str_tutorial"), (val_add,"$tutorial_ranged_chest", 1)]), ## ## (2, 0, ti_once, [(store_character_level, ":player_level", "trp_player"), ## (le, ":player_level", 1), ## (eq, "$tutorial_item_equipped", 0), ## (try_begin), ## (troop_has_item_equipped, "trp_player", "itm_tutorial_sword"), ## (assign, "$tutorial_item_equipped", 1), ## (else_try), ## (troop_has_item_equipped, "trp_player", "itm_tutorial_axe"), ## (assign, "$tutorial_item_equipped", 1), ## (else_try), ## (troop_has_item_equipped, "trp_player", "itm_tutorial_spear"), ## (assign, "$tutorial_item_equipped", 1), ## (else_try), ## (troop_has_item_equipped, "trp_player", "itm_tutorial_club"), ## (assign, "$tutorial_item_equipped", 1), ## (else_try), ## (troop_has_item_equipped, "trp_player", "itm_tutorial_battle_axe"), ## (assign, "$tutorial_item_equipped", 1), ## (else_try), ## (troop_has_item_equipped, "trp_player", "itm_tutorial_arrows"), ## (assign, "$tutorial_item_equipped", 1), ## (else_try), ## (troop_has_item_equipped, "trp_player", "itm_tutorial_bolts"), ## (assign, "$tutorial_item_equipped", 1), ## (else_try), ## (troop_has_item_equipped, "trp_player", "itm_tutorial_short_bow"), ## (assign, "$tutorial_item_equipped", 1), ## (else_try), ## (troop_has_item_equipped, "trp_player", "itm_tutorial_crossbow"), ## (assign, "$tutorial_item_equipped", 1), ## (else_try), ## (troop_has_item_equipped, "trp_player", "itm_tutorial_throwing_daggers"), ## (assign, "$tutorial_item_equipped", 1), ## (try_end), ## (eq, "$tutorial_item_equipped", 1),], ## [(tutorial_box,"str_tutorial_item_equipped", "str_tutorial")]), ## ## ## ## ### (2, 0, ti_once, [(get_player_agent_no, ":player_agent"), ### (agent_get_position, pos1, ":player_agent"), ### (entry_point_get_position,21,21), ### (get_distance_between_positions, ":distance_to_area", 1, 21), ### (lt, ":distance_to_area", 200), ### (eq, "$tutorial_group_of_weapons", 0),], ### [(tutorial_box,"str_tutorial_group_of_weapons", "str_tutorial"), (val_add,"$tutorial_group_of_weapons", 1)]), ## ## ## ## (1, 5, ti_once, [(eq,"$tutorial_camp_stage",0), ## (neg|conversation_screen_is_active), ## (eq,"$tutorial_quest_award_taken",0), ## (store_character_level, ":player_level", "trp_player"), ## (le, ":player_level", 1), ## (tutorial_box,"str_tutorial_camp1","str_tutorial"),], ## [(val_add,"$tutorial_camp_stage",1)]), ## (1, 3, ti_once, [(eq,"$tutorial_camp_stage",1), ## (neg|conversation_screen_is_active), ## (tutorial_box,"str_tutorial_camp2","str_tutorial"),], ## [(val_add,"$tutorial_camp_stage",1)]), ## (1, 3, ti_once, [(eq,"$tutorial_camp_stage",2), ## (neg|conversation_screen_is_active), ## (tutorial_box,"str_tutorial_camp3","str_tutorial"),], ## [(val_add,"$tutorial_camp_stage",1)]), ## (1, 3, ti_once, [(eq,"$tutorial_camp_stage",3),(eq, "$tutorial_award_taken", 0), ## (neg|conversation_screen_is_active), ## (tutorial_box,"str_tutorial_camp4","str_tutorial"),], ## [(val_add,"$tutorial_camp_stage",2)]), ## ## ## (1, 3, ti_once, [(eq,"$tutorial_camp_stage",5), ## (neg|conversation_screen_is_active), ## (eq,"$tutorial_quest_taken",1), ## (tutorial_box,"str_tutorial_camp6","str_tutorial"),], ## [(val_add,"$tutorial_camp_stage",1)]), ## ## (1, 3, ti_once, [(eq,"$tutorial_camp_stage",6), ## (neg|conversation_screen_is_active), ## (ge,"$tutorial_num_total_dummies_destroyed",10), ## (tutorial_box,"str_tutorial_camp7","str_tutorial"),], ## [(val_add,"$tutorial_camp_stage",1), (assign,"$tutorial_quest_succeeded",1),]), ## ## (1, 3, ti_once, [(eq,"$tutorial_camp_stage",7), ## (neg|conversation_screen_is_active), ## (eq,"$tutorial_quest_award_taken",1), ## (tutorial_box,"str_tutorial_camp8","str_tutorial"), ## (troop_add_proficiency_points, "trp_player", 10), ## (assign, "$tutorial_last_proficiency_sum", 0), ## (try_for_range, ":cur_attribute", 0, num_weapon_proficiencies), ## (store_proficiency_level, ":cur_attribute_point", "trp_player", ":cur_attribute"), ## (val_add, "$tutorial_last_proficiency_sum", ":cur_attribute_point"), ## (try_end),], ## [(val_add,"$tutorial_camp_stage",1),]), ## ## (1, 3, ti_once, [(eq,"$tutorial_camp_stage",8), ## (neg|conversation_screen_is_active), ## (assign, ":new_proficiency_sum", 0), ## (try_for_range, ":cur_attribute", 0, num_weapon_proficiencies), ## (store_proficiency_level, ":cur_attribute_point", "trp_player", ":cur_attribute"), ## (val_add, ":new_proficiency_sum", ":cur_attribute_point"), ## (try_end), ## (assign, reg(48), ":new_proficiency_sum"), ## (assign, reg(49), "$tutorial_last_proficiency_sum"), ## (lt,"$tutorial_last_proficiency_sum",":new_proficiency_sum"), ## (tutorial_box,"str_tutorial_camp9","str_tutorial"),], ## [(val_add,"$tutorial_camp_stage",1)]), ## ## (2, 0, 0, [(check_quest_active,"qst_destroy_dummies"), ## (le, "$tutorial_num_total_dummies_destroyed", 10),], ## [ ## (assign, ":progress", "$tutorial_num_total_dummies_destroyed"), ## (val_mul, ":progress", 10), ## (set_quest_progression,"qst_destroy_dummies",":progress"), ## ] ## ), ## ## ], ## ), ( "tutorial_1",0,-1, "You enter the training ground.", [ (0,mtef_leader_only,af_override_horse|af_override_weapons,0,1,[itm_tutorial_shield,itm_tutorial_sword,itm_tutorial_short_bow,itm_tutorial_arrows]), #af_override_weapons ], [ (ti_tab_pressed, 0, 0, [], [(try_begin), (lt, "$tutorial_1_state", 5), (question_box, "str_do_you_wish_to_leave_tutorial"), (else_try), (finish_mission,0), (try_end), ]), (ti_question_answered, 0, 0, [], [(store_trigger_param_1,":answer"), (eq,":answer",0), (finish_mission,0), ]), (ti_inventory_key_pressed, 0, 0, [(display_message, "str_cant_use_inventory_tutorial")], []), (0, 0, ti_once, [(assign, "$tutorial_1_state", 0), (assign, "$tutorial_1_msg_1_displayed", 0), (assign, "$tutorial_1_msg_2_displayed", 0), (assign, "$tutorial_1_msg_3_displayed", 0), (assign, "$tutorial_1_msg_4_displayed", 0), (assign, "$tutorial_1_msg_5_displayed", 0), (assign, "$tutorial_1_msg_6_displayed", 0), ], []), (0, 0, 0, [(try_begin), (eq, "$tutorial_1_state", 0), (try_begin), (eq, "$tutorial_1_msg_1_displayed", 0), (store_mission_timer_a, ":cur_time"), (gt, ":cur_time", 0), (assign, "$tutorial_1_msg_1_displayed", 1), (tutorial_message, "str_tutorial_1_msg_1"), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_yellow", 0), (entry_point_get_position,pos1,1), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (try_end), (tutorial_message, "str_tutorial_1_msg_1"), (get_player_agent_no, ":player_agent"), (agent_get_position, pos1, ":player_agent"), (entry_point_get_position,pos2,1), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 100), (val_add, "$tutorial_1_state", 1), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_a", 0), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, -90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_yellow", 0), (entry_point_get_position,pos1,2), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (else_try), (eq, "$tutorial_1_state", 1), (try_begin), (eq, "$tutorial_1_msg_2_displayed", 0), (assign, "$tutorial_1_msg_2_displayed", 1), (tutorial_message, "str_tutorial_1_msg_2"), (play_sound, "snd_tutorial_1"), (try_end), (get_player_agent_no, ":player_agent"), (agent_get_position, pos1, ":player_agent"), (entry_point_get_position,pos2,2), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 100), (val_add, "$tutorial_1_state", 1), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_a", 1), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, 90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_yellow", 0), (entry_point_get_position,pos1,3), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (else_try), (eq, "$tutorial_1_state", 2), (try_begin), (eq, "$tutorial_1_msg_3_displayed", 0), (assign, "$tutorial_1_msg_3_displayed", 1), (tutorial_message, "str_tutorial_1_msg_3"), (assign, "$tutorial_num_total_dummies_destroyed", 0), (play_sound, "snd_tutorial_1"), (try_end), (ge, "$tutorial_num_total_dummies_destroyed", 4), (val_add, "$tutorial_1_state", 1), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_a", 2), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, 90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (else_try), (eq, "$tutorial_1_state", 3), (try_begin), (eq, "$tutorial_1_msg_4_displayed", 0), (assign, "$tutorial_1_msg_4_displayed", 1), (tutorial_message, "str_tutorial_1_msg_4"), (store_mission_timer_a, "$tutorial_time"), (play_sound, "snd_tutorial_1"), (try_end), (store_mission_timer_a, ":cur_time"), (val_sub, ":cur_time", "$tutorial_time"), (gt, ":cur_time", 10), (val_add, "$tutorial_1_state", 1), (else_try), (eq, "$tutorial_1_state", 4), (try_begin), (eq, "$tutorial_1_msg_5_displayed", 0), (assign, "$tutorial_1_msg_5_displayed", 1), (tutorial_message, "str_tutorial_1_msg_5"), (assign, "$g_last_archery_point_earned", 0), (assign, "$tutorial_num_arrows_hit", 0), (play_sound, "snd_tutorial_1"), (try_end), (try_begin), (get_player_agent_no, ":player_agent"), (agent_get_ammo, ":cur_ammo", ":player_agent"), (le, ":cur_ammo", 0), (agent_refill_ammo, ":player_agent"), (tutorial_message, "str_tutorial_ammo_refilled"), (try_end), (gt, "$g_last_archery_point_earned", 0), (assign, "$g_last_archery_point_earned", 0), (val_add, "$tutorial_num_arrows_hit", 1), (gt, "$tutorial_num_arrows_hit", 2), (val_add, "$tutorial_1_state", 1), (else_try), (eq, "$tutorial_1_state", 5), (eq, "$tutorial_1_msg_6_displayed", 0), (assign, "$tutorial_1_msg_6_displayed", 1), (tutorial_message, "str_tutorial_1_msg_6"), (play_sound, "snd_tutorial_2"), (assign, "$tutorial_1_finished", 1), (try_end), ], []), ], ), ( "tutorial_2",mtf_arena_fight,-1, "You enter the training ground.", [ (0,mtef_leader_only|mtef_team_0,af_override_horse|af_override_weapons,0,1,[itm_tutorial_shield]), (2,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (4,mtef_visitor_source|mtef_team_1,0,0,1,[]), ], [ (ti_tab_pressed, 0, 0, [], [(try_begin), (lt, "$tutorial_2_state", 9), (question_box,"str_do_you_wish_to_leave_tutorial"), (else_try), (finish_mission,0), (try_end), ]), (ti_question_answered, 0, 0, [], [(store_trigger_param_1,":answer"), (eq,":answer",0), (finish_mission,0), ]), (ti_inventory_key_pressed, 0, 0, [(display_message,"str_cant_use_inventory_tutorial")], []), (0, 0, ti_once, [ (store_mission_timer_a, ":cur_time"), (gt, ":cur_time", 2), (main_hero_fallen), (assign, "$tutorial_2_state", 100), ], []), (0, 0, ti_once, [(assign, "$tutorial_2_state", 0), (assign, "$tutorial_2_msg_1_displayed", 0), (assign, "$tutorial_2_msg_2_displayed", 0), (assign, "$tutorial_2_msg_3_displayed", 0), (assign, "$tutorial_2_msg_4_displayed", 0), (assign, "$tutorial_2_msg_5_displayed", 0), (assign, "$tutorial_2_msg_6_displayed", 0), (assign, "$tutorial_2_msg_7_displayed", 0), (assign, "$tutorial_2_msg_8_displayed", 0), (assign, "$tutorial_2_msg_9_displayed", 0), (assign, "$tutorial_2_melee_agent_state", 0), ], []), (10, 0, 0, [(call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_archer"), (agent_refill_ammo, reg0)], []), (0, 0, 0, [(try_begin), (eq, "$tutorial_2_state", 0), (try_begin), (eq, "$tutorial_2_msg_1_displayed", 0), (store_mission_timer_a, ":cur_time"), (gt, ":cur_time", 0), (assign, "$tutorial_2_msg_1_displayed", 1), (tutorial_message, "str_tutorial_2_msg_1"), (team_give_order, 1, grc_everyone, mordr_stand_ground), (team_give_order, 1, grc_infantry, mordr_charge), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_maceman"), (assign, ":cur_agent", reg0), (agent_get_position, pos1, ":cur_agent"), (agent_set_scripted_destination, ":cur_agent", pos1, 0), (try_end), (get_player_agent_no, ":player_agent"), (agent_get_position, pos1, ":player_agent"), (entry_point_get_position,pos2,1), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 200), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_a", 0), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, 90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (val_add, "$tutorial_2_state", 1), (else_try), (eq, "$tutorial_2_state", 1), (scene_prop_get_instance, ":barrier_object", "spr_barrier_4m", 0), (prop_instance_get_position, pos1, ":barrier_object"), (get_player_agent_no, ":player_agent"), (agent_get_position, pos2, ":player_agent"), (position_is_behind_position, pos2, pos1), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_a", 0), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, -90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (val_add, "$tutorial_2_state", 1), (else_try), (eq, "$tutorial_2_state", 2), (try_begin), (eq, "$tutorial_2_melee_agent_state", 0), (val_add, "$tutorial_2_melee_agent_state", 1), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_maceman"), (assign, ":cur_agent", reg0), (entry_point_get_position, pos1, 3), (agent_set_scripted_destination, ":cur_agent", pos1, 0), (else_try), (eq, "$tutorial_2_melee_agent_state", 1), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_maceman"), (assign, ":cur_agent", reg0), (entry_point_get_position, pos1, 3), (agent_get_position, pos2, ":cur_agent"), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 250), (agent_clear_scripted_mode, ":cur_agent"), (val_add, "$tutorial_2_melee_agent_state", 1), (store_mission_timer_a,"$tutorial_time"), (else_try), (eq, "$tutorial_2_melee_agent_state", 2), (try_begin), (eq, "$tutorial_2_msg_2_displayed", 0), (assign, "$tutorial_2_msg_2_displayed", 1), (play_sound, "snd_tutorial_1"), (try_end), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_maceman"), (assign, ":cur_agent", reg0), (store_mission_timer_a,":cur_time"), (val_sub, ":cur_time", "$tutorial_time"), (store_sub, reg3, 20, ":cur_time"), (tutorial_message, "str_tutorial_2_msg_2"), (gt, ":cur_time", 20), (entry_point_get_position, pos1, 3), (agent_set_scripted_destination, ":cur_agent", pos1, 0), (val_add, "$tutorial_2_melee_agent_state", 1), (else_try), (eq, "$tutorial_2_melee_agent_state", 3), (try_begin), (eq, "$tutorial_2_msg_3_displayed", 0), (assign, "$tutorial_2_msg_3_displayed", 1), (tutorial_message, "str_tutorial_2_msg_3"), (play_sound, "snd_tutorial_1"), (try_end), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_maceman"), (assign, ":cur_agent", reg0), (entry_point_get_position, pos1, 3), (agent_get_position, pos2, ":cur_agent"), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 250), (entry_point_get_position, pos1, 2), (agent_set_scripted_destination, ":cur_agent", pos1, 0), (val_add, "$tutorial_2_melee_agent_state", 1), (else_try), (eq, "$tutorial_2_melee_agent_state", 4), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_maceman"), (assign, ":cur_agent", reg0), (entry_point_get_position, pos1, 2), (agent_get_position, pos2, ":cur_agent"), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 250), (entry_point_get_position, pos1, 30), (agent_set_position, ":cur_agent", pos1), (agent_set_scripted_destination, ":cur_agent", pos1, 0), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_a", 1), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, 90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (val_add, "$tutorial_2_melee_agent_state", 1), (val_add, "$tutorial_2_state", 1), (try_end), (else_try), (eq, "$tutorial_2_state", 3), (scene_prop_get_instance, ":barrier_object", "spr_barrier_4m", 1), (prop_instance_get_position, pos1, ":barrier_object"), (get_player_agent_no, ":player_agent"), (agent_get_position, pos2, ":player_agent"), (position_is_behind_position, pos2, pos1), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_a", 1), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, -90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (store_mission_timer_a,"$tutorial_time"), (val_add, "$tutorial_2_state", 1), (else_try), (eq, "$tutorial_2_state", 4), (try_begin), (eq, "$tutorial_2_msg_4_displayed", 0), (assign, "$tutorial_2_msg_4_displayed", 1), (play_sound, "snd_tutorial_1"), (try_end), (store_mission_timer_a,":cur_time"), (val_sub, ":cur_time", "$tutorial_time"), (store_sub, reg3, 20, ":cur_time"), (tutorial_message, "str_tutorial_2_msg_4"), (gt, ":cur_time", 20), (entry_point_get_position,pos1,5), (set_spawn_position, pos1), (spawn_item, "itm_tutorial_sword"), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_maceman"), (assign, ":cur_agent", reg0), (entry_point_get_position, pos1, 3), (agent_set_position, ":cur_agent", pos1), (agent_set_scripted_destination, ":cur_agent", pos1, 0), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_a", 2), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, 90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (val_add, "$tutorial_2_state", 1), (else_try), (eq, "$tutorial_2_state", 5), (try_begin), (eq, "$tutorial_2_msg_5_displayed", 0), (assign, "$tutorial_2_msg_5_displayed", 1), (tutorial_message, "str_tutorial_2_msg_5"), (play_sound, "snd_tutorial_1"), (try_end), (scene_prop_get_instance, ":barrier_object", "spr_barrier_4m", 2), (prop_instance_get_position, pos1, ":barrier_object"), (get_player_agent_no, ":player_agent"), (agent_get_position, pos2, ":player_agent"), (position_is_behind_position, pos2, pos1), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_a", 2), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, -90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (val_add, "$tutorial_2_state", 1), (else_try), (eq, "$tutorial_2_state", 6), (try_begin), (eq, "$tutorial_2_msg_6_displayed", 0), (assign, "$tutorial_2_msg_6_displayed", 1), (tutorial_message, "str_tutorial_2_msg_6"), (play_sound, "snd_tutorial_1"), (try_end), (get_player_agent_no, ":player_agent"), (agent_has_item_equipped, ":player_agent", "itm_tutorial_sword"), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_a", 3), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, -90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (val_add, "$tutorial_2_state", 1), (else_try), (eq, "$tutorial_2_state", 7), (try_begin), (eq, "$tutorial_2_msg_7_displayed", 0), (assign, "$tutorial_2_msg_7_displayed", 1), (tutorial_message, "str_tutorial_2_msg_7"), (play_sound, "snd_tutorial_1"), (get_player_agent_no, ":player_agent"), (agent_set_hit_points, ":player_agent", 100), (try_end), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_archer"), (assign, ":cur_agent", reg0), (neg|agent_is_alive, ":cur_agent"), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_maceman"), (assign, ":cur_agent", reg0), (agent_clear_scripted_mode, ":cur_agent"), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_a", 4), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, -90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (val_add, "$tutorial_2_state", 1), (else_try), (eq, "$tutorial_2_state", 8), (try_begin), (eq, "$tutorial_2_msg_8_displayed", 0), (assign, "$tutorial_2_msg_8_displayed", 1), (tutorial_message, "str_tutorial_2_msg_8"), (play_sound, "snd_tutorial_1"), (get_player_agent_no, ":player_agent"), (agent_set_hit_points, ":player_agent", 100), (try_end), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_maceman"), (assign, ":cur_agent", reg0), (neg|agent_is_alive, ":cur_agent"), (val_add, "$tutorial_2_state", 1), (else_try), (eq, "$tutorial_2_state", 9), (eq, "$tutorial_2_msg_9_displayed", 0), (assign, "$tutorial_2_msg_9_displayed", 1), (tutorial_message, "str_tutorial_2_msg_9"), (play_sound, "snd_tutorial_2"), (assign, "$tutorial_2_finished", 1), (else_try), (gt, "$tutorial_2_state", 30), (tutorial_message, "str_tutorial_failed"), (try_end), ], []), ], ), ( "tutorial_3",mtf_arena_fight,-1, "You enter the training ground.", [ (0,mtef_leader_only|mtef_team_0,af_override_horse|af_override_weapons,0,1,[]), (3,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (5,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), ], [ (ti_tab_pressed, 0, 0, [], [(try_begin), (lt, "$tutorial_3_state", 12), (question_box,"str_do_you_wish_to_leave_tutorial"), (else_try), (finish_mission,0), (try_end), ]), (ti_question_answered, 0, 0, [], [(store_trigger_param_1,":answer"), (eq,":answer",0), (finish_mission,0), ]), (ti_inventory_key_pressed, 0, 0, [(display_message,"str_cant_use_inventory_tutorial")], []), (0, 0, ti_once, [ (store_mission_timer_a, ":cur_time"), (gt, ":cur_time", 2), (main_hero_fallen), (assign, "$tutorial_3_state", 100), ], []), (0, 0, ti_once, [(assign, "$tutorial_3_state", 0), (assign, "$tutorial_3_msg_1_displayed", 0), (assign, "$tutorial_3_msg_2_displayed", 0), (assign, "$tutorial_3_msg_3_displayed", 0), (assign, "$tutorial_3_msg_4_displayed", 0), (assign, "$tutorial_3_msg_5_displayed", 0), (assign, "$tutorial_3_msg_6_displayed", 0), ], []), (0, 0, 0, [(try_begin), (eq, "$tutorial_3_state", 0), (try_begin), (eq, "$tutorial_3_msg_1_displayed", 0), (store_mission_timer_a, ":cur_time"), (gt, ":cur_time", 0), (assign, "$tutorial_3_msg_1_displayed", 1), (tutorial_message, "str_tutorial_3_msg_1"), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_maceman"), (assign, ":cur_agent", reg0), (agent_get_position, pos1, ":cur_agent"), (agent_set_scripted_destination, ":cur_agent", pos1, 0), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_swordsman"), (assign, ":cur_agent", reg0), (agent_get_position, pos1, ":cur_agent"), (agent_set_scripted_destination, ":cur_agent", pos1, 0), (entry_point_get_position, pos1, 1), (set_spawn_position, pos1), (spawn_item, "itm_tutorial_staff_no_attack"), (try_end), (get_player_agent_no, ":player_agent"), (agent_has_item_equipped, ":player_agent", "itm_tutorial_staff_no_attack"), (val_add, "$tutorial_3_state", 1), (else_try), (eq, "$tutorial_3_state", 1), (try_begin), (eq, "$tutorial_3_msg_2_displayed", 0), (assign, "$tutorial_3_msg_2_displayed", 1), (tutorial_message, "str_tutorial_3_msg_2"), (play_sound, "snd_tutorial_1"), (try_end), (get_player_agent_no, ":player_agent"), (agent_get_position, pos1, ":player_agent"), (entry_point_get_position,pos2,2), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 200), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_b", 0), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, -90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (val_add, "$tutorial_3_state", 1), (else_try), (eq, "$tutorial_3_state", 2), (scene_prop_get_instance, ":barrier_object", "spr_barrier_4m", 0), (prop_instance_get_position, pos1, ":barrier_object"), (get_player_agent_no, ":player_agent"), (agent_get_position, pos2, ":player_agent"), (position_is_behind_position, pos2, pos1), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_b", 0), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, 90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (val_add, "$tutorial_3_state", 1), (else_try), (eq, "$tutorial_3_state", 3), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_maceman"), (assign, ":cur_agent", reg0), (entry_point_get_position, pos1, 4), (agent_set_scripted_destination, ":cur_agent", pos1, 0), (val_add, "$tutorial_3_state", 1), (else_try), (eq, "$tutorial_3_state", 4), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_maceman"), (assign, ":cur_agent", reg0), (entry_point_get_position, pos1, 4), (agent_get_position, pos2, ":cur_agent"), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 250), (agent_clear_scripted_mode, ":cur_agent"), (val_add, "$tutorial_3_state", 1), (store_mission_timer_a,"$tutorial_time"), (else_try), (eq, "$tutorial_3_state", 5), (try_begin), (eq, "$tutorial_3_msg_3_displayed", 0), (assign, "$tutorial_3_msg_3_displayed", 1), (play_sound, "snd_tutorial_1"), (try_end), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_maceman"), (assign, ":cur_agent", reg0), (store_mission_timer_a,":cur_time"), (val_sub, ":cur_time", "$tutorial_time"), (store_sub, reg3, 30, ":cur_time"), (tutorial_message, "str_tutorial_3_msg_3"), (gt, ":cur_time", 30), (entry_point_get_position, pos1, 4), (agent_set_scripted_destination, ":cur_agent", pos1, 0), (val_add, "$tutorial_3_state", 1), (else_try), (eq, "$tutorial_3_state", 6), (try_begin), (eq, "$tutorial_3_msg_4_displayed", 0), (assign, "$tutorial_3_msg_4_displayed", 1), (tutorial_message, "str_tutorial_3_msg_4"), (play_sound, "snd_tutorial_1"), (try_end), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_maceman"), (assign, ":cur_agent", reg0), (entry_point_get_position, pos1, 4), (agent_get_position, pos2, ":cur_agent"), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 250), (entry_point_get_position, pos1, 3), (agent_set_scripted_destination, ":cur_agent", pos1, 0), (val_add, "$tutorial_3_state", 1), (else_try), (eq, "$tutorial_3_state", 7), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_maceman"), (assign, ":cur_agent", reg0), (entry_point_get_position, pos1, 3), (agent_get_position, pos2, ":cur_agent"), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 250), (entry_point_get_position, pos1, 7), (agent_set_scripted_destination, ":cur_agent", pos1, 0), (agent_set_position, ":cur_agent", pos1), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_b", 1), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, -90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_b", 3), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, -90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (val_add, "$tutorial_3_state", 1), (else_try), (eq, "$tutorial_3_state", 8), (scene_prop_get_instance, ":barrier_object", "spr_barrier_4m", 1), (prop_instance_get_position, pos1, ":barrier_object"), (get_player_agent_no, ":player_agent"), (agent_get_position, pos2, ":player_agent"), (position_is_behind_position, pos2, pos1), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_b", 1), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, 90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (val_add, "$tutorial_3_state", 1), (else_try), (eq, "$tutorial_3_state", 9), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_swordsman"), (assign, ":cur_agent", reg0), (entry_point_get_position, pos1, 6), (agent_set_scripted_destination, ":cur_agent", pos1, 0), (val_add, "$tutorial_3_state", 1), (else_try), (eq, "$tutorial_3_state", 10), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_swordsman"), (assign, ":cur_agent", reg0), (entry_point_get_position, pos1, 6), (agent_get_position, pos2, ":cur_agent"), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 250), (agent_clear_scripted_mode, ":cur_agent"), (val_add, "$tutorial_3_state", 1), (store_mission_timer_a,"$tutorial_time"), (else_try), (eq, "$tutorial_3_state", 11), (try_begin), (eq, "$tutorial_3_msg_5_displayed", 0), (assign, "$tutorial_3_msg_5_displayed", 1), (play_sound, "snd_tutorial_1"), (try_end), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_swordsman"), (assign, ":cur_agent", reg0), (store_mission_timer_a,":cur_time"), (val_sub, ":cur_time", "$tutorial_time"), (store_sub, reg3, 30, ":cur_time"), (tutorial_message, "str_tutorial_3_msg_5"), (gt, ":cur_time", 30), (entry_point_get_position, pos1, 6), (agent_set_scripted_destination, ":cur_agent", pos1, 0), (val_add, "$tutorial_3_state", 1), (else_try), (eq, "$tutorial_3_state", 12), (try_begin), (eq, "$tutorial_3_msg_6_displayed", 0), (assign, "$tutorial_3_msg_6_displayed", 1), (tutorial_message, "str_tutorial_3_msg_6"), (play_sound, "snd_tutorial_1"), (try_end), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_swordsman"), (assign, ":cur_agent", reg0), (entry_point_get_position, pos1, 6), (agent_get_position, pos2, ":cur_agent"), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 250), (entry_point_get_position, pos1, 5), (agent_set_scripted_destination, ":cur_agent", pos1, 0), (val_add, "$tutorial_3_state", 1), (else_try), (eq, "$tutorial_3_state", 13), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_swordsman"), (assign, ":cur_agent", reg0), (entry_point_get_position, pos1, 5), (agent_get_position, pos2, ":cur_agent"), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 250), (entry_point_get_position, pos1, 7), (agent_set_scripted_destination, ":cur_agent", pos1, 0), (agent_set_position, ":cur_agent", pos1), (val_add, "$tutorial_3_state", 1), (else_try), (gt, "$tutorial_3_state", 30), (tutorial_message, "str_tutorial_failed"), (try_end), ], []), ], ), ( "tutorial_3_2",mtf_arena_fight,-1, "You enter the training ground.", [ (0,mtef_leader_only|mtef_team_0,af_override_horse|af_override_weapons,0,1,[itm_tutorial_staff]), (4,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (6,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), ], [ (ti_tab_pressed, 0, 0, [], [(try_begin), (lt, "$tutorial_3_state", 5), (question_box,"str_do_you_wish_to_leave_tutorial"), (else_try), (finish_mission,0), (try_end), ]), (ti_question_answered, 0, 0, [], [(store_trigger_param_1,":answer"), (eq,":answer",0), (finish_mission,0), ]), (ti_inventory_key_pressed, 0, 0, [(display_message,"str_cant_use_inventory_tutorial")], []), (0, 0, ti_once, [ (store_mission_timer_a, ":cur_time"), (gt, ":cur_time", 2), (main_hero_fallen), (assign, "$tutorial_3_state", 100), ], []), (0, 0, ti_once, [(assign, "$tutorial_3_state", 0), (assign, "$tutorial_3_msg_1_displayed", 0), (assign, "$tutorial_3_msg_2_displayed", 0), (assign, "$tutorial_3_msg_3_displayed", 0), (assign, "$tutorial_3_msg_4_displayed", 0), (assign, "$tutorial_3_msg_5_displayed", 0), ], []), (0, 0, 0, [(try_begin), (eq, "$tutorial_3_state", 0), (try_begin), (eq, "$tutorial_3_msg_1_displayed", 0), (store_mission_timer_a, ":cur_time"), (gt, ":cur_time", 0), (assign, "$tutorial_3_msg_1_displayed", 1), (tutorial_message, "str_tutorial_3_2_msg_1"), (play_sound, "snd_tutorial_1"), (call_script, "script_cf_get_first_agent_with_troop_id","trp_tutorial_maceman"), (assign, ":cur_agent", reg0), (agent_get_position, pos1, ":cur_agent"), (agent_set_scripted_destination, ":cur_agent", pos1, 0), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_swordsman"), (assign, ":cur_agent", reg0), (agent_get_position, pos1, ":cur_agent"), (agent_set_scripted_destination, ":cur_agent", pos1, 0), (try_end), (get_player_agent_no, ":player_agent"), (agent_get_position, pos1, ":player_agent"), (entry_point_get_position,pos2,2), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 200), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_b", 0), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, -90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (val_add, "$tutorial_3_state", 1), (else_try), (eq, "$tutorial_3_state", 1), (try_begin), (eq, "$tutorial_3_msg_2_displayed", 0), (assign, "$tutorial_3_msg_2_displayed", 1), (tutorial_message, "str_tutorial_3_2_msg_2"), (play_sound, "snd_tutorial_1"), (try_end), (scene_prop_get_instance, ":barrier_object", "spr_barrier_4m", 0), (prop_instance_get_position, pos1, ":barrier_object"), (get_player_agent_no, ":player_agent"), (agent_get_position, pos2, ":player_agent"), (position_is_behind_position, pos2, pos1), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_b", 0), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, 90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_maceman"), (agent_clear_scripted_mode, reg0), (val_add, "$tutorial_3_state", 1), (else_try), (eq, "$tutorial_3_state", 2), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_maceman"), (neg|agent_is_alive, reg0), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_b", 1), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, -90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_b", 3), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, -90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (val_add, "$tutorial_3_state", 1), (else_try), (eq, "$tutorial_3_state", 3), (try_begin), (eq, "$tutorial_3_msg_3_displayed", 0), (assign, "$tutorial_3_msg_3_displayed", 1), (tutorial_message, "str_tutorial_3_2_msg_3"), (play_sound, "snd_tutorial_1"), (try_end), (scene_prop_get_instance, ":barrier_object", "spr_barrier_4m", 1), (prop_instance_get_position, pos1, ":barrier_object"), (get_player_agent_no, ":player_agent"), (agent_get_position, pos2, ":player_agent"), (position_is_behind_position, pos2, pos1), (scene_prop_get_instance, ":door_object", "spr_tutorial_door_b", 1), (prop_instance_get_position, pos1, ":door_object"), (position_rotate_z, pos1, 90), (prop_instance_animate_to_position, ":door_object", pos1, 150), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_swordsman"), (agent_clear_scripted_mode, reg0), (val_add, "$tutorial_3_state", 1), (else_try), (eq, "$tutorial_3_state", 4), (try_begin), (eq, "$tutorial_3_msg_4_displayed", 0), (assign, "$tutorial_3_msg_4_displayed", 1), (tutorial_message, "str_tutorial_3_2_msg_4"), (play_sound, "snd_tutorial_1"), (try_end), (call_script, "script_cf_get_first_agent_with_troop_id", "trp_tutorial_swordsman"), (neg|agent_is_alive, reg0), (val_add, "$tutorial_3_state", 1), (else_try), (eq, "$tutorial_3_state", 5), (eq, "$tutorial_3_msg_5_displayed", 0), (assign, "$tutorial_3_msg_5_displayed", 1), (tutorial_message, "str_tutorial_3_2_msg_5"), (play_sound, "snd_tutorial_2"), (assign, "$tutorial_3_finished", 1), (else_try), (gt, "$tutorial_3_state", 30), (tutorial_message, "str_tutorial_failed"), (try_end), ], []), ], ), ( "tutorial_4",mtf_arena_fight,-1, "You enter the training ground.", [ (0,mtef_leader_only|mtef_team_0,af_override_horse|af_override_weapons,0,1,[itm_tutorial_sword,itm_tutorial_short_bow,itm_tutorial_arrows]), #af_override_weapons ], [ (ti_tab_pressed, 0, 0, [], [(try_begin), (lt, "$tutorial_4_state", 11), (question_box,"str_do_you_wish_to_leave_tutorial"), (else_try), (finish_mission,0), (try_end), ]), (ti_question_answered, 0, 0, [], [(store_trigger_param_1,":answer"), (eq,":answer",0), (finish_mission,0), ]), (ti_inventory_key_pressed, 0, 0, [(display_message,"str_cant_use_inventory_tutorial")], []), (0, 0, ti_once, [(assign, "$tutorial_4_state", 0), (assign, "$tutorial_4_msg_1_displayed", 0), (assign, "$tutorial_4_msg_2_displayed", 0), (assign, "$tutorial_4_msg_3_displayed", 0), (assign, "$tutorial_4_msg_4_displayed", 0), (assign, "$tutorial_4_msg_5_displayed", 0), (assign, "$tutorial_4_msg_6_displayed", 0), (assign, "$tutorial_4_msg_7_displayed", 0), ], []), (0, 0, 0, [(try_begin), (eq, "$tutorial_4_state", 0), (try_begin), (eq, "$tutorial_4_msg_1_displayed", 0), (store_mission_timer_a, ":cur_time"), (gt, ":cur_time", 0), (assign, "$tutorial_4_msg_1_displayed", 1), (tutorial_message, "str_tutorial_4_msg_1"), (entry_point_get_position, pos1, 1), (set_spawn_position, 1), (spawn_horse, "itm_tutorial_saddle_horse"), (assign, "$tutorial_num_total_dummies_destroyed", 0), (try_end), (get_player_agent_no, ":player_agent"), (agent_get_horse, ":horse_agent", ":player_agent"), (ge, ":horse_agent", 0), (val_add, "$tutorial_4_state", 1), (entry_point_get_position, pos1, 2), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_yellow", 0), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (else_try), (eq, "$tutorial_4_state", 1), (try_begin), (eq, "$tutorial_4_msg_2_displayed", 0), (assign, "$tutorial_4_msg_2_displayed", 1), (tutorial_message, "str_tutorial_4_msg_2"), (play_sound, "snd_tutorial_1"), (try_end), (get_player_agent_no, ":player_agent"), (agent_get_position, pos1, ":player_agent"), (entry_point_get_position, pos2, 2), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 200), (val_add, "$tutorial_4_state", 1), (entry_point_get_position, pos1, 3), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_yellow", 0), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (else_try), (eq, "$tutorial_4_state", 2), (get_player_agent_no, ":player_agent"), (agent_get_position, pos1, ":player_agent"), (entry_point_get_position, pos2, 3), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 200), (val_add, "$tutorial_4_state", 1), (entry_point_get_position, pos1, 4), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_yellow", 0), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (else_try), (eq, "$tutorial_4_state", 3), (get_player_agent_no, ":player_agent"), (agent_get_position, pos1, ":player_agent"), (entry_point_get_position, pos2, 4), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 200), (val_add, "$tutorial_4_state", 1), (entry_point_get_position, pos1, 5), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_yellow", 0), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (else_try), (eq, "$tutorial_4_state", 4), (get_player_agent_no, ":player_agent"), (agent_get_position, pos1, ":player_agent"), (entry_point_get_position, pos2, 5), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 200), (val_add, "$tutorial_4_state", 1), (entry_point_get_position, pos1, 6), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_yellow", 0), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (else_try), (eq, "$tutorial_4_state", 5), (get_player_agent_no, ":player_agent"), (agent_get_position, pos1, ":player_agent"), (entry_point_get_position, pos2, 6), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 200), (val_add, "$tutorial_4_state", 1), (entry_point_get_position, pos1, 1), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_yellow", 0), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (else_try), (eq, "$tutorial_4_state", 6), (get_player_agent_no, ":player_agent"), (agent_get_position, pos1, ":player_agent"), (entry_point_get_position, pos2, 1), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 200), (val_add, "$tutorial_4_state", 1), (entry_point_get_position, pos1, 7), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_yellow", 0), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (else_try), (eq, "$tutorial_4_state", 7), (try_begin), (eq, "$tutorial_4_msg_3_displayed", 0), (assign, "$tutorial_4_msg_3_displayed", 1), (tutorial_message, "str_tutorial_4_msg_3"), (play_sound, "snd_tutorial_1"), (try_end), (get_player_agent_no, ":player_agent"), (agent_get_position, pos1, ":player_agent"), (entry_point_get_position, pos2, 7), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 200), (val_add, "$tutorial_4_state", 1), (entry_point_get_position, pos1, 20), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_yellow", 0), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (else_try), (eq, "$tutorial_4_state", 8), (try_begin), (eq, "$tutorial_4_msg_4_displayed", 0), (assign, "$tutorial_4_msg_4_displayed", 1), (tutorial_message, "str_tutorial_4_msg_4"), (play_sound, "snd_tutorial_1"), (try_end), (ge, "$tutorial_num_total_dummies_destroyed", 2), (val_add, "$tutorial_4_state", 1), (entry_point_get_position, pos1, 8), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_yellow", 0), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (else_try), (eq, "$tutorial_4_state", 9), (try_begin), (eq, "$tutorial_4_msg_5_displayed", 0), (assign, "$tutorial_4_msg_5_displayed", 1), (tutorial_message, "str_tutorial_4_msg_5"), (play_sound, "snd_tutorial_1"), (try_end), (get_player_agent_no, ":player_agent"), (agent_get_position, pos1, ":player_agent"), (entry_point_get_position, pos2, 8), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 200), (val_add, "$tutorial_4_state", 1), (entry_point_get_position, pos1, 20), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_yellow", 0), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (else_try), (eq, "$tutorial_4_state", 10), (try_begin), (eq, "$tutorial_4_msg_6_displayed", 0), (assign, "$tutorial_4_msg_6_displayed", 1), (tutorial_message, "str_tutorial_4_msg_6"), (play_sound, "snd_tutorial_1"), (assign, "$g_last_archery_point_earned", 0), (assign, "$tutorial_num_arrows_hit", 0), (try_end), (try_begin), (get_player_agent_no, ":player_agent"), (agent_get_ammo, ":cur_ammo", ":player_agent"), (le, ":cur_ammo", 0), (agent_refill_ammo, ":player_agent"), (tutorial_message, "str_tutorial_ammo_refilled"), (try_end), (gt, "$g_last_archery_point_earned", 0), (assign, "$g_last_archery_point_earned", 0), (val_add, "$tutorial_num_arrows_hit", 1), (gt, "$tutorial_num_arrows_hit", 2), (val_add, "$tutorial_4_state", 1), (else_try), (eq, "$tutorial_4_state", 11), (eq, "$tutorial_4_msg_7_displayed", 0), (assign, "$tutorial_4_msg_7_displayed", 1), (tutorial_message, "str_tutorial_4_msg_7"), (play_sound, "snd_tutorial_2"), (assign, "$tutorial_4_finished", 1), (try_end), ], []), ], ), ( "tutorial_5",mtf_arena_fight,-1, "You enter the training ground.", [ (0,mtef_visitor_source|mtef_team_0,af_override_horse|af_override_weapons,0,1,[itm_tutorial_sword,itm_tutorial_shield,itm_tutorial_short_bow,itm_tutorial_arrows,itm_tutorial_saddle_horse]), (1,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (2,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (3,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (4,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (8,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (9,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (10,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (13,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (14,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (15,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (16,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), ], [ (ti_tab_pressed, 0, 0, [], [(try_begin), (lt, "$tutorial_5_state", 5), (question_box,"str_do_you_wish_to_leave_tutorial"), (else_try), (finish_mission,0), (try_end), ]), (ti_question_answered, 0, 0, [], [(store_trigger_param_1,":answer"), (eq,":answer",0), (finish_mission,0), ]), (ti_inventory_key_pressed, 0, 0, [(display_message,"str_cant_use_inventory_tutorial")], []), (0, 0, ti_once, [ (store_mission_timer_a, ":cur_time"), (gt, ":cur_time", 2), (main_hero_fallen), (assign, "$tutorial_5_state", 100), ], []), (0, 0, ti_once, [(assign, "$tutorial_5_state", 0), (assign, "$tutorial_5_msg_1_displayed", 0), (assign, "$tutorial_5_msg_2_displayed", 0), (assign, "$tutorial_5_msg_3_displayed", 0), (assign, "$tutorial_5_msg_4_displayed", 0), (assign, "$tutorial_5_msg_5_displayed", 0), (assign, "$tutorial_5_msg_6_displayed", 0), ], []), (0, 0, ti_once, [(set_show_messages, 0), (team_give_order, 0, grc_everyone, mordr_stand_ground), (set_show_messages, 1), (store_mission_timer_a, ":cur_time"), (gt, ":cur_time", 3), ], []), (0, 0, 0, [(call_script, "script_cf_turn_windmill_fans", 0)], []), (0, 0, 0, [(try_begin), (eq, "$tutorial_5_state", 0), (try_begin), (eq, "$tutorial_5_msg_1_displayed", 0), (store_mission_timer_a, ":cur_time"), (gt, ":cur_time", 0), (assign, "$tutorial_5_msg_1_displayed", 1), (tutorial_message, "str_tutorial_5_msg_1"), (entry_point_get_position, pos1, 5), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_yellow", 0), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (try_end), (call_script, "script_cf_team_get_average_position_of_agents_with_type_to_pos1", 0, grc_infantry), (entry_point_get_position, pos2, 5), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 1000), (val_add, "$tutorial_5_state", 1), (entry_point_get_position, pos1, 6), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_red", 0), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (else_try), (eq, "$tutorial_5_state", 1), (try_begin), (eq, "$tutorial_5_msg_2_displayed", 0), (assign, "$tutorial_5_msg_2_displayed", 1), (tutorial_message, "str_tutorial_5_msg_2"), (play_sound, "snd_tutorial_1"), (try_end), (call_script, "script_cf_team_get_average_position_of_agents_with_type_to_pos1", 0, grc_infantry), (entry_point_get_position, pos2, 5), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 1000), (get_player_agent_no, ":player_agent"), (agent_get_position, pos1, ":player_agent"), (entry_point_get_position, pos2, 6), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 500), (val_add, "$tutorial_5_state", 1), (entry_point_get_position, pos1, 7), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_yellow", 0), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (entry_point_get_position, pos1, 30), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_red", 0), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (else_try), (eq, "$tutorial_5_state", 2), (try_begin), (eq, "$tutorial_5_msg_3_displayed", 0), (assign, "$tutorial_5_msg_3_displayed", 1), (tutorial_message, "str_tutorial_5_msg_3"), (play_sound, "snd_tutorial_1"), (try_end), (get_player_agent_no, ":player_agent"), (agent_get_position, pos1, ":player_agent"), (entry_point_get_position, pos2, 7), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 500), (val_add, "$tutorial_5_state", 1), (modify_visitors_at_site,"scn_tutorial_5"), (reset_visitors), (set_visitor,5,"trp_vaegir_archer"), (set_visitor,6,"trp_vaegir_archer"), (set_visitor,7,"trp_vaegir_archer"), (entry_point_get_position, pos1, 11), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_yellow", 0), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (entry_point_get_position, pos1, 12), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_red", 0), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (set_show_messages, 0), (team_give_order, 0, grc_archers, mordr_stand_ground), (set_show_messages, 1), (else_try), (eq, "$tutorial_5_state", 3), (try_begin), (eq, "$tutorial_5_msg_4_displayed", 0), (assign, "$tutorial_5_msg_4_displayed", 1), (tutorial_message, "str_tutorial_5_msg_4"), (play_sound, "snd_tutorial_1"), (try_end), (call_script, "script_cf_team_get_average_position_of_agents_with_type_to_pos1", 0, grc_archers), (entry_point_get_position, pos2, 11), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 1000), (call_script, "script_cf_team_get_average_position_of_agents_with_type_to_pos1", 0, grc_infantry), (entry_point_get_position, pos2, 12), (get_distance_between_positions, ":cur_distance", pos1, pos2), (le, ":cur_distance", 1000), (val_add, "$tutorial_5_state", 1), (entry_point_get_position, pos1, 30), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_yellow", 0), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_red", 0), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (modify_visitors_at_site,"scn_tutorial_5"), (reset_visitors), (set_visitor,8,"trp_bandit"), (set_visitor,9,"trp_bandit"), (set_visitor,10,"trp_bandit"), (set_visitor,11,"trp_bandit"), (team_give_order, 1, grc_everyone, mordr_charge), (else_try), (eq, "$tutorial_5_state", 4), (try_begin), (eq, "$tutorial_5_msg_5_displayed", 0), (assign, "$tutorial_5_msg_5_displayed", 1), (tutorial_message, "str_tutorial_5_msg_5"), (play_sound, "snd_tutorial_1"), (try_end), (assign, ":enemy_count", 0), (try_for_agents, ":cur_agent"), (agent_is_human, ":cur_agent"), (agent_is_alive, ":cur_agent"), (agent_get_team, ":cur_team", ":cur_agent"), (eq, ":cur_team", 1), (val_add, ":enemy_count", 1), (try_end), (eq, ":enemy_count", 0), (val_add, "$tutorial_5_state", 1), (else_try), (eq, "$tutorial_5_state", 5), (eq, "$tutorial_5_msg_6_displayed", 0), (assign, "$tutorial_5_msg_6_displayed", 1), (tutorial_message, "str_tutorial_5_msg_6"), (play_sound, "snd_tutorial_2"), (assign, "$tutorial_5_finished", 1), (else_try), (gt, "$tutorial_5_state", 30), (tutorial_message, "str_tutorial_failed"), (entry_point_get_position, pos1, 30), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_yellow", 0), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (scene_prop_get_instance, ":flag_object", "spr_tutorial_flag_red", 0), (prop_instance_animate_to_position, ":flag_object", pos1, 1), (try_end), ], []), ], ), ( "custom_battle",mtf_battle_mode,-1, "You lead your men to battle.", [ (0,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (1,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (2,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (3,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (4,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (5,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (6,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (7,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (8,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (9,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (10,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (11,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (12,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (13,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (14,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (15,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (16,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (17,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (18,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (19,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (20,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (21,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (22,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (23,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (24,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (25,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (26,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (27,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (28,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (29,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (30,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (31,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), ], [ common_custom_battle_tab_press, common_custom_battle_question_answered, common_inventory_not_available, (0, 0, ti_once, [], [ (assign, "$g_battle_result", 0), (call_script, "script_combat_music_set_situation_with_culture"), ]), common_music_situation_update, custom_battle_check_victory_condition, common_battle_victory_display, custom_battle_check_defeat_condition, ]+frk_triggers, ), ( "custom_battle_siege",mtf_battle_mode,-1, "You lead your men to battle.", [ (0,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (1,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (2,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (3,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (4,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (5,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (6,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (7,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (8,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (9,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (10,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (11,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (12,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (13,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (14,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (15,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]), (16,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (17,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (18,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (19,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (20,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (21,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (22,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (23,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (24,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (25,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (26,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (27,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (28,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (29,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (30,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), (31,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]), ], [ common_battle_mission_start, (0, 0, ti_once, [ (assign, "$defender_team", 0), (assign, "$attacker_team", 1), (assign, "$defender_team_2", 2), (assign, "$attacker_team_2", 3), ], []), common_custom_battle_tab_press, common_custom_battle_question_answered, common_inventory_not_available, common_custom_siege_init, common_music_situation_update, custom_battle_check_victory_condition, common_battle_victory_display, custom_battle_check_defeat_condition, common_siege_attacker_do_not_stall, common_siege_refill_ammo, common_siege_init_ai_and_belfry, common_siege_move_belfry, common_siege_rotate_belfry, common_siege_assign_men_to_belfry, common_siege_ai_trigger_init_2, ], ), ( "custom_battle_5",mtf_battle_mode,-1, "You lead your men to battle.", [ (0,mtef_visitor_source|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), (1,mtef_visitor_source|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), (2,mtef_visitor_source|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), (3,mtef_visitor_source|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), (4,mtef_visitor_source|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), (5,mtef_visitor_source|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), (6,mtef_visitor_source|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), (7,mtef_visitor_source|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]), (8,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (9,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (10,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (11,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (12,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (13,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (14,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (15,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (40,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (41,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (42,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (43,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (44,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (45,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (46,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), (47,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]), ], [ common_custom_battle_tab_press, common_custom_battle_question_answered, common_custom_siege_init, common_inventory_not_available, common_music_situation_update, custom_battle_check_victory_condition, common_battle_victory_display, custom_battle_check_defeat_condition, (0, 0, ti_once, [ (assign, "$defender_team", 1), (assign, "$attacker_team", 0), (assign, "$defender_team_2", 3), (assign, "$attacker_team_2", 2), ], []), common_siege_ai_trigger_init_2, common_siege_attacker_do_not_stall, common_siege_refill_ammo, common_siege_init_ai_and_belfry, common_siege_move_belfry, common_siege_rotate_belfry, common_siege_assign_men_to_belfry, ], ), ]
Python
itm_no_item = 0 itm_horse_meat = 1 itm_practice_sword = 2 itm_heavy_practice_sword = 3 itm_practice_axe = 4 itm_arena_axe = 5 itm_arena_sword = 6 itm_arena_sword_two_handed = 7 itm_arena_lance = 8 itm_practice_staff = 9 itm_practice_lance = 10 itm_practice_shield = 11 itm_practice_bow = 12 itm_practice_crossbow = 13 itm_practice_javelin = 14 itm_practice_throwing_daggers = 15 itm_practice_throwing_daggers_100_amount = 16 itm_practice_horse = 17 itm_practice_arrows = 18 itm_practice_bolts = 19 itm_practice_arrows_10_amount = 20 itm_practice_arrows_100_amount = 21 itm_practice_bolts_9_amount = 22 itm_practice_boots = 23 itm_red_tourney_armor = 24 itm_blue_tourney_armor = 25 itm_green_tourney_armor = 26 itm_gold_tourney_armor = 27 itm_red_tourney_helmet = 28 itm_blue_tourney_helmet = 29 itm_green_tourney_helmet = 30 itm_gold_tourney_helmet = 31 itm_arena_shield_red = 32 itm_arena_shield_blue = 33 itm_arena_shield_green = 34 itm_arena_shield_yellow = 35 itm_arena_armor_white = 36 itm_arena_armor_red = 37 itm_arena_armor_blue = 38 itm_arena_armor_green = 39 itm_arena_armor_yellow = 40 itm_arena_tunic_white = 41 itm_arena_tunic_red = 42 itm_arena_tunic_blue = 43 itm_arena_tunic_green = 44 itm_arena_tunic_yellow = 45 itm_arena_helmet_red = 46 itm_arena_helmet_blue = 47 itm_arena_helmet_green = 48 itm_arena_helmet_yellow = 49 itm_steppe_helmet_white = 50 itm_steppe_helmet_red = 51 itm_steppe_helmet_blue = 52 itm_steppe_helmet_green = 53 itm_steppe_helmet_yellow = 54 itm_tourney_helm_white = 55 itm_tourney_helm_red = 56 itm_tourney_helm_blue = 57 itm_tourney_helm_green = 58 itm_tourney_helm_yellow = 59 itm_book_tactics = 60 itm_book_persuasion = 61 itm_book_leadership = 62 itm_book_intelligence = 63 itm_book_trade = 64 itm_book_weapon_mastery = 65 itm_book_engineering = 66 itm_book_wound_treatment_reference = 67 itm_book_training_reference = 68 itm_book_surgery_reference = 69 itm_smoked_fish = 70 itm_dried_meat = 71 itm_cattle_meat = 72 itm_pork = 73 itm_bread = 74 itm_apples = 75 itm_cheese = 76 itm_chicken = 77 itm_honey = 78 itm_sausages = 79 itm_cabbages = 80 itm_butter = 81 itm_wine = 82 itm_ale = 83 itm_spice = 84 itm_salt = 85 itm_grain = 86 itm_flour = 87 itm_iron = 88 itm_oil = 89 itm_pottery = 90 itm_linen = 91 itm_furs = 92 itm_wool = 93 itm_velvet = 94 itm_tools = 95 itm_siege_supply = 96 itm_quest_wine = 97 itm_quest_ale = 98 itm_tutorial_sword = 99 itm_tutorial_axe = 100 itm_tutorial_spear = 101 itm_tutorial_club = 102 itm_tutorial_battle_axe = 103 itm_tutorial_arrows = 104 itm_tutorial_bolts = 105 itm_tutorial_short_bow = 106 itm_tutorial_crossbow = 107 itm_tutorial_throwing_daggers = 108 itm_tutorial_saddle_horse = 109 itm_tutorial_shield = 110 itm_tutorial_staff_no_attack = 111 itm_tutorial_staff = 112 itm_sumpter_horse = 113 itm_saddle_horse = 114 itm_steppe_horse = 115 itm_courser = 116 itm_hunter = 117 itm_warhorse = 118 itm_charger = 119 itm_arrows = 120 itm_khergit_arrows = 121 itm_barbed_arrows = 122 itm_bodkin_arrows = 123 itm_bolts = 124 itm_steel_bolts = 125 itm_cartridges = 126 itm_pilgrim_disguise = 127 itm_pilgrim_hood = 128 itm_leather_gloves = 129 itm_mail_mittens = 130 itm_scale_gauntlets = 131 itm_gauntlets = 132 itm_wrapping_boots = 133 itm_woolen_hose = 134 itm_blue_hose = 135 itm_hunter_boots = 136 itm_hide_boots = 137 itm_ankle_boots = 138 itm_nomad_boots = 139 itm_leather_boots = 140 itm_mail_chausses = 141 itm_splinted_leather_greaves = 142 itm_splinted_greaves = 143 itm_mail_boots = 144 itm_iron_greaves = 145 itm_black_greaves = 146 itm_lady_dress_ruby = 147 itm_lady_dress_green = 148 itm_lady_dress_blue = 149 itm_courtly_outfit = 150 itm_nobleman_outfit = 151 itm_nomad_armor = 152 itm_khergit_armor = 153 itm_leather_jacket = 154 itm_rawhide_coat = 155 itm_leather_armor = 156 itm_fur_coat = 157 itm_coat = 158 itm_leather_coat = 159 itm_mail_coat = 160 itm_long_mail_coat = 161 itm_sleeveless_mail_coat = 162 itm_sleeveless_coat = 163 itm_hide_coat = 164 itm_merchant_outfit = 165 itm_homespun_dress = 166 itm_thick_coat = 167 itm_coat_with_cape = 168 itm_steppe_outfit = 169 itm_nordic_outfit = 170 itm_nordic_armor = 171 itm_hide_armor = 172 itm_cloaked_tunic = 173 itm_sleeveless_tunic = 174 itm_sleeveless_leather_tunic = 175 itm_linen_shirt = 176 itm_wool_coat = 177 itm_dress = 178 itm_blue_dress = 179 itm_peasant_dress = 180 itm_woolen_dress = 181 itm_shirt = 182 itm_linen_tunic = 183 itm_short_tunic = 184 itm_robe = 185 itm_coarse_tunic = 186 itm_leather_apron = 187 itm_tabard = 188 itm_leather_vest = 189 itm_steppe_armor = 190 itm_gambeson = 191 itm_blue_gambeson = 192 itm_red_gambeson = 193 itm_padded_cloth = 194 itm_leather_jerkin = 195 itm_nomad_vest = 196 itm_ragged_outfit = 197 itm_padded_leather = 198 itm_tribal_warrior_outfit = 199 itm_nomad_robe = 200 itm_studded_leather_coat = 201 itm_byrnie = 202 itm_haubergeon = 203 itm_mail_shirt = 204 itm_mail_hauberk = 205 itm_lamellar_vest = 206 itm_mail_with_surcoat = 207 itm_surcoat_over_mail = 208 itm_brigandine_a = 209 itm_lamellar_armor = 210 itm_banded_armor = 211 itm_cuir_bouilli = 212 itm_coat_of_plates = 213 itm_plate_armor = 214 itm_black_armor = 215 itm_heraldic_mail_with_surcoat = 216 itm_heraldic_mail_with_tabard = 217 itm_turret_hat_ruby = 218 itm_turret_hat_blue = 219 itm_turret_hat_green = 220 itm_head_wrappings = 221 itm_court_hat = 222 itm_wimple_a = 223 itm_wimple_with_veil = 224 itm_straw_hat = 225 itm_common_hood = 226 itm_headcloth = 227 itm_woolen_hood = 228 itm_fur_hat = 229 itm_nomad_cap = 230 itm_steppe_cap = 231 itm_padded_coif = 232 itm_woolen_cap = 233 itm_felt_hat = 234 itm_leather_cap = 235 itm_arming_cap = 236 itm_female_hood = 237 itm_leather_steppe_cap_a = 238 itm_leather_steppe_cap_b = 239 itm_leather_steppe_cap_c = 240 itm_leather_warrior_cap = 241 itm_skullcap = 242 itm_mail_coif = 243 itm_footman_helmet = 244 itm_nasal_helmet = 245 itm_norman_helmet = 246 itm_segmented_helmet = 247 itm_kettle_hat = 248 itm_helmet_with_neckguard = 249 itm_spiked_helmet = 250 itm_nordic_helmet = 251 itm_flat_topped_helmet = 252 itm_bascinet = 253 itm_guard_helmet = 254 itm_black_helmet = 255 itm_great_helmet = 256 itm_winged_great_helmet = 257 itm_wooden_stick = 258 itm_cudgel = 259 itm_hammer = 260 itm_club = 261 itm_winged_mace = 262 itm_spiked_mace = 263 itm_military_hammer = 264 itm_maul = 265 itm_sledgehammer = 266 itm_warhammer = 267 itm_pickaxe = 268 itm_spiked_club = 269 itm_fighting_pick = 270 itm_military_pick = 271 itm_morningstar = 272 itm_sickle = 273 itm_cleaver = 274 itm_knife = 275 itm_butchering_knife = 276 itm_dagger = 277 itm_falchion = 278 itm_scimitar = 279 itm_great_sword = 280 itm_sword_of_war = 281 itm_hatchet = 282 itm_hand_axe = 283 itm_fighting_axe = 284 itm_axe = 285 itm_voulge = 286 itm_battle_axe = 287 itm_war_axe = 288 itm_sword_two_handed_b = 289 itm_sword_two_handed_a = 290 itm_bastard_sword_a = 291 itm_bastard_sword_b = 292 itm_one_handed_war_axe_a = 293 itm_one_handed_war_axe_b = 294 itm_one_handed_battle_axe_a = 295 itm_one_handed_battle_axe_b = 296 itm_one_handed_battle_axe_c = 297 itm_two_handed_axe = 298 itm_two_handed_battle_axe_2 = 299 itm_two_handed_battle_axe_3 = 300 itm_bardiche = 301 itm_great_axe = 302 itm_great_bardiche = 303 itm_shortened_military_scythe = 304 itm_sword_medieval_a = 305 itm_sword_medieval_b = 306 itm_sword_medieval_b_small = 307 itm_sword_medieval_c = 308 itm_sword_medieval_c_small = 309 itm_sword_viking_1 = 310 itm_sword_viking_2 = 311 itm_sword_viking_2_small = 312 itm_sword_viking_3 = 313 itm_sword_viking_3_small = 314 itm_sword_khergit_1 = 315 itm_sword_khergit_2 = 316 itm_sword_khergit_3 = 317 itm_sword_khergit_4 = 318 itm_mace_1 = 319 itm_mace_2 = 320 itm_mace_3 = 321 itm_mace_4 = 322 itm_club_with_spike_head = 323 itm_scythe = 324 itm_pitch_fork = 325 itm_military_fork = 326 itm_battle_fork = 327 itm_boar_spear = 328 itm_jousting_lance = 329 itm_double_sided_lance = 330 itm_glaive = 331 itm_poleaxe = 332 itm_polehammer = 333 itm_staff = 334 itm_quarter_staff = 335 itm_iron_staff = 336 itm_shortened_spear = 337 itm_spear = 338 itm_war_spear = 339 itm_spear_e_2_5m = 340 itm_light_lance = 341 itm_lance = 342 itm_heavy_lance = 343 itm_pike = 344 itm_ashwood_pike = 345 itm_awlpike = 346 itm_wooden_shield = 347 itm_nordic_shield = 348 itm_fur_covered_shield = 349 itm_steel_shield = 350 itm_plate_covered_round_shield = 351 itm_leather_covered_round_shield = 352 itm_hide_covered_round_shield = 353 itm_shield_heater_c = 354 itm_norman_shield_1 = 355 itm_norman_shield_2 = 356 itm_norman_shield_3 = 357 itm_norman_shield_4 = 358 itm_norman_shield_5 = 359 itm_norman_shield_6 = 360 itm_norman_shield_7 = 361 itm_norman_shield_8 = 362 itm_tab_shield_round_a = 363 itm_tab_shield_round_b = 364 itm_tab_shield_round_c = 365 itm_tab_shield_round_d = 366 itm_tab_shield_round_e = 367 itm_tab_shield_kite_a = 368 itm_tab_shield_kite_b = 369 itm_tab_shield_kite_c = 370 itm_tab_shield_kite_d = 371 itm_tab_shield_kite_cav_a = 372 itm_tab_shield_kite_cav_b = 373 itm_tab_shield_heater_a = 374 itm_tab_shield_heater_b = 375 itm_tab_shield_heater_c = 376 itm_tab_shield_heater_d = 377 itm_tab_shield_heater_cav_a = 378 itm_tab_shield_heater_cav_b = 379 itm_tab_shield_pavise_a = 380 itm_tab_shield_pavise_b = 381 itm_tab_shield_pavise_c = 382 itm_tab_shield_pavise_d = 383 itm_tab_shield_small_round_a = 384 itm_tab_shield_small_round_b = 385 itm_tab_shield_small_round_c = 386 itm_jarid = 387 itm_javelin = 388 itm_stones = 389 itm_throwing_knives = 390 itm_throwing_daggers = 391 itm_throwing_axes = 392 itm_hunting_bow = 393 itm_short_bow = 394 itm_nomad_bow = 395 itm_long_bow = 396 itm_khergit_bow = 397 itm_strong_bow = 398 itm_war_bow = 399 itm_hunting_crossbow = 400 itm_light_crossbow = 401 itm_crossbow = 402 itm_heavy_crossbow = 403 itm_sniper_crossbow = 404 itm_flintlock_pistol = 405 itm_torch = 406 itm_strange_armor = 407 itm_strange_boots = 408 itm_strange_helmet = 409 itm_strange_sword = 410 itm_strange_great_sword = 411 itm_strange_short_sword = 412 itm_court_dress = 413 itm_rich_outfit = 414 itm_khergit_guard_armor = 415 itm_felt_steppe_cap = 416 itm_khergit_war_helmet = 417 itm_khergit_helmet = 418 itm_khergit_guard_boots = 419 itm_khergit_guard_helmet = 420 itm_khergit_cavalry_helmet = 421 itm_black_hood = 422 itm_light_leather = 423 itm_light_leather_boots = 424 itm_mail_and_plate = 425 itm_light_mail_and_plate = 426 itm_byzantion_helmet_a = 427 itm_magyar_helmet_a = 428 itm_rus_helmet_a = 429 itm_sipahi_helmet_a = 430 itm_shahi = 431 itm_rabati = 432
Python
ground_gray_stone = 0 ground_brown_stone = 1 ground_turf = 2 ground_steppe = 3 ground_snow = 4 ground_earth = 5 ground_desert = 6 ground_forest = 7 ground_pebbles = 8 ground_village = 9 ground_path = 10
Python
str_no_string = 0 str_empty_string = 1 str_yes = 2 str_no = 3 str_blank_string = 4 str_error_string = 5 str_noone = 6 str_s0 = 7 str_blank_s1 = 8 str_reg1 = 9 str_s50_comma_s51 = 10 str_s50_and_s51 = 11 str_s5_s_party = 12 str_given_by_s1_at_s2 = 13 str_given_by_s1_in_wilderness = 14 str_s7_raiders = 15 str_bandits_eliminated_by_another = 16 str_msg_battle_won = 17 str_tutorial_map1 = 18 str_change_color_1 = 19 str_change_color_2 = 20 str_change_background = 21 str_change_flag_type = 22 str_change_map_flag_type = 23 str_randomize = 24 str_sample_banner = 25 str_sample_map_banner = 26 str_number_of_charges = 27 str_change_charge_1 = 28 str_change_charge_1_color = 29 str_change_charge_2 = 30 str_change_charge_2_color = 31 str_change_charge_3 = 32 str_change_charge_3_color = 33 str_change_charge_4 = 34 str_change_charge_4_color = 35 str_change_charge_position = 36 str_choose_position = 37 str_choose_charge = 38 str_choose_background = 39 str_choose_flag_type = 40 str_choose_map_flag_type = 41 str_choose_color = 42 str_accept = 43 str_charge_no_1 = 44 str_charge_no_2 = 45 str_charge_no_3 = 46 str_charge_no_4 = 47 str_change = 48 str_plus = 49 str_minus = 50 str_color_no_1 = 51 str_color_no_2 = 52 str_charge = 53 str_color = 54 str_flip_horizontal = 55 str_flip_vertical = 56 str_hold_fire = 57 str_blunt_hold_fire = 58 str_tutorial_ammo_refilled = 59 str_tutorial_failed = 60 str_tutorial_1_msg_1 = 61 str_tutorial_1_msg_2 = 62 str_tutorial_1_msg_3 = 63 str_tutorial_1_msg_4 = 64 str_tutorial_1_msg_5 = 65 str_tutorial_1_msg_6 = 66 str_tutorial_2_msg_1 = 67 str_tutorial_2_msg_2 = 68 str_tutorial_2_msg_3 = 69 str_tutorial_2_msg_4 = 70 str_tutorial_2_msg_5 = 71 str_tutorial_2_msg_6 = 72 str_tutorial_2_msg_7 = 73 str_tutorial_2_msg_8 = 74 str_tutorial_2_msg_9 = 75 str_tutorial_3_msg_1 = 76 str_tutorial_3_msg_2 = 77 str_tutorial_3_msg_3 = 78 str_tutorial_3_msg_4 = 79 str_tutorial_3_msg_5 = 80 str_tutorial_3_msg_6 = 81 str_tutorial_3_2_msg_1 = 82 str_tutorial_3_2_msg_2 = 83 str_tutorial_3_2_msg_3 = 84 str_tutorial_3_2_msg_4 = 85 str_tutorial_3_2_msg_5 = 86 str_tutorial_4_msg_1 = 87 str_tutorial_4_msg_2 = 88 str_tutorial_4_msg_3 = 89 str_tutorial_4_msg_4 = 90 str_tutorial_4_msg_5 = 91 str_tutorial_4_msg_6 = 92 str_tutorial_4_msg_7 = 93 str_tutorial_5_msg_1 = 94 str_tutorial_5_msg_2 = 95 str_tutorial_5_msg_3 = 96 str_tutorial_5_msg_4 = 97 str_tutorial_5_msg_5 = 98 str_tutorial_5_msg_6 = 99 str_trainer_help_1 = 100 str_trainer_help_2 = 101 str_custom_battle_1 = 102 str_custom_battle_2 = 103 str_custom_battle_3 = 104 str_custom_battle_4 = 105 str_custom_battle_5 = 106 str_finished = 107 str_delivered_damage = 108 str_archery_target_hit = 109 str_use_baggage_for_inventory = 110 str_cant_use_inventory_now = 111 str_cant_use_inventory_arena = 112 str_cant_use_inventory_disguised = 113 str_cant_use_inventory_tutorial = 114 str_1_denar = 115 str_reg1_denars = 116 str_january_reg1_reg2 = 117 str_february_reg1_reg2 = 118 str_march_reg1_reg2 = 119 str_april_reg1_reg2 = 120 str_may_reg1_reg2 = 121 str_june_reg1_reg2 = 122 str_july_reg1_reg2 = 123 str_august_reg1_reg2 = 124 str_september_reg1_reg2 = 125 str_october_reg1_reg2 = 126 str_november_reg1_reg2 = 127 str_december_reg1_reg2 = 128 str_town_nighttime = 129 str_door_locked = 130 str_castle_is_abondened = 131 str_town_is_abondened = 132 str_place_is_occupied_by_player = 133 str_place_is_occupied_by_enemy = 134 str_place_is_occupied_by_friendly = 135 str_do_you_want_to_retreat = 136 str_give_up_fight = 137 str_do_you_wish_to_leave_tutorial = 138 str_do_you_wish_to_surrender = 139 str_can_not_retreat = 140 str_s1_joined_battle_enemy = 141 str_s1_joined_battle_friend = 142 str_entrance_to_town_forbidden = 143 str_sneaking_to_town_impossible = 144 str_battle_won = 145 str_battle_lost = 146 str_attack_walls_success = 147 str_attack_walls_failure = 148 str_attack_walls_continue = 149 str_order_attack_success = 150 str_order_attack_failure = 151 str_order_attack_continue = 152 str_join_order_attack_success = 153 str_join_order_attack_failure = 154 str_join_order_attack_continue = 155 str_siege_defender_order_attack_success = 156 str_siege_defender_order_attack_failure = 157 str_siege_defender_order_attack_continue = 158 str_hero_taken_prisoner = 159 str_hero_freed = 160 str_center_captured = 161 str_troop_relation_increased = 162 str_troop_relation_detoriated = 163 str_faction_relation_increased = 164 str_faction_relation_detoriated = 165 str_party_gained_morale = 166 str_party_lost_morale = 167 str_qst_follow_spy_noticed_you = 168 str_father = 169 str_husband = 170 str_wife = 171 str_daughter = 172 str_mother = 173 str_son = 174 str_brother = 175 str_sister = 176 str_he = 177 str_she = 178 str_s3s_s2 = 179 str_s5_is_s51 = 180 str_s5_is_the_ruler_of_s51 = 181 str_s5_is_a_nobleman_of_s6 = 182 str_relation_mnus_100 = 183 str_relation_mnus_90 = 184 str_relation_mnus_80 = 185 str_relation_mnus_70 = 186 str_relation_mnus_60 = 187 str_relation_mnus_50 = 188 str_relation_mnus_40 = 189 str_relation_mnus_30 = 190 str_relation_mnus_20 = 191 str_relation_mnus_10 = 192 str_relation_plus_0 = 193 str_relation_plus_10 = 194 str_relation_plus_20 = 195 str_relation_plus_30 = 196 str_relation_plus_40 = 197 str_relation_plus_50 = 198 str_relation_plus_60 = 199 str_relation_plus_70 = 200 str_relation_plus_80 = 201 str_relation_plus_90 = 202 str_relation_mnus_100_ns = 203 str_relation_mnus_90_ns = 204 str_relation_mnus_80_ns = 205 str_relation_mnus_70_ns = 206 str_relation_mnus_60_ns = 207 str_relation_mnus_50_ns = 208 str_relation_mnus_40_ns = 209 str_relation_mnus_30_ns = 210 str_relation_mnus_20_ns = 211 str_relation_mnus_10_ns = 212 str_relation_plus_0_ns = 213 str_relation_plus_10_ns = 214 str_relation_plus_20_ns = 215 str_relation_plus_30_ns = 216 str_relation_plus_40_ns = 217 str_relation_plus_50_ns = 218 str_relation_plus_60_ns = 219 str_relation_plus_70_ns = 220 str_relation_plus_80_ns = 221 str_relation_plus_90_ns = 222 str_relation_reg1 = 223 str_center_relation_mnus_100 = 224 str_center_relation_mnus_90 = 225 str_center_relation_mnus_80 = 226 str_center_relation_mnus_70 = 227 str_center_relation_mnus_60 = 228 str_center_relation_mnus_50 = 229 str_center_relation_mnus_40 = 230 str_center_relation_mnus_30 = 231 str_center_relation_mnus_20 = 232 str_center_relation_mnus_10 = 233 str_center_relation_plus_0 = 234 str_center_relation_plus_10 = 235 str_center_relation_plus_20 = 236 str_center_relation_plus_30 = 237 str_center_relation_plus_40 = 238 str_center_relation_plus_50 = 239 str_center_relation_plus_60 = 240 str_center_relation_plus_70 = 241 str_center_relation_plus_80 = 242 str_center_relation_plus_90 = 243 str_town_prosperity_0 = 244 str_town_prosperity_10 = 245 str_town_prosperity_20 = 246 str_town_prosperity_30 = 247 str_town_prosperity_40 = 248 str_town_prosperity_50 = 249 str_town_prosperity_60 = 250 str_town_prosperity_70 = 251 str_town_prosperity_80 = 252 str_town_prosperity_90 = 253 str_town_prosperity_100 = 254 str_village_prosperity_0 = 255 str_village_prosperity_10 = 256 str_village_prosperity_20 = 257 str_village_prosperity_30 = 258 str_village_prosperity_40 = 259 str_village_prosperity_50 = 260 str_village_prosperity_60 = 261 str_village_prosperity_70 = 262 str_village_prosperity_80 = 263 str_village_prosperity_90 = 264 str_village_prosperity_100 = 265 str_war_report_minus_4 = 266 str_war_report_minus_3 = 267 str_war_report_minus_2 = 268 str_war_report_minus_1 = 269 str_war_report_0 = 270 str_war_report_plus_1 = 271 str_war_report_plus_2 = 272 str_war_report_plus_3 = 273 str_war_report_plus_4 = 274 str_persuasion_summary_very_bad = 275 str_persuasion_summary_bad = 276 str_persuasion_summary_average = 277 str_persuasion_summary_good = 278 str_persuasion_summary_very_good = 279 str_secret_sign_1 = 280 str_secret_sign_2 = 281 str_secret_sign_3 = 282 str_secret_sign_4 = 283 str_countersign_1 = 284 str_countersign_2 = 285 str_countersign_3 = 286 str_countersign_4 = 287 str_name_1 = 288 str_name_2 = 289 str_name_3 = 290 str_name_4 = 291 str_name_5 = 292 str_name_6 = 293 str_name_7 = 294 str_name_8 = 295 str_name_9 = 296 str_name_10 = 297 str_name_11 = 298 str_name_12 = 299 str_name_13 = 300 str_name_14 = 301 str_name_15 = 302 str_name_16 = 303 str_name_17 = 304 str_name_18 = 305 str_name_19 = 306 str_name_20 = 307 str_name_21 = 308 str_name_22 = 309 str_name_23 = 310 str_name_24 = 311 str_name_25 = 312 str_surname_1 = 313 str_surname_2 = 314 str_surname_3 = 315 str_surname_4 = 316 str_surname_5 = 317 str_surname_6 = 318 str_surname_7 = 319 str_surname_8 = 320 str_surname_9 = 321 str_surname_10 = 322 str_surname_11 = 323 str_surname_12 = 324 str_surname_13 = 325 str_surname_14 = 326 str_surname_15 = 327 str_surname_16 = 328 str_surname_17 = 329 str_surname_18 = 330 str_surname_19 = 331 str_surname_20 = 332 str_surname_21 = 333 str_surname_22 = 334 str_surname_23 = 335 str_surname_24 = 336 str_surname_25 = 337 str_surname_26 = 338 str_surname_27 = 339 str_surname_28 = 340 str_surname_29 = 341 str_surname_30 = 342 str_surname_31 = 343 str_surname_32 = 344 str_surname_33 = 345 str_surname_34 = 346 str_surname_35 = 347 str_surname_36 = 348 str_surname_37 = 349 str_surname_38 = 350 str_surname_39 = 351 str_surname_40 = 352 str_surname_41 = 353 str_surnames_end = 354 str_number_of_troops_killed_reg1 = 355 str_number_of_troops_wounded_reg1 = 356 str_number_of_own_troops_killed_reg1 = 357 str_number_of_own_troops_wounded_reg1 = 358 str_retreat = 359 str_siege_continues = 360 str_casualty_display = 361 str_casualty_display_hp = 362 str_quest_log_updated = 363 str_banner_selection_text = 364 str_retirement_text_1 = 365 str_retirement_text_2 = 366 str_retirement_text_3 = 367 str_retirement_text_4 = 368 str_retirement_text_5 = 369 str_retirement_text_6 = 370 str_retirement_text_7 = 371 str_retirement_text_8 = 372 str_retirement_text_9 = 373 str_retirement_text_10 = 374 str_loot_village = 375 str_steal_from_villagers = 376 str_rob_caravan = 377 str_sell_slavery = 378 str_men_hungry = 379 str_men_unpaid = 380 str_excessive_casualties = 381 str_surrender = 382 str_flee_battle = 383 str_pay_bandits = 384 str_fail_quest = 385 str_squander_money = 386 str_murder_merchant = 387 str_round_up_serfs = 388 str_battle_fate_1 = 389 str_battle_fate_2 = 390 str_battle_fate_3 = 391 str_battle_fate_4 = 392 str_battle_fate_5 = 393 str_npc_morale_report = 394 str_happy = 395 str_content = 396 str_concerned = 397 str_not_happy = 398 str_miserable = 399 str_morale_reg1 = 400 str_bar_enthusiastic = 401 str_bar_content = 402 str_bar_weary = 403 str_bar_disgruntled = 404 str_bar_miserable = 405 str_here_plus_space = 406 str_npc1_intro = 407 str_npc2_intro = 408 str_npc3_intro = 409 str_npc4_intro = 410 str_npc5_intro = 411 str_npc6_intro = 412 str_npc7_intro = 413 str_npc8_intro = 414 str_npc9_intro = 415 str_npc10_intro = 416 str_npc11_intro = 417 str_npc12_intro = 418 str_npc13_intro = 419 str_npc14_intro = 420 str_npc15_intro = 421 str_npc16_intro = 422 str_npc1_intro_response_1 = 423 str_npc2_intro_response_1 = 424 str_npc3_intro_response_1 = 425 str_npc4_intro_response_1 = 426 str_npc5_intro_response_1 = 427 str_npc6_intro_response_1 = 428 str_npc7_intro_response_1 = 429 str_npc8_intro_response_1 = 430 str_npc9_intro_response_1 = 431 str_npc10_intro_response_1 = 432 str_npc11_intro_response_1 = 433 str_npc12_intro_response_1 = 434 str_npc13_intro_response_1 = 435 str_npc14_intro_response_1 = 436 str_npc15_intro_response_1 = 437 str_npc16_intro_response_1 = 438 str_npc1_intro_response_2 = 439 str_npc2_intro_response_2 = 440 str_npc3_intro_response_2 = 441 str_npc4_intro_response_2 = 442 str_npc5_intro_response_2 = 443 str_npc6_intro_response_2 = 444 str_npc7_intro_response_2 = 445 str_npc8_intro_response_2 = 446 str_npc9_intro_response_2 = 447 str_npc10_intro_response_2 = 448 str_npc11_intro_response_2 = 449 str_npc12_intro_response_2 = 450 str_npc13_intro_response_2 = 451 str_npc14_intro_response_2 = 452 str_npc15_intro_response_2 = 453 str_npc16_intro_response_2 = 454 str_npc1_backstory_a = 455 str_npc2_backstory_a = 456 str_npc3_backstory_a = 457 str_npc4_backstory_a = 458 str_npc5_backstory_a = 459 str_npc6_backstory_a = 460 str_npc7_backstory_a = 461 str_npc8_backstory_a = 462 str_npc9_backstory_a = 463 str_npc10_backstory_a = 464 str_npc11_backstory_a = 465 str_npc12_backstory_a = 466 str_npc13_backstory_a = 467 str_npc14_backstory_a = 468 str_npc15_backstory_a = 469 str_npc16_backstory_a = 470 str_npc1_backstory_b = 471 str_npc2_backstory_b = 472 str_npc3_backstory_b = 473 str_npc4_backstory_b = 474 str_npc5_backstory_b = 475 str_npc6_backstory_b = 476 str_npc7_backstory_b = 477 str_npc8_backstory_b = 478 str_npc9_backstory_b = 479 str_npc10_backstory_b = 480 str_npc11_backstory_b = 481 str_npc12_backstory_b = 482 str_npc13_backstory_b = 483 str_npc14_backstory_b = 484 str_npc15_backstory_b = 485 str_npc16_backstory_b = 486 str_npc1_backstory_c = 487 str_npc2_backstory_c = 488 str_npc3_backstory_c = 489 str_npc4_backstory_c = 490 str_npc5_backstory_c = 491 str_npc6_backstory_c = 492 str_npc7_backstory_c = 493 str_npc8_backstory_c = 494 str_npc9_backstory_c = 495 str_npc10_backstory_c = 496 str_npc11_backstory_c = 497 str_npc12_backstory_c = 498 str_npc13_backstory_c = 499 str_npc14_backstory_c = 500 str_npc15_backstory_c = 501 str_npc16_backstory_c = 502 str_npc1_backstory_later = 503 str_npc2_backstory_later = 504 str_npc3_backstory_later = 505 str_npc4_backstory_later = 506 str_npc5_backstory_later = 507 str_npc6_backstory_later = 508 str_npc7_backstory_later = 509 str_npc8_backstory_later = 510 str_npc9_backstory_later = 511 str_npc10_backstory_later = 512 str_npc11_backstory_later = 513 str_npc12_backstory_later = 514 str_npc13_backstory_later = 515 str_npc14_backstory_later = 516 str_npc15_backstory_later = 517 str_npc16_backstory_later = 518 str_npc1_backstory_response_1 = 519 str_npc2_backstory_response_1 = 520 str_npc3_backstory_response_1 = 521 str_npc4_backstory_response_1 = 522 str_npc5_backstory_response_1 = 523 str_npc6_backstory_response_1 = 524 str_npc7_backstory_response_1 = 525 str_npc8_backstory_response_1 = 526 str_npc9_backstory_response_1 = 527 str_npc10_backstory_response_1 = 528 str_npc11_backstory_response_1 = 529 str_npc12_backstory_response_1 = 530 str_npc13_backstory_response_1 = 531 str_npc14_backstory_response_1 = 532 str_npc15_backstory_response_1 = 533 str_npc16_backstory_response_1 = 534 str_npc1_backstory_response_2 = 535 str_npc2_backstory_response_2 = 536 str_npc3_backstory_response_2 = 537 str_npc4_backstory_response_2 = 538 str_npc5_backstory_response_2 = 539 str_npc6_backstory_response_2 = 540 str_npc7_backstory_response_2 = 541 str_npc8_backstory_response_2 = 542 str_npc9_backstory_response_2 = 543 str_npc10_backstory_response_2 = 544 str_npc11_backstory_response_2 = 545 str_npc12_backstory_response_2 = 546 str_npc13_backstory_response_2 = 547 str_npc14_backstory_response_2 = 548 str_npc15_backstory_response_2 = 549 str_npc16_backstory_response_2 = 550 str_npc1_signup = 551 str_npc2_signup = 552 str_npc3_signup = 553 str_npc4_signup = 554 str_npc5_signup = 555 str_npc6_signup = 556 str_npc7_signup = 557 str_npc8_signup = 558 str_npc9_signup = 559 str_npc10_signup = 560 str_npc11_signup = 561 str_npc12_signup = 562 str_npc13_signup = 563 str_npc14_signup = 564 str_npc15_signup = 565 str_npc16_signup = 566 str_npc1_signup_2 = 567 str_npc2_signup_2 = 568 str_npc3_signup_2 = 569 str_npc4_signup_2 = 570 str_npc5_signup_2 = 571 str_npc6_signup_2 = 572 str_npc7_signup_2 = 573 str_npc8_signup_2 = 574 str_npc9_signup_2 = 575 str_npc10_signup_2 = 576 str_npc11_signup_2 = 577 str_npc12_signup_2 = 578 str_npc13_signup_2 = 579 str_npc14_signup_2 = 580 str_npc15_signup_2 = 581 str_npc16_signup_2 = 582 str_npc1_signup_response_1 = 583 str_npc2_signup_response_1 = 584 str_npc3_signup_response_1 = 585 str_npc4_signup_response_1 = 586 str_npc5_signup_response_1 = 587 str_npc6_signup_response_1 = 588 str_npc7_signup_response_1 = 589 str_npc8_signup_response_1 = 590 str_npc9_signup_response_1 = 591 str_npc10_signup_response_1 = 592 str_npc11_signup_response_1 = 593 str_npc12_signup_response_1 = 594 str_npc13_signup_response_1 = 595 str_npc14_signup_response_1 = 596 str_npc15_signup_response_1 = 597 str_npc16_signup_response_1 = 598 str_npc1_signup_response_2 = 599 str_npc2_signup_response_2 = 600 str_npc3_signup_response_2 = 601 str_npc4_signup_response_2 = 602 str_npc5_signup_response_2 = 603 str_npc6_signup_response_2 = 604 str_npc7_signup_response_2 = 605 str_npc8_signup_response_2 = 606 str_npc9_signup_response_2 = 607 str_npc10_signup_response_2 = 608 str_npc11_signup_response_2 = 609 str_npc12_signup_response_2 = 610 str_npc13_signup_response_2 = 611 str_npc14_signup_response_2 = 612 str_npc15_signup_response_2 = 613 str_npc16_signup_response_2 = 614 str_npc1_payment = 615 str_npc2_payment = 616 str_npc3_payment = 617 str_npc4_payment = 618 str_npc5_payment = 619 str_npc6_payment = 620 str_npc7_payment = 621 str_npc8_payment = 622 str_npc9_payment = 623 str_npc10_payment = 624 str_npc11_payment = 625 str_npc12_payment = 626 str_npc13_payment = 627 str_npc14_payment = 628 str_npc15_payment = 629 str_npc16_payment = 630 str_npc1_payment_response = 631 str_npc2_payment_response = 632 str_npc3_payment_response = 633 str_npc4_payment_response = 634 str_npc5_payment_response = 635 str_npc6_payment_response = 636 str_npc7_payment_response = 637 str_npc8_payment_response = 638 str_npc9_payment_response = 639 str_npc10_payment_response = 640 str_npc11_payment_response = 641 str_npc12_payment_response = 642 str_npc13_payment_response = 643 str_npc14_payment_response = 644 str_npc15_payment_response = 645 str_npc16_payment_response = 646 str_npc1_morality_speech = 647 str_npc2_morality_speech = 648 str_npc3_morality_speech = 649 str_npc4_morality_speech = 650 str_npc5_morality_speech = 651 str_npc6_morality_speech = 652 str_npc7_morality_speech = 653 str_npc8_morality_speech = 654 str_npc9_morality_speech = 655 str_npc10_morality_speech = 656 str_npc11_morality_speech = 657 str_npc12_morality_speech = 658 str_npc13_morality_speech = 659 str_npc14_morality_speech = 660 str_npc15_morality_speech = 661 str_npc16_morality_speech = 662 str_npc1_2ary_morality_speech = 663 str_npc2_2ary_morality_speech = 664 str_npc3_2ary_morality_speech = 665 str_npc4_2ary_morality_speech = 666 str_npc5_2ary_morality_speech = 667 str_npc6_2ary_morality_speech = 668 str_npc7_2ary_morality_speech = 669 str_npc8_2ary_morality_speech = 670 str_npc9_2ary_morality_speech = 671 str_npc10_2ary_morality_speech = 672 str_npc11_2ary_morality_speech = 673 str_npc12_2ary_morality_speech = 674 str_npc13_2ary_morality_speech = 675 str_npc14_2ary_morality_speech = 676 str_npc15_2ary_morality_speech = 677 str_npc16_2ary_morality_speech = 678 str_npc1_personalityclash_speech = 679 str_npc2_personalityclash_speech = 680 str_npc3_personalityclash_speech = 681 str_npc4_personalityclash_speech = 682 str_npc5_personalityclash_speech = 683 str_npc6_personalityclash_speech = 684 str_npc7_personalityclash_speech = 685 str_npc8_personalityclash_speech = 686 str_npc9_personalityclash_speech = 687 str_npc10_personalityclash_speech = 688 str_npc11_personalityclash_speech = 689 str_npc12_personalityclash_speech = 690 str_npc13_personalityclash_speech = 691 str_npc14_personalityclash_speech = 692 str_npc15_personalityclash_speech = 693 str_npc16_personalityclash_speech = 694 str_npc1_personalityclash_speech_b = 695 str_npc2_personalityclash_speech_b = 696 str_npc3_personalityclash_speech_b = 697 str_npc4_personalityclash_speech_b = 698 str_npc5_personalityclash_speech_b = 699 str_npc6_personalityclash_speech_b = 700 str_npc7_personalityclash_speech_b = 701 str_npc8_personalityclash_speech_b = 702 str_npc9_personalityclash_speech_b = 703 str_npc10_personalityclash_speech_b = 704 str_npc11_personalityclash_speech_b = 705 str_npc12_personalityclash_speech_b = 706 str_npc13_personalityclash_speech_b = 707 str_npc14_personalityclash_speech_b = 708 str_npc15_personalityclash_speech_b = 709 str_npc16_personalityclash_speech_b = 710 str_npc1_personalityclash2_speech = 711 str_npc2_personalityclash2_speech = 712 str_npc3_personalityclash2_speech = 713 str_npc4_personalityclash2_speech = 714 str_npc5_personalityclash2_speech = 715 str_npc6_personalityclash2_speech = 716 str_npc7_personalityclash2_speech = 717 str_npc8_personalityclash2_speech = 718 str_npc9_personalityclash2_speech = 719 str_npc10_personalityclash2_speech = 720 str_npc11_personalityclash2_speech = 721 str_npc12_personalityclash2_speech = 722 str_npc13_personalityclash2_speech = 723 str_npc14_personalityclash2_speech = 724 str_npc15_personalityclash2_speech = 725 str_npc16_personalityclash2_speech = 726 str_npc1_personalityclash2_speech_b = 727 str_npc2_personalityclash2_speech_b = 728 str_npc3_personalityclash2_speech_b = 729 str_npc4_personalityclash2_speech_b = 730 str_npc5_personalityclash2_speech_b = 731 str_npc6_personalityclash2_speech_b = 732 str_npc7_personalityclash2_speech_b = 733 str_npc8_personalityclash2_speech_b = 734 str_npc9_personalityclash2_speech_b = 735 str_npc10_personalityclash2_speech_b = 736 str_npc11_personalityclash2_speech_b = 737 str_npc12_personalityclash2_speech_b = 738 str_npc13_personalityclash2_speech_b = 739 str_npc14_personalityclash2_speech_b = 740 str_npc15_personalityclash2_speech_b = 741 str_npc16_personalityclash2_speech_b = 742 str_npc1_personalitymatch_speech = 743 str_npc2_personalitymatch_speech = 744 str_npc3_personalitymatch_speech = 745 str_npc4_personalitymatch_speech = 746 str_npc5_personalitymatch_speech = 747 str_npc6_personalitymatch_speech = 748 str_npc7_personalitymatch_speech = 749 str_npc8_personalitymatch_speech = 750 str_npc9_personalitymatch_speech = 751 str_npc10_personalitymatch_speech = 752 str_npc11_personalitymatch_speech = 753 str_npc12_personalitymatch_speech = 754 str_npc13_personalitymatch_speech = 755 str_npc14_personalityclash_speech = 756 str_npc15_personalitymatch_speech = 757 str_npc16_personalitymatch_speech = 758 str_npc1_personalitymatch_speech_b = 759 str_npc2_personalitymatch_speech_b = 760 str_npc3_personalitymatch_speech_b = 761 str_npc4_personalitymatch_speech_b = 762 str_npc5_personalitymatch_speech_b = 763 str_npc6_personalitymatch_speech_b = 764 str_npc7_personalitymatch_speech_b = 765 str_npc8_personalitymatch_speech_b = 766 str_npc9_personalitymatch_speech_b = 767 str_npc10_personalitymatch_speech_b = 768 str_npc11_personalitymatch_speech_b = 769 str_npc12_personalitymatch_speech_b = 770 str_npc13_personalitymatch_speech_b = 771 str_npc14_personalityclash_speech_b = 772 str_npc15_personalitymatch_speech_b = 773 str_npc16_personalitymatch_speech_b = 774 str_npc1_retirement_speech = 775 str_npc2_retirement_speech = 776 str_npc3_retirement_speech = 777 str_npc4_retirement_speech = 778 str_npc5_retirement_speech = 779 str_npc6_retirement_speech = 780 str_npc7_retirement_speech = 781 str_npc8_retirement_speech = 782 str_npc9_retirement_speech = 783 str_npc10_retirement_speech = 784 str_npc11_retirement_speech = 785 str_npc12_retirement_speech = 786 str_npc13_retirement_speech = 787 str_npc14_retirement_speech = 788 str_npc15_retirement_speech = 789 str_npc16_retirement_speech = 790 str_npc1_rehire_speech = 791 str_npc2_rehire_speech = 792 str_npc3_rehire_speech = 793 str_npc4_rehire_speech = 794 str_npc5_rehire_speech = 795 str_npc6_rehire_speech = 796 str_npc7_rehire_speech = 797 str_npc8_rehire_speech = 798 str_npc9_rehire_speech = 799 str_npc10_rehire_speech = 800 str_npc11_rehire_speech = 801 str_npc12_rehire_speech = 802 str_npc13_rehire_speech = 803 str_npc14_rehire_speech = 804 str_npc15_rehire_speech = 805 str_npc16_rehire_speech = 806 str_npc1_home_intro = 807 str_npc2_home_intro = 808 str_npc3_home_intro = 809 str_npc4_home_intro = 810 str_npc5_home_intro = 811 str_npc6_home_intro = 812 str_npc7_home_intro = 813 str_npc8_home_intro = 814 str_npc9_home_intro = 815 str_npc10_home_intro = 816 str_npc11_home_intro = 817 str_npc12_home_intro = 818 str_npc13_home_intro = 819 str_npc14_home_intro = 820 str_npc15_home_intro = 821 str_npc16_home_intro = 822 str_npc1_home_description = 823 str_npc2_home_description = 824 str_npc3_home_description = 825 str_npc4_home_description = 826 str_npc5_home_description = 827 str_npc6_home_description = 828 str_npc7_home_description = 829 str_npc8_home_description = 830 str_npc9_home_description = 831 str_npc10_home_description = 832 str_npc11_home_description = 833 str_npc12_home_description = 834 str_npc13_home_description = 835 str_npc14_home_description = 836 str_npc15_home_description = 837 str_npc16_home_description = 838 str_npc1_home_description_2 = 839 str_npc2_home_description_2 = 840 str_npc3_home_description_2 = 841 str_npc4_home_description_2 = 842 str_npc5_home_description_2 = 843 str_npc6_home_description_2 = 844 str_npc7_home_description_2 = 845 str_npc8_home_description_2 = 846 str_npc9_home_description_2 = 847 str_npc10_home_description_2 = 848 str_npc11_home_description_2 = 849 str_npc12_home_description_2 = 850 str_npc13_home_description_2 = 851 str_npc14_home_description_2 = 852 str_npc15_home_description_2 = 853 str_npc16_home_description_2 = 854 str_npc1_home_recap = 855 str_npc2_home_recap = 856 str_npc3_home_recap = 857 str_npc4_home_recap = 858 str_npc5_home_recap = 859 str_npc6_home_recap = 860 str_npc7_home_recap = 861 str_npc8_home_recap = 862 str_npc9_home_recap = 863 str_npc10_home_recap = 864 str_npc11_home_recap = 865 str_npc12_home_recap = 866 str_npc13_home_recap = 867 str_npc14_home_recap = 868 str_npc15_home_recap = 869 str_npc16_home_recap = 870 str_npc1_honorific = 871 str_npc2_honorific = 872 str_npc3_honorific = 873 str_npc4_honorific = 874 str_npc5_honorific = 875 str_npc6_honorific = 876 str_npc7_honorific = 877 str_npc8_honorific = 878 str_npc9_honorific = 879 str_npc10_honorific = 880 str_npc11_honorific = 881 str_npc12_honorific = 882 str_npc13_honorific = 883 str_npc14_honorific = 884 str_npc15_honorific = 885 str_npc16_honorific = 886 str_comment_intro_liege_affiliated = 887 str_comment_intro_famous_liege = 888 str_comment_intro_famous_martial = 889 str_comment_intro_famous_badtempered = 890 str_comment_intro_famous_pitiless = 891 str_comment_intro_famous_cunning = 892 str_comment_intro_famous_sadistic = 893 str_comment_intro_famous_goodnatured = 894 str_comment_intro_famous_upstanding = 895 str_comment_intro_noble_liege = 896 str_comment_intro_noble_martial = 897 str_comment_intro_noble_badtempered = 898 str_comment_intro_noble_pitiless = 899 str_comment_intro_noble_cunning = 900 str_comment_intro_noble_sadistic = 901 str_comment_intro_noble_goodnatured = 902 str_comment_intro_noble_upstanding = 903 str_comment_intro_common_liege = 904 str_comment_intro_common_martial = 905 str_comment_intro_common_badtempered = 906 str_comment_intro_common_pitiless = 907 str_comment_intro_common_cunning = 908 str_comment_intro_common_sadistic = 909 str_comment_intro_common_goodnatured = 910 str_comment_intro_common_upstanding = 911 str_comment_you_raided_my_village_enemy_benevolent = 912 str_comment_you_raided_my_village_enemy_spiteful = 913 str_comment_you_raided_my_village_enemy_coldblooded = 914 str_comment_you_raided_my_village_enemy = 915 str_comment_you_raided_my_village_unfriendly_spiteful = 916 str_comment_you_raided_my_village_friendly = 917 str_comment_you_raided_my_village_default = 918 str_comment_you_robbed_my_village_enemy_coldblooded = 919 str_comment_you_robbed_my_village_enemy = 920 str_comment_you_robbed_my_village_friendly_spiteful = 921 str_comment_you_robbed_my_village_friendly = 922 str_comment_you_robbed_my_village_default = 923 str_comment_you_accosted_my_caravan_enemy = 924 str_comment_you_accosted_my_caravan_default = 925 str_comment_you_helped_villagers_benevolent = 926 str_comment_you_helped_villagers_friendly_cruel = 927 str_comment_you_helped_villagers_friendly = 928 str_comment_you_helped_villagers_unfriendly_spiteful = 929 str_comment_you_helped_villagers_cruel = 930 str_comment_you_helped_villagers_default = 931 str_comment_you_captured_a_castle_allied_friendly = 932 str_comment_you_captured_a_castle_allied_spiteful = 933 str_comment_you_captured_a_castle_allied_unfriendly_spiteful = 934 str_comment_you_captured_a_castle_allied_unfriendly = 935 str_comment_you_captured_a_castle_allied = 936 str_comment_you_captured_my_castle_enemy_spiteful = 937 str_comment_you_captured_my_castle_enemy_chivalrous = 938 str_comment_you_captured_my_castle_enemy = 939 str_comment_we_defeated_a_lord_unfriendly_spiteful = 940 str_comment_we_defeated_a_lord_unfriendly = 941 str_comment_we_defeated_a_lord_cruel = 942 str_comment_we_defeated_a_lord_quarrelsome = 943 str_comment_we_defeated_a_lord_upstanding = 944 str_comment_we_defeated_a_lord_default = 945 str_comment_we_fought_in_siege_unfriendly_spiteful = 946 str_comment_we_fought_in_siege_unfriendly = 947 str_comment_we_fought_in_siege_cruel = 948 str_comment_we_fought_in_siege_quarrelsome = 949 str_comment_we_fought_in_siege_upstanding = 950 str_comment_we_fought_in_siege_default = 951 str_comment_we_fought_in_major_battle_unfriendly_spiteful = 952 str_comment_we_fought_in_major_battle_unfriendly = 953 str_comment_we_fought_in_major_battle_cruel = 954 str_comment_we_fought_in_major_battle_quarrelsome = 955 str_comment_we_fought_in_major_battle_upstanding = 956 str_comment_we_fought_in_major_battle_default = 957 str_comment_you_defeated_a_lord_allied_liege = 958 str_comment_you_defeated_a_lord_allied_unfriendly_spiteful = 959 str_comment_you_defeated_a_lord_allied_spiteful = 960 str_comment_you_defeated_a_lord_allied_unfriendly_chivalrous = 961 str_comment_you_defeated_a_lord_allied = 962 str_comment_you_defeated_me_enemy_chivalrous = 963 str_comment_you_defeated_me_enemy_spiteful = 964 str_comment_you_defeated_me_enemy = 965 str_comment_i_defeated_you_enemy_spiteful = 966 str_comment_i_defeated_you_enemy_chivalrous = 967 str_comment_i_defeated_you_enemy_benevolent = 968 str_comment_i_defeated_you_enemy_coldblooded = 969 str_comment_i_defeated_you_enemy = 970 str_comment_we_were_defeated_unfriendly_spiteful = 971 str_comment_we_were_defeated_unfriendly = 972 str_comment_we_were_defeated_cruel = 973 str_comment_we_were_defeated_default = 974 str_comment_you_were_defeated_allied_friendly_spiteful = 975 str_comment_you_were_defeated_allied_unfriendly_cruel = 976 str_comment_you_were_defeated_allied_spiteful = 977 str_comment_you_were_defeated_allied_pitiless = 978 str_comment_you_were_defeated_allied_unfriendly_upstanding = 979 str_comment_you_were_defeated_allied_unfriendly = 980 str_comment_you_were_defeated_allied = 981 str_comment_you_helped_my_ally_unfriendly_chivalrous = 982 str_comment_you_helped_my_ally_unfriendly = 983 str_comment_you_helped_my_ally_liege = 984 str_comment_you_helped_my_ally_unfriendly_spiteful = 985 str_comment_you_helped_my_ally_spiteful = 986 str_comment_you_helped_my_ally_chivalrous = 987 str_comment_you_helped_my_ally_default = 988 str_comment_you_were_defeated_allied_unfriendly = 989 str_comment_you_were_defeated_allied = 990 str_comment_you_abandoned_us_unfriendly_spiteful = 991 str_comment_you_abandoned_us_unfriendly_pitiless = 992 str_comment_you_abandoned_us_spiteful = 993 str_comment_you_abandoned_us_chivalrous = 994 str_comment_you_abandoned_us_benefitofdoubt = 995 str_comment_you_abandoned_us_default = 996 str_comment_you_ran_from_me_enemy_spiteful = 997 str_comment_you_ran_from_me_enemy_chivalrous = 998 str_comment_you_ran_from_me_enemy_benevolent = 999 str_comment_you_ran_from_me_enemy_coldblooded = 1000 str_comment_you_ran_from_me_enemy = 1001 str_comment_you_ran_from_foe_allied_chivalrous = 1002 str_comment_you_ran_from_foe_allied_upstanding = 1003 str_comment_you_ran_from_foe_allied_spiteful = 1004 str_comment_you_defeated_my_friend_enemy_pragmatic = 1005 str_comment_you_defeated_my_friend_enemy_chivalrous = 1006 str_comment_you_defeated_my_friend_enemy_spiteful = 1007 str_comment_you_defeated_my_friend_enemy = 1008 str_comment_you_captured_a_lord_allied_friendly_spiteful = 1009 str_comment_you_captured_a_lord_allied_unfriendly_spiteful = 1010 str_comment_you_captured_a_lord_allied_chivalrous = 1011 str_comment_you_captured_a_lord_allied = 1012 str_comment_you_let_go_a_lord_allied_chivalrous = 1013 str_comment_you_let_go_a_lord_allied_upstanding = 1014 str_comment_you_let_go_a_lord_allied_coldblooded = 1015 str_comment_you_let_go_a_lord_allied_unfriendly_spiteful = 1016 str_comment_you_let_go_a_lord_allied = 1017 str_comment_you_let_me_go_spiteful = 1018 str_comment_you_let_me_go_enemy_chivalrous = 1019 str_comment_you_let_me_go_enemy_coldblooded = 1020 str_comment_you_let_me_go_enemy = 1021 str_comment_you_let_me_go_default = 1022 str_comment_pledged_allegiance_allied_martial_unfriendly = 1023 str_comment_pledged_allegiance_allied_martial = 1024 str_comment_pledged_allegiance_allied_quarrelsome_unfriendly = 1025 str_comment_pledged_allegiance_allied_quarrelsome = 1026 str_comment_pledged_allegiance_allied_selfrighteous_unfriendly = 1027 str_comment_pledged_allegiance_allied_selfrighteous = 1028 str_comment_pledged_allegiance_allied_cunning_unfriendly = 1029 str_comment_pledged_allegiance_allied_cunning = 1030 str_comment_pledged_allegiance_allied_debauched_unfriendly = 1031 str_comment_pledged_allegiance_allied_debauched = 1032 str_comment_pledged_allegiance_allied_goodnatured_unfriendly = 1033 str_comment_pledged_allegiance_allied_goodnatured = 1034 str_comment_pledged_allegiance_allied_upstanding_unfriendly = 1035 str_comment_pledged_allegiance_allied_upstanding = 1036 str_comment_our_king_granted_you_a_fief_allied_friendly_cruel = 1037 str_comment_our_king_granted_you_a_fief_allied_friendly_cynical = 1038 str_comment_our_king_granted_you_a_fief_allied_friendly = 1039 str_comment_our_king_granted_you_a_fief_allied_unfriendly_upstanding = 1040 str_comment_our_king_granted_you_a_fief_allied_unfriendly_spiteful = 1041 str_comment_our_king_granted_you_a_fief_allied_spiteful = 1042 str_comment_our_king_granted_you_a_fief_allied = 1043 str_comment_you_renounced_your_alliegance_enemy_friendly = 1044 str_comment_you_renounced_your_alliegance_friendly = 1045 str_comment_you_renounced_your_alliegance_unfriendly_spiteful = 1046 str_comment_you_renounced_your_alliegance_unfriendly_moralizing = 1047 str_comment_you_renounced_your_alliegance_enemy = 1048 str_comment_you_renounced_your_alliegance_default = 1049 str_personality_archetypes = 1050 str_martial = 1051 str_quarrelsome = 1052 str_selfrighteous = 1053 str_cunning = 1054 str_debauched = 1055 str_goodnatured = 1056 str_upstanding = 1057 str_surrender_demand_default = 1058 str_surrender_demand_martial = 1059 str_surrender_demand_quarrelsome = 1060 str_surrender_demand_pitiless = 1061 str_surrender_demand_cunning = 1062 str_surrender_demand_sadistic = 1063 str_surrender_demand_goodnatured = 1064 str_surrender_demand_upstanding = 1065 str_surrender_offer_default = 1066 str_surrender_offer_martial = 1067 str_surrender_offer_quarrelsome = 1068 str_surrender_offer_pitiless = 1069 str_surrender_offer_cunning = 1070 str_surrender_offer_sadistic = 1071 str_surrender_offer_goodnatured = 1072 str_surrender_offer_upstanding = 1073 str_prisoner_released_default = 1074 str_prisoner_released_martial = 1075 str_prisoner_released_quarrelsome = 1076 str_prisoner_released_pitiless = 1077 str_prisoner_released_cunning = 1078 str_prisoner_released_sadistic = 1079 str_prisoner_released_goodnatured = 1080 str_prisoner_released_upstanding = 1081 str_enemy_meet_default = 1082 str_enemy_meet_martial = 1083 str_enemy_meet_quarrelsome = 1084 str_enemy_meet_pitiless = 1085 str_enemy_meet_cunning = 1086 str_enemy_meet_sadistic = 1087 str_enemy_meet_goodnatured = 1088 str_enemy_meet_upstanding = 1089 str_battle_won_default = 1090 str_battle_won_martial = 1091 str_battle_won_quarrelsome = 1092 str_battle_won_pitiless = 1093 str_battle_won_cunning = 1094 str_battle_won_sadistic = 1095 str_battle_won_goodnatured = 1096 str_battle_won_upstanding = 1097 str_battle_won_grudging_default = 1098 str_battle_won_grudging_martial = 1099 str_battle_won_grudging_quarrelsome = 1100 str_battle_won_grudging_pitiless = 1101 str_battle_won_grudging_cunning = 1102 str_battle_won_grudging_sadistic = 1103 str_battle_won_grudging_goodnatured = 1104 str_battle_won_grudging_upstanding = 1105 str_battle_won_unfriendly_default = 1106 str_battle_won_unfriendly_martial = 1107 str_battle_won_unfriendly_quarrelsome = 1108 str_battle_won_unfriendly_pitiless = 1109 str_battle_won_unfriendly_cunning = 1110 str_battle_won_unfriendly_sadistic = 1111 str_battle_won_unfriendly_goodnatured = 1112 str_battle_won_unfriendly_upstanding = 1113 str_troop_train_request_default = 1114 str_troop_train_request_martial = 1115 str_troop_train_request_quarrelsome = 1116 str_troop_train_request_pitiless = 1117 str_troop_train_request_cunning = 1118 str_troop_train_request_sadistic = 1119 str_troop_train_request_goodnatured = 1120 str_troop_train_request_upstanding = 1121 str_unprovoked_attack_default = 1122 str_unprovoked_attack_martial = 1123 str_unprovoked_attack_quarrelsome = 1124 str_unprovoked_attack_pitiless = 1125 str_unprovoked_attack_cunning = 1126 str_unprovoked_attack_sadistic = 1127 str_unprovoked_attack_goodnatured = 1128 str_unprovoked_attack_upstanding = 1129 str_unnecessary_attack_default = 1130 str_unnecessary_attack_martial = 1131 str_unnecessary_attack_quarrelsome = 1132 str_unnecessary_attack_pitiless = 1133 str_unnecessary_attack_cunning = 1134 str_unnecessary_attack_sadistic = 1135 str_unnecessary_attack_goodnatured = 1136 str_unnecessary_attack_upstanding = 1137 str_lord_challenged_default = 1138 str_lord_challenged_martial = 1139 str_lord_challenged_quarrelsome = 1140 str_lord_challenged_pitiless = 1141 str_lord_challenged_cunning = 1142 str_lord_challenged_sadistic = 1143 str_lord_challenged_goodnatured = 1144 str_lord_challenged_upstanding = 1145 str_lord_mission_failed_default = 1146 str_lord_mission_failed_martial = 1147 str_lord_mission_failed_quarrelsome = 1148 str_lord_mission_failed_pitiless = 1149 str_lord_mission_failed_cunning = 1150 str_lord_mission_failed_sadistic = 1151 str_lord_mission_failed_goodnatured = 1152 str_lord_mission_failed_upstanding = 1153 str_lord_follow_refusal_default = 1154 str_lord_follow_refusal_martial = 1155 str_lord_follow_refusal_quarrelsome = 1156 str_lord_follow_refusal_pitiless = 1157 str_lord_follow_refusal_cunning = 1158 str_lord_follow_refusal_sadistic = 1159 str_lord_follow_refusal_goodnatured = 1160 str_lord_follow_refusal_upstanding = 1161 str_lord_insult_default = 1162 str_lord_insult_martial = 1163 str_lord_insult_quarrelsome = 1164 str_lord_insult_pitiless = 1165 str_lord_insult_cunning = 1166 str_lord_insult_sadistic = 1167 str_lord_insult_goodnatured = 1168 str_lord_insult_upstanding = 1169 str_rebellion_dilemma_default = 1170 str_rebellion_dilemma_martial = 1171 str_rebellion_dilemma_quarrelsome = 1172 str_rebellion_dilemma_pitiless = 1173 str_rebellion_dilemma_cunning = 1174 str_rebellion_dilemma_sadistic = 1175 str_rebellion_dilemma_goodnatured = 1176 str_rebellion_dilemma_upstanding = 1177 str_rebellion_dilemma_2_default = 1178 str_rebellion_dilemma_2_martial = 1179 str_rebellion_dilemma_2_quarrelsome = 1180 str_rebellion_dilemma_2_pitiless = 1181 str_rebellion_dilemma_2_cunning = 1182 str_rebellion_dilemma_2_sadistic = 1183 str_rebellion_dilemma_2_goodnatured = 1184 str_rebellion_dilemma_2_upstanding = 1185 str_rebellion_prior_argument_very_favorable = 1186 str_rebellion_prior_argument_favorable = 1187 str_rebellion_prior_argument_unfavorable = 1188 str_rebellion_prior_argument_very_unfavorable = 1189 str_rebellion_rival_default = 1190 str_rebellion_rival_martial = 1191 str_rebellion_rival_quarrelsome = 1192 str_rebellion_rival_pitiless = 1193 str_rebellion_rival_cunning = 1194 str_rebellion_rival_sadistic = 1195 str_rebellion_rival_goodnatured = 1196 str_rebellion_rival_upstanding = 1197 str_rebellion_argument_favorable = 1198 str_rebellion_argument_neutral = 1199 str_rebellion_argument_unfavorable = 1200 str_rebellion_persuasion_favorable = 1201 str_rebellion_persuasion_neutral = 1202 str_rebellion_persuasion_unfavorable = 1203 str_rebellion_relation_very_favorable = 1204 str_rebellion_relation_favorable = 1205 str_rebellion_relation_neutral = 1206 str_rebellion_relation_unfavorable = 1207 str_and_comma_3 = 1208 str_but_comma_3 = 1209 str_and_comma_1 = 1210 str_but_comma_1 = 1211 str_and_comma_2 = 1212 str_but_comma_2 = 1213 str_rebellion_agree_default = 1214 str_rebellion_agree_martial = 1215 str_rebellion_agree_quarrelsome = 1216 str_rebellion_agree_pitiless = 1217 str_rebellion_agree_cunning = 1218 str_rebellion_agree_sadistic = 1219 str_rebellion_agree_goodnatured = 1220 str_rebellion_agree_upstanding = 1221 str_rebellion_refuse_default = 1222 str_rebellion_refuse_martial = 1223 str_rebellion_refuse_quarrelsome = 1224 str_rebellion_agree_pitiless = 1225 str_rebellion_agree_cunning = 1226 str_rebellion_agree_sadistic = 1227 str_rebellion_agree_goodnatured = 1228 str_rebellion_agree_upstanding = 1229 str_talk_later_default = 1230 str_talk_later_martial = 1231 str_talk_later_quarrelsome = 1232 str_talk_later_pitiless = 1233 str_talk_later_cunning = 1234 str_talk_later_sadistic = 1235 str_talk_later_goodnatured = 1236 str_talk_later_upstanding = 1237 str_gossip_about_character_default = 1238 str_gossip_about_character_martial = 1239 str_gossip_about_character_quarrelsome = 1240 str_gossip_about_character_selfrighteous = 1241 str_gossip_about_character_cunning = 1242 str_gossip_about_character_sadistic = 1243 str_gossip_about_character_goodnatured = 1244 str_gossip_about_character_upstanding = 1245 str_latest_rumor = 1246 str_swadian_rebellion_pretender_intro = 1247 str_vaegir_rebellion_pretender_intro = 1248 str_khergit_rebellion_pretender_intro = 1249 str_nord_rebellion_pretender_intro = 1250 str_rhodok_rebellion_pretender_intro = 1251 str_swadian_rebellion_pretender_story_1 = 1252 str_vaegir_rebellion_pretender_story_1 = 1253 str_khergit_rebellion_pretender_story_1 = 1254 str_nord_rebellion_pretender_story_1 = 1255 str_rhodok_rebellion_pretender_story_1 = 1256 str_swadian_rebellion_pretender_story_2 = 1257 str_vaegir_rebellion_pretender_story_2 = 1258 str_khergit_rebellion_pretender_story_2 = 1259 str_nord_rebellion_pretender_story_2 = 1260 str_rhodok_rebellion_pretender_story_2 = 1261 str_swadian_rebellion_pretender_story_3 = 1262 str_vaegir_rebellion_pretender_story_3 = 1263 str_khergit_rebellion_pretender_story_3 = 1264 str_nord_rebellion_pretender_story_3 = 1265 str_rhodok_rebellion_pretender_story_3 = 1266 str_swadian_rebellion_monarch_response_1 = 1267 str_vaegir_rebellion_monarch_response_1 = 1268 str_khergit_rebellion_monarch_response_1 = 1269 str_nord_rebellion_monarch_response_1 = 1270 str_rhodok_rebellion_monarch_response_1 = 1271 str_swadian_rebellion_monarch_response_2 = 1272 str_vaegir_rebellion_monarch_response_2 = 1273 str_khergit_rebellion_monarch_response_2 = 1274 str_nord_rebellion_monarch_response_2 = 1275 str_rhodok_rebellion_monarch_response_2 = 1276 str_formation_array_1 = 1277 str_formation_array_2 = 1278 str_formation_array_3 = 1279 str_formation_array_4 = 1280 str_formation_array_5 = 1281 str_formation_array_6 = 1282 str_formation_array_7 = 1283 str_formation_array_8 = 1284 str_formation_array_end = 1285 str_formation_order_panel_array_1 = 1286 str_formation_order_panel_array_2 = 1287 str_formation_order_panel_array_3 = 1288 str_formation_order_panel_array_4 = 1289 str_formation_order_panel_array_5 = 1290 str_formation_order_panel_array_6 = 1291 str_formation_order_panel_array_7 = 1292 str_formation_order_panel_array_8 = 1293 str_formation_order_panel_array_end = 1294 str_formation_command_line = 1295 str_formation_command_phalanx = 1296 str_formation_command_wedge = 1297 str_formation_command_square = 1298 str_formation_command_line_pl = 1299 str_formation_command_phalanx_pl = 1300 str_formation_command_wedge_pl = 1301 str_formation_command_square_pl = 1302 str_formation_command_end = 1303 str_formation_advance = 1304 str_formation_move_back = 1305 str_formation_move_left = 1306 str_formation_move_right = 1307 str_formation_turn_left = 1308 str_formation_turn_right = 1309 str_formation_halt = 1310 str_formation_charge = 1311 str_formation_fall_back = 1312 str_formation_stand_closer = 1313 str_formation_spread_out = 1314 str_key_array_selection_1 = 1315 str_key_array_selection_2 = 1316 str_key_array_selection_3 = 1317 str_key_array_selection_4 = 1318 str_key_array_selection_5 = 1319 str_key_array_selection_6 = 1320 str_key_array_selection_7 = 1321 str_key_array_selection_8 = 1322 str_key_array_select_all = 1323 str_key_formation_selection = 1324 str_key_formation_selection_backward = 1325 str_key_formation_tighten = 1326 str_key_formation_disperse = 1327 str_key_formation_follow = 1328 str_key_formation_hold_pos = 1329 str_key_auto_rotation_toggle = 1330 str_key_apply_formation = 1331 str_key_formation_charge = 1332 str_key_formation_fall_back = 1333 str_key_formation_halt = 1334 str_key_formation_tactical_charge = 1335 str_key_formation_move_forward = 1336 str_key_formation_move_backward = 1337 str_key_formation_move_left = 1338 str_key_formation_move_right = 1339 str_key_formation_turn_left = 1340 str_key_formation_turn_right = 1341 str_key_dismiss_formation = 1342 str_key_formation_view_orders = 1343 str_formation_key_names_end = 1344 str_credits_1 = 1345 str_credits_2 = 1346 str_credits_3 = 1347 str_credits_4 = 1348 str_credits_8 = 1349 str_credits_5 = 1350 str_credits_6 = 1351 str_credits_9 = 1352 str_credits_7 = 1353 str_credits_10 = 1354 str_credits_11 = 1355 str_credits_12 = 1356
Python
from header_common import * from header_dialogs import * from header_operations import * from header_parties import * from header_item_modifiers import * from header_skills import * from header_triggers import * from ID_troops import * from ID_party_templates import * from module_constants import * #################################################################################################################### # During a dialog, the dialog lines are scanned from top to bottom. # If the dialog-line is spoken by the player, all the matching lines are displayed for the player to pick from. # If the dialog-line is spoken by another, the first (top-most) matching line is selected. # # Each dialog line contains the following fields: # 1) Dialogue partner: This should match the person player is talking to. # Usually this is a troop-id. # You can also use a party-template-id by appending '|party_tpl' to this field. # Use the constant 'anyone' if you'd like the line to match anybody. # Appending '|plyr' to this field means that the actual line is spoken by the player # Appending '|other(troop_id)' means that this line is spoken by a third person on the scene. # (You must make sure that this third person is present on the scene) # # 2) Starting dialog-state: # During a dialog there's always an active Dialog-state. # A dialog-line's starting dialog state must be the same as the active dialog state, for the line to be a possible candidate. # If the dialog is started by meeting a party on the map, initially, the active dialog state is "start" # If the dialog is started by speaking to an NPC in a town, initially, the active dialog state is "start" # If the dialog is started by helping a party defeat another party, initially, the active dialog state is "party_relieved" # If the dialog is started by liberating a prisoner, initially, the active dialog state is "prisoner_liberated" # If the dialog is started by defeating a party led by a hero, initially, the active dialog state is "enemy_defeated" # If the dialog is started by a trigger, initially, the active dialog state is "event_triggered" # 3) Conditions block (list): This must be a valid operation block. See header_operations.py for reference. # 4) Dialog Text (string): # 5) Ending dialog-state: # If a dialog line is picked, the active dialog-state will become the picked line's ending dialog-state. # 6) Consequences block (list): This must be a valid operation block. See header_operations.py for reference. #################################################################################################################### dialogs = [ [anyone ,"start", [(store_conversation_troop, "$g_talk_troop"), (store_conversation_agent, "$g_talk_agent"), (store_troop_faction, "$g_talk_troop_faction", "$g_talk_troop"), # (troop_get_slot, "$g_talk_troop_relation", "$g_talk_troop", slot_troop_player_relation), (call_script, "script_troop_get_player_relation", "$g_talk_troop"), (assign, "$g_talk_troop_relation", reg0), (try_begin), (this_or_next|is_between, "$g_talk_troop", village_elders_begin, village_elders_end), (is_between, "$g_talk_troop", mayors_begin, mayors_end), (party_get_slot, "$g_talk_troop_relation", "$current_town", slot_center_player_relation), (try_end), (store_relation, "$g_talk_troop_faction_relation", "$g_talk_troop_faction", "fac_player_faction"), (assign, "$g_talk_troop_party", "$g_encountered_party"), (try_begin), (troop_slot_ge, "$g_talk_troop", slot_troop_leaded_party, 1), (troop_get_slot, "$g_talk_troop_party", "$g_talk_troop", slot_troop_leaded_party), (try_end), # (assign, "$g_talk_troop_kingdom_relation", 0), # (try_begin), # (gt, "$players_kingdom", 0), # (store_relation, "$g_talk_troop_kingdom_relation", "$g_talk_troop_faction", "$players_kingdom"), # (try_end), (store_current_hours, "$g_current_hours"), (troop_get_slot, "$g_talk_troop_last_talk_time", "$g_talk_troop", slot_troop_last_talk_time), (troop_set_slot, "$g_talk_troop", slot_troop_last_talk_time, "$g_current_hours"), (store_sub, "$g_time_since_last_talk","$g_current_hours","$g_talk_troop_last_talk_time"), (troop_get_slot, "$g_talk_troop_met", "$g_talk_troop", slot_troop_met), (troop_set_slot, "$g_talk_troop", slot_troop_met, 1), (try_begin), # (this_or_next|eq, "$talk_context", tc_party_encounter), # (this_or_next|eq, "$talk_context", tc_castle_commander), (call_script, "script_party_calculate_strength", "p_collective_enemy",0), (assign, "$g_enemy_strength", reg0), (call_script, "script_party_calculate_strength", "p_main_party",0), (assign, "$g_ally_strength", reg0), (store_mul, "$g_strength_ratio", "$g_ally_strength", 100), (val_div, "$g_strength_ratio", "$g_enemy_strength"), (try_end), (assign, "$g_comment_found", 0), (try_begin), (troop_is_hero, "$g_talk_troop"), (talk_info_show, 1), (call_script, "script_setup_talk_info"), (try_end), (try_begin), (is_between, "$g_talk_troop", kingdom_heroes_begin, kingdom_heroes_end), (call_script, "script_get_relevant_comment_to_s42"), (assign, "$g_comment_found", reg0), (try_end), (troop_get_type, reg65, "$g_talk_troop"), (try_begin), (faction_slot_eq,"$g_talk_troop_faction",slot_faction_leader,"$g_talk_troop"), (str_store_string,s64,"@{reg65?my Lady:my Lord}"), #bug fix (str_store_string,s65,"@{reg65?my Lady:my Lord}"), (str_store_string,s66,"@{reg65?My Lady:My Lord}"), (str_store_string,s67,"@{reg65?My Lady:My Lord}"), #bug fix (else_try), (str_store_string,s64,"@{reg65?madame:sir}"), #bug fix (str_store_string,s65,"@{reg65?madame:sir}"), (str_store_string,s66,"@{reg65?Madame:Sir}"), (str_store_string,s67,"@{reg65?Madame:Sir}"), #bug fix (try_end), (eq, 1, 0)], "Warning: This line is never displayed. It is just for storing conversation variables.", "close_window", []], [anyone ,"member_chat", [(store_conversation_troop, "$g_talk_troop"), (try_begin), (is_between, "$g_talk_troop", companions_begin, companions_end), (talk_info_show, 1), (call_script, "script_setup_talk_info_companions"), (try_end), (troop_get_type, reg65, "$g_talk_troop"), (troop_get_type, reg65, "$g_talk_troop"), (try_begin), (faction_slot_eq,"$g_talk_troop_faction",slot_faction_leader,"$g_talk_troop"), (str_store_string,s64,"@{reg65?my Lady:my Lord}"), #bug fix (str_store_string,s65,"@{reg65?my Lady:my Lord}"), (str_store_string,s66,"@{reg65?My Lady:My Lord}"), (else_try), (str_store_string,s64,"@{reg65?madame:sir}"), #bug fix (str_store_string,s65,"@{reg65?madame:sir}"), (str_store_string,s66,"@{reg65?Madame:Sir}"), (try_end), (eq, 1, 0)], "Warning: This line is never displayed. It is just for storing conversation variables.", "close_window", []], [anyone ,"event_triggered", [(store_conversation_troop, "$g_talk_troop"), (try_begin), (is_between, "$g_talk_troop", companions_begin, companions_end), (talk_info_show, 1), (call_script, "script_setup_talk_info_companions"), (try_end), (troop_get_type, reg65, "$g_talk_troop"), (try_begin), (faction_slot_eq,"$g_talk_troop_faction",slot_faction_leader,"$g_talk_troop"), (str_store_string,s64,"@{reg65?my Lady:my Lord}"), #bug fix (str_store_string,s65,"@{reg65?my Lady:my Lord}"), (str_store_string,s66,"@{reg65?My Lady:My Lord}"), (else_try), (str_store_string,s64,"@{reg65?madame:sir}"), #bug fix (str_store_string,s65,"@{reg65?madame:sir}"), (str_store_string,s66,"@{reg65?Madame:Sir}"), (try_end), (eq, 1, 0)], "Warning: This line is never displayed. It is just for storing conversation variables.", "close_window", []], [trp_ramun_the_slave_trader, "start", [ (troop_slot_eq, "$g_talk_troop", slot_troop_met_previously, 0), ], "Good day to you, {young man/lassie}.", "ramun_introduce_1",[]], [trp_ramun_the_slave_trader|plyr, "ramun_introduce_1", [], "Forgive me, you look like a trader, but I see none of your merchandise.", "ramun_introduce_2",[ (troop_set_slot, "$g_talk_troop", slot_troop_met_previously, 1), ]], [trp_ramun_the_slave_trader|plyr, "ramun_introduce_1", [], "Never mind.", "close_window",[]], [trp_ramun_the_slave_trader, "ramun_introduce_2", [], "A trader? Oh, aye, I certainly am that.\ My merchandise is a bit different from most, however. It has to be fed and watered twice a day and tries to run away if I turn my back.", "ramun_introduce_3",[]], [trp_ramun_the_slave_trader|plyr, "ramun_introduce_3", [], "Livestock?", "ramun_introduce_4",[]], [trp_ramun_the_slave_trader, "ramun_introduce_4", [], "Close enough. I like to call myself the man who keeps every boat on this ocean moving.\ Boats are driven by oars, you see, and oars need men to pull them or they stop. That's where I come in.", "ramun_introduce_5",[]], [trp_ramun_the_slave_trader|plyr, "ramun_introduce_5", [], "Galley slaves.", "ramun_introduce_6",[]], [trp_ramun_the_slave_trader, "ramun_introduce_6", [], "Now you're catching on! A trading port like this couldn't survive without them.\ The ships lose a few hands on every voyage, so there's always a high demand. The captains come to me and they pay well.", "ramun_introduce_7",[]], [trp_ramun_the_slave_trader|plyr, "ramun_introduce_7", [], "Where do the slaves come from?", "ramun_introduce_8",[]], [trp_ramun_the_slave_trader, "ramun_introduce_8", [], "Mostly I deal in convicted criminals bought from the authorities.\ Others are prisoners of war from various nations, brought to me because I offer the best prices.\ However, on occasion I'll buy from privateers and other . . . 'individuals'. You can't be picky about your suppliers in this line of work.\ You wouldn't happen to have any prisoners with you, would you?", "ramun_introduce_9",[]], [trp_ramun_the_slave_trader|plyr, "ramun_introduce_9", [], "Me? ", "ramun_introduce_10",[]], [trp_ramun_the_slave_trader, "ramun_introduce_10", [], "Why not? If you intend to set foot outside this town,\ you're going to cross swords with someone sooner or later. And, God willing, you'll come out on top.\ Why not make some extra money off the whole thing? Take them alive, bring them back to me, and I'll pay you fifty denars for each head.\ Don't much care who they are or where they come from.", "ramun_introduce_11",[]], [trp_ramun_the_slave_trader|plyr, "ramun_introduce_11", [], "Hmm. I'll think about it.", "ramun_introduce_12",[]], [trp_ramun_the_slave_trader, "ramun_introduce_12", [], "Do think about it!\ There's a lot of silver to be made, no mistake. More than enough for the both of us.", "close_window",[]], [trp_ramun_the_slave_trader,"start", [], "Hello, {playername}.", "ramun_talk",[]], [trp_ramun_the_slave_trader,"ramun_pre_talk", [], "Anything else?", "ramun_talk",[]], [trp_ramun_the_slave_trader|plyr,"ramun_talk", [[store_num_regular_prisoners,reg(0)],[ge,reg(0),1]], "I've brought you some prisoners, Ramun. Would you like a look?", "ramun_sell_prisoners",[]], [trp_ramun_the_slave_trader,"ramun_sell_prisoners", [], "Let me see what you have...", "ramun_sell_prisoners_2", [[change_screen_trade_prisoners]]], [trp_ramun_the_slave_trader, "ramun_sell_prisoners_2", [], "A pleasure doing business with you.", "close_window",[]], [trp_ramun_the_slave_trader|plyr,"ramun_talk", [(neg|troop_slot_ge,"$g_talk_troop",slot_troop_met_previously,1)], "How do I take somebody as prisoner?", "ramun_ask_about_capturing",[]], [trp_ramun_the_slave_trader|plyr,"ramun_talk", [(troop_slot_ge,"$g_talk_troop", slot_troop_met_previously, 1)], "Can you tell me again about capturing prisoners?", "ramun_ask_about_capturing",[(troop_set_slot,"$g_talk_troop", slot_troop_met_previously, 2)]], [trp_ramun_the_slave_trader,"ramun_ask_about_capturing", [(neg|troop_slot_ge,"$g_talk_troop",slot_troop_met_previously,1)], "You're new to this, aren't you? Let me explain it in simple terms.\ The basic rule of taking someone prisoner is knocking him down with a blunt weapon, like a mace or a club,\ rather than cutting him open with a sword. That way he goes to sleep for a little while rather than bleeding to death, you see?\ I'm assuming you have a blunt weapon with you . . .", "ramun_have_blunt_weapon",[]], [trp_ramun_the_slave_trader|plyr,"ramun_have_blunt_weapon", [], "Of course.", "ramun_have_blunt_weapon_yes",[]], [trp_ramun_the_slave_trader|plyr,"ramun_have_blunt_weapon", [], "As a matter of fact, I don't.", "ramun_have_blunt_weapon_no",[]], [trp_ramun_the_slave_trader,"ramun_have_blunt_weapon_yes", [], "Good. Then all you need to do is beat the bugger down with your weapon, and when the fighting's over you clap him in irons.\ It's a bit different for nobles and such, they tend to be protected enough that it won't matter what kind of weapon you use,\ but your average rabble-rouser will bleed like a stuck pig if you get him with something sharp. I don't have many requirements in my merchandise,\ but I do insist they be breathing when I buy them.", "ramun_ask_about_capturing_2",[]], [trp_ramun_the_slave_trader,"ramun_have_blunt_weapon_no", [], "No? Heh, well, this must be your lucky day. I've got an old club lying around that I was going to throw away.\ It a bit battered, but still good enough bash someone until he stops moving.\ Here, have it.","ramun_have_blunt_weapon_no_2",[(troop_add_item, "trp_player","itm_club",imod_cracked)]], [trp_ramun_the_slave_trader|plyr,"ramun_have_blunt_weapon_no_2", [], "Thanks, Ramun. Perhaps I may try my hand at it.", "ramun_have_blunt_weapon_yes",[]], [trp_ramun_the_slave_trader,"ramun_ask_about_capturing", [], "Alright, I'll try and expain it again in simple terms. The basic rule of taking someone prisoner is knocking him down with a blunt weapon, like a mace or a club,\ rather than cutting him open with a sword. That way he goes to sleep for a little while rather than bleeding to death, you see?\ It's a bit different for nobles and such, they tend to be protected enough that it won't matter what kind of weapon you use,\ but your average rabble-rouser will bleed like a stuck pig if you get him with something sharp.", "ramun_ask_about_capturing_2",[]], [trp_ramun_the_slave_trader|plyr,"ramun_ask_about_capturing_2", [], "Alright, I think I understand. Anything else?", "ramun_ask_about_capturing_3",[]], [trp_ramun_the_slave_trader,"ramun_ask_about_capturing_3", [], "Well, it's not as simple as all that. Blunt weapons don't do as much damage as sharp ones, so they won't bring your enemies down as quickly.\ And trust me, given the chance, most of the scum you run across would just as soon kill you as look at you, so don't expect any courtesy when you pull out a club instead of a sword.\ Moreover, having to drag prisoners to and fro will slow down your party, which is why some people simply set their prisoners free after the fighting's done.\ It's madness. How could anyone turn down all that silver, eh?", "ramun_ask_about_capturing_4",[]], [trp_ramun_the_slave_trader|plyr,"ramun_ask_about_capturing_4", [], "Is that everything?", "ramun_ask_about_capturing_5",[]], [trp_ramun_the_slave_trader,"ramun_ask_about_capturing_5", [], "Just one final thing. Managing prisoners safely is not an easy thing to do, you could call it a skill in itself.\ If you want to capture a lot of prisoners, you should try and learn the tricks of it yourself,\ or you won't be able to hang on to a single man you catch.", "ramun_ask_about_capturing_7",[]], [trp_ramun_the_slave_trader|plyr,"ramun_ask_about_capturing_7", [], "Thanks, I'll keep it in mind.", "ramun_pre_talk",[]], [trp_ramun_the_slave_trader|plyr,"ramun_talk", [], "I'd better be going.", "ramun_leave",[]], [trp_ramun_the_slave_trader,"ramun_leave", [], "Remember, any prisoners you've got, bring them to me. I'll pay you good silver for every one.", "close_window",[]], ## [trp_tutorial_trainer,"start", [(eq, "$tutorial_quest_award_taken", 1),], "I think you have trained enough. Perhaps you should go to Zendar for the next step of your adventure.", "close_window",[]], ## [trp_tutorial_trainer,"start", [(store_character_level, ":player_level", "trp_player"),(gt, ":player_level", 1)], "I think you have trained enough. Perhaps you should go to Zendar for the next step of your adventure.", "close_window",[]], ## [trp_tutorial_trainer,"start", [(eq, "$tutorial_quest_taken", 0),], "Greetings stranger. What's your name?", "tutorial1_1",[]], ## [trp_tutorial_trainer|plyr, "tutorial1_1", [], "Greetings sir, it's {playername}.", "tutorial1_2", []], ## [trp_tutorial_trainer, "tutorial1_2", [], "Well {playername}, this place you see is the training ground. Locals come here to practice their combat skills. Since you are here you may have a go as well.", "tutorial1_3", []], ## [trp_tutorial_trainer|plyr, "tutorial1_3", [], "I'd like that very much sir. Thank you.", "tutorial1_4", []], ## [trp_tutorial_trainer, "tutorial1_4", [], "You will learn the basics of weapons and riding a horse here.\ ## First you'll begin with melee weapons. Then you'll enter an archery range to test your skills. And finally you'll see a horse waiting for you.\ ## I advise you to train in all these 3 areas. But you can skip some of them, it's up to you.", "tutorial1_6", []], ## [trp_tutorial_trainer, "tutorial1_6", [], "Tell you what, if you destroy at least 10 dummies while training, I will give you my old knife as a reward. It's a little rusty but it's a good blade.", "tutorial1_7", []], ## [trp_tutorial_trainer|plyr, "tutorial1_7", [], "Sounds nice, I'm ready for training.", "tutorial1_9", []], ## [trp_tutorial_trainer, "tutorial1_9", [], "Good. Return to me when you have earned your reward.", "close_window", [(eq, "$tutorial_quest_taken", 0), ## (str_store_troop_name, 1, "trp_tutorial_trainer"), ## (str_store_party_name, 2, "p_training_ground"), ## (setup_quest_giver, "qst_destroy_dummies", "str_given_by_s1_at_s2"), ## (str_store_string, s2, "@Trainer ordered you to destroy 10 dummies in the training camp."), ## (call_script, "script_start_quest", "qst_destroy_dummies", "$g_talk_troop"), ## (assign, "$tutorial_quest_taken", 1)]], ## ## [trp_tutorial_trainer,"start", [(eq, "$tutorial_quest_taken", 1), ## (eq, "$tutorial_quest_succeeded", 1),], "Well done {playername}. Now you earned this knife. There you go.", "tutorial2_1",[]], ## [trp_tutorial_trainer|plyr, "tutorial2_1", [], "Thank you master.", "close_window", [(call_script, "script_end_quest", "qst_destroy_dummies"),(assign, "$tutorial_quest_award_taken", 1),(add_xp_to_troop, 100, "trp_player"),(troop_add_item, "trp_player","itm_knife",imod_chipped),]], ## ## [trp_tutorial_trainer,"start", [(eq, "$tutorial_quest_taken", 1), ## (eq, "$tutorial_quest_succeeded", 1),], "Greetings {playername}. Feel free to train with the targets.", "tutorial2_1",[]], ## ## [trp_tutorial_trainer,"start", [(eq, "$tutorial_quest_taken", 1), ## (eq, "$tutorial_quest_succeeded", 0),], "I don't see 10 dummies on the floor from here. You haven't earned your reward yet.", "tutorial3_1",[]], ## [trp_tutorial_trainer|plyr, "tutorial3_1", [], "Alright alright, I was just tired and wanted to talk to you while resting.", "tutorial3_2", []], ## [trp_tutorial_trainer, "tutorial3_2", [], "Less talk, more work.", "close_window", []], ## [party_tpl|pt_peasant,"start", [(eq,"$talk_context",tc_party_encounter)], "Greetings traveller.", "peasant_talk_1",[(play_sound,"snd_encounter_farmers")]], ## [party_tpl|pt_peasant|plyr,"peasant_talk_1", [[eq,"$quest_accepted_zendar_looters"]], "Greetings to you too.", "close_window",[(assign, "$g_leave_encounter",1)]], ## [party_tpl|pt_peasant|plyr,"peasant_talk_1", [[neq,"$quest_accepted_zendar_looters"],[eq,"$peasant_misunderstanding_said"]], "I have been charged with hunting down outlaws in this area...", "peasant_talk_2",[[assign,"$peasant_misunderstanding_said",1]]], ## [party_tpl|pt_peasant|plyr,"peasant_talk_1", [[neq,"$quest_accepted_zendar_looters"],[neq,"$peasant_misunderstanding_said"]], "Greetings. I am hunting outlaws. Have you seen any around here?", "peasant_talk_2b",[]], ## [party_tpl|pt_peasant,"peasant_talk_2", [], "I swear to God {sir/madam}. I am not an outlaw... I am just a simple peasant. I am taking my goods to the market, see.", "peasant_talk_3",[]], ## [party_tpl|pt_peasant|plyr,"peasant_talk_3", [], "I was just going to ask if you saw any outlaws around here.", "peasant_talk_4",[]], ## [party_tpl|pt_peasant,"peasant_talk_4", [], "Oh... phew... yes, outlaws are everywhere. They are making life miserable for us.\ ## I pray to God you will kill them all.", "close_window",[(assign, "$g_leave_encounter",1)]], ## [party_tpl|pt_peasant,"peasant_talk_2b", [], "Outlaws? They are everywhere. They are making life miserable for us.\ ## I pray to God you will kill them all.", "close_window",[(assign, "$g_leave_encounter",1)]], [party_tpl|pt_manhunters,"start", [(eq,"$talk_context",tc_party_encounter)], "Hey, you there! You seen any outlaws around here?", "manhunter_talk_b",[]], [party_tpl|pt_manhunters|plyr,"manhunter_talk_b", [], "Yes, they went this way about an hour ago.", "manhunter_talk_b1",[]], [party_tpl|pt_manhunters,"manhunter_talk_b1", [], "I knew it! Come on, lads, lets go get these bastards! Thanks a lot, friend.", "close_window",[(assign, "$g_leave_encounter",1)]], [party_tpl|pt_manhunters|plyr,"manhunter_talk_b", [], "No, haven't seen any outlaws lately.", "manhunter_talk_b2",[]], [party_tpl|pt_manhunters,"manhunter_talk_b2", [], "Bah. They're holed up in this country like rats, but we'll smoke them out yet. Sooner or later.", "close_window",[(assign, "$g_leave_encounter",1)]], [party_tpl|pt_looters|auto_proceed,"start", [(eq,"$talk_context",tc_party_encounter)], "Warning: This line should never be displayed.", "looters_1",[ (str_store_string, s11, "@It's your money or your life, {mate/girlie}. No sudden moves or we'll run you through."), (str_store_string, s12, "@Lucky for you, you caught me in a good mood. Give us all your coin and I might just let you live."), (str_store_string, s13, "@This a robbery, eh? I givin' you one chance to hand over everythin' you got, or me and my mates'll kill you. Understand?"), (store_random_in_range, ":random", 11, 14), (str_store_string_reg, s4, ":random"), (play_sound, "snd_encounter_looters") ]], [party_tpl|pt_looters,"looters_1", [], "{s4}", "looters_2",[]], [party_tpl|pt_looters|plyr,"looters_2", [[store_character_level,reg(1),"trp_player"],[lt,reg(1),4]], "I'm not afraid of you lot. Fight me if you dare!", "close_window", [[encounter_attack]]], [party_tpl|pt_looters|plyr,"looters_2", [[store_character_level,reg(1),"trp_player"],[ge,reg(1),4]], "You'll have nothing of mine but cold steel, scum.", "close_window", [[encounter_attack]]], [party_tpl|pt_village_farmers,"start", [(eq,"$talk_context",tc_party_encounter), (agent_play_sound, "$g_talk_agent", "snd_encounter_farmers"), ], " My {lord/lady}, we're only poor farmers from the village of {s11}. {reg1?We are taking our products to the market at {s12}.:We are returning from the market at {s12} back to our village.}", "village_farmer_talk", [(party_get_slot, ":target_center", "$g_encountered_party", slot_party_ai_object), (party_get_slot, ":home_center", "$g_encountered_party", slot_party_home_center), (party_get_slot, ":market_town", ":home_center", slot_village_market_town), (str_store_party_name, s11, ":home_center"), (str_store_party_name, s12, ":market_town"), (assign, reg1, 1), (try_begin), (party_slot_eq, ":target_center", slot_party_type, spt_village), (assign, reg1, 0), (try_end), ]], [anyone|plyr,"village_farmer_talk", [], "We'll see how poor you are after I take what you've got!", "close_window", [(party_get_slot, ":home_center", "$g_encountered_party", slot_party_home_center), (party_get_slot, ":market_town", ":home_center", slot_village_market_town), (party_get_slot, ":village_owner", ":home_center", slot_town_lord), (call_script, "script_change_player_relation_with_center", ":home_center", -4), (call_script, "script_change_player_relation_with_center", ":market_town", -2), (call_script, "script_change_player_relation_with_troop", ":village_owner", -2), (store_relation,":rel", "$g_encountered_party_faction","fac_player_supporters_faction"), (try_begin), (gt, ":rel", 0), (val_sub, ":rel", 5), (try_end), (val_sub, ":rel", 3), (call_script, "script_set_player_relation_with_faction", "$g_encountered_party_faction", ":rel"), ]], [anyone|plyr,"village_farmer_talk", [], "Carry on, then. Farewell.", "close_window",[(assign, "$g_leave_encounter",1)]], ### COMPANIONS [anyone,"start", [(troop_slot_eq,"$g_talk_troop", slot_troop_occupation, slto_player_companion), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_castle), (party_get_num_companion_stacks, ":num_stacks", "$g_encountered_party"), (ge, ":num_stacks", 1), (party_stack_get_troop_id, ":castle_leader", "$g_encountered_party", 0), (eq, ":castle_leader", "$g_talk_troop"), (eq, "$talk_context", 0)], "Yes, {playername}? What can I do for you?", "member_castellan_talk",[]], [anyone,"member_castellan_pretalk", [], "Anything else?", "member_castellan_talk",[]], [anyone|plyr,"member_castellan_talk", [], "I want to review the castle garrison.", "member_review_castle_garrison",[]], [anyone,"member_review_castle_garrison", [], "Of course. Here are our lists, let me know of any changes you require...", "member_castellan_pretalk",[(change_screen_exchange_members,0)]], [anyone|plyr,"member_castellan_talk", [], "Let me see your equipment.", "member_review_castellan_equipment",[]], [anyone,"member_review_castellan_equipment", [], "Very well, it's all here...", "member_castellan_pretalk",[(change_screen_equip_other)]], [anyone|plyr,"member_castellan_talk", [], "I want you to abandon the castle and join my party.", "member_castellan_join",[]], [anyone,"member_castellan_join", [(party_can_join_party,"$g_encountered_party","p_main_party")], "I've grown quite fond of the place... But if it is your wish, {playername}, I'll come with you.", "close_window", [ (assign, "$g_move_heroes", 1), (call_script, "script_party_add_party", "p_main_party", "$g_encountered_party"), (party_clear, "$g_encountered_party"), ]], [anyone,"member_castellan_join", [], "And where would we sleep? You're dragging a whole army with you, {playername}, there's no more room for all of us.", "member_castellan_pretalk",[]], [anyone|plyr,"member_castellan_talk", [], "[Leave]", "close_window",[]], [anyone,"start", [(troop_slot_eq,"$g_talk_troop", slot_troop_occupation, slto_player_companion), (neg|main_party_has_troop,"$g_talk_troop"), (eq, "$talk_context", tc_party_encounter)], "Do you want me to rejoin you?", "member_wilderness_talk",[]], [anyone,"start", [(neg|main_party_has_troop,"$g_talk_troop"),(eq, "$g_encountered_party", "p_four_ways_inn")], "Do you want me to rejoin you?", "member_inn_talk",[]], # [anyone,"member_separate_inn", [], "I don't know what you will do without me, but you are the boss. I'll wait for you at the Four Ways inn.", "close_window", # [anyone,"member_separate_inn", [], "All right then. I'll meet you at the four ways inn. Good luck.", "close_window", # [(remove_member_from_party,"$g_talk_troop", "p_main_party"),(add_troop_to_site, "$g_talk_troop", "scn_four_ways_inn", borcha_inn_entry)]], #Quest heroes member chats [trp_kidnapped_girl,"member_chat", [], "Are we home yet?", "kidnapped_girl_chat_1",[]], [trp_kidnapped_girl|plyr,"kidnapped_girl_chat_1", [], "Not yet.", "kidnapped_girl_chat_2",[]], [trp_kidnapped_girl,"kidnapped_girl_chat_2", [], "I can't wait to get back. I've missed my family so much, I'd give anything to see them again.", "close_window",[]], [anyone,"member_chat", [ (troop_slot_eq, "$g_talk_troop", slot_troop_occupation, slto_kingdom_lady), ], "{playername}, when do you think we can reach our destination?", "member_lady_1",[]], [anyone|plyr, "member_lady_1", [], "We still have a long way ahead of us.", "member_lady_2a", []], [anyone|plyr, "member_lady_1", [], "Very soon. We're almost there.", "member_lady_2b", []], [anyone ,"member_lady_2a", [], "Ah, I am going to enjoy the road for a while longer then. I won't complain.\ I find riding out in the open so much more pleasant than sitting in the castle all day.\ You know, I envy you. You can live like this all the time.", "close_window", []], [anyone ,"member_lady_2b", [], "That's good news. Not that I don't like your company, but I did miss my little luxuries.\ Still I am sorry that I'll leave you soon. You must promise me, you'll come visit me when you can.", "close_window", []], [anyone ,"member_chat", [(is_between, "$g_talk_troop", pretenders_begin, pretenders_end),], "Greetings, {playername}, my first and foremost vassal. I await your counsel.", "supported_pretender_talk", []], [anyone ,"supported_pretender_pretalk", [], "Anything else?", "supported_pretender_talk", []], [anyone|plyr,"supported_pretender_talk", [], "What do you think about our progress so far?", "pretender_progress",[]], [anyone,"pretender_progress", [ (assign, reg11, 0),(assign, reg13, 0),(assign, reg14, 0),(assign, reg15, 0), (assign, reg21, 0),(assign, reg23, 0),(assign, reg24, 0),(assign, reg25, 0), (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (store_troop_faction, ":troop_faction", ":troop_no"), (try_begin), (eq, ":troop_faction", "fac_player_supporters_faction"), (neq, ":troop_no", "trp_player"), (neq, ":troop_no", "$supported_pretender"), (val_add, reg11, 1), (else_try), (eq, ":troop_faction", "$supported_pretender_old_faction"), (neg|faction_slot_eq, "$supported_pretender_old_faction", slot_faction_leader, ":troop_no"), (val_add, reg21, 1), (try_end), (try_end), (try_for_range, ":center_no", centers_begin, centers_end), (store_faction_of_party, ":center_faction", ":center_no"), (try_begin), (eq, ":center_faction", "fac_player_supporters_faction"), (try_begin), (party_slot_eq, ":center_no", slot_party_type, spt_town), (val_add, reg13, 1), (else_try), (party_slot_eq, ":center_no", slot_party_type, spt_castle), (val_add, reg14, 1), (else_try), (party_slot_eq, ":center_no", slot_party_type, spt_village), (val_add, reg15, 1), (try_end), (else_try), (eq, ":center_faction", "$supported_pretender_old_faction"), (try_begin), (party_slot_eq, ":center_no", slot_party_type, spt_town), (val_add, reg23, 1), (else_try), (party_slot_eq, ":center_no", slot_party_type, spt_castle), (val_add, reg24, 1), (else_try), (party_slot_eq, ":center_no", slot_party_type, spt_village), (val_add, reg25, 1), (try_end), (try_end), (try_end), (store_add, reg19, reg13, reg14), (val_add, reg19, reg15), (store_add, reg29, reg23, reg24), (val_add, reg29, reg25), (store_add, ":our_score", reg13, reg14), (val_add, ":our_score", reg11), (store_add, ":their_score", reg23, reg24), (val_add, ":their_score", reg21), (store_add, ":total_score", ":our_score", ":their_score"), (val_mul, ":our_score", 100), (store_div, ":our_ratio", ":our_score", ":total_score"), (try_begin), (lt, ":our_ratio", 10), (str_store_string, s30, "@we have made very little progress so far"), (else_try), (lt, ":our_ratio", 30), (str_store_string, s30, "@we have suceeded in gaining some ground, but we still have a long way to go"), (else_try), (lt, ":our_ratio", 50), (str_store_string, s30, "@we have become a significant force, and we have an even chance of victory"), (else_try), (lt, ":our_ratio", 75), (str_store_string, s30, "@we are winning the war, but our enemies are still holding on."), (else_try), (str_store_string, s30, "@we are on the verge of victory. The remaining enemies pose no threat, but we still need to hunt them down."), (try_end), (faction_get_slot, ":enemy_king", "$supported_pretender_old_faction", slot_faction_leader), (str_store_troop_name, s9, ":enemy_king"), ], "{reg11?We have {reg11} lords on our side:We have no lord with us yet},\ whereas {reg21?{s9} still has {reg21} lords supporting him:{s9} has no loyal lords left}.\ {reg19?We control {reg13?{reg13} towns:} {reg14?{reg14} castles:} {reg15?and {reg15} villages:}:We don't control any settlements},\ while {reg29?they have {reg23?{reg23} towns:} {reg24?{reg24} castles:} {reg25?and {reg25} villages:}:they have no remaining settlements}.\ Overall, {s30}.", "pretender_progress_2",[]], [anyone|plyr,"pretender_progress_2", [], "Then, we must keep fighting and rally our supporters!", "supported_pretender_pretalk",[]], [anyone|plyr,"pretender_progress_2", [], "It seems this rebellion is not going anywhere. We must give up.", "pretender_quit_rebel_confirm",[]], [anyone,"pretender_quit_rebel_confirm", [], "{playername}, you can't abandon me now. Are you serious?", "pretender_quit_rebel_confirm_2",[]], [anyone|plyr,"pretender_quit_rebel_confirm_2", [], "Indeed, I am. I can't support you any longer.", "pretender_quit_rebel_confirm_3",[]], [anyone|plyr,"pretender_quit_rebel_confirm_2", [], "I was jesting. I will fight for you until we succeed.", "supported_pretender_pretalk",[]], [anyone,"pretender_quit_rebel_confirm_3", [], "Are you absolutely sure? I will never forgive you if you abandon my cause.", "pretender_quit_rebel_confirm_4",[]], [anyone|plyr,"pretender_quit_rebel_confirm_4", [], "I am sure.", "pretender_quit_rebel",[]], [anyone|plyr,"pretender_quit_rebel_confirm_4", [], "Let me think about this some more.", "supported_pretender_pretalk",[]], [anyone,"pretender_quit_rebel", [], "So be it. Then my cause is lost. There is only one thing to do for me now. I will go from Calradia and never come back.", "close_window", [ (troop_get_slot, ":original_faction", "$g_talk_troop", slot_troop_original_faction), (try_for_range, ":cur_troop", kingdom_heroes_begin, kingdom_heroes_end), (neq, "$supported_pretender", ":cur_troop"), (store_troop_faction, ":cur_faction", ":cur_troop"), (eq, ":cur_faction", "fac_player_supporters_faction"), (call_script, "script_change_troop_faction", ":cur_troop", ":original_faction"), (try_end), (troop_set_faction, "$g_talk_troop", "fac_neutral"), (faction_set_slot, "fac_player_supporters_faction", slot_faction_leader, "trp_player"), (assign, ":has_center", 0), (try_for_range, ":cur_center", centers_begin, centers_end), (store_faction_of_party, ":cur_faction", ":cur_center"), (eq, ":cur_faction", "fac_player_supporters_faction"), (assign, ":has_center", 1), (neg|party_slot_eq, ":cur_center", slot_town_lord, "trp_player"), (call_script, "script_give_center_to_lord", ":cur_center", "trp_player", 0), (try_end), (party_remove_members, "p_main_party", "$supported_pretender", 1), (faction_set_slot, ":original_faction", slot_faction_has_rebellion_chance, 0), (assign, "$supported_pretender", 0), (try_begin), (eq, ":has_center", 1), (faction_set_color, "fac_player_supporters_faction", 0xAAAAAA), (else_try), (call_script, "script_activate_deactivate_player_faction", -1), (try_end), (call_script, "script_change_player_honor", -20), (call_script, "script_fail_quest", "qst_rebel_against_kingdom"), (call_script, "script_end_quest", "qst_rebel_against_kingdom"), ]], [anyone|plyr,"supported_pretender_talk", [], "{reg65?My lady:My lord}, would you allow me to check out your equipment?", "supported_pretender_equip",[]], [anyone,"supported_pretender_equip", [], "Very well, it's all here...", "supported_pretender_pretalk",[ (change_screen_equip_other), ]], [anyone|plyr,"supported_pretender_talk", [], "If it would please you, can you tell me about your skills?", "pretneder_view_char_requested",[]], [anyone,"pretneder_view_char_requested", [], "Well, all right.", "supported_pretender_pretalk",[(change_screen_view_character)]], [anyone|plyr,"supported_pretender_talk", [], "Let us keep going, {reg65?my lady:sir}.", "close_window",[]], [anyone,"do_member_trade", [], "Anything else?", "member_talk",[]], [anyone,"member_chat", [(store_conversation_troop,"$g_talk_troop"), (troop_is_hero,"$g_talk_troop"), (troop_get_slot, ":honorific", "$g_talk_troop", slot_troop_honorific), (str_store_string, s5, ":honorific"), ################################# # Form Ranks section ################################# (party_get_num_attached_parties, ":num", "p_main_party"), #(lt, ":num", formation_arrays-1), (assign, "$array_party_num", ":num"), (try_for_range, ":i", ":num", formation_arrays-1), (store_add, ":slot", slot_party_array_parties_begin, ":i"), (val_add, ":slot", 1), (party_set_slot, "p_main_party", ":slot", -1), (try_end), (assign, "$talk_array_no", -1), (val_add, ":num", 1), (party_set_slot, "p_main_party", slot_party_array_parties_begin, ":num"), (try_for_range, ":i", 1, ":num"), (store_add, ":slot", slot_party_array_parties_begin, ":i"), (party_get_slot, ":array_party", "p_main_party", ":slot"), (party_slot_eq, ":array_party", slot_array_party_leader, "$g_talk_troop"), (assign, "$talk_array_no", ":i"), (assign, ":num", ":i"), (try_end), ################################## # Form Ranks section end ################################## ], "Yes, {s5}?", "member_talk",[]], [anyone|plyr,"member_talk", [], "Let me see your equipment.", "member_trade",[]], [anyone,"member_trade", [], "Very well, it's all here...", "do_member_trade",[ # (change_screen_trade) (change_screen_equip_other), ]], [anyone,"do_member_trade", [], "Anything else?", "member_talk",[]], [anyone|plyr,"member_talk", [], "What can you tell me about your skills?", "view_member_char_requested",[]], [anyone,"view_member_char_requested", [], "All right, let me tell you...", "do_member_view_char",[(change_screen_view_character)]], #################################### # Form Ranks section #################################### #################################### # Form Ranks section #################################### # array assignment [anyone|plyr, "member_talk", [ (eq, "$talk_array_no", -1), (store_sub, ":array_parties", formation_arrays, 1), #(store_skill_level, ":skill1", "skl_leadership", "trp_player"), (store_skill_level, ":skill2", "skl_tactics", "trp_player"), #(val_sub, ":skill1", 2), (val_sub, ":skill2", 1), #(val_min, ":array_parties", ":skill1"), (val_min, ":array_parties", ":skill2"), (lt, "$array_party_num", ":array_parties"), ], "I'm planning to raise a new battle command, and intending to appoint you as the commander.", "assign_array", [] ], [anyone|plyr, "member_talk", [ (neq, "$talk_array_no", -1), ], "Our party has shrunk. I feel no need keeping your sub-command.", "dismiss_array", [] ], # [anyone|plyr, "member_talk", [ # (neq, "$talk_array_party", -1), # ], # "Let me see your men.", # "assign_member", [] # ], # [anyone, "assign_member", [], # "Very well, here's a list of men under my command...", # "do_assign_member", [ # #(assign, "$g_encountered_party", "$talk_array_party"), # (start_encounter, "$talk_array_party"), # (change_screen_exchange_members, 1), # ] # ], # [anyone, "do_assign_member", [], "Anything else?", "member_talk", [(leave_encounter), (change_screen_return)]], [anyone, "assign_array", [], "Really? That would be a wise decision. I will prove worthy of this.", "assign_array_confirm", [] ], [anyone|plyr, "assign_array_confirm", [ (party_get_num_attached_parties, ":num", "p_main_party"), (val_add, ":num", 1), (store_add, ":array_string", formation_array_names_begin, ":num"), #(val_add, ":array_string", 1), (str_store_string, s1, ":array_string"), ], "I'm serious. Now you are in command of {s1}. I'll assign you some men shortly.", "assign_array_accept", [ (set_spawn_radius, 5), (spawn_around_party, "p_main_party", "pt_none"), (assign, ":array_party", reg0), (party_set_flags, ":array_party", pf_limit_members, 1), (party_add_leader, ":array_party", "$g_talk_troop", 0), #(troop_get_slot, ":plyr_banner", "trp_player", slot_troop_banner_scene_prop), #(troop_set_slot, "$g_talk_troop", slot_troop_banner_scene_prop, ":plyr_banner"), (party_set_slot, ":array_party", slot_array_party_leader, "$g_talk_troop"), (party_attach_to_party, ":array_party", "p_main_party"), (party_get_num_attached_parties, ":num", "p_main_party"), (store_add, ":slot", slot_party_array_parties_begin, ":num"), (party_set_slot, "p_main_party", ":slot", ":array_party"), (val_add, ":num", 1), (party_set_slot, "p_main_party", slot_party_array_parties_begin, ":num"), (str_store_troop_name, s2, "$g_talk_troop"), (party_set_name, ":array_party", "@{s2}'s {s1}"), (display_message, "@New battle {s1} formed. Commander is {s2}.", formation_message_color), ] ], [anyone|plyr, "assign_array_confirm", [], "Maybe it's too early to talk about this. Let's put it later.", "assign_array_cancelled", [] ], [anyone, "assign_array_accept", [], "My pleasure. I won't fail your trust.", "close_window", [] ], [anyone, "assign_array_cancelled", [], "That's all right. I'll always be willing to take up the duty.", "close_window", [] ], [anyone, "dismiss_array", [], "Are you sure?", "dismiss_array_confirm", [] ], [anyone|plyr, "dismiss_array_confirm", [], "Yes. Call your men back to my direct command.", "dismiss_array_accept", [ (store_add, ":slot", slot_party_array_parties_begin, "$talk_array_no"), (party_get_slot, ":array_party", "p_main_party", ":slot"), (party_get_num_attached_parties, ":num", "p_main_party"), (party_detach, ":array_party"), (assign, "$g_move_heroes", 1), (call_script, "script_party_add_party_companions", "p_main_party", ":array_party"), (remove_party, ":array_party"), (try_for_range, ":i", "$talk_array_no", ":num"), (store_add, ":next", ":i", 1), (store_add, ":slot", slot_party_array_parties_begin, ":next"), (party_get_slot, ":next_array_party", "p_main_party", ":slot"), (party_get_slot, ":leader", ":next_array_party", slot_array_party_leader), (store_add, ":array_string", formation_array_names_begin, ":i"), (str_store_string, s1, ":array_string"), (str_store_troop_name, s2, ":leader"), (str_store_string, s1, "@{s2}'s {s1}"), (val_sub, ":slot", 1), (party_set_slot, "p_main_party", ":slot", ":next_array_party"), (party_set_name, ":next_array_party", s1), (try_end), (party_set_slot, "p_main_party", slot_party_array_parties_begin, ":num"), (str_store_troop_name, s1, "$g_talk_troop"), (display_message, "@{s1}'s command dismissed.", formation_message_color), ] ], [anyone|plyr, "dismiss_array_confirm", [], "No. Keep in command please.", "dismiss_array_cancelled", [] ], [anyone, "dismiss_array_accept", [], "Well, if you say so...", "close_window", [] ], [anyone, "dismiss_array_cancelled", [], "No problem.", "close_window", [] ], #################################### # Form Ranks section end #################################### #################################### # Form Ranks section end #################################### [anyone|plyr,"member_talk", [], "We need to separate for a while.", "member_separate",[ (call_script, "script_npc_morale", "$g_talk_troop"), (assign, "$npc_quit_morale", reg0), ]], [anyone,"member_separate", [ (gt, "$npc_quit_morale", 30), ], "Oh really? Well, I'm not just going to wait around here. I'm going to go to the towns to look for other work. Is that what you want?", "member_separate_confirm", []], [anyone,"member_separate", [ ], "Well, actually, there was something I needed to tell you.", "companion_quitting", [ (assign, "$player_can_refuse_npc_quitting", 0), (assign, "$player_can_persuade_npc", 0), ]], [anyone|plyr,"member_separate_confirm", [], "That's right. We need to part ways.", "member_separate_yes",[]], [anyone|plyr,"member_separate_confirm", [], "No, I'd rather have you at my side.", "do_member_trade",[]], [anyone,"member_separate_yes", [ ], "Well. I'll be off, then. Look me up if you need me.", "close_window", [ (troop_set_slot, "$g_talk_troop", slot_troop_occupation, 0), (troop_set_slot, "$g_talk_troop", slot_troop_playerparty_history, pp_history_dismissed), (remove_member_from_party, "$g_talk_troop"), ]], [anyone|plyr,"member_talk", [], "I'd like to ask you something.", "member_question",[]], [anyone|plyr,"member_talk", [], "Never mind.", "close_window",[]], [anyone,"member_question", [], "Very well. What did you want to ask?", "member_question_2",[]], [anyone|plyr,"member_question_2", [], "How do you feel about the way things are going in this company?", "member_morale",[]], [anyone|plyr,"member_question_2", [], "Tell me your story again.", "member_background_recap",[]], [anyone,"member_morale", [ (call_script, "script_npc_morale", "$g_talk_troop"), ], "{s21}", "do_member_trade",[]], [anyone,"member_background_recap", [ (troop_get_slot, ":first_met", "$g_talk_troop", slot_troop_first_encountered), (str_store_party_name, 20, ":first_met"), (troop_get_slot, ":home", "$g_talk_troop", slot_troop_home), (str_store_party_name, 21, ":home"), (troop_get_slot, ":recap", "$g_talk_troop", slot_troop_home_recap), (str_store_string, 5, ":recap"), ], "{s5}", "member_background_recap_2",[]], [anyone,"member_background_recap_2", [ (str_clear, 19), (troop_get_slot, ":background", "$g_talk_troop", slot_troop_backstory_b), (str_store_string, 5, ":background"), ], "{s5}", "member_background_recap_3",[]], [anyone,"member_background_recap_3", [ ], "Then shortly after, I joined up with you.", "do_member_trade",[]], [anyone,"do_member_view_char", [], "Anything else?", "member_talk",[]], [anyone, "start", [(is_between, "$g_talk_troop", companions_begin, companions_end), (eq, "$talk_context", tc_tavern_talk), (main_party_has_troop, "$g_talk_troop")], "Let's leave whenever you are ready.", "close_window", []], [anyone, "start", [(is_between, "$g_talk_troop", companions_begin, companions_end), (troop_slot_eq, "$g_talk_troop", slot_troop_occupation, 0), (troop_slot_eq, "$g_talk_troop", slot_troop_turned_down_twice, 1), ], "Please do not waste any more of my time today, {sir/madame}. Perhaps we shall meet again in our travels.", "close_window", [ ]], [anyone, "start", [(is_between, "$g_talk_troop", companions_begin, companions_end), (troop_slot_eq, "$g_talk_troop", slot_troop_occupation, 0), (eq, "$g_talk_troop_met", 0), (troop_get_slot, ":intro", "$g_talk_troop", slot_troop_intro), (str_store_string, 5, ":intro"), (str_store_party_name, 20, "$g_encountered_party"), ], "{s5}", "companion_recruit_intro_response", [ (troop_set_slot, "$g_talk_troop", slot_troop_first_encountered, "$g_encountered_party"), ]], [anyone|plyr, "companion_recruit_intro_response", [ (troop_get_slot, ":intro_response", "$g_talk_troop", slot_troop_intro_response_1), (str_store_string, 6, ":intro_response") ], "{s6}", "companion_recruit_backstory_a", []], [anyone|plyr, "companion_recruit_intro_response", [ (troop_get_slot, ":intro_response", "$g_talk_troop", slot_troop_intro_response_2), (str_store_string, 7, ":intro_response") ], "{s7}", "close_window", [ ]], [anyone, "companion_recruit_backstory_a", [(troop_get_slot, ":backstory_a", "$g_talk_troop", slot_troop_backstory_a), (str_store_string, 5, ":backstory_a"), (str_store_string, 19, "str_here_plus_space"), (str_store_party_name, 20, "$g_encountered_party"), ], "{s5}", "companion_recruit_backstory_b", []], [anyone, "companion_recruit_backstory_b", [(troop_get_slot, ":backstory_b", "$g_talk_troop", slot_troop_backstory_b), (str_store_string, 5, ":backstory_b"), (str_store_party_name, 20, "$g_encountered_party"), ], "{s5}", "companion_recruit_backstory_c", []], [anyone, "companion_recruit_backstory_c", [(troop_get_slot, ":backstory_c", "$g_talk_troop", slot_troop_backstory_c), (str_store_string, 5, ":backstory_c"), ], "{s5}", "companion_recruit_backstory_response", []], [anyone|plyr, "companion_recruit_backstory_response", [ (troop_get_slot, ":backstory_response", "$g_talk_troop", slot_troop_backstory_response_1), (str_store_string, 6, ":backstory_response") ], "{s6}", "companion_recruit_signup", []], [anyone|plyr, "companion_recruit_backstory_response", [ (troop_get_slot, ":backstory_response", "$g_talk_troop", slot_troop_backstory_response_2), (str_store_string, 7, ":backstory_response") ], "{s7}", "close_window", [ ]], [anyone, "companion_recruit_signup", [(troop_get_slot, ":signup", "$g_talk_troop", slot_troop_signup), (str_store_string, 5, ":signup"), (str_store_party_name, 20, "$g_encountered_party"), ], "{s5}", "companion_recruit_signup_b", []], [anyone, "companion_recruit_signup_b", [ (troop_get_slot, ":signup", "$g_talk_troop", slot_troop_signup_2), (troop_get_slot, reg3, "$g_talk_troop", slot_troop_payment_request),# (str_store_string, 5, ":signup"), (str_store_party_name, 20, "$g_encountered_party"), ], "{s5}", "companion_recruit_signup_response", []], [anyone|plyr, "companion_recruit_signup_response", [(neg|hero_can_join, "p_main_party"),], "Unfortunately, I can't take on any more hands in my party right now.", "close_window", [ ]], [anyone|plyr, "companion_recruit_signup_response", [ (hero_can_join, "p_main_party"), (troop_get_slot, ":signup_response", "$g_talk_troop", slot_troop_signup_response_1), (str_store_string, 6, ":signup_response") ], "{s6}", "companion_recruit_payment", []], [anyone|plyr, "companion_recruit_signup_response", [ (hero_can_join, "p_main_party"), (troop_get_slot, ":signup_response", "$g_talk_troop", slot_troop_signup_response_2), (str_store_string, 7, ":signup_response") ], "{s7}", "close_window", [ ]], [anyone|auto_proceed, "companion_recruit_payment", [ (troop_slot_eq, "$g_talk_troop", slot_troop_payment_request, 0), ], ".", "companion_recruit_signup_confirm", []], [anyone, "companion_recruit_payment", [ (store_sub, ":npc_offset", "$g_talk_troop", "trp_npc1"), (store_add, ":dialog_line", "str_npc1_payment", ":npc_offset"), (str_store_string, s5, ":dialog_line"), (troop_get_slot, reg3, "$g_talk_troop", slot_troop_payment_request), (str_store_party_name, s20, "$g_encountered_party"), ], "{s5}", "companion_recruit_payment_response", []], [anyone|plyr, "companion_recruit_payment_response", [ (hero_can_join, "p_main_party"), (troop_get_slot, ":amount_requested", "$g_talk_troop", slot_troop_payment_request),# (store_troop_gold, ":gold", "trp_player"),# (ge, ":gold", ":amount_requested"),# (assign, reg3, ":amount_requested"), (store_sub, ":npc_offset", "$g_talk_troop", "trp_npc1"), (store_add, ":dialog_line", "str_npc1_payment_response", ":npc_offset"), (str_store_string, s6, ":dialog_line"), ], "{s6}", "companion_recruit_signup_confirm", [ (troop_get_slot, ":amount_requested", "$g_talk_troop", slot_troop_payment_request),# (gt, ":amount_requested", 0),# (troop_remove_gold, "trp_player", ":amount_requested"), # (troop_set_slot, "$g_talk_troop", slot_troop_payment_request, 0),# ]], [anyone|plyr, "companion_recruit_payment_response", [ (troop_get_slot, ":signup_response", "$g_talk_troop", slot_troop_signup_response_2), (str_store_string, s7, ":signup_response") ], "Sorry. I can't afford that at the moment.", "close_window", [ ]], [anyone, "start", [(is_between, "$g_talk_troop", companions_begin, companions_end), (troop_slot_eq, "$g_talk_troop", slot_troop_occupation, 0), (troop_slot_eq, "$g_talk_troop", slot_troop_met_previously, 1), (troop_slot_eq, "$g_talk_troop", slot_troop_playerparty_history, 0), ], "We meet again.", "companion_recruit_meet_again", [ (troop_set_slot, "$g_talk_troop", slot_troop_turned_down_twice, 1), ]], [anyone|plyr, "companion_recruit_meet_again", [ ], "So... What have you been doing since our last encounter?", "companion_recruit_backstory_delayed", []], [anyone|plyr, "companion_recruit_meet_again", [ ], "Good day to you.", "close_window", [ ]], [anyone, "start", [(is_between, "$g_talk_troop", companions_begin, companions_end), (troop_slot_eq, "$g_talk_troop", slot_troop_occupation, 0), (troop_slot_eq, "$g_talk_troop", slot_troop_met_previously, 0), (troop_slot_eq, "$g_talk_troop", slot_troop_playerparty_history, 0), ], "Yes?", "companion_recruit_secondchance", [ (troop_set_slot, "$g_talk_troop", slot_troop_turned_down_twice, 1), ]], [anyone|plyr, "companion_recruit_secondchance", [ ], "My apologies if I was rude, earlier. What was your story again?", "companion_recruit_backstory_b", []], [anyone|plyr, "companion_recruit_secondchance", [ ], "Never mind.", "close_window", [ ]], [anyone, "companion_recruit_backstory_delayed", [(troop_get_slot, ":backstory_delayed", "$g_talk_troop", slot_troop_backstory_delayed), (str_store_string, 5, ":backstory_delayed") ], "{s5}", "companion_recruit_backstory_delayed_response", []], [anyone|plyr, "companion_recruit_backstory_delayed_response", [ ], "I might be able to use you in my company.", "companion_recruit_signup_b", [ ]], [anyone|plyr, "companion_recruit_backstory_delayed_response", [ ], "I'll let you know if I hear of anything.", "close_window", [ ]], [anyone, "companion_recruit_signup_confirm", [], "Good! Give me a few moments to prepare and I'll be ready to move.", "close_window", [(call_script, "script_recruit_troop_as_companion", "$g_talk_troop")]], ### Rehire dialogues [anyone, "start", [(is_between, "$g_talk_troop", companions_begin, companions_end), (troop_slot_eq, "$g_talk_troop", slot_troop_playerparty_history, pp_history_indeterminate), ], "My offer to rejoin you still stands, if you'll have me.", "companion_rehire", []], ### If the companion and the player were separated in battle [anyone, "start", [(is_between, "$g_talk_troop", companions_begin, companions_end), (troop_slot_eq, "$g_talk_troop", slot_troop_playerparty_history, pp_history_scattered), (assign, ":battle_fate", "str_battle_fate_1"), (store_random_in_range, ":fate_roll", 0, 5), (val_add, ":battle_fate", ":fate_roll"), (str_store_string, 6, ":battle_fate"), (troop_get_slot, ":honorific", "$g_talk_troop", slot_troop_honorific), (str_store_string, 5, ":honorific"), ], "It is good to see you alive, {s5}! {s6}, and I did not know whether you had been captured, or slain, or got away. I've been roaming around since then, looking for you. Shall I get my gear together and rejoin your company?", "companion_rehire", [ (troop_set_slot, "$g_talk_troop", slot_troop_playerparty_history, pp_history_indeterminate), ]], ### If the player and the companion parted on bad terms [anyone, "start", [(is_between, "$g_talk_troop", companions_begin, companions_end), (troop_slot_eq, "$g_talk_troop", slot_troop_occupation, 0), (troop_slot_eq, "$g_talk_troop", slot_troop_turned_down_twice, 0), (troop_slot_eq, "$g_talk_troop", slot_troop_playerparty_history, pp_history_quit), (troop_get_slot, ":speech", "$g_talk_troop", slot_troop_rehire_speech), (str_store_string, 5, ":speech"), ], "{s5}", "companion_rehire", [ (troop_set_slot, "$g_talk_troop", slot_troop_playerparty_history, pp_history_indeterminate), ]], ###If the player and the companion parted on good terms [anyone, "start", [(is_between, "$g_talk_troop", companions_begin, companions_end), (troop_slot_eq, "$g_talk_troop", slot_troop_occupation, 0), (troop_slot_eq, "$g_talk_troop", slot_troop_playerparty_history, pp_history_dismissed), (troop_get_slot, ":honorific", "$g_talk_troop", slot_troop_honorific), (str_store_string, 21, ":honorific"), (troop_get_slot, ":speech", "$g_talk_troop", slot_troop_backstory_delayed), (str_store_string, 5, ":speech"), ], "It is good to see you, {s21}! To tell you the truth, I had hoped to run into you.", "companion_was_dismissed", [ (troop_set_slot, "$g_talk_troop", slot_troop_playerparty_history, pp_history_indeterminate), ]], [anyone, "companion_was_dismissed", [ (troop_get_slot, ":speech", "$g_talk_troop", slot_troop_backstory_delayed), (str_store_string, 5, ":speech"), ], "{s5}. Would you want me to rejoin your company?", "companion_rehire", [ ]], [anyone|plyr, "companion_rehire", [ (hero_can_join, "p_main_party") ], "Welcome back, my friend!", "companion_recruit_signup_confirm", []], [anyone|plyr, "companion_rehire", [ ], "Sorry, I can't take on anyone else right now now.", "companion_rehire_refused", [ ]], [anyone, "companion_rehire_refused", [], "Well... Look me up if you change your mind, eh?", "close_window", []], [anyone, "event_triggered", [ (faction_slot_eq, "fac_player_supporters_faction", slot_faction_leader, "$g_talk_troop"), (ge, "$g_center_taken_by_player_faction", 0), (str_store_party_name, s1, "$g_center_taken_by_player_faction"), ], "{s1} is not being managed by anyone. Whom shall I put in charge?", "center_captured_lord_advice", []], [anyone|plyr|repeat_for_troops, "center_captured_lord_advice", [ (store_repeat_object, ":troop_no"), (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), (neq, "$g_talk_troop", ":troop_no"), (neq, "trp_player", ":troop_no"), (store_troop_faction, ":faction_no", ":troop_no"), (eq, ":faction_no", "fac_player_supporters_faction"), (str_store_troop_name, s11, ":troop_no"), (call_script, "script_print_troop_owned_centers_in_numbers_to_s0", ":troop_no"), (try_begin), (eq, reg0, 0), (str_store_string, s1, "@(no fiefs)"), (else_try), (str_store_string, s1, "@(fiefs: {s0})"), (try_end), ], "{s11}. {s1}", "center_captured_lord_advice_2", [ (store_repeat_object, "$temp"), ]], [anyone|plyr, "center_captured_lord_advice", [ (call_script, "script_print_troop_owned_centers_in_numbers_to_s0", "trp_player"), (str_store_party_name, s1, "$g_center_taken_by_player_faction"), ], "Please {s65}, I want to have {s1} for myself. (fiefs: {s0})", "center_captured_lord_advice_2", [ (assign, "$temp", "trp_player"), ]], [anyone|plyr, "center_captured_lord_advice", [ (call_script, "script_print_troop_owned_centers_in_numbers_to_s0", "$g_talk_troop"), (str_store_party_name, s1, "$g_center_taken_by_player_faction"), ], "{s66}, you should have {s1} for yourself. (fiefs: {s0})", "center_captured_lord_advice_2", [ (assign, "$temp", "$g_talk_troop"), ]], [anyone, "center_captured_lord_advice_2", [ # (faction_slot_eq, "fac_player_supporters_faction", slot_faction_leader, "$g_talk_troop"), # (ge, "$g_center_taken_by_player_faction", 0), ], "Hmmm. All right, {playername}. I value your counsel highly. {reg6?I:{reg7?You:{s11}}} will be the new {reg3?lady:lord} of {s1}.", "close_window", [ (assign, ":new_owner", "$temp"), (call_script, "script_calculate_troop_score_for_center", ":new_owner", "$g_center_taken_by_player_faction"), (assign, ":new_owner_score", reg0), (assign, ":total_negative_effect"), (try_for_range, ":cur_troop", kingdom_heroes_begin, kingdom_heroes_end), (store_troop_faction, ":cur_faction", ":cur_troop"), (eq, ":cur_faction", "fac_player_supporters_faction"), (neq, ":cur_troop", ":new_owner"), (call_script, "script_calculate_troop_score_for_center", ":cur_troop", "$g_center_taken_by_player_faction"), (assign, ":cur_troop_score", reg0), (gt, ":cur_troop_score", ":new_owner_score"), (store_sub, ":difference", ":cur_troop_score", ":new_owner_score"), (store_random_in_range, ":random_dif", 0, ":difference"), (val_div, ":random_dif", 1000), (gt, ":random_dif", 0), (val_add, ":total_negative_effect", ":random_dif"), (val_mul, ":random_dif", -1), (call_script, "script_change_player_relation_with_troop", ":cur_troop", ":random_dif"), (try_end), (val_mul, ":total_negative_effect", 2), (val_div, ":total_negative_effect", 3), (val_add, ":total_negative_effect", 5), (try_begin), (neq, ":new_owner", "trp_player"), (val_min, ":total_negative_effect", 30), (call_script, "script_change_player_relation_with_troop", ":new_owner", ":total_negative_effect"), (try_end), (call_script, "script_give_center_to_lord", "$g_center_taken_by_player_faction", ":new_owner", 0), (try_begin), (neq, ":new_owner", "trp_player"), (call_script, "script_cf_reinforce_party", "$g_center_taken_by_player_faction"), (call_script, "script_cf_reinforce_party", "$g_center_taken_by_player_faction"), (try_end), (assign, reg6, 0), (assign, reg7, 0), (try_begin), (eq, "$temp", "$g_talk_troop"), (assign, reg6, 1), (else_try), (eq, "$temp", "trp_player"), (assign, reg7, 1), (else_try), (str_store_troop_name, s11, "$temp"), (try_end), (str_store_party_name, s1, "$g_center_taken_by_player_faction"), (troop_get_type, reg3, "$temp"), (assign, "$g_center_taken_by_player_faction", -1), ]], [anyone, "event_triggered", [ (store_conversation_troop, "$map_talk_troop"), (eq, "$map_talk_troop", "$npc_is_quitting"), (troop_get_slot, ":honorific", "$map_talk_troop", slot_troop_honorific), (str_store_string, 5, ":honorific")], "{s5} -- there is something I need to tell you.", "companion_quitting", [ (assign, "$npc_is_quitting", 0), (assign, "$player_can_persuade_npc", 1), (assign, "$player_can_refuse_npc_quitting", 1), ]], ### This is also where the dialogue jumps if the player initiates quitting dialogue and the companion has low morale [anyone, "companion_quitting", [ (store_conversation_troop, "$map_talk_troop"), (troop_get_slot, ":speech", "$map_talk_troop", slot_troop_retirement_speech), (str_store_string, 5, ":speech") ], "{s5}", "companion_quitting_2", [ ]], ## The companion explains his/her reasons for quitting [anyone, "companion_quitting_2", [ (call_script, "script_npc_morale", "$map_talk_troop"), ], "To tell you the truth, {s21}", "companion_quitting_response", [ ]], [anyone|plyr, "companion_quitting_response", [ ], "Very well. You be off, then.", "companion_quitting_yes", [ ]], [anyone|plyr, "companion_quitting_response", [ (eq, "$player_can_persuade_npc", 1), ], "Perhaps I can persuade you to change your mind.", "companion_quitting_persuasion", [ (assign, "$player_can_persuade_npc", 0), ]], [anyone, "companion_quitting_persuasion", [ (store_random_in_range, ":random", -2, 13), (store_skill_level, ":persuasion", "skl_persuasion", "trp_player"), (le, ":random", ":persuasion"), ], "Hm. When you put it like that, I suppose I can stay a while longer, see if things improve.", "close_window", [ (troop_get_slot, ":morality_penalties", "$map_talk_troop", slot_troop_morality_penalties), (val_div, ":morality_penalties", 2), (troop_set_slot, "$map_talk_troop", slot_troop_morality_penalties, ":morality_penalties"), (troop_get_slot, ":personalityclash_penalties", "$map_talk_troop", slot_troop_personalityclash_penalties), (val_div, ":personalityclash_penalties", 2), (troop_set_slot, "$map_talk_troop", slot_troop_personalityclash_penalties, ":personalityclash_penalties"), ]], [anyone, "companion_quitting_persuasion", [ ], "I'm sorry, but I don't see your point. I am leaving whether you like it or not.", "companion_quitting_response", [ ]], [anyone|plyr, "companion_quitting_response", [ (eq, 1, 0), (eq, "$player_can_refuse_npc_quitting", 1), ], "We hang deserters in this company.", "companion_quitting_no", [ ]], [anyone, "companion_quitting_no", [], "Oh... Right... Do you mean that?", "companion_quitting_no_confirm", [ ]], [anyone|plyr, "companion_quitting_no_confirm", [], "Absolutely. You either leave this company by my command, or are carried out on your shield.", "companion_quitting_no_confirmed", [ ]], [anyone|plyr, "companion_quitting_no_confirm", [], "No, actually I don't mean that. You are free to leave.", "companion_quitting_yes", [ ]], [anyone, "companion_quitting_yes", [ ], "Then this is goodbye. Perhaps I'll see you around, {playername}.", "close_window", [ (troop_set_slot, "$map_talk_troop", slot_troop_playerparty_history, pp_history_quit), (call_script, "script_retire_companion", "$map_talk_troop", 100), ]], [anyone, "companion_quitting_no_confirmed", [ ], "Hm. I suppose I'm staying, then.", "close_window", [ ]], #Morality objections [anyone, "event_triggered", [ (store_conversation_troop, "$map_talk_troop"), (eq, "$map_talk_troop", "$npc_with_grievance"), (eq, "$npc_map_talk_context", slot_troop_morality_state), (try_begin), (eq, "$npc_grievance_slot", slot_troop_morality_state), (troop_get_slot, ":speech", "$map_talk_troop", slot_troop_morality_speech), (else_try), (troop_get_slot, ":speech", "$map_talk_troop", slot_troop_2ary_morality_speech), (try_end), (str_store_string, 21, "$npc_grievance_string"), (str_store_string, 5, ":speech"), ], "{s5}", "companion_objection_response", [ (assign, "$npc_with_grievance", 0), ]], [anyone|plyr, "companion_objection_response", [ (eq, "$npc_praise_not_complaint", 1), ], "Thanks, I appreciate your support.", "close_window", [ (troop_set_slot, "$map_talk_troop", "$npc_grievance_slot", tms_acknowledged), ]], [anyone|plyr, "companion_objection_response", [ (eq, "$npc_praise_not_complaint", 0), ], "Hopefully it won't happen again.", "close_window", [ (troop_set_slot, "$map_talk_troop", "$npc_grievance_slot", tms_acknowledged), ]], [anyone|plyr, "companion_objection_response", [ (eq, "$npc_praise_not_complaint", 0), ], "Your objection is noted. Now fall back in line.", "close_window", [ (troop_set_slot, "$map_talk_troop", "$npc_grievance_slot", tms_dismissed), (troop_get_slot, ":grievance", "$map_talk_troop", slot_troop_morality_penalties), (val_add, ":grievance", 10), (troop_set_slot, "$map_talk_troop", slot_troop_morality_penalties, ":grievance"), ]], ## [anyone|plyr, "companion_objection_response", [ ## ], "I prefer my followers to keep their opinions to themselves.", "close_window", [ ## (troop_set_slot, "$map_talk_troop", "$npc_grievance_slot", tms_dismissed), ## (troop_get_slot, ":grievance", "$map_talk_troop", slot_troop_morality_penalties), ## (val_add, ":grievance", 10), ## (troop_set_slot, "$map_talk_troop", slot_troop_morality_penalties, ":grievance"), ## (assign, "$disable_npc_complaints", 1), ## ]], # Personality clash 2 objections [anyone, "event_triggered", [ (store_conversation_troop, "$map_talk_troop"), (eq, "$map_talk_troop", "$npc_with_personality_clash_2"), (eq, "$npc_map_talk_context", slot_troop_personalityclash2_state), (troop_get_slot, ":speech", "$map_talk_troop", slot_troop_personalityclash2_speech), (troop_get_slot, ":object", "$map_talk_troop", slot_troop_personalityclash2_object), (str_store_troop_name, 11, ":object"), (str_store_string, 5, ":speech"), ], "{s5}", "companion_personalityclash2_b", [ (assign, "$npc_with_personality_clash_2", 0), (troop_get_slot, ":grievance", "$map_talk_troop", slot_troop_personalityclash_penalties), (val_add, ":grievance", 5), (troop_set_slot, "$map_talk_troop", slot_troop_personalityclash_penalties, ":grievance"), ]], [anyone, "companion_personalityclash2_b", [ ], "{s5}", "companion_personalityclash2_response", [ (troop_get_slot, ":speech", "$map_talk_troop", slot_troop_personalityclash2_speech_b), (troop_get_slot, ":object", "$map_talk_troop", slot_troop_personalityclash2_object), (str_store_troop_name, 11, ":object"), (str_store_string, 5, ":speech"), ]], [anyone|plyr, "companion_personalityclash2_response", [ (troop_get_slot, ":object", "$map_talk_troop", slot_troop_personalityclash2_object), (str_store_troop_name, s11, ":object"), (troop_get_type, reg11, ":object"), ], "{s11} is a valuable member of this company. I don't want you picking any more fights with {reg11?her:him}.", "close_window", [ (troop_set_slot, "$map_talk_troop", slot_troop_personalityclash2_state, pclash_penalty_to_self), ]], [anyone|plyr, "companion_personalityclash2_response", [ (troop_get_slot, ":object", "$map_talk_troop", slot_troop_personalityclash2_object), (str_store_troop_name, s11, ":object"), (troop_get_type, reg11, ":object"), ], "Tell {s11} you have my support in this, and {reg11?she:he} should hold {reg11?her:his} tongue.", "close_window", [ (troop_set_slot, "$map_talk_troop", slot_troop_personalityclash2_state, pclash_penalty_to_other), ]], [anyone|plyr, "companion_personalityclash2_response", [ ], "I don't have time for your petty dispute. Do not bother me with this again.", "close_window", [ (troop_set_slot, "$map_talk_troop", slot_troop_personalityclash2_state, pclash_penalty_to_both), ]], ## [anyone|plyr, "companion_personalityclash2_response", [ ## ], "Your grievance is noted. Now fall back in line.", "close_window", [ ## (troop_set_slot, "$map_talk_troop", slot_troop_personalityclash2_state, 1), ## ]], ## [anyone|plyr, "companion_personalityclash2_response", [ ## ], "I prefer my followers to keep their opinions to themselves.", "close_window", [ ## (troop_set_slot, "$map_talk_troop", slot_troop_personalityclash2_state, 1), ## (assign, "$disable_npc_complaints", 1), ## ]], # Personality clash objections [anyone, "event_triggered", [ (store_conversation_troop, "$map_talk_troop"), (eq, "$map_talk_troop", "$npc_with_personality_clash"), (eq, "$npc_map_talk_context", slot_troop_personalityclash_state), (troop_get_slot, ":speech", "$map_talk_troop", slot_troop_personalityclash_speech), (troop_get_slot, ":object", "$map_talk_troop", slot_troop_personalityclash_object), (str_store_troop_name, 11, ":object"), (str_store_string, 5, ":speech"), ], "{s5}", "companion_personalityclash_b", [ (assign, "$npc_with_personality_clash", 0), (troop_get_slot, ":grievance", "$map_talk_troop", slot_troop_personalityclash_penalties), (val_add, ":grievance", 5), (troop_set_slot, "$map_talk_troop", slot_troop_personalityclash_penalties, ":grievance"), ]], [anyone, "companion_personalityclash_b", [ ], "{s5}", "companion_personalityclash_response", [ (troop_get_slot, ":speech", "$map_talk_troop", slot_troop_personalityclash_speech_b), (troop_get_slot, ":object", "$map_talk_troop", slot_troop_personalityclash_object), (str_store_troop_name, 11, ":object"), (str_store_string, 5, ":speech"), ]], [anyone|plyr, "companion_personalityclash_response", [ (troop_get_slot, ":object", "$map_talk_troop", slot_troop_personalityclash_object), (str_store_troop_name, s11, ":object"), (troop_get_type, reg11, ":object"), ], "{s11} is a capable member of this company. I don't want you picking any more fights with {reg11?her:him}.", "close_window", [ (troop_set_slot, "$map_talk_troop", slot_troop_personalityclash_state, pclash_penalty_to_self), ]], [anyone|plyr, "companion_personalityclash_response", [ (troop_get_slot, ":object", "$map_talk_troop", slot_troop_personalityclash_object), (str_store_troop_name, s11, ":object"), (troop_get_type, reg11, ":object"), ], "Tell {s11} you have my support in this, and {reg11?she:he} should hold {reg11?her:his} tongue.", "close_window", [ (troop_set_slot, "$map_talk_troop", slot_troop_personalityclash_state, pclash_penalty_to_other), ]], [anyone|plyr, "companion_personalityclash_response", [ ], "I don't have time for your petty dispute. Do not bother me with this again.", "close_window", [ (troop_set_slot, "$map_talk_troop", slot_troop_personalityclash_state, pclash_penalty_to_both), ]], ## [anyone|plyr, "companion_personalityclash_response", [ ## ], "Your grievance is noted. Now fall back in line.", "close_window", [ ## (troop_set_slot, "$map_talk_troop", slot_troop_personalityclash_state, 1), ## ]], ## [anyone|plyr, "companion_personalityclash_response", [ ## ], "I prefer my followers to keep their opinions to themselves.", "close_window", [ ## (troop_set_slot, "$map_talk_troop", slot_troop_personalityclash_state, 1), ## (assign, "$disable_npc_complaints", 1), ## ]], # Personality match [anyone, "event_triggered", [ (eq, "$npc_map_talk_context", slot_troop_personalitymatch_state), (store_conversation_troop, "$map_talk_troop"), (eq, "$map_talk_troop", "$npc_with_personality_match"), (troop_get_slot, ":speech", "$map_talk_troop", slot_troop_personalitymatch_speech), (troop_get_slot, ":object", "$map_talk_troop", slot_troop_personalitymatch_object), (str_store_troop_name, 11, ":object"), (str_store_string, 5, ":speech"), ], "{s5}", "companion_personalitymatch_b", [ (assign, "$npc_with_personality_match", 0), ]], [anyone, "companion_personalitymatch_b", [ (troop_get_slot, ":speech", "$map_talk_troop", slot_troop_personalitymatch_speech_b), (troop_get_slot, ":object", "$map_talk_troop", slot_troop_personalitymatch_object), (str_store_troop_name, 11, ":object"), (str_store_string, 5, ":speech"), ], "{s5}", "companion_personalitymatch_response", [ ]], [anyone|plyr, "companion_personalitymatch_response", [ ], "Very good.", "close_window", [ (troop_set_slot, "$map_talk_troop", slot_troop_personalitymatch_state, 1), ]], ## [anyone|plyr, "companion_personalitymatch_response", [ ## ], "I prefer my followers to keep their opinions to themselves.", "close_window", [ ## (troop_set_slot, "$map_talk_troop", slot_troop_personalitymatch_state, 1), ## (assign, "$disable_npc_complaints", 1), ## ]], [anyone, "event_triggered", [ (eq, "$npc_map_talk_context", slot_troop_home), (store_conversation_troop, "$map_talk_troop"), (troop_get_slot, ":speech", "$map_talk_troop", slot_troop_home_intro), (str_store_string, s5, ":speech"), ], "{s5}", "companion_home_description", [ (troop_set_slot, "$map_talk_troop", slot_troop_home_speech_delivered, 1), ]], [anyone|plyr, "companion_home_description", [ ], "Tell me more.", "companion_home_description_2", [ ]], [anyone|plyr, "companion_home_description", [ ], "We don't have time to chat just now.", "close_window", [ ]], [anyone|plyr, "companion_home_description", [ ], "I prefer my companions not to bother me with such trivialities.", "close_window", [ (assign, "$disable_local_histories", 1), ]], [anyone, "companion_home_description_2", [ (troop_get_slot, ":speech", "$map_talk_troop", slot_troop_home_description), (str_store_string, 5, ":speech"), ], "{s5}", "companion_home_description_3", [ ]], [anyone, "companion_home_description_3", [ (troop_get_slot, ":speech", "$map_talk_troop", slot_troop_home_description_2), (str_store_string, 5, ":speech"), ], "{s5}", "close_window", [ ]], [anyone,"event_triggered", [ (eq, "$talk_context", tc_rebel_thanks), (troop_get_slot, ":old_faction", "$g_talk_troop", slot_troop_original_faction), (str_store_faction_name, s3, ":old_faction"), (str_store_string, s6, "@{playername}, when we started our long walk, few people had the courage to support me.\ And fewer still would be willing to put their lives at risk for my cause.\ But you didn't hesitate for a moment in throwing yourself at my enemies.\ We have gone through a lot together, and there were times I came close to losing all hope.\ But with God's help, we prevailed. It is now time for me to leave your company and take what's rightfully mine.\ From now on, I will carry out the great responsibility of ruling {s3}.\ There still lie many challanges ahead and I count on your help in overcoming those.\ And of course, you will always remain as my foremost vassal."), ], "{s6}", "rebel_thanks_answer", [ (call_script, "script_end_quest", "qst_rebel_against_kingdom"), ]], [anyone|plyr,"rebel_thanks_answer", [], "It was an honour to fight for your cause, {reg65?madame:my lord}.", "rebel_thanks_answer_2", []], [anyone|plyr,"rebel_thanks_answer", [], "You will always have my loyal support, {reg65?my lady:sir}.", "rebel_thanks_answer_2", []], [anyone,"rebel_thanks_answer_2", [], "I will miss living this life of adventure with you, but my duties await me. So... farewell for now, {playername}.\ I hope I'll see you again soon.", "close_window", []], [anyone, "event_triggered", [ ], "Sorry -- just talking to myself [ERROR]", "close_window", [ ]], # Kingdom Lords: [anyone,"start", [(eq, "$talk_context", tc_castle_commander)], "What do you want?", "player_siege_castle_commander_1", []], [anyone|plyr,"player_siege_castle_commander_1", [], "Surrender! Your situation is hopeless!", "player_siege_ask_surrender", []], [anyone|plyr,"player_siege_castle_commander_1", [], "Nothing. I'll leave you now.", "close_window", []], [anyone,"player_siege_ask_surrender", [(lt, "$g_enemy_strength", 100), (store_mul,":required_str","$g_enemy_strength",5),(ge, "$g_ally_strength", ":required_str")], "Perhaps... Do you give your word of honour that we'll be treated well?", "player_siege_ask_surrender_treatment", []], [anyone,"player_siege_ask_surrender", [(lt, "$g_enemy_strength", 200), (store_mul,":required_str","$g_enemy_strength",3),(ge, "$g_ally_strength", ":required_str")], "We are ready to leave this castle to you and march away if you give me your word of honour that you'll let us leave unmolested.", "player_siege_ask_leave_unmolested", []], [anyone,"player_siege_ask_surrender", [], "Surrender? Hah! We can hold these walls until we all die of old age.", "close_window", []], [anyone|plyr,"player_siege_ask_surrender_treatment", [], "I give you nothing. Surrender now or prepare to die!", "player_siege_ask_surrender_treatment_reject", []], [anyone,"player_siege_ask_surrender_treatment_reject", [], "Bastard. We will fight you to the last man!", "close_window", []], [anyone|plyr,"player_siege_ask_surrender_treatment", [], "You will be ransomed and your soldiers will live. I give you my word.", "player_siege_ask_surrender_treatment_accept", []], [anyone,"player_siege_ask_surrender_treatment_accept", [], "Very well then. Under those terms, I offer you my surrender.", "close_window", [(assign,"$g_enemy_surrenders",1)]], [anyone|plyr,"player_siege_ask_leave_unmolested", [], "You have my word. You will not come under attack if you leave the castle.", "player_siege_ask_leave_unmolested_accept", []], [anyone,"player_siege_ask_leave_unmolested_accept", [], "Very well. Then we leave this castle to you. You have won this day. But we'll meet again.", "close_window", [(assign,"$g_castle_left_to_player",1)]], [anyone|plyr,"player_siege_ask_leave_unmolested", [], "Unacceptable. I want prisoners.", "player_siege_ask_leave_unmolested_reject", []], [anyone,"player_siege_ask_leave_unmolested_reject", [], "Then we will defend this castle to the death, and this parley is done. Farewell.", "close_window", []], #After battle texts [anyone,"start", [(eq, "$talk_context", tc_hero_freed), (troop_slot_eq,"$g_talk_troop",slot_troop_occupation, slto_kingdom_hero)], "I am in your debt for freeing me, friend.", "freed_lord_answer", [ (call_script, "script_remove_troop_from_prison", "$g_talk_troop"), ]], [anyone|plyr,"freed_lord_answer", [(lt, "$g_talk_troop_faction_relation", 0)], "You're not going anywhere, 'friend'. You're my prisoner now.", "freed_lord_answer_1", [#(troop_set_slot, "$g_talk_troop", slot_troop_is_prisoner, 1), (troop_set_slot, "$g_talk_troop", slot_troop_prisoner_of_party, "p_main_party"), (party_force_add_prisoners, "p_main_party", "$g_talk_troop", 1), (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -30), (call_script, "script_change_player_relation_with_faction_ex", "$g_talk_troop_faction", -2), (call_script, "script_event_hero_taken_prisoner_by_player", "$g_talk_troop"), ]],#take prisoner [anyone,"freed_lord_answer_1", [], "I'll have your head on a pike for this, you bastard! Someday!", "close_window", []], [anyone|plyr,"freed_lord_answer", [], "You are free to go wherever you want, sir.", "freed_lord_answer_2", [(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 7), (call_script, "script_change_player_honor", 2), # (troop_get_slot, ":cur_rank", "$g_talk_troop", slot_troop_kingdom_rank), # (val_mul, ":cur_rank", 1), (call_script, "script_change_player_relation_with_faction_ex", "$g_talk_troop_faction", 2)]], [anyone,"freed_lord_answer_2", [], "Thank you, good {sire/lady}. I never forget someone who's done me a good turn.", "close_window", []], ## [anyone|plyr,"freed_lord_answer", [(neg|faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"), #he is not a faction leader! ## (call_script, "script_get_number_of_hero_centers", "$g_talk_troop"), ## (eq, reg0, 0), #he has no castles or towns ## (hero_can_join)], ## "I need capable men like you. Would you like to join me?", "knight_offer_join", ## []], ## ## [anyone,"freed_lord_answer_3", [(store_random_in_range, ":random_no",0,2),(eq, ":random_no", 0)], ## "Alright I will join you.", "close_window", ## [ ### (troop_set_slot, "$g_talk_troop", slot_troop_is_player_companion, 1), ## (troop_set_slot, "$g_talk_troop", slot_troop_occupation, slto_player_companion), ## (store_conversation_troop, ":cur_troop_id"), ## (party_add_members, "p_main_party", ":cur_troop_id", 1),#join hero ## ]], ## ## [anyone,"freed_lord_answer_3", [], ## "No, I want to go on my own.", "close_window", []], #Troop commentary changes begin [anyone,"start", [(eq,"$talk_context",tc_hero_defeated), (troop_slot_eq,"$g_talk_troop",slot_troop_occupation, slto_kingdom_hero)], "{s43}", "defeat_lord_answer", [(troop_set_slot, "$g_talk_troop", slot_troop_leaded_party, -1), (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_surrender_offer_default"), ]], [anyone|plyr,"defeat_lord_answer", [], "You are my prisoner now.", "defeat_lord_answer_1", [ #(troop_set_slot, "$g_talk_troop", slot_troop_is_prisoner, 1), (troop_set_slot, "$g_talk_troop", slot_troop_prisoner_of_party, "p_main_party"), (party_force_add_prisoners, "p_main_party", "$g_talk_troop", 1),#take prisoner (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -10), (call_script, "script_change_player_relation_with_faction_ex", "$g_talk_troop_faction", -3), (call_script, "script_event_hero_taken_prisoner_by_player", "$g_talk_troop"), (call_script, "script_add_log_entry", logent_lord_captured_by_player, "trp_player", -1, "$g_talk_troop", "$g_talk_troop_faction"), ]], [anyone,"defeat_lord_answer_1", [], "I am at your mercy.", "close_window", []], [anyone|plyr,"defeat_lord_answer", [], "You have fought well. You are free to go.", "defeat_lord_answer_2", [(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 5), (call_script, "script_change_player_honor", 3), (call_script, "script_add_log_entry", logent_lord_defeated_but_let_go_by_player, "trp_player", -1, "$g_talk_troop", "$g_talk_troop_faction")]], [anyone,"defeat_lord_answer_2", [], "{s43}", "close_window", [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_prisoner_released_default"), ]], #Troop commentary changes end #Troop commentaries changes begin [anyone,"start", [(eq,"$talk_context",tc_party_encounter), (troop_slot_eq, "$g_talk_troop", slot_troop_occupation, slto_kingdom_hero), (lt,"$g_encountered_party_relation",0), (encountered_party_is_attacker), (eq, "$g_talk_troop_met", 1), ], "{playername}!", "party_encounter_lord_hostile_attacker", [ ]], [anyone,"start", [(eq,"$talk_context",tc_party_encounter), (troop_slot_eq, "$g_talk_troop", slot_troop_occupation, slto_kingdom_hero), (lt,"$g_encountered_party_relation",0), (encountered_party_is_attacker), ], "Halt!", "party_encounter_lord_hostile_attacker", [ ]], [anyone,"party_encounter_lord_hostile_attacker", [ (gt, "$g_comment_found", 0), ], "{s42}", "party_encounter_lord_hostile_attacker", [ (try_begin), (neq, "$log_comment_relation_change", 0), (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", "$log_comment_relation_change"), (try_end), (assign, "$g_comment_found", 0), ]], #Troop commentaries changes end [anyone,"party_encounter_lord_hostile_attacker", [ ], "{s43}", "party_encounter_lord_hostile_attacker_2", [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_surrender_demand_default"), ]], [anyone|plyr,"party_encounter_lord_hostile_attacker_2", [ ], "Is there no way to avoid this battle? I don't want to fight with you.", "party_encounter_offer_dont_fight", []], [anyone|plyr,"party_encounter_lord_hostile_attacker_2", [ ], "Don't attack! We surrender.", "close_window", [(assign,"$g_player_surrenders",1)]], [anyone|plyr,"party_encounter_lord_hostile_attacker_2", [ ], "We will fight you to the end!", "close_window", []], [anyone, "party_encounter_offer_dont_fight", [(gt, "$g_talk_troop_relation", 30), #TODO: Add adition conditions, lord personalities, battle advantage, etc... ], "I owe you a favor, don't I. Well... all right then. I will let you go just this once.", "close_window", [ (call_script, "script_change_player_relation_with_troop","$g_talk_troop", -7), (store_current_hours,":protected_until"), (val_add, ":protected_until", 72), (party_set_slot,"$g_encountered_party",slot_party_ignore_player_until,":protected_until"), (party_ignore_player, "$g_encountered_party", 72), (assign, "$g_leave_encounter",1) ]], [anyone, "party_encounter_offer_dont_fight", [ ], "Ha-ha. But I want to fight with you.", "close_window", []], ## [anyone,"start", [(eq,"$talk_context",tc_party_encounter), ## (troop_slot_eq, "$g_talk_troop", slot_troop_occupation, slto_kingdom_hero), ## (lt,"$g_encountered_party_relation",0), ## (neg|encountered_party_is_attacker), ## ], ## "What do you want?", "party_encounter_lord_hostile_defender", ## []], # [anyone|plyr,"party_encounter_lord_hostile_defender", [], # "Nothing. We'll leave you in peace.", "close_window", [(assign, "$g_leave_encounter",1)]], #Betrayal texts should go here ## [anyone ,"start", [(troop_slot_eq,"$g_talk_troop",slot_troop_occupation, slto_kingdom_hero), ## (troop_slot_eq,"$g_talk_troop",slot_troop_last_quest_betrayed, 1), ## (troop_slot_eq,"$g_talk_troop",slot_troop_last_quest, "qst_deliver_message_to_lover"), ## (le,"$talk_context",tc_siege_commander), ## ], ## "I had trusted that letter to you, thinking you were a {man/lady} of honor, and you handed it directly to the girl's father.\ ## I should have known you were not to be trusted. Anyway, I have learned my lesson and I won't make that mistake again.", "close_window", ## [(call_script, "script_clear_last_quest", "$g_talk_troop")]], #Rebellion changes begin [anyone ,"start", [ (is_between, "$g_talk_troop", pretenders_begin, pretenders_end), (faction_slot_eq, "$g_talk_troop_faction", slot_faction_state, 2), (neg|faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"), ], "[Our first task is to seize a fortress. Then other lords will join us.]", "pretender_start", [ ]], [anyone ,"start", [ (is_between, "$g_talk_troop", pretenders_begin, pretenders_end), (eq, "$g_talk_troop", "$supported_pretender"), ], "I await your counsel, {playername}.", "supported_pretender_talk", [ ]], [anyone ,"start", [ (is_between, "$g_talk_troop", pretenders_begin, pretenders_end), (assign, "$pretender_told_story", 0), (eq, "$g_talk_troop_met", 0), (neg|faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"), ], "Do I know you?.", "pretender_intro_1", []], [anyone|plyr ,"pretender_intro_1", [], "My name is {playername}. At your sevice.", "pretender_intro_2", []], [anyone|plyr ,"pretender_intro_1", [], "I am {playername}. Perhaps you have heard of my exploits.", "pretender_intro_2", []], [anyone ,"pretender_intro_2", [(troop_get_slot, ":rebellion_string", "$g_talk_troop", slot_troop_original_faction), (val_sub, ":rebellion_string", "fac_kingdom_1"), (val_add, ":rebellion_string", "str_swadian_rebellion_pretender_intro"), (str_store_string, 48, ":rebellion_string"),], "{s48}", "pretender_intro_3", []], [anyone|plyr ,"pretender_intro_3", [(troop_get_slot, ":original_faction", "$g_talk_troop", slot_troop_original_faction), (str_store_faction_name, s12, ":original_faction"), (faction_get_slot, ":original_ruler", ":original_faction", slot_faction_leader), (str_store_troop_name, s11, ":original_ruler"),], "I thought {s12} was ruled by {s11}?", "pretender_rebellion_cause_1", [(troop_set_slot, "$g_talk_troop", slot_troop_discussed_rebellion, 1),]], [anyone ,"start", [ (is_between, "$g_talk_troop", pretenders_begin, pretenders_end), (neg|faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"), ], "Greetings, {playername}", "pretender_start", [(assign, "$pretender_told_story", 0)]], [anyone|plyr ,"pretender_start", [ (troop_slot_eq, "$g_talk_troop", slot_troop_discussed_rebellion, 1), (eq, "$pretender_told_story", 0) ], "What was your story again, {reg65?my lady:sir}?", "pretender_rebellion_cause_prelim", [ ]], [anyone,"pretender_rebellion_cause_prelim", [], "I shall tell you.", "pretender_rebellion_cause_1", [ ]], [anyone,"pretender_rebellion_cause_1", [], "{s48}", "pretender_rebellion_cause_2", [ (assign, "$pretender_told_story", 1), (troop_get_slot, ":rebellion_string", "$g_talk_troop", slot_troop_original_faction), (val_sub, ":rebellion_string", "fac_kingdom_1"), (val_add, ":rebellion_string", "str_swadian_rebellion_pretender_story_1"), (str_store_string, 48, ":rebellion_string"), ]], [anyone,"pretender_rebellion_cause_2", [], "{s48}", "pretender_rebellion_cause_3", [ (troop_get_slot, ":rebellion_string", "$g_talk_troop", slot_troop_original_faction), (val_sub, ":rebellion_string", "fac_kingdom_1"), (val_add, ":rebellion_string", "str_swadian_rebellion_pretender_story_2"), (str_store_string, 48, ":rebellion_string"), ]], [anyone,"pretender_rebellion_cause_3", [], "{s48}", "pretender_start", [ (troop_get_slot, ":rebellion_string", "$g_talk_troop", slot_troop_original_faction), (val_sub, ":rebellion_string", "fac_kingdom_1"), (val_add, ":rebellion_string", "str_swadian_rebellion_pretender_story_3"), (str_store_string, 48, ":rebellion_string"), ]], [anyone|plyr ,"pretender_start", [ (troop_slot_eq, "$g_talk_troop", slot_troop_discussed_rebellion, 1), ], "I want to take up your cause and help you reclaim your throne!", "pretender_discuss_rebellion_1", [ ]], [anyone|plyr ,"pretender_start", [ ], "I must leave now.", "pretender_end", [ ]], [anyone ,"pretender_discuss_rebellion_1", [(troop_get_slot, ":original_faction", "$g_talk_troop", slot_troop_original_faction), (faction_get_slot, ":original_ruler", ":original_faction", slot_faction_leader), (str_store_troop_name, s11, ":original_ruler")], "Are you sure you will be up to the task, {playername}? Reclaiming my throne will be no simple matter.\ The lords of our realm have all sworn oaths of homage to {s11}.\ Such oaths to a usurper are of course invalid, and we can expect some of the lords to side with us, but it will be a very tough and challenging struggle ahead.", "pretender_discuss_rebellion_2", []], [anyone|plyr ,"pretender_discuss_rebellion_2", [], "I am ready for this struggle.", "pretender_discuss_rebellion_3", []], [anyone|plyr ,"pretender_discuss_rebellion_2", [], "You are right. Perhaps, I should think about this some more.", "pretender_end", []], [anyone ,"pretender_discuss_rebellion_3", [(neg|troop_slot_ge, "trp_player",slot_troop_renown, 200), (troop_get_slot, ":original_faction", "$g_talk_troop", slot_troop_original_faction), (faction_get_slot, ":original_ruler", ":original_faction", slot_faction_leader), (str_store_troop_name, s11, ":original_ruler")], "I have no doubt that your support for my cause is heartfelt, {playername}, and I am grateful to you for it.\ But I don't think we have much of a chance of success.\ If you can gain renown in the battlefield and make a name for yourself as a great commander, then our friends would not hesitate to join our cause,\ and our enemies would be wary to take up arms against us. When that time comes, I will come with you gladly.\ But until that time, it will be wiser not to openly challange the usurper, {s11}.", "close_window", []], [anyone ,"pretender_discuss_rebellion_3", [(gt, "$supported_pretender", 0), (str_store_troop_name, s17, "$supported_pretender")], "Haven't you already taken up the cause of {s17}?\ You must have a very strong sense of justice, indeed.\ But no, thanks. I will not be part of your game.", "close_window", []], [anyone ,"pretender_discuss_rebellion_3", [(gt, "$players_kingdom", 0), (neq, "$players_kingdom", "fac_player_supporters_faction"), (neq, "$players_kingdom", "fac_player_faction"), (troop_get_slot, ":original_faction", "$g_talk_troop", slot_troop_original_faction), (neq, "$players_kingdom", ":original_faction"), (gt, "$player_has_homage", 0), (str_store_faction_name, s16, "$players_kingdom"), (faction_get_slot, ":player_ruler", "$players_kingdom", slot_faction_leader), (str_store_troop_name, s15, ":player_ruler"), (str_store_faction_name, s17, ":original_faction"), ], "{playername}, you are already oath-bound to serve {s15}.\ As such, I cannot allow you to take up my cause, and let my enemies claim that I am but a mere puppet of {s16}.\ No, if I am to have the throne of {s17}, I must do it due to the righteousness of my cause and the support of my subjects alone.\ If you want to help me, you must first free yourself of your oath to {s15}.", "close_window", []], [anyone ,"pretender_discuss_rebellion_3", [(troop_get_slot, ":original_faction", "$g_talk_troop", slot_troop_original_faction), (str_store_faction_name, s12, ":original_faction"), (faction_get_slot, ":original_ruler", ":original_faction", slot_faction_leader), (str_store_troop_name, s11, ":original_ruler")], "You are a capable warrior, {playername}, and I am sure with your renown as a commander, and my righteous cause, the nobles and the good people of {s12} will flock to our support.\ The time is ripe for us to act! I will come with you, and together, we will topple the usurper {s11} and take the throne from his bloodied hands.\ But first, you must give me your oath of homage and accept me as your liege {reg65?lady:lord}.", "pretender_rebellion_ready", []], [anyone ,"pretender_discuss_rebellion", [(is_between, "$g_talk_troop", pretenders_begin, pretenders_end), (assign, "$town_to_rebel", 0), (assign, "$town_to_approach", 0), (troop_get_slot, ":rebellion_target_faction", "$g_talk_troop", slot_troop_original_faction), (try_for_range, ":town", towns_begin, towns_end), (store_faction_of_party, ":town_faction", ":town"), (eq, ":town_faction", ":rebellion_target_faction"), (party_get_slot, ":siege_state", ":town", slot_village_state), (neq, ":siege_state", svs_under_siege), (try_begin), (party_slot_ge, ":town", slot_town_rebellion_readiness, 30), (assign, "$town_to_rebel", ":town"), (else_try), # (party_get_slot, ":contact", ":town", slot_town_rebellion_contact), # (lt, ":contact", 2), (assign, "$town_to_approach", ":town"), (assign, ":support_base_is_available", 1), (try_begin), #Check to see if support base is captured or under siege (try_end), (try_end), (try_end), (eq, "$town_to_rebel", 0), (gt, "$town_to_approach", 0), (gt, ":support_base_is_available", 0), ], "[Before we rebel, I want you to raise support for my cause. I have always had strong backing from the town of {s4}, but you may have good ties in other places. Are you up for that?]", "pretender_town_quest", [ (troop_get_slot, ":support_base", "$g_talk_troop", slot_troop_support_base), (str_store_party_name, s4, ":support_base"), ]], [anyone ,"pretender_discuss_rebellion", [(is_between, "$g_talk_troop", pretenders_begin, pretenders_end), (eq, "$town_to_rebel", 0), (gt, "$town_to_approach", 0), ], "[Before we rebel, I want you to raise support for my cause. If you have good ties with any towns, you should try there. Are you up for that?]", "pretender_town_quest", [ ]], [anyone ,"pretender_discuss_rebellion", [(is_between, "$g_talk_troop", pretenders_begin, pretenders_end), (eq, "$town_to_approach", 0), ], "[Circumstances aren't really right for a rebellion right now. Let us lay low for a while]", "pretender_start", [ ]], [anyone ,"pretender_discuss_rebellion", [(is_between, "$g_talk_troop", pretenders_begin, pretenders_end), (gt, "$town_to_rebel", 0), (gt, "$players_kingdom", 0), ], "[You have laid the groundwork for a rebellion, but you are affiliated with another liege]", "pretender_start", [ ]], [anyone ,"pretender_discuss_rebellion", [(is_between, "$g_talk_troop", pretenders_begin, pretenders_end), (gt, "$town_to_rebel", 0), ], "You have done good work. {s4} and possibly other towns are ready to rebel. Whenever you are ready, let us ride forth to war.", "pretender_rebellion_ready", [ (str_store_party_name, 4, "$town_to_rebel"), ]], [anyone|plyr ,"pretender_rebellion_ready", [ (troop_get_type, reg3, "$g_talk_troop"), ], "I am ready to pledge myself to your cause, {reg3?my lady:sir}.", "lord_give_oath_2", [ ]], [anyone|plyr ,"pretender_rebellion_ready", [ ], "Let us bide our time a little longer.", "pretender_end", [ ]], [anyone ,"lord_give_conclude_2", [(is_between, "$g_talk_troop", pretenders_begin, pretenders_end), ], "Forward, then! Our first task is to take hold of a fortress and persuade other lords to join us. You lead the way!", "close_window", [ (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 25), (faction_set_slot, "$g_talk_troop_faction", slot_faction_state, sfs_active), ## (faction_set_slot, "$g_talk_troop_faction", slot_faction_ai_state, sfai_nascent_rebellion), (party_force_add_members, "p_main_party", "$supported_pretender", 1), (troop_set_slot, "$supported_pretender", slot_troop_cur_center, 0), (troop_set_auto_equip, "$supported_pretender",0), (str_store_troop_name_link, s6, "$supported_pretender"), (display_message, "@{s6} has joined your party."), # (faction_get_slot, ":location", "$g_talk_troop_faction", slot_faction_inactive_leader_location), # (faction_set_slot, "$g_talk_troop_faction", slot_faction_inactive_leader_location, 0), # (call_script, "script_create_kingdom_hero_party", "$g_talk_troop", ":location"), # (party_set_slot, "$pout_party", slot_party_commander_party, "p_main_party"), # (call_script, "script_party_decide_next_ai_state_under_command", "$pout_party"), # (store_current_hours, ":follow_until_time"), # (store_add, ":follow_period", 60, "$g_talk_troop_relation"), # (val_div, ":follow_period", 2), # (val_add, ":follow_until_time", ":follow_period"), # (party_set_slot, "$pout_party", slot_party_follow_player_until_time, ":follow_until_time"), # (party_set_slot, "$pout_party", slot_party_following_player, 1), (assign, "$player_made_legitimacy_claim", 0), (assign, "$player_made_benefit_claim", 0), (assign, "$player_made_strength_claim", 0), (assign, "$player_made_benefit_claim", 0), # (assign, ":rebellion_target", "$supported_pretender_old_faction"), (store_relation, ":reln", "$supported_pretender_old_faction", "fac_player_supporters_faction"), (val_min, ":reln", -50), (call_script, "script_set_player_relation_with_faction", "$supported_pretender_old_faction", ":reln"), (str_store_faction_name, s1, "$supported_pretender_old_faction"), (faction_set_name, "fac_player_supporters_faction", "@{s1} Rebels"), (faction_set_color, "fac_player_supporters_faction", 0xFF0000), ## Let us handle relation with other kingdoms later. ## (try_for_range, ":existing_kingdom", kingdoms_begin, kingdoms_end), ## (store_relation, ":relation", ":existing_kingdom", ":rebellion_target"), ## (store_sub, ":relation_w_rebels", 0, ":relation"), ## (store_relation, ":player_relation", ":existing_kingdom", "fac_player_supporters_faction"), ## (val_div, ":player_relation", 3), ## (val_add, ":relation_w_rebels", ":player_relation"), ## #WARNING: Never use set_relation! ## (set_relation, ":existing_kingdom", "$g_talk_troop_faction", ":relation_w_rebels"), ## (try_end), # we have alrady joined. ## (str_store_faction_name, 4, "$g_talk_troop_faction"), ## (display_message, "@Player joins {s4}"), ## (call_script, "script_player_join_faction", "$g_talk_troop_faction"), (call_script, "script_update_all_notes"), ]], [anyone|plyr ,"pretender_town_quest", [ ], "[Abracadabra - the town is ready]", "pretender_discuss_rebellion", [ (troop_get_slot, ":support_base", "$g_talk_troop", slot_troop_support_base), (party_set_slot, ":support_base", slot_town_rebellion_readiness, 40), ]], [anyone|plyr ,"pretender_town_quest", [ ], "[Not interested, thanks]", "pretender_end", [ ]], [anyone ,"pretender_end", [ ], "Farewell for now, then.", "close_window", [ ]], # Events.... # Choose friend. #Post 0907 changes begin [anyone ,"start", [(troop_slot_eq,"$g_talk_troop",slot_troop_occupation, slto_kingdom_hero), (neq, "$g_talk_troop_met", 0), (gt, "$g_time_since_last_talk", 24), (gt, "$g_talk_troop_relation", -10), (store_random_in_range, ":random_num", 0, 100), (lt, ":random_num", 30), (eq,"$talk_context",tc_town_talk), (call_script, "script_cf_troop_get_random_enemy_troop_with_occupation", "$g_talk_troop", slto_kingdom_hero), (assign, ":other_lord",reg0), (troop_get_slot, ":other_lord_relation", ":other_lord", slot_troop_player_relation), (ge, ":other_lord_relation", 20), (str_store_troop_name, s6, ":other_lord"), (assign, "$temp", ":other_lord"), ], "I heard that you have befriended that {s43} called {s6}.\ Believe me, you can't trust that man.\ You should end your dealings with him.", "lord_event_choose_friend", [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_lord_insult_default"), ]], [anyone|plyr ,"lord_event_choose_friend", [], "I assure you, {s65}, I am no friend of {s6}.", "lord_event_choose_friend_renounce", [ (call_script, "script_change_player_relation_with_troop","$g_talk_troop",5), (call_script, "script_change_player_relation_with_troop","$temp",-10), ]], [anyone ,"lord_event_choose_friend_renounce", [], "Glad news, {playername}. I would fear for your safety otherwise.\ If you do encounter {s6}, be on your guard and don't believe a word.", "lord_pretalk", []], [anyone|plyr ,"lord_event_choose_friend", [], "{s6} is an honourable man, you've no right to speak of him thus.", "lord_event_choose_friend_defend", [ (call_script, "script_change_player_relation_with_troop","$g_talk_troop",-10), (call_script, "script_change_player_relation_with_troop","$temp",5), ]], [anyone ,"lord_event_choose_friend_defend", [], "As you like, {playername}.\ A fool you might be, but a loyal fool at the least. {s6}'s loyalty may not be so steadfast, however...", "lord_pretalk", []], #Post 0907 changes end [anyone|plyr ,"lord_event_choose_friend", [], "I don't want to be involved in your quarrel with {s6}.", "lord_event_choose_friend_neutral", [ (call_script, "script_change_player_relation_with_troop","$g_talk_troop",-2), (call_script, "script_change_player_relation_with_troop","$temp",-3), ]], [anyone ,"lord_event_choose_friend_neutral", [], "Hmph. As you wish, {playername}.\ Just remember that a {man/woman} needs friends in this world, and you'll never make any if you never stand with anyone.", "lord_pretalk", []], #Meeting. [anyone ,"start", [(troop_slot_eq,"$g_talk_troop",slot_troop_occupation, slto_kingdom_hero), (check_quest_active, "qst_join_faction"), (eq, "$g_invite_faction_lord", "$g_talk_troop"), (try_begin), (gt, "$g_invite_offered_center", 0), (store_faction_of_party, ":offered_center_faction", "$g_invite_offered_center"), (neq, ":offered_center_faction", "$g_talk_troop_faction"), (call_script, "script_get_poorest_village_of_faction", "$g_talk_troop_faction"), (assign, "$g_invite_offered_center", reg0), (try_end), ], #TODO: change conversations according to relation. "{playername}, I've been expecting you. Word has reached my ears of your exploits.\ Why, I keep hearing such tales of prowess and bravery that my mind was quickly made up.\ I knew that I had found someone worthy of becoming my vassal.", "lord_invite_1", []], [anyone|plyr ,"lord_invite_1", [], "Thank you, {s65}, you honour me with your offer.", "lord_invite_2", []], [anyone|plyr ,"lord_invite_1", [], "It is good to have my true value recognised.", "lord_invite_2", []], [anyone ,"lord_invite_2", [], "Aye. Let us dispense with the formalities, {playername}; are you ready to swear homage to me?", "lord_invite_3", []], [anyone|plyr ,"lord_invite_3", [], "Yes, {s65}.", "lord_give_oath_2", []], [anyone|plyr ,"lord_invite_3", [], "No, {s65}. I cannot serve you right now.", "lord_enter_service_reject", []], [anyone ,"start", [(troop_slot_eq,"$g_talk_troop",slot_troop_occupation, slto_kingdom_hero), (neq, "$g_talk_troop_met", 0), (gt, "$g_time_since_last_talk", 24), (gt, "$g_talk_troop_relation", 50), (gt, "$g_talk_troop_faction_relation", 10), (le,"$talk_context",tc_siege_commander), ], "If it isn't my brave champion, {playername}...", "lord_start", []], [anyone ,"start", [(troop_slot_eq,"$g_talk_troop",slot_troop_occupation, slto_kingdom_hero), (neq, "$g_talk_troop_met", 0), (gt, "$g_time_since_last_talk", 24), (gt, "$g_talk_troop_relation", 10), (le,"$talk_context",tc_siege_commander), ], "Good to see you again {playername}...", "lord_start", []], [anyone ,"start", [(troop_slot_eq,"$g_talk_troop",slot_troop_occupation, slto_kingdom_hero), (neq, "$g_talk_troop_met", 0), (gt, "$g_time_since_last_talk", 24), # (lt, "$g_talk_troop_faction_relation", 0), (le,"$talk_context",tc_siege_commander), ], "We meet again, {playername}...", "lord_start", []], [anyone ,"start", [(troop_slot_eq,"$g_talk_troop",slot_troop_occupation, slto_kingdom_hero), (eq, "$g_talk_troop_met", 0), (ge, "$g_talk_troop_faction_relation", 0), (le,"$talk_context",tc_siege_commander), ], "Do I know you?", "lord_meet_neutral", []], [anyone|plyr ,"lord_meet_neutral", [], "I am {playername}.", "lord_intro", []], [anyone|plyr ,"lord_meet_neutral", [], "My name is {playername}. At your service sir.", "lord_intro", []], [anyone ,"lord_intro", [], "{s11}", "lord_start", [(faction_get_slot, ":faction_leader", "$g_talk_troop_faction", slot_faction_leader), (str_store_faction_name, s6, "$g_talk_troop_faction"), (assign, reg4, 0), (str_store_troop_name, s4, "$g_talk_troop"), (try_begin), (eq, ":faction_leader", "$g_talk_troop"), (str_store_string, s9, "@I am {s4}, the ruler of {s6}", 0), (else_try), (str_store_string, s9, "@I am {s4}, a vassal of {s6}", 0), (try_end), (assign, ":num_centers", 0), (str_clear, s8), (try_for_range_backwards, ":cur_center", centers_begin, centers_end), (party_slot_eq, ":cur_center", slot_town_lord, "$g_talk_troop"), (try_begin), (eq, ":num_centers", 0), (str_store_party_name, s8, ":cur_center"), (else_try), (eq, ":num_centers", 1), (str_store_party_name, s7, ":cur_center"), (str_store_string, s8, "@{s7} and {s8}"), (else_try), (str_store_party_name, s7, ":cur_center"), (str_store_string, s8, "@{s7}, {s8}"), (try_end), (val_add, ":num_centers", 1), (try_end), (assign, reg5, ":num_centers"), (str_store_string, s11, "@{s9}{reg5? and the lord of {s8}.:.", 0), ]], # [anyone ,"start", [(troop_slot_eq,"$g_talk_troop",slot_troop_occupation, slto_kingdom_hero), # (eq, "$g_talk_troop_met", 0), # (ge, "$g_talk_troop_faction_relation", 0), # (le,"$talk_context",tc_siege_commander), # ], # "Who is this then?", "lord_meet_ally", []], # [anyone|plyr ,"lord_meet_ally", [], "I am {playername} sir. A warrior of {s4}.", "lord_start", []], # [anyone|plyr ,"lord_meet_ally", [], "I am but a soldier of {s4} sir. My name is {playername}.", "lord_start", []], [anyone ,"start", [(troop_slot_eq,"$g_talk_troop",slot_troop_occupation, slto_kingdom_hero), (eq, "$g_talk_troop_met", 0), (lt, "$g_talk_troop_faction_relation", 0), # (str_store_faction_name, s4, "$players_kingdom"), (le,"$talk_context",tc_siege_commander), ], "{s43}", "lord_meet_enemy", [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_enemy_meet_default"), ]], [anyone|plyr ,"lord_meet_enemy", [], "I am {playername}, {s65}.", "lord_intro", []], #A warrior of {s4}. [anyone|plyr ,"lord_meet_enemy", [], "They know me as {playername}. Mark it down, you shall be hearing of me a lot.", "lord_intro", []], # [anyone, "lord_meet_enemy_2", [], "{playername} eh? Never heard of you. What do want?", "lord_talk", []], [anyone ,"start", [(troop_slot_eq,"$g_talk_troop",slot_troop_occupation, slto_kingdom_hero), (le,"$talk_context",tc_siege_commander), ], "Well, {playername}...", "lord_start", []], [anyone,"lord_start", [(gt, "$g_comment_found", 0), #changed to s32 from s62 because overlaps with setup_talk_info strings ], "{s42}", "lord_start", [ # (store_current_hours, ":cur_time"), # (troop_set_slot, "$g_talk_troop", slot_troop_last_comment_time, ":cur_time"), (try_begin), (neq, "$log_comment_relation_change", 0), (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", "$log_comment_relation_change"), (try_end), (assign, "$g_comment_found", 0), ]], [anyone,"lord_start", [(store_partner_quest,":lords_quest"), (eq,":lords_quest","qst_lend_surgeon"), (quest_slot_eq, "qst_lend_surgeon", slot_quest_giver_troop, "$g_talk_troop")], "Your surgeon managed to convince my friend and made the operation. The matter is in God's hands now,, and all we can do is pray for his recovery.\ Anyway, I thank you for lending your surgeon to me {sir/madam}. You have a noble spirit. I will not forget it.", "lord_generic_mission_completed", [ (call_script, "script_finish_quest", "qst_lend_surgeon", 100), (troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1), ]], ##### TODO: QUESTS COMMENT OUT BEGIN ## ## [anyone,"lord_start", [(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), ## (store_partner_quest,":lords_quest"), ## (eq,":lords_quest","qst_bring_prisoners_to_enemy"), ## (quest_slot_eq, "qst_bring_prisoners_to_enemy", slot_quest_current_state, 0), ## (check_quest_succeeded, "qst_bring_prisoners_to_enemy"), ## (quest_get_slot, ":quest_target_amount", "qst_bring_prisoners_to_enemy", slot_quest_target_amount), ## (assign, reg1, ":quest_target_amount")], ## "TODO: You have brought the prisoners and received {reg1} denars. Give me the money now.", "lord_bring_prisoners_complete_2",[]], ## ## [anyone,"lord_start", [(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), ## (store_partner_quest,":lords_quest"), ## (eq,":lords_quest","qst_bring_prisoners_to_enemy"), ## (quest_slot_eq, "qst_bring_prisoners_to_enemy", slot_quest_current_state, 1),#Some of them were brought only ## (check_quest_succeeded, "qst_bring_prisoners_to_enemy"), ## (quest_get_slot, ":quest_target_amount", "qst_bring_prisoners_to_enemy", slot_quest_target_amount), ## (assign, reg1, ":quest_target_amount")], ## "TODO: You have brought the prisoners but some of them died during your expedition. Give me the full money of {reg1} denars.", "lord_bring_prisoners_complete_2",[]], ## ## ## [anyone|plyr,"lord_bring_prisoners_complete_2", [(store_troop_gold, ":cur_gold", "trp_player"), ## (quest_get_slot, ":quest_target_amount", "qst_bring_prisoners_to_enemy", slot_quest_target_amount), ## (ge, ":cur_gold", ":quest_target_amount")], ## "TODO: Here it is.", "lord_generic_mission_thank", [(quest_get_slot, ":quest_target_amount", "qst_bring_prisoners_to_enemy", slot_quest_target_amount), ## (troop_remove_gold, "trp_player", ":quest_target_amount"), ## (call_script, "script_finish_quest", "qst_bring_prisoners_to_enemy", 100)]], ## ## [anyone|plyr,"lord_bring_prisoners_complete_2", [(store_troop_gold, ":cur_gold", "trp_player"), ## (quest_get_slot, ":quest_target_amount", "qst_bring_prisoners_to_enemy", slot_quest_target_amount), ## (lt, ":cur_gold", ":quest_target_amount")], ## "TODO: I'm afraid I spent some of it, I don't have that much money with me.", "lord_bring_prisoners_no_money", [(quest_get_slot, ":quest_target_amount", "qst_bring_prisoners_to_enemy", slot_quest_target_amount), ## (call_script, "script_change_debt_to_troop", "$g_talk_troop", ":quest_target_amount"),#Adding the taken money as a debt ## (call_script, "script_finish_quest", "qst_bring_prisoners_to_enemy", 100)]], ## ## [anyone,"lord_bring_prisoners_no_money", [], ## "TODO: You owe me that money!", "lord_pretalk", []], ## ## [anyone,"lord_start", [(store_partner_quest,":lords_quest"), (eq,":lords_quest","qst_incriminate_loyal_commander"), (check_quest_succeeded, "qst_incriminate_loyal_commander"), (quest_get_slot, ":quest_target_troop", "qst_incriminate_loyal_commander", slot_quest_target_troop), (str_store_troop_name, s3, ":quest_target_troop"), (quest_get_slot, reg5, "qst_incriminate_loyal_commander", slot_quest_gold_reward), ], "Hah! Our little plot against {s3} worked perfectly, {playername}.\ The fool has lost one of his most valuable retainers, and we are one step closer to bringing him to his knees.\ Here, this purse contains {reg5} denars, and I wish you to have it. You deserve every copper.\ And, need I remind you, there could be much more to come if you've a mind to earn it...", "lord_generic_mission_completed",[ (call_script, "script_end_quest", "qst_incriminate_loyal_commander"), (call_script, "script_change_player_relation_with_troop","$g_talk_troop",5), (call_script, "script_change_player_honor", -10), ]], [anyone,"lord_start", [(store_partner_quest,":lords_quest"), (eq,":lords_quest","qst_incriminate_loyal_commander"), (check_quest_failed, "qst_incriminate_loyal_commander")], "You werent't able to complete a simple task. I had set up everything.\ The only thing you needed to do was sacrifice a messenger, and we would be celebrating now.\ But no, you were too damned honorable, weren't you?", "close_window",[ (call_script, "script_end_quest", "qst_incriminate_loyal_commander"), (call_script, "script_change_player_relation_with_troop","$g_talk_troop",-5), (call_script, "script_change_player_honor", 3), ]], #TODO: NO GENERIC MISSION FAILED ANYMORE!!!! [anyone,"lord_start", [(store_partner_quest,":lords_quest"), (eq,":lords_quest","qst_meet_spy_in_enemy_town"), (check_quest_succeeded, "qst_meet_spy_in_enemy_town"), ], "Have you brought me any news about that task I gave you? You know the one I mean...", "quest_meet_spy_in_enemy_town_completed", []], [anyone|plyr, "quest_meet_spy_in_enemy_town_completed", [], "I have the reports you wanted right here.", "quest_meet_spy_in_enemy_town_completed_2",[]], [anyone, "quest_meet_spy_in_enemy_town_completed_2", [], "Ahh, well done. It's good to have competent {men/people} on my side. Here is the payment I promised you.", "lord_pretalk", [ (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 3), (add_xp_as_reward, 500), (quest_get_slot, ":gold", "qst_meet_spy_in_enemy_town", slot_quest_gold_reward), (call_script, "script_troop_add_gold", "trp_player", ":gold"), (call_script, "script_end_quest", "qst_meet_spy_in_enemy_town"), ]], [anyone,"lord_start", [(store_partner_quest,":lords_quest"), (eq,":lords_quest","qst_raid_caravan_to_start_war"), (check_quest_succeeded, "qst_raid_caravan_to_start_war"), (quest_get_slot, ":quest_target_faction", "qst_raid_caravan_to_start_war", slot_quest_target_faction), (str_store_faction_name, s13, ":quest_target_faction"), ], "Brilliant work, {playername}! Your caravan raids really got their attention, I must say.\ I've just received word that {s13} has declared war!\ Now the time has come for us to reap the benefits of our hard work, {playername}.\ And by that I of course mean taking and plundering {s13} land!\ This war is going to make us rich {men/souls}, mark my words!", "lord_pretalk", [ (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 10), (try_for_range, ":vassal", kingdom_heroes_begin, kingdom_heroes_end), (store_troop_faction, ":vassal_fac", ":vassal"), (eq, ":vassal_fac", "$players_kingdom"), (neq, ":vassal", "$g_talk_troop"), (store_random_in_range, ":rel_change", -5, 4), (call_script, "script_change_player_relation_with_troop", ":vassal", ":rel_change"), (try_end), #TODO: Add gold reward notification before the quest is given. 500 gold is not mentioned anywhere. (call_script, "script_troop_add_gold", "trp_player", 500), (add_xp_as_reward, 2000), (call_script, "script_change_player_honor", -5), (call_script, "script_end_quest", "qst_raid_caravan_to_start_war") ]], [anyone,"lord_start", [(store_partner_quest, ":lords_quest"), (eq, ":lords_quest", "qst_raid_caravan_to_start_war"), (check_quest_failed, "qst_raid_caravan_to_start_war"), ], "You incompetent buffoon!\ What in Hell made you think that getting yourself captured while trying to start a war was a good idea?\ These plans took months to prepare, and now everything's been ruined! I will not forget this, {playername}.\ Oh, be assured that I will not.", "lord_pretalk", [ (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -10), (call_script, "script_end_quest", "qst_raid_caravan_to_start_war") ]], [anyone,"lord_start", [(store_partner_quest,":lords_quest"), (eq,":lords_quest","qst_collect_debt"), (quest_slot_eq, "qst_collect_debt", slot_quest_current_state, 1), (quest_get_slot, ":target_troop", "qst_collect_debt", slot_quest_target_troop), (str_store_troop_name, s7, ":target_troop"), (quest_get_slot, ":total_collected","qst_collect_debt",slot_quest_target_amount), (store_div, reg3, ":total_collected", 5), (store_sub, reg4, ":total_collected", reg3)], "I'm told that you've collected the money owed me from {s7}. Good, it's past time I had it back.\ I believe I promised to give you one-fifth of it all, eh?\ Well, that makes {reg3} denars, so if you give me my share -- that's {reg4} denars -- you can keep the rest.", "lord_collect_debt_completed", []], [anyone|plyr,"lord_collect_debt_completed", [(store_troop_gold, ":gold", "trp_player"), (ge, ":gold", reg4)], "Of course, {s65}. {reg4} denars, all here.", "lord_collect_debt_pay",[]], [anyone,"lord_collect_debt_pay", [], "I must admit I'm impressed, {playername}. I had lost hope of ever getting this money back.\ Please accept my sincere thanks.", "lord_pretalk",[ (troop_remove_gold, "trp_player", reg4), (call_script, "script_change_player_relation_with_troop","$g_talk_troop",3), (add_xp_as_reward, 100), (call_script, "script_end_quest", "qst_collect_debt") ]], [anyone|plyr,"lord_collect_debt_completed", [], "I am afraid I don't have the money with me sir.", "lord_collect_debt_no_pay",[]], [anyone,"lord_collect_debt_no_pay", [], "Is this a joke?\ I know full well that {s7} gave you the money, and I want every denar owed to me, {sir/madam}.\ As far as I'm concerned, I hold you personally in my debt until I see that silver.", "close_window",[ (call_script, "script_change_debt_to_troop", "$g_talk_troop", reg4), (call_script, "script_end_quest", "qst_collect_debt"), (call_script, "script_objectionable_action", tmt_honest, "str_squander_money"), ]], [anyone,"lord_start", [(store_partner_quest,":lords_quest"), (eq,":lords_quest","qst_kill_local_merchant"), (check_quest_succeeded, "qst_kill_local_merchant"), (quest_slot_eq, "qst_kill_local_merchant", slot_quest_current_state, 1)], "I heard you got rid of that poxy merchant that was causing me so much grief.\ I can see you're not afraid to get your hands dirty, eh? I like that in a {man/woman}.\ Here's your reward. Remember, {playername}, stick with me and we'll go a long, long way together.", "close_window", [ (call_script, "script_troop_add_gold", "trp_player", 600), (call_script, "script_change_player_relation_with_troop","$g_talk_troop",4), (add_xp_as_reward, 300), (call_script, "script_end_quest", "qst_kill_local_merchant"), (call_script, "script_objectionable_action", tmt_humanitarian, "str_murder_merchant"), (assign, "$g_leave_encounter", 1)]], [anyone,"lord_start", [(store_partner_quest,":lords_quest"), (eq,":lords_quest","qst_kill_local_merchant"), (check_quest_failed, "qst_kill_local_merchant")], "Oh, it's you. Enlighten me, how exactly does one lose a simple fight to some poxy, lowborn merchant?\ Truly, if I ever need my guardsmen to take a lesson in how to lay down and die, I'll be sure to come to you.\ Just leave me be, {playername}, I have things to do.", "close_window", [(call_script, "script_end_quest", "qst_kill_local_merchant"), (assign, "$g_leave_encounter", 1)]], [anyone,"lord_start", [(store_partner_quest,":lords_quest"), (eq,":lords_quest","qst_kill_local_merchant"), (check_quest_succeeded, "qst_kill_local_merchant"), (quest_slot_eq, "qst_kill_local_merchant", slot_quest_current_state, 2)], "You! Do you have sawdust between your ears? Did you think that when I said to kill the merchant,\ I meant you to have a nice chat with him and then let him go?! What possessed you?", "lord_kill_local_merchant_let_go",[]], [anyone|plyr,"lord_kill_local_merchant_let_go", [], "Sir, I made sure he will not act against you.", "lord_kill_local_merchant_let_go_2",[]], [anyone,"lord_kill_local_merchant_let_go_2", [], "Piffle. You were supposed to remove him, not give him a sermon and send him on his way.\ He had better do as you say, or you'll both regret it.\ Here, this is half the money I promised you. Don't say a word, {playername}, you're lucky to get even that.\ I have little use for {men/people} who cannot follow orders.", "lord_pretalk", [(call_script, "script_troop_add_gold", "trp_player", 300), (call_script, "script_change_player_relation_with_troop","$g_talk_troop",2), (add_xp_as_reward, 500), (call_script, "script_end_quest", "qst_kill_local_merchant"), (assign, "$g_leave_encounter", 1) ]], ## [anyone,"lord_start", [(store_partner_quest,":lords_quest"), ## (eq,":lords_quest","qst_hunt_down_raiders"), ## (check_quest_failed, "qst_hunt_down_raiders")], ## "I heard that those raiders you were after have got away. Do you have an explanation?", "quest_hunt_down_raiders_failed",[]], ## [anyone|plyr,"quest_hunt_down_raiders_failed", [], "They were too quick for us my lord. But next time we'll get them", "quest_hunt_down_raiders_failed_2",[]], ## [anyone|plyr,"quest_hunt_down_raiders_failed", [], "They were too strong and well armed my lord. But we'll be ready for them next time.", "quest_hunt_down_raiders_failed_2",[]], ## ## [anyone|plyr,"quest_hunt_down_raiders_failed", [], "Well, it was a long call anyway. Next time do make sure that you are better prepared.", ## "lord_pretalk",[(call_script, "script_end_quest", "qst_hunt_down_raiders")]], ## ## ## ## [anyone,"lord_start", [(store_partner_quest,":lords_quest"), ## (eq,":lords_quest","qst_hunt_down_raiders"), ## (check_quest_succeeded, "qst_hunt_down_raiders")], ## "I heard that you have given those raiders the punishment they deserved. Well done {playername}.\ ## ", "lord_generic_mission_completed",[(call_script, "script_finish_quest", "qst_hunt_down_raiders", 100), ## (call_script, "script_change_player_relation_with_troop","$g_talk_troop",3)]], ## ## [anyone,"lord_start", [(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), ## (store_partner_quest,":lords_quest"), ## (eq,":lords_quest","qst_defend_nobles_against_peasants"), ## (this_or_next|check_quest_succeeded, "qst_defend_nobles_against_peasants"), ## (check_quest_failed, "qst_defend_nobles_against_peasants"), ## (assign, ":num_saved", "$qst_defend_nobles_against_peasants_num_nobles_saved"), ## (party_count_companions_of_type, ":num_nobles", "p_main_party", "trp_noble_refugee"), ## (val_add, ":num_saved", ":num_nobles"), ## (party_count_companions_of_type, ":num_nobles", "p_main_party", "trp_noble_refugee_woman"), ## (val_add, ":num_saved", ":num_nobles"), ## (assign, "$qst_defend_nobles_against_peasants_num_nobles_saved", ":num_saved"), ## (eq, ":num_saved", "$qst_defend_nobles_against_peasants_num_nobles_to_save")], ## "TODO: You have saved all of them. Good boy.", "lord_generic_mission_completed", ## [(party_remove_members, "p_main_party", "trp_noble_refugee", "$qst_defend_nobles_against_peasants_num_nobles_saved"), ## (party_remove_members, "p_main_party", "trp_noble_refugee_woman", "$qst_defend_nobles_against_peasants_num_nobles_saved"), ## (call_script, "script_finish_quest", "qst_defend_nobles_against_peasants", 100)]], ## ## [anyone,"lord_start", [(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), ## (store_partner_quest,":lords_quest"), ## (eq,":lords_quest","qst_defend_nobles_against_peasants"), ## (this_or_next|check_quest_succeeded, "qst_defend_nobles_against_peasants"), ## (check_quest_failed, "qst_defend_nobles_against_peasants"), ## (assign, ":num_saved", "$qst_defend_nobles_against_peasants_num_nobles_saved"), ## (party_count_companions_of_type, ":num_nobles", "p_main_party", "trp_noble_refugee"), ## (val_add, ":num_saved", ":num_nobles"), ## (party_count_companions_of_type, ":num_nobles", "p_main_party", "trp_noble_refugee_woman"), ## (val_add, ":num_saved", ":num_nobles"), ## (assign, "$qst_defend_nobles_against_peasants_num_nobles_saved", ":num_saved"), ## (lt, ":num_saved", "$qst_defend_nobles_against_peasants_num_nobles_to_save"), ## (gt, "$qst_defend_nobles_against_peasants_num_nobles_saved", 0)], ## "TODO: You have saved some of them. Half good boy.", "lord_capture_conspirators_half_completed", ## [(party_remove_members, "p_main_party", "trp_noble_refugee", "$qst_defend_nobles_against_peasants_num_nobles_saved"), ## (party_remove_members, "p_main_party", "trp_noble_refugee_woman", "$qst_defend_nobles_against_peasants_num_nobles_saved"), ## (assign, ":ratio", 100), ## (val_mul, ":ratio", "$qst_defend_nobles_against_peasants_num_nobles_saved"), ## (val_div, ":ratio", "$qst_defend_nobles_against_peasants_num_nobles_to_save"), ## (call_script, "script_finish_quest", "qst_defend_nobles_against_peasants", ":ratio")]], ## ## [anyone,"lord_start", [(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), ## (store_partner_quest,":lords_quest"), ## (eq,":lords_quest","qst_defend_nobles_against_peasants"), ## (this_or_next|check_quest_succeeded, "qst_defend_nobles_against_peasants"), ## (check_quest_failed, "qst_defend_nobles_against_peasants"), ## (assign, ":num_saved", "$qst_defend_nobles_against_peasants_num_nobles_saved"), ## (party_count_companions_of_type, ":num_nobles", "p_main_party", "trp_noble_refugee"), ## (val_add, ":num_saved", ":num_nobles"), ## (party_count_companions_of_type, ":num_nobles", "p_main_party", "trp_noble_refugee_woman"), ## (val_add, ":num_saved", ":num_nobles"), ## (eq, ":num_saved", 0)], ## "TODO: You have saved none of them. Bad boy.", "lord_generic_mission_failed", []], ## ## ## [anyone,"lord_start", [(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), ## (store_partner_quest,":lords_quest"), ## (eq,":lords_quest","qst_capture_conspirators"), ## (this_or_next|check_quest_succeeded, "qst_capture_conspirators"), ## (check_quest_failed, "qst_capture_conspirators"), ## (party_count_prisoners_of_type, ":num_conspirators", "p_main_party", "trp_conspirator"), ## (party_count_prisoners_of_type, ":num_conspirator_leaders", "p_main_party", "trp_conspirator_leader"), ## (store_add, ":sum_captured", ":num_conspirators", ":num_conspirator_leaders"), ## (ge, ":sum_captured", "$qst_capture_conspirators_num_troops_to_capture")], ## "TODO: You have captured all of them. Good boy.", "lord_generic_mission_completed", ## [(party_remove_prisoners, "p_main_party", "trp_conspirator_leader", "$qst_capture_conspirators_num_troops_to_capture"), ## (party_remove_prisoners, "p_main_party", "trp_spy_partner", "$qst_capture_conspirators_num_troops_to_capture"), ## (call_script, "script_finish_quest", "qst_capture_conspirators", 100)]], ## ## [anyone,"lord_start", [(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), ## (store_partner_quest,":lords_quest"), ## (eq,":lords_quest","qst_capture_conspirators"), ## (this_or_next|check_quest_succeeded, "qst_capture_conspirators"), ## (check_quest_failed, "qst_capture_conspirators"), ## (party_count_prisoners_of_type, ":num_conspirators", "p_main_party", "trp_conspirator"), ## (party_count_prisoners_of_type, ":num_conspirator_leaders", "p_main_party", "trp_conspirator_leader"), ## (store_add, ":sum_captured", ":num_conspirators", ":num_conspirator_leaders"), ## (lt, ":sum_captured", "$qst_capture_conspirators_num_troops_to_capture"), ## (gt, ":sum_captured", 0)], ## "TODO: You have captured some of them. Half good boy.", "lord_capture_conspirators_half_completed", ## [(assign, ":sum_removed", 0), ## (party_remove_prisoners, "p_main_party", "trp_conspirator_leader", "$qst_capture_conspirators_num_troops_to_capture"), ## (val_add, ":sum_removed", reg0), ## (party_remove_prisoners, "p_main_party", "trp_conspirator", "$qst_capture_conspirators_num_troops_to_capture"), ## (val_add, ":sum_removed", reg0), ## (val_mul, ":sum_removed", 100), ## (val_div, ":sum_removed", "$qst_capture_conspirators_num_troops_to_capture"), ## (call_script, "script_finish_quest", "qst_capture_conspirators", ":sum_removed")]], ## ## [anyone,"lord_start", [(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), ## (store_partner_quest,":lords_quest"), ## (eq,":lords_quest","qst_capture_conspirators"), ## (this_or_next|check_quest_succeeded, "qst_capture_conspirators"), ## (check_quest_failed, "qst_capture_conspirators"), ## (party_count_prisoners_of_type, ":num_conspirators", "p_main_party", "trp_conspirator"), ## (party_count_prisoners_of_type, ":num_conspirator_leaders", "p_main_party", "trp_conspirator_leader"), ## (store_add, ":sum_captured", ":num_conspirators", ":num_conspirator_leaders"), ## (eq, ":sum_captured", 0)], ## "TODO: You have captured none of them. Bad boy.", "lord_generic_mission_failed", []], ## ## [anyone|plyr,"lord_capture_conspirators_half_completed", [], ## "TODO: That's all I can do.", "lord_pretalk", []], [anyone,"lord_start", [#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (store_partner_quest,":lords_quest"), (eq,":lords_quest","qst_follow_spy"), (eq, "$qst_follow_spy_no_active_parties", 1), (party_count_prisoners_of_type, ":num_spies", "p_main_party", "trp_spy"), (party_count_prisoners_of_type, ":num_spy_partners", "p_main_party", "trp_spy_partner"), (gt, ":num_spies", 0), (gt, ":num_spy_partners", 0)], "Beautiful work, {playername}! You captured both the spy and his handler, just as I'd hoped,\ and the pair are now safely ensconced in my dungeon, waiting to be questioned.\ My torturer shall be busy tonight! Anyway, I'm very pleased with your success, {playername}, and I give you\ this purse as a token of my appreciation.", "lord_follow_spy_completed", [(party_remove_prisoners, "p_main_party", "trp_spy", 1), (party_remove_prisoners, "p_main_party", "trp_spy_partner", 1), (call_script, "script_change_player_relation_with_troop","$g_talk_troop",4), (call_script, "script_troop_add_gold", "trp_player", 2000), (add_xp_as_reward, 4000), (call_script, "script_end_quest", "qst_follow_spy")]], [anyone,"lord_start", [#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (store_partner_quest,":lords_quest"), (eq,":lords_quest","qst_follow_spy"), (eq, "$qst_follow_spy_no_active_parties", 1), (party_count_prisoners_of_type, ":num_spies", "p_main_party", "trp_spy"), (party_count_prisoners_of_type, ":num_spy_partners", "p_main_party", "trp_spy_partner"), (gt, ":num_spies", 0), (eq, ":num_spy_partners", 0),], "Blast and damn you! I wanted TWO prisoners, {playername} -- what you've brought me is one step short of\ useless! I already know everything the spy knows, it was the handler I was after.\ Here, half a job gets you half a reward. Take it and begone.", "lord_follow_spy_half_completed", [(party_remove_prisoners, "p_main_party", "trp_spy", 1), (call_script, "script_change_player_relation_with_troop","$g_talk_troop",-1), (call_script, "script_troop_add_gold", "trp_player", 1000), (add_xp_as_reward, 400), (call_script, "script_end_quest", "qst_follow_spy")]], [anyone,"lord_start", [#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (store_partner_quest,":lords_quest"), (eq,":lords_quest","qst_follow_spy"), (eq, "$qst_follow_spy_no_active_parties", 1), (party_count_prisoners_of_type, ":num_spies", "p_main_party", "trp_spy"), (party_count_prisoners_of_type, ":num_spy_partners", "p_main_party", "trp_spy_partner"), (eq, ":num_spies", 0), (gt, ":num_spy_partners", 0), ], "I asked you for two prisoners, {playername}, not one. Two. Still, I suppose you did capture the spy's handler,\ the more important one of the pair. The spy will not dare return here and will prove quite useless to\ whatever master he served. 'Tis better than nothing.\ However, you'll understand if I pay you half the promised reward for what is but half a success.", "lord_follow_spy_half_completed", [(party_remove_prisoners, "p_main_party", "trp_spy_partner", 1), (call_script, "script_change_player_relation_with_troop","$g_talk_troop",1), (call_script, "script_troop_add_gold", "trp_player", 1000), (add_xp_as_reward, 400), (call_script, "script_end_quest", "qst_follow_spy")]], [anyone,"lord_start", [(store_partner_quest,":lords_quest"), (eq,":lords_quest","qst_follow_spy"), (eq, "$qst_follow_spy_no_active_parties", 1), (party_count_prisoners_of_type, ":num_spies", "p_main_party", "trp_spy"), (party_count_prisoners_of_type, ":num_spy_partners", "p_main_party", "trp_spy_partner"), (eq, ":num_spies", 0), (eq, ":num_spy_partners", 0), ], "Truly, {playername}, you are nothing short of totally incompetent.\ Failing to capture both the spy AND his handler plumbs astonishing new depths of failure.\ Forget any reward I offered you. You've done nothing to earn it.", "lord_follow_spy_failed", [ (call_script, "script_change_player_relation_with_troop","$g_talk_troop",-2), (call_script, "script_end_quest", "qst_follow_spy"), ]], [anyone|plyr,"lord_follow_spy_half_completed", [], "I did my best, {s65}.", "lord_pretalk", []], [anyone|plyr,"lord_follow_spy_completed", [], "Thank you, {s65}.", "lord_pretalk", []], [anyone|plyr,"lord_follow_spy_failed", [], "Hrm. As you like, {s65}.", "lord_pretalk", []], [anyone,"lord_start", [(store_partner_quest,":lords_quest"), (eq,":lords_quest","qst_bring_back_runaway_serfs"), (check_quest_succeeded, "qst_bring_back_runaway_serfs")], "Damn me, but you've done it, {playername}. All the serfs are back and they're busy preparing for the harvest.\ You certainly earned your reward. Here, take it, with my compliments.", "lord_generic_mission_completed", [(call_script, "script_change_player_relation_with_troop","$g_talk_troop",4), (call_script, "script_troop_add_gold", "trp_player", 300), (add_xp_as_reward, 300), (call_script, "script_end_quest", "qst_bring_back_runaway_serfs"), (call_script, "script_objectionable_action", tmt_humanitarian, "str_round_up_serfs"), ]], [anyone,"lord_start", [(store_partner_quest,":lords_quest"), (eq,":lords_quest","qst_bring_back_runaway_serfs"), (check_quest_failed, "qst_bring_back_runaway_serfs"),], "{playername}. I have been waiting patiently for my serfs, yet none have returned. Have you an explanation?\ Were you outwitted by simple fieldhands, or are you merely incompetent?\ Or perhaps you are plotting with my enemies, intending to ruin me...", "lord_bring_back_runaway_serfs_failed", []], [anyone|plyr,"lord_bring_back_runaway_serfs_failed", [], "Forgive me, {s65}, those serfs were slippery as eels.", "lord_bring_back_runaway_serfs_failed_1a", []], [anyone|plyr,"lord_bring_back_runaway_serfs_failed", [], "Perhaps if you had treated them better...", "lord_bring_back_runaway_serfs_failed_1b", []], [anyone,"lord_bring_back_runaway_serfs_failed_1a", [], "Hmph, that is hardly an excuse for failure, {playername}.\ Now if you will excuse me, I need to recruit new men to work these fields before we all starve.", "lord_pretalk", [(call_script, "script_change_player_relation_with_troop","$g_talk_troop",-1), (call_script, "script_end_quest", "qst_bring_back_runaway_serfs")]], [anyone,"lord_bring_back_runaway_serfs_failed_1b", [], "Hah, now you reveal your true colours, traitor! Your words match your actions all too well. I should never have trusted you.", "close_window", [(call_script, "script_change_player_relation_with_troop","$g_talk_troop",-10), (quest_get_slot, ":home_village", "qst_bring_back_runaway_serfs", slot_quest_object_center), (call_script, "script_change_player_relation_with_center",":home_village",6), (call_script, "script_end_quest", "qst_bring_back_runaway_serfs"), (assign, "$g_leave_encounter", 1), ]], [anyone,"lord_start", [(store_partner_quest,":lords_quest"), (eq,":lords_quest","qst_bring_back_runaway_serfs"), (check_quest_concluded, "qst_bring_back_runaway_serfs"), (assign, reg17, "$qst_bring_back_runaway_serfs_num_parties_returned")], "You disappoint me, {playername}. There were 3 groups of serfs that I charged you to return. 3. Not {reg17}.\ I suppose the ones who did come back shall have to work twice as hard to make up for those that got away.\ As for your reward, {playername}, I'll only pay you for the serfs you returned, not the ones you let fly.\ Here. Take it, and let this business be done.", "lord_runaway_serf_half_completed", [(store_mul, ":reward", "$qst_bring_back_runaway_serfs_num_parties_returned", 100), (val_div, ":reward", 2), (call_script, "script_change_player_relation_with_troop","$g_talk_troop","$qst_bring_back_runaway_serfs_num_parties_returned"), (call_script, "script_troop_add_gold", "trp_player", ":reward"), (add_xp_as_reward, ":reward"), (call_script, "script_objectionable_action", tmt_humanitarian, "str_round_up_serfs"), (call_script, "script_end_quest", "qst_bring_back_runaway_serfs"), ]], [anyone|plyr,"lord_runaway_serf_half_completed", [], "Thank you, {s65}. You are indeed generous.", "lord_pretalk", []], [anyone|plyr,"lord_runaway_serf_half_completed", [], "Bah, this proved to be a waste of my time.", "lord_pretalk", []], [anyone,"lord_start", [(store_partner_quest,":lords_quest"), (eq,":lords_quest","qst_deal_with_bandits_at_lords_village"), (check_quest_succeeded, "qst_deal_with_bandits_at_lords_village")], "{playername}, I was told that you have crushed the bandits at my village of {s5}. Please know that I am most grateful to you for that.\ Please, let me pay the expenses of your campaign. Here, I hope these {reg14} denars will be adequate.", "lord_deal_with_bandits_completed", [ (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 3), (store_character_level, ":level", "trp_player"), (store_mul, ":reward", ":level", 20), (val_add, ":reward", 300), (call_script, "script_troop_add_gold", "trp_player", ":reward"), (add_xp_as_reward, 350), (call_script, "script_end_quest", "qst_deal_with_bandits_at_lords_village"), (assign, reg14, ":reward"), (quest_get_slot, ":village", "qst_deal_with_bandits_at_lords_village", slot_quest_target_center), (str_store_party_name, s5, ":village"), ]], [anyone|plyr, "lord_deal_with_bandits_completed", [], "Not a problem, {s65}.", "lord_pretalk",[]], [anyone|plyr, "lord_deal_with_bandits_completed", [], "Glad to be of service.", "lord_pretalk",[]], [anyone|plyr, "lord_deal_with_bandits_completed", [], "It was mere child's play.", "lord_pretalk",[]], [anyone,"lord_start", [(store_partner_quest,":lords_quest"), (eq,":lords_quest","qst_deal_with_bandits_at_lords_village"), (check_quest_concluded, "qst_deal_with_bandits_at_lords_village")], "Damn it, {playername}. I heard that you were unable to drive off the bandits from my village of {s5}, and thanks to you, my village now lies in ruins.\ Everyone said that you were a capable warrior, but appearently, they were wrong.", "lord_pretalk", [ (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -5), (call_script, "script_end_quest", "qst_deal_with_bandits_at_lords_village"), (quest_get_slot, ":village", "qst_deal_with_bandits_at_lords_village", slot_quest_target_center), (str_store_party_name, s5, ":village"), ]], [anyone,"lord_start", [(store_partner_quest,":lords_quest"), (eq, ":lords_quest", "qst_deliver_cattle_to_army"), (check_quest_succeeded, "qst_deliver_cattle_to_army"), (quest_get_slot, reg13, "qst_deliver_cattle_to_army", slot_quest_target_amount), ], "Ah, {playername}. My quartermaster has informed me of your delivery, {reg13} heads of cattle, as I requested. I'm impressed.", "lord_deliver_cattle_to_army_thank", [ (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 2), (quest_get_slot, ":quest_target_amount", "qst_deliver_cattle_to_army", slot_quest_target_amount), #TODO: Change reward (store_mul, ":reward", ":quest_target_amount", 100), (call_script, "script_troop_add_gold", "trp_player", ":reward"), (val_div, ":reward", 5), (add_xp_as_reward, ":reward"), (call_script, "script_end_quest", "qst_deliver_cattle_to_army"), #Reactivating follow army quest (str_store_troop_name_link, s9, "$g_talk_troop"), (setup_quest_text, "qst_follow_army"), (str_store_string, s2, "@Your mission is complete, {s9} wants you to resume following his army until further notice."), (call_script, "script_start_quest", "qst_follow_army", "$g_talk_troop"), (assign, "$g_player_follow_army_warnings", 0), ]], [anyone|plyr, "lord_deliver_cattle_to_army_thank", [], "Not a problem, {s65}.", "lord_pretalk",[]], [anyone|plyr, "lord_deliver_cattle_to_army_thank", [], "Glad to be of service.", "lord_pretalk",[]], [anyone|plyr, "lord_deliver_cattle_to_army_thank", [], "Mere child's play.", "lord_pretalk",[]], [anyone,"lord_start", [(store_partner_quest,":lords_quest"), (eq, ":lords_quest", "qst_scout_waypoints"), (check_quest_succeeded, "qst_scout_waypoints"), (str_store_party_name, s13, "$qst_scout_waypoints_wp_1"), (str_store_party_name, s14, "$qst_scout_waypoints_wp_2"), (str_store_party_name, s15, "$qst_scout_waypoints_wp_3"), ], "You make a good scout, {playername}. My runner just brought me your reports of the mission to {s13}, {s14} and {s15}. Well done.", "lord_scout_waypoints_thank", [ #TODO: Change reward (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 1), # (call_script, "script_troop_add_gold", "trp_player", 100), (add_xp_as_reward, 100), (call_script, "script_end_quest", "qst_scout_waypoints"), #Reactivating follow army quest (str_store_troop_name_link, s9, "$g_talk_troop"), (setup_quest_text, "qst_follow_army"), (str_store_string, s2, "@Your mission is complete, {s9} wants you to resume following his army until further notice."), (call_script, "script_start_quest", "qst_follow_army", "$g_talk_troop"), (assign, "$g_player_follow_army_warnings", 0), ]], [anyone|plyr, "lord_scout_waypoints_thank", [], "A simple task, {s65}.", "lord_pretalk",[]], [anyone|plyr, "lord_scout_waypoints_thank", [], "Nothing I couldn't handle.", "lord_pretalk",[]], [anyone|plyr, "lord_scout_waypoints_thank", [], "My pleasure, sir.", "lord_pretalk",[]], [anyone, "lord_start", [ (check_quest_active, "qst_follow_army"), (faction_slot_eq, "$g_talk_troop_faction", slot_faction_marshall, "$g_talk_troop"), (eq, "$g_random_army_quest", "qst_deliver_cattle_to_army"), (quest_get_slot, ":quest_target_amount", "$g_random_army_quest", slot_quest_target_amount), (assign, reg3, ":quest_target_amount"), ], "The army's supplies are dwindling too quickly, {playername}. I need you to bring me {reg3} heads of cattle so I can keep the troops fed. I care very little about where you get them, just bring them to me as soon as you can.", "lord_mission_told_deliver_cattle_to_army", [ ] ], [anyone|plyr,"lord_mission_told_deliver_cattle_to_army", [], "Very well, I can find you some cattle.", "lord_mission_told_deliver_cattle_to_army_accepted",[]], [anyone|plyr,"lord_mission_told_deliver_cattle_to_army", [], "Sorry, sir, I have other plans.", "lord_mission_told_deliver_cattle_to_army_rejected",[]], [anyone,"lord_mission_told_deliver_cattle_to_army_accepted", [], "Excellent! You know what to do, {playername}, now get to it. I need that cattle sooner rather than later.", "close_window", [ (call_script, "script_end_quest", "qst_follow_army"), (quest_get_slot, ":quest_target_amount", "$g_random_army_quest", slot_quest_target_amount), (str_store_troop_name_link, s13, "$g_talk_troop"), (assign, reg3, ":quest_target_amount"), (setup_quest_text, "$g_random_army_quest"), (str_store_string, s2, "@{s13} asked you to gather {reg3} heads of cattle and deliver them back to him."), (call_script, "script_start_quest", "$g_random_army_quest", "$g_talk_troop"), #TODO: Change this value (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 1), (assign, "$g_leave_encounter",1), ]], [anyone, "lord_mission_told_deliver_cattle_to_army_rejected", [], "That . . . is unfortunate, {playername}. I shall have to find someone else who's up to the task. Please go now, I've work to do.", "close_window", [(troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1), (assign, "$g_leave_encounter",1),]], [anyone,"lord_start",[(check_quest_active,"qst_report_to_army"), (quest_slot_eq, "qst_report_to_army", slot_quest_target_troop, "$g_talk_troop"), ], "Ah, you have arrived at last, {playername}. We've been expecting you. I hope you have brought with you troops of sufficient number and experience.", "lord_report_to_army_asked", []], [anyone|plyr,"lord_report_to_army_asked", [(quest_get_slot, ":quest_target_amount", "qst_report_to_army", slot_quest_target_amount), (call_script, "script_party_count_fit_for_battle", "p_main_party"), (gt, reg0, ":quest_target_amount"), # +1 for player ], "I have a company of good, hardened soldiers with me. We are ready to join you.", "lord_report_to_army_completed", []], [anyone|plyr,"lord_report_to_army_asked", [], "I don't have the sufficient number of troops yet. I will need some more time.", "lord_report_to_army_continue", []], [anyone,"lord_report_to_army_completed", [], "Excellent. I will send the word when I have a task for you. For the moment, just follow us and stay close. We'll be moving soon.", "close_window",[ (call_script, "script_end_quest", "qst_report_to_army"), (quest_set_slot, "qst_report_to_army", slot_quest_giver_troop, "$g_talk_troop"), #TODO: Change this value (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 2), #Activating follow army quest (str_store_troop_name_link, s9, "$g_talk_troop"), (setup_quest_text, "qst_follow_army"), (str_store_string, s2, "@{s9} wants you to follow his army until further notice."), (call_script, "script_start_quest", "qst_follow_army", "$g_talk_troop"), (assign, "$g_player_follow_army_warnings", 0), (assign, "$g_leave_encounter", 1), ]], [anyone,"lord_report_to_army_continue", [], "Then you'd better hurry. We'll be moving out soon against the enemy and I need every able hand we can muster.", "close_window", [(assign, "$g_leave_encounter",1), #Must be closed because of not letting player to terminate this quest on the general conversation ]], [anyone, "lord_start", [ (check_quest_active, "qst_follow_army"), (faction_slot_eq, "$g_talk_troop_faction", slot_faction_marshall, "$g_talk_troop"), (eq, "$g_random_army_quest", "qst_scout_waypoints"), (str_store_party_name, s13, "$qst_scout_waypoints_wp_1"), (str_store_party_name, s14, "$qst_scout_waypoints_wp_2"), (str_store_party_name, s15, "$qst_scout_waypoints_wp_3"), ], "{playername}, I need a volunteer to scout the area. We're sorely lacking on information,\ and I simply must have a better picture of the situation before we can proceed.\ I want you to go to {s13}, {s14} and {s15} and report back whatever you find.", "lord_mission_told_scout_waypoints", [ ]], [anyone|plyr, "lord_mission_told_scout_waypoints", [], "You've found your volunteer, sir.", "lord_mission_told_scout_waypoints_accepted",[]], [anyone|plyr, "lord_mission_told_scout_waypoints", [], "I fear I must decline.", "lord_mission_told_scout_waypoints_rejected",[]], [anyone,"lord_mission_told_scout_waypoints_accepted", [], "Good {man/lass}! Simply pass near {s13}, {s14} and {s15} and check out what's there. Make a note of anything you find and return to me as soon as possible.", "close_window", [ (call_script, "script_end_quest", "qst_follow_army"), (str_store_troop_name_link, s9, "$g_talk_troop"), (str_store_party_name_link, s13, "$qst_scout_waypoints_wp_1"), (str_store_party_name_link, s14, "$qst_scout_waypoints_wp_2"), (str_store_party_name_link, s15, "$qst_scout_waypoints_wp_3"), (setup_quest_text, "$g_random_army_quest"), (str_store_string, s2, "@{s9} asked you to scout {s13}, {s14} and {s15}, then report back."), (call_script, "script_start_quest", "$g_random_army_quest", "$g_talk_troop"), #TODO: Change this value (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 1), (assign, "$g_leave_encounter",1), ]], [anyone,"lord_mission_told_scout_waypoints_rejected", [], "Hm. I'm disappointed, {playername}. Very disappointed. We'll talk later, I need to go and find somebody to scout for us.", "lord_pretalk", [(troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1)]], ## ## [anyone,"lord_start",[(check_quest_active,"qst_rescue_lady_under_siege"), ## (quest_slot_eq, "qst_rescue_lady_under_siege", slot_quest_target_troop, "$g_talk_troop"), ## (quest_slot_eq, "qst_rescue_lady_under_siege", slot_quest_current_state, 1)], ## "I heard that you have rescued my {s7} from the siege of {s5} and brought her to safety.\ ## I am in your debt for this {playername}. Thank you.", "lord_generic_mission_completed", ## [(quest_get_slot, ":quest_object_troop", "qst_rescue_lady_under_siege", slot_quest_object_troop), ## (try_begin), ## (troop_slot_eq, "$g_talk_troop", slot_troop_daughter, ":quest_object_troop"), ## (str_store_string, s7, "str_daughter"), ## (else_try), ## (str_store_string, s7, "str_wife"), ## (try_end), ## (remove_member_from_party, ":quest_object_troop"), ## (try_begin), ## (is_between, "$g_encountered_party", centers_begin, centers_end),#Lord might be in wilderness ## (troop_set_slot, ":quest_object_troop", slot_troop_cur_center, "$g_encountered_party"), ## (try_end), ## (call_script, "script_finish_quest", "qst_rescue_lady_under_siege", 100), ## (call_script, "script_change_player_relation_with_troop","$g_talk_troop", 4), ## ]], ## ##### TODO: QUESTS COMMENT OUT END [anyone,"lord_generic_mission_thank", [], "You have been most helpful, {playername}. My thanks.", "lord_generic_mission_completed",[]], [anyone|plyr,"lord_generic_mission_completed", [], "It was an honour to serve.", "lord_pretalk",[]], ## [anyone|plyr,"lord_generic_mission_failed", [], ## "I'm sorry I failed you sir. It won't happen again.", "lord_pretalk", ## [(store_partner_quest,":lords_quest"), ## (call_script, "script_finish_quest", ":lords_quest"), ## ]], [anyone,"lord_start", [#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (troop_get_slot, ":cur_debt", "$g_talk_troop", slot_troop_player_debt), (gt, ":cur_debt", 0), (assign, reg1, ":cur_debt")], "I think you owe me {reg1} denars, {playername}. Do you intend to pay your debt anytime soon?", "lord_pay_debt_2",[]], [anyone|plyr, "lord_pay_debt_2", [(troop_get_slot, ":cur_debt", "$g_talk_troop", slot_troop_player_debt), (store_troop_gold, ":cur_gold", "trp_player"), (le, ":cur_debt", ":cur_gold")], "That is why I came, {s65}. Here it is, every denar I owe you.", "lord_pay_debt_3_1", [(troop_get_slot, ":cur_debt", "$g_talk_troop", slot_troop_player_debt), (troop_remove_gold, "trp_player", ":cur_debt"), (troop_set_slot, "$g_talk_troop", slot_troop_player_debt, 0)]], [anyone|plyr, "lord_pay_debt_2", [], "Alas, I don't have sufficient funds, {s65}. But I'll pay you soon enough.", "lord_pay_debt_3_2", []], [anyone, "lord_pay_debt_3_1", [], "Ah, excellent. You are a {man/woman} of honour, {playername}. I am satisfied, yopur debt to me has been paid in full.", "lord_pretalk", []], [anyone, "lord_pay_debt_3_2", [], "Well, don't keep me waiting much longer.", "lord_pretalk", []], ## [anyone,"lord_start", [(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), ## (is_between,"$g_talk_troop_faction_relation",0,3), ### (eq,"$players_kingdom",0), ## ], ## "Why don't you join us in our cause? You seem to be an able fighter.\ ## We need {men/people} like you who will take part in our glory and share the spoils of our victory.", "lord_talk",[]], #Claim center begin ## [anyone,"lord_start", [(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), ## (eq,"$g_talk_troop_faction","$players_kingdom"), ## (faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"), ## (call_script, "script_get_number_of_unclaimed_centers_by_player"), ## (gt, reg1, 0), ## (assign, "$center_to_be_claimed", reg1), ## (str_store_party_name, s4, "$center_to_be_claimed"), ## ], ## "I heard that your forces have taken {s4}. I commend you for your victory {playername}.\ ## But we need to decide what to do with this new castle now.", "lord_claim_center_begin", []], ## [anyone,"lord_start", [(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), ## (ge,"$g_talk_troop_faction_relation",0), ## (call_script, "script_get_number_of_unclaimed_centers_by_player"), ## (gt, reg1, 0), ## (assign, "$center_wanted_to_be_bought", reg1), ## (str_store_party_name, s4, "$center_wanted_to_be_bought"), ## (call_script, "script_get_number_of_hero_centers", "$g_talk_troop"), ## (assign, ":no_of_owned_centers", reg0), ## (neg|faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"), ## (lt, ":no_of_owned_centers", 2), ## (troop_get_slot, ":wealth", "$g_talk_troop", slot_troop_wealth), ## (ge, ":wealth", 6000)], ## "I heard that your forces have taken {s4}. I applaud your victory {playername}, but you know as well as I do that\ ## as a person of low rank and status you cannot be permitted to hold that castle for yourself.\ ## It is to your benefit to sell it to a Lord like myself who can hold and protect the castle and the surrounding estates.\ ## Anyway, I am ready to make you an offer of 5000 denars, should you decide to sell that castle.", "lord_buy_center", []], ## ## ## [anyone|plyr,"lord_buy_center", [], ## "I accept your offer sir. The castle is yours for 5000 denars.", "lord_buy_center_accept", []], ## [anyone|plyr,"lord_buy_center", [], ## "I am afraid I can't accept that offer.", "lord_buy_center_deny", []], ## ## [anyone,"lord_buy_center_accept", [], ## "Excellent, {playername}! You have decided wisely.\ ## Why bother yourself with the necessities of keeping a castle while you can leave all those boring details to noble Lords like me?\ ## I am sure money will be much more useful to you than a castle would.", "lord_buy_center_accept_2", []], ## ## [anyone|plyr,"lord_buy_center_accept_2", [], ## "One day sir, one day I'll have my own castle.", "lord_buy_center_accept_3", []], ## [anyone|plyr,"lord_buy_center_accept_2", [], ## "Everyone needs money sir. I can take another castle anytime.", "lord_buy_center_accept_3", []], ## ## [anyone,"lord_buy_center_accept_3", [], ## "Of course, of course, {playername}. Then let us conclude our deal. Here's the 5000 denars I offered you.\ ## I'll have my clerk handle the necessary details.\ ## I guess from now on, {s4} belongs to me. Well, that worked very well for both of us, I guess.", "lord_pretalk", ## [(troop_get_slot, ":wealth", "$g_talk_troop", slot_troop_wealth), ## (val_sub, ":wealth", 6000), ## (troop_set_slot, "$g_talk_troop", slot_troop_wealth, ":wealth"), ## (call_script, "script_troop_add_gold", "trp_player", 5000), ## (party_set_slot, "$center_wanted_to_be_bought", slot_town_lord, "$g_talk_troop"), ## #Changing center faction ## (party_set_faction, "$center_wanted_to_be_bought", "$g_talk_troop_faction"), ## (set_spawn_radius, 1), ## (spawn_around_party, "$center_wanted_to_be_bought", "pt_old_garrison"), ## (assign, ":new_party", reg0), ## (party_set_ai_behavior, ":new_party", ai_bhvr_attack_party), ## (party_set_ai_object, ":new_party", "p_main_party"), ## (party_set_flags, ":new_party", pf_default_behavior, 0), ## (call_script, "script_party_copy", ":new_party", "$center_wanted_to_be_bought"), ## (party_clear, "$center_wanted_to_be_bought"), ## ## (faction_get_slot, ":reinforcement_template_archers", "$g_talk_troop_faction", slot_faction_reinforcements_archers), ## (faction_get_slot, ":reinforcement_template_infantry", "$g_talk_troop_faction", slot_faction_reinforcements_infantry), ## (party_add_template, "$center_wanted_to_be_bought", ":reinforcement_template_archers"), ## (party_add_template, "$center_wanted_to_be_bought", ":reinforcement_template_infantry"), ## ]], ## ## [anyone,"lord_buy_center_deny", [], ## "As you wish {playername}. But don't forget, the great lords of the country won't like a low born {man/woman} like you holding such an estate without their consent.\ ## It is the nature of this world {playername}. Everyone should know their place.", "lord_pretalk", []], [anyone,"lord_start", [(party_slot_eq, "$g_encountered_party",slot_town_lord, "$g_talk_troop"),#we are talking to Town's Lord. (ge,"$g_talk_troop_faction_relation",0), (neq, "$g_ransom_offer_rejected", 1), (lt, "$g_encountered_party_2", 0), #town is not under siege (hero_can_join_as_prisoner, "$g_encountered_party"), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", 10),#start this conversation with a 10% chance (party_get_num_prisoner_stacks,":num_prisoner_stacks","p_main_party"), (assign, "$prisoner_lord_to_buy", -1), (try_for_range,":i_pris_stack",0,":num_prisoner_stacks"), (party_prisoner_stack_get_troop_id, ":t_id", "p_main_party", ":i_pris_stack"), (troop_slot_eq, ":t_id", slot_troop_occupation, slto_kingdom_hero), (store_troop_faction, ":fac", ":t_id"), (store_relation, ":rel", ":fac", "$g_talk_troop_faction"), (lt, ":rel", 0), (assign, "$prisoner_lord_to_buy", ":t_id"), (try_end), (gt, "$prisoner_lord_to_buy", 0), #we have a prisoner lord. (assign, ":continue", 1), (try_begin), (check_quest_active, "qst_capture_enemy_hero"), (store_troop_faction, ":prisoner_faction", "$prisoner_lord_to_buy"), (quest_slot_eq, "qst_capture_enemy_hero", slot_quest_target_faction, ":prisoner_faction"), (assign, ":continue", 0), (try_end), (eq, ":continue", 1), (str_store_troop_name, s3, "$prisoner_lord_to_buy"), (assign, reg5, "$prisoner_lord_to_buy"), (call_script, "script_calculate_ransom_amount_for_troop", "$prisoner_lord_to_buy"), (assign, reg6, reg0), (val_div, reg6, 2), (assign, "$temp", reg6), ], "I heard that you have captured our enemy {s3} and he is with you at the moment.\ I can pay you {reg6} denars for him if you want to get rid of him.\ You can wait for his family to pay his ransom of course, but there is no telling how long that will take, eh?\ ", "lord_buy_prisoner", []], [anyone|plyr,"lord_buy_prisoner", [], "I accept your offer. I'll leave {s3} to you for {reg6} denars.", "lord_buy_prisoner_accept", []], [anyone|plyr,"lord_buy_prisoner", [], "I fear I can't accept your offer.", "lord_buy_prisoner_deny", [(assign, "$g_ransom_offer_rejected", 1),]], [anyone,"lord_buy_prisoner_accept", [], "Excellent! Here's your {reg6} denars.\ I'll send some men to take him to our prison with due haste.", "lord_pretalk", [ (remove_troops_from_prisoners, "$prisoner_lord_to_buy", 1), (call_script, "script_troop_add_gold", "trp_player", "$temp"), (party_add_prisoners, "$g_encountered_party", "$prisoner_lord_to_buy", 1), #(troop_set_slot, "$prisoner_lord_to_buy", slot_troop_is_prisoner, 1), (troop_set_slot, "$prisoner_lord_to_buy", slot_troop_prisoner_of_party, "$g_encountered_party"), ]], [anyone,"lord_buy_prisoner_deny", [], "Mmm. As you wish, {playername}, but you'll not get a better offer. Take it from me.", "lord_pretalk", []], [anyone,"lord_start", [], "What is it?", "lord_talk",[]], # [anyone,"lord_start_2", [], # "Yes?", "lord_talk",[]], [anyone,"lord_pretalk", [], "Anything else?", "lord_talk",[]], [anyone,"hero_pretalk", [], "Anything else?", "lord_talk",[]], ##### TODO: QUESTS COMMENT OUT BEGIN [anyone|plyr,"lord_talk",[#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (check_quest_active,"qst_lend_companion"), (quest_slot_eq, "qst_lend_companion", slot_quest_giver_troop, "$g_talk_troop"), (store_current_day, ":cur_day"), (quest_get_slot, ":quest_target_amount", "qst_lend_companion", slot_quest_target_amount), (ge, ":cur_day", ":quest_target_amount"), (quest_get_slot, ":quest_target_troop", "qst_lend_companion", slot_quest_target_troop), (str_store_troop_name,s14,":quest_target_troop"), (troop_get_type, reg3, ":quest_target_troop"), ], "I should like {s14} returned to me, {s65}, if you no longer require {reg3?her:his} services.", "lord_lend_companion_end", []], [anyone,"lord_lend_companion_end",[(neg|hero_can_join, "p_main_party")], "You've too many men in your company already, {playername}. You could not lead any more at the moment.", "lord_pretalk", []], [anyone,"lord_lend_companion_end",[], "Certainly, {playername}. {reg3?She:He} is a bright {reg3?girl:fellow}, you're a lucky {man/woman} to have such worthy companions.", "lord_pretalk", [(quest_get_slot, ":quest_target_troop", "qst_lend_companion", slot_quest_target_troop), (party_add_members, "p_main_party", ":quest_target_troop", 1), (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 3), (add_xp_as_reward, 100), (call_script, "script_end_quest", "qst_lend_companion"), (str_store_troop_name,s14,":quest_target_troop"), (troop_get_type, reg3, ":quest_target_troop"), ]], [anyone|plyr,"lord_talk",[(check_quest_active,"qst_collect_debt"), (quest_slot_eq, "qst_collect_debt", slot_quest_current_state, 0), (quest_get_slot, ":quest_target_troop", "qst_collect_debt", slot_quest_target_troop), (eq,"$g_talk_troop",":quest_target_troop"), (quest_get_slot, ":quest_giver_troop", "qst_collect_debt", slot_quest_giver_troop), (str_store_troop_name,1,":quest_giver_troop")], "I've come to collect the debt you owe to {s1}.", "lord_ask_to_collect_debt", [(assign, "$g_convince_quest", "qst_collect_debt")]], [anyone,"lord_ask_to_collect_debt", [], "Oh. Well, {s1} did lend me some silver a ways back,\ but I've done him many favours in the past and I consider that money as my due payment.", "lord_ask_to_collect_debt_2",[]], [anyone|plyr,"lord_ask_to_collect_debt_2", [], "{s1} considers it a debt. He asked me to speak to you on his behalf.", "convince_begin",[]], [anyone|plyr,"lord_ask_to_collect_debt_2", [], "Then I will not press the matter any further.", "lord_pretalk",[]], [anyone,"convince_accept",[(check_quest_active, "qst_collect_debt"), (quest_slot_eq, "qst_collect_debt", slot_quest_target_troop, "$g_talk_troop"), (quest_get_slot, ":quest_giver_troop", "qst_collect_debt", slot_quest_giver_troop), (str_store_troop_name,s8,":quest_giver_troop"), (quest_get_slot, reg10, "qst_collect_debt", slot_quest_target_amount)], "My debt to {s8} has long been overdue and was a source of great discomfort to me.\ Thank you for accepting to take the money to him.\ Please give him these {reg10} denars and thank him on my behalf.", "close_window", [(call_script, "script_troop_add_gold", "trp_player", reg10), (quest_set_slot, "qst_collect_debt", slot_quest_current_state, 1), (call_script, "script_succeed_quest", "qst_collect_debt"), (assign, "$g_leave_encounter", 1), ]], [anyone|plyr,"lord_talk",[(check_quest_active,"qst_persuade_lords_to_make_peace"), (quest_get_slot, ":quest_target_troop", "qst_persuade_lords_to_make_peace", slot_quest_target_troop), (quest_get_slot, ":quest_object_troop", "qst_persuade_lords_to_make_peace", slot_quest_object_troop), (this_or_next|eq, ":quest_target_troop", "$g_talk_troop"), (eq, ":quest_object_troop", "$g_talk_troop"), (quest_get_slot, ":quest_target_faction", "qst_persuade_lords_to_make_peace", slot_quest_target_faction), (quest_get_slot, ":quest_object_faction", "qst_persuade_lords_to_make_peace", slot_quest_object_faction), (str_store_faction_name, s12, ":quest_target_faction"), (str_store_faction_name, s13, ":quest_object_faction"), ], "Please, {s64}, it's time to end this war between {s12} and {s13}.", "lord_ask_to_make_peace", [(assign, "$g_convince_quest", "qst_persuade_lords_to_make_peace")]], [anyone,"lord_ask_to_make_peace", [], "Eh? I'm not sure I heard you right, {playername}.\ War is not easily forgotten by either side of the conflict, and I have a very long memory.\ Why should I take any interest in brokering peace with those dogs?", "lord_ask_to_make_peace_2",[]], [anyone|plyr,"lord_ask_to_make_peace_2", [], "Perhaps I can talk you into it...", "convince_begin",[]], [anyone|plyr,"lord_ask_to_make_peace_2", [], "Never mind, peace can wait for now.", "lord_pretalk",[]], [anyone,"convince_accept",[(check_quest_active, "qst_persuade_lords_to_make_peace"), (this_or_next|quest_slot_eq, "qst_persuade_lords_to_make_peace", slot_quest_target_troop, "$g_talk_troop"), (quest_slot_eq, "qst_persuade_lords_to_make_peace", slot_quest_object_troop, "$g_talk_troop"), (quest_get_slot, ":quest_object_faction", "qst_persuade_lords_to_make_peace", slot_quest_object_faction), (quest_get_slot, ":quest_target_faction", "qst_persuade_lords_to_make_peace", slot_quest_target_faction), (str_store_faction_name, s12, ":quest_object_faction"), (str_store_faction_name, s13, ":quest_target_faction"), (try_begin), # store name of other faction (eq,":quest_object_faction","$g_talk_troop_faction"), (str_store_faction_name, s14, ":quest_target_faction"), (else_try), (str_store_faction_name, s14, ":quest_object_faction"), (try_end), ], "You... have convinced me, {playername}. Very well then, you've my blessing to bring a peace offer to {s14}. I cannot guarantee they will accept it, but on the off-chance they do, I will stand by it.", "close_window", [(store_mul, ":new_value", "$g_talk_troop", -1), (try_begin), (quest_slot_eq, "qst_persuade_lords_to_make_peace", slot_quest_target_troop, "$g_talk_troop"), (quest_set_slot, "qst_persuade_lords_to_make_peace", slot_quest_target_troop, ":new_value"), (else_try), (quest_set_slot, "qst_persuade_lords_to_make_peace", slot_quest_object_troop, ":new_value"), (try_end), (quest_set_slot, "qst_persuade_lords_to_make_peace", slot_quest_convince_value, 1500),#reseting convince value for the second persuasion (assign, "$g_leave_encounter", 1), (neg|quest_slot_ge, "qst_persuade_lords_to_make_peace", slot_quest_target_troop, 0), (neg|quest_slot_ge, "qst_persuade_lords_to_make_peace", slot_quest_object_troop, 0), (call_script, "script_succeed_quest", "qst_persuade_lords_to_make_peace"), ]], ## ## ## [anyone|plyr,"lord_talk",[(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), ## (check_quest_active,"qst_bring_reinforcements_to_siege"), ## (quest_get_slot, ":quest_target_troop", "qst_bring_reinforcements_to_siege", slot_quest_target_troop), ## (eq,"$g_talk_troop",":quest_target_troop"), ## (quest_get_slot, ":quest_giver_troop", "qst_bring_reinforcements_to_siege", slot_quest_giver_troop), ## (quest_get_slot, ":quest_target_amount", "qst_bring_reinforcements_to_siege", slot_quest_target_amount), ## (quest_get_slot, ":quest_object_troop", "qst_bring_reinforcements_to_siege", slot_quest_object_troop), ## (party_count_companions_of_type, ":num_companions", "p_main_party", ":quest_object_troop"), ## (ge, ":num_companions", ":quest_target_amount"), ## (str_store_troop_name,1,":quest_giver_troop"), ## (assign, reg1, ":quest_target_amount"), ## (str_store_troop_name,2,":quest_object_troop")], ## "Sir, {s1} ordered me to bring {reg1} {s2} to reinforce your siege.", "lord_reinforcement_brought", ## [(quest_get_slot, ":quest_target_amount", "qst_bring_reinforcements_to_siege", slot_quest_target_amount), ## (quest_get_slot, ":quest_target_party", "qst_bring_reinforcements_to_siege", slot_quest_target_party), ## (quest_get_slot, ":quest_object_troop", "qst_bring_reinforcements_to_siege", slot_quest_object_troop), ## (party_remove_members, "p_main_party", ":quest_object_troop", ":quest_target_amount"), ## (party_add_members, ":quest_target_party", ":quest_object_troop", ":quest_target_amount"), ## (call_script, "script_finish_quest", "qst_bring_reinforcements_to_siege", 100), ## ]], ## ## [anyone|plyr,"lord_talk",[(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), ## (check_quest_active,"qst_bring_reinforcements_to_siege"), ## (quest_get_slot, ":quest_target_troop", "qst_bring_reinforcements_to_siege", slot_quest_target_troop), ## (eq,"$g_talk_troop",":quest_target_troop"), ## (quest_get_slot, ":quest_giver_troop", "qst_bring_reinforcements_to_siege", slot_quest_giver_troop), ## (quest_get_slot, ":quest_target_amount", "qst_bring_reinforcements_to_siege", slot_quest_target_amount), ## (quest_get_slot, ":quest_object_troop", "qst_bring_reinforcements_to_siege", slot_quest_object_troop), ## (party_count_companions_of_type, ":num_companions", "p_main_party", ":quest_object_troop"), ## (lt, ":num_companions", ":quest_target_amount"), ## (gt, ":num_companions", 0), ## (str_store_troop_name,1,":quest_giver_troop"), ## (assign, reg1, ":quest_target_amount"), ## (str_store_troop_name,2,":quest_object_troop")], ## "Sir, {s1} ordered me to bring {reg1} {s2} as a reinforcement to your siege, but unfortunately I lost some of them during my expedition.", "lord_reinforcement_brought_some", ## [(quest_get_slot, ":quest_target_amount", "qst_bring_reinforcements_to_siege", slot_quest_target_amount), ## (quest_get_slot, ":quest_target_party", "qst_bring_reinforcements_to_siege", slot_quest_target_party), ## (quest_get_slot, ":quest_object_troop", "qst_bring_reinforcements_to_siege", slot_quest_object_troop), ## (party_count_companions_of_type, ":num_companions", "p_main_party", ":quest_object_troop"), ## (party_remove_members, "p_main_party", ":quest_object_troop", ":num_companions"), ## (party_add_members, ":quest_target_party", ":quest_object_troop", ":num_companions"), ## (assign, ":percentage_completed", 100), ## (val_mul, ":percentage_completed", ":num_companions"), ## (val_div, ":percentage_completed", ":quest_target_amount"), ## (call_script, "script_finish_quest", "qst_bring_reinforcements_to_siege", ":percentage_completed"), ## ]], ## ## [anyone,"lord_reinforcement_brought", [], "Well done {playername}. These men will no doubt be very useful. I will speak to {s1} of your help.", "lord_pretalk",[]], ## [anyone,"lord_reinforcement_brought_some", [], "That's not quite good enough {playername}. But I suppose it is better than no reinforcements at all. Whatever, I'll tell {s1} you tried your best.", "lord_pretalk",[]], ## [anyone|plyr,"lord_talk",[#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (check_quest_active,"qst_duel_for_lady"), (neg|check_quest_concluded,"qst_duel_for_lady"), (quest_slot_eq, "qst_duel_for_lady", slot_quest_target_troop, "$g_talk_troop"), (quest_get_slot, ":quest_giver_troop", "qst_duel_for_lady", slot_quest_giver_troop), (str_store_troop_name,1,":quest_giver_troop")], "I want you to take back your accusations against {s1}.", "lord_challenge_duel_for_lady", []], [anyone,"lord_challenge_duel_for_lady", [], "What accusations?\ Everyone knows that she beds her stable boys and anyone else she can lay hands on while her husband is away.\ I merely repeat the words of many.", "lord_challenge_duel_for_lady_2",[]], [anyone|plyr,"lord_challenge_duel_for_lady_2", [], "You will recant these lies, sirrah, or prove them against my sword!", "lord_challenge_duel_for_lady_3",[]], [anyone|plyr,"lord_challenge_duel_for_lady_2", [], "If you say so...", "lord_pretalk",[]], [anyone,"lord_challenge_duel_for_lady_3", [], "You are challenging me to a duel? How droll!\ As you wish, {playername}, it will be good sport to bash your head in.", "close_window", [(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -20), (assign, "$g_leave_encounter", 1), (try_begin), (is_between, "$g_encountered_party", towns_begin, towns_end), (party_get_slot, ":arena_scene", "$g_encountered_party", slot_town_arena), (else_try), (assign, ":closest_dist", 100000), (assign, ":closest_town", -1), (try_for_range, ":cur_town", towns_begin, towns_end), (store_distance_to_party_from_party, ":dist", ":cur_town", "p_main_party"), (lt, ":dist", ":closest_dist"), (assign, ":closest_dist", ":dist"), (assign, ":closest_town", ":cur_town"), (try_end), (party_get_slot, ":arena_scene", ":closest_town", slot_town_arena), (try_end), (modify_visitors_at_site, ":arena_scene"), (reset_visitors), (set_visitor, 0, "trp_player"), (set_visitor, 1, "$g_talk_troop"), (set_jump_mission, "mt_arena_challenge_fight"), (jump_to_scene, ":arena_scene"), (try_begin), (neq, "$talk_context", tc_court_talk), (jump_to_menu, "mnu_arena_duel_fight"), (try_end), ]], [anyone|plyr,"lord_talk",[(check_quest_active,"qst_deliver_message"), (quest_get_slot, ":quest_target_troop", "qst_deliver_message", slot_quest_target_troop), (eq,"$g_talk_troop",":quest_target_troop"), (quest_get_slot, ":quest_giver_troop", "qst_deliver_message", slot_quest_giver_troop), (str_store_troop_name,s9,":quest_giver_troop")], "I bring a message from {s9}.", "lord_message_delivered", []], [anyone,"lord_message_delivered", [], "Oh? Let me see that...\ Well well well! It was good of you to bring me this, {playername}. Take my seal as proof that I've received it,\ and give my regards to {s9} when you see him again.", "lord_pretalk",[ (call_script, "script_end_quest", "qst_deliver_message"), (quest_get_slot, ":quest_giver", "qst_deliver_message", slot_quest_giver_troop), (str_store_troop_name,s9,":quest_giver"), (call_script, "script_change_player_relation_with_troop", ":quest_giver", 1), (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 1), ]], [anyone|plyr,"lord_talk",[(check_quest_active,"qst_deliver_message_to_enemy_lord"), (quest_get_slot, ":quest_target_troop", "qst_deliver_message_to_enemy_lord", slot_quest_target_troop), (eq,"$g_talk_troop",":quest_target_troop"), (quest_get_slot, ":quest_giver_troop", "qst_deliver_message_to_enemy_lord", slot_quest_giver_troop), (str_store_troop_name,s9,":quest_giver_troop")], "I bring a message from {s9}.", "lord_message_delivered_enemy", []], [anyone,"lord_message_delivered_enemy", [], "Oh? Let me see that...\ Hmmm. It was good of you to bring me this, {playername}. Take my seal as proof that I've received it,\ with my thanks.", "close_window",[ (call_script, "script_end_quest", "qst_deliver_message_to_enemy_lord"), (quest_get_slot, ":quest_giver", "qst_deliver_message_to_enemy_lord", slot_quest_giver_troop), (call_script, "script_change_player_relation_with_troop", ":quest_giver", 3), (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 1), (assign, "$g_leave_encounter", 1), ]], [anyone|plyr,"lord_talk", [(check_quest_active,"qst_deliver_message_to_prisoner_lord"), (quest_slot_eq, "qst_deliver_message_to_prisoner_lord", slot_quest_target_troop, "$g_talk_troop"), (quest_get_slot, ":quest_giver_troop", "qst_deliver_message_to_prisoner_lord", slot_quest_giver_troop), (str_store_troop_name, s11, ":quest_giver_troop")], "I bring a message from {s11}.", "lord_deliver_message_prisoner", [ #TODO: Add reward (call_script, "script_end_quest", "qst_deliver_message_to_prisoner_lord"), ]], [anyone,"lord_deliver_message_prisoner", [], "Can it be true?\ Oh, thank you kindly, {playername}! You have brought hope and some small ray of light to these bleak walls.\ Perhaps one day I will be able to repay you.", "lord_deliver_message_prisoner_2",[]], [anyone|plyr,"lord_deliver_message_prisoner_2", [], " 'Twas the least I could do, {s65}.", "lord_deliver_message_prisoner_2a",[]], [anyone,"lord_deliver_message_prisoner_2a", [], "You've no idea how grateful I am, {playername}. A thousand thanks and more.", "close_window",[]], [anyone|plyr,"lord_deliver_message_prisoner_2", [], "Worry not, {s65}. You'll have ample opportunity once you are free again.", "lord_deliver_message_prisoner_2b",[]], [anyone,"lord_deliver_message_prisoner_2b", [], "Hah, of course, {playername}. My eternal thanks go with you.", "close_window",[]], [anyone|plyr,"lord_talk", [#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 1), (troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (check_quest_active,"qst_rescue_lord_by_replace"), (quest_slot_eq, "qst_rescue_lord_by_replace", slot_quest_target_troop, "$g_talk_troop"), (neg|check_quest_succeeded, "qst_rescue_lord_by_replace")], "Fear not, I am here to rescue you.", "lord_rescue_by_replace_offer",[]], [anyone,"lord_rescue_by_replace_offer", [], "By God, are you serious? What is your plan?", "lord_rescue_by_replace_offer_2",[]], [anyone|plyr,"lord_rescue_by_replace_offer_2", [], "A simple ruse, {s65}. If we exchange garments, I shall take your place here in prison,\ while you make your escape disguised as myself.\ I paid the guards a handsome bribe, with which I am sure they have already purchased half the wine stocks of the nearest tavern.\ With some luck they'll soon get so drunk they'd have trouble\ recognising their own mothers, let alone telling one of us from the other.\ At least not until you are safely away.", "lord_rescue_by_replace_offer_3",[]], [anyone,"lord_rescue_by_replace_offer_3", [], "Hmm, it might just work... But what of you, my {friend/lady}? The guards won't take kindly to this trickery.\ You may end up spending some time in this cell yourself.", "lord_rescue_by_replace_offer_4",[]], [anyone|plyr,"lord_rescue_by_replace_offer_4", [], "Not to worry, {s65}. The place is already starting to grow on me.", "lord_rescue_by_replace_offer_5a",[]], [anyone|plyr,"lord_rescue_by_replace_offer_4", [], "I shall be fine as long there is an ample reward waiting at the end.", "lord_rescue_by_replace_offer_5b",[]], [anyone,"lord_rescue_by_replace_offer_5a",[], "You are a brave soul indeed. I won't forget this.", "lord_rescue_by_replace_offer_6",[]], [anyone,"lord_rescue_by_replace_offer_5b",[], "Of course, my {friend/lady}, of course! Come to me when you have regained your freedom,\ and perhaps I shall be able to repay the debt I owe you.", "lord_rescue_by_replace_offer_6",[]], [anyone|plyr,"lord_rescue_by_replace_offer_6",[], "Quickly, {s65}, let us change garments. It is past time you were away from here.", "close_window", [(call_script, "script_succeed_quest", "qst_rescue_lord_by_replace"), (quest_get_slot, ":quest_target_troop", "qst_rescue_lord_by_replace", slot_quest_target_troop), (quest_get_slot, ":quest_target_center", "qst_rescue_lord_by_replace", slot_quest_target_center), (party_remove_prisoners, ":quest_target_center", ":quest_target_troop", 1), #(troop_set_slot, ":quest_target_troop", slot_troop_is_prisoner, 0), (troop_set_slot, ":quest_target_troop", slot_troop_prisoner_of_party, -1), (assign, "$auto_menu", -1), (assign, "$capturer_party", "$g_encountered_party"), (jump_to_menu, "mnu_captivity_rescue_lord_taken_prisoner"), (finish_mission), ]], ## ## [anyone|plyr,"lord_talk", [(check_quest_active, "qst_deliver_message_to_lover"), ## (troop_get_slot, ":cur_daughter", "$g_talk_troop", slot_troop_daughter), ## (quest_slot_eq, "qst_deliver_message_to_lover", slot_quest_target_troop, ":cur_daughter"), ## (quest_get_slot, ":troop_no", "qst_deliver_message_to_lover", slot_quest_giver_troop), ## (str_store_troop_name, 3, ":troop_no"), ## (str_store_troop_name, 4, ":cur_daughter")], ## "My lord, {s3} asked me to give this letter to your daughter, but I think you should read it first.", "lord_deliver_message_to_lover_tell_father",[]], ## ## [anyone,"lord_deliver_message_to_lover_tell_father", [], ## "That swine called {s3} is trying to approach my daughter eh? You have made the right decision by bringing this letter to me. I'll have a long talk with {s4} about it.", "lord_pretalk", ## [(add_xp_as_reward, 200), ## (call_script, "script_troop_add_gold", "trp_player", 1000), ## (quest_get_slot, ":quest_giver", "qst_deliver_message_to_lover", slot_quest_giver_troop), ## (quest_get_slot, ":target_troop", "qst_deliver_message_to_lover", slot_quest_target_troop), ## (call_script, "script_change_player_relation_with_troop", ":quest_giver", -20), ## (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 10), ## (call_script, "script_change_player_relation_with_troop", ":target_troop", -10), ## (call_script, "script_end_quest", "qst_deliver_message_to_lover"), ## #Adding betrayal to the quest giver ## (troop_set_slot, ":quest_giver", slot_troop_last_quest, "qst_deliver_message_to_lover"), ## (troop_set_slot, ":quest_giver", slot_troop_last_quest_betrayed, 1)]], ## ## ##### TODO: QUESTS COMMENT OUT END ## [anyone|plyr,"lord_talk", [(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), ## (ge,"$g_talk_troop_faction_relation",0), ## (party_slot_eq, "$g_encountered_party", slot_party_type, spt_castle), ## (party_slot_eq, "$g_encountered_party", slot_town_lord, "$g_talk_troop"), ## (eq, "$g_permitted_to_center",0), ## (party_get_num_companions, reg7, "p_main_party"), ## (val_sub, reg7, 1), ## ], ## "{reg7?Me and my men:I} need shelter for the night my lord. Can we rest in your castle for a while?", "lord_castle_let_in",[]], ## ## [anyone, "lord_castle_let_in", [(lt,"$g_talk_troop_relation",-10)], ## "What? Do I look like I am running an inn here? I have no place here for {reg7?you and your lot:you}. Now get off my lands...", "close_window",[(assign, "$g_permitted_to_center",1)]], ## [anyone, "lord_castle_let_in", [(lt,"$g_talk_troop_relation",2), (lt, "$g_talk_troop_faction_relation", 10),(assign, reg6, 100)], ## "I'll give you shelter if you pay a toll of {reg6} denars.", "lord_castle_let_in_toll",[]], ## [anyone|plyr,"lord_castle_let_in_toll", [(store_troop_gold, ":gold", "trp_player"),(gt,":gold",reg6)], "Of course sir. I'll pay the toll.", "lord_castle_let_in_toll_pay", ## [(troop_remove_gold, "trp_player",reg6)]], ## [anyone, "lord_castle_let_in_toll_pay", [(str_store_party_name, s1, "$g_encountered_party")], ## "Then you are welcome to {s1}.", "close_window",[(assign, "$g_permitted_to_center",1),(jump_to_menu, "mnu_town")]], ## [anyone|plyr,"lord_castle_let_in_toll", [], "I can't pay that sum sir.", "lord_castle_let_in_toll_nopay",[]], ## [anyone,"lord_castle_let_in_toll_nopay", [], "Then you are out of luck, I guess.", "lord_pretalk",[]], ## ## [anyone, "lord_castle_let_in", [(str_store_party_name, s1, "$g_encountered_party")], ## "Of course {playername}. You are welcome here. You may rest at {s1} as long as you wish.", "close_window",[(assign, "$g_permitted_to_center",1)]], [anyone|plyr,"lord_talk", [#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (eq, "$players_oath_renounced_against_kingdom", "$g_talk_troop_faction"), (str_store_faction_name, s4, "$g_talk_troop_faction"),], "{s66}, I wish to restore my old oath to {s4}.", "lord_ask_pardon_after_oath_renounced",[]], [anyone,"lord_ask_pardon_after_oath_renounced", [ (faction_get_slot, ":faction_leader", "$g_talk_troop_faction", slot_faction_leader), (neq, ":faction_leader", "$g_talk_troop"), (str_store_troop_name, s4, ":faction_leader"), ], "That is too great a matter for me to decide, {playername}. You should seek out {s4}. Such clemency is his alone to grant or deny.", "lord_pretalk",[]], [anyone,"lord_ask_pardon_after_oath_renounced", [ (assign, ":num_centers_captured_by_player"), (try_for_range, ":cur_center", walled_centers_begin, walled_centers_end), (store_faction_of_party, ":cur_center_faction", ":cur_center"), (eq, ":cur_center_faction", "fac_player_supporters_faction"), (party_slot_eq, ":cur_center", slot_center_faction_when_oath_renounced, "$g_talk_troop_faction"), (val_add, ":num_centers_captured_by_player", 1), (try_end), (store_mul, ":peace_score", ":num_centers_captured_by_player", 500), (store_current_hours, ":cur_hours"), (val_sub, ":cur_hours", "$players_oath_renounced_begin_time"), (val_add, ":peace_score", ":cur_hours"), (try_begin), (gt, ":peace_score", 800), #Do not agree to give any centers but agree to make peace (assign, ":given_center", -1), (try_begin), (gt, ":peace_score", 1500), (try_begin), #Agree to give one center (eq, "$players_oath_renounced_given_center", 0), (store_random_in_range, ":given_center", 0, ":num_centers_captured_by_player"), (try_end), (else_try), (assign, "$players_oath_renounced_given_center", 0), (try_end), (assign, ":num_centers_written", 0), (try_for_range, ":cur_center", walled_centers_begin, walled_centers_end), (store_faction_of_party, ":cur_center_faction", ":cur_center"), (eq, ":cur_center_faction", "fac_player_supporters_faction"), (party_slot_eq, ":cur_center", slot_center_faction_when_oath_renounced, "$g_talk_troop_faction"), (try_begin), (eq, ":given_center", 0), (assign, "$players_oath_renounced_given_center", ":cur_center"), (else_try), (neq, "$players_oath_renounced_given_center", ":cur_center"), (try_begin), (eq, ":num_centers_written", 0), (str_store_party_name, s17, ":cur_center"), (else_try), (eq, ":num_centers_written", 1), (str_store_party_name, s16, ":cur_center"), (str_store_string, s17, "@{s16} and {s17}"), (else_try), (str_store_party_name, s16, ":cur_center"), (str_store_string, s17, "@{s16}, {s17}"), (try_end), (val_add, ":num_centers_written", 1), (try_end), (val_sub, ":given_center", 1), (try_end), (try_begin), (eq, ":num_centers_written", 0),#white peace (str_store_string, s11, "@Very well, I will accept you back into my ranks, if you're ready to swear your solemn oath once more."), (assign, "$players_oath_renounced_terms_state", 1), (else_try), (str_store_string, s11, "@A pardon will only be possible if you are willing to cede {s17} to me. Do you agree my terms?"), (assign, "$players_oath_renounced_terms_state", 2), (try_end), (else_try), #Do not agree to make peace (str_store_string, s11, "@No. There is no chance of peace between us, I am not interested."), (assign, "$players_oath_renounced_terms_state", 0), (try_end), ], "{s11}.", "lord_ask_pardon_terms",[]], [anyone|plyr,"lord_ask_pardon_terms", [(eq, "$players_oath_renounced_terms_state", 0), ], "As you like, {s65}. I will accept your judgment.", "lord_pretalk",[]], [anyone|plyr,"lord_ask_pardon_terms", [(eq, "$players_oath_renounced_terms_state", 0), ], "A shame, {s65}. A shame.", "lord_pretalk",[]], [anyone|plyr,"lord_ask_pardon_terms", [(eq, "$players_oath_renounced_terms_state", 0), ], "Very well, go and die without me.", "lord_pretalk",[]], [anyone|plyr,"lord_ask_pardon_terms", [(eq, "$players_oath_renounced_terms_state", 1), ], "Aye, I am ready.", "lord_ask_pardon_after_renounce_peace",[]], [anyone|plyr,"lord_ask_pardon_terms", [(eq, "$players_oath_renounced_terms_state", 1), ], "On second thought, no. I don't wish to be in your service again.", "lord_ask_pardon_terms_rejected",[]], [anyone|plyr,"lord_ask_pardon_terms", [(eq, "$players_oath_renounced_terms_state", 2), ], "Aye, I agree to those terms.", "lord_ask_pardon_after_renounce_peace",[]], [anyone|plyr,"lord_ask_pardon_terms", [(eq, "$players_oath_renounced_terms_state", 2), ], "That is too high a price, {s65}. I must decline.", "lord_ask_pardon_terms_rejected",[]], [anyone,"lord_ask_pardon_after_renounce_peace", [], "Excellent. Though you strayed from us, {playername}, it gladdens all our hearts that you have found your way back to the right path. I hereby restore your homage to me. Rise once more as an honoured {man/warrior} in my service.", "lord_pretalk", [ (try_for_range, ":cur_center", walled_centers_begin, walled_centers_end), (store_faction_of_party, ":cur_center_faction", ":cur_center"), (eq, ":cur_center_faction", "fac_player_supporters_faction"), (party_slot_eq, ":cur_center", slot_center_faction_when_oath_renounced, "$g_talk_troop_faction"), (neq, ":cur_center", "$players_oath_renounced_given_center"), (call_script, "script_give_center_to_faction", ":cur_center", "$g_talk_troop_faction"), (try_end), (call_script, "script_player_join_faction", "$g_talk_troop_faction"), (assign, "$player_has_homage", 1), (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 3), ]], [anyone,"lord_ask_pardon_terms_rejected", [], "Then get out of my sight, traitor! Begone with you, and do not come back!", "close_window", [ (assign, "$g_leave_encounter", 1), #TODO: Add relation drop. $players_oath_renounced_begin_time can also be reset to current time for worse conditions in the next conversation. (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -5), ]], [anyone|plyr,"lord_talk", [#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (lt, "$g_talk_troop_faction_relation", 0), (this_or_next|eq, "$players_kingdom", 0), (eq, "$players_kingdom", "fac_player_supporters_faction"), (neq, "$players_oath_renounced_against_kingdom", "$g_talk_troop_faction"), (assign, ":continue", 1), (try_begin), (gt, "$supported_pretender", 0), (eq, "$supported_pretender_old_faction", "$g_talk_troop_faction"), (assign, ":continue", 0), (try_end), (eq, ":continue", 1), (str_store_faction_name, s4, "$g_talk_troop_faction"),], "I wish to make peace with {s4}.", "lord_ask_pardon",[]], [anyone,"lord_ask_pardon", [(lt, "$g_talk_troop_relation", -10)], "Do you indeed, {playername}? Then go and trip on your sword. Give us all peace.", "lord_pretalk",[]], [anyone,"lord_ask_pardon", [ (assign, ":has_center", 0), (try_for_range, ":cur_center", centers_begin, centers_end), (store_faction_of_party, ":cur_center_faction", ":cur_center"), (eq, ":cur_center_faction", "fac_player_supporters_faction"), (assign, ":has_center", 1), (try_end), (eq, ":has_center", 1), ], "{playername}, you are a {lord/lady} without a master, holding lands in your name, without having allegience to any kingdom.\ As long as that continues, no king in Calradia would accept a lasting peace with you.", "lord_pretalk",[]], [anyone,"lord_ask_pardon", [(store_sub, ":hostility", 4, "$g_talk_troop_faction_relation"), (val_mul, ":hostility", ":hostility"), #square it (store_mul, reg16, ":hostility", 10), ], "Hmm. I could use my considerable influence to arrange a pardon for you, {playername},\ but there are some who see you as an enemy and will not be satisfied unless you pay tribute.\ All in all, you'd need to bring no less than {reg16} denars to make any friends in {s4}.", "lord_ask_pardon_2",[]], [anyone|plyr,"lord_ask_pardon_2", [(store_troop_gold, ":gold","trp_player"),(ge, ":gold", reg16)], "I have the money here. {reg16} denars.", "lord_ask_pardon_tribue_accept",[]], [anyone|plyr,"lord_ask_pardon_2", [], "I fear I cannot pay that much.", "lord_ask_pardon_tribue_deny",[]], [anyone,"lord_ask_pardon_tribue_accept", [], "Excellent, {playername}.\ I'll use the coin to smooth the feathers of those that can oppose your pardon, and I'm sure that word will soon spread that you are no longer an enemy of {s4}.", "close_window", [ (troop_remove_gold, "trp_player", reg16), (try_begin), (eq, "$players_kingdom", 0), (call_script, "script_set_player_relation_with_faction", "$g_talk_troop_faction", 0), (else_try), (call_script, "script_diplomacy_start_peace_between_kingdoms", "$g_talk_troop_faction", "$players_kingdom"), (try_end), (assign,"$g_leave_town_outside",1), (assign, "$g_leave_encounter", 1), ]], [anyone,"lord_ask_pardon_tribue_deny", [], "Then there's nothing I can do for you, {playername}. No silver, no pardon.", "lord_pretalk",[]], [anyone|plyr,"lord_talk", [(store_partner_quest,":lords_quest"), (ge,":lords_quest",0), ], "About the task you gave me...", "lord_active_mission_1",[]], [anyone|plyr,"lord_talk", [(faction_slot_eq,"$g_talk_troop_faction",slot_faction_leader, "$g_talk_troop"), (eq, "$players_kingdom", "$g_talk_troop_faction"), (eq, "$player_has_homage", 0), (gt, "$mercenary_service_accumulated_pay", 0), ], "{s67}, I humbly request the weekly payment for my service.", "lord_pay_mercenary",[]], [anyone,"lord_pay_mercenary", [(assign, reg8, "$mercenary_service_accumulated_pay")], "Hmm, let me see... According to my ledgers, we owe you {reg8} denars for your work. Here you are.", "lord_pay_mercenary_2", [(troop_add_gold, "trp_player", "$mercenary_service_accumulated_pay"), (assign, "$mercenary_service_accumulated_pay", 0)]], [anyone|plyr,"lord_pay_mercenary_2", [], "Thank you, sir.", "lord_pretalk", []], [anyone|plyr,"lord_talk", [#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (ge, "$g_talk_troop_faction_relation", 0), (store_partner_quest,":lords_quest"), (lt,":lords_quest",0), # (eq,"$g_talk_troop_faction","$players_kingdom") ], "Do you have any tasks for me?", "lord_request_mission_ask",[]], [anyone|plyr,"lord_talk", [(le,"$talk_context", tc_party_encounter), (ge, "$g_talk_troop_faction_relation", 0), #(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"), (neq, "$players_kingdom", "$g_talk_troop_faction"), (store_partner_quest, ":lords_quest"), (neq, ":lords_quest", "qst_join_faction"), ], "{s66}, I have come to offer you my sword in vassalage!", "lord_ask_enter_service",[]], [anyone|plyr,"lord_talk", [(le,"$talk_context", tc_party_encounter), (faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"), (eq, "$players_kingdom", "$g_talk_troop_faction"), (eq, "$player_has_homage", 0), (store_partner_quest, ":lords_quest"), (neq, ":lords_quest", "qst_join_faction"), ], "{s66}, I wish to become your sworn {man/woman} and fight for your honour.", "lord_ask_enter_service",[]], [anyone|plyr,"lord_talk", [(le,"$talk_context", tc_party_encounter), (ge, "$g_talk_troop_faction_relation", 0), #(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"), (eq, "$players_kingdom", "$g_talk_troop_faction"), (eq, "$player_has_homage", 1), ], "{s66}, I wish to be released from my oath to you.", "lord_ask_leave_service",[]], ## [anyone|plyr,"lord_talk", [(le,"$talk_context", tc_party_encounter), ## (ge, "$g_talk_troop_faction_relation", 0), ## (troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), ## (neg|faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"), ## (eq, "$players_kingdom", 0), ## (eq,1,0)], ## "TODO2:I want to fight alongside you against your enemies.", "close_window",[]], [anyone|plyr,"lord_talk", [(eq, 1, 0),(le,"$talk_context", tc_party_encounter),(ge, "$g_talk_troop_faction_relation", 0)], "I have an offer for you.", "lord_talk_preoffer",[]], [anyone|plyr,"lord_talk", [(eq, "$g_talk_troop_faction", "fac_player_supporters_faction"), #(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), ], "I want to give some troops to you.", "lord_give_troops",[]], [anyone,"lord_give_troops", [], "Well, I could use some good soldiers. Thank you.", "lord_pretalk", [ (change_screen_give_members), ]], [anyone|plyr,"lord_talk", [ (eq, "$g_talk_troop_faction", "$players_kingdom"), (faction_slot_eq, "$players_kingdom", slot_faction_marshall, "trp_player"), #(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), ], "I have a new task for you.", "lord_give_order_ask",[]], [anyone,"lord_give_order_ask", [], "Yes?", "lord_give_order",[]], [anyone|plyr,"lord_give_order", [], "Follow me.", "lord_give_order_answer", [ (assign, "$temp", spai_accompanying_army), (assign, "$temp_2", "p_main_party"), ]], [anyone|plyr,"lord_give_order", [], "Go to...", "lord_give_order_details_ask", [ (assign, "$temp", spai_holding_center), ]], [anyone|plyr,"lord_give_order", [], "Raid around the village of...", "lord_give_order_details_ask", [ (assign, "$temp", spai_raiding_around_center), ]], [anyone|plyr,"lord_give_order", [], "Patrol around...", "lord_give_order_details_ask", [ (assign, "$temp", spai_patrolling_around_center), ]], [anyone|plyr,"lord_give_order", [ (neg|troop_slot_eq, "$g_talk_troop", slot_troop_player_order_state, spai_undefined), ], "I won't need you for some time. You are free to do as you like.", "lord_give_order_stop", []], [anyone|plyr,"lord_give_order", [], "Never mind.", "lord_pretalk", []], [anyone,"lord_give_order_details_ask", [], "Where?", "lord_give_order_details",[]], [anyone|plyr|repeat_for_parties, "lord_give_order_details", [ (store_repeat_object, ":party_no"), (store_faction_of_party, ":party_faction", ":party_no"), (store_relation, ":relation", ":party_faction", "$players_kingdom"), (assign, ":continue", 0), (try_begin), (eq, "$temp", spai_holding_center), (try_begin), (this_or_next|party_slot_eq, ":party_no", slot_party_type, spt_castle), (party_slot_eq, ":party_no", slot_party_type, spt_town), (eq, ":party_faction", "$players_kingdom"), (assign, ":continue", 1), (try_end), (else_try), (eq, "$temp", spai_raiding_around_center), (try_begin), (party_slot_eq, ":party_no", slot_party_type, spt_village), (lt, ":relation", 0), (assign, ":continue", 1), (try_end), (else_try), (eq, "$temp", spai_patrolling_around_center), (try_begin), (eq, ":party_faction", "$players_kingdom"), (is_between, ":party_no", centers_begin, centers_end), (assign, ":continue", 1), (try_end), (try_end), (eq, ":continue", 1), (neq, ":party_no", "$g_encountered_party"), (str_store_party_name, s1, ":party_no")], "{s1}", "lord_give_order_answer", [ (store_repeat_object, "$temp_2"), ]], [anyone|plyr, "lord_give_order_details", [], "Never mind.", "lord_pretalk",[]], [anyone,"lord_give_order_stop", [], "All right. I will do that.", "lord_pretalk", [ (troop_set_slot, "$g_talk_troop", slot_troop_player_order_state, spai_undefined), (troop_set_slot, "$g_talk_troop", slot_troop_player_order_object, -1), (troop_get_slot, ":party_no", "$g_talk_troop", slot_troop_leaded_party), (try_begin), (gt, ":party_no", 0), (call_script, "script_party_set_ai_state", ":party_no", spai_undefined, -1), (party_set_slot, ":party_no", slot_party_commander_party, -1), (try_end), ]], [anyone,"lord_give_order_answer", [ (assign, ":continue", 0), (try_begin), (troop_slot_ge, "$g_talk_troop", slot_troop_readiness_to_follow_orders, 60), (assign, ":continue", 1), (else_try), (troop_slot_ge, "$g_talk_troop", slot_troop_readiness_to_follow_orders, 10), (neg|troop_slot_eq, "$g_talk_troop", slot_troop_player_order_state, spai_undefined), (assign, ":continue", 1), (try_end), (troop_get_slot, ":party_no", "$g_talk_troop", slot_troop_leaded_party), (this_or_next|le, ":party_no", 0), (eq, ":continue", 0), #Meaning that hero does not want to follow player orders for a while. ], "I am sorry. I need to attend my own business at the moment.", "lord_pretalk", [ (troop_set_slot, "$g_talk_troop", slot_troop_player_order_state, spai_undefined), (troop_set_slot, "$g_talk_troop", slot_troop_player_order_object, -1), ]], [anyone|auto_proceed,"lord_give_order_answer", [], ".", "lord_give_order_answer_2", [ (troop_get_slot, ":party_no", "$g_talk_troop", slot_troop_leaded_party), (call_script, "script_party_set_ai_state", ":party_no", "$temp", "$temp_2"), (try_begin), (eq, "$temp", spai_accompanying_army), (party_set_slot, ":party_no", slot_party_commander_party, "$temp_2"), (else_try), (party_set_slot, ":party_no", slot_party_commander_party, -1), (try_end), (troop_set_slot, "$g_talk_troop", slot_troop_player_order_state, "$temp"), (troop_set_slot, "$g_talk_troop", slot_troop_player_order_object, "$temp_2"), #Checking if the order is accepted by the ai (call_script, "script_recalculate_ai_for_troop", "$g_talk_troop"), ]], [anyone,"lord_give_order_answer_2", [ (troop_get_slot, ":party_no", "$g_talk_troop", slot_troop_leaded_party), (party_slot_eq, ":party_no", slot_party_ai_state, "$temp"), (party_slot_eq, ":party_no", slot_party_ai_object, "$temp_2"), (assign, "$g_leave_encounter", 1), ], "I will do that.", "close_window", []], [anyone,"lord_give_order_answer_2", [ #Meaning that the AI decision function did not follow the order. ], "I am sorry, it is not possible for me to do that.", "lord_pretalk", [ (troop_set_slot, "$g_talk_troop", slot_troop_player_order_state, spai_undefined), (troop_set_slot, "$g_talk_troop", slot_troop_player_order_object, -1), ]], [anyone|plyr,"lord_talk", [ (eq, "$g_talk_troop_faction", "$players_kingdom"), (faction_slot_eq, "$players_kingdom", slot_faction_marshall, "trp_player"), #(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (faction_slot_eq, "$players_kingdom", slot_faction_ai_state, sfai_default), ], "I want to start a new campaign. Let us assemble the army here.", "lord_give_order_call_to_arms_verify", []], [anyone,"lord_give_order_call_to_arms_verify", [], "You wish to summon all lords for a new campaign?", "lord_give_order_call_to_arms_verify_2",[]], [anyone|plyr,"lord_give_order_call_to_arms_verify_2", [], "Yes. We must gather all our forces before we march on the enemy.", "lord_give_order_call_to_arms",[]], [anyone|plyr,"lord_give_order_call_to_arms_verify_2", [], "On second thought, it won't be necessary to summon everyone.", "lord_pretalk",[]], [anyone,"lord_give_order_call_to_arms", [], "All right then. I will send messengers and tell everyone to come here.", "lord_pretalk", [ (faction_set_slot, "$players_kingdom", slot_faction_ai_state, sfai_gathering_army), (assign, "$g_recalculate_ais", 1), ]], [anyone|plyr,"lord_talk", [ (eq, "$g_talk_troop_faction", "$players_kingdom"), (faction_slot_eq, "$players_kingdom", slot_faction_marshall, "trp_player"), #(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (neg|faction_slot_eq, "$players_kingdom", slot_faction_ai_state, sfai_default), ], "I want to end the campaign and let everyone return home.", "lord_give_order_disband_army_verify", []], [anyone,"lord_give_order_disband_army_verify", [], "You want to end the current campaign and release all lords from duty?", "lord_give_order_disband_army_2",[]], [anyone|plyr,"lord_give_order_disband_army_2", [], "Yes. We no longer need all our forces here.", "lord_give_order_disband_army",[]], [anyone|plyr,"lord_give_order_disband_army_2", [], "On second thought, it will be better to stay together for now.", "lord_pretalk",[]], [anyone,"lord_give_order_disband_army", [], "All right. I will let everyone know that they are released from duty.", "lord_pretalk", [ (faction_set_slot, "$players_kingdom", slot_faction_ai_state, sfai_default), (try_for_range, ":cur_troop", kingdom_heroes_begin, kingdom_heroes_end), (troop_get_slot, ":party_no", ":cur_troop", slot_troop_leaded_party), (gt, ":party_no", 0), (party_slot_eq, ":party_no", slot_party_commander_party, "p_main_party"), (call_script, "script_party_set_ai_state", ":party_no", spai_undefined, -1), (party_set_slot, ":party_no", slot_party_commander_party, -1), (try_end), (assign, "$g_recalculate_ais", 1), ]], [anyone|plyr,"lord_talk", [(ge, "$g_talk_troop_faction_relation", 0)], "I wish to ask you something.", "lord_talk_ask_something",[]], [anyone,"lord_talk_ask_something", [], "Aye? What is it?", "lord_talk_ask_something_2",[]], [anyone|plyr,"lord_talk_ask_something_2", [#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), ], "I want to know the location of someone.", "lord_talk_ask_location",[]], [anyone|plyr,"lord_talk_ask_something_2", [], "What are you and your men doing?", "lord_tell_objective",[]], [anyone|plyr,"lord_talk_ask_something_2", [#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), ], "How goes the war?", "lord_talk_ask_about_war",[]], [anyone|plyr,"lord_talk_ask_something_2", [], "Never mind.", "lord_pretalk",[]], [anyone,"lord_talk_ask_location", [], "Very well, I may or may not have an answer for you. About whom do you wish to hear?", "lord_talk_ask_location_2",[]], [anyone|plyr|repeat_for_troops,"lord_talk_ask_location_2", [(store_repeat_object, ":troop_no"), (neq, "$g_talk_troop", ":troop_no"), (is_between, ":troop_no", heroes_begin, heroes_end), (this_or_next|troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_lady), (store_troop_faction, ":faction_no", ":troop_no"), (eq, "$g_encountered_party_faction", ":faction_no"), (str_store_troop_name, s1, ":troop_no")], "{s1}", "lord_talk_ask_location_3",[(store_repeat_object, "$hero_requested_to_learn_location")]], [anyone|plyr,"lord_talk_ask_location_2", [], "Never mind.", "lord_pretalk",[]], [anyone,"lord_talk_ask_location_3", [ (call_script, "script_update_troop_location_notes", "$hero_requested_to_learn_location", 1), (call_script, "script_get_information_about_troops_position", "$hero_requested_to_learn_location", 0), ], "{s1}", "lord_pretalk",[]], [anyone,"lord_talk_ask_about_war", [], "{s12}", "lord_talk_ask_about_war_2",[ (assign, ":num_enemies", 0), (try_for_range_backwards, ":cur_faction", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":cur_faction", slot_faction_state, sfs_active), (store_relation, ":cur_relation", ":cur_faction", "$g_talk_troop_faction"), (lt, ":cur_relation", 0), (try_begin), (eq, ":num_enemies", 0), (str_store_faction_name_link, s12, ":cur_faction"), (else_try), (eq, ":num_enemies", 1), (str_store_faction_name_link, s11, ":cur_faction"), (str_store_string, s12, "@{s11} and {s12}"), (else_try), (str_store_faction_name_link, s11, ":cur_faction"), (str_store_string, s12, "@{s11}, {s12}"), (try_end), (val_add, ":num_enemies", 1), (try_end), (try_begin), (eq, ":num_enemies", 0), (str_store_string, s12, "@We are not at war with anyone."), (else_try), (str_store_string, s12, "@We are at war with {s12}."), (try_end), ]], [anyone|plyr|repeat_for_factions, "lord_talk_ask_about_war_2", [(store_repeat_object, ":faction_no"), (is_between, ":faction_no", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":faction_no", slot_faction_state, sfs_active), (store_relation, ":cur_relation", ":faction_no", "$g_talk_troop_faction"), (lt, ":cur_relation", 0), (str_store_faction_name, s1, ":faction_no")], "Tell me more about the war with {s1}.", "lord_talk_ask_about_war_details",[(store_repeat_object, "$faction_requested_to_learn_more_details_about_the_war_against")]], [anyone|plyr,"lord_talk_ask_about_war_2", [], "That's all I wanted to know. Thank you.", "lord_pretalk",[]], [anyone,"lord_talk_ask_about_war_details", [], "We have {reg5?{reg5}:no} {reg3?armies:army} and they have {reg6?{reg6}:none}. Overall, {s9}.", "lord_talk_ask_about_war_2",[(call_script, "script_faction_get_number_of_armies", "$g_encountered_party_faction"), (assign, reg5, reg0), (assign, reg3, 1), (try_begin), (eq, reg5, 1), (assign, reg3, 0), (try_end), (call_script, "script_faction_get_number_of_armies", "$faction_requested_to_learn_more_details_about_the_war_against"), (assign, reg6, reg0), (assign, reg4, 1), (try_begin), (eq, reg6, 1), (assign, reg4, 0), (try_end), (store_div, ":our_str", reg5, 2), (store_div, ":enemy_str", reg6, 2), (store_sub, ":advantage", ":our_str", ":enemy_str"), (val_clamp, ":advantage", -4, 5), (val_add, ":advantage", 4), (store_add, ":adv_str", "str_war_report_minus_4", ":advantage"), (str_store_string, s9, ":adv_str"), ]], [anyone|plyr,"lord_talk", [(eq,"$talk_context",tc_party_encounter), (lt, "$g_encountered_party_relation", 0), (str_store_troop_name,s4,"$g_talk_troop")], "I say this only once, {s4}! Surrender or die!", "party_encounter_lord_hostile_ultimatum_surrender", []], [anyone,"party_encounter_lord_hostile_ultimatum_surrender", [], "{s43}", "close_window", [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_lord_challenged_default"), (call_script, "script_make_kingdom_hostile_to_player", "$g_encountered_party_faction", -3), (try_begin), (gt, "$g_talk_troop_relation", -10), (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -1), (try_end), (assign,"$encountered_party_hostile",1)]], [anyone|plyr,"lord_talk", [(eq,"$talk_context", tc_party_encounter), (neq,"$g_encountered_party_faction","$players_kingdom"), (ge, "$g_encountered_party_relation", 0), ], "I'm here to deliver you my demands!", "lord_predemand",[]], [anyone,"lord_predemand", [], "Eh? What do you want?", "lord_demand",[]], [anyone|plyr,"lord_demand", [(neq,"$g_encountered_party_faction","$players_kingdom"), (ge, "$g_encountered_party_relation", 0),], "I offer you one chance to surrender or die.", "lord_ultimatum_surrender",[]], [anyone,"lord_ultimatum_surrender", [(ge, "$g_encountered_party_relation", 0)], "{s43}", "lord_attack_verify",[#originally, speak you rascal (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_unprovoked_attack_default"), ]], [anyone|plyr,"lord_attack_verify", [], "Forgive me sir. I don't know what I was thinking.", "lord_attack_verify_cancel",[]], [anyone,"lord_attack_verify_cancel", [], "Be gone, then.", "close_window",[(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -1),(assign, "$g_leave_encounter",1)]], [anyone|plyr,"lord_attack_verify", [], "That is none of your business. Prepare to fight!", "lord_attack_verify_commit",[]], [anyone,"lord_ultimatum_surrender", [], "{s43}", "lord_attack_verify_b", #originally, you will not survive this [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_unnecessary_attack_default"), (call_script, "script_make_kingdom_hostile_to_player", "$g_encountered_party_faction", -3), (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -5), ]], [anyone|plyr,"lord_attack_verify_b", [], "Forgive me sir. I don't know what I was thinking.", "lord_attack_verify_cancel",[]], [anyone|plyr,"lord_attack_verify_b", [], "I stand my ground. Prepare to fight!", "lord_attack_verify_commit",[]], [anyone,"lord_attack_verify_commit", [], "{s43}", "close_window", [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_lord_challenged_default"), (call_script, "script_make_kingdom_hostile_to_player", "$g_encountered_party_faction", -3), (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -30), ]], #Post 0907 changes end [anyone|plyr,"lord_demand", [], "Forgive me. It's nothing.", "lord_pretalk",[]], ## [anyone|plyr,"lord_talk", [(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), ## (ge, "$g_talk_troop_faction_relation", 0), ## ], ## "I wish to ask for a favor.", "lord_ask_for_favor_ask",[]], [anyone|plyr,"lord_talk", [ (faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"), (troop_slot_eq, "$g_talk_troop", slot_troop_discussed_rebellion, 0), (assign, ":pretender", 0), (try_for_range, ":possible_pretender", pretenders_begin, pretenders_end), (troop_slot_eq, ":possible_pretender", slot_troop_original_faction, "$g_talk_troop_faction"), (assign, ":pretender", ":possible_pretender"), (try_end), (troop_slot_ge, ":pretender", slot_troop_met, 1), (str_store_troop_name, s45, ":pretender"), (troop_get_type, reg3, ":pretender"), ], "I have met in my travels one who calls {reg3?herself:himself} {s45}...", "liege_defends_claim_1",[ ]], [anyone,"liege_defends_claim_1", [], "Oh really? It is not everyone who dares mention that name in my presence. I am not sure whether to reward your bravery, or punish you for your impudence.", "liege_defends_claim_2", [ (troop_set_slot, "$g_talk_troop", slot_troop_discussed_rebellion, 1), ]], [anyone,"liege_defends_claim_2", [], "Very well. I will indulge your curiosity. But listen closely, because I do not wish to speak of this matter again.", "liege_defends_claim_3", [ ]], [anyone,"liege_defends_claim_3", [], "{s48}", "liege_defends_claim_4", [ (store_sub, ":rebellion_string", "$g_talk_troop_faction", "fac_kingdom_1"), (val_add, ":rebellion_string", "str_swadian_rebellion_monarch_response_1"), (str_store_string, 48, ":rebellion_string"), ]], [anyone,"liege_defends_claim_4", [], "{s48}", "lord_talk", [ (store_sub, ":rebellion_string", "$g_talk_troop_faction", "fac_kingdom_1"), (val_add, ":rebellion_string", "str_swadian_rebellion_monarch_response_2"), (str_store_string, 48, ":rebellion_string"), ]], #Rebellion changes begin [anyone|plyr,"lord_talk", [ (gt, "$supported_pretender", 0), (eq, "$supported_pretender_old_faction", "$g_talk_troop_faction"), # (is_between, "$players_kingdom", rebel_factions_begin, rebel_factions_end), # (faction_slot_eq, "$players_kingdom", slot_faction_rebellion_target, "$g_talk_troop_faction"), (troop_slot_eq, "$g_talk_troop", slot_troop_discussed_rebellion, 0), (neg|faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"), (troop_slot_ge, "$g_talk_troop", slot_troop_leaded_party, 1), (str_store_troop_name, s12, "$supported_pretender"), (str_store_faction_name, s14, "$supported_pretender_old_faction"), (faction_get_slot, ":old_faction_lord", "$supported_pretender_old_faction", slot_faction_leader), (str_store_troop_name, s15, ":old_faction_lord"), ], "{s12} is the rightful ruler of {s14}. Join our cause against the usurper, {s15}!", "lord_join_rebellion_suggest",[]], [anyone|plyr,"lord_talk", [ (eq, "$cheat_mode", 1), (gt, "$supported_pretender", 0), (eq, "$supported_pretender_old_faction", "$g_talk_troop_faction"), (neg|faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"), (troop_slot_ge, "$g_talk_troop", slot_troop_leaded_party, 1), ], "CHEAT: Join our cause by force.", "lord_join_rebellion_suggest_cheat",[]], [anyone|plyr,"party_encounter_lord_hostile_attacker_2", [ (eq, "$cheat_mode", 1), (gt, "$supported_pretender", 0), (eq, "$supported_pretender_old_faction", "$g_talk_troop_faction"), (neg|faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"), (troop_slot_ge, "$g_talk_troop", slot_troop_leaded_party, 1), ], "CHEAT: Join our cause by force.", "lord_join_rebellion_suggest_cheat",[]], [anyone,"lord_join_rebellion_suggest_cheat", [], "Cheat:Allright.", "lord_join_rebellion_ask_for_order", [ (troop_set_slot, "$g_talk_troop", slot_troop_discussed_rebellion, 1), (call_script, "script_change_troop_faction", "$g_talk_troop", "$players_kingdom"), (assign, "$g_leave_encounter", 1), ]], [anyone|plyr,"party_encounter_lord_hostile_attacker_2", [ (gt, "$supported_pretender", 0), (eq, "$supported_pretender_old_faction", "$g_talk_troop_faction"), # (is_between, "$players_kingdom", rebel_factions_begin, rebel_factions_end), # (faction_slot_eq, "$players_kingdom", slot_faction_rebellion_target, "$g_talk_troop_faction"), (troop_slot_eq, "$g_talk_troop", slot_troop_discussed_rebellion, 0), (neg|faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"), (troop_slot_ge, "$g_talk_troop", slot_troop_leaded_party, 1), (str_store_troop_name, s12, "$supported_pretender"), (str_store_faction_name, s14, "$supported_pretender_old_faction"), (faction_get_slot, ":old_faction_lord", "$supported_pretender_old_faction", slot_faction_leader), (str_store_troop_name, s15, ":old_faction_lord"), ], "{s12} is your rightful ruler. Join our cause against the usurper, {s15}!", "lord_join_rebellion_suggest",[]], [anyone,"lord_join_rebellion_suggest", [ (eq,"$talk_context",tc_party_encounter), (encountered_party_is_attacker), (lt, "$g_talk_troop_relation", -5), ], "I have no time to bandy words with the likes of you. Now defend yourself!", "party_encounter_lord_hostile_attacker_2", [ (troop_set_slot, "$g_talk_troop", slot_troop_discussed_rebellion, 1), ]], [anyone,"lord_join_rebellion_suggest", [ (lt, "$g_talk_troop_relation", -10), ], "I have no time to bandy words with the likes of you.", "lord_start", [ (troop_set_slot, "$g_talk_troop", slot_troop_discussed_rebellion, 1), ]], [anyone,"lord_join_rebellion_suggest", [ (assign, "$g_rebellion_suggest_friends_stronger", 0), (call_script, "script_init_ai_calculation"), #recalculating friend and enemy strengths (troop_get_slot, ":leaded_party", "$g_talk_troop", slot_troop_leaded_party), (gt, ":leaded_party", 0), (party_get_slot, ":friend_strength", ":leaded_party", slot_party_nearby_friend_strength), (party_get_slot, ":enemy_strength", ":leaded_party", slot_party_nearby_enemy_strength), (party_get_slot, ":cached_strength", ":leaded_party", slot_party_cached_strength), (val_sub, ":friend_strength", ":cached_strength"), (val_add, ":enemy_strength", ":cached_strength"), (gt, ":friend_strength", ":enemy_strength"), (assign, "$g_rebellion_suggest_friends_stronger", 1), (encountered_party_is_attacker), ], "{s43}", "party_encounter_lord_hostile_attacker_2", #This is hardly the time or the place for such a discussion. [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_talk_later_default"), ]], [anyone,"lord_join_rebellion_suggest", [ (eq, "$g_rebellion_suggest_friends_stronger", 1), ], "{s43}", "lord_start", [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_talk_later_default"), ]], [anyone,"lord_join_rebellion_suggest", [ ], "{s43}", "lord_join_rebellion_suggest_1b", [ (troop_set_slot, "$g_talk_troop", slot_troop_discussed_rebellion, 1), (faction_get_slot, ":pretender", "$players_kingdom", slot_faction_leader), (troop_get_type, reg3, ":pretender"), (faction_get_slot, ":current_ruler", "$g_talk_troop_faction", slot_faction_leader), (str_store_troop_name, 45, ":pretender"), (str_store_troop_name, 46, ":current_ruler"), (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_rebellion_dilemma_default"), (call_script, "script_find_rival_from_faction", "$g_talk_troop", "$players_kingdom"), (assign, "$rival_lord", reg0), (assign, "$rebellion_chance", 40), (assign, "$prior_argument_value", 0), (call_script, "script_rebellion_arguments", "$g_talk_troop", argument_claim), (store_mul, ":prior_claim", reg0, "$player_made_legitimacy_claim"), (val_add, "$prior_argument_value", ":prior_claim"), (call_script, "script_rebellion_arguments", "$g_talk_troop", argument_ruler), (store_mul, ":prior_claim", reg0, "$player_made_ruler_claim"), (val_add, "$prior_argument_value", ":prior_claim"), (call_script, "script_rebellion_arguments", "$g_talk_troop", argument_victory), (store_mul, ":prior_claim", reg0, "$player_made_strength_claim"), (val_add, "$prior_argument_value", ":prior_claim"), (call_script, "script_rebellion_arguments", "$g_talk_troop", argument_benefit), (store_mul, ":prior_claim", reg0, "$player_made_benefit_claim"), (val_add, "$prior_argument_value", ":prior_claim"), (val_div, "$prior_argument_value", 5), ]], [anyone,"lord_join_rebellion_suggest_1b", [ ], "{s43}", "lord_join_rebellion_suggest_2", [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_rebellion_dilemma_2_default"), ]], #Mentions prior arguments [anyone,"lord_join_rebellion_suggest_2", [ (neq, "$prior_argument_value", 0), ], "{s47}", "lord_join_rebellion_suggest_2", [ (try_begin), (gt, "$prior_argument_value", 10), (str_store_string, s47, "str_rebellion_prior_argument_very_favorable"), (str_store_string, s49, "str_but_comma_3"), (else_try), (gt, "$prior_argument_value", 0), (str_store_string, s47, "str_rebellion_prior_argument_favorable"), (str_store_string, s49, "str_but_comma_3"), (else_try), (is_between, "$prior_argument_value", -10, 0), (str_store_string, s47, "str_rebellion_prior_argument_unfavorable"), (str_store_string, s49, "str_and_comma_3"), (else_try), (lt, "$prior_argument_value", -10), (str_store_string, s47, "str_rebellion_prior_argument_very_unfavorable"), (str_store_string, s49, "str_and_comma_3"), (try_end), (val_add, "$rebellion_chance", "$prior_argument_value"), (assign, reg6, "$prior_argument_value"), #diagnostic only (assign, "$prior_argument_value", 0), (assign, reg7, "$rebellion_chance"), #diagnostic only (display_message, "@Prior argument effect: {reg6}, rebellion chance: {reg7}"),#diagnostic only ]], #Mentions rivals [anyone,"lord_join_rebellion_suggest_2", [ (gt, "$rival_lord", 0), ], "{s43}", "lord_join_rebellion_suggest_2", [ (str_store_troop_name, 44, "$rival_lord"), (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_rebellion_rival_default"), (assign, "$rival_lord", 0), (val_sub, "$rebellion_chance", 30), (assign, reg7, "$rebellion_chance"), #diagnostic only (display_message, "@Rebellion chance -30 from rival = {reg7}"),#diagnostic only ]], [anyone,"lord_join_rebellion_suggest_2", [ ], "So tell me. Why should I support {s45}?", "lord_join_rebellion_suggest_3", [ ]], [anyone|plyr,"lord_join_rebellion_suggest_3", [(troop_get_type, reg39, "$g_talk_troop"), ], "Legality -- {s45} has the better claim to the throne", "lord_join_rebellion_suggest_4", [ (call_script, "script_rebellion_arguments", "$g_talk_troop", argument_claim), (val_add, "$player_made_legitimacy_claim", 1), (assign, "$current_argument", argument_claim), (assign, "$current_argument_value", reg0), ]], [anyone|plyr,"lord_join_rebellion_suggest_3", [(troop_get_type, reg39, "$g_talk_troop"), ], "Justice -- {s45} will treat {reg39?her:his} subjects better than {s46}", "lord_join_rebellion_suggest_4", [ (call_script, "script_rebellion_arguments", "$g_talk_troop", argument_ruler), (val_add, "$player_made_ruler_claim", 1), (assign, "$current_argument", argument_ruler), (assign, "$current_argument_value", reg0), ]], [anyone|plyr,"lord_join_rebellion_suggest_3", [(troop_get_type, reg39, "$g_talk_troop"), ], "Expediency -- {s45} will win, and the sooner {reg39?she:he} wins, the sooner this war will end.", "lord_join_rebellion_suggest_4", [ (call_script, "script_rebellion_arguments", "$g_talk_troop", argument_victory), (val_add, "$player_made_strength_claim", 1), (assign, "$current_argument", argument_victory), (assign, "$current_argument_value", reg0), ]], [anyone|plyr,"lord_join_rebellion_suggest_3", [(troop_get_type, reg39, "$g_talk_troop"), ], "Self-interest -- {s45} will reward {reg39?her:his} followers well.", "lord_join_rebellion_suggest_4", [ (call_script, "script_rebellion_arguments", "$g_talk_troop", argument_benefit), (val_add, "$player_made_benefit_claim", 1), (assign, "$current_argument", argument_benefit), (assign, "$current_argument_value", reg0), ]], [anyone|plyr,"lord_join_rebellion_suggest_3", [ ], "None of the usual reasons. My thinking is a little different.", "lord_join_rebellion_suggest_4", [ (call_script, "script_rebellion_arguments", "$g_talk_troop", argument_none), (assign, "$current_argument", argument_none), (assign, "$current_argument_value", 0), ]], [anyone|plyr,"lord_join_rebellion_suggest_3", [ ], "There is more than one reason. I will let you make up your own mind.", "lord_join_rebellion_suggest_4", [ (call_script, "script_rebellion_arguments", "$g_talk_troop", argument_none), (assign, "$current_argument", argument_none), (assign, "$current_argument_value", 0), ]], [anyone|plyr,"lord_join_rebellion_suggest_3", [ ], "If that is your reasoning, perhaps you should remain loyal to {s46}.", "lord_join_rebellion_suggest_5", [ (assign, "$rebellion_check", 1), (assign, "$rebellion_chance", 0), ]], [anyone,"lord_join_rebellion_suggest_4", [ (neq, "$current_argument", argument_none), (gt, "$current_argument_value", 0), #Check for inconsistency (assign, ":arguments_used", 0), (assign, ":most_common_argument", 0), (try_begin), (gt, "$player_made_benefit_claim", 0), (val_add, ":arguments_used", 1), (assign, ":most_common_argument", argument_benefit), (try_end), (try_begin), (gt, "$player_made_strength_claim", 0), (val_add, ":arguments_used", 1), (try_begin), (gt, "$player_made_strength_claim", "$player_made_benefit_claim"), (assign, ":most_common_argument", argument_victory), (try_end), (try_end), (try_begin), (gt, "$player_made_ruler_claim", 0), (val_add, ":arguments_used", 1), (try_begin), (gt, "$player_made_ruler_claim", "$player_made_strength_claim"), (gt, "$player_made_ruler_claim", "$player_made_benefit_claim"), (assign, ":most_common_argument", argument_ruler), (try_end), (try_end), (try_begin), (gt, "$player_made_benefit_claim", 0), (val_add, ":arguments_used", 1), (try_begin), (gt, "$player_made_legitimacy_claim", "$player_made_ruler_claim"), (gt, "$player_made_legitimacy_claim", "$player_made_strength_claim"), (gt, "$player_made_legitimacy_claim", "$player_made_benefit_claim"), (assign, ":most_common_argument", argument_claim), (try_end), (try_end), (neq, "$current_argument", ":most_common_argument"), (store_random_in_range, ":consistency", 1, 5), (assign, reg10, ":consistency"), (assign, reg11, ":arguments_used"), (display_message, "@Consistency check: {reg10}/{reg11}"), (lt, ":consistency", ":arguments_used"), ], "Hmm. Do you perhaps tell each lord something different, depending on what you think he most wants to hear?", "lord_join_rebellion_suggest_4", [ (assign, "$current_argument_value", -5), ]], [anyone,"lord_join_rebellion_suggest_4", [ ], "Very well. {s51}{s52}{s53}{s54}{s55}", "lord_join_rebellion_suggest_5", [ (try_for_range, ":clear", 51, 60), (str_clear, ":clear"), (try_end), (try_begin), (neq, "$current_argument", argument_none), (try_begin), (gt, "$current_argument_value", 0), (str_store_string, 51, "str_rebellion_argument_favorable"), (else_try), (eq, "$current_argument_value", 0), (str_store_string, 51, "str_rebellion_argument_neutral"), (else_try), (lt, "$current_argument_value", 0), (str_store_string, 51, "str_rebellion_argument_unfavorable"), (try_end), (val_add, "$rebellion_chance", "$current_argument_value"), (assign, reg6, "$current_argument_value"), #diagnostic only (assign, reg7, "$rebellion_chance"), #diagnostic only (display_message, "@Current argument effect: {reg6}, rebellion chance: {reg7}"),#diagnostic only (store_skill_level, ":persuasion_level", "skl_persuasion", "trp_player"), (val_mul, ":persuasion_level", 5), (store_random_in_range, ":persuasion_value", -10, ":persuasion_level"), (store_add, ":persuasion_plus_argument", ":persuasion_value", "$current_argument_value"), (str_store_string, 52, "str_and_comma_1"), (try_begin), (gt, ":persuasion_value", 10), (str_store_string, 53, "str_rebellion_persuasion_favorable"), (try_begin), (lt, "$current_argument_value", 0), (str_store_string, 52, "str_but_comma_1"), (try_end), (else_try), (lt, ":persuasion_plus_argument", 0), (lt, ":persuasion_value", 0), (str_store_string, 53, "str_rebellion_persuasion_unfavorable"), (try_begin), (ge, "$current_argument_value", 0), (str_store_string, 52, "str_but_comma_1"), (try_end), (else_try), (str_store_string, 53, "str_rebellion_persuasion_neutral"), (try_begin), (lt, "$current_argument_value", 0), (str_store_string, 52, "str_but_comma_1"), (try_end), (try_end), (val_add, "$rebellion_chance", ":persuasion_value"), (assign, reg6, ":persuasion_value"), #diagnostic only (assign, reg7, "$rebellion_chance"), #diagnostic only (display_message, "@Persuasion effect: {reg6}, rebellion chance: {reg7}"),#diagnostic only (str_store_string, 54, "str_and_comma_2"), (try_begin), (gt, ":persuasion_plus_argument", 0), (lt, "$g_talk_troop_relation", 5), (str_store_string, 54, "str_but_comma_2"), (else_try), (le, ":persuasion_plus_argument", 0), (ge, "$g_talk_troop_relation", 5), (str_store_string, 54, "str_but_comma_2"), (try_end), (try_end), (try_begin), (gt, "$g_talk_troop_relation", 20), (str_store_string, 55, "str_rebellion_relation_very_favorable"), (else_try), (gt, "$g_talk_troop_relation", 5), (str_store_string, 55, "str_rebellion_relation_favorable"), (else_try), (gt, "$g_talk_troop_relation", -5), (str_store_string, 55, "str_rebellion_relation_neutral"), (else_try), (str_store_string, 55, "str_rebellion_relation_unfavorable"), (try_end), (val_add, "$rebellion_chance", "$g_talk_troop_relation"), (assign, reg6, "$g_talk_troop_relation"), #diagnostic only (assign, reg7, "$rebellion_chance"), #diagnostic only (display_message, "@Personal relation effect: {reg6}, rebellion chance: {reg7}"),#diagnostic only (store_random_in_range, "$rebellion_check", 0, 100), (assign, reg6, "$rebellion_check"), #diagnostic only (display_message, "@Rebellion check: {reg6}"),#diagnostic only ]], [anyone,"lord_join_rebellion_suggest_5", [ (lt, "$rebellion_check", "$rebellion_chance"), ], "{s43}", "lord_join_rebellion_ask_for_order", [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_rebellion_agree_default"), (troop_set_slot, "$g_talk_troop", slot_troop_discussed_rebellion, 1), (call_script, "script_change_troop_faction", "$g_talk_troop", "$players_kingdom"), (troop_get_slot, ":lords_party", "$g_talk_troop", slot_troop_leaded_party), (party_set_faction, ":lords_party", "$players_kingdom"), (assign, "$g_leave_encounter", 1), ]], [anyone,"lord_join_rebellion_suggest_5", [ (encountered_party_is_attacker), ], "{s43}", "party_encounter_lord_hostile_attacker_2", [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_rebellion_refuse_default"), ]], [anyone,"lord_join_rebellion_suggest_5", [ ], "{s43}", "lord_talk", [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_rebellion_refuse_default"), ]], [anyone,"lord_join_rebellion_ask_for_order", [], "All right. So, what's the plan? What do you want me to do?", "lord_give_order", []], #Rebellion changes end [anyone|plyr,"lord_talk", [(eq, "$cheat_mode", 1), #(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), #(ge, "$g_talk_troop_faction_relation", 10), ], "CHEAT:I want to suggest a course of action.", "lord_suggest_action_ask",[]], [anyone,"lord_tell_objective", [#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 1), (troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), ], "What am I doing? What does it look like I'm doing?! I'm a prisoner here!", "lord_pretalk",[]], [anyone,"lord_tell_objective", [(troop_slot_eq, "$g_talk_troop", slot_troop_leaded_party, -1)], "I am not commanding any men at the moment.", "lord_pretalk",[]], [anyone,"lord_tell_objective", [(party_slot_eq, "$g_talk_troop_party", slot_party_ai_state, spai_holding_center), (party_get_attached_to, ":cur_center_no", "$g_talk_troop_party"), (try_begin), (lt, ":cur_center_no", 0), (party_get_cur_town, ":cur_center_no", "$g_talk_troop_party"), (try_end), (is_between, ":cur_center_no", centers_begin, centers_end), ], "We are resting at {s1}.", "lord_pretalk",[(party_get_slot, ":ai_object", "$g_talk_troop_party", slot_party_ai_object), (str_store_party_name, s1, ":ai_object")]], [anyone,"lord_tell_objective", [(party_slot_eq, "$g_talk_troop_party", slot_party_ai_state, spai_holding_center)], "We are travelling to {s1}.", "lord_pretalk",[(party_get_slot, ":ai_object", "$g_talk_troop_party", slot_party_ai_object), (str_store_party_name, s1, ":ai_object")]], [anyone,"lord_tell_objective", [(party_slot_eq, "$g_talk_troop_party", slot_party_ai_state, spai_recruiting_troops)], "We are recruiting new soldiers from {s1}.", "lord_pretalk",[(party_get_slot, ":ai_object", "$g_talk_troop_party", slot_party_ai_object), (str_store_party_name, s1, ":ai_object")]], [anyone,"lord_tell_objective", [(party_slot_eq, "$g_talk_troop_party", slot_party_ai_state, spai_patrolling_around_center)], "We are scouting for the enemy around {s1}.", "lord_pretalk",[(party_get_slot, ":ai_object", "$g_talk_troop_party", slot_party_ai_object), (str_store_party_name, s1, ":ai_object")]], # [anyone,"lord_tell_objective", [(party_slot_eq, "$g_talk_troop_party", slot_party_ai_state, spai_raiding_around_center)], # "We ride out to lay waste to village of {s1} to punish the foe for his misdeeds.", "lord_pretalk",[(party_get_slot, ":ai_object", "$g_talk_troop_party", slot_party_ai_object), # (str_store_party_name, s1, ":ai_object")]], [anyone,"lord_tell_objective", [(party_slot_eq, "$g_talk_troop_party", slot_party_ai_state, spai_raiding_around_center)], "We are laying waste to the village of {s1}.", "lord_pretalk",[(party_get_slot, ":ai_object", "$g_talk_troop_party", slot_party_ai_object), (str_store_party_name, s1, ":ai_object")]], [anyone,"lord_tell_objective", [(party_slot_eq, "$g_talk_troop_party", slot_party_ai_state, spai_retreating_to_center)], "We are retreating to {s1}.", "lord_pretalk",[(party_get_slot, ":ai_object", "$g_talk_troop_party", slot_party_ai_object), (str_store_party_name, s1, ":ai_object")]], [anyone,"lord_tell_objective", [(party_slot_eq, "$g_talk_troop_party", slot_party_ai_state, spai_besieging_center)], "We are besieging {s1}.", "lord_pretalk",[(party_get_slot, ":ai_object", "$g_talk_troop_party", slot_party_ai_object), (str_store_party_name, s1, ":ai_object")]], [anyone,"lord_tell_objective", [(party_slot_eq, "$g_talk_troop_party", slot_party_ai_state, spai_engaging_army), (party_get_slot, ":ai_object", "$g_talk_troop_party", slot_party_ai_object), (party_is_active, ":ai_object"), ], "We are fighting against {s1}.", "lord_pretalk", [ (party_get_slot, ":ai_object", "$g_talk_troop_party", slot_party_ai_object), (str_store_party_name, s1, ":ai_object") ]], [anyone,"lord_tell_objective", [(party_slot_eq, "$g_talk_troop_party", slot_party_ai_state, spai_accompanying_army)], "We are accompanying {s1}.", "lord_pretalk",[(party_get_slot, ":ai_object", "$g_talk_troop_party", slot_party_ai_object), (str_store_party_name, s1, ":ai_object")]], [anyone,"lord_tell_objective", [ (assign, ":pass", 0), (try_begin), (party_slot_eq, "$g_talk_troop_party", slot_party_ai_state, spai_undefined), (assign, ":pass", 1), (else_try), (party_slot_eq, "$g_talk_troop_party", slot_party_ai_state, spai_engaging_army), (party_get_slot, ":ai_object", "$g_talk_troop_party", slot_party_ai_object), (neg|party_is_active, ":ai_object"), (assign, ":pass", 1), (try_end), (eq, ":pass", 1), ], "We are reconsidering our next objective.", "lord_pretalk",[]], [anyone,"lord_tell_objective", [], "I don't know: {reg1} {s1}", "lord_pretalk",[(party_get_slot, reg1, "$g_talk_troop_party", slot_party_ai_state), (party_get_slot, ":ai_object", "$g_talk_troop_party", slot_party_ai_object), (str_store_party_name, s1, ":ai_object")]], [anyone|plyr,"lord_talk", [ (eq, "$talk_context", tc_party_encounter), (eq, "$g_talk_troop_faction", "$players_kingdom"), (party_slot_eq, "$g_encountered_party", slot_party_following_player, 0), (neg|faction_slot_eq, "$g_talk_troop_faction", slot_faction_marshall, "trp_player"), ], "Will you follow me? I have a plan.", "lord_ask_follow",[]], [anyone,"lord_ask_follow", [(party_get_slot, ":dont_follow_until_time", "$g_encountered_party", slot_party_dont_follow_player_until_time), (store_current_hours, ":cur_time"), (lt, ":cur_time", ":dont_follow_until_time")], "I enjoy your company, {playername}, but there are other things I must attend to. Perhaps in a few days I can ride with you again.", "close_window", [(assign, "$g_leave_encounter",1)]], [anyone,"lord_ask_follow", [(troop_get_slot, ":troop_renown", "$g_talk_troop", slot_troop_renown), (troop_get_slot, ":player_renown", "trp_player", slot_troop_renown), (val_mul, ":troop_renown", 3), (val_div, ":troop_renown", 4), (lt, ":player_renown", ":troop_renown"), ], "That would hardly be proper, {playername}. Why don't you follow me instead?", "close_window", [(assign, "$g_leave_encounter",1)]], [anyone,"lord_ask_follow", [(lt, "$g_talk_troop_relation", 25)], "{s43}", "close_window", [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_lord_follow_refusal_default"), (assign, "$g_leave_encounter",1)]], #Post 0907 changes end [anyone,"lord_ask_follow", [], "Lead the way, {playername}! Let us bring death and defeat to all our enemies.", "close_window", [(party_set_slot, "$g_talk_troop_party", slot_party_commander_party, "p_main_party"), (call_script, "script_party_decide_next_ai_state_under_command", "$g_talk_troop_party"), (store_current_hours, ":follow_until_time"), (store_add, ":follow_period", 30, "$g_talk_troop_relation"), (val_div, ":follow_period", 2), (val_add, ":follow_until_time", ":follow_period"), (party_set_slot, "$g_encountered_party", slot_party_follow_player_until_time, ":follow_until_time"), (party_set_slot, "$g_encountered_party", slot_party_following_player, 1), (assign, "$g_leave_encounter",1)]], [anyone,"lord_talk_preoffer", [], "Yes?", "lord_talk_offer",[]], ## [anyone|plyr,"lord_talk_offer", [(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), ## (neg|faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"), #he is not a faction leader! ## (call_script, "script_get_number_of_hero_centers", "$g_talk_troop"), ## (eq, reg0, 0), #he has no castles or towns ## (hero_can_join), ## ], ## "I need capable men like you. Will you join me?", "knight_offer_join",[ ## ]], [anyone|plyr,"lord_talk_offer", [(eq,1,0)], "I wish to ransom one of your prisoners.", "knight_offer_join",[ ]], [anyone|plyr,"lord_talk_offer", [], "Never mind.", "lord_pretalk",[]], [anyone ,"knight_offer_join", [(call_script, "script_cf_is_quest_troop", "$g_talk_troop")], "I fear I cannot join you at the moment, {playername}, I've important business to attend to and it cannot wait.", "hero_pretalk",[]], [anyone ,"knight_offer_join", [(lt, "$g_talk_troop_relation", 5), (store_character_level,":player_level","trp_player"), (store_character_level,":talk_troop_level","$g_talk_troop"), (val_mul,":player_level",2), (lt, ":player_level", ":talk_troop_level")], "You forget your place, {sir/madam}. I do not take orders from the likes of you.", "hero_pretalk",[]], [anyone ,"knight_offer_join", [ (assign, ":num_player_companions",0), (try_for_range, ":hero_id", heroes_begin, heroes_end), (troop_slot_eq, ":hero_id",slot_troop_occupation, slto_player_companion), (val_add, ":num_player_companions",1), (try_end), (assign, reg5, ":num_player_companions"), (store_add, reg6, reg5, 1), (val_mul, reg6,reg6), (val_mul, reg6, 1000), (gt, reg6,0)], #note that we abuse the value of reg6 in the next line. "I would be glad to fight at your side, my friend, but there is a problem...\ The thing is, I've found myself in a bit of debt that I must repay very soon. {reg6} denars altogether,\ and I am honour-bound to return every coin. Unless you've got {reg6} denars with you that you can spare,\ I've to keep my mind on getting this weight off my neck.", "knight_offer_join_2",[]], [anyone ,"knight_offer_join", [(gt,reg6, 100000)], "Join you? I think not.", "close_window",[]], [anyone ,"knight_offer_join", [], "Aye, my friend, I'll be happy to join you.", "knight_offer_join_2",[]], [anyone|plyr,"knight_offer_join_2", [(gt, reg6,0),(store_troop_gold, ":gold", "trp_player"),(gt,":gold",reg6)], "Here, take it, all {reg6} denars you need. 'Tis only money.", "knight_offer_join_accept",[(troop_remove_gold, "trp_player",reg6)]], [anyone|plyr,"knight_offer_join_2", [(le, reg6,0)], "Then let us ride together, my friend.", "knight_offer_join_accept",[]], [anyone|plyr,"knight_offer_join_2", [(eq, "$talk_context", tc_hero_freed)], "That's good to know. I will think on it.", "close_window",[]], [anyone|plyr,"knight_offer_join_2", [(neq, "$talk_context", tc_hero_freed)], "That's good to know. I will think on it.", "hero_pretalk",[]], [anyone ,"knight_offer_join_accept", [(troop_slot_ge, "$g_talk_troop", slot_troop_leaded_party, 1)], "I've some trusted men in my band who could be of use to you. What do you wish to do with them?", "knight_offer_join_accept_party",[ ]], [anyone ,"knight_offer_join_accept", [], "Ah, certainly, it might be fun!", "close_window",[ (call_script, "script_recruit_troop_as_companion", "$g_talk_troop"), (assign, "$g_leave_encounter",1) ]], [anyone|plyr,"knight_offer_join_accept_party", [], "You may disband your men. I've no need for other troops.", "knight_join_party_disband",[]], [anyone|plyr,"knight_offer_join_accept_party", [(troop_get_slot, ":companions_party","$g_talk_troop", slot_troop_leaded_party), (party_can_join_party,":companions_party","p_main_party"), ], "Your men may join as well. We need every soldier we can muster.", "knight_join_party_join",[]], [anyone|plyr,"knight_offer_join_accept_party", [(is_between,"$g_encountered_party",centers_begin, centers_end)], "Lead your men out of the town. I shall catch up with you on the road.", "knight_join_party_lead_out",[]], [anyone|plyr,"knight_offer_join_accept_party", [(neg|is_between,"$g_encountered_party",centers_begin, centers_end)], "Keep doing what you were doing. I'll catch up with you later.", "knight_join_party_lead_out",[]], [anyone ,"knight_join_party_disband", [], "Ah . . . Very well, {playername}. Much as I dislike losing good men,\ the decision is yours. I'll disband my troops and join you.", "close_window",[ (call_script, "script_recruit_troop_as_companion", "$g_talk_troop"), (troop_get_slot, ":companions_party","$g_talk_troop", slot_troop_leaded_party), (party_detach, ":companions_party"), (remove_party, ":companions_party"), (assign, "$g_leave_encounter",1) ]], [anyone ,"knight_join_party_join", [], "Excellent.\ My lads and I will ride with you.", "close_window",[ (call_script, "script_recruit_troop_as_companion", "$g_talk_troop"), (party_remove_members, "p_main_party", "$g_talk_troop", 1), (troop_get_slot, ":companions_party","$g_talk_troop", slot_troop_leaded_party), (assign, "$g_move_heroes", 1), (call_script, "script_party_add_party", "p_main_party", ":companions_party"), (party_detach, ":companions_party"), (remove_party, ":companions_party"), (assign, "$g_leave_encounter",1) ]], [anyone ,"knight_join_party_lead_out", [], "Very well then.\ I shall maintain a patrol of this area. Return if you have further orders for me.", "close_window",[ (call_script, "script_recruit_troop_as_companion", "$g_talk_troop"), (party_remove_members, "p_main_party", "$g_talk_troop", 1), (troop_get_slot, ":companions_party","$g_talk_troop", slot_troop_leaded_party), (party_set_faction, ":companions_party", "fac_player_supporters_faction"), (party_detach, ":companions_party"), (party_set_ai_behavior, ":companions_party", ai_bhvr_patrol_location), (party_set_flags, ":companions_party", pf_default_behavior, 0), ]], [anyone,"lord_enter_service_reject", [], "What pigswill!\ And to think I would offer you a place among my nobles. Begone, beggar, before I lose my temper!", "close_window", [ (try_begin), (store_partner_quest, ":lords_quest"), (eq, ":lords_quest", "qst_join_faction"), (call_script, "script_abort_quest", "qst_join_faction", 1), (try_end), (assign, "$g_invite_faction", 0), (assign, "$g_invite_faction_lord", 0), (assign, "$g_invite_offered_center", 0), (assign, "$g_leave_encounter", 1), ]], [anyone,"lord_ask_enter_service", [(gt, "$players_kingdom", 0), (neq, "$players_kingdom", "$g_talk_troop_faction"), (faction_get_slot, ":players_lord", "$players_kingdom", slot_faction_leader), (neq, ":players_lord", "trp_player"), (str_store_troop_name, s5, ":players_lord"), ], "You are already oath-bound to serve {s5}, are you not?", "lord_give_oath_under_oath_already",[]], [anyone|plyr ,"lord_give_oath_under_oath_already", [], "Indeed I am, {s65}. Forgive my rambling.", "lord_pretalk",[]], [anyone,"lord_ask_enter_service", [(lt, "$g_talk_troop_relation", -5)], "I accept oaths only from those I can trust to keep them, {playername}.", "lord_pretalk",[]], [anyone,"lord_ask_enter_service", [ (assign, "$g_invite_offered_center", -1), (troop_get_slot, ":renown", "trp_player", slot_troop_renown), (store_mul, ":vassal_potential", "$g_talk_troop_relation", 5), (val_add, ":vassal_potential", ":renown"), (call_script, "script_get_number_of_hero_centers", "trp_player"), (assign, ":num_centers_owned", reg0), (store_mul, ":center_affect", ":num_centers_owned", 50), (val_add, ":vassal_potential", ":center_affect"), (ge, ":vassal_potential", 150), (try_begin), (eq, ":num_centers_owned", 0), (call_script, "script_get_poorest_village_of_faction", "$g_talk_troop_faction"), (gt, reg0, 0), (assign, "$g_invite_offered_center", reg0), (try_end), ], "You are known as a brave {man-at-arms/warrior} and a fine leader of men, {playername}.\ I shall be pleased to accept your sword into my service and bestow vassalage upon you,\ if you are ready to swear homage to me.", "lord_give_oath_1",[]], [anyone,"lord_ask_enter_service", [], "You've yet to show yourself as a competent commander, {playername}.\ Take your sword to my enemies and prove to me that you are worthy of becoming my vassal.\ Then we may speak more of this.", "lord_pretalk",[]], [anyone|plyr,"lord_give_oath_1", [], "I am ready, {s65}.", "lord_give_oath_2", []], [anyone|plyr,"lord_give_oath_1", [], "Forgive me, {s65}, I must give the matter more thought first...", "lord_give_oath_give_up", []], [anyone,"lord_give_oath_give_up", [], "What are you playing at, {playername}? Go and make up your mind, and stop wasting my time.", "close_window", [(assign, "$g_leave_encounter",1)]], [anyone,"lord_give_oath_2", [], "Good. Then repeat the words of the oath with me: I swear homage to you as lawful ruler of the {s41}.", "lord_give_oath_3", [ (str_store_faction_name, 41, "$g_talk_troop_faction"), (try_begin), (is_between, "$g_talk_troop", pretenders_begin, pretenders_end), (troop_get_slot, ":rebel_faction", "$g_talk_troop", slot_troop_original_faction), (str_store_faction_name, 41, ":rebel_faction"), (try_end), ]], [anyone|plyr,"lord_give_oath_3", [], "I pledge homage to you as lawful ruler of the {s41}.", "lord_give_oath_4", []], [anyone|plyr,"lord_give_oath_3", [], "Excuse me, {reg65?my lady:sir}. But I feel I need to think about this.", "lord_give_oath_give_up", []], [anyone,"lord_give_oath_4", [], "I will remain as your loyal and devoted {man/follower} as long as my breath remains....", "lord_give_oath_5", []], [anyone|plyr,"lord_give_oath_5", [], "I will remain as your loyal and devoted {man/follower} as long as my breath remains...", "lord_give_oath_6", []], [anyone|plyr,"lord_give_oath_5", [], "{reg65?My lady:Sir}, may I ask for some time to think about this?", "lord_give_oath_give_up", []], [anyone,"lord_give_oath_6", [], "...and I will be at your side to fight your enemies should you need my sword.", "lord_give_oath_7", []], [anyone|plyr,"lord_give_oath_7", [], "...and I will be at your side to fight your enemies should you need my sword.", "lord_give_oath_8", []], [anyone|plyr,"lord_give_oath_7", [], "{reg65?My lady:My lord}, please give me more time to think about this.", "lord_give_oath_give_up", []], [anyone,"lord_give_oath_8", [], "Finally, I will uphold your lawful claims and those of your legitimate heirs.", "lord_give_oath_9", []], [anyone|plyr,"lord_give_oath_9", [], "Finally, I will uphold your lawful claims and those of your legitimate heirs.", "lord_give_oath_10", []], [anyone|plyr,"lord_give_oath_9", [], "{reg65?My lady:Sir}, I must have more time to consider this.", "lord_give_oath_give_up", []], [anyone,"lord_give_oath_10", [], "Very well. You have given me your solemn oath, {playername}. May you uphold it always, with proper courage and devotion.", "lord_give_oath_go_on_2", []], [anyone,"lord_give_oath_go_on_2", [ (assign, reg1, 1), (try_begin), (le, "$g_invite_offered_center", 0), (assign, reg1, 0), (else_try), (str_store_party_name, s1, "$g_invite_offered_center"), (try_end), ], "Let it be known that from this day forward, you are my sworn {man/follower} and vassal.\ I give you my protection and grant you the right to bear arms in my name, and I pledge that I shall not deprive you of your life, liberty or properties except by the lawful judgment of your peers or by the law and custom of the land.{reg1? Furthermore I give you the fief of {s1} with all its rents and revenues.:}", "lord_give_oath_go_on_3", []], [anyone,"lord_give_oath_go_on_3", [ ], "You have done a wise thing, {playername}. Serve me well and I promise, you will rise high.", "lord_give_conclude", []], ## [anyone,"lord_give_oath_go_on_2", [], "Then let it be know that from now on, you are my sworn {man/follower}.\ ## I give you my protection and grant you the right to bear arms in my name.\ ## You have done wisely {playername}. Serve me well and I promise, you will rise high.", "lord_give_oath_5", []], # [anyone,"lord_ask_enter_service", [(lt, "$g_talk_troop_relation", 10), # (store_character_level, ":player_level", "trp_player"), # (lt, ":player_level", 10), # ], "I know not much about you. Keep serving me {playername}. Prove your loyality, then I will know I can trust you and accept your oath.", "lord_pretalk",[]], ## [anyone,"lord_ask_enter_service", [], "What kind of oath are you willing to make?", "lord_oath_what_kind",[]], ## ## [anyone|plyr ,"lord_oath_what_kind", [], "I will give you my oath to serve you for two months.", "lord_oath_what_kind_2",[(assign, "$temp", 60)]], ## [anyone|plyr ,"lord_oath_what_kind", [], "I will give you my oath to serve you for three months.", "lord_oath_what_kind_2",[(assign, "$temp", 90)]], ## [anyone|plyr ,"lord_oath_what_kind", [], "I will give you my oath to serve you for six months.", "lord_oath_what_kind_2",[(assign, "$temp", 180)]], ## [anyone|plyr ,"lord_oath_what_kind", [], "I will give you my oath to serve you indefinitely.", "lord_oath_what_kind_2",[(assign, "$temp", 720)]], ## [anyone|plyr ,"lord_oath_what_kind", [], "Maybe I should give more thought to this, my lord.", "lord_oath_what_kind_cancel",[]], ## [anyone ,"lord_oath_what_kind_cancel", [], "What nonsense is this? Now go make up your mind and stop wasting my time.", "close_window",[]], ## ## [anyone, "lord_oath_what_kind_2", [], "Hmmm. Do you ask for anything in return?", "lord_oath_what_do_you_want",[]], ## ## [anyone|plyr, "lord_oath_what_do_you_want", [], "I ask for nothing but your blessing, my lord.", "lord_oath_consider",[(assign,"$temp2",0)]], ## [anyone|plyr, "lord_oath_what_do_you_want", [], "I only ask for the right to have my own banner, my lord.", "lord_oath_consider",[(assign,"$temp2",1)]], ## [anyone|plyr, "lord_oath_what_do_you_want", [], "I just ask for the right to hold one castle, my lord.", "lord_oath_consider",[(assign,"$temp2",2)]], ## [anyone|plyr, "lord_oath_what_do_you_want", [], "I ask for the right to hold two castles, my lord.", "lord_oath_consider",[(assign,"$temp2",4)]], ## [anyone|plyr, "lord_oath_what_do_you_want", [], "I ask for the right to hold three castles, my lord.", "lord_oath_consider",[(assign,"$temp2",6)]], ## [anyone|plyr ,"lord_oath_what_do_you_want", [], "Maybe I should give more thought to this, my lord.", "lord_oath_what_kind_cancel",[]], ## ## [anyone ,"lord_oath_consider", [ ## (store_character_level, ":player_level", "trp_player"), ## (store_mul, ":benefit", ":player_level", 5), ## (val_add, ":benefit", "$temp"), ## (val_add, ":benefit", "$g_talk_troop_relation"), ## ## (store_mul, ":cost", "$temp2", 100), ## (lt, ":cost", ":benefit"), ## ], "That is agreeable {playername}. Give me your oath now and I will accept you as my follower and offer you my protection.", "lord_give_oath_go_on",[]], ## ## [anyone ,"lord_oath_consider", [], "Hmmm. What you ask for is not acceptible {playername}.", "close_window",[]], ## ## [anyone|plyr,"lord_give_oath_go_on", [(eq, "$temp", 60)], "I give you my oath lord, that I will remain in your service for two months.\ ## During this time, I will be faithful to you,\ ## I will not act in a way to cause you harm, and I will be at your side to fight your enemies should you need my sword.", "lord_give_oath_go_on_2", []], ## [anyone|plyr,"lord_give_oath_go_on", [(eq, "$temp", 90)], "I give you my oath lord, that I will remain in your service for three months.\ ## During this time, I will be faithful to you,\ ## I will not act in a way to cause you harm, and I will be at your side to fight your enemies should you need my sword.", "lord_give_oath_go_on_2", []], ## [anyone|plyr,"lord_give_oath_go_on", [(eq, "$temp", 180)], "I give you my oath lord, that I will remain in your service for six months.\ ## During this time, I will be faithful to you,\ ## I will not act in a way to cause you harm, and I will be at your side to fight your enemies should you need my sword.", "lord_give_oath_go_on_2", []], ## [anyone|plyr,"lord_give_oath_go_on", [(gt, "$temp", 700)], "I give you my oath lord, that I will remain as your loyal and devoted {man/follower} as long as my breath remains.\ ## I will never act in a way to cause you harm, and I will be at your side to fight your enemies should you need my sword.", "lord_give_oath_go_on_2", []], ## ## [anyone,"lord_give_oath_go_on_2", [(eq,"$temp2",0)], "Then let it be know that from now on, you are my sworn {man/follower}.\ ## I give you my protection and grant you the right to bear arms in my name.\ ## You have done wisely {playername}. Serve me well and I promise, you will rise high.", "lord_give_oath_5", []], ## ## [anyone,"lord_give_oath_go_on_2", [(eq,"$temp2",1)], "Then let it be know that from now on, you are my sworn {man/follower}.\ ## I give you my protection and grant you the right to hold your own banner.\ ## You have done wisely {playername}. Serve me well and I promise, you will rise high.", "lord_give_oath_5", []], ## ## [anyone,"lord_give_oath_go_on_2", [(eq,"$temp2",2)], "Then let it be know that from now on, you are my sworn {man/follower} and vassal.\ ## I give you my protection and grant you the right to hold a castle.\ ## You have done wisely {playername}. Serve me well and I promise, you will rise high.", "lord_give_oath_5", []], ## ## [anyone,"lord_give_oath_go_on_2", [(eq,"$temp2",4)], "Then let it be know that from now on, you are my sworn {man/follower} and vassal.\ ## I give you my protection and grant you the right to hold two castles.\ ## You have done wisely {playername}. Serve me well and I promise, you will rise high.", "lord_give_oath_5", []], ## ## [anyone,"lord_give_oath_go_on_2", [], "Then let it be know that from now on, you are my sworn {man/follower} and vassal.\ ## I give you my protection and grant you the right to hold three castles.\ ## You have done wisely {playername}. Serve me well and I promise, you will rise high.", "lord_give_oath_5", []], [anyone|plyr,"lord_give_conclude", [ (troop_get_type, reg39, "$g_talk_troop"), ], "I thank you, {reg39?my lady:lord}.", "lord_give_conclude_2", [ (try_begin), (is_between, "$g_talk_troop", pretenders_begin, pretenders_end), # (faction_set_slot, "$g_talk_troop_faction", slot_faction_marshall, "trp_player"), (assign, "$supported_pretender", "$g_talk_troop"), (troop_get_slot, "$supported_pretender_old_faction", "$g_talk_troop", slot_troop_original_faction), (troop_set_faction, "$g_talk_troop", "fac_player_supporters_faction"), (faction_set_slot, "fac_player_supporters_faction", slot_faction_leader, "$g_talk_troop"), (assign, "$g_talk_troop_faction", "fac_player_supporters_faction"), (quest_set_slot, "qst_rebel_against_kingdom", slot_quest_giver_troop, "$g_talk_troop"), (quest_set_slot, "qst_rebel_against_kingdom", slot_quest_target_faction, "$supported_pretender_old_faction"), (str_store_faction_name_link, s14, "$supported_pretender_old_faction"), (str_store_troop_name_link, s13, "$g_talk_troop"), (setup_quest_text,"qst_rebel_against_kingdom"), (str_store_string, s2, "@You promised to help {s13} claim the throne of {s14}."), (call_script, "script_start_quest", "qst_rebel_against_kingdom", "$g_talk_troop"), (try_end), (try_begin), (is_between, "$players_oath_renounced_against_kingdom", kingdoms_begin, kingdoms_end), (neq, "$players_oath_renounced_against_kingdom", "$g_talk_troop_faction"), (store_relation, ":relation", "fac_player_supporters_faction", "$players_oath_renounced_against_kingdom"), (val_min, ":relation", -40), (call_script, "script_set_player_relation_with_faction", "$players_oath_renounced_against_kingdom", ":relation"), (call_script, "script_update_all_notes"), (assign, "$g_recalculate_ais", 1), (try_end), (try_begin), (is_between, "$players_kingdom", kingdoms_begin, kingdoms_end), (neq, "$players_kingdom", "fac_player_supporters_faction"), (faction_get_slot, ":old_leader", "$players_kingdom", slot_faction_leader), (call_script, "script_add_log_entry", logent_renounced_allegiance, "trp_player", -1, ":old_leader", "$players_kingdom"), (call_script, "script_player_leave_faction", 1), (try_end), (call_script, "script_player_join_faction", "$g_talk_troop_faction"), (try_begin), (gt, "$g_invite_offered_center", 0), (call_script, "script_give_center_to_lord", "$g_invite_offered_center", "trp_player", 0), (call_script, "script_add_log_entry", logent_fief_granted_village, "trp_player", "$g_invite_offered_center", "$g_talk_troop", "$g_talk_troop_faction"), (try_end), (call_script, "script_add_log_entry", logent_pledged_allegiance, "trp_player", -1, "$g_talk_troop", "$g_talk_troop_faction"), (try_begin), (check_quest_active, "qst_join_faction"), (eq, "$g_invite_faction_lord", "$g_talk_troop"), (call_script, "script_end_quest", "qst_join_faction"), (else_try), (check_quest_active, "qst_join_faction"), (call_script, "script_abort_quest", "qst_join_faction", 0), (try_end), (assign, "$player_has_homage" ,1), (assign, "$g_player_banner_granted", 1), (assign, "$g_invite_faction", 0), (assign, "$g_invite_faction_lord", 0), (assign, "$g_invite_offered_center", 0), (assign, "$g_leave_encounter",1)]], [anyone,"lord_give_conclude_2", [], "I have great hopes for you {playername}.\ I know you shall prove yourself worthy of the trust I have placed in you.", "close_window", [(assign, "$g_leave_encounter",1)]], [anyone,"lord_ask_enter_service", [(str_store_faction_name,5,"$g_talk_troop_faction")], "Heh, a wise move,\ {playername}. With loyal service, a {man/woman} in my service could become wealthy and powerful,\ and our enemies... Well, our enemies are as wheat before a scythe.\ However, to enter my service you must first renounce all worldly oaths and bonds,\ and swear to serve only the {s5}.", "lord_enter_service_swear",[]], [anyone|plyr ,"lord_enter_service_swear", [], "I do so swear, {s65}.", "lord_enter_service_swear_accepted",[]], [anyone|plyr ,"lord_enter_service_swear", [], "I need some time to think about this.", "lord_enter_service_swear_denied",[]], [anyone ,"lord_enter_service_swear_denied", [], "Are you having me on? I've no time for games, {playername}.\ Make up your mind and stop wasting my time.", "close_window",[(assign, "$g_leave_encounter",1)]], [anyone ,"lord_enter_service_swear_accepted", [(str_store_faction_name,5,"$g_talk_troop_faction")], "Then it is my pleasure to welcome you to the service of my house. From this day on, {playername},\ you are a soldier of the {s5} with all the duties and privileges that come with it.", "lord_enter_service_swear_accepted_2", [ ]], [anyone ,"lord_enter_service_swear_accepted_2", [(str_store_faction_name,5,"$g_talk_troop_faction")], "I charge you with rooting out and destroying the forces of our enemies wherever you may find them.\ Moreover, I will have special tasks for you from time to time, as may some of my other vassal lords.\ Serve, fight, and honour your oaths. These things will take you far, if you've a mind for promotion.\ May God grant us long lives and many victories to toast in my hall!", "close_window",[(assign, "$g_leave_encounter",1)]], [anyone,"lord_ask_leave_service", [(ge, "$g_talk_troop_relation", 1)], "Hrm.\ Has your oath become burdensome, {playername}? It is unusual to request release from homage,\ but in respect of your fine service, I will not hold you if you truly wish to end it.\ Though you would be sorely missed.", "lord_ask_leave_service_verify",[]], [anyone,"lord_ask_leave_service", [], "Release from homage? Hmm, perhaps it would be for the best...\ However, {playername}, you must be sure that release is what you desire. This is not a thing done lightly.", "lord_ask_leave_service_verify",[]], [anyone|plyr ,"lord_ask_leave_service_verify", [], "It is something I must do, {s65}.", "lord_ask_leave_service_2",[]], [anyone|plyr ,"lord_ask_leave_service_verify", [], "You are right, {s65}. My place is here.", "lord_ask_leave_service_giveup",[]], [anyone,"lord_ask_leave_service_giveup", [], "I am pleased to hear it, {playername}.\ I hope you'll banish such unworthy thoughts from your mind from now on.", "lord_pretalk",[]], [anyone,"lord_ask_leave_service_2", [], "Then you are sure?", "lord_ask_leave_service_verify_again",[]], [anyone|plyr ,"lord_ask_leave_service_verify_again", [], "Yes, {s65}.", "lord_ask_leave_service_3",[]], [anyone|plyr ,"lord_ask_leave_service_verify_again", [], "Of course not, {s65}. I am ever your loyal vassal.", "lord_ask_leave_service_giveup",[]], [anyone,"lord_ask_leave_service_3", [], "As you wish. I hereby declare your oaths to be null and void.\ You will no longer hold land or titles in my name, and you are released from your duties to my house.\ You are free, {playername}.", "lord_ask_leave_service_end", [ (call_script, "script_add_log_entry", logent_renounced_allegiance, "trp_player", -1, "$g_talk_troop", "$g_talk_troop_faction"), (call_script, "script_player_leave_faction", 1), ]], [anyone|plyr ,"lord_ask_leave_service_end", [], "Thank you, sir. It was an honour to serve you..", "lord_ask_leave_service_end_2",[]], [anyone|plyr ,"lord_ask_leave_service_end", [], "My thanks. It feels good to be {a free man/free} once again.", "lord_ask_leave_service_end_2",[]], [anyone ,"lord_ask_leave_service_end_2", [], "Farewell then, {playername}, and good luck go with you.", "close_window", [(assign, "$g_leave_encounter", 1)]], #Active quests ##### TODO: QUESTS COMMENT OUT BEGIN [anyone,"lord_active_mission_1", [(store_partner_quest,":lords_quest"), (eq,":lords_quest","qst_lend_companion"), #(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (check_quest_active,"qst_lend_companion"), (quest_slot_eq, "qst_lend_companion", slot_quest_giver_troop, "$g_talk_troop"), (store_current_day, ":cur_day"), (quest_get_slot, ":quest_target_amount", "qst_lend_companion", slot_quest_target_amount), (ge, ":cur_day", ":quest_target_amount"), ## (quest_get_slot, ":quest_target_troop", "qst_lend_companion", slot_quest_target_troop), ## (str_store_troop_name,s14,":quest_target_troop"), ## (troop_get_type, reg3, ":quest_target_troop"), ], "Oh, you want your companion back? I see...", "lord_lend_companion_end",[]], [anyone,"lord_active_mission_1", [(store_partner_quest,":lords_quest"),(eq,":lords_quest","qst_lend_companion")], "{playername}, I must beg your patience, I still have need of your companion. Please return later when things have settled.", "lord_pretalk",[]], [anyone,"lord_active_mission_1", [], "Yes, have you made any progress on it?", "lord_active_mission_2",[]], [anyone|plyr,"lord_active_mission_2",[#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (check_quest_active,"qst_capture_prisoners"), (quest_slot_eq, "qst_capture_prisoners", slot_quest_giver_troop, "$g_talk_troop"), (quest_get_slot, ":quest_target_amount", "qst_capture_prisoners", slot_quest_target_amount), (quest_get_slot, ":quest_target_troop", "qst_capture_prisoners", slot_quest_target_troop), (party_count_prisoners_of_type, ":count_prisoners", "p_main_party", ":quest_target_troop"), (ge, ":count_prisoners", ":quest_target_amount"), (assign, reg1, ":quest_target_amount"), (str_store_troop_name_plural, s1, ":quest_target_troop")], "Indeed. I brought you {reg1} {s1} as prisoners.", "lord_generic_mission_thank", [(quest_get_slot, ":quest_target_amount", "qst_capture_prisoners", slot_quest_target_amount), (quest_get_slot, ":quest_target_troop", "qst_capture_prisoners", slot_quest_target_troop), (party_remove_prisoners, "p_main_party", ":quest_target_troop", ":quest_target_amount"), (party_add_prisoners, "$g_encountered_party", ":quest_target_troop", ":quest_target_amount"), (call_script, "script_finish_quest", "qst_capture_prisoners", 100)]], [anyone|plyr,"lord_active_mission_2", [ #(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (store_partner_quest, ":lords_quest"), (eq, ":lords_quest", "qst_capture_enemy_hero"), (assign, ":has_prisoner", 0), (quest_get_slot, ":quest_target_faction", "qst_capture_enemy_hero", slot_quest_target_faction), (party_get_num_prisoner_stacks, ":num_stacks", "p_main_party"), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_prisoner_stack_get_troop_id, ":stack_troop", "p_main_party", ":i_stack"), (troop_is_hero, ":stack_troop"), (store_troop_faction, ":stack_faction", ":stack_troop"), (eq, ":quest_target_faction", ":stack_faction"), (troop_slot_eq, ":stack_troop", slot_troop_occupation, slto_kingdom_hero), (assign, ":has_prisoner", 1), (quest_set_slot, "qst_capture_enemy_hero", slot_quest_target_troop, ":stack_troop"), (try_end), (eq, ":has_prisoner", 1), (str_store_faction_name, s13, ":quest_target_faction") ], "Oh, indeed. I've captured a lord from {s13} for you.", "capture_enemy_hero_thank", []], [anyone,"capture_enemy_hero_thank", [], "Many thanks, my friend. He will serve very well for a bargain. You've done a fine work here. Please accept these {reg5} denars for your help.", "capture_enemy_hero_thank_2", [(quest_get_slot, ":quest_target_troop", "qst_capture_enemy_hero", slot_quest_target_troop), (quest_get_slot, ":quest_target_faction", "qst_capture_enemy_hero", slot_quest_target_faction), (party_remove_prisoners, "p_main_party", ":quest_target_troop", 1), (store_relation, ":reln", "$g_encountered_party_faction", ":quest_target_faction"), (try_begin), (lt, ":reln", 0), (party_add_prisoners, "$g_encountered_party", ":quest_target_troop", 1), #Adding him to the dungeon (else_try), #Do not add a non-enemy lord to the dungeon (due to recent diplomatic changes or due to a neutral town/castle) #(troop_set_slot, ":quest_target_troop", slot_troop_is_prisoner, 0), (troop_set_slot, ":quest_target_troop", slot_troop_prisoner_of_party, -1), (try_end), (quest_get_slot, ":reward", "qst_capture_enemy_hero", slot_quest_gold_reward), (call_script, "script_troop_add_gold", "trp_player", ":reward"), (add_xp_as_reward, 2500), (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 4), (call_script, "script_end_quest", "qst_capture_enemy_hero"), ]], [anyone|plyr,"capture_enemy_hero_thank_2", [], "Certainly, {s65}.", "lord_pretalk",[]], [anyone|plyr,"capture_enemy_hero_thank_2", [], "It was nothing.", "lord_pretalk",[]], [anyone|plyr,"capture_enemy_hero_thank_2", [], "Give me more of a challenge next time.", "lord_pretalk",[]], ## ## [anyone|plyr,"lord_active_mission_2", [(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), ## (store_partner_quest,":lords_quest"), ## (eq,":lords_quest","qst_capture_messenger"), ## (quest_get_slot, ":quest_target_troop", ":lords_quest", slot_quest_target_troop), ## (quest_get_slot, ":quest_target_amount", ":lords_quest", slot_quest_target_amount), ## (store_num_parties_destroyed_by_player, ":num_destroyed", "pt_messenger_party"), ## (gt, ":num_destroyed", ":quest_target_amount"), ## (party_count_prisoners_of_type, ":num_prisoners", "p_main_party", ":quest_target_troop"), ## (ge, ":num_prisoners", 1), ## (str_store_troop_name, 3, ":quest_target_troop")], ## "Indeed sir. I have captured a {s3} my lord.", "lord_generic_mission_thank",[(quest_get_slot, ":quest_target_troop", "qst_capture_messenger", slot_quest_target_troop), ## (party_remove_prisoners, "p_main_party", ":quest_target_troop", 1), ## (party_add_prisoners, "$g_encountered_party", ":quest_target_troop", 1),#Adding him to the dungeon ## (call_script, "script_finish_quest", "qst_capture_messenger", 100)]], ## ## [anyone|plyr,"lord_active_mission_2", [#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (store_partner_quest,":lords_quest"), (eq,":lords_quest","qst_raise_troops"), (quest_get_slot, ":quest_target_troop", ":lords_quest", slot_quest_target_troop), (quest_get_slot, ":quest_target_amount", ":lords_quest", slot_quest_target_amount), (party_count_companions_of_type, ":num_companions", "p_main_party", ":quest_target_troop"), (ge, ":num_companions", ":quest_target_amount"), (assign, reg1, ":quest_target_amount"), (str_store_troop_name_plural, s13, ":quest_target_troop")], "Indeed. I have raised {reg1} {s13}. You can take them.", "lord_raise_troops_thank",[(quest_get_slot, ":quest_target_troop", "qst_raise_troops", slot_quest_target_troop), (quest_get_slot, ":quest_target_amount", "qst_raise_troops", slot_quest_target_amount), (call_script,"script_change_player_relation_with_troop","$g_talk_troop",8), (party_remove_members, "p_main_party", ":quest_target_troop", ":quest_target_amount"), (call_script, "script_end_quest", "qst_raise_troops"), (troop_get_slot, ":cur_lords_party", "$g_talk_troop", slot_troop_leaded_party), (gt, ":cur_lords_party", 0), (party_add_members, ":cur_lords_party", ":quest_target_troop", ":quest_target_amount"), ]], [anyone,"lord_raise_troops_thank", [], "These men may well turn the tide in my plans, {playername}. I am confident you've trained them well. My thanks and my compliments to you.", "lord_raise_troops_thank_2",[]], [anyone|plyr,"lord_raise_troops_thank_2", [], "Well, the lads are at your command now, sir. I am sure you will take good care of them.", "lord_pretalk",[]], [anyone|plyr,"lord_active_mission_2", [#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (store_partner_quest,":lords_quest"), (eq, ":lords_quest", "qst_collect_taxes"), (check_quest_succeeded, "qst_collect_taxes"), (eq, "$qst_collect_taxes_halve_taxes", 0), (quest_get_slot, ":quest_gold_reward", "qst_collect_taxes", slot_quest_gold_reward), (store_mul, ":required_gold", ":quest_gold_reward", 8), (val_div, ":required_gold", 10), (store_troop_gold, ":gold", "trp_player"), (ge, ":gold", ":required_gold"), (assign, reg19, ":quest_gold_reward"), (quest_get_slot, ":quest_target_center", "qst_collect_taxes", slot_quest_target_center), (str_store_party_name, s3, ":quest_target_center"), ], "Here are all the taxes from {s3}. It comes up to {reg19} denars.", "lord_collect_taxes_success", []], [anyone|plyr,"lord_active_mission_2", [#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (store_partner_quest,":lords_quest"), (eq, ":lords_quest", "qst_collect_taxes"), (check_quest_succeeded, "qst_collect_taxes"), (eq, "$qst_collect_taxes_halve_taxes", 1), (quest_get_slot, ":quest_gold_reward", "qst_collect_taxes", slot_quest_gold_reward), (store_mul, ":required_gold", ":quest_gold_reward", 95), (val_div, ":required_gold", 100), (store_troop_gold, ":gold", "trp_player"), (ge, ":gold", ":required_gold"), (assign, reg19, ":quest_gold_reward"), (quest_get_slot, ":quest_target_center", "qst_collect_taxes", slot_quest_target_center), (str_store_party_name, s3, ":quest_target_center"), ], "Here are the taxes from {s3}. It comes up to {reg19} denars.", "lord_collect_taxes_half_success", []], [anyone|plyr,"lord_active_mission_2", [#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (store_partner_quest,":lords_quest"), (eq, ":lords_quest", "qst_collect_taxes"), (check_quest_failed, "qst_collect_taxes"), (quest_get_slot, ":quest_gold_reward", "qst_collect_taxes", slot_quest_gold_reward), (store_troop_gold, ":gold", "trp_player"), (ge, ":gold", ":quest_gold_reward"), (assign, reg19, ":quest_gold_reward"), (quest_get_slot, ":quest_target_center", "qst_collect_taxes", slot_quest_target_center), (str_store_party_name, s3, ":quest_target_center"), ], "Unfortunately, a revolt broke up while I was collecting the taxes.\ I could only collect {reg19} denars.", "lord_collect_taxes_fail", []], [anyone,"lord_collect_taxes_success", [(quest_get_slot, ":total_revenue", "qst_collect_taxes", slot_quest_gold_reward), (store_mul, ":owner_share", ":total_revenue", 8), (val_div, ":owner_share", 10), (assign, reg20, ":owner_share"), (store_sub, reg21, ":total_revenue", ":owner_share")], "Well done, {playername}, very well done indeed! You were truly the right {man/person} for the job.\ I promised you a fifth of the taxes, so that amounts to {reg21} denars.\ If you give me {reg20} denars, you may keep the difference.\ A good result for everyone, eh?", "lord_pretalk", [ (troop_remove_gold, "trp_player", reg20), (quest_set_slot, "qst_collect_taxes", slot_quest_gold_reward, 0), (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 4), (call_script, "script_end_quest", "qst_collect_taxes"), ]], [anyone,"lord_collect_taxes_half_success", [(quest_get_slot, ":gold_reward", "qst_collect_taxes", slot_quest_gold_reward), (val_mul, ":gold_reward", 95), (val_div, ":gold_reward", 100), (assign, reg20, ":gold_reward")], "What?! Is this some scheme of yours, {playername}? That's less than half the taxes I'm owed!\ You have let them get away with murder as well as my money. What a farce!\ You can forget the money I promised you, I'm taking {reg20} denars from what you collected,\ and you're lucky I'm leaving you a few coins for honour's sake.", "lord_pretalk", [(troop_remove_gold, "trp_player", reg20), (quest_set_slot, "qst_collect_taxes", slot_quest_gold_reward, 0), (call_script, "script_end_quest", "qst_collect_taxes"), ]], [anyone,"lord_collect_taxes_fail", [], "God, what a bloody mess you've gotten us into, {playername}.\ This could turn very ugly if I do not take immediate action.\ I certainly hope you're not here expecting to be paid for failure.\ Hand over my {reg19} denars, if you please, and end our business together.", "lord_pretalk", [(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -1), (quest_get_slot, ":gold_reward", "qst_collect_taxes", slot_quest_gold_reward), (troop_remove_gold, "trp_player", ":gold_reward"), (quest_set_slot, "qst_collect_taxes", slot_quest_gold_reward, 0), (call_script, "script_end_quest", "qst_collect_taxes"), ]], [anyone|plyr,"lord_active_mission_2", [(store_partner_quest,":lords_quest"), (eq, ":lords_quest", "qst_hunt_down_fugitive"), (check_quest_succeeded, "qst_hunt_down_fugitive"), (quest_get_slot, ":quest_target_center", "qst_hunt_down_fugitive", slot_quest_target_center), (str_store_party_name, s3, ":quest_target_center"), (quest_get_slot, ":quest_target_dna", "qst_hunt_down_fugitive", slot_quest_target_dna), (call_script, "script_get_name_from_dna_to_s50", ":quest_target_dna"), (str_store_string, s4, s50),], "I found {s4} hiding at {s3} and gave him his punishment.", "lord_hunt_down_fugitive_success", []], [anyone|plyr,"lord_active_mission_2", [(store_partner_quest,":lords_quest"), (eq, ":lords_quest", "qst_hunt_down_fugitive"), (check_quest_failed, "qst_hunt_down_fugitive"), ], "I'm afraid he got away.", "lord_hunt_down_fugitive_fail", []], [anyone,"lord_hunt_down_fugitive_success", [], "And we'll all be a lot better off without him! Thank you, {playername},\ for removing this long-festering thorn from my side. 'Tis good to know you can be trusted to handle things\ with an appropriate level of tactfulness.\ A bounty I promised, and a bounty you shall have. 300 denars and not a copper less!", "lord_hunt_down_fugitive_success_2", [ (add_xp_as_reward, 300), ]], [anyone|plyr,"lord_hunt_down_fugitive_success_2", [], "Let me take the money, {s65}. Thank you.", "lord_hunt_down_fugitive_reward_accept",[]], [anyone|plyr,"lord_hunt_down_fugitive_success_2", [], "This is blood money. I can't accept it.", "lord_hunt_down_fugitive_reward_reject",[]], #Post 0907 changes begin [anyone,"lord_hunt_down_fugitive_reward_accept", [], "Of course, {playername}. Here you are. Once again, you've my thanks for ridding me of that {s44}.", "lord_pretalk",[ (troop_get_slot, ":insult_string", "$g_talk_troop", slot_lord_reputation_type), (val_add, ":insult_string", "str_lord_insult_default"), (str_store_string, s44, ":insult_string"), (call_script, "script_troop_add_gold", "trp_player", 300), (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 2), (call_script, "script_end_quest", "qst_hunt_down_fugitive"), ]], [anyone,"lord_hunt_down_fugitive_reward_reject", [], "You are a {man/woman} for whom justice is its own reward, eh? As you wish it, {playername}, as you wish it.\ An honourable sentiment, to be true. Regardless, you've my thanks for ridding me of that {s44}.", "lord_pretalk",[ (troop_get_slot, ":insult_string", "$g_talk_troop", slot_lord_reputation_type), (val_add, ":insult_string", "str_lord_insult_default"), (str_store_string, s44, ":insult_string"), (call_script, "script_change_player_honor", 3), (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 2), (call_script, "script_end_quest", "qst_hunt_down_fugitive"), ]], [anyone,"lord_hunt_down_fugitive_fail", [], "It is a sad day when that {s44} manages to avoid the hand of justice yet again.\ I thought you would be able to do this, {playername}. Clearly I was wrong.", "lord_pretalk", [ (troop_get_slot, ":insult_string", "$g_talk_troop", slot_lord_reputation_type), (val_add, ":insult_string", "str_lord_insult_default"), (str_store_string, 44, ":insult_string"), (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -1), (call_script, "script_end_quest", "qst_hunt_down_fugitive"), ]], #Post 0907 changes end ## ## ## [anyone|plyr,"lord_active_mission_2", [(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), ## (store_partner_quest,":lords_quest"), ## (eq,":lords_quest","qst_bring_back_deserters"), ## (quest_get_slot, ":quest_target_troop", ":lords_quest", slot_quest_target_troop), ## (quest_get_slot, ":quest_target_amount", ":lords_quest", slot_quest_target_amount), ## (party_count_prisoners_of_type, ":num_prisoners", "p_main_party", ":quest_target_troop"), ## (ge, ":num_prisoners", ":quest_target_amount"), ## (assign, reg1, ":quest_target_amount")], ## "Yes sir. I have brought {reg1} deserters as you asked me to.", "lord_generic_mission_thank",[(quest_get_slot, ":quest_target_troop", "qst_bring_back_deserters", slot_quest_target_troop), ## (quest_get_slot, ":quest_target_amount", "qst_bring_back_deserters", slot_quest_target_amount), ## (party_remove_prisoners, "p_main_party", ":quest_target_troop", ":quest_target_amount"), ## (faction_get_slot, ":faction_tier_2_troop", "$g_talk_troop_faction", slot_faction_tier_2_troop), ## (try_begin), ## (gt, ":faction_tier_2_troop", 0), ## (troop_get_slot, ":cur_lords_party", "$g_talk_troop", slot_troop_leaded_party), ## (gt, ":cur_lords_party", 0), ## (party_add_members, ":cur_lords_party", ":faction_tier_2_troop", ":quest_target_amount"), ## (try_end), ## (call_script, "script_finish_quest", "qst_bring_back_deserters", 100)]], ## ## ##### TODO: QUESTS COMMENT OUT END [anyone|plyr,"lord_active_mission_2", [], "I am still working on it.", "lord_active_mission_3",[]], [anyone|plyr,"lord_active_mission_2", [], "I am afraid I won't be able to do this quest.", "lord_mission_failed",[]], [anyone,"lord_active_mission_3", [], "Good. Remember, I am counting on you.", "lord_pretalk",[]], #Post 0907 changes begin [anyone,"lord_mission_failed", [], "{s43}", "lord_pretalk", [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_lord_mission_failed_default"), (store_partner_quest,":lords_quest"), (call_script, "script_abort_quest", ":lords_quest", 1)]], #Post 0907 changes end #Claim center ## [anyone,"lord_claim_center_begin", [], ## "What do you want to do with {s4}?", "lord_claim_center_ask",[]], ## ## [anyone|plyr,"lord_claim_center_ask", [], ## "I want to claim it for myself.", "lord_claim_center_2",[]], ## [anyone|plyr,"lord_claim_center_ask", [], ## "I will leave it to you my lord. I have no interest in holding {s4}.", "lord_claim_center_leave_to_lord",[]], ## [anyone,"lord_claim_center_2", [(eq, "$g_player_permitted_castles", 0),], ## "You are an able warrior {playername} and there is no question of your bravery.\ ## Alas, you are not noble born, and there are those who will be upset if I allow you to hold a castle.\ ## So, it saddens me but I must decline your request.", "lord_claim_center_deny", []], ## ## [anyone|plyr,"lord_claim_center_deny", [], ## "This is not fair my lord. I shed my blood to take {s4}. Now another {man/master} will rule over it.", "lord_claim_center_deny_2", []], ## [anyone|plyr,"lord_claim_center_deny", [], ## "I understand sir. Do as you will.", "lord_claim_center_leave_to_lord", []], ## [anyone,"lord_claim_center_deny_2", [], ## "Remember that you gave me your oath {playername}. And you agreed to do as told.", "lord_claim_center_deny_3", []], ## [anyone,"lord_claim_center_deny_3", [], ## "Yes sir.", "lord_claim_center_leave_to_lord", []], ## ## [anyone,"lord_claim_center_leave_to_lord", [], ## "Very well. Then I will find a suitable master for {s4}.\ ## In recognition of your bravery and service, I give you these 5000 denars.", "lord_pretalk", ## [(troop_get_slot, ":wealth", "$g_talk_troop", slot_troop_wealth), ## (val_sub, ":wealth", 6000), ## (troop_set_slot, "$g_talk_troop", slot_troop_wealth, ":wealth"), ## (call_script, "script_troop_add_gold", "trp_player", 5000), ## ## (assign, ":new_master", "$g_talk_troop"), ## (assign, ":max_wealth", 0), ## ## (try_for_range, ":hero_no", kingdom_heroes_begin, kingdom_heroes_end), ## (troop_slot_eq, ":hero_no", slot_troop_is_prisoner, 0), ## (troop_slot_eq, ":hero_no", slot_troop_occupation, slto_kingdom_hero), ## (store_troop_faction, ":hero_faction", ":hero_no"), ## (eq, ":hero_faction", "$players_kingdom"), ## (call_script, "script_get_number_of_hero_centers", "$g_talk_troop"), ## (assign, ":no_of_owned_centers", reg0), ## (neg|faction_slot_eq, "$players_kingdom", slot_faction_leader, ":hero_no"), ## (lt, ":no_of_owned_centers", 2), ## (troop_get_slot, ":wealth", "$g_talk_troop", slot_troop_wealth), ## (ge, ":wealth", ":max_wealth"), ## (assign, ":new_master", ":hero_no"), ## (assign, ":max_wealth", ":wealth"), ## (try_end), ## ## (call_script, "script_give_center_to_lord", "$center_to_be_claimed", ":new_master"), ## (set_spawn_radius, 1), ## (spawn_around_party, "$center_to_be_claimed", "pt_old_garrison"), ## (assign, ":new_party", reg0), ## (party_set_ai_behavior, ":new_party", ai_bhvr_attack_party), ## (party_set_ai_object, ":new_party", "p_main_party"), ## (party_set_flags, ":new_party", pf_default_behavior, 0), ## (call_script, "script_party_copy", ":new_party", "$center_to_be_claimed"), ## (party_clear, "$center_to_be_claimed"), ## ## (faction_get_slot, ":reinforcement_template_a", "$g_talk_troop_faction", slot_faction_reinforcements_a), ## (faction_get_slot, ":reinforcement_template_b", "$g_talk_troop_faction", slot_faction_reinforcements_b), ## (party_add_template, "$center_to_be_claimed", ":reinforcement_template_a"), ## (party_add_template, "$center_to_be_claimed", ":reinforcement_template_b"), ## ]], ## ## ## [anyone,"lord_claim_center_2", [(assign, ":number_of_claimed_centers", 0), ## (try_for_range, ":center_no", centers_begin, centers_end), ## (party_slot_eq, ":center_no", slot_party_type, spt_castle), ## (store_faction_of_party, ":faction_no", ":center_no"), ## (eq, ":faction_no", "fac_player_supporters_faction"), ## (party_slot_eq, ":center_no", slot_town_claimed_by_player, 1), ## (val_add, ":number_of_claimed_centers", 1), ## (try_end), ## (lt, ":number_of_claimed_centers", "$g_player_permitted_castles"), ## (assign, reg7, ":number_of_claimed_centers"), ## ], ## "I had promised you to defend your right to hold {reg7?a:another} castle {playername}. Now I honor that promise.\ ## I can think of {no man finer than you/no one better than you} to be the {lord/lady} of {s4}.\ ## Renew your oath to me now. Then I will be your liege,\ ## and I'll support you and protect you against all those who oppose your claim.", ## "lord_claim_center_give_oath",[]], ## ## ## [anyone|plyr,"lord_claim_center_give_oath", [], "I give you my oath lord, I will forever be faithful to you,\ ## I will never act in a way to cause you harm, and I will be at your side to fight your enemies should you need my sword.", "lord_claim_center_direct_3", []], ## [anyone,"lord_claim_center_direct_3", [], "You have given your oath of fealty {playername}. I accept your oath and give you the fief of {s4}.\ ## Rule it wisely and protect it against our enemies.", "lord_claim_center_direct_4", [ ## (party_set_slot, "$center_to_be_claimed", slot_town_claimed_by_player, 1), ## (call_script, "script_give_center_to_lord", "$center_to_be_claimed", "trp_player")]], ## [anyone|plyr,"lord_claim_center_direct_4", [], "I thank you lord.", "close_window", [(assign, "$g_leave_encounter",1)]], #Ask for favor ## [anyone,"lord_ask_for_favor_ask", [], ## "What is it? I don't have time for personal requests.", "lord_ask_for_favor",[]], ## [anyone,"lord_ask_for_favor_ask", [], ## "Say it then. If it's something possible...", "lord_ask_for_favor",[]], ## ## [anyone|plyr,"lord_ask_for_favor", [], ## "Nothing my lord. It's not important.", "lord_pretalk",[]], #Suggest action [anyone,"lord_suggest_action_ask", [], "What do you suggest?", "lord_suggest_action",[]], [anyone|plyr,"lord_suggest_action", [], "I want to join your faction.", "lord_suggest_join_faction",[]], [anyone,"lord_suggest_join_faction", [], "Alright then.", "lord_give_oath_5",[]], [anyone|plyr,"lord_suggest_action", [], "Cheat:I want to know your leaded party ID.", "lord_suggest_learn_party_id",[]], [anyone,"lord_suggest_learn_party_id", [(troop_get_slot, reg0, "$g_talk_troop", slot_troop_leaded_party)], "It is {reg0}.", "lord_pretalk",[]], [anyone|plyr,"lord_suggest_action", [(eq, "$players_kingdom", "$g_talk_troop_faction"),], "I want to be your kingdom's marshall.", "lord_suggest_become_marshall",[]], [anyone,"lord_suggest_become_marshall", [], "Alright then.", "lord_pretalk", [ (faction_set_slot, "$g_talk_troop_faction", slot_faction_marshall, "trp_player"), (faction_set_slot, "$g_talk_troop_faction", slot_faction_ai_state, sfai_default), (assign, "$g_recalculate_ais", 1), ]], [anyone|plyr,"lord_suggest_action", [(neq, "$talk_context", tc_siege_commander)], "Let us attack an enemy town or castle.", "lord_suggest_attack_enemy_castle",[]], [anyone|plyr,"lord_suggest_action", [(neq, "$talk_context", tc_siege_commander)], "Let us return back to a friendly town.", "lord_suggest_go_to_friendly_town",[]], [anyone|plyr,"lord_suggest_action", [(neq, "$talk_context", tc_siege_commander)], "Let us attack an enemy war party.", "lord_suggest_attack_enemy_party",[]], [anyone|plyr,"lord_suggest_action", [(eq, "$talk_context", tc_siege_commander)], "Let us lift this siege.", "lord_suggest_lift_siege",[]], [anyone|plyr,"lord_suggest_action", [(neq, "$talk_context", tc_siege_commander)], "Follow me.", "lord_suggest_follow_me",[]], [anyone|plyr,"lord_suggest_action", [(neq, "$talk_context", tc_siege_commander)], "Follow someone.", "lord_suggest_follow_other",[]], [anyone|plyr,"lord_suggest_action", [(neq, "$talk_context", tc_siege_commander)], "Raid a village.", "lord_suggest_raid_village",[]], [anyone|plyr,"lord_suggest_action", [], "Like me.", "lord_pretalk",[(call_script,"script_change_player_relation_with_troop","$g_talk_troop",20)]], [anyone,"lord_suggest_lift_siege", [], "As you wish, {playername}.", "close_window",[(call_script, "script_party_set_ai_state", "$g_talk_troop_party", spai_undefined), (party_leave_cur_battle, "$g_talk_troop_party"), (assign, "$g_leave_encounter", 1)]], [anyone,"lord_suggest_go_to_friendly_town", [], "Hmm. Which town or castle do you suggest we go to?", "lord_suggest_go_to_friendly_town2",[]], [anyone|plyr|repeat_for_parties,"lord_suggest_go_to_friendly_town2", [ (store_repeat_object, ":center_no"), (this_or_next|party_slot_eq,":center_no",slot_party_type, spt_castle), (party_slot_eq,":center_no",slot_party_type, spt_town), (neq, ":center_no", "$g_encountered_party"), (store_faction_of_party, ":town_faction", ":center_no"), (eq, ":town_faction", "$g_talk_troop_faction"), (str_store_party_name, s1, ":center_no")], "{s1}", "lord_suggest_go_to_friendly_town3",[(store_repeat_object, "$town_suggested_to_go_to")]], [anyone|plyr,"lord_suggest_go_to_friendly_town2", [], "Never mind.", "lord_pretalk",[]], [anyone,"lord_suggest_go_to_friendly_town3", [(str_store_party_name, 1, "$town_suggested_to_go_to")], "Very well, we go to {s1}.", "lord_pretalk", [ (call_script, "script_party_set_ai_state", "$g_talk_troop_party", spai_holding_center, "$town_suggested_to_go_to"), ]], [anyone,"lord_suggest_attack_enemy_party", [], "Hmm. Which party do you suggest we attack?", "lord_suggest_attack_enemy_party2",[]], [anyone|plyr|repeat_for_parties,"lord_suggest_attack_enemy_party2", [ (store_repeat_object, ":party_no"), (party_slot_eq,":party_no",slot_party_type, spt_kingdom_hero_party), (party_is_active, ":party_no"), (store_faction_of_party, ":party_faction", ":party_no"), (store_relation, ":party_relation", ":party_faction", "$g_talk_troop_faction"), (le, ":party_relation", -10), (call_script, "script_get_closest_walled_center", ":party_no"), (assign, ":center_no", reg0), (str_store_party_name, s3, ":center_no"), (str_store_faction_name, s2, ":party_faction"), (str_store_party_name, s1, ":party_no")], "{s1} of {s2} around {s3}", "lord_suggest_attack_enemy_party3",[(store_repeat_object, "$suggested_to_attack_party")]], [anyone|plyr,"lord_suggest_attack_enemy_party2", [], "Never mind.", "lord_pretalk",[]], [anyone,"lord_suggest_attack_enemy_party3", [(str_store_party_name, 1, "$suggested_to_attack_party")], "As you wish, we will attack {s1}.", "lord_pretalk", [ (call_script, "script_party_set_ai_state", "$g_talk_troop_party", spai_engaging_army, "$suggested_to_attack_party"), ]], ## [anyone,"lord_suggest_attack_enemy_castle", [(troop_get_slot, ":player_favor", "$g_talk_troop", slot_troop_player_favor), ## (lt, ":player_favor", 20)], ## "Hmm. No, I don't think that's a good idea.", "lord_pretalk",[]], [anyone,"lord_suggest_attack_enemy_castle", [], "Hmm. Which one do you suggest we attack?", "lord_suggets_attack_enemy_castle2",[]], [anyone|plyr|repeat_for_parties,"lord_suggets_attack_enemy_castle2", [ (store_repeat_object, ":center_no"), (this_or_next|party_slot_eq,":center_no",slot_party_type, spt_castle), (party_slot_eq,":center_no",slot_party_type, spt_town), (store_faction_of_party, ":town_faction", ":center_no"), (store_relation, ":town_relation", ":town_faction", "$g_talk_troop_faction"), (le, ":town_relation", -10), (str_store_faction_name, s2, ":town_faction"), (str_store_party_name, s1, ":center_no")], "{s1} of {s2}", "lord_suggets_attack_enemy_castle3",[(store_repeat_object, "$suggested_to_attack_center")]], [anyone|plyr,"lord_suggets_attack_enemy_castle2", [], "Never mind my lord.", "lord_pretalk",[]], [anyone,"lord_suggets_attack_enemy_castle3", [(str_store_party_name, 1, "$suggested_to_attack_center")], "That should be possible. Very well, we'll attack {s1}.", "lord_pretalk", [ (call_script, "script_party_set_ai_state", "$g_talk_troop_party", spai_besieging_center, "$suggested_to_attack_center"), ]], [anyone,"lord_suggest_raid_village", [], "Hmm. Which village do you suggest we attack?", "lord_suggest_raid_village_2",[]], [anyone|plyr|repeat_for_parties,"lord_suggest_raid_village_2", [ (store_repeat_object, ":center_no"), (party_slot_eq,":center_no",slot_party_type, spt_village), (store_faction_of_party, ":town_faction", ":center_no"), (store_relation, ":town_relation", ":town_faction", "$g_talk_troop_faction"), (le, ":town_relation", -10), (str_store_faction_name, s2, ":town_faction"), (str_store_party_name, s1, ":center_no")], "{s1} of {s2}", "lord_suggest_raid_village_3",[(store_repeat_object, "$suggested_to_attack_center")]], [anyone|plyr,"lord_suggest_raid_village_2", [], "Never mind.", "lord_pretalk",[]], [anyone,"lord_suggest_raid_village_3", [(str_store_party_name, s1, "$suggested_to_attack_center")], "That should be possible. Very well, we'll attack {s1}.", "lord_pretalk", [ (call_script, "script_party_set_ai_state", "$g_talk_troop_party", spai_raiding_around_center, "$suggested_to_attack_center"), ]], [anyone,"lord_suggest_follow_me", [], "Aye, I'll follow you.", "lord_pretalk",[(party_set_slot, "$g_talk_troop_party", slot_party_commander_party, "p_main_party"), (call_script, "script_party_decide_next_ai_state_under_command", "$g_talk_troop_party")]], [anyone,"lord_suggest_follow_other", [], "Who do you want me to follow?", "lord_suggest_follow_other_2",[]], [anyone|plyr|repeat_for_parties,"lord_suggest_follow_other_2", [ (store_repeat_object, ":party_no"), (party_slot_eq,":party_no",slot_party_type, spt_kingdom_hero_party), (neq, ":party_no", "$g_talk_troop"), (store_faction_of_party, ":party_faction", ":party_no"), (eq, ":party_faction", "$g_talk_troop_faction"), (str_store_party_name, s1, ":party_no")], "{s1}", "lord_suggest_follow_other_3",[(store_repeat_object, "$town_suggested_to_go_to")]], [anyone|plyr,"lord_suggest_follow_other_2", [], "Never mind.", "lord_pretalk",[]], [anyone,"lord_suggest_follow_other_3", [(str_store_party_name, 1, "$town_suggested_to_go_to")], "As you wish, I shall be accompanying {s1}.", "lord_pretalk", [ (party_set_slot, "$g_talk_troop_party", slot_party_commander_party, "$town_suggested_to_go_to"), (call_script, "script_party_decide_next_ai_state_under_command", "$g_talk_troop_party"), ]], [anyone|plyr,"lord_suggest_action", [], "Nothing, {s65}. It's not important.", "lord_pretalk",[]], ##### TODO: QUESTS COMMENT OUT BEGIN #Request Mission [anyone|auto_proceed,"lord_request_mission_ask", [(eq, "$players_kingdom", 0), (ge, "$g_talk_troop_faction_relation", 0), (ge, "$g_talk_troop_relation", 0), (troop_slot_ge, "trp_player", slot_troop_renown, 30), (neg|faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"), (faction_get_slot, ":last_offer_time", "$g_talk_troop_faction", slot_faction_last_mercenary_offer_time), (assign, ":num_enemies", 0), (try_for_range, ":faction_no", kingdoms_begin, kingdoms_end), (faction_slot_eq, "$g_talk_troop_faction", slot_faction_state, sfs_active), (store_relation, ":reln", "$g_talk_troop_faction", ":faction_no"), (lt, ":reln", 0), (val_add, ":num_enemies", 1), (try_end), (ge, ":num_enemies", 1), (store_current_hours, ":cur_hours"), (store_add, ":week_past_last_offer_time", ":last_offer_time", 7 * 24), (val_add, ":last_offer_time", 24), (ge, ":cur_hours", ":last_offer_time"), (store_random_in_range, ":rand", 0, 100), (this_or_next|lt, ":rand", 20), ( ge, ":cur_hours", ":week_past_last_offer_time"), ], "Warning: This line should never display.", "lord_propose_mercenary",[(store_current_hours, ":cur_hours"), (faction_set_slot, "$g_talk_troop_faction", slot_faction_last_mercenary_offer_time, ":cur_hours")]], [anyone,"lord_propose_mercenary", [(call_script, "script_party_calculate_strength", "p_main_party", 0), (assign, ":offer_value", reg0), (val_add, ":offer_value", 100), (call_script, "script_round_value", ":offer_value"), (assign, ":offer_value", reg0), (assign, "$temp", ":offer_value"), (faction_get_slot, ":faction_leader", "$g_talk_troop_faction", slot_faction_leader), (neq, ":faction_leader", "$g_talk_troop"), (str_store_faction_name, s9, "$g_talk_troop_faction"), (str_store_troop_name, s10, ":faction_leader"),], "As it happens, {playername}, I promised {s10} that I would hire a company of mercenaries for an upcoming campaign.\ What do you say to entering the service of {s9} as a mercenary captain?\ I've no doubt that you would be up to the task.", "lord_mercenary_service", []], [anyone|plyr,"lord_mercenary_service", [], "I'm not interested, thank you.", "lord_mercenary_service_reject", []], [anyone|plyr,"lord_mercenary_service", [], "Aye, I'll join {s9}.", "lord_mercenary_service_accept", []], [anyone|plyr,"lord_mercenary_service", [], "I'm interested. Please tell me more.", "lord_mercenary_elaborate_pay", []], [anyone,"lord_mercenary_service_accept", [(str_store_faction_name, s9, "$g_talk_troop_faction")], "Perfect. Of course you shall have to make a formal declaration of allegiance,\ and give your oath that you and your company will remain in service to {s9}\ for a period of no less than three months.", "lord_mercenary_service_verify", []], [anyone|plyr,"lord_mercenary_service_verify", [], "As you wish. Your enemies are my enemies.", "lord_mercenary_service_verify_2", []], [anyone|plyr,"lord_mercenary_service_verify", [], "On second thought, forget it.", "lord_mercenary_service_reject", []], [anyone,"lord_mercenary_service_verify_2", [], "That will do. You've made a wise choice, my friend.\ {s9} does well by its loyal fighters, you will receive many rewards for your service.", "lord_mercenary_service_accept_3", [ (call_script, "script_troop_add_gold", "trp_player", "$temp"), (store_current_hours, ":cur_hours"), (store_add, "$mercenary_service_next_pay_time", ":cur_hours", 7 * 24), (assign, "$mercenary_service_accumulated_pay", 0), (store_current_day, ":cur_day"), (store_add, "$mercenary_service_next_renew_day", ":cur_day", 90), (call_script, "script_player_join_faction", "$g_talk_troop_faction"), (str_store_faction_name, s9, "$g_talk_troop_faction"),]], [anyone,"lord_mercenary_service_accept_3", [], "Now, I suggest you prepare for a serious campaign.\ Train and equip your soldiers as best you can in the meantime, and respond quickly when you are summoned for duty.", "lord_pretalk", []], [anyone,"lord_mercenary_service_reject", [(str_store_faction_name, s9, "$g_talk_troop_faction")], "I'm very sorry to hear that. You'll find no better place than {s9}, be sure of that.", "lord_pretalk", []], [anyone,"lord_mercenary_elaborate_pay", [(assign, reg12, "$temp")], "I can offer you a contract for three months. At the end of those three, it can be extended month by month.\ An initial sum of {reg12} denars will be paid to you to seal the contract.\ After that, you'll receive wages from {s10} each week, according to the number and quality of the soldiers in your company.\ You still have your rights to battlefield loot and salvage, as well as any prisoners you capture.\ War can be very profitable at times...", "lord_mercenary_elaborate_1", [(faction_get_slot, ":faction_leader", "$g_talk_troop_faction", slot_faction_leader), (str_store_troop_name, s10, ":faction_leader")]], [anyone,"lord_mercenary_service_elaborate_duty", [], "Duties... There are only a few, none of them difficult. The very first thing is to declare your allegiance.\ An oath of loyalty to our cause. Once that's done, you shall be required to fulfill certain responsibilities.\ You'll participate in military campaigns, fulfill any duties given to you by your commanders,\ and most of all you shall attack the enemies of our kingdom wherever you might find them.", "lord_mercenary_elaborate_1", [(faction_get_slot, ":faction_leader", "$g_talk_troop_faction", slot_faction_leader), (str_store_troop_name, s10, ":faction_leader")]], [anyone|plyr,"lord_mercenary_elaborate_1", [], "And what about my duties as a mercenary?", "lord_mercenary_service_elaborate_duty", []], [anyone|plyr,"lord_mercenary_elaborate_1", [], "Can I hold on to any castles I take?", "lord_mercenary_elaborate_castle", []], [anyone|plyr,"lord_mercenary_elaborate_1", [ (neg|troop_slot_ge, "trp_player", slot_troop_banner_scene_prop, 1), #custom_banner begin ## (eq, "trp_player", slot_troop_custom_banner_flag_type, -1), #custom_banner end ], "Can I fly my own banner?", "lord_mercenary_elaborate_banner", []], [anyone|plyr,"lord_mercenary_elaborate_1", [], "How much will you pay me for my service?", "lord_mercenary_elaborate_pay", []], [anyone|plyr,"lord_mercenary_elaborate_1", [], "Sounds good. I wish to enter your service as a mercenary.", "lord_mercenary_service_accept", []], [anyone|plyr,"lord_mercenary_elaborate_1", [], "Apologies, my sword is not for hire.", "lord_mercenary_service_reject", []], [anyone,"lord_mercenary_elaborate_castle", [(faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop")], "Only my loyal vassals can own lands and castles in my realm.\ A mercenary can not be trusted with such a responsibility.\ However, after serving for some time, you can swear homage to me and become my vassal.\ Then you will be rewarded with a fief.", "lord_mercenary_elaborate_1", []], [anyone,"lord_mercenary_elaborate_castle", [], "Only loyal vassals of {s10} can own lands and castles.\ You understand, a simple mercenary cannot be trusted with such responsibility.\ However, after serving for some time, you may earn the right to swear homage to {s10} and become his vassal.\ Then you would be rewarded with a fief.", "lord_mercenary_elaborate_1", []], [anyone,"lord_mercenary_elaborate_banner", [(faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop")], "Only my noble vassals have the honour of carrying their own banners.\ However, after some time in mercenary service, you may earn the opportunity to swear homage to me and become my vassal,\ gaining the right to choose a banner of your own and fight under it in battle.", "lord_mercenary_elaborate_1", []], [anyone,"lord_mercenary_elaborate_banner", [], "Only noble vassals of {s10} have the honour of carrying their own banners.\ However, after some time of mercenary service, perhaps you can earn the opportunity to swear homage to {s10} and become his vassal,\ gaining the right to choose a banner of your own and fight under it in battle.", "lord_mercenary_elaborate_1", []], [anyone,"lord_request_mission_ask", [(store_partner_quest,":lords_quest"),(ge,":lords_quest",0)], "You still haven't finished the last job I gave you, {playername}. You should be working on that, not asking me for other things to do.", "lord_pretalk",[]], [anyone,"lord_request_mission_ask", [(troop_slot_eq, "$g_talk_troop", slot_troop_does_not_give_quest, 1)], "I don't have any other jobs for you right now.", "lord_pretalk",[]], [anyone|auto_proceed,"lord_request_mission_ask", [], "A task?", "lord_tell_mission", [ (call_script, "script_get_random_quest", "$g_talk_troop"), (assign, "$random_quest_no", reg0), ]], [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_deliver_message")], "I need to send a letter to {s13} who should be currently at {s4}.\ If you will be heading towards there, would you deliver it to him?\ The letter needs to be in his hands in 30 days.", "lord_mission_deliver_message", [ (quest_get_slot, ":quest_target_troop", "$random_quest_no", slot_quest_target_troop), (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), (str_store_troop_name_link,s9,"$g_talk_troop"), (str_store_troop_name_link,s13,":quest_target_troop"), (str_store_party_name_link,s4,":quest_target_center"), (setup_quest_text,"$random_quest_no"), ## (try_begin), ## (is_between, "$g_encountered_party", centers_begin, centers_end), ## (setup_quest_giver, "$random_quest_no", "str_given_by_s1_at_s2"), ## (else_try), ## (setup_quest_giver,"$random_quest_no", "str_given_by_s1_in_wilderness"), ## (try_end), (str_store_string, s2, "@{s9} asked you to take a message to {s13}. {s13} was believed to be at {s4} when you were given this quest."), ]], [anyone|plyr,"lord_mission_deliver_message", [], "Certainly, I intend to pass by {s4} and it would be no trouble.", "lord_mission_deliver_message_accepted",[]], [anyone|plyr,"lord_mission_deliver_message", [], "I doubt I'll be seeing {s13} anytime soon, {s65}. You'd best send it with someone else.", "lord_mission_deliver_message_rejected",[]], [anyone|plyr,"lord_mission_deliver_message", [], "I am no errand boy, sir. Hire a courier for your trivialities.", "lord_mission_deliver_message_rejected_rudely",[]], [anyone,"lord_mission_deliver_message_accepted", [], "I appreciate it, {playername}. Here's the letter,\ and a small sum to cover your travel expenses. Give my regards to {s13} when you see him.", "close_window", [(call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"), (call_script, "script_troop_add_gold", "trp_player",30), (call_script, "script_change_player_relation_with_troop","$g_talk_troop",1), (assign, "$g_leave_encounter",1), ]], [anyone,"lord_mission_deliver_message_rejected", [], "Ah, all right then. Well, I am sure I will find someone else.", "lord_pretalk", [(troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1)]], [anyone,"lord_mission_deliver_message_rejected_rudely", [], "Hm, is this how you respond to a polite request\ for a small favor? A poor show, {playername}. I didn't know you would take offence.", "lord_mission_deliver_message_rejected_rudely_2",[]], [anyone|plyr,"lord_mission_deliver_message_rejected_rudely_2", [], "Then you shall know better from now on.", "lord_mission_deliver_message_rejected_rudely_3",[]], [anyone|plyr,"lord_mission_deliver_message_rejected_rudely_2", [], "Forgive my temper, {s65}. I'll deliver your letter.", "lord_mission_deliver_message_accepted",[]], [anyone,"lord_mission_deliver_message_rejected_rudely_3", [], "All right. I will remember that.", "close_window",[ (call_script, "script_change_player_relation_with_troop","$g_talk_troop",-4), (quest_set_slot, "$random_quest_no", slot_quest_dont_give_again_remaining_days, 150), (troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1), (assign, "$g_leave_encounter",1), ]], [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_deliver_message_to_enemy_lord")], "I need to deliver a letter to {s13} of {s15}, who must be at {s4} currently.\ If you are going towards there, would you deliver my letter to him? The letter needs to reach him in 40 days.", "lord_mission_deliver_message", [ (quest_get_slot, ":quest_target_troop", "$random_quest_no", slot_quest_target_troop), (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), (str_store_troop_name_link,s9,"$g_talk_troop"), ## (str_store_party_name,2,"$g_encountered_party"), (str_store_troop_name_link,s13,":quest_target_troop"), (str_store_party_name_link,s4,":quest_target_center"), (store_troop_faction, ":target_faction", ":quest_target_troop"), (str_store_faction_name_link,s15,":target_faction"), (setup_quest_text,"$random_quest_no"), ## (try_begin), ## (is_between, "$g_encountered_party", centers_begin, centers_end), ## (setup_quest_giver, "$random_quest_no", "str_given_by_s1_at_s2"), ## (else_try), ## (setup_quest_giver,"$random_quest_no", "str_given_by_s1_in_wilderness"), ## (try_end), (str_store_string, s2, "@{s9} asked you to take a message to {s13} of {s15}. {s13} was believed to be at {s4} when you were given this quest."), ]], ## ## [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_deliver_message_to_lover")], ## "My dear friend, I have a deep affection for {s3} and I believe she feels the same way for me as well.\ ## Alas, her father {s5} finds me unsuitable for her and will do anything to prevent our union.\ ## I really need your help. Please, will you take this letter to her? She should be at {s4} at the moment.", "lord_mission_told", ## [ ## (quest_get_slot, ":quest_target_troop", "$random_quest_no", slot_quest_target_troop), ## (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), ## (str_store_troop_name_link,1,"$g_talk_troop"), ## (str_store_party_name_link,2,"$g_encountered_party"), ## (str_store_troop_name_link,3,":quest_target_troop"), ## (str_store_party_name_link,4,":quest_target_center"), ## (setup_quest_text,"$random_quest_no"), ## (try_begin), ## (is_between, "$g_encountered_party", centers_begin, centers_end), ## (setup_quest_giver, "$random_quest_no", "str_given_by_s1_at_s2"), ## (else_try), ## (setup_quest_giver,"$random_quest_no", "str_given_by_s1_in_wilderness"), ## (try_end), ## ]], ## [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_escort_lady")], "There is a small thing... My {s17} {s13} is due for a visit to her relatives at {s14}.\ The visit has been postponed several times already with all the trouble on the roads,\ but this time she is adamant about going. So, I want to at least make sure she's well-guarded.\ I trust you well, {playername} so I would be very grateful if you could escort her to {s14}\ and make sure she arrives safe and sound.", "lord_mission_told", [ (quest_get_slot, ":quest_object_troop", "$random_quest_no", slot_quest_object_troop), (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), (try_begin), (troop_slot_eq, "$g_talk_troop", slot_troop_daughter, ":quest_object_troop"), (str_store_string, s17, "str_daughter"), (else_try), (str_store_string, s17, "str_wife"), (try_end), (str_store_troop_name_link, s11, "$g_talk_troop"), (str_store_troop_name_link, s13, ":quest_object_troop"), (str_store_party_name_link, s14, ":quest_target_center"), (setup_quest_text,"$random_quest_no"), (str_store_string, s2, "@{s11} asked you to escort his {s17} {s13} to {s14}."), ]], ## ## [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_hunt_down_raiders")], ## "A messenger came with important news a few hours ago.\ ## A group of enemy raiders have attacked a village near {s3}.\ ## They have murdered anyone who tried to resist, stolen everything they could carry and put the rest to fire.\ ## Now, they must be on their way back to their base at {s4}.\ ## You must catch them on the way and make them pay for their crimes.", "lord_mission_told", ## [ ## (quest_get_slot, ":quest_object_center", "$random_quest_no", slot_quest_object_center), ## (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), ## (str_store_party_name_link,3,":quest_object_center"), ## (str_store_party_name_link,4,":quest_target_center"), ## ]], ## ## [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_bring_back_deserters")], ## "I am worried about the growing number of deserters. If we don't do something about it, we may soon have noone left to fight in our wars.\ ## I want you to go now and bring back {reg1} {s3}. I would ask you to hang the bastards but we are short of men and we need them back in the ranks.", "lord_mission_told", ## [ ## (quest_get_slot, ":quest_target_amount", "$random_quest_no", slot_quest_target_amount), ## (quest_get_slot, ":quest_target_troop", "$random_quest_no", slot_quest_target_troop), ## ## (str_store_troop_name_link,1,"$g_talk_troop"), ## (str_store_party_name_link,2,"$g_encountered_party"), ## (str_store_troop_name_plural,3,":quest_target_troop"), ## (assign, reg1, ":quest_target_amount"), ## (setup_quest_text,"$random_quest_no"), ## (try_begin), ## (is_between, "$g_encountered_party", centers_begin, centers_end), ## (setup_quest_giver, "$random_quest_no", "str_given_by_s1_at_s2"), ## (else_try), ## (setup_quest_giver,"$random_quest_no", "str_given_by_s1_in_wilderness"), ## (try_end), ## ]], ## ## [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_deliver_supply_to_center_under_siege")], ## "The enemy has besieged {s5}. Our brothers there are doing their best to fend off attacks, but they can't hold for long without supplies.\ ## We need someone to take the supplies they need and make it into the town as soon as possible.\ ## It's a very dangerous job, but if there's one person who can do it, it's you {playername}.\ ## You can take the supplies from seneschal {s3}. When you arrive at {s5}, give them to the seneschal of that town.", "lord_mission_told", ## [ ## (quest_get_slot, ":quest_target_amount", "$random_quest_no", slot_quest_target_amount), ## (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), ## (quest_get_slot, ":quest_object_troop", "$random_quest_no", slot_quest_object_troop), ## (quest_get_slot, ":quest_target_troop", "$random_quest_no", slot_quest_target_troop), ## ## (str_store_troop_name_link,1,"$g_talk_troop"), ## (str_store_party_name_link,2,"$g_encountered_party"), ## (str_store_troop_name_link,3,":quest_object_troop"), ## (str_store_troop_name,4,":quest_target_troop"), ## (str_store_party_name_link,5,":quest_target_center"), ## (assign, reg1, ":quest_target_amount"), ## (setup_quest_text,"$random_quest_no"), ## (try_begin), ## (is_between, "$g_encountered_party", centers_begin, centers_end), ## (setup_quest_giver, "$random_quest_no", "str_given_by_s1_at_s2"), ## (else_try), ## (setup_quest_giver,"$random_quest_no", "str_given_by_s1_in_wilderness"), ## (try_end), ## ]], ## ## [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_bring_reinforcements_to_siege")], ## "{s4} has besieged {s5} and God willing, that town will not hold for long.\ ## Still I promised him to send {reg1} {s3} as reinforcements and I need someone to lead those men.\ ## Can you take them to {s4}?", "lord_mission_told", ## [ ## (quest_get_slot, ":quest_target_amount", "$random_quest_no", slot_quest_target_amount), ## (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), ## (quest_get_slot, ":quest_object_troop", "$random_quest_no", slot_quest_object_troop), ## (quest_get_slot, ":quest_target_troop", "$random_quest_no", slot_quest_target_troop), ## ## (str_store_troop_name_link,1,"$g_talk_troop"), ## (str_store_party_name_link,2,"$g_encountered_party"), ## (str_store_troop_name_plural,3,":quest_object_troop"), ## (str_store_troop_name_link,4,":quest_target_troop"), ## (str_store_party_name_link,5,":quest_target_center"), ## (assign, reg1, ":quest_target_amount"), ## (setup_quest_text,"$random_quest_no"), ## (try_begin), ## (is_between, "$g_encountered_party", centers_begin, centers_end), ## (setup_quest_giver, "$random_quest_no", "str_given_by_s1_at_s2"), ## (else_try), ## (setup_quest_giver,"$random_quest_no", "str_given_by_s1_in_wilderness"), ## (try_end), ## ]], ## ## [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_rescue_lady_under_siege")], ## "The enemy has besieged {s4} and my dear {s7} {s3} has been trapped within the town walls.\ ## As you may guess, I am greatly distressed by this. I need a very reliable commander, to rescue her from the town and bring her back to me.\ ## Will you do that {playername}?", "lord_mission_told", ## [ ## (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), ## (quest_get_slot, ":quest_object_troop", "$random_quest_no", slot_quest_object_troop), ## ## (try_begin), ## (troop_slot_eq, "$g_talk_troop", slot_troop_daughter, ":quest_object_troop"), ## (str_store_string, s7, "str_daughter"), ## (else_try), ## (str_store_string, s7, "str_wife"), ## (try_end), ## ## (str_store_troop_name_link,1,"$g_talk_troop"), ## (str_store_party_name_link,2,"$g_encountered_party"), ## (str_store_troop_name_link,3,":quest_object_troop"), ## (str_store_party_name_link,4,":quest_target_center"), ## (setup_quest_text,"$random_quest_no"), ## (try_begin), ## (is_between, "$g_encountered_party", centers_begin, centers_end), ## (setup_quest_giver, "$random_quest_no", "str_given_by_s1_at_s2"), ## (else_try), ## (setup_quest_giver,"$random_quest_no", "str_given_by_s1_in_wilderness"), ## (try_end), ## ]], ## ## ## [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_bring_prisoners_to_enemy")], ## "The enemy wants to ransom some of their soldiers that we captured at the last battle.\ ## They'll pay 100 denars in return for giving them back {reg1} {s3}.\ ## God knows I can use that money so I accepted their offer.\ ## Now, what I need is someone to take the prisoners to {s4} and come back with the money.", "lord_mission_told", ## [ ## (quest_get_slot, ":quest_object_troop", "$random_quest_no", slot_quest_object_troop), ## (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), ## (quest_get_slot, reg1, "$random_quest_no", slot_quest_target_amount), ## (str_store_troop_name_link,1,"$g_talk_troop"), ## (str_store_party_name_link,2,"$g_encountered_party"), ## (str_store_troop_name_plural,3,":quest_object_troop"), ## (str_store_party_name_link,4,":quest_target_center"), ## (setup_quest_text,"$random_quest_no"), ## (try_begin), ## (is_between, "$g_encountered_party", centers_begin, centers_end), ## (setup_quest_giver, "$random_quest_no", "str_given_by_s1_at_s2"), ## (else_try), ## (setup_quest_giver,"$random_quest_no", "str_given_by_s1_in_wilderness"), ## (try_end), ## ]], ## # Deal with bandits [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_deal_with_bandits_at_lords_village")], "A group of bandits have taken refuge in my village of {s1}.\ They are plundering nearby farms, and getting rich and fat stealing my taxes and feasting on my cattle.\ I'd like nothing better than to go out there and teach them a lesson,\ but I have my hands full at the moment, so I can't do anything about it.", "lord_mission_deal_with_bandits_told", [ (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), (str_store_party_name_link,s15,":quest_target_center"), (str_store_troop_name_link,s13,"$g_talk_troop"), (setup_quest_text,"$random_quest_no"), (str_store_string, s2, "@{s13} asked you to deal with the bandits who are occupying the village of {s15} and then report back to him."), ]], [anyone|plyr,"lord_mission_deal_with_bandits_told", [], "Worry not, I can go to {s1} and deal with these scum for you.", "lord_mission_deal_with_bandits_accepted",[]], [anyone|plyr,"lord_mission_deal_with_bandits_told", [], "You shall have to find help elsewhere, I am too busy.", "lord_mission_deal_with_bandits_rejected",[]], [anyone,"lord_mission_deal_with_bandits_accepted", [], "Will you do that?\ Know that, I will be grateful to you. Here is some money for the expenses of your campaign.\ Make an example of those {s44}s.", "close_window", [ (troop_get_slot, ":insult_string", "$g_talk_troop", slot_lord_reputation_type), (val_add, ":insult_string", "str_lord_insult_default"), (str_store_string, 44, ":insult_string"), (call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"), (call_script, "script_troop_add_gold", "trp_player", 200), (call_script, "script_change_player_relation_with_troop","$g_talk_troop",3), (assign, "$g_leave_encounter",1), ]], [anyone,"lord_mission_deal_with_bandits_rejected", [], "Ah... Very well then, forget I brought it up.", "lord_pretalk", [(troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1)]], # Raise troops [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_raise_troops")], "No lord should have to admit this, {playername}, but I was inspecting my soldiers the other day\ and there are men here who don't know which end of a sword to hold.\ {s44}\ You are a warrior of renown, {playername}. Will you train some troops for me?\ I would be grateful to you.", "lord_tell_mission_raise_troops",[ (troop_get_slot, ":training_string", "$g_talk_troop", slot_lord_reputation_type), (val_add, ":training_string", "str_troop_train_request_default"), (str_store_string, 44, ":training_string") ]], [anyone|plyr,"lord_tell_mission_raise_troops", [], "How many men do you need?", "lord_tell_mission_raise_troops_2",[]], [anyone,"lord_tell_mission_raise_troops_2", [], "If you can raise {reg1} {s14} and bring them to me, that will probably be enough.", "lord_mission_raise_troops_told", [ (quest_get_slot, ":quest_target_troop", "$random_quest_no", slot_quest_target_troop), (quest_get_slot, reg1, "$random_quest_no", slot_quest_target_amount), (str_store_troop_name_link,s9,"$g_talk_troop"), (str_store_troop_name_plural,s14,":quest_target_troop"), (setup_quest_text,"$random_quest_no"), (str_store_string, s2, "@{s9} asked you to raise {reg1} {s14} and bring them to him."), ]], [anyone|plyr,"lord_mission_raise_troops_told", [(quest_get_slot, reg1, "$random_quest_no", slot_quest_target_amount)], "Of course, {s65}. Give me {reg1} fresh recruits and I'll train them to be {s14}.", "lord_mission_raise_troops_accepted",[]], [anyone|plyr,"lord_mission_raise_troops_told", [], "I am too busy these days to train anyone.", "lord_mission_raise_troops_rejected",[]], [anyone,"lord_mission_raise_troops_accepted", [], "You've taken a weight off my shoulders, {playername}.\ I shall tell my sergeants to send you the recruits and attach them to your command.\ Also, I'll advance you some money to help with expenses. Here, this purse should do it.\ Thank you for your help.", "close_window", [(call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"), (call_script, "script_troop_add_gold", "trp_player",100), (quest_get_slot, ":recruit_troop", "$random_quest_no", slot_quest_object_troop), (quest_get_slot, ":num_recruits", "$random_quest_no", slot_quest_target_amount), (party_add_members, "p_main_party", ":recruit_troop", ":num_recruits"), (call_script, "script_change_player_relation_with_troop","$g_talk_troop",2), (assign, "$g_leave_encounter",1), ]], [anyone,"lord_mission_raise_troops_rejected", [], "Oh, of course. I had expected as much. Well, good luck to you then.", "lord_pretalk", [(troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1)]], #Collect Taxes [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_collect_taxes"), (assign, reg9, 0), (try_begin), (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), (party_slot_eq, ":quest_target_center", slot_party_type, spt_town), (assign, reg9, 1), (try_end), ], "You probably know that I am the lord of the {reg9?town:village} of {s3}.\ However, it has been months since {s3} has delivered the taxes and rents due me as its rightful lord.\ Apparently the populace there has grown unruly lately and I need someone to go there and remind them of\ their obligations. And to . . . persuade them if they won't listen.\ If you go there and raise the taxes they owe me, I will grant you one-fifth of everything you collect.", "lord_mission_collect_taxes_told", [ (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), (str_store_troop_name_link,s9,"$g_talk_troop"), (str_store_party_name_link,s3,":quest_target_center"), (setup_quest_text,"$random_quest_no"), (str_store_string, s2, "@{s9} asked you to collect taxes from {s3}. He offered to leave you one-fifth of all the money you collect there."), ]], [anyone|plyr,"lord_mission_collect_taxes_told", [], "A fair offer, {s65}. We have an agreement.", "lord_mission_collect_taxes_accepted",[]], [anyone|plyr,"lord_mission_collect_taxes_told", [], "Forgive me, I don't have the time.", "lord_mission_collect_taxes_rejected",[]], [anyone,"lord_mission_collect_taxes_accepted", [], "Welcome news, {playername}.\ I will entrust this matter to you.\ Remember, those {reg9?townsmen:peasants} are foxy beasts, they will make every excuse not to pay me my rightful incomes.\ Do not let them fool you.", "close_window", [(call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"), (call_script, "script_change_player_relation_with_troop","$g_talk_troop",2), (assign, "$g_leave_encounter",1), (assign, reg9, 0), (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), (try_begin), (party_slot_eq, ":quest_target_center", slot_party_type, spt_town), (assign, reg9, 1), (try_end), ]], [anyone,"lord_mission_collect_taxes_rejected", [], "Oh, yes. Well, good luck to you then.", "lord_pretalk", [(troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1)]], #Hunt down fugitive [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_hunt_down_fugitive")], "I have something you could help with, an issue with the lawless villain known as {s4}. \ He murdered one of my men and has been on the run from his judgment ever since.\ I can't let him get away with avoiding justice, so I've put a bounty of 300 denars on his head.\ Friends of the murdered man reckon that this assassin may have taken refuge with his kinsmen at {s3}.\ You might be able to hunt him down and give him what he deserves, and claim the bounty for yourself.", "lord_mission_hunt_down_fugitive_told", [ (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), (quest_get_slot, ":quest_target_dna", "$random_quest_no", slot_quest_target_dna), (str_store_troop_name_link,s9, "$g_talk_troop"), (str_store_party_name_link,s3, ":quest_target_center"), (call_script, "script_get_name_from_dna_to_s50", ":quest_target_dna"), (str_store_string, s4, s50), (setup_quest_text, "$random_quest_no"), (str_store_string, s2, "@{s9} asked you to hunt down a fugitive named {s4}. He is currently believed to be at {s3}."), ]], [anyone|plyr,"lord_mission_hunt_down_fugitive_told", [], "Then I will hunt him down and execute the law.", "lord_mission_hunt_down_fugitive_accepted",[]], [anyone|plyr,"lord_mission_hunt_down_fugitive_told", [], "I am too busy to go after him at the moment.", "lord_mission_hunt_down_fugitive_rejected",[]], [anyone,"lord_mission_hunt_down_fugitive_accepted", [], "That's excellent, {playername}.\ I will be grateful to you and so will the family of the man he murdered.\ And of course the bounty on his head will be yours if you can get him.\ Well, good hunting to you.", "close_window", [(call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"), (call_script, "script_change_player_relation_with_troop","$g_talk_troop",3), (assign, "$g_leave_encounter",1), ]], [anyone,"lord_mission_hunt_down_fugitive_rejected", [], "As you wish, {playername}.\ I suppose there are plenty of bounty hunters around to get the job done . . .", "lord_pretalk", [(troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1)]], ## [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_capture_messenger")], ## "The enemy seems to be preparing for some kind of action and I want to know what their plans are.\ ## Capture one of their messengers and bring him to me.", "lord_mission_told", ## [ ## (quest_get_slot, ":quest_target_troop", "$random_quest_no", slot_quest_target_troop), ## ## (str_store_troop_name_link,1,"$g_talk_troop"), ## (str_store_party_name_link,2,"$g_encountered_party"), ## (str_store_troop_name,3,":quest_target_troop"), ## (setup_quest_text,"$random_quest_no"), ## (try_begin), ## (is_between, "$g_encountered_party", centers_begin, centers_end), ## (setup_quest_giver, "$random_quest_no", "str_given_by_s1_at_s2"), ## (else_try), ## (setup_quest_giver,"$random_quest_no", "str_given_by_s1_in_wilderness"), ## (try_end), ## ]], ## [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_kill_local_merchant")], "The wretched truth is that I owe a considerable sum of money to one of the merchants here in {s3}.\ I've no intention of paying it back, of course, but that loud-mouthed fool is making a terrible fuss about it.\ He even had the audacity to come and threaten me -- me! --\ with a letter of complaint to the trade guilds and bankers. Why, he'd ruin my good reputation!\ So I need a {man/woman} I can trust, someone who will guarantee the man's silence. For good.", "lord_mission_told_kill_local_merchant", [ (str_store_troop_name_link,s9,"$g_talk_troop"), (str_store_party_name_link,s3,"$current_town"), (setup_quest_text,"$random_quest_no"), (str_store_string, s2, "@{s9} asked you to assassinate a local merchant at {s3}."), ]], [anyone|plyr,"lord_mission_told_kill_local_merchant", [], "Worry not, he shan't breathe a word.", "lord_mission_accepted_kill_local_merchant",[]], [anyone|plyr,"lord_mission_told_kill_local_merchant", [], "I'm no common murderer, sir. Find someone else for your dirty job.", "lord_mission_rejected",[]], [anyone,"lord_mission_accepted_kill_local_merchant", [], "Very good. I trust in your skill and discretion,\ {playername}. Do not disappoint me.\ Go now and wait for my word, I'll send you a message telling when and where you can catch the merchant.\ Dispose of him for me and I shall reward you generously.", "close_window", [(call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"), (assign, "$g_leave_town",1), (assign, "$qst_kill_local_merchant_center", "$current_town"), (rest_for_hours, 10, 4, 0), (finish_mission), ]], [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_meet_spy_in_enemy_town"), (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), (str_store_party_name, s13, ":quest_target_center"), (store_faction_of_party,":quest_target_center_faction",), (str_store_faction_name, s14, ":quest_target_center_faction"), ], "I have a sensitive matter which needs tending to, {playername}, and no trustworthy retainers to take care of it. The fact is that I have a spy in {s13} to keep an eye on things for me, and report anything that might warrant my attention. Every week I send someone to collect the spy's reports and bring them back to me. The job's yours if you wish it.", "lord_mission_told_meet_spy_in_enemy_town", [ ]], [anyone|plyr,"lord_mission_told_meet_spy_in_enemy_town", [], "I don't mind a bit of skullduggery. Count me in.", "quest_meet_spy_in_enemy_town_accepted",[]], [anyone|plyr,"lord_mission_told_meet_spy_in_enemy_town", [], "I must decline. This cloak-and-dagger work isn't fit for me.", "quest_meet_spy_in_enemy_town_rejected",[]], [anyone,"quest_meet_spy_in_enemy_town_accepted", [], "Excellent! Make your way to {s13} as soon as you can, the spy will be waiting.", "quest_meet_spy_in_enemy_town_accepted_response", [ (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), (quest_get_slot, ":secret_sign", "$random_quest_no", slot_quest_target_amount), (store_sub, ":countersign", ":secret_sign", secret_signs_begin), (val_add, ":countersign", countersigns_begin), (str_store_troop_name_link, s9, "$g_talk_troop"), (str_store_string, s11, ":secret_sign"), (str_store_string, s12, ":countersign"), (str_store_party_name_link, s13, ":quest_target_center"), (setup_quest_text, "$random_quest_no"), (str_store_string, s2, "@{s9} has asked you to meet with a spy in {s13}."), (call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"), (call_script, "script_cf_center_get_free_walker", ":quest_target_center"), (call_script, "script_center_set_walker_to_type", ":quest_target_center", reg0, walkert_spy), (str_store_item_name,s14,"$spy_item_worn"), #TODO: Change this value (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 1), (assign, "$g_leave_encounter",1), ]], [anyone|plyr,"quest_meet_spy_in_enemy_town_accepted_response", [(quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), (str_store_party_name_link, s13, ":quest_target_center")], "{s13} is heavily defended. How can I get close without being noticed?", "quest_meet_spy_in_enemy_town_accepted_2", []], [anyone,"quest_meet_spy_in_enemy_town_accepted_2", [], "You shall have to use stealth. Take care to avoid enemy strongholds, villages and patrols, and don't bring too many men with you. If you fail to sneak in the first time, give it a while for the garrison to lower its guard again, or you may have a difficult time infiltrating the town.", "quest_meet_spy_in_enemy_town_accepted_response", []], [anyone|plyr,"quest_meet_spy_in_enemy_town_accepted_response", [], "How will I recognise the spy?", "quest_meet_spy_in_enemy_town_accepted_3", []], [anyone,"quest_meet_spy_in_enemy_town_accepted_3", [(quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), (str_store_party_name_link, s13, ":quest_target_center"), (troop_get_type, reg7, "$spy_quest_troop"), (quest_get_slot, ":secret_sign", "$random_quest_no", slot_quest_target_amount), (store_sub, ":countersign", ":secret_sign", secret_signs_begin), (val_add, ":countersign", countersigns_begin), (str_store_string, s11, ":secret_sign"), (str_store_string, s12, ":countersign"),], "Once you get to {s13} you must talk to the locals, the spy will be one of them. If you think you've found the spy, say the phrase '{s11}' The spy will respond with the phrase '{s12}' Thus you will know the other, and {reg7?she:he} will give you any information {reg7?she:he}'s gathered in my service.", "quest_meet_spy_in_enemy_town_accepted_response", []], [anyone|plyr,"quest_meet_spy_in_enemy_town_accepted_response", [], "Will I be paid?", "quest_meet_spy_in_enemy_town_accepted_4", []], [anyone,"quest_meet_spy_in_enemy_town_accepted_4", [], "Of course, I have plenty of silver in my coffers for loyal {men/women} like you. Do well by me, {playername}, and you'll rise high.", "quest_meet_spy_in_enemy_town_accepted_response", []], [anyone|plyr,"quest_meet_spy_in_enemy_town_accepted_response", [], "I know what to do. Farewell, my lord.", "quest_meet_spy_in_enemy_town_accepted_end", []], [anyone,"quest_meet_spy_in_enemy_town_accepted_end", [(quest_get_slot, ":secret_sign", "$random_quest_no", slot_quest_target_amount), (store_sub, ":countersign", ":secret_sign", secret_signs_begin), (val_add, ":countersign", countersigns_begin), (str_store_string, s11, ":secret_sign"), (str_store_string, s12, ":countersign")], "Good luck, {playername}. Remember, the secret phrase is '{s11}' The counterphrase is '{s12}' Bring any reports back to me, and I'll compensate you for your trouble.", "lord_pretalk", []], [anyone,"quest_meet_spy_in_enemy_town_rejected", [], "As you wish, {playername}, but I strongly advise you to forget anything I told you about any spies. They do not exist, have never existed, and no one will ever find them. Remember that.", "lord_pretalk", [(troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1)]], [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_raid_caravan_to_start_war"), (quest_get_slot, ":quest_target_faction", "$random_quest_no", slot_quest_target_faction), (str_store_faction_name_link, s13, ":quest_target_faction")], "This peace with {s13} ill suits me, {playername}. We've let those swine have their way for far too long.\ Now they get stronger with each passing and their arrogance knows no bounds.\ I say, we must wage war on them before it's too late!\ Unfortunately, some of the bleeding hearts among our realm's lords are blocking a possible declaration of war.\ Witless cowards with no stomach for blood.", "lord_mission_told_raid_caravan_to_start_war", [ ]], [anyone|plyr,"lord_mission_told_raid_caravan_to_start_war", [], "You are right, {s65}, but what can we do?", "lord_mission_tell_raid_caravan_to_start_war_2",[]], [anyone|plyr,"lord_mission_told_raid_caravan_to_start_war", [], "I disagree, sir. Peace is prefarable to war.", "quest_raid_caravan_to_start_war_rejected_1",[]], [anyone,"lord_mission_tell_raid_caravan_to_start_war_2", [(quest_get_slot, ":quest_target_faction", "$random_quest_no", slot_quest_target_faction), (str_store_faction_name_link, s13, ":quest_target_faction")], "Ah, 'tis good to hear someone who understands!\ As a matter of fact, there is something we can do, {playername}. A little bit of provocation.\ The dogs in {s13} are very fond of their merchant caravans, and rely on them overmuch.\ If one of our war parties managed to enter their territory and pillage some of their caravans,\ they would have ample cause to declare war on our kingdom.\ And then, well, even the cowards among us must rise to defend themselves.\ So what do you say? Are you interested?", "lord_mission_tell_raid_caravan_to_start_war_3",[]], [anyone|plyr,"lord_mission_tell_raid_caravan_to_start_war_3", [], "An excellent plan. Count me in.", "quest_raid_caravan_to_start_war_accepted",[]], [anyone|plyr,"lord_mission_tell_raid_caravan_to_start_war_3", [], "Why don't you raid the caravans yourself?", "lord_mission_tell_raid_caravan_to_start_war_4",[]], [anyone,"lord_mission_tell_raid_caravan_to_start_war_4", [ ], "Well, {playername}, some of the lords in our kingdom\ won't like the idea of someone inciting a war without their consent.\ They are already looking for an excuse to get at me, and if I did this they could make me pay for it dearly.\ You, on the other hand, are young and well liked and daring, so you might just get away with it.\ And of course I will back you up and defend your actions against your opponents.\ All in all, a few lords might be upset at your endeavour, but I am sure you won't be bothered with that.", "lord_mission_tell_raid_caravan_to_start_war_5",[]], [anyone|plyr,"lord_mission_tell_raid_caravan_to_start_war_5", [], "Then I will go and raid those caravans!", "quest_raid_caravan_to_start_war_accepted",[]], [anyone|plyr,"lord_mission_tell_raid_caravan_to_start_war_5", [], "I don't like this. Find yourself someone else to take the blame for your schemes.", "quest_raid_caravan_to_start_war_rejected_2",[]], [anyone,"quest_raid_caravan_to_start_war_accepted", [], "Very good!\ Now, don't forget that you must capture and loot at least {reg13} caravans to make sure that those fools in {s13} get really infuriated.\ Once you do that, return to me and make sure you are not captured by their patrols.\ If they catch you, our plan will fail without a doubt and you will be facing a long time in prisons.\ Now, good luck and good hunting to you.", "close_window", [ (quest_get_slot, ":quest_target_faction", "$random_quest_no", slot_quest_target_faction), (quest_get_slot, ":quest_target_amount", "$random_quest_no", slot_quest_target_amount), (str_store_troop_name_link, s9, "$g_talk_troop"), (str_store_faction_name_link, s13, ":quest_target_faction"), (assign, reg13, ":quest_target_amount"), (setup_quest_text,"$random_quest_no"), (str_store_string, s2, "@{s9} asked you to capture and loot {reg13} caravans so as to provoke a war with {s13}."), (call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"), (call_script, "script_change_player_relation_with_troop","$g_talk_troop",5), (assign, "$g_leave_encounter",1), ]], [anyone,"quest_raid_caravan_to_start_war_rejected_1", [], "Ah, you think so? But how long will your precious peace last? Not long, believe me.", "lord_pretalk", [(troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1)]], [anyone,"quest_raid_caravan_to_start_war_rejected_2", [], "Hm. As you wish, {playername}.\ I thought you had some fire in you, but it seems I was wrong.", "lord_pretalk", [(troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1)]], [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_bring_back_runaway_serfs")], "Well, some of the serfs working my fields in {s4} have run away. The ungrateful swine,\ I let them plough my fields and rent my cottages, and this is how they repay me!\ From what I've been hearing, they're running to {s3} as fast as they can,\ and have split up into three groups to try and avoid capture.\ I want you to capture all three groups and fetch them back to {s4} by whatever means necessary.\ I should really have them hanged for attempting to escape, but we need hands for the upcoming harvest,\ so I'll let them go off this time with a good beating.", "lord_mission_told", [ (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), (quest_get_slot, ":quest_object_center", "$random_quest_no", slot_quest_object_center), (str_store_troop_name_link, s9, "$g_talk_troop"), (str_store_party_name_link, s3, ":quest_target_center"), (str_store_party_name_link, s4, ":quest_object_center"), (setup_quest_text,"$random_quest_no"), (str_store_string, s2, "@{s9} asked you to catch the three groups of runaway serfs and bring them back to {s4}, alive and breathing. He said that all three groups are heading towards {s3}."), ]], [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_follow_spy")], "I have good information that a man in this very town is actually an enemy spy.\ He should be seized and hanged for his impudence,\ but we also believe that very soon he will leave town to meet with his master,\ the man to whom the spy feeds all his little whispers.\ The spy himself is of little import, but the master is a dangerous man, and could tell us a great deal\ if we could only get our hands on him...", "lord_tell_mission_follow_spy",[]], [anyone,"lord_tell_mission_follow_spy", [], "I want you to wait here until the spy leaves town. Then you must follow him, stealthily, to the meeting place.\ You must take absolute care not to be seen by the spy on your way, else he may suspect foul play and turn back.\ When the master appears, you must ambush and arrest them and bring the pair back to me.\ Alive, if you please.", "lord_tell_mission_follow_spy_2", [ ]], [anyone|plyr, "lord_tell_mission_follow_spy_2", [], "I'll do it, {s65}.", "lord_tell_mission_follow_spy_accepted", []], [anyone|plyr, "lord_tell_mission_follow_spy_2", [], "No, this skulking is not for me.", "lord_tell_mission_follow_spy_rejected", []], [anyone,"lord_tell_mission_follow_spy_accepted", [], "Good, I'm sure you'll do a fine job of it. One of my men will point the spy out to you when he leaves,\ so you will know the man to follow. Remember, I want them both, and I want them alive.", "close_window", [ (str_store_troop_name_link, s11, "$g_talk_troop"), (str_store_party_name_link, s12, "$g_encountered_party"), (setup_quest_text, "$random_quest_no"), (str_store_string, s2, "@{s11} asked you to follow the spy that will leave {s12}. Be careful not to let the spy see you on the way, or he may get suspicious and turn back. Once the spy meets with his accomplice, you are to capture them and bring them back to {s11}."), (call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"), #TODO: Change this value (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 1), (spawn_around_party, "p_main_party", "pt_spy_partners"), (assign, "$qst_follow_spy_spy_partners_party", reg0), (party_set_position, "$qst_follow_spy_spy_partners_party", pos63), (party_set_ai_behavior, "$qst_follow_spy_spy_partners_party", ai_bhvr_hold), (party_set_flags, "$qst_follow_spy_spy_partners_party", pf_default_behavior, 0), (set_spawn_radius, 0), (spawn_around_party, "$g_encountered_party", "pt_spy"), (assign, "$qst_follow_spy_spy_party", reg0), (party_set_ai_behavior, "$qst_follow_spy_spy_party", ai_bhvr_travel_to_party), (party_set_ai_object, "$qst_follow_spy_spy_party", "$qst_follow_spy_spy_partners_party"), (party_set_flags, "$qst_follow_spy_spy_party", pf_default_behavior, 0), (assign, "$g_leave_town", 1), (rest_for_hours, 2, 4, 0), #no need to set g_leave_encounter to 1 since this quest can only be given at a town ]], [anyone,"lord_tell_mission_follow_spy_rejected", [], "A shame. Well, carry on as you were, {playername}...", "lord_pretalk", [(troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1)]], [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_capture_enemy_hero")], "There is a difficult job I need done, {playername}, and you may be the {man/one} who can carry it off.\ I need someone to capture one of the noble lords of {s13} and bring him to me.\ Afterwards, I'll be able to exchange him in return for a relative of mine held by {s13}.\ It is a simple enough job, but whomever you choose will be guarded by an elite band of personal retainers.\ Are you up for a fight?", "lord_tell_mission_capture_enemy_hero", [ (quest_get_slot, ":quest_target_faction", "$random_quest_no", slot_quest_target_faction), (str_store_faction_name, s13, ":quest_target_faction"), ]], [anyone|plyr, "lord_tell_mission_capture_enemy_hero", [], "Consider it done, {s65}.", "lord_tell_mission_capture_enemy_hero_accepted", []], [anyone|plyr, "lord_tell_mission_capture_enemy_hero", [], "I must refuse, {s65}. I am not a kidnapper.", "lord_tell_mission_capture_enemy_hero_rejected", []], [anyone,"lord_tell_mission_capture_enemy_hero_accepted", [], "I like your spirit! Go and bring me one of our enemies,\ and I'll toast your name in my hall when you return! And reward you for your efforts, of course...", "close_window", [ (quest_get_slot, ":quest_target_faction", "$random_quest_no", slot_quest_target_faction), (str_store_troop_name_link, s11, "$g_talk_troop"), (str_store_faction_name_link, s13, ":quest_target_faction"), (setup_quest_text, "$random_quest_no"), (str_store_string, s2, "@{s11} asked you to capture a lord from {s13}, any lord, and then drag your victim back to {s11} for safekeeping."), (call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"), #TODO: Change this value (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 1), (assign, "$g_leave_encounter",1), ]], [anyone,"lord_tell_mission_capture_enemy_hero_rejected", [], "Clearly you lack the mettle I had thought you possessed. Very well, {playername}, I will find someone else.", "lord_pretalk", [(troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1)]], [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_lend_companion")], "I don't have a job for you right now, but your companion {s3} is a skilled {reg3?lass:fellow}\ and I need someone with {reg3?her:his} talents. Will you lend {reg3?her:him} to me for a while?", "lord_tell_mission_lend_companion", [ (quest_get_slot, ":quest_target_troop", "$random_quest_no", slot_quest_target_troop), (quest_get_slot, ":quest_target_amount", "$random_quest_no", slot_quest_target_amount), (val_add, ":quest_target_amount", 1), (assign, reg1, ":quest_target_amount"), (str_store_troop_name_link,s9,"$g_talk_troop"), (str_store_troop_name,s3,":quest_target_troop"), (setup_quest_text,"$random_quest_no"), (troop_get_type, reg3, ":quest_target_troop"), (str_store_string, s2, "@{s9} asked you to lend your companion {s3} to him for a week."), ]], [anyone|plyr,"lord_tell_mission_lend_companion", [], "How long will you be needing {reg3?her:him}?", "lord_tell_mission_lend_companion_2", []], [anyone,"lord_tell_mission_lend_companion_2", [], "Just a few days, a week at most.", "lord_mission_lend_companion_told", []], [anyone|plyr,"lord_mission_lend_companion_told", [(quest_get_slot, ":quest_target_troop", "$random_quest_no", slot_quest_target_troop),(str_store_troop_name,s3,":quest_target_troop"),], "Then I will leave {s3} with you for one week.", "lord_tell_mission_lend_companion_accepted", []], [anyone|plyr,"lord_mission_lend_companion_told", [(quest_get_slot, ":quest_target_troop", "$random_quest_no", slot_quest_target_troop), (str_store_troop_name,s3,":quest_target_troop"),], "I am sorry, but I cannot do without {s3} for a whole week.", "lord_tell_mission_lend_companion_rejected", []], [anyone,"lord_tell_mission_lend_companion_accepted", [], "I cannot thank you enough, {playername}. Worry not, your companion shall be returned to you with due haste.", "close_window", [(call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"), (call_script, "script_change_player_relation_with_troop","$g_talk_troop",3), (quest_get_slot, ":quest_target_troop", "$random_quest_no", slot_quest_target_troop), (party_remove_members, "p_main_party", ":quest_target_troop", 1), (assign, "$g_leave_encounter",1), ]], [anyone,"lord_tell_mission_lend_companion_rejected", [], "Well, that's damned unfortunate, but I suppose I cannot force you or {s3} to agree.\ I shall have to make do without.", "lord_pretalk", [(troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1)]], [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_collect_debt")], "Some time ago, I loaned out a considerable sum of money to {s3}. {reg4} denars, to be precise.\ He was supposed to pay it back within a month but I haven't received a copper from him since.\ That was months ago. If you could collect the debt from him on my behalf,\ I would be grateful indeed. I would even let you keep one fifth of the money for your trouble.\ What do you say?", "lord_tell_mission_collect_debt", [ (quest_get_slot, ":quest_target_troop", "$random_quest_no", slot_quest_target_troop), (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), (quest_get_slot, reg4, "$random_quest_no", slot_quest_target_amount), (str_store_troop_name_link,s9,"$g_talk_troop"), (str_store_troop_name_link,s3,":quest_target_troop"), (str_store_party_name_link,s4,":quest_target_center"), (setup_quest_text,"$random_quest_no"), (str_store_string, s2, "@{s9} asked you to collect the debt of {reg4} denars {s3} owes to him. {s3} was at {s4} when you were given this quest."), ]], [anyone|plyr,"lord_tell_mission_collect_debt", [], "Do you know where I can find {s3}, {s65}?", "lord_tell_mission_collect_debt_2", []], [anyone,"lord_tell_mission_collect_debt_2", [], "If you leave now, you should be able to find him at {s4}.\ I've no doubt that he will be suitably embarassed by his conduct and give you all the money he owes me.", "lord_tell_mission_collect_debt_3", []], [anyone|plyr,"lord_tell_mission_collect_debt_3", [], "Then I will talk to {s3} on your behalf.", "lord_tell_mission_collect_debt_accepted", []], [anyone|plyr,"lord_tell_mission_collect_debt_3", [], "Forgive me, {s65}, but I doubt I would be more successful than yourself.", "lord_tell_mission_collect_debt_rejected", []], [anyone,"lord_tell_mission_collect_debt_accepted", [], "You made me very happy by accepting this {playername}. Please, talk to {s3} and don't leave him without my money.", "close_window", [(call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"), (call_script, "script_change_player_relation_with_troop","$g_talk_troop",2), (assign, "$g_leave_encounter",1), ]], [anyone,"lord_tell_mission_collect_debt_rejected", [], "Perhaps not, {playername}. I suppose I'm never getting that money back...", "lord_pretalk", [(troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1)]], ## ## [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_capture_conspirators")], ## "TODO: I want you to capture troops in {reg1} conspirator parties that plan to rebel against me and join {s3}.", "lord_mission_told", ## [ ## (quest_get_slot, ":quest_target_troop", "$random_quest_no", slot_quest_target_troop), ## (assign, reg1, "$qst_capture_conspirators_num_parties_to_spawn"), ## (str_store_troop_name_link,1,"$g_talk_troop"), ## (str_store_party_name_link,2,"$g_encountered_party"), ## (str_store_troop_name,3,":quest_target_troop"), ## (setup_quest_text,"$random_quest_no"), ## (try_begin), ## (is_between, "$g_encountered_party", centers_begin, centers_end), ## (setup_quest_giver, "$random_quest_no", "str_given_by_s1_at_s2"), ## (else_try), ## (setup_quest_giver,"$random_quest_no", "str_given_by_s1_in_wilderness"), ## (try_end), ## ]], ## ## ## [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_defend_nobles_against_peasants")], ## "TODO: I want you to defend {reg1} noble parties against peasants.", "lord_mission_told", ## [ ## (assign, reg1, "$qst_defend_nobles_against_peasants_num_noble_parties_to_spawn"), ## (str_store_troop_name_link,1,"$g_talk_troop"), ## (str_store_party_name_link,2,"$g_encountered_party"), ## (setup_quest_text,"$random_quest_no"), ## (try_begin), ## (is_between, "$g_encountered_party", centers_begin, centers_end), ## (setup_quest_giver, "$random_quest_no", "str_given_by_s1_at_s2"), ## (else_try), ## (setup_quest_giver,"$random_quest_no", "str_given_by_s1_in_wilderness"), ## (try_end), ## ]], ## ## [anyone,"lord_tell_mission", [(eq, "$random_quest_no", "qst_incriminate_loyal_commander"), (quest_get_slot, ":quest_target_troop", "qst_incriminate_loyal_commander", slot_quest_target_troop), (quest_get_slot, ":quest_object_troop", "qst_incriminate_loyal_commander", slot_quest_object_troop), (quest_get_slot, ":quest_target_center", "qst_incriminate_loyal_commander", slot_quest_target_center), (str_store_troop_name_link, s13,":quest_target_troop"), (str_store_party_name_link, s14,":quest_target_center"), (str_store_troop_name_link, s15,":quest_object_troop"), ], "I tell you, that blubbering fool {s13} is not fit to rule {s14}.\ God knows he would be divested of his lands in an instant were it not for one of his loyal vassals, {s15}.\ As long as he has his vassal aiding him, it will be a difficult job beating him.\ So I need to get {s15} out of the picture, and I have a plan just to do that...\ With your help, naturally.", "lord_tell_mission_incriminate_commander",[]], [anyone|plyr,"lord_tell_mission_incriminate_commander", [], "{s66}, I am all ears.", "lord_tell_mission_incriminate_commander_2",[]], [anyone|plyr,"lord_tell_mission_incriminate_commander", [], "I don't wish to involve myself in anything dishonourable against {s15}.", "lord_tell_mission_incriminate_commander_rejected",[]], [anyone,"lord_tell_mission_incriminate_commander_rejected", [], "Dishonourable? Bah!\ I was hoping I could count on you, {playername}, but you've shown me what a fool I was.\ I shall have to find someone whose loyalty I can trust.", "lord_pretalk", [(call_script, "script_change_player_relation_with_troop","$g_talk_troop",-5), (call_script, "script_change_player_honor", 2)]], [anyone,"lord_tell_mission_incriminate_commander_2", [], "I have written a fake letter to {s15},\ bearing my own seal, which implicates him in a conspiracy with us to stage a coup in {s14}, in my favour.\ If we can make {s13} believe the letter is genuine, he will deal with {s15} very swiftly.\ Of course, the challenge there is to convince {s13} that the letter is indeed real...", "lord_tell_mission_incriminate_commander_3",[]], [anyone|plyr,"lord_tell_mission_incriminate_commander_3", [], "Please continue, {s65}...", "lord_tell_mission_incriminate_commander_4",[]], [anyone|plyr,"lord_tell_mission_incriminate_commander_3", [], "No, I will not sully myself with this dishonourable scheme.", "lord_tell_mission_incriminate_commander_rejected",[]], [anyone,"lord_tell_mission_incriminate_commander_4", [], "This is where you come into play.\ You'll take the letter to {s14}, then give it to one of your soldiers and instruct him to take it to {s15}.\ I will have one of my spies inform the town garrison so that your man will be arrested on his way.\ The guards will then find the letter and take it to {s13}.\ They'll torture your man, of course, to try and get the truth out of him,\ but all he knows is that you ordered the letter to be delivered to {s15} under the utmost secrecy.\ {s13} knows you serve me, and the fool will certainly believe the whole charade.", "lord_tell_mission_incriminate_commander_5",[]], [anyone|plyr,"lord_tell_mission_incriminate_commander_5", [], "Is that all?", "lord_tell_mission_incriminate_commander_7",[]], [anyone,"lord_tell_mission_incriminate_commander_7", [(str_store_troop_name, s8, "$incriminate_quest_sacrificed_troop"), (str_store_troop_name_plural, s9, "$incriminate_quest_sacrificed_troop"), ], "There is one more thing...\ Your messenger must be someone trustworthy. If you sent the letter with a simple peasant, someone expendable,\ {s13} might suspect a plot. He may have the wits of a snail, but even a snail can see the obvious.\ Give the letter to someone of rank. One of your {s9}, perhaps.", "lord_tell_mission_incriminate_commander_8",[]], [anyone|plyr,"lord_tell_mission_incriminate_commander_8", [], "What? I can't send one of my trusted {s9} to his death!", "lord_tell_mission_incriminate_commander_9",[]], [anyone|plyr,"lord_tell_mission_incriminate_commander_8", [], "Then a {s8} it will be.", "lord_tell_mission_incriminate_commander_fin",[]], [anyone,"lord_tell_mission_incriminate_commander_9", [], "Come now, {playername}.\ There is a place for sentimentality, but this is not it. Believe me, you shall be generously compensated,\ and what is the purpose of soldiers if not to die at our say-so?", "lord_tell_mission_incriminate_commander_10",[]], [anyone|plyr,"lord_tell_mission_incriminate_commander_10", [], "A {s8} it is.", "lord_tell_mission_incriminate_commander_fin",[]], [anyone|plyr,"lord_tell_mission_incriminate_commander_10", [], "No, I'll not sacrifice one of my chosen men.", "lord_tell_mission_incriminate_commander_rejected",[]], [anyone,"lord_tell_mission_incriminate_commander_fin", [], "I can't tell you how pleased I am to hear that,\ {playername}. You are removing one of the greatest obstacles in my path.\ Here is the letter, as well as 300 denars for your expenses.\ Remember, there'll be more once you succeed. Much, much more...", "lord_pretalk", [ (quest_get_slot, ":quest_target_troop", "qst_incriminate_loyal_commander", slot_quest_target_troop), (quest_get_slot, ":quest_object_troop", "qst_incriminate_loyal_commander", slot_quest_object_troop), (quest_get_slot, ":quest_target_center", "qst_incriminate_loyal_commander", slot_quest_target_center), (call_script, "script_troop_add_gold", "trp_player",300), (call_script, "script_change_player_relation_with_troop","$g_talk_troop",3), (str_store_troop_name_link, s11,"$g_talk_troop"), (str_store_troop_name_link, s13,":quest_target_troop"), (str_store_party_name_link, s14,":quest_target_center"), (str_store_troop_name_plural, s15,"$incriminate_quest_sacrificed_troop"), (str_store_troop_name_link, s16,":quest_object_troop"), (setup_quest_text,"$random_quest_no"), (str_store_string, s2, "@{s11} gave you a fake letter to fool {s13} into banishing his vassal {s16}.\ You are to go near {s14}, give the letter to one of your {s15} and send him into the town as a messenger,\ believing his orders to be genuine."), (call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"), ]], [anyone,"lord_tell_mission", [(eq,"$random_quest_no","qst_capture_prisoners")], "A group of my soldiers were captured in a recent skirmish with the enemy.\ Thankfully we have a mutual agreement of prisoner exchange, and they will release my men,\ but they want us to give them prisoners of equal rank and number. Prisoners I don't currently have.\ So, I need a good {man/warrior} to find me {reg1} {s3} as prisoners, that I may exchange them.", "lord_mission_told", [ (quest_get_slot, ":quest_target_troop", "qst_capture_prisoners", slot_quest_target_troop), (quest_get_slot, ":quest_target_amount", "qst_capture_prisoners", slot_quest_target_amount), (assign,reg1,":quest_target_amount"), (str_store_troop_name_link,s9,"$g_talk_troop"), ## (str_store_party_name,2,"$g_encountered_party"), (str_store_troop_name_by_count,3,":quest_target_troop",":quest_target_amount"), (setup_quest_text,"$random_quest_no"), ## (try_begin), ## (is_between, "$g_encountered_party", centers_begin, centers_end), ## (setup_quest_giver, "$random_quest_no", "str_given_by_s1_at_s2"), ## (else_try), ## (setup_quest_giver,"$random_quest_no", "str_given_by_s1_in_wilderness"), ## (try_end), (str_store_string, s2, "@{s9} has requested you to bring him {reg1} {s3} as prisoners."), ]], [anyone,"lord_tell_mission", [], "No {playername}. I do not need your help at this time.", "lord_pretalk",[]], [anyone|plyr,"lord_mission_told", [], "You can count on me, {s65}.", "lord_mission_accepted",[]], [anyone|plyr,"lord_mission_told", [], "I fear I cannot accept such a mission at the moment.", "lord_mission_rejected",[]], [anyone,"lord_mission_accepted", [], "Excellent, {playername}, excellent. I have every confidence in you.", "close_window", [(assign, "$g_leave_encounter",1), (try_begin), (eq, "$random_quest_no", "qst_escort_lady"), (quest_get_slot, ":quest_object_troop", "$random_quest_no", slot_quest_object_troop), (troop_set_slot, ":quest_object_troop", slot_troop_cur_center, 0), (troop_join, ":quest_object_troop"), ## (else_try), ## (eq, "$random_quest_no", "qst_hunt_down_raiders"), ## (quest_get_slot, ":quest_object_center", "$random_quest_no", slot_quest_object_center), ## (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), ## (quest_get_slot, ":quest_target_faction", "$random_quest_no", slot_quest_target_faction), ## (set_spawn_radius, 3), ## (call_script, "script_cf_create_kingdom_party", ":quest_target_faction", spt_raider), ### (spawn_around_party,":quest_object_center",":quest_target_party_template"), ## (assign, ":quest_target_party", reg0), ## (party_relocate_near_party, reg0, ":quest_object_center"), ## (quest_set_slot, "$random_quest_no", slot_quest_target_party, ":quest_target_party"), ## (party_set_ai_behavior,":quest_target_party",ai_bhvr_travel_to_party), ## (party_set_ai_object,":quest_target_party",":quest_target_center"), ## (party_set_flags, ":quest_target_party", pf_default_behavior, 0), ## (party_set_faction,":quest_target_party",":quest_target_faction"), ## (str_store_troop_name,1,"$g_talk_troop"), ## (str_store_party_name,2,"$g_encountered_party"), ## (str_store_party_name,3,":quest_object_center"), ## (str_store_party_name,4,":quest_target_center"), ## (setup_quest_text,"$random_quest_no"), ## (try_begin), ## (is_between, "$g_encountered_party", centers_begin, centers_end), ## (setup_quest_giver, "$random_quest_no", "str_given_by_s1_at_s2"), ## (else_try), ## (setup_quest_giver,"$random_quest_no", "str_given_by_s1_in_wilderness"), ## (try_end), ## (else_try), ## (eq, "$random_quest_no", "qst_bring_reinforcements_to_siege"), ## (quest_get_slot, ":quest_object_troop", "$random_quest_no", slot_quest_object_troop), ## (quest_get_slot, ":quest_target_amount", "$random_quest_no", slot_quest_target_amount), ## (troop_get_slot, ":cur_party", "$g_talk_troop", slot_troop_leaded_party), ## (party_remove_members, ":cur_party", ":quest_object_troop", ":quest_target_amount"), ## (party_add_members, "p_main_party", ":quest_object_troop", ":quest_target_amount"), ## (else_try), ## (eq, "$random_quest_no", "qst_bring_prisoners_to_enemy"), ## (quest_get_slot, ":quest_object_troop", "$random_quest_no", slot_quest_object_troop), ## (quest_get_slot, ":quest_target_amount", "$random_quest_no", slot_quest_target_amount), ## (party_add_prisoners, "p_main_party", ":quest_object_troop", ":quest_target_amount"), (else_try), (eq, "$random_quest_no", "qst_deliver_message_to_enemy_lord"), (call_script, "script_troop_add_gold", "trp_player",10), (else_try), (eq, "$random_quest_no", "qst_bring_back_runaway_serfs"), (quest_get_slot, ":quest_giver_center", "$random_quest_no", slot_quest_giver_center), (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), (quest_get_slot, ":quest_target_party_template", "$random_quest_no", slot_quest_target_party_template), (set_spawn_radius, 3), (spawn_around_party,":quest_giver_center",":quest_target_party_template"), (assign, "$qst_bring_back_runaway_serfs_party_1", reg0), (party_set_ai_behavior,"$qst_bring_back_runaway_serfs_party_1",ai_bhvr_travel_to_party), (party_set_ai_object,"$qst_bring_back_runaway_serfs_party_1",":quest_target_center"), (party_set_flags, "$qst_bring_back_runaway_serfs_party_1", pf_default_behavior, 0), (spawn_around_party,":quest_giver_center",":quest_target_party_template"), (assign, "$qst_bring_back_runaway_serfs_party_2", reg0), (party_set_ai_behavior,"$qst_bring_back_runaway_serfs_party_2",ai_bhvr_travel_to_party), (party_set_ai_object,"$qst_bring_back_runaway_serfs_party_2",":quest_target_center"), (party_set_flags, "$qst_bring_back_runaway_serfs_party_2", pf_default_behavior, 0), (spawn_around_party,":quest_giver_center",":quest_target_party_template"), (assign, "$qst_bring_back_runaway_serfs_party_3", reg0), (party_set_ai_behavior,"$qst_bring_back_runaway_serfs_party_3",ai_bhvr_travel_to_party), (party_set_ai_object,"$qst_bring_back_runaway_serfs_party_3",":quest_target_center"), (party_set_flags, "$qst_bring_back_runaway_serfs_party_3", pf_default_behavior, 0), (rest_for_hours, 1, 4), ## (else_try), ## (eq, "$random_quest_no", "qst_capture_conspirators"), ## (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), ## (spawn_around_party,"p_main_party","pt_conspirator_leader"), ## (assign, "$qst_capture_conspirators_party_1", reg0), ## (assign, "$qst_capture_conspirators_num_parties_spawned", 1), ## (party_set_ai_behavior, "$qst_capture_conspirators_party_1", ai_bhvr_hold), ## (party_set_flags, "$qst_capture_conspirators_party_1", pf_default_behavior, 0), ## (party_get_position, pos1, ":quest_target_center"), ## (call_script, "script_map_get_random_position_around_position_within_range", 17, 19), ## (party_set_position, "$qst_capture_conspirators_party_1", pos2), ## (party_get_num_companions, ":num_companions", "$qst_capture_conspirators_party_1"), ## (val_add, "$qst_capture_conspirators_num_troops_to_capture", ":num_companions"), ## (else_try), ## (eq, "$random_quest_no", "qst_defend_nobles_against_peasants"), ## (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), ## (set_spawn_radius, 9), ## (try_for_range, ":unused", 0, "$qst_defend_nobles_against_peasants_num_peasant_parties_to_spawn"), ## (spawn_around_party, ":quest_target_center", "pt_peasant_rebels"), ## (try_begin), ## (le, "$qst_defend_nobles_against_peasants_peasant_party_1", 0), ## (assign, "$qst_defend_nobles_against_peasants_peasant_party_1", reg0), ## (else_try), ## (le, "$qst_defend_nobles_against_peasants_peasant_party_2", 0), ## (assign, "$qst_defend_nobles_against_peasants_peasant_party_2", reg0), ## (else_try), ## (le, "$qst_defend_nobles_against_peasants_peasant_party_3", 0), ## (assign, "$qst_defend_nobles_against_peasants_peasant_party_3", reg0), ## (else_try), ## (le, "$qst_defend_nobles_against_peasants_peasant_party_4", 0), ## (assign, "$qst_defend_nobles_against_peasants_peasant_party_4", reg0), ## (else_try), ## (le, "$qst_defend_nobles_against_peasants_peasant_party_5", 0), ## (assign, "$qst_defend_nobles_against_peasants_peasant_party_5", reg0), ## (else_try), ## (le, "$qst_defend_nobles_against_peasants_peasant_party_6", 0), ## (assign, "$qst_defend_nobles_against_peasants_peasant_party_6", reg0), ## (else_try), ## (le, "$qst_defend_nobles_against_peasants_peasant_party_7", 0), ## (assign, "$qst_defend_nobles_against_peasants_peasant_party_7", reg0), ## (else_try), ## (le, "$qst_defend_nobles_against_peasants_peasant_party_8", 0), ## (assign, "$qst_defend_nobles_against_peasants_peasant_party_8", reg0), ## (try_end), ## (try_end), ## (set_spawn_radius, 0), ## (party_get_position, pos1, ":quest_target_center"), ## (try_for_range, ":unused", 0, "$qst_defend_nobles_against_peasants_num_noble_parties_to_spawn"), ## (spawn_around_party, ":quest_target_center", "pt_noble_refugees"), ## (assign, ":cur_noble_party", reg0), ## (party_set_ai_behavior, ":cur_noble_party", ai_bhvr_travel_to_party), ## (party_set_ai_object, ":cur_noble_party", ":quest_target_center"), ## (party_set_flags, ":cur_noble_party", pf_default_behavior, 0), ## (call_script, "script_map_get_random_position_around_position_within_range", 13, 17), ## (party_set_position, ":cur_noble_party", pos2), ## (party_get_num_companions, ":num_companions", ":cur_noble_party"), ## (val_add, "$qst_defend_nobles_against_peasants_num_nobles_to_save", ":num_companions"), ## (try_begin), ## (le, "$qst_defend_nobles_against_peasants_noble_party_1", 0), ## (assign, "$qst_defend_nobles_against_peasants_noble_party_1", reg0), ## (else_try), ## (le, "$qst_defend_nobles_against_peasants_noble_party_2", 0), ## (assign, "$qst_defend_nobles_against_peasants_noble_party_2", reg0), ## (else_try), ## (le, "$qst_defend_nobles_against_peasants_noble_party_3", 0), ## (assign, "$qst_defend_nobles_against_peasants_noble_party_3", reg0), ## (else_try), ## (le, "$qst_defend_nobles_against_peasants_noble_party_4", 0), ## (assign, "$qst_defend_nobles_against_peasants_noble_party_4", reg0), ## (else_try), ## (le, "$qst_defend_nobles_against_peasants_noble_party_5", 0), ## (assign, "$qst_defend_nobles_against_peasants_noble_party_5", reg0), ## (else_try), ## (le, "$qst_defend_nobles_against_peasants_noble_party_6", 0), ## (assign, "$qst_defend_nobles_against_peasants_noble_party_6", reg0), ## (else_try), ## (le, "$qst_defend_nobles_against_peasants_noble_party_7", 0), ## (assign, "$qst_defend_nobles_against_peasants_noble_party_7", reg0), ## (else_try), ## (le, "$qst_defend_nobles_against_peasants_noble_party_8", 0), ## (assign, "$qst_defend_nobles_against_peasants_noble_party_8", reg0), ## (try_end), ## (try_end), (try_end), (call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"), (try_begin), (eq, "$random_quest_no", "qst_lend_surgeon"), (assign, "$g_leave_town_outside", 1), (assign,"$auto_enter_town","$g_encountered_party"), # (store_current_hours, "$quest_given_time"), (rest_for_hours, 4), (assign, "$lord_requested_to_talk_to", "$g_talk_troop"), (try_end), ]], [anyone,"lord_mission_rejected", [], "Is that so? Well, I suppose you're just not up to the task.\ I shall have to look for somebody with more mettle.", "close_window", [(assign, "$g_leave_encounter",1), (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -1), (try_begin), (quest_slot_eq, "$random_quest_no", slot_quest_dont_give_again_remaining_days, 0), (quest_set_slot, "$random_quest_no", slot_quest_dont_give_again_remaining_days, 1), (try_end), (troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1), ]], ##### TODO: QUESTS COMMENT OUT END #Leave [anyone|plyr,"lord_talk", [#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 1), (troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), ], "I must leave now.", "lord_leave_prison",[]], [anyone|plyr,"lord_talk", [(lt, "$g_talk_troop_faction_relation", 0)], "This audience is over. I leave now.", "lord_leave",[]], [anyone|plyr,"lord_talk", [(ge, "$g_talk_troop_faction_relation", 0)], "I must beg my leave.", "lord_leave",[]], [anyone,"lord_leave", [#(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0), (lt, "$g_talk_troop_faction_relation", 0), (store_partner_quest,":enemy_lord_quest"), (lt, ":enemy_lord_quest", 0), (troop_slot_eq, "$g_talk_troop", slot_troop_does_not_give_quest, 0), (call_script, "script_get_random_quest", "$g_talk_troop"), (assign, "$random_quest_no", reg0), (ge, "$random_quest_no", 0), ], "Before you go, {playername}, I have something to ask of you... We may be enemies in this war,\ but I pray that you believe, as I do, that we can still be civil towards each other.\ Thus I hoped that you would be kind enough to assist me in something important to me.", "lord_leave_give_quest",[]], [anyone|plyr,"lord_leave_give_quest", [], "I am listening.", "enemy_lord_tell_mission",[]], [anyone,"enemy_lord_tell_mission", [(eq,"$random_quest_no","qst_lend_surgeon")], "I have a friend here, an old warrior, who is very sick. Pestilence has infected an old battle wound,\ and unless he is seen to by a surgeon soon, he will surely die. This man is dear to me, {playername},\ but he's also stubborn as a hog and refuses to have anyone look at his injury because he doesn't trust the physicians here.\ I have heard that you've a capable surgeon with you. If you would let your surgeon come here and have a look,\ {reg3?she:he} may be able to convince him to give his consent to an operation.\ Please, I will be deeply indebted to you if you grant me this request.", "lord_mission_told", [ (quest_get_slot, ":quest_object_troop", "$random_quest_no", slot_quest_object_troop), (str_store_troop_name_link,1,"$g_talk_troop"), ## (str_store_party_name,2,"$g_encountered_party"), (str_store_troop_name,3,":quest_object_troop"), (troop_get_type, reg3, ":quest_object_troop"), (setup_quest_text,"$random_quest_no"), ## (try_begin), ## (is_between, "$g_encountered_party", centers_begin, centers_end), ## (setup_quest_giver, "$random_quest_no", "str_given_by_s1_at_s2"), ## (else_try), ## (setup_quest_giver,"$random_quest_no", "str_given_by_s1_in_wilderness"), ## (try_end), (str_store_string, s2, "@Lend your experienced surgeon {s3} to {s1}."), ]], [anyone,"enemy_lord_tell_mission", [(str_store_quest_name, s7, "$random_quest_no")], "ERROR: MATCHED WITH QUEST: {s7}.", "close_window", []], [anyone,"lord_leave_prison", [], "We'll meet again.", "close_window",[]], [anyone|auto_proceed,"lord_leave", [(faction_slot_eq,"$g_talk_troop_faction",slot_faction_leader,"$g_talk_troop")], "Of course, {playername}. Farewell.", "close_window",[(eq,"$talk_context",tc_party_encounter),(assign, "$g_leave_encounter", 1)]], [anyone|auto_proceed,"lord_leave", [(ge,"$g_talk_troop_relation",10)], "Good journeys to you, {playername}.", "close_window",[(eq,"$talk_context",tc_party_encounter),(assign, "$g_leave_encounter", 1)]], [anyone|auto_proceed,"lord_leave", [(ge, "$g_talk_troop_faction_relation", 0)], "Yes, yes. Farewell.", "close_window",[(eq,"$talk_context",tc_party_encounter),(assign, "$g_leave_encounter", 1)]], [anyone|auto_proceed,"lord_leave", [], "We will meet again.", "close_window",[(eq,"$talk_context",tc_party_encounter),(assign, "$g_leave_encounter", 1)]], #Royal family members [anyone|plyr,"member_chat", [(troop_slot_eq, "$g_talk_troop", slot_troop_occupation, slto_kingdom_lady)], "Are you enjoying the journey, {s65}?", "lady_journey_1",[]], [anyone,"lady_journey_1", [], "I am doing quite fine, {playername}. Thank you for your concern.", "close_window",[]], [anyone,"start", [ (troop_slot_eq, "$g_talk_troop", slot_troop_occupation, slto_kingdom_lady), (check_quest_active, "qst_duel_for_lady"), (check_quest_succeeded, "qst_duel_for_lady"), (quest_slot_eq, "qst_duel_for_lady", slot_quest_giver_troop, "$g_talk_troop"), (le, "$talk_context", tc_siege_commander), (quest_get_slot, ":quest_target_troop", "qst_duel_for_lady", slot_quest_target_troop), (str_store_troop_name_link, s13, ":quest_target_troop"), ], "My dear {playername}, how joyous to see you again! I heard you gave that vile {s13} a well-deserved lesson.\ I hope he never forgets his humiliation.\ I've a reward for you, but I fear it's little compared to what you've done for me.", "lady_qst_duel_for_lady_succeeded_1",[]], [anyone|plyr,"lady_qst_duel_for_lady_succeeded_1", [], "Oh, it will just have to do.", "lady_qst_duel_for_lady_succeeded_2",[ (str_store_string,s10,"@Then take it, with my eternal thanks. You are a noble {man/woman}.\ I will never forget that you helped me in my time of need.") ]], [anyone|plyr,"lady_qst_duel_for_lady_succeeded_1", [], "{s66}, this is far too much!", "lady_qst_duel_for_lady_succeeded_2",[ (str_store_string,s10,"@Forgive me, {playername}, but I must insist you accept it.\ The money means little to me, and I owe you so much.\ Here, take it, and let us speak no more of this."), (call_script, "script_change_player_honor", 1), ]], [anyone|plyr,"lady_qst_duel_for_lady_succeeded_1", [], "Please, {s65}, no reward is necessary.", "lady_qst_duel_for_lady_succeeded_2",[ (str_store_string,s10,"@{playername}, what a dear {man/woman} you are,\ but I will not allow you to refuse this. I owe you far more than I can say,\ and I am sure you can put this money to far better use than I."), (call_script, "script_change_player_honor", 2), ]], [anyone,"lady_qst_duel_for_lady_succeeded_2", [], "{s10}", "lady_pretalk", [(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 10), (add_xp_as_reward, 1000), (call_script, "script_troop_add_gold", "trp_player", 2000), (call_script, "script_end_quest", "qst_duel_for_lady"), ]], [anyone,"start", [ (troop_slot_eq, "$g_talk_troop", slot_troop_occupation, slto_kingdom_lady), (check_quest_active, "qst_duel_for_lady"), (check_quest_failed, "qst_duel_for_lady"), (quest_slot_eq, "qst_duel_for_lady", slot_quest_giver_troop, "$g_talk_troop"), (le, "$talk_context", tc_siege_commander), (quest_get_slot, ":quest_target_troop", "qst_duel_for_lady", slot_quest_target_troop), (str_store_troop_name_link, s13, ":quest_target_troop"), ], "I was told that you sought satisfaction from {s13} to prove my innocence, {playername}.\ It was a fine gesture, and I thank you for your efforts.", "lady_qst_duel_for_lady_failed", []], [anyone|plyr,"lady_qst_duel_for_lady_failed", [], "I beg your forgiveness for my defeat, {s65}...", "lady_qst_duel_for_lady_failed_2",[]], [anyone,"lady_qst_duel_for_lady_failed_2", [], "It matters not, dear {playername}. You tried.\ The truth cannot be proven at the point of a sword, but you willingly put your life at stake for my honour.\ That alone will convince many of my innocence.", "lady_pretalk", [(call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 6), (add_xp_as_reward, 400), (call_script, "script_end_quest", "qst_duel_for_lady"), ]], [anyone,"start", [(troop_slot_eq, "$g_talk_troop", slot_troop_occupation, slto_kingdom_lady), (check_quest_active, "qst_escort_lady"), (eq, "$talk_context", tc_entering_center_quest_talk), (quest_slot_eq, "qst_escort_lady", slot_quest_object_troop, "$g_talk_troop")], "Thank you for escorting me here, {playername}. Please accept this gift as a token of my gratitude.\ I hope we shall meet again sometime in the future.", "lady_escort_lady_succeeded", [ (quest_get_slot, ":cur_center", "qst_escort_lady", slot_quest_target_center), (add_xp_as_reward, 300), (call_script, "script_troop_add_gold", "trp_player", 250), (call_script, "script_end_quest", "qst_escort_lady"), (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 2), (troop_set_slot, "$g_talk_troop", slot_troop_cur_center, ":cur_center"), (remove_member_from_party,"$g_talk_troop"), ]], [anyone|plyr,"lady_escort_lady_succeeded", [], "It was an honor to serve you, {s65}.", "close_window",[]], [anyone,"start", [ (troop_slot_eq, "$g_talk_troop", slot_troop_occupation, slto_kingdom_lady), (le, "$talk_context", tc_siege_commander), (check_quest_active, "qst_rescue_lord_by_replace"), (check_quest_succeeded, "qst_rescue_lord_by_replace"), (quest_slot_eq, "qst_rescue_lord_by_replace", slot_quest_giver_troop, "$g_talk_troop"), (troop_get_slot, ":cur_lord", "$g_talk_troop", slot_troop_father), (try_begin), (gt, ":cur_lord", 0), (str_store_string, s17, "str_father"), (else_try), (str_store_string, s17, "str_husband"), (try_end), ], "Oh, {playername}, you brought him back to me! Thank you ever so much for rescuing my {s17}.\ Please, take this as some small repayment for your noble deed.", "lady_generic_mission_succeeded", [ (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 8), (add_xp_as_reward, 2000), (call_script, "script_troop_add_gold", "trp_player", 1500), (call_script, "script_end_quest", "qst_rescue_lord_by_replace"), ]], [anyone|plyr,"lady_generic_mission_succeeded", [], "Always an honour to serve, {s65}.", "lady_pretalk",[]], [anyone ,"start", [(troop_slot_eq,"$g_talk_troop",slot_troop_occupation, slto_kingdom_lady), (eq, "$g_talk_troop_met", 0), (le,"$talk_context",tc_siege_commander), ], "I say, you don't look familiar...", "lady_premeet", []], [anyone|plyr ,"lady_premeet", [], "I am {playername}.", "lady_meet", []], [anyone|plyr ,"lady_premeet", [], "My name is {playername}. At your service.", "lady_meet", []], [anyone, "lady_meet", [], "{playername}? I do not believe I've heard of you before.", "lady_meet_end", []], [anyone, "lady_meet_end", [], "Can I help you with anything?", "lady_talk", []], [anyone,"start", [(troop_slot_eq, "$g_talk_troop", slot_troop_occupation, slto_kingdom_lady), (le,"$talk_context",tc_siege_commander), ], "Yes?", "lady_talk",[]], ##### TODO: QUESTS COMMENT OUT BEGIN ## [anyone|plyr,"lady_talk", [(check_quest_active, "qst_deliver_message_to_lover"), ## (quest_slot_eq, "qst_deliver_message_to_lover", slot_quest_target_troop, "$g_talk_troop"), ## (quest_get_slot, ":troop_no", "qst_deliver_message_to_lover", slot_quest_giver_troop), ## (str_store_troop_name_link, 3, ":troop_no")], ## "I have brought you a message from {s3}", "lady_message_from_lover_success",[(call_script, "script_finish_quest", "qst_deliver_message_to_lover", 100)]], ## ## [anyone|plyr,"lady_talk", [(check_quest_active, "qst_rescue_lady_under_siege"), ## (quest_slot_eq, "qst_rescue_lady_under_siege", slot_quest_object_troop, "$g_talk_troop"), ## (quest_slot_eq, "qst_rescue_lady_under_siege", slot_quest_current_state, 0)], ## "TODO: I'm taking you home!", "lady_rescue_from_siege_check",[]], ## ## ## [anyone,"lady_rescue_from_siege_check", [(neg|hero_can_join)], ## "TODO: You don't have enough room for me!", "close_window",[]], ## ## ## [anyone,"lady_rescue_from_siege_check", [], "TODO: Thank you so much!", "lady_pretalk",[(quest_set_slot, "qst_rescue_lady_under_siege", slot_quest_current_state, 1), ## (troop_set_slot, "$g_talk_troop", slot_troop_cur_center, 0), ## (troop_join, "$g_talk_troop")]], ## [anyone,"lady_message_from_lover_success", [], "TODO: Thank you so much!", "lady_pretalk",[]], ## [anyone,"lady_pretalk", [], "Anything else?", "lady_talk",[]], [anyone|plyr,"lady_talk", [ (store_partner_quest, ":ladys_quest"), (lt, ":ladys_quest", 0) ], "Is there anything I can do to win your favour?", "lady_ask_for_quest",[(call_script, "script_get_random_quest", "$g_talk_troop"), (assign, "$random_quest_no", reg0)]], [anyone,"lady_ask_for_quest", [(troop_slot_eq, "$g_talk_troop", slot_troop_does_not_give_quest, 1)], "I don't have anything else for you to do right now.", "lady_pretalk",[]], [anyone,"lady_ask_for_quest", [(eq, "$random_quest_no", "qst_rescue_lord_by_replace")], "Oh, I fear I may never see my {s17}, {s13}, again... He is a prisoner in the dungeon of {s14}.\ We have tried to negotiate his ransom, but it has been set too high.\ We can never hope to raise that much money without selling everything we own,\ and God knows {s13} would rather spend his life in prison than make us destitute.\ Instead I came up with a plan to get him out of there, but it requires someone to make a great sacrifice,\ and so far my pleas have fallen on deaf ears...", "lady_mission_told", [ (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), (quest_get_slot, ":quest_target_troop", "$random_quest_no", slot_quest_target_troop), (try_begin), (troop_get_slot, ":cur_lord", "$g_talk_troop", slot_troop_spouse), (gt, ":cur_lord", 0), (str_store_string, s17, "str_husband"), (else_try), (str_store_string, s17, "str_father"), (try_end), (str_store_troop_name, s11, "$g_talk_troop"), (str_store_troop_name_link, s13, ":quest_target_troop"), (str_store_party_name_link, s14, ":quest_target_center"), (setup_quest_text,"$random_quest_no"), (str_store_string, s2, "@{s11} asked you to rescue her {s17}, {s13}, from {s14} by switching clothes and taking his place in prison."), ]], [anyone,"lady_ask_for_quest", [(eq, "$random_quest_no", "qst_deliver_message_to_prisoner_lord")], "My poor {s17}, {s13}, is a prisoner in the {s14} dungeons.\ The only way we can talk to each other is by exchanging letters whenever we can,\ but the journey is so dangerous that we get little chance to do so.\ Please, would you deliver one for me?", "lady_mission_told", [ (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), (quest_get_slot, ":quest_target_troop", "$random_quest_no", slot_quest_target_troop), (try_begin), (troop_get_slot, ":cur_lord", "$g_talk_troop", slot_troop_spouse), (gt, ":cur_lord", 0), (str_store_string, s17, "str_husband"), (else_try), (str_store_string, s17, "str_father"), (try_end), (str_store_troop_name, s11, "$g_talk_troop"), (str_store_troop_name_link, s13, ":quest_target_troop"), (str_store_party_name_link, s14, ":quest_target_center"), (setup_quest_text,"$random_quest_no"), (str_store_string, s2, "@{s11} asked you to deliver a message to {s13}, who is imprisoned at {s14}."), ]], [anyone,"lady_ask_for_quest", [(eq, "$random_quest_no", "qst_duel_for_lady")], "Dear {playername}, you are kind to ask, but you know little of my troubles\ and I can't possibly ask you to throw yourself into danger on my behalf.", "lady_quest_duel_for_lady",[]], [anyone|plyr,"lady_quest_duel_for_lady", [], "Tell me what the problem is, and I can make my own decision.", "lady_quest_duel_for_lady_2", [ (quest_get_slot, ":quest_target_troop", "$random_quest_no", slot_quest_target_troop), (str_store_troop_name, s11, "$g_talk_troop"), (str_store_troop_name_link, s13, ":quest_target_troop"), (str_store_string, s2, "@You agreed to challenge {s13} to defend {s11}'s honour."), (setup_quest_text,"$random_quest_no"), ]], [anyone,"lady_quest_duel_for_lady_2", [], "Very well, as you wish it...\ My husband has made certain enemies in his life, {playername}. One of the most insidious is {s13}.\ He is going around making terrible accusations against me, impugning my honour at every turn!\ Because he cannot harm my husband directly, he is using me as a target to try and stain our name.\ You should hear the awful things he's said! I only wish there was someone brave enough to make him recant his slander,\ but {s13} is a very fine swordsman, and he's widely feared...", "lady_quest_duel_for_lady_3",[]], [anyone|plyr,"lady_quest_duel_for_lady_3", [], "I fear him not, {s65}. I will make him take back his lies.", "lady_quest_duel_for_lady_3_accepted",[]], [anyone,"lady_quest_duel_for_lady_3_accepted", [], "Oh! I can't ask that of you, {playername}, but...\ I would be forever indebted to you, and you are so sure. It would mean so much if you would defend my honour.\ Thank you a thousand times, all my prayers and my favour go with you.", "close_window", [ (quest_get_slot, ":quest_target_troop", "$random_quest_no", slot_quest_target_troop), (call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"), (call_script, "script_report_quest_troop_positions", "$random_quest_no", ":quest_target_troop", 3), (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", 3), ]], [anyone|plyr,"lady_quest_duel_for_lady_3", [], "If he's that dangerous, perhaps maybe it would be better to ignore him...", "lady_quest_duel_for_lady_3_rejected",[]], [anyone,"lady_quest_duel_for_lady_3_rejected", [], "Oh... Perhaps you're right, {playername}.\ I should let go of these silly childhood ideas of chivalry and courage. {Men/People} are not like that,\ not anymore. Good day to you.", "close_window", [(troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1), (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -1), ]], [anyone,"lady_ask_for_quest", [], "No, {playername}, I've no need for a champion right now.", "lady_pretalk",[]], [anyone|plyr,"lady_mission_told", [], "As you wish it, {s65}, it shall be done.", "lady_mission_accepted",[]], [anyone|plyr,"lady_mission_told", [], "{s66}, I fear I cannot help you right now.", "lady_mission_rejected",[]], [anyone,"lady_mission_accepted", [], "You are a true {gentleman/lady}, {playername}.\ Thank you so much for helping me", "close_window", [ (try_begin), (eq, "$random_quest_no", "qst_deliver_message_to_prisoner_lord"), (call_script, "script_troop_add_gold", "trp_player", 10), (try_end), (call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"), ]], [anyone,"lady_mission_rejected", [], "You'll not help a woman in need? You should be ashamed, {playername}...\ Please leave me, I have some important embroidery to catch up.", "close_window", [ (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -1), (troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1), ]], #Leave [anyone|plyr,"lady_talk", [], "I want to improve my relation with a lord. Can you help me?", "lady_restore_relation",[]], [anyone,"lady_restore_relation", [(le, "$g_talk_troop_relation", 0)], "{playername}, I don't know you well enough to act on your behalf. I am sorry.", "lady_pretalk",[]], [anyone,"lady_restore_relation", [], "Hmm. I guess you got on the wrong side of somebody. Very well, who do you want to restore your relation with?", "lady_restore_relation_2",[]], [anyone|plyr|repeat_for_troops,"lady_restore_relation_2", [(store_repeat_object, ":troop_no"), (is_between, ":troop_no", heroes_begin, heroes_end), (store_troop_faction, ":faction_no", ":troop_no"), (eq, "$g_talk_troop_faction", ":faction_no"), (call_script, "script_troop_get_player_relation", ":troop_no"), (lt, reg0, 0), (str_store_troop_name, s1, ":troop_no")], "{s1}", "lady_restore_relation_2b",[(store_repeat_object, "$troop_to_restore_relations_with")]], [anyone|plyr,"lady_restore_relation_2", [], "Never mind. I get along with everyone well enough.", "lady_pretalk",[]], [anyone,"lady_restore_relation_2b", [(str_store_troop_name, s10, "$troop_to_restore_relations_with")], "Well I can try to help you there.\ I am sure a few expensive gifts will make {s10} look at you more favorably.", "lady_restore_relation_3",[]], [anyone,"lady_restore_relation_3", [(str_store_troop_name, s10, "$troop_to_restore_relations_with"), (assign, "$lady_restore_cost_1", 1000), (assign, "$lady_restore_cost_2", 2000), (assign, "$lady_restore_cost_3", 3000), (assign, reg10, "$lady_restore_cost_1"), (assign, reg11, "$lady_restore_cost_2"), (assign, reg12, "$lady_restore_cost_3"), (troop_get_type, reg4, "$troop_to_restore_relations_with"), ], "You can improve your relation with {s10} by sending {reg4?her:him} a gift worth {reg10} denars.\ But if you can afford spending {reg11} denars on the gift, it would make a good impression on {reg4?her:him}.\ And if you can go up to {reg12} denars, that would really help smooth things out.", "lady_restore_relation_4",[]], [anyone|plyr,"lady_restore_relation_4", [(store_troop_gold,":gold", "trp_player"), (ge, ":gold", "$lady_restore_cost_1"), (assign, reg10, "$lady_restore_cost_1")], "I think a gift of {reg10} denars will do.", "lady_restore_relation_5",[(assign, "$temp", 1), (assign, "$temp_2", "$lady_restore_cost_1")]], [anyone|plyr,"lady_restore_relation_4", [(store_troop_gold,":gold", "trp_player"), (ge, ":gold", "$lady_restore_cost_2"), (assign, reg11, "$lady_restore_cost_2")], "Maybe I can afford {reg11} denars.", "lady_restore_relation_5",[(assign, "$temp", 2), (assign, "$temp_2", "$lady_restore_cost_2")]], [anyone|plyr,"lady_restore_relation_4", [(store_troop_gold,":gold", "trp_player"), (ge, ":gold", "$lady_restore_cost_3"), (assign, reg12, "$lady_restore_cost_3")], "In that case, I am ready to spend {reg12} denars.", "lady_restore_relation_5",[(assign, "$temp", 3), (assign, "$temp_2", "$lady_restore_cost_3")]], [anyone|plyr,"lady_restore_relation_4", [], "I don't think I can afford a gift at the moment.", "lady_restore_relation_cant_afford",[]], [anyone,"lady_restore_relation_5", [], "Excellent. Then I'll choose an appropriate gift for you and send it to {s10} with your compliments.\ I am sure {reg4?she:he} will appreciate the gesture.", "lady_restore_relation_6",[ (troop_remove_gold, "trp_player","$temp_2"), (call_script, "script_change_player_relation_with_troop", "$troop_to_restore_relations_with", "$temp"), (troop_get_type, reg4, "$troop_to_restore_relations_with"), ]], [anyone|plyr,"lady_restore_relation_6", [], "Thank you for your help, madame.", "lady_pretalk",[]], [anyone,"lady_restore_relation_cant_afford", [], "I am afraid, I can't be of much help in that case, {playername}. I am sorry.", "lady_pretalk",[]], [anyone|plyr,"lady_talk", [], "I must beg my leave.", "lady_leave",[]], [anyone|auto_proceed,"lady_leave", [], "Farewell, {playername}.", "close_window",[(eq,"$talk_context",tc_party_encounter),(assign, "$g_leave_encounter", 1)]], #Convincing bargaining [anyone,"convince_begin", [], "I still don't see why I should accept what you're asking of me.", "convince_options", [(quest_get_slot, "$convince_value", "$g_convince_quest", slot_quest_convince_value), ]], [anyone|plyr,"convince_options", [(assign, reg8, "$convince_value")], "Then I'll make it worth your while. ({reg8} denars)", "convince_bribe",[]], [anyone|plyr,"convince_options", [(store_div, "$convince_relation_penalty", "$convince_value", 300), (val_add, "$convince_relation_penalty", 1), (assign, reg9, "$convince_relation_penalty")], "Please, do it for the sake of our friendship. (-{reg9} to relation)", "convince_friendship",[]], [anyone|plyr,"convince_options", [], "Let me try and convince you. (Persuasion)", "convince_persuade_begin", []], [anyone|plyr,"convince_options", [], "Never mind.", "lord_pretalk",[]], [anyone,"convince_bribe", [], "Mmm, a generous gift to my coffers would certainly help matters...\ {reg8} denars should do it. If you agree, then I'll go with your suggestion.", "convince_bribe_verify",[]], [anyone|plyr,"convince_bribe_verify", [(store_troop_gold, ":gold", "trp_player"), (lt, ":gold", "$convince_value")], "I'm afraid my finances will not allow for such a gift.", "convince_bribe_cant_afford",[]], [anyone|plyr,"convince_bribe_verify", [(store_troop_gold, ":gold", "trp_player"), (ge, ":gold", "$convince_value")], "Very well, please accept these {reg8} denars as a token of my gratitude.", "convince_bribe_goon",[]], [anyone|plyr,"convince_bribe_verify", [], "Let me think about this some more.", "convince_begin",[]], [anyone,"convince_bribe_cant_afford", [], "Ah. In that case, there is little I can do,\ unless you have some further argument to make.", "convince_options",[]], [anyone,"convince_bribe_goon", [], "My dear {playername}, your generous gift has led me to reconsider what you ask,\ and I have come to appreciate the wisdom of your proposal.", "convince_accept",[(troop_remove_gold, "trp_player","$convince_value")]], [anyone,"convince_friendship", [(store_add, ":min_relation", 5, "$convince_relation_penalty"), (ge, "$g_talk_troop_relation", ":min_relation")], "You've done well by me in the past, {playername},\ and for that I will go along with your request, but know that I do not like you using our relationship this way.", "convince_friendship_verify",[]], [anyone|plyr,"convince_friendship_verify", [], "I am sorry, my friend, but I need your help in this.", "convince_friendship_go_on",[]], [anyone|plyr,"convince_friendship_verify", [], "If it will not please you, then I'll try something else.", "lord_pretalk",[]], [anyone,"convince_friendship_go_on", [], "All right then, {playername}, I will accept this for your sake. But remember, you owe me for this.", "convince_accept", [(store_sub, ":relation_change", 0, "$convince_relation_penalty"), (call_script, "script_change_player_relation_with_troop","$g_talk_troop",":relation_change")]], [anyone,"convince_friendship", [(ge, "$g_talk_troop_relation", -5)], "I don't think I owe you such a favor {playername}.\ I see no reason to accept this for you.", "lord_pretalk",[]], [anyone,"convince_friendship", [], "Is this a joke? You've some nerve asking me for favours, {playername},\ and let me assure you you'll get none.", "lord_pretalk",[]], [anyone,"convince_persuade_begin", [(troop_get_slot, ":last_persuasion_time", "$g_talk_troop", slot_troop_last_persuasion_time), (store_current_hours, ":cur_hours"), (store_add, ":valid_time", ":last_persuasion_time", 24), (gt, ":cur_hours", ":valid_time"), ], "Very well. Make your case.", "convince_persuade_begin_2",[]], [anyone|plyr,"convince_persuade_begin_2", [], "[Attempt to persuade]", "convince_persuade",[ (try_begin), (store_random_in_range, ":rand", 0, 100), (lt, ":rand", 30), (store_current_hours, ":cur_hours"), (troop_set_slot, "$g_talk_troop", slot_troop_last_persuasion_time, ":cur_hours"), (try_end), (store_skill_level, ":persuasion_level", "skl_persuasion", "trp_player"), (store_add, ":persuasion_potential", ":persuasion_level", 5), (store_random_in_range, ":random_1", 0, ":persuasion_potential"), (store_random_in_range, ":random_2", 0, ":persuasion_potential"), (store_add, ":rand", ":random_1", ":random_2"), (assign, ":persuasion_difficulty", "$convince_value"), (convert_to_fixed_point, ":persuasion_difficulty"), (store_sqrt, ":persuasion_difficulty", ":persuasion_difficulty"), (convert_from_fixed_point, ":persuasion_difficulty"), (val_div, ":persuasion_difficulty", 10), (val_add, ":persuasion_difficulty", 4), (store_sub, "$persuasion_strength", ":rand", ":persuasion_difficulty"), (val_mul, "$persuasion_strength", 20), (assign, reg5, "$persuasion_strength"), (val_sub, "$convince_value", "$persuasion_strength"), (quest_set_slot, "$g_convince_quest", slot_quest_convince_value, "$convince_value"), (str_store_troop_name, s50, "$g_talk_troop"), (troop_get_type, reg51, "$g_talk_troop"), (try_begin), (lt, "$persuasion_strength", -30), (str_store_string, s5, "str_persuasion_summary_very_bad"), (else_try), (lt, "$persuasion_strength", -10), (str_store_string, s5, "str_persuasion_summary_bad"), (else_try), (lt, "$persuasion_strength", 10), (str_store_string, s5, "str_persuasion_summary_average"), (else_try), (lt, "$persuasion_strength", 30), (str_store_string, s5, "str_persuasion_summary_good"), (else_try), (str_store_string, s5, "str_persuasion_summary_very_good"), (try_end), (dialog_box, "@{s5} (Persuasion strength: {reg5})", "@Persuasion Attempt"), ]], [anyone|plyr,"convince_persuade_begin_2", [], "Wait, perhaps there is another way to convince you.", "convince_begin",[]], [anyone,"convince_persuade_begin", [], "By God's grace, {playername}!\ Haven't we talked enough already? I am tired of listening to you,\ and I do not want to hear any more of it right now.", "lord_pretalk",[]], [anyone,"convince_persuade", [(le, "$convince_value", 0)], "All right, all right. You have persuaded me to it.\ I'll go ahead with what you suggest.", "convince_accept",[]], [anyone,"convince_persuade", [(gt, "$persuasion_strength", 5)], "You've a point, {playername},\ I'll admit that much. However I am not yet convinced I should do as you bid.", "convince_options",[]], [anyone,"convince_persuade", [(gt, "$persuasion_strength", -5)], "Enough, {playername}.\ You've a lot of arguments, but I find none of them truly convincing. I stand by what I said before.", "convince_options",[]], [anyone,"convince_persuade", [], "Truthfully, {playername}, I fail to see the virtue of your reasoning.\ What you ask for makes even less sense now than it did before.", "convince_options",[]], #Seneschal [anyone,"start", [(troop_slot_eq, "$g_talk_troop", slot_troop_occupation, slto_kingdom_seneschal), (eq, "$talk_context", tc_siege_won_seneschal), (str_store_party_name, s1, "$g_encountered_party"), ], "I must congratulate you on your victory, my {lord/lady}. Welcome to {s1}.\ We, the housekeepers of this castle, are at your service.", "siege_won_seneschal_1",[]], [anyone|plyr,"siege_won_seneschal_1", [], "Are you the seneschal?", "siege_won_seneschal_2",[]], [anyone,"siege_won_seneschal_2", [], "Indeed I am, my {lord/lady}.\ I have always served the masters of {s1} to the best of my ability, whichever side they might be on.\ Thus you may count on my utmost loyalty for as long as you are the {lord/lady} of this place.\ Now, do you intend to keep me on as the seneschal? I promise you will not be disappointed.", "siege_won_seneschal_3",[]], [anyone|plyr,"siege_won_seneschal_3", [], "Very well, you may keep your post for the time being.", "siege_won_seneschal_4",[]], [anyone|plyr,"siege_won_seneschal_3", [], "You can stay, but I shall be keeping a close watch on you.", "siege_won_seneschal_4",[]], [anyone,"siege_won_seneschal_4", [], "Thank you, my {lord/lady}. If you do not mind my impudence,\ may I inquire as to what you wish to do with the castle?", "siege_won_seneschal_5",[]], [anyone|plyr,"siege_won_seneschal_5", [], "I will sell it to another lord.", "siege_won_seneschal_6",[]], [anyone|plyr,"siege_won_seneschal_5", [], "I intend to claim it for myself.", "siege_won_seneschal_6",[]], [anyone|plyr,"siege_won_seneschal_5", [], "I haven't given it much thought. What are my options?", "siege_won_seneschal_list_options",[]], [anyone,"siege_won_seneschal_list_options", [], "According to our laws and traditions,\ you can do one of several things.\ First, you could station a garrison here to protect the castle from any immediate counterattacks,\ then request an audience with some wealthy lord and ask him to make you an offer.\ It would be worth a tidy sum, believe you me.\ If you do not wish to sell, then you will have to find yourself a liege lord and protector who would accept homage from you.\ Without a royal investiture and an army at your back, you would have a difficult time holding on to the castle.\ Both you and {s1} would become great big targets for any man with a few soldiers and a scrap of ambition.\ ", "siege_won_seneschal_list_options_2",[]], [anyone|plyr,"siege_won_seneschal_list_options_2", [], "What do you mean, a liege lord and protector? I won this place by my own hand, I don't need anyone else!", "siege_won_seneschal_list_options_3",[]], [anyone,"siege_won_seneschal_list_options_3", [], "Of course you don't, my {lord/lady}.\ However, no lord in the land will recognize your claim to the castle unless it is verified by royal decree.\ They would call {s1} an outlaw stronghold and take it from you at the earliest opportunity.\ Surely not even you could stand against a whole army.", "siege_won_seneschal_list_options_4",[]], [anyone|plyr,"siege_won_seneschal_list_options_4", [], "Hmm. I'll give it some thought.", "siege_won_seneschal_6",[]], [anyone,"siege_won_seneschal_6", [], "I am very pleased to hear it, my {lord/lady}.\ I am only trying to serve you to the best of my ability. Now,\ if at any time you find you have further need of me,\ I will be in the great hall arranging a smooth handover of the castle to your forces.\ ", "close_window",[]], [anyone,"start", [(troop_slot_eq, "$g_talk_troop", slot_troop_occupation, slto_kingdom_seneschal),(eq,"$g_talk_troop_met",0),(str_store_party_name,s1,"$g_encountered_party")], "Good day, {sir/madam}. I do nott believe I've seen you here before.\ Let me extend my welcome to you as the seneschal of {s1}.", "seneschal_intro_1",[]], [anyone|plyr,"seneschal_intro_1", [], "A pleasure to meet you, {s65}.", "seneschal_intro_1a",[]], [anyone,"seneschal_intro_1a", [], "How can I help you?", "seneschal_talk",[]], [anyone|plyr,"seneschal_intro_1", [], "What exactly do you do here?", "seneschal_intro_1b",[]], [anyone,"seneschal_intro_1b", [], "Ah, a seneschal's duties are many, good {sire/woman}.\ For example, I collect the rents from my lord's estates, I manage the castle's storerooms,\ I deal with the local peasantry, I take care of castle staff, I arrange supplies for the garrison...\ All mundane matters on this fief are my responsibility, on behalf of my lord.\ Everything except commanding the soldiers themselves.", "seneschal_talk",[]], [anyone,"start", [(troop_slot_eq, "$g_talk_troop", slot_troop_occupation, slto_kingdom_seneschal)], "Good day, {sir/madam}.", "seneschal_talk",[]], [anyone,"seneschal_pretalk", [], "Anything else?", "seneschal_talk",[]], ##### TODO: QUESTS COMMENT OUT BEGIN ## [anyone|plyr,"seneschal_talk", [(check_quest_active, "qst_deliver_supply_to_center_under_siege"), ## (quest_slot_eq, "qst_deliver_supply_to_center_under_siege", slot_quest_target_troop, "$g_talk_troop"), ## (quest_slot_eq, "qst_deliver_supply_to_center_under_siege", slot_quest_current_state, 1), ## (store_item_kind_count, ":no_supplies", "itm_siege_supply"), ## (quest_get_slot, ":target_amount", "qst_deliver_supply_to_center_under_siege", slot_quest_target_amount), ## (ge, ":no_supplies", ":target_amount")], ## "TODO: Here are the supplies.", "seneschal_supplies_given",[]], ## ## [anyone|plyr,"seneschal_talk", [(check_quest_active, "qst_deliver_supply_to_center_under_siege"), ## (quest_slot_eq, "qst_deliver_supply_to_center_under_siege", slot_quest_target_troop, "$g_talk_troop"), ## (quest_slot_eq, "qst_deliver_supply_to_center_under_siege", slot_quest_current_state, 1), ## (store_item_kind_count, ":no_supplies", "itm_siege_supply"), ## (quest_get_slot, ":target_amount", "qst_deliver_supply_to_center_under_siege", slot_quest_target_amount), ## (lt, ":no_supplies", ":target_amount"), ## (gt, ":no_supplies", 0)], ## "TODO: Here are the supplies, but some of them are missing.", "seneschal_supplies_given_missing",[]], ## ## [anyone|plyr,"seneschal_talk", [(check_quest_active, "qst_deliver_supply_to_center_under_siege"), ## (quest_slot_eq, "qst_deliver_supply_to_center_under_siege", slot_quest_object_troop, "$g_talk_troop"), ## (quest_slot_eq, "qst_deliver_supply_to_center_under_siege", slot_quest_current_state, 0)], ## "TODO: Give me the supplies.", "seneschal_supplies",[]], ## ## [anyone,"seneschal_supplies", [(store_free_inventory_capacity, ":free_inventory"), ## (quest_get_slot, ":quest_target_amount", "qst_deliver_supply_to_center_under_siege", slot_quest_target_amount), ## (ge, ":free_inventory", ":quest_target_amount"), ## (quest_get_slot, ":quest_target_center", "qst_deliver_supply_to_center_under_siege", slot_quest_target_center), ## (str_store_party_name, 0, ":quest_target_center"), ## (troop_add_items, "trp_player", "itm_siege_supply", ":quest_target_amount")], ## "TODO: Here, take these supplies. You must deliver them to {s0} as soon as possible.", "seneschal_pretalk",[(quest_set_slot, "qst_deliver_supply_to_center_under_siege", slot_quest_current_state, 1)]], ## ## [anyone,"seneschal_supplies", [], ## "TODO: You don't have enough space to take the supplies. Free your inventory and return back to me.", "seneschal_pretalk",[]], ## ## ## [anyone,"seneschal_supplies_given", [], ## "TODO: Thank you.", "seneschal_pretalk",[(party_get_slot, ":town_siege_days", "$g_encountered_party", slot_town_siege_days), ## (quest_get_slot, ":target_amount", "qst_deliver_supply_to_center_under_siege", slot_quest_target_amount), ## (val_sub, ":town_siege_days", ":target_amount"), ## (try_begin), ## (lt, ":town_siege_days", 0), ## (assign, ":town_siege_days", 0), ## (try_end), ## (party_set_slot, "$g_encountered_party", slot_town_siege_days, ":town_siege_days"), ## (troop_remove_items, "trp_player", "itm_siege_supply", ":target_amount"), ## (call_script, "script_finish_quest", "qst_deliver_supply_to_center_under_siege", 100)]], ## ## [anyone,"seneschal_supplies_given_missing", [], ## "TODO: Thank you but it's not enough...", "seneschal_pretalk",[(store_item_kind_count, ":no_supplies", "itm_siege_supply"), ## (quest_get_slot, ":target_amount", "qst_deliver_supply_to_center_under_siege", slot_quest_target_amount), ## (assign, ":percentage_completed", 100), ## (val_mul, ":percentage_completed", ":no_supplies"), ## (val_div, ":percentage_completed", ":target_amount"), ## (call_script, "script_finish_quest", "qst_deliver_supply_to_center_under_siege", ":percentage_completed"), ## (party_get_slot, ":town_siege_days", "$g_encountered_party", slot_town_siege_days), ## (val_sub, ":town_siege_days", ":no_supplies"), ## (try_begin), ## (lt, ":town_siege_days", 0), ## (assign, ":town_siege_days", 0), ## (try_end), ## (party_set_slot, "$g_encountered_party", slot_town_siege_days, ":town_siege_days"), ## (troop_remove_items, "trp_player", "itm_siege_supply", ":no_supplies"), ## (call_script, "script_end_quest", "qst_deliver_supply_to_center_under_siege")]], ## ##### TODO: QUESTS COMMENT OUT END [anyone|plyr,"seneschal_talk", [(store_relation, ":cur_rel", "fac_player_supporters_faction", "$g_encountered_party_faction"), (ge, ":cur_rel", 0),], "I would like to ask you a question...", "seneschal_ask_something",[]], [anyone|plyr,"seneschal_talk", [(store_relation, ":cur_rel", "fac_player_supporters_faction", "$g_encountered_party_faction"), (ge, ":cur_rel", 0),], "I wish to know more about someone...", "seneschal_ask_about_someone",[]], [anyone,"seneschal_ask_about_someone", [], "Perhaps I may be able to help. Whom did you have in mind?", "seneschal_ask_about_someone_2",[]], [anyone|plyr|repeat_for_troops,"seneschal_ask_about_someone_2", [(store_repeat_object, ":troop_no"), (is_between, ":troop_no", heroes_begin, heroes_end), (store_troop_faction, ":faction_no", ":troop_no"), (eq, "$g_encountered_party_faction", ":faction_no"), (str_store_troop_name, s1, ":troop_no")], "{s1}", "seneschal_ask_about_someone_3",[(store_repeat_object, "$hero_requested_to_learn_relations")]], [anyone|plyr,"seneschal_ask_about_someone_2", [], "Never mind.", "seneschal_pretalk",[]], [anyone, "seneschal_ask_about_someone_3", [(call_script, "script_troop_write_family_relations_to_s1", "$hero_requested_to_learn_relations"), (call_script, "script_troop_write_owned_centers_to_s2", "$hero_requested_to_learn_relations")], "{s2}{s1}", "seneschal_ask_about_someone_4",[(add_troop_note_from_dialog, "$hero_requested_to_learn_relations", 2)]], [anyone, "seneschal_ask_about_someone_relation", [(call_script, "script_troop_count_number_of_enemy_troops", "$hero_requested_to_learn_relations"), (assign, ":no_enemies", reg0), (try_begin), (gt, ":no_enemies", 1), (try_for_range, ":i_enemy", 1, ":no_enemies"), (store_add, ":slot_no", slot_troop_enemies_begin, ":i_enemy"), (troop_get_slot, ":cur_enemy", "$hero_requested_to_learn_relations", ":slot_no"), (str_store_troop_name_link, s50, ":cur_enemy"), (try_begin), (eq, ":i_enemy", 1), (troop_get_slot, ":cur_enemy", "$hero_requested_to_learn_relations", slot_troop_enemy_1), (str_store_troop_name_link, s51, ":cur_enemy"), (str_store_string, s51, "str_s50_and_s51"), (else_try), (str_store_string, s51, "str_s50_comma_s51"), (try_end), (try_end), (else_try), (eq, ":no_enemies", 1), (troop_get_slot, ":cur_enemy", "$hero_requested_to_learn_relations", slot_troop_enemy_1), (str_store_troop_name_link, s51, ":cur_enemy"), (else_try), (str_store_string, s51, "str_noone"), (try_end), (troop_get_type, reg1, "$hero_requested_to_learn_relations")], "{reg1?She:He} hates {s51}.", "seneschal_ask_about_someone_4",[(add_troop_note_from_dialog, "$hero_requested_to_learn_relations", 3)]], # Ryan END [anyone|plyr,"seneschal_ask_about_someone_4", [], "Where does {s1} stand with others?.", "seneschal_ask_about_someone_relation",[]], [anyone|plyr,"seneschal_ask_about_someone_4", [], "My thanks, that was helpful.", "seneschal_pretalk",[]], [anyone|plyr,"seneschal_talk", [], "I must take my leave of you now. Farewell.", "close_window",[]], [anyone,"seneschal_ask_something", [], "I'll do what I can to help, of course. What did you wish to ask?", "seneschal_ask_something_2",[]], [anyone|plyr,"seneschal_ask_something_2", [], "Perhaps you know where to find someone...", "seneschal_ask_location",[]], [anyone,"seneschal_ask_location", [], "Well, a man in my position does hear a lot of things. Of whom were you thinking?", "seneschal_ask_location_2",[]], [anyone|plyr|repeat_for_troops,"seneschal_ask_location_2", [(store_repeat_object, ":troop_no"), (is_between, ":troop_no", heroes_begin, heroes_end), (store_troop_faction, ":faction_no", ":troop_no"), (eq, "$g_encountered_party_faction", ":faction_no"), (str_store_troop_name, s1, ":troop_no")], "{s1}", "seneschal_ask_location_3",[(store_repeat_object, "$hero_requested_to_learn_location")]], [anyone|plyr,"seneschal_ask_location_2", [], "Never mind.", "seneschal_pretalk",[]], [anyone,"seneschal_ask_location_3", [(call_script, "script_get_information_about_troops_position", "$hero_requested_to_learn_location", 0)], "{s1}", "seneschal_pretalk",[]], #caravan merchants [anyone,"start", [(eq,"$caravan_escort_state",1), (eq,"$g_encountered_party","$caravan_escort_party_id"), (le,"$talk_context",tc_party_encounter), (store_distance_to_party_from_party, reg(0),"$caravan_escort_destination_town","$caravan_escort_party_id"), (lt,reg(0),5), (str_store_party_name,s3,"$caravan_escort_destination_town"), (assign,reg(3), "$caravan_escort_agreed_reward"), ], "There! I can see the walls of {s3} in the distance. We've made it safely.\ Here, take this purse of {reg3} denars, as I promised. I hope we can travel together again someday.", "close_window", [ (assign,"$caravan_escort_state",0), (call_script, "script_troop_add_gold", "trp_player","$caravan_escort_agreed_reward"), (assign,reg(4), "$caravan_escort_agreed_reward"), (val_mul,reg(4), 1), (add_xp_as_reward,reg(4)), (assign, "$g_leave_encounter",1), ]], [anyone,"start", [(eq,"$caravan_escort_state",1), (eq,"$g_encountered_party","$caravan_escort_party_id"), (eq, "$talk_context", tc_party_encounter), ], "We've made it this far... Is everything clear up ahead?", "talk_caravan_escort",[]], [anyone|plyr,"talk_caravan_escort", [], "There might be bandits nearby. Stay close.", "talk_caravan_escort_2a",[]], [anyone,"talk_caravan_escort_2a", [], "Trust me, {playername}, we're already staying as close to you as we can. Lead the way.", "close_window",[(assign, "$g_leave_encounter",1)]], [anyone|plyr,"talk_caravan_escort", [], "No sign of trouble, we can breathe easy.", "talk_caravan_escort_2b",[]], [anyone,"talk_caravan_escort_2b", [], "I'll breathe easy when we reach {s1} and not a moment sooner. Let's keep moving.", "close_window",[[str_store_party_name,s1,"$caravan_escort_destination_town"],(assign, "$g_leave_encounter",1)]], [anyone,"start", [(eq,"$talk_context", tc_party_encounter), (eq, "$g_encountered_party_type", spt_kingdom_caravan), (party_slot_ge, "$g_encountered_party", slot_party_last_toll_paid_hours, "$g_current_hours"), ], "What do you want? We paid our toll to you less than three days ago.", "merchant_talk",[]], [anyone,"start", [(eq,"$talk_context", tc_party_encounter),(eq, "$g_encountered_party_type", spt_kingdom_caravan),(ge,"$g_encountered_party_relation",0)], "Hail, friend.", "merchant_talk",[]], [anyone,"start", [(eq,"$talk_context", tc_party_encounter), (eq, "$g_encountered_party_type", spt_kingdom_caravan), (lt,"$g_encountered_party_relation",0), (eq, "$g_encountered_party_faction", "fac_merchants"), ], "What do you want? We are but simple merchants, we've no quarrel with you, so leave us alone.", "merchant_talk",[]], [anyone,"start", [(eq,"$talk_context", tc_party_encounter), (eq, "$g_encountered_party_type", spt_kingdom_caravan), (lt,"$g_encountered_party_relation",0), (faction_get_slot, ":faction_leader", "$g_encountered_party_faction",slot_faction_leader), (str_store_troop_name, s9, ":faction_leader"), ], "Be warned, knave! This caravan is under the protection of {s9}.\ Step out of our way or you will face his fury!", "merchant_talk",[]], [anyone,"start", [(party_slot_eq, "$g_encountered_party", slot_party_type, spt_kingdom_caravan),(this_or_next|eq,"$talk_context", tc_party_encounter),(eq,"$talk_context", 0)], "Yes? What do you want?", "merchant_talk",[]], [anyone,"merchant_pretalk", [], "Anything else?", "merchant_talk",[]], [anyone|plyr,"merchant_talk", [(le,"$talk_context", tc_party_encounter), (check_quest_active, "qst_raid_caravan_to_start_war"), (neg|check_quest_concluded, "qst_raid_caravan_to_start_war"), (quest_slot_eq, "qst_raid_caravan_to_start_war", slot_quest_target_faction, "$g_encountered_party_faction"), (str_store_faction_name, s17, "$players_kingdom"), ], "You are trespassing in {s17} territory. I am confiscating this caravan and all its goods!", "caravan_start_war_quest_1",[]], [anyone,"caravan_start_war_quest_1", [(str_store_faction_name, s17, "$players_kingdom"),], "What? What nonsense is this? We are nowhere near your territory, {mate/wench},\ and moreover we have a peace treaty with {s17}!", "caravan_start_war_quest_2",[]], [anyone|plyr,"caravan_start_war_quest_2", [], "We'll see about that! Defend yourselves!", "merchant_attack",[]], [anyone|plyr,"caravan_start_war_quest_2", [], "Never mind, 'twas but a joke. Farewell.", "close_window",[(assign, "$g_leave_encounter",1)]], [anyone|plyr,"merchant_talk", [(le,"$talk_context", tc_party_encounter),(eq, "$g_encountered_party_faction", "$players_kingdom")], "I have an offer for you.", "merchant_talk_offer",[]], [anyone,"merchant_talk_offer", [], "What is it?", "merchant_talk_offer_2",[]], [anyone|plyr,"merchant_talk_offer_2", [(eq,"$talk_context", tc_party_encounter),(eq, "$g_encountered_party_faction", "$players_kingdom")], "I can escort you to your destination for a price.", "caravan_offer_protection",[]], ## [anyone|plyr,"merchant_talk_offer_2", [(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0), ## (neg|faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"), #he is not a faction leader! ## (call_script, "script_get_number_of_hero_centers", "$g_talk_troop"), ## (eq, reg0, 0), #he has no castles or towns ## (hero_can_join), ## ], ## "I need capable men like you. Will you join me?", "knight_offer_join",[ ## ]], [anyone|plyr,"merchant_talk_offer_2", [], "Nothing. Forget it", "merchant_pretalk",[]], [anyone|plyr,"merchant_talk", [(eq,"$talk_context", tc_party_encounter), #TODO: For the moment don't let attacking if merchant has paid toll. (neg|party_slot_ge, "$g_encountered_party", slot_party_last_toll_paid_hours, "$g_current_hours"), ], "I demand something from you!", "merchant_demand",[]], [anyone,"merchant_demand", [(eq,"$talk_context", tc_party_encounter)], "What do you want?", "merchant_demand_2",[]], [anyone|plyr,"merchant_demand_2", [(neq,"$g_encountered_party_faction","$players_kingdom")], "There is a toll for free passage here!", "merchant_demand_toll",[]], [anyone,"merchant_demand_toll", [(gt, "$g_strength_ratio", 70), (store_div, reg6, "$g_ally_strength", 2), (val_add, reg6, 40), (assign, "$temp", reg6), ], "Please, I don't want any trouble. I can give you {reg6} denars, just let us go.", "merchant_demand_toll_2",[]], [anyone,"merchant_demand_toll", [(store_div, reg6, "$g_ally_strength", 4), (val_add, reg6, 10), (assign, "$temp", reg6), ], "I don't want any trouble. I can give you {reg6} denars if you'll let us go.", "merchant_demand_toll_2",[]], [anyone|plyr,"merchant_demand_toll_2", [], "Agreed, hand it over and you may go in peace.", "merchant_demand_toll_accept",[]], [anyone,"merchant_demand_toll_accept", [(assign, reg6, "$temp")], "Very well then. Here's {reg6} denars. ", "close_window", [(assign, "$g_leave_encounter",1), (call_script, "script_troop_add_gold", "trp_player","$temp"), (store_add, ":toll_finish_time", "$g_current_hours", merchant_toll_duration), (party_set_slot, "$g_encountered_party", slot_party_last_toll_paid_hours, ":toll_finish_time"), (try_begin), (ge, "$g_encountered_party_relation", -5), (store_relation,":rel", "$g_encountered_party_faction","fac_player_supporters_faction"), (try_begin), (gt, ":rel", 0), (val_sub, ":rel", 1), (try_end), (val_sub, ":rel", 1), (call_script, "script_set_player_relation_with_faction", "$g_encountered_party_faction", ":rel"), (try_end), ### Troop commentaries changes begin (call_script, "script_add_log_entry", logent_caravan_accosted, "trp_player", -1, -1, "$g_encountered_party_faction"), ### Troop commentaries changes end (assign, reg6, "$temp"), ]], [anyone|plyr,"merchant_demand_toll_2", [], "I changed my mind, I can't take your money.", "merchant_pretalk",[]], [anyone|plyr,"merchant_demand_toll_2", [], "No, I want everything you have! [Attack]", "merchant_attack",[]], [anyone|plyr,"merchant_demand_2", [(neq,"$g_encountered_party_faction","$players_kingdom")], "Hand over your gold and valuables now!", "merchant_attack_begin",[]], [anyone|plyr,"merchant_demand_2", [], "Nothing. Forget it.", "merchant_pretalk",[]], [anyone,"merchant_attack_begin", [], "Are you robbing us?", "merchant_attack_verify",[]], [anyone|plyr,"merchant_attack_verify", [], "Robbing you? No, no! It was a joke.", "merchant_attack_verify_norob",[]], [anyone,"merchant_attack_verify_norob", [], "God, don't joke about that, {lad/lass}. For a moment I thought we were in real trouble.", "close_window",[(assign, "$g_leave_encounter",1)]], [anyone|plyr,"merchant_attack_verify", [], "Of course I'm robbing you. Now hand over your goods.", "merchant_attack",[]], [anyone,"merchant_attack", [], "Damn you, you won't get anything from us without a fight!", "close_window", [(store_relation,":rel", "$g_encountered_party_faction","fac_player_supporters_faction"), (try_begin), (gt, ":rel", 0), (val_sub, ":rel", 10), (try_end), (val_sub, ":rel", 5), (call_script, "script_set_player_relation_with_faction", "$g_encountered_party_faction", ":rel"), ### Troop commentaries changes begin (call_script, "script_add_log_entry", logent_caravan_accosted, "trp_player", -1, -1, "$g_encountered_party_faction"), ### Troop commentaries changes end ]], [anyone,"caravan_offer_protection", [], "These roads are dangerous indeed. One can never have enough protection.", "caravan_offer_protection_2", [(get_party_ai_object,":caravan_destination","$g_encountered_party"), (store_distance_to_party_from_party, "$caravan_distance_to_target",":caravan_destination","$g_encountered_party"), (assign,"$caravan_escort_offer","$caravan_distance_to_target"), (val_sub, "$caravan_escort_offer", 10), (call_script, "script_party_calculate_strength", "p_main_party",0), (assign, ":player_strength", reg0), (val_min, ":player_strength", 200), (val_add, ":player_strength", 20), (val_mul,"$caravan_escort_offer",":player_strength"), (val_div,"$caravan_escort_offer",50), (val_max, "$caravan_escort_offer", 5), ]], [anyone,"caravan_offer_protection_2", [[lt,"$caravan_distance_to_target",10]], "An escort? We're almost there already! Thank you for the offer, though.", "close_window",[(assign, "$g_leave_encounter",1)]], [anyone,"caravan_offer_protection_2", [(get_party_ai_object,":caravan_destination","$g_encountered_party"), (str_store_party_name,1,":caravan_destination"), (assign,reg(2),"$caravan_escort_offer")], "We are heading to {s1}. I will pay you {reg2} denars if you escort us there.", "caravan_offer_protection_3", []], [anyone|plyr,"caravan_offer_protection_3", [], "Agreed.", "caravan_offer_protection_4",[]], [anyone,"caravan_offer_protection_4", [], "I want you to stay close to us along the way.\ We'll need your help if we get ambushed by bandits.", "caravan_offer_protection_5",[]], [anyone|plyr,"caravan_offer_protection_5", [], "Don't worry, you can trust me.", "caravan_offer_protection_6",[]], [anyone,"caravan_offer_protection_6", [(get_party_ai_object,":caravan_destination","$g_encountered_party"), (str_store_party_name,1,":caravan_destination")], "Good. Come and collect your money when we're within sight of {s1}. For now, let's just get underway.", "close_window", [(get_party_ai_object,":caravan_destination","$g_encountered_party"), (assign, "$caravan_escort_destination_town", ":caravan_destination"), (assign, "$caravan_escort_party_id", "$g_encountered_party"), (assign, "$caravan_escort_agreed_reward", "$caravan_escort_offer"), (assign, "$caravan_escort_state", 1), (assign, "$g_leave_encounter",1) ]], [anyone|plyr,"caravan_offer_protection_3", [], "Forget it.", "caravan_offer_protection_4b",[]], [anyone,"caravan_offer_protection_4b", [], "Perhaps another time, then.", "close_window",[(assign, "$g_leave_encounter",1)]], [anyone|plyr,"merchant_talk", [(eq,"$talk_context", tc_party_encounter),(lt, "$g_talk_troop_faction_relation", 0)], "Not so fast. First, hand over all your goods and money.", "talk_caravan_enemy_2",[]], [anyone,"talk_caravan_enemy_2", [], "Never. It is our duty to protect these goods. You shall have to fight us, brigand!", "close_window", [ (store_relation,":rel","$g_encountered_party_faction","fac_player_supporters_faction"), (val_min,":rel",0), (val_sub,":rel",4), (call_script, "script_set_player_relation_with_faction", "$g_encountered_party_faction", ":rel"), (call_script, "script_add_log_entry", logent_caravan_accosted, "trp_player", -1, -1, "$g_encountered_party_faction"), ]], [anyone|plyr,"merchant_talk", [], "[Leave]", "close_window",[(assign, "$g_leave_encounter",1)]], # Prison Guards [anyone,"start", [(eq, "$talk_context", 0),(faction_slot_eq, "$g_encountered_party_faction", slot_faction_prison_guard_troop, "$g_talk_troop"), (this_or_next|eq, "$g_encountered_party_faction", "fac_player_supporters_faction"), ( party_slot_eq, "$g_encountered_party", slot_town_lord, "trp_player") ], "Good day, my {lord/lady}. Will you be visiting the prison?", "prison_guard_players",[]], [anyone|plyr,"prison_guard_players", [], "Yes. Unlock the door.", "close_window",[(call_script, "script_enter_dungeon", "$current_town", "mt_visit_town_castle")]], [anyone|plyr,"prison_guard_players", [], "No, not now.", "close_window",[]], [anyone,"start", [(eq, "$talk_context", 0),(faction_slot_eq, "$g_encountered_party_faction", slot_faction_prison_guard_troop, "$g_talk_troop")], "Yes? What do you want?", "prison_guard_talk",[]], [anyone|plyr,"prison_guard_talk", [], "Who is imprisoned here?", "prison_guard_ask_prisoners",[]], [anyone|plyr,"prison_guard_talk", [], "I want to speak with a prisoner.", "prison_guard_visit_prison",[]], [anyone,"prison_guard_ask_prisoners", [], "Currently, {s51} {reg1?are:is} imprisoned here.","prison_guard_talk",[(party_clear, "p_temp_party"), (assign, ":num_heroes", 0), (party_get_num_prisoner_stacks, ":num_stacks","$g_encountered_party"), (try_for_range, ":i_stack", 0, ":num_stacks"), (party_prisoner_stack_get_troop_id, ":stack_troop","$g_encountered_party",":i_stack"), (troop_is_hero, ":stack_troop"), (party_add_members, "p_temp_party", ":stack_troop", 1), (val_add, ":num_heroes", 1), (try_end), (call_script, "script_print_party_members", "p_temp_party"), (try_begin), (gt, ":num_heroes", 1), (assign, reg1, 1), (else_try), (assign, reg1, 0), (try_end)]], [anyone,"prison_guard_visit_prison", [(this_or_next|faction_slot_eq, "$g_encountered_party_faction",slot_faction_marshall,"trp_player"), (this_or_next|party_slot_eq, "$g_encountered_party", slot_town_lord, "trp_player"), (eq, "$g_encountered_party_faction", "$players_kingdom"), ], "Of course, {sir/madam}. Go in.", "close_window",[(call_script, "script_enter_dungeon", "$current_town", "mt_visit_town_castle")]], [anyone,"prison_guard_visit_prison", [], "You need to get permission from the lord to talk to prisoners.", "prison_guard_visit_prison_2",[]], [anyone|plyr,"prison_guard_visit_prison_2", [], "All right then. I'll try that.", "close_window",[]], [anyone|plyr,"prison_guard_visit_prison_2", [], "Come on now. I thought you were the boss here.", "prison_guard_visit_prison_3",[]], [anyone,"prison_guard_visit_prison_3", [], "He-heh. You got that right. Still, I can't let you into the prison.", "prison_guard_visit_prison_4",[]], [anyone|plyr,"prison_guard_visit_prison_4", [], "All right then. I'll leave now.", "close_window",[]], [anyone|plyr,"prison_guard_visit_prison_4", [(store_troop_gold,":gold","trp_player"),(ge,":gold",100)], "I found a purse with 100 denars a few paces away. I reckon it belongs to you.", "prison_guard_visit_prison_5",[]], [anyone,"prison_guard_visit_prison_5", [], "Ah! I was looking for this all day. How good of you to bring it back {sir/madam}.\ Well, now that I know what an honest {man/lady} you are, there can be no harm in letting you inside. Go in.", "close_window",[(troop_remove_gold, "trp_player",100),(call_script, "script_enter_dungeon", "$current_town", "mt_visit_town_castle")]], [anyone|plyr,"prison_guard_talk", [], "Never mind.", "close_window",[]], # Castle Guards [anyone,"start", [(eq, "$talk_context", 0),(faction_slot_eq, "$g_encountered_party_faction", slot_faction_castle_guard_troop, "$g_talk_troop"), (this_or_next|eq, "$g_encountered_party_faction", "fac_player_supporters_faction"), ( party_slot_eq, "$g_encountered_party", slot_town_lord, "trp_player") ], "Your orders, {Lord/Lady}?", "castle_guard_players",[]], [anyone|plyr,"castle_guard_players", [], "Open the door. I'll go in.", "close_window",[(call_script, "script_enter_court", "$current_town")]], [anyone|plyr,"castle_guard_players", [], "Never mind.", "close_window",[]], [anyone,"start", [(eq, "$talk_context", 0),(faction_slot_eq, "$g_encountered_party_faction", slot_faction_castle_guard_troop, "$g_talk_troop"),(eq, "$sneaked_into_town",1), (gt,"$g_time_since_last_talk",0)], "Get out of my sight, beggar! You stink!", "castle_guard_sneaked_intro_1",[]], [anyone,"start", [(eq, "$talk_context", 0),(faction_slot_eq, "$g_encountered_party_faction", slot_faction_castle_guard_troop, "$g_talk_troop"),(eq, "$sneaked_into_town",1)], "Get lost before I lose my temper you vile beggar!", "close_window",[]], [anyone|plyr,"castle_guard_sneaked_intro_1", [], "I want to enter the hall and speak to the lord.", "castle_guard_sneaked_intro_2",[]], [anyone|plyr,"castle_guard_sneaked_intro_1", [], "[Leave]", "close_window",[]], [anyone,"castle_guard_sneaked_intro_2", [], "Are you out of your mind, {man/woman}?\ Beggars are not allowed into the hall. Now get lost or I'll beat you bloody.", "close_window",[]], [anyone,"start", [(eq, "$talk_context", 0),(faction_slot_eq, "$g_encountered_party_faction", slot_faction_castle_guard_troop, "$g_talk_troop")], "What do you want?", "castle_guard_intro_1",[]], [anyone|plyr,"castle_guard_intro_1", [], "I want to enter the hall and speak to the lord.", "castle_guard_intro_2",[]], [anyone|plyr,"castle_guard_intro_1", [], "Never mind.", "close_window",[]], [anyone,"castle_guard_intro_2", [], "You can go in after leaving your weapons with me. No one is allowed to carry arms into the lord's hall.", "castle_guard_intro_2", []], [anyone|plyr,"castle_guard_intro_2", [], "Here, take my arms. I'll go in.", "close_window", [(call_script, "script_enter_court", "$current_town")]], [anyone|plyr,"castle_guard_intro_2", [], "No, I give my arms to no one.", "castle_guard_intro_2b", []], [anyone,"castle_guard_intro_2b", [], "Then you can't go in.", "close_window", []], ## [anyone|plyr,"castle_guard_intro_1", [], ## "Never mind.", "close_window",[]], ## [anyone,"castle_guard_intro_2", [], ## "Does the lord expect you?", "castle_guard_intro_3",[]], ## [anyone|plyr,"castle_guard_intro_3", [], "Yes.", "castle_guard_intro_check",[]], ## [anyone|plyr,"castle_guard_intro_3", [], "No.", "castle_guard_intro_no",[]], ## [anyone,"castle_guard_intro_check", [], "Hmm. All right {sir/madam}.\ ## You can go in. But you must leave your weapons with me. Noone's allowed into the court with weapons.", "close_window",[]], ## [anyone,"castle_guard_intro_check", [], "You liar!\ ## Our lord would have no business with a filthy vagabond like you. Get lost now before I kick your butt.", "close_window",[]], ## [anyone,"castle_guard_intro_no", [], "Well... What business do you have here then?", "castle_guard_intro_4",[]], ## [anyone|plyr,"castle_guard_intro_4", [], "I wish to present the lord some gifts.", "castle_guard_intro_gifts",[]], ## [anyone|plyr,"castle_guard_intro_4", [], "I have an important matter to discuss with the lord. Make way now.", "castle_guard_intro_check",[]], ## [anyone,"castle_guard_intro_gifts", [], "Really? What gifts?", "castle_guard_intro_5",[]], ## [anyone|plyr,"castle_guard_intro_4", [], "Many gifts. For example, I have a gift of 20 denars here for his loyal servants.", "castle_guard_intro_gifts",[]], ## [anyone|plyr,"castle_guard_intro_4", [], "My gifts are of no concern to you. They are for your lords and ladies..", "castle_guard_intro_check",[]], ## [anyone,"castle_guard_intro_gifts", [], "Oh! you can give those 20 denars to me. I can distribute them for you.\ ## You can enter the court and present your gifts to the lord. I'm sure he'll be pleased.\ ## But you must leave your weapons with me. Noone's allowed into the court with weapons.", "close_window",[]], #Kingdom Parties # [anyone,"start", [(this_or_next|eq,"$g_encountered_party_template","pt_swadian_foragers"), # (eq,"$g_encountered_party_template","pt_vaegir_foragers"), ## [anyone,"start", [(this_or_next|party_slot_eq,"$g_encountered_party",slot_party_type, spt_forager), ## (this_or_next|party_slot_eq,"$g_encountered_party",slot_party_type, spt_scout), ## (party_slot_eq,"$g_encountered_party",slot_party_type, spt_patrol), ## (str_store_faction_name,5,"$g_encountered_party_faction")], ## "In the name of the {s5}.", "kingdom_party_encounter",[]], ## ## [anyone,"kingdom_party_encounter", [(le,"$g_encountered_party_relation",-10)], ## "Surrender now, and save yourself the indignity of defeat!", "kingdom_party_encounter_war",[]], ## [anyone|plyr,"kingdom_party_encounter_war", [], "[Go to Battle]", "close_window",[(encounter_attack)]], ## ## [anyone,"kingdom_party_encounter", [(ge,"$g_encountered_party_relation",10)], ## "Greetings, fellow warrior.", "close_window",[(eq,"$talk_context",tc_party_encounter),(assign, "$g_leave_encounter", 1)]], ## ## [anyone,"kingdom_party_encounter", [], ## "You can go.", "close_window",[]], #Player Parties ## [party_tpl|pt_old_garrison,"start", [], ## "They told us to leave the castle to the new garrison {sir/madam}. So we left and came to rejoin you.", "player_old_garrison_encounter",[]], ## ## [anyone|plyr,"player_old_garrison_encounter", [(party_can_join)], ## "You have done well. You'll join my command now.", "close_window",[(assign, "$g_move_heroes", 1), ## (call_script, "script_party_add_party", "p_main_party", "$g_encountered_party"), ## (remove_party, "$g_encountered_party"), ## (assign, "$g_leave_encounter", 1)]], ## [anyone|plyr,"player_old_garrison_encounter", [(assign, reg1, 0), ## (try_begin), ## (neg|party_can_join), ## (assign, reg1, 1), ## (try_end)], ## "You can't join us now{reg1?, I can't command all the lot of you:}. Follow our lead.", "close_window",[(party_set_ai_behavior, "$g_encountered_party", ai_bhvr_attack_party), ## (party_set_ai_object, "$g_encountered_party", "p_main_party"), ## (party_set_flags, "$g_encountered_party", pf_default_behavior, 0), ## (assign, "$g_leave_encounter", 1)]], ## ## [anyone|plyr,"player_old_garrison_encounter", [(assign, reg1, 0), ## (try_begin), ## (neg|party_can_join), ## (assign, reg1, 1), ## (try_end)], ## "You can't join us now{reg1?, I can't command all the lot of you:}. Stay here and wait for me.", "close_window",[ ## (party_set_ai_behavior, "$g_encountered_party", ai_bhvr_travel_to_point), ## (party_get_position, pos1, "$g_encountered_party"), ## (party_set_ai_target_position, "$g_encountered_party", pos1), ## (party_set_flags, "$g_encountered_party", pf_default_behavior, 0), ## (assign, "$g_leave_encounter", 1)]], ## [anyone,"start", [(eq, "$talk_context", tc_castle_gate)], "What do you want?", "castle_gate_guard_talk",[]], [anyone,"castle_gate_guard_pretalk", [], "Yes?", "castle_gate_guard_talk",[]], [anyone|plyr,"castle_gate_guard_talk", [(ge, "$g_encountered_party_relation", 0)], "We need shelter for the night. Will you let us in?", "castle_gate_open",[]], [anyone|plyr,"castle_gate_guard_talk", [(party_slot_ge, "$g_encountered_party", slot_town_lord, 1)], "I want to speak with the lord of the castle.", "request_meeting_castle_lord",[]], [anyone|plyr,"castle_gate_guard_talk", [], "I want to speak with someone in the castle.", "request_meeting_other",[]], [anyone|plyr,"castle_gate_guard_talk", [], "[Leave]", "close_window",[]], [anyone,"request_meeting_castle_lord", [(party_get_slot, ":castle_lord", "$g_encountered_party", slot_town_lord), (call_script, "script_get_troop_attached_party", ":castle_lord"), (eq, "$g_encountered_party", reg0), (str_store_troop_name, s2, ":castle_lord"), (assign, "$lord_requested_to_talk_to", ":castle_lord"), ], "Wait here. {s2} will see you.", "close_window",[]], [anyone,"request_meeting_castle_lord", [], "My lord is not here now.", "castle_gate_guard_pretalk",[]], [anyone,"request_meeting_other", [], "Who is that?", "request_meeting_3",[]], [anyone|plyr|repeat_for_troops,"request_meeting_3", [(store_repeat_object, ":troop_no"), (troop_is_hero, ":troop_no"), (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), (call_script, "script_get_troop_attached_party", ":troop_no"), (eq, "$g_encountered_party", reg0), (str_store_troop_name, s3, ":troop_no"), ], "{s3}", "request_meeting_4",[(store_repeat_object, "$lord_requested_to_talk_to")]], [anyone|plyr,"request_meeting_3", [], "Never mind.", "close_window",[(assign, "$lord_requested_to_talk_to", 0)]], [anyone,"request_meeting_4", [], "Wait there. I'll send him your request.", "request_meeting_5",[]], [anyone|plyr,"request_meeting_5", [], "I'm waiting...", "request_meeting_6",[]], [anyone,"request_meeting_6", [ (call_script, "script_troop_get_player_relation", "$lord_requested_to_talk_to"), (assign, ":lord_relation", reg0), (gt, ":lord_relation", -20), ], "All right. {s2} will talk to you now.", "close_window",[(str_store_troop_name, s2, "$lord_requested_to_talk_to")]], [anyone,"request_meeting_6", [(str_store_troop_name, s2, "$lord_requested_to_talk_to")], "{s2} says he will not see you. Begone now.", "close_window",[]], [anyone,"castle_gate_open", [(party_get_slot, ":castle_lord", "$g_encountered_party", slot_town_lord), (call_script, "script_get_troop_attached_party", ":castle_lord"), (eq, "$g_encountered_party", reg0), (ge, "$g_encountered_party_relation", 0), (call_script, "script_troop_get_player_relation", ":castle_lord"), (assign, ":castle_lord_relation", reg0), #(troop_get_slot, ":castle_lord_relation", ":castle_lord", slot_troop_player_relation), (ge, ":castle_lord_relation", 5), (str_store_troop_name, s2, ":castle_lord") ], "My lord {s2} will be happy to see you {sir/madam}.\ Come on in. I am opening the gates for you.", "close_window",[(assign,"$g_permitted_to_center",1)]], [anyone,"castle_gate_open", [(party_get_slot, ":castle_lord", "$g_encountered_party", slot_town_lord), (call_script, "script_get_troop_attached_party", ":castle_lord"), (neq, "$g_encountered_party", reg0), (ge, "$g_encountered_party_relation", 0), (call_script, "script_troop_get_player_relation", ":castle_lord"), (assign, ":castle_lord_relation", reg0), #(troop_get_slot, ":castle_lord_relation", ":castle_lord", slot_troop_player_relation), (ge, ":castle_lord_relation", 5), (str_store_troop_name, s2, ":castle_lord") ], "My lord {s2} is not in the castle now.\ But I think he would approve of you taking shelter here.\ Come on in. I am opening the gates for you.", "close_window",[(assign,"$g_permitted_to_center",1)]], [anyone,"castle_gate_open", [(party_get_slot, ":castle_lord", "$g_encountered_party", slot_town_lord), (call_script, "script_troop_get_player_relation", ":castle_lord"), (assign, ":castle_lord_relation", reg0), #(troop_get_slot, ":castle_lord_relation", ":castle_lord", slot_troop_player_relation), (ge, ":castle_lord_relation", -2), ], "Come on in. I am opening the gates for you.", "close_window",[(assign,"$g_permitted_to_center",1)]], [anyone,"castle_gate_open", [(party_get_slot, ":castle_lord", "$g_encountered_party", slot_town_lord), (call_script, "script_troop_get_player_relation", ":castle_lord"), (assign, ":castle_lord_relation", reg0), #(troop_get_slot, ":castle_lord_relation", ":castle_lord", slot_troop_player_relation), (ge, ":castle_lord_relation", -19), (str_store_troop_name, s2, ":castle_lord") ], "Come on in. But make sure your men behave sensibly within the walls.\ My lord {s2} does not want trouble here.", "close_window",[(assign,"$g_permitted_to_center",1)]], [anyone,"castle_gate_open", [(party_get_slot, ":castle_lord", "$g_encountered_party", slot_town_lord), (str_store_troop_name, s2, ":castle_lord"), ], "My lord {s2} does not want you here. Begone now.", "close_window",[]], #Enemy Kingdom Meetings # [anyone,"start", [(eq, "$talk_context", tc_lord_talk_in_center)], # "Greetings {playername}.", "request_meeting_1",[]], # [anyone,"request_meeting_pretalk", [(eq, "$talk_context", tc_lord_talk_in_center)], # "Yes?", "request_meeting_1",[]], # [anyone|plyr,"request_meeting_1", [(ge, "$g_encountered_party_faction", 0)], "Open the gates and let me in!", "request_meeting_open_gates",[]], # [anyone|plyr,"request_meeting_1", [(party_slot_ge, "$g_encountered_party", slot_town_lord, 1)], "I want to speak with the lord of the castle.", "request_meeting_castle_lord",[]], # [anyone|plyr,"request_meeting_1", [], "I want to speak with someone in the castle.", "request_meeting_other",[]], ##### TODO: QUESTS COMMENT OUT BEGIN ## [anyone|plyr,"request_meeting_1",[(check_quest_active,"qst_bring_prisoners_to_enemy"), ## (neg|check_quest_succeeded, "qst_bring_prisoners_to_enemy"), ## (quest_get_slot, ":quest_giver_troop", "qst_bring_prisoners_to_enemy", slot_quest_giver_troop), ## (quest_get_slot, ":quest_target_amount", "qst_bring_prisoners_to_enemy", slot_quest_target_amount), ## (quest_get_slot, ":quest_object_troop", "qst_bring_prisoners_to_enemy", slot_quest_object_troop), ## (quest_slot_eq, "qst_bring_prisoners_to_enemy", slot_quest_target_center, "$g_encountered_party"), ## (party_count_prisoners_of_type, ":num_prisoners", "p_main_party", ":quest_object_troop"), ## (ge, ":num_prisoners", ":quest_target_amount"), ## (str_store_troop_name,1,":quest_giver_troop"), ## (assign, reg1, ":quest_target_amount"), ## (str_store_troop_name_plural,2,":quest_object_troop")], ## "TODO: Sir, lord {s1} ordered me to bring {reg1} {s2} for ransom.", "guard_prisoners_brought", ## [(quest_get_slot, ":quest_target_amount", "qst_bring_prisoners_to_enemy", slot_quest_target_amount), ## (quest_get_slot, ":quest_target_center", "qst_bring_prisoners_to_enemy", slot_quest_target_center), ## (quest_get_slot, ":quest_object_troop", "qst_bring_prisoners_to_enemy", slot_quest_object_troop), ## (party_remove_prisoners, "p_main_party", ":quest_object_troop", ":quest_target_amount"), ## (party_add_members, ":quest_target_center", ":quest_object_troop", ":quest_target_amount"), ## (call_script, "script_game_get_join_cost", ":quest_object_troop"), ## (assign, ":reward", reg0), ## (val_mul, ":reward", ":quest_target_amount"), ## (val_div, ":reward", 2), ## (call_script, "script_troop_add_gold", "trp_player",":reward"), ## (party_get_slot, ":cur_lord", "$g_encountered_party", slot_town_lord),#Removing gold from the town owner's wealth ## (troop_get_slot, ":cur_wealth", ":cur_lord", slot_troop_wealth), ## (val_sub, ":cur_wealth", ":reward"), ## (troop_set_slot, ":cur_lord", slot_troop_wealth, ":cur_wealth"), ## (quest_set_slot, "qst_bring_prisoners_to_enemy", slot_quest_target_amount, ":reward"), ## (succeed_quest, "qst_bring_prisoners_to_enemy"), ## ]], ## ## [anyone|plyr,"request_meeting_1",[(check_quest_active,"qst_bring_prisoners_to_enemy"), ## (neg|check_quest_succeeded, "qst_bring_prisoners_to_enemy"), ## (quest_get_slot, ":quest_giver_troop", "qst_bring_prisoners_to_enemy", slot_quest_giver_troop), ## (quest_get_slot, ":quest_target_amount", "qst_bring_prisoners_to_enemy", slot_quest_target_amount), ## (quest_get_slot, ":quest_object_troop", "qst_bring_prisoners_to_enemy", slot_quest_object_troop), ## (quest_slot_eq, "qst_bring_prisoners_to_enemy", slot_quest_target_center, "$g_encountered_party"), ## (party_count_prisoners_of_type, ":num_prisoners", "p_main_party", ":quest_object_troop"), ## (lt, ":num_prisoners", ":quest_target_amount"), ## (gt, ":num_prisoners", 0), ## (str_store_troop_name,1,":quest_giver_troop"), ## (assign, reg1, ":quest_target_amount"), ## (str_store_troop_name_plural,2,":quest_object_troop")], ## "TODO: Sir, lord {s1} ordered me to bring {reg1} {s2} for ransom, but some of them died during my expedition.", "guard_prisoners_brought_some", ## [(quest_get_slot, ":quest_target_amount", "qst_bring_prisoners_to_enemy", slot_quest_target_amount), ## (quest_get_slot, ":quest_target_center", "qst_bring_prisoners_to_enemy", slot_quest_target_center), ## (quest_get_slot, ":quest_object_troop", "qst_bring_prisoners_to_enemy", slot_quest_object_troop), ## (party_count_prisoners_of_type, ":num_prisoners", "p_main_party", ":quest_object_troop"), ## (party_remove_prisoners, "p_main_party", ":quest_object_troop", ":num_prisoners"), ## (party_add_members, ":quest_target_center", ":quest_object_troop", ":num_prisoners"), ## (call_script, "script_game_get_join_cost", ":quest_object_troop"), ## (assign, ":reward", reg0), ## (val_mul, ":reward", ":num_prisoners"), ## (val_div, ":reward", 2), ## (call_script, "script_troop_add_gold", "trp_player",":reward"), ## (party_get_slot, ":cur_lord", "$g_encountered_party", slot_town_lord),#Removing gold from the town owner's wealth ## (troop_get_slot, ":cur_wealth", ":cur_lord", slot_troop_wealth), ## (val_sub, ":cur_wealth", ":reward"), ## (troop_set_slot, ":cur_lord", slot_troop_wealth, ":cur_wealth"), ## (call_script, "script_game_get_join_cost", ":quest_object_troop"), ## (assign, ":reward", reg0), ## (val_mul, ":reward", ":quest_target_amount"), ## (val_div, ":reward", 2), ## (quest_set_slot, "qst_bring_prisoners_to_enemy", slot_quest_current_state, 1),#Some of the prisoners are given, so it's state will change for remembering that. ## (quest_set_slot, "qst_bring_prisoners_to_enemy", slot_quest_target_amount, ":reward"),#Still needs to pay the lord the full price of the prisoners ## (succeed_quest, "qst_bring_prisoners_to_enemy"), ## ]], ## ## ## [anyone,"guard_prisoners_brought", [], ## "TODO: Thank you. Here is the money for prisoners.", "request_meeting_pretalk",[]], ## ## [anyone,"guard_prisoners_brought_some", [], ## "TODO: Thank you, but that's not enough. Here is the money for prisoners.", "request_meeting_pretalk",[]], # [anyone|plyr,"request_meeting_1", [], "[Leave]", "close_window",[]], ## [anyone,"request_meeting_open_gates", [(party_get_slot, ":castle_lord", "$g_encountered_party", slot_town_lord), ## (call_script, "script_get_troop_attached_party", ":castle_lord"), ## (eq, "$g_encountered_party", reg0), ## (str_store_troop_name, 1, ":castle_lord") ## ], "My lord {s1} is in the castle now. You must ask his permission to enter.", "request_meeting_pretalk",[]], ## ## [anyone,"request_meeting_open_gates", [(party_get_slot, ":castle_lord", "$g_encountered_party", slot_town_lord), ## (call_script, "script_get_troop_attached_party", ":castle_lord"), ## (neq, "$g_encountered_party", reg0), ## (ge, "$g_encountered_party_relation", 0), ## (troop_get_slot, ":castle_lord_relation", ":castle_lord", slot_troop_player_relation), ## (ge, ":castle_lord_relation", 20), ## (str_store_troop_name, 1, ":castle_lord") ## ], "My lord {s1} is not in the castle now.\ ## But I think he would approve of you taking shelter here, {sir/madam}.\ ## Come on in. I am opening the gates for you.", "close_window",[]], ## ## [anyone,"request_meeting_open_gates", [(party_get_slot, ":castle_lord", "$g_encountered_party", slot_town_lord),(str_store_troop_name, 1, ":castle_lord")], ## "My lord {s1} is not in the castle now. I can't allow you into the castle without his orders.", "request_meeting_pretalk",[]], # Quest conversations ##### TODO: QUESTS COMMENT OUT BEGIN ## [party_tpl|pt_peasant_rebels,"start", [], ## "TODO: What.", "peasant_rebel_talk",[]], ## [anyone|plyr, "peasant_rebel_talk", [], "TODO: Die.", "close_window",[]], ## [anyone|plyr, "peasant_rebel_talk", [], "TODO: Nothing.", "close_window",[(assign, "$g_leave_encounter",1)]], ## ## [party_tpl|pt_noble_refugees,"start", [], ## "TODO: What.", "noble_refugee_talk",[]], ## [anyone|plyr, "noble_refugee_talk", [], "TODO: Nothing.", "close_window",[(assign, "$g_leave_encounter",1)]], ## [anyone,"start", [(eq,"$talk_context",tc_join_battle_ally), ], "You have come just in time. Let us join our forces now and teach our enemy a lesson.", "close_window", []], [anyone,"start", [(eq,"$talk_context",tc_join_battle_enemy), ], "You are making a big mistake by fighting against us.", "close_window", []], [anyone,"start", [(eq,"$talk_context",tc_ally_thanks), (troop_is_hero, "$g_talk_troop"), (eq, "$g_talk_troop_met", 0), (ge, "$g_talk_troop_relation", 17), ], "I don't think we have met properly my friend. You just saved my life out there, and I still don't know your name...", "ally_thanks_meet", []], [anyone,"start", [(eq,"$talk_context",tc_ally_thanks), (troop_is_hero, "$g_talk_troop"), (eq, "$g_talk_troop_met", 0), (ge, "$g_talk_troop_relation", 5), ], "Your help was most welcome stranger. My name is {s1}. Can I learn yours?", "ally_thanks_meet", []], [anyone,"start", [(eq,"$talk_context",tc_ally_thanks), (troop_is_hero, "$g_talk_troop"), (eq, "$g_talk_troop_met", 0), (ge, "$g_talk_troop_relation", 0), (str_store_troop_name, s1, "$g_talk_troop"), ], "Thanks for your help, stranger. We haven't met properly yet, have we? What is your name?", "ally_thanks_meet", []], [anyone|plyr,"ally_thanks_meet", [], "My name is {playername}.", "ally_thanks_meet_2", []], [anyone, "ally_thanks_meet_2", [(ge, "$g_talk_troop_relation", 15),(str_store_troop_name, s1, "$g_talk_troop")], "Well met indeed {playername}. My name is {s1} and I am forever in your debt. If there is ever anything I can help you with, just let me know...", "close_window", []], [anyone, "ally_thanks_meet_2", [(ge, "$g_talk_troop_relation", 5),], "Well met {playername}. I am in your debt for what you just did. I hope one day I will find a way to repay it.", "close_window", []], [anyone, "ally_thanks_meet_2", [], "Well met {playername}. I am {s1}. Thanks for your help and I hope we meet again.", "close_window", []], #Post 0907 changes begin [anyone,"start", [(eq,"$talk_context",tc_ally_thanks), (troop_is_hero, "$g_talk_troop"), (ge, "$g_talk_troop_relation", 30), (ge, "$g_relation_boost", 10), ], "Again you save our necks, {playername}! Truly, you are the best of friends. {s43}", "close_window", [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_battle_won_default"), (try_begin), (party_stack_get_troop_id, ":enemy_party_leader", "p_encountered_party_backup", 0), (is_between, ":enemy_party_leader", kingdom_heroes_begin, kingdom_heroes_end), (call_script, "script_add_log_entry", logent_lord_helped_by_player, "trp_player", -1, ":enemy_party_leader", -1), (try_end), ]], [anyone,"start", [(eq,"$talk_context",tc_ally_thanks), (troop_is_hero, "$g_talk_troop"), (ge, "$g_talk_troop_relation", 20), (ge, "$g_relation_boost", 5), ], "You arrived just in the nick of time! {playername}. You have my deepest thanks! {s43}", "close_window", [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_battle_won_default"), (try_begin), (party_stack_get_troop_id, ":enemy_party_leader", "p_encountered_party_backup", 0), (is_between, ":enemy_party_leader", kingdom_heroes_begin, kingdom_heroes_end), (call_script, "script_add_log_entry", logent_lord_helped_by_player, "trp_player", -1, ":enemy_party_leader", -1), (try_end), ]], [anyone,"start", [(eq,"$talk_context",tc_ally_thanks), (troop_is_hero, "$g_talk_troop"), (ge, "$g_talk_troop_relation", 0), (ge, "$g_relation_boost", 3), ], "You turned up just in time, {playername}. I will not forget your help. {s43}", "close_window", [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_battle_won_default"), (try_begin), (party_stack_get_troop_id, ":enemy_party_leader", "p_encountered_party_backup", 0), (is_between, ":enemy_party_leader", kingdom_heroes_begin, kingdom_heroes_end), (call_script, "script_add_log_entry", logent_lord_helped_by_player, "trp_player", -1, ":enemy_party_leader", -1), (try_end), ]], [anyone,"start", [(eq,"$talk_context",tc_ally_thanks), (troop_is_hero, "$g_talk_troop"), (ge, "$g_talk_troop_relation", -5), ], "Good to see you here, {playername}. {s43}", "close_window", [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_battle_won_default"), ]], [anyone,"start", [(eq,"$talk_context",tc_ally_thanks), (troop_is_hero, "$g_talk_troop"), (ge, "$g_relation_boost", 4), ], "{s43}", "close_window", [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_battle_won_grudging_default"), ]], [anyone,"start", [(eq,"$talk_context",tc_ally_thanks), (troop_is_hero, "$g_talk_troop"), ], "{s43}", "close_window", [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_battle_won_unfriendly_default"), ]], # [anyone,"start", [(eq,"$talk_context",tc_ally_thanks), # (troop_is_hero, "$g_talk_troop"), # (ge, "$g_talk_troop_relation", -20), # ], # "So, this is {playername}. Well, your help wasn't really needed, but I guess you had nothing better to do, right?", "close_window", []], # [anyone,"start", [(eq,"$talk_context",tc_ally_thanks), # (troop_is_hero, "$g_talk_troop"), # ], # "Who told you to come to our help? I certainly didn't. Begone now. I want nothing from you and I will not let you steal my victory.", "close_window", []], #Post 0907 changes begin [anyone,"start", [(eq,"$talk_context",tc_ally_thanks), (ge, "$g_relation_boost", 10), (party_get_num_companions, reg1, "$g_encountered_party"), (val_sub, reg1, 1), ], "Thank you for your help {sir/madam}. You saved {reg1?our lives:my life} out there.", "close_window", []], [anyone,"start", [(eq,"$talk_context",tc_ally_thanks), (ge, "$g_relation_boost", 5), ], "Thank you for your help {sir/madam}. Things didn't look very well for us but then you came up and everything changed.", "close_window", []], [anyone,"start", [(eq,"$talk_context",tc_ally_thanks)], "Thank you for your help, {sir/madam}. It was fortunate to have you nearby.", "close_window", []], [anyone,"start", [(eq, "$talk_context", tc_hero_freed), (store_conversation_troop,":cur_troop"), (eq,":cur_troop","trp_kidnapped_girl"),], "Oh {sir/madam}. Thank you so much for rescuing me. Will you take me to my family now?", "kidnapped_girl_liberated_battle",[]], [anyone,"start", [(eq,"$talk_context",tc_hero_freed)], "I am in your debt for freeing me friend.", "freed_hero_answer", []], [anyone|plyr,"freed_hero_answer", [], "You're not going anywhere. You'll be my prisoner now!", "freed_hero_answer_1", [ (store_conversation_troop, ":cur_troop_id"), (party_add_prisoners, "p_main_party", ":cur_troop_id", 1),#take prisoner ]], [anyone,"freed_hero_answer_1", [], "Alas. Will my luck never change?", "close_window", []], [anyone|plyr,"freed_hero_answer", [], "You're free to go, {s65}.", "freed_hero_answer_2", [ ]], [anyone,"freed_hero_answer_2", [], "Thank you, good {sire/lady}. I never forget someone who's done me a good turn.", "close_window", []], [anyone|plyr,"freed_hero_answer", [], "Would you like to join me?", "freed_hero_answer_3", []], [anyone,"freed_hero_answer_3", [(store_random_in_range, ":random_no",0,2),(eq, ":random_no", 0)], "All right I will join you.", "close_window", [ (store_conversation_troop, ":cur_troop_id"), (party_add_members, "p_main_party", ":cur_troop_id", 1),#join hero ]], [anyone,"freed_hero_answer_3", [], "No, I want to go on my own.", "close_window", [ ]], [anyone,"start", [(eq,"$talk_context",tc_hero_defeated)], "You'll not live long to enjoy your victory. My kinsmen will soon wipe out the stain of this defeat.", "defeat_hero_answer", [ ]], [anyone|plyr,"defeat_hero_answer", [], "You are my prisoner now.", "defeat_hero_answer_1", [ (party_add_prisoners, "p_main_party", "$g_talk_troop", 1),#take prisoner #(troop_set_slot, "$g_talk_troop", slot_troop_is_prisoner, 1), (troop_set_slot, "$g_talk_troop", slot_troop_prisoner_of_party, "p_main_party"), (call_script, "script_event_hero_taken_prisoner_by_player", "$g_talk_troop"), ]], [anyone,"defeat_hero_answer_1", [], "Damn you. You will regret this.", "close_window", []], [anyone|plyr,"defeat_hero_answer", [], "You're free to go this time, but don't cross my path again.", "defeat_hero_answer_2", []], [anyone,"defeat_hero_answer_2", [], "We will meet again.", "close_window", []], # Local merchant [trp_local_merchant,"start", [], "Mercy! Please don't kill me!", "local_merchant_mercy",[]], [anyone|plyr,"local_merchant_mercy", [(quest_get_slot, ":quest_giver_troop", "qst_kill_local_merchant", slot_quest_giver_troop),(str_store_troop_name, s2, ":quest_giver_troop")], "I have nothing against you man. But {s2} wants you dead. Sorry.", "local_merchant_mercy_no",[]], [anyone,"local_merchant_mercy_no", [], "Damn you! May you burn in Hell!", "close_window",[]], [anyone|plyr,"local_merchant_mercy", [], "I'll let you live, if you promise me...", "local_merchant_mercy_yes",[]], [anyone,"local_merchant_mercy_yes", [], "Of course, I promise, I'll do anything. Just spare my life... ", "local_merchant_mercy_yes_2",[]], [anyone|plyr,"local_merchant_mercy_yes_2", [], "You are going to forget about {s2}'s debt to you.\ And you will sign a paper stating that he owes you nothing.", "local_merchant_mercy_yes_3",[]], [anyone,"local_merchant_mercy_yes_3", [], "Yes, of course. I'll do as you say.", "local_merchant_mercy_yes_4",[]], [anyone|plyr,"local_merchant_mercy_yes_4", [], "And if my lord hears so much of a hint of a complaint about this issue, then I'll come back for you,\ and it won't matter how much you scream for mercy then.\ Do you understand me?", "local_merchant_mercy_yes_5",[]], [anyone,"local_merchant_mercy_yes_5", [], "Yes {sir/madam}. Don't worry. I won't make any complaint.", "local_merchant_mercy_yes_6",[]], [anyone|plyr,"local_merchant_mercy_yes_6", [], "Good. Go now, before I change my mind.", "close_window", [(quest_set_slot, "qst_kill_local_merchant", slot_quest_current_state, 2), (call_script, "script_succeed_quest", "qst_kill_local_merchant"), (finish_mission), ]], # Village traitor [trp_fugitive,"start", [], "Yes, what do you want?", "fugitive_1",[]], [trp_fugitive|plyr,"fugitive_1", [ (quest_get_slot, ":quest_target_dna", "qst_hunt_down_fugitive", slot_quest_target_dna), (call_script, "script_get_name_from_dna_to_s50", ":quest_target_dna"), (str_store_string, s4, s50), ], "I am looking for a murderer by the name of {s4}. You fit his description.", "fugitive_2",[]], [trp_fugitive|plyr,"fugitive_1", [], "Nothing. Sorry to trouble you.", "close_window",[]], [trp_fugitive,"fugitive_2", [], "I do not know what you are talking about {sir/madam}.\ I assure you, I am just one of the dwellers here.", "fugitive_3",[]], [trp_fugitive|plyr,"fugitive_3", [], "Then drop your sword. If you are innocent, you have nothing to fear.\ We'll go now and talk to your neighbours, and if they verify your story, I'll go my way.", "fugitive_4",[]], [anyone,"fugitive_4", [], "Damn you! You will not be going anywhere!", "close_window", [(set_party_battle_mode), (try_for_agents, ":cur_agent"), (agent_get_troop_id, ":cur_agent_troop", ":cur_agent"), (eq, ":cur_agent_troop", "trp_fugitive"), (agent_set_team, ":cur_agent", 1), (try_end), (quest_set_slot, "qst_hunt_down_fugitive", slot_quest_current_state, 1), ]], [anyone,"member_chat", [(check_quest_active, "qst_incriminate_loyal_commander"), (quest_slot_eq, "qst_incriminate_loyal_commander", slot_quest_current_state, 0), (store_conversation_troop, "$g_talk_troop"), (eq, "$g_talk_troop", "$incriminate_quest_sacrificed_troop"), (quest_get_slot, ":quest_target_center", "qst_incriminate_loyal_commander", slot_quest_target_center), (store_distance_to_party_from_party, ":distance", "p_main_party", ":quest_target_center"), (lt, ":distance", 10), ], "Yes {sir/madam}?", "sacrificed_messenger_1",[]], [anyone|plyr,"sacrificed_messenger_1", [(quest_get_slot, ":quest_target_center", "qst_incriminate_loyal_commander", slot_quest_target_center), (str_store_party_name, s1, ":quest_target_center"), (quest_get_slot, ":quest_object_troop", "qst_incriminate_loyal_commander", slot_quest_object_troop), (str_store_troop_name, s2, ":quest_object_troop"),], "Take this letter to {s1} and give it to {s2}.", "sacrificed_messenger_2",[]], [anyone|plyr,"sacrificed_messenger_1", [], "Nothing. Nothing at all.", "close_window",[]], [anyone,"sacrificed_messenger_2", [], "Yes {sir/madam}. You can trust me. I will not fail you.", "sacrificed_messenger_3",[]], [anyone|plyr,"sacrificed_messenger_3", [], "Good. I will not forget your service. You will be rewarded when you return.", "close_window",[(party_remove_members, "p_main_party", "$g_talk_troop", 1), (set_spawn_radius, 0), (spawn_around_party, "p_main_party", "pt_sacrificed_messenger"), (assign, ":new_party", reg0), (party_add_members, ":new_party", "$g_talk_troop", 1), (party_set_ai_behavior, ":new_party", ai_bhvr_travel_to_party), (quest_get_slot, ":quest_target_center", "qst_incriminate_loyal_commander", slot_quest_target_center), (party_set_ai_object, ":new_party", ":quest_target_center"), (party_set_flags, ":new_party", pf_default_behavior, 0), (quest_set_slot, "qst_incriminate_loyal_commander", slot_quest_current_state, 2), (quest_set_slot, "qst_incriminate_loyal_commander", slot_quest_target_party, ":new_party")]], [anyone|plyr,"sacrificed_messenger_3", [], "Arggh! I can't do this. I can't send you to your own death!", "sacrificed_messenger_cancel",[]], [anyone,"sacrificed_messenger_cancel", [], "What do you mean {sir/madam}", "sacrificed_messenger_cancel_2",[]], [anyone|plyr,"sacrificed_messenger_cancel_2", [(quest_get_slot, ":quest_giver", "qst_incriminate_loyal_commander", slot_quest_giver_troop), (str_store_troop_name, s3, ":quest_giver"), ], "There's a trap set up for you in the town.\ {s3} ordered me to sacrifice one of my chosen warriors to fool the enemy,\ but he will just need to find another way.", "sacrificed_messenger_cancel_3",[ (quest_get_slot, ":quest_giver", "qst_incriminate_loyal_commander", slot_quest_giver_troop), (quest_set_slot, "qst_incriminate_loyal_commander", slot_quest_current_state, 1), (call_script, "script_change_player_relation_with_troop",":quest_giver",-5), (call_script, "script_change_player_honor", 3), (call_script, "script_fail_quest", "qst_incriminate_loyal_commander"), ]], [anyone,"sacrificed_messenger_cancel_3", [], "Thank you, {sir/madam}.\ I will follow you to the gates of hell. But this would not be a good death.", "close_window",[]], [party_tpl|pt_sacrificed_messenger,"start", [], "Don't worry, {sir/madam}, I'm on my way.", "close_window",[(assign, "$g_leave_encounter",1)]], #Spy [party_tpl|pt_spy,"start", [], "Good day {sir/madam}. Such fine weather don't you think? If you'll excuse me now I must go on my way.", "follow_spy_talk",[]], [anyone|plyr, "follow_spy_talk", [ (quest_get_slot, ":quest_giver", "qst_follow_spy", slot_quest_giver_troop), (str_store_troop_name, s1, ":quest_giver"), ], "In the name of {s1}, you are under arrest!", "follow_spy_talk_2", []], [anyone, "follow_spy_talk_2", [], "You won't get me alive!", "close_window", []], [anyone|plyr, "follow_spy_talk", [], "Never mind me. I was just passing by.", "close_window", [(assign, "$g_leave_encounter",1)]], [party_tpl|pt_spy_partners,"start", [], "Greetings.", "spy_partners_talk",[]], [anyone|plyr,"spy_partners_talk", [ (quest_get_slot, ":quest_giver", "qst_follow_spy", slot_quest_giver_troop), (str_store_troop_name, s1, ":quest_giver"), ], "In the name of {s1} You are under arrest!", "spy_partners_talk_2",[]], [anyone,"spy_partners_talk_2", [], "You will have to fight us first!", "close_window",[]], [anyone|plyr,"spy_partners_talk", [], "Never mind me. I was just passing by.", "close_window",[(assign, "$g_leave_encounter",1)]], ###Conspirator ## ## [party_tpl|pt_conspirator_leader,"start", [], "TODO: Hello.", "conspirator_talk",[]], ## [party_tpl|pt_conspirator,"start", [], "TODO: Hello.", "conspirator_talk",[]], ## ## [anyone|plyr,"conspirator_talk", [(gt, "$qst_capture_conspirators_leave_meeting_counter", 0), ## (quest_get_slot,":quest_giver","qst_capture_conspirators",slot_quest_giver_troop), ## (str_store_troop_name,s1,":quest_giver")], ## "TODO: In the name of {s1}, you are under arrest!", "conspirator_talk_2",[]], ## ## [anyone|plyr,"conspirator_talk", [], "TODO: Bye.", "close_window",[(assign, "$g_leave_encounter",1)]], ## ## [anyone,"conspirator_talk_2", [], "You won't get me alive!", "close_window",[]], ## #Runaway Peasants [party_tpl|pt_runaway_serfs,"start", [(party_slot_eq, "$g_encountered_party", slot_town_center, 0)],#slot_town_center is used for first time meeting "Good day {sir/madam}.", "runaway_serf_intro_1", [(party_set_slot, "$g_encountered_party", slot_town_center, 1)]], [anyone|plyr,"runaway_serf_intro_1", [(quest_get_slot, ":lord", "qst_bring_back_runaway_serfs", slot_quest_giver_troop), (str_store_troop_name, s4, ":lord")], "I have been sent by your {s4} whom you are running from. He will not punish you if you return now.", "runaway_serf_intro_2",[]], [anyone,"runaway_serf_intro_2", [(quest_get_slot, ":target_center", "qst_bring_back_runaway_serfs", slot_quest_target_center), (str_store_party_name, s6, ":target_center"), (quest_get_slot, ":quest_object_center", "qst_bring_back_runaway_serfs", slot_quest_object_center), (str_store_party_name, s1, ":quest_object_center")], "My good {sir/madam}. Our lives at our village {s1} was unbearable. We worked all day long and still went to bed hungry.\ We are going to {s6} to start a new life, where we will be treated like humans.", "runaway_serf_intro_3",[]], [anyone|plyr,"runaway_serf_intro_3", [(quest_get_slot, ":quest_object_center", "qst_bring_back_runaway_serfs", slot_quest_object_center), (str_store_party_name, s1, ":quest_object_center"),], "You have gone against our laws by running from your bondage. You will go back to {s1} now!", "runaway_serf_go_back", [(quest_get_slot, ":quest_object_center", "qst_bring_back_runaway_serfs", slot_quest_object_center), (call_script, "script_change_player_relation_with_center", ":quest_object_center", -1)]], [anyone|plyr,"runaway_serf_intro_3", [], "Well, maybe you are right. All right then. If anyone asks, I haven't seen you.", "runaway_serf_let_go", [(quest_get_slot, ":quest_object_center", "qst_bring_back_runaway_serfs", slot_quest_object_center), (call_script, "script_change_player_relation_with_center", ":quest_object_center", 1)]], [party_tpl|pt_runaway_serfs,"runaway_serf_go_back", [(quest_get_slot, ":home_center", "qst_bring_back_runaway_serfs", slot_quest_object_center), (str_store_party_name, s5, ":home_center")], "All right {sir/madam}. As you wish. We'll head back to {s5} now.", "close_window", [(quest_get_slot, ":quest_object_center", "qst_bring_back_runaway_serfs", slot_quest_object_center), (party_set_ai_object, "$g_encountered_party", ":quest_object_center"), (assign, "$g_leave_encounter",1)]], [anyone,"runaway_serf_let_go", [], "God bless you, {sir/madam}. We will not forget your help.", "close_window", [(party_set_slot, "$g_encountered_party", slot_town_castle, 1), (assign, "$g_leave_encounter",1)]], [party_tpl|pt_runaway_serfs,"start", [(party_slot_eq, "$g_encountered_party", slot_town_castle, 1), ], "Good day {sir/madam}. Don't worry. If anyone asks, we haven't seen you.", "runaway_serf_reconsider",[]], [anyone|plyr,"runaway_serf_reconsider", [], "I have changed my mind. You must back to your village!", "runaway_serf_go_back", [(party_set_slot, "$g_encountered_party", slot_town_castle, 0), (quest_get_slot, ":quest_object_center", "qst_bring_back_runaway_serfs", slot_quest_object_center), (call_script, "script_change_player_relation_with_center", ":quest_object_center", -2)]], [anyone|plyr,"runaway_serf_reconsider", [], "Good. Go quickly now before I change my mind.", "runaway_serf_let_go",[]], [party_tpl|pt_runaway_serfs,"start", [(party_slot_eq, "$g_encountered_party", slot_town_castle, 0), (get_party_ai_object, ":cur_ai_object"), (quest_get_slot, ":home_center", "qst_bring_back_runaway_serfs", slot_quest_object_center), (neq, ":home_center", ":cur_ai_object")], "Good day {sir/madam}. We were heading back to {s5}, but I am afraid we lost our way.", "runaway_serf_talk_caught",[]], [anyone|plyr,"runaway_serf_talk_caught", [], "Do not test my patience. You are going back now!", "runaway_serf_go_back",[]], [anyone|plyr,"runaway_serf_talk_caught", [], "Well, if you are that eager to go, then go.", "runaway_serf_let_go", [(quest_get_slot, ":quest_object_center", "qst_bring_back_runaway_serfs", slot_quest_object_center), (call_script, "script_change_player_relation_with_center", ":quest_object_center", 1)]], [party_tpl|pt_runaway_serfs,"start", [(quest_get_slot, ":home_center", "qst_bring_back_runaway_serfs", slot_quest_object_center), (str_store_party_name, s5, ":home_center")], "We are on our way back to {s5} {sir/madam}.", "runaway_serf_talk_again_return",[]], [anyone|plyr,"runaway_serf_talk_again_return", [], "Make haste now. The sooner you return the better.", "runaway_serf_talk_again_return_2",[]], [anyone|plyr,"runaway_serf_talk_again_return", [], "Good. Keep going.", "runaway_serf_talk_again_return_2",[]], [anyone|plyr,"runaway_serf_talk_again_return_2", [], "Yes {sir/madam}. As you wish.", "close_window",[(assign, "$g_leave_encounter",1)]], #Deserters [party_tpl|pt_deserters, "start", [(eq,"$talk_context",tc_party_encounter), (party_get_slot,":protected_until_hours", "$g_encountered_party",slot_party_ignore_player_until), (store_current_hours,":cur_hours"), (store_sub, ":protection_remaining",":protected_until_hours",":cur_hours"), (gt, ":protection_remaining", 0)], "What do you want?\ You want to pay us some more money?", "deserter_paid_talk",[]], [anyone|plyr,"deserter_paid_talk", [], "Sorry to trouble you. I'll be on my way now.", "deserter_paid_talk_2a",[]], [anyone,"deserter_paid_talk_2a", [], "Yeah. Stop fooling around and go make some money.\ I want to see that purse full next time I see you.", "close_window",[(assign, "$g_leave_encounter",1)]], [anyone|plyr,"deserter_paid_talk", [], "No. It's your turn to pay me this time.", "deserter_paid_talk_2b",[]], [anyone,"deserter_paid_talk_2b", [], "What nonsense are you talking about? You want trouble? You got it.", "close_window",[ (party_set_slot,"$g_encountered_party",slot_party_ignore_player_until,0), (party_ignore_player, "$g_encountered_party", 0), ]], [party_tpl|pt_deserters,"start", [ (eq,"$talk_context",tc_party_encounter) ], "We are the free brothers.\ We will fight only for ourselves from now on.\ Now give us your gold or taste our steel.", "deserter_talk",[]], ## [anyone|plyr,"deserter_talk", [(check_quest_active, "qst_bring_back_deserters"), ## (quest_get_slot, ":target_deserter_troop", "qst_bring_back_deserters", slot_quest_target_troop), ## (party_count_members_of_type, ":num_deserters", "$g_encountered_party",":target_deserter_troop"), ## (gt, ":num_deserters", 1)], ## "If you surrender to me now, you will rejoin the army of your kingdom without being punished. Otherwise you'll get a taste of my sword.", "deserter_join_as_prisoner",[]], [anyone|plyr,"deserter_talk", [], "When I'm done with you, you'll regret ever leaving your army.", "close_window",[]], [anyone|plyr,"deserter_talk", [], "There's no need to fight. I am ready to pay for free passage.", "deserter_barter",[]], ## [anyone,"deserter_join_as_prisoner", [(call_script, "script_party_calculate_strength", "p_main_party"), ## (assign, ":player_strength", reg0), ## (store_encountered_party,":encountered_party"), ## (call_script, "script_party_calculate_strength", ":encountered_party"), ## (assign, ":enemy_strength", reg0), ## (val_mul, ":enemy_strength", 2), ## (ge, ":player_strength", ":enemy_strength")], ## "All right we join you then.", "close_window",[(assign, "$g_enemy_surrenders", 1)]], ## [anyone,"deserter_join_as_prisoner", [], "TODO: We will never surrender!", "close_window",[(encounter_attack)]], [anyone,"deserter_barter", [], "Good. You are clever. You pay us {reg5} denars. Then you can go.", "deserter_barter_2",[(assign,"$deserter_tribute",150),(assign,reg(5),"$deserter_tribute")]], [anyone|plyr,"deserter_barter_2", [(store_troop_gold,reg(2)),(ge,reg(2),"$deserter_tribute"),(assign,reg(5),"$deserter_tribute")], "All right here's your {reg5} denars.", "deserter_barter_3a",[(troop_remove_gold, "trp_player","$deserter_tribute")]], [anyone|plyr,"deserter_barter_2", [], "I don't have that much money with me", "deserter_barter_3b",[]], [anyone,"deserter_barter_3b", [], "Too bad. Then we'll have to sell you to the slavers.", "close_window",[]], [anyone,"deserter_barter_3a", [], "Heh. That wasn't difficult now was it? All right. Go now.", "close_window",[ (store_current_hours,":protected_until"), (val_add, ":protected_until", 72), (party_set_slot,"$g_encountered_party",slot_party_ignore_player_until,":protected_until"), (party_ignore_player, "$g_encountered_party", 72), (assign, "$g_leave_encounter",1) ]], ##### TODO: QUESTS COMMENT OUT END #Tavernkeepers [anyone ,"start", [(store_conversation_troop,reg(1)),(ge,reg(1),tavernkeepers_begin),(lt,reg(1),tavernkeepers_end)], "Good day dear {sir/madam}. How can I help you?", "tavernkeeper_talk", [ # (store_encountered_party,reg(2)), # (party_get_slot,"$tavernkeeper_party",reg(2),slot_town_mercs), ]], [anyone,"tavernkeeper_pretalk", [], "Anything else?", "tavernkeeper_talk",[]], [anyone|plyr,"tavernkeeper_talk", [(check_quest_active,"qst_deliver_wine"), (quest_slot_eq, "qst_deliver_wine", slot_quest_target_center, "$g_encountered_party"), (quest_get_slot, ":quest_target_item", "qst_deliver_wine", slot_quest_target_item), (quest_get_slot, ":quest_target_amount", "qst_deliver_wine", slot_quest_target_amount), (store_item_kind_count, ":item_count", ":quest_target_item"), (ge, ":item_count", ":quest_target_amount"), (assign, reg9, ":quest_target_amount"), (str_store_item_name, s4, ":quest_target_item"), ], "I was told to deliver you {reg9} units of {s4}.", "tavernkeeper_deliver_wine",[]], [anyone,"tavernkeeper_deliver_wine", [], "At last! My stock was almost depleted.\ I had paid the cost of the {s4} in advance.\ Here, take these {reg5} denars. That should cover your pay.\ And give {s9} my regards.\ I'll put in a good word for you next time I deal with him.", "tavernkeeper_pretalk", [(quest_get_slot, ":quest_target_item", "qst_deliver_wine", slot_quest_target_item), (quest_get_slot, ":quest_target_amount", "qst_deliver_wine", slot_quest_target_amount), (quest_get_slot, ":quest_gold_reward", "qst_deliver_wine", slot_quest_gold_reward), (quest_get_slot, ":quest_giver_troop", "qst_deliver_wine", slot_quest_giver_troop), (troop_remove_items, "trp_player", ":quest_target_item", ":quest_target_amount"), (call_script, "script_troop_add_gold", "trp_player", ":quest_gold_reward"), (assign, ":xp_reward", ":quest_gold_reward"), (val_mul, ":xp_reward", 4), (add_xp_as_reward, ":xp_reward"), (assign, reg5, ":quest_gold_reward"), (str_store_item_name, s4, ":quest_target_item"), (str_store_troop_name, s9, ":quest_giver_troop"), (quest_get_slot, ":giver_town", "qst_deliver_wine", slot_quest_giver_center), (call_script, "script_change_player_relation_with_center", ":giver_town", 2), (call_script, "script_change_player_relation_with_center", "$current_town", 1), (call_script, "script_end_quest", "qst_deliver_wine"), ]], [anyone|plyr,"tavernkeeper_talk", [(check_quest_active,"qst_deliver_wine"), (quest_slot_eq, "qst_deliver_wine", slot_quest_target_center, "$g_encountered_party"), (quest_get_slot, ":quest_target_item", "qst_deliver_wine", slot_quest_target_item), (quest_get_slot, ":quest_target_amount", "qst_deliver_wine", slot_quest_target_amount), (store_item_kind_count, ":item_count", ":quest_target_item"), (lt, ":item_count", ":quest_target_amount"), (gt, ":item_count", 0), (assign, reg9, ":quest_target_amount"), (str_store_item_name, s4, ":quest_target_item"), ], "I was told to deliver you {reg9} units of {s4}, but I lost some of the cargo on the way.", "tavernkeeper_deliver_wine_incomplete",[]], [anyone,"tavernkeeper_deliver_wine_incomplete", [], "Attacked by bandits eh?\ You are lucky they left you alive.\ Anyway, I can pay you no more than {reg5} denars for this.\ And I will let {s1} know that my order was delivered less than completely,\ so you will probably be charged for this loss.", "tavernkeeper_pretalk", [(quest_get_slot, ":quest_target_item", "qst_deliver_wine", slot_quest_target_item), (quest_get_slot, ":quest_target_amount", "qst_deliver_wine", slot_quest_target_amount), (quest_get_slot, ":quest_gold_reward", "qst_deliver_wine", slot_quest_gold_reward), (quest_get_slot, ":quest_giver_troop", "qst_deliver_wine", slot_quest_giver_troop), (store_item_kind_count, ":item_count", ":quest_target_item"), (troop_remove_items, "trp_player", ":quest_target_item", ":item_count"), (val_mul, ":quest_gold_reward", ":item_count"), (val_div, ":quest_gold_reward", ":quest_target_amount"), (call_script, "script_troop_add_gold", "trp_player", ":quest_gold_reward"), (assign, reg5, ":quest_gold_reward"), (assign, ":xp_reward", ":quest_gold_reward"), (val_mul, ":xp_reward", 4), (add_xp_as_reward, ":xp_reward"), (str_store_troop_name, s1, ":quest_giver_troop"), (assign, ":debt", "$qst_deliver_wine_debt"), (store_sub, ":item_left", ":quest_target_amount", ":item_count"), (val_mul, ":debt", ":item_left"), (val_div, ":debt", ":quest_target_amount"), (val_add, "$debt_to_merchants_guild", ":debt"), (quest_get_slot, ":giver_town", "qst_deliver_wine", slot_quest_giver_center), (call_script, "script_change_player_relation_with_center", ":giver_town", 1), (call_script, "script_end_quest", "qst_deliver_wine"), ]], [anyone|plyr,"tavernkeeper_talk", [(check_quest_active,"qst_deliver_wine"), (quest_slot_eq, "qst_deliver_wine", slot_quest_target_center, "$g_encountered_party"), (quest_get_slot, ":quest_target_item", "qst_deliver_wine", slot_quest_target_item), (store_item_kind_count, ":item_count", ":quest_target_item"), (eq, ":item_count", 0), (quest_get_slot, reg9, "qst_deliver_wine", slot_quest_target_amount), (str_store_item_name, s4, ":quest_target_item"), ], "I was told to deliver you {reg9} units of {s4}, but I lost the cargo on the way.", "tavernkeeper_deliver_wine_lost",[]], [anyone,"tavernkeeper_deliver_wine_lost", [], "What? I was waiting for that {s4} for weeks!\ And now you are telling me that you lost it?\ You may rest assured that I will let {s1} know about this.", "tavernkeeper_pretalk", [(add_xp_as_reward, 40), (quest_get_slot, ":quest_target_item", "qst_deliver_wine", slot_quest_target_item), (quest_get_slot, ":quest_giver_troop", "qst_deliver_wine", slot_quest_giver_troop), (str_store_item_name, s4, ":quest_target_item"), (str_store_troop_name, s1, ":quest_giver_troop"), (val_add, "$debt_to_merchants_guild", "$qst_deliver_wine_debt"), (call_script, "script_end_quest", "qst_deliver_wine"), ]], ## [anyone|plyr,"tavernkeeper_talk", [], "I need to hire some soldiers. Can you help me?", "tavernkeeper_buy_peasants",[]], ## [anyone,"tavernkeeper_buy_peasants", ## [ ## (store_encountered_party,reg(3)), ## (store_faction_of_party,reg(4),reg(3)), ## (store_relation,reg(5),"fac_player_supporters_faction",reg(4)), ## (lt, reg(5), -3), ## ], "I don't think anyone from this town will follow somebody like you. Try your luck elsewhere.", "tavernkeeper_buy_peasants_2",[]], ## [anyone,"tavernkeeper_buy_peasants", [], "I know a few fellows who would follow you if you paid for their equipment.", "tavernkeeper_buy_peasants_2",[(set_mercenary_source_party,"$tavernkeeper_party"),[change_screen_buy_mercenaries]]], ## [anyone,"tavernkeeper_buy_peasants_2", [], "Anything else?", "tavernkeeper_talk",[]], ## ## [anyone|plyr,"tavernkeeper_talk", [], "I want to rest for a while.", "tavernkeeper_rest",[]], ### [anyone,"tavernkeeper_rest", [], "Of course... How long do you want to rest?", "tavernkeeper_rest_2",[]], ## [anyone,"tavernkeeper_rest", ## [ ## (store_encountered_party,reg(3)), ## (store_faction_of_party,reg(4),reg(3)), ## (store_relation,reg(5),"fac_player_supporters_faction",reg(4)), ## (lt, reg(5), -3), ## ], "You look like trouble stranger. I can't allow you to stay for the night. No.", "close_window", ## []], ## [anyone,"tavernkeeper_rest", [], "Of course... That will be {reg3} denars for the room and food. How long do you want to rest?", "tavernkeeper_rest_2", ## [(store_party_size,reg(3)), ## (val_add,reg(3),1), ## (val_div,reg(3),3), ## (val_max,reg(3),1), ## (assign,"$tavern_rest_cost",reg(3))]], ## [anyone|plyr,"tavernkeeper_rest_2", [(store_time_of_day,reg(1)), ## (val_add,reg(1),7), ## (val_mod,reg(1),24), ## (lt,reg(1),12), ## (store_troop_gold,reg(8),"trp_player"), ## (ge,reg(8),"$tavern_rest_cost"), ## ], ## "I want to rest until morning.", "close_window", ## [(assign, reg(2), 13),(val_sub,reg(2),reg(1)),(assign, "$g_town_visit_after_rest", 1),(rest_for_hours, reg(2)),(troop_remove_gold, "trp_player","$tavern_rest_cost"),(call_script, "script_change_player_party_morale", 2)]], ## [anyone|plyr,"tavernkeeper_rest_2", [(store_time_of_day,reg(1)), ## (val_add,reg(1),7), ## (val_mod,reg(1),24), ## (ge,reg(1),12), ## (store_troop_gold,reg(8),"trp_player"), ## (ge,reg(8),"$tavern_rest_cost"), ## ], ## "I want to rest until evening.", "close_window", ## [(assign, reg(2), 28),(val_sub,reg(2),reg(1)),(assign, "$g_town_visit_after_rest", 1),(rest_for_hours, reg(2)),(troop_remove_gold, "trp_player","$tavern_rest_cost"),(call_script, "script_change_player_party_morale", 2)]], ## [anyone|plyr,"tavernkeeper_rest_2", [], "Forget it.", "close_window",[]], [anyone|plyr,"tavernkeeper_talk", [ (store_current_hours,":cur_hours"), (val_sub, ":cur_hours", 24), (gt, ":cur_hours", "$buy_drinks_last_time"), ], "I'd like to buy every man who comes in here tonight a jar of your best wine.", "tavernkeeper_buy_drinks",[]], [anyone,"tavernkeeper_buy_drinks", [ ], "Of course, {my lord/my lady}. I reckon {reg5} denars should be enough for that. What should I tell the lads?", "tavernkeeper_buy_drinks_2",[ (assign, "$temp", 1000), (assign, reg5, "$temp"), ]], [anyone|plyr,"tavernkeeper_buy_drinks_2", [ (store_troop_gold, ":gold", "trp_player"), (ge, ":gold", "$temp"), (str_store_party_name, s10, "$current_town"), ], "Let everyone know of the generosity of {playername} to the people of {s10}.", "tavernkeeper_buy_drinks_end",[ ]], [anyone,"tavernkeeper_buy_drinks_end", [], "Don't worry {sir/madam}. Your name will be cheered and toasted here all night.", "tavernkeeper_pretalk", [ (troop_remove_gold, "trp_player", "$temp"), (call_script, "script_change_player_relation_with_center", "$current_town", 1), (store_current_hours,":cur_hours"), (assign, "$buy_drinks_last_time", ":cur_hours"), ]], [anyone|plyr,"tavernkeeper_buy_drinks_2", [], "Actually, cancel that order.", "tavernkeeper_pretalk",[]], [anyone|plyr,"tavernkeeper_talk", [], "I guess I should leave now.", "close_window",[]], #Tavern Talk (with companions) # [anyone, "companion_recruit_yes", [(neg|hero_can_join, "p_main_party"),], "I don't think can lead any more men than you do now.\ # You need to release someone from service if you want me to join your party.", "close_window", []], #Tavern Talk (with ransom brokers) [anyone,"start", [(is_between, "$g_talk_troop", ransom_brokers_begin, ransom_brokers_end), (eq, "$g_talk_troop_met", 0)], "Greetings to you, {sir/madam}. You look like someone who should get to know me.", "ransom_broker_intro",[]], [anyone|plyr,"ransom_broker_intro",[], "Why is that?", "ransom_broker_intro_2",[]], [anyone, "ransom_broker_intro_2", [], "I broker ransoms for the poor wretches who are captured in these endless wars.\ Normally I travel between the salt mines and the slave markets on the coast, on commission from those whose relatives have gone missing.\ But if I'm out on my errands of mercy, and I come across a fellow dragging around a captive or two,\ well, there's no harm in a little speculative investment, is there?\ And you look like the type who might have a prisoner to sell.", "ransom_broker_info_talk",[(assign, "$ransom_broker_families_told",0), (assign, "$ransom_broker_prices_told",0), (assign, "$ransom_broker_ransom_me_told",0), ]], [anyone|plyr,"ransom_broker_info_talk",[(eq, "$ransom_broker_families_told",0)], "What if their families can't pay?", "ransom_broker_families",[]], [anyone, "ransom_broker_families", [], "Oh, then I spin them a few heartwarming tales of life on the galleys.\ You'd be surprised what sorts of treasures a peasant can dig out of his cowshed or wheedle out of his cousins,\ assuming he's got the proper motivation!\ And if in the end they cannot come up with the silver, then there are always slave merchants who are looking for galley slaves.\ One cannot do Heaven's work with an empty purse, you see.", "ransom_broker_info_talk",[(assign, "$ransom_broker_families_told",1)]], [anyone|plyr,"ransom_broker_info_talk",[(eq, "$ransom_broker_prices_told",0)], "What can I get for a prisoner?", "ransom_broker_prices",[]], [anyone, "ransom_broker_prices", [], "It varies. I fancy that I have a fine eye for assessing a ransom.\ There are a dozen little things about a man that will tell you whether he goes to bed hungry, or dines each night on soft dumplings and goose.\ The real money of course is in the gentry, and if you ever want to do my job you'll want to learn about every landowning family in Calradia,\ their estates, their heraldry, their offspring both lawful and bastard, and, of course, their credit with the merchants.", "ransom_broker_info_talk",[(assign, "$ransom_broker_prices_told",1)]], [anyone|plyr,"ransom_broker_info_talk",[(eq, "$ransom_broker_ransom_me_told",0)], "Would you be able to ransom me if I were taken?", "ransom_broker_ransom_me",[]], [anyone, "ransom_broker_ransom_me", [], "Of course. I'm welcome in every court in Calradia.\ There's not many who can say that! So always be sure to keep a pot of denars buried somewhere,\ and a loyal servant who can find it in a hurry.", "ransom_broker_info_talk",[(assign, "$ransom_broker_ransom_me_told",1)]], [anyone|plyr,"ransom_broker_info_talk",[], "That's all I need to know. Thanks.", "ransom_broker_pretalk",[]], [anyone,"start", [(is_between, "$g_talk_troop", ransom_brokers_begin, ransom_brokers_end),], "Greetings. If you have any prisoners, I will be happy to buy them from you.", "ransom_broker_talk",[]], [anyone,"ransom_broker_pretalk", [], "Anyway, if you have any prisoners, I will be happy to buy them from you.", "ransom_broker_talk",[]], [anyone|plyr,"ransom_broker_talk", [[store_num_regular_prisoners,reg(0)],[ge,reg(0),1]], "Then you'd better bring your purse. I have got prisoners to sell.", "ransom_broker_sell_prisoners",[]], [anyone|plyr,"ransom_broker_talk", [], "Tell me about what you do again.", "ransom_broker_intro_2",[]], [anyone|plyr,"ransom_broker_talk",[], "Not this time. Good-bye.", "close_window",[]], [anyone,"ransom_broker_sell_prisoners", [], "Let me see what you have...", "ransom_broker_sell_prisoners_2", [[change_screen_trade_prisoners]]], # [anyone, "ransom_broker_sell_prisoners_2", [], "You take more prisoners, bring them to me. I will pay well.", "close_window",[]], [anyone, "ransom_broker_sell_prisoners_2", [], "I will be staying here for a few days. Let me know if you need my services.", "close_window",[]], #Tavern Talk (with travelers) [anyone, "start", [(is_between, "$g_talk_troop", tavern_travelers_begin, tavern_travelers_end), (str_store_troop_name, s10, "$g_talk_troop"), (eq,"$g_talk_troop_met",0), ], "Greetings, friend. You look like the kind of {man/person} who'd do well to know me.\ I travel a lot all across Calradia and keep an open ear.\ I can provide you information that you might find useful. For a meager price of course.", "tavern_traveler_talk", [(assign, "$traveler_land_asked", 0)]], [anyone, "start", [ (is_between, "$g_talk_troop", tavern_travelers_begin, tavern_travelers_end), (gt, "$last_lost_companion", 0), (assign, ":companion_found_town", -1), (troop_get_slot, ":companion_found_town", "$last_lost_companion", slot_troop_cur_center), (is_between, ":companion_found_town", towns_begin, towns_end), (str_store_troop_name, s10, "$last_lost_companion"), (str_store_party_name, s11, ":companion_found_town"), ], "Greetings, {playername}. I saw your companion {s10} at a tavern in {s11} some days ago. I thought you might like to know.", "tavern_traveler_lost_companion_thanks", [(assign, "$last_lost_companion", 0)]], [anyone|plyr, "tavern_traveler_lost_companion_thanks", [(troop_get_type, reg3, "$last_lost_companion")], "Thanks. I'll go and find {reg3?her:him} there.", "tavern_traveler_pretalk", []], [anyone|plyr, "tavern_traveler_lost_companion_thanks", [], "Thanks, but I don't really care.", "tavern_traveler_pretalk", []], [anyone, "start", [(is_between, "$g_talk_troop", tavern_travelers_begin, tavern_travelers_end), ], "Greetings, {playername}.", "tavern_traveler_talk", [(assign, "$traveler_land_asked", 0)]], [anyone, "tavern_traveler_pretalk", [], "Yes?", "tavern_traveler_talk", []], [anyone|plyr, "tavern_traveler_talk", [(eq, "$traveler_land_asked", 0)], "What can you tell me about this land?", "tavern_traveler_tell_kingdoms", [(assign, "$traveler_land_asked", 1)]], [anyone, "tavern_traveler_tell_kingdoms", [], "Calradia is divided between rival kingdoms, which can neither manage to live in peace with their neighbours,\ nor completely eliminate them.\ As a result, there's seldom a break to the bitter wars which plague this land and drain its life blood.\ Well, at least this must be a good place to be for an adventurer such as yourself.\ With some luck and skill, you can make a name for yourself here, amass a fortune perhaps, or gain great power.\ Opportunities are endless and so are the rewards, if you are willing to risk your life for them.", "tavern_traveler_tell_kingdoms_2", []], [anyone|plyr, "tavern_traveler_tell_kingdoms_2", [], "Tell me more about these opportunities.", "tavern_traveler_tell_kingdoms_3", []], [anyone|plyr, "tavern_traveler_tell_kingdoms_2", [], "Thank you. That was all I needed to know", "close_window", []], [anyone, "tavern_traveler_tell_kingdoms_3", [(gt, "$player_has_homage", 0)], "Well, you probably know everything I could tell you already. You seem to be doing pretty well.", "tavern_traveler_tell_kingdoms_4", []], [anyone, "tavern_traveler_tell_kingdoms_3", [], "The kingdoms will pay good money for mercenaries if they are engaged in a war.\ If you have done a bit of fighting, speaking with one of their lords will probably result in being offered a mercenary contract.\ However the real rewards come if you can manage to become a vassal to a king.\ A vassal can own villages, castles and towns and get rich with the taxes and revenues of these estates.\ Normally, only nobles of the realm own land in this way,\ but in time of war, a king will not hesitate to accept someone who distinugishes {himself/herself} on the battlefield as a vassal, and grant {him/her} the right to own land.", "tavern_traveler_tell_kingdoms_4", []], [anyone, "tavern_traveler_tell_kingdoms_4", [], "The only path closed to a an adventurer such as you would be becoming the {king/queen} of a kingdom.\ The people and nobles of these lands would never accept an upstart adventurer as their ruler.\ But don't think that kings can sit on their thrones too comfortably, either. They have their own rivals,\ those who are born to the right family, who could go around and stir up trouble saying they have a better claim to the throne than the current king.\ If those claim holders could find supporters, they could easily start civil wars and perhaps even replace the king one day.", "tavern_traveler_tell_kingdoms_5", []], [anyone|plyr, "tavern_traveler_tell_kingdoms_5", [], "Interesting. Where can I find these claim holders?", "tavern_traveler_tell_kingdoms_6", []], [anyone|plyr, "tavern_traveler_tell_kingdoms_5", [], "I guess I heard enough already. Thank you.", "close_window", []], [anyone, "tavern_traveler_tell_kingdoms_6", [], "A claim holder's life would be in danger in his own country of course.\ Therefore, they usually stay at rival courts, raising support and hoping to find someone willing to champion their cause.\ I usually hear news about some of them, and may be able to tell you their location with some precision.\ But of course, I would ask for a little something for such a service.", "tavern_traveler_pretalk", [(assign, "$traveller_claimants_mentioned", 1)]], [anyone|plyr, "tavern_traveler_talk", [(eq, "$traveller_claimants_mentioned", 1)], "I want to know the location of a claimant.", "tavern_traveler_pretender_location", []], [anyone, "tavern_traveler_pretender_location", [], "Whose location do you want to know?", "tavern_traveler_pretender_location_ask", []], [anyone|plyr|repeat_for_troops, "tavern_traveler_pretender_location_ask", [ (store_repeat_object, ":troop_no"), (is_between, ":troop_no", pretenders_begin, pretenders_end), (neg|troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), (troop_slot_ge, ":troop_no", slot_troop_cur_center, 1), (str_store_troop_name, s11, ":troop_no"), (neq, ":troop_no", "$supported_pretender"), ], "{s11}", "tavern_traveler_pretender_location_ask_2", [ (store_repeat_object, "$temp"), ]], [anyone|plyr, "tavern_traveler_pretender_location_ask", [], "Never mind.", "tavern_traveler_pretalk", []], [anyone, "tavern_traveler_pretender_location_ask_2", [], "I can reveal this information to you for a small price, let's say 30 denars.", "tavern_traveler_pretender_location_ask_money", []], [anyone|plyr, "tavern_traveler_pretender_location_ask_money", [ (store_troop_gold, ":cur_gold", "trp_player"), (ge, ":cur_gold", 30), ], "All right. Here is 30 denars.", "tavern_traveler_pretender_location_tell", [ (troop_remove_gold, "trp_player", 30), ]], [anyone|plyr, "tavern_traveler_pretender_location_ask_money", [], "Never mind.", "tavern_traveler_pretalk", []], [anyone, "tavern_traveler_pretender_location_tell", [], "{s15} is currently at {s11}.", "tavern_traveler_pretalk", [ (str_store_troop_name, s15, "$temp"), (troop_get_slot, ":cur_center", "$temp", slot_troop_cur_center), (str_store_party_name, s11, ":cur_center"), ]], [anyone|plyr, "tavern_traveler_talk", [], "I am looking for one of my companions...", "tavern_traveler_companion_location", []], [anyone, "tavern_traveler_companion_location", [], "Maybe I can help you. Who are you looking for?", "tavern_traveler_companion_location_ask", []], [anyone|plyr|repeat_for_troops, "tavern_traveler_companion_location_ask", [ (store_repeat_object, ":troop_no"), (is_between, ":troop_no", companions_begin, companions_end), (troop_slot_ge, ":troop_no", slot_troop_cur_center, 1), (troop_slot_ge, ":troop_no", slot_troop_playerparty_history, 1), (str_store_troop_name, s11, ":troop_no"), ], "{s11}", "tavern_traveler_companion_location_ask_2", [ (store_repeat_object, "$temp"), ]], [anyone|plyr, "tavern_traveler_companion_location_ask", [], "Never mind.", "tavern_traveler_pretalk", []], [anyone, "tavern_traveler_companion_location_ask_2", [(str_store_troop_name, s15, "$temp")], "I guess I know where {s15} is. For 30 denars, I'll tell you.", "tavern_traveler_companion_location_ask_money", []], [anyone|plyr, "tavern_traveler_companion_location_ask_money", [ (store_troop_gold, ":cur_gold", "trp_player"), (ge, ":cur_gold", 30), ], "All right. Here is 30 denars.", "tavern_traveler_companion_location_tell", [ (troop_remove_gold, "trp_player", 30), ]], [anyone|plyr, "tavern_traveler_companion_location_ask_money", [], "Never mind.", "tavern_traveler_pretalk", []], [anyone, "tavern_traveler_companion_location_tell", [], "{s15} is currently at {s11}.", "tavern_traveler_pretalk", [ (str_store_troop_name, s15, "$temp"), (troop_get_slot, ":cur_center", "$temp", slot_troop_cur_center), (str_store_party_name, s11, ":cur_center"), ]], [anyone|plyr, "tavern_traveler_talk", [], "Farewell.", "close_window", []], [anyone, "start", [(is_between, "$g_talk_troop", tavern_travelers_begin, tavern_travelers_end), (party_get_slot, ":info_faction", "$g_encountered_party", slot_center_traveler_info_faction), (str_store_faction_name, s17, ":info_faction"), ], "Greetings. They say you're the kind of {man/woman} who'd be interested to hear that I travel frequently to {s17}. I'll tell you all I know for a mere 100 denars.", "tavern_traveler_answer", []], [anyone|plyr, "tavern_traveler_answer", [(store_troop_gold, ":cur_gold", "trp_player"), (ge, ":cur_gold", 100)], "Here's 100 denars. Tell me what you know.", "tavern_traveler_continue", [(party_get_slot, ":info_faction", "$g_encountered_party", slot_center_traveler_info_faction), (call_script, "script_update_faction_traveler_notes", ":info_faction"), (change_screen_notes, 2, ":info_faction"), ]], [anyone|plyr, "tavern_traveler_answer", [], "Sorry friend. I am not interested.", "close_window", []], [anyone, "tavern_traveler_continue", [], "Well, that's all I can tell you. Good bye.", "close_window", [(troop_remove_gold, "trp_player", 100),]], #Tavern Talk (with book sellers) [anyone, "start", [(is_between, "$g_talk_troop", tavern_booksellers_begin, tavern_booksellers_end), ], "Good day {sir/madam}, will you be looking at my books?", "bookseller_talk", []], [anyone|plyr, "bookseller_talk", [], "Yes. Show me what you have for sale.", "bookseller_buy", []], [anyone,"bookseller_buy", [], "Of course {sir/madam}.", "book_trade_completed",[[change_screen_trade]]], [anyone,"book_trade_completed", [], "Anything else?", "bookseller_talk",[]], [anyone|plyr,"bookseller_talk", [], "Nothing. Thanks.", "close_window",[]], #Tavern Talk (with minstrels) [anyone, "start", [(is_between, "$g_talk_troop", tavern_minstrels_begin, tavern_minstrels_end), ], "TODO: Hello. I am a minstrel. (Not implemeted yet)", "close_window", []], #Tavern Talk (with farmers) [anyone, "start", [(eq, "$talk_context", tc_tavern_talk), (eq, "$g_talk_troop", "trp_farmer_from_bandit_village"), (neg|check_quest_active, "qst_eliminate_bandits_infesting_village"), (neg|check_quest_active, "qst_deal_with_bandits_at_lords_village"), (assign, ":end_cond", villages_end), (try_for_range, ":cur_village", villages_begin, ":end_cond"), (party_slot_eq, ":cur_village", slot_village_bound_center, "$g_encountered_party"), (party_slot_ge, ":cur_village", slot_village_infested_by_bandits, 1), (str_store_party_name, s1, ":cur_village"), (quest_set_slot, "qst_eliminate_bandits_infesting_village", slot_quest_target_center, ":cur_village"), (quest_set_slot, "qst_eliminate_bandits_infesting_village", slot_quest_current_state, 0), (party_get_slot, ":village_elder", ":cur_village", slot_town_elder), (quest_set_slot, "qst_eliminate_bandits_infesting_village", slot_quest_giver_troop, ":village_elder"), (quest_set_slot, "qst_eliminate_bandits_infesting_village", slot_quest_giver_center, ":cur_village"), (assign, ":end_cond", 0), (try_end), ], "{My lord/Madam}, you look like a {man/lady} of the sword and someone who could help us.\ Will you hear my plea?", "farmer_from_bandit_village_1", []], [anyone|plyr, "farmer_from_bandit_village_1", [], "What is the matter, my good man?", "farmer_from_bandit_village_2", []], [anyone|plyr, "farmer_from_bandit_village_1", [], "What are you blurbing about peasant? Speak out.", "farmer_from_bandit_village_2", []], [anyone, "farmer_from_bandit_village_2", [], "A band of brigands have taken refuge in our village. They take everything we have, force us to serve them, and do us much evil.\ If one of us so much as breathes a word of protest, they kill the poor soul on the spot right away.\ Our lives have become unbearable. I risked my skin and ran away to find someone who can help us.", "farmer_from_bandit_village_3", []], [anyone|plyr, "farmer_from_bandit_village_3", [], "Why don't you go to the lord of your village? He should take care of the vermin.", "farmer_from_bandit_village_4", []], [anyone, "farmer_from_bandit_village_4", [], "I did, {sir/madam}, but our lord's men did not let me see him and said he was occupied with more important matters and that we should deal with our own problem ourselves.\ Please {sir/madam}, you look like a {man/lady} of valor and a fearsome warrior, and you have no doubt many friends and soldiers at your service.\ If there is anyone who can help us, it's you.", "farmer_from_bandit_village_5", [(assign, "$temp", 0)]], [anyone|plyr, "farmer_from_bandit_village_5", [], "Very well, I'll help you. Where is this village?", "farmer_from_bandit_village_accepted", []], [anyone|plyr, "farmer_from_bandit_village_5", [], "I can't be bothered with this right now.", "farmer_from_bandit_village_denied", []], [anyone|plyr, "farmer_from_bandit_village_5", [(eq, "$temp", 0)], "Why would I fight these bandits? What's in it for me?", "farmer_from_bandit_village_barter", []], [anyone, "farmer_from_bandit_village_accepted", [], "God bless you, {sir/madam}. Our village is {s7}. It is not too far from here.", "close_window", [(quest_get_slot, ":target_center", "qst_eliminate_bandits_infesting_village", slot_quest_target_center), (str_store_party_name_link,s7,":target_center"), (setup_quest_text, "qst_eliminate_bandits_infesting_village"), (str_store_string, s2, "@A villager from {s7} begged you to save their village from the bandits that took refuge there."), (call_script, "script_start_quest", "qst_eliminate_bandits_infesting_village", "$g_talk_troop"), ]], [anyone, "farmer_from_bandit_village_denied", [],"As you say {sir/madam}. Forgive me for bothering you.", "close_window", []], [anyone, "farmer_from_bandit_village_barter", [], "We are but poor farmers {sir/madam}, and the bandits have already got most of what we have on this world.\ but we'll be glad to share with you whatever we have got.\ And we'll always be in your gratitude if you help us.", "farmer_from_bandit_village_5", [(assign, "$temp", 1)]], [anyone, "start", [(eq, "$talk_context", tc_tavern_talk), (eq, "$g_talk_troop", "trp_farmer_from_bandit_village"), (check_quest_active, "qst_eliminate_bandits_infesting_village"), ], "Thank you for helping us {sir/madam}. Crush those bandits!", "close_window", []], #Tavern Talk (with troops) [anyone, "start", [(eq, "$talk_context", tc_tavern_talk), (party_get_slot, ":mercenary_troop", "$g_encountered_party", slot_center_mercenary_troop_type), (party_get_slot, ":mercenary_amount", "$g_encountered_party", slot_center_mercenary_troop_amount), (gt, ":mercenary_amount", 0), (store_sub, reg3, ":mercenary_amount", 1), (store_sub, reg4, reg3, 1), (call_script, "script_game_get_join_cost", ":mercenary_troop"), (assign, ":join_cost", reg0), (store_mul, reg5, ":mercenary_amount", reg0), (party_get_free_companions_capacity, ":free_capacity", "p_main_party"), (val_min, ":mercenary_amount", ":free_capacity"), (store_troop_gold, ":cur_gold", "trp_player"), (try_begin), (gt, ":join_cost", 0), (val_div, ":cur_gold", ":join_cost"), (val_min, ":mercenary_amount", ":cur_gold"), (try_end), (assign, "$temp", ":mercenary_amount"), ], "Do you have a need for mercenaries, {sir/madam}?\ {reg3?Me and {reg4?{reg3} of my mates:one of my mates} are:I am} looking for a master.\ We'll join you for {reg5} denars.", "mercenary_tavern_talk", []], [anyone, "start", [(eq, "$talk_context", tc_tavern_talk),], "Any orders, {sir/madam}?", "mercenary_after_recruited", []], [anyone|plyr, "mercenary_after_recruited", [], "Make your preparations. We'll be moving at dawn.", "mercenary_after_recruited_2", []], [anyone|plyr, "mercenary_after_recruited", [], "Take your time. We'll be staying in this town for a while.", "mercenary_after_recruited_2", []], [anyone, "mercenary_after_recruited_2", [], "Yes {sir/madam}. We'll be ready when you tell us to leave.", "close_window", []], [anyone|plyr, "mercenary_tavern_talk", [(party_get_slot, ":mercenary_amount", "$g_encountered_party", slot_center_mercenary_troop_amount), (eq, ":mercenary_amount", "$temp"), (party_get_slot, ":mercenary_troop", "$g_encountered_party", slot_center_mercenary_troop_type), (call_script, "script_game_get_join_cost", ":mercenary_troop"), (store_mul, reg5, "$temp", reg0), ], "All right. I will hire all of you. Here is {reg5} denars.", "mercenary_tavern_talk_hire", []], [anyone|plyr, "mercenary_tavern_talk", [(party_get_slot, ":mercenary_amount", "$g_encountered_party", slot_center_mercenary_troop_amount), (lt, "$temp", ":mercenary_amount"), (gt, "$temp", 0), (assign, reg6, "$temp"), (party_get_slot, ":mercenary_troop", "$g_encountered_party", slot_center_mercenary_troop_type), (call_script, "script_game_get_join_cost", ":mercenary_troop"), (store_mul, reg5, "$temp", reg0), ], "All right. But I can only hire {reg6} of you. Here is {reg5} denars.", "mercenary_tavern_talk_hire", []], [anyone, "mercenary_tavern_talk_hire", [(store_random_in_range, ":rand", 0, 4), (try_begin), (eq, ":rand", 0), (gt, "$temp", 1), (str_store_string, s17, "@You chose well, {sir/madam}. My lads know how to keep their word and earn their pay."), (else_try), (eq, ":rand", 1), (str_store_string, s17, "@Well done, {sir/madam}. Keep the money and wine coming our way, and there's no foe in Calradia you need fear."), (else_try), (eq, ":rand", 2), (str_store_string, s17, "@We are at your service, {sir/madam}. Point us in the direction of those who need hurting, and we'll do the rest."), (else_try), (str_store_string, s17, "@You will not be dissapointed {sir/madam}. You will not find better warriors in all Calradia."), (try_end),], "{s17}", "close_window", [ (party_get_slot, ":mercenary_troop", "$g_encountered_party", slot_center_mercenary_troop_type), (call_script, "script_game_get_join_cost", ":mercenary_troop"), (store_mul, ":total_cost", "$temp", reg0), (troop_remove_gold, "trp_player", ":total_cost"), (party_add_members, "p_main_party", ":mercenary_troop", "$temp"), (party_set_slot, "$g_encountered_party", slot_center_mercenary_troop_amount, 0), ]], [anyone|plyr, "mercenary_tavern_talk", [(eq, "$temp", 0), (party_get_free_companions_capacity, ":free_capacity", "p_main_party"), (ge, ":free_capacity", 1)], "That sounds good. But I can't afford to hire any more men right now.", "tavern_mercenary_cant_lead", []], [anyone, "tavern_mercenary_cant_lead", [], "That's a pity. Well, {reg3?we will:I will} be lingering around here for a while,\ if you need to hire anyone.", "close_window", []], [anyone|plyr, "mercenary_tavern_talk", [(eq, "$temp", 0), (party_get_free_companions_capacity, ":free_capacity", "p_main_party"), (eq, ":free_capacity", 0)], "That sounds good. But I can't lead any more men right now.", "tavern_mercenary_cant_lead", []], [anyone|plyr, "mercenary_tavern_talk", [], "Sorry. I don't need any other men right now.", "close_window", []], #Trainers [anyone,"start", [(is_between, "$g_talk_troop", training_gound_trainers_begin, training_gound_trainers_end), (eq, "$g_talk_troop_met", 0)], "Good day to you {lad/lass}. You look like another adventurer who has come to try {his/her} chance in these lands.\ Well, trust my word, you won't be able to survive long here unless you know how to fight yourself out of a tight spot.", "trainer_intro_1",[]], [anyone|plyr, "trainer_intro_1", [], "Thank you for your advice. This place looks like a training field. Maybe I can learn about fighting here?", "trainer_intro_2", []], [anyone,"trainer_intro_2", [], "Indeed you can. I am a veteran soldier... fought a good deal in the wars in my time. But these days, I train young novices in this area.\ I can find you some opponents to practice with if you like. Or if you have any questions about the theory of combat, feel free to ask.", "trainer_intro_3",[]], [anyone|plyr, "trainer_intro_3", [], "Yes, I do have a few questions.", "trainer_intro_4a", []], [anyone|plyr, "trainer_intro_3", [], "Actually, I can move on to practice.", "trainer_intro_4b", []], [anyone, "trainer_intro_4a", [], "Well, ask anything you like.", "trainer_talk_combat", []], [anyone, "trainer_intro_4b", [], "Good. It's good to find someone eager for practice. Let's see what you will do.", "trainer_practice_1", []], [anyone,"start", [(is_between, "$g_talk_troop", training_gound_trainers_begin, training_gound_trainers_end), (neq,"$waiting_for_training_fight_result", 0), (neq,"$training_fight_won", 0)], "That was a good fight. ", "trainer_practice_1", [(val_sub, "$num_opponents_to_beat_in_a_row", 1), (assign,"$waiting_for_training_fight_result",0), ]], [anyone,"start", [(is_between, "$g_talk_troop", training_gound_trainers_begin, training_gound_trainers_end), (neq, "$waiting_for_training_fight_result", 0)], "Ha! Looks like you've developed a bit of a limp there. Don't worry, even losses have their value, provided you learn from them. Shake the stars out of your eyes and get back in there. There's no other way to win.", "trainer_practice_1", [(assign,"$num_opponents_to_beat_in_a_row",3),(assign,"$waiting_for_training_fight_result",0)]], [anyone,"start", [(is_between, "$g_talk_troop", training_gound_trainers_begin, training_gound_trainers_end)], "Good day. Ready for some training today?", "trainer_talk",[]], [anyone,"trainer_pretalk", [], "Ah, are you ready for some training?", "trainer_talk",[]], [anyone|plyr,"trainer_talk", [], "I am ready for some practice.", "trainer_practice_1",[]], [anyone|plyr,"trainer_talk", [], "First, tell me something about combat...", "trainer_combat_begin",[]], ## [anyone|plyr,"trainer_talk", [], ## "I have some novice soldiers with me. Can you train them?", "trainer_train_novices_1",[]], [anyone|plyr,"trainer_talk", [], "I need to leave now. Farewell.", "close_window",[]], [anyone,"trainer_combat_begin", [], "What do you want to know?", "trainer_talk_combat",[]], [anyone,"trainer_combat_pretalk", [], "What else do you want to know?", "trainer_talk_combat",[]], [anyone|plyr,"trainer_talk_combat", [], "Tell me about defending myself.", "trainer_explain_defense",[]], [anyone|plyr,"trainer_talk_combat", [], "Tell me about attacking with weapons.", "trainer_explain_attack",[]], [anyone|plyr,"trainer_talk_combat", [], "Tell me about fighting on horseback.", "trainer_explain_horseback",[]], # [anyone|plyr,"trainer_talk_combat", [], "Tell me about using ranged weapons.", "trainer_explain_ranged",[]], # [anyone|plyr,"trainer_talk_combat", [], "Tell me about weapon types.", "trainer_explain_weapon_types",[]], [anyone|plyr,"trainer_talk_combat", [], "I guess I know all the theory I need. Let's talk about something else.", "trainer_pretalk",[]], [anyone,"trainer_explain_defense", [], "Good question. The first thing you should know as a fighter is how to defend yourself.\ Keeping yourself out of harm's way is the first rule of combat, and it is much more important than giving harm to others.\ Everybody can swing a sword around and hope to cut some flesh, but only those fighters that are experts at defense live to tell of it.", "trainer_explain_defense_2",[]], [anyone,"trainer_explain_defense_2", [], "Now. Defending yourself is easiest if you are equipped with a shield.\ Just block with your shield. [Hold down the right mouse button to defend yourself with the shield.] In this state, you will be able to deflect all attacks that come from your front. However, you will still be open to strikes from your sides or your back.", "trainer_explain_defense_3",[]], [anyone|plyr,"trainer_explain_defense_3", [], "What if I don't have shield?", "trainer_explain_defense_4",[]], [anyone,"trainer_explain_defense_4", [], "Then you will have to use your weapon to block your opponent.\ This is a bit more difficult than defending with a shield.\ Defending with a weapon, you can block against only ONE attack direction.\ That is, you block against either overhead swings, side swings or thrusts.\ Therefore you must watch your opponent carefully and start to block AFTER he starts his attack.\ In this way you will be able to block against the direction of his current attack.\ If you start to block BEFORE he makes his move, he may just attack in another direction than the one you are blocking against and score a hit.", "trainer_combat_pretalk",[]], [anyone,"trainer_explain_attack", [], "Good question. Attacking is the best defence, they say.\ A tactic many fighters find useful is taking an offensive stance and readying your weapon for attack, waiting for the right moment for swinging it.\ [You can ready your weapon for attack by pressing and holding down the left mouse button.]", "trainer_explain_attack_2",[]], [anyone|plyr,"trainer_explain_attack_2", [], "That sounds useful.", "trainer_explain_attack_3",[]], [anyone,"trainer_explain_attack_3", [], "It is a good tactic, but remember that, your opponent may see that and take a defensive stance against the direction you are swinging your weapon.\ If that happens, you must break your attack and quickly attack from another direction\ [You may cancel your current attack by quickly tapping the right mouse button].", "trainer_explain_attack_4",[]], [anyone|plyr,"trainer_explain_attack_4", [], "If my opponent is defending against the direction I am attacking from, I will break and use another direction.", "trainer_explain_attack_5",[]], [anyone,"trainer_explain_attack_5", [], "Yes, selecting the direction you swing your weapon is a crucial skill.\ There are four main directions you may use: right swing, left swing, overhead swing and thrust. You must use each one wisely.\ [to control your swing direction with default controls, move your mouse in the direction you want to swing from as you press the left mouse button].", "trainer_combat_pretalk",[]], [anyone,"trainer_explain_horseback", [], "Very good question. A horse may be a warrior's most powerful weapon in combat.\ It gives you speed, height, power and initiative. A lot of deadly weapons will become even deadlier on horseback.\ However you must pay particular attention to horse-mounted enemies couching their lances, as they may take down any opponent in one hit.\ [To use the couched lance yourself, wield a lance or similar weapon, and speed up your horse without pressing attack or defense buttons.\ after you reach a speed, you'll lower your lance. Then try to target your enemies by maneuvering your horse.]", "trainer_combat_pretalk",[]], [anyone,"trainer_practice_1", [(eq,"$training_system_explained", 0)], "I train novices in four stages, each tougher than the one before.\ To finish a stage and advance to the next one, you have to win three fights in a row.", "trainer_practice_1", [ (assign, "$num_opponents_to_beat_in_a_row", 3), (assign, "$novicemaster_opponent_troop", "trp_novice_fighter"), (assign, "$training_system_explained", 1), ]], [anyone,"trainer_practice_1", [(ge,"$novice_training_difficulty",4)], "You have passed all stages of training. But if you want you can still practice. Are you ready?", "novicemaster_are_you_ready", [(assign,"$num_opponents_to_beat_in_a_row",99999)]], [anyone,"trainer_practice_1", [(eq,"$num_opponents_to_beat_in_a_row",0),(eq,"$novice_training_difficulty",0)], "Way to go {lad/lass}. With this victory, you have advanced to the next training level. From now on your opponents will be regular fighters, not the riff-raff off the street, so be on your toes.", "trainer_practice_1", [[assign,"$num_opponents_to_beat_in_a_row",3], [val_add,"$novice_training_difficulty",1], [add_xp_to_troop,100], [assign,"$novicemaster_opponent_troop","trp_regular_fighter"]]], [anyone,"trainer_practice_1", [[eq,"$num_opponents_to_beat_in_a_row",0],[eq,"$novice_training_difficulty",1]], "Way to go {lad/lass}. Welcome to the third training level. From now on your opponents will be veteran fighters; soldiers and arena regulars and the like. These guys know some dirty tricks, so keep your defense up.", "trainer_practice_1", [[assign,"$num_opponents_to_beat_in_a_row",3], [val_add,"$novice_training_difficulty",1], [add_xp_to_troop,100], [assign,"$novicemaster_opponent_troop","trp_veteran_fighter"]]], [anyone,"trainer_practice_1", [[eq,"$num_opponents_to_beat_in_a_row",0],[eq,"$novice_training_difficulty",2]], "You've got the heart of a champion, {lad/lass}, and the sword arm to match. From now on your opponents will be champion fighters.\ These are the cream of the crop, the finest warriors I have trained. If you can best three of them in a row, you will join their ranks.", "trainer_practice_1", [[assign,"$num_opponents_to_beat_in_a_row",3], [val_add,"$novice_training_difficulty",1], [add_xp_to_troop,100], [assign,"$novicemaster_opponent_troop","trp_champion_fighter"]]], [anyone,"trainer_practice_1", [[eq,"$num_opponents_to_beat_in_a_row",0],[eq,"$novice_training_difficulty",3]], "It does my heart good to see such a promising talent. You have passed all tiers of training. You can now tell everyone that you have been trained by the master of the training field.", "novicemaster_finish_training", [[assign,"$num_opponents_to_beat_in_a_row",3], [val_add,"$novice_training_difficulty",1], [add_xp_to_troop,300]]], [anyone|plyr,"novicemaster_finish_training", [], "Thank you master.", "novicemaster_finish_training_2",[]], [anyone,"novicemaster_finish_training_2", [], "I wish you good luck in the tournaments. And, don't forget,\ if you want to practice your swordwork anytime, just come and say the word.", "close_window",[]], [anyone,"trainer_practice_1", [ (assign, reg8, "$num_opponents_to_beat_in_a_row"), (str_store_troop_name, s9, "$novicemaster_opponent_troop"), ], "Your next opponent will be a {s9}. You need to win {reg8} more\ fights in a row to advance to the next stage. Are you ready?", "novicemaster_are_you_ready", []], [anyone|plyr,"novicemaster_are_you_ready", [], "Yes I am.", "novicemaster_ready_to_fight",[]], [anyone,"novicemaster_ready_to_fight", [], "Here you go then. Good luck.", "close_window", [ (assign, "$training_fight_won", 0), (assign, "$waiting_for_training_fight_result", 1), (modify_visitors_at_site, "$g_training_ground_melee_training_scene"), (reset_visitors), (assign, reg0, 0), (assign, reg1, 1), (assign, reg2, 2), (assign, reg3, 3), (shuffle_range, 0, 4), (set_visitor, reg0, "trp_player"), (set_visitor, reg1, "$novicemaster_opponent_troop"), (set_visitor, 4, "$g_talk_troop"), (set_jump_mission, "mt_training_ground_trainer_training"), (jump_to_scene, "$g_training_ground_melee_training_scene"), ]], [anyone|plyr,"novicemaster_are_you_ready", [], "Just a minute. I am not ready yet.", "novicemaster_not_ready",[]], [anyone,"novicemaster_not_ready", [], "Hey, You will never make it if you don't practice.", "close_window",[]], #Crooks ## [anyone ,"start", [(is_between,"$g_talk_troop",crooks_begin,crooks_end),(eq,"$g_talk_troop_met",0),(eq,"$sneaked_into_town",0),(store_random_in_range, reg2, 2)], ## "You {reg2?looking for:want} something?:", "crook_intro_1",[]], ## [anyone|plyr,"crook_intro_1",[],"I am trying to learn my way around the town.", "crook_intro_2",[]], ## ## [anyone,"crook_intro_2",[(eq,"$crook_talk_order",0),(val_add,"$crook_talk_order",1),(str_store_troop_name,s1,"$g_talk_troop")], ##"Then you came to the right guy. My name is {s1}, and I know everyone and everything that goes around in this town.\ ## Anyone you want to meet, I can arrange it. Anything you need to know, I can find out. For the the right price, of course. Do you have gold?", "crook_intro_2a",[]], ## [anyone|plyr,"crook_intro_2a",[],"I have gold. Plenty of it.", "crook_intro_2a_1a",[]], ## [anyone|plyr,"crook_intro_2a",[],"Not really.", "crook_intro_2a_1b",[]], ## [anyone,"crook_intro_2a_1a",[],"Good. That means you and I will be great friends.", "crook_talk",[]], ## [anyone,"crook_intro_2a_1b",[],"Then you should look into earning some. Listen to me now, for I'll give you some free advice.\ ## The easiest way to make money is to fight in the tournaments and bet on yourself. If you are good, you'll quickly get yourself enough money to get going.", "crook_talk",[]], ## ## [anyone,"crook_intro_2",[(eq,"$crook_talk_order",1),(val_add,"$crook_talk_order",1),(str_store_troop_name,s1,"$g_talk_troop")], ##"Then you need to go no further. I am {s1}, and I can provide you anything... For the the right price.", "crook_intro_2b",[]], ## [anyone|plyr,"crook_intro_2b",[],"Are you a dealer?", "crook_intro_2b_1",[]], ## [anyone,"crook_intro_2b_1",[],"A dealer? Yes. I deal in knowledge... connections.. lies... secrets... Those are what I deal in. Interested?", "crook_talk",[]], ## ## [anyone,"crook_intro_2",[(eq,"$crook_talk_order",2),(val_add,"$crook_talk_order",1),(str_store_troop_name,s1,"$g_talk_troop")], ##"Then this is your lucky day. Because you are talking to {s1}, and I know every piss-stained brick of this wicked town.\ ##I know every person, every dirty little secret. And all that knowledge can be yours. For a price.", "crook_talk",[]], ## ## [anyone,"crook_intro_2",[(val_add,"$crook_talk_order",1),(str_store_troop_name,s1,"$g_talk_troop")], ## "Then {s1} is at your service {sir/madam}. If you want to know what's really going on in this town, or arrange a meeting in secret, then come to me. I can help you.", "crook_talk",[]], ## ## [anyone ,"start", [(is_between,"$g_talk_troop",crooks_begin,crooks_end),(eq,"$g_talk_troop_met",0),(eq,"$sneaked_into_town",1),(eq,"$crook_sneak_intro_order",0),(val_add,"$crook_sneak_intro_order",1)], ## "Good day. {playername} right?", "crook_intro_sneak_1",[]], ## [anyone|plyr,"crook_intro_sneak_1", [], "You must be mistaken. I'm just a poor pilgrim. I don't answer to that name.", "crook_intro_sneak_2",[]], ## [anyone,"crook_intro_sneak_2", [(str_store_troop_name,s1,"$g_talk_troop")], "Of course you do. And if the town guards knew you were here, they'd be upon you this minute.\ ## But don't worry. Noone knows it is {playername} under that hood. Except me of course. But I am {s1}. It is my business to know things.", "crook_intro_sneak_3",[]], ## [anyone|plyr,"crook_intro_sneak_3", [], "You won't tip off the guards about my presence?", "crook_intro_sneak_4",[]], ## [anyone,"crook_intro_sneak_4", [], "What? Of course not! Well, maybe I would, but the new captain of the guards is a dung-eating cheat.\ ## I led him to this fugitive, and the man was worth his weight in silver as prize money. But I swear, I didn't see a penny of it.\ ## The bastard took it all to himself. So your secret is safe with me.", "crook_intro_sneak_5",[]], ## [anyone,"crook_intro_sneak_5", [], "Besides, I heard you have a talent for surviving any kind of ordeal.\ ## I wouldn't want you to survive this one as well and then come after me with a sword. Ha-hah.", "crook_talk",[]], ## ## ## [anyone ,"start", [(is_between,"$g_talk_troop",crooks_begin,crooks_end),(eq,"$g_talk_troop_met",0),(eq,"$sneaked_into_town",1),(str_store_troop_name,s1,"$g_talk_troop")], ## "{s1} is at your service {sir/madam}. If you want to know what's really going on in this town, or arrange a meeting in secret, then come to me. I can help you.", "crook_talk",[]], ## ## [anyone ,"start", [(is_between,"$g_talk_troop",crooks_begin,crooks_end),(store_character_level, ":cur_level", "trp_player"),(lt,":cur_level",8)], ## "{You again?/Delighted to see you again my pretty.}", "crook_talk",[]], ## [anyone ,"start", [(is_between,"$g_talk_troop",crooks_begin,crooks_end)], ## "I see that you need my services {sir/madam}...", "crook_talk",[]], ## [anyone ,"crook_pretalk", [], ## "Is that all?", "crook_talk",[]], ## [anyone|plyr,"crook_talk", [], "I'm looking for a person...", "crook_search_person",[]], ## [anyone|plyr,"crook_talk", [], "I want you to arrange me a meeting with someone...", "crook_request_meeting",[]], ## [anyone|plyr,"crook_talk", [], "[Leave]", "close_window",[]], # [anyone,"crook_enter_dungeon", [], # "Alright but this will cost you 50 denars.", "crook_enter_dungeon_2", []], # [anyone|plyr, "crook_enter_dungeon_2", [(store_troop_gold, ":cur_gold", "trp_player"), # (ge, ":cur_gold", 50)], # "TODO: Here it is. 50 denars.", "crook_enter_dungeon_3_1",[(troop_remove_gold, "trp_player", 50)]], # [anyone|plyr, "crook_enter_dungeon_2", [(store_troop_gold, ":cur_gold", "trp_player"), # (ge, ":cur_gold", 50)], # "Never mind then.", "crook_pretalk",[]], # [anyone|plyr, "crook_enter_dungeon_2", [(store_troop_gold, ":cur_gold", "trp_player"), # (lt, ":cur_gold", 50)], # "TODO: I don't have that much money.", "crook_enter_dungeon_3_2",[]], # [anyone,"crook_enter_dungeon_3_1", [], # "TODO: There you go.", "close_window", [(call_script, "script_enter_dungeon", "$current_town", "mt_visit_town_castle")]], # [anyone,"crook_enter_dungeon_3_2", [], # "TODO: Come back later then.", "crook_pretalk",[]], ## [anyone, "crook_request_meeting", [], ## "Who do you want to meet with?", "crook_request_meeting_2",[]], ## [anyone|plyr|repeat_for_troops,"crook_request_meeting_2", [(store_encountered_party, ":center_no"), ## (store_repeat_object, ":troop_no"), ## (is_between, ":troop_no", heroes_begin, heroes_end), ## (troop_get_slot, ":cur_center", ":troop_no", slot_troop_cur_center), ## (call_script, "script_get_troop_attached_party", ":troop_no"), ## (assign, ":cur_center_2", reg0), ## (this_or_next|eq, ":cur_center", ":center_no"), ## (eq, ":cur_center_2", ":center_no"), ## (neg|party_slot_eq, ":center_no", slot_town_lord, ":troop_no"),#Neglect the ruler of the center ## (str_store_troop_name, s1, ":troop_no")], ## "{s1}", "crook_request_meeting_3", [(store_repeat_object, "$selected_troop")]], ## ## [anyone|plyr,"crook_request_meeting_2", [], "Never mind.", "crook_pretalk", []], ## ## [anyone,"crook_request_meeting_3", [], ## "Alright but this will cost you 50 denars.", "crook_request_meeting_4", []], ## ## [anyone|plyr, "crook_request_meeting_4", [(store_troop_gold, ":cur_gold", "trp_player"), ## (ge, ":cur_gold", 50)], ## "TODO: Here it is. 50 denars.", "crook_search_person_5_1",[(troop_remove_gold, "trp_player", 50)]], ## ## [anyone|plyr, "crook_request_meeting_4", [(store_troop_gold, ":cur_gold", "trp_player"), ## (ge, ":cur_gold", 50)], ## "Never mind then.", "crook_pretalk",[]], ## ## [anyone|plyr, "crook_request_meeting_4", [(store_troop_gold, ":cur_gold", "trp_player"), ## (lt, ":cur_gold", 50)], ## "TODO: I don't have that much money.", "crook_search_person_5_2",[]], ## ## [anyone, "crook_search_person_5_1", [], ## "TODO: Ok.", "close_window",[(party_get_slot, ":town_alley", "$g_encountered_party", slot_town_alley), ## (modify_visitors_at_site,":town_alley"),(reset_visitors), ## (set_visitor,0,"trp_player"), ## (set_visitor,17,"$selected_troop"), ## (set_jump_mission,"mt_conversation_encounter"), ## (jump_to_scene,":town_alley"), ## (assign, "$talk_context", tc_back_alley), ## (change_screen_map_conversation, "$selected_troop")]], ## ## [anyone, "crook_search_person_5_2", [], ## "TODO: Come back later then.", "crook_pretalk",[]], ## ## [anyone, "crook_search_person", [], ## "TODO: Who are you searching for?", "crook_search_person_2",[]], ## [anyone|plyr|repeat_for_factions,"crook_search_person_2", [(store_repeat_object, ":faction_no"), ## (is_between, ":faction_no", kingdoms_begin, kingdoms_end), ## (str_store_faction_name, s1, ":faction_no")], ## "TODO: I'm looking for a {s1}.", "crook_search_person_3", [(store_repeat_object, "$selected_faction")]], ## ## [anyone|plyr,"crook_search_person_2", [], "Never mind.", "crook_pretalk", []], ## ## ## [anyone, "crook_search_person_3", [], ## "TODO: Who?", "crook_search_person_4",[]], ## ## [anyone|plyr|repeat_for_troops,"crook_search_person_4", [(store_repeat_object, ":troop_no"), ## (is_between, ":troop_no", heroes_begin, heroes_end), ## (store_troop_faction, ":faction_no", ":troop_no"), ## (eq, ":faction_no", "$selected_faction"), ## (str_store_troop_name, s1, ":troop_no")], ## "{s1}", "crook_search_person_5", [(store_repeat_object, "$selected_troop")]], ## ## [anyone|plyr,"crook_search_person_4", [], "Never mind.", "crook_pretalk", []], ## ## [anyone, "crook_search_person_5", [(call_script, "script_get_information_about_troops_position", "$selected_troop", 0), ## (eq, reg0, 1), ## (str_store_troop_name, s1, "$selected_troop")], ## "TODO: I know where {s1} is at the moment, but hearing it will cost you 50 denars.", "crook_search_person_6",[]], ## ## [anyone, "crook_search_person_5", [], ## "TODO: Sorry I don't know anything.", "crook_pretalk",[]], ## ## [anyone|plyr, "crook_search_person_6", [(store_troop_gold, ":cur_gold", "trp_player"), ## (ge, ":cur_gold", 50)], ## "TODO: Here it is. 50 denars.", "crook_search_person_7_1",[(troop_remove_gold, "trp_player", 50)]], ## ## [anyone|plyr, "crook_search_person_6", [(store_troop_gold, ":cur_gold", "trp_player"), ## (ge, ":cur_gold", 50)], ## "Never mind then.", "crook_pretalk",[]], ## ## [anyone|plyr, "crook_search_person_6", [(store_troop_gold, ":cur_gold", "trp_player"), ## (lt, ":cur_gold", 50)], ## "TODO: I don't have that much money.", "crook_search_person_7_2",[]], ## ## [anyone, "crook_search_person_7_1", [(call_script, "script_get_information_about_troops_position", "$selected_troop", 0)], ## "{s1}", "crook_pretalk",[]], ## ## [anyone, "crook_search_person_7_2", [], ## "TODO: Come back later then.", "crook_pretalk",[]], ## #Mayor talk (town elder) [anyone ,"start", [(is_between,"$g_talk_troop",mayors_begin,mayors_end),(eq,"$g_talk_troop_met",0), (this_or_next|eq, "$players_kingdom", "$g_encountered_party_faction"), ( eq, "$g_encountered_party_faction", "fac_player_supporters_faction"),], "Good day, my lord.", "mayor_begin",[]], [anyone ,"start", [(is_between,"$g_talk_troop",mayors_begin,mayors_end),(eq,"$g_talk_troop_met",0), (str_store_party_name, s9, "$current_town")], "Hello stranger, you seem to be new to {s9}. I am the guild master of the town.", "mayor_talk",[]], [anyone ,"start", [(is_between,"$g_talk_troop",mayors_begin,mayors_end)], "Good day, {playername}.", "mayor_begin", [ #Delete last offered quest if peace is formed. (try_begin), (eq, "$merchant_offered_quest", "qst_persuade_lords_to_make_peace"), (party_get_slot, ":target_faction", "qst_persuade_lords_to_make_peace", slot_quest_target_faction), (party_get_slot, ":object_faction", "qst_persuade_lords_to_make_peace", slot_quest_object_faction), (store_relation, ":reln", ":target_faction", ":object_faction"), (ge, ":reln", 0), (assign, "$merchant_quest_last_offerer", -1), (assign, "$merchant_offered_quest", -1), (try_end), ]], [anyone,"mayor_begin", [(check_quest_active, "qst_persuade_lords_to_make_peace"), (quest_slot_eq, "qst_persuade_lords_to_make_peace", slot_quest_giver_troop, "$g_talk_troop"), (check_quest_succeeded, "qst_persuade_lords_to_make_peace"), (quest_get_slot, ":quest_target_troop", "qst_persuade_lords_to_make_peace", slot_quest_target_troop), (quest_get_slot, ":quest_object_troop", "qst_persuade_lords_to_make_peace", slot_quest_object_troop), (val_mul, ":quest_target_troop", -1), (val_mul, ":quest_object_troop", -1), (quest_get_slot, ":quest_target_faction", "qst_persuade_lords_to_make_peace", slot_quest_target_faction), (quest_get_slot, ":quest_object_faction", "qst_persuade_lords_to_make_peace", slot_quest_object_faction), (str_store_troop_name, s12, ":quest_target_troop"), (str_store_troop_name, s13, ":quest_object_troop"), (str_store_faction_name, s14, ":quest_target_faction"), (str_store_faction_name, s15, ":quest_object_faction"), (str_store_party_name, s19, "$current_town"), ], "{playername}, it was an incredible feat to get {s14} and {s15} make peace, and you made it happen.\ Your involvement has not only saved our town from disaster, but it has also saved thousands of lives, and put an end to all the grief this bitter war has caused.\ As the townspeople of {s19}, know that we'll be good on our word, and we are ready to pay the {reg12} denars we promised.", "lord_persuade_lords_to_make_peace_completed", [(quest_get_slot, ":quest_target_faction", "qst_persuade_lords_to_make_peace", slot_quest_target_faction), (quest_get_slot, ":quest_object_faction", "qst_persuade_lords_to_make_peace", slot_quest_object_faction), #Forcing 2 factions to make peace within 72 hours. (assign, "$g_force_peace_faction_1", ":quest_target_faction"), (assign, "$g_force_peace_faction_2", ":quest_object_faction"), (quest_get_slot, ":quest_reward", "qst_persuade_lords_to_make_peace", slot_quest_gold_reward), (assign, reg12, ":quest_reward"), #TODO: Change these values (add_xp_as_reward, 4000), ]], [anyone|plyr,"lord_persuade_lords_to_make_peace_completed", [], "Thank you. Let me have the money.", "lord_persuade_lords_to_make_peace_pay",[]], [anyone|plyr,"lord_persuade_lords_to_make_peace_completed", [], "No need for a payment. I only did what was right.", "lord_persuade_lords_to_make_peace_no_pay",[]], [anyone ,"lord_persuade_lords_to_make_peace_pay", [], "Oh, yes, of course. We had already got the money for you.\ Here, please accept these {reg12} denars together with our most sincere thanks.\ Me and the people of our town will not forget your help.", "close_window", [(quest_get_slot, ":quest_reward", "qst_persuade_lords_to_make_peace", slot_quest_gold_reward), (call_script, "script_troop_add_gold","trp_player",":quest_reward"), (call_script, "script_change_player_relation_with_center", "$current_town", 5), (call_script, "script_end_quest", "qst_persuade_lords_to_make_peace"), (quest_get_slot, ":quest_reward", "qst_persuade_lords_to_make_peace", slot_quest_gold_reward), (assign, reg12, ":quest_reward") ]], [anyone ,"lord_persuade_lords_to_make_peace_no_pay", [], "You are indeed an extraordinary person, {sir/madame}, and it is an honour for me to have known you.\ You not only did what was impossible and put an end to this terrible war, but you won't even accept a reward for it.\ Very well, I will not insist on the matter, but please know that you will have our eternal respect and gratitude.", "close_window", [ (call_script, "script_change_player_honor", 3), (call_script, "script_change_player_relation_with_center", "$current_town", 8), (call_script, "script_end_quest", "qst_persuade_lords_to_make_peace"), ]], [anyone,"mayor_begin", [(check_quest_active, "qst_deal_with_night_bandits"), (quest_slot_eq, "qst_deal_with_night_bandits", slot_quest_giver_troop, "$g_talk_troop"), (check_quest_succeeded, "qst_deal_with_night_bandits"), ], "Very nice work, {playername}, you made short work of those lawless curs.\ Thank you kindly for all your help, and please accept this bounty of 150 denars.", "lord_deal_with_night_bandits_completed", [ (add_xp_as_reward,200), (call_script, "script_troop_add_gold","trp_player", 150), (call_script, "script_change_player_relation_with_center", "$current_town", 1), (call_script, "script_end_quest", "qst_deal_with_night_bandits"), ]], [anyone|plyr,"lord_deal_with_night_bandits_completed", [], "It was my pleasure, {s65}.", "close_window",[]], # Ryan BEGIN [anyone,"mayor_begin", [(check_quest_active, "qst_deal_with_looters"), (quest_slot_eq, "qst_deal_with_looters", slot_quest_giver_troop, "$g_talk_troop"), ], "Ah, {playername}. Have you any progress to report?", "mayor_looters_quest_response", [ ]], [anyone|plyr,"mayor_looters_quest_response", [ (store_num_parties_destroyed_by_player, ":num_looters_destroyed", "pt_looters"), (party_template_get_slot,":previous_looters_destroyed","pt_looters",slot_party_template_num_killed), (val_sub,":num_looters_destroyed",":previous_looters_destroyed"), (quest_get_slot,":looters_paid_for","qst_deal_with_looters",slot_quest_current_state), (lt,":looters_paid_for",":num_looters_destroyed"), ], "I've killed some looters.", "mayor_looters_quest_destroyed",[]], [anyone|plyr,"mayor_looters_quest_response", [(eq,1,0) ], "I've brought you some goods.", "mayor_looters_quest_goods",[]], [anyone|plyr,"mayor_looters_quest_response", [ ], "Not yet, sir. Farewell.", "close_window",[]], [anyone,"mayor_looters_quest_destroyed", [], "Aye, my scouts saw the whole thing. That should make anyone else think twice before turning outlaw!\ The bounty is 40 denars for every band, so that makes {reg1} in total. Here is your money, as promised.", "mayor_looters_quest_destroyed_2",[ (store_num_parties_destroyed_by_player, ":num_looters_destroyed", "pt_looters"), (party_template_get_slot,":previous_looters_destroyed","pt_looters",slot_party_template_num_killed), (val_sub,":num_looters_destroyed",":previous_looters_destroyed"), (quest_get_slot,":looters_paid_for","qst_deal_with_looters",slot_quest_current_state), (store_sub,":looter_bounty",":num_looters_destroyed",":looters_paid_for"), (val_mul,":looter_bounty",40), (assign,reg1,":looter_bounty"), (call_script, "script_troop_add_gold","trp_player",":looter_bounty"), (assign,":looters_paid_for",":num_looters_destroyed"), (quest_set_slot,"qst_deal_with_looters",slot_quest_current_state,":looters_paid_for"), ]], [anyone,"mayor_looters_quest_destroyed_2", [ (quest_get_slot,":total_looters","qst_deal_with_looters",slot_quest_target_amount), (quest_slot_ge,"qst_deal_with_looters",slot_quest_current_state,":total_looters"), # looters paid for >= total looters (quest_get_slot,":xp_reward","qst_deal_with_looters",slot_quest_xp_reward), (quest_get_slot,":gold_reward","qst_deal_with_looters",slot_quest_gold_reward), (add_xp_as_reward, ":xp_reward"), (call_script, "script_troop_add_gold","trp_player",":gold_reward"), (call_script, "script_change_troop_renown", "trp_player", 1), (call_script, "script_change_player_relation_with_center", "$current_town", 5), (call_script, "script_end_quest", "qst_deal_with_looters"), (try_for_parties, ":cur_party_no"), (party_get_template_id, ":cur_party_template", ":cur_party_no"), (eq, ":cur_party_template", "pt_looters"), (party_set_flags, ":cur_party_no", pf_quest_party, 0), (try_end), ], "And that's not the only good news! Thanks to you, the looters have ceased to be a threat. We've not had a single attack reported for some time now.\ If there are any of them left, they've either run off or gone deep into hiding. That's good for business,\ and what's good for business is good for the town!\ I think that concludes our arrangement, {playername}. Please accept this silver as a token of my gratitude. Thank you, and farewell.", "close_window",[ ]], [anyone,"mayor_looters_quest_destroyed_2", [], "Anything else you need?", "mayor_looters_quest_response",[ ]], [anyone,"mayor_looters_quest_goods", [ (quest_get_slot,reg1,"qst_deal_with_looters",slot_quest_target_item), ], "Hah, I knew I could count on you! Just tell me which item to take from your baggage, and I'll send some men to collect it.\ I still need {reg1} denars' worth of goods.", "mayor_looters_quest_goods_response",[ ]], [anyone|plyr|repeat_for_100,"mayor_looters_quest_goods_response", [ (store_repeat_object,":goods"), (val_add,":goods",trade_goods_begin), (is_between,":goods",trade_goods_begin,trade_goods_end), (player_has_item,":goods"), (str_store_item_name,s5,":goods"), ], "{s5}.", "mayor_looters_quest_goods_2",[ (store_repeat_object,":goods"), (val_add,":goods",trade_goods_begin), (troop_remove_items,"trp_player",":goods",1), (assign,":value",reg0), (call_script, "script_troop_add_gold","trp_player",":value"), (quest_get_slot,":gold_num","qst_deal_with_looters",slot_quest_target_item), (val_sub,":gold_num",":value"), (quest_set_slot,"qst_deal_with_looters",slot_quest_target_item,":gold_num"), (str_store_item_name,s6,":goods"), ]], [anyone|plyr,"mayor_looters_quest_goods_response", [ ], "Nothing at the moment, sir.", "mayor_looters_quest_goods_3",[]], [anyone,"mayor_looters_quest_goods_3", [ ], "Anything else you need?", "mayor_looters_quest_response",[ ]], [anyone,"mayor_looters_quest_goods_2", [ (quest_slot_ge,"qst_deal_with_looters",slot_quest_target_item,1), (quest_get_slot,reg1,"qst_deal_with_looters",slot_quest_target_item), ], "Excellent, here is the money for your {s6}. Do you have any more goods to give me? I still need {reg1} denars' worth of goods.", "mayor_looters_quest_goods_response",[ ]], [anyone,"mayor_looters_quest_goods_2", [ (neg|quest_slot_ge,"qst_deal_with_looters",slot_quest_target_item,1), (quest_get_slot,":xp_reward","qst_deal_with_looters",slot_quest_xp_reward), (quest_get_slot,":gold_reward","qst_deal_with_looters",slot_quest_gold_reward), (add_xp_as_reward, ":xp_reward"), (call_script, "script_troop_add_gold","trp_player",":gold_reward"), # (call_script, "script_change_troop_renown", "trp_player", 1), (call_script, "script_change_player_relation_with_center", "$current_town", 3), (call_script, "script_end_quest", "qst_deal_with_looters"), (try_for_parties, ":cur_party_no"), (party_get_template_id, ":cur_party_template", ":cur_party_no"), (eq, ":cur_party_template", "pt_looters"), (party_set_flags, ":cur_party_no", pf_quest_party, 0), (try_end), ], "Well done, {playername}, that's the last of the goods I need. Here is the money for your {s6}, and a small bonus for helping me out.\ I'm afraid I won't be paying for any more goods, nor bounties on looters, but you're welcome to keep hunting the bastards if any remain.\ Thank you for your help, I won't forget it.", "close_window",[ ]], # Ryan END [anyone,"mayor_begin", [(check_quest_active, "qst_move_cattle_herd"), (quest_slot_eq, "qst_move_cattle_herd", slot_quest_giver_troop, "$g_talk_troop"), (check_quest_succeeded, "qst_move_cattle_herd"), ], "Good to see you again {playername}. I have heard that you have delivered the cattle successfully.\ I will tell the merchants how reliable you are.\ And here is your pay, {reg8} denars.", "close_window", [(quest_get_slot, ":quest_gold_reward", "qst_move_cattle_herd", slot_quest_gold_reward), (call_script, "script_troop_add_gold", "trp_player", ":quest_gold_reward"), (store_div, ":xp_reward", ":quest_gold_reward", 3), (add_xp_as_reward, ":xp_reward"), (call_script, "script_change_troop_renown", "trp_player", 1), (call_script, "script_change_player_relation_with_center", "$current_town", 3), (call_script, "script_end_quest", "qst_move_cattle_herd"), (assign, reg8, ":quest_gold_reward"), ]], [anyone,"mayor_begin", [(check_quest_active, "qst_move_cattle_herd"), (quest_slot_eq, "qst_move_cattle_herd", slot_quest_giver_troop, "$g_talk_troop"), (check_quest_failed, "qst_move_cattle_herd"), ], "I heard that you have lost the cattle herd on your way to {s9}.\ I had a very difficult time explaining your failure to the owner of that herd, {sir/madam}.\ Do you have anything to say?", "move_cattle_herd_failed", []], [anyone|plyr ,"move_cattle_herd_failed", [], "I am sorry. But I was attacked on the way.", "move_cattle_herd_failed_2",[]], [anyone|plyr ,"move_cattle_herd_failed", [], "I am sorry. The stupid animals wandered off during the night.", "move_cattle_herd_failed_2",[]], [anyone,"move_cattle_herd_failed_2", [], "Well, it was your responsibility to deliver that herd safely, no matter what.\ You should know that the owner of the herd demanded to be compensated for his loss, and I had to pay him 1000 denars.\ So you now owe me that money.", "merchant_ask_for_debts", [(assign, "$debt_to_merchants_guild", 1000), (call_script, "script_end_quest", "qst_move_cattle_herd"),]], [anyone,"mayor_begin", [(check_quest_active, "qst_kidnapped_girl"), (quest_slot_eq, "qst_kidnapped_girl", slot_quest_current_state, 4), (quest_slot_eq, "qst_kidnapped_girl", slot_quest_giver_troop, "$g_talk_troop"), ], "Dear {playername}. I am in your debt for bringing back my friend's daughter.\ Please take these {reg8} denars that I promised you.\ My friend wished he could give more but paying that ransom brought him to his knees.", "close_window", [(quest_get_slot, ":quest_gold_reward", "qst_kidnapped_girl", slot_quest_gold_reward), (call_script, "script_troop_add_gold", "trp_player", ":quest_gold_reward"), (assign, reg8, ":quest_gold_reward"), (assign, ":xp_reward", ":quest_gold_reward"), (val_mul, ":xp_reward", 2), (val_add, ":xp_reward", 100), (add_xp_as_reward, ":xp_reward"), (call_script, "script_change_troop_renown", "trp_player", 3), (call_script, "script_change_player_relation_with_center", "$current_town", 2), (call_script, "script_end_quest", "qst_kidnapped_girl"), ]], [anyone,"mayor_begin", [(check_quest_active, "qst_troublesome_bandits"), (check_quest_succeeded, "qst_troublesome_bandits"), (quest_slot_eq, "qst_troublesome_bandits", slot_quest_giver_troop, "$g_talk_troop"), ], "I have heard about your deeds. You have given those bandits the punishment they deserved.\ You are really as good as they say.\ Here is your reward: {reg5} denars.\ I would like to give more but those bandits almost brought me to bankruptcy.", "mayor_friendly_pretalk", [(quest_get_slot, ":quest_gold_reward", "qst_troublesome_bandits", slot_quest_gold_reward), (call_script, "script_troop_add_gold", "trp_player", ":quest_gold_reward"), (assign, ":xp_reward", ":quest_gold_reward"), (val_mul, ":xp_reward", 7), (add_xp_as_reward, ":xp_reward"), (call_script, "script_change_player_relation_with_center", "$current_town", 2), (call_script, "script_change_troop_renown", "trp_player", 3), (call_script, "script_end_quest", "qst_troublesome_bandits"), (assign, reg5, ":quest_gold_reward"), ]], [anyone,"mayor_begin", [(ge, "$debt_to_merchants_guild", 50)], "According to my accounts, you owe the merchants guild {reg1} denars.\ I'd better collect that now.", "merchant_ask_for_debts",[(assign,reg(1),"$debt_to_merchants_guild")]], [anyone|plyr,"merchant_ask_for_debts", [[store_troop_gold,reg(5),"trp_player"],[ge,reg(5),"$debt_to_merchants_guild"]], "Alright. I'll pay my debt to you.", "merchant_debts_paid",[[troop_remove_gold, "trp_player","$debt_to_merchants_guild"], [assign,"$debt_to_merchants_guild",0]]], [anyone, "merchant_debts_paid", [], "Excellent. I'll let my fellow merchants know that you are clear of any debts.", "mayor_pretalk",[]], [anyone|plyr, "merchant_ask_for_debts", [], "I'm afraid I can't pay that sum now.", "merchant_debts_not_paid",[]], [anyone, "merchant_debts_not_paid", [(assign,reg(1),"$debt_to_merchants_guild")], "In that case, I am afraid, I can't deal with you. Guild rules...\ Come back when you can pay the {reg1} denars.\ And know that we'll be charging an interest to your debt.\ So the sooner you pay it, the better.", "close_window",[]], [anyone,"mayor_begin", [], "What can I do for you?", "mayor_talk", []], [anyone,"mayor_friendly_pretalk", [], "Now... What else may I do for you?", "mayor_talk",[]], [anyone,"mayor_pretalk", [], "Yes?", "mayor_talk",[]], [anyone|plyr,"mayor_talk", [], "Can you tell me about what you do?", "mayor_info_begin",[]], [anyone|plyr,"mayor_talk", [(store_partner_quest, ":partner_quest"), (lt, ":partner_quest", 0), (neq, "$merchant_quest_last_offerer", "$g_talk_troop")], "Do you happen to have a job for me?", "merchant_quest_requested",[ (assign,"$merchant_quest_last_offerer", "$g_talk_troop"), (call_script, "script_get_random_quest", "$g_talk_troop"), (assign, "$random_merchant_quest_no", reg0), (assign,"$merchant_offered_quest","$random_merchant_quest_no"), ]], [anyone|plyr,"mayor_talk", [(store_partner_quest, ":partner_quest"), (lt, ":partner_quest", 0), (eq,"$merchant_quest_last_offerer", "$g_talk_troop"), (ge,"$merchant_offered_quest",0) ], "About that job you offered me...", "merchant_quest_last_offered_job",[]], [anyone|plyr,"mayor_talk", [(store_partner_quest,reg(2)),(ge,reg(2),0)], "About the job you gave me...", "merchant_quest_about_job",[]], [anyone|plyr,"mayor_talk", [], "[Leave]", "close_window",[]], [anyone, "mayor_info_begin", [(str_store_party_name, s9, "$current_town")], "I am the guildmaster of {s9}. You can say I am the leader of the good people of {s9}.\ I can help you find a job if you are looking for some honest work.", "mayor_info_talk",[(assign, "$mayor_info_lord_told",0)]], [anyone|plyr,"mayor_info_talk",[(eq, "$mayor_info_lord_told",0)], "Who rules this town?", "mayor_info_lord",[]], [anyone, "mayor_info_lord", [(party_get_slot, ":town_lord","$current_town",slot_town_lord),(str_store_troop_name, s10, ":town_lord")], "Our town's lord and protector is {s10}. He owns the castle and sometimes resides there, and collects taxes from the town.\ However we regulate ourselves in most of the matters that concern ourselves.\ As the town's guildmaster I have the authority to decide those things.", "mayor_info_talk",[(assign, "$mayor_info_lord_told",1)]], [anyone|plyr,"mayor_info_talk",[], "That's all I need to know. Thanks.", "mayor_pretalk",[]], [anyone,"merchant_quest_about_job", [], "What about it?", "merchant_quest_about_job_2",[]], [anyone|plyr,"merchant_quest_about_job_2", [], "What if I can't finish it?", "merchant_quest_what_if_fail",[]], [anyone|plyr,"merchant_quest_about_job_2", [], "Well, I'm still working on it.", "merchant_quest_about_job_working",[]], [anyone,"merchant_quest_about_job_working", [], "Good. I'm sure you will handle it.", "mayor_pretalk",[]], [anyone,"merchant_quest_last_offered_job", [], "Eh, you want to reconsider that. Good...", "merchant_quest_brief", [[assign,"$random_merchant_quest_no","$merchant_offered_quest"]]], [anyone,"merchant_quest_what_if_fail", [(store_partner_quest,":partner_quest"),(eq,":partner_quest","qst_deliver_wine")], "I hope you don't fail. In that case, I'll have to ask for the price of the cargo you were carrying.", "mayor_pretalk",[]], [anyone,"merchant_quest_what_if_fail", [], "Well, just do your best to finish it.", "mayor_pretalk",[]], [anyone,"merchant_quest_taken", [], "Excellent. I am counting on you then. Good luck.", "mayor_pretalk", []], [anyone,"merchant_quest_stall", [], "Well, the job will be available for a few more days I guess. Tell me if you decide to take it.", "mayor_pretalk",[]], ###################################################################3 # Random Merchant quests.... ############################## # Ryan BEGIN # deal with looters [anyone,"merchant_quest_requested", [ (eq,"$random_merchant_quest_no","qst_deal_with_looters"), ], "Well, you look able enough. I think I might have something you could do.", "merchant_quest_brief", []], [anyone,"merchant_quest_brief", [ (eq,"$random_merchant_quest_no","qst_deal_with_looters"), (try_begin), (party_slot_eq,"$g_encountered_party",slot_party_type,spt_town), (str_store_string,s5,"@town"), (else_try), (party_slot_eq,"$g_encountered_party",slot_party_type,spt_village), (str_store_string,s5,"@village"), (try_end), ], "We've had some fighting near the {s5} lately, with all the chaos that comes with it,\ and that's led some of our less upstanding locals to try and make their fortune out of looting the shops and farms during the confusion.\ A lot of valuable goods were taken. I need somebody to teach those bastards a lesson.\ Sound like your kind of work?", "merchant_quest_looters_choice", []], [anyone|plyr,"merchant_quest_looters_choice", [], "Aye, I'll do it.", "merchant_quest_looters_brief", []], [anyone|plyr,"merchant_quest_looters_choice", [], "I'm afraid I can't take the job at the moment.", "merchant_quest_stall",[]], [anyone,"merchant_quest_looters_brief", [ (try_begin), (party_slot_eq,"$g_encountered_party",slot_party_type,spt_town), (str_store_string,s5,"@town"), (else_try), (party_slot_eq,"$g_encountered_party",slot_party_type,spt_village), (str_store_string,s5,"@village"), (try_end), # (party_get_slot,":merchant","$current_town",slot_town_merchant), # (troop_clear_inventory,":merchant"), (store_random_in_range,":random_num_looters",3,7), (quest_set_slot,"qst_deal_with_looters",slot_quest_target_amount,":random_num_looters"), (try_for_range,":unused",0,":random_num_looters"), (store_random_in_range,":random_radius",5,14), (set_spawn_radius,":random_radius"), (spawn_around_party,"$g_encountered_party","pt_looters"), (party_set_flags, reg0, pf_quest_party, 1), (try_end), (str_store_troop_name_link, s9, "$g_talk_troop"), (str_store_party_name_link, s13, "$g_encountered_party"), (str_store_party_name, s4, "$g_encountered_party"), (setup_quest_text, "qst_deal_with_looters"), (str_store_string, s2, "@The Guildmaster of {s13} has asked you to deal with looters in the surrounding countryside."), (call_script, "script_start_quest", "qst_deal_with_looters", "$g_talk_troop"), (assign, "$g_leave_encounter",1), ], "Excellent! You'll find the looters roaming around the countryside, probably trying to rob more good people.\ Kill or capture the bastards, I don't care what you do with them.\ I'll pay you a bounty of 40 denars on every band of looters you destroy,\ until all the looters are dealt with.", "close_window", []], # Ryan END # deliver wine: [anyone,"merchant_quest_requested", [(eq,"$random_merchant_quest_no","qst_deliver_wine"),], "You're looking for a job?\ Actually I was looking for someone to deliver some {s4}.\ Perhaps you can do that...", "merchant_quest_brief", [(quest_get_slot, ":quest_target_item", "qst_deliver_wine", slot_quest_target_item), (str_store_item_name, s4, ":quest_target_item"), ]], [anyone,"merchant_quest_brief", [(eq,"$random_merchant_quest_no","qst_deliver_wine")], "I have a cargo of {s6} that needs to be delivered to the tavern in {s4}.\ If you can take {reg5} units of {s6} to {s4} in 7 days, you may earn {reg8} denars.\ What do you say?", "merchant_quest_brief_deliver_wine", [(quest_get_slot, reg5, "qst_deliver_wine", slot_quest_target_amount), (quest_get_slot, reg8, "qst_deliver_wine", slot_quest_gold_reward), (quest_get_slot, ":quest_target_item", "qst_deliver_wine", slot_quest_target_item), (quest_get_slot, ":quest_target_center", "qst_deliver_wine", slot_quest_target_center), (str_store_troop_name, s9, "$g_talk_troop"), (str_store_party_name_link, s3, "$g_encountered_party"), (str_store_party_name_link, s4, ":quest_target_center"), (str_store_item_name, s6, ":quest_target_item"), (setup_quest_text,"qst_deliver_wine"), (str_store_string, s2, "@{s9} of {s3} asked you to deliver {reg5} units of {s6} to the tavern in {s4} in 7 days."), #s2 should not be changed until the decision is made ]], [anyone|plyr,"merchant_quest_brief_deliver_wine", [(store_free_inventory_capacity,":capacity"), (quest_get_slot, ":quest_target_amount", "qst_deliver_wine", slot_quest_target_amount), (ge, ":capacity", ":quest_target_amount"), ], "Alright. I will make the delivery.", "merchant_quest_taken", [(quest_get_slot, ":quest_target_amount", "qst_deliver_wine", slot_quest_target_amount), (quest_get_slot, ":quest_target_item", "qst_deliver_wine", slot_quest_target_item), (troop_add_items, "trp_player", ":quest_target_item",":quest_target_amount"), (call_script, "script_start_quest", "qst_deliver_wine", "$g_talk_troop"), ]], [anyone|plyr,"merchant_quest_brief_deliver_wine", [], "I am afraid I can't carry all that cargo now.", "merchant_quest_stall",[]], #escort merchant caravan: [anyone,"merchant_quest_requested", [(eq,"$random_merchant_quest_no","qst_escort_merchant_caravan")], "You're looking for a job?\ Actually I was looking for someone to escort a caravan.\ Perhaps you can do that...", "merchant_quest_brief", []], [anyone,"merchant_quest_brief", [(eq, "$random_merchant_quest_no", "qst_escort_merchant_caravan")], "I am going to send a caravan of goods to {s8}.\ However with all those bandits and deserters on the roads, I don't want to send them out without an escort.\ If you can lead that caravan to {s8} in 15 days, you will earn {reg8} denars.\ Of course your party needs to be at least {reg4} strong to offer them any protection.", "escort_merchant_caravan_quest_brief", [(quest_get_slot, reg8, "qst_escort_merchant_caravan", slot_quest_gold_reward), (quest_get_slot, reg4, "qst_escort_merchant_caravan", slot_quest_target_amount), (quest_get_slot, ":quest_target_center", "qst_escort_merchant_caravan", slot_quest_target_center), (str_store_party_name, s8, ":quest_target_center"), ]], [anyone|plyr,"escort_merchant_caravan_quest_brief", [(store_party_size_wo_prisoners, ":party_size", "p_main_party"), (quest_get_slot, ":quest_target_amount", "qst_escort_merchant_caravan", slot_quest_target_amount), (ge,":party_size",":quest_target_amount"), ], "Alright. I will escort the caravan.", "merchant_quest_taken", [(quest_get_slot, ":quest_target_center", "qst_escort_merchant_caravan", slot_quest_target_center), (set_spawn_radius, 1), (spawn_around_party,"$g_encountered_party","pt_merchant_caravan"), (assign, ":quest_target_party", reg0), (party_set_ai_behavior, ":quest_target_party", ai_bhvr_track_party), (party_set_ai_object, ":quest_target_party", "p_main_party"), (party_set_flags, ":quest_target_party", pf_default_behavior, 0), (quest_set_slot, "qst_escort_merchant_caravan", slot_quest_target_party, ":quest_target_party"), (quest_set_slot, "qst_escort_merchant_caravan", slot_quest_current_state, 0), (str_store_party_name_link, s8, ":quest_target_center"), (setup_quest_text, "qst_escort_merchant_caravan"), (str_store_string, s2, "@Escort the merchant caravan to the town of {s8}."), (call_script, "script_start_quest", "qst_escort_merchant_caravan", "$g_talk_troop"), ]], [anyone|plyr,"escort_merchant_caravan_quest_brief", [(store_party_size_wo_prisoners, ":party_size", "p_main_party"), (quest_get_slot, ":quest_target_amount", "qst_escort_merchant_caravan", slot_quest_target_amount), (lt,":party_size",":quest_target_amount"),], "I am afraid I don't have that many soldiers with me.", "merchant_quest_stall",[]], [anyone|plyr,"escort_merchant_caravan_quest_brief", [(store_party_size_wo_prisoners, ":party_size", "p_main_party"), (quest_get_slot, ":quest_target_amount", "qst_escort_merchant_caravan", slot_quest_target_amount), (ge,":party_size",":quest_target_amount"),], "Sorry. I can't do that right now", "merchant_quest_stall",[]], [party_tpl|pt_merchant_caravan,"start", [(quest_get_slot, ":quest_target_party", "qst_escort_merchant_caravan", slot_quest_target_party), (eq,"$g_encountered_party",":quest_target_party"), (quest_slot_eq,"qst_escort_merchant_caravan", slot_quest_current_state, 2), ], "We can cover the rest of the way ourselves. Thanks.", "close_window",[(assign, "$g_leave_encounter", 1)]], [party_tpl|pt_merchant_caravan,"start", [(quest_get_slot, ":quest_target_party", "qst_escort_merchant_caravan", slot_quest_target_party), (eq,"$g_encountered_party",":quest_target_party"), (quest_get_slot, ":quest_target_center", "qst_escort_merchant_caravan", slot_quest_target_center), (store_distance_to_party_from_party, ":dist", ":quest_target_center",":quest_target_party"), (lt,":dist",4), (quest_slot_eq, "qst_escort_merchant_caravan", slot_quest_current_state, 1), ], "Well, we have almost reached {s21}. We can cover the rest of the way ourselves.\ Here's your pay... {reg14} denars.\ Thanks for escorting us. Good luck.", "close_window",[(quest_get_slot, ":quest_target_party", "qst_escort_merchant_caravan", slot_quest_target_party), (quest_get_slot, ":quest_target_center", "qst_escort_merchant_caravan", slot_quest_target_center), (quest_get_slot, ":quest_giver_center", "qst_escort_merchant_caravan", slot_quest_giver_center), (quest_get_slot, ":quest_gold_reward", "qst_escort_merchant_caravan", slot_quest_gold_reward), (party_set_ai_behavior, ":quest_target_party", ai_bhvr_travel_to_party), (party_set_ai_object, ":quest_target_party", ":quest_target_center"), (party_set_flags, ":quest_target_party", pf_default_behavior, 0), (str_store_party_name, s21, ":quest_target_center"), (call_script, "script_change_player_relation_with_center", ":quest_giver_center", 1), (call_script, "script_end_quest","qst_escort_merchant_caravan"), (quest_set_slot, "qst_escort_merchant_caravan", slot_quest_current_state, 2), (call_script, "script_troop_add_gold", "trp_player",":quest_gold_reward"), (assign, ":xp_reward", ":quest_gold_reward"), (val_mul, ":xp_reward", 5), (val_add, ":xp_reward", 100), (add_xp_as_reward, ":xp_reward"), (call_script, "script_change_troop_renown", "trp_player", 2), (assign, reg14, ":quest_gold_reward"), (assign, "$g_leave_encounter", 1), ]], [party_tpl|pt_merchant_caravan,"start", [(quest_get_slot, ":quest_target_party", "qst_escort_merchant_caravan", slot_quest_target_party), (eq,"$g_encountered_party",":quest_target_party"), (quest_slot_eq, "qst_escort_merchant_caravan", slot_quest_current_state, 0), ], "Greetings. You must be our escort, right?", "merchant_caravan_intro_1",[(quest_set_slot, "qst_escort_merchant_caravan", slot_quest_current_state, 1),]], [anyone|plyr,"merchant_caravan_intro_1", [], "Yes. My name is {playername}. I will lead you to {s1}.", "merchant_caravan_intro_2",[(quest_get_slot, ":quest_target_center", "qst_escort_merchant_caravan", slot_quest_target_center), (str_store_party_name, s1, ":quest_target_center"), ]], [anyone,"merchant_caravan_intro_2", [], "Well, It is good to know we won't travel alone. What do you want us to do now?", "escort_merchant_caravan_talk",[]], [party_tpl|pt_merchant_caravan,"start", [(quest_get_slot, ":quest_target_party", "qst_escort_merchant_caravan", slot_quest_target_party), (eq, "$g_encountered_party", ":quest_target_party"), ], "Eh. We've made it this far... What do you want us to do?", "escort_merchant_caravan_talk",[]], [anyone|plyr,"escort_merchant_caravan_talk", [], "You follow my lead. I'll take you through a safe route.", "merchant_caravan_follow_lead",[]], [anyone,"merchant_caravan_follow_lead", [], "Alright. We'll be right behind you.", "close_window",[(assign, "$escort_merchant_caravan_mode", 0), (assign, "$g_leave_encounter", 1)]], [anyone|plyr,"escort_merchant_caravan_talk", [], "You stay here for a while. I'll go ahead and check the road.", "merchant_caravan_stay_here",[]], [anyone,"merchant_caravan_stay_here", [], "Alright. We'll be waiting here for you.", "close_window",[(assign, "$escort_merchant_caravan_mode", 1), (assign, "$g_leave_encounter", 1)]], # [anyone|plyr,"escort_merchant_caravan_talk", [], "You go ahead to {s1}. I'll catch up with you.", "merchant_caravan_go_to_destination",[]], # [anyone,"merchant_caravan_go_to_destination", [], "Alright. But stay close.", "close_window",[[assign,"escort_merchant_caravan_mode",2]]], # Troublesome bandits: [anyone,"merchant_quest_requested", [(eq, "$random_merchant_quest_no", "qst_troublesome_bandits")], "Actually, I was looking for an able adventurer like you.\ There's this group of particularly troublesome bandits.\ They have infested the vicinity of our town and are preying on my caravans.\ They have avoided all the soldiers and the militias up to now.\ If someone doesn't stop them soon, I am going to be ruined...", "merchant_quest_brief", []], [anyone,"merchant_quest_brief", [(eq,"$random_merchant_quest_no", "qst_troublesome_bandits")], "I will pay you {reg8} denars if you hunt down those troublesome bandits.\ It's dangerous work. But I believe that you are the {man/one} for it.\ What do you say?", "troublesome_bandits_quest_brief",[(quest_get_slot, reg8, "qst_troublesome_bandits", slot_quest_gold_reward), ]], [anyone|plyr,"troublesome_bandits_quest_brief", [], "Alright. I will hunt down those bandits.", "merchant_quest_taken_bandits", [(set_spawn_radius,7), (quest_get_slot, ":quest_giver_center", "qst_troublesome_bandits", slot_quest_giver_center), (spawn_around_party,":quest_giver_center","pt_troublesome_bandits"), (quest_set_slot, "qst_troublesome_bandits", slot_quest_target_party, reg0), (store_num_parties_destroyed,"$qst_troublesome_bandits_eliminated","pt_troublesome_bandits"), (store_num_parties_destroyed_by_player, "$qst_troublesome_bandits_eliminated_by_player", "pt_troublesome_bandits"), (str_store_troop_name, s9, "$g_talk_troop"), (str_store_party_name_link, s4, "$g_encountered_party"), (setup_quest_text,"qst_troublesome_bandits"), (str_store_string, s2, "@Merchant {s9} of {s4} asked you to hunt down the troublesome bandits in the vicinity of the town."), (call_script, "script_start_quest", "qst_troublesome_bandits", "$g_talk_troop"), ]], [anyone,"merchant_quest_taken_bandits", [], "You will? I am so happy to hear that. Good luck to you.", "close_window", []], [anyone|plyr,"troublesome_bandits_quest_brief", [], "Sorry. I don't have time for this right now.", "merchant_quest_stall",[]], # Kidnapped girl: [anyone,"merchant_quest_requested", [(eq, "$random_merchant_quest_no", "qst_kidnapped_girl")], "Actually, I was looking for a reliable {man/helper} that can undertake an important mission.\ A group of bandits have kidnapped the daughter of a friend of mine and are holding her for ransom.\ My friend is ready to pay them, but we still need\ someone to take the money to those rascals and bring the girl back to safety.", "merchant_quest_brief", []], [anyone,"merchant_quest_brief", [(eq, "$random_merchant_quest_no", "qst_kidnapped_girl")], "The amount the bandits ask as ransom is {reg12} denars.\ I will give you that money once you accept to take the quest.\ You have 15 days to take the money to the bandits who will be waiting near the village of {s4}.\ Those bastards said that they are going to kill the poor girl if they don't get the money by that time.\ You will get your pay of {reg8} denars when you bring the girl safely back here.", "kidnapped_girl_quest_brief",[(quest_get_slot, ":quest_target_center", "qst_kidnapped_girl", slot_quest_target_center), (str_store_party_name, s4, ":quest_target_center"), (quest_get_slot, reg8, "qst_kidnapped_girl", slot_quest_gold_reward), (quest_get_slot, reg12, "qst_kidnapped_girl", slot_quest_target_amount), ]], [anyone|plyr,"kidnapped_girl_quest_brief", [], "Alright. I will take the ransom money to the bandits and bring back the girl.", "kidnapped_girl_quest_taken",[(set_spawn_radius, 4), (quest_get_slot, ":quest_target_center", "qst_kidnapped_girl", slot_quest_target_center), (quest_get_slot, ":quest_target_amount", "qst_kidnapped_girl", slot_quest_target_amount), (spawn_around_party,":quest_target_center","pt_bandits_awaiting_ransom"), (assign, ":quest_target_party", reg0), (quest_set_slot, "qst_kidnapped_girl", slot_quest_target_party, ":quest_target_party"), (party_set_ai_behavior, ":quest_target_party", ai_bhvr_hold), (party_set_ai_object, ":quest_target_party", "p_main_party"), (party_set_flags, ":quest_target_party", pf_default_behavior, 0), (call_script, "script_troop_add_gold", "trp_player", ":quest_target_amount"), (assign, reg12, ":quest_target_amount"), (str_store_troop_name, s1, "$g_talk_troop"), (str_store_party_name_link, s4, "$g_encountered_party"), (str_store_party_name_link, s3, ":quest_target_center"), (setup_quest_text, "qst_kidnapped_girl"), (str_store_string, s2, "@Guildmaster of {s4} gave you {reg12} denars to pay the ransom of a girl kidnapped by bandits.\ You are to meet the bandits near {s3} and pay them the ransom fee.\ After that you are to bring the girl back to {s4}."), (call_script, "script_start_quest", "qst_kidnapped_girl", "$g_talk_troop"), ]], [anyone,"kidnapped_girl_quest_taken", [], "Good. I knew we could trust you at this.\ Here is the ransom money, {reg12} denars.\ Count it before taking it.\ And please, don't attempt to do anything rash.\ Keep in mind that the girl's well being is more important than anything else...", "close_window", []], [anyone|plyr,"kidnapped_girl_quest_brief", [], "Sorry. I don't have time for this right now.", "merchant_quest_stall",[]], [trp_kidnapped_girl,"start", [ (eq, "$talk_context", tc_entering_center_quest_talk), ], "Thank you so much for bringing me back!\ I can't wait to see my family. Good-bye.", "close_window", [(remove_member_from_party, "trp_kidnapped_girl"), (quest_set_slot, "qst_kidnapped_girl", slot_quest_current_state, 4), ]], [trp_kidnapped_girl|plyr,"kidnapped_girl_liberated_map", [], "Yes. Come with me. We are going home.", "kidnapped_girl_liberated_map_2a",[]], [trp_kidnapped_girl,"kidnapped_girl_liberated_map_2a", [(neg|party_can_join)], "Unfortunately. You do not have room in your party for me.", "close_window",[(assign, "$g_leave_encounter",1)]], [trp_kidnapped_girl,"kidnapped_girl_liberated_map_2a", [], "Oh really? Thank you so much!", "close_window", [(party_join), (quest_set_slot, "qst_kidnapped_girl", slot_quest_current_state, 3), (assign, "$g_leave_encounter",1)]], [trp_kidnapped_girl|plyr,"kidnapped_girl_liberated_map", [], "Wait here a while longer. I'll come back for you.", "kidnapped_girl_liberated_map_2b",[]], [trp_kidnapped_girl,"kidnapped_girl_liberated_map_2b", [], "Oh, please {sir/madam}, do not leave me here all alone!", "close_window",[(assign, "$g_leave_encounter",1)]], [trp_kidnapped_girl,"start", [], "Oh {sir/madam}. Thank you so much for rescuing me. Will you take me to my family now?", "kidnapped_girl_liberated_map",[]], [trp_kidnapped_girl|plyr,"kidnapped_girl_liberated_battle", [], "Yes. Come with me. We are going home.", "kidnapped_girl_liberated_battle_2a",[]], [trp_kidnapped_girl,"kidnapped_girl_liberated_battle_2a", [(neg|hero_can_join, "p_main_party")], "Unfortunately. You do not have room in your party for me.", "kidnapped_girl_liberated_battle_2b",[]], [trp_kidnapped_girl,"kidnapped_girl_liberated_battle_2a", [], "Oh really? Thank you so much!", "close_window",[(party_add_members, "p_main_party","trp_kidnapped_girl",1), (quest_set_slot, "qst_kidnapped_girl", slot_quest_current_state, 3), ]], [trp_kidnapped_girl|plyr,"kidnapped_girl_liberated_battle", [], "Wait here a while longer. I'll come back for you.", "kidnapped_girl_liberated_battle_2b",[]], [trp_kidnapped_girl,"kidnapped_girl_liberated_battle_2b", [], "Oh, please {sir/madam}, do not leave me here all alone!", "close_window", [(add_companion_party,"trp_kidnapped_girl"), (assign, "$g_leave_encounter",1)]], [trp_kidnapped_girl,"start", [], "Can I come with you now?", "kidnapped_girl_liberated_map",[]], [party_tpl|pt_bandits_awaiting_ransom,"start", [(quest_slot_eq, "qst_kidnapped_girl", slot_quest_current_state, 0),], "Are you the one that brought the ransom?\ Quick, give us the money now.", "bandits_awaiting_ransom_intro_1",[(quest_set_slot, "qst_kidnapped_girl", slot_quest_current_state, 1),]], [party_tpl|pt_bandits_awaiting_ransom,"start", [(quest_slot_eq, "qst_kidnapped_girl", slot_quest_current_state, 1),], "You came back?\ Quick, give us the money now.", "bandits_awaiting_ransom_intro_1",[]], [party_tpl|pt_bandits_awaiting_ransom|plyr, "bandits_awaiting_ransom_intro_1", [(store_troop_gold, ":cur_gold"), (quest_get_slot, ":quest_target_amount", "qst_kidnapped_girl", slot_quest_target_amount), (ge, ":cur_gold", ":quest_target_amount") ], "Here, take the money. Just set the girl free.", "bandits_awaiting_ransom_pay",[]], [party_tpl|pt_bandits_awaiting_ransom, "bandits_awaiting_ransom_pay", [], "Heh. You've brought the money all right.\ You can take the girl now.\ It was a pleasure doing business with you...", "close_window", [(quest_get_slot, ":quest_target_amount", "qst_kidnapped_girl", slot_quest_target_amount), (quest_get_slot, ":quest_target_party", "qst_kidnapped_girl", slot_quest_target_party), (quest_get_slot, ":quest_target_center", "qst_kidnapped_girl", slot_quest_target_center), (troop_remove_gold, "trp_player", ":quest_target_amount"), (remove_member_from_party, "trp_kidnapped_girl", ":quest_target_party"), (set_spawn_radius, 1), (spawn_around_party, ":quest_target_party", "pt_kidnapped_girl"), (assign, ":girl_party", reg0), (party_set_ai_behavior, ":girl_party", ai_bhvr_hold), (party_set_flags, ":girl_party", pf_default_behavior, 0), (quest_set_slot, "qst_kidnapped_girl", slot_quest_current_state, 2), (party_set_ai_behavior, ":quest_target_party", ai_bhvr_travel_to_party), (party_set_ai_object, ":quest_target_party", ":quest_target_center"), (party_set_flags, ":quest_target_party", pf_default_behavior, 0), (add_gold_to_party, ":quest_target_amount", ":quest_target_party"), (assign, "$g_leave_encounter",1), ]], [anyone|plyr, "bandits_awaiting_ransom_intro_1", [], "No way! You release the girl first.", "bandits_awaiting_ransom_b",[]], [anyone, "bandits_awaiting_ransom_b", [], "You fool! Stop playing games and give us the money! ", "bandits_awaiting_ransom_b2",[]], [anyone|plyr, "bandits_awaiting_ransom_b2", [(store_troop_gold, ":cur_gold"), (quest_get_slot, ":quest_target_amount", "qst_kidnapped_girl", slot_quest_target_amount), (ge, ":cur_gold", ":quest_target_amount")], "All right. Here's your money. Let the girl go now.", "bandits_awaiting_ransom_pay",[]], [anyone|plyr, "bandits_awaiting_ransom_b2", [], "I had left the money in a safe place. Let me go fetch it.", "bandits_awaiting_ransom_no_money",[]], [anyone, "bandits_awaiting_ransom_no_money", [], "Are you testing our patience or something? Go and bring that money here quickly.", "close_window",[(assign, "$g_leave_encounter",1)]], [anyone|plyr, "bandits_awaiting_ransom_b2", [], "I have no intention to pay you anything. I demand that you release the girl now!", "bandits_awaiting_ransom_fight",[]], [anyone, "bandits_awaiting_ransom_fight", [], "You won't be demanding anything when you're dead.", "close_window",[(encounter_attack),]], [party_tpl|pt_bandits_awaiting_ransom,"start", [(quest_slot_ge, "qst_kidnapped_girl", slot_quest_current_state, 2),], "What's it? You have given us the money. We have no more business.", "bandits_awaiting_remeet",[]], [anyone|plyr,"bandits_awaiting_remeet", [], "Sorry to bother you. I'll be on my way now.", "close_window",[(assign, "$g_leave_encounter",1)]], [anyone|plyr,"bandits_awaiting_remeet", [], "We have one more business. You'll give the money back to me.", "bandits_awaiting_remeet_2",[]], [anyone,"bandits_awaiting_remeet_2", [], "Oh, that business! Of course. Let us get down to it.", "close_window",[(encounter_attack)]], [party_tpl|pt_kidnapped_girl,"start", [], "Oh {sir/madam}. Thank you so much for rescuing me. Will you take me to my family now?", "kidnapped_girl_encounter_1",[]], [anyone|plyr,"kidnapped_girl_encounter_1", [], "Yes. Come with me. I'll take you home.", "kidnapped_girl_join",[]], [anyone,"kidnapped_girl_join", [(neg|party_can_join)], "Unfortunately. You do not have room in your party for me.", "close_window",[(assign, "$g_leave_encounter",1)]], [anyone,"kidnapped_girl_join", [], "Oh, thank you so much!", "close_window",[(party_join), (quest_set_slot, "qst_kidnapped_girl", slot_quest_current_state, 3), (assign, "$g_leave_encounter",1)]], [anyone|plyr,"kidnapped_girl_encounter_1", [], "Wait here a while longer. I'll come back for you.", "kidnapped_girl_wait",[]], [anyone,"kidnapped_girl_wait", [], "Oh, please {sir/madam}, do not leave me here all alone!", "close_window",[(assign, "$g_leave_encounter",1)]], [anyone|plyr,"merchant_quest_about_job_2", [(store_partner_quest, ":partner_quest"), (eq, ":partner_quest", "qst_kidnapped_girl"), (quest_slot_eq, "qst_kidnapped_girl", slot_quest_current_state, 3), (neg|main_party_has_troop, "trp_kidnapped_girl")], "Unfortunately I lost the girl on the way here...", "lost_kidnapped_girl",[]], [anyone,"lost_kidnapped_girl", [], "Oh no! How am I going to tell this to my friend?", "lost_kidnapped_girl_2",[]], [anyone|plyr,"lost_kidnapped_girl_2", [], "I'm sorry. I could do nothing about it.", "lost_kidnapped_girl_3",[]], [anyone,"lost_kidnapped_girl_3", [], "You let me down {playername}. I had trusted you.\ I will let people know of your incompetence at this task.\ Also, I want back that {reg8} denars I gave you as the ransom fee.", "lost_kidnapped_girl_4", [(quest_get_slot, reg8, "qst_kidnapped_girl", slot_quest_target_amount), (try_for_parties, ":cur_party"), (party_count_members_of_type, ":num_members", ":cur_party", "trp_kidnapped_girl"), (gt, ":num_members", 0), (party_remove_members, ":cur_party", "trp_kidnapped_girl", 1), (party_remove_prisoners, ":cur_party", "trp_kidnapped_girl", 1), (try_end), (call_script, "script_end_quest", "qst_kidnapped_girl"), (call_script, "script_change_troop_renown", "trp_player", -5), ]], [anyone|plyr, "lost_kidnapped_girl_4", [(store_troop_gold,":gold"), (quest_get_slot, ":quest_target_amount", "qst_kidnapped_girl", slot_quest_target_amount), (ge,":gold",":quest_target_amount"), ], "Of course. Here you are...", "merchant_quest_about_job_5a",[(quest_get_slot, ":quest_target_amount", "qst_kidnapped_girl", slot_quest_target_amount), (troop_remove_gold, "trp_player",":quest_target_amount"), ]], [anyone,"merchant_quest_about_job_5a", [], "At least you have the decency to return the money.", "close_window",[]], [anyone|plyr,"lost_kidnapped_girl_4", [], "Sorry. I don't have that amount with me.", "merchant_quest_about_job_5b",[]], [anyone,"merchant_quest_about_job_5b", [], "Do you expect me to believe that? You are going to pay that ransom fee back! Go and bring the money now!", "close_window",[(quest_get_slot, ":quest_target_amount", "qst_kidnapped_girl", slot_quest_target_amount), (val_add, "$debt_to_merchants_guild", ":quest_target_amount"), ]], # Give us the money now. Quick. # Here, take the money. Just set the girl free. # Heh, It was a pleasure doing business with you. # You set the girl free first. You'll have the money afterwards. # Stop playing games. #persuade_lords_to_make_peace [anyone,"merchant_quest_requested", [(eq, "$random_merchant_quest_no", "qst_persuade_lords_to_make_peace"), (quest_get_slot, ":quest_target_faction", "qst_persuade_lords_to_make_peace", slot_quest_target_faction), (quest_get_slot, ":quest_object_troop", "qst_persuade_lords_to_make_peace", slot_quest_object_troop), (quest_get_slot, ":quest_target_troop", "qst_persuade_lords_to_make_peace", slot_quest_target_troop), (str_store_troop_name_link, s12, ":quest_object_troop"), (str_store_troop_name_link, s13, ":quest_target_troop"), (str_store_faction_name_link, s14, ":quest_target_faction"), (str_store_faction_name_link, s15, "$g_encountered_party_faction"),], "This war between {s15} and {s14} has brought our town to the verge of ruin.\ Our caravans get raided before they can reach their destination.\ Our merchants are afraid to leave the safety of the town walls.\ And as if those aren't enough, the taxes to maintain the war take away the last bits of our savings.\ If peace does not come soon, we can not hold on for much longer.", "merchant_quest_persuade_peace_1", []], [anyone|plyr,"merchant_quest_persuade_peace_1", [], "You are right. But who can stop this madness called war?", "merchant_quest_brief",[]], [anyone|plyr,"merchant_quest_persuade_peace_1", [], "It is your duty to help the nobles in their war effort. You shouldn't complain about it.", "merchant_quest_persuade_peace_reject",[]], [anyone,"merchant_quest_persuade_peace_reject", [], "Hah. The nobles fight their wars for their greed and their dreams of glory.\ And it is poor honest folk like us who have to bear the real burden.\ But you obviously don't want to hear about that.", "close_window",[]], [anyone,"merchant_quest_brief", [(eq,"$random_merchant_quest_no","qst_persuade_lords_to_make_peace")], "There have been attempts to reconcile the two sides and reach a settlement.\ However, there are powerful lords on both sides whose interests lie in continuing the war.\ These men urge all others not to heed to the word of sensible men, but to keep fighting.\ While these leaders remain influential, no peace settlement can be reached.", "merchant_quest_persuade_peace_3",[]], [anyone|plyr,"merchant_quest_persuade_peace_3", [], "Who are these warmongers who block the way of peace?", "merchant_quest_persuade_peace_4",[]], [anyone|plyr,"merchant_quest_persuade_peace_3", [], "Who are these lords you speak of?", "merchant_quest_persuade_peace_4",[]], [anyone,"merchant_quest_persuade_peace_4", [], "They are {s12} from {s15} and {s13} from {s14}. Until they change their mind or lose their influence,\ there will be no chance of having peace between the two sides.", "merchant_quest_persuade_peace_5",[ (quest_get_slot, ":quest_target_faction", "qst_persuade_lords_to_make_peace", slot_quest_target_faction), (quest_get_slot, ":quest_object_troop", "qst_persuade_lords_to_make_peace", slot_quest_object_troop), (quest_get_slot, ":quest_target_troop", "qst_persuade_lords_to_make_peace", slot_quest_target_troop), (str_store_troop_name_link, s12, ":quest_object_troop"), (str_store_troop_name_link, s13, ":quest_target_troop"), (str_store_faction_name_link, s14, ":quest_target_faction"), (str_store_faction_name_link, s15, "$g_encountered_party_faction"), ]], [anyone|plyr,"merchant_quest_persuade_peace_5", [], "What can be done about this?", "merchant_quest_persuade_peace_6",[]], [anyone|plyr,"merchant_quest_persuade_peace_5", [], "Alas, it seems nothing can be done about it.", "merchant_quest_persuade_peace_6",[]], [anyone,"merchant_quest_persuade_peace_6", [], "There is a way to resolve the issue.\ A particularly determined person can perhaps persuade one or both of these lords to accept making peace.\ And even if that fails, it can be possible to see that these lords are defeated by force and taken prisoner.\ If they are captive, they will lose their influence and they can no longer oppose a settlement... What do you think? Can you do it?", "merchant_quest_persuade_peace_7",[]], [anyone|plyr,"merchant_quest_persuade_peace_7", [], "It seems difficult. But I will try.", "merchant_quest_persuade_peace_8",[]], [anyone|plyr,"merchant_quest_persuade_peace_7", [], "If the price is right, I may.", "merchant_quest_persuade_peace_8",[]], [anyone|plyr,"merchant_quest_persuade_peace_7", [], "Forget it. This is not my problem.", "merchant_quest_persuade_peace_8",[]], [anyone,"merchant_quest_persuade_peace_8", [], "Most of the merchants in the town will gladly open up their purses to support such a plan.\ I think we can collect {reg12} denars between ourselves.\ We will be happy to reward you with that sum, if you can work this out.\ Convince {s12} and {s13} to accept a peace settlement,\ and if either of them proves too stubborn, make sure he falls captive and can not be ransomed until a peace deal is settled.", "merchant_quest_persuade_peace_9",[ (quest_get_slot, ":quest_object_troop", "qst_persuade_lords_to_make_peace", slot_quest_object_troop), (quest_get_slot, ":quest_target_troop", "qst_persuade_lords_to_make_peace", slot_quest_target_troop), (str_store_troop_name_link, s12, ":quest_object_troop"), (str_store_troop_name_link, s13, ":quest_target_troop"), (quest_get_slot, ":quest_reward", "qst_persuade_lords_to_make_peace", slot_quest_gold_reward), (assign, reg12, ":quest_reward")]], [anyone|plyr,"merchant_quest_persuade_peace_9", [], "All right. I will do my best.", "merchant_quest_persuade_peace_10",[]], [anyone|plyr,"merchant_quest_persuade_peace_9", [], "Sorry. I can not do this.", "merchant_quest_persuade_peace_no",[]], [anyone,"merchant_quest_persuade_peace_10", [], "Excellent. You will have our blessings.\ I hope you can deal with those two old goats.\ We will be waiting and hoping for the good news.", "close_window",[ (str_store_party_name_link, s4, "$g_encountered_party"), (quest_get_slot, ":quest_target_faction", "qst_persuade_lords_to_make_peace", slot_quest_target_faction), (quest_get_slot, ":quest_object_troop", "qst_persuade_lords_to_make_peace", slot_quest_object_troop), (quest_get_slot, ":quest_target_troop", "qst_persuade_lords_to_make_peace", slot_quest_target_troop), (quest_get_slot, ":quest_reward", "qst_persuade_lords_to_make_peace", slot_quest_gold_reward), (assign, reg12, ":quest_reward"), (str_store_troop_name_link, s12, ":quest_object_troop"), (str_store_troop_name_link, s13, ":quest_target_troop"), (str_store_faction_name_link, s14, ":quest_target_faction"), (str_store_faction_name_link, s15, "$g_encountered_party_faction"), (setup_quest_text,"qst_persuade_lords_to_make_peace"), (str_store_string, s2, "@Guildmaster of {s4} promised you {reg12} denars if you can make sure that\ {s12} and {s13} no longer pose a threat to a peace settlement between {s15} and {s14}.\ In order to do that, you must either convince them or make sure they fall captive and remain so until a peace agreement is made."), (call_script, "script_start_quest", "qst_persuade_lords_to_make_peace", "$g_talk_troop"), (quest_get_slot, ":quest_object_troop", "qst_persuade_lords_to_make_peace", slot_quest_object_troop), (quest_get_slot, ":quest_target_troop", "qst_persuade_lords_to_make_peace", slot_quest_target_troop), (call_script, "script_report_quest_troop_positions", "qst_persuade_lords_to_make_peace", ":quest_object_troop", 3), (call_script, "script_report_quest_troop_positions", "qst_persuade_lords_to_make_peace", ":quest_target_troop", 4), ]], [anyone,"merchant_quest_persuade_peace_no", [], "Don't say no right away. Think about this for some time.\ If there is a {man/lady} who can manage to do this, it is you.", "close_window",[]], #deal with night bandits [anyone,"merchant_quest_requested", [ (eq, "$random_merchant_quest_no", "qst_deal_with_night_bandits"), ], "Do I indeed! There's a group of bandits infesting the town, and I'm at the end of my rope as to how to deal with them.\ They've been ambushing and robbing townspeople under the cover of night,\ and then fading away quick as lightning when the guards finally show up. We've not been able to catch a one of them.\ They only attack lone people, never daring to show themselves when there's a group about.\ I need someone who can take on these bandits alone and win. That seems to be the only way of bringing them to justice.\ Are you up to the task?", "merchant_quest_deal_with_night_bandits", []], [anyone,"merchant_quest_brief", [ (eq,"$random_merchant_quest_no","qst_deal_with_night_bandits"), ], "There's a group of bandits infesting the town, and I'm at the end of my rope as to how to deal with them.\ They've been ambushing and robbing townspeople under the cover of night,\ and then fading away quick as lightning when the guards finally show up. We've not been able to catch a one of them.\ They only attack lone people, never daring to show themselves when there's a group about.\ I need someone who can take on these bandits alone and win. That seems to be the only way of bringing them to justice.\ Are you up to the task?", "merchant_quest_deal_with_night_bandits", []], [anyone|plyr,"merchant_quest_deal_with_night_bandits", [], "Killing bandits? Why, certainly!", "deal_with_night_bandits_quest_taken", [ (str_store_party_name_link, s14, "$g_encountered_party"), (setup_quest_text, "qst_deal_with_night_bandits"), (str_store_string, s2, "@The Guildmaster of {s14} has asked you to deal with a group of bandits terrorising the streets of {s14}. They only come out at night, and only attack lone travellers on the streets."), (call_script, "script_start_quest", "qst_deal_with_night_bandits", "$g_talk_troop"), ]], [anyone|plyr, "merchant_quest_deal_with_night_bandits", [], "My apologies, I'm not interested.", "merchant_quest_stall",[]], [anyone,"deal_with_night_bandits_quest_taken", [], "That takes a weight off my shoulders, {playername}.\ You can expect a fine reward if you come back successful. Just don't get yourself killed, eh?", "mayor_pretalk",[]], #move cattle herd [anyone,"merchant_quest_requested", [(eq, "$random_merchant_quest_no", "qst_move_cattle_herd"), (quest_get_slot, ":target_center", "qst_move_cattle_herd", slot_quest_target_center), (str_store_party_name,s13,":target_center"),], "One of the merchants here is looking for herdsmen to take his cattle to the market at {s13}.", "merchant_quest_brief", []], [anyone,"merchant_quest_brief", [ (eq,"$random_merchant_quest_no","qst_move_cattle_herd"), (quest_get_slot, reg8, "qst_move_cattle_herd", slot_quest_gold_reward), (quest_get_slot, ":target_center", "qst_move_cattle_herd", slot_quest_target_center), (str_store_party_name, s13, ":target_center"), ], "The cattle herd must be at {s13} within 30 days. Sooner is better, much better,\ but it must be absolutely no later than 30 days.\ If you can do that, I'd be willing to pay you {reg8} denars for your trouble. Interested?", "move_cattle_herd_quest_brief", []], [anyone|plyr,"move_cattle_herd_quest_brief", [], "Aye, I can take the herd to {s13}.", "move_cattle_herd_quest_taken", [ (call_script, "script_create_cattle_herd", "$g_encountered_party", 0), (quest_set_slot, "qst_move_cattle_herd", slot_quest_target_party, reg0), (str_store_party_name_link, s10,"$g_encountered_party"), (quest_get_slot, ":target_center", "qst_move_cattle_herd", slot_quest_target_center), (str_store_party_name_link, s13, ":target_center"), (quest_get_slot, reg8, "qst_move_cattle_herd", slot_quest_gold_reward), (setup_quest_text, "qst_move_cattle_herd"), (str_store_string, s2, "@Guildmaster of {s10} asked you to move a cattle herd to {s13}. You will earn {reg8} denars in return."), (call_script, "script_start_quest", "qst_move_cattle_herd", "$g_talk_troop"), ]], [anyone|plyr,"move_cattle_herd_quest_brief", [], "I am sorry, but no.", "merchant_quest_stall",[]], [anyone,"move_cattle_herd_quest_taken", [], "Splendid. You can find the herd right outside the town.\ After you take the animals to {s13}, return back to me and I will give you your pay.", "mayor_pretalk",[]], ################################################# #################### Random merchant quests end [anyone,"merchant_quest_requested", [], "I am afraid I can't offer you a job right now.", "mayor_pretalk",[]], #Village elders [anyone,"start", [(is_between,"$g_talk_troop",village_elders_begin,village_elders_end), (store_partner_quest,":elder_quest"), (eq,":elder_quest","qst_deliver_cattle"), (check_quest_succeeded, ":elder_quest"), (quest_get_slot, reg5, "qst_deliver_cattle", slot_quest_target_amount)], "My good {sir/madam}. Our village is grateful for your help. Thanks to the {reg5} heads of cattle you have brought, we can now raise our own herd.", "village_elder_deliver_cattle_thank", [(add_xp_as_reward, 400), (quest_get_slot, ":num_cattle", "qst_deliver_cattle", slot_quest_target_amount), (party_set_slot, "$current_town", slot_village_number_of_cattle, ":num_cattle"), (call_script, "script_change_center_prosperity", "$current_town", 4), (call_script, "script_change_player_relation_with_center", "$current_town", 5), (call_script, "script_end_quest", "qst_deliver_cattle"), #Troop commentaries begin (call_script, "script_add_log_entry", logent_helped_peasants, "trp_player", "$current_town", -1, -1), #Troop commentaries end ]], [anyone,"village_elder_deliver_cattle_thank", [], "My good {lord/lady}, please, is there anything I can do for you?", "village_elder_talk",[]], ## [anyone,"start", ## [ ## (is_between, "$g_talk_troop", village_elders_begin, village_elders_end), ## (store_partner_quest, ":elder_quest"), ## (eq, ":elder_quest", "qst_train_peasants_against_bandits"), ## (check_quest_succeeded, ":elder_quest"), ## (quest_get_slot, reg5, "qst_train_peasants_against_bandits", slot_quest_target_amount)], ## "Oh, thank you so much for training our men. Now we may stand a chance against those accursed bandits if they come again.", "village_elder_train_peasants_against_bandits_thank", ## [ ## (add_xp_as_reward, 400), ## (call_script, "script_change_player_relation_with_center", "$current_town", 5), ## (call_script, "script_end_quest", "qst_train_peasants_against_bandits"), ## (call_script, "script_add_log_entry", logent_helped_peasants, "trp_player", "$current_town", -1, -1), ## ]], # [anyone,"village_elder_train_peasants_against_bandits_thank", [], # "Now, good {sire/lady}, is there anything I can do for you?", "village_elder_talk",[]], [anyone,"start", [(is_between,"$g_talk_troop", village_elders_begin, village_elders_end),(eq,"$g_talk_troop_met",0), (str_store_party_name, s9, "$current_town")], "Good day, {sir/madam}, and welcome to {s9}. I am the elder of this village.", "village_elder_talk",[]], [anyone,"start", [(is_between,"$g_talk_troop", village_elders_begin, village_elders_end),(eq,"$g_talk_troop_met",0), (str_store_party_name, s9, "$current_town"), (party_slot_eq, "$current_town", slot_town_lord, "trp_player")], "Welcome to {s9}, my {lord/lady}. We were rejoiced by the news that you are the new {lord/lady} of our humble village.\ I am the village elder and I will be honoured to serve you in any way I can.", "village_elder_talk",[]], [anyone ,"start", [(is_between,"$g_talk_troop",village_elders_begin,village_elders_end), (party_slot_eq, "$current_town", slot_town_lord, "trp_player")], "{My lord/My lady}, you honour our humble village with your presence.", "village_elder_talk",[]], [anyone ,"start", [(is_between,"$g_talk_troop",village_elders_begin,village_elders_end)], "Good day, {sir/madam}.", "village_elder_talk",[]], [anyone ,"village_elder_pretalk", [], "Is there anything else I can do for you?", "village_elder_talk",[]], [anyone|plyr,"village_elder_talk", [(check_quest_active, "qst_hunt_down_fugitive"), (neg|check_quest_concluded, "qst_hunt_down_fugitive"), (quest_slot_eq, "qst_hunt_down_fugitive", slot_quest_target_center, "$current_town"), (quest_get_slot, ":quest_target_dna", "qst_hunt_down_fugitive", slot_quest_target_dna), (call_script, "script_get_name_from_dna_to_s50", ":quest_target_dna"), (str_store_string, s4, s50), ], "I am looking for a man by the name of {s4}. I was told he may be hiding here.", "village_elder_ask_fugitive",[]], [anyone ,"village_elder_ask_fugitive", [(is_currently_night)], "Strangers come and go to our village, {sir/madam}. But I doubt you'll run into him at this hour of the night. You would have better luck during the day.", "village_elder_pretalk",[]], [anyone ,"village_elder_ask_fugitive", [], "Strangers come and go to our village, {sir/madam}. If he is hiding here, you will surely find him if you look around.", "close_window",[]], [anyone|plyr,"village_elder_talk", [(store_partner_quest,":elder_quest"),(ge,":elder_quest",0)], "About the task you asked of me...", "village_elder_active_mission_1",[]], [anyone|plyr,"village_elder_talk", [(ge, "$g_talk_troop_faction_relation", 0),(store_partner_quest,":elder_quest"),(lt,":elder_quest",0)], "Do you have any tasks I can help you with?", "village_elder_request_mission_ask",[]], [anyone|plyr,"village_elder_talk", [(party_slot_eq, "$current_town", slot_village_state, 0), (neg|party_slot_ge, "$current_town", slot_village_infested_by_bandits, 1),], "I want to buy some supplies. I will pay with gold.", "village_elder_trade_begin",[]], [anyone ,"village_elder_trade_begin", [], "Of course, {sir/madam}. Do you want to buy goods or cattle?", "village_elder_trade_talk",[]], [anyone|plyr,"village_elder_trade_talk", [], "I want to buy food and supplies.", "village_elder_trade",[]], [anyone ,"village_elder_trade", [], "We have some food and other supplies in our storehouse. Come have a look.", "village_elder_pretalk",[(change_screen_trade, "$g_talk_troop"),]], [anyone|plyr,"village_elder_trade_talk", [(party_slot_eq, "$current_town", slot_village_state, 0), (neg|party_slot_ge, "$current_town", slot_village_infested_by_bandits, 1), (assign, ":quest_village", 0), (try_begin), (check_quest_active, "qst_deliver_cattle"), (quest_slot_eq, "qst_deliver_cattle", slot_quest_target_center, "$current_town"), (assign, ":quest_village", 1), (try_end), (eq, ":quest_village", 0), ], "I want to buy some cattle.", "village_elder_buy_cattle",[]], [anyone|plyr,"village_elder_trade_talk", [], "I changed my mind. I don't need to buy anything.", "village_elder_pretalk",[]], [anyone|plyr,"village_elder_talk", [ ], "Have you seen any enemies around here recently?", "village_elder_ask_enemies",[]], [anyone,"village_elder_ask_enemies", [ (assign, ":give_report", 0), (party_get_slot, ":original_faction", "$g_encountered_party", slot_center_original_faction), (store_relation, ":original_faction_relation", ":original_faction", "fac_player_supporters_faction"), (try_begin), (gt, ":original_faction_relation", 0), (party_slot_ge, "$g_encountered_party", slot_center_player_relation, 0), (assign, ":give_report", 1), (else_try), (party_slot_ge, "$g_encountered_party", slot_center_player_relation, 30), (assign, ":give_report", 1), (try_end), (eq, ":give_report", 0), ], "I am sorry, {sir/madam}. We have neither seen nor heard of any war parties in this area.", "village_elder_pretalk", []], [anyone,"village_elder_ask_enemies", [], "Hmm. Let me think about it...", "village_elder_tell_enemies", [ (assign, "$temp", 0), ]], [anyone,"village_elder_tell_enemies", [ (assign, ":target_hero_index", "$temp"), (assign, ":end_cond", kingdom_heroes_end), (try_for_range, ":cur_troop", kingdom_heroes_begin, ":end_cond"), (troop_get_slot, ":cur_party", ":cur_troop", slot_troop_leaded_party), (gt, ":cur_party", 0), (store_troop_faction, ":cur_faction", ":cur_troop"), (store_relation, ":reln", ":cur_faction", "fac_player_supporters_faction"), (lt, ":reln", 0), (store_distance_to_party_from_party, ":dist", "$g_encountered_party", ":cur_party"), (lt, ":dist", 10), (call_script, "script_get_information_about_troops_position", ":cur_troop", 0), (eq, reg0, 1), #Troop's location is known. (val_sub, ":target_hero_index", 1), (lt, ":target_hero_index", 0), (assign, ":end_cond", 0), (str_store_string, s2, "@He is not commanding any men at the moment."), (assign, ":num_troops", 0), (assign, ":num_wounded_troops", 0), (party_get_num_companion_stacks, ":num_stacks", ":cur_party"), (try_for_range_backwards, ":i_stack", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop", ":cur_party", ":i_stack"), (neg|troop_is_hero, ":stack_troop"), (party_stack_get_size, ":stack_size", ":cur_party", ":i_stack"), (party_stack_get_num_wounded, ":num_wounded", ":cur_party", ":i_stack"), (val_add, ":num_troops", ":stack_size"), (val_add, ":num_wounded_troops", ":num_wounded"), (try_end), (gt, ":num_troops", 0), (call_script, "script_round_value", ":num_wounded_troops"), (assign, reg1, reg0), (call_script, "script_round_value", ":num_troops"), (str_store_string, s2, "@He currently commands {reg0} men{reg1?, of which around {reg1} are wounded:}."), (try_end), (eq, ":end_cond", 0), ], "{s1} {s2}", "village_elder_tell_enemies", [ (val_add, "$temp", 1), ]], [anyone,"village_elder_tell_enemies", [(eq, "$temp", 0)], "No, {sir/madam}. We haven't seen any war parties in this area for some time.", "village_elder_pretalk", []], [anyone,"village_elder_tell_enemies", [], "Well, I guess that was all.", "village_elder_pretalk", []], [anyone|plyr,"village_elder_talk", [(call_script, "script_cf_village_recruit_volunteers_cond"),], "Are there any lads from this village who might want to seek their fortune in the wars?", "village_elder_recruit_start",[]], [anyone|plyr,"village_elder_talk", [], "[Leave]", "close_window",[]], [anyone ,"village_elder_buy_cattle", [(party_get_slot, reg5, "$g_encountered_party", slot_village_number_of_cattle), (gt, reg5, 0), (store_item_value, ":cattle_cost", "itm_cattle_meat"), (call_script, "script_game_get_item_buy_price_factor", "itm_cattle_meat"), (val_mul, ":cattle_cost", reg0), #Multiplied by 2 and divided by 100 (val_div, ":cattle_cost", 50), (assign, "$temp", ":cattle_cost"), (assign, reg6, ":cattle_cost"), ], "We have {reg5} heads of cattle, each for {reg6} denars. How many do you want to buy?", "village_elder_buy_cattle_2",[]], [anyone ,"village_elder_buy_cattle", [], "I am afraid we have no cattle left in the village {sir/madam}.", "village_elder_buy_cattle_2",[]], [anyone|plyr,"village_elder_buy_cattle_2", [(party_get_slot, ":num_cattle", "$g_encountered_party", slot_village_number_of_cattle), (ge, ":num_cattle", 1), (store_troop_gold, ":gold", "trp_player"), (ge, ":gold", "$temp"),], "One.", "village_elder_buy_cattle_complete",[(call_script, "script_buy_cattle_from_village", "$g_encountered_party", 1, "$temp"), ]], [anyone|plyr,"village_elder_buy_cattle_2", [(party_get_slot, ":num_cattle", "$g_encountered_party", slot_village_number_of_cattle), (ge, ":num_cattle", 2), (store_troop_gold, ":gold", "trp_player"), (store_mul, ":cost", "$temp", 2), (ge, ":gold", ":cost"),], "Two.", "village_elder_buy_cattle_complete",[(call_script, "script_buy_cattle_from_village", "$g_encountered_party", 2, "$temp"), ]], [anyone|plyr,"village_elder_buy_cattle_2", [(party_get_slot, ":num_cattle", "$g_encountered_party", slot_village_number_of_cattle), (ge, ":num_cattle", 3), (store_troop_gold, ":gold", "trp_player"), (store_mul, ":cost", "$temp", 3), (ge, ":gold", ":cost"),], "Three.", "village_elder_buy_cattle_complete",[(call_script, "script_buy_cattle_from_village", "$g_encountered_party", 3, "$temp"), ]], [anyone|plyr,"village_elder_buy_cattle_2", [(party_get_slot, ":num_cattle", "$g_encountered_party", slot_village_number_of_cattle), (ge, ":num_cattle", 4), (store_troop_gold, ":gold", "trp_player"), (store_mul, ":cost", "$temp", 4), (ge, ":gold", ":cost"),], "Four.", "village_elder_buy_cattle_complete",[(call_script, "script_buy_cattle_from_village", "$g_encountered_party", 4, "$temp"), ]], [anyone|plyr,"village_elder_buy_cattle_2", [(party_get_slot, ":num_cattle", "$g_encountered_party", slot_village_number_of_cattle), (ge, ":num_cattle", 5), (store_troop_gold, ":gold", "trp_player"), (store_mul, ":cost", "$temp", 5), (ge, ":gold", ":cost"),], "Five.", "village_elder_buy_cattle_complete",[(call_script, "script_buy_cattle_from_village", "$g_encountered_party", 5, "$temp"), ]], [anyone|plyr,"village_elder_buy_cattle_2", [], "Forget it.", "village_elder_pretalk",[]], [anyone ,"village_elder_buy_cattle_complete", [], "I will tell the herders to round up the animals and bring them to you, {sir/madam}. I am sure you will be satisfied with your purchase.", "village_elder_pretalk",[]], [anyone ,"village_elder_recruit_start", [(party_slot_eq, "$current_town", slot_center_volunteer_troop_amount, 0)], "I don't think anyone would be interested, {sir/madam}. Is there anything else I can do for you?", "village_elder_talk",[]], [anyone ,"village_elder_recruit_start", [(party_get_slot, ":num_volunteers", "$current_town", slot_center_volunteer_troop_amount), (party_get_free_companions_capacity, ":free_capacity", "p_main_party"), (val_min, ":num_volunteers", ":free_capacity"), (assign, "$temp", ":num_volunteers"), (assign, reg5, ":num_volunteers"), (store_add, reg7, ":num_volunteers", -1), ], "I can think of {reg5} whom I suspect would jump at the chance. If you could pay 10 denars {reg7?each for their equipment:for his equipment}.\ Does that suit you?", "village_elder_recruit_decision",[]], [anyone|plyr,"village_elder_recruit_decision", [(party_slot_eq, "$current_town", slot_center_volunteer_troop_amount, 0)], "So be it.", "village_elder_pretalk",[(party_set_slot, "$current_town", slot_center_volunteer_troop_amount, -1),]], [anyone|plyr,"village_elder_recruit_decision", [(assign, ":num_volunteers", "$temp"), (ge, ":num_volunteers", 1), (store_add, reg7, ":num_volunteers", -1)], "Tell {reg7?them:him} to make ready.", "village_elder_pretalk",[(call_script, "script_village_recruit_volunteers_recruit"),]], [anyone|plyr,"village_elder_recruit_decision", [(party_slot_ge, "$current_town", slot_center_volunteer_troop_amount, 1)], "No, not now.", "village_elder_pretalk",[]], [anyone,"village_elder_active_mission_1", [], "Yes {sir/madam}, have you made any progress on it?", "village_elder_active_mission_2",[]], [anyone|plyr,"village_elder_active_mission_2",[(store_partner_quest,":elder_quest"), (eq, ":elder_quest", "qst_deliver_grain"), (quest_get_slot, ":quest_target_amount", "qst_deliver_grain", slot_quest_target_amount), (call_script, "script_get_troop_item_amount", "trp_player", "itm_grain"), (assign, ":cur_amount", reg0), (ge, ":cur_amount", ":quest_target_amount"), (assign, reg5, ":quest_target_amount"), ], "Indeed. I brought you {reg5} packs of wheat.", "village_elder_deliver_grain_thank", []], [anyone,"village_elder_deliver_grain_thank", [(str_store_party_name, s13, "$current_town")], "My good {lord/lady}. You have saved us from hunger and desperation. We cannot thank you enough, but you'll always be in our prayers.\ The village of {s13} will not forget what you have done for us.", "village_elder_deliver_grain_thank_2", [(quest_get_slot, ":quest_target_amount", "qst_deliver_grain", slot_quest_target_amount), (troop_remove_items, "trp_player", "itm_grain", ":quest_target_amount"), (add_xp_as_reward, 400), (call_script, "script_change_center_prosperity", "$current_town", 4), (call_script, "script_change_player_relation_with_center", "$current_town", 5), (call_script, "script_end_quest", "qst_deliver_grain"), #Troop commentaries begin (call_script, "script_add_log_entry", logent_helped_peasants, "trp_player", "$current_town", -1, -1), #Troop commentaries end ]], [anyone,"village_elder_deliver_grain_thank_2", [], "My good {lord/lady}, please, is there anything I can do for you?", "village_elder_talk",[]], [anyone|plyr,"village_elder_active_mission_2", [], "I am still working on it.", "village_elder_active_mission_3",[]], [anyone|plyr,"village_elder_active_mission_2", [], "I am afraid I won't be able to finish it.", "village_elder_mission_failed",[]], [anyone,"village_elder_active_mission_3", [], "Thank you, {sir/madam}. We are praying for your success everyday.", "village_elder_pretalk",[]], [anyone,"village_elder_mission_failed", [], "Ah, I am sorry to hear that {sir/madam}. I'll try to think of something else.", "village_elder_pretalk", [(store_partner_quest,":elder_quest"), (call_script, "script_abort_quest", ":elder_quest", 1)]], ## ## [anyone,"village_elder_generic_mission_thank", [], ## "You have been so helpful {sir/madam}. I do not know how to thank you.", "village_elder_generic_mission_completed",[]], ## ## [anyone|plyr,"village_elder_generic_mission_completed", [], ## "Speak not of it. I only did what needed to be done.", "village_elder_pretalk",[]], # Currently not needed. ## [anyone|plyr,"village_elder_generic_mission_failed", [], ## "TODO: I'm sorry I failed you sir. It won't happen again.", "village_elder_pretalk", ## [(store_partner_quest,":elder_quest"), ## (call_script, "script_finish_quest", ":elder_quest", 0), ## ]], [anyone,"village_elder_request_mission_ask", [(store_partner_quest,":elder_quest"),(ge,":elder_quest",0)], "Well {sir/madam}, you are already engaged with a task helping us. We cannot ask more from you.", "village_elder_pretalk",[]], [anyone,"village_elder_request_mission_ask", [(troop_slot_eq, "$g_talk_troop", slot_troop_does_not_give_quest, 1)], "No {sir/madam}, We don't have any other tasks for you.", "village_elder_pretalk",[]], [anyone|auto_proceed,"village_elder_request_mission_ask", [], "A task?", "village_elder_tell_mission", [ (call_script, "script_get_random_quest", "$g_talk_troop"), (assign, "$random_quest_no", reg0), ]], [anyone,"village_elder_tell_mission", [(eq,"$random_quest_no","qst_deliver_grain")], "{My good sir/My good lady}, our village has been going through such hardships lately.\ The harvest has been bad, and recently some merciless bandits took away our seed grain that we had reserved for the planting season.\ If we cannot find some grain soon, we will not be able to plant our fields and then we will have nothing to eat for the coming year.\ If you can help us, we would be indebted to you forever.", "village_elder_tell_deliver_grain_mission", [ (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), (str_store_party_name_link,s3,":quest_target_center"), (quest_get_slot, reg5, "$random_quest_no", slot_quest_target_amount), (setup_quest_text,"$random_quest_no"), (str_store_string, s2, "@The elder of the village of {s3} asked you to bring them {reg5} packs of wheat."), ]], [anyone|plyr,"village_elder_tell_deliver_grain_mission", [], "Hmmm. How much grain do you need?", "village_elder_tell_deliver_grain_mission_2",[]], [anyone|plyr,"village_elder_tell_deliver_grain_mission", [], "I can't be bothered with this. Ask help from someone else.", "village_elder_deliver_grain_mission_reject",[]], [anyone,"village_elder_tell_deliver_grain_mission_2", [(quest_get_slot, reg5, "$random_quest_no", slot_quest_target_amount)], "I think {reg5} packs of wheat will let us start the planting. Hopefully, we can find charitable people to help us with the rest.", "village_elder_tell_deliver_grain_mission_3",[]], [anyone|plyr,"village_elder_tell_deliver_grain_mission_3", [], "Then I will go and find you the wheat you need.", "village_elder_deliver_grain_mission_accept",[]], [anyone|plyr,"village_elder_tell_deliver_grain_mission_3", [], "I am afraid I don't have time for this. You'll need to find help elsewhere.", "village_elder_deliver_grain_mission_reject",[]], [anyone,"village_elder_deliver_grain_mission_accept", [], "Thank you, {sir/madam}. We'll be praying for you night and day.", "close_window", [(assign, "$g_leave_encounter",1), (call_script, "script_change_player_relation_with_center", "$current_town", 5), (call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"), ]], [anyone,"village_elder_deliver_grain_mission_reject", [], "Yes {sir/madam}, of course. I am sorry if I have bothered you with our troubles.", "close_window", [(troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1), ]], [anyone,"village_elder_tell_mission", [(eq,"$random_quest_no", "qst_train_peasants_against_bandits")], "We are suffering greatly at the hands of a group of bandits. They take our food and livestock,\ and kill anyone who doesn't obey them immediately. Our men are angry that we cannot defend ourselves, but we are only simple farmers...\ However, with some help, I think that some of the people here could be more than that.\ We just need an experienced warrior to teach us how to fight.", "village_elder_tell_train_peasants_against_bandits_mission", [ (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), (str_store_party_name_link, s13, ":quest_target_center"), (quest_get_slot, reg5, "$random_quest_no", slot_quest_target_amount), (setup_quest_text, "$random_quest_no"), (str_store_string, s2, "@The elder of the village of {s13} asked you to train {reg5} peasants to fight against local bandits."), ]], [anyone|plyr, "village_elder_tell_train_peasants_against_bandits_mission", [], "I can teach you how to defend yourself.", "village_elder_train_peasants_against_bandits_mission_accept",[]], [anyone|plyr, "village_elder_tell_train_peasants_against_bandits_mission", [], "You peasants have no business taking up arms. Just pay the bandits and be off with it.", "village_elder_train_peasants_against_bandits_mission_reject",[]], [anyone,"village_elder_train_peasants_against_bandits_mission_accept", [], "You will? Oh, splendid!\ We would be deeply indebted to you, {sir/madam}.\ I'll instruct the village folk to assemble here and receive your training.\ If you can teach us how to defend ourselves, I promise you'll receive everything we can give you in return for your efforts.", "close_window", [ (assign, "$g_leave_encounter",1), #TODO: Change this value (call_script, "script_change_player_relation_with_center", "$current_town", 3), (call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"), ]], [anyone,"village_elder_train_peasants_against_bandits_mission_reject", [], "Yes, of course {sir/madam}.\ Thank you for your counsel.", "close_window", [ (troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1), ]], [anyone,"village_elder_tell_mission", [(eq,"$random_quest_no","qst_deliver_cattle")], "Bandits have driven away our cattle. Our pastures are empty. If we had just a few heads of cattle we could start to raise a herd again.", "village_elder_tell_deliver_cattle_mission", [ (quest_get_slot, ":quest_target_center", "$random_quest_no", slot_quest_target_center), (str_store_party_name_link,s3,":quest_target_center"), (quest_get_slot, reg5, "$random_quest_no", slot_quest_target_amount), (setup_quest_text,"$random_quest_no"), (str_store_string, s2, "@The elder of the village of {s3} asked you to bring them {reg5} heads of cattle."), ]], [anyone|plyr,"village_elder_tell_deliver_cattle_mission", [], "How many animals do you need?", "village_elder_tell_deliver_cattle_mission_2",[]], [anyone|plyr,"village_elder_tell_deliver_cattle_mission", [], "I don't have time for this. Ask help from someone else.", "village_elder_deliver_cattle_mission_reject",[]], [anyone,"village_elder_tell_deliver_cattle_mission_2", [(quest_get_slot, reg5, "$random_quest_no", slot_quest_target_amount)], "I think {reg5} heads will suffice for a small herd.", "village_elder_tell_deliver_cattle_mission_3",[]], [anyone|plyr,"village_elder_tell_deliver_cattle_mission_3", [], "Then I will bring you the cattle you need.", "village_elder_deliver_cattle_mission_accept",[]], [anyone|plyr,"village_elder_tell_deliver_cattle_mission_3", [], "I am afraid I don't have time for this. You'll need to find help elsewhere.", "village_elder_deliver_cattle_mission_reject",[]], [anyone,"village_elder_deliver_cattle_mission_accept", [], "Thank you, {sir/madam}. We'll be praying for you night and day.", "close_window", [(assign, "$g_leave_encounter",1), (call_script, "script_change_player_relation_with_center", "$current_town", 3), (call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"), ]], [anyone,"village_elder_deliver_cattle_mission_reject", [], "Yes {sir/madam}, of course. I am sorry if I have bothered you with our troubles.", "close_window", [(troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1), ]], [anyone,"village_elder_tell_mission", [], "Thank you, {sir/madam}, but we do not really need anything right now.", "village_elder_pretalk",[]], ## [anyone|plyr,"village_elder_mission_told", [], "TODO: As you wish sir. You can count on me.", "village_elder_mission_accepted",[]], ## [anyone|plyr,"village_elder_mission_told", [], "TODO: I'm afraid I can't carry out this mission right now, sir.", "village_elder_mission_rejected",[]], ## ## [anyone,"village_elder_mission_accepted", [], "TODO: Excellent. Do this {playername}. I really have high hopes for you.", "close_window", ## [(assign, "$g_leave_encounter",1), ## (try_begin), ## #TODO: Add quest initializations here ## (try_end), ## (call_script, "script_start_quest", "$random_quest_no", "$g_talk_troop"), ## ]], ## [anyone,"village_elder_mission_rejected", [], "TODO: Is that so? Perhaps you are not up for the task anyway...", "close_window", ## [(assign, "$g_leave_encounter",1), ## (call_script, "script_change_player_relation_with_troop", "$g_talk_troop", -1), ## (troop_set_slot, "$g_talk_troop", slot_troop_does_not_give_quest, 1), ## ]], #Goods Merchants [anyone ,"start", [(is_between,"$g_talk_troop",goods_merchants_begin,goods_merchants_end), (party_slot_eq, "$current_town", slot_town_lord, "trp_player")], "{My lord/my lady}, you honour my humble shop with your presence.", "goods_merchant_talk",[]], [anyone ,"start", [(is_between,"$g_talk_troop",goods_merchants_begin,goods_merchants_end)], "Welcome {sir/madam}. What can I do for you?", "goods_merchant_talk",[]], # [trp_salt_mine_merchant,"start", [], "Hello.", "goods_merchant_talk",[]], # [anyone,"merchant_begin", [], " What can I do for you?", "goods_merchant_talk",[]], [anyone,"goods_merchant_pretalk", [], "Anything else?", "goods_merchant_talk",[]], [anyone|plyr,"goods_merchant_talk", [], "I want to buy a few items... and perhaps sell some.", "goods_trade_requested",[]], [anyone,"goods_trade_requested", [], "Sure, sure... Here, have a look at my stock...", "goods_trade_completed",[[change_screen_trade]]], [anyone,"goods_trade_completed", [], "Anything else?", "goods_merchant_talk",[]], [anyone|plyr,"goods_merchant_talk", [], "What goods should I buy here to trade with other towns?", "trade_info_request",[]], [anyone|plyr,"goods_merchant_talk", [], "Nothing. Thanks.", "close_window",[]], [anyone,"trade_info_request", [], "That information can be best obtained from caravan masters\ and travelling merchants. If you want I can send you to the district where foreign merchants stay at when they come to the town.\ If you spend some time there and listen to the talk,\ you can learn a lot about what to buy and where to sell it.", "trade_info_request_2",[]], [anyone|plyr,"trade_info_request_2", [], "Then I'll go and spend some time with these merchants.", "close_window", [ (jump_to_menu,"mnu_town_trade_assessment_begin"), (finish_mission), ]], [anyone|plyr,"trade_info_request_2", [], "I have no time for this right now.", "goods_merchant_pretalk",[]], # [anyone|plyr,"goods_merchant_talk", [], "What do caravans buy and sell in this town?", "goods_merchant_town_info",[]], # [anyone,"goods_merchant_town_info_completed", [], "Anything else?", "goods_merchant_talk",[]], ## [anyone,"goods_merchant_town_info", [], ## "TODO: We produce {s1}, and we consume {s2}.", "goods_merchant_town_info_completed", ## [(call_script, "script_print_productions_above_or_below_50", "$g_encountered_party", 1), ## (str_store_string_reg, s1, s51), ## (call_script, "script_print_productions_above_or_below_50", "$g_encountered_party", -1), ## (str_store_string_reg, s2, s51)]], ## ## [anyone,"goods_merchant_town_info", [(store_encountered_party,reg(1)),(eq,reg(1),"p_zendar")], ##"You can buy tools from here at a very good price.\ ## The best place to sell them would be Tulga. Heard they pay quite well for tools over there.\ ## And next time you come here bring some salt. I will pay well for salt.", "goods_merchant_town_info_completed",[]], ## [anyone,"goods_merchant_town_info", [(store_encountered_party,reg(1)),(eq,reg(1),"p_town_1")], ##"Sargoth is famous for its fine linen. Many caravans come here to buy that.\ ## I heard you can sell it at Halmar and make a nice profit.\ ## And next time you come here bring some iron. I will pay well for iron.", "goods_merchant_town_info_completed",[]], ## [anyone,"goods_merchant_town_info", [[store_encountered_party,reg(1)],[eq,reg(1),"p_town_2"]], ##"I can sell you some smoked fish with a special price.\ ## I heard that caravans take smoked fish to Uxkhal and make a good profit.\ ## And next time you come here bring some wool. I will pay you well for wool.", "goods_merchant_town_info_completed",[]], ## [anyone,"goods_merchant_town_info", [[store_encountered_party,reg(1)],[eq,reg(1),"p_town_3"]], ##"I can sell you some wine with a special price.\ ## I heard that caravans buy wine from here and sell it at Wercheg, making a good profit.\ ## And next time you come here, bring some dried meat. I will pay you well for dried meat.", "goods_merchant_town_info_completed",[]], ## [anyone,"goods_merchant_town_info", [[store_encountered_party,reg(1)],[eq,reg(1),"p_town_4"]], ##"I have a stock of oil which I can sell you with a good price.\ ## They say they offer a fortune for oil in Rivacheg, so maybe you can sell it there.\ ## And next time you come here, bring some furs. I will pay you well for furs.", "goods_merchant_town_info_completed",[]], ## [anyone,"goods_merchant_town_info", [[store_encountered_party,reg(1)],[eq,reg(1),"p_town_5"]], ##"Jelkala is famous for its velvet. Many caravans come here to buy that.\ ## They say merchants will buy it at insane prices in Reyvadin, so maybe you can take it there.\ ## And next time you come here, bring some pottery. I will pay you well for pottery.", "goods_merchant_town_info_completed",[]], ## [anyone,"goods_merchant_town_info", [[store_encountered_party,reg(1)],[eq,reg(1),"p_town_6"]], ##"We produce some excellent ale here in Praven. Most caravans come here to buy that.\ ## They say that the folks at Khudan will sell their right arms for ale, so maybe you can take it there.\ ## And next time you come here, bring some spice. I have sold out my stock of spice and I will pay you well for it.", "goods_merchant_town_info_completed",[]], ## [anyone,"goods_merchant_town_info", [[store_encountered_party,reg(1)],[eq,reg(1),"p_town_7"]], ##"We produce mostly wheat here in Uxkhal. I would suggest you buy that.\ ## I heard you can sell it with a good profit in Tulga, so maybe you can take it there.\ ## And next time you come here, bring some smoked fish. I will pay you well for it.", "goods_merchant_town_info_completed",[]], ## ## [anyone,"goods_merchant_town_info", [[store_encountered_party,reg(1)],[eq,reg(1),"p_town_8"]], ##"Most caravans come to Reyvadin to buy wool.\ ## I heard that they take it to Tihr where they pay well for wool.\ ## And next time you come here, bring some velvet. I will buy it from you at a good price.", "goods_merchant_town_info_completed",[]], ## [anyone,"goods_merchant_town_info", [[store_encountered_party,reg(1)],[eq,reg(1),"p_town_9"]], ##"Most caravans come to Khudan to buy furs.\ ## I heard that they take it to Suno where they pay well for it.\ ## And next time you come here, bring some ale. I will buy it from you at a good price.", "goods_merchant_town_info_completed",[]], ## [anyone,"goods_merchant_town_info", [[store_encountered_party,reg(1)],[eq,reg(1),"p_town_10"]], ##"Most caravans come to Tulga to buy spice.\ ## They say that in Praven they pay well for spice, so you may think of selling it to the mechants there.\ ## And next time you come here, bring some wheat. I will buy it from you at a good price.", "goods_merchant_town_info_completed",[]], ## [anyone,"goods_merchant_town_info", [[store_encountered_party,reg(1)],[eq,reg(1),"p_town_11"]], ##"We mine a lot of iron here in Curaw. I would suggest you buy that.\ ## I heard you can take it to Sargoth and sell it with a good profit.\ ## And next time you come here, bring some dried meat. I will pay you well for it.", "goods_merchant_town_info_completed",[]], ## [anyone,"goods_merchant_town_info", [[store_encountered_party,reg(1)],[eq,reg(1),"p_town_12"]], ##"I can sell you some smoked fish with a special price.\ ## I heard that caravans take smoked fish to Uxkhal and make a good profit.\ ## And next time you come here bring some wine. I will pay you well for wine.", "goods_merchant_town_info_completed",[]], ## [anyone,"goods_merchant_town_info", [[store_encountered_party,reg(1)],[eq,reg(1),"p_town_13"]], ##"I have a stock of dried meat which I can sell you with a good price.\ ## They say they pay very well for dried meat in Veluca, so maybe you can sell it there.\ ## And next time you come here, bring some oil. I have sold out my stock of oil and I will pay you well for it.", "goods_merchant_town_info_completed",[]], ## [anyone,"goods_merchant_town_info", [[store_encountered_party,reg(1)],[eq,reg(1),"p_town_14"]], ##"We produce some good quality pottery here in Halmar. Most caravans come here to buy that.\ ## I heard that caravans buy pottery from here and sell it at Jelkala, making a good profit.\ ## And next time you come here, bring some linen. I have sold out my stock of linen and I will pay you well for it.", "goods_merchant_town_info_completed",[]], ## ## [anyone,"goods_merchant_town_info", [[store_encountered_party,reg(1)],[eq,reg(1),"p_salt_mine"]], ##"Heh. Are you joking with me? This is the salt mine. Merchants come here to buy salt.", "goods_merchant_town_info_completed",[]], ## ## [anyone,"goods_merchant_town_info", [ ## (store_encountered_party,reg(9)), ## (party_get_slot,reg(5),reg(9),slot_town_export_good), ## (party_get_slot,reg(6),reg(9),slot_town_import_good), ## (ge,reg(5),1), ## (ge,reg(6),1), ## (str_store_item_name,1,reg(5)), ## (str_store_item_name,2,reg(6)), ## ], ## "I can sell you some {s1} with a special price.\ ##And next time you come here bring some {s2}. I will pay you well for that.", "goods_merchant_town_info_completed",[]], ## ## [anyone,"goods_merchant_town_info", [ ## (store_encountered_party,reg(9)), ## (party_get_slot,reg(5),reg(9),slot_town_export_good), ## (ge,reg(5),1), ## (str_store_item_name,1,reg(5)), ## ], ## "I can sell you some {s1} with a special price.", "goods_merchant_town_info_completed",[]], ## ## [anyone,"goods_merchant_town_info", [ ## (store_encountered_party,reg(9)), ## (party_get_slot,reg(6),reg(9),slot_town_import_good), ## (ge,reg(6),1), ## (str_store_item_name,2,reg(6)), ## ], ## "If you have some {s2} with you, I am ready to pay you good money for it.", "goods_merchant_town_info_completed",[]], ## ## [anyone,"goods_merchant_town_info", [], ##"Sorry. Caravans hardly ever trade anything here.", "goods_merchant_town_info_completed",[]], ############################################################################# #### ARENA MASTERS ############################################################################# [anyone ,"start", [(store_conversation_troop,reg(1)), (is_between,reg(1),arena_masters_begin,arena_masters_end), (assign, "$arena_reward_asked", 0), #set some variables. (assign, "$arena_tournaments_asked", 0), (eq,1,0), ], ".", "arena_intro_1",[]], [anyone ,"start", [(store_conversation_troop,reg(1)), (is_between,reg(1),arena_masters_begin,arena_masters_end), (eq,"$arena_master_first_talk", 0), ], "Good day friend. If you came to watch the tournaments you came in vain. There won't be a tournament here anytime soon.", "arena_intro_1",[(assign,"$arena_master_first_talk", 1)]], [anyone|plyr,"arena_intro_1", [], "Tournaments? So they hold the tournaments here...", "arena_intro_2",[]], [anyone,"arena_intro_2", [], "Yes. You should see this place during one of the tournament fights.\ Everyone from the town and nearby villages comes here. The crowd becomes mad with excitement.\ Anyway, as I said, there won't be an event here soon, so there isn't much to see.\ Except, there is an official duel every now and then, and of course we have melee fights almost every day.", "arena_intro_3",[]], [anyone|plyr,"arena_intro_3", [], "Tell me about the melee fights.", "arena_training_melee_intro",[]], [anyone,"arena_training_melee_intro", [], "The fighters and knights get bored waiting for the next tournament,\ so they have invented the training melee. It is a simple idea really.\ Fighters jump into the arena with a weapon. There are no rules, no teams.\ Everyone beats at each other until there is only fighter left standing.\ Sounds like fun, eh?", "arena_training_melee_intro_2",[]], [anyone|plyr,"arena_training_melee_intro_2", [(eq, "$arena_reward_asked", 0)], "Is there a reward?", "arena_training_melee_intro_reward",[(assign, "$arena_reward_asked", 1)]], [anyone,"arena_training_melee_intro_reward", [(assign, reg1, arena_tier1_opponents_to_beat),(assign, reg11, arena_tier1_prize), (assign, reg2, arena_tier2_opponents_to_beat),(assign, reg12, arena_tier2_prize), (assign, reg3, arena_tier3_opponents_to_beat),(assign, reg13, arena_tier3_prize), (assign, reg4, arena_tier4_opponents_to_beat),(assign, reg14, arena_tier4_prize), (assign, reg15, arena_grand_prize) ], "There is, actually. Some of the wealthy townsmen offer prizes for those fighters who show great skill in the fights.\ If you can beat {reg1} opponents before going down, you'll earn {reg11} denars. You'll get {reg12} denars for striking down at least {reg2} opponents,\ {reg13} denars if you can defeat {reg3} opponents, and {reg14} denars if you can survive long enough to beat {reg4} opponents.\ If you can manage to be the last {man/fighter} standing, you'll earn the great prize of the fights, {reg15} denars. Sounds good, eh?", "arena_training_melee_intro_2",[(assign, "$arena_tournaments_asked", 1),]], [anyone,"arena_training_melee_explain_reward", [ (assign, reg1, arena_tier1_opponents_to_beat),(assign, reg11, arena_tier1_prize), (assign, reg2, arena_tier2_opponents_to_beat),(assign, reg12, arena_tier2_prize), (assign, reg3, arena_tier3_opponents_to_beat),(assign, reg13, arena_tier3_prize), (assign, reg4, arena_tier4_opponents_to_beat),(assign, reg14, arena_tier4_prize), (assign, reg15, arena_grand_prize) ], "Some of the wealthy townsmen offer prizes for those fighters who show great skill in the fights.\ If you can beat {reg1} opponents before going down, you'll earn {reg11} denars. You'll get {reg12} denars for striking down at least {reg2} opponents,\ {reg13} denars if you can defeat {reg3} opponents, and {reg14} denars if you can survive long enough to beat {reg4} opponents.\ If you can manage to be the last {man/fighter} standing, you'll earn the great prize of the fights, {reg15} denars. Sounds good, eh?", "arena_master_melee_pretalk",[]], [anyone|plyr,"arena_training_melee_intro_2", [], "Can I join too?", "arena_training_melee_intro_3",[]], [anyone,"arena_training_melee_intro_3", [], "Ha ha. You would have to be out of your mind not to. Of course. The melee fights are open to all.\ Actually there is going to be a fight soon. You can go and hop in if you want to.", "arena_master_melee_talk",[]], [anyone ,"start", [(store_conversation_troop,reg(1)), (is_between,reg(1),arena_masters_begin,arena_masters_end), (eq,"$g_talk_troop_met", 0), ], "Hello. You seem to be new here. Care to share your name?", "arena_master_intro_1",[]], [anyone|plyr,"arena_master_intro_1", [], "I am {playername}.", "arena_master_intro_2",[]], [anyone,"arena_master_intro_2", [(store_encountered_party,reg(2)),(str_store_party_name,1,reg(2))], "Well met {playername}. I am the master of the tournaments here at {s1}. Talk to me if you want to join the fights.", "arena_master_pre_talk",[]], [anyone|auto_proceed ,"start", [(store_conversation_troop,reg(1)),(is_between,reg(1),arena_masters_begin,arena_masters_end), (eq, "$last_training_fight_town", "$current_town"), (store_current_hours,":cur_hours"), (val_add, ":cur_hours", -4), (lt, ":cur_hours", "$training_fight_time")], ".", "arena_master_fight_result",[(assign, "$arena_reward_asked", 0)]], [anyone ,"arena_master_fight_result", [ (eq, "$g_arena_training_won", 0), (eq, "$g_arena_training_kills", 0) ], "Ha-ha, that's quite the bruise you're sporting. But don't worry; everybody gets trounced once in awhile. The important thing is to pick yourself up, dust yourself off and keep fighting. That's what champions do.", "arena_master_pre_talk",[(assign, "$last_training_fight_town", -1)]], [anyone ,"arena_master_fight_result", [ (eq, "$g_arena_training_won", 0), (lt, "$g_arena_training_kills", arena_tier1_opponents_to_beat), (assign, reg8, "$g_arena_training_kills") ], "Hey, you managed to take down {reg8} opponents. Not bad. But that won't bring you any prize money.\ Now, if I were you, I would go back there and show everyone what I can do...", "arena_master_pre_talk",[(assign, "$last_training_fight_town", -1)]], [anyone ,"arena_master_fight_result", [ (eq, "$g_arena_training_won", 0), (lt, "$g_arena_training_kills", arena_tier2_opponents_to_beat), (assign, reg8, "$g_arena_training_kills"), (assign, reg10, arena_tier1_prize), ], "You put up quite a good fight there. Good moves. You definitely show promise.\ And you earned a prize of {reg10} denars for knocking down {reg8} opponents.", "arena_master_pre_talk",[ (call_script, "script_troop_add_gold", "trp_player",arena_tier1_prize), (add_xp_to_troop,5,"trp_player"), (assign, "$last_training_fight_town", -1)]], [anyone ,"arena_master_fight_result", [ (eq, "$g_arena_training_won", 0), (lt, "$g_arena_training_kills", arena_tier3_opponents_to_beat), (assign, reg8, "$g_arena_training_kills"), (assign, reg10, arena_tier2_prize), (assign, reg12, arena_tier2_opponents_to_beat), ], "That was a good fight you put up there. You managed to take down no less than {reg8} opponents.\ And of course, you earned a prize money of {reg10} denars.", "arena_master_pre_talk",[ (call_script, "script_troop_add_gold", "trp_player",arena_tier2_prize), (add_xp_to_troop,10,"trp_player"), (assign, "$last_training_fight_town", -1)]], [anyone ,"arena_master_fight_result", [ (eq, "$g_arena_training_won", 0), (lt, "$g_arena_training_kills", arena_tier4_opponents_to_beat), (assign, reg8, "$g_arena_training_kills"), (assign, reg10, arena_tier3_prize) ], "Your performance was amazing! You are without doubt a very skilled fighter.\ Not everyone can knock down {reg8} people in the fights. Of course you deserve a prize with that performance: {reg10} denars. Nice, eh?", "arena_master_pre_talk",[ (call_script, "script_troop_add_gold", "trp_player",arena_tier3_prize), (add_xp_to_troop,10,"trp_player"), (assign, "$last_training_fight_town", -1)]], [anyone ,"arena_master_fight_result", [ (eq, "$g_arena_training_won", 0), (assign, reg8, "$g_arena_training_kills"), (assign, reg10, arena_tier4_prize), ], "That was damned good fighting, {playername}. You have very good moves, excellent tactics.\ And you earned a prize of {reg10} denars for knocking down {reg8} opponents.", "arena_master_pre_talk", [ (call_script, "script_troop_add_gold", "trp_player",arena_tier4_prize), (add_xp_to_troop,10,"trp_player"), (assign, "$last_training_fight_town", -1), ]], [anyone ,"arena_master_fight_result", [(assign, reg10, arena_grand_prize)], "Congratulations champion! Your fight there was something to remember! You managed to be the last fighter standing beating down everyone else. And of course you won the grand prize of the fights: {reg10} denars.", "arena_master_pre_talk",[ (call_script, "script_troop_add_gold", "trp_player",arena_grand_prize), (add_xp_to_troop,200,"trp_player"), (assign, "$last_training_fight_town", -1)]], [anyone ,"start", [(store_conversation_troop,reg(1)),(is_between,reg(1),arena_masters_begin,arena_masters_end)], "Hello {playername}. Good to see you again.", "arena_master_pre_talk",[(assign, "$arena_reward_asked", 0)]], [anyone,"arena_master_pre_talk", [], "What would you like to do?", "arena_master_talk",[]], # [anyone|plyr,"arena_master_talk", [], "About the arena fights...", "arena_master_melee",[]], [anyone|plyr,"arena_master_talk", [], "About the melee fights...", "arena_master_melee_pretalk",[]], [anyone|plyr,"arena_master_talk", [(eq, "$arena_tournaments_asked", 0)], "Will there be a tournament in nearby towns soon?", "arena_master_ask_tournaments",[(assign, "$arena_tournaments_asked", 1)]], [anyone|plyr,"arena_master_talk", [], "I need to leave now. Good bye.", "close_window",[]], [anyone,"arena_master_ask_tournaments", [], "{reg2?There won't be any tournaments any time soon.:{reg1?Tournaments are:A tournament is} going to be held at {s15}.}", "arena_master_talk", [ (assign, ":num_tournaments", 0), (try_for_range_backwards, ":town_no", towns_begin, towns_end), (party_slot_ge, ":town_no", slot_town_has_tournament, 1), (val_add, ":num_tournaments", 1), (try_begin), (eq, ":num_tournaments", 1), (str_store_party_name, s15, ":town_no"), (else_try), (str_store_party_name, s16, ":town_no"), (eq, ":num_tournaments", 2), (str_store_string, s15, "@{s16} and {s15}"), (else_try), (str_store_string, s15, "@{s16}, {s15}"), (try_end), (try_end), (try_begin), (eq, ":num_tournaments", 0), (assign, reg2, 1), (else_try), (assign, reg2, 0), (store_sub, reg1, ":num_tournaments", 1), (try_end), ]], [anyone,"arena_master_melee_pretalk", [], "There will be a fight here soon. You can go and jump in if you like.", "arena_master_melee_talk",[]], [anyone|plyr,"arena_master_melee_talk", [], "Good. That's what I am going to do.", "close_window", [ (assign, "$last_training_fight_town", "$current_town"), (store_current_hours,"$training_fight_time"), (assign, "$g_mt_mode", abm_training), (party_get_slot, ":scene","$current_town",slot_town_arena), (modify_visitors_at_site,":scene"), (reset_visitors), (store_random_in_range, "$g_player_entry_point", 32, 40), (set_visitor, "$g_player_entry_point", "trp_player"), (set_jump_mission,"mt_arena_melee_fight"), (jump_to_scene, ":scene"), ]], [anyone|plyr,"arena_master_melee_talk", [], "Thanks. But I will give my bruises some time to heal.", "arena_master_melee_reject",[]], [anyone,"arena_master_melee_reject", [], "Good {man/girl}. That's clever of you.", "arena_master_pre_talk",[]], [anyone|plyr,"arena_master_melee_talk", [(eq, "$arena_reward_asked", 0)], "Actually, can you tell me about the rewards again?", "arena_training_melee_explain_reward",[(assign, "$arena_reward_asked", 1)]], # [anyone,"arena_master_pre_talk", # [(eq,"$arena_join_or_watch",1), # (ge,"$arena_bet_amount",1), # (eq,"$arena_bet_team","$arena_winner_team"), # (assign,reg(5),"$arena_win_amount")], # "You've won the bet, eh? Let me see. The sum you have earned amounts to {reg5} denars. Here you go.", "arena_master_pre_talk", # [(call_script, "script_troop_add_gold", "trp_player","$arena_win_amount"), # (assign,"$arena_bet_amount",0), # (assign,"$arena_win_amount",0), # ]], # [anyone,"arena_master_pre_talk", # [(eq,"$arena_join_or_watch",0), # (ge,"$arena_bet_amount",1), # (eq,"$arena_fight_won",1), # (assign,reg(5),"$arena_win_amount"), # ], # "And you had the good sense to bet on yourself too. Hmm let me see. You have won yourself some {reg5} denars. Here you are.", "arena_master_pre_talk", # [(call_script, "script_troop_add_gold", "trp_player","$arena_win_amount"), # (assign,"$arena_bet_amount",0), # (assign,"$arena_win_amount",0)]], # [anyone,"start", [(store_conversation_troop,reg(1)),(is_between,reg(1),arena_masters_begin,arena_masters_end),(eq,"$waiting_for_arena_fight_result",1),(eq,"$arena_join_or_watch",0),(eq,"$arena_fight_won",1)], # "Congratulations champion. You made some pretty good moves out there. Here is your share of share of the prize money, 2 denars.", "arena_master_pre_talk", # [(assign,"$waiting_for_arena_fight_result",0),(add_xp_to_troop,20,"trp_player"),(call_script, "script_troop_add_gold", "trp_player",2)]], # [anyone,"start", [(store_conversation_troop,reg(1)),(is_between,reg(1),arena_masters_begin,arena_masters_end),(eq,"$waiting_for_arena_fight_result",1),(eq,"$arena_join_or_watch",0)], # "That's quite the bruise you're sporting. But don't worry; everybody gets trounced once in awhile. The important thing is to pick yourself up, dust yourself off and keep fighting. That's what champions do.", "arena_master_pre_talk",[[assign,"$waiting_for_arena_fight_result"]]], # [anyone,"start", [(store_conversation_troop,reg(1)),(is_between,reg(1),arena_masters_begin,arena_masters_end),(eq,"$waiting_for_arena_fight_result",1)], # "That was exciting wasn't it? Nothing like a good fight to get the blood flowing.", "arena_master_pre_talk",[(assign,"$waiting_for_arena_fight_result",0)]], ## [anyone,"arena_master_melee", [], "The next arena fight will start in a while. Hurry up if you want to take part in it.", "arena_master_melee_talk",[ ## (party_get_slot, ":arena_cur_tier","$current_town",slot_town_arena_melee_cur_tier), ## (try_begin), #reg3 = num teams, reg4 = team size ## (eq, ":arena_cur_tier", 0), ## (party_get_slot, "$_num_teams","$current_town",slot_town_arena_melee_1_num_teams), ## (party_get_slot, "$_team_size","$current_town",slot_town_arena_melee_1_team_size), ## (else_try), ## (eq, ":arena_cur_tier", 1), ## (party_get_slot, "$_num_teams","$current_town",slot_town_arena_melee_2_num_teams), ## (party_get_slot, "$_team_size","$current_town",slot_town_arena_melee_2_team_size), ## (else_try), ## (party_get_slot, "$_num_teams","$current_town",slot_town_arena_melee_3_num_teams), ## (party_get_slot, "$_team_size","$current_town",slot_town_arena_melee_3_team_size), ## (try_end), ## ]], ## [anyone|plyr,"arena_master_melee_talk", [], "I want to join the next fight", "arena_master_next_melee_join",[(assign,"$arena_join_or_watch",0)]], ## [anyone|plyr,"arena_master_melee_talk", [], "I would like to watch the next fight", "arena_master_next_melee_watch", ## [(assign,"$arena_join_or_watch",1)]], ## [anyone|plyr,"arena_master_melee_talk", [], "No. perhaps later.", "arena_master_we_will_fight_not",[]], ## [anyone,"arena_master_we_will_fight_not", [], "Alright. Talk to me when you are ready.", "close_window",[]], ## [anyone,"arena_master_next_melee_join", [ ## (assign,"$arena_bet_amount"), ## (assign,"$arena_bet_team",0), ## (party_get_slot, ":player_odds", "$g_encountered_party", slot_town_player_odds), ## (store_div, ":divider", ":player_odds", 20), ## (store_mul, ":odds_simple", ":divider", 20), ## (val_sub, ":odds_simple", ":player_odds"), ## (try_begin), ## (lt, ":odds_simple", 0), ## (val_add, ":divider", 1), ## (try_end), ## (val_max, ":divider", 50), ## (store_div, ":odds_player", ":player_odds", ":divider"), ## (store_div, ":odds_other", 1000, ":divider"), ## (try_for_range, ":unused", 0, 5), ## (assign, ":last_divider", 21), ## (try_for_range, ":cur_divider", 2, ":last_divider"), ## (store_div, ":odds_player_test", ":odds_player", ":cur_divider"), ## (val_mul, ":odds_player_test", ":cur_divider"), ## (eq, ":odds_player_test", ":odds_player"), ## (store_div, ":odds_other_test", ":odds_other", ":cur_divider"), ## (val_mul, ":odds_other_test", ":cur_divider"), ## (eq, ":odds_other_test", ":odds_other"), ## (val_div, ":odds_player", ":cur_divider"), ## (val_div, ":odds_other", ":cur_divider"), ## (assign, ":last_divider", 0), ## (try_end), ## (try_end), ## (assign, reg5, ":odds_player"), ## (assign, reg6, ":odds_other"),], "Do you want to place a bet on yourself? The odds against you are {reg5} to {reg6}.", "arena_master_will_you_bet", ## []], ## ## [anyone|plyr,"arena_master_will_you_bet", [], "No.", "arena_master_start_fight",[]], ## [anyone|plyr,"arena_master_will_you_bet", [(store_troop_gold,reg(0)),(ge,reg(0),10)], "I want to bet 10 denars.", ## "arena_master_bet_placed",[(assign,"$arena_bet_amount",10),(troop_remove_gold, "trp_player",10)]], ## [anyone|plyr,"arena_master_will_you_bet", [(store_troop_gold,reg(0)),(ge,reg(0),50)], "I want to bet 50 denars.", ## "arena_master_bet_placed",[(assign,"$arena_bet_amount",50),(troop_remove_gold, "trp_player",50)]], ## [anyone|plyr,"arena_master_will_you_bet", [(store_troop_gold,reg(0)),(ge,reg(0),100)], "I want to bet 100 denars.", ## "arena_master_bet_placed",[(assign,"$arena_bet_amount",100),(troop_remove_gold, "trp_player",100)]], ## [anyone,"arena_master_next_melee_watch", [], "Do you want to place a bet?", "arena_master_will_you_bet",[]], ## [anyone,"arena_master_bet_placed", [(eq,"$arena_join_or_watch",1)], "Hmm. That's good. If you win, you'll get {reg5} denars. And which team do you want to place your bet on?", "arena_master_select_team", ## [(store_mul, "$arena_win_amount", "$arena_bet_amount", "$_num_teams"), ## (val_mul, "$arena_win_amount", 9), ## (val_div, "$arena_win_amount", 10), ## (assign, reg5, "$arena_win_amount"), ## ]], ## [anyone|plyr,"arena_master_select_team", [], "The red team. I have a feeling they will win this one.", ## "arena_master_start_fight",[(assign,"$arena_bet_team",0)]], ## [anyone|plyr,"arena_master_select_team", [], "The blue team. They will sweep the ground with the reds.", ## "arena_master_start_fight",[(assign,"$arena_bet_team",1)]], ## [anyone|plyr,"arena_master_select_team", [(ge,"$_num_teams",3)], "The green team. My money is on them this time.", ## "arena_master_start_fight",[(assign,"$arena_bet_team",2)]], ## [anyone|plyr,"arena_master_select_team", [(ge,"$_num_teams",4)], "The yellow team. They will be victorious.", ## "arena_master_start_fight",[(assign,"$arena_bet_team",3)]], ## [anyone,"arena_master_bet_placed", [], "That's good. Let me record that. If you win, you'll get {reg5} denars.", "arena_master_start_fight", ## [(store_mul,"$arena_win_amount", "$arena_bet_amount", "$_num_teams"), ## (party_get_slot, ":player_odds", "$g_encountered_party", slot_town_player_odds), ## (val_sub, "$arena_win_amount", "$arena_bet_amount"), ## (val_mul, "$arena_win_amount", ":player_odds"), ## (val_div, "$arena_win_amount", 1000), ## (val_add, "$arena_win_amount", "$arena_bet_amount"), ## (val_mul, "$arena_win_amount", 9), ## (val_div, "$arena_win_amount", 10), ## (assign, reg5, "$arena_win_amount"), ## ]], ## ## [anyone,"arena_master_start_fight", [], "Very well. The fight starts in a moment. Good luck.", "close_window", ## [ ## (store_encountered_party,"$current_town"), ## (party_get_slot, ":arena_scene","$current_town",slot_town_arena), ## (modify_visitors_at_site,":arena_scene"), ## (reset_visitors), ## ## #Assemble participants ## (assign, ":slot_no", 0), ## (troop_set_slot, "trp_temp_array_a", ":slot_no", "trp_xerina"), ## (val_add, ":slot_no", 1), ## (troop_set_slot, "trp_temp_array_a", ":slot_no", "trp_dranton"), ## (val_add, ":slot_no", 1), ## (troop_set_slot, "trp_temp_array_a", ":slot_no", "trp_kradus"), ## (val_add, ":slot_no", 1), ## (try_for_range, reg(4), 0, 10), ## (lt, ":slot_no", 48), ## (troop_set_slot, "trp_temp_array_a", ":slot_no", "trp_regular_fighter"), ## (val_add, ":slot_no", 1), ## (try_end), ## (try_for_range, reg(4), 0, 10), ## (lt, ":slot_no", 48), ## (troop_set_slot, "trp_temp_array_a", ":slot_no", "trp_veteran_fighter"), ## (val_add, ":slot_no", 1), ## (try_end), ## (try_for_range, reg(4), 0, 10), ## (lt, ":slot_no", 48), ## (troop_set_slot, "trp_temp_array_a", ":slot_no", "trp_champion_fighter"), ## (val_add, ":slot_no", 1), ## (try_end), ## (try_for_range, reg(4), 0, 5), ## (lt, ":slot_no", 48), ## (troop_set_slot, "trp_temp_array_a", ":slot_no", "trp_sword_sister"), ## (val_add, ":slot_no", 1), ## (try_end), ## (try_for_range, reg(4), 0, 10), ## (lt, ":slot_no", 48), ## (troop_set_slot, "trp_temp_array_a", ":slot_no", "trp_hired_blade"), ## (val_add, ":slot_no", 1), ## (try_end), ## (try_for_range, reg(4), 0, 10), ## (lt, ":slot_no", 48), ## (troop_set_slot, "trp_temp_array_a", ":slot_no", "trp_mercenary"), ## (val_add, ":slot_no", 1), ## (try_end), ## (assign, "$pin_troop", "trp_temp_array_a"), ## (call_script, "script_shuffle_troop_slots", 0, 48), ## ## (try_for_range, reg(12), 0, 48), ## (troop_set_slot, "trp_temp_array_b", reg(12),reg(12)), #Initialize temp_array_b such that temp_array_b[i] = i ## (try_end), ## ## (store_random_in_range, "$arena_player_team", 0, "$_num_teams"), ## (try_for_range, ":i_team", 0, "$_num_teams"), # repeat for num_teams; reg(55) = cur_team ## (assign, ":team_slots_start", ":i_team"), ## (val_mul, ":team_slots_start", 8), ## (assign, ":team_slots_end", ":team_slots_start"), ## (val_add, ":team_slots_end", 8), ## (assign, "$pin_troop", "trp_temp_array_b"), ## (call_script, "script_shuffle_troop_slots", ":team_slots_start", ":team_slots_end"), ## (assign, ":cur_slot", ":team_slots_start"), ## (try_for_range, reg(6), 0, "$_team_size"), # repeat for team_size; ## (troop_get_slot, ":cur_slot_troop", "trp_temp_array_a", ":cur_slot"), ## (try_begin), #place player ## (eq,"$arena_join_or_watch",0), ## (eq, ":i_team", "$arena_player_team"), ## (eq, reg(6), 0), ## (assign, ":cur_slot_troop", "trp_player"), ## (try_end), ## (troop_get_slot, ":cur_entry_no", "trp_temp_array_b", ":cur_slot"), ## (set_visitor,":cur_entry_no",":cur_slot_troop"), ## (val_add, ":cur_slot", 1), ## (try_end), ## (try_end), ## ## (try_begin), ## (eq, "$arena_join_or_watch", 1), ## (set_visitor, 33, "trp_player"),#entry point 51 ## (try_end), ## (assign, "$arena_fight_won", 0), ## (assign, "$arena_winner_team", -1), ## (assign, "$waiting_for_arena_fight_result", 1), ## (assign, "$g_mt_mode", abm_fight), ## (party_get_slot, reg(6),"$current_town",slot_town_arena_melee_cur_tier), ## (val_add,reg(6),1), ## (val_mod,reg(6),3), ## (party_set_slot, "$current_town",slot_town_arena_melee_cur_tier, reg(6)), ### (set_jump_mission,"mt_arena_melee_fight"), ## (party_get_slot, ":arena_mission_template", "$current_town", slot_town_arena_template), ## (set_jump_mission, ":arena_mission_template"), ## (party_get_slot, reg(7), "$current_town", slot_town_arena), ## (jump_to_scene, reg(7)), ## ]], ###################################################################################### [trp_galeas,"start", [], "Hello {boy/girl}. If you have any prisoners, I will be happy to buy them from you.", "galeas_talk",[]], [trp_galeas|plyr,"galeas_talk", [[store_num_regular_prisoners,reg(0)],[ge,reg(0),1]], "Then you'd better bring your purse. I have got prisoners to sell.", "galeas_sell_prisoners",[]], [trp_galeas|plyr,"galeas_talk",[], "Not this time. Good-bye.", "close_window",[]], [trp_galeas,"galeas_sell_prisoners", [], "Let me see what you have...", "galeas_sell_prisoners_2", [[change_screen_trade_prisoners]]], [trp_galeas, "galeas_sell_prisoners_2", [], "You take more prisoners, bring them to me. I will pay well.", "close_window",[]], ## [party_tpl|pt_refugees,"start", [], "We have been driven out of our homes because of this war.", "close_window",[(assign, "$g_leave_encounter",1)]], ## [party_tpl|pt_farmers,"start", [], "We are just simple farmers.", "close_window",[(assign, "$g_leave_encounter",1)]], # Random Quest related conversations # [trp_nobleman, "start", [], # "Who are you? What do you want? Be warned, we are fully armed and more than capable to defend ourselves. Go to your way now or you will regret it.", "nobleman_talk_1", # [(play_sound,"snd_encounter_nobleman")]], # [trp_nobleman|plyr, "nobleman_talk_1", [], # "I demand that you surrender to me.", "nobleman_talk_2",[]], # [trp_nobleman|plyr, "nobleman_talk_1", [], # "I am sorry sir. You may go.", "close_window",[(assign, "$g_leave_encounter",1)]], # [trp_nobleman, "nobleman_talk_2", [], # "Surrender to a puny peasant like you? Hah. Not likely.", "close_window",[[encounter_attack]]], # # [trp_nobleman,"enemy_defeated", [], "Parley! I am of noble birth, and I ask for my right to surrender.", "nobleman_defeated_1",[]], # [trp_nobleman|plyr,"nobleman_defeated_1", [], "And I will grant you that. If you can be ransomed of course...", "nobleman_defeated_2",[]], # [trp_nobleman,"nobleman_defeated_2", [], "Oh, you need not worry about that. My family would pay a large ransom for me.", "nobleman_defeated_3",[]], # [trp_nobleman|plyr,"nobleman_defeated_3", [[str_store_troop_name,1,"$nobleman_quest_giver"]], "Hmm. {s1} will be happy about this... Then you are my prisoner.", "close_window", # [[assign,"$nobleman_quest_succeeded",1],[assign,"$nobleman_quest_nobleman_active",0]]], # Prisoner Trains ## [anyone,"start", [(eq,"$g_encountered_party_type",spt_prisoner_train)], ## "What do you want?", "prisoner_train_talk",[]], ## ## [anyone|plyr,"prisoner_train_talk", [], ## "Set those prisoners free now!", "prisoner_train_talk_ultimatum",[]], ## [anyone,"prisoner_train_talk_ultimatum", [], ## "Or what? Are you going to attack us?", "prisoner_train_talk_ultimatum_2",[]], ## [anyone|plyr,"prisoner_train_talk_ultimatum_2", [], ## "Yes I will. Consider yourself warned!", "prisoner_train_talk_ultimatum_2a",[]], ## [anyone,"prisoner_train_talk_ultimatum_2a", [], ## "We'll see that.", "close_window",[ ## (call_script, "script_make_kingdom_hostile_to_player", "$g_encountered_party_faction", -3), ## ]], ## ## [anyone|plyr,"prisoner_train_talk_ultimatum_2", [], ## "Attack you? Hell no! I just took pity on those poor souls.", "prisoner_train_talk_ultimatum_2b",[]], ## [anyone,"prisoner_train_talk_ultimatum_2b", [], ## "Find something else to take pity on.", "close_window",[(assign, "$g_leave_encounter",1)]], ## [anyone|plyr,"prisoner_train_talk", [], ## "Better watch those prisoners well. They may try to run away.", "prisoner_train_smalltalk",[]], ## [anyone,"prisoner_train_smalltalk", [], ## "Don't worry. They aren't going anywhere.", "close_window",[(assign, "$g_leave_encounter",1)]], ## [anyone,"start", [(eq, "$g_encountered_party_type", spt_forager), (is_between, "$g_encountered_party_relation", -9, 1)], ## "Hold it right there. Who are you?", "soldiers_interrogation",[(play_sound,"snd_encounter_vaegirs_neutral")]], ## [anyone,"start", [(eq, "$g_encountered_party_type", spt_forager), (le, "$g_encountered_party_relation", -10)], ## "You will not survive this!", "close_window", ## [(store_relation, reg(5),"$g_encountered_party_faction"), (val_sub,reg(5),1), (set_relation,"$g_encountered_party_faction",0,reg(5)),(encounter_attack,0)]], ## [anyone,"start", [(eq, "$g_encountered_party_type", spt_forager),(ge, "$g_encountered_party_relation", 1)], ## "Our lands have been invaded. But we will drive them back.", "close_window",[(assign, "$g_leave_encounter",1),(play_sound,"snd_encounter_vaegirs_ally"),]], ## ## [anyone,"start", [(eq, "$g_encountered_party_type", spt_scout),(is_between, "$g_encountered_party_relation", -9, 1)], ## "Hold it right there. Who are you?", "soldiers_interrogation",[]], ## [anyone,"start", [(eq, "$g_encountered_party_type", spt_scout),(le, "$g_encountered_party_relation", -10)], ## "You deserve to die a thousand deaths!", "close_window", ## [(store_relation, reg(5),"$g_encountered_party_faction"), (val_sub,reg(5),2), (set_relation,"$g_encountered_party_faction",0,reg(5)),(encounter_attack,0)]], ## [anyone,"start", [(eq, "$g_encountered_party_type", spt_scout),(ge, "$g_encountered_party_relation", 1)], ## "Venture deep into the enemy territory and find myself a caravan to raid. That's the way I will get rich.", "close_window",[(assign, "$g_leave_encounter",1)]], ## ## [anyone,"start", [(this_or_next|eq, "$g_encountered_party_type", spt_patrol),(eq, "$g_encountered_party_type", spt_war_party),(is_between, "$g_encountered_party_relation", -9, 1)], ## "Hold it right there. Who are you?", "soldiers_interrogation",[]], ## [anyone,"start", [(this_or_next|eq, "$g_encountered_party_type", spt_patrol),(eq, "$g_encountered_party_type", spt_war_party),(le, "$g_encountered_party_relation", -10)], ## "You will not survive this!", "close_window", ## [(store_relation, reg(5),"$g_encountered_party_type"), (val_sub,reg(5),3), (set_relation,"$g_encountered_party_type",0,reg(5)),(encounter_attack,0)]], ## [anyone,"start", [(this_or_next|eq, "$g_encountered_party_type", spt_patrol),(eq, "$g_encountered_party_type", spt_war_party),(ge, "$g_encountered_party_relation", 1)], ## "Sooner or later, friend. Victory will belong to us.", "close_window",[(assign, "$g_leave_encounter",1)]], #swadian parties ## [anyone|plyr,"soldiers_interrogation", [], "I am {playername}.", "soldiers_interrogation_2",[]], ## [anyone,"soldiers_interrogation_2", [], "What are you doing here?", "soldiers_interrogation_3",[]], ## [anyone|plyr,"soldiers_interrogation_3", [], "I am carrying some merchandise.", "soldiers_interrogation_4",[]], ## [anyone|plyr,"soldiers_interrogation_3", [], "I am just admiring the sights.", "soldiers_interrogation_4",[]], ## [anyone,"soldiers_interrogation_4", [], "Hmm. All right. You may go now. But be careful. There is a war going on. The roads are not safe for travellers.", "close_window",[(assign, "$g_leave_encounter",1)]], # Bandits ## [party_tpl|pt_mountain_bandits,"start", [(this_or_next|eq, "$g_encountered_party_template", "pt_mountain_bandits"),(eq, "$g_encountered_party_template", "pt_forest_bandits"), ## (eq,"$talk_context",tc_party_encounter), ## (party_get_slot,":protected_until_hours", "$g_encountered_party",slot_party_ignore_player_until), ## (store_current_hours,":cur_hours"), ## (store_sub, ":protection_remaining",":protected_until_hours",":cur_hours"), ## (ge, ":protection_remaining", 0)], "What do you want?\ ## You want to pay us some more money?", "bandit_paid_talk",[]], ## ## [anyone|plyr,"bandit_paid_talk", [], "Sorry to trouble you. I'll be on my way now.", "bandit_paid_talk_2a",[]], ## [anyone,"bandit_paid_talk_2a", [], "Yeah. Stop fooling around and go make some money.\ ## I want to see that purse full next time I see you.", "close_window",[(assign, "$g_leave_encounter",1)]], ## [anyone|plyr,"bandit_paid_talk", [], "No. It's your turn to pay me this time.", "bandit_paid_talk_2b",[]], ## [anyone,"bandit_paid_talk_2b", [], "What nonsense are you talking about? You want trouble? You got it.", "close_window",[ ## (party_set_slot,"$g_encountered_party",slot_party_ignore_player_until,0), ## (party_ignore_player, "$g_encountered_party", 0), ## ]], # Ryan BEGIN [party_tpl|pt_mountain_bandits|auto_proceed,"start", [(eq,"$talk_context",tc_party_encounter),(encountered_party_is_attacker)], "Warning: This line should never display.", "bandit_introduce",[]], [party_tpl|pt_forest_bandits|auto_proceed,"start", [(eq,"$talk_context",tc_party_encounter),(encountered_party_is_attacker)], "Warning: This line should never display.", "bandit_introduce",[]], [anyone,"bandit_introduce", [ (store_random_in_range, ":rand", 11, 15), (str_store_string, s11, "@I can smell a fat purse a mile away. Methinks yours could do with some lightening, eh?"), (str_store_string, s12, "@Why, it be another traveller, chance met upon the road! I should warn you, country here's a mite dangerous for a good {fellow/woman} like you. But for a small donation my boys and I'll make sure you get rightways to your destination, eh?"), (str_store_string, s13, "@Well well, look at this! You'd best start coughing up some silver, friend, or me and my boys'll have to break you."), (str_store_string, s14, "@There's a toll for passin' through this land, payable to us, so if you don't mind we'll just be collectin' our due from your purse..."), (str_store_string_reg, s5, ":rand"), ], "{s5}", "bandit_talk",[(play_sound,"snd_encounter_bandits")]], [anyone|plyr,"bandit_talk", [], "I'll give you nothing but cold steel, you scum!", "close_window",[[encounter_attack]]], [anyone|plyr,"bandit_talk", [], "There's no need to fight. I can pay for free passage.", "bandit_barter",[]], [anyone,"bandit_barter", [(store_relation, ":bandit_relation", "fac_player_faction", "$g_encountered_party_faction"), (ge, ":bandit_relation", -50), (store_mul, "$bandit_tribute", ":bandit_relation", ":bandit_relation"), (val_div, "$bandit_tribute", 70), (val_add, "$bandit_tribute", 100), (val_mul, "$bandit_tribute", 10), (assign, reg5, "$bandit_tribute") ], "Silver without blood, that's our favourite kind. Pay us {reg5} denars and we'll let you be on your way.", "bandit_barter_2",[]], [anyone|plyr,"bandit_barter_2", [[store_troop_gold,reg(2)],[ge,reg(2),"$bandit_tribute"],[assign,reg(5),"$bandit_tribute"]], "Very well, take it.", "bandit_barter_3a",[[troop_remove_gold, "trp_player","$bandit_tribute"]]], [anyone|plyr,"bandit_barter_2", [], "I don't have that much money with me", "bandit_barter_3b",[]], [anyone,"bandit_barter_3b", [], "That's too bad. I guess we'll just have to sell you into slavery. Take {him/her}, lads!", "close_window",[[encounter_attack]]], [anyone,"bandit_barter", [], "Hey, I've heard of you! You slaughter us freebooters like dogs, and now you expect us to let you go for a few stinking coins?\ Forget it. You gave us no quarter, and you'll get none from us.", "close_window",[]], [anyone,"bandit_barter_3a", [], "Heh, that wasn't so hard, was it? All right, we'll let you go now. Be off.", "close_window",[ (store_current_hours,":protected_until"), (val_add, ":protected_until", 72), (party_set_slot,"$g_encountered_party",slot_party_ignore_player_until,":protected_until"), (party_ignore_player, "$g_encountered_party", 72), (assign, "$g_leave_encounter",1) ]], [anyone,"start", [(this_or_next|eq, "$g_encountered_party_template", "pt_mountain_bandits"),(eq, "$g_encountered_party_template", "pt_forest_bandits")], "Eh? What is it?", "bandit_meet",[]], [anyone|plyr,"bandit_meet", [], "Your luck has run out, wretch. Prepare to die!", "bandit_attack", [(store_relation, ":bandit_relation", "fac_player_faction", "$g_encountered_party_faction"), (val_sub, ":bandit_relation", 3), (val_max, ":bandit_relation", -100), (set_relation, "fac_player_faction", "$g_encountered_party_faction", ":bandit_relation"), (party_ignore_player, "$g_encountered_party", 0), (party_set_slot,"$g_encountered_party",slot_party_ignore_player_until, 0), ]], [anyone,"bandit_attack", [ (store_random_in_range, ":rand", 11, 15), (str_store_string, s11, "@Another fool come to throw {him/her}self on my weapon, eh? Fine, let's fight!"), (str_store_string, s12, "@We're not afraid of you, {sirrah/wench}. Time to bust some heads!"), (str_store_string, s13, "@That was a mistake. Now I'm going to have to make your death long and painful."), (str_store_string, s14, "@Brave words. Let's see you back them up with deeds, cur!"), (str_store_string_reg, s5, ":rand"), ], "{s5}", "close_window",[]], [anyone|plyr,"bandit_meet", [], "Never mind, I have no business with you.", "close_window",[(assign, "$g_leave_encounter", 1)]], # Ryan END #Quest dialogs [party_tpl|pt_troublesome_bandits,"start", [(quest_slot_eq, "qst_troublesome_bandits", slot_quest_target_party, "$g_encountered_party")], "This must be your unlucky day indeed. We are the baddest guys you could have run into in these parts...", "troublesome_bandits_intro_1",[]], [anyone|plyr,"troublesome_bandits_intro_1", [], "Heh. For me, you are nothing more than walking money bags.\ A merchant in {s1} offered me good money for your heads.", "troublesome_bandits_intro_2", [(quest_get_slot, ":quest_giver_center", "qst_troublesome_bandits", slot_quest_giver_center), (str_store_party_name, s1, ":quest_giver_center") ]], [anyone,"troublesome_bandits_intro_2", [], "A bounty hunter! ... I hate bounty hunters! Kill {him/her}! Kill {him/her} now!", "close_window",[(encounter_attack)]], [party_tpl|pt_rescued_prisoners,"start", [(eq,"$talk_context",tc_party_encounter)], "Do you want us to follow you?", "disbanded_troop_ask",[]], [anyone|plyr,"disbanded_troop_ask", [], "Yes. Let us ride together.", "disbanded_troop_join",[]], [anyone|plyr,"disbanded_troop_ask", [], "No. Not at this time.", "close_window",[(assign, "$g_leave_encounter",1)]], [anyone,"disbanded_troop_join", [[neg|party_can_join]], "Unfortunately. You do not have room in your party for us.", "close_window",[(assign, "$g_leave_encounter",1)]], [anyone,"disbanded_troop_join", [], "We are at your command.", "close_window",[[party_join],(assign, "$g_leave_encounter",1)]], [party_tpl|pt_enemy,"start", [(eq,"$talk_context",tc_party_encounter)], "You will not capture me again. Not this time.", "enemy_talk_1",[]], [party_tpl|pt_enemy|plyr,"enemy_talk_1", [], "You don't have a chance against me. Give up.", "enemy_talk_2",[]], [party_tpl|pt_enemy,"enemy_talk_2", [], "I will give up when you are dead!", "close_window",[[encounter_attack]]], # Ryan BEGIN [anyone,"sell_prisoner_outlaws", [[store_troop_kind_count,0,"trp_looter"],[ge,reg(0),1],[assign,reg(1),reg(0)],[val_mul,reg(1),10],[val_mul,reg(2),reg(0)],[val_mul,reg(2),10]], "Hmmm. 10 denars for each looter makes {reg1} denars for all {reg0} of them.", "sell_prisoner_outlaws", [[call_script, "script_troop_add_gold", "trp_player",reg(1)],[add_xp_to_troop,reg(2)],[remove_member_from_party,"trp_looter"]]], [anyone,"sell_prisoner_outlaws", [[store_troop_kind_count,0,"trp_bandit"],[ge,reg(0),1],[assign,reg(1),reg(0)],[val_mul,reg(1),20],[assign,reg(2),reg(0)],[val_mul,reg(2),20]], "Let me see. You've brought {reg0} bandits, so 20 denars for each comes up to {reg1} denars.", "sell_prisoner_outlaws", [[call_script, "script_troop_add_gold", "trp_player",reg(1)],[add_xp_to_troop,reg(2)],[remove_member_from_party,"trp_bandit"]]], [anyone,"sell_prisoner_outlaws", [[store_troop_kind_count,0,"trp_brigand"],[ge,reg(0),1],[assign,reg(1),reg(0)],[val_mul,reg(1),30],[assign,reg(2),reg(0)],[val_mul,reg(2),30]], "Well well, you've captured {reg0} brigands. Each one is worth 30 denars, so I'll give you {reg1} for them in total.", "sell_prisoner_outlaws", [[call_script, "script_troop_add_gold", "trp_player",reg(1)],[add_xp_to_troop,reg(2)],[remove_member_from_party,"trp_brigand"]]], [anyone,"sell_prisoner_outlaws", [], "I suppose that'll be all, then.", "sell_prisoner_outlaws_finished",[]], # Ryan END [anyone|plyr,"prisoner_chat", [], "Do not try running away or trying something stupid. I will be watching you.", "prisoner_chat_2",[]], [anyone,"prisoner_chat_2", [], "No, I swear I won't.", "close_window",[]], [anyone,"start", [(party_slot_eq, "$current_town", slot_town_lord, "trp_player"), (this_or_next|is_between,"$g_talk_troop",weapon_merchants_begin,weapon_merchants_end), (this_or_next|is_between,"$g_talk_troop",armor_merchants_begin, armor_merchants_end), ( is_between,"$g_talk_troop",horse_merchants_begin, horse_merchants_end), ], "Greetings, {your lordship/my lady}. How can I serve you today?", "town_merchant_talk",[]], [anyone,"start", [(this_or_next|is_between,"$g_talk_troop",weapon_merchants_begin,weapon_merchants_end), (this_or_next|is_between,"$g_talk_troop",armor_merchants_begin, armor_merchants_end), ( is_between,"$g_talk_troop",horse_merchants_begin, horse_merchants_end)], "Good day. What can I do for you?", "town_merchant_talk",[]], [anyone|plyr,"town_merchant_talk", [(is_between,"$g_talk_troop",weapon_merchants_begin,weapon_merchants_end)], "I want to buy a new weapon. Show me your wares.", "trade_requested_weapons",[]], [anyone|plyr,"town_merchant_talk", [(is_between,"$g_talk_troop",armor_merchants_begin,armor_merchants_end)], "I am looking for some equipment. Show me what you have.", "trade_requested_armor",[]], [anyone|plyr,"town_merchant_talk", [(is_between,"$g_talk_troop",horse_merchants_begin,horse_merchants_end)], "I am thinking of buying a horse.", "trade_requested_horse",[]], [anyone,"trade_requested_weapons", [], "Ah, yes {sir/madam}. These arms are the best you'll find anywhere.", "merchant_trade",[[change_screen_trade]]], [anyone,"trade_requested_armor", [], "Of course, {sir/madam}. You won't find better quality armour than these in all Calradia.", "merchant_trade",[[change_screen_trade]]], [anyone,"trade_requested_horse", [], "You have a fine eye for horses, {sir/madam}. You won't find better beasts than these anywhere else.", "merchant_trade",[[change_screen_trade]]], [anyone,"merchant_trade", [], "Anything else?", "town_merchant_talk",[]], [anyone|plyr,"town_merchant_talk", [], "Tell me. What are people talking about these days?", "merchant_gossip",[]], [anyone,"merchant_gossip", [], "Well, nothing new lately. Prices, weather, the war, the same old things.", "town_merchant_talk",[]], [anyone|plyr,"town_merchant_talk", [], "Good-bye.", "close_window",[]], ## [anyone,"start", [(eq, "$talk_context", 0), ## (is_between,"$g_talk_troop",walkers_begin, walkers_end), ## (eq, "$sneaked_into_town",1), ## ], "Stay away beggar!", "close_window",[]], [anyone,"start", [(eq, "$talk_context", 0), (is_between,"$g_talk_troop",walkers_begin, walkers_end), (party_slot_eq, "$current_town", slot_town_lord, "trp_player"), ], "My {lord/lady}?", "town_dweller_talk",[(assign, "$welfare_inquired",0),(assign, "$rumors_inquired",0),(assign, "$info_inquired",0)]], [anyone,"start", [(eq, "$talk_context", 0), (is_between,"$g_talk_troop",walkers_begin, walkers_end), ], "Good day, {sir/madam}.", "town_dweller_talk",[(assign, "$welfare_inquired", 0),(assign, "$rumors_inquired",0),(assign, "$info_inquired",0)]], [anyone|plyr,"town_dweller_talk", [(check_quest_active, "qst_hunt_down_fugitive"), (neg|check_quest_concluded, "qst_hunt_down_fugitive"), (quest_slot_eq, "qst_hunt_down_fugitive", slot_quest_target_center, "$current_town"), (quest_get_slot, ":quest_target_dna", "qst_hunt_down_fugitive", slot_quest_target_dna), (call_script, "script_get_name_from_dna_to_s50", ":quest_target_dna"), (str_store_string, s4, s50), ], "I am looking for a man by the name of {s4}. I was told he may be hiding here.", "town_dweller_ask_fugitive",[]], [anyone ,"town_dweller_ask_fugitive", [], "Strangers come and go to our village, {sir/madam}. If he is hiding here, you will surely find him if you look around.", "close_window",[]], # Ryan BEGIN [anyone|plyr,"town_dweller_talk", [ (eq, 1, 0), (check_quest_active, "qst_meet_spy_in_enemy_town"), (neg|check_quest_succeeded, "qst_meet_spy_in_enemy_town"), (quest_slot_eq, "qst_meet_spy_in_enemy_town", slot_quest_target_center, "$current_town"), (str_store_item_name,s5,"$spy_item_worn"), ], "Pardon me, but is that a {s5} you're wearing?", "town_dweller_quest_meet_spy_in_enemy_town_ask_item", [ ]], [anyone, "town_dweller_quest_meet_spy_in_enemy_town_ask_item", [ (str_store_item_name,s5,"$spy_item_worn"), (try_begin), (troop_has_item_equipped,"$g_talk_troop","$spy_item_worn"), (str_store_string,s6,"@A {s5}? Well... Yes, I suppose it is. What a strange thing to ask."), (else_try), (str_store_string,s6,"@Eh? No, it most certainly is not a {s5}. I'd start questioning my eyesight if I were you."), (try_end), ], "{s6}", "town_dweller_talk",[]], [anyone|plyr|repeat_for_100,"town_dweller_talk", [ (store_repeat_object,":object"), (lt,":object",4), # repeat only 4 times (check_quest_active, "qst_meet_spy_in_enemy_town"), (neg|check_quest_succeeded, "qst_meet_spy_in_enemy_town"), (quest_slot_eq, "qst_meet_spy_in_enemy_town", slot_quest_target_center, "$current_town"), (store_add,":string",":object","str_secret_sign_1"), (str_store_string, s4, ":string"), ], "{s4}", "town_dweller_quest_meet_spy_in_enemy_town", [ (store_repeat_object,":object"), (assign, "$temp", ":object"), ]], [anyone ,"town_dweller_quest_meet_spy_in_enemy_town", [ (call_script, "script_agent_get_town_walker_details", "$g_talk_agent"), (assign, ":walker_type", reg0), (eq, ":walker_type", walkert_spy), (quest_get_slot, ":secret_sign", "qst_meet_spy_in_enemy_town", slot_quest_target_amount), (val_sub, ":secret_sign", secret_signs_begin), (eq, ":secret_sign", "$temp"), (store_add, ":countersign", ":secret_sign", countersigns_begin), (str_store_string, s4, ":countersign"), ], "{s4}", "town_dweller_quest_meet_spy_in_enemy_town_know",[]], [anyone, "town_dweller_quest_meet_spy_in_enemy_town", [], "Eh? What kind of gibberish is that?", "town_dweller_quest_meet_spy_in_enemy_town_dont_know",[]], [anyone|plyr, "town_dweller_quest_meet_spy_in_enemy_town_dont_know", [], "Never mind.", "close_window",[]], [anyone|plyr, "town_dweller_quest_meet_spy_in_enemy_town_know", [ (quest_get_slot, ":quest_giver", "qst_meet_spy_in_enemy_town", slot_quest_giver_troop), (str_store_troop_name, s4, ":quest_giver"), ], "{s4} sent me to collect your reports. Do you have them with you?", "town_dweller_quest_meet_spy_in_enemy_town_chat",[]], [anyone, "town_dweller_quest_meet_spy_in_enemy_town_chat", [ (quest_get_slot, ":quest_giver", "qst_meet_spy_in_enemy_town", slot_quest_giver_troop), (str_store_troop_name, s4, ":quest_giver"), ], "I've been expecting you. Here they are, make sure they reach {s4} intact and without delay.", "town_dweller_quest_meet_spy_in_enemy_town_chat_2",[ (call_script, "script_succeed_quest", "qst_meet_spy_in_enemy_town"), (call_script, "script_center_remove_walker_type_from_walkers", "$current_town", walkert_spy), ]], [anyone|plyr, "town_dweller_quest_meet_spy_in_enemy_town_chat_2", [], "Farewell.", "close_window", [ ]], # Ryan END [anyone|plyr,"town_dweller_talk", [(party_slot_eq, "$current_town", slot_party_type, spt_village), (eq, "$info_inquired", 0)], "What can you tell me about this village?", "town_dweller_ask_info",[(assign, "$info_inquired", 1)]], [anyone|plyr,"town_dweller_talk", [(party_slot_eq, "$current_town", slot_party_type, spt_town), (eq, "$info_inquired", 0)], "What can you tell me about this town?", "town_dweller_ask_info",[(assign, "$info_inquired", 1)]], [anyone,"town_dweller_ask_info", [(str_store_party_name, s5, "$current_town"), (assign, reg4, 0), (try_begin), (party_slot_eq, "$current_town", slot_party_type, spt_town), (assign, reg4, 1), (try_end), (str_store_string, s6, "@This is the {reg4?town:village} of {s5}, {sir/madam}."), (str_clear, s10), (try_begin), (party_slot_eq, "$current_town", slot_town_lord, "trp_player"), (str_store_string, s10, "@{s6} Our {reg4?town:village} and the surrounding lands belong to you of course, my {lord/lady}."), (else_try), (party_get_slot, ":town_lord", "$current_town", slot_town_lord), (ge, ":town_lord", 0), (str_store_troop_name, s7, ":town_lord"), (store_troop_faction, ":town_lord_faction", ":town_lord"), (str_store_faction_name, s8, ":town_lord_faction"), (str_store_string, s10, "@{s6} Our {reg4?town:village} and the surrounding lands belong to {s7} of {s8}."), (try_end), (str_clear, s5), (assign, reg20, 0), (try_for_range, ":cur_good", trade_goods_begin, trade_goods_end), (store_sub, ":cur_good_slot", ":cur_good", trade_goods_begin), (val_add, ":cur_good_slot", slot_town_trade_good_productions_begin), (party_get_slot, ":production", "$g_encountered_party", ":cur_good_slot"), (ge, ":production", 10), (str_store_item_name, s3, ":cur_good"), (try_begin), (eq, reg20, 0), (str_store_string, s5, s3), (else_try), (eq, reg20, 1), (str_store_string, s5, "@{s3} and {s5}"), (else_try), (str_store_string, s5, "@{s3}, {s5}"), (try_end), (val_add, reg20, 1), (try_end), (str_store_string, s11, "@{reg20?We mostly produce {s5} here:We don't produce much here these days}.\ If you would like to learn more, you can speak with our {reg4?guildmaster:village elder}. He is nearby, right over there."), ], "{s10} {s11}", "close_window",[]], [anyone|plyr,"town_dweller_talk", [(party_slot_eq, "$current_town", slot_party_type, spt_village), (eq, "$welfare_inquired", 0)], "How is life here?", "town_dweller_ask_situation",[(assign, "$welfare_inquired", 1)]], [anyone|plyr,"town_dweller_talk", [(party_slot_eq, "$current_town", slot_party_type, spt_town), (eq, "$welfare_inquired", 0)], "How is life here?", "town_dweller_ask_situation",[(assign, "$welfare_inquired", 1)]], [anyone,"town_dweller_ask_situation", [(call_script, "script_agent_get_town_walker_details", "$g_talk_agent"), (assign, ":walker_type", reg0), (eq, ":walker_type", walkert_needs_money), (party_slot_eq, "$current_town", slot_party_type, spt_village)], "Disaster has struck my family, {sir/madam}. A pestilence has ruined the crops on our fields, and my poor children lie at home hungry and sick.\ My neighbours are too poor themselves to help me.", "town_dweller_poor",[]], [anyone,"town_dweller_ask_situation", [(call_script, "script_agent_get_town_walker_details", "$g_talk_agent"), (assign, ":walker_type", reg0), (eq, ":walker_type", walkert_needs_money)], "My life is miserable, {sir/madam}. I haven't been able to find a job for months, and my poor children go to bed hungry each night.\ My neighbours are too poor themselves to help me.", "town_dweller_poor",[]], [anyone|plyr,"town_dweller_poor", [(store_troop_gold, ":gold", "trp_player"), (ge, ":gold", 300), ], "Then take these 300 denars. I hope this will help you and your family.", "town_dweller_poor_paid", [(troop_remove_gold, "trp_player", 300), ]], [anyone|plyr,"town_dweller_poor", [], "Then you must work harder and bear your burden without complaining.", "town_dweller_poor_not_paid",[]], [anyone,"town_dweller_poor_not_paid", [], "Yes {sir/madam}. I will do as you say.", "close_window",[]], [anyone,"town_dweller_poor_paid", [], "{My lord/My good lady}. \ You are so good and generous. I will tell everyone how you helped us.", "close_window", [(call_script, "script_change_player_relation_with_center", "$g_encountered_party", 1), (call_script, "script_agent_get_town_walker_details", "$g_talk_agent"), (assign, ":walker_no", reg2), (call_script, "script_center_set_walker_to_type", "$g_encountered_party", ":walker_no", walkert_needs_money_helped), ]], [anyone,"town_dweller_ask_situation", [(call_script, "script_agent_get_town_walker_details", "$g_talk_agent"), (assign, ":walker_type", reg0), (eq, ":walker_type", walkert_needs_money_helped) ], "Thank you for your kindness {sir/madam}. With your help our lives will be better. I will pray for you everyday.", "close_window",[]], [anyone,"town_dweller_ask_situation", [(neg|party_slot_ge, "$current_town", slot_town_prosperity, 30)], "Times are hard, {sir/madam}. We work hard all day and yet we go to sleep hungry most nights.", "town_dweller_talk",[]], [anyone,"town_dweller_ask_situation", [(neg|party_slot_ge, "$current_town", slot_town_prosperity, 70)], "Times are hard, {sir/madam}. But we must count our blessings.", "town_dweller_talk",[]], [anyone,"town_dweller_ask_situation", [], "We are not doing too badly {sir/madam}. We must count our blessings.", "town_dweller_talk",[]], [anyone|plyr,"town_dweller_talk", [(eq, "$rumors_inquired", 0)], "What is the latest rumor around here?", "town_dweller_ask_rumor",[(assign, "$rumors_inquired", 1)]], [anyone,"town_dweller_ask_rumor", [(neg|party_slot_ge, "$current_town", slot_center_player_relation, -5)], "I don't know anything that would be of interest to you.", "town_dweller_talk",[]], [anyone,"town_dweller_ask_rumor", [(store_mul, ":rumor_id", "$current_town", 197), (val_add, ":rumor_id", "$g_talk_agent"), (call_script, "script_get_rumor_to_s61", ":rumor_id"), (gt, reg0, 0)], "{s61}", "town_dweller_talk",[]], [anyone,"town_dweller_ask_rumor", [], "I haven't heard anything interesting lately.", "town_dweller_talk",[]], [anyone|plyr,"town_dweller_talk", [], "[Leave]", "close_window",[]], [anyone,"start", [(eq, "$talk_context", 0), (is_between,"$g_talk_troop",regular_troops_begin, regular_troops_end), (party_slot_eq,"$current_town",slot_town_lord, "trp_player"), ], "Yes {sir/madam}?", "player_castle_guard_talk",[]], [anyone|plyr,"player_castle_guard_talk", [], "How goes the watch, soldier?", "player_castle_guard_talk_2",[]], [anyone,"player_castle_guard_talk_2", [], "All is quiet {sir/madam}. Nothing to report.", "player_castle_guard_talk_3",[]], [anyone|plyr,"player_castle_guard_talk_3", [], "Good. Keep your eyes open.", "close_window",[]], [anyone,"start", [(eq, "$talk_context", 0), (is_between,"$g_talk_troop",regular_troops_begin, regular_troops_end), (is_between,"$g_encountered_party_faction",kingdoms_begin, kingdoms_end), (eq, "$players_kingdom", "$g_encountered_party_faction"), (troop_slot_ge, "trp_player", slot_troop_renown, 100), (str_store_party_name, s10, "$current_town"), ], "Good day, {sir/madam}. It's nice having you here in {s10}.", "close_window",[]], [anyone,"start", [(eq, "$talk_context", 0), (is_between,"$g_talk_troop",regular_troops_begin, regular_troops_end), (is_between,"$g_encountered_party_faction",kingdoms_begin, kingdoms_end), ], "Mind your manners within the walls and we'll have no trouble.", "close_window",[]], [anyone,"start", [(eq, "$talk_context", tc_court_talk), (is_between,"$g_talk_troop",regular_troops_begin, regular_troops_end), (is_between,"$g_encountered_party_faction",kingdoms_begin, kingdoms_end), (party_slot_eq,"$current_town",slot_town_lord, "trp_player"), ], "Your orders, {my lord/my lady}?", "hall_guard_talk",[]], [anyone,"start", [(eq, "$talk_context", tc_court_talk), (is_between,"$g_talk_troop",regular_troops_begin, regular_troops_end), (is_between,"$g_encountered_party_faction",kingdoms_begin, kingdoms_end), ], "We are not supposed to talk while on guard, {sir/madam}.", "close_window",[]], [anyone|plyr,"hall_guard_talk", [], "Stay on duty and let me know if anyone comes to see me.", "hall_guard_duty",[]], [anyone,"hall_guard_duty", [], "Yes, {my lord/my lady}. As you wish.", "close_window",[]], [anyone|plyr,"hall_guard_talk", [], "I want you to arrest this man immediately!", "hall_guard_arrest",[]], [anyone,"hall_guard_arrest", [], "Who do you want arrested {sir/madam}?", "hall_guard_arrest_2",[]], [anyone|plyr,"hall_guard_arrest_2", [], "Ah, never mind my high spirits lads.", "close_window",[]], [anyone|plyr,"hall_guard_arrest_2", [], "Forget it. I will find another way to deal with this.", "close_window",[]], [anyone,"enemy_defeated", [], "Arggh! I hate this.", "close_window",[]], [anyone,"party_relieved", [], "Thank you for helping us against those bastards.", "close_window",[]], [anyone,"start", [(eq,"$talk_context", tc_party_encounter),(store_encountered_party, reg(5)),(party_get_template_id,reg(7),reg(5)),(eq,reg(7),"pt_sea_raiders")], "I will drink from your skull!", "battle_reason_stated",[(play_sound,"snd_encounter_sea_raiders")]], ###################################### # GENERIC MEMBER CHAT ###################################### [anyone,"member_chat", [], "Your orders {sir/madam}?", "regular_member_talk",[]], [anyone|plyr,"regular_member_talk", [], "Tell me about yourself", "view_regular_char_requested",[]], [anyone,"view_regular_char_requested", [], "Aye {sir/madam}. Let me tell you all there is to know about me.", "do_regular_member_view_char",[[change_screen_view_character]]], [anyone,"do_regular_member_view_char", [], "Anything else?", "regular_member_talk",[]], [anyone|plyr,"regular_member_talk", [], "Nothing. Keep moving.", "close_window",[]], ###################################### # GENERIC PARTY ENCOUNTER ###################################### [anyone,"start", [(eq,"$talk_context",tc_party_encounter), (gt,"$encountered_party_hostile",0), (encountered_party_is_attacker), ], "You have no chance against us. Surrender now or we will kill you all...", "party_encounter_hostile_attacker", [(try_begin), (eq,"$g_encountered_party_template","pt_steppe_bandits"), (play_sound, "snd_encounter_steppe_bandits"), (try_end)]], [anyone|plyr,"party_encounter_hostile_attacker", [ ], "Don't attack! We surrender.", "close_window", [(assign,"$g_player_surrenders",1)]], # [anyone|plyr,"party_encounter_hostile_attacker", [ # ], # "I will pay you 1000 denars if you just let us go.", "close_window", []], [anyone|plyr,"party_encounter_hostile_attacker", [ ], "We will fight you to the end!", "close_window", []], [anyone,"start", [(eq,"$talk_context",tc_party_encounter), (neg|encountered_party_is_attacker), ], "What do you want?", "party_encounter_hostile_defender", []], [anyone|plyr,"party_encounter_hostile_defender", [], "Surrender or die!", "party_encounter_hostile_ultimatum_surrender", [ ]], #post 0907 changes begin [anyone,"party_encounter_hostile_ultimatum_surrender", [], "{s43}", "close_window", [ (call_script, "script_lord_comment_to_s43", "$g_talk_troop", "str_lord_challenged_default"), ]], #post 0907 changes end [anyone|plyr,"party_encounter_hostile_defender", [], "Nothing. We'll leave you in peace.", "close_window", [(assign, "$g_leave_encounter",1)]], [anyone,"start", [], "Surrender or die. Make your choice", "battle_reason_stated",[]], [anyone|plyr,"battle_reason_stated", [], "I am not afraid of you. I will fight.", "close_window",[[encounter_attack]]], [anyone,"start", [], "Hello. What can I do for you?", "free",[]], [anyone|plyr,"free", [[neg|in_meta_mission]], "Tell me about yourself", "view_char_requested",[]], [anyone,"view_char_requested", [], "Very well, listen to this...", "view_char",[[change_screen_view_character]]], [anyone,"view_char", [], "Anything else?", "free",[]], [anyone|plyr,"end", [], "[Done]", "close_window",[]], [anyone|plyr,"start", [], "Drop your weapons and surrender if you want to live", "threaten_1",[]], [anyone,"threaten_1", [], "We will fight you first", "end",[[encounter_attack]]], # [anyone|plyr,"free", [[partner_is_mercmaster]], "I need to hire some mercenaries.", "mercenaries_requested",[]], # [anyone,"mercenaries_requested", [], "I have the toughest fighters in all Calradia.", "buy_mercenaries",[[change_screen_buy_mercenaries]]], # [anyone,"buy_mercenaries", [], "Anything else?", "free",[]], # [anyone|plyr,"free", [[partner_is_recruitable]], "I need a capable sergeant like yourself. How much do you ask to work for me?", "employ_mercenary_requested",[]], # [anyone,"employ_mercenary_requested", [[store_mercenary_price,0],[store_mercenary_wage,1]], "I want {reg0} denars now and {reg1} denars as monthly payment.", "employ_mercenary_2",[]], # [anyone|plyr,"employ_mercenary_2", [], "I see I need to think of this.", "employ_mercenary_giveup",[]], # [anyone|plyr,"employ_mercenary_2", [[neg|hero_can_join]], "I don't have any more room in my party right now. I will talk to you again later.", "employ_mercenary_giveup",[]], # [anyone|plyr,"employ_mercenary_2", [[player_gold_ge,reg(0)],[hero_can_join]], "That's fine. Here's the {reg0} denars. From now on you work for me.", "employ_mercenary_commit",[[troop_remove_gold, "trp_player",reg(0)],[recruit_mercenary]]], # [anyone,"employ_mercenary_giveup", [], "Suits me.", "free",[]], # [anyone,"employ_mercenary_commit", [], "You got yourself the best fighter in the land.", "end",[]], [anyone|plyr,"free", [[in_meta_mission]], " Good-bye.", "close_window",[]], [anyone|plyr,"free", [[neg|in_meta_mission]], " [Leave]", "close_window",[]], # [anyone,"free", [], "NO MATCHING SENTENCE!", "close_window",[]], ]
Python
import string from header_common import * from module_info import * from module_animations import * from process_common import * def compile_action_sets(actions): action_codes = [] for action in actions: index = -1 for i_action_code in xrange(len(action_codes)): if action_codes[i_action_code] == action[0]: index = i_action_code break if index == -1: pos = len(action_codes) action_codes.append(action[0]) action[0] = pos else: action[0] = index return action_codes def write_actions(action_set,num_action_codes,action_codes,file_name): file = open(export_dir + file_name,"w") file.write("%d\n"%num_action_codes) for i_action_code in xrange(num_action_codes): action_found = 0 for action in action_set: if action[0] == i_action_code: file.write(" %s %d "%(action_codes[i_action_code],action[1])) #print flags file.write(" %d\n"%(len(action)-2)) for elem in action[2:]: file.write(" %f %s %d %d %d "%(elem[0],elem[1],elem[2],elem[3],elem[4])) if (len(elem) > 5): file.write("%d "%elem[5]) else: file.write("0 ") if (len(elem) > 6): file.write("%f %f %f "%elem[6]) else: file.write("0.0 0.0 0.0 ") if (len(elem) > 7): file.write("%f \n"%(elem[7])) else: file.write("0.0 \n") action_found = 1 break if not action_found: file.write(" none 0 0\n") #oops def save_python_header(action_codes): ofile = open("./ID_animations.py","w") for i_anim in xrange(len(action_codes)): ofile.write("anim_%s = %d\n"%(action_codes[i_anim],i_anim)) ofile.write("\n\n") ofile.close() print "Exporting animations..." action_codes = compile_action_sets(animations) save_python_header(action_codes) write_actions(animations,len(action_codes),action_codes,"actions.txt")
Python
from header_game_menus import * from header_parties import * from header_items import * from header_mission_templates import * from header_music import * from header_terrain_types import * from module_constants import * #################################################################################################################### # (menu-id, menu-flags, menu_text, mesh-name, [<operations>], [<options>]), # # Each game menu is a tuple that contains the following fields: # # 1) Game-menu id (string): used for referencing game-menus in other files. # The prefix menu_ is automatically added before each game-menu-id # # 2) Game-menu flags (int). See header_game_menus.py for a list of available flags. # You can also specify menu text color here, with the menu_text_color macro # 3) Game-menu text (string). # 4) mesh-name (string). Not currently used. Must be the string "none" # 5) Operations block (list). A list of operations. See header_operations.py for reference. # The operations block is executed when the game menu is activated. # 6) List of Menu options (List). # Each menu-option record is a tuple containing the following fields: # 6.1) Menu-option-id (string) used for referencing game-menus in other files. # The prefix mno_ is automatically added before each menu-option. # 6.2) Conditions block (list). This must be a valid operation block. See header_operations.py for reference. # The conditions are executed for each menu option to decide whether the option will be shown to the player or not. # 6.3) Menu-option text (string). # 6.4) Consequences block (list). This must be a valid operation block. See header_operations.py for reference. # The consequences are executed for the menu option that has been selected by the player. # # # Note: The first Menu is the initial character creation menu. #################################################################################################################### game_menus = [ #This needs to be the first window!!! ( "start_game_1",menu_text_color(0xFF000000)|mnf_disable_all_keys, "Welcome, adventurer, to Mount&Blade. Before you can start playing the game you must create a character. To begin, select your character's gender.", "none", [], [ ("start_male",[],"Male", [ (troop_set_type,"trp_player",0), (assign,"$character_gender",tf_male), (jump_to_menu,"mnu_start_character_1"), ] ), ("start_female",[],"Female", [ (troop_set_type,"trp_player",1), (assign,"$character_gender",tf_female), (jump_to_menu,"mnu_start_character_1") ] ), ("go_back",[],"Go back", [(change_screen_quit), ] ), ] ), #This needs to be the second window!!! ( "start_phase_2",mnf_disable_all_keys, # "During your travels, you come accross a group of wandering men looking for a leader. You...", # "You arrive at Calradia, a land torn between rival kingdoms battling each other for supremacy,\ a haven for knights and mercenaries, cutthroats and adventurers, all willing to risk their lives in pursuit of fortune, power, or glory...\ In this land which holds great dangers and even greater opportunities, you will leave your past behind and start a new life.\ Now, on a rise above a distant training field, you feel that you hold the key of your destiny in your hands, free to choose as you will,\ and that whatever course you take, great adventures await you.", "none", [], [ ("continue",[],"Continue...", [ (call_script, "script_get_player_party_morale_values"), (party_set_morale, "p_main_party", reg0), (change_screen_return), ] ), ## ("lead_them",[],"...convince them to follow you, promising riches and glory.", ## [ ## (party_add_members, "p_main_party", "trp_farmer", 5), ## (change_screen_return), ## ] ## ), ## ("let_them_go",[],"...wish them good luck and go the other way.", ## [ ## (change_screen_return), ## ] ## ), ("tutorial_cheat",[(eq,1,0)],"CHEAT!", [ (change_screen_return), (assign, "$cheat_mode", 1), (set_show_messages, 0), (add_xp_to_troop, 15000, "trp_player"), (troop_raise_skill, "trp_player", skl_leadership, 7), (troop_raise_skill, "trp_player", skl_prisoner_management, 5), (party_add_members, "p_main_party", "trp_swadian_knight", 10), (party_add_members, "p_main_party", "trp_vaegir_knight", 10), (party_add_members, "p_main_party", "trp_vaegir_archer", 10), (party_add_members, "p_main_party", "trp_swadian_sharpshooter", 10), (troop_add_item, "trp_player","itm_pike",0), (troop_add_item, "trp_player","itm_light_crossbow",0), (troop_add_item, "trp_player","itm_tab_shield_pavise_a",0), (troop_add_item, "trp_player","itm_heavy_crossbow",0), (troop_add_item, "trp_player","itm_tribal_warrior_outfit",0), (troop_add_item, "trp_player","itm_sword_two_handed_a",0), (troop_add_item, "trp_player","itm_sword_two_handed_a",0), (troop_add_item, "trp_player","itm_sword_two_handed_b",0), (troop_add_item, "trp_player","itm_arena_armor_white",0), (troop_add_item, "trp_player","itm_arena_armor_red",0), (troop_add_item, "trp_player","itm_arena_armor_green",0), (troop_add_item, "trp_player","itm_arena_armor_blue",0), (troop_add_item, "trp_player","itm_arena_armor_yellow",0), (troop_add_item, "trp_player","itm_mace_1",0), (troop_add_item, "trp_player","itm_mace_2",0), (troop_add_item, "trp_player","itm_mace_3",0), (troop_add_item, "trp_player","itm_mace_4",0), (troop_add_item, "trp_player","itm_club_with_spike_head",0), (troop_add_item, "trp_player","itm_great_axe",0), (troop_add_item, "trp_player","itm_shortened_military_scythe",0), (troop_add_item, "trp_player","itm_bastard_sword_a",0), (troop_add_item, "trp_player","itm_bastard_sword_b",0), (troop_add_item, "trp_player","itm_tab_shield_small_round_a",0), (troop_add_item, "trp_player","itm_tab_shield_small_round_b",0), (troop_add_item, "trp_player","itm_heraldic_mail_with_surcoat",0), (troop_add_item, "trp_player","itm_sword_khergit_1",0), (troop_add_item, "trp_player","itm_sword_khergit_2",0), (troop_add_item, "trp_player","itm_sword_khergit_3",0), (troop_add_item, "trp_player","itm_sword_khergit_4",0), (troop_add_item, "trp_player","itm_arena_shield_red",0), (troop_add_item, "trp_player","itm_arena_shield_yellow",0), (troop_add_item, "trp_player","itm_arena_shield_blue",0), (troop_add_item, "trp_player","itm_arena_shield_green",0), (troop_add_item, "trp_player","itm_tourney_helm_yellow",0), (troop_add_item, "trp_player","itm_tourney_helm_white",0), (troop_add_item, "trp_player","itm_tourney_helm_red",0), (troop_add_item, "trp_player","itm_tourney_helm_green",0), (troop_add_item, "trp_player","itm_tourney_helm_blue",0), (troop_add_item, "trp_player","itm_steppe_helmet_white",0), (troop_add_item, "trp_player","itm_steppe_helmet_red",0), (troop_add_item, "trp_player","itm_steppe_helmet_green",0), (troop_add_item, "trp_player","itm_steppe_helmet_blue",0), (troop_add_item, "trp_player","itm_steppe_helmet_yellow",0), (troop_add_item, "trp_player","itm_arena_tunic_white",0), (troop_add_item, "trp_player","itm_arena_tunic_red",0), (troop_add_item, "trp_player","itm_arena_tunic_green",0), (troop_add_item, "trp_player","itm_arena_tunic_blue",0), (troop_add_item, "trp_player","itm_arena_tunic_yellow",0), (set_show_messages, 1), (try_for_range, ":cur_place", scenes_begin, scenes_end), (scene_set_slot, ":cur_place", slot_scene_visited, 1), (try_end), (call_script, "script_get_player_party_morale_values"), (party_set_morale, "p_main_party", reg0), ]), ] ), # This needs to be the third window!!! ( "start_game_3",mnf_disable_all_keys, "Choose your scenario:", "none", [ #Default banners (troop_set_slot, "trp_banner_background_color_array", 126, 0xFF212221), (troop_set_slot, "trp_banner_background_color_array", 127, 0xFF212221), (troop_set_slot, "trp_banner_background_color_array", 128, 0xFF2E3B10), (troop_set_slot, "trp_banner_background_color_array", 129, 0xFF425D7B), (troop_set_slot, "trp_banner_background_color_array", 130, 0xFF394608), ], [ ("custom_battle_scenario_1",[], "Skirmish 1", [ (assign, "$g_custom_battle_scenario", 0), (jump_to_menu, "mnu_custom_battle_2"), ] ), ## ("custom_battle_scenario_2",[],"Siege Attack 1", ## [ ## (assign, "$g_custom_battle_scenario", 1), ## (jump_to_menu, "mnu_custom_battle_2"), ## ## ] ## ), ("custom_battle_scenario_3",[],"Skirmish 2", [ (assign, "$g_custom_battle_scenario", 1), (jump_to_menu, "mnu_custom_battle_2"), ] ), ("custom_battle_scenario_4",[],"Siege Defense", [ (assign, "$g_custom_battle_scenario", 2), (jump_to_menu, "mnu_custom_battle_2"), ] ), ("custom_battle_scenario_5",[],"Skirmish 3", [ (assign, "$g_custom_battle_scenario", 3), (jump_to_menu, "mnu_custom_battle_2"), ] ), ("custom_battle_scenario_6",[],"Siege Attack", [ (assign, "$g_custom_battle_scenario", 4), (jump_to_menu, "mnu_custom_battle_2"), ] ), ("go_back",[],"Go back", [(change_screen_quit), ] ), ] ), # This needs to be the fourth window!!! ( "tutorial",mnf_disable_all_keys, "You approach a field where the locals are training with weapons. You can practice here to improve your combat skills.", "none", [(set_passage_menu, "mnu_tutorial"), (try_begin), (eq, "$tutorial_1_finished", 1), (str_store_string, s1, "str_finished"), (else_try), (str_store_string, s1, "str_empty_string"), (try_end), (try_begin), (eq, "$tutorial_2_finished", 1), (str_store_string, s2, "str_finished"), (else_try), (str_store_string, s2, "str_empty_string"), (try_end), (try_begin), (eq, "$tutorial_3_finished", 1), (str_store_string, s3, "str_finished"), (else_try), (str_store_string, s3, "str_empty_string"), (try_end), (try_begin), (eq, "$tutorial_4_finished", 1), (str_store_string, s4, "str_finished"), (else_try), (str_store_string, s4, "str_empty_string"), (try_end), (try_begin), (eq, "$tutorial_5_finished", 1), (str_store_string, s5, "str_finished"), (else_try), (str_store_string, s5, "str_empty_string"), (try_end), ], [ ("tutorial_1",[],"Tutorial #1: Basic movement and weapon selection. {s1}",[ (modify_visitors_at_site,"scn_tutorial_1"),(reset_visitors,0), (set_jump_mission,"mt_tutorial_1"), (jump_to_scene,"scn_tutorial_1"),(change_screen_mission)]), ("tutorial_2",[],"Tutorial #2: Fighting with a shield. {s2}",[ (modify_visitors_at_site,"scn_tutorial_2"),(reset_visitors,0), (set_visitor,1,"trp_tutorial_maceman"), (set_visitor,2,"trp_tutorial_archer"), (set_jump_mission,"mt_tutorial_2"), (jump_to_scene,"scn_tutorial_2"),(change_screen_mission)]), ("tutorial_3",[],"Tutorial #3: Fighting without a shield. {s3}",[ (modify_visitors_at_site,"scn_tutorial_3"),(reset_visitors,0), (set_visitor,1,"trp_tutorial_maceman"), (set_visitor,2,"trp_tutorial_swordsman"), (set_jump_mission,"mt_tutorial_3"), (jump_to_scene,"scn_tutorial_3"),(change_screen_mission)]), ("tutorial_3b",[(eq,0,1)],"Tutorial 3 b",[(try_begin), (ge, "$tutorial_3_state", 12), (modify_visitors_at_site,"scn_tutorial_3"),(reset_visitors,0), (set_visitor,1,"trp_tutorial_maceman"), (set_visitor,2,"trp_tutorial_swordsman"), (set_jump_mission,"mt_tutorial_3_2"), (jump_to_scene,"scn_tutorial_3"), (change_screen_mission), (else_try), (display_message,"str_door_locked",0xFFFFAAAA), (try_end)], "next level"), ("tutorial_4",[],"Tutorial #4: Riding a horse. {s4}",[ (modify_visitors_at_site,"scn_tutorial_4"),(reset_visitors,0), (set_jump_mission,"mt_tutorial_4"), (jump_to_scene,"scn_tutorial_4"),(change_screen_mission)]), ("tutorial_5",[(eq,1,0)],"Tutorial #5: Commanding a band of soldiers. {s5}",[ (modify_visitors_at_site,"scn_tutorial_5"),(reset_visitors,0), (set_visitor,0,"trp_player"), (set_visitor,1,"trp_vaegir_infantry"), (set_visitor,2,"trp_vaegir_infantry"), (set_visitor,3,"trp_vaegir_infantry"), (set_visitor,4,"trp_vaegir_infantry"), (set_jump_mission,"mt_tutorial_5"), (jump_to_scene,"scn_tutorial_5"),(change_screen_mission)]), ("go_back_dot",[],"Go back.", [(change_screen_quit), ] ), ] ), # This needs to be the fifth window!!! ("reports",0, "Character Renown: {reg5}^Honor Rating: {reg6}^Party Morale: {reg8}^Party Size Limit: {reg7}^", "none", [(call_script, "script_game_get_party_companion_limit"), (assign, ":party_size_limit", reg0), (troop_get_slot, ":renown", "trp_player", slot_troop_renown), (assign, reg5, ":renown"), (assign, reg6, "$player_honor"), (assign, reg7, ":party_size_limit"), (party_get_morale, reg8, "p_main_party"), ], [ ("cheat_faction_orders",[(eq,"$cheat_mode",1)],"Cheat: Faction orders.", [(jump_to_menu, "mnu_faction_orders"), ] ), ("view_character_report",[],"View character report.", [(jump_to_menu, "mnu_character_report"), ] ), ("view_party_size_report",[],"View party size report.", [(jump_to_menu, "mnu_party_size_report"), ] ), ("view_morale_report",[],"View party morale report.", [(jump_to_menu, "mnu_morale_report"), ] ), #NPC companion changes begin ## ("view_party_preferences",[],"View party management preferences.", ## [(jump_to_menu, "mnu_party_preferences"), ## ] ## ), ("view_character_report",[(eq,"$cheat_mode",1)],"NPC status check.", [ (try_for_range, ":npc", companions_begin, companions_end), (main_party_has_troop, ":npc"), (str_store_troop_name, 4, ":npc"), (troop_get_slot, reg3, ":npc", slot_troop_morality_state), (troop_get_slot, reg4, ":npc", slot_troop_2ary_morality_state), (troop_get_slot, reg5, ":npc", slot_troop_personalityclash_state), (troop_get_slot, reg6, ":npc", slot_troop_personalityclash2_state), (troop_get_slot, reg7, ":npc", slot_troop_personalitymatch_state), (display_message, "@{s4}: M{reg3}, 2M{reg4}, PC{reg5}, 2PC{reg6}, PM{reg7}"), (try_end), ] ), #NPC companion changes end ("view_faction_relations_report",[],"View faction relations report.", [(jump_to_menu, "mnu_faction_relations_report"), ] ), ("resume_travelling",[],"Resume travelling.", [(change_screen_return), ] ), ] ), ( "custom_battle_2",mnf_disable_all_keys, "{s16}", "none", [ (assign, "$g_battle_result", 0), (set_show_messages, 0), (troop_clear_inventory, "trp_player"), (troop_raise_attribute, "trp_player", ca_strength, -1000), (troop_raise_attribute, "trp_player", ca_agility, -1000), (troop_raise_attribute, "trp_player", ca_charisma, -1000), (troop_raise_attribute, "trp_player", ca_intelligence, -1000), (troop_raise_skill, "trp_player", skl_shield, -1000), (troop_raise_skill, "trp_player", skl_athletics, -1000), (troop_raise_skill, "trp_player", skl_riding, -1000), (troop_raise_skill, "trp_player", skl_power_strike, -1000), (troop_raise_skill, "trp_player", skl_power_throw, -1000), (troop_raise_skill, "trp_player", skl_weapon_master, -1000), (troop_raise_skill, "trp_player", skl_horse_archery, -1000), (troop_raise_skill, "trp_player", skl_ironflesh, -1000), (troop_raise_proficiency_linear, "trp_player", wpt_one_handed_weapon, -10000), (troop_raise_proficiency_linear, "trp_player", wpt_two_handed_weapon, -10000), (troop_raise_proficiency_linear, "trp_player", wpt_polearm, -10000), (troop_raise_proficiency_linear, "trp_player", wpt_archery, -10000), (troop_raise_proficiency_linear, "trp_player", wpt_crossbow, -10000), (troop_raise_proficiency_linear, "trp_player", wpt_throwing, -10000), (reset_visitors), ## Scene 1 Start "Shalow Lake War" (try_begin), (eq, "$g_custom_battle_scenario", 0), (assign, "$g_player_troop", "trp_knight_1_15"), (set_player_troop, "$g_player_troop"), (assign, "$g_custom_battle_scene", "scn_quick_battle_1"), (modify_visitors_at_site, "$g_custom_battle_scene"), (set_visitor, 0, "$g_player_troop"), (troop_add_item, "trp_player","itm_bascinet",0), (troop_add_item, "trp_player","itm_mail_with_surcoat",0), (troop_add_item, "trp_player","itm_bastard_sword_a",0), (troop_add_item, "trp_player","itm_war_bow",0), (troop_add_item, "trp_player","itm_khergit_arrows",0), # (troop_add_item, "trp_player","itm_kite_shield",0), (troop_add_item, "trp_player","itm_hunter",0), (troop_add_item, "trp_player","itm_mail_chausses",0), (troop_equip_items, "trp_player"), (set_visitors, 1, "trp_farmer", 13), (set_visitors, 2, "trp_swadian_sergeant", 5), (set_visitors, 3, "trp_swadian_sharpshooter", 4), (set_visitors, 4, "trp_swadian_man_at_arms", 8), (set_visitors, 5, "trp_swadian_knight", 3), (set_visitors, 6, "trp_peasant_woman", 7), ## Enemy (set_visitors, 16, "trp_vaegir_infantry", 6), (set_visitors, 17, "trp_vaegir_archer", 6), (set_visitors, 18, "trp_vaegir_horseman", 4), (set_visitors, 19, "trp_vaegir_knight", 10), (set_visitors, 20, "trp_vaegir_guard", 6), (str_store_string, s16, "str_custom_battle_1"), ## SCENE 3 Start "Mountain Bandit Hunt" (else_try), (eq, "$g_custom_battle_scenario", 1), (assign, "$g_player_troop", "trp_knight_2_5"), (set_player_troop, "$g_player_troop"), (assign, "$g_custom_battle_scene", "scn_quick_battle_3"), (modify_visitors_at_site, "$g_custom_battle_scene"), (set_visitor, 0, "$g_player_troop"), (set_visitors, 1, "trp_vaegir_archer", 4), (set_visitors, 2, "trp_vaegir_archer", 5), (set_visitors, 3, "trp_vaegir_veteran", 4), (set_visitors, 4, "trp_vaegir_horseman", 4), (set_visitors, 5, "trp_vaegir_footman", 2), (set_visitors, 6, "trp_vaegir_knight", 4), ## ENEMY (set_visitors, 16, "trp_mountain_bandit", 4), (set_visitors, 17, "trp_bandit", 8), (set_visitors, 18, "trp_mountain_bandit", 8), (set_visitors, 19, "trp_mountain_bandit", 6), (set_visitors, 20, "trp_sea_raider", 5), (set_visitors, 21, "trp_mountain_bandit", 4), (set_visitors, 22, "trp_brigand", 6), (set_visitors, 23, "trp_sea_raider", 8), (set_visitors, 25, "trp_brigand", 10), (str_store_string, s16, "str_custom_battle_2"), ## SCENE 4 Start "Grand Stand" (else_try), (eq, "$g_custom_battle_scenario", 2), (assign, "$g_player_troop", "trp_knight_5_1_wife"), (set_player_troop, "$g_player_troop"), (troop_raise_attribute, "$g_player_troop", ca_strength, 12), (troop_raise_attribute, "$g_player_troop", ca_agility, 9), (troop_raise_attribute, "$g_player_troop", ca_charisma, 5), (troop_raise_attribute, "$g_player_troop", ca_intelligence, 5), (troop_raise_skill, "$g_player_troop", skl_shield, 3), (troop_raise_skill, "$g_player_troop", skl_athletics, 2), (troop_raise_skill, "$g_player_troop", skl_riding, 3), (troop_raise_skill, "$g_player_troop", skl_power_strike, 4), (troop_raise_skill, "$g_player_troop", skl_power_draw, 5), (troop_raise_skill, "$g_player_troop", skl_weapon_master, 4), (troop_raise_skill, "$g_player_troop", skl_ironflesh, 6), (troop_raise_proficiency_linear, "$g_player_troop", wpt_one_handed_weapon, 100), (troop_raise_proficiency_linear, "$g_player_troop", wpt_two_handed_weapon, 30), (troop_raise_proficiency_linear, "$g_player_troop", wpt_polearm, 20), (troop_raise_proficiency_linear, "$g_player_troop", wpt_crossbow, 110), (troop_raise_proficiency_linear, "$g_player_troop", wpt_throwing, 10), (assign, "$g_custom_battle_scene", "scn_quick_battle_4"), (modify_visitors_at_site, "$g_custom_battle_scene"), (set_visitor, 0, "$g_player_troop"), (troop_clear_inventory, "$g_player_troop"), (troop_add_item, "$g_player_troop","itm_helmet_with_neckguard",0), (troop_add_item, "$g_player_troop","itm_plate_armor",0), (troop_add_item, "$g_player_troop","itm_iron_greaves",0), (troop_add_item, "$g_player_troop","itm_mail_chausses",0), (troop_add_item, "$g_player_troop","itm_tab_shield_small_round_c",0), (troop_add_item, "$g_player_troop","itm_heavy_crossbow",0), (troop_add_item, "$g_player_troop","itm_bolts",0), (troop_add_item, "$g_player_troop","itm_sword_medieval_b_small",0), (troop_equip_items, "$g_player_troop"), ## US (set_visitors, 1, "trp_vaegir_infantry", 4), (set_visitors, 2, "trp_vaegir_archer", 3), (set_visitors, 3, "trp_vaegir_infantry", 4), (set_visitors, 4, "trp_vaegir_archer", 3), (set_visitors, 5, "trp_vaegir_infantry", 3), (set_visitors, 6, "trp_vaegir_footman", 5), (set_visitors, 7, "trp_vaegir_footman", 4), (set_visitors, 8, "trp_vaegir_archer", 3), ## ENEMY (set_visitors, 16, "trp_swadian_footman", 8), (set_visitors, 17, "trp_swadian_crossbowman", 9), (set_visitors, 18, "trp_swadian_sergeant", 7), (set_visitors, 19, "trp_swadian_sharpshooter", 8), (set_visitors, 20, "trp_swadian_militia", 13), (str_store_string, s16, "str_custom_battle_3"), ## Scene 5 START (else_try), (eq, "$g_custom_battle_scenario", 3), (assign, "$g_player_troop", "trp_knight_1_10"), (set_player_troop, "$g_player_troop"), (assign, "$g_custom_battle_scene", "scn_quick_battle_5"), (modify_visitors_at_site, "$g_custom_battle_scene"), (set_visitor, 0, "$g_player_troop"), ## US (set_visitors, 1, "trp_swadian_knight", 3), (set_visitors, 2, "trp_swadian_sergeant", 4), (set_visitors, 3, "trp_swadian_sharpshooter", 8), (set_visitors, 4, "trp_swadian_man_at_arms", 8), (set_visitors, 5, "trp_swadian_knight", 2), ## enemy (set_visitors, 16, "trp_vaegir_infantry", 8), (set_visitors, 17, "trp_vaegir_archer", 10), (set_visitors, 18, "trp_vaegir_horseman", 4), (set_visitors, 19, "trp_vaegir_knight", 10), (set_visitors, 20, "trp_vaegir_guard", 7), (str_store_string, s16, "str_custom_battle_4"), (else_try), (eq, "$g_custom_battle_scenario", 4), ## (assign, "$g_custom_battle_scene", "scn_quick_battle_6"), (assign, "$g_custom_battle_scene", "scn_quick_battle_7"), # Player Wear (assign, "$g_player_troop", "trp_knight_4_9"), (set_player_troop, "$g_player_troop"), (modify_visitors_at_site, "$g_custom_battle_scene"), (set_visitor, 0, "$g_player_troop"), (set_visitors, 1, "trp_nord_archer", 4), (set_visitors, 2, "trp_nord_archer", 4), (set_visitors, 3, "trp_nord_champion", 6), (set_visitors, 4, "trp_nord_veteran", 7), (set_visitors, 5, "trp_nord_warrior", 7), (set_visitors, 6, "trp_nord_trained_footman", 9), ## ENEMY (set_visitors, 11, "trp_vaegir_knight", 2), (set_visitors, 12, "trp_vaegir_guard", 3), (set_visitors, 13, "trp_vaegir_infantry", 6), (set_visitors, 14, "trp_vaegir_veteran", 8), (set_visitors, 16, "trp_vaegir_skirmisher", 5), (set_visitors, 17, "trp_vaegir_archer", 4), (set_visitors, 18, "trp_vaegir_marksman", 2), (set_visitors, 19, "trp_vaegir_skirmisher", 4), (set_visitors, 20, "trp_vaegir_skirmisher", 3), (set_visitors, 21, "trp_vaegir_skirmisher", 3), (set_visitors, 22, "trp_vaegir_skirmisher", 3), (set_visitors, 23, "trp_vaegir_archer", 2), (str_store_string, s16, "str_custom_battle_5"), (try_end), (set_show_messages, 1), ], [ ("custom_battle_go",[],"Start.", [(try_begin), (eq, "$g_custom_battle_scenario", 2), (set_jump_mission,"mt_custom_battle_siege"), (else_try), (eq, "$g_custom_battle_scenario", 4), (set_jump_mission,"mt_custom_battle_5"), (else_try), (set_jump_mission,"mt_custom_battle"), (try_end), (jump_to_menu, "mnu_custom_battle_end"), (jump_to_scene,"$g_custom_battle_scene"), (change_screen_mission), ] ), ("leave_custom_battle_2",[],"Cancel.", [(jump_to_menu, "mnu_start_game_3"), ] ), ] ), ( "custom_battle_end",mnf_disable_all_keys, "The battle is over. {s1} Your side killed {reg5} enemies and lost {reg6} troops over the battle. You personally slew {reg7} men in the fighting.", "none", [(music_set_situation, 0), (assign, reg5, "$g_custom_battle_team2_death_count"), (assign, reg6, "$g_custom_battle_team1_death_count"), (get_player_agent_kill_count, ":kill_count"), (get_player_agent_kill_count, ":wound_count", 1), (store_add, reg7, ":kill_count", ":wound_count"), (try_begin), (eq, "$g_battle_result", 1), (str_store_string, s1, "str_battle_won"), (else_try), (str_store_string, s1, "str_battle_lost"), (try_end),], [ ("continue",[],"Continue.", [(change_screen_quit), ] ), ] ), ( "start_character_1",mnf_disable_all_keys, "You were born years ago, in a land far away. Your father was...", "none", [ (str_clear,s10), (str_clear,s11), (str_clear,s12), (str_clear,s13), (str_clear,s14), (str_clear,s15), ], [ ("start_noble",[],"An impoverished noble.",[ (assign,"$background_type",cb_noble), (assign, reg3, "$character_gender"), (str_store_string,s10,"@You came into the world a {reg3?daughter:son} of declining nobility,\ owning only the house in which they lived. However, despite your family's hardships,\ they afforded you a good education and trained you from childhood for the rigors of aristocracy and life at court."), (jump_to_menu,"mnu_start_character_2"), ]), ("start_merchant",[],"A travelling merchant.",[ (assign,"$background_type",cb_merchant), (assign, reg3, "$character_gender"), (str_store_string,s10,"@You were born the {reg3?daughter:son} of travelling merchants,\ always moving from place to place in search of a profit. Although your parents were wealthier than most\ and educated you as well as they could, you found little opportunity to make friends on the road,\ living mostly for the moments when you could sell something to somebody."), (jump_to_menu,"mnu_start_character_2"), ]), ("start_guard",[],"A veteran warrior.",[ (assign,"$background_type",cb_guard), (assign, reg3, "$character_gender"), (str_store_string,s10,"@As a child, your family scrabbled out a meagre living from your father's wages\ as a guardsman to the local lord. It was not an easy existence, and you were too poor to get much of an\ education. You learned mainly how to defend yourself on the streets, with or without a weapon in hand."), (jump_to_menu,"mnu_start_character_2"), ]), ("start_forester",[],"A hunter.",[ (assign,"$background_type",cb_forester), (assign, reg3, "$character_gender"), (str_store_string,s11,"@{reg3?daughter:son}"), (str_store_string,s10,"@You were the {reg3?daughter:son} of a family who lived off the woods,\ doing whatever they needed to make ends meet. Hunting, woodcutting, making arrows,\ even a spot of poaching whenever things got tight. Winter was never a good time for your family\ as the cold took animals and people alike, but you always lived to see another dawn,\ though your brothers and sisters might not be so fortunate."), (jump_to_menu,"mnu_start_character_2"), ]), ("start_nomad",[],"A steppe nomad.",[ (assign,"$background_type",cb_nomad), (assign, reg3, "$character_gender"), (str_store_string,s11,"@{reg3?daughter:son}"), (str_store_string,s10,"@You were a child of the steppe, born to a tribe of wandering nomads who lived\ in great camps throughout the arid grasslands.\ Like the other tribesmen, your family revered horses above almost everything else, and they taught you\ how to ride almost before you learned how to walk. "), (jump_to_menu,"mnu_start_character_2"), ]), ("start_thief",[],"A thief.",[ (assign,"$background_type",cb_thief), (assign, reg3, "$character_gender"), (str_store_string,s10,"@As the {reg3?daughter:son} of a thief, you had very little 'formal' education.\ Instead you were out on the street, begging until you learned how to cut purses, cutting purses\ until you learned how to pick locks, all the way through your childhood.\ Still, these long years made you streetwise and sharp to the secrets of cities and shadowy backways."), (jump_to_menu,"mnu_start_character_2"), ]), ## ("start_priest",[],"Priests.",[ ## (assign,"$background_type",cb_priest), ## (assign, reg3, "$character_gender"), ## (str_store_string,s10,"@A {reg3?daughter:son} that nobody wanted, you were left to the church as a baby,\ ## a foundling raised by the priests and nuns to their own traditions.\ ## You were only one of many other foundlings and orphans, but you nonetheless received a lot of attention\ ## as well as many years of study in the church library and before the altar. They taught you many things.\ ## Gradually, faith became such a part of your life that it was no different from the blood coursing through your veins."), ## (jump_to_menu,"mnu_start_character_2"), ## ]), ("go_back",[],"Go back", [(jump_to_menu,"mnu_start_game_1"), ]), ] ), ( "start_character_2",0, "{s10}^^ You started to learn about the world almost as soon as you could walk and talk. You spent your early life as...", "none", [], [ ("page",[ ],"A page at a nobleman's court.",[ (assign,"$background_answer_2", cb2_page), (assign, reg3, "$character_gender"), (str_store_string,s11,"@As a {reg3?girl:boy} growing out of childhood,\ you were sent to live in the court of one of the nobles of the land.\ There, your first lessons were in humility, as you waited upon the lords and ladies of the household.\ But from their chess games, their gossip, even the poetry of great deeds and courtly love, you quickly began to learn about the adult world of conflict\ and competition. You also learned from the rough games of the other children, who battered at each other with sticks in imitation of their elders' swords."), (jump_to_menu,"mnu_start_character_3"), ]), ("apprentice",[ ],"A craftsman's apprentice.",[ (assign,"$background_answer_2", cb2_apprentice), (assign, reg3, "$character_gender"), (str_store_string,s11,"@As a {reg3?girl:boy} growing out of childhood,\ you apprenticed with a local craftsman to learn a trade. After years of hard work and study under your\ new master, he promoted you to journeyman and employed you as a fully paid craftsman for as long as\ you wished to stay."), (jump_to_menu,"mnu_start_character_3"), ]), ("stockboy",[ ],"A shop assistant.",[ (assign,"$background_answer_2",cb2_merchants_helper), (assign, reg3, "$character_gender"), (str_store_string,s11,"@As a {reg3?girl:boy} growing out of childhood,\ you apprenticed to a wealthy merchant, picking up the trade over years of working shops and driving caravans.\ You soon became adept at the art of buying low, selling high, and leaving the customer thinking they'd\ got the better deal."), (jump_to_menu,"mnu_start_character_3"), ]), ("urchin",[ ],"A street urchin.",[ (assign,"$background_answer_2",cb2_urchin), (assign, reg3, "$character_gender"), (str_store_string,s11,"@As a {reg3?girl:boy} growing out of childhood,\ you took to the streets, doing whatever you must to survive.\ Begging, thieving and working for gangs to earn your bread, you lived from day to day in this violent world,\ always one step ahead of the law and those who wished you ill."), (jump_to_menu,"mnu_start_character_3"), ]), ("nomad",[ ],"A steppe child.",[ (assign,"$background_answer_2",cb2_steppe_child), (assign, reg3, "$character_gender"), (str_store_string,s11,"@As a {reg3?girl:boy} growing out of childhood,\ you rode the great steppes on a horse of your own, learning the ways of the grass and the desert.\ Although you sometimes went hungry, you became a skillful hunter and pathfinder in this trackless country.\ Your body too started to harden with muscle as you grew into the life of a nomad {reg3?woman:man}."), (jump_to_menu,"mnu_start_character_3"), ]), ## ("mummer",[],"Mummer.",[ ## (assign,"$background_answer_2",5), ## (assign, reg3, "$character_gender"), ## (str_store_string,s13,"@{reg3?woman:man}"), ## (str_store_string,s12,"@{reg3?girl:boy}"), ## (str_store_string,s11,"@As a {s12} growing out of childhood,\ ## you attached yourself to a troupe of wandering entertainers, going from town to town setting up mummer's\ ## shows. It was a life of hard work, selling, begging and stealing your living from the punters who flocked\ ## to watch your antics. Over time you became a performer well capable of attracting a crowd."), ## (jump_to_menu,"mnu_start_character_3"), ## ]), ## ("courtier",[],"Courtier.",[ ## (assign,"$background_answer_2",6), ## (assign, reg3, "$character_gender"), ## (str_store_string,s13,"@{reg3?woman:man}"), ## (str_store_string,s12,"@{reg3?girl:boy}"), ## (str_store_string,s11,"@As a {s12} growing out of childhood,\ ## you spent much of your life at court, inserting yourself into the tightly-knit circles of nobility.\ ## With the years you became more and more involved with the politics and intrigue demanded of a high-born {s13}.\ ## You could not afford to remain a stranger to backstabbing and political violence, even if you wanted to."), ## (jump_to_menu,"mnu_start_character_3"), ## ]), ## ("noble",[],"Noble in training.",[ ## (assign,"$background_answer_2",7), ## (assign, reg3, "$character_gender"), ## (str_store_string,s13,"@{reg3?woman:man}"), ## (str_store_string,s12,"@{reg3?girl:boy}"), ## (try_begin), ## (eq,"$character_gender",tf_male), ## (str_store_string,s11,"@As a {s12} growing out of childhood,\ ## you were trained and educated to perform the duties and wield the rights of a noble landowner.\ ## The managing of taxes and rents were equally important in your education as diplomacy and even\ ## personal defence. You learned everything you needed to become a lord of your own hall."), ## (else_try), ## (str_store_string,s11,"@As a {s12} growing out of childhood,\ ## you were trained and educated to the duties of a noble {s13}. You learned much about the household arts,\ ## but even more about diplomacy and decorum, and all the things that a future husband might choose to speak of.\ ## Truly, you became every inch as shrewd as any lord, though it would be rude to admit it aloud."), ## (try_end), ## (jump_to_menu,"mnu_start_character_3"), ## ]), ## ("acolyte",[],"Cleric acolyte.",[ ## (assign,"$background_answer_2",8), ## (assign, reg3, "$character_gender"), ## (str_store_string,s13,"@{reg3?woman:man}"), ## (str_store_string,s12,"@{reg3?girl:boy}"), ## (str_store_string,s11,"@As a {s12} growing out of childhood,\ ## you became an acolyte in the church, the lowest rank on the way to priesthood.\ ## Years of rigorous learning and hard work followed. You were one of several acolytes,\ ## performing most of the menial labour in the church in addition to being trained for more holy tasks.\ ## On the night of your adulthood you were allowed to conduct your first service.\ ## After that you were no longer an acolyte {s12}, but a {s13} waiting to take your vows into the service of God."), ## (jump_to_menu,"mnu_start_character_3"), ## ]), ("go_back",[],"Go back.", [(jump_to_menu,"mnu_start_character_1"), ]), ] ), ( "start_character_3",mnf_disable_all_keys, "{s11}^^ Then, as a young adult, life changed as it always does. You became...", "none", [(assign, reg3, "$character_gender"),], [ ## ("bravo",[],"A travelling bravo.",[ ## (assign,"$background_answer_3",1), ## (str_store_string,s14,"@{reg3?daughter:man}"), ## (str_store_string,s13,"@{reg3?woman:man}"), ## (str_store_string,s12,"@Though the distinction felt sudden to you,\ ## somewhere along the way you had become a {s13}, and the whole world seemed to change around you.\ ## You left your old life behind to travel the roads as a mercenary, a bravo, guarding caravans for coppers\ ## or bashing in heads for silvers. You became a {s14} of the open road, working with bandits as often as against.\ ## Going from fight to fight, you grew experienced at battle, and you learned what it was to kill."), ## (jump_to_menu,"mnu_start_character_4"), ## ]), ## ("merc",[],"A sellsword in foreign lands.",[ ## (assign,"$background_answer_3",2), ## (str_store_string,s14,"@{reg3?daughter:man}"), ## (str_store_string,s13,"@{reg3?woman:man}"), ## (str_store_string,s12,"@Though the distinction felt sudden to you,\ ## somewhere along the way you had become a {s13}, and the whole world seemed to change around you.\ ## You signed on with a mercenary company and travelled far from your home. The life you found was rough and\ ## ready, marching to the beat of strange drums and learning unusual ways of fighting.\ ## There were men who taught you how to wield any weapon you desired, and plenty of battles to hone your skills.\ ## You were one of the charmed few who survived through every campaign in which you marched."), ## (jump_to_menu,"mnu_start_character_4"), ## ]), ("squire",[(eq,"$character_gender",tf_male)],"A squire.",[ (assign,"$background_answer_3",cb3_squire), (str_store_string,s14,"@{reg3?daughter:man}"), (str_store_string,s12,"@Though the distinction felt sudden to you,\ somewhere along the way you had become a {reg3?woman:man}, and the whole world seemed to change around you.\ When you were named squire to a noble at court, you practiced long hours with weapons,\ learning how to deal out hard knocks and how to take them, too.\ You were instructed in your obligations to your lord, and of your duties to those who might one day be your vassals.\ But in addition to learning the chivalric ideal, you also learned about the less uplifting side\ -- old warriors' stories of ruthless power politics, of betrayals and usurpations,\ of men who used guile as well as valor to achieve their aims."), (jump_to_menu,"mnu_start_character_4"), ]), ("lady",[(eq,"$character_gender",tf_female)],"A lady-in-waiting.",[ (assign,"$background_answer_3",cb3_lady_in_waiting), (str_store_string,s14,"@{reg3?daughter:man}"), (str_store_string,s13,"@{reg3?woman:man}"), (str_store_string,s12,"@Though the distinction felt sudden to you,\ somewhere along the way you had become a {s13}, and the whole world seemed to change around you.\ You joined the tightly-knit circle of women at court, ladies who all did proper ladylike things,\ the wives and mistresses of noble men as well as maidens who had yet to find a husband.\ However, even here you found politics at work as the ladies schemed for prominence and fought each other\ bitterly to catch the eye of whatever unmarried man was in fashion at court.\ You soon learned ways of turning these situations and goings-on to your advantage. With it came the\ realisation that you yourself could wield great influence in the world, if only you applied yourself\ with a little bit of subtlety."), (jump_to_menu,"mnu_start_character_4"), ]), ("troubadour",[],"A troubadour.",[ (assign,"$background_answer_3",cb3_troubadour), (str_store_string,s14,"@{reg3?daughter:man}"), (str_store_string,s13,"@{reg3?woman:man}"), (str_store_string,s12,"@Though the distinction felt sudden to you,\ somewhere along the way you had become a {s13}, and the whole world seemed to change around you.\ You set out on your own with nothing except the instrument slung over your back and your own voice.\ It was a poor existence, with many a hungry night when people failed to appreciate your play,\ but you managed to survive on your music alone. As the years went by you became adept at playing the\ drunken crowds in your taverns, and even better at talking anyone out of anything you wanted."), (jump_to_menu,"mnu_start_character_4"), ]), ("student",[],"A university student.",[ (assign,"$background_answer_3",cb3_student), (str_store_string,s12,"@Though the distinction felt sudden to you,\ somewhere along the way you had become a {reg3?woman:man}, and the whole world seemed to change around you.\ You found yourself as a student in the university of one of the great cities,\ where you studied theology, philosophy, and medicine.\ But not all your lessons were learned in the lecture halls.\ You may or may not have joined in with your fellows as they roamed the alleys in search of wine, women, and a good fight.\ However, you certainly were able to observe how a broken jaw is set,\ or how an angry townsman can be persuaded to set down his club and accept cash compensation for the destruction of his shop."), (jump_to_menu,"mnu_start_character_4"), ]), ("peddler",[],"A goods peddler.",[ (assign,"$background_answer_3",cb3_peddler), (str_store_string,s14,"@{reg3?daughter:man}"), (str_store_string,s13,"@{reg3?woman:man}"), (str_store_string,s12,"@Though the distinction felt sudden to you,\ somewhere along the way you had become a {s13}, and the whole world seemed to change around you.\ Heeding the call of the open road, you travelled from village to village buying and selling what you could.\ It was not a rich existence, but you became a master at haggling even the most miserly elders into\ giving you a good price. Soon, you knew, you would be well-placed to start your own trading empire..."), (jump_to_menu,"mnu_start_character_4"), ]), ("craftsman",[],"A smith.",[ (assign,"$background_answer_3", cb3_craftsman), (str_store_string,s14,"@{reg3?daughter:man}"), (str_store_string,s13,"@{reg3?woman:man}"), (str_store_string,s12,"@Though the distinction felt sudden to you,\ somewhere along the way you had become a {s13}, and the whole world seemed to change around you.\ You pursued a career as a smith, crafting items of function and beauty out of simple metal.\ As time wore on you became a master of your trade, and fine work started to fetch fine prices.\ With food in your belly and logs on your fire, you could take pride in your work and your growing reputation."), (jump_to_menu,"mnu_start_character_4"), ]), ("poacher",[],"A game poacher.",[ (assign,"$background_answer_3", cb3_poacher), (str_store_string,s14,"@{reg3?daughter:man}"), (str_store_string,s13,"@{reg3?woman:man}"), (str_store_string,s12,"@Though the distinction felt sudden to you,\ somewhere along the way you had become a {s13}, and the whole world seemed to change around you.\ Dissatisfied with common men's desperate scrabble for coin, you took to your local lord's own forests\ and decided to help yourself to its bounty, laws be damned. You hunted stags, boars and geese and sold\ the precious meat under the table. You cut down trees right under the watchmen's noses and turned them into\ firewood that warmed many freezing homes during winter. All for a few silvers, of course."), (jump_to_menu,"mnu_start_character_4"), ]), ## ("preacher",[],"Itinerant preacher.",[ ## (assign,"$background_answer_3",6), ## (str_store_string,s14,"@{reg3?daughter:man}"), ## (str_store_string,s13,"@{reg3?woman:man}"), ## (str_store_string,s12,"@Though the distinction felt sudden to you,\ ## somewhere along the way you had become a {s13}, and the whole world seemed to change around you.\ ## You packed your few belongings and went out into the world to spread the word of God. You preached to\ ## anyone who would listen, and impressed many with the passion of your sermons. Though you had taken a vow\ ## to remain in poverty through your itinerant years, you never lacked for food, drink or shelter; the\ ## hospitality of the peasantry was always generous to a rising {s13} of God."), ## (jump_to_menu,"mnu_start_character_4"), ## ]), ("go_back",[],"Go back.", [(jump_to_menu,"mnu_start_character_2"), ] ), ] ), ( "start_character_4",mnf_disable_all_keys, "{s12}^^But soon everything changed and you decided to strike out on your own as an adventurer. What made you take this decision was...", #Finally, what made you decide to strike out on your own as an adventurer?", "none", [], [ ("revenge",[],"Personal revenge.",[ (assign,"$background_answer_4", cb4_revenge), (str_store_string,s13,"@Only you know exactly what caused you to give up your old life and become an adventurer.\ Still, it was not a difficult choice to leave, with the rage burning brightly in your heart.\ You want vengeance. You want justice. What was done to you cannot be undone,\ and these debts can only be paid in blood..."), (jump_to_menu,"mnu_choose_skill"), ]), ("death",[],"The loss of a loved one.",[ (assign,"$background_answer_4",cb4_loss), (str_store_string,s13,"@Only you know exactly what caused you to give up your old life and become an adventurer.\ All you can say is that you couldn't bear to stay, not with the memories of those you loved so close and so\ painful. Perhaps your new life will let you forget,\ or honour the name that you can no longer bear to speak..."), (jump_to_menu,"mnu_choose_skill"), ]), ("wanderlust",[],"Wanderlust.",[ (assign,"$background_answer_4",cb4_wanderlust), (str_store_string,s13,"@Only you know exactly what caused you to give up your old life and become an adventurer.\ You're not even sure when your home became a prison, when the familiar became mundane, but your dreams of\ wandering have taken over your life. Whether you yearn for some faraway place or merely for the open road and the\ freedom to travel, you could no longer bear to stay in the same place. You simply went and never looked back..."), (jump_to_menu,"mnu_choose_skill"), ]), ## ("fervor",[],"Religious fervor.",[ ## (assign,"$background_answer_4",4), ## (str_store_string,s13,"@Only you know exactly what caused you to give up your old life and become an adventurer.\ ## Regardless, the intense faith burning in your soul would not let you find peace in any single place.\ ## There were others in the world, souls to be washed in the light of God. Now you preach wherever you go,\ ## seeking to bring salvation and revelation to the masses, be they faithful or pagan. They will all know the\ ## glory of God by the time you're done..."), ## (jump_to_menu,"mnu_choose_skill"), ## ]), ("disown",[],"Being forced out of your home.",[ (assign,"$background_answer_4",cb4_disown), (str_store_string,s13,"@Only you know exactly what caused you to give up your old life and become an adventurer.\ However, you know you cannot go back. There's nothing to go back to. Whatever home you may have had is gone\ now, and you must face the fact that you're out in the wide wide world. Alone to sink or swim..."), (jump_to_menu,"mnu_choose_skill"), ]), ("greed",[],"Lust for money and power.",[ (assign,"$background_answer_4",cb4_greed), (str_store_string,s13,"@Only you know exactly what caused you to give up your old life and become an adventurer.\ To everyone else, it's clear that you're now motivated solely by personal gain.\ You want to be rich, powerful, respected, feared.\ You want to be the one whom others hurry to obey.\ You want people to know your name, and tremble whenever it is spoken.\ You want everything, and you won't let anyone stop you from having it..."), (jump_to_menu,"mnu_choose_skill"), ]), ("go_back",[],"Go back.", [(jump_to_menu,"mnu_start_character_3"), ] ), ] ), ( "choose_skill",mnf_disable_all_keys, "{s13}", "none", [(assign,"$current_string_reg",10)], [ ## ("start_swordsman",[],"Swordsmanship.",[ ## (assign, "$starting_skill", 1), ## (str_store_string, s14, "@You are particularly talented at swordsmanship."), ## (jump_to_menu,"mnu_past_life_explanation"), ## ]), ## ("start_archer",[],"Archery.",[ ## (assign, "$starting_skill", 2), ## (str_store_string, s14, "@You are particularly talented at archery."), ## (jump_to_menu,"mnu_past_life_explanation"), ## ]), ## ("start_medicine",[],"Medicine.",[ ## (assign, "$starting_skill", 3), ## (str_store_string, s14, "@You are particularly talented at medicine."), ## (jump_to_menu,"mnu_past_life_explanation"), ## ]), ("begin_adventuring",[],"Become an adventurer and ride to Calradia.",[ (set_show_messages, 0), (try_begin), (eq,"$character_gender",0), (troop_raise_attribute, "trp_player",ca_strength,1), (troop_raise_attribute, "trp_player",ca_charisma,1), (else_try), (troop_raise_attribute, "trp_player",ca_agility,1), (troop_raise_attribute, "trp_player",ca_intelligence,1), (try_end), (troop_raise_attribute, "trp_player",ca_strength,1), (troop_raise_attribute, "trp_player",ca_agility,1), (troop_raise_attribute, "trp_player",ca_charisma,1), (troop_raise_skill, "trp_player","skl_leadership",1), (troop_raise_skill, "trp_player","skl_riding",1), ## (try_begin), ## (eq, "$starting_skill", 1), ## (troop_raise_attribute, "trp_player",ca_agility,1), ## (troop_raise_attribute, "trp_player",ca_strength,1), ## (troop_raise_skill, "trp_player",skl_power_strike,2), ## (troop_raise_proficiency, "trp_player",0,30), ## (troop_raise_proficiency, "trp_player",1,20), ## (else_try), ## (eq, "$starting_skill", 2), ## (troop_raise_attribute, "trp_player",ca_strength,2), ## (troop_raise_skill, "trp_player",skl_power_draw,2), ## (troop_raise_proficiency, "trp_player",3,50), ## (else_try), ## (troop_raise_attribute, "trp_player",ca_intelligence,1), ## (troop_raise_attribute, "trp_player",ca_charisma,1), ## (troop_raise_skill, "trp_player",skl_first_aid,1), ## (troop_raise_skill, "trp_player",skl_wound_treatment,1), ## (troop_add_item, "trp_player","itm_winged_mace",0), ## (troop_raise_proficiency, "trp_player",0,15), ## (troop_raise_proficiency, "trp_player",1,15), ## (troop_raise_proficiency, "trp_player",2,15), ## (try_end), (try_begin), (eq,"$background_type",cb_noble), (eq,"$character_gender",tf_male), (troop_raise_attribute, "trp_player",ca_intelligence,1), (troop_raise_attribute, "trp_player",ca_charisma,2), (troop_raise_skill, "trp_player",skl_weapon_master,1), (troop_raise_skill, "trp_player",skl_power_strike,1), (troop_raise_skill, "trp_player",skl_riding,1), (troop_raise_skill, "trp_player",skl_tactics,1), (troop_raise_skill, "trp_player",skl_leadership,1), (troop_raise_proficiency, "trp_player",wpt_one_handed_weapon,10), (troop_raise_proficiency, "trp_player",wpt_two_handed_weapon,10), (troop_raise_proficiency, "trp_player",wpt_polearm,10), (troop_add_item, "trp_player","itm_tab_shield_round_a",imod_battered), (troop_set_slot, "trp_player", slot_troop_renown, 100), (call_script, "script_change_player_honor", 3), ## (troop_add_item, "trp_player","itm_red_gambeson",imod_plain), ## (troop_add_item, "trp_player","itm_sword",imod_plain), ## (troop_add_item, "trp_player","itm_dagger",imod_balanced), ## (troop_add_item, "trp_player","itm_woolen_hose",0), ## (troop_add_item, "trp_player","itm_dried_meat",0), ## (troop_add_item, "trp_player","itm_saddle_horse",imod_plain), (troop_add_gold, "trp_player", 100), (else_try), (eq,"$background_type",cb_noble), (eq,"$character_gender",tf_female), (troop_raise_attribute, "trp_player",ca_intelligence,2), (troop_raise_attribute, "trp_player",ca_charisma,1), (troop_raise_skill, "trp_player",skl_wound_treatment,1), (troop_raise_skill, "trp_player",skl_riding,2), (troop_raise_skill, "trp_player",skl_first_aid,1), (troop_raise_skill, "trp_player",skl_leadership,1), (troop_raise_proficiency, "trp_player",wpt_one_handed_weapon,20), (troop_set_slot, "trp_player", slot_troop_renown, 50), (troop_add_item, "trp_player","itm_tab_shield_round_a",imod_battered), ## (troop_add_item, "trp_player","itm_dress",imod_sturdy), ## (troop_add_item, "trp_player","itm_dagger",imod_watered_steel), ## (troop_add_item, "trp_player","itm_woolen_hose",0), ## (troop_add_item, "trp_player","itm_hunting_crossbow",0), ## (troop_add_item, "trp_player","itm_bolts",0), ## (troop_add_item, "trp_player","itm_smoked_fish",0), ## (troop_add_item, "trp_player","itm_courser",imod_spirited), (troop_add_gold, "trp_player", 100), (else_try), (eq,"$background_type",cb_merchant), (troop_raise_attribute, "trp_player",ca_intelligence,2), (troop_raise_attribute, "trp_player",ca_charisma,1), (troop_raise_skill, "trp_player",skl_riding,1), (troop_raise_skill, "trp_player",skl_leadership,1), (troop_raise_skill, "trp_player",skl_trade,2), (troop_raise_skill, "trp_player",skl_inventory_management,1), (troop_raise_proficiency, "trp_player",wpt_two_handed_weapon,10), ## (troop_add_item, "trp_player","itm_leather_jacket",0), ## (troop_add_item, "trp_player","itm_leather_boots",0), ## (troop_add_item, "trp_player","itm_fur_hat",0), ## (troop_add_item, "trp_player","itm_dagger",0), ## (troop_add_item, "trp_player","itm_hunting_crossbow",0), ## (troop_add_item, "trp_player","itm_bolts",0), ## (troop_add_item, "trp_player","itm_smoked_fish",0), ## (troop_add_item, "trp_player","itm_saddle_horse",0), ## (troop_add_item, "trp_player","itm_sumpter_horse",0), ## (troop_add_item, "trp_player","itm_salt",0), ## (troop_add_item, "trp_player","itm_salt",0), ## (troop_add_item, "trp_player","itm_salt",0), ## (troop_add_item, "trp_player","itm_pottery",0), ## (troop_add_item, "trp_player","itm_pottery",0), (troop_add_gold, "trp_player", 250), (troop_set_slot, "trp_player", slot_troop_renown, 20), (else_try), (eq,"$background_type",cb_guard), (troop_raise_attribute, "trp_player",ca_strength,1), (troop_raise_attribute, "trp_player",ca_agility,1), (troop_raise_attribute, "trp_player",ca_charisma,1), (troop_raise_skill, "trp_player","skl_ironflesh",1), (troop_raise_skill, "trp_player","skl_power_strike",1), (troop_raise_skill, "trp_player","skl_weapon_master",1), (troop_raise_skill, "trp_player","skl_leadership",1), (troop_raise_skill, "trp_player","skl_trainer",1), (troop_raise_proficiency, "trp_player",wpt_one_handed_weapon,10), (troop_raise_proficiency, "trp_player",wpt_two_handed_weapon,15), (troop_raise_proficiency, "trp_player",wpt_polearm,20), (troop_raise_proficiency, "trp_player",wpt_throwing,10), (troop_add_item, "trp_player","itm_tab_shield_kite_b",imod_battered), ## (troop_add_item, "trp_player","itm_leather_jerkin",imod_ragged), ## (troop_add_item, "trp_player","itm_skullcap",imod_rusty), ## (troop_add_item, "trp_player","itm_spear",0), ## (troop_add_item, "trp_player","itm_arming_sword",imod_chipped), ## (troop_add_item, "trp_player","itm_hunting_crossbow",0), ## (troop_add_item, "trp_player","itm_hunter_boots",0), ## (troop_add_item, "trp_player","itm_leather_gloves",imod_ragged), ## (troop_add_item, "trp_player","itm_bolts",0), ## (troop_add_item, "trp_player","itm_smoked_fish",0), ## (troop_add_item, "trp_player","itm_saddle_horse",imod_swaybacked), (troop_add_gold, "trp_player", 50), (troop_set_slot, "trp_player", slot_troop_renown, 10), (else_try), (eq,"$background_type",cb_forester), (troop_raise_attribute, "trp_player",ca_strength,1), (troop_raise_attribute, "trp_player",ca_agility,2), (troop_raise_skill, "trp_player","skl_power_draw",1), (troop_raise_skill, "trp_player","skl_tracking",1), (troop_raise_skill, "trp_player","skl_pathfinding",1), (troop_raise_skill, "trp_player","skl_spotting",1), (troop_raise_skill, "trp_player","skl_athletics",1), (troop_raise_proficiency, "trp_player",wpt_two_handed_weapon,10), (troop_raise_proficiency, "trp_player",wpt_archery,30), ## (troop_add_item, "trp_player","itm_short_bow",imod_bent), ## (troop_add_item, "trp_player","itm_arrows",0), ## (troop_add_item, "trp_player","itm_axe",imod_chipped), ## (troop_add_item, "trp_player","itm_rawhide_coat",0), ## (troop_add_item, "trp_player","itm_hide_boots",0), ## (troop_add_item, "trp_player","itm_dried_meat",0), ## (troop_add_item, "trp_player","itm_sumpter_horse",imod_heavy), ## (troop_add_item, "trp_player","itm_furs",0), (troop_add_gold, "trp_player", 30), (else_try), (eq,"$background_type",cb_nomad), (eq,"$character_gender",tf_male), (troop_raise_attribute, "trp_player",ca_strength,1), (troop_raise_attribute, "trp_player",ca_agility,1), (troop_raise_attribute, "trp_player",ca_intelligence,1), (troop_raise_skill, "trp_player","skl_power_draw",1), (troop_raise_skill, "trp_player","skl_horse_archery",1), (troop_raise_skill, "trp_player","skl_pathfinding",1), (troop_raise_skill, "trp_player","skl_riding",2), (troop_raise_proficiency, "trp_player",wpt_one_handed_weapon,10), (troop_raise_proficiency, "trp_player",wpt_archery,30), (troop_raise_proficiency, "trp_player",wpt_throwing,10), (troop_add_item, "trp_player","itm_tab_shield_small_round_a",imod_battered), ## (troop_add_item, "trp_player","itm_javelin",imod_bent), ## (troop_add_item, "trp_player","itm_sword_khergit_1",imod_rusty), ## (troop_add_item, "trp_player","itm_nomad_armor",0), ## (troop_add_item, "trp_player","itm_hide_boots",0), ## (troop_add_item, "trp_player","itm_horse_meat",0), ## (troop_add_item, "trp_player","itm_steppe_horse",0), (troop_add_gold, "trp_player", 15), (troop_set_slot, "trp_player", slot_troop_renown, 10), (else_try), (eq,"$background_type",cb_nomad), (eq,"$character_gender",tf_female), (troop_raise_attribute, "trp_player",ca_strength,1), (troop_raise_attribute, "trp_player",ca_agility,1), (troop_raise_attribute, "trp_player",ca_intelligence,1), (troop_raise_skill, "trp_player","skl_wound_treatment",1), (troop_raise_skill, "trp_player","skl_first_aid",1), (troop_raise_skill, "trp_player","skl_pathfinding",1), (troop_raise_skill, "trp_player","skl_riding",2), (troop_raise_proficiency, "trp_player",wpt_one_handed_weapon,5), (troop_raise_proficiency, "trp_player",wpt_archery,20), (troop_raise_proficiency, "trp_player",wpt_throwing,5), (troop_add_item, "trp_player","itm_tab_shield_small_round_a",imod_battered), ## (troop_add_item, "trp_player","itm_javelin",imod_bent), ## (troop_add_item, "trp_player","itm_sickle",imod_plain), ## (troop_add_item, "trp_player","itm_nomad_armor",0), ## (troop_add_item, "trp_player","itm_hide_boots",0), ## (troop_add_item, "trp_player","itm_steppe_horse",0), ## (troop_add_item, "trp_player","itm_grain",0), (troop_add_gold, "trp_player", 20), (else_try), (eq,"$background_type",cb_thief), (troop_raise_attribute, "trp_player",ca_agility,3), (troop_raise_skill, "trp_player","skl_athletics",2), (troop_raise_skill, "trp_player","skl_power_throw",1), (troop_raise_skill, "trp_player","skl_inventory_management",1), (troop_raise_skill, "trp_player","skl_looting",1), (troop_raise_proficiency, "trp_player",wpt_one_handed_weapon,20), (troop_raise_proficiency, "trp_player",wpt_throwing,20), (troop_add_item, "trp_player","itm_throwing_knives",0), ## (troop_add_item, "trp_player","itm_stones",0), ## (troop_add_item, "trp_player","itm_cudgel",imod_plain), ## (troop_add_item, "trp_player","itm_dagger",imod_rusty), ## (troop_add_item, "trp_player","itm_shirt",imod_tattered), ## (troop_add_item, "trp_player","itm_black_hood",imod_tattered), ## (troop_add_item, "trp_player","itm_wrapping_boots",imod_ragged), (troop_add_gold, "trp_player", 25), ## (else_try), ## (eq,"$background_type",cb_priest), ## (troop_raise_attribute, "trp_player",ca_strength,1), ## (troop_raise_attribute, "trp_player",ca_intelligence,2), ## (troop_raise_attribute, "trp_player",ca_charisma,1), ## (troop_raise_skill, "trp_player",skl_wound_treatment,1), ## (troop_raise_skill, "trp_player",skl_leadership,1), ## (troop_raise_skill, "trp_player",skl_prisoner_management,1), ## (troop_raise_proficiency, "trp_player",0,10), ## (troop_add_item, "trp_player","itm_robe",0), ## (troop_add_item, "trp_player","itm_wrapping_boots",0), ## (troop_add_item, "trp_player","itm_club",0), ## (troop_add_item, "trp_player","itm_smoked_fish",0), ## (troop_add_item, "trp_player","itm_sumpter_horse",0), ## (troop_add_gold, "trp_player", 10), ## (troop_set_slot, "trp_player", slot_troop_renown, 10), (try_end), (try_begin), (eq,"$background_answer_2",cb2_page), (troop_raise_attribute, "trp_player",ca_charisma,1), (troop_raise_attribute, "trp_player",ca_strength,1), (troop_raise_skill, "trp_player","skl_power_strike",1), (troop_raise_skill, "trp_player","skl_persuasion",1), (troop_raise_proficiency, "trp_player",wpt_one_handed_weapon,15), (troop_raise_proficiency, "trp_player",wpt_polearm,5), (else_try), (eq,"$background_answer_2",cb2_apprentice), (troop_raise_attribute, "trp_player",ca_intelligence,1), (troop_raise_attribute, "trp_player",ca_strength,1), (troop_raise_skill, "trp_player","skl_engineer",1), (troop_raise_skill, "trp_player","skl_trade",1), (else_try), (eq,"$background_answer_2",cb2_urchin), (troop_raise_attribute, "trp_player",ca_agility,1), (troop_raise_attribute, "trp_player",ca_intelligence,1), (troop_raise_skill, "trp_player","skl_spotting",1), (troop_raise_skill, "trp_player","skl_looting",1), (troop_raise_proficiency, "trp_player",wpt_one_handed_weapon,15), (troop_raise_proficiency, "trp_player",wpt_throwing,5), (else_try), (eq,"$background_answer_2",cb2_steppe_child), (troop_raise_attribute, "trp_player",ca_strength,1), (troop_raise_attribute, "trp_player",ca_agility,1), (troop_raise_skill, "trp_player","skl_horse_archery",1), (troop_raise_skill, "trp_player","skl_power_throw",1), (troop_raise_proficiency, "trp_player",wpt_archery,15), (call_script,"script_change_troop_renown", "trp_player", 5), (else_try), (eq,"$background_answer_2",cb2_merchants_helper), (troop_raise_attribute, "trp_player",ca_intelligence,1), (troop_raise_attribute, "trp_player",ca_charisma,1), (troop_raise_skill, "trp_player","skl_inventory_management",1), (troop_raise_skill, "trp_player","skl_trade",1), ## (else_try), ## (eq,"$background_answer_2",5), ## (troop_raise_attribute, "trp_player",ca_intelligence,1), ## (troop_raise_attribute, "trp_player",ca_charisma,1), ## (troop_raise_skill, "trp_player",skl_leadership,1), ## (troop_raise_skill, "trp_player",skl_athletics,1), ## (troop_raise_skill, "trp_player",skl_riding,1), ## (troop_raise_proficiency, "trp_player",1,5), ## (troop_raise_proficiency, "trp_player",2,5), ## (call_script,"script_change_troop_renown", "trp_player", 15), ## (else_try), ## (eq,"$background_answer_2",6), ## (troop_raise_attribute, "trp_player",ca_charisma,3), ## (troop_raise_attribute, "trp_player",ca_agility,1), ## (troop_raise_skill, "trp_player",skl_weapon_master,1), ## (troop_raise_proficiency, "trp_player",0,15), ## (troop_raise_proficiency, "trp_player",2,10), ## (troop_raise_proficiency, "trp_player",4,10), ## (call_script,"script_change_troop_renown", "trp_player", 20), ## (else_try), ## (eq,"$background_answer_2",7), ## (troop_raise_attribute, "trp_player",ca_intelligence,1), ## (troop_raise_attribute, "trp_player",ca_charisma,2), ## (troop_raise_skill, "trp_player",skl_leadership,1), ## (troop_raise_skill, "trp_player",skl_tactics,1), ## (troop_raise_proficiency, "trp_player",0,10), ## (troop_raise_proficiency, "trp_player",1,10), ## (call_script,"script_change_troop_renown", "trp_player", 15), ## (else_try), ## (eq,"$background_answer_2",8), ## (troop_raise_attribute, "trp_player",ca_agility,1), ## (troop_raise_attribute, "trp_player",ca_intelligence,1), ## (troop_raise_attribute, "trp_player",ca_charisma,1), ## (troop_raise_skill, "trp_player",skl_leadership,1), ## (troop_raise_skill, "trp_player",skl_surgery,1), ## (troop_raise_skill, "trp_player",skl_first_aid,1), ## (troop_raise_proficiency, "trp_player",2,10), ## (call_script,"script_change_troop_renown", "trp_player", 5), (try_end), (try_begin), ## (eq,"$background_answer_3",1), ## (troop_raise_attribute, "trp_player",ca_strength,1), ## (troop_raise_skill, "trp_player",skl_power_strike,1), ## (troop_raise_skill, "trp_player",skl_shield,1), ## (troop_add_gold, "trp_player", 10), ## (try_begin), ## (this_or_next|player_has_item,"itm_sword"), ## (troop_has_item_equipped,"trp_player","itm_sword"), ## (troop_remove_item, "trp_player","itm_sword"), ## (try_end), ## (try_begin), ## (this_or_next|player_has_item,"itm_arming_sword"), ## (troop_has_item_equipped,"trp_player","itm_arming_sword"), ## (troop_remove_item, "trp_player","itm_arming_sword"), ## (try_end), ## (troop_add_item, "trp_player","itm_short_sword",0), ## (troop_add_item, "trp_player","itm_wooden_shield",imod_battered), ## (troop_raise_proficiency, "trp_player",0,10), ## (troop_raise_proficiency, "trp_player",4,10), ## (else_try), ## (eq,"$background_answer_3",2), ## (troop_raise_attribute, "trp_player",ca_agility,1), ## (troop_raise_skill, "trp_player",skl_weapon_master,1), ## (troop_raise_skill, "trp_player",skl_shield,1), ## (try_begin), ## (this_or_next|player_has_item,"itm_hide_boots"), ## (troop_has_item_equipped,"trp_player","itm_hide_boots"), ## (troop_remove_item, "trp_player","itm_hide_boots"), ## (try_end), ## (troop_add_item, "trp_player","itm_khergit_guard_helmet",imod_crude), ## (troop_add_item, "trp_player","itm_mail_chausses",imod_crude), ## (troop_add_item, "trp_player","itm_sword_khergit_1",imod_plain), ## (troop_add_gold, "trp_player", 20), ## (troop_raise_proficiency, "trp_player",2,20), ## (else_try), (eq,"$background_answer_3",cb3_poacher), (troop_raise_attribute, "trp_player",ca_strength,1), (troop_raise_attribute, "trp_player",ca_agility,1), (troop_raise_skill, "trp_player","skl_power_draw",1), (troop_raise_skill, "trp_player","skl_tracking",1), (troop_raise_skill, "trp_player","skl_spotting",1), (troop_raise_skill, "trp_player","skl_athletics",1), (troop_add_gold, "trp_player", 10), (troop_raise_proficiency, "trp_player",wpt_polearm,10), (troop_raise_proficiency, "trp_player",wpt_archery,35), (troop_add_item, "trp_player","itm_axe",imod_chipped), (troop_add_item, "trp_player","itm_rawhide_coat",0), (troop_add_item, "trp_player","itm_hide_boots",0), (troop_add_item, "trp_player","itm_hunting_bow",0), (troop_add_item, "trp_player","itm_barbed_arrows",0), (troop_add_item, "trp_player","itm_sumpter_horse",imod_heavy), (troop_add_item, "trp_player","itm_dried_meat",0), (troop_add_item, "trp_player","itm_dried_meat",0), (troop_add_item, "trp_player","itm_furs",0), (troop_add_item, "trp_player","itm_furs",0), (else_try), (eq,"$background_answer_3",cb3_craftsman), (troop_raise_attribute, "trp_player",ca_strength,1), (troop_raise_attribute, "trp_player",ca_intelligence,1), (troop_raise_skill, "trp_player","skl_weapon_master",1), (troop_raise_skill, "trp_player","skl_engineer",1), (troop_raise_skill, "trp_player","skl_tactics",1), (troop_raise_skill, "trp_player","skl_trade",1), (troop_raise_proficiency, "trp_player",wpt_one_handed_weapon,15), (troop_add_gold, "trp_player", 100), (troop_add_item, "trp_player","itm_leather_boots",imod_ragged), (troop_add_item, "trp_player","itm_coarse_tunic",0), (troop_add_item, "trp_player","itm_sword_medieval_b", imod_balanced), (troop_add_item, "trp_player","itm_hunting_crossbow",0), (troop_add_item, "trp_player","itm_bolts",0), (troop_add_item, "trp_player","itm_tools",0), (troop_add_item, "trp_player","itm_saddle_horse",0), (troop_add_item, "trp_player","itm_smoked_fish",0), (else_try), (eq,"$background_answer_3",cb3_peddler), (troop_raise_attribute, "trp_player",ca_charisma,1), (troop_raise_attribute, "trp_player",ca_intelligence,1), (troop_raise_skill, "trp_player","skl_riding",1), (troop_raise_skill, "trp_player","skl_trade",1), (troop_raise_skill, "trp_player","skl_pathfinding",1), (troop_raise_skill, "trp_player","skl_inventory_management",1), (troop_add_item, "trp_player","itm_leather_gloves",imod_plain), (troop_add_gold, "trp_player", 90), (troop_raise_proficiency, "trp_player",wpt_polearm,15), (troop_add_item, "trp_player","itm_leather_jacket",0), (troop_add_item, "trp_player","itm_leather_boots",imod_ragged), (troop_add_item, "trp_player","itm_fur_hat",0), (troop_add_item, "trp_player","itm_staff",0), (troop_add_item, "trp_player","itm_hunting_crossbow",0), (troop_add_item, "trp_player","itm_bolts",0), (troop_add_item, "trp_player","itm_saddle_horse",0), (troop_add_item, "trp_player","itm_sumpter_horse",0), (troop_add_item, "trp_player","itm_linen",0), (troop_add_item, "trp_player","itm_pottery",0), (troop_add_item, "trp_player","itm_wool",0), (troop_add_item, "trp_player","itm_wool",0), (troop_add_item, "trp_player","itm_smoked_fish",0), ## (else_try), ## (eq,"$background_answer_3",6), ## (troop_raise_attribute, "trp_player",ca_strength,1), ## (troop_raise_attribute, "trp_player",ca_charisma,1), ## (troop_raise_skill, "trp_player",skl_shield,1), ## (troop_raise_skill, "trp_player",skl_wound_treatment,1), ## (troop_raise_skill, "trp_player",skl_first_aid,1), ## (troop_raise_skill, "trp_player",skl_surgery,1), ## (troop_add_item, "trp_player","itm_leather_gloves",imod_ragged), ## (troop_add_item, "trp_player","itm_quarter_staff",imod_heavy), ## (troop_add_item, "trp_player","itm_black_hood",0), ## (troop_add_gold, "trp_player", 10), ## (troop_raise_proficiency, "trp_player",2,20), (else_try), (eq,"$background_answer_3",cb3_troubadour), (troop_raise_attribute, "trp_player",ca_charisma,2), (troop_raise_skill, "trp_player","skl_weapon_master",1), (troop_raise_skill, "trp_player","skl_persuasion",1), (troop_raise_skill, "trp_player","skl_leadership",1), (troop_raise_skill, "trp_player","skl_pathfinding",1), (troop_add_gold, "trp_player", 80), (troop_raise_proficiency, "trp_player",wpt_one_handed_weapon,25), (troop_raise_proficiency, "trp_player",wpt_crossbow,10), (troop_add_item, "trp_player","itm_tabard",imod_sturdy), (troop_add_item, "trp_player","itm_leather_boots",imod_ragged), (troop_add_item, "trp_player","itm_sword_medieval_a", imod_rusty), (troop_add_item, "trp_player","itm_hunting_crossbow", 0), (troop_add_item, "trp_player","itm_bolts", 0), (troop_add_item, "trp_player","itm_saddle_horse",imod_swaybacked), (troop_add_item, "trp_player","itm_smoked_fish",0), (else_try), (eq,"$background_answer_3",cb3_squire), (troop_raise_attribute, "trp_player",ca_strength,1), (troop_raise_attribute, "trp_player",ca_agility,1), (troop_raise_skill, "trp_player","skl_riding",1), (troop_raise_skill, "trp_player","skl_weapon_master",1), (troop_raise_skill, "trp_player","skl_power_strike",1), (troop_raise_skill, "trp_player","skl_leadership",1), (troop_add_gold, "trp_player", 20), (troop_raise_proficiency, "trp_player",wpt_one_handed_weapon,30), (troop_raise_proficiency, "trp_player",wpt_two_handed_weapon,30), (troop_raise_proficiency, "trp_player",wpt_polearm,30), (troop_raise_proficiency, "trp_player",wpt_archery,10), (troop_raise_proficiency, "trp_player",wpt_crossbow,10), (troop_raise_proficiency, "trp_player",wpt_throwing,10), (troop_add_item, "trp_player","itm_leather_jerkin",imod_ragged), (troop_add_item, "trp_player","itm_leather_boots",imod_tattered), (troop_add_item, "trp_player","itm_sword_medieval_a", imod_rusty), (troop_add_item, "trp_player","itm_hunting_crossbow",0), (troop_add_item, "trp_player","itm_bolts",0), (troop_add_item, "trp_player","itm_saddle_horse",imod_swaybacked), (troop_add_item, "trp_player","itm_smoked_fish",0), (else_try), (eq,"$background_answer_3",cb3_lady_in_waiting), (eq,"$character_gender",tf_female), (troop_raise_attribute, "trp_player",ca_intelligence,1), (troop_raise_attribute, "trp_player",ca_charisma,1), (troop_raise_skill, "trp_player","skl_persuasion",2), (troop_raise_skill, "trp_player","skl_riding",1), (troop_raise_skill, "trp_player","skl_wound_treatment",1), (troop_add_item, "trp_player","itm_dagger", 0), (troop_add_item, "trp_player","itm_hunting_crossbow",0), (troop_add_item, "trp_player","itm_bolts",0), (troop_add_item, "trp_player","itm_courser", imod_spirited), (troop_add_item, "trp_player","itm_woolen_hood",imod_sturdy), (troop_add_item, "trp_player","itm_woolen_dress",imod_sturdy), (troop_add_gold, "trp_player", 100), (troop_raise_proficiency, "trp_player",wpt_one_handed_weapon,10), (troop_raise_proficiency, "trp_player",wpt_crossbow,15), (troop_add_item, "trp_player","itm_smoked_fish",0), (else_try), (eq,"$background_answer_3",cb3_student), (troop_raise_attribute, "trp_player",ca_intelligence,2), (troop_raise_skill, "trp_player","skl_weapon_master",1), (troop_raise_skill, "trp_player","skl_surgery",1), (troop_raise_skill, "trp_player","skl_wound_treatment",1), (troop_raise_skill, "trp_player","skl_persuasion",1), (troop_add_gold, "trp_player", 80), (troop_raise_proficiency, "trp_player",wpt_one_handed_weapon,20), (troop_raise_proficiency, "trp_player",wpt_crossbow,20), (troop_add_item, "trp_player","itm_linen_tunic",imod_sturdy), (troop_add_item, "trp_player","itm_woolen_hose",0), (troop_add_item, "trp_player","itm_sword_medieval_a", imod_rusty), (troop_add_item, "trp_player","itm_hunting_crossbow", 0), (troop_add_item, "trp_player","itm_bolts", 0), (troop_add_item, "trp_player","itm_saddle_horse",imod_swaybacked), (troop_add_item, "trp_player","itm_smoked_fish",0), (store_random_in_range, ":book_no", books_begin, books_end), (troop_add_item, "trp_player",":book_no",0), (try_end), (try_begin), (eq,"$background_answer_4",cb4_revenge), (troop_raise_attribute, "trp_player",ca_strength,2), (troop_raise_skill, "trp_player","skl_power_strike",1), (else_try), (eq,"$background_answer_4",cb4_loss), (troop_raise_attribute, "trp_player",ca_charisma,2), (troop_raise_skill, "trp_player","skl_ironflesh",1), (else_try), (eq,"$background_answer_4",cb4_wanderlust), (troop_raise_attribute, "trp_player",ca_agility,2), (troop_raise_skill, "trp_player","skl_pathfinding",1), ## (else_try), ## (eq,"$background_answer_4",4), ## (troop_raise_attribute, "trp_player",ca_charisma,1), ## (troop_raise_skill, "trp_player",skl_wound_treatment,1), ## (troop_raise_proficiency, "trp_player",5,10), (else_try), (eq,"$background_answer_4",cb4_disown), (troop_raise_attribute, "trp_player",ca_strength,1), (troop_raise_attribute, "trp_player",ca_intelligence,1), (troop_raise_skill, "trp_player","skl_weapon_master",1), (else_try), (eq,"$background_answer_4",cb4_greed), (troop_raise_attribute, "trp_player",ca_agility,1), (troop_raise_attribute, "trp_player",ca_intelligence,1), (troop_raise_skill, "trp_player","skl_looting",1), (try_end), (try_begin), (eq, "$background_type", cb_noble), (jump_to_menu, "mnu_auto_return"), #normal_banner_begin (start_presentation, "prsnt_banner_selection"), #custom_banner_begin # (start_presentation, "prsnt_custom_banner"), (else_try), (change_screen_return, 0), (try_end), (set_show_messages, 1), ]), ("go_back_dot",[],"Go back.",[ (jump_to_menu,"mnu_start_character_4"), ]), ] ), ( "past_life_explanation",mnf_disable_all_keys, "{s3}", "none", [ (try_begin), (gt,"$current_string_reg",14), (assign,"$current_string_reg",10), (try_end), (str_store_string_reg,s3,"$current_string_reg"), (try_begin), (ge,"$current_string_reg",14), (str_store_string,s5,"@Back to the beginning..."), (else_try), (str_store_string,s5,"@View next segment..."), (try_end), ], [ ("view_next",[],"{s5}",[ (val_add,"$current_string_reg",1), (jump_to_menu, "mnu_past_life_explanation"), ]), ("continue",[],"Continue...", [ ]), ("go_back_dot",[],"Go back.",[ (jump_to_menu, "mnu_choose_skill"), ]), ] ), ( "auto_return",0, "This menu automatically returns to caller.", "none", [(change_screen_return, 0)], [ ] ), ("morale_report",0, "{s1}", "none", [(call_script, "script_get_player_party_morale_values"), (assign, ":target_morale", reg0), (assign, reg1, "$g_player_party_morale_modifier_party_size"), (try_begin), (gt, reg1, 0), (str_store_string, s2, "@ -"), (else_try), (str_store_string, s2, "@ "), (try_end), (assign, reg2, "$g_player_party_morale_modifier_leadership"), (try_begin), (gt, reg2, 0), (str_store_string, s3, "@ +"), (else_try), (str_store_string, s3, "@ "), (try_end), (try_begin), (gt, "$g_player_party_morale_modifier_no_food", 0), (assign, reg7, "$g_player_party_morale_modifier_no_food"), (str_store_string, s5, "@^No food: -{reg7}"), (else_try), (str_store_string, s5, "@ "), (try_end), (assign, reg3, "$g_player_party_morale_modifier_food"), (try_begin), (gt, reg3, 0), (str_store_string, s4, "@ +"), (else_try), (str_store_string, s4, "@ "), (try_end), (try_begin), (gt, "$g_player_party_morale_modifier_debt", 0), (assign, reg6, "$g_player_party_morale_modifier_debt"), (str_store_string, s6, "@^Wage debt: -{reg6}"), (else_try), (str_store_string, s6, "@ "), (try_end), (party_get_morale, reg5, "p_main_party"), (store_sub, reg4, reg5, ":target_morale"), (try_begin), (gt, reg4, 0), (str_store_string, s7, "@ +"), (else_try), (str_store_string, s7, "@ "), (try_end), (str_store_string, s1, "@Current party morale is {reg5}.^Current party morale modifiers are:^^Base morale: +50^Party size: {s2}{reg1}^Leadership: {s3}{reg2}^Food variety: {s4}{reg3}{s5}{s6}^Recent events: {s7}{reg4}^TOTAL: {reg5}"), ], [ ("continue",[],"Continue...", [(jump_to_menu, "mnu_reports"), ] ), ] ), ("faction_orders",0, "{s9}", "none", [ (str_clear, s9), (store_current_hours, ":cur_hours"), (try_for_range, ":faction_no", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":faction_no", slot_faction_state, sfs_active), (neq, ":faction_no", "fac_player_supporters_faction"), (faction_get_slot, ":faction_ai_state", ":faction_no", slot_faction_ai_state), (faction_get_slot, ":faction_ai_object", ":faction_no", slot_faction_ai_object), (faction_get_slot, ":faction_marshall", ":faction_no", slot_faction_marshall), (faction_get_slot, ":faction_ai_last_offensive_time", ":faction_no", slot_faction_ai_last_offensive_time), (faction_get_slot, ":faction_ai_offensive_max_followers", ":faction_no", slot_faction_ai_offensive_max_followers), (str_store_faction_name, s10, ":faction_no"), (store_sub, reg1, ":cur_hours", ":faction_ai_last_offensive_time"), (assign, reg2, ":faction_ai_offensive_max_followers"), (try_begin), (eq, ":faction_ai_state", sfai_default), (str_store_string, s11, "@Defending"), (else_try), (eq, ":faction_ai_state", sfai_gathering_army), (str_store_string, s11, "@Gathering army"), (else_try), (eq, ":faction_ai_state", sfai_attacking_center), (str_store_party_name, s11, ":faction_ai_object"), (str_store_string, s11, "@Besieging {s11}"), (else_try), (eq, ":faction_ai_state", sfai_raiding_village), (str_store_party_name, s11, ":faction_ai_object"), (str_store_string, s11, "@Raiding {s11}"), (else_try), (eq, ":faction_ai_state", sfai_attacking_enemy_army), (str_store_party_name, s11, ":faction_ai_object"), (str_store_string, s11, "@Attacking enemies around {s11}"), (try_end), (str_store_faction_name, s10, ":faction_no"), (try_begin), (lt, ":faction_marshall", 0), (str_store_string, s12, "@No one"), (else_try), (str_store_troop_name, s12, ":faction_marshall"), (try_end), (str_store_string, s9, "@{s9}{s10}^Current state: {s11}^Marshall: {s12}^Since the last offensive: {reg1} hours^Offensive maximum followers: {reg2}^^"), (try_end), (try_begin), (neg|is_between, "$g_cheat_selected_faction", kingdoms_begin, kingdoms_end), (call_script, "script_get_next_active_kingdom", kingdoms_end), (assign, "$g_cheat_selected_faction", reg0), (try_end), (str_store_faction_name, s10, "$g_cheat_selected_faction"), (str_store_string, s9, "@Selected faction is: {s10}^^{s9}"), ], [ ("faction_orders_next_faction", [],"Select next faction.", [ (call_script, "script_get_next_active_kingdom", "$g_cheat_selected_faction"), (assign, "$g_cheat_selected_faction", reg0), (jump_to_menu, "mnu_faction_orders"), ] ), ("faction_orders_defend", [],"Force defend.", [ (faction_set_slot, "$g_cheat_selected_faction", slot_faction_ai_state, sfai_default), (faction_set_slot, "$g_cheat_selected_faction", slot_faction_ai_object, -1), (jump_to_menu, "mnu_faction_orders"), ] ), ("faction_orders_gather", [],"Force gather army.", [ (store_current_hours, ":cur_hours"), (faction_set_slot, "$g_cheat_selected_faction", slot_faction_ai_state, sfai_gathering_army), (faction_set_slot, "$g_cheat_selected_faction", slot_faction_ai_last_offensive_time, ":cur_hours"), (faction_set_slot, "$g_cheat_selected_faction", slot_faction_ai_offensive_max_followers, 1), (faction_set_slot, "$g_cheat_selected_faction", slot_faction_ai_object, -1), (jump_to_menu, "mnu_faction_orders"), ] ), ("faction_orders_increase_time", [],"Increase last offensive time by 24 hours.", [ (faction_get_slot, ":faction_ai_last_offensive_time", "$g_cheat_selected_faction", slot_faction_ai_last_offensive_time), (val_sub, ":faction_ai_last_offensive_time", 24), (faction_set_slot, "$g_cheat_selected_faction", slot_faction_ai_last_offensive_time, ":faction_ai_last_offensive_time"), (jump_to_menu, "mnu_faction_orders"), ] ), ("faction_orders_rethink", [],"Force rethink.", [ (call_script, "script_init_ai_calculation"), (call_script, "script_decide_faction_ai", "$g_cheat_selected_faction"), (jump_to_menu, "mnu_faction_orders"), ] ), ("faction_orders_rethink_all", [],"Force rethink for all factions.", [ (call_script, "script_recalculate_ais"), (jump_to_menu, "mnu_faction_orders"), ] ), ("go_back_dot",[],"Go back.", [(jump_to_menu, "mnu_reports"), ] ), ] ), ("character_report",0, "{s9}", "none", [(try_begin), (gt, "$g_player_reading_book", 0), (player_has_item, "$g_player_reading_book"), (str_store_item_name, s8, "$g_player_reading_book"), (str_store_string, s9, "@You are currently reading {s8}."), (else_try), (assign, "$g_player_reading_book", 0), (str_store_string, s9, "@You are not reading any books."), (try_end), (assign, ":num_friends", 0), (assign, ":num_enemies", 0), (str_store_string, s6, "@none"), (str_store_string, s8, "@none"), (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (call_script, "script_troop_get_player_relation", ":troop_no"), (assign, ":player_relation", reg0), #(troop_get_slot, ":player_relation", ":troop_no", slot_troop_player_relation), (try_begin), (gt, ":player_relation", 20), (try_begin), (eq, ":num_friends", 0), (str_store_troop_name, s8, ":troop_no"), (else_try), (eq, ":num_friends", 1), (str_store_troop_name, s7, ":troop_no"), (str_store_string, s8, "@{s7} and {s8}"), (else_try), (str_store_troop_name, s7, ":troop_no"), (str_store_string, s8, "@{s7}, {s8}"), (try_end), (val_add, ":num_friends", 1), (else_try), (lt, ":player_relation", -20), (try_begin), (eq, ":num_enemies", 0), (str_store_troop_name, s6, ":troop_no"), (else_try), (eq, ":num_enemies", 1), (str_store_troop_name, s5, ":troop_no"), (str_store_string, s6, "@{s5} and {s6}"), (else_try), (str_store_troop_name, s5, ":troop_no"), (str_store_string, s6, "@{s5}, {s6}"), (try_end), (val_add, ":num_enemies", 1), (try_end), (try_end), (assign, reg3, "$player_honor"), (troop_get_slot, reg2, "trp_player", slot_troop_renown), (str_store_string, s9, "@Renown: {reg2}.^Honour rating: {reg3}.^Friends: {s8}.^Enemies: {s6}.^{s9}"), (call_script, "script_get_number_of_hero_centers", "trp_player"), (assign, ":no_centers", reg0), (try_begin), (gt, ":no_centers", 0), (try_for_range, ":i_center", 0, ":no_centers"), (call_script, "script_troop_get_leaded_center_with_index", "trp_player", ":i_center"), (assign, ":cur_center", reg0), (try_begin), (eq, ":i_center", 0), (str_store_party_name, s8, ":cur_center"), (else_try), (eq, ":i_center", 1), (str_store_party_name, s7, ":cur_center"), (str_store_string, s8, "@{s7} and {s8}"), (else_try), (str_store_party_name, s7, ":cur_center"), (str_store_string, s8, "@{s7}, {s8}"), (try_end), (try_end), (str_store_string, s9, "@Your estates are: {s8}.^{s9}"), (try_end), (try_begin), (gt, "$players_kingdom", 0), (str_store_faction_name, s8, "$players_kingdom"), (str_store_string, s9, "@You are a lord of {s8}.^{s9}"), (try_end), ], [ ("continue",[],"Continue...", [(jump_to_menu, "mnu_reports"), ] ), ] ), ("party_size_report",0, "{s1}", "none", [(call_script, "script_game_get_party_companion_limit"), (assign, ":party_size_limit", reg0), (store_skill_level, ":leadership", "skl_leadership", "trp_player"), (val_mul, ":leadership", 5), (store_attribute_level, ":charisma", "trp_player", ca_charisma), (troop_get_slot, ":renown", "trp_player", slot_troop_renown), (val_div, ":renown", 25), (try_begin), (gt, ":leadership", 0), (str_store_string, s2, "@ +"), (else_try), (str_store_string, s2, "@ "), (try_end), (try_begin), (gt, ":charisma", 0), (str_store_string, s3, "@ +"), (else_try), (str_store_string, s3, "@ "), (try_end), (try_begin), (gt, ":renown", 0), (str_store_string, s4, "@ +"), (else_try), (str_store_string, s4, "@ "), (try_end), (assign, reg5, ":party_size_limit"), (assign, reg1, ":leadership"), (assign, reg2, ":charisma"), (assign, reg3, ":renown"), (str_store_string, s1, "@Current party size limit is {reg5}.^Current party size modifiers are:^^Base size: +10^Leadership: {s2}{reg1}^Charisma: {s3}{reg2}^Renown: {s4}{reg3}^TOTAL: {reg5}"), ], [ ("continue",[],"Continue...", [(jump_to_menu, "mnu_reports"), ] ), ] ), ("faction_relations_report",0, "{s1}", "none", [(str_clear, s2), (try_for_range, ":cur_kingdom", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":cur_kingdom", slot_faction_state, sfs_active), (neq, ":cur_kingdom", "fac_player_supporters_faction"), (store_relation, ":cur_relation", "fac_player_supporters_faction", ":cur_kingdom"), (try_begin), (ge, ":cur_relation", 90), (str_store_string, s3, "@Loyal"), (else_try), (ge, ":cur_relation", 80), (str_store_string, s3, "@Devoted"), (else_try), (ge, ":cur_relation", 70), (str_store_string, s3, "@Fond"), (else_try), (ge, ":cur_relation", 60), (str_store_string, s3, "@Gracious"), (else_try), (ge, ":cur_relation", 50), (str_store_string, s3, "@Friendly"), (else_try), (ge, ":cur_relation", 40), (str_store_string, s3, "@Supportive"), (else_try), (ge, ":cur_relation", 30), (str_store_string, s3, "@Favorable"), (else_try), (ge, ":cur_relation", 20), (str_store_string, s3, "@Cooperative"), (else_try), (ge, ":cur_relation", 10), (str_store_string, s3, "@Accepting"), (else_try), (ge, ":cur_relation", 0), (str_store_string, s3, "@Indifferent"), (else_try), (ge, ":cur_relation", -10), (str_store_string, s3, "@Suspicious"), (else_try), (ge, ":cur_relation", -20), (str_store_string, s3, "@Grumbling"), (else_try), (ge, ":cur_relation", -30), (str_store_string, s3, "@Hostile"), (else_try), (ge, ":cur_relation", -40), (str_store_string, s3, "@Resentful"), (else_try), (ge, ":cur_relation", -50), (str_store_string, s3, "@Angry"), (else_try), (ge, ":cur_relation", -60), (str_store_string, s3, "@Hateful"), (else_try), (ge, ":cur_relation", -70), (str_store_string, s3, "@Revengeful"), (else_try), (str_store_string, s3, "@Vengeful"), (try_end), (str_store_faction_name, s4, ":cur_kingdom"), (assign, reg1, ":cur_relation"), (str_store_string, s2, "@{s2}^{s4}: {reg1} ({s3})"), (try_end), (str_store_string, s1, "@Your relation with the factions are:^{s2}"), ], [ ("continue",[],"Continue...", [(jump_to_menu, "mnu_reports"), ] ), ] ), ##################################### # Changed by formation mod # ("camp",mnf_scale_picture, "You set up camp. What do you want to do?", "none", [ (assign, "$g_player_icon_state", pis_normal), (set_background_mesh, "mesh_pic_camp"), (party_get_num_attached_parties, "$array_party_num", "p_main_party"), # (store_add, ":slot", slot_party_array_parties_begin, 0), # (try_for_range, ":i", 0, "$array_party_num"), # (val_add, ":slot", 1), # (party_get_slot, ":array_party", "p_main_party", ":slot"), # (party_detach, ":array_party"), # (try_end), ], [ ("camp_action_1",[(eq,"$cheat_mode",1)],"Cheat: Walk around.", [(set_jump_mission,"mt_ai_training"), (call_script, "script_setup_random_scene"), (change_screen_mission), ] ), ("camp_action",[],"Take an action.", [(jump_to_menu, "mnu_camp_action"), ] ), ("camp_wait_here",[],"Wait here for some time.", [ (assign,"$g_camp_mode", 1), # (assign,"$auto_menu","mnu_camp"), (assign, "$g_player_icon_state", pis_camping), (rest_for_hours_interactive, 24 * 7, 5, 1), #rest while attackable (change_screen_return), ] ), ("camp_cheat", [(eq, "$cheat_mode", 1) ], "CHEAT MENU!", [(jump_to_menu, "mnu_camp_cheat"), ], ), ("resume_travelling",[],"Resume travelling.", [ # (store_add, ":slot", slot_party_array_parties_begin, 0), # (try_for_range, ":i", 0, "$array_party_num"), # (val_add, ":slot", 1), # (party_get_slot, ":array_party", "p_main_party", ":slot"), # (party_attach_to_party, ":array_party", "p_main_party"), # (try_end), (change_screen_return), ] ), ] ), ("camp_cheat",0, "Select a cheat:", "none", [ ], [ ("camp_cheat_1",[],"Increase player renown.", [(str_store_string, s1, "@Player renown is increased by 100. "), (call_script, "script_change_troop_renown", "trp_player" ,100), (jump_to_menu, "mnu_camp_cheat"), ] ), ("camp_action_4",[],"Back to camp menu.", [(jump_to_menu, "mnu_camp"), ] ), ] ), ("camp_action",0, "Choose an action:", "none", [ ], [ ("camp_recruit_prisoners", [(troops_can_join, 1), (store_current_hours, ":cur_time"), (val_sub, ":cur_time", 24), (gt, ":cur_time", "$g_prisoner_recruit_last_time"), (try_begin), (gt, "$g_prisoner_recruit_last_time", 0), (assign, "$g_prisoner_recruit_troop_id", 0), (assign, "$g_prisoner_recruit_size", 0), (assign, "$g_prisoner_recruit_last_time", 0), (try_end), ], "Recruit some of your prisoners to your party.", [(jump_to_menu, "mnu_camp_recruit_prisoners"), ], ), ("action_read_book",[],"Select a book to read.", [(jump_to_menu, "mnu_camp_action_read_book"), ] ), ("action_modify_banner",[(eq, "$cheat_mode", 1)],"Cheat: Modify your banner.", [ (start_presentation, "prsnt_banner_selection"), #(start_presentation, "prsnt_custom_banner"), ] ), ################################# # Form Ranks section ################################# # Formation control settings ("action_formation_control_settings",[ ], "Formation control settings.", [ (start_presentation, "prsnt_key_config"), ], ), # Formation arrays management ("action_manage_arrays", [ (gt, "$array_party_num", 0), ], "Organize battle arrays.", [ (jump_to_menu, "mnu_camp_action_manage_arrays"), ], ), ################################# # Form Ranks section end ################################# ("action_retire",[],"Retire from adventuring.", [(jump_to_menu, "mnu_retirement_verify"), ] ), ("camp_action_4",[],"Back to camp menu.", [(jump_to_menu, "mnu_camp"), ] ), ] ), ################################# # Form Ranks section (deprecated, see bottom the new one) ################################# ################################### # Form Ranks section end ################################### ("camp_recruit_prisoners",0, "You offer your prisoners freedom if they agree to join you as soldiers. {s18}", "none", [(assign, ":num_regular_prisoner_slots", 0), (party_get_num_prisoner_stacks, ":num_stacks", "p_main_party"), (try_for_range, ":cur_stack", 0, ":num_stacks"), (party_prisoner_stack_get_troop_id, ":cur_troop_id", "p_main_party", ":cur_stack"), (neg|troop_is_hero, ":cur_troop_id"), (val_add, ":num_regular_prisoner_slots", 1), (try_end), (try_begin), (eq, ":num_regular_prisoner_slots", 0), (jump_to_menu, "mnu_camp_no_prisoners"), (else_try), (eq, "$g_prisoner_recruit_troop_id", 0), (store_current_hours, "$g_prisoner_recruit_last_time"), (store_random_in_range, ":rand", 0, 100), (store_skill_level, ":persuasion_level", "skl_persuasion", "trp_player"), (store_sub, ":reject_chance", 15, ":persuasion_level"), (val_mul, ":reject_chance", 4), (try_begin), (lt, ":rand", ":reject_chance"), (assign, "$g_prisoner_recruit_troop_id", -7), (else_try), (assign, ":num_regular_prisoner_slots", 0), (party_get_num_prisoner_stacks, ":num_stacks", "p_main_party"), (try_for_range, ":cur_stack", 0, ":num_stacks"), (party_prisoner_stack_get_troop_id, ":cur_troop_id", "p_main_party", ":cur_stack"), (neg|troop_is_hero, ":cur_troop_id"), (val_add, ":num_regular_prisoner_slots", 1), (try_end), (store_random_in_range, ":random_prisoner_slot", 0, ":num_regular_prisoner_slots"), (try_for_range, ":cur_stack", 0, ":num_stacks"), (party_prisoner_stack_get_troop_id, ":cur_troop_id", "p_main_party", ":cur_stack"), (neg|troop_is_hero, ":cur_troop_id"), (val_sub, ":random_prisoner_slot", 1), (lt, ":random_prisoner_slot", 0), (assign, ":num_stacks", 0), (assign, "$g_prisoner_recruit_troop_id", ":cur_troop_id"), (party_prisoner_stack_get_size, "$g_prisoner_recruit_size", "p_main_party", ":cur_stack"), (try_end), (try_end), (try_begin), (gt, "$g_prisoner_recruit_troop_id", 0), (party_get_free_companions_capacity, ":capacity", "p_main_party"), (val_min, "$g_prisoner_recruit_size", ":capacity"), (assign, reg1, "$g_prisoner_recruit_size"), (gt, "$g_prisoner_recruit_size", 0), (try_begin), (gt, "$g_prisoner_recruit_size", 1), (assign, reg2, 1), (else_try), (assign, reg2, 0), (try_end), (str_store_troop_name_by_count, s1, "$g_prisoner_recruit_troop_id", "$g_prisoner_recruit_size"), (str_store_string, s18, "@{reg1} {s1} {reg2?accept:accepts} the offer."), (else_try), (str_store_string, s18, "@No one accepts the offer."), (try_end), (try_end), ], [ ("camp_recruit_prisoners_accept",[(gt, "$g_prisoner_recruit_troop_id", 0)],"Take them.", [(remove_troops_from_prisoners, "$g_prisoner_recruit_troop_id", "$g_prisoner_recruit_size"), (party_add_members, "p_main_party", "$g_prisoner_recruit_troop_id", "$g_prisoner_recruit_size"), (store_mul, ":morale_change", -3, "$g_prisoner_recruit_size"), (call_script, "script_change_player_party_morale", ":morale_change"), (jump_to_menu, "mnu_camp"), ] ), ("camp_recruit_prisoners_reject",[(gt, "$g_prisoner_recruit_troop_id", 0)],"Reject them.", [(jump_to_menu, "mnu_camp"), (assign, "$g_prisoner_recruit_troop_id", 0), (assign, "$g_prisoner_recruit_size", 0), ] ), ("continue",[(le, "$g_prisoner_recruit_troop_id", 0)],"Go back.", [(jump_to_menu, "mnu_camp"), ] ), ] ), ("camp_no_prisoners",0, "You have no prisoners to recruit from.", "none", [], [ ("continue",[],"Continue...", [(jump_to_menu, "mnu_camp"), ] ), ] ), ("camp_action_read_book",0, "Choose a book to read:", "none", [], [ ("action_read_book_1",[(player_has_item, "itm_book_tactics"), (item_slot_eq, "itm_book_tactics", slot_item_book_read, 0), (str_store_item_name, s1, "itm_book_tactics"), ],"{s1}.", [(assign, "$temp", "itm_book_tactics"), (jump_to_menu, "mnu_camp_action_read_book_start"), ] ), ("action_read_book_2",[(player_has_item, "itm_book_persuasion"), (item_slot_eq, "itm_book_persuasion", slot_item_book_read, 0), (str_store_item_name, s1, "itm_book_persuasion"), ],"{s1}.", [(assign, "$temp", "itm_book_persuasion"), (jump_to_menu, "mnu_camp_action_read_book_start"), ] ), ("action_read_book_3",[(player_has_item, "itm_book_leadership"), (item_slot_eq, "itm_book_leadership", slot_item_book_read, 0), (str_store_item_name, s1, "itm_book_leadership"), ],"{s1}.", [(assign, "$temp", "itm_book_leadership"), (jump_to_menu, "mnu_camp_action_read_book_start"), ] ), ("action_read_book_4",[(player_has_item, "itm_book_intelligence"), (item_slot_eq, "itm_book_intelligence", slot_item_book_read, 0), (str_store_item_name, s1, "itm_book_intelligence"), ],"{s1}.", [(assign, "$temp", "itm_book_intelligence"), (jump_to_menu, "mnu_camp_action_read_book_start"), ] ), ("action_read_book_5",[(player_has_item, "itm_book_trade"), (item_slot_eq, "itm_book_trade", slot_item_book_read, 0), (str_store_item_name, s1, "itm_book_trade"), ],"{s1}.", [(assign, "$temp", "itm_book_trade"), (jump_to_menu, "mnu_camp_action_read_book_start"), ] ), ("action_read_book_6",[(player_has_item, "itm_book_weapon_mastery"), (item_slot_eq, "itm_book_weapon_mastery", slot_item_book_read, 0), (str_store_item_name, s1, "itm_book_weapon_mastery"), ],"{s1}.", [(assign, "$temp", "itm_book_weapon_mastery"), (jump_to_menu, "mnu_camp_action_read_book_start"), ] ), ("action_read_book_7",[(player_has_item, "itm_book_engineering"), (item_slot_eq, "itm_book_engineering", slot_item_book_read, 0), (str_store_item_name, s1, "itm_book_engineering"), ],"{s1}.", [(assign, "$temp", "itm_book_engineering"), (jump_to_menu, "mnu_camp_action_read_book_start"), ] ), ("camp_action_4",[],"Back to camp menu.", [(jump_to_menu, "mnu_camp"), ] ), ] ), ("camp_action_read_book_start",0, "{s1}", "none", [(assign, ":new_book", "$temp"), (str_store_item_name, s2, ":new_book"), (try_begin), (store_attribute_level, ":int", "trp_player", ca_intelligence), (item_get_slot, ":int_req", ":new_book", slot_item_intelligence_requirement), (le, ":int_req", ":int"), (str_store_string, s1, "@You start reading {s2}. After a few pages,\ you feel you could learn a lot from this book. You decide to keep it close by and read whenever you have the time."), (assign, "$g_player_reading_book", ":new_book"), (else_try), (str_store_string, s1, "@You flip through the pages of {s2}, but you find the text confusing and difficult to follow.\ Try as you might, it soon gives you a headache, and you're forced to give up the attempt."), (try_end),], [ ("continue",[],"Continue...", [(jump_to_menu, "mnu_camp"), ] ), ] ), ("retirement_verify",0, "You are at day {reg0}. Your current luck is {reg1}. Are you sure you want to retire?", "none", [ (store_current_day, reg0), (assign, reg1, "$g_player_luck"), ], [ ("retire_yes",[],"Yes.", [ (start_presentation, "prsnt_retirement"), ] ), ("retire_no",[],"No.", [ (jump_to_menu, "mnu_camp"), ] ), ] ), ("end_game",0, "The decision is made, and you resolve to give up your adventurer's\ life and settle down. You sell off your weapons and armour, gather up\ all your money, and ride off into the sunset....", "none", [], [ ("end_game_bye",[],"Farewell.", [ (change_screen_quit), ] ), ] ), ( "pay_day",mnf_scale_picture|mnf_disable_all_keys, "{s1}.", "none", [ (set_background_mesh, "mesh_pic_payment"), (call_script, "script_calculate_player_faction_wage"), (assign, ":total_wages", reg0), (assign, reg6, ":total_wages"), (assign, reg2, "$g_player_debt_to_party_members"), (store_add, reg3, reg6, reg2), (store_troop_gold, ":player_wealth", "trp_player"), (assign, reg4, ":player_wealth"), (val_add, ":total_wages", "$g_player_debt_to_party_members"), (try_begin), (ge, ":player_wealth", ":total_wages"), (assign, "$g_player_debt_to_party_members", 0), (troop_remove_gold, "trp_player",":total_wages"), (store_sub, reg5, reg4, reg3), (str_store_string, s1, "@You paid {reg3} of your {reg4} denars to your men. You have {reg5} denars left."), (else_try), (troop_remove_gold, "trp_player",":player_wealth"), (store_sub, ":unpaid", ":total_wages", ":player_wealth"), (assign, reg5, ":unpaid"), (str_store_string, s1, "@Your debt to your men amounted to {reg3} denars, however you only had {reg4}. Unpaid sum of {reg5} denars is added as debt. Your party loses morale."), (assign, "$g_player_debt_to_party_members", ":unpaid"), (call_script, "script_objectionable_action", tmt_egalitarian, "str_men_unpaid"), (try_end), (str_store_string, s1, "@This week's wages: {reg6} denars^Earlier debts: {reg2} denars^Total payment: {reg3} denars^Current wealth: {reg4} denars^^{s1}"), ], [ ("continue",[],"Continue...", [ (change_screen_return,0), ] ), ] ), ("cattle_herd",mnf_scale_picture, "You encounter a herd of cattle.", "none", [(play_sound, "snd_cow_moo"), (set_background_mesh, "mesh_pic_cattle"), ], [ ("cattle_drive_away",[],"Drive the cattle onward.", [ (party_set_slot, "$g_encountered_party", slot_cattle_driven_by_player, 1), (party_set_ai_behavior, "$g_encountered_party", ai_bhvr_driven_by_party), (party_set_ai_object,"$g_encountered_party", "p_main_party"), (change_screen_return), ] ), ("cattle_stop",[],"Bring the herd to a stop.", [ (party_set_slot, "$g_encountered_party", slot_cattle_driven_by_player, 0), (party_set_ai_behavior, "$g_encountered_party", ai_bhvr_hold), (change_screen_return), ] ), ("cattle_kill",[(assign, ":continue", 1), (try_begin), (check_quest_active, "qst_move_cattle_herd"), (quest_slot_eq, "qst_move_cattle_herd", slot_quest_target_party, "$g_encountered_party"), (assign, ":continue", 0), (try_end), (eq, ":continue", 1)],"Slaughter some of the animals.", [(jump_to_menu, "mnu_cattle_herd_kill"), ] ), ("leave",[],"Leave.", [(change_screen_return), ] ), ] ), ("cattle_herd_kill",0, "How many animals do you want to slaughter?", "none", [(party_get_num_companions, reg5, "$g_encountered_party")], [ ("cattle_kill_1",[(ge, reg5, 1),],"One.", [(call_script, "script_kill_cattle_from_herd", "$g_encountered_party", 1), (jump_to_menu, "mnu_cattle_herd_kill_end"), (change_screen_loot, "trp_temp_troop"), (play_sound, "snd_cow_slaughter"), ] ), ("cattle_kill_2",[(ge, reg5, 2),],"Two.", [(call_script, "script_kill_cattle_from_herd", "$g_encountered_party", 2), (jump_to_menu, "mnu_cattle_herd_kill_end"), (change_screen_loot, "trp_temp_troop"), (play_sound, "snd_cow_slaughter"), ] ), ("cattle_kill_3",[(ge, reg5, 3),],"Three.", [(call_script, "script_kill_cattle_from_herd", "$g_encountered_party", 3), (jump_to_menu, "mnu_cattle_herd_kill_end"), (change_screen_loot, "trp_temp_troop"), (play_sound, "snd_cow_slaughter"), ] ), ("cattle_kill_4",[(ge, reg5, 4),],"Four.", [(call_script, "script_kill_cattle_from_herd", "$g_encountered_party", 4), (jump_to_menu, "mnu_cattle_herd_kill_end"), (change_screen_loot, "trp_temp_troop"), (play_sound, "snd_cow_slaughter"), ] ), ("cattle_kill_5",[(ge, reg5, 5),],"Five.", [(call_script, "script_kill_cattle_from_herd", "$g_encountered_party", 5), (jump_to_menu, "mnu_cattle_herd_kill_end"), (change_screen_loot, "trp_temp_troop"), (play_sound, "snd_cow_slaughter"), ] ), ("go_back_dot",[],"Go back.", [(jump_to_menu, "mnu_cattle_herd"), ] ), ] ), ("cattle_herd_kill_end",0, "You shouldn't be reading this.", "none", [(change_screen_return)], [ ] ), ("arena_duel_fight",0, "You and your opponent prepare to fight for honour.", "none", [], [ ("continue",[],"Continue...", [ (jump_to_menu, "mnu_simple_encounter"), (change_screen_mission), ]), ] ), ( "simple_encounter",mnf_enable_hot_keys|mnf_scale_picture, "{s2} You have {reg10} troops fit for battle against their {reg11}.", "none", [ (assign, "$g_enemy_party", "$g_encountered_party"), (assign, "$g_ally_party", -1), (call_script, "script_encounter_calculate_fit"), (try_begin), (eq, "$new_encounter", 1), (assign, "$new_encounter", 0), (assign, "$g_encounter_is_in_village", 0), (assign, "$g_encounter_type", 0), (try_begin), (party_slot_eq, "$g_enemy_party", slot_party_ai_state, spai_raiding_around_center), (party_get_slot, ":village_no", "$g_enemy_party", slot_party_ai_object), (store_distance_to_party_from_party, ":dist", ":village_no", "$g_enemy_party"), (try_begin), (lt, ":dist", raid_distance), (assign, "$g_encounter_is_in_village", ":village_no"), (assign, "$g_encounter_type", enctype_fighting_against_village_raid), (try_end), (try_end), (try_begin), (gt, "$g_player_raiding_village", 0), (assign, "$g_encounter_is_in_village", "$g_player_raiding_village"), (assign, "$g_encounter_type", enctype_catched_during_village_raid), (party_quick_attach_to_current_battle, "$g_encounter_is_in_village", 1), #attach as enemy (str_store_string, s1, "@Villagers"), (display_message, "str_s1_joined_battle_enemy"), (else_try), (eq, "$g_encounter_type", enctype_fighting_against_village_raid), (party_quick_attach_to_current_battle, "$g_encounter_is_in_village", 0), #attach as friend (str_store_string, s1, "@Villagers"), (display_message, "str_s1_joined_battle_friend"), # Let village party join battle at your side (try_end), (call_script, "script_let_nearby_parties_join_current_battle", 0, 0), (call_script, "script_encounter_init_variables"), (assign, "$encountered_party_hostile", 0), (assign, "$encountered_party_friendly", 0), (try_begin), (gt, "$g_encountered_party_relation", 0), (assign, "$encountered_party_friendly", 1), (try_end), (try_begin), (lt, "$g_encountered_party_relation", 0), (assign, "$encountered_party_hostile", 1), (try_begin), (encountered_party_is_attacker), (assign, "$cant_leave_encounter", 1), (try_end), (try_end), (assign, "$talk_context", tc_party_encounter), (call_script, "script_setup_party_meeting", "$g_encountered_party"), (else_try), #second or more turn # (try_begin), # (call_script, "script_encounter_calculate_morale_change"), # (try_end), (try_begin), # We can leave battle only after some troops have been killed. (eq, "$cant_leave_encounter", 1), (call_script, "script_party_count_members_with_full_health", "p_main_party_backup"), (assign, ":org_total_party_counts", reg0), (call_script, "script_party_count_members_with_full_health", "p_encountered_party_backup"), (val_add, ":org_total_party_counts", reg0), (call_script, "script_party_count_members_with_full_health", "p_main_party"), (assign, ":cur_total_party_counts", reg0), (call_script, "script_party_count_members_with_full_health", "p_collective_enemy"), (val_add, ":cur_total_party_counts", reg0), (store_sub, ":leave_encounter_limit", ":org_total_party_counts", 10), (lt, ":cur_total_party_counts", ":leave_encounter_limit"), (assign, "$cant_leave_encounter", 0), (try_end), (eq, "$g_leave_encounter",1), (change_screen_return), (try_end), #setup s2 (try_begin), (party_is_active,"$g_encountered_party"), (str_store_party_name, s1,"$g_encountered_party"), (try_begin), (eq, "$g_encounter_type", 0), (str_store_string, s2,"@You have encountered {s1}."), (else_try), (eq, "$g_encounter_type", enctype_fighting_against_village_raid), (str_store_party_name, s3, "$g_encounter_is_in_village"), (str_store_string, s2,"@You have engaged {s1} while they were raiding {s3}."), (else_try), (eq, "$g_encounter_type", enctype_catched_during_village_raid), (str_store_party_name, s3, "$g_encounter_is_in_village"), (str_store_string, s2,"@You were caught by {s1} while your forces were raiding {s3}."), (try_end), (try_end), (try_begin), (call_script, "script_party_count_members_with_full_health", "p_collective_enemy"), (assign, ":num_enemy_regulars_remaining", reg(0)), (assign, ":enemy_finished",0), (try_begin), (eq, "$g_battle_result", 1), (eq, ":num_enemy_regulars_remaining", 0), #battle won (assign, ":enemy_finished",1), (else_try), (eq, "$g_engaged_enemy", 1), (le, "$g_enemy_fit_for_battle",0), (ge, "$g_friend_fit_for_battle",1), (assign, ":enemy_finished",1), (try_end), (this_or_next|eq, ":enemy_finished",1), (eq,"$g_enemy_surrenders",1), (assign, "$g_next_menu", -1), (jump_to_menu, "mnu_total_victory"), (else_try), # (eq, "$encountered_party_hostile", 1), (call_script, "script_party_count_members_with_full_health","p_main_party"), (assign, reg(3), reg(0)), (assign, ":friends_finished",0), (try_begin), (eq, "$g_battle_result", -1), (eq, reg(3), 0), #battle lost (assign, ":friends_finished",1), (else_try), (eq, "$g_engaged_enemy", 1), (ge, "$g_enemy_fit_for_battle",1), (le, "$g_friend_fit_for_battle",0), (assign, ":friends_finished",1), (try_end), (this_or_next|eq, ":friends_finished",1), (eq,"$g_player_surrenders",1), (assign, "$g_next_menu", "mnu_captivity_start_wilderness"), (jump_to_menu, "mnu_total_defeat"), (try_end), (try_begin), (eq, "$g_encountered_party_template", "pt_looters"), (set_background_mesh, "mesh_pic_bandits"), (else_try), (eq, "$g_encountered_party_template", "pt_mountain_bandits"), (set_background_mesh, "mesh_pic_mountain_bandits"), (else_try), (eq, "$g_encountered_party_template", "pt_steppe_bandits"), (set_background_mesh, "mesh_pic_steppe_bandits"), (else_try), (eq, "$g_encountered_party_template", "pt_sea_raiders"), (set_background_mesh, "mesh_pic_sea_raiders"), (else_try), (eq, "$g_encountered_party_template", "pt_forest_bandits"), (set_background_mesh, "mesh_pic_forest_bandits"), (else_try), (eq, "$g_encountered_party_template", "pt_deserters"), (set_background_mesh, "mesh_pic_deserters"), (try_end), ], [ ("encounter_attack",[ (eq, "$encountered_party_friendly", 0), (neg|troop_is_wounded, "trp_player"), ## (store_troop_health,reg(5)), ## (ge,reg(5),5), ], "Charge the enemy.",[ (assign, "$g_battle_result", 0), (assign, "$g_engaged_enemy", 1), (call_script, "script_calculate_renown_value"), (call_script, "script_calculate_battle_advantage"), (set_battle_advantage, reg0), (set_party_battle_mode), (try_begin), (eq, "$g_encounter_type", enctype_fighting_against_village_raid), (assign, "$g_village_raid_evil", 0), (set_jump_mission,"mt_village_raid"), (party_get_slot, ":scene_to_use", "$g_encounter_is_in_village", slot_castle_exterior), (jump_to_scene, ":scene_to_use"), (else_try), (eq, "$g_encounter_type", enctype_catched_during_village_raid), (assign, "$g_village_raid_evil", 0), (set_jump_mission,"mt_village_raid"), (party_get_slot, ":scene_to_use", "$g_encounter_is_in_village", slot_castle_exterior), (jump_to_scene, ":scene_to_use"), (else_try), (set_jump_mission,"mt_lead_charge"), (call_script, "script_setup_random_scene"), (try_end), (assign, "$g_next_menu", "mnu_simple_encounter"), (jump_to_menu, "mnu_battle_debrief"), (change_screen_mission), ]), ("encounter_order_attack",[ (eq, "$encountered_party_friendly", 0), (call_script, "script_party_count_members_with_full_health", "p_main_party"),(ge, reg(0), 4), ], "Order your troops to attack without you.",[(jump_to_menu,"mnu_order_attack_begin"), #(simulate_battle,3) ]), ("encounter_leave",[ (eq,"$cant_leave_encounter", 0), ],"Leave.",[ ###NPC companion changes begin (try_begin), (eq, "$encountered_party_friendly", 0), (encountered_party_is_attacker), (call_script, "script_objectionable_action", tmt_aristocratic, "str_flee_battle"), (try_end), ###NPC companion changes end #Troop commentary changes begin (try_begin), (eq, "$encountered_party_friendly", 0), (encountered_party_is_attacker), (party_get_num_companion_stacks, ":num_stacks", "p_encountered_party_backup"), (try_for_range, ":stack_no", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop","p_encountered_party_backup",":stack_no"), (is_between, ":stack_troop", kingdom_heroes_begin, kingdom_heroes_end), (store_troop_faction, ":victorious_faction", ":stack_troop"), (call_script, "script_add_log_entry", logent_player_retreated_from_lord, "trp_player", -1, ":stack_troop", ":victorious_faction"), (try_end), (try_end), #Troop commentary changes end (leave_encounter),(change_screen_return)]), ("encounter_retreat",[ (eq,"$cant_leave_encounter", 1), (call_script, "script_get_max_skill_of_player_party", "skl_tactics"), (assign, ":max_skill", reg0), (val_add, ":max_skill", 4), (call_script, "script_party_count_members_with_full_health", "p_collective_enemy", 0), (assign, ":enemy_party_strength", reg0), (val_div, ":enemy_party_strength", 2), (val_div, ":enemy_party_strength", ":max_skill"), (val_max, ":enemy_party_strength", 1), (call_script, "script_party_count_fit_regulars", "p_main_party"), (assign, ":player_count", reg0), (ge, ":player_count", ":enemy_party_strength"), ],"Pull back, leaving some soldiers behind to cover your retreat.",[(jump_to_menu, "mnu_encounter_retreat_confirm"),]), ("encounter_surrender",[ (eq,"$cant_leave_encounter", 1), ],"Surrender.",[(assign,"$g_player_surrenders",1)]), ] ), ( "encounter_retreat_confirm",0, "As the party member with the highest tactics skill,\ ({reg2}), {reg3?you devise:{s3} devises} a plan that will allow you and your men to escape with your lives,\ but you'll have to leave {reg4} soldiers behind to stop the enemy from giving chase.", "none", [(call_script, "script_get_max_skill_of_player_party", "skl_tactics"), (assign, ":max_skill", reg0), (assign, ":max_skill_owner", reg1), (assign, reg2, ":max_skill"), (val_add, ":max_skill", 4), (call_script, "script_party_count_members_with_full_health", "p_collective_enemy", 0), (assign, ":enemy_party_strength", reg0), (val_div, ":enemy_party_strength", 2), (store_div, reg4, ":enemy_party_strength", ":max_skill"), (val_max, reg4, 1), (try_begin), (eq, ":max_skill_owner", "trp_player"), (assign, reg3, 1), (else_try), (assign, reg3, 0), (str_store_troop_name, s3, ":max_skill_owner"), (try_end), ], [ ("leave_behind",[],"Go on. The sacrifice of these men will save the rest.",[ (assign, ":num_casualties", reg4), (try_for_range, ":unused", 0, ":num_casualties"), (call_script, "script_cf_party_remove_random_regular_troop", "p_main_party"), (assign, ":lost_troop", reg0), (store_random_in_range, ":random_no", 0, 100), (ge, ":random_no", 30), (party_add_prisoners, "$g_encountered_party", ":lost_troop", 1), (try_end), (call_script, "script_change_player_party_morale", -20), (jump_to_menu, "mnu_encounter_retreat"), ]), ("dont_leave_behind",[],"No. We leave no one behind.",[(jump_to_menu, "mnu_simple_encounter"),]), ] ), ( "encounter_retreat",0, "You tell {reg4} of your troops to hold the enemy while you retreat with the rest of your party.", "none", [ ], [ ("continue",[],"Continue...",[ ###Troop commentary changes begin (call_script, "script_objectionable_action", tmt_aristocratic, "str_flee_battle"), (party_get_num_companion_stacks, ":num_stacks", "p_encountered_party_backup"), (try_for_range, ":stack_no", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop","p_encountered_party_backup",":stack_no"), (is_between, ":stack_troop", kingdom_heroes_begin, kingdom_heroes_end), (store_troop_faction, ":victorious_faction", ":stack_troop"), (call_script, "script_add_log_entry", logent_player_retreated_from_lord_cowardly, "trp_player", -1, ":stack_troop", ":victorious_faction"), (try_end), ###Troop commentary changes end (leave_encounter),(change_screen_return)]), ] ), ( "order_attack_begin",0, "Your troops prepare to attack the enemy.", "none", [], [ ("order_attack_begin",[],"Order the attack to begin.", [ (assign, "$g_engaged_enemy", 1), (jump_to_menu,"mnu_order_attack_2"), ]), ("call_back",[],"Call them back.",[(jump_to_menu,"mnu_simple_encounter")]), ] ), ( "order_attack_2",mnf_disable_all_keys, "{s4}^^Your casualties: {s8}^^Enemy casualties: {s9}", "none", [ (call_script, "script_party_calculate_strength", "p_main_party", 1), #skip player (assign, ":player_party_strength", reg0), (val_div, ":player_party_strength", 5), (call_script, "script_party_calculate_strength", "p_collective_enemy", 0), (assign, ":enemy_party_strength", reg0), (val_div, ":enemy_party_strength", 5), # (call_script,"script_inflict_casualties_to_party", "p_main_party", ":enemy_party_strength"), (inflict_casualties_to_party_group, "p_main_party", ":enemy_party_strength", "p_temp_casualties"), (call_script, "script_print_casualties_to_s0", "p_temp_casualties", 0), (str_store_string_reg, s8, s0), #### (call_script,"script_inflict_casualties_to_party", "$g_encountered_party", ":player_party_strength"), (inflict_casualties_to_party_group, "$g_encountered_party", ":player_party_strength", "p_temp_casualties"), (call_script, "script_print_casualties_to_s0", "p_temp_casualties", 0), (str_store_string_reg, s9, s0), (party_collect_attachments_to_party, "$g_encountered_party", "p_collective_enemy"), # (assign, "$cant_leave_encounter", 0), (assign, "$no_soldiers_left", 0), (try_begin), (call_script, "script_party_count_members_with_full_health","p_main_party"), (le, reg(0), 0), (assign, "$no_soldiers_left", 1), (str_store_string, s4, "str_order_attack_failure"), (else_try), (call_script, "script_party_count_members_with_full_health","p_collective_enemy"), (le, reg(0), 0), (assign, ":continue", 0), (party_get_num_companion_stacks, ":party_num_stacks", "p_collective_enemy"), (try_begin), (eq, ":party_num_stacks", 0), (assign, ":continue", 1), (else_try), (party_stack_get_troop_id, ":party_leader", "p_collective_enemy", 0), (try_begin), (neg|troop_is_hero, ":party_leader"), (assign, ":continue", 1), (else_try), (troop_is_wounded, ":party_leader"), (assign, ":continue", 1), (try_end), (try_end), (eq, ":continue", 1), (assign, "$g_battle_result", 1), (assign, "$no_soldiers_left", 1), (str_store_string, s4, "str_order_attack_success"), (else_try), (str_store_string, s4, "str_order_attack_continue"), (try_end), ], [ ("order_attack_continue",[(eq, "$no_soldiers_left", 0)],"Order your soldiers to continue the attack.",[ (jump_to_menu,"mnu_order_attack_2"), ]), ("order_retreat",[(eq, "$no_soldiers_left", 0)],"Call your soldiers back.",[ (jump_to_menu,"mnu_simple_encounter"), ]), ("continue",[(eq, "$no_soldiers_left", 1)],"Continue...",[ (jump_to_menu,"mnu_simple_encounter"), ]), ] ), ( "battle_debrief",mnf_scale_picture|mnf_disable_all_keys, "{s11}^^Your Casualties:{s8}{s10}^^Enemy Casualties:{s9}", "none", [ (try_begin), (eq, "$g_battle_result", 1), (call_script, "script_change_troop_renown", "trp_player", "$battle_renown_value"), (try_end), (call_script, "script_encounter_calculate_fit"), (call_script, "script_party_count_fit_regulars", "p_main_party"), (assign, "$playerparty_postbattle_regulars", reg0), ################################## # Form Ranks Section # (party_get_slot, ":max_array_no", "p_main_party", slot_party_array_parties_begin), (try_for_range, ":i", 1, ":max_array_no"), (store_sub, ":party_rank", ":i", 1), (party_get_attached_party_with_rank, ":array_party", "p_main_party", ":party_rank"), (call_script, "script_party_count_fit_regulars", ":array_party"), (val_add, "$playerparty_postbattle_regulars", reg0), (try_end), # # Form Ranks Section end ################################## (try_begin), (eq, "$g_battle_result", 1), (eq, "$g_enemy_fit_for_battle", 0), (str_store_string, s11, "@You were victorious!"), # (play_track, "track_bogus"), #clear current track. # (call_script, "script_music_set_situation_with_culture", mtf_sit_victorious), (try_begin), (gt, "$g_friend_fit_for_battle", 1), (set_background_mesh, "mesh_pic_victory"), (try_end), (else_try), (eq, "$g_battle_result", -1), (ge, "$g_enemy_fit_for_battle",1), (this_or_next|le, "$g_friend_fit_for_battle",0), ( le, "$playerparty_postbattle_regulars", 0), (str_store_string, s11, "@Battle was lost. Your forces were utterly crushed."), (set_background_mesh, "mesh_pic_defeat"), (else_try), (eq, "$g_battle_result", -1), (str_store_string, s11, "@Your companions carry you away from the fighting."), (troop_get_type, ":is_female", "trp_player"), (try_begin), (eq, ":is_female", 1), (set_background_mesh, "mesh_pic_wounded_fem"), (else_try), (set_background_mesh, "mesh_pic_wounded"), (try_end), (else_try), (eq, "$g_battle_result", 1), (str_store_string, s11, "@You have defeated the enemy."), (try_begin), (gt, "$g_friend_fit_for_battle", 1), (set_background_mesh, "mesh_pic_victory"), (try_end), (else_try), (eq, "$g_battle_result", 0), (str_store_string, s11, "@You have retreated from the fight."), (try_end), #NPC companion changes begin ##check for excessive casualties, more forgiving if battle result is good (try_begin), (gt, "$playerparty_prebattle_regulars", 9), (store_add, ":divisor", 3, "$g_battle_result"), (store_div, ":half_of_prebattle_regulars", "$playerparty_prebattle_regulars", ":divisor"), (lt, "$playerparty_postbattle_regulars", ":half_of_prebattle_regulars"), (call_script, "script_objectionable_action", tmt_egalitarian, "str_excessive_casualties"), (try_end), #NPC companion changes end (call_script, "script_print_casualties_to_s0", "p_player_casualties", 0), (str_store_string_reg, s8, s0), (call_script, "script_print_casualties_to_s0", "p_enemy_casualties", 0), (str_store_string_reg, s9, s0), (str_clear, s10), (try_begin), (eq, "$any_allies_at_the_last_battle", 1), (call_script, "script_print_casualties_to_s0", "p_ally_casualties", 0), (str_store_string, s10, "@^^Ally Casualties:{s0}"), (try_end), ], [ ("continue",[],"Continue...",[(jump_to_menu, "$g_next_menu"),]), ] ), ( "total_victory",0, "You shouldn't be reading this... {s9}", "none", [ # We exploit the menu condition system below. # The conditions should make sure that always another screen or menu is called. (assign, ":done", 0), (try_begin), # Talk to ally leader (eq, "$thanked_by_ally_leader", 0), (assign, "$thanked_by_ally_leader", 1), (gt, "$g_ally_party", 0), # (store_add, ":total_str_without_player", "$g_starting_strength_ally_party", "$g_starting_strength_enemy_party"), (store_add, ":total_str_without_player", "$g_starting_strength_friends", "$g_starting_strength_enemy_party"), (val_sub, ":total_str_without_player", "$g_starting_strength_main_party"), (store_sub, ":ally_strength_without_player", "$g_starting_strength_friends", "$g_starting_strength_main_party"), (store_mul, ":ally_advantage", ":ally_strength_without_player", 100), (val_add, ":total_str_without_player", 1), (val_div, ":ally_advantage", ":total_str_without_player"), #Ally advantage=50 means battle was evenly matched (store_sub, ":enemy_advantage", 100, ":ally_advantage"), (store_mul, ":faction_reln_boost", ":enemy_advantage", "$g_starting_strength_enemy_party"), (val_div, ":faction_reln_boost", 3000), (val_min, ":faction_reln_boost", 4), (store_mul, "$g_relation_boost", ":enemy_advantage", ":enemy_advantage"), (val_div, "$g_relation_boost", 700), (val_clamp, "$g_relation_boost", 0, 20), (party_get_num_companion_stacks, ":num_ally_stacks", "$g_ally_party"), (gt, ":num_ally_stacks", 0), (store_faction_of_party, ":ally_faction","$g_ally_party"), (call_script, "script_change_player_relation_with_faction", ":ally_faction", ":faction_reln_boost"), (party_stack_get_troop_id, ":ally_leader", "$g_ally_party"), (party_stack_get_troop_dna, ":ally_leader_dna", "$g_ally_party"), (try_begin), (troop_is_hero, ":ally_leader"), (troop_get_slot, ":hero_relation", ":ally_leader", slot_troop_player_relation), (assign, ":rel_boost", "$g_relation_boost"), (try_begin), (lt, ":hero_relation", -5), (val_div, ":rel_boost", 3), (try_end), (call_script,"script_change_player_relation_with_troop", ":ally_leader", ":rel_boost"), (try_end), (assign, "$talk_context", tc_ally_thanks), (call_script, "script_setup_troop_meeting",":ally_leader", ":ally_leader_dna"), (else_try), # Talk to enemy leaders (assign, ":done", 0), (party_get_num_companion_stacks, ":num_stacks", "p_encountered_party_backup"), (try_for_range, ":stack_no", "$last_defeated_hero", ":num_stacks"), (eq, ":done", 0), (party_stack_get_troop_id, ":stack_troop","p_encountered_party_backup",":stack_no"), (party_stack_get_troop_dna, ":stack_troop_dna","p_encountered_party_backup",":stack_no"), (troop_is_hero, ":stack_troop"), (store_add, "$last_defeated_hero", ":stack_no", 1), (call_script, "script_remove_troop_from_prison", ":stack_troop"), (troop_set_slot, ":stack_troop", slot_troop_leaded_party, -1), (store_troop_faction, ":defeated_faction", ":stack_troop"), #steve post 0912 changes begin - removed, this is duplicated elsewhere in game menus # (call_script, "script_add_log_entry", logent_lord_defeated_by_player, "trp_player", -1, ":stack_troop", ":defeated_faction"), (try_begin), (call_script, "script_cf_check_hero_can_escape_from_player", ":stack_troop"), (str_store_troop_name, s1, ":stack_troop"), (str_store_faction_name, s3, ":defeated_faction"), (str_store_string, s17, "@{s1} of {s3} managed to escape."), (display_log_message, "@{s17}"), (jump_to_menu, "mnu_enemy_slipped_away"), (assign, ":done", 1), (else_try), (assign, "$talk_context", tc_hero_defeated), (call_script, "script_setup_troop_meeting",":stack_troop", ":stack_troop_dna"), (assign, ":done", 1), (try_end), (try_end), (eq, ":done", 1), (else_try), # Talk to freed heroes (assign, ":done", 0), (party_get_num_prisoner_stacks, ":num_prisoner_stacks","p_encountered_party_backup"), (try_for_range, ":stack_no", "$last_freed_hero", ":num_prisoner_stacks"), (eq, ":done", 0), (party_prisoner_stack_get_troop_id, ":stack_troop","p_encountered_party_backup",":stack_no"), (troop_is_hero, ":stack_troop"), (party_prisoner_stack_get_troop_dna, ":stack_troop_dna","p_encountered_party_backup",":stack_no"), (store_add, "$last_freed_hero", ":stack_no", 1), (assign, "$talk_context", tc_hero_freed), (call_script, "script_setup_troop_meeting",":stack_troop", ":stack_troop_dna"), (assign, ":done", 1), (try_end), (eq, ":done", 1), (else_try), (eq, "$capture_screen_shown", 0), (assign, "$capture_screen_shown", 1), (party_clear, "p_temp_party"), (assign, "$g_move_heroes", 0), (call_script, "script_party_prisoners_add_party_companions", "p_temp_party", "p_collective_enemy"), (call_script, "script_party_add_party_prisoners", "p_temp_party", "p_collective_enemy"), (try_begin), (call_script, "script_party_calculate_strength", "p_collective_friends_backup",0), (assign,":total_initial_strength", reg(0)), (gt, ":total_initial_strength", 0), # (gt, "$g_ally_party", 0), (call_script, "script_party_calculate_strength", "p_main_party_backup",0), (assign,":player_party_initial_strength", reg(0)), # move ally_party_initial_strength/(player_party_initial_strength + ally_party_initial_strength) prisoners to ally party. # First we collect the share of prisoners of the ally party and distribute those among the allies. (store_sub, ":ally_party_initial_strength", ":total_initial_strength", ":player_party_initial_strength"), # (call_script, "script_party_calculate_strength", "p_ally_party_backup"), # (assign,":ally_party_initial_strength", reg(0)), # (store_add, ":total_initial_strength", ":player_party_initial_strength", ":ally_party_initial_strength"), (store_mul, ":ally_share", ":ally_party_initial_strength", 1000), (val_div, ":ally_share", ":total_initial_strength"), (assign, "$pin_number", ":ally_share"), #we send this as a parameter to the script. (party_clear, "p_temp_party_2"), (call_script, "script_move_members_with_ratio", "p_temp_party", "p_temp_party_2"), #TODO: This doesn't handle prisoners if our allies joined battle after us. (try_begin), (gt, "$g_ally_party", 0), (distribute_party_among_party_group, "p_temp_party_2", "$g_ally_party"), (try_end), #next if there's anything left, we'll open up the party exchange screen and offer them to the player. (try_end), (party_get_num_companions, ":num_rescued_prisoners", "p_temp_party"), (party_get_num_prisoners, ":num_captured_enemies", "p_temp_party"), (store_add, ":total_capture_size", ":num_rescued_prisoners", ":num_captured_enemies"), (gt, ":total_capture_size", 0), (change_screen_exchange_with_party, "p_temp_party"), (else_try), (eq, "$loot_screen_shown", 0), (assign, "$loot_screen_shown", 1), (try_begin), (gt, "$g_ally_party", 0), (call_script, "script_party_add_party", "$g_ally_party", "p_temp_party"), #Add remaining prisoners to ally TODO: FIX it. (else_try), (party_get_num_attached_parties, ":num_quick_attachments", "p_main_party"), (gt, ":num_quick_attachments", 0), (party_get_attached_party_with_rank, ":helper_party", "p_main_party", 0), (call_script, "script_party_add_party", ":helper_party", "p_temp_party"), #Add remaining prisoners to our reinforcements (try_end), (troop_clear_inventory, "trp_temp_troop"), (call_script, "script_party_calculate_loot", "p_encountered_party_backup"), (gt, reg0, 0), (troop_sort_inventory, "trp_temp_troop"), (change_screen_loot, "trp_temp_troop"), (else_try), #finished all (try_begin), (le, "$g_ally_party", 0), (end_current_battle), (try_end), (call_script, "script_party_give_xp_and_gold", "p_encountered_party_backup"), (try_begin), (eq, "$g_enemy_party", 0), (display_message,"str_error_string"), (try_end), (call_script, "script_event_player_defeated_enemy_party", "$g_enemy_party"), (call_script, "script_clear_party_group", "$g_enemy_party"), (try_begin), (eq, "$g_next_menu", -1), #NPC companion changes begin (call_script, "script_post_battle_personality_clash_check"), #NPC companion changes end #Post 0907 changes begin (party_stack_get_troop_id, ":enemy_leader","p_encountered_party_backup",0), (try_begin), (is_between, ":enemy_leader", kingdom_heroes_begin, kingdom_heroes_end), (neg|is_between, "$g_encountered_party", centers_begin, centers_end), (store_troop_faction, ":enemy_leader_faction", ":enemy_leader"), (try_begin), (eq, "$g_ally_party", 0), (call_script, "script_add_log_entry", logent_lord_defeated_by_player, "trp_player", -1, ":enemy_leader", ":enemy_leader_faction"), (try_begin), (eq, "$cheat_mode", 1), (display_message, "@Victory comment. Player was alone"), (try_end), (else_try), (ge, "$g_strength_contribution_of_player", 40), (call_script, "script_add_log_entry", logent_lord_defeated_by_player, "trp_player", -1, ":enemy_leader", ":enemy_leader_faction"), (try_begin), (eq, "$cheat_mode", 1), (display_message, "@Ordinary victory comment. The player provided at least 40 percent forces."), (try_end), (else_try), (gt, "$g_starting_strength_enemy_party", 1000), (call_script, "script_get_closest_center", "p_main_party"), (assign, ":battle_of_where", reg0), (call_script, "script_add_log_entry", logent_player_participated_in_major_battle, "trp_player", ":battle_of_where", -1, ":enemy_leader_faction"), (try_begin), (eq, "$cheat_mode", 1), (display_message, "@Player participation comment. The enemy had at least 1k starting strength."), (try_end), (else_try), (eq, "$cheat_mode", 1), (display_message, "@No victory comment. The battle was small, and the player provided less than 40 percent of allied strength"), (try_end), (try_end), #Post 0907 changes end (val_add, "$g_total_victories", 1), (leave_encounter), (change_screen_return), (else_try), (jump_to_menu, "$g_next_menu"), (try_end), (try_end), ], [ ("continue",[],"Continue...",[]), ] ), ( "enemy_slipped_away",0, "{s17}", "none", [], [ ("continue",[],"Continue...",[(jump_to_menu,"mnu_total_victory")]), ] ), ( "total_defeat",0, "You shouldn't be reading this...", "none", [ (play_track, "track_captured", 1), # Free prisoners (party_get_num_prisoner_stacks, ":num_prisoner_stacks","p_main_party"), (try_for_range, ":stack_no", 0, ":num_prisoner_stacks"), (party_prisoner_stack_get_troop_id, ":stack_troop","p_main_party",":stack_no"), (troop_is_hero, ":stack_troop"), (call_script, "script_remove_troop_from_prison", ":stack_troop"), (try_end), (call_script, "script_loot_player_items", "$g_enemy_party"), (assign, "$g_move_heroes", 0), (party_clear, "p_temp_party"), (call_script, "script_party_add_party_prisoners", "p_temp_party", "p_main_party"), (call_script, "script_party_prisoners_add_party_companions", "p_temp_party", "p_main_party"), (distribute_party_among_party_group, "p_temp_party", "$g_enemy_party"), (call_script, "script_party_remove_all_companions", "p_main_party"), (assign, "$g_move_heroes", 1), (call_script, "script_party_remove_all_prisoners", "p_main_party"), (val_add, "$g_total_defeats", 1), (try_begin), (store_random_in_range, ":random_no", 0, 100), (ge, ":random_no", "$g_player_luck"), (jump_to_menu, "mnu_permanent_damage"), (else_try), (try_begin), (eq, "$g_next_menu", -1), (leave_encounter), (change_screen_return), (else_try), (jump_to_menu, "$g_next_menu"), (try_end), (try_end), (try_begin), (gt, "$g_ally_party", 0), (call_script, "script_party_wound_all_members", "$g_ally_party"), (try_end), #Troop commentary changes begin (party_get_num_companion_stacks, ":num_stacks", "p_encountered_party_backup"), (try_for_range, ":stack_no", 0, ":num_stacks"), (party_stack_get_troop_id, ":stack_troop","p_encountered_party_backup",":stack_no"), (is_between, ":stack_troop", kingdom_heroes_begin, kingdom_heroes_end), (store_troop_faction, ":victorious_faction", ":stack_troop"), (call_script, "script_add_log_entry", logent_player_defeated_by_lord, "trp_player", -1, ":stack_troop", ":victorious_faction"), (try_end), #Troop commentary changes end ], [] ), ( "permanent_damage",mnf_disable_all_keys, "{s0}", "none", [ (assign, ":end_cond", 1), (try_for_range, ":unused", 0, ":end_cond"), (store_random_in_range, ":random_attribute", 0, 4), (store_attribute_level, ":attr_level", "trp_player", ":random_attribute"), (try_begin), (gt, ":attr_level", 3), (neq, ":random_attribute", ca_charisma), (try_begin), (eq, ":random_attribute", ca_strength), (str_store_string, s0, "@Some of your tendons have been damaged in the battle. You lose 1 strength."), (else_try), (eq, ":random_attribute", ca_agility), (str_store_string, s0, "@You took a nasty wound which will cause you to limp slightly even after it heals. Your lose 1 agility."), ## (else_try), ## (eq, ":random_attribute", ca_charisma), ## (str_store_string, s0, "@After the battle you are aghast to find that one of the terrible blows you suffered has left a deep, disfiguring scar on your face, horrifying those around you. Your charisma is reduced by 1."), (else_try), ## (eq, ":random_attribute", ca_intelligence), (str_store_string, s0, "@You have trouble thinking straight after the battle, perhaps from a particularly hard hit to your head, and frequent headaches now plague your existence. Your intelligence is reduced by 1."), (try_end), (else_try), (lt, ":end_cond", 200), (val_add, ":end_cond", 1), (try_end), (try_end), (try_begin), (eq, ":end_cond", 200), (try_begin), (eq, "$g_next_menu", -1), (leave_encounter), (change_screen_return), (else_try), (jump_to_menu, "$g_next_menu"), (try_end), (else_try), (troop_raise_attribute, "trp_player", ":random_attribute", -1), (try_end), ], [ ("s0", [ (store_random_in_range, ":random_no", 0, 4), (try_begin), (eq, ":random_no", 0), (str_store_string, s0, "@Perhaps I'm getting unlucky..."), (else_try), (eq, ":random_no", 1), (str_store_string, s0, "@Retirement is starting to sound better and better."), (else_try), (eq, ":random_no", 2), (str_store_string, s0, "@No matter! I will persevere!"), (else_try), (eq, ":random_no", 3), (troop_get_type, ":is_female", "trp_player"), (try_begin), (eq, ":is_female", 1), (str_store_string, s0, "@What did I do to deserve this?"), (else_try), (str_store_string, s0, "@I suppose it'll make for a good story, at least..."), (try_end), (try_end), ], "{s0}", [ (try_begin), (eq, "$g_next_menu", -1), (leave_encounter), (change_screen_return), (else_try), (jump_to_menu, "$g_next_menu"), (try_end), ]), ] ), ( "pre_join",0, "You come across a battle between {s2} and {s1}. You decide to...", "none", [ (str_store_party_name, 1,"$g_encountered_party"), (str_store_party_name, 2,"$g_encountered_party_2"), ], [ ("pre_join_help_attackers",[ (store_faction_of_party, ":attacker_faction", "$g_encountered_party_2"), (store_relation, ":attacker_relation", ":attacker_faction", "fac_player_supporters_faction"), (store_faction_of_party, ":defender_faction", "$g_encountered_party"), (store_relation, ":defender_relation", ":defender_faction", "fac_player_supporters_faction"), (ge, ":attacker_relation", 0), (lt, ":defender_relation", 0), ], "Move in to help the {s2}.",[ (select_enemy,0), (assign,"$g_enemy_party","$g_encountered_party"), (assign,"$g_ally_party","$g_encountered_party_2"), (jump_to_menu,"mnu_join_battle")]), ("pre_join_help_defenders",[ (store_faction_of_party, ":attacker_faction", "$g_encountered_party_2"), (store_relation, ":attacker_relation", ":attacker_faction", "fac_player_supporters_faction"), (store_faction_of_party, ":defender_faction", "$g_encountered_party"), (store_relation, ":defender_relation", ":defender_faction", "fac_player_supporters_faction"), (ge, ":defender_relation", 0), (lt, ":attacker_relation", 0), ], "Rush to the aid of the {s1}.",[ (select_enemy,1), (assign,"$g_enemy_party","$g_encountered_party_2"), (assign,"$g_ally_party","$g_encountered_party"), (jump_to_menu,"mnu_join_battle")]), ("pre_join_leave",[],"Don't get involved.",[(leave_encounter),(change_screen_return)]), ] ), ( "join_battle",0, "You are helping the {s2} against the {s1}. You have {reg10} troops fit for battle against the enemy's {reg11}.", "none", [ (str_store_party_name, 1,"$g_enemy_party"), (str_store_party_name, 2,"$g_ally_party"), (call_script, "script_encounter_calculate_fit"), (try_begin), (eq, "$new_encounter", 1), (assign, "$new_encounter", 0), (call_script, "script_encounter_init_variables"), ## (assign, "$capture_screen_shown", 0), ## (assign, "$loot_screen_shown", 0), ## (assign, "$g_battle_result", 0), ## (assign, "$cant_leave_encounter", 0), ## (assign, "$last_defeated_hero", 0), ## (assign, "$last_freed_hero", 0), ## (call_script, "script_party_copy", "p_main_party_backup", "p_main_party"), ## (call_script, "script_party_copy", "p_encountered_party_backup", "p_collective_enemy"), ## (call_script, "script_party_copy", "p_ally_party_backup", "p_collective_ally"), (else_try), #second or more turn (eq, "$g_leave_encounter",1), (change_screen_return), (try_end), (try_begin), (call_script, "script_party_count_members_with_full_health","p_collective_enemy"), (assign, ":num_enemy_regulars_remaining", reg(0)), (assign, ":enemy_finished",0), (try_begin), (eq, "$g_battle_result", 1), (eq, ":num_enemy_regulars_remaining", 0), #battle won (assign, ":enemy_finished",1), (else_try), (eq, "$g_engaged_enemy", 1), (le, "$g_enemy_fit_for_battle",0), (ge, "$g_friend_fit_for_battle",1), (assign, ":enemy_finished",1), (try_end), (this_or_next|eq, ":enemy_finished",1), (eq,"$g_enemy_surrenders",1), (assign, "$g_next_menu", -1), (jump_to_menu, "mnu_total_victory"), (else_try), # (eq, "$encountered_party_hostile", 1), (call_script, "script_party_count_members_with_full_health","p_collective_friends"), (assign, ":ally_num_soldiers", reg(0)), (assign, ":battle_lost", 0), (try_begin), (eq, "$g_battle_result", -1), (eq, ":ally_num_soldiers", 0), #battle lost (assign, ":battle_lost",1), (try_end), (this_or_next|eq, ":battle_lost",1), (eq,"$g_player_surrenders",1), # TODO: Split prisoners to all collected parties. # NO Need? Let default battle logic do it for us. # (assign, "$g_move_heroes", 0), # (call_script, "script_party_add_party_prisoners", "$g_enemy_party", "p_collective_ally"), # (call_script, "script_party_prisoners_add_party_companions", "$g_enemy_party", "p_collective_ally"), #TODO: Clear all attached allies. # (call_script, "script_party_remove_all_companions", "$g_ally_party"), # (call_script, "script_party_remove_all_prisoners", "$g_ally_party"), (leave_encounter), (change_screen_return), (try_end), ], [ ("join_attack",[ # (neq, "$encountered_party_hostile", 0), (neg|troop_is_wounded, "trp_player"), ## (store_troop_health,reg(5),"trp_player"), ## (ge,reg(5),20), ], "Charge the enemy.",[ (party_set_next_battle_simulation_time, "$g_encountered_party", -1), (assign, "$g_battle_result", 0), (call_script, "script_calculate_renown_value"), (call_script, "script_calculate_battle_advantage"), (set_battle_advantage, reg0), (set_party_battle_mode), (set_jump_mission,"mt_lead_charge"), (call_script, "script_setup_random_scene"), (assign, "$g_next_menu", "mnu_join_battle"), (jump_to_menu, "mnu_battle_debrief"), (change_screen_mission), ]), ("join_order_attack",[ # (gt, "$encountered_party_hostile", 0), (call_script, "script_party_count_members_with_full_health", "p_main_party"),(ge, reg(0), 3), ], "Order your troops to attack with your allies while you stay back.",[(party_set_next_battle_simulation_time, "$g_encountered_party", -1), (jump_to_menu,"mnu_join_order_attack"), ]), # ("join_attack",[],"Lead a charge against the enemies",[(set_jump_mission,"mt_charge_with_allies"), # (call_script, "script_setup_random_scene"), # (change_screen_mission,0)]), ("join_leave",[],"Leave.",[ (try_begin), (neg|troop_is_wounded, "trp_player"), (call_script, "script_objectionable_action", tmt_aristocratic, "str_flee_battle"), (party_stack_get_troop_id, ":enemy_leader","$g_enemy_party",0), (call_script, "script_add_log_entry", logent_player_retreated_from_lord, "trp_player", -1, ":enemy_leader", -1), (display_message, "@Player retreats from battle"), (try_end), (leave_encounter),(change_screen_return)]), ] ), ( "join_order_attack",mnf_disable_all_keys, "{s4}^^Your casualties: {s8}^^Allies' casualties: {s9}^^Enemy casualties: {s10}", "none", [ (call_script, "script_party_calculate_strength", "p_main_party", 1), #skip player (assign, ":player_party_strength", reg0), (val_div, ":player_party_strength", 5), (call_script, "script_party_calculate_strength", "p_collective_friends", 0), (assign, ":friend_party_strength", reg0), (val_div, ":friend_party_strength", 5), (call_script, "script_party_calculate_strength", "p_collective_enemy", 0), (assign, ":enemy_party_strength", reg0), (val_div, ":enemy_party_strength", 5), (assign, ":enemy_party_strength_for_p", ":enemy_party_strength"), (val_mul, ":enemy_party_strength_for_p", ":player_party_strength"), (val_div, ":enemy_party_strength_for_p", ":friend_party_strength"), (val_sub, ":enemy_party_strength", ":enemy_party_strength_for_p"), (inflict_casualties_to_party_group, "p_main_party", ":enemy_party_strength_for_p", "p_temp_casualties"), (call_script, "script_print_casualties_to_s0", "p_temp_casualties", 0), (str_store_string_reg, s8, s0), (inflict_casualties_to_party_group, "$g_enemy_party", ":friend_party_strength", "p_temp_casualties"), (call_script, "script_print_casualties_to_s0", "p_temp_casualties", 0), (str_store_string_reg, s10, s0), (call_script, "script_collect_friendly_parties"), # (party_collect_attachments_to_party, "$g_ally_party", "p_collective_ally"), (inflict_casualties_to_party_group, "$g_ally_party", ":enemy_party_strength", "p_temp_casualties"), (call_script, "script_print_casualties_to_s0", "p_temp_casualties", 0), (str_store_string_reg, s9, s0), (party_collect_attachments_to_party, "$g_enemy_party", "p_collective_enemy"), # (assign, "$cant_leave_encounter", 0), (assign, "$no_soldiers_left", 0), (try_begin), (call_script, "script_party_count_members_with_full_health","p_main_party"), (le, reg(0), 0), (assign, "$no_soldiers_left", 1), (str_store_string, s4, "str_join_order_attack_failure"), (else_try), (call_script, "script_party_count_members_with_full_health","p_collective_enemy"), (le, reg(0), 0), (assign, "$g_battle_result", 1), (assign, "$no_soldiers_left", 1), (str_store_string, s4, "str_join_order_attack_success"), (else_try), (str_store_string, s4, "str_join_order_attack_continue"), (try_end), ], [ ("continue",[],"Continue...",[ (jump_to_menu,"mnu_join_battle"), ]), ] ), # Towns ( "zendar",mnf_auto_enter, "You enter the town of Zendar.", "none", [(reset_price_rates,0),(set_price_rate_for_item,"itm_tools",70),(set_price_rate_for_item,"itm_salt",140)], [ ("zendar_enter",[],"_",[(set_jump_mission,"mt_town_default"),(jump_to_scene,"scn_zendar_center"),(change_screen_mission)],"Door to the town center."), ("zendar_tavern",[],"_",[(set_jump_mission,"mt_town_default"), (jump_to_scene,"scn_the_happy_boar"), (change_screen_mission)],"Door to the tavern."), ("zendar_merchant",[],"_",[(set_jump_mission,"mt_town_default"), (jump_to_scene,"scn_zendar_merchant"), (change_screen_mission)],"Door to the merchant."), ("zendar_arena",[],"_",[(set_jump_mission,"mt_town_default"), (jump_to_scene,"scn_zendar_arena"), (change_screen_mission)],"Door to the arena."), # ("zendar_leave",[],"Leave town.",[[leave_encounter],[change_screen_return]]), ("town_1_leave",[],"_",[(leave_encounter),(change_screen_return)]), ] ), ( "salt_mine",mnf_auto_enter, "You enter the salt mine.", "none", [(reset_price_rates,0),(set_price_rate_for_item,"itm_salt",55)], [ ("enter",[],"Enter.",[(set_jump_mission,"mt_town_center"),(jump_to_scene,"scn_salt_mine"),(change_screen_mission)]), ("leave",[],"Leave.",[(leave_encounter),(change_screen_return)]), ] ), ( "four_ways_inn",mnf_auto_enter, "You arrive at the Four Ways Inn.", "none", [], [ # ("enter",[],"Enter.",[[set_jump_mission,"mt_town_default"],[jump_to_scene,"scn_conversation_scene"],[change_screen_mission]]), ("enter",[],"Enter.",[(set_jump_mission,"mt_camera_test"),(jump_to_scene,"scn_four_ways_inn"),(change_screen_mission)]), ("leave",[],"Leave.",[(leave_encounter),(change_screen_return)]), ] ), ( "test_scene",mnf_auto_enter, "You enter the test scene.", "none", [], [ ("enter",[],"Enter.",[[set_jump_mission,"mt_ai_training"],[jump_to_scene,"scn_test_scene"],[change_screen_mission]]), ("leave",[],"Leave.",[(leave_encounter),(change_screen_return)]), ] ), ( "battlefields",0, "Select a field...", "none", [], [ ("enter_f1",[],"Field 1",[[set_jump_mission,"mt_ai_training"],[jump_to_scene,"scn_field_1"],[change_screen_mission]]), ("enter_f2",[],"Field 2",[[set_jump_mission,"mt_ai_training"],[jump_to_scene,"scn_field_2"],[change_screen_mission]]), ("enter_f3",[],"Field 3",[[set_jump_mission,"mt_ai_training"],[jump_to_scene,"scn_field_3"],[change_screen_mission]]), ("enter_f4",[],"Field 4",[[set_jump_mission,"mt_ai_training"],[jump_to_scene,"scn_field_4"],[change_screen_mission]]), ("enter_f5",[],"Field 5",[[set_jump_mission,"mt_ai_training"],[jump_to_scene,"scn_field_5"],[change_screen_mission]]), ("leave",[],"Leave.",[(leave_encounter),(change_screen_return)]), ] ), ( "dhorak_keep",0, # "Dhorak Keep, the stronghold of the bandits stands overlooking the barren wilderness.", "You enter the Dhorak Keep", "none", [], [ ("enter",[],"Enter.",[(set_jump_mission,"mt_town_center"),(jump_to_scene,"scn_dhorak_keep"),(change_screen_mission)]), ("leave",[],"Leave.",[(leave_encounter),(change_screen_return)]), ] ), ## ( ## "center_under_attack_while_resting",0, ## "{s1} has been besieged by {s2}, and the enemy seems to be preparing for an assault!\ ## What will you do?", ## "none", ## [ ## (party_get_battle_opponent, ":besieger_party", "$auto_enter_town"), ## (str_store_party_name, s1, "$auto_enter_town"), ## (str_store_party_name, s2, ":besieger_party"), ## ], ## [ ## ("defend_against_siege", [],"Help the defenders of {s1}!", ## [ ## (assign, "$g_last_player_do_nothing_against_siege_next_check", 0), ## (rest_for_hours, 0, 0, 0), ## (change_screen_return), ## (start_encounter, "$auto_enter_town"), ## ]), ## ("do_not_defend_against_siege",[],"Find a secure place and wait there.", ## [ ## (change_screen_return), ## ]), ## ] ## ), ( "join_siege_outside",mnf_scale_picture, "{s1} has come under siege by {s2}.", "none", [ (str_store_party_name, s1, "$g_encountered_party"), (str_store_party_name, s2, "$g_encountered_party_2"), (troop_get_type, ":is_female", "trp_player"), (try_begin), (eq, ":is_female", 1), (set_background_mesh, "mesh_pic_siege_sighted_fem"), (else_try), (set_background_mesh, "mesh_pic_siege_sighted"), (try_end), ], [ ("approach_besiegers",[(store_faction_of_party, ":faction_no", "$g_encountered_party_2"), (store_relation, ":relation", ":faction_no", "fac_player_supporters_faction"), (ge, ":relation", 0), (store_faction_of_party, ":faction_no", "$g_encountered_party"), (store_relation, ":relation", ":faction_no", "fac_player_supporters_faction"), (lt, ":relation", 0), ],"Approach the siege camp.",[ (jump_to_menu, "mnu_besiegers_camp_with_allies"), ]), ("pass_through_siege",[(store_faction_of_party, ":faction_no", "$g_encountered_party"), (store_relation, ":relation", ":faction_no", "fac_player_supporters_faction"), (ge, ":relation", 0), ],"Pass through the siege lines and enter {s1}.", [ (jump_to_menu,"mnu_cut_siege_without_fight"), ]), ("leave",[],"Leave.",[(leave_encounter), (change_screen_return)]), ] ), ( "cut_siege_without_fight",0, "The besiegers let you approach the gates without challenge.", "none", [], [ ("continue",[],"Continue...",[(try_begin), (this_or_next|eq, "$g_encountered_party_faction", "fac_player_supporters_faction"), (eq, "$g_encountered_party_faction", "$players_kingdom"), (jump_to_menu, "mnu_town"), (else_try), (jump_to_menu, "mnu_castle_outside"), (try_end)]), ] ), ( "besiegers_camp_with_allies",0, "{s1} remains under siege. The banners of {s2} fly above the camp of the besiegers,\ where you and your men are welcomed.", "none", [ (str_store_party_name, s1, "$g_encountered_party"), (str_store_party_name, s2, "$g_encountered_party_2"), (assign, "$g_enemy_party", "$g_encountered_party"), (assign, "$g_ally_party", "$g_encountered_party_2"), (select_enemy, 0), (call_script, "script_encounter_calculate_fit"), (try_begin), (eq, "$new_encounter", 1), (assign, "$new_encounter", 0), (call_script, "script_encounter_init_variables"), (try_end), (try_begin), (eq, "$g_leave_encounter",1), (change_screen_return), (else_try), (assign, ":enemy_finished", 0), (try_begin), (eq, "$g_battle_result", 1), (assign, ":enemy_finished", 1), (else_try), (le, "$g_enemy_fit_for_battle", 0), (ge, "$g_friend_fit_for_battle", 1), (assign, ":enemy_finished", 1), (try_end), (this_or_next|eq, ":enemy_finished", 1), (eq, "$g_enemy_surrenders", 1), ## (assign, "$g_next_menu", -1),#"mnu_castle_taken_by_friends"), ## (jump_to_menu, "mnu_total_victory"), (call_script, "script_party_wound_all_members", "$g_enemy_party"), (leave_encounter), (change_screen_return), (else_try), (call_script, "script_party_count_members_with_full_health", "p_collective_friends"), (assign, ":ally_num_soldiers", reg0), (eq, "$g_battle_result", -1), (eq, ":ally_num_soldiers", 0), #battle lost (leave_encounter), (change_screen_return), (try_end), ], [ ("talk_to_siege_commander",[]," Request a meeting with the commander.",[ (modify_visitors_at_site,"scn_conversation_scene"),(reset_visitors), (set_visitor,0,"trp_player"), (party_stack_get_troop_id, ":siege_leader_id","$g_encountered_party_2",0), (party_stack_get_troop_dna,":siege_leader_dna","$g_encountered_party_2",0), (set_visitor,17,":siege_leader_id",":siege_leader_dna"), (set_jump_mission,"mt_conversation_encounter"), (jump_to_scene,"scn_conversation_scene"), (assign, "$talk_context", tc_siege_commander), (change_screen_map_conversation, ":siege_leader_id")]), ("join_siege_with_allies",[(neg|troop_is_wounded, "trp_player")], "Join the next assault.", [ (party_set_next_battle_simulation_time, "$g_encountered_party", -1), (try_begin), (check_quest_active, "qst_join_siege_with_army"), (quest_slot_eq, "qst_join_siege_with_army", slot_quest_target_center, "$g_encountered_party"), (add_xp_as_reward, 250), (call_script, "script_end_quest", "qst_join_siege_with_army"), #Reactivating follow army quest (faction_get_slot, ":faction_marshall", "$players_kingdom", slot_faction_marshall), (str_store_troop_name_link, s9, ":faction_marshall"), (setup_quest_text, "qst_follow_army"), (str_store_string, s2, "@{s9} wants you to follow his army until further notice."), (call_script, "script_start_quest", "qst_follow_army", ":faction_marshall"), (assign, "$g_player_follow_army_warnings", 0), (try_end), (try_begin), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_town), (party_get_slot, ":battle_scene", "$g_encountered_party", slot_town_walls), (else_try), (party_get_slot, ":battle_scene", "$g_encountered_party", slot_castle_exterior), (try_end), (call_script, "script_calculate_battle_advantage"), (val_mul, reg0, 2), (val_div, reg0, 3), #scale down the advantage a bit in sieges. (set_battle_advantage, reg0), (set_party_battle_mode), (try_begin), (party_slot_eq, "$g_encountered_party", slot_center_siege_with_belfry, 1), (set_jump_mission,"mt_castle_attack_walls_belfry"), (else_try), (set_jump_mission,"mt_castle_attack_walls_ladder"), (try_end), (jump_to_scene,":battle_scene"), (assign, "$g_siege_final_menu", "mnu_besiegers_camp_with_allies"), (assign, "$g_siege_battle_state", 1), (assign, "$g_next_menu", "mnu_castle_besiege_inner_battle"), ## (assign, "$g_next_menu", "mnu_besiegers_camp_with_allies"), (jump_to_menu, "mnu_battle_debrief"), (change_screen_mission), ]), ("join_siege_stay_back", [(call_script, "script_party_count_members_with_full_health", "p_main_party"), (ge, reg0, 3), ], "Order your soldiers to join the next assault without you.", [ (party_set_next_battle_simulation_time, "$g_encountered_party", -1), (try_begin), (check_quest_active, "qst_join_siege_with_army"), (quest_slot_eq, "qst_join_siege_with_army", slot_quest_target_center, "$g_encountered_party"), (add_xp_as_reward, 100), (call_script, "script_end_quest", "qst_join_siege_with_army"), #Reactivating follow army quest (faction_get_slot, ":faction_marshall", "$players_kingdom", slot_faction_marshall), (str_store_troop_name_link, s9, ":faction_marshall"), (setup_quest_text, "qst_follow_army"), (str_store_string, s2, "@{s9} wants you to follow his army until further notice."), (call_script, "script_start_quest", "qst_follow_army", ":faction_marshall"), (assign, "$g_player_follow_army_warnings", 0), (try_end), (jump_to_menu,"mnu_castle_attack_walls_with_allies_simulate")]), ("leave",[],"Leave.",[(leave_encounter),(change_screen_return)]), ] ), ( "castle_outside",0, "You are outside {s2}.{s11} {s3} {s4}", "none", [ (assign, "$g_enemy_party", "$g_encountered_party"), (assign, "$g_ally_party", -1), #(assign, reg1, "$g_encountered_party"), #(display_message, "@party id: {reg1}"), (str_store_party_name, s2,"$g_encountered_party"), (call_script, "script_encounter_calculate_fit"), (assign,"$all_doors_locked",1), (assign, "$current_town","$g_encountered_party"), (try_begin), (eq, "$new_encounter", 1), (assign, "$new_encounter", 0), (call_script, "script_let_nearby_parties_join_current_battle", 1, 0), (call_script, "script_encounter_init_variables"), (assign, "$entry_to_town_forbidden",0), (assign, "$sneaked_into_town",0), (assign, "$town_entered", 0), # (assign, "$waiting_for_arena_fight_result", 0), (assign, "$encountered_party_hostile", 0), (assign, "$encountered_party_friendly", 0), (try_begin), (gt, "$g_player_besiege_town", 0), (neq,"$g_player_besiege_town","$g_encountered_party"), (party_slot_eq, "$g_player_besiege_town", slot_center_is_besieged_by, "p_main_party"), (call_script, "script_lift_siege", "$g_player_besiege_town", 0), (assign,"$g_player_besiege_town",-1), (try_end), (try_begin), (lt, "$g_encountered_party_relation", 0), (assign, "$encountered_party_hostile", 1), (assign,"$entry_to_town_forbidden",1), (try_end), (assign,"$cant_sneak_into_town",0), (try_begin), (eq,"$current_town","$last_sneak_attempt_town"), (store_current_hours,reg(2)), (val_sub,reg(2),"$last_sneak_attempt_time"), (lt,reg(2),12), (assign,"$cant_sneak_into_town",1), (try_end), (else_try), #second or more turn (eq, "$g_leave_encounter",1), (change_screen_return), (try_end), (str_clear,s4), (try_begin), (eq,"$entry_to_town_forbidden",1), (try_begin), (eq,"$cant_sneak_into_town",1), (str_store_string,s4,"str_sneaking_to_town_impossible"), (else_try), (str_store_string,s4,"str_entrance_to_town_forbidden"), (try_end), (try_end), (party_get_slot, ":center_lord", "$current_town", slot_town_lord), (store_faction_of_party, ":center_faction", "$current_town"), (str_store_faction_name,s9,":center_faction"), (try_begin), (ge, ":center_lord", 0), (str_store_troop_name,s8,":center_lord"), (str_store_string,s7,"@{s8} of {s9}"), (try_end), (try_begin), # same mnu_town (party_slot_eq,"$current_town",slot_party_type, spt_castle), (try_begin), (eq, ":center_lord", "trp_player"), (str_store_string,s11,"@ Your own banner flies over the castle gate."), (else_try), (ge, ":center_lord", 0), (str_store_string,s11,"@ You see the banner of {s7} over the castle gate."), (else_try), (str_store_string,s11,"@ This castle seems to belong to no one."), (try_end), (else_try), (try_begin), (eq, ":center_lord", "trp_player"), (str_store_string,s11,"@ Your own banner flies over the town gates."), (else_try), (ge, ":center_lord", 0), (str_store_string,s11,"@ You see the banner of {s7} over the town gates."), (else_try), (str_store_string,s11,"@ The townsfolk here have declared their independence."), (try_end), (try_end), (party_get_num_companions, reg(7),"p_collective_enemy"), (assign,"$castle_undefended",0), (str_clear, s3), (try_begin), (eq,reg(7),0), (assign,"$castle_undefended",1), # (party_set_faction,"$g_encountered_party","fac_neutral"), # (party_set_slot, "$g_encountered_party", slot_town_lord, stl_unassigned), (str_store_string, s3, "str_castle_is_abondened"), (else_try), (eq,"$g_encountered_party_faction","fac_player_supporters_faction"), (str_store_string, s3, "str_place_is_occupied_by_player"), (else_try), (lt, "$g_encountered_party_relation", 0), (str_store_string, s3, "str_place_is_occupied_by_enemy"), (else_try), # (str_store_string, s3, "str_place_is_occupied_by_friendly"), (try_end), (try_begin), (eq, "$g_leave_town_outside",1), (assign, "$g_leave_town_outside",0), (assign, "$g_permitted_to_center", 0), (change_screen_return), (else_try), (check_quest_active, "qst_escort_lady"), (quest_slot_eq, "qst_escort_lady", slot_quest_target_center, "$g_encountered_party"), (quest_get_slot, ":quest_object_troop", "qst_escort_lady", slot_quest_object_troop), (modify_visitors_at_site,"scn_conversation_scene"), (reset_visitors), (set_visitor,0, "trp_player"), (set_visitor,17, ":quest_object_troop"), (set_jump_mission, "mt_conversation_encounter"), (jump_to_scene, "scn_conversation_scene"), (assign, "$talk_context", tc_entering_center_quest_talk), (change_screen_map_conversation, ":quest_object_troop"), (else_try), (check_quest_active, "qst_kidnapped_girl"), (quest_slot_eq, "qst_kidnapped_girl", slot_quest_giver_center, "$g_encountered_party"), (quest_slot_eq, "qst_kidnapped_girl", slot_quest_current_state, 3), (modify_visitors_at_site,"scn_conversation_scene"), (reset_visitors), (set_visitor,0, "trp_player"), (set_visitor,17, "trp_kidnapped_girl"), (set_jump_mission, "mt_conversation_encounter"), (jump_to_scene, "scn_conversation_scene"), (assign, "$talk_context", tc_entering_center_quest_talk), (change_screen_map_conversation, "trp_kidnapped_girl"), ## (else_try), ## (gt, "$lord_requested_to_talk_to", 0), ## (store_current_hours, ":cur_hours"), ## (neq, ":cur_hours", "$quest_given_time"), ## (modify_visitors_at_site,"scn_conversation_scene"), ## (reset_visitors), ## (assign, ":cur_lord", "$lord_requested_to_talk_to"), ## (assign, "$lord_requested_to_talk_to", 0), ## (set_visitor,0,"trp_player"), ## (set_visitor,17,":cur_lord"), ## (set_jump_mission,"mt_conversation_encounter"), ## (jump_to_scene,"scn_conversation_scene"), ## (assign, "$talk_context", tc_castle_gate_lord), ## (change_screen_map_conversation, ":cur_lord"), (else_try), (eq, "$g_town_visit_after_rest", 1), (assign, "$g_town_visit_after_rest", 0), (jump_to_menu,"mnu_town"), (else_try), (party_slot_eq,"$g_encountered_party", slot_town_lord, "trp_player"), (party_slot_eq,"$g_encountered_party", slot_party_type,spt_castle), (jump_to_menu, "mnu_enter_your_own_castle"), (else_try), (party_slot_eq,"$g_encountered_party", slot_party_type,spt_castle), (ge, "$g_encountered_party_relation", 0), (this_or_next|eq,"$castle_undefended",1), (eq, "$g_permitted_to_center",1), (jump_to_menu, "mnu_town"), (else_try), (party_slot_eq,"$g_encountered_party", slot_party_type,spt_town), (ge, "$g_encountered_party_relation", 0), (jump_to_menu, "mnu_town"), (else_try), (eq, "$g_player_besiege_town", "$g_encountered_party"), (jump_to_menu, "mnu_castle_besiege"), (try_end), ], [ # ("talk_to_castle_commander",[ # (party_get_num_companions, ":no_companions", "$g_encountered_party"), # (ge, ":no_companions", 1), # (eq,"$ruler_meeting_denied",0), #this variable is removed # ], # "Request a meeting with the lord of the castle.",[ # (modify_visitors_at_site,"scn_conversation_scene"),(reset_visitors), # (set_visitor,0,"trp_player"), # (party_stack_get_troop_id, reg(6),"$g_encountered_party",0), # (party_stack_get_troop_dna,reg(7),"$g_encountered_party",0), # (set_visitor,17,reg(6),reg(7)), # (set_jump_mission,"mt_conversation_encounter"), # (jump_to_scene,"scn_conversation_scene"), # (assign, "$talk_context", tc_castle_commander), # (change_screen_map_conversation, reg(6)) # ]), ("approach_gates",[(this_or_next|eq,"$entry_to_town_forbidden",1), (party_slot_eq,"$g_encountered_party", slot_party_type,spt_castle)], "Approach the gates and hail the guard.",[ (jump_to_menu, "mnu_castle_guard"), ## (modify_visitors_at_site,"scn_conversation_scene"),(reset_visitors), ## (set_visitor,0,"trp_player"), ## (store_faction_of_party, ":cur_faction", "$g_encountered_party"), ## (faction_get_slot, ":cur_guard", ":cur_faction", slot_faction_guard_troop), ## (set_visitor,17,":cur_guard"), ## (set_jump_mission,"mt_conversation_encounter"), ## (jump_to_scene,"scn_conversation_scene"), ## (assign, "$talk_context", tc_castle_gate), ## (change_screen_map_conversation, ":cur_guard") ]), ("town_sneak",[(party_slot_eq,"$g_encountered_party", slot_party_type,spt_town), (eq,"$entry_to_town_forbidden",1), (eq,"$cant_sneak_into_town",0)], "Disguise yourself and try to sneak into the town.", [ (faction_get_slot, ":player_alarm", "$g_encountered_party_faction", slot_faction_player_alarm), (party_get_num_companions, ":num_men", "p_main_party"), (party_get_num_prisoners, ":num_prisoners", "p_main_party"), (val_add, ":num_men", ":num_prisoners"), (val_mul, ":num_men", 2), (val_div, ":num_men", 3), (store_add, ":get_caught_chance", ":player_alarm", ":num_men"), (store_random_in_range, ":random_chance", 0, 100), (try_begin), (this_or_next|ge, ":random_chance", ":get_caught_chance"), (eq, "$g_last_defeated_bandits_town", "$g_encountered_party"), (assign, "$g_last_defeated_bandits_town", 0), (assign, "$sneaked_into_town",1), (assign, "$town_entered", 1), (jump_to_menu,"mnu_sneak_into_town_suceeded"), (else_try), (jump_to_menu,"mnu_sneak_into_town_caught"), (try_end) ]), ("castle_start_siege", [ (this_or_next|party_slot_eq, "$g_encountered_party", slot_center_is_besieged_by, -1), ( party_slot_eq, "$g_encountered_party", slot_center_is_besieged_by, "p_main_party"), (store_relation, ":reln", "$g_encountered_party_faction", "fac_player_supporters_faction"), (lt, ":reln", 0), (lt, "$g_encountered_party_2", 1), (call_script, "script_party_count_fit_for_battle","p_main_party"), (gt, reg(0), 5), (try_begin), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_town), (assign, reg6, 1), (else_try), (assign, reg6, 0), (try_end), ], "Besiege the {reg6?town:castle}.", [ (assign,"$g_player_besiege_town","$g_encountered_party"), (store_relation, ":relation", "fac_player_supporters_faction", "$g_encountered_party_faction"), (val_min, ":relation", -40), (call_script, "script_set_player_relation_with_faction", "$g_encountered_party_faction", ":relation"), (call_script, "script_update_all_notes"), (jump_to_menu, "mnu_castle_besiege"), ]), ("cheat_castle_start_siege", [ (eq, "$cheat_mode", 1), (this_or_next|party_slot_eq, "$g_encountered_party", slot_center_is_besieged_by, -1), ( party_slot_eq, "$g_encountered_party", slot_center_is_besieged_by, "p_main_party"), (store_relation, ":reln", "$g_encountered_party_faction", "fac_player_supporters_faction"), (ge, ":reln", 0), (lt, "$g_encountered_party_2", 1), (call_script, "script_party_count_fit_for_battle","p_main_party"), (gt, reg(0), 1), (try_begin), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_town), (assign, reg6, 1), (else_try), (assign, reg6, 0), (try_end), ], "CHEAT: Besiege the {reg6?town:castle}...", [ (assign,"$g_player_besiege_town","$g_encountered_party"), (jump_to_menu, "mnu_castle_besiege"), ]), ("castle_leave",[],"Leave.",[(change_screen_return,0)]), ("castle_cheat_interior",[(eq, "$cheat_mode", 1)], "CHEAT! Interior.",[(set_jump_mission,"mt_ai_training"), (party_get_slot, ":castle_scene", "$current_town", slot_town_castle), (jump_to_scene,":castle_scene"), (change_screen_mission)]), ("castle_cheat_exterior",[(eq, "$cheat_mode", 1)], "CHEAT! Exterior.",[ # (set_jump_mission,"mt_town_default"), (set_jump_mission,"mt_ai_training"), (party_get_slot, ":castle_scene", "$current_town", slot_castle_exterior), (jump_to_scene,":castle_scene"), (change_screen_mission)]), ("castle_cheat_town_walls",[(eq, "$cheat_mode", 1),(party_slot_eq,"$current_town",slot_party_type, spt_town),], "CHEAT! Town Walls.", [ (party_get_slot, ":scene", "$current_town", slot_town_walls), (set_jump_mission,"mt_ai_training"), (jump_to_scene,":scene"), (change_screen_mission)]), ] ), ( "castle_guard",0, "You approach the gate. The men on the walls watch you closely.", "none", [ ], [ ("request_shelter",[(party_slot_eq, "$g_encountered_party",slot_party_type, spt_castle), (ge, "$g_encountered_party_relation", 0)], "Request entry to the castle.", [(party_get_slot, ":castle_lord", "$g_encountered_party", slot_town_lord), (try_begin), (lt, ":castle_lord", 0), (jump_to_menu, "mnu_castle_entry_granted"), (else_try), (call_script, "script_troop_get_player_relation", ":castle_lord"), (assign, ":castle_lord_relation", reg0), #(troop_get_slot, ":castle_lord_relation", ":castle_lord", slot_troop_player_relation), (try_begin), (gt, ":castle_lord_relation", -15), (jump_to_menu, "mnu_castle_entry_granted"), (else_try), (jump_to_menu, "mnu_castle_entry_denied"), (try_end), (try_end), ]), ("request_meeting_commander",[], "Request a meeting with someone.", [ (jump_to_menu, "mnu_castle_meeting"), ]), ("guard_leave",[], "Leave.", [(change_screen_return,0)]), ] ), ( "castle_entry_granted",0, "After a brief wait, the guards open the gates for you and allow your party inside.", "none", [ ], [ ("continue",[], "Continue...", [(jump_to_menu,"mnu_town")]), ] ), ( "castle_entry_denied",0, "The lord of this castle has forbidden you from coming inside these walls,\ and the guard sergeant informs you that his men will fire if you attempt to come any closer.", "none", [ ], [ ("continue",[], "Continue...", [(jump_to_menu,"mnu_castle_guard")]), ] ), ( "castle_meeting",0, "With whom do you want to meet?", "none", [ (assign, "$num_castle_meeting_troops", 0), (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), (call_script, "script_get_troop_attached_party", ":troop_no"), (eq, "$g_encountered_party", reg0), (troop_set_slot, "trp_temp_array_a", "$num_castle_meeting_troops", ":troop_no"), (val_add, "$num_castle_meeting_troops", 1), (try_end), ], [ ("guard_meet_s5",[(gt, "$num_castle_meeting_troops", 0),(troop_get_slot, ":troop_no", "trp_temp_array_a", 0),(str_store_troop_name, s5, ":troop_no")], "{s5}.",[(troop_get_slot, "$castle_meeting_selected_troop", "trp_temp_array_a", 0),(jump_to_menu,"mnu_castle_meeting_selected")]), ("guard_meet_s5",[(gt, "$num_castle_meeting_troops", 1),(troop_get_slot, ":troop_no", "trp_temp_array_a", 1),(str_store_troop_name, s5, ":troop_no")], "{s5}.",[(troop_get_slot, "$castle_meeting_selected_troop", "trp_temp_array_a", 1),(jump_to_menu,"mnu_castle_meeting_selected")]), ("guard_meet_s5",[(gt, "$num_castle_meeting_troops", 2),(troop_get_slot, ":troop_no", "trp_temp_array_a", 2),(str_store_troop_name, s5, ":troop_no")], "{s5}.",[(troop_get_slot, "$castle_meeting_selected_troop", "trp_temp_array_a", 2),(jump_to_menu,"mnu_castle_meeting_selected")]), ("guard_meet_s5",[(gt, "$num_castle_meeting_troops", 3),(troop_get_slot, ":troop_no", "trp_temp_array_a", 3),(str_store_troop_name, s5, ":troop_no")], "{s5}.",[(troop_get_slot, "$castle_meeting_selected_troop", "trp_temp_array_a", 3),(jump_to_menu,"mnu_castle_meeting_selected")]), ("forget_it",[], "Forget it.", [(jump_to_menu,"mnu_castle_guard")]), ] ), ( "castle_meeting_selected",0, "Your request for a meeting is relayed inside, and finally {s6} appears in the courtyard to speak with you.", "none", [(str_store_troop_name, s6, "$castle_meeting_selected_troop")], [ ("continue",[], "Continue...", [(jump_to_menu, "mnu_castle_outside"), (modify_visitors_at_site,"scn_conversation_scene"),(reset_visitors), (set_visitor,0,"trp_player"), (set_visitor,17,"$castle_meeting_selected_troop"), (set_jump_mission,"mt_conversation_encounter"), (jump_to_scene,"scn_conversation_scene"), (assign, "$talk_context", tc_castle_gate), (change_screen_map_conversation, "$castle_meeting_selected_troop"), ]), ] ), ( "castle_besiege",mnf_scale_picture, "You are laying siege to {s1}. {s2} {s3}", "none", [ (troop_get_type, ":is_female", "trp_player"), (try_begin), (eq, ":is_female", 1), (set_background_mesh, "mesh_pic_siege_sighted_fem"), (else_try), (set_background_mesh, "mesh_pic_siege_sighted"), (try_end), (assign, "$g_siege_force_wait", 0), (try_begin), (party_slot_eq, "$g_encountered_party", slot_center_is_besieged_by, -1), (party_set_slot, "$g_encountered_party", slot_center_is_besieged_by, "p_main_party"), (store_current_hours, ":cur_hours"), (party_set_slot, "$g_encountered_party", slot_center_siege_begin_hours, ":cur_hours"), (assign, "$g_siege_method", 0), (assign, "$g_siege_sallied_out_once", 0), (try_end), (party_get_slot, ":town_food_store", "$g_encountered_party", slot_party_food_store), (call_script, "script_center_get_food_consumption", "$g_encountered_party"), (assign, ":food_consumption", reg0), (assign, reg7, ":food_consumption"), (assign, reg8, ":town_food_store"), (store_div, reg3, ":town_food_store", ":food_consumption"), (try_begin), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_town), (assign, reg6, 1), (else_try), (assign, reg6, 0), (try_end), (try_begin), (gt, reg3, 0), (str_store_string, s2, "@The {reg6?town's:castle's} food stores should last for {reg3} more days."), (else_try), (str_store_string, s2, "@The {reg6?town's:castle's} food stores have run out and the defenders are starving."), (try_end), (str_store_string, s3, "str_empty_string"), (try_begin), (ge, "$g_siege_method", 1), (store_current_hours, ":cur_hours"), (try_begin), (lt, ":cur_hours", "$g_siege_method_finish_hours"), (store_sub, reg9, "$g_siege_method_finish_hours", ":cur_hours"), (try_begin), (eq, "$g_siege_method", 1), (str_store_string, s3, "@You're preparing to attack the walls, the work should finish in {reg9} hours."), (else_try), (eq, "$g_siege_method", 2), (str_store_string, s3, "@Your forces are building a siege tower. They estimate another {reg9} hours to complete the build."), (try_end), (else_try), (try_begin), (eq, "$g_siege_method", 1), (str_store_string, s3, "@You are ready to attack the walls at any time."), (else_try), (eq, "$g_siege_method", 2), (str_store_string, s3, "@The siege tower is built and ready to make an assault."), (try_end), (try_end), (try_end), #Check if enemy leaves the castle to us... (try_begin), (eq, "$g_castle_left_to_player",1), #we come here after dialog. Empty the castle and send parties away. (assign, "$g_castle_left_to_player",0), (store_faction_of_party, ":castle_faction", "$g_encountered_party"), (party_set_faction,"$g_encountered_party","fac_neutral"), #temporarily erase faction so that it is not the closest town (party_get_num_attached_parties, ":num_attached_parties_to_castle","$g_encountered_party"), (try_for_range_backwards, ":iap", 0, ":num_attached_parties_to_castle"), (party_get_attached_party_with_rank, ":attached_party", "$g_encountered_party", ":iap"), (party_detach, ":attached_party"), (party_get_slot, ":attached_party_type", ":attached_party", slot_party_type), (eq, ":attached_party_type", spt_kingdom_hero_party), (store_faction_of_party, ":attached_party_faction", ":attached_party"), (call_script, "script_get_closest_walled_center_of_faction", ":attached_party", ":attached_party_faction"), (try_begin), (gt, reg0, 0), (call_script, "script_party_set_ai_state", ":attached_party", spai_holding_center, reg0), (else_try), (call_script, "script_party_set_ai_state", ":attached_party", spai_patrolling_around_center, "$g_encountered_party"), (try_end), (try_end), (call_script, "script_party_remove_all_companions", "$g_encountered_party"), (change_screen_return), (party_collect_attachments_to_party, "$g_encountered_party", "p_collective_enemy"), #recalculate so that (call_script, "script_party_copy", "p_encountered_party_backup", "p_collective_enemy"), #leaving troops will not be considered as captured (party_set_faction,"$g_encountered_party",":castle_faction"), (try_end), #Check for victory or defeat.... (assign, "$g_enemy_party", "$g_encountered_party"), (assign, "$g_ally_party", -1), (str_store_party_name, 1,"$g_encountered_party"), (call_script, "script_encounter_calculate_fit"), (assign, reg11, "$g_enemy_fit_for_battle"), (assign, reg10, "$g_friend_fit_for_battle"), (try_begin), (eq, "$g_leave_encounter",1), (change_screen_return), (else_try), (call_script, "script_party_count_fit_regulars","p_collective_enemy"), (assign, ":enemy_finished", 0), (try_begin), (eq, "$g_battle_result", 1), (assign, ":enemy_finished", 1), (else_try), (le, "$g_enemy_fit_for_battle", 0), (ge, "$g_friend_fit_for_battle", 1), (assign, ":enemy_finished", 1), (try_end), (this_or_next|eq, ":enemy_finished", 1), (eq, "$g_enemy_surrenders", 1), (assign, "$g_next_menu", "mnu_castle_taken"), (jump_to_menu, "mnu_total_victory"), (else_try), (call_script, "script_party_count_members_with_full_health", "p_main_party"), (assign, ":main_party_fit_regulars", reg(0)), (eq, "$g_battle_result", -1), (eq, ":main_party_fit_regulars", 0), #all lost (assign, "$g_next_menu", "mnu_captivity_start_castle_defeat"), (jump_to_menu, "mnu_total_defeat"), (try_end), ], [ ("siege_request_meeting",[(eq, "$cant_talk_to_enemy", 0)],"Call for a meeting with the castle commander.", [ (assign, "$cant_talk_to_enemy", 1), (assign, "$g_enemy_surrenders",0), (assign, "$g_castle_left_to_player",0), (assign, "$talk_context", tc_castle_commander), (party_get_num_attached_parties, ":num_attached_parties_to_castle","$g_encountered_party"), (try_begin), (gt, ":num_attached_parties_to_castle", 0), (party_get_attached_party_with_rank, ":leader_attached_party", "$g_encountered_party", 0), (call_script, "script_setup_party_meeting", ":leader_attached_party"), (else_try), (call_script, "script_setup_party_meeting", "$g_encountered_party"), (try_end), ]), ("wait_24_hours",[],"Wait until tomorrow.", [ (assign,"$auto_besiege_town","$g_encountered_party"), (assign, "$g_siege_force_wait", 1), (store_time_of_day,":cur_time_of_day"), (val_add, ":cur_time_of_day", 1), (assign, ":time_to_wait", 31), (val_sub,":time_to_wait",":cur_time_of_day"), (val_mod,":time_to_wait",24), (val_add, ":time_to_wait", 1), (rest_for_hours_interactive, ":time_to_wait", 5, 1), #rest while attackable (assign, "$cant_talk_to_enemy", 0), (change_screen_return), ]), ("castle_lead_attack", [ (neg|troop_is_wounded, "trp_player"), (ge, "$g_siege_method", 1), (gt, "$g_friend_fit_for_battle", 3), (store_current_hours, ":cur_hours"), (ge, ":cur_hours", "$g_siege_method_finish_hours"), ], "Lead your soldiers in an assault.", [ (try_begin), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_town), (party_get_slot, ":battle_scene", "$g_encountered_party", slot_town_walls), (else_try), (party_get_slot, ":battle_scene", "$g_encountered_party", slot_castle_exterior), (try_end), (call_script, "script_calculate_battle_advantage"), (assign, ":battle_advantage", reg0), (val_mul, ":battle_advantage", 2), (val_div, ":battle_advantage", 3), #scale down the advantage a bit in sieges. (set_battle_advantage, ":battle_advantage"), (set_party_battle_mode), (assign, "$g_siege_battle_state", 1), (assign, ":siege_sally", 0), (try_begin), (le, ":battle_advantage", -4), #we are outnumbered, defenders sally out (eq, "$g_siege_sallied_out_once", 0), (set_jump_mission,"mt_castle_attack_walls_defenders_sally"), (assign, "$g_siege_battle_state", 0), (assign, ":siege_sally", 1), (else_try), (party_slot_eq, "$current_town", slot_center_siege_with_belfry, 1), (set_jump_mission,"mt_castle_attack_walls_belfry"), (else_try), (set_jump_mission,"mt_castle_attack_walls_ladder"), (try_end), (assign, "$cant_talk_to_enemy", 0), (assign, "$g_siege_final_menu", "mnu_castle_besiege"), (assign, "$g_next_menu", "mnu_castle_besiege_inner_battle"), (assign, "$g_siege_method", 0), #reset siege timer (jump_to_scene,":battle_scene"), (try_begin), (eq, ":siege_sally", 1), (jump_to_menu, "mnu_siege_attack_meets_sally"), (else_try), # (jump_to_menu,"mnu_castle_outside"), ## (assign, "$g_next_menu", "mnu_castle_besiege"), (jump_to_menu, "mnu_battle_debrief"), (change_screen_mission), (try_end), ]), ("attack_stay_back", [ (ge, "$g_siege_method", 1), (gt, "$g_friend_fit_for_battle", 3), (store_current_hours, ":cur_hours"), (ge, ":cur_hours", "$g_siege_method_finish_hours"), ], "Order your soldiers to attack while you stay back...", [(assign, "$cant_talk_to_enemy", 0),(jump_to_menu,"mnu_castle_attack_walls_simulate")]), ("build_ladders",[(party_slot_eq, "$current_town", slot_center_siege_with_belfry, 0),(eq, "$g_siege_method", 0)], "Prepare ladders to attack the walls.", [(jump_to_menu,"mnu_construct_ladders")]), ("build_siege_tower",[(party_slot_eq, "$current_town", slot_center_siege_with_belfry, 1),(eq, "$g_siege_method", 0)], "Build a siege tower.", [(jump_to_menu,"mnu_construct_siege_tower")]), ("cheat_castle_lead_attack",[(eq, "$cheat_mode", 1), (eq, "$g_siege_method", 0)], "CHEAT: Instant build equipments.", [ (assign, "$g_siege_method", 1), (assign, "$g_siege_method_finish_hours", 0), (jump_to_menu, "mnu_castle_besiege"), ]), ("lift_siege",[],"Abandon the siege.", [ (call_script, "script_lift_siege", "$g_player_besiege_town", 0), (assign,"$g_player_besiege_town", -1), (change_screen_return)]), ] ), ( "siege_attack_meets_sally",0, "The defenders sally out to meet your assault.", "none", [ ], [ ("continue",[], "Continue...", [ (jump_to_menu, "mnu_battle_debrief"), (change_screen_mission), ]), ] ), ( "castle_besiege_inner_battle",mnf_scale_picture, "{s1}", "none", [ (troop_get_type, ":is_female", "trp_player"), (try_begin), (eq, ":is_female", 1), (set_background_mesh, "mesh_pic_siege_sighted_fem"), (else_try), (set_background_mesh, "mesh_pic_siege_sighted"), (try_end), (assign, ":result", "$g_battle_result"),#will be reset at script_encounter_calculate_fit (call_script, "script_encounter_calculate_fit"), # TODO: To use for the future: (str_store_string, s1, "@As a last defensive effort, you retreat to the main hall of the keep.\ You and your remaining soldiers will put up a desperate fight here. If you are defeated, there's no other place to fall back to."), (str_store_string, s1, "@You've been driven away from the walls.\ Now the attackers are pouring into the streets. IF you can defeat them, you can perhaps turn the tide and save the day."), (try_begin), (this_or_next|neq, ":result", 1), (this_or_next|le, "$g_friend_fit_for_battle", 0), (le, "$g_enemy_fit_for_battle", 0), (jump_to_menu, "$g_siege_final_menu"), (else_try), (call_script, "script_encounter_calculate_fit"), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_town), (try_begin), (eq, "$g_siege_battle_state", 0), (eq, ":result", 1), (assign, "$g_battle_result", 0), (jump_to_menu, "$g_siege_final_menu"), (else_try), (eq, "$g_siege_battle_state", 1), (eq, ":result", 1), (str_store_string, s1, "@You've breached the town walls,\ but the stubborn defenders continue to resist you in the streets!\ You'll have to deal with them before you can attack the keep at the heart of the town."), (else_try), (eq, "$g_siege_battle_state", 2), (eq, ":result", 1), (str_store_string, s1, "@The town centre is yours,\ but the remaining defenders have retreated to the castle.\ It must fall before you can complete your victory."), (else_try), (jump_to_menu, "$g_siege_final_menu"), (try_end), (else_try), (try_begin), (eq, "$g_siege_battle_state", 0), (eq, ":result", 1), (assign, "$g_battle_result", 0), (jump_to_menu, "$g_siege_final_menu"), (else_try), (eq, "$g_siege_battle_state", 1), (eq, ":result", 1), (str_store_string, s1, "@The remaining defenders have retreated to the castle as a last defense. You must go in and crush any remaining resistance."), (else_try), (jump_to_menu, "$g_siege_final_menu"), (try_end), (try_end), ], [ ("continue",[], "Continue...", [ (try_begin), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_town), (try_begin), (eq, "$g_siege_battle_state", 1), (party_get_slot, ":battle_scene", "$g_encountered_party", slot_town_center), (set_jump_mission, "mt_besiege_inner_battle_town_center"), (else_try), (party_get_slot, ":battle_scene", "$g_encountered_party", slot_town_castle), (set_jump_mission, "mt_besiege_inner_battle_castle"), (try_end), (else_try), (party_get_slot, ":battle_scene", "$g_encountered_party", slot_town_castle), (set_jump_mission, "mt_besiege_inner_battle_castle"), (try_end), ## (call_script, "script_calculate_battle_advantage"), ## (set_battle_advantage, reg0), (set_party_battle_mode), (jump_to_scene, ":battle_scene"), (val_add, "$g_siege_battle_state", 1), (assign, "$g_next_menu", "mnu_castle_besiege_inner_battle"), (jump_to_menu, "mnu_battle_debrief"), (change_screen_mission), ]), ] ), ( "construct_ladders",0, "As the party member with the highest Engineer skill ({reg2}), {reg3?you estimate:{s3} estimates} that it will take\ {reg4} hours to build enough scaling ladders for the assault.", "none", [(call_script, "script_get_max_skill_of_player_party", "skl_engineer"), (assign, ":max_skill", reg0), (assign, ":max_skill_owner", reg1), (assign, reg2, ":max_skill"), (store_sub, reg4, 14, ":max_skill"), (val_mul, reg4, 2), (val_div, reg4, 3), (try_begin), (eq, ":max_skill_owner", "trp_player"), (assign, reg3, 1), (else_try), (assign, reg3, 0), (str_store_troop_name, s3, ":max_skill_owner"), (try_end), ], [ ("build_ladders_cont",[], "Do it.", [ (assign, "$g_siege_method", 1), (store_current_hours, ":cur_hours"), (call_script, "script_get_max_skill_of_player_party", "skl_engineer"), (store_sub, ":hours_takes", 14, reg0), (val_mul, ":hours_takes", 2), (val_div, ":hours_takes", 3), (store_add, "$g_siege_method_finish_hours",":cur_hours", ":hours_takes"), (assign,"$auto_besiege_town","$current_town"), (rest_for_hours_interactive, 96, 5, 1), #rest while attackable. A trigger will divert control when attack is ready. (change_screen_return), ]), ("go_back",[], "Go back.", [(jump_to_menu,"mnu_castle_besiege")]), ], ), ( "construct_siege_tower",0, "As the party member with the highest Engineer skill ({reg2}), {reg3?you estimate:{s3} estimates} that building a siege tower will take\ {reg4} hours.", "none", [(call_script, "script_get_max_skill_of_player_party", "skl_engineer"), (assign, ":max_skill", reg0), (assign, ":max_skill_owner", reg1), (assign, reg2, ":max_skill"), (store_sub, reg4, 15, ":max_skill"), (val_mul, reg4, 6), (try_begin), (eq, ":max_skill_owner", "trp_player"), (assign, reg3, 1), (else_try), (assign, reg3, 0), (str_store_troop_name, s3, ":max_skill_owner"), (try_end), ], [ ("build_siege_tower_cont",[], "Start building.", [ (assign, "$g_siege_method", 2), (store_current_hours, ":cur_hours"), (call_script, "script_get_max_skill_of_player_party", "skl_engineer"), (store_sub, ":hours_takes", 15, reg0), (val_mul, ":hours_takes", 6), (store_add, "$g_siege_method_finish_hours",":cur_hours", ":hours_takes"), (assign,"$auto_besiege_town","$current_town"), (rest_for_hours_interactive, 240, 5, 1), #rest while attackable. A trigger will divert control when attack is ready. (change_screen_return), ]), ("go_back",[], "Go back.", [(jump_to_menu,"mnu_castle_besiege")]), ], ), ( "castle_attack_walls_simulate",mnf_scale_picture|mnf_disable_all_keys, "{s4}^^Your casualties:{s8}^^Enemy casualties were: {s9}", "none", [ (troop_get_type, ":is_female", "trp_player"), (try_begin), (eq, ":is_female", 1), (set_background_mesh, "mesh_pic_siege_sighted_fem"), (else_try), (set_background_mesh, "mesh_pic_siege_sighted"), (try_end), (call_script, "script_party_calculate_strength", "p_main_party", 1), #skip player (assign, ":player_party_strength", reg0), (val_div, ":player_party_strength", 10), (call_script, "script_party_calculate_strength", "$g_encountered_party", 0), (assign, ":enemy_party_strength", reg0), (val_div, ":enemy_party_strength", 4), (inflict_casualties_to_party_group, "p_main_party", ":enemy_party_strength", "p_temp_casualties"), (call_script, "script_print_casualties_to_s0", "p_temp_casualties", 0), (str_store_string_reg, s8, s0), (inflict_casualties_to_party_group, "$g_encountered_party", ":player_party_strength", "p_temp_casualties"), (call_script, "script_print_casualties_to_s0", "p_temp_casualties", 0), (str_store_string_reg, s9, s0), (assign, "$no_soldiers_left", 0), (try_begin), (call_script, "script_party_count_members_with_full_health","p_main_party"), (le, reg(0), 0), (assign, "$no_soldiers_left", 1), (str_store_string, s4, "str_attack_walls_failure"), (else_try), (call_script, "script_party_count_members_with_full_health","$g_encountered_party"), (le, reg(0), 0), (assign, "$no_soldiers_left", 1), (assign, "$g_battle_result", 1), (str_store_string, s4, "str_attack_walls_success"), (else_try), (str_store_string, s4, "str_attack_walls_continue"), (try_end), ], [ ## ("lead_next_wave",[(eq, "$no_soldiers_left", 0)],"Lead the next wave of attack personally.", [ ## (party_get_slot, ":battle_scene", "$g_encountered_party", slot_castle_exterior), ## (set_party_battle_mode), ## (set_jump_mission,"mt_castle_attack_walls"), ## (jump_to_scene,":battle_scene"), ## (jump_to_menu,"mnu_castle_outside"), ## (change_screen_mission), ## ]), ## ("continue_attacking",[(eq, "$no_soldiers_left", 0)],"Order your soldiers to keep attacking...", [ ## (jump_to_menu,"mnu_castle_attack_walls_3"), ## ]), ## ("call_soldiers_back",[(eq, "$no_soldiers_left", 0)],"Call your soldiers back.",[(jump_to_menu,"mnu_castle_outside")]), ("continue",[],"Continue...",[(jump_to_menu,"mnu_castle_besiege")]), ] ), ( "castle_attack_walls_with_allies_simulate",mnf_scale_picture|mnf_disable_all_keys, "{s4}^^Your casualties: {s8}^^Allies' casualties: {s9}^^Enemy casualties: {s10}", "none", [ (troop_get_type, ":is_female", "trp_player"), (try_begin), (eq, ":is_female", 1), (set_background_mesh, "mesh_pic_siege_sighted_fem"), (else_try), (set_background_mesh, "mesh_pic_siege_sighted"), (try_end), (call_script, "script_party_calculate_strength", "p_main_party", 1), #skip player (assign, ":player_party_strength", reg0), (val_div, ":player_party_strength", 10), (call_script, "script_party_calculate_strength", "p_collective_friends", 0), (assign, ":friend_party_strength", reg0), (val_div, ":friend_party_strength", 10), (val_max, ":friend_party_strength", 1), (call_script, "script_party_calculate_strength", "p_collective_enemy", 0), (assign, ":enemy_party_strength", reg0), (val_div, ":enemy_party_strength", 4), ## (assign, reg0, ":player_party_strength"), ## (assign, reg1, ":friend_party_strength"), ## (assign, reg2, ":enemy_party_strength"), ## (assign, reg3, "$g_enemy_party"), ## (assign, reg4, "$g_ally_party"), ## (display_message, "@player_str={reg0} friend_str={reg1} enemy_str={reg2}"), ## (display_message, "@enemy_party={reg3} ally_party={reg4}"), (assign, ":enemy_party_strength_for_p", ":enemy_party_strength"), (val_mul, ":enemy_party_strength_for_p", ":player_party_strength"), (val_div, ":enemy_party_strength_for_p", ":friend_party_strength"), (val_sub, ":enemy_party_strength", ":enemy_party_strength_for_p"), (inflict_casualties_to_party_group, "p_main_party", ":enemy_party_strength_for_p", "p_temp_casualties"), (call_script, "script_print_casualties_to_s0", "p_temp_casualties", 0), (str_store_string_reg, s8, s0), (inflict_casualties_to_party_group, "$g_enemy_party", ":friend_party_strength", "p_temp_casualties"), (call_script, "script_print_casualties_to_s0", "p_temp_casualties", 0), (str_store_string_reg, s10, s0), (call_script, "script_collect_friendly_parties"), (inflict_casualties_to_party_group, "$g_ally_party", ":enemy_party_strength", "p_temp_casualties"), (call_script, "script_print_casualties_to_s0", "p_temp_casualties", 0), (str_store_string_reg, s9, s0), (party_collect_attachments_to_party, "$g_enemy_party", "p_collective_enemy"), (assign, "$no_soldiers_left", 0), (try_begin), (call_script, "script_party_count_members_with_full_health", "p_main_party"), (le, reg0, 0), (assign, "$no_soldiers_left", 1), (str_store_string, s4, "str_attack_walls_failure"), (else_try), (call_script, "script_party_count_members_with_full_health", "p_collective_enemy"), (le, reg0, 0), (assign, "$no_soldiers_left", 1), (assign, "$g_battle_result", 1), (str_store_string, s4, "str_attack_walls_success"), (else_try), (str_store_string, s4, "str_attack_walls_continue"), (try_end), ], [ ("continue",[],"Continue...",[(jump_to_menu,"mnu_besiegers_camp_with_allies")]), ] ), ( "castle_taken_by_friends",0, "Nothing to see here.", "none", [ (party_clear, "$g_encountered_party"), (party_stack_get_troop_id, ":leader", "$g_encountered_party_2", 0), (party_set_slot, "$g_encountered_party", slot_center_last_taken_by_troop, ":leader"), (store_troop_faction, ":faction_no", ":leader"), #Reduce prosperity of the center by 5 (call_script, "script_change_center_prosperity", "$g_encountered_party", -5), (call_script, "script_give_center_to_faction", "$g_encountered_party", ":faction_no"), (call_script, "script_add_log_entry", logent_player_participated_in_siege, "trp_player", "$g_encountered_party", 0, "$g_encountered_party_faction"), ## (call_script, "script_change_troop_renown", "trp_player", 1), (change_screen_return), ], [ ], ), ( "castle_taken",mnf_disable_all_keys, "{s3} has fallen to your troops, and you now have full control of the {reg2?town:castle}.\ {reg1? It would seem that there is nothing stopping you from taking it for yourself...:}",# Only visible when castle is taken without being a vassal of a kingdom. "none", [ (party_clear, "$g_encountered_party"), (call_script, "script_lift_siege", "$g_encountered_party", 0), (assign, "$g_player_besiege_town", -1), (call_script, "script_add_log_entry", logent_castle_captured_by_player, "trp_player", "$g_encountered_party", 0, "$g_encountered_party_faction"), (party_set_slot, "$g_encountered_party", slot_center_last_taken_by_troop, "trp_player"), #Reduce prosperity of the center by 5 (call_script, "script_change_center_prosperity", "$g_encountered_party", -5), (call_script, "script_change_troop_renown", "trp_player", 5), (call_script, "script_add_log_entry", logent_castle_captured_by_player, "trp_player", "$g_encountered_party", -1, "$g_encountered_party_faction"), (try_begin), (is_between, "$players_kingdom", kingdoms_begin, kingdoms_end), (neq, "$players_kingdom", "fac_player_supporters_faction"), (call_script, "script_give_center_to_faction", "$g_encountered_party", "$players_kingdom"), (call_script, "script_order_best_besieger_party_to_guard_center", "$g_encountered_party", "$players_kingdom"), (jump_to_menu, "mnu_castle_taken_2"), (else_try), (call_script, "script_give_center_to_faction", "$g_encountered_party", "fac_player_supporters_faction"), (call_script, "script_order_best_besieger_party_to_guard_center", "$g_encountered_party", "fac_player_supporters_faction"), (str_store_party_name, s3, "$g_encountered_party"), (assign, reg1, 0), (try_begin), (faction_slot_eq, "fac_player_supporters_faction", slot_faction_leader, "trp_player"), (assign, reg1, 1), (try_end), (try_end), (assign, reg2, 0), (try_begin), (is_between, "$g_encountered_party", towns_begin, towns_end), (assign, reg2, 1), (try_end), ], [ ("continue",[],"Continue...", [ (assign, "$auto_enter_town", "$g_encountered_party"), (change_screen_return), ]), ], ), ( "castle_taken_2",mnf_disable_all_keys, "{s3} has fallen to your troops, and you now have full control of the castle.\ It is time to send word to {s9} about your victory. {s5}", "none", [ (str_store_party_name, s3, "$g_encountered_party"), (str_clear, s5), (faction_get_slot, ":faction_leader", "$players_kingdom", slot_faction_leader), (str_store_troop_name, s9, ":faction_leader"), (try_begin), (eq, "$player_has_homage", 0), (assign, reg8, 0), (try_begin), (party_slot_eq, "$g_encountered_party", spt_town), (assign, reg8, 1), (try_end), (str_store_string, s5, "@However, since you are not a sworn {man/follower} of {s9}, there is no chance he would recognize you as the {lord/lady} of this {reg8?town:castle}."), (try_end), ], [ ("castle_taken_claim",[(eq, "$player_has_homage", 1)],"Request that {s3} be awarded to you.", [ (party_set_slot, "$g_encountered_party", slot_center_last_taken_by_troop, "trp_player"), (assign, "$g_castle_requested_by_player", "$current_town"), (assign, "$auto_enter_town", "$g_encountered_party"), (change_screen_return), ]), ("castle_taken_no_claim",[],"Ask no rewards.", [ (party_set_slot, "$g_encountered_party", slot_center_last_taken_by_troop, -1), (assign, "$auto_enter_town", "$g_encountered_party"), (change_screen_return), # (jump_to_menu, "mnu_town"), ]), ], ), ( "requested_castle_granted_to_player",mnf_scale_picture, "You receive a message from your liege, {s3}.^^\ {reg4?She:He} has decided to grant {s2}{reg3? and the nearby village of {s4}:} to you, with all due incomes and titles,\ to hold in {reg4?her:his} name for as long as you maintain your oath of homage.", "none", [(set_background_mesh, "mesh_pic_messenger"), (faction_get_slot, ":faction_leader", "$players_kingdom", slot_faction_leader), (str_store_troop_name, s3, ":faction_leader"), (str_store_party_name, s2, "$g_center_to_give_to_player"), (try_begin), (party_slot_eq, "$g_center_to_give_to_player", slot_party_type, spt_castle), (assign, reg3, 1), (try_for_range, ":cur_village", villages_begin, villages_end), (party_slot_eq, ":cur_village", slot_village_bound_center, "$g_center_to_give_to_player"), (str_store_party_name, s4, ":cur_village"), (try_end), (else_try), (assign, reg3, 0), (try_end), (troop_get_type, reg4, ":faction_leader"), ], [ ("continue",[],"Continue.", [(call_script, "script_give_center_to_lord", "$g_center_to_give_to_player", "trp_player", 0), (jump_to_menu, "mnu_give_center_to_player_2"), ]), ], ), ( "requested_castle_granted_to_another",mnf_scale_picture, "You receive a message from your monarch, {s3}.^^\ 'I was most pleased to hear of your valiant efforts in the capture of {s2}. Your victory has gladdened all our hearts.\ You also requested me to give you ownership of the castle, but that is a favour which I fear I cannot grant,\ as you already hold significant estates in my realm.\ Instead I have sent you {reg6} denars to cover the expenses of your campaign, but {s2} I give to {s5}.'\ ", "none", [(set_background_mesh, "mesh_pic_messenger"), (faction_get_slot, ":faction_leader", "$players_kingdom", slot_faction_leader), (str_store_troop_name, s3, ":faction_leader"), (str_store_party_name, s2, "$g_center_to_give_to_player"), (party_get_slot, ":new_owner", "$g_center_to_give_to_player", slot_town_lord), (str_store_troop_name, s5, ":new_owner"), (assign, reg6, 900), ], [ ("accept_decision",[],"Accept the decision.", [ (call_script, "script_troop_add_gold", "trp_player", reg6), (change_screen_return), ]), ("leave_faction",[],"You have been wronged! Renounce you oath to your liege! ", [ (jump_to_menu, "mnu_leave_faction"), (call_script, "script_troop_add_gold", "trp_player", reg6), ]), ], ), ( "leave_faction",0, "Renouncing your oath is a grave act. Your lord may condemn you and confiscate your lands and holdings.\ However, if you return them of your own free will, he may let the betrayal go without a fight.", "none", [ ], [ ("leave_faction_give_back", [], "Renounce your oath and give up your holdings.", [ #Troop commentary changes begin # (call_script, "script_add_log_entry", logent_renounced_allegiance, "trp_player", -1, "$g_talk_troop", "$g_talk_troop_faction"), #Troop commentary changes end (call_script, "script_player_leave_faction", 1), (change_screen_return), ]), ("leave_faction_hold", [ (str_store_party_name, s2, "$g_center_to_give_to_player"), ], "Renounce your oath and hold on to your lands, including {s2}.", [ (faction_get_slot, ":old_leader", "$players_kingdom", slot_faction_leader), (call_script, "script_add_log_entry", logent_renounced_allegiance, "trp_player", -1, ":old_leader", "$players_kingdom"), #Initializing renounce war variables (assign, "$players_oath_renounced_against_kingdom", "$players_kingdom"), (assign, "$players_oath_renounced_given_center", 0), (store_current_hours, "$players_oath_renounced_begin_time"), (call_script, "script_give_center_to_lord", "$g_center_to_give_to_player", "trp_player", 0), (call_script, "script_player_leave_faction", 0), (try_for_range, ":cur_center", walled_centers_begin, walled_centers_end), (store_faction_of_party, ":cur_center_faction", ":cur_center"), (party_set_slot, ":cur_center", slot_center_faction_when_oath_renounced, ":cur_center_faction"), (try_end), (party_set_slot, "$g_center_to_give_to_player", slot_center_faction_when_oath_renounced, "$players_oath_renounced_against_kingdom"), (change_screen_return), ]), ("leave_faction_cancel", [], "Remain loyal and accept the decision.", [ (change_screen_return), ]), ], ), ( "give_center_to_player",mnf_scale_picture, "Your lord offers to extend your fiefs!\ {s1} sends word that he is willing to grant {s2} to you in payment for your loyal service,\ adding it to your holdings. What is your answer?", "none", [(set_background_mesh, "mesh_pic_messenger"), (store_faction_of_party, ":center_faction", "$g_center_to_give_to_player"), (faction_get_slot, ":faction_leader", ":center_faction", slot_faction_leader), (str_store_troop_name, s1, ":faction_leader"), (str_store_party_name, s2, "$g_center_to_give_to_player"), ], [ ("give_center_to_player_accept",[],"Accept the offer.", [(call_script, "script_give_center_to_lord", "$g_center_to_give_to_player", "trp_player", 0), (jump_to_menu, "mnu_give_center_to_player_2"), ]), ("give_center_to_player_reject",[],"Reject. You have no interest in holding {s2}.", [(party_set_slot, "$g_center_to_give_to_player", slot_town_lord, stl_rejected_by_player), (change_screen_return), ]), ], ), ( "give_center_to_player_2",0, "With a brief ceremony, you are officially confirmed as the new lord of {s2}{reg3? and its bound village {s4}:}.\ {reg3?They:It} will make a fine part of your fiefdom.\ You can now claim the rents and revenues from your personal estates there, draft soldiers from the populace,\ and manage the lands as you see fit.\ However, you are also expected to defend your fief and your people from harm,\ as well as maintaining the rule of law and order.", "none", [ (str_store_party_name, s2, "$g_center_to_give_to_player"), (assign, reg3, 0), (try_begin), (party_slot_eq, "$g_center_to_give_to_player", slot_party_type, spt_castle), (try_for_range, ":cur_village", villages_begin, villages_end), (party_slot_eq, ":cur_village", slot_village_bound_center, "$g_center_to_give_to_player"), (str_store_party_name, s4, ":cur_village"), (assign, reg3, 1), (try_end), (try_end), ], [ ("continue",[],"Continue...", [(change_screen_return), ]), ], ), ( "oath_fulfilled",0, "You had a contract with {s1} to serve him for a certain duration.\ Your contract has now expired. What will you do?", "none", [ (faction_get_slot, ":faction_leader", "$players_kingdom", slot_faction_leader), (str_store_troop_name, s1, ":faction_leader"), ], [ ("renew_oath",[(faction_get_slot, ":faction_leader", "$players_kingdom", slot_faction_leader), (str_store_troop_name, s1, ":faction_leader")], "Renew your contract with {s1} for another month.", [ (store_current_day, ":cur_day"), (store_add, "$mercenary_service_next_renew_day", ":cur_day", 30), (change_screen_return), ]), ("dont_renew_oath",[],"Become free of your bond.", [ (call_script, "script_player_leave_faction", 1), (change_screen_return), ]), ] ), ## ( ## "castle_garrison_stationed",0, ### "The rest of the castle garrison recognizes that their situation is hopeless and surrenders. {s1} is at your mercy now. What do you want to do with this castle?", ## "_", ## "none", ## [ ## (jump_to_menu, "mnu_town"), ## ], ## [], ## ), ## ( ## "castle_choose_captain",0, ## "You will need to assign one of your companions as the castellan. Who will it be?", ## "none", ## [ ## (try_for_range, ":slot_no", 0, 20), ## (troop_set_slot, "trp_temp_troop", ":slot_no", 0), ## (try_end), ## (assign, ":num_captains", 0), ## (party_clear, "p_temp_party"), ## (party_get_num_companion_stacks, ":num_stacks", "p_main_party"), ## (try_for_range, ":i_s", 1,":num_stacks"), ## (party_stack_get_troop_id, ":companion","p_main_party", ":i_s"), ## (troop_slot_eq, ":companion", slot_troop_occupation, slto_player_companion), ## (troop_set_slot, "trp_temp_troop", ":num_captains", ":companion"), ## (try_end), ## ], ## [ ## ("castellan_candidate", [(troop_get_slot, ":captain", "trp_temp_troop", 0),(gt,":captain",0),(str_store_troop_name, s5,":captain")], ## "{s5}", [(troop_get_slot, "$selected_castellan", "trp_temp_troop", 0),(jump_to_menu,"mnu_castle_captain_chosen")]), ## ("castellan_candidate", [(troop_get_slot, ":captain", "trp_temp_troop", 1),(gt,":captain",0),(str_store_troop_name, s5,":captain")], ## "{s5}", [(troop_get_slot, "$selected_castellan", "trp_temp_troop", 1),(jump_to_menu,"mnu_castle_captain_chosen")]), ## ("castellan_candidate", [(troop_get_slot, ":captain", "trp_temp_troop", 2),(gt,":captain",0),(str_store_troop_name, s5,":captain")], ## "{s5}", [(troop_get_slot, "$selected_castellan", "trp_temp_troop", 2),(jump_to_menu,"mnu_castle_captain_chosen")]), ## ("castellan_candidate", [(troop_get_slot, ":captain", "trp_temp_troop", 3),(gt,":captain",0),(str_store_troop_name, s5,":captain")], ## "{s5}", [(troop_get_slot, "$selected_castellan", "trp_temp_troop", 3),(jump_to_menu,"mnu_castle_captain_chosen")]), ## ("castellan_candidate", [(troop_get_slot, ":captain", "trp_temp_troop", 4),(gt,":captain",0),(str_store_troop_name, s5,":captain")], ## "{s5}", [(troop_get_slot, "$selected_castellan", "trp_temp_troop", 4),(jump_to_menu,"mnu_castle_captain_chosen")]), ## ("castellan_candidate", [(troop_get_slot, ":captain", "trp_temp_troop", 5),(gt,":captain",0),(str_store_troop_name, s5,":captain")], ## "{s5}", [(troop_get_slot, "$selected_castellan", "trp_temp_troop", 5),(jump_to_menu,"mnu_castle_captain_chosen")]), ## ("castellan_candidate", [(troop_get_slot, ":captain", "trp_temp_troop", 6),(gt,":captain",0),(str_store_troop_name, s5,":captain")], ## "{s5}", [(troop_get_slot, "$selected_castellan", "trp_temp_troop", 6),(jump_to_menu,"mnu_castle_captain_chosen")]), ## ("castellan_candidate", [(troop_get_slot, ":captain", "trp_temp_troop", 7),(gt,":captain",0),(str_store_troop_name, s5,":captain")], ## "{s5}", [(troop_get_slot, "$selected_castellan", "trp_temp_troop", 7),(jump_to_menu,"mnu_castle_captain_chosen")]), ## ("castellan_candidate", [(troop_get_slot, ":captain", "trp_temp_troop", 8),(gt,":captain",0),(str_store_troop_name, s5,":captain")], ## "{s5}", [(troop_get_slot, "$selected_castellan", "trp_temp_troop", 8),(jump_to_menu,"mnu_castle_captain_chosen")]), ## ("castellan_candidate", [(troop_get_slot, ":captain", "trp_temp_troop", 9),(gt,":captain",0),(str_store_troop_name, s5,":captain")], ## "{s5}", [(troop_get_slot, "$selected_castellan", "trp_temp_troop", 9),(jump_to_menu,"mnu_castle_captain_chosen")]), ## ("castellan_candidate", [(troop_get_slot, ":captain", "trp_temp_troop", 10),(gt,":captain",0),(str_store_troop_name, s5,":captain")], ## "{s5}", [(troop_get_slot, "$selected_castellan", "trp_temp_troop", 10),(jump_to_menu,"mnu_castle_captain_chosen")]), ## ("castellan_candidate", [(troop_get_slot, ":captain", "trp_temp_troop", 11),(gt,":captain",0),(str_store_troop_name, s5,":captain")], ## "{s5}", [(troop_get_slot, "$selected_castellan", "trp_temp_troop", 11),(jump_to_menu,"mnu_castle_captain_chosen")]), ## ("castellan_candidate", [(troop_get_slot, ":captain", "trp_temp_troop", 12),(gt,":captain",0),(str_store_troop_name, s5,":captain")], ## "{s5}", [(troop_get_slot, "$selected_castellan", "trp_temp_troop", 12),(jump_to_menu,"mnu_castle_captain_chosen")]), ## ("castellan_candidate", [(troop_get_slot, ":captain", "trp_temp_troop", 13),(gt,":captain",0),(str_store_troop_name, s5,":captain")], ## "{s5}", [(troop_get_slot, "$selected_castellan", "trp_temp_troop", 13),(jump_to_menu,"mnu_castle_captain_chosen")]), ## ("castellan_candidate", [(troop_get_slot, ":captain", "trp_temp_troop", 14),(gt,":captain",0),(str_store_troop_name, s5,":captain")], ## "{s5}", [(troop_get_slot, "$selected_castellan", "trp_temp_troop", 14),(jump_to_menu,"mnu_castle_captain_chosen")]), ## ("castellan_candidate", [(troop_get_slot, ":captain", "trp_temp_troop", 15),(gt,":captain",0),(str_store_troop_name, s5,":captain")], ## "{s5}", [(troop_get_slot, "$selected_castellan", "trp_temp_troop", 15),(jump_to_menu,"mnu_castle_captain_chosen")]), ## ## ("cancel",[], ## "Cancel...", ## [(jump_to_menu, "mnu_town")]), ## ], ## ), ## ( ## "castle_captain_chosen",0, ## "h this castle?", ## "none", ## [ ## (party_add_leader, "$g_encountered_party", "$selected_castellan"), ## (party_remove_members, "p_main_party", "$selected_castellan",1), ## (party_set_slot, "$g_encountered_party", slot_town_lord, "trp_player"), ## (party_set_faction, "$g_encountered_party", "fac_player_supporters_faction"), ## (try_for_range, ":slot_no", 0, 20), #clear temp troop slots just in case ## (troop_set_slot, "trp_temp_troop", ":slot_no", 0), ## (try_end), ## (jump_to_menu, "mnu_town"), ## (change_screen_exchange_members,0), ## ], ## [], ## ), ## ( ## "under_siege_attacked_continue",0, ## "Nothing to see here.", ## "none", ## [ ## (assign, "$g_enemy_party", "$g_encountered_party_2"), ## (assign, "$g_ally_party", "$g_encountered_party"), ## (party_set_next_battle_simulation_time, "$g_encountered_party", 0), ## (call_script, "script_encounter_calculate_fit"), ## (try_begin), ## (call_script, "script_party_count_fit_regulars", "p_collective_enemy"), ## (assign, ":num_enemy_regulars_remaining", reg(0)), ## (assign, ":enemy_finished",0), ## (try_begin), ## (eq, "$g_battle_result", 1), ## (eq, ":num_enemy_regulars_remaining", 0), #battle won ## (assign, ":enemy_finished",1), ## (else_try), ## (eq, "$g_engaged_enemy", 1), ## (le, "$g_enemy_fit_for_battle",0), ## (ge, "$g_friend_fit_for_battle",1), ## (assign, ":enemy_finished",1), ## (try_end), ## (this_or_next|eq, ":enemy_finished",1), ## (eq,"$g_enemy_surrenders",1), #### (assign, "$g_center_under_siege_battle", 0), ## (assign, "$g_next_menu", -1), ## (jump_to_menu, "mnu_total_victory"), ## (else_try), ## (assign, ":battle_lost", 0), ## (try_begin), ## (eq, "$g_battle_result", -1), ## (assign, ":battle_lost",1), ## (try_end), ## (this_or_next|eq, ":battle_lost",1), ## (eq,"$g_player_surrenders",1), #### (assign, "$g_center_under_siege_battle", 0), ## (assign, "$g_next_menu", "mnu_captivity_start_under_siege_defeat"), ## (jump_to_menu, "mnu_total_defeat"), ## (else_try), ## # Ordinary victory. ## (try_begin), ## #check whether enemy retreats ## (eq, "$g_battle_result", 1), ## (store_mul, ":min_enemy_str", "$g_enemy_fit_for_battle", 2), ## (lt, ":min_enemy_str", "$g_friend_fit_for_battle"), ## (party_set_slot, "$g_enemy_party", slot_party_retreat_flag, 1), ## ## (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), ## (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), ## (troop_slot_eq, ":troop_no", slot_troop_is_prisoner, 0), ## (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), ## (gt, ":party_no", 0), ## (party_slot_eq, ":party_no", slot_party_ai_state, spai_besieging_center), ## (party_slot_eq, ":party_no", slot_party_ai_object, "$g_encountered_party"), ## (party_slot_eq, ":party_no", slot_party_ai_substate, 1), ## (call_script, "script_party_set_ai_state", ":party_no", spai_undefined, -1), ## (call_script, "script_party_set_ai_state", ":party_no", spai_besieging_center, ":center_no"), ## (try_end), ## (display_message, "@TODO: Enemy retreated. The assault has ended, siege continues."), ## (change_screen_return), ## (try_end), #### (assign, "$g_center_under_siege_battle", 0), ## (try_end), ## ], ## [ ## ] ## ), ( "siege_started_defender",0, "{s1} is launching an assault against the walls of {s2}. You have {reg10} troops fit for battle against the enemy's {reg11}. You decide to...", "none", [ (select_enemy,1), (assign, "$g_enemy_party", "$g_encountered_party_2"), (assign, "$g_ally_party", "$g_encountered_party"), (str_store_party_name, 1,"$g_enemy_party"), (str_store_party_name, 2,"$g_ally_party"), (call_script, "script_encounter_calculate_fit"), (try_begin), (eq, "$g_siege_first_encounter", 1), (call_script, "script_let_nearby_parties_join_current_battle", 0, 1), (call_script, "script_encounter_init_variables"), (try_end), (try_begin), (eq, "$g_siege_first_encounter", 0), (try_begin), (call_script, "script_party_count_members_with_full_health", "p_collective_enemy"), (assign, ":num_enemy_regulars_remaining", reg0), (call_script, "script_party_count_members_with_full_health", "p_collective_friends"), (assign, ":num_ally_regulars_remaining", reg0), (assign, ":enemy_finished", 0), (try_begin), (eq, "$g_battle_result", 1), (eq, ":num_enemy_regulars_remaining", 0), #battle won (assign, ":enemy_finished",1), (else_try), (eq, "$g_engaged_enemy", 1), (le, "$g_enemy_fit_for_battle",0), (ge, "$g_friend_fit_for_battle",1), (assign, ":enemy_finished",1), (try_end), (this_or_next|eq, ":enemy_finished",1), (eq,"$g_enemy_surrenders",1), (assign, "$g_next_menu", -1), (jump_to_menu, "mnu_total_victory"), (else_try), (assign, ":battle_lost", 0), (try_begin), (this_or_next|eq, "$g_battle_result", -1), (troop_is_wounded, "trp_player"), (eq, ":num_ally_regulars_remaining", 0), (assign, ":battle_lost",1), (try_end), (this_or_next|eq, ":battle_lost",1), (eq,"$g_player_surrenders",1), (assign, "$g_next_menu", "mnu_captivity_start_under_siege_defeat"), (jump_to_menu, "mnu_total_defeat"), (else_try), # Ordinary victory/defeat. (assign, ":attackers_retreat", 0), (try_begin), #check whether enemy retreats (eq, "$g_battle_result", 1), ## (store_mul, ":min_enemy_str", "$g_enemy_fit_for_battle", 2), ## (lt, ":min_enemy_str", "$g_friend_fit_for_battle"), (assign, ":attackers_retreat", 1), (else_try), (eq, "$g_battle_result", 0), (store_div, ":min_enemy_str", "$g_enemy_fit_for_battle", 3), (lt, ":min_enemy_str", "$g_friend_fit_for_battle"), (assign, ":attackers_retreat", 1), (else_try), (store_random_in_range, ":random_no", 0, 100), (lt, ":random_no", 10), (neq, "$new_encounter", 1), (assign, ":attackers_retreat", 1), (try_end), (try_begin), (eq, ":attackers_retreat", 1), (party_get_slot, ":siege_hardness", "$g_encountered_party", slot_center_siege_hardness), (val_add, ":siege_hardness", 100), (party_set_slot, "$g_encountered_party", slot_center_siege_hardness, ":siege_hardness"), (party_set_slot, "$g_enemy_party", slot_party_retreat_flag, 1), (try_for_range, ":troop_no", kingdom_heroes_begin, kingdom_heroes_end), (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), #(troop_slot_eq, ":troop_no", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":troop_no", slot_troop_prisoner_of_party, 0), (troop_get_slot, ":party_no", ":troop_no", slot_troop_leaded_party), (gt, ":party_no", 0), (party_slot_eq, ":party_no", slot_party_ai_state, spai_besieging_center), (party_slot_eq, ":party_no", slot_party_ai_object, "$g_encountered_party"), (party_slot_eq, ":party_no", slot_party_ai_substate, 1), (call_script, "script_party_set_ai_state", ":party_no", spai_undefined, -1), (call_script, "script_party_set_ai_state", ":party_no", spai_besieging_center, "$g_encountered_party"), (try_end), (display_message, "@The enemy has been forced to retreat. The assault is over, but the siege continues."), (assign, "$g_battle_simulation_cancel_for_party", "$g_encountered_party"), (leave_encounter), (change_screen_return), (assign, "$g_battle_simulation_auto_enter_town_after_battle", "$g_encountered_party"), (try_end), (try_end), (try_end), (assign, "$g_siege_first_encounter", 0), (assign, "$new_encounter", 0), ], [ ("siege_defender_join_battle", [ (neg|troop_is_wounded, "trp_player"), ], "Join the battle.",[ (party_set_next_battle_simulation_time, "$g_encountered_party", -1), (assign, "$g_battle_result", 0), (try_begin), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_town), (party_get_slot, ":battle_scene", "$g_encountered_party", slot_town_walls), (else_try), (party_get_slot, ":battle_scene", "$g_encountered_party", slot_castle_exterior), (try_end), (call_script, "script_calculate_battle_advantage"), (val_mul, reg0, 2), (val_div, reg0, 3), #scale down the advantage a bit. (set_battle_advantage, reg0), (set_party_battle_mode), (try_begin), (party_slot_eq, "$current_town", slot_center_siege_with_belfry, 1), (set_jump_mission,"mt_castle_attack_walls_belfry"), (else_try), (set_jump_mission,"mt_castle_attack_walls_ladder"), (try_end), (jump_to_scene,":battle_scene"), (assign, "$g_next_menu", "mnu_siege_started_defender"), (jump_to_menu, "mnu_battle_debrief"), (change_screen_mission)]), ("siege_defender_troops_join_battle",[(call_script, "script_party_count_members_with_full_health", "p_main_party"), (this_or_next|troop_is_wounded, "trp_player"), (ge, reg0, 3)], "Order your men to join the battle without you.",[ (party_set_next_battle_simulation_time, "$g_encountered_party", -1), (select_enemy,1), (assign,"$g_enemy_party","$g_encountered_party_2"), (assign,"$g_ally_party","$g_encountered_party"), (assign,"$g_siege_join", 1), (jump_to_menu,"mnu_siege_join_defense")]), ## ("siege_defender_do_not_join_battle",[(call_script, "script_party_count_fit_regulars","p_collective_ally"), ## (gt, reg0, 0)], ## "Don't get involved.", [(leave_encounter), ## (change_screen_return), ## ]), ## ("siege_defender_surrender",[(call_script, "script_party_count_fit_regulars","p_collective_ally"), ## (this_or_next|eq, reg0, 0), ## (party_slot_eq, "$g_encountered_party", slot_town_lord, "trp_player"), ## ], ## "Surrender.",[(assign, "$g_player_surrenders", 1), ## (jump_to_menu,"mnu_under_siege_attacked_continue")]), ] ), ( "siege_join_defense",mnf_disable_all_keys, "{s4}^^Your casualties: {s8}^^Allies' casualties: {s9}^^Enemy casualties: {s10}", "none", [ (try_begin), (eq, "$g_siege_join", 1), (call_script, "script_party_calculate_strength", "p_main_party", 1), #skip player (assign, ":player_party_strength", reg0), (val_div, ":player_party_strength", 5), (else_try), (assign, ":player_party_strength", 0), (try_end), (call_script, "script_party_calculate_strength", "p_collective_ally", 0), (assign, ":ally_party_strength", reg0), (val_div, ":ally_party_strength", 5), (call_script, "script_party_calculate_strength", "p_collective_enemy", 0), (assign, ":enemy_party_strength", reg0), (val_div, ":enemy_party_strength", 10), (store_add, ":friend_party_strength", ":player_party_strength", ":ally_party_strength"), (assign, ":enemy_party_strength_for_p", ":enemy_party_strength"), (val_mul, ":enemy_party_strength_for_p", ":player_party_strength"), (val_div, ":enemy_party_strength_for_p", ":friend_party_strength"), (val_sub, ":enemy_party_strength", ":enemy_party_strength_for_p"), (inflict_casualties_to_party_group, "p_main_party", ":enemy_party_strength_for_p", "p_temp_casualties"), (call_script, "script_print_casualties_to_s0", "p_temp_casualties", 0), (str_store_string_reg, s8, s0), (inflict_casualties_to_party_group, "$g_ally_party", ":enemy_party_strength", "p_temp_casualties"), (call_script, "script_print_casualties_to_s0", "p_temp_casualties", 0), (str_store_string_reg, s9, s0), (party_collect_attachments_to_party, "$g_ally_party", "p_collective_ally"), (inflict_casualties_to_party_group, "$g_enemy_party", ":friend_party_strength", "p_temp_casualties"), (call_script, "script_print_casualties_to_s0", "p_temp_casualties", 0), (str_store_string_reg, s10, s0), (party_collect_attachments_to_party, "$g_enemy_party", "p_collective_enemy"), (try_begin), (call_script, "script_party_count_members_with_full_health","p_main_party"), (le, reg(0), 0), (str_store_string, s4, "str_siege_defender_order_attack_failure"), (else_try), (call_script, "script_party_count_members_with_full_health","p_collective_enemy"), (le, reg(0), 0), (assign, "$g_battle_result", 1), (str_store_string, s4, "str_siege_defender_order_attack_success"), (else_try), (str_store_string, s4, "str_siege_defender_order_attack_continue"), (try_end), ], [ ("continue",[],"Continue...",[ (jump_to_menu,"mnu_siege_started_defender"), ]), ] ), ( "enter_your_own_castle",0, "As you approach, you are spotted by the castle guards, who welcome you and open the gates for their {lord/lady}.", "none", [ (str_store_party_name, s2, "$current_town"), ], [ ("continue",[],"Continue...", [ (jump_to_menu,"mnu_town"), ]), ], ), ( "village",mnf_enable_hot_keys, "{s10}{s11}{s6}{s7}", "none", [ (assign, "$current_town", "$g_encountered_party"), (call_script, "script_update_center_recon_notes", "$current_town"), (assign, "$g_defending_against_siege", 0), #required for bandit check (assign, "$g_battle_result", 0), (assign, "$qst_collect_taxes_currently_collecting", 0), (assign, "$qst_train_peasants_against_bandits_currently_training", 0), (try_begin), (gt, "$auto_enter_menu_in_center", 0), (jump_to_menu, "$auto_enter_menu_in_center"), (assign, "$auto_enter_menu_in_center", 0), (try_end), (try_begin), (neq, "$g_player_raiding_village", "$current_town"), (assign, "$g_player_raiding_village", 0), (else_try), (jump_to_menu, "mnu_village_loot_continue"), (try_end), (try_begin),#Fix for collecting taxes (eq, "$g_town_visit_after_rest", 1), (assign, "$g_town_visit_after_rest", 0), (try_end), (str_store_party_name,s2, "$current_town"), (party_get_slot, ":center_lord", "$current_town", slot_town_lord), (store_faction_of_party, ":center_faction", "$current_town"), (str_store_faction_name,s9,":center_faction"), (try_begin), (ge, ":center_lord", 0), (str_store_troop_name,s8,":center_lord"), (str_store_string,s7,"@{s8} of {s9}"), (try_end), (str_clear, s10), (try_begin), (neg|party_slot_eq, "$current_town", slot_village_state, svs_looted), (str_store_string, s60, s2), (party_get_slot, ":prosperity", "$current_town", slot_town_prosperity), (val_add, ":prosperity", 5), (store_div, ":str_offset", ":prosperity", 10), (store_add, ":str_id", "str_village_prosperity_0", ":str_offset"), (str_store_string, s10, ":str_id"), (try_end), (str_clear, s11), (try_begin), (party_slot_eq, "$current_town", slot_village_state, svs_looted), (else_try), (eq, ":center_lord", "trp_player"), (str_store_string,s11,"@ This village and the surrounding lands belong to you."), (else_try), (ge, ":center_lord", 0), (str_store_string,s11,"@ You remember that this village and the surrounding lands belong to {s7}."), (else_try), (str_store_string,s11,"@ These lands belong to no one."), (try_end), (str_clear, s7), (try_begin), (neg|party_slot_eq, "$current_town", slot_village_state, svs_looted), (party_get_slot, ":center_relation", "$current_town", slot_center_player_relation), (call_script, "script_describe_center_relation_to_s3", ":center_relation"), (assign, reg9, ":center_relation"), (str_store_string, s7, "@ {s3} ({reg9})."), (try_end), (str_clear, s6), (try_begin), (party_slot_ge, "$current_town", slot_village_infested_by_bandits, 1), (party_get_slot, ":bandit_troop", "$current_town", slot_village_infested_by_bandits), (store_character_level, ":player_level", "trp_player"), (store_add, "$qst_eliminate_bandits_infesting_village_num_bandits", ":player_level", 10), (val_mul, "$qst_eliminate_bandits_infesting_village_num_bandits", 12), (val_div, "$qst_eliminate_bandits_infesting_village_num_bandits", 10), (store_random_in_range, "$qst_eliminate_bandits_infesting_village_num_villagers", 25, 30), (assign, reg8, "$qst_eliminate_bandits_infesting_village_num_bandits"), (str_store_troop_name_by_count, s35, ":bandit_troop", "$qst_eliminate_bandits_infesting_village_num_bandits"), (str_store_string, s6, "@ The village is infested by {reg8} {s35}."), (try_begin), (eq, ":bandit_troop", "trp_forest_bandit"), (set_background_mesh, "mesh_pic_forest_bandits"), (else_try), (eq, ":bandit_troop", "trp_steppe_bandit"), (set_background_mesh, "mesh_pic_steppe_bandits"), (else_try), (eq, ":bandit_troop", "trp_mountain_bandit"), (set_background_mesh, "mesh_pic_mountain_bandits"), (else_try), (eq, ":bandit_troop", "trp_sea_raider"), (set_background_mesh, "mesh_pic_sea_raiders"), (else_try), (set_background_mesh, "mesh_pic_bandits"), (try_end), (else_try), (party_slot_eq, "$current_town", slot_village_state, svs_looted), (str_store_string, s6, "@ The village has been looted. A handful of souls scatter as you pass through the burnt out houses."), (try_begin), (neq, "$g_player_raid_complete", 1), (play_track, "track_empty_village", 1), (try_end), (set_background_mesh, "mesh_pic_looted_village"), (else_try), (party_slot_eq, "$current_town", slot_village_state, svs_being_raided), (str_store_string, s6, "@ The village is being raided."), (else_try), (party_get_current_terrain, ":cur_terrain", "$current_town"), (try_begin), (this_or_next|eq, ":cur_terrain", rt_steppe), ( eq, ":cur_terrain", rt_steppe_forest), (set_background_mesh, "mesh_pic_village_s"), (else_try), (this_or_next|eq, ":cur_terrain", rt_snow), ( eq, ":cur_terrain", rt_snow_forest), (set_background_mesh, "mesh_pic_village_w"), (else_try), (set_background_mesh, "mesh_pic_village_p"), (try_end), (try_end), (try_begin), (eq, "$g_player_raid_complete", 1), (assign, "$g_player_raid_complete", 0), (jump_to_menu, "mnu_village_loot_complete"), (else_try), (party_get_slot, ":raider_party", "$current_town", slot_village_raided_by), (gt, ":raider_party", 0), # Process here... (try_end), #Adding tax to player if player is the owner of the villager (try_begin), (party_slot_eq, "$current_town", slot_town_lord, "trp_player"), (party_get_slot, ":accumulated_rents", "$current_town", slot_center_accumulated_rents), (gt, ":accumulated_rents", 0), (jump_to_menu, "mnu_center_tax"), (try_end), (try_begin), (eq,"$g_leave_town",1), (assign,"$g_leave_town",0), (change_screen_return), (try_end), (try_begin), (store_time_of_day, ":cur_hour"), (ge, ":cur_hour", 5), (lt, ":cur_hour", 21), (assign, "$town_nighttime", 0), (else_try), (assign, "$town_nighttime", 1), (try_end), ], [ ("village_manage",[(neg|party_slot_eq, "$current_town", slot_village_state, svs_looted), (neg|party_slot_eq, "$current_town", slot_village_state, svs_being_raided), (neg|party_slot_ge, "$current_town", slot_village_infested_by_bandits, 1), (party_slot_eq, "$current_town", slot_town_lord, "trp_player")] ,"Manage this village.", [ (assign, "$g_next_menu", "mnu_village"), (jump_to_menu, "mnu_center_manage"), ]), ("recruit_volunteers",[(call_script, "script_cf_village_recruit_volunteers_cond"),] ,"Recruit Volunteers.", [ (try_begin), (call_script, "script_cf_enter_center_location_bandit_check"), (else_try), (jump_to_menu, "mnu_recruit_volunteers"), (try_end), ]), ("village_center",[(neg|party_slot_eq, "$current_town", slot_village_state, svs_looted), (neg|party_slot_eq, "$current_town", slot_village_state, svs_being_raided), (neg|party_slot_ge, "$current_town", slot_village_infested_by_bandits, 1),] ,"Go to the village center.", [ (try_begin), (call_script, "script_cf_enter_center_location_bandit_check"), (else_try), (party_get_slot, ":village_scene", "$current_town", slot_castle_exterior), (modify_visitors_at_site,":village_scene"), (reset_visitors), (party_get_slot, ":village_elder_troop", "$current_town",slot_town_elder), (set_visitor, 11, ":village_elder_troop"), (call_script, "script_init_town_walkers"), (try_begin), (check_quest_active, "qst_hunt_down_fugitive"), (neg|is_currently_night), (quest_slot_eq, "qst_hunt_down_fugitive", slot_quest_target_center, "$current_town"), (neg|check_quest_succeeded, "qst_hunt_down_fugitive"), (neg|check_quest_failed, "qst_hunt_down_fugitive"), (set_visitor, 45, "trp_fugitive"), (try_end), (set_jump_mission,"mt_village_center"), (jump_to_scene,":village_scene"), (change_screen_mission), (try_end), ],"Door to the village center."), ("village_buy_food",[(party_slot_eq, "$current_town", slot_village_state, 0), (neg|party_slot_ge, "$current_town", slot_village_infested_by_bandits, 1), ],"Buy supplies from the peasants.", [ (try_begin), (call_script, "script_cf_enter_center_location_bandit_check"), (else_try), (party_get_slot, ":merchant_troop", "$current_town", slot_town_elder), (change_screen_trade, ":merchant_troop"), (try_end), ]), ("village_attack_bandits",[(party_slot_ge, "$current_town", slot_village_infested_by_bandits, 1),], "Attack the bandits.", [(party_get_slot, ":bandit_troop", "$current_town", slot_village_infested_by_bandits), (party_get_slot, ":scene_to_use", "$current_town", slot_castle_exterior), (modify_visitors_at_site,":scene_to_use"), (reset_visitors), (set_visitors, 0, ":bandit_troop", "$qst_eliminate_bandits_infesting_village_num_bandits"), (set_visitors, 2, "trp_farmer", "$qst_eliminate_bandits_infesting_village_num_villagers"), (set_party_battle_mode), (set_battle_advantage, 0), (assign, "$g_battle_result", 0), (set_jump_mission,"mt_village_attack_bandits"), (jump_to_scene, ":scene_to_use"), (assign, "$g_next_menu", "mnu_village_infest_bandits_result"), (jump_to_menu, "mnu_battle_debrief"), (assign, "$g_mt_mode", vba_normal), (change_screen_mission), ]), ("village_wait", [(party_slot_eq, "$current_town", slot_center_has_manor, 1), (party_slot_eq, "$current_town", slot_town_lord, "trp_player"), ], "Wait here for some time.", [ (assign,"$auto_enter_town","$current_town"), (assign, "$g_last_rest_center", "$current_town"), (rest_for_hours_interactive, 24 * 7, 5, 1), #rest while attackable (change_screen_return), ]), ("collect_taxes_qst",[(party_slot_eq, "$current_town", slot_village_state, 0), (check_quest_active, "qst_collect_taxes"), (quest_get_slot, ":quest_giver_troop", "qst_collect_taxes", slot_quest_giver_troop), (quest_slot_eq, "qst_collect_taxes", slot_quest_target_center, "$current_town"), (neg|quest_slot_eq, "qst_collect_taxes", slot_quest_current_state, 4), (str_store_troop_name, s1, ":quest_giver_troop"), (quest_get_slot, reg5, "qst_collect_taxes", slot_quest_current_state), ], "{reg5?Continue collecting taxes:Collect taxes} due to {s1}.", [(jump_to_menu, "mnu_collect_taxes"),]), ("train_peasants_against_bandits_qst", [ (party_slot_eq, "$current_town", slot_village_state, 0), (check_quest_active, "qst_train_peasants_against_bandits"), (neg|check_quest_concluded, "qst_train_peasants_against_bandits"), (quest_slot_eq, "qst_train_peasants_against_bandits", slot_quest_target_center, "$current_town"), ], "Train the peasants.", [(jump_to_menu, "mnu_train_peasants_against_bandits"),]), ("village_hostile_action",[(party_slot_eq, "$current_town", slot_village_state, 0), (neg|party_slot_ge, "$current_town", slot_village_infested_by_bandits, 1),], "Take a hostile action.", [(jump_to_menu,"mnu_village_hostile_action"), ]), ("village_reports",[(eq, "$cheat_mode", 1),], "CHEAT! Show reports.", [(jump_to_menu,"mnu_center_reports"), ]), ("village_leave",[],"Leave...",[(change_screen_return,0)]), ], ), ( "village_hostile_action",0, "What action do you have in mind?", "none", [], [ ("village_take_food",[ (party_slot_eq, "$current_town", slot_village_state, 0), (neg|party_slot_ge, "$current_town", slot_village_infested_by_bandits, 1), (party_get_slot, ":merchant_troop", "$current_town", slot_town_elder), (assign, ":town_stores_not_empty", 0), (try_for_range, ":slot_no", num_equipment_kinds, max_inventory_items + num_equipment_kinds), (troop_get_inventory_slot, ":slot_item", ":merchant_troop", ":slot_no"), (ge, ":slot_item", 0), (assign, ":town_stores_not_empty", 1), (try_end), (eq, ":town_stores_not_empty", 1), ],"Force the peasants to give you supplies.", [ (jump_to_menu, "mnu_village_take_food_confirm") ]), ("village_steal_cattle", [ (party_slot_eq, "$current_town", slot_village_state, 0), (party_slot_eq, "$current_town", slot_village_player_can_not_steal_cattle, 0), (neg|party_slot_ge, "$current_town", slot_village_infested_by_bandits, 1), (party_get_slot, ":num_cattle", "$current_town", slot_village_number_of_cattle), (neg|party_slot_eq, "$current_town", slot_town_lord, "trp_player"), (gt, ":num_cattle", 0), ],"Steal cattle.", [ (jump_to_menu, "mnu_village_steal_cattle_confirm") ]), ("village_loot",[(party_slot_eq, "$current_town", slot_village_state, 0), (neg|party_slot_ge, "$current_town", slot_village_infested_by_bandits, 1), (store_faction_of_party, ":center_faction", "$current_town"), (store_relation, ":reln", "fac_player_supporters_faction", ":center_faction"), (lt, ":reln", 0), ], "Loot and burn this village.", [ # (party_clear, "$current_town"), # (party_add_template, "$current_town", "pt_villagers_in_raid"), (jump_to_menu, "mnu_village_start_attack"), ]), ("forget_it",[], "Forget it.",[(jump_to_menu,"mnu_village")]), ], ), ( "recruit_volunteers",0, "{s18}", "none", [(party_get_slot, ":volunteer_troop", "$current_town", slot_center_volunteer_troop_type), (party_get_slot, ":volunteer_amount", "$current_town", slot_center_volunteer_troop_amount), (party_get_free_companions_capacity, ":free_capacity", "p_main_party"), (val_min, ":volunteer_amount", ":free_capacity"), (store_troop_gold, ":gold", "trp_player"), (store_div, ":gold_capacity", ":gold", 10),#10 denars per man (val_min, ":volunteer_amount", ":gold_capacity"), (assign, reg5, ":volunteer_amount"), (try_begin), (eq, ":volunteer_amount", 0), (str_store_string, s18, "@No one here seems to be willing to join your party."), (else_try), (store_mul, reg6, ":volunteer_amount", 10),#10 denars per man (str_store_troop_name_by_count, s3, ":volunteer_troop", ":volunteer_amount"), (try_begin), (eq, reg5, 1), (str_store_string, s18, "@One {s3} volunteers to follow you."), (else_try), (str_store_string, s18, "@{reg5} {s3} volunteer to follow you."), (try_end), (set_background_mesh, "mesh_pic_recruits"), (try_end), ], [ ("continue",[(eq, reg5, 0)], "Continue...",[(party_set_slot, "$current_town", slot_center_volunteer_troop_amount, -1),(jump_to_menu,"mnu_village")]), ("recruit_them",[(gt, reg5, 0)], "Recruit them ({reg6} denars).",[(call_script, "script_village_recruit_volunteers_recruit"), (jump_to_menu,"mnu_village"), ]), ("forget_it",[(gt, reg5, 0)], "Forget it.",[(jump_to_menu,"mnu_village")]), ], ), ( "village_hunt_down_fugitive_defeated",0, "A heavy blow from the fugitive sends you to the ground, and your vision spins and goes dark.\ Time passes. When you open your eyes again you find yourself battered and bloody,\ but luckily none of the wounds appear to be lethal.", "none", [], [ ("continue",[],"Continue...",[(jump_to_menu, "mnu_village"),]), ], ), ( "village_infest_bandits_result",mnf_scale_picture, "{s9}", "none", [(try_begin), (eq, "$g_battle_result", 1), (jump_to_menu, "mnu_village_infestation_removed"), (else_try), (str_store_string, s9, "@Try as you might, you could not defeat the bandits.\ Infuriated, they raze the village to the ground to punish the peasants,\ and then leave the burning wasteland behind to find greener pastures to plunder."), (set_background_mesh, "mesh_pic_looted_village"), (try_end), ], [ ("continue",[],"Continue...", [(party_set_slot, "$g_encountered_party", slot_village_infested_by_bandits, 0), (call_script, "script_village_set_state", "$current_town", svs_looted), (party_set_slot, "$current_town", slot_village_raid_progress, 0), (party_set_slot, "$current_town", slot_village_recover_progress, 0), (try_begin), (check_quest_active, "qst_eliminate_bandits_infesting_village"), (quest_slot_eq, "qst_eliminate_bandits_infesting_village", slot_quest_target_center, "$g_encountered_party"), (call_script, "script_change_player_relation_with_center", "$g_encountered_party", -5), (call_script, "script_fail_quest", "qst_eliminate_bandits_infesting_village"), (else_try), (check_quest_active, "qst_deal_with_bandits_at_lords_village"), (quest_slot_eq, "qst_deal_with_bandits_at_lords_village", slot_quest_target_center, "$g_encountered_party"), (call_script, "script_change_player_relation_with_center", "$g_encountered_party", -4), (call_script, "script_fail_quest", "qst_deal_with_bandits_at_lords_village"), (else_try), (call_script, "script_change_player_relation_with_center", "$g_encountered_party", -3), (try_end), (jump_to_menu, "mnu_village"),]), ], ), ( "village_infestation_removed",mnf_disable_all_keys, "In a battle worthy of song, you and your men drive the bandits out of the village, making it safe once more.\ The villagers have little left in the way of wealth after their ordeal,\ but they offer you all they can find.", "none", [(party_get_slot, ":bandit_troop", "$g_encountered_party", slot_village_infested_by_bandits), (party_set_slot, "$g_encountered_party", slot_village_infested_by_bandits, 0), (party_clear, "p_temp_party"), (party_add_members, "p_temp_party", ":bandit_troop", "$qst_eliminate_bandits_infesting_village_num_bandits"), (assign, "$g_strength_contribution_of_player", 50), (call_script, "script_party_give_xp_and_gold", "p_temp_party"), (try_begin), (check_quest_active, "qst_eliminate_bandits_infesting_village"), (quest_slot_eq, "qst_eliminate_bandits_infesting_village", slot_quest_target_center, "$g_encountered_party"), (call_script, "script_end_quest", "qst_eliminate_bandits_infesting_village"), #Add quest reward (call_script, "script_change_player_relation_with_center", "$g_encountered_party", 5), (else_try), (check_quest_active, "qst_deal_with_bandits_at_lords_village"), (quest_slot_eq, "qst_deal_with_bandits_at_lords_village", slot_quest_target_center, "$g_encountered_party"), (call_script, "script_succeed_quest", "qst_deal_with_bandits_at_lords_village"), (call_script, "script_change_player_relation_with_center", "$g_encountered_party", 3), (else_try), #Add normal reward (call_script, "script_change_player_relation_with_center", "$g_encountered_party", 4), (try_end), (party_get_slot, ":merchant_troop", "$current_town", slot_town_elder), (try_for_range, ":slot_no", num_equipment_kinds ,max_inventory_items + num_equipment_kinds), (store_random_in_range, ":rand", 0, 100), (lt, ":rand", 70), (troop_set_inventory_slot, ":merchant_troop", ":slot_no", -1), (try_end), ], [ ("village_bandits_defeated_accept",[],"Take it as your just due.",[(jump_to_menu, "mnu_village"), (party_get_slot, ":merchant_troop", "$current_town", slot_town_elder), (troop_sort_inventory, ":merchant_troop"), (change_screen_loot, ":merchant_troop"), ]), ("village_bandits_defeated_cont",[], "Refuse, stating that they need these items more than you do.",[(call_script, "script_change_player_relation_with_center", "$g_encountered_party", 3), (jump_to_menu, "mnu_village")]), ], ), ( "center_manage",0, "{s19}^{reg6?^^You are\ currently building {s7}. The building will be completed after {reg8} day{reg9?s:}.:}", "none", [(assign, ":num_improvements", 0), (str_clear, s18), (try_begin), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_village), (assign, ":begin", village_improvements_begin), (assign, ":end", village_improvements_end), (str_store_string, s17, "@village"), (else_try), (assign, ":begin", walled_center_improvements_begin), (assign, ":end", walled_center_improvements_end), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_town), (str_store_string, s17, "@town"), (else_try), (str_store_string, s17, "@castle"), (try_end), (try_for_range, ":improvement_no", ":begin", ":end"), (party_slot_ge, "$g_encountered_party", ":improvement_no", 1), (val_add, ":num_improvements", 1), (call_script, "script_get_improvement_details", ":improvement_no"), (try_begin), (eq, ":num_improvements", 1), (str_store_string, s18, "@{s0}"), (else_try), (str_store_string, s18, "@{s18}, {s0}"), (try_end), (try_end), (try_begin), (eq, ":num_improvements", 0), (str_store_string, s19, "@The {s17} has no improvements."), (else_try), (str_store_string, s19, "@The {s17} has the following improvements:{s18}."), (try_end), (assign, reg6, 0), (try_begin), (party_get_slot, ":cur_improvement", "$g_encountered_party", slot_center_current_improvement), (gt, ":cur_improvement", 0), (call_script, "script_get_improvement_details", ":cur_improvement"), (str_store_string, s7, s0), (assign, reg6, 1), (store_current_hours, ":cur_hours"), (party_get_slot, ":finish_time", "$g_encountered_party", slot_center_improvement_end_hour), (val_sub, ":finish_time", ":cur_hours"), (store_div, reg8, ":finish_time", 24), (val_max, reg8, 1), (store_sub, reg9, reg8, 1), (try_end), ], [ ("center_build_manor",[(eq, reg6, 0), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_village), (party_slot_eq, "$g_encountered_party", slot_center_has_manor, 0), ], "Build a manor.",[(assign, "$g_improvement_type", slot_center_has_manor), (jump_to_menu, "mnu_center_improve"),]), ("center_build_fish_pond",[(eq, reg6, 0), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_village), (party_slot_eq, "$g_encountered_party", slot_center_has_fish_pond, 0), ], "Build a mill.",[(assign, "$g_improvement_type", slot_center_has_fish_pond), (jump_to_menu, "mnu_center_improve"),]), ("center_build_watch_tower",[(eq, reg6, 0), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_village), (party_slot_eq, "$g_encountered_party", slot_center_has_watch_tower, 0), ], "Build a watch tower.",[(assign, "$g_improvement_type", slot_center_has_watch_tower), (jump_to_menu, "mnu_center_improve"),]), ("center_build_school",[(eq, reg6, 0), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_village), (party_slot_eq, "$g_encountered_party", slot_center_has_school, 0), ], "Build a school.",[(assign, "$g_improvement_type", slot_center_has_school), (jump_to_menu, "mnu_center_improve"),]), ("center_build_messenger_post",[(eq, reg6, 0), (party_slot_eq, "$g_encountered_party", slot_center_has_messenger_post, 0), ], "Build a messenger post.",[(assign, "$g_improvement_type", slot_center_has_messenger_post), (jump_to_menu, "mnu_center_improve"),]), ("center_build_prisoner_tower",[(eq, reg6, 0), (this_or_next|party_slot_eq, "$g_encountered_party", slot_party_type, spt_town), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_castle), (party_slot_eq, "$g_encountered_party", slot_center_has_prisoner_tower, 0), ], "Build a prisoner tower.",[(assign, "$g_improvement_type", slot_center_has_prisoner_tower), (jump_to_menu, "mnu_center_improve"),]), ("go_back_dot",[],"Go back.",[(jump_to_menu, "$g_next_menu")]), ], ), ( "center_improve",0, "{s19} As the party member with the highest engineer skill ({reg2}), {reg3?you reckon:{s3} reckons} that building the {s4} will cost you\ {reg5} denars and will take {reg6} days.", "none", [(call_script, "script_get_improvement_details", "$g_improvement_type"), (assign, ":improvement_cost", reg0), (str_store_string, s4, s0), (str_store_string, s19, s1), (call_script, "script_get_max_skill_of_player_party", "skl_engineer"), (assign, ":max_skill", reg0), (assign, ":max_skill_owner", reg1), (assign, reg2, ":max_skill"), (store_sub, ":multiplier", 20, ":max_skill"), (val_mul, ":improvement_cost", ":multiplier"), (val_div, ":improvement_cost", 20), (store_div, ":improvement_time", ":improvement_cost", 100), (val_add, ":improvement_time", 3), (assign, reg5, ":improvement_cost"), (assign, reg6, ":improvement_time"), (try_begin), (eq, ":max_skill_owner", "trp_player"), (assign, reg3, 1), (else_try), (assign, reg3, 0), (str_store_troop_name, s3, ":max_skill_owner"), (try_end), ], [ ("improve_cont",[(store_troop_gold, ":cur_gold", "trp_player"), (ge, ":cur_gold", reg5)], "Go on.", [(troop_remove_gold, "trp_player", reg5), (party_set_slot, "$g_encountered_party", slot_center_current_improvement, "$g_improvement_type"), (store_current_hours, ":cur_hours"), (store_mul, ":hours_takes", reg6, 24), (val_add, ":hours_takes", ":cur_hours"), (party_set_slot, "$g_encountered_party", slot_center_improvement_end_hour, ":hours_takes"), (jump_to_menu,"mnu_center_manage"), ]), ("forget_it",[(store_troop_gold, ":cur_gold", "trp_player"), (ge, ":cur_gold", reg5)], "Forget it.", [(jump_to_menu,"mnu_center_manage")]), ("improve_not_enough_gold",[(store_troop_gold, ":cur_gold", "trp_player"), (lt, ":cur_gold", reg5)], "I don't have enough money for that.", [(jump_to_menu, "mnu_center_manage"),]), ], ), ( "town_bandits_failed",mnf_disable_all_keys, "{s4} {s5}", "none", [ # (call_script, "script_loot_player_items", 0), (store_troop_gold, ":total_gold", "trp_player"), (store_div, ":gold_loss", ":total_gold", 30), (store_random_in_range, ":random_loss", 40, 100), (val_add, ":gold_loss", ":random_loss"), (val_min, ":gold_loss", ":total_gold"), (troop_remove_gold, "trp_player",":gold_loss"), (party_set_slot, "$current_town", slot_center_has_bandits, 0), (party_get_num_companions, ":num_companions", "p_main_party"), (str_store_string, s4, "@The assasins beat you down and leave you for dead. ."), (str_store_string, s4, "@You have fallen. The bandits quickly search your body for every coin they can find,\ then vanish into the night. They have left you alive, if only barely."), (try_begin), (gt, ":num_companions", 2), (str_store_string, s5, "@Luckily some of your companions come to search for you when you do not return, and find you lying by the side of the road. They hurry you to safety and dress your wounds."), (else_try), (str_store_string, s5, "@Luckily some passing townspeople find you lying by the side of the road, and recognise you as something other than a simple beggar. They carry you to the nearest inn and dress your wounds."), (try_end), ], [ ("continue",[],"Continue...",[(change_screen_return)]), ], ), ( "town_bandits_succeeded",mnf_disable_all_keys, "The bandits fall before you as wheat to a scythe! Soon you stand alone in the streets\ while most of your attackers lie unconscious, dead or dying.\ Searching the bodies, you find a purse which must have belonged to a previous victim of these brutes.\ Or perhaps, it was given to them by someone who wanted to arrange a suitable ending to your life.", "none", [ (party_set_slot, "$current_town", slot_center_has_bandits, 0), (assign, "$g_last_defeated_bandits_town", "$g_encountered_party"), (try_begin), (check_quest_active, "qst_deal_with_night_bandits"), (neg|check_quest_succeeded, "qst_deal_with_night_bandits"), (quest_slot_eq, "qst_deal_with_night_bandits", slot_quest_target_center, "$g_encountered_party"), (call_script, "script_succeed_quest", "qst_deal_with_night_bandits"), (try_end), (store_mul, ":xp_reward", "$num_center_bandits", 117), (add_xp_to_troop, ":xp_reward", "trp_player"), (store_mul, ":gold_reward", "$num_center_bandits", 50), (call_script, "script_troop_add_gold","trp_player",":gold_reward"), ], [ ("continue",[],"Continue...",[(change_screen_return)]), ], ), ( "village_steal_cattle_confirm",0, "As the party member with the highest looting skill ({reg2}), {reg3?you reckon:{s1} reckons} that you can steal as many as {reg4} heads of village's cattle.", "none", [ (call_script, "script_get_max_skill_of_player_party", "skl_looting"), (assign, reg2, reg0), (assign, ":max_skill_owner", reg1), (try_begin), (eq, ":max_skill_owner", "trp_player"), (assign, reg3, 1), (else_try), (assign, reg3, 0), (str_store_troop_name, s1, ":max_skill_owner"), (try_end), (call_script, "script_calculate_amount_of_cattle_can_be_stolen", "$current_town"), (assign, reg4, reg0), ], [ ("village_steal_cattle_confirm",[],"Go on.", [ (rest_for_hours_interactive, 3, 5, 1), #rest while attackable (assign, "$auto_menu", "mnu_village_steal_cattle"), (change_screen_return), ]), ("forget_it",[],"Forget it.",[(change_screen_return)]), ], ), ( "village_steal_cattle",mnf_disable_all_keys, "{s1}", "none", [ (call_script, "script_calculate_amount_of_cattle_can_be_stolen", "$current_town"), (assign, ":max_value", reg0), (val_add, ":max_value", 1), (store_random_in_range, ":random_value", 0, ":max_value"), (party_set_slot, "$current_town", slot_village_player_can_not_steal_cattle, 1), (party_get_slot, ":lord", "$current_town", slot_town_lord), (try_begin), (le, ":random_value", 0), (call_script, "script_change_player_relation_with_center", "$current_town", -3), (str_store_string, s1, "@You fail to steal any cattle."), (else_try), (assign, reg17, ":random_value"), (store_sub, reg12, ":random_value", 1), (try_begin), (gt, ":lord", 0), (call_script, "script_change_player_relation_with_troop", ":lord", -3), (try_end), (call_script, "script_change_player_relation_with_center", "$current_town", -5), (str_store_string, s1, "@You drive away {reg17} {reg12?heads:head} of cattle from the village's herd."), (call_script, "script_create_cattle_herd", "$current_town", ":random_value"), (party_get_slot, ":num_cattle", "$current_town", slot_village_number_of_cattle), (val_sub, ":num_cattle", ":random_value"), (party_set_slot, "$current_town", slot_village_number_of_cattle, ":num_cattle"), (try_end), ], [ ("continue",[],"Continue...", [ (change_screen_return), ]), ], ), ( "village_take_food_confirm",0, "It will be difficult to force and threaten the peasants into giving their precious supplies. You think you will need at least one hour.", #TODO: mention looting skill? "none", [], [ ("village_take_food_confirm",[],"Go ahead.", [ (rest_for_hours_interactive, 1, 5, 0), #rest while not attackable (assign, "$auto_enter_town", "$current_town"), (assign, "$g_town_visit_after_rest", 1), (assign, "$auto_enter_menu_in_center", "mnu_village_take_food"), (change_screen_return), ]), ("forget_it",[],"Forget it.",[(jump_to_menu, "mnu_village_hostile_action")]), ], ), ( "village_take_food",0, "The villagers grudgingly bring out what they have for you.", "none", [ (call_script, "script_party_count_members_with_full_health","p_main_party"), (assign, ":player_party_size", reg(0)), (call_script, "script_party_count_members_with_full_health","$current_town"), (assign, ":villagers_party_size", reg(0)), (try_begin), (lt, ":player_party_size", 6), (ge, ":villagers_party_size", 40), (neg|party_slot_eq, "$current_town", slot_town_lord, "trp_player"), (jump_to_menu, "mnu_village_start_attack"), (try_end), ], [ ("take_supplies",[],"Take the supplies.", [ (try_begin), (party_slot_ge, "$current_town", slot_center_player_relation, -55), (try_begin), (party_slot_eq, "$current_town", slot_town_lord, "trp_player"), (call_script, "script_change_player_relation_with_center", "$current_town", -1), (else_try), (call_script, "script_change_player_relation_with_center", "$current_town", -3), (try_end), (try_end), (party_get_slot, ":village_lord", "$current_town", slot_town_lord), (try_begin), (gt, ":village_lord", 1), (call_script, "script_change_player_relation_with_troop", ":village_lord", -1), (try_end), (party_get_slot, ":merchant_troop", "$current_town", slot_town_elder), (party_get_skill_level, ":player_party_looting", "p_main_party", "skl_looting"), (val_mul, ":player_party_looting", 3), (store_sub, ":random_chance", 70, ":player_party_looting"), #Increases the chance of looting by 3% per skill level (try_for_range, ":slot_no", num_equipment_kinds ,max_inventory_items + num_equipment_kinds), (store_random_in_range, ":rand", 0, 100), (lt, ":rand", ":random_chance"), (troop_set_inventory_slot, ":merchant_troop", ":slot_no", -1), (try_end), ###NPC companion changes begin (call_script, "script_objectionable_action", tmt_humanitarian, "str_steal_from_villagers"), #NPC companion changes end #Troop commentary changes begin # (store_faction_of_party,":village_faction", "$current_town"), (call_script, "script_add_log_entry", logent_village_extorted, "trp_player", "$current_town", -1, -1), #Troop commentary changes end (jump_to_menu, "mnu_village"), (troop_sort_inventory, ":merchant_troop"), (change_screen_loot, ":merchant_troop"), ]), ("let_them_keep_it",[],"Let them keep it.",[(jump_to_menu, "mnu_village")]), ], ), ( "village_start_attack",mnf_disable_all_keys, "Some of the angry villagers grab their tools and prepare to resist you.\ It looks like you'll have a fight on your hands if you continue.", "none", [ (call_script, "script_party_count_members_with_full_health","p_main_party"), (assign, ":player_party_size", reg(0)), (call_script, "script_party_count_members_with_full_health","$current_town"), (assign, ":villagers_party_size", reg(0)), (try_begin), (gt, ":player_party_size", 25), (jump_to_menu, "mnu_village_loot_no_resist"), (else_try), (this_or_next|eq, ":villagers_party_size", 0), (eq, "$g_battle_result", 1), (try_begin), (eq, "$g_battle_result", 1), (store_random_in_range, ":enmity", -30, -15), (call_script, "script_change_player_relation_with_center", "$current_town", ":enmity"), (party_get_slot, ":town_lord", "$current_town", slot_town_lord), (gt, ":town_lord", 0), (call_script, "script_change_player_relation_with_troop", ":town_lord", -3), (try_end), (jump_to_menu, "mnu_village_loot_no_resist"), (else_try), (eq, "$g_battle_result", -1), (jump_to_menu, "mnu_village_loot_defeat"), (try_end), ], [ ("village_raid_attack",[],"Charge them.",[ (store_random_in_range, ":enmity", -10, -5), (call_script, "script_change_player_relation_with_center", "$current_town", ":enmity"), (try_begin), (party_get_slot, ":town_lord", "$current_town", slot_town_lord), (gt, ":town_lord", 0), (call_script, "script_change_player_relation_with_troop", ":town_lord", -3), (try_end), (call_script, "script_calculate_battle_advantage"), (set_battle_advantage, reg0), (set_party_battle_mode), (assign, "$g_battle_result", 0), (assign, "$g_village_raid_evil", 1), (set_jump_mission,"mt_village_raid"), (party_get_slot, ":scene_to_use", "$current_town", slot_castle_exterior), (jump_to_scene, ":scene_to_use"), (assign, "$g_next_menu", "mnu_village_start_attack"), ###NPC companion changes begin (call_script, "script_objectionable_action", tmt_humanitarian, "str_loot_village"), #NPC companion changes end (jump_to_menu, "mnu_battle_debrief"), (change_screen_mission), ]), ("village_raid_leave",[],"Leave this village alone.",[(change_screen_return)]), ], ), ( "village_loot_no_resist",0, "The villagers here are few and frightened, and they quickly scatter and run before you.\ The village is at your mercy.", "none", [], [ ("village_loot",[], "Plunder the village, then raze it.", [ (call_script, "script_village_set_state", "$current_town", svs_being_raided), (party_set_slot, "$current_town", slot_village_raided_by, "p_main_party"), (assign,"$g_player_raiding_village","$current_town"), (rest_for_hours, 3, 5, 1), #rest while attackable (3 hours will be extended by the trigger) (change_screen_return), ]), ("village_raid_leave",[],"Leave this village alone.",[(change_screen_return)]), ], ), ( "village_loot_complete",mnf_disable_all_keys, "On your orders your troops sack the village, pillaging everything of any value,\ and then put the buildings to the torch. From the coins and valuables that are found, you get your share of {reg1} denars.", "none", [ (party_get_slot, ":village_lord", "$current_town", slot_town_lord), (try_begin), (gt, ":village_lord", 0), (call_script, "script_change_player_relation_with_troop", ":village_lord", -5), (try_end), (store_random_in_range, ":enmity", -40, -20), (call_script, "script_change_player_relation_with_center", "$current_town", ":enmity"), (store_faction_of_party, ":village_faction", "$current_town"), (store_relation, ":relation", ":village_faction", "fac_player_supporters_faction"), (try_begin), (lt, ":relation", 0), (call_script, "script_change_player_relation_with_faction", ":village_faction", -3), (try_end), (store_random_in_range, ":morale_increase", 10, 20), (call_script, "script_change_player_party_morale", ":morale_increase"), (store_random_in_range, reg1, 100, 500), (call_script, "script_troop_add_gold", "trp_player", reg1), #NPC companion changes begin (call_script, "script_objectionable_action", tmt_humanitarian, "str_loot_village"), #NPC companion changes end ], [ ("continue",[], "Continue...", [ (jump_to_menu, "mnu_close"), (call_script, "script_calculate_amount_of_cattle_can_be_stolen", "$current_town"), (assign, ":max_cattle", reg0), (val_mul, ":max_cattle", 3), (val_div, ":max_cattle", 2), (party_get_slot, ":num_cattle", "$current_town", slot_village_number_of_cattle), (val_min, ":max_cattle", ":num_cattle"), (val_add, ":max_cattle", 1), (store_random_in_range, ":random_value", 0, ":max_cattle"), (try_begin), (gt, ":random_value", 0), (call_script, "script_create_cattle_herd", "$current_town", ":random_value"), (val_sub, ":num_cattle", ":random_value"), (party_set_slot, "$current_town", slot_village_number_of_cattle, ":num_cattle"), (try_end), (troop_clear_inventory, "trp_temp_troop"), (reset_item_probabilities,100), (troop_add_merchandise,"trp_temp_troop",itp_type_goods,45), (troop_sort_inventory, "trp_temp_troop"), (change_screen_loot, "trp_temp_troop"), ]), ], ), ( "village_loot_defeat",0, "Fighting with courage and determination, the villagers manage to hold together and drive off your forces.", "none", [], [ ("continue",[],"Continue...",[(change_screen_return)]), ], ), ( "village_loot_continue",0, "Do you wish to continue looting this village?", "none", [], [ ("disembark_yes",[],"Yes.",[ (rest_for_hours, 3, 5, 1), #rest while attackable (3 hours will be extended by the trigger) (change_screen_return), ]), ("disembark_no",[],"No.",[(call_script, "script_village_set_state", "$current_town", 0), (party_set_slot, "$current_town", slot_village_raided_by, -1), (assign, "$g_player_raiding_village", 0), (change_screen_return)]), ], ), ( "close",0, "Nothing.", "none", [ (change_screen_return), ], [], ), ( "center_tax",mnf_disable_all_keys, "You receive the accumulated rents and taxes of this fief, amounting to {reg1} denars.", "none", [ (str_clear, s3), (try_begin), (party_slot_eq, "$current_town", slot_town_lord, "trp_player"), (party_get_slot, ":accumulated_rents", "$current_town", slot_center_accumulated_rents), (party_get_slot, ":accumulated_tariffs", "$current_town", slot_center_accumulated_tariffs), (store_add, ":total_tax", ":accumulated_rents", ":accumulated_tariffs"), (assign, reg1, ":total_tax"), (call_script, "script_troop_add_gold", "trp_player", ":total_tax"), (party_set_slot, "$current_town", slot_center_accumulated_rents, 0), (party_set_slot, "$current_town", slot_center_accumulated_tariffs, 0), (try_end), ], [ ("continue",[], "Continue...", [ (try_begin), (party_slot_eq, "$current_town", slot_party_type, spt_village), (jump_to_menu, "mnu_village"), (else_try), (jump_to_menu, "mnu_town"), (try_end), ]), ], ), ( "town",mnf_enable_hot_keys, "{s10}{s11}{s12}{s13}", "none", [ (try_begin), (eq, "$sneaked_into_town", 1), (call_script, "script_music_set_situation_with_culture", mtf_sit_town_infiltrate), (else_try), (call_script, "script_music_set_situation_with_culture", mtf_sit_travel), (try_end), (store_encountered_party,"$current_town"), (call_script, "script_update_center_recon_notes", "$current_town"), (assign, "$g_defending_against_siege", 0), (str_clear, s3), (party_get_battle_opponent, ":besieger_party", "$current_town"), (store_faction_of_party, ":encountered_faction", "$g_encountered_party"), (store_relation, ":faction_relation", ":encountered_faction", "fac_player_supporters_faction"), (try_begin), (gt, ":besieger_party", 0), (ge, ":faction_relation", 0), (store_faction_of_party, ":besieger_party_faction", ":besieger_party"), (store_relation, ":besieger_party_relation", ":besieger_party_faction", "fac_player_supporters_faction"), (lt, ":besieger_party_relation", 0), (assign, "$g_defending_against_siege", 1), (assign, "$g_siege_first_encounter", 1), (jump_to_menu, "mnu_siege_started_defender"), (try_end), #Quest menus (assign, "$qst_collect_taxes_currently_collecting", 0), (try_begin), (gt, "$quest_auto_menu", 0), (jump_to_menu, "$quest_auto_menu"), (assign, "$quest_auto_menu", 0), (try_end), (try_begin), ## (eq, "$g_center_under_siege_battle", 1), ## (jump_to_menu,"mnu_siege_started_defender"), ## (else_try), (eq, "$g_town_assess_trade_goods_after_rest", 1), (assign, "$g_town_assess_trade_goods_after_rest", 0), (jump_to_menu,"mnu_town_trade_assessment"), (try_end), (assign, "$talk_context", 0), (assign,"$all_doors_locked",0), (try_begin), (eq, "$g_town_visit_after_rest", 1), (assign, "$g_town_visit_after_rest", 0), (assign, "$town_entered", 1), (try_end), (try_begin), (eq,"$g_leave_town",1), (assign,"$g_leave_town",0), (assign,"$g_permitted_to_center",0), (leave_encounter), (change_screen_return), (try_end), #Adding tax to player if player is the owner of the town or castle (try_begin), (party_slot_eq, "$current_town", slot_town_lord, "trp_player"), (party_get_slot, ":accumulated_rents", "$current_town", slot_center_accumulated_rents), (gt, ":accumulated_rents", 0), (jump_to_menu, "mnu_center_tax"), (try_end), (str_store_party_name,s2, "$current_town"), (party_get_slot, ":center_lord", "$current_town", slot_town_lord), (store_faction_of_party, ":center_faction", "$current_town"), (str_store_faction_name,s9,":center_faction"), (try_begin), (ge, ":center_lord", 0), (str_store_troop_name,s8,":center_lord"), (str_store_string,s7,"@{s8} of {s9}"), (try_end), (try_begin), (party_slot_eq,"$current_town",slot_party_type, spt_town), (str_store_string, s60, s2), (party_get_slot, ":prosperity", "$current_town", slot_town_prosperity), (val_add, ":prosperity", 5), (store_div, ":str_offset", ":prosperity", 10), (store_add, ":str_id", "str_town_prosperity_0", ":str_offset"), (str_store_string, s10, ":str_id"), (else_try), (str_store_string,s10,"@You are at {s2}."), (try_end), (try_begin), (party_slot_eq,"$current_town",slot_party_type, spt_castle), (try_begin), (eq, ":center_lord", "trp_player"), (str_store_string,s11,"@ Your own banner flies over the castle gate."), (else_try), (ge, ":center_lord", 0), (str_store_string,s11,"@ You see the banner of {s7} over the castle gate."), (else_try), (str_store_string,s11,"@ This castle seems to belong to no one."), (try_end), (else_try), (try_begin), (eq, ":center_lord", "trp_player"), (str_store_string,s11,"@ Your own banner flies over the town gates."), (else_try), (ge, ":center_lord", 0), (str_store_string,s11,"@ You see the banner of {s7} over the town gates."), (else_try), (str_store_string,s11,"@ The townsfolk here have declared their independence."), (try_end), (try_end), (str_clear, s12), (try_begin), (party_slot_eq,"$current_town",slot_party_type, spt_town), (party_get_slot, ":center_relation", "$current_town", slot_center_player_relation), (call_script, "script_describe_center_relation_to_s3", ":center_relation"), (assign, reg9, ":center_relation"), (str_store_string, s12, "@ {s3} ({reg9})."), (try_end), (str_clear, s13), (try_begin), (gt,"$entry_to_town_forbidden",0), (str_store_string, s13, "@ You have successfully sneaked in."), (try_end), #forbidden to enter? (try_begin), (store_time_of_day,reg(12)), (ge,reg(12),5), (lt,reg(12),21), (assign,"$town_nighttime",0), (else_try), (assign,"$town_nighttime",1), (party_slot_eq,"$current_town",slot_party_type, spt_town), (str_store_string, s13, "str_town_nighttime"), (try_end), (try_begin), (party_slot_ge, "$current_town", slot_town_has_tournament, 1), (neg|is_currently_night), (party_set_slot, "$current_town", slot_town_has_tournament, 1), (str_store_string, s13, "@{s13} A tournament will be held here soon."), (try_end), (assign,"$castle_undefended",0), (party_get_num_companions, ":castle_garrison_size", "p_collective_enemy"), (try_begin), (eq,":castle_garrison_size",0), (assign,"$castle_undefended",1), (try_end), ], [ ("castle_castle",[(party_slot_eq,"$current_town",slot_party_type, spt_castle)],"Go to the Lord's hall.", [ (try_begin), (eq,"$all_doors_locked",1), (display_message,"str_door_locked",0xFFFFAAAA), (else_try), (assign, "$town_entered", 1), (call_script, "script_enter_court", "$current_town"), (try_end), ], "Door to the castle."), ("join_tournament", [(neg|is_currently_night),(party_slot_ge, "$current_town", slot_town_has_tournament, 1),] ,"Join the tournament.", [ (call_script, "script_fill_tournament_participants_troop", "$current_town", 1), (assign, "$g_tournament_cur_tier", 0), (assign, "$g_tournament_player_team_won", -1), (assign, "$g_tournament_bet_placed", 0), (assign, "$g_tournament_bet_win_amount", 0), (assign, "$g_tournament_last_bet_tier", -1), (assign, "$g_tournament_next_num_teams", 0), (assign, "$g_tournament_next_team_size", 0), (jump_to_menu, "mnu_town_tournament"), ]), ("town_castle",[ (party_slot_eq,"$current_town",slot_party_type, spt_town), (eq,"$entry_to_town_forbidden",0), # (party_get_slot, ":castle_scene", "$current_town", slot_town_castle), # (scene_slot_ge, ":castle_scene", slot_scene_visited, 1), #check if scene has been visited before to allow entry from menu. Otherwise scene will only be accessible from the town center. ],"Go to the castle.", [ (try_begin), (this_or_next|eq, "$all_doors_locked", 1), (eq, "$sneaked_into_town", 1), (display_message,"str_door_locked",0xFFFFAAAA), (else_try), # (party_get_slot, ":castle_scene", "$current_town", slot_town_castle), # (scene_slot_eq, ":castle_scene", slot_scene_visited, 0), # (display_message,"str_door_locked",0xFFFFAAAA), # (else_try), (assign, "$town_entered", 1), (call_script, "script_enter_court", "$current_town"), (try_end), ], "Door to the castle."), ("town_center",[ (party_slot_eq,"$current_town",slot_party_type, spt_town), (this_or_next|eq,"$entry_to_town_forbidden",0), (eq, "$sneaked_into_town",1)] ,"Take a walk around the streets.", [ (assign, "$talk_context", 0), (try_begin), (call_script, "script_cf_enter_center_location_bandit_check"), (else_try), (party_get_slot, ":town_scene", "$current_town", slot_town_center), (modify_visitors_at_site, ":town_scene"), (reset_visitors), (assign, "$g_mt_mode", tcm_default), (store_faction_of_party, ":town_faction","$current_town"), (try_begin), (neq, ":town_faction", "fac_player_supporters_faction"), (faction_get_slot, ":troop_prison_guard", "$g_encountered_party_faction", slot_faction_prison_guard_troop), (faction_get_slot, ":troop_castle_guard", "$g_encountered_party_faction", slot_faction_castle_guard_troop), (set_visitor, 23, ":troop_castle_guard"), (set_visitor, 24, ":troop_prison_guard"), (try_end), (faction_get_slot, ":tier_2_troop", ":town_faction", slot_faction_tier_2_troop), (faction_get_slot, ":tier_3_troop", ":town_faction", slot_faction_tier_3_troop), (try_begin), (gt,":tier_2_troop", 0), (assign,reg(0),":tier_3_troop"), (assign,reg(1),":tier_3_troop"), (assign,reg(2),":tier_2_troop"), (assign,reg(3),":tier_2_troop"), (else_try), (assign,reg(0),"trp_vaegir_infantry"), (assign,reg(1),"trp_vaegir_infantry"), (assign,reg(2),"trp_vaegir_archer"), (assign,reg(3),"trp_vaegir_footman"), (try_end), (shuffle_range,0,4), (set_visitor,25,reg(0)), (set_visitor,26,reg(1)), (set_visitor,27,reg(2)), (set_visitor,28,reg(3)), (party_get_slot, ":spawned_troop", "$current_town", slot_town_armorer), (set_visitor, 9, ":spawned_troop"), (party_get_slot, ":spawned_troop", "$current_town", slot_town_weaponsmith), (set_visitor, 10, ":spawned_troop"), (party_get_slot, ":spawned_troop", "$current_town", slot_town_elder), (set_visitor, 11, ":spawned_troop"), (party_get_slot, ":spawned_troop", "$current_town", slot_town_horse_merchant), (set_visitor, 12, ":spawned_troop"), (call_script, "script_init_town_walkers"), (set_jump_mission,"mt_town_center"), (assign, ":override_state", af_override_horse), (try_begin), (eq, "$sneaked_into_town", 1), #setup disguise (assign, ":override_state", af_override_all), (try_end), (mission_tpl_entry_set_override_flags, "mt_town_center", 0, ":override_state"), (mission_tpl_entry_set_override_flags, "mt_town_center", 2, ":override_state"), (mission_tpl_entry_set_override_flags, "mt_town_center", 3, ":override_state"), (mission_tpl_entry_set_override_flags, "mt_town_center", 4, ":override_state"), (mission_tpl_entry_set_override_flags, "mt_town_center", 5, ":override_state"), (mission_tpl_entry_set_override_flags, "mt_town_center", 6, ":override_state"), (mission_tpl_entry_set_override_flags, "mt_town_center", 7, ":override_state"), (try_begin), (eq, "$town_entered", 0), (assign, "$town_entered", 1), (eq, "$town_nighttime", 0), (set_jump_entry, 1), (try_end), (jump_to_scene, ":town_scene"), (change_screen_mission), (try_end), ],"Door to the town center."), ("town_tavern",[ (party_slot_eq,"$current_town",slot_party_type, spt_town), (this_or_next|eq,"$entry_to_town_forbidden",0), (eq, "$sneaked_into_town",1), # (party_get_slot, ":scene", "$current_town", slot_town_tavern), # (scene_slot_eq, ":scene", slot_scene_visited, 1), #check if scene has been visited before to allow entry from menu. Otherwise scene will only be accessible from the town center. ] ,"Visit the tavern.", [ (try_begin), (eq,"$all_doors_locked",1), (display_message,"str_door_locked",0xFFFFAAAA), (else_try), (call_script, "script_cf_enter_center_location_bandit_check"), (else_try), (mission_tpl_entry_set_override_flags, "mt_town_default", 0, af_override_horse), (try_begin), (eq, "$sneaked_into_town",1), (mission_tpl_entry_set_override_flags, "mt_town_default", 0, af_override_all), (try_end), (assign, "$town_entered", 1), (set_jump_mission, "mt_town_default"), (party_get_slot, ":cur_scene", "$current_town", slot_town_tavern), (jump_to_scene, ":cur_scene"), (scene_set_slot, ":cur_scene", slot_scene_visited, 1), (assign, "$talk_context", tc_tavern_talk), (modify_visitors_at_site, ":cur_scene"), (reset_visitors), (assign, ":cur_entry", 17), (party_get_slot, ":mercenary_troop", "$current_town", slot_center_mercenary_troop_type), (party_get_slot, ":mercenary_amount", "$current_town", slot_center_mercenary_troop_amount), (try_begin), (gt, ":mercenary_amount", 0), (set_visitor, ":cur_entry", ":mercenary_troop"), (val_add, ":cur_entry", 1), (try_end), (try_for_range, ":companion_candidate", companions_begin, companions_end), (troop_slot_eq, ":companion_candidate", slot_troop_occupation, 0), (troop_slot_eq, ":companion_candidate", slot_troop_cur_center, "$current_town"), (set_visitor, ":cur_entry", ":companion_candidate"), (val_add, ":cur_entry", 1), (try_end), (try_begin), (party_get_slot, ":ransom_broker", "$current_town", slot_center_ransom_broker), (gt, ":ransom_broker", 0), (set_visitor, ":cur_entry", ":ransom_broker"), (val_add, ":cur_entry", 1), (try_end), (try_begin), (party_get_slot, ":tavern_traveler", "$current_town", slot_center_tavern_traveler), (gt, ":tavern_traveler", 0), (set_visitor, ":cur_entry", ":tavern_traveler"), (val_add, ":cur_entry", 1), (try_end), ## (try_begin), ## (party_get_slot, ":tavern_minstrel", "$current_town", slot_center_tavern_minstrel), ## (gt, ":tavern_minstrel", 0), ## (set_visitor, 21, ":tavern_minstrel"), ## (val_add, ":cur_entry", 1), ## (try_end), (try_begin), (party_get_slot, ":tavern_bookseller", "$current_town", slot_center_tavern_bookseller), (gt, ":tavern_bookseller", 0), (set_visitor, ":cur_entry", ":tavern_bookseller"), (val_add, ":cur_entry", 1), (try_end), (try_begin), (neg|check_quest_active, "qst_eliminate_bandits_infesting_village"), (neg|check_quest_active, "qst_deal_with_bandits_at_lords_village"), (assign, ":end_cond", villages_end), (try_for_range, ":cur_village", villages_begin, ":end_cond"), (party_slot_eq, ":cur_village", slot_village_bound_center, "$current_town"), (party_slot_ge, ":cur_village", slot_village_infested_by_bandits, 1), (neg|party_slot_eq, ":cur_village", slot_town_lord, "trp_player"), (set_visitor, ":cur_entry", "trp_farmer_from_bandit_village"), (val_add, ":cur_entry", 1), (assign, ":end_cond", 0), (try_end), (try_end), (change_screen_mission), (try_end), ],"Door to the tavern."), # ("town_smithy",[ # (eq,"$entry_to_town_forbidden",0), # (eq,"$town_nighttime",0), # ], # "Visit the smithy.", # [ # (set_jump_mission,"mt_town_default"), # (jump_to_scene,"$pout_scn_smithy"), # (change_screen_mission,0), # ]), ("town_merchant", [(party_slot_eq,"$current_town",slot_party_type, spt_town), (eq, 1, 0), (eq,"$town_nighttime",0), (this_or_next|eq,"$entry_to_town_forbidden",0), (eq, "$sneaked_into_town",1), # (party_get_slot, ":scene", "$current_town", slot_town_store), # (scene_slot_eq, ":scene", slot_scene_visited, 1), #check if scene has been visited before to allow entry from menu. Otherwise scene will only be accessible from the town center. ], "Speak with the merchant.", [ (try_begin), (this_or_next|eq,"$all_doors_locked",1), (eq,"$town_nighttime",1), (display_message,"str_door_locked",0xFFFFAAAA), (else_try), (mission_tpl_entry_set_override_flags, "mt_town_default", 0, af_override_horse), (try_begin), (eq, "$sneaked_into_town",1), (mission_tpl_entry_set_override_flags, "mt_town_default", 0, af_override_all), (try_end), (assign, "$town_entered", 1), (set_jump_mission, "mt_town_default"), (party_get_slot, ":cur_scene", "$current_town", slot_town_store), (jump_to_scene, ":cur_scene"), (scene_set_slot, ":cur_scene", slot_scene_visited, 1), (change_screen_mission), (try_end), ],"Door to the shop."), ("town_arena", [(party_slot_eq,"$current_town",slot_party_type, spt_town), (eq, "$sneaked_into_town", 0), # (party_get_slot, ":scene", "$current_town", slot_town_arena), # (scene_slot_eq, ":scene", slot_scene_visited, 1), #check if scene has been visited before to allow entry from menu. Otherwise scene will only be accessible from the town center. ], "Enter the arena.", [ (try_begin), (this_or_next|eq,"$all_doors_locked",1), (eq,"$town_nighttime",1), (display_message,"str_door_locked",0xFFFFAAAA), (else_try), (assign, "$g_mt_mode", abm_visit), (assign, "$town_entered", 1), (set_jump_mission, "mt_arena_melee_fight"), (party_get_slot, ":arena_scene", "$current_town", slot_town_arena), (modify_visitors_at_site, ":arena_scene"), (reset_visitors), (set_visitor, 43, "trp_veteran_fighter"), (set_visitor, 44, "trp_hired_blade"), (set_jump_entry, 50), (jump_to_scene, ":arena_scene"), (scene_set_slot, ":arena_scene", slot_scene_visited, 1), (change_screen_mission), (try_end), ],"Door to the arena."), ("town_dungeon", [(eq, 1, 0)], "Never: Enter the prison.", [ (try_begin), (eq,"$all_doors_locked",1), (display_message,"str_door_locked",0xFFFFAAAA), (else_try), (this_or_next|party_slot_eq, "$current_town", slot_town_lord, "trp_player"), (eq, "$g_encountered_party_faction", "$players_kingdom"), (assign, "$town_entered", 1), (call_script, "script_enter_dungeon", "$current_town", "mt_visit_town_castle"), (else_try), (display_message,"str_door_locked",0xFFFFAAAA), (try_end), ],"Door to the dungeon."), ("castle_inspect", [ (party_slot_eq,"$current_town",slot_party_type, spt_castle), # (this_or_next|ge, "$g_encountered_party_relation", 0), # (eq,"$castle_undefended",1), ], "Take a walk around the courtyard.", [ (assign, "$talk_context", tc_town_talk), (party_get_slot, ":cur_castle_exterior", "$current_town", slot_castle_exterior), (modify_visitors_at_site,":cur_castle_exterior"),(reset_visitors), (try_begin), (neq, "$g_encountered_party_faction", "fac_player_supporters_faction"), (faction_get_slot, ":troop_prison_guard", "$g_encountered_party_faction", slot_faction_prison_guard_troop), (set_visitor, 24, ":troop_prison_guard"), (try_end), (assign, ":guard_no", 40), (party_get_num_companion_stacks, ":num_stacks", "$g_encountered_party"), (try_for_range, ":troop_iterator", 0, ":num_stacks"), (lt, ":guard_no", 47), (party_stack_get_troop_id, ":cur_troop_id", "$g_encountered_party", ":troop_iterator"), (neg|troop_is_hero, ":cur_troop_id"), (party_stack_get_size, ":stack_size","$g_encountered_party",":troop_iterator"), (party_stack_get_num_wounded, ":num_wounded","$g_encountered_party",":troop_iterator"), (val_sub, ":stack_size", ":num_wounded"), (gt, ":stack_size", 0), (party_stack_get_troop_dna,":troop_dna","$g_encountered_party",":troop_iterator"), (set_visitor, ":guard_no", ":cur_troop_id", ":troop_dna"), (val_add, ":guard_no", 1), (try_end), (try_begin), (eq, "$town_entered", 0), (assign, "$town_entered", 1), (try_end), (set_jump_entry,1), (set_jump_mission,"mt_castle_visit"), (jump_to_scene,":cur_castle_exterior"), (change_screen_mission), ], "To the castle courtyard."), ("trade_with_merchants", [ (party_slot_eq,"$current_town",slot_party_type, spt_town) ], "Go to the marketplace.", [ (try_begin), (call_script, "script_cf_enter_center_location_bandit_check"), (else_try), (jump_to_menu,"mnu_town_trade"), (try_end), ]), ("walled_center_manage",[(neg|party_slot_eq, "$current_town", slot_village_state, svs_under_siege), (party_slot_eq, "$current_town", slot_town_lord, "trp_player"), (assign, reg0, 1), (try_begin), (party_slot_eq, "$current_town", slot_party_type, spt_castle), (assign, reg0, 0), (try_end),] ,"Manage this {reg0?town:castle}.", [ (assign, "$g_next_menu", "mnu_town"), (jump_to_menu, "mnu_center_manage"), ]), ("castle_station_troops", [ (party_slot_eq,"$current_town",slot_town_lord, "trp_player"), ], "Station a garrison here...", [ (change_screen_exchange_members,1), ]), ("castle_wait", [ # (party_slot_eq,"$current_town",slot_party_type, spt_castle), (this_or_next|ge, "$g_encountered_party_relation", 0), (eq,"$castle_undefended",1), (assign, ":can_rest", 1), (str_clear, s1), (try_begin), (neg|party_slot_eq, "$current_town", slot_town_lord, "trp_player"), (party_get_num_companions, ":num_men", "p_main_party"), (store_div, reg1, ":num_men", 4), (val_add, reg1, 1), (str_store_string, s1, "@ ({reg1} denars per night)"), (store_troop_gold, ":gold", "trp_player"), (lt, ":gold", reg1), (assign, ":can_rest", 0), (try_end), (eq, ":can_rest", 1), ## (eq, "$g_defending_against_siege", 0), ], "Wait here for some time{s1}.", [ (assign,"$auto_enter_town","$current_town"), (assign, "$g_town_visit_after_rest", 1), (assign, "$g_last_rest_center", "$current_town"), (assign, "$g_last_rest_payment_until", -1), (rest_for_hours_interactive, 24 * 7, 5, 0), #rest while not attackable (change_screen_return), ]), ## ("rest_until_morning", ## [ ## (this_or_next|ge, "$g_encountered_party_relation", 0), ## (eq,"$castle_undefended",1), ## (store_time_of_day,reg(1)),(neg|is_between,reg(1), 5, 18), ## (eq, "$g_defending_against_siege", 0), ## ], ## "Rest until morning.", ## [ ## (store_time_of_day,reg(1)), ## (assign, reg(2), 30), ## (val_sub,reg(2),reg(1)), ## (val_mod,reg(2),24), ## (assign,"$auto_enter_town","$current_town"), ## (assign, "$g_town_visit_after_rest", 1), ## (rest_for_hours_interactive, reg(2)), ## (change_screen_return), ## ]), ## ## ("rest_until_evening", ## [ ## (this_or_next|ge, "$g_encountered_party_relation", 0), ## (eq,"$castle_undefended",1), ## (store_time_of_day,reg(1)), (is_between,reg(1), 5, 18), ## (eq, "$g_defending_against_siege", 0), ## ], ## "Rest until evening.", ## [ ## (store_time_of_day,reg(1)), ## (assign, reg(2), 20), ## (val_sub,reg(2),reg(1)), ## (assign,"$auto_enter_town","$current_town"), ## (assign, "$g_town_visit_after_rest", 1), ## (rest_for_hours_interactive, reg(2)), ## (change_screen_return), ## ]), ("town_alley", [(party_slot_eq,"$current_town",slot_party_type, spt_town), (eq, "$cheat_mode", 1), ], "CHEAT: Go to the alley.", [ (party_get_slot, reg(11), "$current_town", slot_town_alley), (set_jump_mission,"mt_ai_training"), (jump_to_scene,reg(11)), (change_screen_mission), ]), ("collect_taxes_qst",[(check_quest_active, "qst_collect_taxes"), (quest_slot_eq, "qst_collect_taxes", slot_quest_target_center, "$current_town"), (neg|quest_slot_eq, "qst_collect_taxes", slot_quest_current_state, 4), (quest_get_slot, ":quest_giver_troop", "qst_collect_taxes", slot_quest_giver_troop), (str_store_troop_name, s1, ":quest_giver_troop"), (quest_get_slot, reg5, "qst_collect_taxes", slot_quest_current_state), ], "{reg5?Continue collecting taxes:Collect taxes} due to {s1}.", [(jump_to_menu, "mnu_collect_taxes"),]), ("town_leave",[],"Leave...",[ (assign, "$g_permitted_to_center",0), (change_screen_return,0), ],"Leave Area."), # ("siege_leave",[(eq, "$g_defending_against_siege", 1)],"Try to break out...",[(jump_to_menu,"mnu_siege_break_out")]),#TODO: Go to Menu here. ("castle_cheat_interior",[(eq, "$cheat_mode", 1)], "CHEAT! Interior.",[ (set_jump_mission,"mt_ai_training"), (party_get_slot, ":castle_scene", "$current_town", slot_town_castle), (jump_to_scene,":castle_scene"), (change_screen_mission)]), ("castle_cheat_town_exterior",[(eq, "$cheat_mode", 1)], "CHEAT! Exterior.",[ (try_begin), (party_slot_eq,"$current_town",slot_party_type, spt_castle), (party_get_slot, ":scene", "$current_town", slot_castle_exterior), (else_try), (party_get_slot, ":scene", "$current_town", slot_town_center), (try_end), (set_jump_mission,"mt_ai_training"), (jump_to_scene,":scene"), (change_screen_mission)]), ("castle_cheat_dungeon",[(eq, "$cheat_mode", 1)], "CHEAT! Prison.",[ (set_jump_mission,"mt_ai_training"), (party_get_slot, ":castle_scene", "$current_town", slot_town_prison), (jump_to_scene,":castle_scene"), (change_screen_mission)]), ("castle_cheat_town_walls",[(eq, "$cheat_mode", 1),(party_slot_eq,"$current_town",slot_party_type, spt_town),], "CHEAT! Town Walls.",[ (party_get_slot, ":scene", "$current_town", slot_town_walls), (set_jump_mission,"mt_ai_training"), (jump_to_scene,":scene"), (change_screen_mission)]), ("cheat_town_start_siege", [ (eq, "$cheat_mode", 1), (party_slot_eq, "$g_encountered_party", slot_center_is_besieged_by, -1), (lt, "$g_encountered_party_2", 1), (call_script, "script_party_count_fit_for_battle","p_main_party"), (gt, reg(0), 1), (try_begin), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_town), (assign, reg6, 1), (else_try), (assign, reg6, 0), (try_end), ], "CHEAT: Besiege the {reg6?town:castle}...", [ (assign,"$g_player_besiege_town","$g_encountered_party"), (jump_to_menu, "mnu_castle_besiege"), ]), ("center_reports",[(eq, "$cheat_mode", 1),], "CHEAT! Show reports.", [(jump_to_menu,"mnu_center_reports"), ]), ("sail_from_port",[(party_slot_eq,"$current_town",slot_party_type, spt_town), (eq, "$cheat_mode", 1), # (party_slot_eq,"$current_town",slot_town_near_shore, 1), ], "Sail from port.", [(assign, "$g_player_icon_state", pis_ship), (party_set_flags, "p_main_party", pf_is_ship, 1), (party_get_position, pos1, "p_main_party"), (map_get_water_position_around_position, pos2, pos1, 6), (party_set_position, "p_main_party", pos2), (assign, "$g_main_ship_party", -1), (change_screen_return), ]), ] ), ( "town_tournament_lost",0, "You have been eliminated from the tournament.", "none", [ ], [ ("continue", [], "Continue...", [(jump_to_menu, "mnu_town_tournament_won_by_another"), ]), ] ), ( "town_tournament_won",mnf_disable_all_keys, "You have won the tournament of {s3}! You are filled with pride as the crowd cheers your name.\ In addition to honour, fame and glory, you earn a prize of {reg9} denars. {s8}", "none", [ (str_store_party_name, s3, "$current_town"), (call_script, "script_change_troop_renown", "trp_player", 20), (call_script, "script_change_player_relation_with_center", "$current_town", 1), (assign, reg9, 200), (add_xp_to_troop, 250, "trp_player"), (troop_add_gold, "trp_player", reg9), (str_clear, s8), (store_add, ":total_win", "$g_tournament_bet_placed", "$g_tournament_bet_win_amount"), (try_begin), (gt, "$g_tournament_bet_win_amount", 0), (assign, reg8, ":total_win"), (str_store_string, s8, "@Moreover, you earn {reg8} denars from the clever bets you placed on yourself..."), (try_end), (troop_add_gold, "trp_player", ":total_win"), (assign, ":player_odds_sub", 0), (store_div, ":player_odds_sub", "$g_tournament_bet_win_amount", 5), (party_get_slot, ":player_odds", "$current_town", slot_town_player_odds), (val_sub, ":player_odds", ":player_odds_sub"), (val_max, ":player_odds", 250), (party_set_slot, "$current_town", slot_town_player_odds, ":player_odds"), (call_script, "script_play_victorious_sound"), ], [ ("continue", [], "Continue...", [(jump_to_menu, "mnu_town"), ]), ] ), ( "town_tournament_won_by_another",mnf_disable_all_keys, "As the only {reg3?fighter:man} to remain undefeated this day, {s1} wins the lists and the glory of this tournament.", "none", [ (call_script, "script_get_num_tournament_participants"), (store_sub, ":needed_to_remove_randomly", reg0, 1), (call_script, "script_remove_tournament_participants_randomly", ":needed_to_remove_randomly"), (call_script, "script_sort_tournament_participant_troops"), (troop_get_slot, ":winner_troop", "trp_tournament_participants", 0), (str_store_troop_name, s1, ":winner_troop"), (try_begin), (troop_is_hero, ":winner_troop"), (call_script, "script_change_troop_renown", ":winner_troop", 20), (try_end), (troop_get_type, reg3, ":winner_troop"), ], [ ("continue", [], "Continue...", [(jump_to_menu, "mnu_town"), ]), ] ), ( "town_tournament",mnf_disable_all_keys, "{s1}You are at tier {reg0} of the tournament, with {reg1} participants remaining. In the next round, there will be {reg2} teams with {reg3} {reg4?fighters:fighter} each.", "none", [ (party_set_slot, "$current_town", slot_town_has_tournament, 0), #No way to return back if this menu is left (call_script, "script_sort_tournament_participant_troops"),#Moving trp_player to the top of the list (call_script, "script_get_num_tournament_participants"), (assign, ":num_participants", reg0), (try_begin), (neg|troop_slot_eq, "trp_tournament_participants", 0, 0),#Player is defeated (assign, ":player_odds_add", 0), (store_div, ":player_odds_add", "$g_tournament_bet_placed", 5), (party_get_slot, ":player_odds", "$current_town", slot_town_player_odds), (val_add, ":player_odds", ":player_odds_add"), (val_min, ":player_odds", 4000), (party_set_slot, "$current_town", slot_town_player_odds, ":player_odds"), (jump_to_menu, "mnu_town_tournament_lost"), (else_try), (eq, ":num_participants", 1),#Tournament won (jump_to_menu, "mnu_town_tournament_won"), (else_try), (try_begin), (le, "$g_tournament_next_num_teams", 0), (call_script, "script_get_random_tournament_team_amount_and_size"), (assign, "$g_tournament_next_num_teams", reg0), (assign, "$g_tournament_next_team_size", reg1), (try_end), (assign, reg2, "$g_tournament_next_num_teams"), (assign, reg3, "$g_tournament_next_team_size"), (store_sub, reg4, reg3, 1), (str_clear, s1), (try_begin), (eq, "$g_tournament_player_team_won", 1), (str_store_string, s1, "@Victory is yours! You have won this melee, but now you must prepare yourself for the next round. "), (else_try), (eq, "$g_tournament_player_team_won", 0), (str_store_string, s1, "@You have been bested in this melee, but the master of ceremonies declares a recognition of your skill and bravery, allowing you to take part in the next round. "), (try_end), (assign, reg1, ":num_participants"), (store_add, reg0, "$g_tournament_cur_tier", 1), (try_end), ], [ ("tournament_view_participants", [], "View participants.", [(jump_to_menu, "mnu_tournament_participants"), ]), ("tournament_bet", [(neq, "$g_tournament_cur_tier", "$g_tournament_last_bet_tier")], "Place a bet on yourself.", [(jump_to_menu, "mnu_tournament_bet"), ]), ("tournament_join_next_fight", [], "Fight in the next round.", [ (party_get_slot, ":arena_scene", "$current_town", slot_town_arena), (modify_visitors_at_site, ":arena_scene"), (reset_visitors), #Assuming that there are enough participants for the teams (val_add, "$g_tournament_cur_tier", 1), (store_mul, "$g_tournament_num_participants_for_fight", "$g_tournament_next_num_teams", "$g_tournament_next_team_size"), (troop_set_slot, "trp_tournament_participants", 0, -1),#Removing trp_player from the list (troop_set_slot, "trp_temp_array_a", 0, "trp_player"), (try_for_range, ":slot_no", 1, "$g_tournament_num_participants_for_fight"), (call_script, "script_get_random_tournament_participant"), (troop_set_slot, "trp_temp_array_a", ":slot_no", reg0), (try_end), (call_script, "script_shuffle_troop_slots", "trp_temp_array_a", 0, "$g_tournament_num_participants_for_fight"), (try_for_range, ":slot_no", 0, 4),#shuffle teams (troop_set_slot, "trp_temp_array_b", ":slot_no", ":slot_no"), (try_end), (call_script, "script_shuffle_troop_slots", "trp_temp_array_b", 0, 4), (assign, ":cur_slot", 0), (try_for_range, ":cur_team_offset", 0, "$g_tournament_next_num_teams"), (troop_get_slot, ":cur_team", "trp_temp_array_b", ":cur_team_offset"), (try_for_range, ":slot_no", 0, 8),#shuffle entry_points (troop_set_slot, "trp_temp_array_c", ":slot_no", ":slot_no"), (try_end), (call_script, "script_shuffle_troop_slots", "trp_temp_array_c", 0, 8), (try_for_range, ":cur_index", 0, "$g_tournament_next_team_size"), (store_mul, ":cur_entry_point", ":cur_team", 8), (troop_get_slot, ":entry_offset", "trp_temp_array_c", ":cur_index"), (val_add, ":cur_entry_point", ":entry_offset"), (troop_get_slot, ":troop_no", "trp_temp_array_a", ":cur_slot"), (set_visitor, ":cur_entry_point", ":troop_no"), (val_add, ":cur_slot", 1), (try_end), (try_end), (assign, "$g_tournament_next_num_teams", 0), (assign, "$g_tournament_next_team_size", 0), (assign, "$g_mt_mode", abm_tournament), (party_get_slot, ":town_original_faction", "$current_town", slot_center_original_faction), (assign, ":town_index_within_faction", 0), (assign, ":end_cond", towns_end), (try_for_range, ":cur_town", towns_begin, ":end_cond"), (try_begin), (eq, ":cur_town", "$current_town"), (assign, ":end_cond", 0), #break (else_try), (party_slot_eq, ":cur_town", slot_center_original_faction, ":town_original_faction"), (val_add, ":town_index_within_faction", 1), (try_end), (try_end), (try_begin), (eq, ":town_original_faction", "fac_kingdom_1"), #Swadia (store_mod, ":mod", ":town_index_within_faction", 4), (try_begin), (eq, ":mod", 0), (call_script, "script_set_items_for_tournament", 40, 80, 50, 20, 0, 0, 0, 0, "itm_arena_armor_red", "itm_tourney_helm_red"), (else_try), (eq, ":mod", 1), (call_script, "script_set_items_for_tournament", 100, 100, 0, 0, 0, 0, 0, 0, "itm_arena_armor_red", "itm_tourney_helm_red"), (else_try), (eq, ":mod", 2), (call_script, "script_set_items_for_tournament", 100, 0, 100, 0, 0, 0, 0, 0, "itm_arena_armor_red", "itm_tourney_helm_red"), (else_try), (eq, ":mod", 3), (call_script, "script_set_items_for_tournament", 40, 80, 50, 20, 40, 0, 0, 0, "itm_arena_armor_red", "itm_tourney_helm_red"), (try_end), (else_try), (eq, ":town_original_faction", "fac_kingdom_2"), #Vaegirs (store_mod, ":mod", ":town_index_within_faction", 4), (try_begin), (eq, ":mod", 0), (call_script, "script_set_items_for_tournament", 40, 80, 50, 20, 0, 0, 0, 0, "itm_arena_armor_red", "itm_steppe_helmet_red"), (else_try), (eq, ":mod", 1), (call_script, "script_set_items_for_tournament", 100, 50, 0, 0, 0, 20, 30, 0, "itm_arena_armor_red", "itm_steppe_helmet_red"), (else_try), (eq, ":mod", 2), (call_script, "script_set_items_for_tournament", 100, 0, 50, 0, 0, 20, 30, 0, "itm_arena_armor_red", "itm_steppe_helmet_red"), (else_try), (eq, ":mod", 3), (call_script, "script_set_items_for_tournament", 40, 80, 50, 20, 30, 0, 60, 0, "itm_arena_armor_red", "itm_steppe_helmet_red"), (try_end), (else_try), (eq, ":town_original_faction", "fac_kingdom_3"), #Khergit (store_mod, ":mod", ":town_index_within_faction", 2), (try_begin), (eq, ":mod", 0), (call_script, "script_set_items_for_tournament", 100, 0, 0, 0, 0, 40, 60, 0, "itm_arena_tunic_red", "itm_steppe_helmet_red"), (else_try), (eq, ":mod", 1), (call_script, "script_set_items_for_tournament", 100, 50, 25, 0, 0, 30, 50, 0, "itm_arena_tunic_red", "itm_steppe_helmet_red"), (try_end), (else_try), (eq, ":town_original_faction", "fac_kingdom_4"), #Nords (store_mod, ":mod", ":town_index_within_faction", 3), (try_begin), (eq, ":mod", 0), (call_script, "script_set_items_for_tournament", 0, 0, 50, 80, 0, 0, 0, 0, "itm_arena_armor_red", -1), (else_try), (eq, ":mod", 1), (call_script, "script_set_items_for_tournament", 0, 0, 50, 80, 50, 0, 0, 0, "itm_arena_armor_red", -1), (else_try), (eq, ":mod", 2), (call_script, "script_set_items_for_tournament", 40, 0, 0, 100, 0, 0, 0, 0, "itm_arena_armor_red", -1), (try_end), (else_try), #Rhodoks (call_script, "script_set_items_for_tournament", 25, 100, 60, 0, 30, 0, 30, 50, "itm_arena_tunic_red", "itm_arena_helmet_red"), (try_end), (set_jump_mission, "mt_arena_melee_fight"), (jump_to_scene, ":arena_scene"), (change_screen_mission), ]), ("leave_tournament",[],"Withdraw from the tournament.", [ (jump_to_menu, "mnu_tournament_withdraw_verify"), ]), ] ), ( "tournament_withdraw_verify",0, "Are you sure you want to withdraw from the tournament?", "none", [], [ ("tournament_withdraw_yes", [], "Yes. This is a pointless affectation.", [(jump_to_menu, "mnu_town_tournament_won_by_another"), ]), ("tournament_withdraw_no", [], "No, not as long as there is a chance of victory!", [(jump_to_menu, "mnu_town_tournament"), ]), ] ), ( "tournament_bet",0, "The odds against you are {reg5} to {reg6}.{reg1? You have already bet {reg1} denars on yourself, and if you win, you will earn {reg2} denars.:} How much do you want to bet?", "none", [ (assign, reg1, "$g_tournament_bet_placed"), (store_add, reg2, "$g_tournament_bet_win_amount", "$g_tournament_bet_placed"), (call_script, "script_get_win_amount_for_tournament_bet"), (assign, ":player_odds", reg0), (assign, ":min_dif", 100000), (assign, ":min_dif_divisor", 1), (assign, ":min_dif_multiplier", 1), (try_for_range, ":cur_multiplier", 1, 50), (try_for_range, ":cur_divisor", 1, 50), (store_mul, ":result", 100, ":cur_multiplier"), (val_div, ":result", ":cur_divisor"), (store_sub, ":difference", ":player_odds", ":result"), (val_abs, ":difference"), (lt, ":difference", ":min_dif"), (assign, ":min_dif", ":difference"), (assign, ":min_dif_divisor", ":cur_divisor"), (assign, ":min_dif_multiplier", ":cur_multiplier"), (try_end), (try_end), (assign, reg5, ":min_dif_multiplier"), (assign, reg6, ":min_dif_divisor"), ], [ ("bet_100_denars", [(store_troop_gold, ":gold", "trp_player"), (ge, ":gold", 100) ], "100 denars.", [ (assign, "$temp", 100), (jump_to_menu, "mnu_tournament_bet_confirm"), ]), ("bet_50_denars", [(store_troop_gold, ":gold", "trp_player"), (ge, ":gold", 50) ], "50 denars.", [ (assign, "$temp", 50), (jump_to_menu, "mnu_tournament_bet_confirm"), ]), ("bet_20_denars", [(store_troop_gold, ":gold", "trp_player"), (ge, ":gold", 20) ], "20 denars.", [ (assign, "$temp", 20), (jump_to_menu, "mnu_tournament_bet_confirm"), ]), ("bet_10_denars", [(store_troop_gold, ":gold", "trp_player"), (ge, ":gold", 10) ], "10 denars.", [ (assign, "$temp", 10), (jump_to_menu, "mnu_tournament_bet_confirm"), ]), ("bet_5_denars", [(store_troop_gold, ":gold", "trp_player"), (ge, ":gold", 5) ], "5 denars.", [ (assign, "$temp", 5), (jump_to_menu, "mnu_tournament_bet_confirm"), ]), ("go_back_dot", [], "Go back.", [ (jump_to_menu, "mnu_town_tournament"), ]), ] ), ( "tournament_bet_confirm",0, "If you bet {reg1} denars, you will earn {reg2} denars if you win the tournament. Is that all right?", "none", [ (call_script, "script_get_win_amount_for_tournament_bet"), (assign, ":win_amount", reg0), (val_mul, ":win_amount", "$temp"), (val_div, ":win_amount", 100), (assign, reg1, "$temp"), (assign, reg2, ":win_amount"), ], [ ("tournament_bet_accept", [], "Go ahead.", [ (call_script, "script_tournament_place_bet", "$temp"), (jump_to_menu, "mnu_town_tournament"), ]), ("tournament_bet_cancel", [], "Forget it.", [ (jump_to_menu, "mnu_tournament_bet"), ]), ] ), ( "tournament_participants",0, "You ask one of the criers for the names of the tournament participants. They are:^{s11}", "none", [ (str_clear, s11), (call_script, "script_sort_tournament_participant_troops"), (call_script, "script_get_num_tournament_participants"), (assign, ":num_participants", reg0), (try_for_range, ":cur_slot", 0, ":num_participants"), (troop_get_slot, ":troop_no", "trp_tournament_participants", ":cur_slot"), (str_store_troop_name, s12, ":troop_no"), (str_store_string, s11, "@{s11}^{s12}"), (try_end), ], [ ("go_back_dot", [], "Go back.", [(jump_to_menu, "mnu_town_tournament"), ]), ] ), ( "collect_taxes",mnf_disable_all_keys, "As the party member with the highest trade skill ({reg2}), {reg3?you expect:{s1} expects} that collecting taxes from here will take {reg4} days...", "none", [(call_script, "script_get_max_skill_of_player_party", "skl_trade"), (assign, ":max_skill", reg0), (assign, reg2, reg0), (assign, ":max_skill_owner", reg1), (try_begin), (eq, ":max_skill_owner", "trp_player"), (assign, reg3, 1), (else_try), (assign, reg3, 0), (str_store_troop_name, s1, ":max_skill_owner"), (try_end), (assign, ":tax_quest_expected_revenue", 3000), (try_begin), (party_slot_eq, "$current_town", slot_party_type, spt_town), (assign, ":tax_quest_expected_revenue", 6000), (try_end), (try_begin), (quest_slot_eq, "qst_collect_taxes", slot_quest_current_state, 0), (store_add, ":max_skill_plus_thirty", ":max_skill", 30), (try_begin), (party_slot_eq, "$current_town", slot_party_type, spt_town), (store_div, "$qst_collect_taxes_total_hours", 24* 7 * 30, ":max_skill_plus_thirty"), (else_try), #Village (store_div, "$qst_collect_taxes_total_hours", 24 * 3 * 30, ":max_skill_plus_thirty"), (try_end), (call_script, "script_party_count_fit_for_battle", "p_main_party"), (val_add, reg0, 20), (val_mul, "$qst_collect_taxes_total_hours", 20), (val_div, "$qst_collect_taxes_total_hours", reg0), (quest_set_slot, "qst_collect_taxes", slot_quest_target_amount, "$qst_collect_taxes_total_hours"), (store_div, ":menu_begin_time", "$qst_collect_taxes_total_hours", 20),#between %5-%25 (store_div, ":menu_end_time", "$qst_collect_taxes_total_hours", 4), (assign, ":unrest_begin_time", ":menu_end_time"),#between %25-%75 (store_mul, ":unrest_end_time", "$qst_collect_taxes_total_hours", 3), (val_div, ":unrest_end_time", 4), (val_mul, ":tax_quest_expected_revenue", 2), (store_div, "$qst_collect_taxes_hourly_income", ":tax_quest_expected_revenue", "$qst_collect_taxes_total_hours"), (store_random_in_range, "$qst_collect_taxes_menu_counter", ":menu_begin_time", ":menu_end_time"), (store_random_in_range, "$qst_collect_taxes_unrest_counter", ":unrest_begin_time", ":unrest_end_time"), (assign, "$qst_collect_taxes_halve_taxes", 0), (try_end), (quest_get_slot, ":target_hours", "qst_collect_taxes", slot_quest_target_amount), (store_div, ":target_days", ":target_hours", 24), (val_mul, ":target_days", 24), (try_begin), (lt, ":target_days", ":target_hours"), (val_add, ":target_days", 24), (try_end), (val_div, ":target_days", 24), (assign, reg4, ":target_days"), ], [ ("start_collecting", [], "Start collecting.", [(assign, "$qst_collect_taxes_currently_collecting", 1), (try_begin), (quest_slot_eq, "qst_collect_taxes", slot_quest_current_state, 0), (quest_set_slot, "qst_collect_taxes", slot_quest_current_state, 1), (try_end), (rest_for_hours_interactive, 1000, 5, 0), #rest while not attackable (assign,"$auto_enter_town","$current_town"), (assign, "$g_town_visit_after_rest", 1), (change_screen_return), ]), ("collect_later", [], "Put it off until later.", [(try_begin), (party_slot_eq, "$current_town", slot_party_type, spt_town), (jump_to_menu, "mnu_town"), (else_try), (jump_to_menu, "mnu_village"), (try_end), ]), ] ), ( "collect_taxes_complete",mnf_disable_all_keys, "You've collected {reg3} denars in taxes from {s3}. {s19} will be expecting you to take the money to him.", "none", [(str_store_party_name, s3, "$current_town"), (quest_get_slot, ":quest_giver", "qst_collect_taxes", slot_quest_giver_troop), (str_store_troop_name, s19, ":quest_giver"), (quest_get_slot, reg3, "qst_collect_taxes", slot_quest_gold_reward), (try_begin), (eq, "$qst_collect_taxes_halve_taxes", 0), (call_script, "script_change_player_relation_with_center", "$current_town", -2), (try_end), (call_script, "script_succeed_quest", "qst_collect_taxes"), ], [ ("continue", [], "Continue...", [(change_screen_return), ]), ] ), ( "collect_taxes_rebels_killed",0, "Your quick action and strong arm have successfully put down the revolt.\ Surely, anyone with a mind to rebel against you will think better of it after this.", "none", [ ], [ ("continue", [], "Continue...", [(change_screen_map), ]), ] ), ( "collect_taxes_failed",mnf_disable_all_keys, "You could collect only {reg3} denars as tax from {s3} before the revolt broke out.\ {s1} won't be happy, but some silver will placate him better than nothing at all...", "none", [(str_store_party_name, s3, "$current_town"), (quest_get_slot, ":quest_giver", "qst_collect_taxes", slot_quest_giver_troop), (str_store_troop_name, s1, ":quest_giver"), (quest_get_slot, reg3, "qst_collect_taxes", slot_quest_gold_reward), (call_script, "script_fail_quest", "qst_collect_taxes"), (quest_set_slot, "qst_collect_taxes", slot_quest_current_state, 4), (rest_for_hours, 0, 0, 0), #stop resting ], [ ("continue", [], "Continue...", [(change_screen_map), ]), ] ), ( "collect_taxes_revolt_warning",0, "The people of {s3} are outraged at your demands and decry it as nothing more than extortion.\ They're getting very restless, and they may react badly if you keep pressing them.", "none", [(str_store_party_name, s3, "$current_town"), ], [ ("continue_collecting_taxes", [], "Ignore them and continue.", [(change_screen_return),]), ("halve_taxes", [(quest_get_slot, ":quest_giver_troop", "qst_collect_taxes", slot_quest_giver_troop), (str_store_troop_name, s1, ":quest_giver_troop"),], "Agree to reduce your collection by half. ({s1} may be upset)", [(assign, "$qst_collect_taxes_halve_taxes", 1), (change_screen_return), ]), ] ), ( "collect_taxes_revolt",0, "You are interrupted while collecting the taxes at {s3}. A large band of angry {reg9?peasants:townsmen} is marching nearer,\ shouting about the exorbitant taxes and waving torches and weapons. It looks like they aim to fight you!", "none", [(str_store_party_name, s3, "$current_town"), (assign, reg9, 0), (try_begin), (party_slot_eq, "$current_town", slot_party_type, spt_village), (assign, reg9, 1), (try_end), ], [ ("continue", [], "Continue...", [(set_jump_mission,"mt_back_alley_revolt"), (quest_get_slot, ":target_center", "qst_collect_taxes", slot_quest_target_center), (try_begin), (party_slot_eq, ":target_center", slot_party_type, spt_town), (party_get_slot, ":town_alley", ":target_center", slot_town_alley), (else_try), (party_get_slot, ":town_alley", ":target_center", slot_castle_exterior), (try_end), (modify_visitors_at_site,":town_alley"), (reset_visitors), (assign, ":num_rebels", 6), (store_character_level, ":level", "trp_player"), (val_div, ":level", 5), (val_add, ":num_rebels", ":level"), (set_visitors, 1, "trp_tax_rebel", ":num_rebels"), (jump_to_scene,":town_alley"), (change_screen_mission), ]), ] ), # They must learn field discipline and the steadiness to follow orders in combat before they can be thought to use arms.", ( "train_peasants_against_bandits",0, "As the party member with the highest training skill ({reg2}), {reg3?you expect:{s1} expects} that getting some peasants ready for practice will take {reg4} hours.", "none", [(call_script, "script_get_max_skill_of_player_party", "skl_trainer"), (assign, ":max_skill", reg0), (assign, reg2, reg0), (assign, ":max_skill_owner", reg1), (try_begin), (eq, ":max_skill_owner", "trp_player"), (assign, reg3, 1), (else_try), (assign, reg3, 0), (str_store_troop_name, s1, ":max_skill_owner"), (try_end), (store_sub, ":needed_hours", 20, ":max_skill"), (val_mul, ":needed_hours", 3), (val_div, ":needed_hours", 5), (store_sub, reg4, ":needed_hours", "$qst_train_peasants_against_bandits_num_hours_trained"), ], [ ("make_preparation", [], "Train them.", [ (assign, "$qst_train_peasants_against_bandits_currently_training", 1), (rest_for_hours_interactive, 1000, 5, 0), #rest while not attackable (assign, "$auto_enter_town", "$current_town"), (assign, "$g_town_visit_after_rest", 1), (change_screen_return), ]), ("train_later", [], "Put it off until later.", [ (jump_to_menu, "mnu_village"), ]), ] ), ( "train_peasants_against_bandits_ready",0, "You put the peasants through the basics of soldiering, discipline and obedience.\ You think {reg0} of them {reg1?have:has} fully grasped the training and {reg1?are:is} ready for some practice.", "none", [ (store_character_level, ":level", "trp_player"), (val_div, ":level", 10), (val_add, ":level", 1), (quest_get_slot, ":quest_target_amount", "qst_train_peasants_against_bandits", slot_quest_target_amount), (quest_get_slot, ":quest_current_state", "qst_train_peasants_against_bandits", slot_quest_current_state), (val_sub, ":quest_target_amount", ":quest_current_state"), (assign, ":max_random", ":level"), (val_min, ":max_random", ":quest_target_amount"), (val_add, ":max_random", 1), (store_random_in_range, ":random_number", 1, ":max_random"), (assign, "$g_train_peasants_against_bandits_num_peasants", ":random_number"), (assign, reg0, ":random_number"), (store_sub, reg1, ":random_number", 1), (str_store_troop_name_by_count, s0, "trp_trainee_peasant", ":random_number"), ], [ ("peasant_start_practice", [], "Start the practice fight.", [ (set_jump_mission,"mt_village_training"), (quest_get_slot, ":target_center", "qst_train_peasants_against_bandits", slot_quest_target_center), (party_get_slot, ":village_scene", ":target_center", slot_castle_exterior), (modify_visitors_at_site, ":village_scene"), (reset_visitors), (set_visitor, 0, "trp_player"), (set_visitors, 1, "trp_trainee_peasant", "$g_train_peasants_against_bandits_num_peasants"), (set_jump_entry, 11), (jump_to_scene, ":village_scene"), (jump_to_menu, "mnu_train_peasants_against_bandits_training_result"), (music_set_situation, 0), (change_screen_mission), ]), ] ), ( "train_peasants_against_bandits_training_result",mnf_disable_all_keys, "{s0}", "none", [ (assign, reg5, "$g_train_peasants_against_bandits_num_peasants"), (str_store_troop_name_by_count, s0, "trp_trainee_peasant", "$g_train_peasants_against_bandits_num_peasants"), (try_begin), (eq, "$g_train_peasants_against_bandits_training_succeeded", 0), (str_store_string, s0, "@You were beaten. The peasants are heartened by their success, but the lesson you wanted to teach them probably didn't get through..."), (else_try), (str_store_string, s0, "@After beating your last opponent, you explain to the peasants how to better defend themselves against such an attack. Hopefully they'll take the experience on board and will be prepared next time."), (quest_get_slot, ":quest_current_state", "qst_train_peasants_against_bandits", slot_quest_current_state), (val_add, ":quest_current_state", "$g_train_peasants_against_bandits_num_peasants"), (quest_set_slot, "qst_train_peasants_against_bandits", slot_quest_current_state, ":quest_current_state"), (try_end), ], [ ("continue", [], "Continue...", [ (try_begin), (quest_get_slot, ":quest_current_state", "qst_train_peasants_against_bandits", slot_quest_current_state), (quest_slot_eq, "qst_train_peasants_against_bandits", slot_quest_target_amount, ":quest_current_state"), (jump_to_menu, "mnu_train_peasants_against_bandits_attack"), (else_try), (change_screen_map), (try_end), ]), ] ), ( "train_peasants_against_bandits_attack",0, "As you get ready to continue the training, a sentry from the village runs up to you, shouting alarums.\ The bandits have been spotted on the horizon, riding hard for {s3}.\ The elder begs that you organize your newly-trained militia and face them.", "none", [ (str_store_party_name, s3, "$current_town"), ], [ ("peasants_against_bandits_attack_resist", [], "Prepare for a fight!", [ (store_random_in_range, ":random_no", 0, 3), (try_begin), (eq, ":random_no", 0), (assign, ":bandit_troop", "trp_bandit"), (else_try), (eq, ":random_no", 1), (assign, ":bandit_troop", "trp_mountain_bandit"), (else_try), (assign, ":bandit_troop", "trp_forest_bandit"), (try_end), (party_get_slot, ":scene_to_use", "$g_encountered_party", slot_castle_exterior), (modify_visitors_at_site, ":scene_to_use"), (reset_visitors), (store_character_level, ":level", "trp_player"), (val_div, ":level", 2), (store_add, ":min_bandits", ":level", 16), (store_add, ":max_bandits", ":min_bandits", 6), (store_random_in_range, ":random_no", ":min_bandits", ":max_bandits"), (set_visitors, 0, ":bandit_troop", ":random_no"), (assign, ":num_villagers", ":max_bandits"), (set_visitors, 2, "trp_trainee_peasant", ":num_villagers"), (set_party_battle_mode), (set_battle_advantage, 0), (assign, "$g_battle_result", 0), (set_jump_mission,"mt_village_attack_bandits"), (jump_to_scene, ":scene_to_use"), (assign, "$g_next_menu", "mnu_train_peasants_against_bandits_attack_result"), (jump_to_menu, "mnu_battle_debrief"), (assign, "$g_mt_mode", vba_after_training), (change_screen_mission), ]), ] ), ( "train_peasants_against_bandits_attack_result",mnf_scale_picture|mnf_disable_all_keys, "{s9}", "none", [ (try_begin), (eq, "$g_battle_result", 1), (str_store_string, s9, "@The bandits are broken!\ Those few who remain alive and conscious run off with their tails between their legs,\ terrified of the peasants and their new champion."), (call_script, "script_succeed_quest", "qst_train_peasants_against_bandits"), (jump_to_menu, "mnu_train_peasants_against_bandits_success"), (else_try), (call_script, "script_fail_quest", "qst_train_peasants_against_bandits"), (str_store_string, s9, "@Try as you might, you could not defeat the bandits.\ Infuriated, they raze the village to the ground to punish the peasants,\ and then leave the burning wasteland behind to find greener pastures to plunder."), (set_background_mesh, "mesh_pic_looted_village"), (try_end), ], [ ("continue", [], "Continue...", [(try_begin), (call_script, "script_village_set_state", "$current_town", svs_looted), (party_set_slot, "$current_town", slot_village_raid_progress, 0), (party_set_slot, "$current_town", slot_village_recover_progress, 0), (call_script, "script_change_player_relation_with_center", "$g_encountered_party", -3), (call_script, "script_end_quest", "qst_train_peasants_against_bandits"), (try_end), (change_screen_map), ]), ] ), ( "train_peasants_against_bandits_success",mnf_disable_all_keys, "The bandits are broken!\ Those few who remain run off with their tails between their legs,\ terrified of the peasants and their new champion.\ The villagers have little left in the way of wealth after their ordeal,\ but they offer you all they can find to show their gratitude.", "none", [(party_clear, "p_temp_party"), (call_script, "script_end_quest", "qst_train_peasants_against_bandits"), (call_script, "script_change_player_relation_with_center", "$g_encountered_party", 4), (party_get_slot, ":merchant_troop", "$current_town", slot_town_elder), (try_for_range, ":slot_no", num_equipment_kinds ,max_inventory_items + num_equipment_kinds), (store_random_in_range, ":rand", 0, 100), (lt, ":rand", 50), (troop_set_inventory_slot, ":merchant_troop", ":slot_no", -1), (try_end), (call_script, "script_add_log_entry", logent_helped_peasants, "trp_player", "$current_town", -1, -1), ], [ ("village_bandits_defeated_accept",[],"Take it as your just due.",[(jump_to_menu, "mnu_auto_return_to_map"), (party_get_slot, ":merchant_troop", "$current_town", slot_town_elder), (troop_sort_inventory, ":merchant_troop"), (change_screen_loot, ":merchant_troop"), ]), ("village_bandits_defeated_cont",[], "Refuse, stating that they need these items more than you do.",[(call_script, "script_change_player_relation_with_center", "$g_encountered_party", 3), (call_script, "script_change_player_honor", 1), (change_screen_map)]), ], ), ( "disembark",0, "Do you wish to disembark?", "none", [], [ ("disembark_yes", [], "Yes.", [(assign, "$g_player_icon_state", pis_normal), (party_set_flags, "p_main_party", pf_is_ship, 0), (party_get_position, pos1, "p_main_party"), (party_set_position, "p_main_party", pos0), (try_begin), (le, "$g_main_ship_party", 0), (set_spawn_radius, 0), (spawn_around_party, "p_main_party", "pt_none"), (assign, "$g_main_ship_party", reg0), (party_set_flags, "$g_main_ship_party", pf_is_static|pf_always_visible|pf_hide_defenders|pf_is_ship, 1), (str_store_troop_name, s1, "trp_player"), (party_set_name, "$g_main_ship_party", "@{s1}'s Ship"), (party_set_icon, "$g_main_ship_party", "icon_ship"), (party_set_slot, "$g_main_ship_party", slot_party_type, spt_ship), (try_end), (enable_party, "$g_main_ship_party"), (party_set_position, "$g_main_ship_party", pos0), (party_set_icon, "$g_main_ship_party", "icon_ship_on_land"), (assign, "$g_main_ship_party", -1), (change_screen_return), ]), ("disembark_no", [], "No.", [(change_screen_return), ]), ] ), ( "ship_reembark",0, "Do you wish to embark?", "none", [], [ ("reembark_yes", [], "Yes.", [(assign, "$g_player_icon_state", pis_ship), (party_set_flags, "p_main_party", pf_is_ship, 1), (party_get_position, pos1, "p_main_party"), (map_get_water_position_around_position, pos2, pos1, 6), (party_set_position, "p_main_party", pos2), (assign, "$g_main_ship_party", "$g_encountered_party"), (disable_party, "$g_encountered_party"), (change_screen_return), ]), ("reembark_no", [], "No.", [(change_screen_return), ]), ] ), ( "center_reports",0, "Town Name: {s1}^Rent Income: {reg1} denars^Tariff Income: {reg2} denars^Food Stock: for {reg3} days", "none", [(party_get_slot, ":town_food_store", "$g_encountered_party", slot_party_food_store), (call_script, "script_center_get_food_consumption", "$g_encountered_party"), (assign, ":food_consumption", reg0), (store_div, reg3, ":town_food_store", ":food_consumption"), (str_store_party_name, s1, "$g_encountered_party"), (party_get_slot, reg1, "$g_encountered_party", slot_center_accumulated_rents), (party_get_slot, reg2, "$g_encountered_party", slot_center_accumulated_tariffs), ], [ ("to_price_and_productions", [], "Show prices and productions.", [(jump_to_menu, "mnu_price_and_production"), ]), ("go_back_dot",[],"Go back.", [(try_begin), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_village), (jump_to_menu, "mnu_village"), (else_try), (jump_to_menu, "mnu_town"), (try_end), ]), ] ), ( "price_and_production",0, "Productions are:^{s1}^^Price factors are:^{s2}", "none", [(str_store_string, s1, "@ "), (str_store_string, s2, "@ "), (try_for_range, ":cur_good", trade_goods_begin, trade_goods_end), (store_sub, ":cur_good_slot", ":cur_good", trade_goods_begin), (val_add, ":cur_good_slot", slot_town_trade_good_productions_begin), (store_sub, ":cur_good_price_slot", ":cur_good", trade_goods_begin), (val_add, ":cur_good_price_slot", slot_town_trade_good_prices_begin), (party_get_slot, ":production", "$g_encountered_party", ":cur_good_slot"), (party_get_slot, ":price", "$g_encountered_party", ":cur_good_price_slot"), (str_store_item_name, s3, ":cur_good"), (assign, reg1, ":production"), (str_store_string, s1, "@^{s3} = {reg1}{s1}"), (assign, reg1, ":price"), (str_store_string, s2, "@^{s3} = {reg1}{s2}"), (try_end), ], [ ("go_back_dot",[],"Go back.", [(try_begin), (party_slot_eq, "$g_encountered_party", slot_party_type, spt_village), (jump_to_menu, "mnu_village"), (else_try), (jump_to_menu, "mnu_town"), (try_end), ]), ] ), ( "town_trade",0, "You head towards the marketplace.", "none", [], [ ("assess_prices",[], "Assess the local prices.", [ (jump_to_menu,"mnu_town_trade_assessment_begin"), ]), ("trade_with_arms_merchant",[(party_slot_ge, "$current_town", slot_town_weaponsmith, 1)], "Trade with the arms merchant.", [ (party_get_slot, ":merchant_troop", "$current_town", slot_town_weaponsmith), (change_screen_trade, ":merchant_troop"), ]), ("trade_with_armor_merchant",[(party_slot_ge, "$current_town", slot_town_armorer, 1)], "Trade with the armor merchant.", [ (party_get_slot, ":merchant_troop", "$current_town", slot_town_armorer), (change_screen_trade, ":merchant_troop"), ]), ("trade_with_horse_merchant",[(party_slot_ge, "$current_town", slot_town_horse_merchant, 1)], "Trade with the horse merchant.", [ (party_get_slot, ":merchant_troop", "$current_town", slot_town_horse_merchant), (change_screen_trade, ":merchant_troop"), ]), ("trade_with_goods_merchant",[(party_slot_ge, "$current_town", slot_town_merchant, 1)], "Trade with the goods merchant.", [ (party_get_slot, ":merchant_troop", "$current_town", slot_town_merchant), (change_screen_trade, ":merchant_troop"), ]), ("back_to_town_menu",[],"Head back.", [ (jump_to_menu,"mnu_town"), ]), ] ), ( "town_trade_assessment_begin",0, "You overhear several discussions about the price of trade goods across the local area.\ You listen closely, trying to work out the best deals around.", "none", [], [ ("continue",[],"Continue...", [ (assign,"$auto_enter_town","$current_town"), (assign, "$g_town_assess_trade_goods_after_rest", 1), (call_script, "script_get_max_skill_of_player_party", "skl_trade"), (val_div, reg0, 2), (store_sub, ":num_hours", 6, reg0), (assign, "$g_last_rest_center", "$current_town"), (assign, "$g_last_rest_payment_until", -1), (rest_for_hours, ":num_hours", 5, 0), #rest while not attackable (change_screen_return), ]), ] ), ( "town_trade_assessment",mnf_disable_all_keys, "As the party member with the highest trade skill ({reg2}), {reg3?you try to figure out:{s1} tries to figure out} the best goods to trade in. {s2}", "none", [(call_script, "script_get_max_skill_of_player_party", "skl_trade"), (assign, ":max_skill", reg0), (assign, ":max_skill_owner", reg1), (assign, ":num_best_results", 0), (assign, ":best_result_1_item", -1), (assign, ":best_result_1_town", -1), (assign, ":best_result_1_profit", 0), (assign, ":best_result_2_item", -1), (assign, ":best_result_2_town", -1), (assign, ":best_result_2_profit", 0), (assign, ":best_result_3_item", -1), (assign, ":best_result_3_town", -1), (assign, ":best_result_3_profit", 0), (store_sub, ":num_towns", towns_end, towns_begin), (store_sub, ":num_goods", trade_goods_end, trade_goods_begin), (store_mul, ":max_iteration", ":num_towns", ":num_goods"), (val_mul, ":max_iteration", ":max_skill"), (val_div, ":max_iteration", 20), (assign, ":org_encountered_party", "$g_encountered_party"), (try_for_range, ":unused", 0, ":max_iteration"), (store_random_in_range, ":random_trade_good", trade_goods_begin, trade_goods_end), (store_random_in_range, ":random_town", towns_begin, towns_end), (assign, ":already_best", 0), (try_begin), (eq, ":random_trade_good", ":best_result_1_item"), (eq, ":random_town", ":best_result_1_town"), (val_add, ":already_best", 1), (else_try), (eq, ":random_trade_good", ":best_result_2_item"), (eq, ":random_town", ":best_result_2_town"), (val_add, ":already_best", 1), (else_try), (eq, ":random_trade_good", ":best_result_3_item"), (eq, ":random_town", ":best_result_3_town"), (val_add, ":already_best", 1), (try_end), (eq, ":already_best", 0), (store_item_value, ":random_trade_good_price", ":random_trade_good"), (assign, "$g_encountered_party", ":org_encountered_party"), (call_script, "script_game_get_item_buy_price_factor", ":random_trade_good"), (store_mul, ":random_trade_good_buy_price", ":random_trade_good_price", reg0), (val_div, ":random_trade_good_buy_price", 100), (val_max, ":random_trade_good_buy_price", 1), (assign, "$g_encountered_party", ":random_town"), (call_script, "script_game_get_item_sell_price_factor", ":random_trade_good"), (store_mul, ":random_trade_good_sell_price", ":random_trade_good_price", reg0), (val_div, ":random_trade_good_sell_price", 100), (val_max, ":random_trade_good_sell_price", 1), (store_sub, ":difference", ":random_trade_good_sell_price", ":random_trade_good_buy_price"), (try_begin), (gt, ":difference", ":best_result_1_profit"), (val_add, ":num_best_results", 1), (val_min, ":num_best_results", 3), (assign, ":best_result_3_item", ":best_result_2_item"), (assign, ":best_result_3_town", ":best_result_2_town"), (assign, ":best_result_3_profit", ":best_result_2_profit"), (assign, ":best_result_2_item", ":best_result_1_item"), (assign, ":best_result_2_town", ":best_result_1_town"), (assign, ":best_result_2_profit", ":best_result_1_profit"), (assign, ":best_result_1_item", ":random_trade_good"), (assign, ":best_result_1_town", ":random_town"), (assign, ":best_result_1_profit", ":difference"), (else_try), (gt, ":difference", ":best_result_2_profit"), (val_add, ":num_best_results", 1), (val_min, ":num_best_results", 3), (assign, ":best_result_3_item", ":best_result_2_item"), (assign, ":best_result_3_town", ":best_result_2_town"), (assign, ":best_result_3_profit", ":best_result_2_profit"), (assign, ":best_result_2_item", ":random_trade_good"), (assign, ":best_result_2_town", ":random_town"), (assign, ":best_result_2_profit", ":difference"), (else_try), (gt, ":difference", ":best_result_3_profit"), (val_add, ":num_best_results", 1), (val_min, ":num_best_results", 3), (assign, ":best_result_3_item", ":random_trade_good"), (assign, ":best_result_3_town", ":random_town"), (assign, ":best_result_3_profit", ":difference"), (try_end), (try_end), (assign, "$g_encountered_party", ":org_encountered_party"), (str_clear, s3), (assign, reg2, ":max_skill"), (try_begin), (eq, ":max_skill_owner", "trp_player"), (assign, reg3, 1), (else_try), (assign, reg3, 0), (str_store_troop_name, s1, ":max_skill_owner"), (try_end), (try_begin), (le, ":num_best_results", 0), (str_store_string, s2, "@However, {reg3?You are:{s1} is} unable to find any trade goods that would bring a profit."), (else_try), (try_begin), (ge, ":best_result_3_item", 0), (assign, reg6, ":best_result_3_profit"), (str_store_item_name, s4, ":best_result_3_item"), (str_store_party_name, s5, ":best_result_3_town"), (str_store_string, s3, "@^Buying {s4} here and selling it at {s5} would bring a profit of {reg6} denars per item.{s3}"), (try_end), (try_begin), (ge, ":best_result_2_item", 0), (assign, reg6, ":best_result_2_profit"), (str_store_item_name, s4, ":best_result_2_item"), (str_store_party_name, s5, ":best_result_2_town"), (str_store_string, s3, "@^Buying {s4} here and selling it at {s5} would bring a profit of {reg6} denars per item.{s3}"), (try_end), (try_begin), (ge, ":best_result_1_item", 0), (assign, reg6, ":best_result_1_profit"), (str_store_item_name, s4, ":best_result_1_item"), (str_store_party_name, s5, ":best_result_1_town"), (str_store_string, s3, "@^Buying {s4} here and selling it at {s5} would bring a profit of {reg6} denars per item.{s3}"), (try_end), (str_store_string, s2, "@{reg3?You find:{s1} finds} out the following:^{s3}"), (try_end), ], [ ("continue",[],"Continue...", [ (jump_to_menu,"mnu_town_trade"), ]), ] ), ( "sneak_into_town_suceeded",0, "Disguised in the garments of a poor pilgrim, you fool the guards and make your way into the town.", "none", [], [ ("continue",[],"Continue...", [ (assign, "$sneaked_into_town",1), (jump_to_menu,"mnu_town"), ]), ] ), ( "sneak_into_town_caught",0, "As you try to sneak in, one of the guards recognizes you and raises the alarm!\ You must flee back through the gates before all the guards in the town come down on you!", "none", [ (assign,"$auto_menu","mnu_captivity_start_castle_surrender"), ], [ ("sneak_caught_fight",[],"Try to fight your way out!", [ (assign,"$all_doors_locked",1), (party_get_slot, ":sneak_scene", "$current_town",slot_town_center), # slot_town_gate), (modify_visitors_at_site,":sneak_scene"),(reset_visitors), (set_visitor,0,"trp_player"), (store_faction_of_party, ":town_faction","$current_town"), (faction_get_slot, ":tier_2_troop", ":town_faction", slot_faction_tier_2_troop), (faction_get_slot, ":tier_3_troop", ":town_faction", slot_faction_tier_3_troop), (try_begin), (gt, ":tier_2_troop", 0), (gt, ":tier_3_troop", 0), (assign,reg(0),":tier_3_troop"), (assign,reg(1),":tier_3_troop"), (assign,reg(2),":tier_2_troop"), (assign,reg(3),":tier_2_troop"), (else_try), (assign,reg(0),"trp_swadian_skirmisher"), (assign,reg(1),"trp_swadian_crossbowman"), (assign,reg(2),"trp_swadian_infantry"), (assign,reg(3),"trp_swadian_crossbowman"), (try_end), (assign,reg(4),-1), (shuffle_range,0,5), (set_visitor,1,reg(0)), (set_visitor,2,reg(1)), (set_visitor,3,reg(2)), (set_visitor,4,reg(3)), (set_jump_mission,"mt_sneak_caught_fight"), # (jump_to_menu,"mnu_captivity_start_castle_defeat"), (set_passage_menu,"mnu_town"), (jump_to_scene,":sneak_scene"), (change_screen_mission), ]), ("sneak_caught_surrender",[],"Surrender.", [ (jump_to_menu,"mnu_captivity_start_castle_surrender"), ]), ] ), ( "sneak_into_town_caught_dispersed_guards",0, "You drive off the guards and cover your trail before running off, easily losing your pursuers in the maze of streets.", "none", [], [ ("continue",[],"Continue...", [ (assign, "$sneaked_into_town",1), (assign, "$town_entered", 1), (jump_to_menu,"mnu_town"), ]), ] ), ( "sneak_into_town_caught_ran_away",0, "You make your way back through the gates and quickly retreat to the safety of the hills.", "none", [], [ ("continue",[],"Continue...", [ (assign,"$auto_menu",-1), (store_encountered_party,"$last_sneak_attempt_town"), (store_current_hours,"$last_sneak_attempt_time"), (change_screen_return), ]), ] ), ( "enemy_offer_ransom_for_prisoner",0, "{s2} offers you a sum of {reg12} denars in silver if you are willing to sell him {s1}.", "none", [(call_script, "script_calculate_ransom_amount_for_troop", "$g_ransom_offer_troop"), (assign, reg12, reg0), (str_store_troop_name, s1, "$g_ransom_offer_troop"), (store_troop_faction, ":faction_no", "$g_ransom_offer_troop"), (str_store_faction_name, s2, ":faction_no"), ], [ ("ransom_accept",[],"Accept the offer.", [(troop_add_gold, "trp_player", reg12), (party_remove_prisoners, "$g_ransom_offer_party", "$g_ransom_offer_troop", 1), #(troop_set_slot, "$g_ransom_offer_troop", slot_troop_is_prisoner, 0), (call_script, "script_remove_troop_from_prison", "$g_ransom_offer_troop"), (change_screen_return), ]), ("ransom_reject",[],"Reject the offer.", [ (call_script, "script_change_player_relation_with_troop", "$g_ransom_offer_troop", -4), (call_script, "script_change_player_honor", -1), (assign, "$g_ransom_offer_rejected", 1), (change_screen_return), ]), ] ), ( "training_ground",0, "You approach a training field where you can practice your martial skills. What kind of training do you want to do?", "none", [ (store_add, "$g_training_ground_melee_training_scene", "scn_training_ground_ranged_melee_1", "$g_encountered_party"), (val_sub, "$g_training_ground_melee_training_scene", training_grounds_begin), (try_begin), (ge, "$g_training_ground_training_count", 3), (assign, "$g_training_ground_training_count", 0), (rest_for_hours, 1, 5, 1), #rest while attackable (assign, "$auto_enter_town", "$g_encountered_party"), (change_screen_return), (try_end), ], [ ("camp_trainer", [], "Speak with the trainer.", [ (set_jump_mission, "mt_training_ground_trainer_talk"), (modify_visitors_at_site, "$g_training_ground_melee_training_scene"), (reset_visitors), (set_jump_entry, 5), (jump_to_scene, "$g_training_ground_melee_training_scene"), (change_screen_mission), (music_set_situation, 0), ]), ("camp_train_melee", [ (neg|troop_is_wounded, "trp_player"), (call_script, "script_party_count_fit_for_battle", "p_main_party"), (gt, reg0, 1), ], "Sparring practice.", [ (assign, "$g_mt_mode", ctm_melee), (jump_to_menu, "mnu_training_ground_selection_details_melee_1"), (music_set_situation, 0), ]), ("camp_train_archery",[], "Ranged weapon practice.", [ (jump_to_menu, "mnu_training_ground_selection_details_ranged_1"), (music_set_situation, 0), ]), ("camp_train_mounted",[], "Horseback practice.", [ (assign, "$g_mt_mode", ctm_mounted), (jump_to_menu, "mnu_training_ground_selection_details_mounted"), (music_set_situation, 0), ]), ("go_to_track",[(eq, "$cheat_mode", 1)],"Cheat: Go to track.", [ (set_jump_mission, "mt_ai_training"), (store_add, ":scene_no", "scn_training_ground_horse_track_1", "$g_encountered_party"), (val_sub, ":scene_no", training_grounds_begin), (jump_to_scene, ":scene_no"), (change_screen_mission), ] ), ("go_to_range",[(eq, "$cheat_mode", 1)],"Cheat: Go to range.", [ (set_jump_mission, "mt_ai_training"), (jump_to_scene, "$g_training_ground_melee_training_scene"), (change_screen_mission), ] ), ("leave",[],"Leave.", [(change_screen_return), ]), ] ), ("training_ground_selection_details_melee_1",0, "How many opponents will you go against?", "none", [ (call_script, "script_write_fit_party_members_to_stack_selection", "p_main_party", 1), (troop_get_slot, "$temp", "trp_stack_selection_amounts", 1), #number of men fit (assign, "$temp_2", 1), ], [ ("camp_train_melee_num_men_1",[(ge, "$temp", 1)], "One.", [ (assign, "$temp", 1), (jump_to_menu, "mnu_training_ground_selection_details_melee_2"), ]), ("camp_train_melee_num_men_2",[(ge, "$temp", 2)], "Two.", [ (assign, "$temp", 2), (jump_to_menu, "mnu_training_ground_selection_details_melee_2"), ]), ("camp_train_melee_num_men_3",[(ge, "$temp", 3)], "Three.", [ (assign, "$temp", 3), (jump_to_menu, "mnu_training_ground_selection_details_melee_2"), ]), ("camp_train_melee_num_men_4",[(ge, "$temp", 4)], "Four.", [ (assign, "$temp", 4), (jump_to_menu, "mnu_training_ground_selection_details_melee_2"), ]), ("go_back_dot",[],"Cancel.", [ (jump_to_menu, "mnu_training_ground"), ]), ] ), ("training_ground_selection_details_melee_2",0, "Choose your opponent #{reg1}:", "none", [ (assign, reg1, "$temp_2"), (troop_get_slot, "$temp_3", "trp_stack_selection_amounts", 0), #number of slots ], [ ("s0", [(call_script, "script_cf_training_ground_sub_routine_1_for_melee_details", 1),], "{s0}", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", 1),]), ("s0", [(call_script, "script_cf_training_ground_sub_routine_1_for_melee_details", 2),], "{s0}", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", 2),]), ("s0", [(call_script, "script_cf_training_ground_sub_routine_1_for_melee_details", 3),], "{s0}", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", 3),]), ("s0", [(call_script, "script_cf_training_ground_sub_routine_1_for_melee_details", 4),], "{s0}", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", 4),]), ("s0", [(call_script, "script_cf_training_ground_sub_routine_1_for_melee_details", 5),], "{s0}", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", 5),]), ("s0", [(call_script, "script_cf_training_ground_sub_routine_1_for_melee_details", 6),], "{s0}", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", 6),]), ("s0", [(call_script, "script_cf_training_ground_sub_routine_1_for_melee_details", 7),], "{s0}", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", 7),]), ("s0", [(call_script, "script_cf_training_ground_sub_routine_1_for_melee_details", 8),], "{s0}", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", 8),]), ("s0", [(call_script, "script_cf_training_ground_sub_routine_1_for_melee_details", 9),], "{s0}", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", 9),]), ("s0", [(call_script, "script_cf_training_ground_sub_routine_1_for_melee_details", 10),], "{s0}", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", 10),]), ("s0", [(call_script, "script_cf_training_ground_sub_routine_1_for_melee_details", 11),], "{s0}", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", 11),]), ("s0", [(call_script, "script_cf_training_ground_sub_routine_1_for_melee_details", 12),], "{s0}", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", 12),]), ("s0", [(call_script, "script_cf_training_ground_sub_routine_1_for_melee_details", 13),], "{s0}", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", 13),]), ("s0", [(call_script, "script_cf_training_ground_sub_routine_1_for_melee_details", 14),], "{s0}", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", 14),]), ("s0", [(call_script, "script_cf_training_ground_sub_routine_1_for_melee_details", 15),], "{s0}", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", 15),]), ("s0", [(call_script, "script_cf_training_ground_sub_routine_1_for_melee_details", 16),], "{s0}", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", 16),]), ("s0", [(call_script, "script_cf_training_ground_sub_routine_1_for_melee_details", 17),], "{s0}", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", 17),]), ("s0", [(call_script, "script_cf_training_ground_sub_routine_1_for_melee_details", 18),], "{s0}", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", 18),]), ("s0", [(call_script, "script_cf_training_ground_sub_routine_1_for_melee_details", 19),], "{s0}", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", 19),]), ("s0", [(call_script, "script_cf_training_ground_sub_routine_1_for_melee_details", 20),], "{s0}", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", 20),]), ("training_ground_selection_details_melee_random", [], "Choose randomly.", [(call_script, "script_training_ground_sub_routine_2_for_melee_details", -1),]), ("go_back_dot",[],"Go back.", [(jump_to_menu, "mnu_training_ground"), ] ), ] ), ("training_ground_selection_details_mounted",0, "What kind of weapon do you want to train with?", "none", [], [ ("camp_train_mounted_details_1",[], "One handed weapon.", [ (call_script, "script_start_training_at_training_ground", itp_type_one_handed_wpn, 0), ]), ("camp_train_mounted_details_2",[], "Polearm.", [ (call_script, "script_start_training_at_training_ground", itp_type_polearm, 0), ]), ("camp_train_mounted_details_3",[], "Bow.", [ (call_script, "script_start_training_at_training_ground", itp_type_bow, 0), ]), ("camp_train_mounted_details_4",[], "Thrown weapon.", [ (call_script, "script_start_training_at_training_ground", itp_type_thrown, 0), ]), ("go_back_dot",[],"Go back.", [(jump_to_menu, "mnu_training_ground"), ] ), ] ), ("training_ground_selection_details_ranged_1",0, "What kind of ranged weapon do you want to train with?", "none", [], [ ("camp_train_ranged_weapon_bow",[], "Bow and arrows.", [ (assign, "$g_mt_mode", ctm_ranged), (assign, "$temp", itp_type_bow), (jump_to_menu, "mnu_training_ground_selection_details_ranged_2"), ]), ("camp_train_ranged_weapon_crossbow",[], "Crossbow.", [ (assign, "$g_mt_mode", ctm_ranged), (assign, "$temp", itp_type_crossbow), (jump_to_menu, "mnu_training_ground_selection_details_ranged_2"), ]), ("camp_train_ranged_weapon_thrown",[], "Throwing Knives.", [ (assign, "$g_mt_mode", ctm_ranged), (assign, "$temp", itp_type_thrown), (jump_to_menu, "mnu_training_ground_selection_details_ranged_2"), ]), ("go_back_dot",[],"Go back.", [(jump_to_menu, "mnu_training_ground"), ] ), ] ), ("training_ground_selection_details_ranged_2",0, "What range do you want to practice at?", "none", [], [ ("camp_train_ranged_details_1",[], "10 yards.", [ (call_script, "script_start_training_at_training_ground", "$temp", 10), ]), ("camp_train_ranged_details_2",[], "20 yards.", [ (call_script, "script_start_training_at_training_ground", "$temp", 20), ]), ("camp_train_ranged_details_3",[], "30 yards.", [ (call_script, "script_start_training_at_training_ground", "$temp", 30), ]), ("camp_train_ranged_details_4",[], "40 yards.", [ (call_script, "script_start_training_at_training_ground", "$temp", 40), ]), ("camp_train_ranged_details_5",[(eq, "$g_mt_mode", ctm_ranged),], "50 yards.", [ (call_script, "script_start_training_at_training_ground", "$temp", 50), ]), ("camp_train_ranged_details_6",[(eq, "$g_mt_mode", ctm_ranged),], "60 yards.", [ (call_script, "script_start_training_at_training_ground", "$temp", 60), ]), ("camp_train_ranged_details_7",[(eq, "$g_mt_mode", ctm_ranged),], "70 yards.", [ (call_script, "script_start_training_at_training_ground", "$temp", 70), ]), ("go_back_dot",[],"Go back.", [(jump_to_menu, "mnu_training_ground"), ] ), ] ), ("training_ground_description",0, "{s0}", "none", [], [ ("continue", [], "Continue...", [ (set_jump_mission, "mt_training_ground_training"), (jump_to_scene, "$g_training_ground_training_scene"), (change_screen_mission), ] ), ] ), ("training_ground_training_result",mnf_disable_all_keys, "{s7}{s2}", "none", [ (store_skill_level, ":trainer_skill", "skl_trainer", "trp_player"), (store_add, ":trainer_skill_multiplier", 5, ":trainer_skill"), (call_script, "script_write_fit_party_members_to_stack_selection", "p_main_party", 1), (str_clear, s2), (troop_get_slot, ":num_fit", "trp_stack_selection_amounts", 1), (troop_get_slot, ":num_slots", "trp_stack_selection_amounts", 0), (try_begin), (gt, "$g_training_ground_training_success_ratio", 0), (store_mul, ":xp_ratio_to_add", "$g_training_ground_training_success_ratio", "$g_training_ground_training_success_ratio"), (try_begin), (eq, "$g_training_ground_training_success_ratio", 100), (val_mul, ":xp_ratio_to_add", 2), #2x when perfect (try_end), (try_begin), (eq, "$g_mt_mode", ctm_melee), (val_div, ":xp_ratio_to_add", 2), (try_end), (val_div, ":xp_ratio_to_add", 10), # value over 1000 (try_begin), (gt, ":num_fit", 8), (val_mul, ":xp_ratio_to_add", 3), (assign, ":divisor", ":num_fit"), (convert_to_fixed_point, ":divisor"), (store_sqrt, ":divisor", ":divisor"), (convert_to_fixed_point, ":xp_ratio_to_add"), (val_div, ":xp_ratio_to_add", ":divisor"), (try_end), ## (assign, reg0, ":xp_ratio_to_add"), ## (display_message, "@xp earn ratio: {reg0}/1000"), (store_mul, ":xp_ratio_to_add_with_trainer_skill", ":xp_ratio_to_add", ":trainer_skill_multiplier"), (val_div, ":xp_ratio_to_add_with_trainer_skill", 10), (party_get_num_companion_stacks, ":num_stacks", "p_main_party"), (store_add, ":end_cond", ":num_slots", 2), (try_for_range, ":i_slot", 2, ":end_cond"), (troop_get_slot, ":amount", "trp_stack_selection_amounts", ":i_slot"), (troop_get_slot, ":troop_id", "trp_stack_selection_ids", ":i_slot"), (assign, ":end_cond_2", ":num_stacks"), (try_for_range, ":stack_no", 0, ":end_cond_2"), (party_stack_get_troop_id, ":stack_troop", "p_main_party", ":stack_no"), (eq, ":stack_troop", ":troop_id"), (assign, ":end_cond_2", 0), #break (call_script, "script_cf_training_ground_sub_routine_for_training_result", ":troop_id", ":stack_no", ":amount", ":xp_ratio_to_add_with_trainer_skill"), (str_store_troop_name_by_count, s1, ":troop_id", ":amount"), (assign, reg1, ":amount"), (str_store_string, s2, "@{s2}^{reg1} {s1} earned {reg0} experience."), (try_end), (try_end), (try_begin), (eq, "$g_mt_mode", ctm_melee), (store_mul, ":special_xp_ratio_to_add", ":xp_ratio_to_add", 3), (val_div, ":special_xp_ratio_to_add", 2), (try_for_range, ":enemy_index", 0, "$g_training_ground_training_num_enemies"), (troop_get_slot, ":troop_id", "trp_temp_array_a", ":enemy_index"), (assign, ":end_cond_2", ":num_stacks"), (try_for_range, ":stack_no", 0, ":end_cond_2"), (party_stack_get_troop_id, ":stack_troop", "p_main_party", ":stack_no"), (eq, ":stack_troop", ":troop_id"), (assign, ":end_cond_2", 0), #break (call_script, "script_cf_training_ground_sub_routine_for_training_result", ":troop_id", ":stack_no", 1, ":special_xp_ratio_to_add"), (str_store_troop_name, s1, ":troop_id"), (str_store_string, s2, "@{s2}^{s1} earned an additional {reg0} experience."), (try_end), (try_end), (try_end), (try_begin), (call_script, "script_cf_training_ground_sub_routine_for_training_result", "trp_player", -1, 1, ":xp_ratio_to_add"), (str_store_string, s2, "@^You earned {reg0} experience.{s2}"), (try_end), (try_end), (try_begin), (eq, "$g_training_ground_training_success_ratio", 0), (str_store_string, s7, "@The training didn't go well at all."), (else_try), (lt, "$g_training_ground_training_success_ratio", 25), (str_store_string, s7, "@The training didn't go well at all."), (else_try), (lt, "$g_training_ground_training_success_ratio", 50), (str_store_string, s7, "@The training didn't go very well."), (else_try), (lt, "$g_training_ground_training_success_ratio", 75), (str_store_string, s7, "@The training went quite well."), (else_try), (lt, "$g_training_ground_training_success_ratio", 99), (str_store_string, s7, "@The training went very well."), (else_try), (str_store_string, s7, "@The training went perfectly."), (try_end), ], [ ("continue",[],"Continue...", [(jump_to_menu, "mnu_training_ground"), ] ), ] ), ("marshall_selection_candidate_ask",0, "{s15} will soon select a new marshall for {s23}. Some of the lords have suggested your name as a likely candidate.", "none", [ (try_begin), (eq, "$g_presentation_marshall_selection_ended", 1), (change_screen_return), (try_end), (faction_get_slot, ":king", "$players_kingdom", slot_faction_leader), (str_store_troop_name, s15, ":king"), (str_store_faction_name, s23, "$players_kingdom"), ], [ ("marshall_candidate_accept", [], "Let {s15} learn that you are willing to serve as marshall.", [ (start_presentation, "prsnt_marshall_selection"), ] ), ("marshall_candidate_reject", [], "Tell everyone that you are too busy these days.", [ (try_begin), (eq, "$g_presentation_marshall_selection_max_renown_2_troop", "trp_player"), (assign, "$g_presentation_marshall_selection_max_renown_2", "$g_presentation_marshall_selection_max_renown_3"), (assign, "$g_presentation_marshall_selection_max_renown_2_troop", "$g_presentation_marshall_selection_max_renown_3_troop"), (else_try), (assign, "$g_presentation_marshall_selection_max_renown_1", "$g_presentation_marshall_selection_max_renown_2"), (assign, "$g_presentation_marshall_selection_max_renown_1_troop", "$g_presentation_marshall_selection_max_renown_2_troop"), (assign, "$g_presentation_marshall_selection_max_renown_2", "$g_presentation_marshall_selection_max_renown_3"), (assign, "$g_presentation_marshall_selection_max_renown_2_troop", "$g_presentation_marshall_selection_max_renown_3_troop"), (try_end), (start_presentation, "prsnt_marshall_selection"), ] ), ] ), ## [ ## ("renew_oath",[],"Renew your oath to {s1} for another month.",[ ## (store_current_day, ":cur_day"), ## (store_add, "$g_oath_end_day", ":cur_day", 30), ## (change_screen_return)]), ## ("dont_renew_oath",[],"Become free of your bond.",[ ## (assign, "$players_kingdom",0), ## (assign, "$g_player_permitted_castles", 0), ## (change_screen_return)]), ## ] ## ), ##################################################################### ## Captivity.... ##################################################################### ##################################################################### ##################################################################### ##################################################################### ( "captivity_avoid_wilderness",0, "Suddenly all the world goes black around you.\ Many hours later you regain your conciousness and find yourself at the spot you fell.\ Your enemies must have taken you up for dead and left you there.\ However, it seems that none of your wound were lethal,\ and altough you feel awful, you find out that can still walk.\ You get up and try to look for any other survivors from your party.", "none", [ ], [] ), ( "captivity_start_wilderness",0, "Stub", "none", [ (assign, "$g_player_is_captive", 1), (try_begin), (eq,"$g_player_surrenders",1), (jump_to_menu, "mnu_captivity_start_wilderness_surrender"), (else_try), (jump_to_menu, "mnu_captivity_start_wilderness_defeat"), (try_end), ], [] ), ( "captivity_start_wilderness_surrender",0, "Stub", "none", [ (assign, "$g_player_is_captive", 1), (assign,"$auto_menu",-1), #We need this since we may come here by something other than auto_menu (assign, "$capturer_party", "$g_encountered_party"), (jump_to_menu, "mnu_captivity_wilderness_taken_prisoner"), ], [] ), ( "captivity_start_wilderness_defeat",0, "Your enemies take you prisoner.", "none", [ (assign, "$g_player_is_captive", 1), (assign,"$auto_menu",-1), (assign, "$capturer_party", "$g_encountered_party"), (jump_to_menu, "mnu_captivity_wilderness_taken_prisoner"), ], [] ), ( "captivity_start_castle_surrender",0, "Stub", "none", [ (assign, "$g_player_is_captive", 1), (assign,"$auto_menu",-1), (assign, "$capturer_party", "$g_encountered_party"), (jump_to_menu, "mnu_captivity_castle_taken_prisoner"), ], [] ), ( "captivity_start_castle_defeat",0, "Stub", "none", [ (assign, "$g_player_is_captive", 1), (assign,"$auto_menu",-1), (assign, "$capturer_party", "$g_encountered_party"), (jump_to_menu, "mnu_captivity_castle_taken_prisoner"), ], [] ), ( "captivity_start_under_siege_defeat",0, "Your enemies take you prisoner.", "none", [ (assign, "$g_player_is_captive", 1), (assign,"$auto_menu",-1), (assign, "$capturer_party", "$g_encountered_party"), (jump_to_menu, "mnu_captivity_castle_taken_prisoner"), ], [] ), ( "captivity_wilderness_taken_prisoner",mnf_scale_picture, "Your enemies take you prisoner.", "none", [ (set_background_mesh, "mesh_pic_prisoner_wilderness"), ], [ ("continue",[],"Continue...", [ (try_for_range, ":npc", companions_begin, companions_end), (main_party_has_troop, ":npc"), (store_random_in_range, ":rand", 0, 100), (lt, ":rand", 30), (remove_member_from_party, ":npc", "p_main_party"), (troop_set_slot, ":npc", slot_troop_occupation, 0), (troop_set_slot, ":npc", slot_troop_playerparty_history, pp_history_scattered), (assign, "$last_lost_companion", ":npc"), (store_faction_of_party, ":victorious_faction", "$g_encountered_party"), (troop_set_slot, ":npc", slot_troop_playerparty_history_string, ":victorious_faction"), (troop_set_health, ":npc", 100), (store_random_in_range, ":rand_town", towns_begin, towns_end), (troop_set_slot, ":npc", slot_troop_cur_center, ":rand_town"), (assign, ":nearest_town_dist", 1000), (try_for_range, ":town_no", towns_begin, towns_end), (store_faction_of_party, ":town_fac", ":town_no"), (store_relation, ":reln", ":town_fac", "fac_player_faction"), (ge, ":reln", 0), (store_distance_to_party_from_party, ":dist", ":town_no", "p_main_party"), (lt, ":dist", ":nearest_town_dist"), (assign, ":nearest_town_dist", ":dist"), (troop_set_slot, ":npc", slot_troop_cur_center, ":town_no"), (try_end), (try_end), (set_camera_follow_party, "$capturer_party"), (assign, "$g_player_is_captive", 1), (store_random_in_range, ":random_hours", 18, 30), (call_script, "script_event_player_captured_as_prisoner"), (call_script, "script_stay_captive_for_hours", ":random_hours"), (assign,"$auto_menu","mnu_captivity_wilderness_check"), (change_screen_return), ]), ] ), ( "captivity_wilderness_check",0, "stub", "none", [(jump_to_menu,"mnu_captivity_end_wilderness_escape")], [] ), ( "captivity_end_wilderness_escape",mnf_scale_picture, "After painful days of being dragged about as a prisoner, you find a chance and escape from your captors!", "none", [ (play_cue_track, "track_escape"), (troop_get_type, ":is_female", "trp_player"), (try_begin), (eq, ":is_female", 1), (set_background_mesh, "mesh_pic_escape_1_fem"), (else_try), (set_background_mesh, "mesh_pic_escape_1"), (try_end), ], [ ("continue",[],"Continue...", [ (assign, "$g_player_is_captive", 0), (try_begin), (party_is_active, "$capturer_party"), (party_relocate_near_party, "p_main_party", "$capturer_party", 2), (try_end), (call_script, "script_set_parties_around_player_ignore_player", 2, 4), (assign, "$g_player_icon_state", pis_normal), (set_camera_follow_party, "p_main_party"), (rest_for_hours, 0, 0, 0), #stop resting (change_screen_return), ]), ] ), ( "captivity_castle_taken_prisoner",0, "You are quickly surrounded by guards who take away your weapons. With curses and insults, they throw you into the dungeon where you must while away the miserable days of your captivity.", "none", [ (troop_get_type, ":is_female", "trp_player"), (try_begin), (eq, ":is_female", 1), (set_background_mesh, "mesh_pic_prisoner_fem"), (else_try), (set_background_mesh, "mesh_pic_prisoner_man"), (try_end), ], [ ("continue",[],"Continue...", [ (assign, "$g_player_is_captive", 1), (store_random_in_range, ":random_hours", 16, 22), (call_script, "script_event_player_captured_as_prisoner"), (call_script, "script_stay_captive_for_hours", ":random_hours"), (assign,"$auto_menu", "mnu_captivity_castle_check"), (change_screen_return) ]), ] ), ( "captivity_rescue_lord_taken_prisoner",0, "You remain in disguise for as long as possible before revealing yourself.\ The guards are outraged and beat you savagely before throwing you back into the cell for God knows how long...", "none", [ (troop_get_type, ":is_female", "trp_player"), (try_begin), (eq, ":is_female", 1), (set_background_mesh, "mesh_pic_prisoner_fem"), (else_try), (set_background_mesh, "mesh_pic_prisoner_man"), (try_end), ], [ ("continue",[],"Continue...", [ (assign, "$g_player_is_captive", 1), (store_random_in_range, ":random_hours", 16, 22), (call_script, "script_event_player_captured_as_prisoner"), (call_script, "script_stay_captive_for_hours", ":random_hours"), (assign,"$auto_menu", "mnu_captivity_castle_check"), (change_screen_return), ]), ] ), ( "captivity_castle_check",0, "stub", "none", [ (store_random_in_range, reg(7), 0, 10), (try_begin), (lt, reg(7), 4), (store_random_in_range, "$player_ransom_amount", 3, 6), (val_mul, "$player_ransom_amount", 100), (store_troop_gold, reg(3), "trp_player"), (gt, reg(3), "$player_ransom_amount"), (jump_to_menu,"mnu_captivity_end_propose_ransom"), (else_try), (lt, reg(7), 7), (jump_to_menu,"mnu_captivity_end_exchanged_with_prisoner"), (else_try), (jump_to_menu,"mnu_captivity_castle_remain"), (try_end), ], [] ), ( "captivity_end_exchanged_with_prisoner",0, "After days of imprisonment, you are finally set free when your captors exchange you with another prisoner.", "none", [ (play_cue_track, "track_escape"), ], [ ("continue",[],"Continue...", [ (assign, "$g_player_is_captive", 0), (try_begin), (party_is_active, "$capturer_party"), (party_relocate_near_party, "p_main_party", "$capturer_party", 2), (try_end), (call_script, "script_set_parties_around_player_ignore_player", 2, 12), (assign, "$g_player_icon_state", pis_normal), (set_camera_follow_party, "p_main_party"), (rest_for_hours, 0, 0, 0), #stop resting (change_screen_return), ]), ] ), ( "captivity_end_propose_ransom",0, "You spend long hours in the sunless dank of the dungeon, more than you can count.\ Suddenly one of your captors enters your cell with an offer;\ he proposes to free you in return for {reg5} denars of your hidden wealth. You decide to...", "none", [ (store_character_level, ":player_level", "trp_player"), (store_mul, "$player_ransom_amount", ":player_level", 50), (val_add, "$player_ransom_amount", 100), (assign, reg5, "$player_ransom_amount"), ], [ ("captivity_end_ransom_accept",[(store_troop_gold,":player_gold", "trp_player"), (ge, ":player_gold","$player_ransom_amount")],"Accept the offer.", [ (play_cue_track, "track_escape"), (assign, "$g_player_is_captive", 0), (troop_remove_gold, "trp_player", "$player_ransom_amount"), (try_begin), (party_is_active, "$capturer_party"), (party_relocate_near_party, "p_main_party", "$capturer_party", 1), (try_end), (call_script, "script_set_parties_around_player_ignore_player", 2, 6), (assign, "$g_player_icon_state", pis_normal), (set_camera_follow_party, "p_main_party"), (rest_for_hours, 0, 0, 0), #stop resting (change_screen_return), ]), ("captivity_end_ransom_deny",[],"Refuse him, wait for something better.", [ (assign, "$g_player_is_captive", 1), (store_random_in_range, reg(8), 16, 22), (call_script, "script_stay_captive_for_hours", reg8), (assign,"$auto_menu", "mnu_captivity_castle_check"), (change_screen_return), ]), ] ), ( "captivity_castle_remain",mnf_scale_picture|mnf_disable_all_keys, "More days pass in the darkness of your cell. You get through them as best you can,\ enduring the kicks and curses of the guards, watching your underfed body waste away more and more...", "none", [ (troop_get_type, ":is_female", "trp_player"), (try_begin), (eq, ":is_female", 1), (set_background_mesh, "mesh_pic_prisoner_fem"), (else_try), (set_background_mesh, "mesh_pic_prisoner_man"), (try_end), (store_random_in_range, ":random_hours", 16, 22), (call_script, "script_stay_captive_for_hours", ":random_hours"), (assign,"$auto_menu", "mnu_captivity_castle_check"), ], [ ("continue",[],"Continue...", [ (assign, "$g_player_is_captive", 1), (change_screen_return), ]), ] ), ( "kingdom_army_quest_report_to_army",mnf_scale_picture, "{s8} sends word that he wishes you to join his new military campaign.\ You need to bring at least {reg13} troops to the army,\ and are instructed to raise more men with all due haste if you do not have enough.", "none", [ (set_background_mesh, "mesh_pic_messenger"), (quest_get_slot, ":quest_target_troop", "qst_report_to_army", slot_quest_target_troop), (quest_get_slot, ":quest_target_amount", "qst_report_to_army", slot_quest_target_amount), (call_script, "script_get_information_about_troops_position", ":quest_target_troop", 0), (str_clear, s9), (try_begin), (eq, reg0, 1), #troop is found and text is correct (str_store_string, s9, s1), (try_end), (str_store_troop_name, s8, ":quest_target_troop"), (assign, reg13, ":quest_target_amount"), ], [ ("continue",[],"Continue...", [ (quest_get_slot, ":quest_target_troop", "qst_report_to_army", slot_quest_target_troop), (quest_get_slot, ":quest_target_amount", "qst_report_to_army", slot_quest_target_amount), (str_store_troop_name_link, s13, ":quest_target_troop"), (assign, reg13, ":quest_target_amount"), (setup_quest_text, "qst_report_to_army"), (str_store_string, s2, "@{s13} asked you to report to him with at least {reg13} troops."), (call_script, "script_start_quest", "qst_report_to_army", ":quest_target_troop"), (call_script, "script_report_quest_troop_positions", "qst_report_to_army", ":quest_target_troop", 3), (change_screen_return), ]), ] ), ( "kingdom_army_quest_messenger",mnf_scale_picture, "{s8} sends word that he wishes to speak with you about a task he needs performed.\ He requests you to come and see him as soon as possible.", "none", [ (set_background_mesh, "mesh_pic_messenger"), (faction_get_slot, ":faction_marshall", "$players_kingdom", slot_faction_marshall), (str_store_troop_name, s8, ":faction_marshall"), ], [ ("continue",[],"Continue...", [(change_screen_return), ]), ] ), ( "kingdom_army_quest_join_siege_order",mnf_scale_picture, "{s8} sends word that you are to join the siege of {s9} in preparation for a full assault.\ Your troops are to take {s9} at all costs.", "none", [ (set_background_mesh, "mesh_pic_messenger"), (faction_get_slot, ":faction_marshall", "$players_kingdom", slot_faction_marshall), (quest_get_slot, ":quest_target_center", "qst_join_siege_with_army", slot_quest_target_center), (str_store_troop_name, s8, ":faction_marshall"), (str_store_party_name, s9, ":quest_target_center"), ], [ ("continue",[],"Continue...", [ (call_script, "script_end_quest", "qst_follow_army"), (quest_get_slot, ":quest_target_center", "qst_join_siege_with_army", slot_quest_target_center), (faction_get_slot, ":faction_marshall", "$players_kingdom", slot_faction_marshall), (str_store_troop_name_link, s13, ":faction_marshall"), (str_store_party_name_link, s14, ":quest_target_center"), (setup_quest_text, "qst_join_siege_with_army"), (str_store_string, s2, "@{s13} ordered you to join the assault against {s14}."), (call_script, "script_start_quest", "qst_join_siege_with_army", ":faction_marshall"), (change_screen_return), ]), ] ), ( "kingdom_army_follow_failed",mnf_scale_picture, "You have disobeyed orders and failed to follow {s8}. In anger he has disbanded you from the army,\ and sends a stern warning that your actions will not be forgotten.", "none", [ (set_background_mesh, "mesh_pic_messenger"), (faction_get_slot, ":faction_marshall", "$players_kingdom", slot_faction_marshall), (str_store_troop_name, s8, ":faction_marshall"), (call_script, "script_abort_quest", "qst_follow_army", 1), (call_script, "script_change_player_relation_with_troop", ":faction_marshall", -3), ], [ ("continue",[],"Continue...", [(change_screen_return), ]), ] ), ( "invite_player_to_faction_without_center",mnf_scale_picture, "You receive an offer of vassalage!^^\ {s8} of {s9} has sent a royal herald to bring you an invititation in his own hand.\ You would be granted the honour of becoming a vassal {lord/lady} of {s9},\ and in return {s8} asks you to swear an oath of homage to him and fight in his military campaigns,\ although he offers you no lands or titles.\ He will surely be offended if you do not take the offer...", "none", [ (set_background_mesh, "mesh_pic_messenger"), (faction_get_slot, "$g_invite_faction_lord", "$g_invite_faction", slot_faction_leader), (str_store_troop_name, s8, "$g_invite_faction_lord"), (str_store_faction_name, s9, "$g_invite_faction"), ], [ ("faction_accept",[],"Accept!", [(str_store_troop_name,s1,"$g_invite_faction_lord"), (setup_quest_text,"qst_join_faction"), (str_store_troop_name_link, s3, "$g_invite_faction_lord"), (str_store_faction_name_link, s4, "$g_invite_faction"), (quest_set_slot, "qst_join_faction", slot_quest_giver_troop, "$g_invite_faction_lord"), (quest_set_slot, "qst_join_faction", slot_quest_expiration_days, 30), (str_store_string, s2, "@Find and speak with {s3} of {s4} to give him your oath of homage."), (call_script, "script_start_quest", "qst_join_faction", "$g_invite_faction_lord"), (call_script, "script_report_quest_troop_positions", "qst_join_faction", "$g_invite_faction_lord", 3), (jump_to_menu, "mnu_invite_player_to_faction_accepted"), ]), ("faction_reject",[],"Decline the invitation.", [(call_script, "script_change_player_relation_with_troop", "$g_invite_faction_lord", -3), (call_script, "script_change_player_relation_with_faction", "$g_invite_faction", -10), (assign, "$g_invite_faction", 0), (assign, "$g_invite_faction_lord", 0), (assign, "$g_invite_offered_center", 0), (change_screen_return), ]), ] ), ( "invite_player_to_faction",mnf_scale_picture, "You receive an offer of vassalage!^^\ {s8} of {s9} has sent a royal herald to bring you an invititation in his own hand.\ You would be granted the honour of becoming a vassal {lord/lady} of {s9},\ and in return {s8} asks you to swear an oath of homage to him and fight in his military campaigns,\ offering you the fief of {s2} for your loyal service.\ He will surely be offended if you do not take the offer...", "none", [ (set_background_mesh, "mesh_pic_messenger"), (faction_get_slot, "$g_invite_faction_lord", "$g_invite_faction", slot_faction_leader), (str_store_troop_name, s8, "$g_invite_faction_lord"), (str_store_faction_name, s9, "$g_invite_faction"), (str_store_party_name, s2, "$g_invite_offered_center"), ], [ ("faction_accept",[],"Accept!", [(str_store_troop_name,s1,"$g_invite_faction_lord"), (setup_quest_text,"qst_join_faction"), (str_store_troop_name_link, s3, "$g_invite_faction_lord"), (str_store_faction_name_link, s4, "$g_invite_faction"), (quest_set_slot, "qst_join_faction", slot_quest_giver_troop, "$g_invite_faction_lord"), (quest_set_slot, "qst_join_faction", slot_quest_expiration_days, 30), (str_store_string, s2, "@Find and speak with {s3} of {s4} to give him your oath of homage."), (call_script, "script_start_quest", "qst_join_faction", "$g_invite_faction_lord"), (call_script, "script_report_quest_troop_positions", "qst_join_faction", "$g_invite_faction_lord", 3), (jump_to_menu, "mnu_invite_player_to_faction_accepted"), ]), ("faction_reject",[],"Decline the invitation.", [(call_script, "script_change_player_relation_with_troop", "$g_invite_faction_lord", -3), (assign, "$g_invite_faction", 0), (assign, "$g_invite_faction_lord", 0), (assign, "$g_invite_offered_center", 0), (change_screen_return), ]), ] ), ( "invite_player_to_faction_accepted",0, "In order to become a vassal, you must swear an oath of homage to {s3}.\ You shall have to find him and give him your oath in person. {s5}", "none", [ (call_script, "script_get_information_about_troops_position", "$g_invite_faction_lord", 0), (str_store_troop_name, s3, "$g_invite_faction_lord"), (str_store_string, s5, "@{s1}"), ], [ ("continue",[],"Continue...", [(change_screen_return), ]), ] ), ( "question_peace_offer",0, "You Receive a Peace Offer^^{s1} offers you a peace agreement. What is your answer?", "none", [ (str_store_faction_name, s1, "$g_notification_menu_var1"), (set_fixed_point_multiplier, 100), (position_set_x, pos0, 65), (position_set_y, pos0, 30), (position_set_z, pos0, 170), (set_game_menu_tableau_mesh, "tableau_faction_note_mesh_banner", "$g_notification_menu_var1", pos0), ], [ ("peace_offer_accept",[],"Accept", [ (call_script, "script_diplomacy_start_peace_between_kingdoms", "fac_player_supporters_faction", "$g_notification_menu_var1", 1), (change_screen_return), ]), ("peace_offer_reject",[],"Reject", [ (call_script, "script_change_player_relation_with_faction", "$g_notification_menu_var1", -5), (change_screen_return), ]), ] ), ( "notification_player_faction_active",0, "You now posess land in your name without being tied to any kingdom, as a masterless warlord who knows no higher authority.\ Enjoy this freedom, but know that the kings of the land will not look to you kindly and will make every attempt to dispose of you.\ You may find life very difficult without the protection of a kingdom.", "none", [ (set_fixed_point_multiplier, 100), (position_set_x, pos0, 65), (position_set_y, pos0, 30), (position_set_z, pos0, 170), (set_game_menu_tableau_mesh, "tableau_faction_note_mesh_banner", "fac_player_supporters_faction", pos0), ], [ ("continue",[],"Continue...", [(change_screen_return), ]), ] ), ( "notification_player_faction_deactive",0, "You no longer hold any land.", "none", [ (set_fixed_point_multiplier, 100), (position_set_x, pos0, 65), (position_set_y, pos0, 30), (position_set_z, pos0, 170), (set_game_menu_tableau_mesh, "tableau_faction_note_mesh_banner", "fac_player_supporters_faction", pos0), ], [ ("continue",[],"Continue...", [(change_screen_return), ]), ] ), ( "notification_center_under_siege",0, "{s1} has been besieged by {s2} of {s3}!", "none", [ (str_store_party_name, s1, "$g_notification_menu_var1"), (str_store_troop_name, s2, "$g_notification_menu_var2"), (store_troop_faction, ":troop_faction", "$g_notification_menu_var2"), (str_store_faction_name, s3, ":troop_faction"), (set_fixed_point_multiplier, 100), (position_set_x, pos0, 62), (position_set_y, pos0, 30), (position_set_z, pos0, 170), (set_game_menu_tableau_mesh, "tableau_center_note_mesh", "$g_notification_menu_var1", pos0), ], [ ("continue",[],"Continue...", [(change_screen_return), ]), ] ), ( "notification_village_raided",0, "Enemies have Laid Waste to a Fief^^{s1} has been raided by {s2} of {s3}!", "none", [ (str_store_party_name, s1, "$g_notification_menu_var1"), (str_store_troop_name, s2, "$g_notification_menu_var2"), (store_troop_faction, ":troop_faction", "$g_notification_menu_var2"), (str_store_faction_name, s3, ":troop_faction"), (set_fixed_point_multiplier, 100), (position_set_x, pos0, 62), (position_set_y, pos0, 30), (position_set_z, pos0, 170), (set_game_menu_tableau_mesh, "tableau_center_note_mesh", "$g_notification_menu_var1", pos0), ], [ ("continue",[],"Continue...", [(change_screen_return), ]), ] ), ( "notification_village_raid_started",0, "Your Village is under Attack!^^{s2} of {s3} is laying waste to {s1}.", "none", [ (str_store_party_name, s1, "$g_notification_menu_var1"), (str_store_troop_name, s2, "$g_notification_menu_var2"), (store_troop_faction, ":troop_faction", "$g_notification_menu_var2"), (str_store_faction_name, s3, ":troop_faction"), (set_fixed_point_multiplier, 100), (position_set_x, pos0, 62), (position_set_y, pos0, 30), (position_set_z, pos0, 170), (set_game_menu_tableau_mesh, "tableau_center_note_mesh", "$g_notification_menu_var1", pos0), ], [ ("continue",[],"Continue...", [(change_screen_return), ]), ] ), ( "notification_one_faction_left",0, "Calradia Conquered by One Kingdom^^{s1} has defeated all rivals and stands as the sole kingdom.", "none", [ (str_store_faction_name, s1, "$g_notification_menu_var1"), (set_fixed_point_multiplier, 100), (position_set_x, pos0, 65), (position_set_y, pos0, 30), (position_set_z, pos0, 170), (try_begin), (is_between, "$g_notification_menu_var1", "fac_kingdom_1", kingdoms_end), #Excluding player kingdom (set_game_menu_tableau_mesh, "tableau_faction_note_mesh_for_menu", "$g_notification_menu_var1", pos0), (else_try), (set_game_menu_tableau_mesh, "tableau_faction_note_mesh_banner", "$g_notification_menu_var1", pos0), (try_end), ], [ ("continue",[],"Continue...", [(change_screen_return), ]), ] ), ( "notification_oath_renounced_faction_defeated",0, "Your Old Faction was Defeated^^You won the battle against {s1}! This ends your struggle which started after you renounced your oath to them.", "none", [ (str_store_faction_name, s1, "$g_notification_menu_var1"), (set_fixed_point_multiplier, 100), (position_set_x, pos0, 65), (position_set_y, pos0, 30), (position_set_z, pos0, 170), (try_begin), (is_between, "$g_notification_menu_var1", "fac_kingdom_1", kingdoms_end), #Excluding player kingdom (set_game_menu_tableau_mesh, "tableau_faction_note_mesh_for_menu", "$g_notification_menu_var1", pos0), (else_try), (set_game_menu_tableau_mesh, "tableau_faction_note_mesh_banner", "$g_notification_menu_var1", pos0), (try_end), ], [ ("continue",[],"Continue...", [(change_screen_return), ]), ] ), ( "notification_center_lost",0, "An Estate was Lost^^You have lost {s1} to {s2}.", "none", [ (str_store_party_name, s1, "$g_notification_menu_var1"), (str_store_faction_name, s2, "$g_notification_menu_var2"), (set_fixed_point_multiplier, 100), (position_set_x, pos0, 62), (position_set_y, pos0, 30), (position_set_z, pos0, 170), (set_game_menu_tableau_mesh, "tableau_center_note_mesh", "$g_notification_menu_var1", pos0), ], [ ("continue",[],"Continue...", [(change_screen_return), ]), ] ), ( "notification_troop_left_players_faction",0, "Betrayal!^^{s1} has left {s2} and joined {s3}.", "none", [ (str_store_troop_name, s1, "$g_notification_menu_var1"), (str_store_faction_name, s2, "$players_kingdom"), (str_store_faction_name, s3, "$g_notification_menu_var2"), (set_fixed_point_multiplier, 100), (position_set_x, pos0, 55), (position_set_y, pos0, 20), (position_set_z, pos0, 100), (set_game_menu_tableau_mesh, "tableau_troop_note_mesh", "$g_notification_menu_var1", pos0), ], [ ("continue",[],"Continue...", [(change_screen_return), ]), ] ), ( "notification_troop_joined_players_faction",0, "Good news!^^ {s1} has left {s2} and joined {s3}.", "none", [ (str_store_troop_name, s1, "$g_notification_menu_var1"), (str_store_faction_name, s2, "$g_notification_menu_var2"), (str_store_faction_name, s3, "$players_kingdom"), (set_fixed_point_multiplier, 100), (position_set_x, pos0, 55), (position_set_y, pos0, 20), (position_set_z, pos0, 100), (set_game_menu_tableau_mesh, "tableau_troop_note_mesh", "$g_notification_menu_var1", pos0), ], [ ("continue",[],"Continue...", [(change_screen_return), ]), ] ), ( "notification_war_declared",0, "Declaration of War^^{s1} has declared war against {s2}!", "none", [ (try_begin), (eq, "$g_notification_menu_var1", "fac_player_supporters_faction"), (str_store_faction_name, s1, "$g_notification_menu_var2"), (str_store_string, s2, "@you"), (else_try), (eq, "$g_notification_menu_var2", "fac_player_supporters_faction"), (str_store_faction_name, s1, "$g_notification_menu_var1"), (str_store_string, s2, "@you"), (else_try), (str_store_faction_name, s1, "$g_notification_menu_var1"), (str_store_faction_name, s2, "$g_notification_menu_var2"), (try_end), (set_fixed_point_multiplier, 100), (position_set_x, pos0, 65), (position_set_y, pos0, 30), (position_set_z, pos0, 170), (store_sub, ":faction_1", "$g_notification_menu_var1", kingdoms_begin), (store_sub, ":faction_2", "$g_notification_menu_var2", kingdoms_begin), (val_mul, ":faction_1", 128), (val_add, ":faction_1", ":faction_2"), (set_game_menu_tableau_mesh, "tableau_2_factions_mesh", ":faction_1", pos0), ], [ ("continue",[],"Continue...", [(change_screen_return), ]), ] ), ( "notification_peace_declared",0, "Peace Agreement^^{s1} and {s2} have made peace!", "none", [ (str_store_faction_name, s1, "$g_notification_menu_var1"), (str_store_faction_name, s2, "$g_notification_menu_var2"), (set_fixed_point_multiplier, 100), (position_set_x, pos0, 65), (position_set_y, pos0, 30), (position_set_z, pos0, 170), (store_sub, ":faction_1", "$g_notification_menu_var1", kingdoms_begin), (store_sub, ":faction_2", "$g_notification_menu_var2", kingdoms_begin), (val_mul, ":faction_1", 128), (val_add, ":faction_1", ":faction_2"), (set_game_menu_tableau_mesh, "tableau_2_factions_mesh", ":faction_1", pos0), ], [ ("continue",[],"Continue...", [(change_screen_return), ]), ] ), ( "notification_faction_defeated",0, "Faction Eliminated^^{s1} is no more!", "none", [ (str_store_faction_name, s1, "$g_notification_menu_var1"), (set_fixed_point_multiplier, 100), (position_set_x, pos0, 65), (position_set_y, pos0, 30), (position_set_z, pos0, 170), (try_begin), (is_between, "$g_notification_menu_var1", "fac_kingdom_1", kingdoms_end), #Excluding player kingdom (set_game_menu_tableau_mesh, "tableau_faction_note_mesh_for_menu", "$g_notification_menu_var1", pos0), (else_try), (set_game_menu_tableau_mesh, "tableau_faction_note_mesh_banner", "$g_notification_menu_var1", pos0), (try_end), ], [ ("continue",[],"Continue...", [ (try_begin), (is_between, "$supported_pretender", pretenders_begin, pretenders_end), (troop_slot_eq, "$supported_pretender", slot_troop_original_faction, "$g_notification_menu_var1"), (try_for_range, ":cur_troop", kingdom_heroes_begin, kingdom_heroes_end), (store_troop_faction, ":cur_faction", ":cur_troop"), (eq, ":cur_faction", "fac_player_supporters_faction"), (troop_set_faction, ":cur_troop", "$g_notification_menu_var1"), (try_end), (try_for_parties, ":cur_party"), (store_faction_of_party, ":cur_faction", ":cur_party"), (eq, ":cur_faction", "fac_player_supporters_faction"), (party_set_faction, ":cur_party", "$g_notification_menu_var1"), (try_end), (assign, "$players_kingdom", "$g_notification_menu_var1"), (call_script, "script_add_notification_menu", "mnu_notification_rebels_switched_to_faction", "$g_notification_menu_var1", "$supported_pretender"), (faction_set_slot, "$g_notification_menu_var1", slot_faction_state, sfs_active), (faction_set_slot, "fac_player_supporters_faction", slot_faction_state, sfs_inactive), (faction_get_slot, ":old_leader", "$g_notification_menu_var1", slot_faction_leader), (troop_set_slot, ":old_leader", slot_troop_change_to_faction, "fac_commoners"), (faction_set_slot, "$g_notification_menu_var1", slot_faction_leader, "$supported_pretender"), (faction_set_slot, "$g_notification_menu_var1", slot_faction_marshall, "trp_player"), (faction_set_slot, "$g_notification_menu_var1", slot_faction_ai_state, sfai_default), (faction_set_slot, "$g_notification_menu_var1", slot_faction_ai_object, -1), (troop_set_slot, "$supported_pretender", slot_troop_occupation, slto_kingdom_hero), (party_remove_members, "p_main_party", "$supported_pretender", 1), (call_script, "script_set_player_relation_with_faction", "$g_notification_menu_var1", 0), (try_for_range, ":cur_kingdom", kingdoms_begin, kingdoms_end), (faction_slot_eq, ":cur_kingdom", slot_faction_state, sfs_active), (neq, ":cur_kingdom", "$g_notification_menu_var1"), (store_relation, ":reln", ":cur_kingdom", "fac_player_supporters_faction"), (set_relation, ":cur_kingdom", "$g_notification_menu_var1", ":reln"), (try_end), (assign, "$supported_pretender", 0), (assign, "$supported_pretender_old_faction", 0), (assign, "$g_recalculate_ais", 1), (call_script, "script_update_all_notes"), (try_end), (change_screen_return), ]), ] ), ( "notification_rebels_switched_to_faction",0, "Rebellion Success^^ Your rebellion is victorious! Your faction now has the sole claim to the title of {s11}, with {s12} as the single ruler.", "none", [ (str_store_faction_name, s11, "$g_notification_menu_var1"), (str_store_troop_name, s12, "$g_notification_menu_var2"), (set_fixed_point_multiplier, 100), (position_set_x, pos0, 65), (position_set_y, pos0, 30), (position_set_z, pos0, 170), (try_begin), (is_between, "$g_notification_menu_var1", "fac_kingdom_1", kingdoms_end), #Excluding player kingdom (set_game_menu_tableau_mesh, "tableau_faction_note_mesh_for_menu", "$g_notification_menu_var1", pos0), (else_try), (set_game_menu_tableau_mesh, "tableau_faction_note_mesh_banner", "$g_notification_menu_var1", pos0), (try_end), ], [ ("continue",[],"Continue...", [ (assign, "$talk_context", tc_rebel_thanks), (start_map_conversation, "$g_notification_menu_var2"), (change_screen_return), ]), ] ), ( "kill_local_merchant_begin",0, "You spot your victim and follow him, observing as he turns a corner into a dark alley.\ This will surely be your best opportunity to attack him.", "none", [ ], [ ("continue",[],"Continue...", [(set_jump_mission,"mt_back_alley_kill_local_merchant"), (party_get_slot, ":town_alley", "$qst_kill_local_merchant_center", slot_town_alley), (modify_visitors_at_site,":town_alley"), (reset_visitors), (set_visitor, 0, "trp_player"), (set_visitor, 1, "trp_local_merchant"), (jump_to_menu, "mnu_town"), (jump_to_scene,":town_alley"), (change_screen_mission), ]), ] ), ( "auto_return_to_map",0, "stub", "none", [(change_screen_map)], [] ), ################################# # Form Ranks section ################################# ("camp_action_formation_control_settings", mnf_disable_all_keys, "Key configuration", "none", [ ], [ ] ), ("camp_action_manage_arrays", 0, "You summon your sub-commanders and announce change of organization.", "none", [ ], [ ("assign_member_array_"+chr(x+48) , [ (assign, ":array_no", x), (ge, "$array_party_num", ":array_no"), (store_add, ":array_string", formation_array_names_begin, ":array_no"), (str_store_string, s10, ":array_string"), ], "Summon {s10}.", [ (store_add, ":slot", slot_party_array_parties_begin, x), (party_get_slot, ":array_party", "p_main_party", ":slot"), (set_spawn_radius, 5), (spawn_around_party, "p_main_party", "pt_none"), (assign, ":camp_bandits_backup", reg0), (store_add, ":array_string", formation_array_names_begin, x), (str_store_string, s10, ":array_string"), (party_set_name, "p_camp_bandits", s10), (call_script, "script_party_copy", ":camp_bandits_backup", "p_camp_bandits"), (call_script, "script_party_copy", "p_camp_bandits", ":array_party"), (assign, "$camp_bandits_back_up", ":camp_bandits_backup"), (assign, "$camp_action_array_no", x), (jump_to_menu, "mnu_camp_action_array_change"), ], ) for x in range(1, formation_arrays)]+[ ("manage_arrays_return", [], "Back to camp menu.", [(jump_to_menu, "mnu_camp")], ), ], ), ("camp_action_array_change", 0, "Men of {s10} have come to you.", "none", [ (store_add, ":array_string", formation_array_names_begin, "$camp_action_array_no"), (str_store_string, s10, ":array_string"), ], [ ("manage_array", [], "Change their organization", [ (change_screen_exchange_members, 1), ], ), ("manage_array_return", [], "Dismiss.", [ (assign, ":camp_bandits_backup", "$camp_bandits_back_up"), (store_add, ":slot", slot_party_array_parties_begin, "$camp_action_array_no"), (party_get_slot, ":array_party", "p_main_party", ":slot"), (call_script, "script_game_get_party_companion_limit"), (store_add, ":factor", "$camp_action_array_no", 1), (store_div, ":array_size_limit", reg0, ":factor"), (party_get_slot, ":leader", ":array_party", slot_array_party_leader), (store_skill_level, ":skill", "skl_tactics", ":leader"), (store_attribute_level, ":intel", ":leader", ca_intelligence), (val_mul, ":skill", 2), (val_add, ":array_size_limit", ":intel"), (val_add, ":array_size_limit", ":skill"), (store_party_size, ":array_size", "p_camp_bandits"), (try_begin), (gt, ":array_size", ":array_size_limit"), (display_message, "@{s10} size too large!", formation_message_color), (try_end), (le, ":array_size", ":array_size_limit"), (call_script, "script_party_copy", ":array_party", "p_camp_bandits"), (call_script, "script_party_copy", "p_camp_bandits", ":camp_bandits_backup"), (remove_party, ":camp_bandits_backup"), (party_set_name, "p_camp_bandits", "@camp_bandits"), (jump_to_menu, "mnu_camp_action_manage_arrays"), ], ), ], ), ################################### # Form Ranks section end ################################### ]
Python
from header_skins import * from ID_particle_systems import * #################################################################################################################### # Each skin record contains the following fields: # 1) Skin id: used for referencing skins. # 2) Skin flags. Not used yet. Should be 0. # 3) Body mesh. # 4) Calf mesh (left one). # 5) Hand mesh (left one). # 6) Head mesh. # 7) Face keys (list) # 8) List of hair meshes. # 9) List of beard meshes. # 10) List of hair textures. # 11) List of beard textures. # 12) List of face textures. # 13) List of voices. # 14) Skeleton name # 15) Scale (doesn't fully work yet) # 16) Blood particles 1 (do not add this if you wish to use the default particles) # 17) Blood particles 2 (do not add this if you wish to use the default particles) # 17) Face key constraints (do not add this if you do not wish to use it) #################################################################################################################### man_face_keys = [ (20,0, 0.7,-0.6, "Chin Size"), (260,0, -0.6,1.4, "Chin Shape"), (10,0,-0.5,0.9, "Chin Forward"), (240,0,0.9,-0.8, "Jaw Width"), (210,0,-0.5,1.0, "Jaw Position"), (250,0,0.8,-1.0, "Mouth-Nose Distance"), (200,0,-0.3,1.0, "Mouth Width"), (50,0,-1.5,1.0, "Cheeks"), (60,0,-0.4,1.35, "Nose Height"), (70,0,-0.6,0.7, "Nose Width"), (80,0,1.0,-0.1, "Nose Size"), (270,0,-0.5,1.0, "Nose Shape"), (90,0,-0.2,1.4, "Nose Bridge"), (100,0,-0.3,1.5, "Cheek Bones"), (150,0,-0.2,3.0, "Eye Width"), (110,0,1.5,-0.9, "Eye to Eye Dist"), (120,0,1.9,-1.0, "Eye Shape"), (130,0,-0.5, 1.1, "Eye Depth"), (140,0,1.0,-1.2, "Eyelids"), (160,0,1.3,-0.2, "Eyebrow Position"), (170,0,-0.1,1.9, "Eyebrow Height"), (220,0,-0.1,0.9, "Eyebrow Depth"), (180,0,-1.1,1.6, "Eyebrow Shape"), (230,0,1.2,-0.7, "Temple Width"), (30,0,-0.6,0.9, "Face Depth"), (40,0,0.9,-0.6, "Face Ratio"), (190,0,0.0,0.95, "Face Width"), (280,0,0.0,1.0, "Post-Edit"), ] # Face width-Jaw width Temple width woman_face_keys = [ (230,0,0.8,-1.0, "Chin Size"), (220,0,-1.0,1.0, "Chin Shape"), (10,0,-1.2,1.0, "Chin Forward"), (20,0, -0.6, 1.2, "Jaw Width"), (40,0,-0.7,1.0, "Jaw Position"), (270,0,0.9,-0.9, "Mouth-Nose Distance"), (30,0,-0.5,1.0, "Mouth Width"), (50,0, -0.5,1.0, "Cheeks"), (60,0,-0.5,1.0, "Nose Height"), (70,0,-0.5,1.1, "Nose Width"), (80,0,1.5,-0.3, "Nose Size"), (240,0,-1.0,0.8, "Nose Shape"), (90,0, 0.0,1.1, "Nose Bridge"), (100,0,-0.5,1.5, "Cheek Bones"), (150,0,-0.4,1.0, "Eye Width"), (110,0,1.0,0.0, "Eye to Eye Dist"), (120,0,-0.2,1.0, "Eye Shape"), (130,0,-0.1,1.6, "Eye Depth"), (140,0,-0.2,1.0, "Eyelids"), (160,0,-0.2,1.2, "Eyebrow Position"), (170,0,-0.2,0.7, "Eyebrow Height"), (250,0,-0.4,0.9, "Eyebrow Depth"), (180,0,-1.5,1.2, "Eyebrow Shape"), (260,0,1.0,-0.7, "Temple Width"), (200,0,-0.5,1.0, "Face Depth"), (210,0,-0.5,0.9, "Face Ratio"), (190,0,-0.4,0.8, "Face Width"), (280,0,0.0,1.0, "Post-Edit"), ] undead_face_keys = [] chin_size = 0 chin_shape = 1 chin_forward = 2 jaw_width = 3 jaw_position = 4 mouth_nose_distance = 5 mouth_width = 6 cheeks = 7 nose_height = 8 nose_width = 9 nose_size = 10 nose_shape = 11 nose_bridge = 12 cheek_bones = 13 eye_width = 14 eye_to_eye_dist = 15 eye_shape = 16 eye_depth = 17 eyelids = 18 eyebrow_position = 19 eyebrow_height = 20 eyebrow_depth = 21 eyebrow_shape = 22 temple_width = 23 face_depth = 24 face_ratio = 25 face_width = 26 comp_less_than = -1; comp_greater_than = 1; skins = [ ( "man", 0, "man_body", "man_calf_l", "m_handL", "male_head", man_face_keys, ["man_hair_s","man_hair_m","man_hair_n","man_hair_o", "man_hair_y10", "man_hair_y12","man_hair_p","man_hair_r","man_hair_q","man_hair_v","man_hair_t","man_hair_y6","man_hair_y3","man_hair_y7","man_hair_y9","man_hair_y11","man_hair_u","man_hair_y","man_hair_y2","man_hair_y4"], #man_hair_meshes ,"man_hair_y5","man_hair_y8", ["beard_e","beard_d","beard_k","beard_l","beard_i","beard_j","beard_z","beard_m","beard_n","beard_y","beard_p","beard_o", "beard_v", "beard_f", "beard_b", "beard_c","beard_t","beard_u","beard_r","beard_s","beard_a","beard_h","beard_g",], #beard meshes ,"beard_q" ["hair_blonde", "hair_red", "hair_brunette", "hair_black", "hair_white"], #hair textures ["beard_blonde","beard_red","beard_brunette","beard_black","beard_white"], #beard_materials [("manface_young_2",0xffcbe0e0,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19]), ("manface_midage",0xffdfefe1,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c]), ("manface_young",0xffd0e0e0,["hair_blonde"],[0xff83301a, 0xff502a19, 0xff19100c, 0xff0c0d19]), # ("manface_old",0xffd0d0d0,["hair_white","hair_brunette","hair_red","hair_blonde"],[0xffffcded, 0xffbbcded, 0xff99eebb]), ("manface_young_3",0xffdceded,["hair_blonde"],[0xff2f180e, 0xff171313, 0xff007080c]), ("manface_7",0xffc0c8c8,["hair_blonde"],[0xff171313, 0xff007080c]), ("manface_midage_2",0xfde4c8d8,["hair_blonde"],[0xff502a19, 0xff19100c, 0xff0c0d19]), ("manface_rugged",0xffb0aab5,["hair_blonde"],[0xff171313, 0xff007080c]), # ("manface_young_4",0xffe0e8e8,["hair_blonde"],[0xff2f180e, 0xff171313, 0xff007080c]), ("manface_african",0xff807c8a,["hair_blonde"],[0xff120808, 0xff007080c]), # ("manface_old_2",0xffd5d5c5,["hair_white"],[0xffffcded, 0xffbbcded, 0xff99eebb]), ], #man_face_textures, [(voice_die,"snd_man_die"),(voice_hit,"snd_man_hit"),(voice_grunt,"snd_man_grunt"),(voice_grunt_long,"snd_man_grunt_long"),(voice_yell,"snd_man_yell"),(voice_victory,"snd_man_victory")], #voice sounds "skel_human", 1.0, psys_game_blood,psys_game_blood_2, [[1.7, comp_greater_than, (1.0,face_width), (1.0,temple_width)], #constraints: ex: 1.7 > (face_width + temple_width) [0.3, comp_less_than, (1.0,face_width), (1.0,temple_width)], [1.7, comp_greater_than, (1.0,face_width), (1.0,face_depth)], [0.3, comp_less_than, (1.0,eyebrow_height), (1.0,eyebrow_position)], [1.7, comp_greater_than, (1.0,eyebrow_height), (1.0,eyebrow_position)], [-0.7, comp_less_than, (1.0,nose_size), (-1.0,nose_shape)], [0.7, comp_greater_than, (1.0,nose_size), (-1.0,nose_shape)], [2.7, comp_greater_than, (1.0,chin_size), (1.0,mouth_nose_distance), (1.0,nose_height), (-1.0,face_width)], ] ), ( "woman", skf_use_morph_key_10, "woman_body", "woman_calf_l", "f_handL", "female_head", woman_face_keys, ["woman_hair_p","woman_hair_n","woman_hair_o","woman_hair_q","woman_hair_r","woman_hair_t","woman_hair_s"], #woman_hair_meshes # ["woman_hair_a","woman_hair_b","woman_hair_c","woman_hair_d","woman_hair_e","woman_hair_f","woman_hair_g"], #woman_hair_meshes [], ["hair_blonde", "hair_red", "hair_brunette", "hair_black", "hair_white"], #hair textures [], [("womanface_young",0xffe3e8ef,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19, 0xff19100c]), ("womanface_b",0xffdfdfdf,["hair_blonde"],[0xffa5481f, 0xff502a19, 0xff19100c, 0xff0c0d19]), ("womanface_a",0xffe8dfe5,["hair_blonde"],[0xff502a19, 0xff19100c, 0xff0c0d19]), ("womanface_brown",0xffaf9f7e,["hair_blonde"],[0xff19100c, 0xff0c0d19, 0xff007080c]), ("womanface_african",0xff808080,["hair_blonde"],[0xff120808, 0xff007080c]), # ("womanface_midage",0xffe5eaf0,["hair_black","hair_brunette","hair_red","hair_white"],[0xffffcded, 0xffbbcded, 0xff99eebb]), ],#woman_face_textures [(voice_die,"snd_woman_die"),(voice_hit,"snd_woman_hit")], #voice sounds "skel_human", 1.0, psys_game_blood,psys_game_blood_2, ), ## ( ## "undead", 0, ## "undead_body", "undead_calf_l", "undead_handL", ## "undead_head", undead_face_keys, ## [], ## [], ## [], ## [], ## [("undeadface_a",0xffffffff,[]), ## ("undeadface_b",0xffcaffc0,[]), ## ], #undead_face_textures ## [], #voice sounds ## "skel_human", 1.0, ## ), ]
Python
scn_random_scene = 0 scn_conversation_scene = 1 scn_random_scene_steppe = 2 scn_random_scene_plain = 3 scn_random_scene_snow = 4 scn_random_scene_desert = 5 scn_random_scene_steppe_forest = 6 scn_random_scene_plain_forest = 7 scn_random_scene_snow_forest = 8 scn_random_scene_desert_forest = 9 scn_camp_scene = 10 scn_camp_scene_horse_track = 11 scn_four_ways_inn = 12 scn_test_scene = 13 scn_quick_battle_1 = 14 scn_quick_battle_2 = 15 scn_quick_battle_3 = 16 scn_quick_battle_4 = 17 scn_quick_battle_5 = 18 scn_quick_battle_6 = 19 scn_quick_battle_7 = 20 scn_salt_mine = 21 scn_novice_ground = 22 scn_zendar_arena = 23 scn_dhorak_keep = 24 scn_reserved4 = 25 scn_reserved5 = 26 scn_reserved6 = 27 scn_reserved7 = 28 scn_reserved8 = 29 scn_reserved9 = 30 scn_reserved10 = 31 scn_reserved11 = 32 scn_reserved12 = 33 scn_training_ground = 34 scn_tutorial_1 = 35 scn_tutorial_2 = 36 scn_tutorial_3 = 37 scn_tutorial_4 = 38 scn_tutorial_5 = 39 scn_training_ground_horse_track_1 = 40 scn_training_ground_horse_track_2 = 41 scn_training_ground_horse_track_3 = 42 scn_training_ground_horse_track_4 = 43 scn_training_ground_horse_track_5 = 44 scn_training_ground_ranged_melee_1 = 45 scn_training_ground_ranged_melee_2 = 46 scn_training_ground_ranged_melee_3 = 47 scn_training_ground_ranged_melee_4 = 48 scn_training_ground_ranged_melee_5 = 49 scn_zendar_center = 50 scn_the_happy_boar = 51 scn_zendar_merchant = 52 scn_town_1_center = 53 scn_town_2_center = 54 scn_town_3_center = 55 scn_town_4_center = 56 scn_town_5_center = 57 scn_town_6_center = 58 scn_town_7_center = 59 scn_town_8_center = 60 scn_town_9_center = 61 scn_town_10_center = 62 scn_town_11_center = 63 scn_town_12_center = 64 scn_town_13_center = 65 scn_town_14_center = 66 scn_town_15_center = 67 scn_town_16_center = 68 scn_town_17_center = 69 scn_town_18_center = 70 scn_town_1_castle = 71 scn_town_2_castle = 72 scn_town_3_castle = 73 scn_town_4_castle = 74 scn_town_5_castle = 75 scn_town_6_castle = 76 scn_town_7_castle = 77 scn_town_8_castle = 78 scn_town_9_castle = 79 scn_town_10_castle = 80 scn_town_11_castle = 81 scn_town_12_castle = 82 scn_town_13_castle = 83 scn_town_14_castle = 84 scn_town_15_castle = 85 scn_town_16_castle = 86 scn_town_17_castle = 87 scn_town_18_castle = 88 scn_town_1_tavern = 89 scn_town_2_tavern = 90 scn_town_3_tavern = 91 scn_town_4_tavern = 92 scn_town_5_tavern = 93 scn_town_6_tavern = 94 scn_town_7_tavern = 95 scn_town_8_tavern = 96 scn_town_9_tavern = 97 scn_town_10_tavern = 98 scn_town_11_tavern = 99 scn_town_12_tavern = 100 scn_town_13_tavern = 101 scn_town_14_tavern = 102 scn_town_15_tavern = 103 scn_town_16_tavern = 104 scn_town_17_tavern = 105 scn_town_18_tavern = 106 scn_town_1_store = 107 scn_town_2_store = 108 scn_town_3_store = 109 scn_town_4_store = 110 scn_town_5_store = 111 scn_town_6_store = 112 scn_town_7_store = 113 scn_town_8_store = 114 scn_town_9_store = 115 scn_town_10_store = 116 scn_town_11_store = 117 scn_town_12_store = 118 scn_town_13_store = 119 scn_town_14_store = 120 scn_town_15_store = 121 scn_town_16_store = 122 scn_town_17_store = 123 scn_town_18_store = 124 scn_town_1_arena = 125 scn_town_2_arena = 126 scn_town_3_arena = 127 scn_town_4_arena = 128 scn_town_5_arena = 129 scn_town_6_arena = 130 scn_town_7_arena = 131 scn_town_8_arena = 132 scn_town_9_arena = 133 scn_town_10_arena = 134 scn_town_11_arena = 135 scn_town_12_arena = 136 scn_town_13_arena = 137 scn_town_14_arena = 138 scn_town_15_arena = 139 scn_town_16_arena = 140 scn_town_17_arena = 141 scn_town_18_arena = 142 scn_town_1_prison = 143 scn_town_2_prison = 144 scn_town_3_prison = 145 scn_town_4_prison = 146 scn_town_5_prison = 147 scn_town_6_prison = 148 scn_town_7_prison = 149 scn_town_8_prison = 150 scn_town_9_prison = 151 scn_town_10_prison = 152 scn_town_11_prison = 153 scn_town_12_prison = 154 scn_town_13_prison = 155 scn_town_14_prison = 156 scn_town_15_prison = 157 scn_town_16_prison = 158 scn_town_17_prison = 159 scn_town_18_prison = 160 scn_town_1_walls = 161 scn_town_2_walls = 162 scn_town_3_walls = 163 scn_town_4_walls = 164 scn_town_5_walls = 165 scn_town_6_walls = 166 scn_town_7_walls = 167 scn_town_8_walls = 168 scn_town_9_walls = 169 scn_town_10_walls = 170 scn_town_11_walls = 171 scn_town_12_walls = 172 scn_town_13_walls = 173 scn_town_14_walls = 174 scn_town_15_walls = 175 scn_town_16_walls = 176 scn_town_17_walls = 177 scn_town_18_walls = 178 scn_town_1_alley = 179 scn_town_2_alley = 180 scn_town_3_alley = 181 scn_town_4_alley = 182 scn_town_5_alley = 183 scn_town_6_alley = 184 scn_town_7_alley = 185 scn_town_8_alley = 186 scn_town_9_alley = 187 scn_town_10_alley = 188 scn_town_11_alley = 189 scn_town_12_alley = 190 scn_town_13_alley = 191 scn_town_14_alley = 192 scn_town_15_alley = 193 scn_town_16_alley = 194 scn_town_17_alley = 195 scn_town_18_alley = 196 scn_castle_1_exterior = 197 scn_castle_1_interior = 198 scn_castle_1_prison = 199 scn_castle_2_exterior = 200 scn_castle_2_interior = 201 scn_castle_2_prison = 202 scn_castle_3_exterior = 203 scn_castle_3_interior = 204 scn_castle_3_prison = 205 scn_castle_4_exterior = 206 scn_castle_4_interior = 207 scn_castle_4_prison = 208 scn_castle_5_exterior = 209 scn_castle_5_interior = 210 scn_castle_5_prison = 211 scn_castle_6_exterior = 212 scn_castle_6_interior = 213 scn_castle_6_prison = 214 scn_castle_7_exterior = 215 scn_castle_7_interior = 216 scn_castle_7_prison = 217 scn_castle_8_exterior = 218 scn_castle_8_interior = 219 scn_castle_8_prison = 220 scn_castle_9_exterior = 221 scn_castle_9_interior = 222 scn_castle_9_prison = 223 scn_castle_10_exterior = 224 scn_castle_10_interior = 225 scn_castle_10_prison = 226 scn_castle_11_exterior = 227 scn_castle_11_interior = 228 scn_castle_11_prison = 229 scn_castle_12_exterior = 230 scn_castle_12_interior = 231 scn_castle_12_prison = 232 scn_castle_13_exterior = 233 scn_castle_13_interior = 234 scn_castle_13_prison = 235 scn_castle_14_exterior = 236 scn_castle_14_interior = 237 scn_castle_14_prison = 238 scn_castle_15_exterior = 239 scn_castle_15_interior = 240 scn_castle_15_prison = 241 scn_castle_16_exterior = 242 scn_castle_16_interior = 243 scn_castle_16_prison = 244 scn_castle_17_exterior = 245 scn_castle_17_interior = 246 scn_castle_17_prison = 247 scn_castle_18_exterior = 248 scn_castle_18_interior = 249 scn_castle_18_prison = 250 scn_castle_19_exterior = 251 scn_castle_19_interior = 252 scn_castle_19_prison = 253 scn_castle_20_exterior = 254 scn_castle_20_interior = 255 scn_castle_20_prison = 256 scn_castle_21_exterior = 257 scn_castle_21_interior = 258 scn_castle_21_prison = 259 scn_castle_22_exterior = 260 scn_castle_22_interior = 261 scn_castle_22_prison = 262 scn_castle_23_exterior = 263 scn_castle_23_interior = 264 scn_castle_23_prison = 265 scn_castle_24_exterior = 266 scn_castle_24_interior = 267 scn_castle_24_prison = 268 scn_castle_25_exterior = 269 scn_castle_25_interior = 270 scn_castle_25_prison = 271 scn_castle_26_exterior = 272 scn_castle_26_interior = 273 scn_castle_26_prison = 274 scn_castle_27_exterior = 275 scn_castle_27_interior = 276 scn_castle_27_prison = 277 scn_castle_28_exterior = 278 scn_castle_28_interior = 279 scn_castle_28_prison = 280 scn_castle_29_exterior = 281 scn_castle_29_interior = 282 scn_castle_29_prison = 283 scn_castle_30_exterior = 284 scn_castle_30_interior = 285 scn_castle_30_prison = 286 scn_castle_31_exterior = 287 scn_castle_31_interior = 288 scn_castle_31_prison = 289 scn_castle_32_exterior = 290 scn_castle_32_interior = 291 scn_castle_32_prison = 292 scn_castle_33_exterior = 293 scn_castle_33_interior = 294 scn_castle_33_prison = 295 scn_castle_34_exterior = 296 scn_castle_34_interior = 297 scn_castle_34_prison = 298 scn_castle_35_exterior = 299 scn_castle_35_interior = 300 scn_castle_35_prison = 301 scn_castle_36_exterior = 302 scn_castle_36_interior = 303 scn_castle_36_prison = 304 scn_castle_37_exterior = 305 scn_castle_37_interior = 306 scn_castle_37_prison = 307 scn_castle_38_exterior = 308 scn_castle_38_interior = 309 scn_castle_38_prison = 310 scn_castle_39_exterior = 311 scn_castle_39_interior = 312 scn_castle_39_prison = 313 scn_castle_40_exterior = 314 scn_castle_40_interior = 315 scn_castle_40_prison = 316 scn_village_1 = 317 scn_village_2 = 318 scn_village_3 = 319 scn_village_4 = 320 scn_village_5 = 321 scn_village_6 = 322 scn_village_7 = 323 scn_village_8 = 324 scn_village_9 = 325 scn_village_10 = 326 scn_village_11 = 327 scn_village_12 = 328 scn_village_13 = 329 scn_village_14 = 330 scn_village_15 = 331 scn_village_16 = 332 scn_village_17 = 333 scn_village_18 = 334 scn_village_19 = 335 scn_village_20 = 336 scn_village_21 = 337 scn_village_22 = 338 scn_village_23 = 339 scn_village_24 = 340 scn_village_25 = 341 scn_village_26 = 342 scn_village_27 = 343 scn_village_28 = 344 scn_village_29 = 345 scn_village_30 = 346 scn_village_31 = 347 scn_village_32 = 348 scn_village_33 = 349 scn_village_34 = 350 scn_village_35 = 351 scn_village_36 = 352 scn_village_37 = 353 scn_village_38 = 354 scn_village_39 = 355 scn_village_40 = 356 scn_village_41 = 357 scn_village_42 = 358 scn_village_43 = 359 scn_village_44 = 360 scn_village_45 = 361 scn_village_46 = 362 scn_village_47 = 363 scn_village_48 = 364 scn_village_49 = 365 scn_village_50 = 366 scn_village_51 = 367 scn_village_52 = 368 scn_village_53 = 369 scn_village_54 = 370 scn_village_55 = 371 scn_village_56 = 372 scn_village_57 = 373 scn_village_58 = 374 scn_village_59 = 375 scn_village_60 = 376 scn_village_61 = 377 scn_village_62 = 378 scn_village_63 = 379 scn_village_64 = 380 scn_village_65 = 381 scn_village_66 = 382 scn_village_67 = 383 scn_village_68 = 384 scn_village_69 = 385 scn_village_70 = 386 scn_village_71 = 387 scn_village_72 = 388 scn_village_73 = 389 scn_village_74 = 390 scn_village_75 = 391 scn_village_76 = 392 scn_village_77 = 393 scn_village_78 = 394 scn_village_79 = 395 scn_village_80 = 396 scn_village_81 = 397 scn_village_82 = 398 scn_village_83 = 399 scn_village_84 = 400 scn_village_85 = 401 scn_village_86 = 402 scn_village_87 = 403 scn_village_88 = 404 scn_village_89 = 405 scn_village_90 = 406 scn_field_1 = 407 scn_field_2 = 408 scn_field_3 = 409 scn_field_4 = 410 scn_field_5 = 411
Python
itm_no_item = 0 itm_horse_meat = 1 itm_practice_sword = 2 itm_heavy_practice_sword = 3 itm_practice_staff = 4 itm_practice_lance = 5 itm_practice_shield = 6 itm_practice_bow = 7 itm_practice_horse = 8 itm_practice_arrows = 9 itm_red_tourney_armor = 10 itm_blue_tourney_armor = 11 itm_green_tourney_armor = 12 itm_gold_tourney_armor = 13 itm_red_tourney_helmet = 14 itm_blue_tourney_helmet = 15 itm_green_tourney_helmet = 16 itm_gold_tourney_helmet = 17 itm_grain = 18 itm_smoked_fish = 19 itm_dried_meat = 20 itm_flour = 21 itm_wine = 22 itm_ale = 23 itm_spice = 24 itm_salt = 25 itm_iron = 26 itm_oil = 27 itm_pottery = 28 itm_linen = 29 itm_furs = 30 itm_wool = 31 itm_velvet = 32 itm_tools = 33 itm_siege_supply = 34 itm_tutorial_sword = 35 itm_tutorial_axe = 36 itm_tutorial_spear = 37 itm_tutorial_club = 38 itm_tutorial_battle_axe = 39 itm_tutorial_arrows = 40 itm_tutorial_bolts = 41 itm_tutorial_short_bow = 42 itm_tutorial_crossbow = 43 itm_tutorial_throwing_daggers = 44 itm_tutorial_saddle_horse = 45 itm_tutorial_shield = 46 itm_tutorial_staff_no_attack = 47 itm_tutorial_staff = 48 itm_sumpter_horse = 49 itm_saddle_horse = 50 itm_steppe_horse = 51 itm_courser = 52 itm_hunter = 53 itm_warhorse = 54 itm_charger = 55 itm_arrows = 56 itm_khergit_arrows = 57 itm_barbed_arrows = 58 itm_bodkin_arrows = 59 itm_bolts = 60 itm_steel_bolts = 61 itm_cartridges = 62 itm_pilgrim_disguise = 63 itm_pilgrim_hood = 64 itm_leather_gloves = 65 itm_mail_mittens = 66 itm_scale_gauntlets = 67 itm_gauntlets = 68 itm_wrapping_boots = 69 itm_woolen_hose = 70 itm_blue_hose = 71 itm_hide_boots = 72 itm_nomad_boots = 73 itm_hunter_boots = 74 itm_leather_boots = 75 itm_mail_chausses = 76 itm_splinted_leather_greaves = 77 itm_splinted_greaves = 78 itm_mail_boots = 79 itm_iron_greaves = 80 itm_black_greaves = 81 itm_lady_dress_ruby = 82 itm_lady_dress_green = 83 itm_lady_dress_blue = 84 itm_courtly_outfit_b = 85 itm_courtly_outfit = 86 itm_nomad_armor = 87 itm_khergit_armor = 88 itm_leather_jacket = 89 itm_rawhide_coat = 90 itm_leather_armor = 91 itm_scale_armor = 92 itm_dress = 93 itm_blue_dress = 94 itm_woolen_dress = 95 itm_shirt = 96 itm_linen_tunic = 97 itm_short_tunic = 98 itm_coarse_tunic = 99 itm_robe = 100 itm_nomad_robe = 101 itm_leather_apron = 102 itm_tabard = 103 itm_leather_vest = 104 itm_nomad_vest = 105 itm_padded_cloth = 106 itm_gambeson = 107 itm_blue_gambeson = 108 itm_red_gambeson = 109 itm_padded_leather = 110 itm_leather_jerkin = 111 itm_studded_leather_coat = 112 itm_heraldric_armor = 113 itm_mail_with_surcoat = 114 itm_cuir_bouilli = 115 itm_mail_shirt = 116 itm_brigandine_a = 117 itm_haubergeon = 118 itm_mail_hauberk = 119 itm_lamellar_cuirass = 120 itm_coat_of_plates = 121 itm_plate_armor = 122 itm_black_armor = 123 itm_turret_hat_ruby = 124 itm_turret_hat_blue = 125 itm_turret_hat_green = 126 itm_court_hat = 127 itm_wimple_a = 128 itm_straw_hat = 129 itm_common_hood = 130 itm_headcloth = 131 itm_woolen_hood = 132 itm_fur_hat = 133 itm_nomad_cap = 134 itm_steppe_cap = 135 itm_padded_coif = 136 itm_woolen_cap = 137 itm_felt_hat = 138 itm_leather_cap = 139 itm_hood = 140 itm_skullcap = 141 itm_nasal_helmet = 142 itm_segmented_helmet = 143 itm_mail_coif = 144 itm_kettle_hat = 145 itm_helmet_with_neckguard = 146 itm_spiked_helmet = 147 itm_nordic_helmet = 148 itm_flat_topped_helmet = 149 itm_bascinet = 150 itm_guard_helmet = 151 itm_great_helmet = 152 itm_winged_great_helmet = 153 itm_black_helmet = 154 itm_wooden_stick = 155 itm_cudgel = 156 itm_hammer = 157 itm_club = 158 itm_winged_mace = 159 itm_spiked_mace = 160 itm_military_hammer = 161 itm_maul = 162 itm_sledgehammer = 163 itm_warhammer = 164 itm_pickaxe = 165 itm_spiked_club = 166 itm_fighting_pick = 167 itm_military_pick = 168 itm_morningstar = 169 itm_sickle = 170 itm_cleaver = 171 itm_knife = 172 itm_butchering_knife = 173 itm_dagger = 174 itm_nordic_sword = 175 itm_arming_sword = 176 itm_sword = 177 itm_falchion = 178 itm_broadsword = 179 itm_scimitar = 180 itm_nomad_sabre = 181 itm_bastard_sword = 182 itm_great_sword = 183 itm_sword_of_war = 184 itm_hatchet = 185 itm_hand_axe = 186 itm_fighting_axe = 187 itm_axe = 188 itm_voulge = 189 itm_one_handed_battle_axe = 190 itm_one_handed_war_axe = 191 itm_battle_axe = 192 itm_war_axe = 193 itm_bardiche = 194 itm_double_axe = 195 itm_great_axe = 196 itm_scythe = 197 itm_pitch_fork = 198 itm_military_fork = 199 itm_battle_fork = 200 itm_boar_spear = 201 itm_spear = 202 itm_jousting_lance = 203 itm_lance = 204 itm_great_lance = 205 itm_double_sided_lance = 206 itm_pike = 207 itm_ashwood_pike = 208 itm_glaive = 209 itm_awlpike = 210 itm_poleaxe = 211 itm_polehammer = 212 itm_staff = 213 itm_quarter_staff = 214 itm_iron_staff = 215 itm_wooden_shield = 216 itm_round_shield = 217 itm_nordic_shield = 218 itm_kite_shield = 219 itm_kite_shield_ = 220 itm_large_shield = 221 itm_battle_shield = 222 itm_war_shield = 223 itm_heraldric_shield = 224 itm_heater_shield = 225 itm_steel_shield = 226 itm_nomad_shield = 227 itm_shield_round_e = 228 itm_shield_round_d = 229 itm_shield_round_f = 230 itm_shield_heater_c = 231 itm_shield_heater_d = 232 itm_shield_kite_m = 233 itm_shield_kite_g = 234 itm_shield_kite_h = 235 itm_shield_kite_i = 236 itm_shield_kite_k = 237 itm_jarid = 238 itm_javelin = 239 itm_stones = 240 itm_throwing_knives = 241 itm_throwing_daggers = 242 itm_throwing_axes = 243 itm_hunting_bow = 244 itm_short_bow = 245 itm_nomad_bow = 246 itm_long_bow = 247 itm_khergit_bow = 248 itm_strong_bow = 249 itm_war_bow = 250 itm_hunting_crossbow = 251 itm_light_crossbow = 252 itm_crossbow = 253 itm_heavy_crossbow = 254 itm_sniper_crossbow = 255 itm_flintlock_pistol = 256 itm_torch = 257 itm_short_sword = 258 itm_strange_armor = 259 itm_strange_boots = 260 itm_strange_helmet = 261 itm_strange_sword = 262 itm_strange_great_sword = 263 itm_strange_short_sword = 264 itm_court_dress = 265 itm_rich_outfit = 266 itm_khergit_guard_armor = 267 itm_leather_steppe_cap_a = 268 itm_leather_steppe_cap_b = 269 itm_leather_steppe_cap_c = 270 itm_felt_steppe_cap = 271 itm_khergit_war_helmet = 272 itm_khergit_helmet = 273 itm_khergit_sword = 274 itm_khergit_guard_boots = 275 itm_khergit_guard_helmet = 276 itm_khergit_cavalry_helmet = 277 itm_black_hood = 278 itm_light_leather = 279 itm_light_leather_boots = 280 itm_mail_and_plate = 281 itm_light_mail_and_plate = 282 itm_byzantion_helmet_a = 283 itm_magyar_helmet_a = 284 itm_rus_helmet_a = 285 itm_sipahi_helmet_a = 286 itm_shahi = 287 itm_rabati = 288
Python
from header_sounds import * sounds = [ ("click", sf_2d|sf_vol_1,["drum_3.ogg"]), ("tutorial_1", sf_2d|sf_vol_7,["tutorial_1.ogg"]), ("tutorial_2", sf_2d|sf_vol_7,["tutorial_2.ogg"]), ("gong", sf_2d|sf_priority_9|sf_vol_7, ["s_cymbals.ogg"]), ("quest_taken", sf_2d|sf_priority_9|sf_vol_7, []), ("quest_completed", sf_2d|sf_priority_9|sf_vol_7, ["quest_completed.ogg"]), ("quest_succeeded", sf_2d|sf_priority_9|sf_vol_7, ["quest_succeeded.ogg"]), ("quest_concluded", sf_2d|sf_priority_9|sf_vol_7, ["quest_concluded.ogg"]), ("quest_failed", sf_2d|sf_priority_9|sf_vol_7, ["quest_failed.ogg"]), ("quest_cancelled", sf_2d|sf_priority_9|sf_vol_7, ["quest_cancelled.ogg"]), ("rain",sf_2d|sf_priority_10|sf_vol_4|sf_looping, ["rain_1.ogg"]), ("money_received",sf_priority_10|sf_vol_6, ["coins_dropped_1.ogg"]), ("money_paid",sf_priority_10|sf_vol_10, ["coins_dropped_2.ogg"]), ("sword_clash_1", 0,["sword_clank_metal_09.ogg","sword_clank_metal_09b.ogg","sword_clank_metal_10.ogg","sword_clank_metal_10b.ogg","sword_clank_metal_12.ogg","sword_clank_metal_12b.ogg","sword_clank_metal_13.ogg","sword_clank_metal_13b.ogg"]), ("sword_clash_2", 0,["s_swordClash2.wav"]), ("sword_clash_3", 0,["s_swordClash3.wav"]), ("sword_swing", sf_vol_8|sf_priority_2,["s_swordSwing.wav"]), ("footstep_grass", sf_vol_4|sf_priority_1,["footstep_1.ogg","footstep_2.ogg","footstep_3.ogg","footstep_4.ogg"]), ("footstep_wood", sf_vol_6|sf_priority_1,["footstep_wood_1.ogg","footstep_wood_2.ogg","footstep_wood_4.ogg"]), # ("footstep_wood", sf_vol_3|sf_priority_1,["footstep_stone_1.ogg","footstep_stone_3.ogg","footstep_stone_4.ogg"]), ("footstep_water", sf_vol_4|sf_priority_3,["water_walk_1.ogg","water_walk_2.ogg","water_walk_3.ogg","water_walk_4.ogg"]), ("footstep_horse",sf_priority_3, ["footstep_horse_5.ogg","footstep_horse_2.ogg","footstep_horse_3.ogg","footstep_horse_4.ogg"]), # ("footstep_horse",0, ["s_footstep_horse_4b.wav","s_footstep_horse_4f.wav","s_footstep_horse_5b.wav","s_footstep_horse_5f.wav"]), ("footstep_horse_1b",sf_priority_3, ["s_footstep_horse_4b.wav","s_footstep_horse_4f.wav","s_footstep_horse_5b.wav","s_footstep_horse_5f.wav"]), ("footstep_horse_1f",sf_priority_3, ["s_footstep_horse_2b.wav","s_footstep_horse_2f.wav","s_footstep_horse_3b.wav","s_footstep_horse_3f.wav"]), # ("footstep_horse_1f",sf_priority_3, ["footstep_horse_5.ogg","footstep_horse_2.ogg","footstep_horse_3.ogg","footstep_horse_4.ogg"]), ("footstep_horse_2b",sf_priority_3, ["s_footstep_horse_2b.wav"]), ("footstep_horse_2f",sf_priority_3, ["s_footstep_horse_2f.wav"]), ("footstep_horse_3b",sf_priority_3, ["s_footstep_horse_3b.wav"]), ("footstep_horse_3f",sf_priority_3, ["s_footstep_horse_3f.wav"]), ("footstep_horse_4b",sf_priority_3, ["s_footstep_horse_4b.wav"]), ("footstep_horse_4f",sf_priority_3, ["s_footstep_horse_4f.wav"]), ("footstep_horse_5b",sf_priority_3, ["s_footstep_horse_5b.wav"]), ("footstep_horse_5f",sf_priority_3, ["s_footstep_horse_5f.wav"]), ("jump_begin", sf_vol_7|sf_priority_9,["jump_begin.ogg"]), ("jump_end", sf_vol_5|sf_priority_9,["jump_end.ogg"]), ("jump_begin_water", sf_vol_4|sf_priority_9,["jump_begin_water.ogg"]), ("jump_end_water", sf_vol_4|sf_priority_9,["jump_end_water.ogg"]), ("horse_jump_begin", sf_vol_7|sf_priority_9,["horse_jump_begin.ogg"]), ("horse_jump_end", sf_vol_7|sf_priority_9,["horse_jump_end.ogg"]), ("horse_jump_begin_water", sf_vol_4|sf_priority_9,["jump_begin_water.ogg"]), ("horse_jump_end_water", sf_vol_4|sf_priority_9,["jump_end_water.ogg"]), ("release_bow",sf_vol_5, ["release_bow_1.ogg"]), ("release_crossbow",sf_vol_7, ["release_crossbow_1.ogg"]), ("throw_javelin",sf_vol_5, ["throw_javelin_2.ogg"]), ("throw_axe",sf_vol_7, ["throw_axe_1.ogg"]), ("throw_knife",sf_vol_5, ["throw_knife_1.ogg"]), ("throw_stone",sf_vol_7, ["throw_stone_1.ogg"]), ("reload_crossbow",sf_vol_3, ["reload_crossbow_1.ogg"]), ("reload_crossbow_continue",sf_vol_6, ["put_back_dagger.ogg"]), ("pull_bow",sf_vol_4, ["pull_bow_1.ogg"]), ("pull_arrow",sf_vol_5, ["pull_arrow.ogg"]), ("arrow_pass_by",0, ["arrow_pass_by_1.ogg","arrow_pass_by_2.ogg","arrow_pass_by_3.ogg","arrow_pass_by_4.ogg"]), ("bolt_pass_by",0, ["bolt_pass_by_1.ogg"]), ("javelin_pass_by",0, ["javelin_pass_by_1.ogg","javelin_pass_by_2.ogg"]), ("stone_pass_by",sf_vol_9, ["stone_pass_by_1.ogg"]), ("axe_pass_by",0, ["axe_pass_by_1.ogg"]), ("knife_pass_by",0, ["knife_pass_by_1.ogg"]), ("bullet_pass_by",0, ["arrow_whoosh_1.ogg"]), ("incoming_arrow_hit_ground",sf_priority_7|sf_vol_7, ["arrow_hit_ground_2.ogg","arrow_hit_ground_3.ogg","incoming_bullet_hit_ground_1.ogg"]), ("incoming_bolt_hit_ground",sf_priority_7|sf_vol_7, ["arrow_hit_ground_2.ogg","arrow_hit_ground_3.ogg","incoming_bullet_hit_ground_1.ogg"]), ("incoming_javelin_hit_ground",sf_priority_7|sf_vol_7, ["incoming_javelin_hit_ground_1.ogg"]), ("incoming_stone_hit_ground",sf_priority_7|sf_vol_7, ["incoming_stone_hit_ground_1.ogg"]), ("incoming_axe_hit_ground",sf_priority_7|sf_vol_7, ["incoming_javelin_hit_ground_1.ogg"]), ("incoming_knife_hit_ground",sf_priority_7|sf_vol_7, ["incoming_stone_hit_ground_1.ogg"]), ("incoming_bullet_hit_ground",sf_priority_7|sf_vol_7, ["incoming_bullet_hit_ground_1.ogg"]), ("outgoing_arrow_hit_ground",sf_priority_7|sf_vol_7, ["outgoing_arrow_hit_ground.ogg"]), ("outgoing_bolt_hit_ground",sf_priority_7|sf_vol_7, ["outgoing_arrow_hit_ground.ogg"]), ("outgoing_javelin_hit_ground",sf_priority_7|sf_vol_10, ["outgoing_arrow_hit_ground.ogg"]), ("outgoing_stone_hit_ground",sf_priority_7|sf_vol_7, ["incoming_stone_hit_ground_1.ogg"]), ("outgoing_axe_hit_ground",sf_priority_7|sf_vol_7, ["incoming_javelin_hit_ground_1.ogg"]), ("outgoing_knife_hit_ground",sf_priority_7|sf_vol_7, ["incoming_stone_hit_ground_1.ogg"]), ("outgoing_bullet_hit_ground",sf_priority_7|sf_vol_7, ["incoming_bullet_hit_ground_1.ogg"]), ("draw_sword",sf_priority_4, ["draw_sword.ogg"]), ("put_back_sword",sf_priority_4, ["put_back_sword.ogg"]), ("draw_greatsword",sf_priority_4, ["draw_greatsword.ogg"]), ("put_back_greatsword",sf_priority_4, ["put_back_sword.ogg"]), ("draw_axe",sf_priority_4, ["draw_mace.ogg"]), ("put_back_axe",sf_priority_4, ["put_back_to_holster.ogg"]), ("draw_greataxe",sf_priority_4, ["draw_greataxe.ogg"]), ("put_back_greataxe",sf_priority_4, ["put_back_to_leather.ogg"]), ("draw_spear",sf_priority_4, ["draw_spear.ogg"]), ("put_back_spear",sf_priority_4, ["put_back_to_leather.ogg"]), ("draw_crossbow",sf_priority_4, ["draw_crossbow.ogg"]), ("put_back_crossbow",sf_priority_4, ["put_back_to_leather.ogg"]), ("draw_revolver",sf_priority_4, ["draw_from_holster.ogg"]), ("put_back_revolver",sf_priority_4, ["put_back_to_holster.ogg"]), ("draw_dagger",sf_priority_4, ["draw_dagger.ogg"]), ("put_back_dagger",sf_priority_4, ["put_back_dagger.ogg"]), ("draw_bow",sf_priority_4, ["draw_bow.ogg"]), ("put_back_bow",sf_priority_4, ["put_back_to_holster.ogg"]), ("draw_shield",sf_priority_4|sf_vol_7, ["draw_shield.ogg"]), ("put_back_shield",sf_priority_4|sf_vol_7, ["put_back_shield.ogg"]), ("draw_other",sf_priority_4, ["draw_other.ogg"]), ("put_back_other",sf_priority_4, ["draw_other2.ogg"]), ("body_fall_small",sf_priority_6|sf_vol_10, ["body_fall_small_1.ogg","body_fall_small_2.ogg"]), ("body_fall_big",sf_priority_6|sf_vol_10, ["body_fall_1.ogg","body_fall_2.ogg","body_fall_3.ogg"]), # ("body_fall_very_big",sf_priority_9|sf_vol_10, ["body_fall_very_big_1.ogg"]), ("horse_body_fall_begin",sf_priority_6|sf_vol_10, ["horse_body_fall_begin_1.ogg"]), ("horse_body_fall_end",sf_priority_6|sf_vol_10, ["horse_body_fall_end_1.ogg","body_fall_2.ogg","body_fall_very_big_1.ogg"]), ## ("clang_metal",sf_priority_9, ["clang_metal_1.ogg","clang_metal_2.ogg","s_swordClash1.wav","s_swordClash2.wav","s_swordClash3.wav"]), ("hit_wood_wood",sf_priority_7|sf_vol_10, ["hit_wood_wood_1.ogg","hit_wood_wood_2.ogg","hit_wood_wood_3.ogg","hit_wood_wood_4.ogg","hit_wood_metal_4.ogg","hit_wood_metal_5.ogg","hit_wood_metal_6.ogg"]),#dummy ("hit_metal_metal",sf_priority_7|sf_vol_10, ["hit_metal_metal_3.ogg","hit_metal_metal_4.ogg", "hit_metal_metal_5.ogg","hit_metal_metal_6.ogg","hit_metal_metal_7.ogg","hit_metal_metal_8.ogg", "hit_metal_metal_9.ogg","hit_metal_metal_10.ogg", "clang_metal_1.ogg","clang_metal_2.ogg"]), ("hit_wood_metal",sf_priority_7|sf_vol_10, ["hit_metal_metal_1.ogg","hit_metal_metal_2.ogg","hit_wood_metal_7.ogg"]), # ("clang_metal", sf_priority_9,["sword_clank_metal_09.ogg","sword_clank_metal_10.ogg","sword_clank_metal_12.ogg","sword_clank_metal_13.ogg"]), ## ("shield_hit_cut",sf_priority_5, ["shield_hit_cut_3.ogg","shield_hit_cut_4.ogg","shield_hit_cut_5.ogg"]), ("shield_hit_wood_wood",sf_priority_7|sf_vol_10, ["shield_hit_wood_wood_1.ogg","shield_hit_wood_wood_2.ogg","shield_hit_wood_wood_3.ogg"]), ("shield_hit_metal_metal",sf_priority_7|sf_vol_10, ["shield_hit_metal_metal_1.ogg","shield_hit_metal_metal_2.ogg","shield_hit_metal_metal_3.ogg","shield_hit_metal_metal_4.ogg"]), ("shield_hit_wood_metal",sf_priority_7|sf_vol_10, ["shield_hit_cut_3.ogg","shield_hit_cut_4.ogg","shield_hit_cut_5.ogg","shield_hit_cut_10.ogg"]), #(shield is wood) ("shield_hit_metal_wood",sf_priority_7|sf_vol_10, ["shield_hit_metal_wood_1.ogg","shield_hit_metal_wood_2.ogg","shield_hit_metal_wood_3.ogg"]),#(shield is metal) ("shield_broken",sf_priority_9, ["shield_broken.ogg"]), ("man_hit",sf_priority_7|sf_vol_10, ["man_hit_5.ogg","man_hit_6.ogg","man_hit_7.ogg","man_hit_8.ogg","man_hit_9.ogg","man_hit_10.ogg","man_hit_11.ogg","man_hit_12.ogg","man_hit_13.ogg","man_hit_14.ogg","man_hit_15.ogg", "man_hit_17.ogg","man_hit_18.ogg","man_hit_19.ogg","man_hit_22.ogg","man_hit_29.ogg","man_hit_32.ogg","man_hit_47.ogg","man_hit_57.ogg","man_hit_59.ogg"]), ("man_die",sf_priority_10, ["man_death_1.ogg","man_death_8.ogg","man_death_8b.ogg","man_death_11.ogg","man_death_14.ogg","man_death_16.ogg","man_death_18.ogg","man_death_21.ogg","man_death_29.ogg","man_death_40.ogg","man_death_44.ogg","man_death_46.ogg","man_death_48.ogg","man_death_64.ogg"]),# ["man_fall_1.ogg","man_fall_2.ogg","man_fall_3.ogg","man_fall_4.ogg"]), ("woman_hit",sf_priority_7, ["woman_hit_2.ogg","woman_hit_3.ogg", "woman_hit_b_2.ogg","woman_hit_b_4.ogg","woman_hit_b_6.ogg","woman_hit_b_7.ogg","woman_hit_b_8.ogg", "woman_hit_b_11.ogg","woman_hit_b_14.ogg","woman_hit_b_16.ogg"]), ("woman_die",sf_priority_10, ["woman_fall_1.ogg","woman_hit_b_5.ogg"]), ("hide",0, ["s_hide.wav"]), ("unhide",0, ["s_unhide.wav"]), ("neigh",0, ["horse_exterior_whinny_01.ogg","horse_exterior_whinny_02.ogg","horse_exterior_whinny_03.ogg","horse_exterior_whinny_04.ogg","horse_exterior_whinny_05.ogg","horse_whinny.ogg"]), ("gallop",sf_vol_3, ["horse_gallop_3.ogg","horse_gallop_4.ogg","horse_gallop_5.ogg"]), ("battle",sf_vol_4, ["battle.ogg"]), # ("bow_shoot_player",sf_priority_10|sf_vol_10, ["bow_shoot_4.ogg"]), # ("bow_shoot",sf_priority_4, ["bow_shoot_4.ogg"]), # ("crossbow_shoot",sf_priority_4, ["bow_shoot_2.ogg"]), ("arrow_hit_body",sf_priority_4, ["arrow_hit_body_1.ogg","arrow_hit_body_2.ogg","arrow_hit_body_3.ogg"]), ("metal_hit_low_armor_low_damage",sf_priority_5|sf_vol_9, ["sword_hit_lo_armor_lo_dmg_1.ogg","sword_hit_lo_armor_lo_dmg_2.ogg","sword_hit_lo_armor_lo_dmg_3.ogg"]), ("metal_hit_low_armor_high_damage",sf_priority_5|sf_vol_9, ["sword_hit_lo_armor_hi_dmg_1.ogg","sword_hit_lo_armor_hi_dmg_2.ogg","sword_hit_lo_armor_hi_dmg_3.ogg"]), ("metal_hit_high_armor_low_damage",sf_priority_5|sf_vol_9, ["metal_hit_high_armor_low_damage.ogg","metal_hit_high_armor_low_damage_2.ogg","metal_hit_high_armor_low_damage_3.ogg"]), ("metal_hit_high_armor_high_damage",sf_priority_5|sf_vol_9, ["sword_hit_hi_armor_hi_dmg_1.ogg","sword_hit_hi_armor_hi_dmg_2.ogg","sword_hit_hi_armor_hi_dmg_3.ogg"]), ("wooden_hit_low_armor_low_damage",sf_priority_5|sf_vol_9, ["blunt_hit_low_1.ogg","blunt_hit_low_2.ogg","blunt_hit_low_3.ogg"]), ("wooden_hit_low_armor_high_damage",sf_priority_5|sf_vol_9, ["blunt_hit_high_1.ogg","blunt_hit_high_2.ogg","blunt_hit_high_3.ogg"]), ("wooden_hit_high_armor_low_damage",sf_priority_5|sf_vol_9, ["wooden_hit_high_armor_low_damage.ogg","wooden_hit_high_armor_low_damage_2.ogg"]), ("wooden_hit_high_armor_high_damage",sf_priority_5|sf_vol_9, ["blunt_hit_high_1.ogg","blunt_hit_high_2.ogg","blunt_hit_high_3.ogg"]), ("blunt_hit",sf_priority_5|sf_vol_9, ["punch_1.ogg","punch_4.ogg","punch_4.ogg","punch_5.ogg"]), ("player_hit_by_arrow",sf_priority_10|sf_vol_10, ["player_hit_by_arrow.ogg"]), ("pistol_shot",sf_priority_10|sf_vol_10, ["fl_pistol.wav"]), ("man_grunt",sf_priority_6|sf_vol_4, ["man_excercise_1.ogg","man_excercise_2.ogg","man_excercise_4.ogg"]), ("man_breath_hard",sf_priority_3|sf_vol_8, ["man_ugh_1.ogg","man_ugh_2.ogg","man_ugh_4.ogg","man_ugh_7.ogg","man_ugh_12.ogg","man_ugh_13.ogg","man_ugh_17.ogg"]), ("man_grunt_long",sf_priority_5|sf_vol_8, ["man_grunt_1.ogg","man_grunt_2.ogg","man_grunt_3.ogg","man_grunt_5.ogg","man_grunt_13.ogg","man_grunt_14.ogg"]), ("man_yell",sf_priority_6|sf_vol_8, ["man_yell_4.ogg","man_yell_4_2.ogg","man_yell_7.ogg","man_yell_9.ogg","man_yell_11.ogg","man_yell_13.ogg","man_yell_15.ogg","man_yell_16.ogg","man_yell_17.ogg","man_yell_20.ogg","man_shortyell_4.ogg","man_shortyell_5.ogg","man_shortyell_6.ogg","man_shortyell_9.ogg","man_shortyell_11.ogg","man_shortyell_11b.ogg", "man_yell_b_18.ogg","man_yell_22.ogg","man_yell_b_21.ogg","man_yell_b_22.ogg","man_yell_b_23.ogg","man_yell_c_20.ogg"]), #TODONOW: ("man_warcry",sf_priority_6, ["man_insult_2.ogg","man_insult_3.ogg","man_insult_7.ogg","man_insult_9.ogg","man_insult_13.ogg","man_insult_15.ogg","man_insult_16.ogg"]), ("encounter_looters",sf_2d|sf_vol_5, ["encounter_river_pirates_5.ogg","encounter_river_pirates_6.ogg","encounter_river_pirates_9.ogg","encounter_river_pirates_10.ogg","encounter_river_pirates_4.ogg"]), ("encounter_bandits",sf_2d|sf_vol_5, ["encounter_bandit_2.ogg","encounter_bandit_9.ogg","encounter_bandit_12.ogg","encounter_bandit_13.ogg","encounter_bandit_15.ogg","encounter_bandit_16.ogg","encounter_bandit_10.ogg",]), ("encounter_farmers",sf_2d|sf_vol_5, ["encounter_farmer_2.ogg","encounter_farmer_5.ogg","encounter_farmer_7.ogg","encounter_farmer_9.ogg"]), ("encounter_sea_raiders",sf_2d|sf_vol_5, ["encounter_sea_raider_5.ogg","encounter_sea_raider_9.ogg","encounter_sea_raider_9b.ogg","encounter_sea_raider_10.ogg"]), ("encounter_steppe_bandits",sf_2d|sf_vol_5, ["encounter_steppe_bandit_3.ogg","encounter_steppe_bandit_3b.ogg","encounter_steppe_bandit_8.ogg","encounter_steppe_bandit_10.ogg","encounter_steppe_bandit_12.ogg"]), ("encounter_nobleman",sf_2d|sf_vol_5, ["encounter_nobleman_1.ogg"]), ("encounter_vaegirs_ally",sf_2d|sf_vol_5, ["encounter_vaegirs_ally.ogg","encounter_vaegirs_ally_2.ogg"]), ("encounter_vaegirs_neutral",sf_2d|sf_vol_5, ["encounter_vaegirs_neutral.ogg","encounter_vaegirs_neutral_2.ogg","encounter_vaegirs_neutral_3.ogg","encounter_vaegirs_neutral_4.ogg"]), ("encounter_vaegirs_enemy",sf_2d|sf_vol_5, ["encounter_vaegirs_neutral.ogg","encounter_vaegirs_neutral_2.ogg","encounter_vaegirs_neutral_3.ogg","encounter_vaegirs_neutral_4.ogg"]), ("sneak_town_halt",sf_2d, ["sneak_halt_1.ogg","sneak_halt_2.ogg"]), ("horse_walk",sf_priority_3|sf_vol_9, ["horse_walk_1.ogg","horse_walk_2.ogg","horse_walk_3.ogg","horse_walk_4.ogg"]), ("horse_trot",sf_priority_3|sf_vol_4, ["horse_trot_1.ogg","horse_trot_2.ogg","horse_trot_3.ogg","horse_trot_4.ogg"]), ("horse_canter",sf_priority_3|sf_vol_6, ["horse_canter_1.ogg","horse_canter_2.ogg","horse_canter_3.ogg","horse_canter_4.ogg"]), ("horse_gallop",sf_priority_3|sf_vol_8, ["horse_gallop_6.ogg","horse_gallop_7.ogg","horse_gallop_8.ogg","horse_gallop_9.ogg"]), ("horse_breath",sf_priority_3|sf_priority_9|sf_vol_10, ["horse_breath_4.ogg","horse_breath_5.ogg","horse_breath_6.ogg","horse_breath_7.ogg"]), ("horse_snort",sf_priority_5|sf_vol_7, ["horse_snort_1.ogg","horse_snort_2.ogg","horse_snort_3.ogg","horse_snort_4.ogg","horse_snort_5.ogg"]), ("horse_low_whinny",sf_vol_9, ["horse_whinny-1.ogg","horse_whinny-2.ogg"]), ("block_fist",0, ["block_fist_3.ogg","block_fist_4.ogg"]), ("man_hit_blunt_weak",sf_priority_5|sf_vol_10, ["man_hit_13.ogg","man_hit_29.ogg","man_hit_32.ogg","man_hit_47.ogg","man_hit_57.ogg"]), ("man_hit_blunt_strong",sf_priority_5|sf_vol_10, ["man_hit_13.ogg","man_hit_29.ogg","man_hit_32.ogg","man_hit_47.ogg","man_hit_57.ogg"]), ("man_hit_pierce_weak",sf_priority_5|sf_vol_10, ["man_hit_13.ogg","man_hit_29.ogg","man_hit_32.ogg","man_hit_47.ogg","man_hit_57.ogg"]), ("man_hit_pierce_strong",sf_priority_5|sf_vol_10, ["man_hit_13.ogg","man_hit_29.ogg","man_hit_32.ogg","man_hit_47.ogg","man_hit_57.ogg"]), ("man_hit_cut_weak",sf_priority_5|sf_vol_10, ["man_hit_13.ogg","man_hit_29.ogg","man_hit_32.ogg","man_hit_47.ogg","man_hit_57.ogg"]), ("man_hit_cut_strong",sf_priority_5|sf_vol_10, ["man_hit_13.ogg","man_hit_29.ogg","man_hit_32.ogg","man_hit_47.ogg","man_hit_57.ogg"]), ("man_victory",sf_priority_5|sf_vol_10, ["man_victory_3.ogg","man_victory_4.ogg","man_victory_5.ogg","man_victory_8.ogg","man_victory_15.ogg","man_victory_49.ogg","man_victory_52.ogg","man_victory_54.ogg","man_victory_57.ogg","man_victory_71.ogg"]), ("fire_loop",sf_priority_9|sf_vol_4|sf_looping|sf_start_at_random_pos, ["Fire_Torch_Loop3.ogg"]), ("torch_loop",sf_priority_9|sf_vol_4|sf_looping|sf_start_at_random_pos, ["Fire_Torch_Loop3.ogg"]), ("dummy_hit",sf_priority_9, ["shield_hit_cut_3.ogg","shield_hit_cut_5.ogg"]), ("dummy_destroyed",sf_priority_9, ["shield_broken.ogg"]), ("gourd_destroyed",sf_priority_9, ["shield_broken.ogg"]),#TODO ("cow_moo", sf_2d|sf_priority_9|sf_vol_8, ["cow_moo_1.ogg"]), ("cow_slaughter", sf_2d|sf_priority_9|sf_vol_8, ["cow_slaughter.ogg"]), ("distant_dog_bark", sf_2d|sf_priority_8|sf_vol_8, ["d_dog1.ogg","d_dog2.ogg","d_dog3.ogg","d_dog7.ogg"]), ("distant_owl", sf_2d|sf_priority_8|sf_vol_9, ["d_owl2.ogg","d_owl3.ogg","d_owl4.ogg"]), ("distant_chicken", sf_2d|sf_priority_8|sf_vol_8, ["d_chicken1.ogg","d_chicken2.ogg"]), ("distant_carpenter", sf_2d|sf_priority_8|sf_vol_3, ["d_carpenter1.ogg","d_saw_short3.ogg"]), ("distant_blacksmith", sf_2d|sf_priority_8|sf_vol_4, ["d_blacksmith2.ogg"]), ("arena_ambiance", sf_2d|sf_priority_8|sf_vol_3|sf_looping, ["arena_loop11.ogg"]), ("town_ambiance", sf_2d|sf_priority_8|sf_vol_3|sf_looping, ["town_loop_3.ogg"]), ]
Python
import string import types from module_info import * from module_game_menus import * from process_common import * from process_operations import * def save_game_menu_item(ofile,variable_list,variable_uses,menu_item,tag_uses,quick_strings): ofile.write(" mno_%s "%(menu_item[0])) save_statement_block(ofile,0, 1, menu_item[1], variable_list, variable_uses,tag_uses,quick_strings) ofile.write(" %s "%(string.replace(menu_item[2]," ","_"))) save_statement_block(ofile,0, 1, menu_item[3], variable_list, variable_uses,tag_uses,quick_strings) door_name = "." if (len(menu_item) > 4): door_name = menu_item[4] ofile.write(" %s "%(string.replace(door_name," ","_"))) def save_game_menus(variable_list,variable_uses,tag_uses,quick_strings): ofile = open(export_dir + "menus.txt","w") ofile.write("menusfile version 1\n") ofile.write(" %d\n"%(len(game_menus))) for game_menu in game_menus: ofile.write("menu_%s %d %s %s"%(game_menu[0],game_menu[1],string.replace(game_menu[2]," ","_"),game_menu[3])) save_statement_block(ofile,0,1, game_menu[4] , variable_list, variable_uses,tag_uses,quick_strings) menu_items = game_menu[5] ofile.write("%d\n"%(len(menu_items))) for menu_item in menu_items: save_game_menu_item(ofile,variable_list,variable_uses,menu_item,tag_uses,quick_strings) ofile.write("\n") ofile.close() def save_python_header(): ofile = open("./ID_menus.py","w") for i_game_menu in xrange(len(game_menus)): ofile.write("menu_%s = %d\n"%(game_menus[i_game_menu][0],i_game_menu)) ofile.close() print "Exporting game menus data..." save_python_header() variable_uses = [] variables = load_variables(export_dir, variable_uses) tag_uses = load_tag_uses(export_dir) quick_strings = load_quick_strings(export_dir) save_game_menus(variables,variable_uses,tag_uses,quick_strings) save_variables(export_dir,variables,variable_uses) save_tag_uses(export_dir, tag_uses) save_quick_strings(export_dir,quick_strings)
Python
import string from module_info import * from module_map_icons import * from process_common import * from process_operations import * def save_map_icons(variable_list,variable_uses,tag_uses,quick_strings): ofile = open(export_dir + "map_icons.txt","w") ofile.write("map_icons_file version 1\n") ofile.write("%d\n"%len(map_icons)) for map_icon in map_icons: triggers = [] if (len(map_icon) >= 8): ofile.write("%s %d %s %f %d %f %f %f "%(map_icon[0],map_icon[1],map_icon[2],map_icon[3],map_icon[4],map_icon[5],map_icon[6],map_icon[7])) if (len(map_icon) == 9): triggers = map_icon[8] else: ofile.write("%s %d %s %f %d 0 0 0 "%(map_icon[0],map_icon[1],map_icon[2],map_icon[3],map_icon[4])) if (len(map_icon) == 6): triggers = map_icon[5] save_simple_triggers(ofile,triggers, variable_list,variable_uses,tag_uses,quick_strings) ofile.write("\n") ofile.close() def save_python_header(): ofile = open("./ID_map_icons.py","w") for i_map_icon in xrange(len(map_icons)): ofile.write("icon_%s = %d\n"%(map_icons[i_map_icon][0],i_map_icon)) ofile.close() print "Exporting map icons..." save_python_header() variable_uses = [] variables = load_variables(export_dir,variable_uses) tag_uses = load_tag_uses(export_dir) quick_strings = load_quick_strings(export_dir) save_map_icons(variables,variable_uses,tag_uses,quick_strings) save_variables(export_dir,variables,variable_uses) save_tag_uses(export_dir,tag_uses) save_quick_strings(export_dir,quick_strings)
Python
snd_click = 0 snd_tutorial_1 = 1 snd_tutorial_2 = 2 snd_gong = 3 snd_quest_taken = 4 snd_quest_completed = 5 snd_quest_succeeded = 6 snd_quest_concluded = 7 snd_quest_failed = 8 snd_quest_cancelled = 9 snd_rain = 10 snd_money_received = 11 snd_money_paid = 12 snd_sword_clash_1 = 13 snd_sword_clash_2 = 14 snd_sword_clash_3 = 15 snd_sword_swing = 16 snd_footstep_grass = 17 snd_footstep_wood = 18 snd_footstep_water = 19 snd_footstep_horse = 20 snd_footstep_horse_1b = 21 snd_footstep_horse_1f = 22 snd_footstep_horse_2b = 23 snd_footstep_horse_2f = 24 snd_footstep_horse_3b = 25 snd_footstep_horse_3f = 26 snd_footstep_horse_4b = 27 snd_footstep_horse_4f = 28 snd_footstep_horse_5b = 29 snd_footstep_horse_5f = 30 snd_jump_begin = 31 snd_jump_end = 32 snd_jump_begin_water = 33 snd_jump_end_water = 34 snd_horse_jump_begin = 35 snd_horse_jump_end = 36 snd_horse_jump_begin_water = 37 snd_horse_jump_end_water = 38 snd_release_bow = 39 snd_release_crossbow = 40 snd_throw_javelin = 41 snd_throw_axe = 42 snd_throw_knife = 43 snd_throw_stone = 44 snd_reload_crossbow = 45 snd_reload_crossbow_continue = 46 snd_pull_bow = 47 snd_pull_arrow = 48 snd_arrow_pass_by = 49 snd_bolt_pass_by = 50 snd_javelin_pass_by = 51 snd_stone_pass_by = 52 snd_axe_pass_by = 53 snd_knife_pass_by = 54 snd_bullet_pass_by = 55 snd_incoming_arrow_hit_ground = 56 snd_incoming_bolt_hit_ground = 57 snd_incoming_javelin_hit_ground = 58 snd_incoming_stone_hit_ground = 59 snd_incoming_axe_hit_ground = 60 snd_incoming_knife_hit_ground = 61 snd_incoming_bullet_hit_ground = 62 snd_outgoing_arrow_hit_ground = 63 snd_outgoing_bolt_hit_ground = 64 snd_outgoing_javelin_hit_ground = 65 snd_outgoing_stone_hit_ground = 66 snd_outgoing_axe_hit_ground = 67 snd_outgoing_knife_hit_ground = 68 snd_outgoing_bullet_hit_ground = 69 snd_draw_sword = 70 snd_put_back_sword = 71 snd_draw_greatsword = 72 snd_put_back_greatsword = 73 snd_draw_axe = 74 snd_put_back_axe = 75 snd_draw_greataxe = 76 snd_put_back_greataxe = 77 snd_draw_spear = 78 snd_put_back_spear = 79 snd_draw_crossbow = 80 snd_put_back_crossbow = 81 snd_draw_revolver = 82 snd_put_back_revolver = 83 snd_draw_dagger = 84 snd_put_back_dagger = 85 snd_draw_bow = 86 snd_put_back_bow = 87 snd_draw_shield = 88 snd_put_back_shield = 89 snd_draw_other = 90 snd_put_back_other = 91 snd_body_fall_small = 92 snd_body_fall_big = 93 snd_horse_body_fall_begin = 94 snd_horse_body_fall_end = 95 snd_hit_wood_wood = 96 snd_hit_metal_metal = 97 snd_hit_wood_metal = 98 snd_shield_hit_wood_wood = 99 snd_shield_hit_metal_metal = 100 snd_shield_hit_wood_metal = 101 snd_shield_hit_metal_wood = 102 snd_shield_broken = 103 snd_man_hit = 104 snd_man_die = 105 snd_woman_hit = 106 snd_woman_die = 107 snd_hide = 108 snd_unhide = 109 snd_neigh = 110 snd_gallop = 111 snd_battle = 112 snd_arrow_hit_body = 113 snd_metal_hit_low_armor_low_damage = 114 snd_metal_hit_low_armor_high_damage = 115 snd_metal_hit_high_armor_low_damage = 116 snd_metal_hit_high_armor_high_damage = 117 snd_wooden_hit_low_armor_low_damage = 118 snd_wooden_hit_low_armor_high_damage = 119 snd_wooden_hit_high_armor_low_damage = 120 snd_wooden_hit_high_armor_high_damage = 121 snd_blunt_hit = 122 snd_player_hit_by_arrow = 123 snd_pistol_shot = 124 snd_man_grunt = 125 snd_man_breath_hard = 126 snd_man_grunt_long = 127 snd_man_yell = 128 snd_man_warcry = 129 snd_encounter_looters = 130 snd_encounter_bandits = 131 snd_encounter_farmers = 132 snd_encounter_sea_raiders = 133 snd_encounter_steppe_bandits = 134 snd_encounter_nobleman = 135 snd_encounter_vaegirs_ally = 136 snd_encounter_vaegirs_neutral = 137 snd_encounter_vaegirs_enemy = 138 snd_sneak_town_halt = 139 snd_horse_walk = 140 snd_horse_trot = 141 snd_horse_canter = 142 snd_horse_gallop = 143 snd_horse_breath = 144 snd_horse_snort = 145 snd_horse_low_whinny = 146 snd_block_fist = 147 snd_man_hit_blunt_weak = 148 snd_man_hit_blunt_strong = 149 snd_man_hit_pierce_weak = 150 snd_man_hit_pierce_strong = 151 snd_man_hit_cut_weak = 152 snd_man_hit_cut_strong = 153 snd_man_victory = 154 snd_fire_loop = 155 snd_torch_loop = 156 snd_dummy_hit = 157 snd_dummy_destroyed = 158 snd_gourd_destroyed = 159 snd_cow_moo = 160 snd_cow_slaughter = 161 snd_distant_dog_bark = 162 snd_distant_owl = 163 snd_distant_chicken = 164 snd_distant_carpenter = 165 snd_distant_blacksmith = 166 snd_arena_ambiance = 167 snd_town_ambiance = 168
Python
from header_common import * from header_animations import * #################################################################################################################### # There are two animation arrays (one for human and one for horse). Each animation in these arrays contains the following fields: # 1) Animation id (string): used for referencing animations in other files. The prefix anim_ is automatically added before each animation-id . # 2) Animation flags: could be anything beginning with acf_ defined in header_animations.py # 3) Animation sequences (list). # 3.1) Duration of the sequence. # 3.2) Name of the animation resource. # 3.3) Beginning frame of the sequence within the animation resource. # 3.4) Ending frame of the sequence within the animation resource. # 3.5) Sequence flags: could be anything beginning with arf_ defined in header_animations.py # #################################################################################################################### #plan : # basic movement : walk ride etc. 0 -20000 # on_foot : 0 - 10000 # horse : 10000 - 20000 # combat : 20000 - 40000 # fall : 4000 - 70000 # act : misc. 70000 - ... horse_move = 10000 combat = 20000 defend = 35000 blow = 40000 attack_parry_duration = 0.45 defend_parry_duration = 0.3 ready_durn = 0.35 defend_duration = 0.25 pole_defend_duration = 0.4 cancel_duration = 0.25 blend_in_defense = arf_blend_in_5 blend_in_ready = arf_blend_in_6 blend_in_release = arf_blend_in_5 blend_in_parry = arf_blend_in_5 blend_in_walk = arf_blend_in_3 #### Animations begin here # All of the animations are hardcoded. You can edit the individual sequences, resources or times. But each # animation must stay at the same position, otherwise the game won't run properly. If you want to add a new animation, # you can change both the ids and values of the animations which are named as unused_human_anim_??? # and unused_horse_anim_??? (??? = any number). You must not change used animations' ids. animations = [ ["stand", 0, # [3.0, "myanim", 0, 50, arf_cyclic|arf_loop_pos_0_25], [3.0, "anim_human", 50, 52, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25], [3.0, "anim_human", 60, 62, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.75], [3.0, "anim_human", 70, 72, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25], [3.0, "anim_human", 80, 82, arf_use_stand_progress|arf_cyclic|arf_two_handed_blade, 0, (0, 0, 0), 0.5], ## [35.0, "stand_woman", 0, 1059, arf_use_stand_progress|arf_cyclic|arf_two_handed_blade, 0, (0, 0, 0), 0.5], ## [43.0, "stand_woman_public", 0, 1313, arf_use_stand_progress|arf_cyclic|arf_two_handed_blade, 0, (0, 0, 0), 0.5], # [35.0, "tavern_stand", 0, 472, arf_cyclic|arf_loop_pos_0_25], ], ["stand_man", 0, # [3.0, "lord_stand", 0, 72, arf_cyclic|arf_loop_pos_0_25], [3.5, "anim_human", 90, 100, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25], [3.5, "anim_human", 110, 120, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25], # [124.0, "stand_shopkeeper", 0, 3740, arf_cyclic|arf_loop_pos_0_25], # [80.0, "stand_guardsman", 0, 2397, arf_cyclic|arf_loop_pos_0_25], ], ["jump", acf_enforce_lowerbody, [1.09, "jump", 22, 48, arf_blend_in_1], ## [0.8, "anim_human", 270, 272, arf_blend_in_4], ], ["jump_end", acf_enforce_lowerbody, [0.3, "jump", 48, 55, arf_blend_in_1], ], ["stand_unarmed", 0, [8, "noweapon_cstance", 0, 100, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25], ], ["stand_single", 0, [9.0, "sword_loop01", 0, 200, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25], # [4.0, "sword_loop02", 0, 100, arf_cyclic|arf_loop_pos_0_25], ], ["stand_greatsword", 0, [6.0, "greatsword_cstance", 0, 91, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25], ], ["stand_staff", 0, [2.0, "staff_cstance", 0, 60, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.0], ], ["stand_crossbow", 0, [2.0, "staff_cstance", 0, 60, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.0], ], ["walk_forward", acf_enforce_lowerbody, # [1.0, "anim_human", 6000, 6020, arf_walk,pack2f(0.4,0.9)], [1.0, "man_walk", 0, 32, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_forward_onehanded", acf_enforce_lowerbody, # [1.0, "anim_human", 6000, 6020, arf_walk,pack2f(0.4,0.9)], [1.0, "man_walk", 0, 32, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_forward_staff", acf_enforce_lowerbody, [1.0, "anim_human", 6100, 6120, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_forward_greatsword", acf_enforce_lowerbody, [1.0, "anim_human", 6200, 6220, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_backward", acf_enforce_lowerbody, ## [1.0, "anim_human", 6020, 6000, arf_phase_odd|arf_walk,pack2f(0.4,0.9)], [1.0, "anim_human", 6020, 6000, arf_use_inv_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_backward_onehanded", acf_enforce_lowerbody, # [1.0, "anim_human", 6000, 6020, arf_walk,pack2f(0.4,0.9)], [1.0, "man_walk", 32, 0, arf_use_inv_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_backward_staff", acf_enforce_lowerbody, [1.0, "anim_human", 6120, 6100, arf_use_inv_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_backward_greatsword", acf_enforce_lowerbody, [1.0, "anim_human", 6220, 6200, arf_use_inv_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["run_forward", acf_enforce_lowerbody, # [0.8, "anim_human", 7000, 7040, arf_use_walk_progress|arf_cyclic|blend_in_walk,pack2f(0.4,0.9)], [0.8, "run_man_forward", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.4], ], ["run_forward_onehanded", acf_enforce_lowerbody, # [0.8, "anim_human", 7000, 7040, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9)], # [0.8, "run_normal", 0, 12, arf_use_walk_progress|arf_cyclic|blend_in_walk,pack2f(0.4,0.9)], [0.8, "run_man_forward_onehanded", 0, 24, arf_use_walk_progress|arf_cyclic|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.4], ], ["run_forward_staff", acf_enforce_lowerbody, # [0.8, "anim_human", 7100, 7140, arf_use_walk_progress|arf_cyclic|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ## [0.8, "run_greatsword", 0, 22, arf_use_walk_progress|arf_cyclic|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], [0.8, "run_forward_staff", 0, 24, arf_use_walk_progress|arf_cyclic|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.4], ], ["run_forward_greatsword", acf_enforce_lowerbody, # [0.8, "anim_human", 7200, 7240, arf_use_walk_progress|arf_cyclic|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ## [0.8, "run_greatsword", 0, 22, arf_use_walk_progress|arf_cyclic|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], [0.8, "run_forward_greatsword", 0, 24, arf_use_walk_progress|arf_cyclic|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.4], ], ["run_forward_right", acf_enforce_lowerbody, ## [0.8, "run_normal", 0, 22, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], [0.8, "run_man_right", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.4], ], ["run_forward_right_onehanded", acf_enforce_lowerbody, ## [0.8, "run_crossright_onehanded", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.4], [0.8, "run_man_forward_right_onehanded", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.4], ], ["run_forward_right_staff", acf_enforce_lowerbody, ## [0.8, "run_crossright_staff", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.4], [0.8, "run_man_forward_right_stuff", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.4], ], ["run_forward_right_greatsword", acf_enforce_lowerbody, ## [0.8, "run_crossright_greatsword", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.4], [0.8, "run_man_forward_right_greatsword", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.4], ], ["run_forward_left", acf_enforce_lowerbody, ## [0.8, "run_normal", 0, 22, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], [0.8, "run_man_left", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.4], ], ["run_forward_left_onehanded", acf_enforce_lowerbody, ## [0.8, "run_crossleft_onehanded", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.4], [0.8, "run_man_forward_left_onehanded", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.4], ], ["run_forward_left_staff", acf_enforce_lowerbody, ## [0.8, "run_crossleft_staff", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.4], [0.8, "run_man_forward_left_stuff", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.4], ], ["run_forward_left_greatsword", acf_enforce_lowerbody, ## [0.8, "run_crossleft_greatsword", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.4], [0.8, "run_man_forward_left_greatsword", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.4], ], ["run_backward", acf_enforce_lowerbody, # [1.0, "anim_human", 7040, 7000, arf_use_inv_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], [1.0, "run_man_forward", 24, 0, arf_use_inv_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.4], ], ["run_backward_onehanded", acf_enforce_lowerbody, [1.0, "anim_human", 7040, 7000, arf_use_inv_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["run_backward_staff", acf_enforce_lowerbody, [1.0, "anim_human", 7140, 7100, arf_use_inv_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["run_backward_greatsword", acf_enforce_lowerbody, [1.0, "anim_human", 7240, 7200, arf_use_inv_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_right", acf_enforce_lowerbody, [1.0, "walk_right_normal", 0, 32, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_right_onehanded", acf_enforce_lowerbody, [1.0, "walk_right_onehanded_r", 0, 32, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_right_twohanded", acf_enforce_lowerbody, [1.0, "walk_right_greatsword_r", 0, 32, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_right_polearm", acf_enforce_lowerbody, [1.0, "walk_right_staff_r", 0, 32, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_left", acf_enforce_lowerbody, [1.0, "walk_left_normal", 0, 32, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_left_onehanded", acf_enforce_lowerbody, [1.0, "walk_left_onehanded_r", 0, 32, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_left_twohanded", acf_enforce_lowerbody, [1.0, "walk_left_greatsword", 0, 32, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_left_polearm", acf_enforce_lowerbody, [1.0, "walk_left_staff", 0, 32, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_forward_right", acf_enforce_lowerbody, [1.0, "walk_crossright_normal", 0, 32, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_forward_right_onehanded", acf_enforce_lowerbody, [1.0, "walk_crossright_onehanded", 0, 32, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_forward_right_twohanded", acf_enforce_lowerbody, [1.0, "walk_crossright_greatsword", 0, 32, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_forward_right_polearm", acf_enforce_lowerbody, [1.0, "walk_crossright_staff", 0, 32, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_forward_left", acf_enforce_lowerbody, [1.0, "walk_crossleft_normal", 0, 32, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_forward_left_onehanded", acf_enforce_lowerbody, [1.0, "walk_crossleft_onehanded", 0, 32, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_forward_left_twohanded", acf_enforce_lowerbody, [1.0, "walk_crossleft_greatsword", 0, 32, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_forward_left_polearm", acf_enforce_lowerbody, [1.0, "walk_crossleft_staff", 0, 32, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_backward_left", acf_enforce_lowerbody, [1.0, "walk_crossright_normal", 32, 0, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_backward_left_onehanded", acf_enforce_lowerbody, [1.0, "walk_crossright_onehanded", 32, 0, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_backward_left_twohanded", acf_enforce_lowerbody, [1.0, "walk_crossright_greatsword", 32, 0, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_backward_left_polearm", acf_enforce_lowerbody, [1.0, "walk_crossright_staff", 32, 0, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_backward_right", acf_enforce_lowerbody, [1.0, "walk_crossleft_normal", 32, 0, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_backward_right_onehanded", acf_enforce_lowerbody, [1.0, "walk_crossleft_onehanded", 32, 0, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_backward_right_twohanded", acf_enforce_lowerbody, [1.0, "walk_crossleft_greatsword", 32, 0, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["walk_backward_right_polearm", acf_enforce_lowerbody, [1.0, "walk_crossleft_staff", 32, 0, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["run_right", acf_enforce_lowerbody, # [0.8, "anim_human", 9000, 9020, arf_use_walk_progress|arf_cyclic|blend_in_walk,pack2f(0.4,0.9), (0, 0, 0), 0.0], ## [0.8, "run_right_normal", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], [0.8, "run_man_right", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["run_right_onehanded", acf_enforce_lowerbody, # [0.8, "run_right_onehanded", 0, 12, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ## [0.8, "run_right_onehanded", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], [0.8, "run_man_right_onehanded", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["run_right_twohanded", acf_enforce_lowerbody, # [0.8, "run_right_greatsword", 0, 12, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ## [0.8, "run_right_greatsword", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], [0.8, "run_man_right_greatsword", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["run_right_polearm", acf_enforce_lowerbody, # [0.8, "run_right_staff", 0, 12, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ## [0.8, "run_right_staff", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], [0.8, "run_man_right_stuff", 0, 24, arf_use_walk_progress|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["run_left", acf_enforce_lowerbody, # [0.8, "anim_human", 9500, 9520, arf_use_walk_progress|arf_cyclic|arf_cyclic|blend_in_walk,pack2f(0.4,0.9), (0, 0, 0), 0.0], ## [0.8, "run_left_normal", 0, 24, arf_use_walk_progress|arf_cyclic|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], [0.8, "run_man_left", 0, 24, arf_use_walk_progress|arf_cyclic|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["run_left_onehanded", acf_enforce_lowerbody, # [0.8, "run_left_onehanded", 0, 12, arf_use_walk_progress|arf_cyclic|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], [0.8, "run_man_left_onehanded", 0, 24, arf_use_walk_progress|arf_cyclic|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["run_left_twohanded", acf_enforce_lowerbody, # [0.8, "anim_human", 9500, 9520, arf_use_walk_progress|arf_cyclic|arf_cyclic|blend_in_walk,pack2f(0.4,0.9), (0, 0, 0), 0.0], # [0.8, "run_left_greatsword", 0, 12, arf_use_walk_progress|arf_cyclic|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ## [0.8, "run_left_greatsword", 0, 24, arf_use_walk_progress|arf_cyclic|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], [0.8, "run_man_left_greatsword", 0, 24, arf_use_walk_progress|arf_cyclic|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["run_left_polearm", acf_enforce_lowerbody, # [0.8, "run_left_staff", 0, 12, arf_use_walk_progress|arf_cyclic|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ## [0.8, "run_left_staff", 0, 24, arf_use_walk_progress|arf_cyclic|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], [0.8, "run_man_left_stuff", 0, 24, arf_use_walk_progress|arf_cyclic|arf_cyclic|blend_in_walk|arf_make_walk_sound,pack2f(0.4,0.9), (0, 0, 0), 0.0], ], ["ride_0", acf_enforce_lowerbody, ## [10.0, "anim_human", horse_move+2000, horse_move+2100, arf_cyclic], # [3.0, "anim_human_02", 600, 644, arf_cyclic], ## [37.0, "stand_onhorse", 0, 1110, arf_cyclic], ## [22.0, "stand_onhorse_sword", 0, 671, arf_cyclic], [15.0, "stand_onhorse", 0, 456, arf_cyclic], ], ["ride_1", acf_enforce_lowerbody | acf_synch_with_horse, [1.0, "anim_human_02", 0, 31, arf_cyclic], ], ["lancer_ride_1", acf_enforce_lowerbody | acf_synch_with_horse, [0.8, "anim_human", horse_move+210, horse_move+250, arf_cyclic | arf_blend_in_16], ], ["lancer_charge_parried",acf_enforce_lowerbody, [1.0, "anim_human", horse_move+210, horse_move+220, arf_blend_in_32], ], ["ride_2", acf_enforce_lowerbody | acf_synch_with_horse, [0.8, "anim_human_02", 50, 69, arf_cyclic], ], ["ride_3", acf_enforce_lowerbody | acf_synch_with_horse, [0.6, "anim_human_02", 100, 116, arf_cyclic], ], ["ride_4", acf_enforce_lowerbody | acf_synch_with_horse, [0.5, "anim_human_02", 150, 165, arf_cyclic], ], ["lancer_ride_4", acf_enforce_lowerbody | acf_synch_with_horse | acf_parallels_for_look_slope|acf_anim_length(100), [0.5, "anim_human", horse_move+610, horse_move+650, arf_cyclic | arf_blend_in_128], ], ["ride_rear", acf_enforce_lowerbody|acf_ignore_slope, ## [1.4, "anim_human", horse_move+820, horse_move+837, arf_blend_in_16], ## [2.4, "anim_human", horse_move+820, horse_move+837, arf_blend_in_16], [2.0, "anim_human_02", 260, 301, arf_blend_in_8], ], ["ride_spur", acf_enforce_lowerbody, [0.3, "anim_human", horse_move+860, horse_move+865, arf_blend_in_8], ], ["ride_jump", acf_enforce_lowerbody, ## [1.6, "anim_human_02", 400, 420, arf_blend_in_16], [1.6, "anim_human_02", 205, 222, arf_blend_in_4],#|arf_end_pos_0_25], ], ["ride_jump_end", acf_enforce_all, ## [0.1, "anim_human", horse_move+935, horse_move+940, arf_blend_in_16], ## [0.3, "anim_human_02", 420, 424, arf_blend_in_16], [0.1, "anim_human_02", 222, 224, arf_blend_in_16], ], ["ride_turn_right", acf_enforce_lowerbody | acf_synch_with_horse, [1.0, "anim_human_02", 500, 533, arf_cyclic], ], ["ride_turn_left", acf_enforce_lowerbody | acf_synch_with_horse, [1.0, "anim_human_02", 450, 483, arf_cyclic], ], ["mount_horse", acf_enforce_all, [2.0, "anim_human", horse_move+1000, horse_move+1050, arf_blend_in_1, 0, (0.0,0,0.0)], ], ["dismount_horse", acf_enforce_lowerbody|acf_displace_position, [2.0, "anim_human", horse_move+1100, horse_move+1150, arf_blend_in_1, 0, (-0.5,0,0)], ], ["lancer_ride_0", acf_enforce_lowerbody, ## [4.0, "anim_human", horse_move + 5000, horse_move + 5057, arf_lancer|arf_cyclic], [43.0, "stand_onhorse_staff", 0, 1300, arf_lancer|arf_cyclic], ], ["equip_default", 0, ## [0.6, "anim_human", combat+0, combat+20, arf_blend_in_0], [0.6, "equip_arms", 206, 221, arf_blend_in_0], ], ["unequip_default", 0, ## [0.3, "anim_human", combat+10, combat+0, arf_blend_in_0], [0.3, "equip_arms", 207, 200, arf_blend_in_0], ], ["equip_sword", 0, [0.8, "equip_sword", 0, 27, arf_blend_in_0], ## [0.6, "draw_greatsword", 0, 52, arf_blend_in_0], ## [0.6, "anim_human", combat+0, combat+20, arf_blend_in_0], ], ["unequip_sword", 0, # [0.3, "anim_human", combat+10, combat+0, arf_blend_in_0], [0.3, "equip_sword", 6, 0, arf_blend_in_0], ], ["equip_greatsword", 0, [1.2, "draw_greatsword", 0, 35, arf_blend_in_0], ], ["unequip_greatsword", 0, [0.3, "draw_greatsword", 10, 0, arf_blend_in_0], ], ["equip_axe_left_hip", 0, [0.8, "draw_axe", 0, 16, arf_blend_in_0], ], ["unequip_axe_left_hip", 0, [0.3, "draw_axe", 6, 0, arf_blend_in_0], ], ["equip_crossbow", 0, [1.2, "equip_greataxe", 0, 20, arf_blend_in_0], ], ["unequip_crossbow", 0, [0.3, "equip_greataxe", 10, 0, arf_blend_in_0], ], ["equip_spear", 0, ## [0.6, "anim_human", combat+30, combat+45, arf_blend_in_0], [0.8, "equip_arms", 17, 34, arf_blend_in_0], ], ["unequip_spear", 0, ## [0.3, "anim_human", combat+10, combat+0, arf_blend_in_0], [0.3, "equip_arms", 15, 10, arf_blend_in_0], ], ["equip_dagger_front_left", 0, ## [0.6, "anim_human", combat+30, combat+45, arf_blend_in_0], [0.8, "equip_arms", 253, 276, arf_blend_in_0], ], ["unequip_dagger_front_left", 0, ## [0.3, "anim_human", combat+10, combat+0, arf_blend_in_0], [0.2, "equip_arms", 254, 250, arf_blend_in_0], ], ["equip_dagger_front_right", 0, ## [0.6, "anim_human", combat+30, combat+45, arf_blend_in_0], [0.8, "equip_arms", 305, 333, arf_blend_in_0], ], ["unequip_dagger_front_right", 0, ## [0.3, "anim_human", combat+10, combat+0, arf_blend_in_0], [0.4, "equip_arms", 306, 300, arf_blend_in_0], ], ["equip_axe_back", 0, [1.0, "equip_greataxe", 0, 17, arf_blend_in_0], ], ["unequip_axe_back", 0, [0.3, "equip_greataxe", 7, 0, arf_blend_in_0], ], ["equip_revolver_right", 0, ## [0.6, "anim_human", combat+30, combat+45, arf_blend_in_0], [0.6, "equip_arms", 352, 365, arf_blend_in_0], ], ["unequip_revolver_right", 0, ## [0.3, "anim_human", combat+10, combat+0, arf_blend_in_0], [0.3, "equip_arms", 354, 350, arf_blend_in_0], ], ["equip_pistol_front_left", 0, [0.6, "anim_human", combat+30, combat+45, arf_blend_in_0], ], ["unequip_pistol_front_left", 0, [0.3, "anim_human", combat+10, combat+0, arf_blend_in_0], ], ["equip_katana", 0, [0.8, "anim_human", combat+30, combat+45, arf_blend_in_0], ], ["unequip_katana", 0, [0.3, "anim_human", combat+10, combat+0, arf_blend_in_0], ], ["equip_wakizashi", 0, [0.8, "anim_human", combat+30, combat+45, arf_blend_in_0], ], ["unequip_wakizashi", 0, [0.3, "anim_human", combat+10, combat+0, arf_blend_in_0], ], ["equip_shield", 0, ## [0.6, "anim_human", combat+30, combat+45, arf_blend_in_0], [0.8, "equip_arms", 68, 84, arf_blend_in_0], ], ["unequip_shield", 0, ## [0.3, "anim_human", combat+40, combat+30, arf_blend_in_0], [0.4, "equip_arms", 62, 50, arf_blend_in_0], ], ["equip_bow_back", 0, [0.7, "equip_arms", 161, 179, arf_blend_in_0], ], ["unequip_bow_back", 0, [0.3, "equip_arms", 163, 150, arf_blend_in_0], ], ["equip_bow_left_hip", 0, [0.7, "equip_arms", 110, 148, arf_blend_in_0], ], ["unequip_bow_left_hip", 0, [0.3, "equip_arms", 115, 108, arf_blend_in_0], ], ["cancel_attack_onehanded", acf_rotate_body, [cancel_duration, "anim_human", 110, 111, arf_blend_in_8], ], ["cancel_attack_twohanded", acf_rotate_body, [cancel_duration, "anim_human", 1100, 1100, arf_blend_in_8], ], ["cancel_attack_polearm", acf_rotate_body, [cancel_duration, "anim_human", 1500, 1500, arf_blend_in_8], ], #TODO: ready bow, release javelin and reload crossbow should have the same time # duration and controlled via weapon speed. ["ready_bow", acf_rotate_body|acf_parallels_for_look_slope|acf_anim_length(100), [1.5, "anim_human", combat+500, combat+530, blend_in_ready|arf_make_custom_sound, pack2f(0.14, 0.44)], ], ["release_bow", acf_rotate_body|acf_parallels_for_look_slope|acf_anim_length(100), [0.3, "anim_human", combat+530, combat+532, arf_blend_in_2], ], ["ready_bow_mounted", acf_rotate_body|acf_parallels_for_look_slope|acf_anim_length(100), [1.5, "anim_human", combat+800, combat+830, blend_in_ready|arf_make_custom_sound, pack2f(0.10, 0.40)], ], ["release_bow_mounted", acf_rotate_body|acf_parallels_for_look_slope|acf_anim_length(100), [0.3, "anim_human", combat+830, combat+832, arf_blend_in_2], ], ["ready_crossbow", acf_rotate_body|acf_parallels_for_look_slope|acf_anim_length(100), [1.5, "anim_human", combat+1300, combat+1320, blend_in_ready], ], ["release_crossbow", acf_rotate_body|acf_parallels_for_look_slope|acf_anim_length(100), [0.2, "anim_human", combat+1330, combat+1331, arf_blend_in_1], ], ["reload_crossbow", 0, [1.0, "anim_human", combat+1700, combat+1750, arf_blend_in_8|arf_make_custom_sound, pack2f(0.40, 0.94)], ], ["reload_crossbow_horseback", 0, [1.6, "anim_human", combat+1800, combat+1877, arf_blend_in_8|arf_make_custom_sound, pack2f(0.27, 0.94)], ], ["ready_javelin", acf_rotate_body, [0.3, "throw_javelin", 0, 30, blend_in_ready], ], ["release_javelin", acf_rotate_body, [1.0, "throw_javelin", 55, 100, arf_blend_in_0], ], ["ready_throwing_knife", acf_rotate_body, [0.3, "throw_knife", 10, 30, blend_in_ready], ], ["release_throwing_knife", acf_rotate_body, [0.8, "throw_knife", 30, 70, arf_blend_in_0], ], ["ready_throwing_axe", acf_rotate_body, [0.3, "throw_axe", 0, 40, blend_in_ready], ], ["release_throwing_axe", acf_rotate_body, [0.9, "throw_axe", 40, 90, arf_blend_in_0], ], ["ready_stone", acf_rotate_body, ## [0.3, "anim_human", combat+2200, combat+2210, blend_in_ready], [0.7, "throw_stone", 0, 21, blend_in_ready], ], ["release_stone", acf_rotate_body, ## [1.0, "anim_human", combat+2210, combat+2225, arf_blend_in_0], [1.0, "throw_stone", 21, 54, arf_blend_in_0], ], ["ready_pistol", acf_rotate_body|acf_parallels_for_look_slope|acf_anim_length(100), [0.3, "anim_human", combat+2500, combat+2515, arf_blend_in_8], ], ["release_pistol", acf_rotate_body|acf_parallels_for_look_slope|acf_anim_length(100), [0.3, "anim_human", combat+2520, combat+2527, arf_blend_in_1], ], ["reload_pistol", 0, [2.0, "anim_human", combat+2650, combat+2860, arf_blend_in_8], ], ["ready_musket", acf_rotate_body|acf_parallels_for_look_slope|acf_anim_length(100), [1.5, "anim_human", combat+1300, combat+1320, blend_in_ready], ], ["release_musket", acf_rotate_body|acf_parallels_for_look_slope|acf_anim_length(100), [0.2, "anim_human", combat+1330, combat+1331, arf_blend_in_1], ], ["reload_musket", 0, [2.0, "anim_human", combat+2650, combat+2860, arf_blend_in_8], ], ["ready_swingright_fist", 0, [ready_durn, "right_swing", 0, 15, blend_in_ready], ], ["release_swingright_fist", 0, [0.5, "right_swing", 15, 41, arf_blend_in_3], ], ["parry_swingright_fist", 0, [attack_parry_duration, "anim_human", combat+4013, combat+4008, blend_in_parry], ], ["ready_swingleft_fist", 0, [ready_durn, "anim_human", combat+4300, combat+4300, blend_in_ready], ], ["release_swingleft_fist", 0, [0.5, "anim_human", combat+4300, combat+4335, arf_blend_in_0], ], ["parry_swingleft_fist", 0, [attack_parry_duration, "anim_human", combat+4313, combat+4308, blend_in_parry], ], ["ready_direct_fist", 0, [ready_durn, "direct_fist", 0, 16, blend_in_ready], ], ["release_direct_fist", 0, [0.5, "direct_fist", 17, 36, arf_blend_in_0], ], ["parry_direct_fist", 0, [attack_parry_duration, "anim_human", combat+4613, combat+4608, blend_in_parry], ], ["ready_uppercut_fist", 0, [ready_durn, "uppercut", 0, 17, blend_in_ready], ], ["release_uppercut_fist", 0, [0.5, "uppercut", 17, 34, arf_blend_in_0], ], ["parry_uppercut_fist", 0, [attack_parry_duration, "anim_human", combat+4913, combat+4908, blend_in_parry], ], ["defend_fist", acf_rotate_body, [defend_duration, "anim_human", combat+4950, combat+4960, blend_in_defense], ], ["defend_fist_keep", acf_rotate_body, [2.0, "anim_human", combat+4950, combat+4960, arf_blend_in_2|arf_cyclic], ], ["defend_fist_parry", acf_rotate_body, [0.3, "anim_human", combat+4962, combat+4970, arf_blend_in_0], ], ["ready_slashright_twohanded", acf_right_cut|acf_parallels_for_look_slope|acf_anim_length(100), [ready_durn, "anim_human", combat+5700, combat+5710, blend_in_ready], # [0.6, "ani_twohanded", 0, 39, blend_in_ready, 0, (0,0,0), 24.0/39.0], ], ["release_slashright_twohanded", acf_right_cut|acf_parallels_for_look_slope|acf_anim_length(100), [0.62, "anim_human", combat+5710, combat+5740, blend_in_release], # [1.3, "ani_twohanded", 39, 81, blend_in_release, 0, (0,0,0), (51.0- 39.0)/(81.0 - 39.0)], ], ["parry_slashright_twohanded",acf_parallels_for_look_slope|acf_anim_length(100), [attack_parry_duration, "anim_human", combat+5725, combat+5720, blend_in_parry], ], ["ready_slashleft_twohanded", acf_right_cut|acf_parallels_for_look_slope|acf_anim_length(100), [ready_durn, "anim_human", combat+6400, combat+6410, blend_in_ready], ], ["release_slashleft_twohanded", acf_right_cut|acf_parallels_for_look_slope|acf_anim_length(100), [0.62, "anim_human", combat+6410, combat+6436, blend_in_release], ], ["parry_slashleft_twohanded",acf_parallels_for_look_slope|acf_anim_length(100), [attack_parry_duration, "anim_human", combat+6425, combat+6420, blend_in_parry], ], ["ready_thrust_twohanded", acf_thrust|acf_parallels_for_look_slope|acf_anim_length(100), [ready_durn, "anim_human", combat+6000, combat+6010, blend_in_ready], ], ["release_thrust_twohanded", acf_thrust|acf_parallels_for_look_slope|acf_anim_length(100), [0.61, "anim_human", combat+6010, combat+6040, blend_in_release], ], ["parry_thrust_twohanded", 0, [attack_parry_duration, "anim_human", combat+6015, combat+6016, blend_in_parry], ], ["ready_overswing_twohanded", acf_overswing, [ready_durn, "anim_human", combat+6200, combat+6210, blend_in_ready], ], ["release_overswing_twohanded", acf_overswing, [0.63, "anim_human", combat+6210, combat+6241, blend_in_release], ], ["parry_overswing_twohanded", 0, [attack_parry_duration, "anim_human", combat+6215, combat+6212, blend_in_parry], ], ["ready_thrust_onehanded", acf_thrust|acf_parallels_for_look_slope|acf_anim_length(100)|acf_rotate_body|acf_enforce_rightside, [ready_durn, "anim_human", combat+8500, combat+8510, blend_in_ready], ], ["release_thrust_onehanded", acf_thrust|acf_parallels_for_look_slope|acf_anim_length(100)|acf_rotate_body|acf_enforce_rightside, [0.61, "anim_human", combat+8510, combat+8540, blend_in_release], ], ["parry_thrust_onehanded", acf_rotate_body|acf_enforce_rightside, [attack_parry_duration, "anim_human", combat+8515, combat+8513, blend_in_parry], ], ["ready_thrust_onehanded_lance", acf_thrust|acf_parallels_for_look_slope|acf_anim_length(100)|acf_rotate_body|acf_enforce_rightside, [ready_durn, "anim_human", combat+9500, combat+9510, blend_in_ready], ], ["release_thrust_onehanded_lance", acf_thrust|acf_parallels_for_look_slope|acf_anim_length(100)|acf_rotate_body|acf_enforce_rightside, [0.61, "anim_human", combat+9510, combat+9540, blend_in_release], ], ["parry_thrust_onehanded_lance", acf_rotate_body|acf_enforce_rightside, [attack_parry_duration, "anim_human", combat+9515, combat+9513, blend_in_parry], ], ["ready_slashright_onehanded", acf_right_cut|acf_parallels_for_look_slope|acf_anim_length(100), [ready_durn, "anim_human", combat+8800, combat+8810, blend_in_ready], ], ["release_slashright_onehanded", acf_right_cut|acf_parallels_for_look_slope|acf_anim_length(100), [0.6, "anim_human", combat+8810, combat+8840, blend_in_release], ], ["parry_slashright_onehanded", 0, [attack_parry_duration, "anim_human", combat+8820, combat+8815, blend_in_parry], ], ["ready_slashleft_onehanded", acf_left_cut|acf_parallels_for_look_slope|acf_anim_length(100), [ready_durn, "anim_human", combat+9100, combat+9110, blend_in_ready], ], ["release_slashleft_onehanded", acf_left_cut|acf_parallels_for_look_slope|acf_anim_length(100), [0.6, "anim_human", combat+9110, combat+9140, blend_in_release], ], ["parry_slashleft_onehanded", 0, [attack_parry_duration, "anim_human", combat+9120, combat+9115, blend_in_parry], ], ["ready_overswing_onehanded", acf_overswing|acf_rotate_body|acf_enforce_rightside, [ready_durn, "anim_human", combat+9300, combat+9305, blend_in_ready], # [0.4, "ani_onehanded", 0, 44, blend_in_ready, 0, (0,0,0), 22.0/44.0], ], ["release_overswing_onehanded", acf_overswing|acf_rotate_body|acf_enforce_rightside, [0.6, "anim_human", combat+9305, combat+9342, blend_in_release], # [1.0, "ani_onehanded", 44, 85, blend_in_release, 0, (0,0,0), (53.0 - 44.0)/(85.0 - 44.0)], ], ["parry_overswing_onehanded", acf_rotate_body|acf_enforce_rightside, [attack_parry_duration, "anim_human", combat+9315, combat+9310, blend_in_parry], ], ["ready_slash_horseback_right", acf_right_cut|acf_parallels_for_look_slope|acf_anim_length(100), [ready_durn, "anim_human", combat+10100, combat+10110, blend_in_ready], ], ["release_slash_horseback_right", acf_right_cut|acf_parallels_for_look_slope|acf_anim_length(100), [0.6, "anim_human", combat+10110, combat+10140, blend_in_release], ], ["parry_slash_horseback_right",acf_parallels_for_look_slope|acf_anim_length(100), [attack_parry_duration, "anim_human", combat+10120, combat+10115, blend_in_parry], ], ["ready_slash_horseback_left", acf_left_cut|acf_parallels_for_look_slope|acf_anim_length(100), [ready_durn, "anim_human", combat+10400, combat+10410, blend_in_ready], ], ["release_slash_horseback_left", acf_left_cut|acf_parallels_for_look_slope|acf_anim_length(100), [0.6, "anim_human", combat+10410, combat+10440, blend_in_release], ], ["parry_slash_horseback_left",acf_parallels_for_look_slope|acf_anim_length(100), [attack_parry_duration, "anim_human", combat+10420, combat+10415, blend_in_parry], ], ["ready_overswing_staff", acf_overswing, [ready_durn, "anim_human", combat+7100, combat+7110, blend_in_ready], ], ["release_overswing_staff", acf_overswing, [0.6, "anim_human", combat+7110, combat+7140, arf_blend_in_0], ], ["parry_overswing_staff", 0, [attack_parry_duration, "anim_human", combat+7017, combat+7014, arf_blend_in_2], ], ["ready_thrust_staff", acf_thrust|acf_parallels_for_look_slope|acf_anim_length(100), [ready_durn, "anim_human", combat+7300, combat+7310, blend_in_ready], # [ready_durn, "thrust_staff", 70, 93, blend_in_ready], ], ["release_thrust_staff", acf_thrust|acf_parallels_for_look_slope|acf_anim_length(100), [0.6, "anim_human", combat+7310, combat+7340, arf_blend_in_2], # [0.6, "thrust_staff", 93, 125, arf_blend_in_2], ], ["parry_thrust_staff", acf_parallels_for_look_slope|acf_anim_length(100), [attack_parry_duration, "anim_human", combat+7316, combat+7313, arf_blend_in_2], # [attack_parry_duration, "thrust_staff", 102, 97, arf_blend_in_2], ], ["ready_slashleft_staff",acf_parallels_for_look_slope|acf_anim_length(100), [ready_durn, "anim_human", combat+7600, combat+7610, blend_in_ready], ], ["release_slashleft_staff",acf_parallels_for_look_slope|acf_anim_length(100), [0.6, "anim_human", combat+7610, combat+7640, arf_blend_in_0], ], ["parry_slashleft_staff",acf_parallels_for_look_slope|acf_anim_length(100), [attack_parry_duration, "anim_human", combat+7615, combat+7613, arf_blend_in_2], ], ["ready_slashright_staff",acf_parallels_for_look_slope|acf_anim_length(100), [ready_durn, "anim_human", combat+7900, combat+7910, blend_in_ready], ], ["release_slashright_staff",acf_parallels_for_look_slope|acf_anim_length(100), [0.6, "anim_human", combat+7910, combat+7940, arf_blend_in_0], ], ["parry_slashright_staff",acf_parallels_for_look_slope|acf_anim_length(100), [attack_parry_duration, "anim_human", combat+7915, combat+7913, arf_blend_in_2], ], ["defend_shield", acf_rotate_body|acf_parallels_for_look_slope|acf_anim_length(100), [defend_duration, "anim_human", defend+105, defend+120, blend_in_defense], ], ["defend_shield_keep", acf_rotate_body|acf_parallels_for_look_slope|acf_anim_length(100), [2.0, "anim_human", defend+120, defend+120, arf_blend_in_1|arf_cyclic], ], ["defend_shield_parry", acf_rotate_body|acf_parallels_for_look_slope|acf_anim_length(100), [0.5, "anim_human", defend+121, defend+130, arf_blend_in_1], ], ["defend_forward_greatsword", acf_rotate_body, # [defend_duration, "anim_human", defend+310, defend+320, blend_in_defense], [defend_duration, "defend_twohanded", 0, 20, blend_in_defense], ], ["defend_forward_greatsword_keep", acf_rotate_body, # [2.0, "anim_human", defend+320, defend+320, arf_blend_in_3|arf_cyclic], [4.0, "defend_twohanded", 170, 170, arf_blend_in_3|arf_cyclic], ], ["defend_forward_greatsword_parry", acf_rotate_body, # [0.3, "anim_human", defend+320, defend+330, arf_blend_in_1], [0.6, "defend_twohanded", 350, 367, arf_blend_in_1], ], ["defend_up_twohanded", acf_rotate_body, [defend_duration, "anim_human", defend+403, defend+410, blend_in_defense], ], ["defend_up_twohanded_keep", acf_rotate_body, [2.0, "anim_human", defend+410, defend+410, arf_blend_in_3|arf_cyclic], ], ["defend_up_twohanded_parry", acf_rotate_body, [0.3, "anim_human", defend+411, defend+418, arf_blend_in_1], ], ["defend_right_twohanded", acf_rotate_body, [defend_duration, "anim_human", defend+510, defend+520, blend_in_defense], ], ["defend_right_twohanded_keep", acf_rotate_body, [2.0, "anim_human", defend+520, defend+520, arf_blend_in_3|arf_cyclic], ], ["defend_right_twohanded_parry", acf_rotate_body, [0.3, "anim_human", defend+521, defend+528, arf_blend_in_1], ], ["defend_left_twohanded", acf_rotate_body, [defend_duration, "anim_human", defend+610, defend+620, blend_in_defense], ], ["defend_left_twohanded_keep", acf_rotate_body, [2.0, "anim_human", defend+620, defend+620, arf_blend_in_3|arf_cyclic], ], ["defend_left_twohanded_parry", acf_rotate_body, [0.3, "anim_human", defend+620, defend+630, arf_blend_in_1], ], ["defend_forward_onehanded", acf_rotate_body, # [defend_duration, "anim_human", defend+1010, defend+1020, blend_in_defense], [defend_duration, "defend_onehanded", 0, 15, blend_in_defense], ], ["defend_forward_onehanded_keep", acf_rotate_body, # [2.0, "anim_human", defend+1020, defend+1020, arf_blend_in_3|arf_cyclic], [5.0, "defend_onehanded", 15, 70, arf_blend_in_3|arf_cyclic], ], ["defend_forward_onehanded_parry", acf_rotate_body, # [0.3, "anim_human", defend+1021, defend+1030, arf_blend_in_1], [0.62, "defend_onehanded", 75, 85, arf_blend_in_1], ], ["defend_up_onehanded", acf_rotate_body, [defend_duration, "anim_human", defend+1110, defend+1120, blend_in_defense], ], ["defend_up_onehanded_keep", acf_rotate_body, [2.0, "anim_human", defend+1120, defend+1120, arf_blend_in_3|arf_cyclic], ], ["defend_up_onehanded_parry", acf_rotate_body, [0.3, "anim_human", defend+1121, defend+1130, arf_blend_in_1], ], ["defend_right_onehanded", acf_rotate_body, [defend_duration, "anim_human", defend+1210, defend+1220, blend_in_defense], ], ["defend_right_onehanded_keep", acf_rotate_body, [2.0, "anim_human", defend+1220, defend+1220, arf_blend_in_5|arf_cyclic], ], ["defend_right_onehanded_parry", acf_rotate_body, [0.3, "anim_human", defend+1221, defend+1230, arf_blend_in_1], ], ["defend_left_onehanded", acf_rotate_body, [defend_duration, "anim_human", defend+1310, defend+1320, blend_in_defense], ], ["defend_left_onehanded_keep", acf_rotate_body, [2.0, "anim_human", defend+1320, defend+1320, arf_blend_in_3|arf_cyclic], ], ["defend_left_onehanded_parry", acf_rotate_body, [0.3, "anim_human", defend+1321, defend+1330, arf_blend_in_1], ], ["defend_forward_staff", acf_rotate_body, # [pole_defend_duration, "anim_human", defend+2010, defend+2020, blend_in_defense], [pole_defend_duration, "defend_staff", 0, 5, blend_in_defense], ], ["defend_forward_staff_keep", acf_rotate_body, # [2.0, "anim_human", defend+2020, defend+2020, arf_blend_in_3|arf_cyclic], # [4.0, "defend_staff", 0, 45, arf_blend_in_3|arf_cyclic], [4.0, "defend_staff", 5, 5, arf_blend_in_3|arf_cyclic], ], ["defend_forward_staff_parry", acf_rotate_body, # [0.3, "anim_human", defend+2021, defend+2030, arf_blend_in_1], [0.7, "defend_staff", 56, 70, arf_blend_in_1], ], ["defend_up_staff", acf_rotate_body, [pole_defend_duration, "anim_human", defend+2110, defend+2120, blend_in_defense], ], ["defend_up_staff_keep", acf_rotate_body, [2.0, "anim_human", defend+2120, defend+2120, arf_blend_in_3|arf_cyclic], ], ["defend_up_staff_parry", acf_rotate_body, [0.3, "anim_human", defend+2121, defend+2130, arf_blend_in_1], ], ["defend_right_staff", acf_rotate_body, [pole_defend_duration, "anim_human", defend+2210, defend+2220, blend_in_defense], ], ["defend_right_staff_keep", acf_rotate_body, [2.0, "anim_human", defend+2220, defend+2220, arf_blend_in_3|arf_cyclic], ], ["defend_right_staff_parry", acf_rotate_body, [0.3, "anim_human", defend+2221, defend+2230, arf_blend_in_1], ], ["defend_left_staff", acf_rotate_body, [pole_defend_duration, "anim_human", defend+2310, defend+2320, blend_in_defense], ], ["defend_left_staff_keep", acf_rotate_body, [2.0, "anim_human", defend+2320, defend+2320, arf_blend_in_3|arf_cyclic], ], ["defend_left_staff_parry", acf_rotate_body, [0.3, "anim_human", defend+2321, defend+2330, arf_blend_in_1], ], ["strike_head_left", 0, [0.5, "strikes", 55, 71, arf_blend_in_3], ], ["strike_head_right", 0, [0.5, "strikes", 4, 19, arf_blend_in_3], ], ["strike_head_front", 0, [0.5, "strikes", 180, 198, arf_blend_in_3], ], ["strike_head_back", 0, [0.6, "strikes_back", 4, 25, arf_blend_in_3], ], ["strike_chest_left", 0, [0.5, "strikes", 706, 724, arf_blend_in_3], ], ["strike_chest_right", 0, [0.6, "strikes", 487, 512, arf_blend_in_3], ], ["strike_chest_front", 0, [0.6, "strikes", 881, 905, arf_blend_in_3], ], ["strike_chest_back", 0, [0.5, "strikes_back", 401, 418, arf_blend_in_3], ], ["strike_abdomen_left", 0, [0.58, "strikes", 1425, 1444, arf_blend_in_3], ], ["strike_abdomen_right", 0, [0.6, "strikes", 1168, 1188, arf_blend_in_3], ], ["strike_abdomen_front", 0, [0.6, "strikes", 1618, 1640, arf_blend_in_3], ], ["strike_abdomen_back", 0, [0.53, "strikes_back", 886, 904, arf_blend_in_3], ], ["strike_legs_left", 0, [0.55, "strikes", 2284, 2305, arf_blend_in_3], ], ["strike_legs_right", 0, [0.56, "strikes", 1999, 2020, arf_blend_in_3], ], ["strike_legs_front", 0, [0.56, "strikes", 2655, 2676, arf_blend_in_3], ], ["strike_legs_back", 0, [0.5, "strikes_back", 1120, 1137, arf_blend_in_3], ], ["strike2_head_left", acf_enforce_all, [0.5, "strikes", 55, 71, arf_blend_in_3], ], ["strike2_head_right",acf_enforce_all, [0.5, "strikes", 4, 19, arf_blend_in_3], ], ["strike2_head_front",acf_enforce_all, [0.5, "strikes", 180, 198, arf_blend_in_3], ], ["strike2_head_back", acf_enforce_all, # [0.6, "strikes_back", 4, 25, arf_blend_in_3], [0.55, "strikes_back", 4, 25, arf_blend_in_3], ], ["strike2_chest_left", acf_enforce_all, [0.5, "strikes", 706, 724, arf_blend_in_3], ], ["strike2_chest_right", acf_enforce_all, # [0.6, "strikes", 487, 512, arf_blend_in_3], [0.55, "strikes", 487, 512, arf_blend_in_3], ], ["strike2_chest_front", acf_enforce_all, # [0.6, "strikes", 881, 905, arf_blend_in_3], [0.55, "strikes", 881, 905, arf_blend_in_3], ], ["strike2_chest_back",acf_enforce_all, [0.5, "strikes_back", 401, 418, arf_blend_in_3], ], ["strike2_abdomen_left", acf_enforce_all, [0.55, "strikes", 1425, 1444, arf_blend_in_3], ], ["strike2_abdomen_right", acf_enforce_all, # [0.6, "strikes", 1168, 1188, arf_blend_in_3], [0.55, "strikes", 1168, 1188, arf_blend_in_3], ], ["strike2_abdomen_front", acf_enforce_all, # [0.6, "strikes", 1618, 1640, arf_blend_in_3], [0.55, "strikes", 1618, 1640, arf_blend_in_3], ], ["strike2_abdomen_back", acf_enforce_all, [0.53, "strikes_back", 886, 904, arf_blend_in_3], ], ["strike2_legs_left", acf_enforce_all, [0.55, "strikes", 2284, 2305, arf_blend_in_3], ], ["strike2_legs_right", acf_enforce_all, [0.56, "strikes", 1999, 2020, arf_blend_in_3], ], ["strike2_legs_front", acf_enforce_all, [0.56, "strikes", 2655, 2676, arf_blend_in_3], ], ["strike2_legs_back", acf_enforce_all, [0.5, "strikes_back", 1120, 1137, arf_blend_in_3], ], ["strike3_head_left", acf_enforce_all, [0.9 * 1.1, "strikes3_head", 107, 146, arf_blend_in_3], ], ["strike3_head_right",acf_enforce_all, [0.9 * 1.0, "strikes3_head", 208, 251, arf_blend_in_3], ], ["strike3_head_front",acf_enforce_all, [0.9 * 1.0, "strikes3_head", 14, 48, arf_blend_in_3], ], ["strike3_head_back", acf_enforce_all, [0.9 * 1.0, "strikes3_head", 309, 346, arf_blend_in_3], ], ["strike3_chest_left", acf_enforce_all, [0.9 * 1.0, "strikes3_chest", 61, 97, arf_blend_in_3], ], ["strike3_chest_right", acf_enforce_all, [0.9, "strikes3_chest", 108, 145, arf_blend_in_3], ], ["strike3_chest_front", acf_enforce_all, [0.8, "strikes3_chest", 3, 27, arf_blend_in_3], ], ## ["strike3_chest_back",acf_enforce_all, ## [1.3, "strikes3_chest", 264, 310, arf_blend_in_3], ## ], ["strike3_abdomen_left", acf_enforce_all, [0.9 * 1.0, "strikes3_abdomen", 105, 150, arf_blend_in_3, 0, (0, -0.0, 0.0)], ], ["strike3_abdomen_right", acf_enforce_all, [0.9, "strikes3_abdomen", 63, 98, arf_blend_in_3, 0, (0, 0.0, 0.0)], ], ["strike3_abdomen_front", acf_enforce_all, [0.9 * 1.0, "strikes3_abdomen", 4, 43, arf_blend_in_3, 0, (0, 0.0, 0.0)], ], ["strike3_abdomen_back", acf_enforce_all, [0.9 * 1.2, "strikes3_abdomen_back", 0, 53, arf_blend_in_3], ], ## ["strike3_legs_left", acf_enforce_all, ## [0.6, "strikes", 2284, 2305, arf_blend_in_3], ## ], ## ["strike3_legs_right", acf_enforce_all, ## [0.7, "strikes", 1999, 2020, arf_blend_in_3], ## ], ## ["strike3_legs_front", acf_enforce_all, ## [0.7, "strikes", 2655, 2676, arf_blend_in_3], ## ], ## ["strike3_legs_back", acf_enforce_all, ## [0.8, "strikes_back", 1120, 1144, arf_blend_in_3], ## ], ## ["strike_head_front_left", 0, ## [0.55, "anim_human", blow+0, blow+10, arf_blend_in_3], ## ], ["strike_head_front_left_reloc", acf_enforce_all, [0.6, "strike_frontal", 0, 37, arf_blend_in_3], # [0.6, "anim_human", blow+5200, blow+5220, arf_blend_in_3], ], ["fall_face_hold", acf_enforce_all|acf_align_with_ground|acf_lock_camera, [2.2, "death_face", 8, 60, arf_blend_in_16|arf_make_custom_sound, pack2f(0.5, 0.0), (0,0,0), 0.6], ], ["fall_chest_front", acf_enforce_all|acf_align_with_ground|acf_lock_camera, [1.0, "death_chest", 4, 37, arf_blend_in_16|arf_make_custom_sound, pack2f(0.9, 0.0), (0,0,0), 0.5], ], ["fall_abdomen_hold_front", acf_enforce_all|acf_align_with_ground|acf_lock_camera, [2.7, "death_abdomen", 5, 96, arf_blend_in_16|arf_make_custom_sound, pack2f(0.4, 0.0), (0,0,0), 0.5], ], ["fall_head_front", acf_enforce_all|acf_align_with_ground|acf_lock_camera, [1.2, "anim_human", blow+100, blow+138, arf_blend_in_16|arf_make_custom_sound, pack2f(0.8, 0.0), (0,0,0), 0.8], ], ["fall_right_front", acf_enforce_all|acf_align_with_ground|acf_lock_camera, [2.0, "death2", 0, 53, arf_blend_in_16|arf_make_custom_sound, pack2f(0.65, 0.0), (0,0,0), 1.0], ], ["fall_body_back", acf_enforce_all|acf_align_with_ground|acf_lock_camera, [2.7, "death", 0, 83, arf_blend_in_16|arf_make_custom_sound, pack2f(0.47, 0.82), (0,0,0), 1.5], ], ["fall_rider_head_front", acf_enforce_all|acf_lock_camera|acf_lock_camera, [2.2, "anim_human", blow+200, blow+275, arf_blend_in_3|arf_make_custom_sound, pack2f(0.8, 0.0), (0,0,0), 0.3], ], ["rider_fall_in_place", acf_enforce_lowerbody, [3.8, "anim_human", blow + 1000, blow + 1075, arf_blend_in_16|arf_make_custom_sound, pack2f(0.0, 0.0), (0,0,0), 0.5], ], ["rider_fall_right", acf_enforce_all|acf_displace_position, [2.5, "anim_human_02", 350, 382, arf_blend_in_8, 0, (0.8,-1.8,0), 0.5], ], ["rider_fall_roll", acf_enforce_all|acf_displace_position, [2.5, "anim_human", blow+ 2000, blow+2084, arf_blend_in_8, 0, (-0.4,0.2,0), 1.0], ], ["strike_chest_front_stop", acf_enforce_all, [0.4, "anim_human", blow+5000, blow+5010, arf_blend_in_3], ], ["strike_fall_back_rise", acf_enforce_lowerbody|acf_align_with_ground, [1.7, "anim_human", blow+5400, blow+5453, arf_blend_in_2|arf_make_custom_sound, pack2f(0.4, 0.0), (0,0,0), 0.5], ], ["strike_fall_back_rise_upper", acf_align_with_ground, [1.38, "anim_human", blow+5400, blow+5442, arf_blend_in_2], ], ["cheer", 0, ## [2.5, "anim_human", 70000, 70045, arf_blend_in_5], ## [3.0, "anim_human", 70100, 70150, arf_blend_in_5], [6.0, "man_cheer", 0, 185, arf_blend_in_5], [3.0, "man_cheer", 200, 289, arf_blend_in_5], [4.5, "man_cheer", 300, 437, arf_blend_in_5], [5.5, "man_cheer", 450, 617, arf_blend_in_5], ], ["cheer_stand", arf_cyclic, [31.5, "man_cheer", 650, 1597, arf_blend_in_5], ], ["stand_townguard", 0, [79.0, "stand_guardsman", 0, 2397, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25], ], ["stand_lady", 0, [29.0, "lady_stand", 0, 863, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25], ], ["stand_lord", 0, [10.0, "lord_stand", 0, 111, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25], ], ["dance", 0, [20.0, "anim_human", 0, 387, arf_blend_in_5], # [10.0, "anim_human_temp", 0, 10, arf_blend_in_5], ], ["pose_1", 0, [3.0, "poses", 0, 0, arf_cyclic], ], ["pose_2", 0, [3.0, "poses", 2, 2, arf_cyclic], ], ["pose_3", 0, [3.0, "poses", 4, 4, arf_cyclic], ], ["pose_4", 0, [3.0, "poses", 6, 6, arf_cyclic], ], ["pose_5", 0, [3.0, "poses", 8, 8, arf_cyclic], ], ### Unused human animations start from here. ["unused_human_anim_1", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_2", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_3", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_4", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_5", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_6", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_7", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_8", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_9", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_10", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_11", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_12", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_13", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_14", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_15", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_16", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_17", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_18", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_19", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_20", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_21", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_22", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_23", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_24", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_25", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_26", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_27", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_28", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_29", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_30", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_31", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_32", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_33", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_34", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_35", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_36", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_37", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_38", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_39", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_40", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_41", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_42", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_43", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_44", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_45", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_46", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_47", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_48", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_49", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_50", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_51", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_52", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_53", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_54", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_55", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_56", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_57", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_58", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_59", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_60", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_61", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_62", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_63", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_64", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_65", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_66", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_67", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_68", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_69", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_70", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_71", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_72", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_73", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_74", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_75", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_76", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_77", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_78", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_79", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_80", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_81", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_82", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_83", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_84", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_85", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_86", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_87", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_88", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_89", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_90", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_91", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_92", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_93", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_94", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_95", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_96", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_97", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_98", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_99", 0, [1.0, "anim_human", 0, 1, 0]], ["unused_human_anim_100", 0, [1.0, "anim_human", 0, 1, 0]], ["horse_stand", 0, ## [5.0, "anim_horse", 1000, 1044, arf_cyclic], ## [3.0, "anim_horse", 600, 644, arf_cyclic], [1.5, "anim_horse", 600, 644, arf_cyclic|arf_use_stand_progress, 0, (0, 0, 0), 0.0], [1.5, "anim_horse", 600, 644, arf_cyclic|arf_use_stand_progress, 0, (0, 0, 0), 0.0], [1.5, "anim_horse", 600, 644, arf_cyclic|arf_use_stand_progress, 0, (0, 0, 0), 0.0], [1.5, "anim_horse", 644, 688, arf_cyclic|arf_use_stand_progress, 0, (0, 0, 0), 0.0], [1.5, "anim_horse", 600, 644, arf_cyclic|arf_use_stand_progress, 0, (0, 0, 0), 0.0], [1.5, "anim_horse", 688, 732, arf_cyclic|arf_use_stand_progress, 0, (0, 0, 0), 0.0], [1.5, "anim_horse", 600, 644, arf_cyclic|arf_use_stand_progress, 0, (0, 0, 0), 0.0], [3.5, "anim_horse", 732, 820, arf_cyclic|arf_use_stand_progress, 0, (0, 0, 0), 0.0], [1.5, "anim_horse", 600, 644, arf_cyclic|arf_use_stand_progress, 0, (0, 0, 0), 0.0], [1.5, "anim_horse", 600, 644, arf_cyclic|arf_use_stand_progress, 0, (0, 0, 0), 0.0], [1.5, "anim_horse", 600, 644, arf_cyclic|arf_use_stand_progress, 0, (0, 0, 0), 0.0], [2.5, "anim_horse", 820, 908, arf_cyclic|arf_use_stand_progress, 0, (0, 0, 0), 0.0], ], ["horse_pace_1", acf_enforce_lowerbody, [1.0, "anim_horse", 0, 31, arf_cyclic|arf_use_walk_progress|arf_make_walk_sound,pack4f(0.25,0.42,0.75,0.92), (0, 0, 0), 0.25], ], ["horse_pace_2", acf_enforce_lowerbody, [0.8, "anim_horse", 50, 69, arf_cyclic|arf_use_walk_progress|arf_make_walk_sound,pack4f(0.15,0.16,0.65,0.66), (0, 0, 0), 0.9], ], ["horse_pace_3", acf_enforce_lowerbody, [0.6, "anim_horse", 100, 116, arf_cyclic|arf_use_walk_progress|arf_make_walk_sound,pack4f(0.93,0.95,0.35,0.42), (0, 0, 0), 0.6], ], ["horse_pace_4", acf_enforce_lowerbody, [0.5, "anim_horse", 150, 165, arf_cyclic|arf_use_walk_progress|arf_make_walk_sound,pack4f(0.4,0.31,0.79,0.94), (0, 0, 0), 0.2], ], ["horse_walk_backward", acf_enforce_lowerbody, [1.9, "anim_horse", 31, 0, arf_cyclic|arf_use_inv_walk_progress|arf_make_walk_sound,pack4f(0.07,0.13,0.56,0.63), (0, 0, 0), 0.0], ], ["horse_rear", acf_enforce_lowerbody | acf_ignore_slope, # [1.4, "anim_horse_temp", 1, 10, arf_blend_in_1], ## [2.5, "anim_horse", 505, 580, arf_blend_in_8], [2.0, "anim_horse", 260, 301, arf_blend_in_8], ], ["horse_jump", acf_enforce_lowerbody, [1.6, "anim_horse", 205, 222, arf_blend_in_4], #|arf_end_pos_0_25], ], ["horse_jump_end", acf_enforce_lowerbody, [0.1, "anim_horse", 222, 224, arf_blend_in_8], ], ["horse_turn_right", 0, [1.0, "anim_horse", 500, 533, arf_blend_in_4|arf_cyclic], ], ["horse_turn_left", 0, [1.0, "anim_horse", 450, 483, arf_blend_in_4|arf_cyclic], ], ["horse_slow", 0, [3.0, "anim_horse", 0, 31,arf_cyclic], [1.5, "anim_horse", 0, 31, arf_cyclic], ], ["horse_fall_in_place", acf_enforce_all|acf_align_with_ground, [4.0, "anim_horse", 0, 38, arf_blend_in_16|arf_make_custom_sound, pack2f(0.0, 0.0)], ], ["horse_fall_right", acf_enforce_all|acf_align_with_ground, [1.75, "anim_horse", 350, 375, arf_blend_in_8|arf_make_custom_sound, pack2f(0.6, 0.0), (0, 0, 0), 0.5], ], ["horse_fall_roll", acf_enforce_all|acf_align_with_ground, [2.5, "anim_horse", 400, 428, arf_blend_in_8|arf_make_custom_sound, pack2f(0.3, 0.0), (0, 0, 0), 1.8], ], ### Unused horse animations start from here. ["unused_horse_anim_1", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_2", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_3", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_4", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_5", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_6", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_7", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_8", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_9", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_10", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_11", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_12", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_13", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_14", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_15", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_16", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_17", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_18", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_19", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_20", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_21", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_22", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_23", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_24", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_25", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_26", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_27", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_28", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_29", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_30", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_31", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_32", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_33", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_34", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_35", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_36", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_37", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_38", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_39", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_40", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_41", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_42", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_43", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_44", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_45", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_46", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_47", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_48", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_49", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_50", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_51", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_52", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_53", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_54", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_55", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_56", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_57", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_58", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_59", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_60", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_61", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_62", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_63", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_64", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_65", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_66", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_67", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_68", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_69", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_70", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_71", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_72", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_73", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_74", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_75", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_76", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_77", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_78", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_79", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_80", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_81", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_82", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_83", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_84", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_85", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_86", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_87", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_88", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_89", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_90", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_91", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_92", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_93", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_94", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_95", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_96", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_97", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_98", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_99", 0, [1.0, "anim_horse", 0, 1, 0]], ["unused_horse_anim_100", 0, [1.0, "anim_horse", 0, 1, 0]], ]
Python
import string from module_info import * from module_scene_props import * from process_common import * from process_operations import * def save_scene_props(variable_list,variable_uses,tag_uses,quick_strings): ofile = open(export_dir + "scene_props.txt","w") ofile.write("scene_propsfile version 1\n") ofile.write(" %d\n"%(len(scene_props))) for scene_prop in scene_props: ofile.write("spr_%s %d %d %s %s "%(scene_prop[0], scene_prop[1], get_spr_hit_points(scene_prop[1]), scene_prop[2], scene_prop[3])) save_simple_triggers(ofile,scene_prop[4] , variable_list,variable_uses,tag_uses,quick_strings) ofile.write("\n") ofile.close() def save_python_header(): file = open("./ID_scene_props.py","w") for i_scene_prop in xrange(len(scene_props)): file.write("spr_%s = %d\n"%(scene_props[i_scene_prop][0],i_scene_prop)) file.close() print "Exporting scene props..." save_python_header() variable_uses = [] variables = load_variables(export_dir,variable_uses) tag_uses = load_tag_uses(export_dir) quick_strings = load_quick_strings(export_dir) save_scene_props(variables,variable_uses,tag_uses,quick_strings) save_variables(export_dir,variables,variable_uses) save_tag_uses(export_dir,tag_uses) save_quick_strings(export_dir,quick_strings)
Python
anim_stand = 0 anim_stand_man = 1 anim_jump = 2 anim_jump_end = 3 anim_stand_unarmed = 4 anim_stand_single = 5 anim_stand_greatsword = 6 anim_stand_staff = 7 anim_stand_crossbow = 8 anim_walk_forward = 9 anim_walk_forward_onehanded = 10 anim_walk_forward_staff = 11 anim_walk_forward_greatsword = 12 anim_walk_backward = 13 anim_walk_backward_onehanded = 14 anim_walk_backward_staff = 15 anim_walk_backward_greatsword = 16 anim_run_forward = 17 anim_run_forward_onehanded = 18 anim_run_forward_staff = 19 anim_run_forward_greatsword = 20 anim_run_forward_right = 21 anim_run_forward_right_onehanded = 22 anim_run_forward_right_staff = 23 anim_run_forward_right_greatsword = 24 anim_run_forward_left = 25 anim_run_forward_left_onehanded = 26 anim_run_forward_left_staff = 27 anim_run_forward_left_greatsword = 28 anim_run_backward = 29 anim_run_backward_onehanded = 30 anim_run_backward_staff = 31 anim_run_backward_greatsword = 32 anim_walk_right = 33 anim_walk_right_onehanded = 34 anim_walk_right_twohanded = 35 anim_walk_right_polearm = 36 anim_walk_left = 37 anim_walk_left_onehanded = 38 anim_walk_left_twohanded = 39 anim_walk_left_polearm = 40 anim_walk_forward_right = 41 anim_walk_forward_right_onehanded = 42 anim_walk_forward_right_twohanded = 43 anim_walk_forward_right_polearm = 44 anim_walk_forward_left = 45 anim_walk_forward_left_onehanded = 46 anim_walk_forward_left_twohanded = 47 anim_walk_forward_left_polearm = 48 anim_walk_backward_left = 49 anim_walk_backward_left_onehanded = 50 anim_walk_backward_left_twohanded = 51 anim_walk_backward_left_polearm = 52 anim_walk_backward_right = 53 anim_walk_backward_right_onehanded = 54 anim_walk_backward_right_twohanded = 55 anim_walk_backward_right_polearm = 56 anim_run_right = 57 anim_run_right_onehanded = 58 anim_run_right_twohanded = 59 anim_run_right_polearm = 60 anim_run_left = 61 anim_run_left_onehanded = 62 anim_run_left_twohanded = 63 anim_run_left_polearm = 64 anim_ride_0 = 65 anim_ride_1 = 66 anim_lancer_ride_1 = 67 anim_lancer_charge_parried = 68 anim_ride_2 = 69 anim_ride_3 = 70 anim_ride_4 = 71 anim_lancer_ride_4 = 72 anim_ride_rear = 73 anim_ride_spur = 74 anim_ride_jump = 75 anim_ride_jump_end = 76 anim_ride_turn_right = 77 anim_ride_turn_left = 78 anim_mount_horse = 79 anim_dismount_horse = 80 anim_lancer_ride_0 = 81 anim_equip_default = 82 anim_unequip_default = 83 anim_equip_sword = 84 anim_unequip_sword = 85 anim_equip_greatsword = 86 anim_unequip_greatsword = 87 anim_equip_axe_left_hip = 88 anim_unequip_axe_left_hip = 89 anim_equip_crossbow = 90 anim_unequip_crossbow = 91 anim_equip_spear = 92 anim_unequip_spear = 93 anim_equip_dagger_front_left = 94 anim_unequip_dagger_front_left = 95 anim_equip_dagger_front_right = 96 anim_unequip_dagger_front_right = 97 anim_equip_axe_back = 98 anim_unequip_axe_back = 99 anim_equip_revolver_right = 100 anim_unequip_revolver_right = 101 anim_equip_pistol_front_left = 102 anim_unequip_pistol_front_left = 103 anim_equip_katana = 104 anim_unequip_katana = 105 anim_equip_wakizashi = 106 anim_unequip_wakizashi = 107 anim_equip_shield = 108 anim_unequip_shield = 109 anim_equip_bow_back = 110 anim_unequip_bow_back = 111 anim_equip_bow_left_hip = 112 anim_unequip_bow_left_hip = 113 anim_cancel_attack_onehanded = 114 anim_cancel_attack_twohanded = 115 anim_cancel_attack_polearm = 116 anim_ready_bow = 117 anim_release_bow = 118 anim_ready_bow_mounted = 119 anim_release_bow_mounted = 120 anim_ready_crossbow = 121 anim_release_crossbow = 122 anim_reload_crossbow = 123 anim_reload_crossbow_horseback = 124 anim_ready_javelin = 125 anim_release_javelin = 126 anim_ready_throwing_knife = 127 anim_release_throwing_knife = 128 anim_ready_throwing_axe = 129 anim_release_throwing_axe = 130 anim_ready_stone = 131 anim_release_stone = 132 anim_ready_pistol = 133 anim_release_pistol = 134 anim_reload_pistol = 135 anim_ready_musket = 136 anim_release_musket = 137 anim_reload_musket = 138 anim_ready_swingright_fist = 139 anim_release_swingright_fist = 140 anim_parry_swingright_fist = 141 anim_ready_swingleft_fist = 142 anim_release_swingleft_fist = 143 anim_parry_swingleft_fist = 144 anim_ready_direct_fist = 145 anim_release_direct_fist = 146 anim_parry_direct_fist = 147 anim_ready_uppercut_fist = 148 anim_release_uppercut_fist = 149 anim_parry_uppercut_fist = 150 anim_defend_fist = 151 anim_defend_fist_keep = 152 anim_defend_fist_parry = 153 anim_ready_slashright_twohanded = 154 anim_release_slashright_twohanded = 155 anim_parry_slashright_twohanded = 156 anim_ready_slashleft_twohanded = 157 anim_release_slashleft_twohanded = 158 anim_parry_slashleft_twohanded = 159 anim_ready_thrust_twohanded = 160 anim_release_thrust_twohanded = 161 anim_parry_thrust_twohanded = 162 anim_ready_overswing_twohanded = 163 anim_release_overswing_twohanded = 164 anim_parry_overswing_twohanded = 165 anim_ready_thrust_onehanded = 166 anim_release_thrust_onehanded = 167 anim_parry_thrust_onehanded = 168 anim_ready_thrust_onehanded_lance = 169 anim_release_thrust_onehanded_lance = 170 anim_parry_thrust_onehanded_lance = 171 anim_ready_slashright_onehanded = 172 anim_release_slashright_onehanded = 173 anim_parry_slashright_onehanded = 174 anim_ready_slashleft_onehanded = 175 anim_release_slashleft_onehanded = 176 anim_parry_slashleft_onehanded = 177 anim_ready_overswing_onehanded = 178 anim_release_overswing_onehanded = 179 anim_parry_overswing_onehanded = 180 anim_ready_slash_horseback_right = 181 anim_release_slash_horseback_right = 182 anim_parry_slash_horseback_right = 183 anim_ready_slash_horseback_left = 184 anim_release_slash_horseback_left = 185 anim_parry_slash_horseback_left = 186 anim_ready_overswing_staff = 187 anim_release_overswing_staff = 188 anim_parry_overswing_staff = 189 anim_ready_thrust_staff = 190 anim_release_thrust_staff = 191 anim_parry_thrust_staff = 192 anim_ready_slashleft_staff = 193 anim_release_slashleft_staff = 194 anim_parry_slashleft_staff = 195 anim_ready_slashright_staff = 196 anim_release_slashright_staff = 197 anim_parry_slashright_staff = 198 anim_defend_shield = 199 anim_defend_shield_keep = 200 anim_defend_shield_parry = 201 anim_defend_forward_greatsword = 202 anim_defend_forward_greatsword_keep = 203 anim_defend_forward_greatsword_parry = 204 anim_defend_up_twohanded = 205 anim_defend_up_twohanded_keep = 206 anim_defend_up_twohanded_parry = 207 anim_defend_right_twohanded = 208 anim_defend_right_twohanded_keep = 209 anim_defend_right_twohanded_parry = 210 anim_defend_left_twohanded = 211 anim_defend_left_twohanded_keep = 212 anim_defend_left_twohanded_parry = 213 anim_defend_forward_onehanded = 214 anim_defend_forward_onehanded_keep = 215 anim_defend_forward_onehanded_parry = 216 anim_defend_up_onehanded = 217 anim_defend_up_onehanded_keep = 218 anim_defend_up_onehanded_parry = 219 anim_defend_right_onehanded = 220 anim_defend_right_onehanded_keep = 221 anim_defend_right_onehanded_parry = 222 anim_defend_left_onehanded = 223 anim_defend_left_onehanded_keep = 224 anim_defend_left_onehanded_parry = 225 anim_defend_forward_staff = 226 anim_defend_forward_staff_keep = 227 anim_defend_forward_staff_parry = 228 anim_defend_up_staff = 229 anim_defend_up_staff_keep = 230 anim_defend_up_staff_parry = 231 anim_defend_right_staff = 232 anim_defend_right_staff_keep = 233 anim_defend_right_staff_parry = 234 anim_defend_left_staff = 235 anim_defend_left_staff_keep = 236 anim_defend_left_staff_parry = 237 anim_strike_head_left = 238 anim_strike_head_right = 239 anim_strike_head_front = 240 anim_strike_head_back = 241 anim_strike_chest_left = 242 anim_strike_chest_right = 243 anim_strike_chest_front = 244 anim_strike_chest_back = 245 anim_strike_abdomen_left = 246 anim_strike_abdomen_right = 247 anim_strike_abdomen_front = 248 anim_strike_abdomen_back = 249 anim_strike_legs_left = 250 anim_strike_legs_right = 251 anim_strike_legs_front = 252 anim_strike_legs_back = 253 anim_strike2_head_left = 254 anim_strike2_head_right = 255 anim_strike2_head_front = 256 anim_strike2_head_back = 257 anim_strike2_chest_left = 258 anim_strike2_chest_right = 259 anim_strike2_chest_front = 260 anim_strike2_chest_back = 261 anim_strike2_abdomen_left = 262 anim_strike2_abdomen_right = 263 anim_strike2_abdomen_front = 264 anim_strike2_abdomen_back = 265 anim_strike2_legs_left = 266 anim_strike2_legs_right = 267 anim_strike2_legs_front = 268 anim_strike2_legs_back = 269 anim_strike3_head_left = 270 anim_strike3_head_right = 271 anim_strike3_head_front = 272 anim_strike3_head_back = 273 anim_strike3_chest_left = 274 anim_strike3_chest_right = 275 anim_strike3_chest_front = 276 anim_strike3_abdomen_left = 277 anim_strike3_abdomen_right = 278 anim_strike3_abdomen_front = 279 anim_strike3_abdomen_back = 280 anim_strike_head_front_left_reloc = 281 anim_fall_face_hold = 282 anim_fall_chest_front = 283 anim_fall_abdomen_hold_front = 284 anim_fall_head_front = 285 anim_fall_right_front = 286 anim_fall_body_back = 287 anim_fall_rider_head_front = 288 anim_rider_fall_in_place = 289 anim_rider_fall_right = 290 anim_rider_fall_roll = 291 anim_strike_chest_front_stop = 292 anim_strike_fall_back_rise = 293 anim_strike_fall_back_rise_upper = 294 anim_cheer = 295 anim_cheer_stand = 296 anim_stand_townguard = 297 anim_stand_lady = 298 anim_stand_lord = 299 anim_dance = 300 anim_pose_1 = 301 anim_pose_2 = 302 anim_pose_3 = 303 anim_pose_4 = 304 anim_pose_5 = 305 anim_unused_human_anim_1 = 306 anim_unused_human_anim_2 = 307 anim_unused_human_anim_3 = 308 anim_unused_human_anim_4 = 309 anim_unused_human_anim_5 = 310 anim_unused_human_anim_6 = 311 anim_unused_human_anim_7 = 312 anim_unused_human_anim_8 = 313 anim_unused_human_anim_9 = 314 anim_unused_human_anim_10 = 315 anim_unused_human_anim_11 = 316 anim_unused_human_anim_12 = 317 anim_unused_human_anim_13 = 318 anim_unused_human_anim_14 = 319 anim_unused_human_anim_15 = 320 anim_unused_human_anim_16 = 321 anim_unused_human_anim_17 = 322 anim_unused_human_anim_18 = 323 anim_unused_human_anim_19 = 324 anim_unused_human_anim_20 = 325 anim_unused_human_anim_21 = 326 anim_unused_human_anim_22 = 327 anim_unused_human_anim_23 = 328 anim_unused_human_anim_24 = 329 anim_unused_human_anim_25 = 330 anim_unused_human_anim_26 = 331 anim_unused_human_anim_27 = 332 anim_unused_human_anim_28 = 333 anim_unused_human_anim_29 = 334 anim_unused_human_anim_30 = 335 anim_unused_human_anim_31 = 336 anim_unused_human_anim_32 = 337 anim_unused_human_anim_33 = 338 anim_unused_human_anim_34 = 339 anim_unused_human_anim_35 = 340 anim_unused_human_anim_36 = 341 anim_unused_human_anim_37 = 342 anim_unused_human_anim_38 = 343 anim_unused_human_anim_39 = 344 anim_unused_human_anim_40 = 345 anim_unused_human_anim_41 = 346 anim_unused_human_anim_42 = 347 anim_unused_human_anim_43 = 348 anim_unused_human_anim_44 = 349 anim_unused_human_anim_45 = 350 anim_unused_human_anim_46 = 351 anim_unused_human_anim_47 = 352 anim_unused_human_anim_48 = 353 anim_unused_human_anim_49 = 354 anim_unused_human_anim_50 = 355 anim_unused_human_anim_51 = 356 anim_unused_human_anim_52 = 357 anim_unused_human_anim_53 = 358 anim_unused_human_anim_54 = 359 anim_unused_human_anim_55 = 360 anim_unused_human_anim_56 = 361 anim_unused_human_anim_57 = 362 anim_unused_human_anim_58 = 363 anim_unused_human_anim_59 = 364 anim_unused_human_anim_60 = 365 anim_unused_human_anim_61 = 366 anim_unused_human_anim_62 = 367 anim_unused_human_anim_63 = 368 anim_unused_human_anim_64 = 369 anim_unused_human_anim_65 = 370 anim_unused_human_anim_66 = 371 anim_unused_human_anim_67 = 372 anim_unused_human_anim_68 = 373 anim_unused_human_anim_69 = 374 anim_unused_human_anim_70 = 375 anim_unused_human_anim_71 = 376 anim_unused_human_anim_72 = 377 anim_unused_human_anim_73 = 378 anim_unused_human_anim_74 = 379 anim_unused_human_anim_75 = 380 anim_unused_human_anim_76 = 381 anim_unused_human_anim_77 = 382 anim_unused_human_anim_78 = 383 anim_unused_human_anim_79 = 384 anim_unused_human_anim_80 = 385 anim_unused_human_anim_81 = 386 anim_unused_human_anim_82 = 387 anim_unused_human_anim_83 = 388 anim_unused_human_anim_84 = 389 anim_unused_human_anim_85 = 390 anim_unused_human_anim_86 = 391 anim_unused_human_anim_87 = 392 anim_unused_human_anim_88 = 393 anim_unused_human_anim_89 = 394 anim_unused_human_anim_90 = 395 anim_unused_human_anim_91 = 396 anim_unused_human_anim_92 = 397 anim_unused_human_anim_93 = 398 anim_unused_human_anim_94 = 399 anim_unused_human_anim_95 = 400 anim_unused_human_anim_96 = 401 anim_unused_human_anim_97 = 402 anim_unused_human_anim_98 = 403 anim_unused_human_anim_99 = 404 anim_unused_human_anim_100 = 405 anim_horse_stand = 406 anim_horse_pace_1 = 407 anim_horse_pace_2 = 408 anim_horse_pace_3 = 409 anim_horse_pace_4 = 410 anim_horse_walk_backward = 411 anim_horse_rear = 412 anim_horse_jump = 413 anim_horse_jump_end = 414 anim_horse_turn_right = 415 anim_horse_turn_left = 416 anim_horse_slow = 417 anim_horse_fall_in_place = 418 anim_horse_fall_right = 419 anim_horse_fall_roll = 420 anim_unused_horse_anim_1 = 421 anim_unused_horse_anim_2 = 422 anim_unused_horse_anim_3 = 423 anim_unused_horse_anim_4 = 424 anim_unused_horse_anim_5 = 425 anim_unused_horse_anim_6 = 426 anim_unused_horse_anim_7 = 427 anim_unused_horse_anim_8 = 428 anim_unused_horse_anim_9 = 429 anim_unused_horse_anim_10 = 430 anim_unused_horse_anim_11 = 431 anim_unused_horse_anim_12 = 432 anim_unused_horse_anim_13 = 433 anim_unused_horse_anim_14 = 434 anim_unused_horse_anim_15 = 435 anim_unused_horse_anim_16 = 436 anim_unused_horse_anim_17 = 437 anim_unused_horse_anim_18 = 438 anim_unused_horse_anim_19 = 439 anim_unused_horse_anim_20 = 440 anim_unused_horse_anim_21 = 441 anim_unused_horse_anim_22 = 442 anim_unused_horse_anim_23 = 443 anim_unused_horse_anim_24 = 444 anim_unused_horse_anim_25 = 445 anim_unused_horse_anim_26 = 446 anim_unused_horse_anim_27 = 447 anim_unused_horse_anim_28 = 448 anim_unused_horse_anim_29 = 449 anim_unused_horse_anim_30 = 450 anim_unused_horse_anim_31 = 451 anim_unused_horse_anim_32 = 452 anim_unused_horse_anim_33 = 453 anim_unused_horse_anim_34 = 454 anim_unused_horse_anim_35 = 455 anim_unused_horse_anim_36 = 456 anim_unused_horse_anim_37 = 457 anim_unused_horse_anim_38 = 458 anim_unused_horse_anim_39 = 459 anim_unused_horse_anim_40 = 460 anim_unused_horse_anim_41 = 461 anim_unused_horse_anim_42 = 462 anim_unused_horse_anim_43 = 463 anim_unused_horse_anim_44 = 464 anim_unused_horse_anim_45 = 465 anim_unused_horse_anim_46 = 466 anim_unused_horse_anim_47 = 467 anim_unused_horse_anim_48 = 468 anim_unused_horse_anim_49 = 469 anim_unused_horse_anim_50 = 470 anim_unused_horse_anim_51 = 471 anim_unused_horse_anim_52 = 472 anim_unused_horse_anim_53 = 473 anim_unused_horse_anim_54 = 474 anim_unused_horse_anim_55 = 475 anim_unused_horse_anim_56 = 476 anim_unused_horse_anim_57 = 477 anim_unused_horse_anim_58 = 478 anim_unused_horse_anim_59 = 479 anim_unused_horse_anim_60 = 480 anim_unused_horse_anim_61 = 481 anim_unused_horse_anim_62 = 482 anim_unused_horse_anim_63 = 483 anim_unused_horse_anim_64 = 484 anim_unused_horse_anim_65 = 485 anim_unused_horse_anim_66 = 486 anim_unused_horse_anim_67 = 487 anim_unused_horse_anim_68 = 488 anim_unused_horse_anim_69 = 489 anim_unused_horse_anim_70 = 490 anim_unused_horse_anim_71 = 491 anim_unused_horse_anim_72 = 492 anim_unused_horse_anim_73 = 493 anim_unused_horse_anim_74 = 494 anim_unused_horse_anim_75 = 495 anim_unused_horse_anim_76 = 496 anim_unused_horse_anim_77 = 497 anim_unused_horse_anim_78 = 498 anim_unused_horse_anim_79 = 499 anim_unused_horse_anim_80 = 500 anim_unused_horse_anim_81 = 501 anim_unused_horse_anim_82 = 502 anim_unused_horse_anim_83 = 503 anim_unused_horse_anim_84 = 504 anim_unused_horse_anim_85 = 505 anim_unused_horse_anim_86 = 506 anim_unused_horse_anim_87 = 507 anim_unused_horse_anim_88 = 508 anim_unused_horse_anim_89 = 509 anim_unused_horse_anim_90 = 510 anim_unused_horse_anim_91 = 511 anim_unused_horse_anim_92 = 512 anim_unused_horse_anim_93 = 513 anim_unused_horse_anim_94 = 514 anim_unused_horse_anim_95 = 515 anim_unused_horse_anim_96 = 516 anim_unused_horse_anim_97 = 517 anim_unused_horse_anim_98 = 518 anim_unused_horse_anim_99 = 519 anim_unused_horse_anim_100 = 520
Python
psys_game_rain = 0 psys_game_snow = 1 psys_game_blood = 2 psys_game_blood_2 = 3 psys_game_hoof_dust = 4 psys_game_hoof_dust_snow = 5 psys_game_hoof_dust_mud = 6 psys_game_water_splash_1 = 7 psys_game_water_splash_2 = 8 psys_game_water_splash_3 = 9 psys_torch_fire = 10 psys_fire_glow_1 = 11 psys_fire_glow_fixed = 12 psys_torch_smoke = 13 psys_flue_smoke_short = 14 psys_flue_smoke_tall = 15 psys_war_smoke_tall = 16 psys_torch_fire_sparks = 17 psys_fire_sparks_1 = 18 psys_pistol_smoke = 19 psys_brazier_fire_1 = 20 psys_cooking_fire_1 = 21 psys_cooking_smoke = 22 psys_food_steam = 23 psys_candle_light = 24 psys_candle_light_small = 25 psys_lamp_fire = 26 psys_dummy_smoke = 27 psys_dummy_straw = 28 psys_gourd_smoke = 29 psys_gourd_piece_1 = 30 psys_gourd_piece_2 = 31 psys_fire_fly_1 = 32 psys_bug_fly_1 = 33 psys_moon_beam_1 = 34 psys_moon_beam_paricle_1 = 35 psys_night_smoke_1 = 36 psys_fireplace_fire_small = 37 psys_fireplace_fire_big = 38 psys_village_fire_big = 39 psys_village_fire_smoke_big = 40 psys_map_village_fire = 41 psys_map_village_fire_smoke = 42 psys_map_village_looted_smoke = 43 psys_dungeon_water_drops = 44 psys_fat_arrow = 45 psys_fat_arrow_rising = 46
Python
import string from process_common import * from module_items import * def get_item_code(item): prefix = "it_" code = prefix + item[0] return code def save_python_header(): file = open("./ID_items.py","w") for i_item in xrange(len(items)): file.write("itm_%s = %d\n"%(convert_to_identifier(items[i_item][0]),i_item)) file.close() def write_items(variable_list,variable_uses,tag_uses,quick_strings): itemkinds_file_name = export_dir + "item_kinds1.txt" ofile = open(itemkinds_file_name,"w") ofile.write("itemsfile version 2\n") ofile.write("%d\n"%len(items)) for item in items: if (item[3] & itp_merchandise) > 0: id_no = find_object(items,convert_to_identifier(item[0])) add_tag_use(tag_uses,tag_item,id_no) ofile.write(" itm_%s %s %s %d "%(convert_to_identifier(item[0]),replace_spaces(item[1]),replace_spaces(item[1]),len(item[2]))) item_variations = item[2] for item_variation in item_variations: ofile.write(" %s %d "%(item_variation[0],item_variation[1])) ofile.write(" %d %d %d %d %f %d %d %d %d %d %d %d %d %d %d %d %d\n"%(item[3], item[4], item[5], item[7], get_weight(item[6]), get_abundance(item[6]), get_head_armor(item[6]), get_body_armor(item[6]), get_leg_armor(item[6]), get_difficulty(item[6]), get_hit_points(item[6]), get_speed_rating(item[6]), get_missile_speed(item[6]), get_weapon_length(item[6]), get_max_ammo(item[6]), get_thrust_damage(item[6]), get_swing_damage(item[6]), )) trigger_list = [] if (len(item) > 8): trigger_list = item[8] save_simple_triggers(ofile,trigger_list, variable_list,variable_uses,tag_uses,quick_strings) ofile.close() print "Exporting item data..." save_python_header() from module_info import * from process_common import * from process_operations import * variable_uses = [] variables = load_variables(export_dir,variable_uses) tag_uses = load_tag_uses(export_dir) quick_strings = load_quick_strings(export_dir) write_items(variables,variable_uses,tag_uses,quick_strings) save_variables(export_dir,variables,variable_uses) save_tag_uses(export_dir,tag_uses) save_quick_strings(export_dir,quick_strings) #print "Finished with Items."
Python
import string import types def convert_to_identifier(s0): s1 = string.replace(s0," ","_") s2 = string.replace(s1,"'","_") s3 = string.replace(s2,"`","_") s4 = string.replace(s3,"(","_") s5 = string.replace(s4,")","_") s6 = string.replace(s5,"-","_") s7 = string.replace(s6,",","") s8 = string.replace(s7,"|","") s9 = string.lower(s8) return s9 def convert_to_identifier_with_no_lowercase(s0): s1 = string.replace(s0," ","_") s2 = string.replace(s1,"'","_") s3 = string.replace(s2,"`","_") s4 = string.replace(s3,"(","_") s5 = string.replace(s4,")","_") s6 = string.replace(s5,"-","_") s7 = string.replace(s6,",","") s8 = string.replace(s7,"|","") return s8 def replace_spaces(s0): return string.replace(s0," ","_")
Python
from header_quests import * #################################################################################################################### # Each quest record contains the following fields: # 1) Quest id: used for referencing quests in other files. The prefix qst_ is automatically added before each quest-id. # 2) Quest Name: Name displayed in the quest screen. # 3) Quest flags. See header_quests.py for a list of available flags # 4) Quest Description: Description displayed in the quest screen. # # Note that you may call the opcode setup_quest_text for setting up the name and description #################################################################################################################### quests = [ # Note : This is defined as the first governer quest in module_constants.py: ("deliver_message", "Deliver Message to {s13}", qf_random_quest, "{s9} asked you to take a message to {s13}. {s13} was at {s4} when you were given this quest." ), ("deliver_message_to_enemy_lord", "Deliver Message to {s13}", qf_random_quest, "{s9} asked you to take a message to {s13} of {s15}. {s13} was at {s4} when you were given this quest." ), ("raise_troops", "Raise {reg1} {s14}", qf_random_quest, "{s9} asked you to raise {reg1} {s14} and bring them to him." ), ("escort_lady", "Escort {s13} to {s14}", qf_random_quest, "None" ), ## ("rescue_lady_under_siege", "Rescue {s3} from {s4}", qf_random_quest, ## "{s1} asked you to rescue his {s7} {s3} from {s4} and return her back to him." ## ), ## ("deliver_message_to_lover", "Deliver Message to {s3}", qf_random_quest, ## "{s1} asked you to take a message to his lover {s3} at {s4}." ## ), ## ("bring_prisoners_to_enemy", "Bring Prisoners to {s4}", qf_random_quest, ## "{s1} asked you to bring {reg1} {s3} as prisoners to the guards at {s4}." ## ), ## ("bring_reinforcements_to_siege", "Bring Reinforcements to the Siege of {s5}", qf_random_quest, ## "{s1} asked you to bring {reg1} {s3} to {s4} at the siege of {s5}." ## ), ## ("deliver_supply_to_center_under_siege", "Deliver Supplies to {s5}", qf_random_quest, ## "TODO: Take {reg1} cartloads of supplies from constable {s3} and deliver them to constable {s4} at {s5}." ## ), ("deal_with_bandits_at_lords_village", "Save the Village of {s15} from Marauding Bandits", qf_random_quest, "{s13} asked you to deal with the bandits who took refuge in his village of {s15} and then report back to him." ), ("collect_taxes", "Collect taxes from {s3}", qf_random_quest, "{s9} asked you to collect taxes from {s3}. He offered to leave you one-fifth of all the money you collect there." ), ("hunt_down_fugitive", "Hunt down {s4}", qf_random_quest, "{s9} asked you to hunt down the fugitive named {s4}. He is currently believed to be at {s3}." ), ## ("capture_messenger", "Capture {s3}", qf_random_quest, ## "{s1} asked you to capture a {s3} and bring him back." ## ), ## ("bring_back_deserters", "Bring {reg1} {s3}", qf_random_quest, ## "{s1} asked you to bring {reg1} {s3}." ## ), ("kill_local_merchant", "Assassinate Local Merchant at {s3}", qf_random_quest, "{s9} asked you to assassinate a local merchant at {s3}." ), ("bring_back_runaway_serfs", "Bring Back Runaway Serfs", qf_random_quest, "{s9} asked you to bring back the three groups of runaway serfs back to {s2}. He said all three groups must be running away in the direction of {s3}." ), ("follow_spy", "Follow the Spy to Meeting", qf_random_quest, "{s11} asked you to follow the spy that will leave {s12}. You must be careful not to be seen by the spy during his travel, or else he may get suspicious and turn back. Once the spy meets with his accomplice, you are to ambush and capture them and bring them both back to {s11}." ), ("capture_enemy_hero", "Capture a Lord from {s13}", qf_random_quest, "TODO: {s11} asked you to capture a lord from {s13}." ), ("lend_companion", "Lend Your Companion {s3} to {s9}", qf_random_quest, "{s9} asked you to lend your companion {s3} to him for a week." ), ("collect_debt", "Collect the debt {s3} owes to {s9}", qf_random_quest, "{s9} asked you to collect the debt of {reg4} denars {s3} owes to him." ), ## ("capture_conspirators", "Capture Conspirators", qf_random_quest, ## "TODO: {s1} asked you to capture all troops in {reg1} conspirator parties that plan to rebel against him and join {s3}." ## ), ## ("defend_nobles_against_peasants", "Defend Nobles Against Peasants", qf_random_quest, ## "TODO: {s1} asked you to defend {reg1} noble parties against peasants." ## ), ("incriminate_loyal_commander", "Incriminate the Loyal Commander of {s13}, {s16}", qf_random_quest, "None" ), ("raid_caravan_to_start_war", "Raid {reg13} Caravans of {s13}", qf_random_quest, "None" ), ("meet_spy_in_enemy_town", "Meet Spy in {s13}", qf_random_quest, "None" ), ("capture_prisoners", "Bring {reg1} {s3} Prisoners", qf_random_quest, "{s9} wanted you to bring him {reg1} {s3} as prisoners." ), ## ("hunt_down_raiders", "Hunt Down Raiders",qf_random_quest, ## "{s1} asked you to hunt down and punish the raiders that attacked a village near {s3} before they reach the safety of their base at {s4}." ## ), ################## # Enemy Kingdom Lord quests ################## # Note : This is defined as the first enemy lord quest in module_constants.py: ("lend_surgeon", "Lend Your Surgeon {s3} to {s1}", qf_random_quest, "Lend your experienced surgeon {s3} to {s1}." ), ################## # Kingdom Army quests ################## # Note : This is defined as lord quests end in module_constants.py: ("follow_army", "Follow {s9}'s Army", qf_random_quest, "None" ), ("report_to_army", "Report to {s13}, the Marshall", qf_random_quest, "None" ), # Note : This is defined as the first army quest in module_constants.py: ("deliver_cattle_to_army", "Deliver {reg3} Heads of Cattle to {s13}", qf_random_quest, "None" ), ("join_siege_with_army", "Join the Siege of {s14}", qf_random_quest, "None" ), ("scout_waypoints", "Scout {s13}, {s14} and {s15}", qf_random_quest, "None" ), ################## # Kingdom Lady quests ################## # Note : This is defined as the first kingdom lady quest in module_constants.py: ("rescue_lord_by_replace", "Rescue {s13} from {s14}", qf_random_quest, "None" ), ("deliver_message_to_prisoner_lord", "Deliver Message to {s13} at {s14}", qf_random_quest, "None" ), ("duel_for_lady", "Challenge {s13} to a Trial of Arms", qf_random_quest, "None" ), ################## # Mayor quests ################## # Note : This is defined as the first mayor quest in module_constants.py: ("move_cattle_herd", "Move Cattle Herd to {s13}", qf_random_quest, "Guildmaster of {s10} asked you to move a cattle herd to {s13}." ), ("escort_merchant_caravan", "Escort Merchant Caravan to {s8}", qf_random_quest, "Escort the merchant caravan to the town of {s8}." ), ("deliver_wine", "Deliver {reg5} Units of {s6} to {s4}", qf_random_quest, "{s9} of {s3} asked you to deliver {reg5} units of {s6} to the tavern in {s4} in 7 days." ), ("troublesome_bandits", "Hunt Down Troublesome Bandits", qf_random_quest, "{s9} of {s4} asked you to hunt down the troublesome bandits in the vicinity of the town." ), ("kidnapped_girl", "Ransom Girl from Bandits", qf_random_quest, "Guildmaster of {s4} gave you {reg12} denars to pay the ransom of a girl kidnapped by bandits.\ You are to meet the bandits near {s3} and pay them the ransom fee.\ After that you are to bring the girl back to {s4}." ), ("persuade_lords_to_make_peace", "Make Sure Two Lords Do Not Object to Peace", qf_random_quest, "Guildmaster of {s4} promised you {reg12} denars if you can make sure that\ {s12} and {s13} no longer pose a threat to a peace settlement between {s15} and {s14}.\ In order to do that, you must either convince them or make sure they fall captive and remain so until a peace agreement is made." ), ("deal_with_looters", "Deal with Looters", qf_random_quest, "The Guildmaster of {s4} has asked you to deal with several bands of looters around {s4}, and bring back any goods you recover." ), ("deal_with_night_bandits", "Deal with Night Bandits", qf_random_quest, "TODO: The Guildmaster of {s14} has asked you to deal with night bandits at {s14}." ), ############ # Village Elder quests ############ # Note : This is defined as the first village elder quest in module_constants.py: ("deliver_grain", "Bring wheat to {s3}", qf_random_quest, "The elder of the village of {s3} asked you to bring them {reg5} packs of wheat.." ), ("deliver_cattle", "Deliver {reg5} Heads of Cattle to {s3}", qf_random_quest, "The elder of the village of {s3} asked you to bring {reg5} heads of cattle." ), ("train_peasants_against_bandits", "Train the Peasants of {s13} Against Bandits.", qf_random_quest, "None" ), # Deliver horses, Deliver food, Escort_Caravan, Hunt bandits, Ransom Merchant. ## ("capture_nobleman", "Capture Nobleman",qf_random_quest, ## "{s1} wanted you to capture an enemy nobleman on his way from {s3} to {s4}. He said the nobleman would leave {s3} in {reg1} days." ## ), # Bandit quests: Capture rich merchant, capture banker, kill manhunters?.. # Note : This is defined as the last village elder quest in module_constants.py: ("eliminate_bandits_infesting_village", "Save the Village of {s7} from Marauding Bandits", qf_random_quest, "A villager from {s7} begged you to save their village from the bandits that took refuge there." ), # Tutorial quest ## ("destroy_dummies", "Destroy Dummies", qf_show_progression, ## "Trainer ordered you to destroy 10 dummies in the training camp." ## ), # Join Kingdom quest ("join_faction", "Give Oath of Homage to {s1}", qf_random_quest, "Find {s1} and give him your oath of homage." ), # Rebel against Kingdom quest ("rebel_against_kingdom", "Help {s13} Claim the Throne of {s14}", qf_random_quest, "None" ), ("quests_end", "Quests End", 0, "."), ]
Python
imod_plain = 0 imod_cracked = 1 imod_rusty = 2 imod_bent = 3 imod_chipped = 4 imod_battered = 5 imod_poor = 6 imod_crude = 7 imod_old = 8 imod_cheap = 9 imod_fine = 10 imod_well_made = 11 imod_sharp = 12 imod_balanced = 13 imod_tempered = 14 imod_deadly = 15 imod_exquisite = 16 imod_masterwork = 17 imod_heavy = 18 imod_strong = 19 imod_powerful = 20 imod_tattered = 21 imod_ragged = 22 imod_rough = 23 imod_sturdy = 24 imod_thick = 25 imod_hardened = 26 imod_reinforced = 27 imod_superb = 28 imod_lordly = 29 imod_lame = 30 imod_swaybacked = 31 imod_stubborn = 32 imod_timid = 33 imod_meek = 34 imod_spirited = 35 imod_champion = 36 imod_fresh = 37 imod_day_old = 38 imod_two_day_old = 39 imod_smelling = 40 imod_rotten = 41 imod_large_bag = 42 imodbit_plain = 1 imodbit_cracked = 2 imodbit_rusty = 4 imodbit_bent = 8 imodbit_chipped = 16 imodbit_battered = 32 imodbit_poor = 64 imodbit_crude = 128 imodbit_old = 256 imodbit_cheap = 512 imodbit_fine = 1024 imodbit_well_made = 2048 imodbit_sharp = 4096 imodbit_balanced = 8192 imodbit_tempered = 16384 imodbit_deadly = 32768 imodbit_exquisite = 65536 imodbit_masterwork = 131072 imodbit_heavy = 262144 imodbit_strong = 524288 imodbit_powerful = 1048576 imodbit_tattered = 2097152 imodbit_ragged = 4194304 imodbit_rough = 8388608 imodbit_sturdy = 16777216 imodbit_thick = 33554432 imodbit_hardened = 67108864 imodbit_reinforced = 134217728 imodbit_superb = 268435456 imodbit_lordly = 536870912 imodbit_lame = 1073741824 imodbit_swaybacked = 2147483648 imodbit_stubborn = 4294967296 imodbit_timid = 8589934592 imodbit_meek = 17179869184 imodbit_spirited = 34359738368 imodbit_champion = 68719476736 imodbit_fresh = 137438953472 imodbit_day_old = 274877906944 imodbit_two_day_old = 549755813888 imodbit_smelling = 1099511627776 imodbit_rotten = 2199023255552 imodbit_large_bag = 4398046511104
Python
menu_start_game_1 = 0 menu_start_phase_2 = 1 menu_start_game_3 = 2 menu_tutorial = 3 menu_reports = 4 menu_custom_battle_2 = 5 menu_custom_battle_end = 6 menu_start_character_1 = 7 menu_start_character_2 = 8 menu_start_character_3 = 9 menu_start_character_4 = 10 menu_choose_skill = 11 menu_past_life_explanation = 12 menu_auto_return = 13 menu_morale_report = 14 menu_faction_orders = 15 menu_character_report = 16 menu_party_size_report = 17 menu_faction_relations_report = 18 menu_camp = 19 menu_camp_cheat = 20 menu_camp_action = 21 menu_camp_recruit_prisoners = 22 menu_camp_no_prisoners = 23 menu_camp_action_read_book = 24 menu_camp_action_read_book_start = 25 menu_retirement_verify = 26 menu_end_game = 27 menu_pay_day = 28 menu_cattle_herd = 29 menu_cattle_herd_kill = 30 menu_cattle_herd_kill_end = 31 menu_arena_duel_fight = 32 menu_simple_encounter = 33 menu_encounter_retreat_confirm = 34 menu_encounter_retreat = 35 menu_order_attack_begin = 36 menu_order_attack_2 = 37 menu_battle_debrief = 38 menu_total_victory = 39 menu_enemy_slipped_away = 40 menu_total_defeat = 41 menu_permanent_damage = 42 menu_pre_join = 43 menu_join_battle = 44 menu_join_order_attack = 45 menu_zendar = 46 menu_salt_mine = 47 menu_four_ways_inn = 48 menu_test_scene = 49 menu_battlefields = 50 menu_dhorak_keep = 51 menu_join_siege_outside = 52 menu_cut_siege_without_fight = 53 menu_besiegers_camp_with_allies = 54 menu_castle_outside = 55 menu_castle_guard = 56 menu_castle_entry_granted = 57 menu_castle_entry_denied = 58 menu_castle_meeting = 59 menu_castle_meeting_selected = 60 menu_castle_besiege = 61 menu_siege_attack_meets_sally = 62 menu_castle_besiege_inner_battle = 63 menu_construct_ladders = 64 menu_construct_siege_tower = 65 menu_castle_attack_walls_simulate = 66 menu_castle_attack_walls_with_allies_simulate = 67 menu_castle_taken_by_friends = 68 menu_castle_taken = 69 menu_castle_taken_2 = 70 menu_requested_castle_granted_to_player = 71 menu_requested_castle_granted_to_another = 72 menu_leave_faction = 73 menu_give_center_to_player = 74 menu_give_center_to_player_2 = 75 menu_oath_fulfilled = 76 menu_siege_started_defender = 77 menu_siege_join_defense = 78 menu_enter_your_own_castle = 79 menu_village = 80 menu_village_hostile_action = 81 menu_recruit_volunteers = 82 menu_village_hunt_down_fugitive_defeated = 83 menu_village_infest_bandits_result = 84 menu_village_infestation_removed = 85 menu_center_manage = 86 menu_center_improve = 87 menu_town_bandits_failed = 88 menu_town_bandits_succeeded = 89 menu_village_steal_cattle_confirm = 90 menu_village_steal_cattle = 91 menu_village_take_food_confirm = 92 menu_village_take_food = 93 menu_village_start_attack = 94 menu_village_loot_no_resist = 95 menu_village_loot_complete = 96 menu_village_loot_defeat = 97 menu_village_loot_continue = 98 menu_close = 99 menu_center_tax = 100 menu_town = 101 menu_town_tournament_lost = 102 menu_town_tournament_won = 103 menu_town_tournament_won_by_another = 104 menu_town_tournament = 105 menu_tournament_withdraw_verify = 106 menu_tournament_bet = 107 menu_tournament_bet_confirm = 108 menu_tournament_participants = 109 menu_collect_taxes = 110 menu_collect_taxes_complete = 111 menu_collect_taxes_rebels_killed = 112 menu_collect_taxes_failed = 113 menu_collect_taxes_revolt_warning = 114 menu_collect_taxes_revolt = 115 menu_train_peasants_against_bandits = 116 menu_train_peasants_against_bandits_ready = 117 menu_train_peasants_against_bandits_training_result = 118 menu_train_peasants_against_bandits_attack = 119 menu_train_peasants_against_bandits_attack_result = 120 menu_train_peasants_against_bandits_success = 121 menu_disembark = 122 menu_ship_reembark = 123 menu_center_reports = 124 menu_price_and_production = 125 menu_town_trade = 126 menu_town_trade_assessment_begin = 127 menu_town_trade_assessment = 128 menu_sneak_into_town_suceeded = 129 menu_sneak_into_town_caught = 130 menu_sneak_into_town_caught_dispersed_guards = 131 menu_sneak_into_town_caught_ran_away = 132 menu_enemy_offer_ransom_for_prisoner = 133 menu_training_ground = 134 menu_training_ground_selection_details_melee_1 = 135 menu_training_ground_selection_details_melee_2 = 136 menu_training_ground_selection_details_mounted = 137 menu_training_ground_selection_details_ranged_1 = 138 menu_training_ground_selection_details_ranged_2 = 139 menu_training_ground_description = 140 menu_training_ground_training_result = 141 menu_marshall_selection_candidate_ask = 142 menu_captivity_avoid_wilderness = 143 menu_captivity_start_wilderness = 144 menu_captivity_start_wilderness_surrender = 145 menu_captivity_start_wilderness_defeat = 146 menu_captivity_start_castle_surrender = 147 menu_captivity_start_castle_defeat = 148 menu_captivity_start_under_siege_defeat = 149 menu_captivity_wilderness_taken_prisoner = 150 menu_captivity_wilderness_check = 151 menu_captivity_end_wilderness_escape = 152 menu_captivity_castle_taken_prisoner = 153 menu_captivity_rescue_lord_taken_prisoner = 154 menu_captivity_castle_check = 155 menu_captivity_end_exchanged_with_prisoner = 156 menu_captivity_end_propose_ransom = 157 menu_captivity_castle_remain = 158 menu_kingdom_army_quest_report_to_army = 159 menu_kingdom_army_quest_messenger = 160 menu_kingdom_army_quest_join_siege_order = 161 menu_kingdom_army_follow_failed = 162 menu_invite_player_to_faction_without_center = 163 menu_invite_player_to_faction = 164 menu_invite_player_to_faction_accepted = 165 menu_question_peace_offer = 166 menu_notification_player_faction_active = 167 menu_notification_player_faction_deactive = 168 menu_notification_center_under_siege = 169 menu_notification_village_raided = 170 menu_notification_village_raid_started = 171 menu_notification_one_faction_left = 172 menu_notification_oath_renounced_faction_defeated = 173 menu_notification_center_lost = 174 menu_notification_troop_left_players_faction = 175 menu_notification_troop_joined_players_faction = 176 menu_notification_war_declared = 177 menu_notification_peace_declared = 178 menu_notification_faction_defeated = 179 menu_notification_rebels_switched_to_faction = 180 menu_kill_local_merchant_begin = 181 menu_auto_return_to_map = 182 menu_camp_action_formation_control_settings = 183 menu_camp_action_manage_arrays = 184 menu_camp_action_array_change = 185
Python
mst_town_default = 0 mst_conversation_encounter = 1 mst_town_center = 2 mst_village_center = 3 mst_bandits_at_night = 4 mst_village_training = 5 mst_visit_town_castle = 6 mst_back_alley_kill_local_merchant = 7 mst_back_alley_revolt = 8 mst_lead_charge = 9 mst_village_attack_bandits = 10 mst_village_raid = 11 mst_besiege_inner_battle_castle = 12 mst_besiege_inner_battle_town_center = 13 mst_castle_attack_walls_defenders_sally = 14 mst_castle_attack_walls_belfry = 15 mst_castle_attack_walls_ladder = 16 mst_castle_visit = 17 mst_training_ground_trainer_talk = 18 mst_training_ground_trainer_training = 19 mst_training_ground_training = 20 mst_sneak_caught_fight = 21 mst_ai_training = 22 mst_camera_test = 23 mst_arena_melee_fight = 24 mst_arena_challenge_fight = 25 mst_tutorial_1 = 26 mst_tutorial_2 = 27 mst_tutorial_3 = 28 mst_tutorial_3_2 = 29 mst_tutorial_4 = 30 mst_tutorial_5 = 31 mst_custom_battle = 32 mst_custom_battle_siege = 33 mst_custom_battle_5 = 34
Python
fac_no_faction = 0 fac_commoners = 1 fac_outlaws = 2 fac_neutral = 3 fac_innocents = 4 fac_merchants = 5 fac_dark_knights = 6 fac_culture_1 = 7 fac_culture_2 = 8 fac_culture_3 = 9 fac_culture_4 = 10 fac_culture_5 = 11 fac_player_faction = 12 fac_player_supporters_faction = 13 fac_kingdom_1 = 14 fac_kingdom_2 = 15 fac_kingdom_3 = 16 fac_kingdom_4 = 17 fac_kingdom_5 = 18 fac_kingdoms_end = 19 fac_robber_knights = 20 fac_khergits = 21 fac_black_khergits = 22 fac_manhunters = 23 fac_deserters = 24 fac_mountain_bandits = 25 fac_forest_bandits = 26 fac_undeads = 27 fac_slavers = 28 fac_peasant_rebels = 29 fac_noble_refugees = 30
Python
import string from module_info import * from module_troops import * from process_common import * #from process_operations import * num_face_numeric_keys = 4 def save_troops(): file = open(export_dir + "troops.txt","w") file.write("troopsfile version 1\n") file.write("%d "%len(troops)) for troop in troops: troop_len = len(troop) if troop_len == 11: troop[11:11] = [0, 0, 0, 0] elif troop_len == 12: troop[12:12] = [0, 0, 0] elif troop_len == 13: troop[13:13] = [0, 0] elif troop_len == 14: troop[14:14] = [0] if (troop[4] > 0): # add_tag_use(tag_uses,tag_scene,troop[4] & tsf_site_id_mask) id_no = find_object(troops,convert_to_identifier(troop[0])) # if (id_no >= 0): add_tag_use(tag_uses,tag_troop,id_no) # if (troop[6] > 0): add_tag_use(tag_uses,tag_faction,troop[6]) file.write("\ntrp_%s %s %s %d %d %d %d %d %d\n "%(convert_to_identifier(troop[0]),replace_spaces(troop[1]),replace_spaces(troop[2]),troop[3],troop[4],troop[5], troop[6], troop[13], troop[14])) inventory_list = troop[7] # inventory_list.append(itm_arrows) # inventory_list.append(itm_bolts) for inventory_item in inventory_list: # add_tag_use(tag_uses,tag_item,inventory_item) file.write("%d 0 "%inventory_item) for i in xrange(max_inventory_items - len(inventory_list)): file.write("-1 0 ") file.write("\n ") attrib = troop[8] strength = (attrib & 0xff) agility = ((attrib >> 8)& 0xff) intelligence = ((attrib >> 16)& 0xff) charisma = ((attrib >> 24)& 0xff) starting_level = (attrib >> level_bits) & level_mask # gold = two_to_pow(2 + (attrib >> 12)& 0x0f) * random file.write(" %d %d %d %d %d\n"%(strength,agility,intelligence,charisma,starting_level)) wp_word = troop[9] for wp in xrange(num_weapon_proficiencies): wp_level = wp_word & 0x3FF file.write(" %d"%wp_level) wp_word = wp_word >> 10 file.write("\n") skill_array = troop[10] for i in xrange(num_skill_words): file.write("%d "%((skill_array >> (i * 32)) & 0xffffffff)) file.write("\n ") face_keys = [troop[11],troop[12]] for fckey in (face_keys): word_keys = [] for word_no in xrange(num_face_numeric_keys): word_keys.append((fckey >> (64 * word_no)) & 0xFFFFFFFFFFFFFFFF) for word_no in xrange(num_face_numeric_keys): file.write("%d "%(word_keys[(num_face_numeric_keys -1) - word_no])) file.write("\n") # word2 = (fckey >> 64) & 0xFFFFFFFFFFFFFFFF # word3 = (fckey >> 128) & 0xFFFFFFFFFFFFFFFF # word4 = (fckey >> 192) & 0xFFFFFFFFFFFFFFFF # file.write("%d %d %d %d "%(word4, word3, word2, word1)) # face_keys = troop[10] # for fckey in (face_keys): # file.write("%d "%(fckey)) # for i in xrange(4 - len(face_keys)): # file.write("0 ") file.close() def two_to_pow(x): result = 1 for i in xrange(x): result = result * 2 return result def save_python_header(): file = open("./ID_troops.py","w") for i_troop in xrange(len(troops)): file.write("trp_%s = %d\n"%(convert_to_identifier(troops[i_troop][0]),i_troop)) file.close() print "Exporting troops data" #tag_uses = load_tag_uses(export_dir) save_python_header() save_troops() #save_tag_uses(export_dir, tag_uses) #print "Generating C header..." #save_c_header() #print "Generating Python header..." #print "Finished."
Python
from module_info import * from process_common import * from process_operations import * print "Checking tag usages..." tag_uses = load_tag_uses(export_dir) #Processing strings length = 0 for i in xrange(len(tag_uses[tag_string])): if tag_uses[tag_string][i] > 0: length = i for i in xrange(length): if tag_uses[tag_string][i] == 0: if i > 3: print "WARNING: String is never used: " + strings[i][0].lower() #Processing items length = 0 for i in xrange(len(tag_uses[tag_item])): if tag_uses[tag_item][i] > 0: length = i for i in xrange(length): if tag_uses[tag_item][i] == 0 and i > 1: print "WARNING: Item is never used: " + items[i][0].lower() #Processing troops length = 0 for i in xrange(len(tag_uses[tag_troop])): if tag_uses[tag_troop][i] > 0: length = i for i in xrange(length): if tag_uses[tag_troop][i] == 0: if i > 3: print "WARNING: Troop is never used: " + troops[i][0].lower() #Processing factions length = 0 for i in xrange(len(tag_uses[tag_faction])): if tag_uses[tag_faction][i] > 0: length = i for i in xrange(length): if tag_uses[tag_faction][i] == 0: print "WARNING: Faction is never used: " + factions[i][0].lower() #Processing quests length = 0 for i in xrange(len(tag_uses[tag_quest])): if tag_uses[tag_quest][i] > 0: length = i for i in xrange(length): if tag_uses[tag_quest][i] == 0: print "WARNING: Quest is never used: " + quests[i][0].lower() #Processing party_templates length = 0 for i in xrange(len(tag_uses[tag_party_tpl])): if tag_uses[tag_party_tpl][i] > 0: length = i for i in xrange(length): if tag_uses[tag_party_tpl][i] == 0: if i > 3: print "WARNING: Party template is never used: " + party_templates[i][0].lower() #Processing parties length = 0 for i in xrange(len(tag_uses[tag_party])): if tag_uses[tag_party][i] > 0: length = i for i in xrange(length): if tag_uses[tag_party][i] == 0: if parties[i][0].lower().find("temp_") == -1: print "WARNING: Party is never used: " + parties[i][0].lower() #Processing scenes #length = 0 #for i in xrange(1024): # if tag_uses[tag_scene][i] > 0: # length = i # #for i in xrange(length): # if tag_uses[tag_scene][i] == 0: # print "WARNING: Scene is never used: " + scenes[i][0].lower() #Processing mission_templates length = 0 for i in xrange(len(tag_uses[tag_mission_tpl])): if tag_uses[tag_mission_tpl][i] > 0: length = i for i in xrange(length): if tag_uses[tag_mission_tpl][i] == 0: print "WARNING: Mission template is never used: " + mission_templates[i][0].lower() #Processing game_menus length = 0 for i in xrange(len(tag_uses[tag_menu])): if tag_uses[tag_menu][i] > 0: length = i for i in xrange(length): if tag_uses[tag_menu][i] == 0 and i > 0: if i > 1: print "WARNING: Game menu is never used: " + game_menus[i][0].lower() #Processing scripts length = 0 for i in xrange(len(tag_uses[tag_script])): if tag_uses[tag_script][i] > 0: length = i for i in xrange(length): if tag_uses[tag_script][i] == 0: if scripts[i][0].lower().find("game_") == -1: print "WARNING: Script is never used: " + scripts[i][0].lower() #Processing particle systems length = 0 for i in xrange(len(tag_uses[tag_particle_sys])): if tag_uses[tag_particle_sys][i] > 0: length = i for i in xrange(length): if tag_uses[tag_particle_sys][i] == 0: if particle_systems[i][0].lower().find("game_") == -1: print "WARNING: Particle system is never used: " + particle_systems[i][0].lower() #Processing scene props #length = 0 #for i in xrange(1024): # if tag_uses[tag_scene_prop][i] > 0: # length = i # #for i in xrange(length): # if tag_uses[tag_scene_prop][i] == 0: # print "WARNING: Scene prop is never used: " + scene_props[i][0].lower() #Processing sounds #length = 0 #for i in xrange(1024): # if tag_uses[tag_sound][i] > 0: # length = i # #for i in xrange(length): # if tag_uses[tag_sound][i] == 0: # print "WARNING: Sound is never used: " + sounds[i][0].lower() #Processing map icons #length = 0 #for i in xrange(1024): # if tag_uses[tag_map_icon][i] > 0: # length = i # #for i in xrange(length): # if tag_uses[tag_map_icon][i] == 0: # print "WARNING: Map icon is never used: " + map_icons[i][0].lower()
Python
from header_common import * from header_presentations import * from header_mission_templates import * from ID_meshes import * from header_operations import * from header_triggers import * from module_constants import * import string #################################################################################################################### # Each presentation record contains the following fields: # 1) Presentation id: used for referencing presentations in other files. The prefix prsnt_ is automatically added before each presentation id. # 2) Presentation flags. See header_presentations.py for a list of available flags # 3) Presentation background mesh: See module_meshes.py for a list of available background meshes # 4) Triggers: Simple triggers that are associated with the presentation #################################################################################################################### ################################## # Form Ranks kit section # formation_order_functions = [ ("@Dismiss", (call_script, "script_formation_dismiss_key_reaction")), ("@Follow me", (call_script, "script_formation_follow_key_reaction")), ("@Tactical charge", (call_script, "script_formation_tactical_charge_key_reaction")), ("@Charge", (call_script, "script_formation_charge_key_reaction", 1, "str_formation_charge")), ("@Halt", (call_script, "script_formation_charge_key_reaction", 0, "str_formation_halt")), ("@Fall back", (call_script, "script_formation_charge_key_reaction", -1, "str_formation_fall_back")), ("@Move forward", (call_script, "script_formation_move_key_reaction", 0, 10, "str_formation_advance")), ("@Move backward", (call_script, "script_formation_move_key_reaction", 0, -10, "str_formation_move_back")), ("@Move left", (call_script, "script_formation_move_key_reaction", -10, 0, "str_formation_move_left")), ("@Move right", (call_script, "script_formation_move_key_reaction", 10, 0, "str_formation_move_right")), ("@Turn left", (call_script, "script_formation_turn_key_reaction", 15, "str_formation_turn_left")), ("@Turn right", (call_script, "script_formation_turn_key_reaction", -15, "str_formation_turn_right")), ("@Stand closer", (call_script, "script_formation_density_key_reaction", -1, "str_formation_stand_closer")), ("@Spred out", (call_script, "script_formation_density_key_reaction", 1, "str_formation_spread_out")), ("@Toward enemies", (call_script, "script_formation_auto_rotation_key_reaction", 1)), ("@Free direction", (call_script, "script_formation_auto_rotation_key_reaction", 0)), ] # # Form Ranks kit section end ############################### presentations = [ ("game_credits",prsntf_read_only,mesh_load_window,[ (ti_on_presentation_load, [(assign, "$g_presentation_credits_obj_1", -1), (assign, "$g_presentation_credits_obj_2", -1), (assign, "$g_presentation_credits_obj_3", -1), (assign, "$g_presentation_credits_obj_4", -1), (assign, "$g_presentation_credits_obj_5", -1), (assign, "$g_presentation_credits_obj_6", -1), (assign, "$g_presentation_credits_obj_7", -1), (assign, "$g_presentation_credits_obj_8", -1), (assign, "$g_presentation_credits_obj_9", -1), (assign, "$g_presentation_credits_obj_10", -1), (assign, "$g_presentation_credits_obj_11", -1), (assign, "$g_presentation_credits_obj_12", -1), (assign, "$g_presentation_credits_obj_1_alpha", 0), (assign, "$g_presentation_credits_obj_2_alpha", 0), (assign, "$g_presentation_credits_obj_3_alpha", 0), (assign, "$g_presentation_credits_obj_4_alpha", 0), (assign, "$g_presentation_credits_obj_5_alpha", 0), (assign, "$g_presentation_credits_obj_6_alpha", 0), (assign, "$g_presentation_credits_obj_7_alpha", 0), (assign, "$g_presentation_credits_obj_8_alpha", 0), (assign, "$g_presentation_credits_obj_9_alpha", 0), ]), (ti_on_presentation_run, [ (store_trigger_param_1, ":cur_time"), (set_fixed_point_multiplier, 1000), (presentation_set_duration, 1000000), (try_begin), (this_or_next|key_clicked, key_space), (this_or_next|key_clicked, key_enter), (this_or_next|key_clicked, key_escape), (this_or_next|key_clicked, key_back_space), (this_or_next|key_clicked, key_left_mouse_button), (key_clicked, key_right_mouse_button), (presentation_set_duration, 0), (try_end), (try_begin), (lt, "$g_presentation_credits_obj_1", 0), (str_store_string, s1, "str_credits_1"), (create_text_overlay, "$g_presentation_credits_obj_1", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_1", 0), (overlay_set_alpha, "$g_presentation_credits_obj_1", 0), (position_set_x, pos1, 1500), (position_set_y, pos1, 1500), (overlay_set_size, "$g_presentation_credits_obj_1", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 375), (overlay_set_position, "$g_presentation_credits_obj_1", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_1", 1000, 0xFF), (else_try), (gt, ":cur_time", 2000), (eq, "$g_presentation_credits_obj_1_alpha", 0), (assign, "$g_presentation_credits_obj_1_alpha", 1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_1", 1000, 0x00), (else_try), (gt, ":cur_time", 3500), (lt, "$g_presentation_credits_obj_2", 0), (str_store_string, s1, "str_credits_2"), (create_text_overlay, "$g_presentation_credits_obj_2", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_2", 0), (overlay_set_alpha, "$g_presentation_credits_obj_2", 0), (position_set_x, pos1, 1750), (position_set_y, pos1, 1750), (overlay_set_size, "$g_presentation_credits_obj_2", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 375), (overlay_set_position, "$g_presentation_credits_obj_2", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_2", 1000, 0xFF), (else_try), (gt, ":cur_time", 5500), (eq, "$g_presentation_credits_obj_2_alpha", 0), (assign, "$g_presentation_credits_obj_2_alpha", 1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_2", 1000, 0x00), (else_try), (gt, ":cur_time", 7000), (lt, "$g_presentation_credits_obj_3", 0), (str_store_string, s1, "str_credits_3"), (create_text_overlay, "$g_presentation_credits_obj_3", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_3", 0), (overlay_set_alpha, "$g_presentation_credits_obj_3", 0), (position_set_x, pos1, 1750), (position_set_y, pos1, 1750), (overlay_set_size, "$g_presentation_credits_obj_3", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 375), (overlay_set_position, "$g_presentation_credits_obj_3", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_3", 1000, 0xFF), (else_try), (gt, ":cur_time", 9000), (eq, "$g_presentation_credits_obj_3_alpha", 0), (assign, "$g_presentation_credits_obj_3_alpha", 1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_3", 1000, 0), (else_try), (gt, ":cur_time", 10500), (lt, "$g_presentation_credits_obj_4", 0), (str_store_string, s1, "str_credits_4"), (create_text_overlay, "$g_presentation_credits_obj_4", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_4", 0), (overlay_set_alpha, "$g_presentation_credits_obj_4", 0), (position_set_x, pos1, 1750), (position_set_y, pos1, 1750), (overlay_set_size, "$g_presentation_credits_obj_4", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 375), (overlay_set_position, "$g_presentation_credits_obj_4", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_4", 1000, 0xFF), (else_try), (gt, ":cur_time", 12500), (eq, "$g_presentation_credits_obj_4_alpha", 0), (assign, "$g_presentation_credits_obj_4_alpha", 1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_4", 1000, 0), (else_try), (gt, ":cur_time", 14000), (lt, "$g_presentation_credits_obj_5", 0), (str_store_string, s1, "str_credits_8"), (create_text_overlay, "$g_presentation_credits_obj_5", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_5", 0), (overlay_set_alpha, "$g_presentation_credits_obj_5", 0), (position_set_x, pos1, 1750), (position_set_y, pos1, 1750), (overlay_set_size, "$g_presentation_credits_obj_5", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 375), (overlay_set_position, "$g_presentation_credits_obj_5", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_5", 1000, 0xFF), (else_try), (gt, ":cur_time", 16000), (eq, "$g_presentation_credits_obj_5_alpha", 0), (assign, "$g_presentation_credits_obj_5_alpha", 1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_5", 1000, 0), (else_try), (gt, ":cur_time", 17500), (lt, "$g_presentation_credits_obj_6", 0), (str_store_string, s1, "str_credits_5"), (create_text_overlay, "$g_presentation_credits_obj_6", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_6", 0), (overlay_set_alpha, "$g_presentation_credits_obj_6", 0), (position_set_x, pos1, 1750), (position_set_y, pos1, 1750), (overlay_set_size, "$g_presentation_credits_obj_6", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 375), (overlay_set_position, "$g_presentation_credits_obj_6", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_6", 1000, 0xFF), (else_try), (gt, ":cur_time", 19500), (eq, "$g_presentation_credits_obj_6_alpha", 0), (assign, "$g_presentation_credits_obj_6_alpha", 1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_6", 1000, 0), (else_try), (gt, ":cur_time", 21000), (lt, "$g_presentation_credits_obj_7", 0), (str_store_string, s1, "str_credits_6"), (create_text_overlay, "$g_presentation_credits_obj_7", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_7", 0), (overlay_set_alpha, "$g_presentation_credits_obj_7", 0), (position_set_x, pos1, 1750), (position_set_y, pos1, 1750), (overlay_set_size, "$g_presentation_credits_obj_7", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 375), (overlay_set_position, "$g_presentation_credits_obj_7", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_7", 1000, 0xFF), (else_try), (gt, ":cur_time", 23000), (eq, "$g_presentation_credits_obj_7_alpha", 0), (assign, "$g_presentation_credits_obj_7_alpha", 1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_7", 1000, 0), (else_try), (gt, ":cur_time", 24500), (lt, "$g_presentation_credits_obj_8", 0), (str_store_string, s1, "str_credits_9"), (create_text_overlay, "$g_presentation_credits_obj_8", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_8", 0), (overlay_set_alpha, "$g_presentation_credits_obj_8", 0), (position_set_x, pos1, 1750), (position_set_y, pos1, 1750), (overlay_set_size, "$g_presentation_credits_obj_8", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 375), (overlay_set_position, "$g_presentation_credits_obj_8", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_8", 1000, 0xFF), (else_try), (gt, ":cur_time", 26500), (eq, "$g_presentation_credits_obj_8_alpha", 0), (assign, "$g_presentation_credits_obj_8_alpha", 1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_8", 1000, 0), (else_try), (gt, ":cur_time", 28000), (lt, "$g_presentation_credits_obj_9", 0), (str_store_string, s1, "str_credits_10"), (create_text_overlay, "$g_presentation_credits_obj_9", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_9", 0), (overlay_set_alpha, "$g_presentation_credits_obj_9", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, "$g_presentation_credits_obj_9", pos1), (position_set_x, pos1, 250), (position_set_y, pos1, 485), (overlay_set_position, "$g_presentation_credits_obj_9", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_9", 1000, 0xFF), (str_store_string, s1, "str_credits_11"), (create_text_overlay, "$g_presentation_credits_obj_10", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_10", 0), (overlay_set_alpha, "$g_presentation_credits_obj_10", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, "$g_presentation_credits_obj_10", pos1), (position_set_x, pos1, 750), (position_set_y, pos1, 470), (overlay_set_position, "$g_presentation_credits_obj_10", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_10", 1000, 0xFF), (str_store_string, s1, "str_credits_12"), (create_text_overlay, "$g_presentation_credits_obj_11", s1, tf_center_justify|tf_double_space|tf_vertical_align_center), (overlay_set_color, "$g_presentation_credits_obj_11", 0), (overlay_set_alpha, "$g_presentation_credits_obj_11", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, "$g_presentation_credits_obj_11", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 105), (overlay_set_position, "$g_presentation_credits_obj_11", pos1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_11", 1000, 0xFF), (else_try), (gt, ":cur_time", 34000), (eq, "$g_presentation_credits_obj_9_alpha", 0), (assign, "$g_presentation_credits_obj_9_alpha", 1), (overlay_animate_to_alpha, "$g_presentation_credits_obj_9", 1000, 0), (overlay_animate_to_alpha, "$g_presentation_credits_obj_10", 1000, 0), (overlay_animate_to_alpha, "$g_presentation_credits_obj_11", 1000, 0), (else_try), (gt, ":cur_time", 35500), (lt, "$g_presentation_credits_obj_12", 0), (str_store_string, s1, "str_credits_7"), (create_text_overlay, "$g_presentation_credits_obj_12", s1, tf_center_justify|tf_double_space), (overlay_set_color, "$g_presentation_credits_obj_12", 0), (overlay_set_alpha, "$g_presentation_credits_obj_12", 0xFF), (position_set_x, pos1, 1000), (position_set_y, pos1, 1000), (overlay_set_size, "$g_presentation_credits_obj_12", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, -6100), (overlay_set_position, "$g_presentation_credits_obj_12", pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 760), (overlay_animate_to_position, "$g_presentation_credits_obj_12", 70000, pos1), (else_try), (gt, ":cur_time", 105500), (presentation_set_duration, 0), (try_end), ]), ]), ("banner_selection",0,mesh_load_window,[ (ti_on_presentation_load, [(set_fixed_point_multiplier, 1000), (str_store_string, s1, "str_banner_selection_text"), (create_text_overlay, reg1, s1, tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 600), (overlay_set_position, reg1, pos1), (overlay_set_text, reg1, s1), (create_button_overlay, "$g_presentation_obj_1", "@Next Page", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 50), (overlay_set_position, "$g_presentation_obj_1", pos1), (assign, ":x_pos", 150), (assign, ":y_pos", 575), (assign, ":try_end", banner_meshes_end_minus_one), (store_mul, ":begin_mesh", 16, "$g_presentation_page_no"), (val_add, ":begin_mesh", banner_meshes_begin), (store_add, ":try_end_2", ":begin_mesh", 16), (val_min, ":try_end", ":try_end_2"), (store_add, "$g_presentation_banner_start", "$g_presentation_obj_1", 1), (try_for_range, ":cur_banner_mesh", ":begin_mesh", ":try_end"), (create_image_button_overlay, reg1, ":cur_banner_mesh", ":cur_banner_mesh"), (position_set_x, pos1, ":x_pos"), (position_set_y, pos1, ":y_pos"), (overlay_set_position, reg1, pos1), (position_set_x, pos1, 100), (position_set_y, pos1, 100), (overlay_set_size, reg1, pos1), (val_add, ":x_pos", 100), (ge, ":x_pos", 900), (assign, ":x_pos", 150), (val_sub, ":y_pos", 250), (try_end), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [(store_trigger_param_1, ":object"), (try_begin), (eq, ":object", "$g_presentation_obj_1"), (val_add, "$g_presentation_page_no", 1), (val_mod, "$g_presentation_page_no", 8), (start_presentation, "prsnt_banner_selection"), (else_try), (store_sub, ":selected_banner", ":object", "$g_presentation_banner_start"), (store_mul, ":page_adder", 16, "$g_presentation_page_no"), (val_add, ":selected_banner", ":page_adder"), (store_add, ":selected_banner_map_icon", ":selected_banner", banner_map_icons_begin), (party_set_banner_icon, "p_main_party", ":selected_banner_map_icon"), (store_add, ":selected_banner_spr", ":selected_banner", banner_scene_props_begin), (troop_set_slot, "trp_player", slot_troop_banner_scene_prop, ":selected_banner_spr"), (presentation_set_duration, 0), (assign, ":troop_to_change", 0), (assign, ":end_cond", kingdom_heroes_end), (try_for_range, ":cur_troop", kingdom_heroes_begin, ":end_cond"), (troop_slot_eq, ":cur_troop", slot_troop_banner_scene_prop, ":selected_banner_spr"), (assign, ":troop_to_change", ":cur_troop"), (assign, ":end_cond", 0), (troop_set_slot, ":cur_troop", slot_troop_banner_scene_prop, banner_scene_props_end_minus_one), (troop_get_slot, ":cur_party", ":cur_troop", slot_troop_leaded_party), (gt, ":cur_party", 0), (party_set_banner_icon, ":cur_party", banner_map_icons_end_minus_one), (try_end), (try_for_range, ":cur_center", walled_centers_begin, walled_centers_end), (try_begin), (party_slot_eq, ":cur_center", slot_town_lord, "trp_player"), (party_set_banner_icon, ":cur_center", ":selected_banner_map_icon"), (else_try), (party_slot_eq, ":cur_center", slot_town_lord, ":troop_to_change"), (party_set_banner_icon, ":cur_center", banner_map_icons_end_minus_one), (try_end), (try_end), (try_end), ]), (ti_on_presentation_run, [(try_begin), (this_or_next|key_clicked, key_space), (this_or_next|key_clicked, key_enter), (this_or_next|key_clicked, key_escape), (key_clicked, key_back_space), (presentation_set_duration, 0), (try_end), ]), ]), ("custom_banner", 0, mesh_load_window, [ (ti_on_presentation_load, [ (set_fixed_point_multiplier, 1000), (troop_get_slot, ":flag_type", "trp_player", slot_troop_custom_banner_flag_type), (val_max, ":flag_type", 0), (val_add, ":flag_type", custom_banner_flag_types_begin), (troop_get_slot, ":map_flag_type", "trp_player", slot_troop_custom_banner_map_flag_type), (val_max, ":map_flag_type", 0), (val_add, ":map_flag_type", custom_banner_flag_map_types_begin), ## (create_mesh_overlay_with_tableau_material, "$g_presentation_obj_1", ":flag_type", "tableau_custom_banner_square", "trp_player"), (troop_get_slot, ":bg_color_1", "trp_player", slot_troop_custom_banner_bg_color_1), (troop_get_slot, ":bg_color_2", "trp_player", slot_troop_custom_banner_bg_color_2), (create_text_overlay, reg1, "str_color_no_1", 0), (position_set_x, pos1, 40), (position_set_y, pos1, 550), (overlay_set_position, reg1, pos1), (create_text_overlay, reg1, "str_color_no_2", 0), (position_set_x, pos1, 40), (position_set_y, pos1, 500), (overlay_set_position, reg1, pos1), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_22", "mesh_color_picker", "tableau_color_picker", ":bg_color_1"), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_23", "mesh_color_picker", "tableau_color_picker", ":bg_color_2"), (position_set_x, pos1, 200), (position_set_y, pos1, 565), (overlay_set_position, "$g_presentation_obj_22", pos1), (position_set_y, pos1, 515), (overlay_set_position, "$g_presentation_obj_23", pos1), (position_set_x, pos1, 250), (position_set_y, pos1, 250), (overlay_set_size, "$g_presentation_obj_22", pos1), (overlay_set_size, "$g_presentation_obj_23", pos1), (create_button_overlay, "$g_presentation_obj_2", "str_change", tf_center_justify), (create_button_overlay, "$g_presentation_obj_3", "str_change", tf_center_justify), (create_button_overlay, "$g_presentation_obj_4", "str_change_background", tf_center_justify), (create_button_overlay, "$g_presentation_obj_5", "str_change", tf_center_justify), (create_button_overlay, "$g_presentation_obj_19", "str_change", tf_center_justify), (create_button_overlay, "$g_presentation_obj_20", "str_accept", tf_center_justify), (troop_get_slot, ":num_charges", "trp_player", slot_troop_custom_banner_num_charges), (create_button_overlay, "$g_presentation_obj_16", "str_randomize", tf_center_justify), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_17", ":flag_type", "tableau_custom_banner_default", "trp_player"), (try_begin), (eq, ":map_flag_type", "mesh_custom_map_banner_01"), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_18", ":map_flag_type", "tableau_custom_banner_square", "trp_player"), (else_try), (eq, ":map_flag_type", "mesh_custom_map_banner_02"), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_18", ":map_flag_type", "tableau_custom_banner_short", "trp_player"), (else_try), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_18", ":map_flag_type", "tableau_custom_banner_tall", "trp_player"), (try_end), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_1", -1, "tableau_custom_banner_square_no_mesh", "trp_player"), (create_text_overlay, reg1, "str_sample_banner", tf_center_justify), (position_set_x, pos1, 825), (position_set_y, pos1, 650), (overlay_set_position, reg1, pos1), (create_text_overlay, reg1, "str_sample_map_banner", tf_center_justify), (position_set_y, pos1, 500), (overlay_set_position, reg1, pos1), (position_set_x, pos1, 800), (position_set_y, pos1, 640), (overlay_set_position, "$g_presentation_obj_17", pos1), (position_set_x, pos1, 780), (position_set_y, pos1, 315), (overlay_set_position, "$g_presentation_obj_18", pos1), (position_set_x, pos1, 50), (position_set_y, pos1, 50), (overlay_set_size, "$g_presentation_obj_17", pos1), (position_set_x, pos1, 50), (position_set_y, pos1, 50), (overlay_set_size, "$g_presentation_obj_18", pos1), (create_text_overlay, reg1, "str_number_of_charges", 0), (position_set_x, pos1, 40), (position_set_y, pos1, 350), (overlay_set_position, reg1, pos1), (assign, reg1, ":num_charges"), (create_text_overlay, reg2, "str_reg1", tf_center_justify), (position_set_x, pos1, 350), (position_set_y, pos1, 350), (overlay_set_position, reg2, pos1), (try_begin), (lt, ":num_charges", 4), (create_button_overlay, "$g_presentation_obj_15", "str_plus", tf_center_justify), (position_set_x, pos1, 385), (position_set_y, pos1, 350), (overlay_set_position, "$g_presentation_obj_15", pos1), (else_try), (assign, "$g_presentation_obj_15", -1), (try_end), (try_begin), (gt, ":num_charges", 0), (create_button_overlay, "$g_presentation_obj_21", "str_minus", tf_center_justify), (position_set_x, pos1, 370), (position_set_y, pos1, 350), (overlay_set_position, "$g_presentation_obj_21", pos1), (else_try), (assign, "$g_presentation_obj_21", -1), (try_end), (try_begin), (ge, ":num_charges", 1), (create_text_overlay, reg1, "str_charge", tf_center_justify), (position_set_x, pos1, 300), (position_set_y, pos1, 300), (overlay_set_position, reg1, pos1), (create_text_overlay, reg1, "str_color", tf_center_justify), (position_set_x, pos1, 550), (position_set_y, pos1, 300), (overlay_set_position, reg1, pos1), (create_button_overlay, "$g_presentation_obj_14", "str_change_charge_position", tf_center_justify), (position_set_y, pos1, 350), (position_set_x, pos1, 550), (overlay_set_position, "$g_presentation_obj_14", pos1), (create_text_overlay, reg1, "str_charge_no_1", 0), (position_set_x, pos1, 40), (position_set_y, pos1, 240), (overlay_set_position, reg1, pos1), (create_button_overlay, "$g_presentation_obj_6", "str_change", 0), (position_set_x, pos1, 310), (overlay_set_position, "$g_presentation_obj_6", pos1), (create_button_overlay, "$g_presentation_obj_7", "str_change", 0), (position_set_x, pos1, 560), (overlay_set_position, "$g_presentation_obj_7", pos1), (troop_get_slot, ":cur_charge", "trp_player", slot_troop_custom_banner_charge_type_1), (val_mod, ":cur_charge", 256), (val_add, ":cur_charge", custom_banner_charges_begin), (create_image_button_overlay, "$g_presentation_obj_24", ":cur_charge", ":cur_charge"), (position_set_x, pos1, 260), (position_set_y, pos1, 255), (overlay_set_position, "$g_presentation_obj_24", pos1), (position_set_x, pos1, 50), (position_set_y, pos1, 50), (overlay_set_size, "$g_presentation_obj_24", pos1), (troop_get_slot, ":cur_charge_color", "trp_player", slot_troop_custom_banner_charge_color_1), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_28", "mesh_color_picker", "tableau_color_picker", ":cur_charge_color"), (position_set_x, pos1, 530), (position_set_y, pos1, 255), (overlay_set_position, "$g_presentation_obj_28", pos1), (position_set_x, pos1, 250), (position_set_y, pos1, 250), (overlay_set_size, "$g_presentation_obj_28", pos1), (create_button_overlay, "$g_presentation_obj_32", "str_flip_horizontal", 0), (position_set_x, pos1, 700), (position_set_y, pos1, 240), (overlay_set_position, "$g_presentation_obj_32", pos1), (create_button_overlay, "$g_presentation_obj_33", "str_flip_vertical", 0), (position_set_x, pos1, 800), (overlay_set_position, "$g_presentation_obj_33", pos1), (try_end), (try_begin), (ge, ":num_charges", 2), (create_text_overlay, reg1, "str_charge_no_2", 0), (position_set_x, pos1, 40), (position_set_y, pos1, 180), (overlay_set_position, reg1, pos1), (create_button_overlay, "$g_presentation_obj_8", "str_change", 0), (position_set_x, pos1, 310), (overlay_set_position, "$g_presentation_obj_8", pos1), (create_button_overlay, "$g_presentation_obj_9", "str_change", 0), (position_set_x, pos1, 560), (overlay_set_position, "$g_presentation_obj_9", pos1), (troop_get_slot, ":cur_charge", "trp_player", slot_troop_custom_banner_charge_type_2), (val_mod, ":cur_charge", 256), (val_add, ":cur_charge", custom_banner_charges_begin), (create_image_button_overlay, "$g_presentation_obj_25", ":cur_charge", ":cur_charge"), (position_set_x, pos1, 260), (position_set_y, pos1, 195), (overlay_set_position, "$g_presentation_obj_25", pos1), (position_set_x, pos1, 50), (position_set_y, pos1, 50), (overlay_set_size, "$g_presentation_obj_25", pos1), (troop_get_slot, ":cur_charge_color", "trp_player", slot_troop_custom_banner_charge_color_2), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_29", "mesh_color_picker", "tableau_color_picker", ":cur_charge_color"), (position_set_x, pos1, 530), (position_set_y, pos1, 195), (overlay_set_position, "$g_presentation_obj_29", pos1), (position_set_x, pos1, 250), (position_set_y, pos1, 250), (overlay_set_size, "$g_presentation_obj_29", pos1), (create_button_overlay, "$g_presentation_obj_34", "str_flip_horizontal", 0), (position_set_x, pos1, 700), (position_set_y, pos1, 180), (overlay_set_position, "$g_presentation_obj_34", pos1), (create_button_overlay, "$g_presentation_obj_35", "str_flip_vertical", 0), (position_set_x, pos1, 800), (overlay_set_position, "$g_presentation_obj_35", pos1), (try_end), (try_begin), (ge, ":num_charges", 3), (create_text_overlay, reg1, "str_charge_no_3", 0), (position_set_x, pos1, 40), (position_set_y, pos1, 120), (overlay_set_position, reg1, pos1), (create_button_overlay, "$g_presentation_obj_10", "str_change", 0), (position_set_x, pos1, 310), (overlay_set_position, "$g_presentation_obj_10", pos1), (create_button_overlay, "$g_presentation_obj_11", "str_change", 0), (position_set_x, pos1, 560), (overlay_set_position, "$g_presentation_obj_11", pos1), (troop_get_slot, ":cur_charge", "trp_player", slot_troop_custom_banner_charge_type_3), (val_mod, ":cur_charge", 256), (val_add, ":cur_charge", custom_banner_charges_begin), (create_image_button_overlay, "$g_presentation_obj_26", ":cur_charge", ":cur_charge"), (position_set_x, pos1, 260), (position_set_y, pos1, 135), (overlay_set_position, "$g_presentation_obj_26", pos1), (position_set_x, pos1, 50), (position_set_y, pos1, 50), (overlay_set_size, "$g_presentation_obj_26", pos1), (troop_get_slot, ":cur_charge_color", "trp_player", slot_troop_custom_banner_charge_color_3), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_30", "mesh_color_picker", "tableau_color_picker", ":cur_charge_color"), (position_set_x, pos1, 530), (position_set_y, pos1, 135), (overlay_set_position, "$g_presentation_obj_30", pos1), (position_set_x, pos1, 250), (position_set_y, pos1, 250), (overlay_set_size, "$g_presentation_obj_30", pos1), (create_button_overlay, "$g_presentation_obj_36", "str_flip_horizontal", 0), (position_set_x, pos1, 700), (position_set_y, pos1, 120), (overlay_set_position, "$g_presentation_obj_36", pos1), (create_button_overlay, "$g_presentation_obj_37", "str_flip_vertical", 0), (position_set_x, pos1, 800), (overlay_set_position, "$g_presentation_obj_37", pos1), (try_end), (try_begin), (ge, ":num_charges", 4), (create_text_overlay, reg1, "str_charge_no_4", 0), (position_set_x, pos1, 40), (position_set_y, pos1, 60), (overlay_set_position, reg1, pos1), (create_button_overlay, "$g_presentation_obj_12", "str_change", 0), (position_set_x, pos1, 310), (overlay_set_position, "$g_presentation_obj_12", pos1), (create_button_overlay, "$g_presentation_obj_13", "str_change", 0), (position_set_x, pos1, 560), (overlay_set_position, "$g_presentation_obj_13", pos1), (troop_get_slot, ":cur_charge", "trp_player", slot_troop_custom_banner_charge_type_4), (val_mod, ":cur_charge", 256), (val_add, ":cur_charge", custom_banner_charges_begin), (create_image_button_overlay, "$g_presentation_obj_27", ":cur_charge", ":cur_charge"), (position_set_x, pos1, 260), (position_set_y, pos1, 75), (overlay_set_position, "$g_presentation_obj_27", pos1), (position_set_x, pos1, 50), (position_set_y, pos1, 50), (overlay_set_size, "$g_presentation_obj_27", pos1), (troop_get_slot, ":cur_charge_color", "trp_player", slot_troop_custom_banner_charge_color_4), (create_image_button_overlay_with_tableau_material, "$g_presentation_obj_31", "mesh_color_picker", "tableau_color_picker", ":cur_charge_color"), (position_set_x, pos1, 530), (position_set_y, pos1, 75), (overlay_set_position, "$g_presentation_obj_31", pos1), (position_set_x, pos1, 250), (position_set_y, pos1, 250), (overlay_set_size, "$g_presentation_obj_31", pos1), (create_button_overlay, "$g_presentation_obj_38", "str_flip_horizontal", 0), (position_set_x, pos1, 700), (position_set_y, pos1, 60), (overlay_set_position, "$g_presentation_obj_38", pos1), (create_button_overlay, "$g_presentation_obj_39", "str_flip_vertical", 0), (position_set_x, pos1, 800), (overlay_set_position, "$g_presentation_obj_39", pos1), (try_end), (position_set_x, pos1, 350), (position_set_y, pos1, 400), (overlay_set_position, "$g_presentation_obj_1", pos1), (position_set_x, pos1, 275), (position_set_y, pos1, 550), (overlay_set_position, "$g_presentation_obj_2", pos1), (position_set_y, pos1, 500), (overlay_set_position, "$g_presentation_obj_3", pos1), (position_set_x, pos1, 175), (position_set_y, pos1, 600), (overlay_set_position, "$g_presentation_obj_4", pos1), (position_set_x, pos1, 880), (position_set_y, pos1, 575), (overlay_set_position, "$g_presentation_obj_5", pos1), (position_set_y, pos1, 400), (overlay_set_position, "$g_presentation_obj_19", pos1), (position_set_y, pos1, 650), (position_set_x, pos1, 175), (overlay_set_position, "$g_presentation_obj_16", pos1), (position_set_y, pos1, 150), (position_set_x, pos1, 850), (overlay_set_position, "$g_presentation_obj_20", pos1), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [ (store_trigger_param_1, ":object"), (troop_get_slot, ":num_charges", "trp_player", slot_troop_custom_banner_num_charges), (try_begin), (this_or_next|eq, ":object", "$g_presentation_obj_2"), (eq, ":object", "$g_presentation_obj_22"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (assign, "$g_presentation_output_slot", slot_troop_custom_banner_bg_color_1), (start_presentation, "prsnt_color_selection"), (else_try), (this_or_next|eq, ":object", "$g_presentation_obj_3"), (eq, ":object", "$g_presentation_obj_23"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (assign, "$g_presentation_output_slot", slot_troop_custom_banner_bg_color_2), (start_presentation, "prsnt_color_selection"), (else_try), (this_or_next|eq, ":object", "$g_presentation_obj_4"), (eq, ":object", "$g_presentation_obj_1"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (start_presentation, "prsnt_banner_background_selection"), (else_try), (eq, ":object", "$g_presentation_obj_5"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (start_presentation, "prsnt_banner_flag_type_selection"), (else_try), (ge, ":num_charges", 1), (this_or_next|eq, ":object", "$g_presentation_obj_6"), (eq, ":object", "$g_presentation_obj_24"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (assign, "$g_presentation_output_slot", slot_troop_custom_banner_charge_type_1), (start_presentation, "prsnt_banner_charge_selection"), (else_try), (ge, ":num_charges", 1), (this_or_next|eq, ":object", "$g_presentation_obj_7"), (eq, ":object", "$g_presentation_obj_28"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (assign, "$g_presentation_output_slot", slot_troop_custom_banner_charge_color_1), (start_presentation, "prsnt_color_selection"), (else_try), (ge, ":num_charges", 2), (this_or_next|eq, ":object", "$g_presentation_obj_8"), (eq, ":object", "$g_presentation_obj_25"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (assign, "$g_presentation_output_slot", slot_troop_custom_banner_charge_type_2), (start_presentation, "prsnt_banner_charge_selection"), (else_try), (ge, ":num_charges", 2), (this_or_next|eq, ":object", "$g_presentation_obj_9"), (eq, ":object", "$g_presentation_obj_29"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (assign, "$g_presentation_output_slot", slot_troop_custom_banner_charge_color_2), (start_presentation, "prsnt_color_selection"), (else_try), (ge, ":num_charges", 3), (this_or_next|eq, ":object", "$g_presentation_obj_10"), (eq, ":object", "$g_presentation_obj_26"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (assign, "$g_presentation_output_slot", slot_troop_custom_banner_charge_type_3), (start_presentation, "prsnt_banner_charge_selection"), (else_try), (ge, ":num_charges", 3), (this_or_next|eq, ":object", "$g_presentation_obj_11"), (eq, ":object", "$g_presentation_obj_30"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (assign, "$g_presentation_output_slot", slot_troop_custom_banner_charge_color_3), (start_presentation, "prsnt_color_selection"), (else_try), (ge, ":num_charges", 4), (this_or_next|eq, ":object", "$g_presentation_obj_12"), (eq, ":object", "$g_presentation_obj_27"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (assign, "$g_presentation_output_slot", slot_troop_custom_banner_charge_type_4), (start_presentation, "prsnt_banner_charge_selection"), (else_try), (ge, ":num_charges", 4), (this_or_next|eq, ":object", "$g_presentation_obj_13"), (eq, ":object", "$g_presentation_obj_31"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (assign, "$g_presentation_output_slot", slot_troop_custom_banner_charge_color_4), (start_presentation, "prsnt_color_selection"), (else_try), (ge, ":num_charges", 1), (eq, ":object", "$g_presentation_obj_14"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (start_presentation, "prsnt_banner_charge_positioning"), (else_try), (eq, ":object", "$g_presentation_obj_15"), (troop_get_slot, ":num_charges", "trp_player", slot_troop_custom_banner_num_charges), (val_add, ":num_charges", 1), (val_clamp, ":num_charges", 0, 5), (troop_set_slot, "trp_player", slot_troop_custom_banner_num_charges, ":num_charges"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_21"), (troop_get_slot, ":num_charges", "trp_player", slot_troop_custom_banner_num_charges), (val_sub, ":num_charges", 1), (val_clamp, ":num_charges", 0, 5), (troop_set_slot, "trp_player", slot_troop_custom_banner_num_charges, ":num_charges"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_16"), (call_script, "script_get_random_custom_banner", "trp_player"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_17"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (start_presentation, "prsnt_banner_flag_type_selection"), (else_try), (eq, ":object", "$g_presentation_obj_18"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (start_presentation, "prsnt_banner_flag_map_type_selection"), (else_try), (eq, ":object", "$g_presentation_obj_19"), (assign, "$g_presentation_next_presentation", "prsnt_custom_banner"), (start_presentation, "prsnt_banner_flag_map_type_selection"), (else_try), (eq, ":object", "$g_presentation_obj_32"), (troop_get_slot, ":charge_type", "trp_player", slot_troop_custom_banner_charge_type_1), (store_mod, ":charge_type_base", ":charge_type", 256), (val_div, ":charge_type", 256), (store_mod, ":flag", ":charge_type", 2), (val_div, ":charge_type", 2), #remove flag (val_add, ":flag", 1), (val_mod, ":flag", 2), #switch flag (val_mul, ":charge_type", 2), (val_add, ":charge_type", ":flag"), (val_mul, ":charge_type", 256), (val_add, ":charge_type", ":charge_type_base"), (troop_set_slot, "trp_player", slot_troop_custom_banner_charge_type_1, ":charge_type"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_34"), (troop_get_slot, ":charge_type", "trp_player", slot_troop_custom_banner_charge_type_2), (store_mod, ":charge_type_base", ":charge_type", 256), (val_div, ":charge_type", 256), (store_mod, ":flag", ":charge_type", 2), (val_div, ":charge_type", 2), #remove flag (val_add, ":flag", 1), (val_mod, ":flag", 2), #switch flag (val_mul, ":charge_type", 2), (val_add, ":charge_type", ":flag"), (val_mul, ":charge_type", 256), (val_add, ":charge_type", ":charge_type_base"), (troop_set_slot, "trp_player", slot_troop_custom_banner_charge_type_2, ":charge_type"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_36"), (troop_get_slot, ":charge_type", "trp_player", slot_troop_custom_banner_charge_type_3), (store_mod, ":charge_type_base", ":charge_type", 256), (val_div, ":charge_type", 256), (store_mod, ":flag", ":charge_type", 2), (val_div, ":charge_type", 2), #remove flag (val_add, ":flag", 1), (val_mod, ":flag", 2), #switch flag (val_mul, ":charge_type", 2), (val_add, ":charge_type", ":flag"), (val_mul, ":charge_type", 256), (val_add, ":charge_type", ":charge_type_base"), (troop_set_slot, "trp_player", slot_troop_custom_banner_charge_type_3, ":charge_type"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_38"), (troop_get_slot, ":charge_type", "trp_player", slot_troop_custom_banner_charge_type_4), (store_mod, ":charge_type_base", ":charge_type", 256), (val_div, ":charge_type", 256), (store_mod, ":flag", ":charge_type", 2), (val_div, ":charge_type", 2), #remove flag (val_add, ":flag", 1), (val_mod, ":flag", 2), #switch flag (val_mul, ":charge_type", 2), (val_add, ":charge_type", ":flag"), (val_mul, ":charge_type", 256), (val_add, ":charge_type", ":charge_type_base"), (troop_set_slot, "trp_player", slot_troop_custom_banner_charge_type_4, ":charge_type"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_33"), (troop_get_slot, ":charge_type", "trp_player", slot_troop_custom_banner_charge_type_1), (store_div, ":flag", ":charge_type", 512), (val_add, ":flag", 1), (val_mod, ":flag", 2), #switch flag (val_mul, ":flag", 512), (val_mod, ":charge_type", 512), #remove flag (val_add, ":charge_type", ":flag"), (troop_set_slot, "trp_player", slot_troop_custom_banner_charge_type_1, ":charge_type"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_35"), (troop_get_slot, ":charge_type", "trp_player", slot_troop_custom_banner_charge_type_2), (store_div, ":flag", ":charge_type", 512), (val_add, ":flag", 1), (val_mod, ":flag", 2), #switch flag (val_mul, ":flag", 512), (val_mod, ":charge_type", 512), #remove flag (val_add, ":charge_type", ":flag"), (troop_set_slot, "trp_player", slot_troop_custom_banner_charge_type_2, ":charge_type"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_37"), (troop_get_slot, ":charge_type", "trp_player", slot_troop_custom_banner_charge_type_3), (store_div, ":flag", ":charge_type", 512), (val_add, ":flag", 1), (val_mod, ":flag", 2), #switch flag (val_mul, ":flag", 512), (val_mod, ":charge_type", 512), #remove flag (val_add, ":charge_type", ":flag"), (troop_set_slot, "trp_player", slot_troop_custom_banner_charge_type_3, ":charge_type"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_39"), (troop_get_slot, ":charge_type", "trp_player", slot_troop_custom_banner_charge_type_4), (store_div, ":flag", ":charge_type", 512), (val_add, ":flag", 1), (val_mod, ":flag", 2), #switch flag (val_mul, ":flag", 512), (val_mod, ":charge_type", 512), #remove flag (val_add, ":charge_type", ":flag"), (troop_set_slot, "trp_player", slot_troop_custom_banner_charge_type_4, ":charge_type"), (start_presentation, "prsnt_custom_banner"), (else_try), (eq, ":object", "$g_presentation_obj_20"), (troop_get_slot, ":flag_icon", "trp_player", slot_troop_custom_banner_map_flag_type), (try_begin), (ge, ":flag_icon", 0), (val_add, ":flag_icon", custom_banner_map_icons_begin), (party_set_banner_icon, "p_main_party", ":flag_icon"), (try_end), (presentation_set_duration, 0), (try_end), ]), ## (ti_on_presentation_run, ## [(try_begin), ## (this_or_next|key_clicked, key_space), ## (this_or_next|key_clicked, key_enter), ## (this_or_next|key_clicked, key_escape), ## (key_clicked, key_back_space), ## (presentation_set_duration, 0), ## (try_end), ## ]), ]), ("banner_charge_positioning", 0, mesh_load_window, [ (ti_on_presentation_load, [ (set_fixed_point_multiplier, 1000), (create_text_overlay, reg1, "str_choose_position", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 600), (overlay_set_position, reg1, pos1), (assign, ":pos_x", 125), (assign, ":pos_y", 400), (call_script, "script_get_troop_custom_banner_num_positionings", "trp_player"), (assign, ":num_positionings", reg0), (store_mul, ":x_needed", ":num_positionings", 125), (val_sub, ":x_needed", 25), (store_div, ":pos_x", ":x_needed", 2), (store_sub, ":pos_x", 500, ":pos_x"), (try_for_range, ":cur_positioning", 0, ":num_positionings"), (create_image_button_overlay_with_tableau_material, reg1, -1, "tableau_positioning_selection", ":cur_positioning"), (position_set_x, pos1, ":pos_x"), (position_set_y, pos1, ":pos_y"), (val_add, ":pos_x", 125), (overlay_set_position, reg1, pos1), (troop_set_slot, "trp_temp_array_a", ":cur_positioning", reg1), (try_end), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [ (store_trigger_param_1, ":object"), (call_script, "script_get_troop_custom_banner_num_positionings", "trp_player"), (assign, ":num_positionings", reg0), (try_for_range, ":trp_slot_index", 0, ":num_positionings"), (troop_slot_eq, "trp_temp_array_a", ":trp_slot_index", ":object"), (troop_set_slot, "trp_player", slot_troop_custom_banner_positioning, ":trp_slot_index"), (assign, ":num_positionings", 0), (try_end), (try_begin), (gt, "$g_presentation_next_presentation", 0), (start_presentation, "$g_presentation_next_presentation"), (else_try), (presentation_set_duration, 0), (try_end), ]), ]), ("banner_charge_selection", 0, mesh_load_window, [ (ti_on_presentation_load, [ (set_fixed_point_multiplier, 1000), (create_text_overlay, reg1, "str_choose_charge", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 650), (overlay_set_position, reg1, pos1), (assign, ":pos_x", 100), (assign, ":pos_y", 600), (try_for_range, ":cur_charge", custom_banner_charges_begin, custom_banner_charges_end), (create_image_button_overlay, reg1, ":cur_charge", ":cur_charge"), (position_set_x, pos1, ":pos_x"), (position_set_y, pos1, ":pos_y"), (val_add, ":pos_x", 100), (try_begin), (gt, ":pos_x", 900), (assign, ":pos_x", 100), (val_sub, ":pos_y", 100), (try_end), (overlay_set_position, reg1, pos1), (position_set_x, pos1, 80), (position_set_y, pos1, 80), (overlay_set_size, reg1, pos1), (store_sub, ":slot_index", ":cur_charge", custom_banner_charges_begin), (troop_set_slot, "trp_temp_array_a", ":slot_index", reg1), (try_end), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [ (store_trigger_param_1, ":object"), (assign, ":end_cond", custom_banner_charges_end), (val_sub, ":end_cond", custom_banner_charges_begin), (try_for_range, ":trp_slot_index", 0, ":end_cond"), (troop_slot_eq, "trp_temp_array_a", ":trp_slot_index", ":object"), (troop_set_slot, "trp_player", "$g_presentation_output_slot", ":trp_slot_index"), (assign, ":end_cond", 0), (try_end), (try_begin), (gt, "$g_presentation_next_presentation", 0), (start_presentation, "$g_presentation_next_presentation"), (else_try), (presentation_set_duration, 0), (try_end), ]), ]), ("banner_background_selection", 0, mesh_load_window, [ (ti_on_presentation_load, [ (set_fixed_point_multiplier, 1000), (create_text_overlay, reg1, "str_choose_background", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 600), (overlay_set_position, reg1, pos1), (assign, ":pos_x", 75), (assign, ":pos_y", 450), (try_for_range, ":cur_banner", custom_banner_backgrounds_begin, custom_banner_backgrounds_end), (store_sub, ":slot_index", ":cur_banner", custom_banner_backgrounds_begin), (create_image_button_overlay_with_tableau_material, reg1, -1, "tableau_background_selection", ":slot_index"), (position_set_x, pos1, ":pos_x"), (position_set_y, pos1, ":pos_y"), (val_add, ":pos_x", 125), (try_begin), (gt, ":pos_x", 900), (assign, ":pos_x", 75), (val_sub, ":pos_y", 125), (try_end), (overlay_set_position, reg1, pos1), (troop_set_slot, "trp_temp_array_a", ":slot_index", reg1), (try_end), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [ (store_trigger_param_1, ":object"), (assign, ":end_cond", custom_banner_backgrounds_end), (val_sub, ":end_cond", custom_banner_backgrounds_begin), (try_for_range, ":trp_slot_index", 0, ":end_cond"), (troop_slot_eq, "trp_temp_array_a", ":trp_slot_index", ":object"), (troop_set_slot, "trp_player", slot_troop_custom_banner_bg_type, ":trp_slot_index"), (assign, ":end_cond", 0), (try_end), (try_begin), (gt, "$g_presentation_next_presentation", 0), (start_presentation, "$g_presentation_next_presentation"), (else_try), (presentation_set_duration, 0), (try_end), ]), ]), ("banner_flag_type_selection", 0, mesh_load_window, [ (ti_on_presentation_load, [ (set_fixed_point_multiplier, 1000), (create_text_overlay, reg1, "str_choose_flag_type", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 600), (overlay_set_position, reg1, pos1), (assign, ":pos_x", 435), (assign, ":pos_y", 450), (try_for_range, ":cur_flag", custom_banner_flag_types_begin, custom_banner_flag_types_end), (store_sub, ":slot_index", ":cur_flag", custom_banner_flag_types_begin), (troop_set_slot, "trp_player", slot_troop_custom_banner_flag_type, ":slot_index"), (create_image_button_overlay_with_tableau_material, reg1, ":cur_flag", "tableau_custom_banner_default", "trp_player"), (position_set_x, pos1, ":pos_x"), (position_set_y, pos1, ":pos_y"), (val_add, ":pos_x", 130), (overlay_set_position, reg1, pos1), (position_set_x, pos1, 100), (position_set_y, pos1, 100), (overlay_set_size, reg1, pos1), (troop_set_slot, "trp_temp_array_a", ":slot_index", reg1), (try_end), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [ (store_trigger_param_1, ":object"), (assign, ":end_cond", custom_banner_flag_types_end), (val_sub, ":end_cond", custom_banner_flag_types_begin), (try_for_range, ":trp_slot_index", 0, ":end_cond"), (troop_slot_eq, "trp_temp_array_a", ":trp_slot_index", ":object"), (troop_set_slot, "trp_player", slot_troop_custom_banner_flag_type, ":trp_slot_index"), (assign, ":end_cond", 0), (try_end), (try_begin), (gt, "$g_presentation_next_presentation", 0), (start_presentation, "$g_presentation_next_presentation"), (else_try), (presentation_set_duration, 0), (try_end), ]), ]), ("banner_flag_map_type_selection", 0, mesh_load_window, [ (ti_on_presentation_load, [ (set_fixed_point_multiplier, 1000), (create_text_overlay, reg1, "str_choose_map_flag_type", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 600), (overlay_set_position, reg1, pos1), (troop_get_slot, ":bg_type", "trp_player", slot_troop_custom_banner_bg_type), (val_add, ":bg_type", custom_banner_backgrounds_begin), (assign, ":pos_x", 250), (assign, ":pos_y", 150), (try_for_range, ":cur_flag", custom_banner_flag_map_types_begin, custom_banner_flag_map_types_end), (store_sub, ":slot_index", ":cur_flag", custom_banner_flag_map_types_begin), (troop_set_slot, "trp_player", slot_troop_custom_banner_map_flag_type, ":slot_index"), (try_begin), (eq, ":cur_flag", "mesh_custom_map_banner_01"), (create_image_button_overlay_with_tableau_material, reg1, ":cur_flag", "tableau_custom_banner_square", "trp_player"), (else_try), (eq, ":cur_flag", "mesh_custom_map_banner_02"), (create_image_button_overlay_with_tableau_material, reg1, ":cur_flag", "tableau_custom_banner_short", "trp_player"), (else_try), (create_image_button_overlay_with_tableau_material, reg1, ":cur_flag", "tableau_custom_banner_tall", "trp_player"), (try_end), (position_set_x, pos1, ":pos_x"), (position_set_y, pos1, ":pos_y"), (val_add, ":pos_x", 200), (overlay_set_position, reg1, pos1), (position_set_x, pos1, 100), (position_set_y, pos1, 100), (overlay_set_size, reg1, pos1), (troop_set_slot, "trp_temp_array_a", ":slot_index", reg1), (try_end), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [ (store_trigger_param_1, ":object"), (assign, ":end_cond", custom_banner_flag_map_types_end), (val_sub, ":end_cond", custom_banner_flag_map_types_begin), (try_for_range, ":trp_slot_index", 0, ":end_cond"), (troop_slot_eq, "trp_temp_array_a", ":trp_slot_index", ":object"), (troop_set_slot, "trp_player", slot_troop_custom_banner_map_flag_type, ":trp_slot_index"), (assign, ":end_cond", 0), (try_end), (try_begin), (gt, "$g_presentation_next_presentation", 0), (start_presentation, "$g_presentation_next_presentation"), (else_try), (presentation_set_duration, 0), (try_end), ]), ]), ("color_selection", 0, mesh_load_window, [ (ti_on_presentation_load, [ (set_fixed_point_multiplier, 1000), (create_text_overlay, reg1, "str_choose_color", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 600), (overlay_set_position, reg1, pos1), (assign, ":pos_x", 125), (assign, ":pos_y", 450), (try_for_range, ":i_color", 0, 42), (call_script, "script_get_custom_banner_color_from_index", ":i_color"), (assign, ":cur_color", reg0), (create_image_button_overlay_with_tableau_material, reg1, "mesh_color_picker", "tableau_color_picker", ":cur_color"), (position_set_x, pos1, ":pos_x"), (position_set_y, pos1, ":pos_y"), (val_add, ":pos_x", 50), (try_begin), (store_mod, ":mod_i_color", ":i_color", 7), (eq, ":mod_i_color", 6), (assign, ":pos_x", 125), (val_sub, ":pos_y", 50), (try_end), (overlay_set_position, reg1, pos1), (position_set_x, pos1, 500), (position_set_y, pos1, 500), (overlay_set_size, reg1, pos1), (store_mul, ":trp_slot_index", ":i_color", 2), (store_add, ":trp_slot_color", ":trp_slot_index", 1), (troop_set_slot, "trp_temp_array_a", ":trp_slot_index", reg1), (troop_set_slot, "trp_temp_array_a", ":trp_slot_color", ":cur_color"), (try_end), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [ (store_trigger_param_1, ":object"), (assign, ":end_cond", 64), (try_for_range, ":i_color", 0, ":end_cond"), (store_mul, ":trp_slot_index", ":i_color", 2), (troop_slot_eq, "trp_temp_array_a", ":trp_slot_index", ":object"), (store_add, ":trp_slot_color", ":trp_slot_index", 1), (troop_get_slot, ":output_color", "trp_temp_array_a", ":trp_slot_color"), (troop_set_slot, "trp_player", "$g_presentation_output_slot", ":output_color"), (assign, ":end_cond", 0), (try_end), (try_begin), (gt, "$g_presentation_next_presentation", 0), (start_presentation, "$g_presentation_next_presentation"), (else_try), (presentation_set_duration, 0), (try_end), ]), ]), ("marshall_selection", 0, mesh_load_window, [ (ti_on_presentation_load, [ (assign, "$g_presentation_obj_1", -1), (assign, "$g_presentation_obj_2", -1), (assign, "$g_presentation_obj_3", -1), (set_fixed_point_multiplier, 1000), (assign, "$g_presentation_next_presentation", -1), (store_add, ":total_renown", "$g_presentation_marshall_selection_max_renown_1", "$g_presentation_marshall_selection_max_renown_2"), (faction_get_slot, ":king", "$players_kingdom", slot_faction_leader), (str_store_troop_name, s1, "$g_presentation_marshall_selection_max_renown_1_troop"), (create_text_overlay, reg1, "@Candidate #1: {s1}", tf_center_justify), (position_set_x, pos1, 200), (position_set_y, pos1, 600), (overlay_set_position, reg1, pos1), (str_store_troop_name, s1, "$g_presentation_marshall_selection_max_renown_2_troop"), (create_text_overlay, reg1, "@Candidate #2: {s1}", tf_center_justify), (position_set_x, pos1, 800), (position_set_y, pos1, 600), (overlay_set_position, reg1, pos1), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_troop_note_mesh", "$g_presentation_marshall_selection_max_renown_1_troop"), (position_set_x, pos1, 500), (position_set_y, pos1, 500), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 100), (position_set_y, pos1, 300), (overlay_set_position, reg1, pos1), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_troop_note_mesh", "$g_presentation_marshall_selection_max_renown_2_troop"), (position_set_x, pos1, 500), (position_set_y, pos1, 500), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 700), (position_set_y, pos1, 300), (overlay_set_position, reg1, pos1), (assign, ":lord_index", "$g_presentation_input"), (val_add, "$g_presentation_input", 1), (try_begin), (lt, ":lord_index", 0), (str_store_troop_name, s1, "$g_presentation_marshall_selection_max_renown_1_troop"), (str_store_troop_name, s2, "$g_presentation_marshall_selection_max_renown_2_troop"), (str_store_troop_name, s3, ":king"), (str_store_faction_name, s4, "$players_kingdom"), (create_text_overlay, reg1, "@{s3} of {s4} wishes to select a new marshall and invites his vassals for a counsel. {s1} and {s2} are the likely candidates.", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 200), (overlay_set_position, reg1, pos1), (create_button_overlay, "$g_presentation_obj_1", "@Continue...", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 100), (overlay_set_position, "$g_presentation_obj_1", pos1), (assign, "$g_presentation_next_presentation", "prsnt_marshall_selection"), (else_try), (assign, ":cur_index", ":lord_index"), (try_for_range_backwards, ":loop_var", "trp_kingdom_heroes_including_player_begin", kingdom_heroes_end), (ge, ":cur_index", 0), (assign, ":cur_troop", ":loop_var"), (assign, ":continue", 0), (try_begin), (eq, ":loop_var", "trp_kingdom_heroes_including_player_begin"), (assign, ":cur_troop", "trp_player"), (try_begin), (eq, "$g_player_is_captive", 0), (assign, ":continue", 1), (try_end), (else_try), (store_troop_faction, ":cur_troop_faction", ":cur_troop"), (eq, "$players_kingdom", ":cur_troop_faction"), #(troop_slot_eq, ":cur_troop", slot_troop_is_prisoner, 0), (neg|troop_slot_ge, ":cur_troop", slot_troop_prisoner_of_party, 0), (troop_slot_ge, ":cur_troop", slot_troop_leaded_party, 1), (troop_slot_eq, ":cur_troop", slot_troop_occupation, slto_kingdom_hero), (neg|faction_slot_eq, ":cur_troop_faction", slot_faction_leader, ":cur_troop"), (assign, ":continue", 1), (try_end), (eq, ":continue", 1), (neq, "$g_presentation_marshall_selection_max_renown_1_troop", ":cur_troop"), (neq, "$g_presentation_marshall_selection_max_renown_2_troop", ":cur_troop"), (val_sub, ":cur_index", 1), (lt, ":cur_index", 0), (assign, "$g_presentation_next_presentation", "prsnt_marshall_selection"), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_troop_note_mesh", ":cur_troop"), (position_set_x, pos1, 300), (position_set_y, pos1, 300), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 440), (position_set_y, pos1, 400), (overlay_set_position, reg1, pos1), (try_begin), (eq, ":cur_troop", "trp_player"), (create_text_overlay, reg1, "@Who do you wish to support?", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 200), (overlay_set_position, reg1, pos1), (str_store_troop_name, s1, "$g_presentation_marshall_selection_max_renown_1_troop"), (create_button_overlay, "$g_presentation_obj_2", "@{s1}", tf_center_justify), (position_set_x, pos1, 300), (position_set_y, pos1, 100), (overlay_set_position, "$g_presentation_obj_2", pos1), (str_store_troop_name, s1, "$g_presentation_marshall_selection_max_renown_2_troop"), (create_button_overlay, "$g_presentation_obj_3", "@{s1}", tf_center_justify), (position_set_x, pos1, 700), (position_set_y, pos1, 100), (overlay_set_position, "$g_presentation_obj_3", pos1), (else_try), (str_store_troop_name, s1, ":cur_troop"), (store_random_in_range, ":random_renown", 0, ":total_renown"), (val_sub, ":random_renown", "$g_presentation_marshall_selection_max_renown_1"), (try_begin), (lt, ":random_renown", 0), (val_add, "$g_presentation_marshall_selection_1_vote", 1), (str_store_troop_name, s2, "$g_presentation_marshall_selection_max_renown_1_troop"), (else_try), (val_add, "$g_presentation_marshall_selection_2_vote", 1), (str_store_troop_name, s2, "$g_presentation_marshall_selection_max_renown_2_troop"), (try_end), (create_text_overlay, reg1, "@{s1} gives his support to {s2}.", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 200), (overlay_set_position, reg1, pos1), (create_button_overlay, "$g_presentation_obj_1", "@Continue...", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 100), (overlay_set_position, "$g_presentation_obj_1", pos1), (try_end), (try_end), (try_end), (assign, reg0, "$g_presentation_marshall_selection_1_vote"), (create_text_overlay, reg1, "@Number of Supporters: {reg0}", tf_center_justify), (position_set_x, pos1, 200), (position_set_y, pos1, 550), (overlay_set_position, reg1, pos1), (assign, reg0, "$g_presentation_marshall_selection_2_vote"), (create_text_overlay, reg1, "@Number of Supporters: {reg0}", tf_center_justify), (position_set_x, pos1, 800), (position_set_y, pos1, 550), (overlay_set_position, reg1, pos1), (try_begin), (lt, "$g_presentation_next_presentation", 0), (try_begin), (gt, "$g_presentation_marshall_selection_2_vote", "$g_presentation_marshall_selection_1_vote"), (assign, ":local_temp", "$g_presentation_marshall_selection_max_renown_1_troop"), (assign, "$g_presentation_marshall_selection_max_renown_1_troop", "$g_presentation_marshall_selection_max_renown_2_troop"), (assign, "$g_presentation_marshall_selection_max_renown_2_troop", ":local_temp"), (try_end), #Winner is set to g_presentation_marshall_selection_max_renown_1_troop (str_store_troop_name, s1, "$g_presentation_marshall_selection_max_renown_1_troop"), (str_store_troop_name, s2, ":king"), (str_store_faction_name, s3, "$players_kingdom"), (create_text_overlay, reg1, "@{s2} has heard his vassals' counsel. He selects {s1} as the marshall of {s3}.", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 200), (overlay_set_position, reg1, pos1), (create_button_overlay, "$g_presentation_obj_1", "@Continue...", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 100), (overlay_set_position, "$g_presentation_obj_1", pos1), (try_end), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [ (store_trigger_param_1, ":object"), (try_begin), (eq, ":object", "$g_presentation_obj_2"), (val_add, "$g_presentation_marshall_selection_1_vote", 1), (call_script, "script_change_player_relation_with_troop", "$g_presentation_marshall_selection_max_renown_1_troop", 2), (call_script, "script_change_player_relation_with_troop", "$g_presentation_marshall_selection_max_renown_2_troop", -2), (else_try), (eq, ":object", "$g_presentation_obj_3"), (val_add, "$g_presentation_marshall_selection_2_vote", 1), (call_script, "script_change_player_relation_with_troop", "$g_presentation_marshall_selection_max_renown_1_troop", -2), (call_script, "script_change_player_relation_with_troop", "$g_presentation_marshall_selection_max_renown_2_troop", 2), (try_end), (try_begin), (this_or_next|eq, ":object", "$g_presentation_obj_1"), (this_or_next|eq, ":object", "$g_presentation_obj_2"), (eq, ":object", "$g_presentation_obj_3"), (try_begin), (ge, "$g_presentation_next_presentation", 0), (start_presentation, "$g_presentation_next_presentation"), (else_try), (try_begin), (neg|faction_slot_eq, "$players_kingdom", slot_faction_marshall, "$g_presentation_marshall_selection_max_renown_1_troop"), (call_script, "script_check_and_finish_active_army_quests_for_faction", "$players_kingdom"), (try_end), (faction_set_slot, "$players_kingdom", slot_faction_marshall, "$g_presentation_marshall_selection_max_renown_1_troop"), (try_begin), (eq, "$g_presentation_marshall_selection_max_renown_1_troop", "trp_player"), (call_script, "script_change_player_relation_with_troop", "$g_presentation_marshall_selection_max_renown_2_troop", -3), (try_end), (assign, "$g_recalculate_ais", 1), (assign, "$g_presentation_marshall_selection_ended", 1), (presentation_set_duration, 0), (try_end), (try_end), ]), ]), ("battle",0,0,[ (ti_on_presentation_load, [(set_fixed_point_multiplier, 1000), (assign, "$g_formation_infantry_selected", 0), (assign, "$g_formation_archers_selected", 0), (assign, "$g_formation_cavalry_selected", 0), (assign, "$g_presentation_battle_active", 1), (str_clear, s7), (try_for_agents, ":agent_no"), (agent_set_slot, ":agent_no", slot_agent_map_overlay_id, 0), (try_end), (position_set_x, pos1, 0), (create_image_button_overlay, "$g_presentation_obj_1", "mesh_white_plane", "mesh_white_plane"), (position_set_y, pos1, 653), (overlay_set_position, "$g_presentation_obj_1", pos1), (create_image_button_overlay, "$g_presentation_obj_2", "mesh_white_plane", "mesh_white_plane"), (position_set_y, pos1, 613), (overlay_set_position, "$g_presentation_obj_2", pos1), (create_image_button_overlay, "$g_presentation_obj_3", "mesh_white_plane", "mesh_white_plane"), (position_set_y, pos1, 573), (overlay_set_position, "$g_presentation_obj_3", pos1), (position_set_x, pos1, 32500), (position_set_y, pos1, 2000), (overlay_set_size, "$g_presentation_obj_1", pos1), (overlay_set_size, "$g_presentation_obj_2", pos1), (overlay_set_size, "$g_presentation_obj_3", pos1), (overlay_set_alpha, "$g_presentation_obj_1", 0), (overlay_set_alpha, "$g_presentation_obj_2", 0), (overlay_set_alpha, "$g_presentation_obj_3", 0), (overlay_set_color, "$g_presentation_obj_1", 0xFFFF00), (overlay_set_color, "$g_presentation_obj_2", 0xFFFF00), (overlay_set_color, "$g_presentation_obj_3", 0xFFFF00), (position_set_x, pos1, 20), (create_check_box_overlay, "$g_presentation_obj_4", "mesh_checkbox_off", "mesh_checkbox_on"), (position_set_y, pos1, 663), (overlay_set_position, "$g_presentation_obj_4", pos1), (create_check_box_overlay, "$g_presentation_obj_5", "mesh_checkbox_off", "mesh_checkbox_on"), (position_set_y, pos1, 623), (overlay_set_position, "$g_presentation_obj_5", pos1), (create_check_box_overlay, "$g_presentation_obj_6", "mesh_checkbox_off", "mesh_checkbox_on"), (position_set_y, pos1, 583), (overlay_set_position, "$g_presentation_obj_6", pos1), (get_player_agent_no, ":player_agent"), (agent_get_team, ":player_team", ":player_agent"), (position_set_x, pos1, 50), (create_text_overlay, "$g_presentation_obj_7", s7, 0), (position_set_y, pos1, 660), (overlay_set_position, "$g_presentation_obj_7", pos1), (create_text_overlay, "$g_presentation_obj_8", s7, 0), (position_set_y, pos1, 620), (overlay_set_position, "$g_presentation_obj_8", pos1), (create_text_overlay, "$g_presentation_obj_9", s7, 0), (position_set_y, pos1, 580), (overlay_set_position, "$g_presentation_obj_9", pos1), (position_set_y, pos1, 700), (create_text_overlay, reg1, "@Action", tf_center_justify), (position_set_x, pos1, 250), (overlay_set_position, reg1, pos1), (create_text_overlay, reg1, "@Mount", tf_center_justify), (position_set_x, pos1, 400), (overlay_set_position, reg1, pos1), (create_text_overlay, reg1, "@Attack Type", tf_center_justify), (position_set_x, pos1, 550), (overlay_set_position, reg1, pos1), (create_text_overlay, "$g_presentation_infantry_movement", s7, tf_center_justify), (create_text_overlay, "$g_presentation_infantry_riding", s7, tf_center_justify), (create_text_overlay, "$g_presentation_infantry_weapon_usage", s7, tf_center_justify), (create_text_overlay, "$g_presentation_archers_movement", s7, tf_center_justify), (create_text_overlay, "$g_presentation_archers_riding", s7, tf_center_justify), (create_text_overlay, "$g_presentation_archers_weapon_usage", s7, tf_center_justify), (create_text_overlay, "$g_presentation_cavalry_movement", s7, tf_center_justify), (create_text_overlay, "$g_presentation_cavalry_riding", s7, tf_center_justify), (create_text_overlay, "$g_presentation_cavalry_weapon_usage", s7, tf_center_justify), (call_script, "script_update_order_panel", ":player_team"), (create_button_overlay, "$g_presentation_obj_10", "@Hold This Position", tf_center_justify), (create_button_overlay, "$g_presentation_obj_11", "@Follow Me", tf_center_justify), (create_button_overlay, "$g_presentation_obj_12", "@Charge", tf_center_justify), (create_button_overlay, "$g_presentation_obj_13", "@Advance", tf_center_justify), (create_button_overlay, "$g_presentation_obj_14", "@Fall Back", tf_center_justify), (create_button_overlay, "$g_presentation_obj_15", "@Stand Closer", tf_center_justify), (create_button_overlay, "$g_presentation_obj_16", "@Spread Out", tf_center_justify), (create_button_overlay, "$g_presentation_obj_17", "@Stand Ground", tf_center_justify), (create_button_overlay, "$g_presentation_obj_18", "@Mount", tf_center_justify), (create_button_overlay, "$g_presentation_obj_19", "@Dismount", tf_center_justify), (create_button_overlay, "$g_presentation_obj_20", "@Use Any Weapon", tf_center_justify), (create_button_overlay, "$g_presentation_obj_21", "@Use Blunt Weapons", tf_center_justify), (create_button_overlay, "$g_presentation_obj_28", "@Hold Your Fire", tf_center_justify), (create_button_overlay, "$g_presentation_obj_29", "@Fire At Will", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, "$g_presentation_obj_10", pos1), (overlay_set_size, "$g_presentation_obj_11", pos1), (overlay_set_size, "$g_presentation_obj_12", pos1), (overlay_set_size, "$g_presentation_obj_13", pos1), (overlay_set_size, "$g_presentation_obj_14", pos1), (overlay_set_size, "$g_presentation_obj_15", pos1), (overlay_set_size, "$g_presentation_obj_16", pos1), (overlay_set_size, "$g_presentation_obj_17", pos1), (overlay_set_size, "$g_presentation_obj_18", pos1), (overlay_set_size, "$g_presentation_obj_19", pos1), (overlay_set_size, "$g_presentation_obj_20", pos1), (overlay_set_size, "$g_presentation_obj_21", pos1), (overlay_set_size, "$g_presentation_obj_28", pos1), (overlay_set_size, "$g_presentation_obj_29", pos1), (position_set_x, pos1, 250), (position_set_y, pos1, 540), (overlay_set_position, "$g_presentation_obj_10", pos1), (position_set_y, pos1, 520), (overlay_set_position, "$g_presentation_obj_11", pos1), (position_set_y, pos1, 500), (overlay_set_position, "$g_presentation_obj_12", pos1), (position_set_y, pos1, 480), (overlay_set_position, "$g_presentation_obj_13", pos1), (position_set_y, pos1, 460), (overlay_set_position, "$g_presentation_obj_14", pos1), (position_set_y, pos1, 440), (overlay_set_position, "$g_presentation_obj_15", pos1), (position_set_y, pos1, 420), (overlay_set_position, "$g_presentation_obj_16", pos1), (position_set_y, pos1, 400), (overlay_set_position, "$g_presentation_obj_17", pos1), (position_set_x, pos1, 400), (position_set_y, pos1, 540), (overlay_set_position, "$g_presentation_obj_18", pos1), (position_set_y, pos1, 520), (overlay_set_position, "$g_presentation_obj_19", pos1), (position_set_x, pos1, 550), (position_set_y, pos1, 540), (overlay_set_position, "$g_presentation_obj_20", pos1), (position_set_y, pos1, 520), (overlay_set_position, "$g_presentation_obj_21", pos1), (position_set_y, pos1, 500), (overlay_set_position, "$g_presentation_obj_28", pos1), (position_set_y, pos1, 480), (overlay_set_position, "$g_presentation_obj_29", pos1), (create_text_overlay, "$g_presentation_obj_22", "@Us", 0), (create_text_overlay, "$g_presentation_obj_24", "@Enemies", 0), (create_text_overlay, "$g_presentation_obj_25", "@Ready", tf_center_justify), (create_text_overlay, "$g_presentation_obj_26", "@Wounded", tf_center_justify), (create_text_overlay, "$g_presentation_obj_27", "@Dead", tf_center_justify), (create_text_overlay, "$g_battle_us_ready", s7, tf_center_justify), (create_text_overlay, "$g_battle_us_wounded", s7, tf_center_justify), (create_text_overlay, "$g_battle_us_dead", s7, tf_center_justify), (create_text_overlay, "$g_battle_enemies_ready", s7, tf_center_justify), (create_text_overlay, "$g_battle_enemies_wounded", s7, tf_center_justify), (create_text_overlay, "$g_battle_enemies_dead", s7, tf_center_justify), (create_text_overlay, "$g_presentation_obj_23", "@Allies", 0), (create_text_overlay, "$g_battle_allies_ready", s7, tf_center_justify), (create_text_overlay, "$g_battle_allies_wounded", s7, tf_center_justify), (create_text_overlay, "$g_battle_allies_dead", s7, tf_center_justify), (assign, ":stat_position_x", 100), (assign, ":stat_position_y", 100), (val_add, ":stat_position_x", 150), (val_add, ":stat_position_y", 120), (position_set_x, pos1, ":stat_position_x"), (position_set_y, pos1, ":stat_position_y"), (overlay_set_position, "$g_presentation_obj_25", pos1), (val_add, ":stat_position_x", 150), (position_set_x, pos1, ":stat_position_x"), (overlay_set_position, "$g_presentation_obj_26", pos1), (val_add, ":stat_position_x", 150), (position_set_x, pos1, ":stat_position_x"), (overlay_set_position, "$g_presentation_obj_27", pos1), (val_add, ":stat_position_x", -450), (val_add, ":stat_position_y", -40), (position_set_x, pos1, ":stat_position_x"), (position_set_y, pos1, ":stat_position_y"), (overlay_set_position, "$g_presentation_obj_22", pos1), (val_add, ":stat_position_y", -40), (position_set_y, pos1, ":stat_position_y"), (overlay_set_position, "$g_presentation_obj_23", pos1), (val_add, ":stat_position_y", -40), (position_set_y, pos1, ":stat_position_y"), (overlay_set_position, "$g_presentation_obj_24", pos1), (get_scene_boundaries, pos2, pos3), (position_transform_position_to_local, pos4, pos2, pos3), (set_fixed_point_multiplier, 1000), (position_get_x, ":map_width", pos4), (position_get_y, ":map_height", pos4), (set_fixed_point_multiplier, 1000), (store_div, ":map_ratio", ":map_height", 100), (store_div, ":map_ratio", ":map_width", ":map_ratio"), (try_begin), (gt, ":map_ratio", 100), (assign, "$g_battle_map_width", 300), (store_div, "$g_battle_map_scale", ":map_width", "$g_battle_map_width"), (store_div, "$g_battle_map_height", ":map_height", "$g_battle_map_scale"), (else_try), (assign, "$g_battle_map_height", 300), (store_div, "$g_battle_map_scale", ":map_height", "$g_battle_map_height"), (store_div, "$g_battle_map_width", ":map_width", "$g_battle_map_scale"), (try_end), (create_image_button_overlay, "$g_battle_map_plane", "mesh_white_plane", "mesh_white_plane"), (overlay_set_color, "$g_battle_map_plane", 0), (store_add, ":map_bordered_width", "$g_battle_map_width", 20), (store_add, ":map_bordered_height", "$g_battle_map_height", 20), (store_mul, ":map_scale_x", ":map_bordered_width", 50), (store_mul, ":map_scale_y", ":map_bordered_height", 50), (position_set_x, pos1, ":map_scale_x"), (position_set_y, pos1, ":map_scale_y"), (overlay_set_size, "$g_battle_map_plane", pos1), (store_sub, ":map_pos_x", 990, ":map_bordered_width"), (store_sub, ":map_pos_y", 740, ":map_bordered_height"), (position_set_x, pos1, ":map_pos_x"), (position_set_y, pos1, ":map_pos_y"), (overlay_set_position, "$g_battle_map_plane", pos1), (overlay_set_alpha, "$g_battle_map_plane", 0x44), (create_mesh_overlay, "$g_battle_map_infantry_order_flag", "mesh_flag_infantry"), (create_mesh_overlay, "$g_battle_map_archers_order_flag", "mesh_flag_archers"), (create_mesh_overlay, "$g_battle_map_cavalry_order_flag", "mesh_flag_cavalry"), (overlay_set_alpha, "$g_battle_map_infantry_order_flag", 0), (overlay_set_alpha, "$g_battle_map_archers_order_flag", 0), (overlay_set_alpha, "$g_battle_map_cavalry_order_flag", 0), (call_script, "script_update_order_panel_checked_classes"), (call_script, "script_update_order_panel_statistics_and_map"), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [(store_trigger_param_1, ":object"), (store_trigger_param_2, ":value"), (get_player_agent_no, ":player_agent"), (agent_get_team, ":player_team", ":player_agent"), (assign, ":update_listeners", 0), (try_begin), (eq, ":object", "$g_presentation_obj_4"), (assign, ":update_listeners", 1), (assign, "$g_formation_infantry_selected", ":value"), (try_begin), (eq, ":value", 1), (overlay_animate_to_alpha, "$g_presentation_obj_1", 250, 0x44), (else_try), (overlay_animate_to_alpha, "$g_presentation_obj_1", 250, 0), (try_end), (else_try), (eq, ":object", "$g_presentation_obj_5"), (assign, ":update_listeners", 1), (assign, "$g_formation_archers_selected", ":value"), (try_begin), (eq, ":value", 1), (overlay_animate_to_alpha, "$g_presentation_obj_2", 250, 0x44), (else_try), (overlay_animate_to_alpha, "$g_presentation_obj_2", 250, 0), (try_end), (else_try), (eq, ":object", "$g_presentation_obj_6"), (assign, ":update_listeners", 1), (assign, "$g_formation_cavalry_selected", ":value"), (try_begin), (eq, ":value", 1), (overlay_animate_to_alpha, "$g_presentation_obj_3", 250, 0x44), (else_try), (overlay_animate_to_alpha, "$g_presentation_obj_3", 250, 0), (try_end), (else_try), (eq, ":object", "$g_presentation_obj_1"), (assign, ":update_listeners", 1), (assign, "$g_formation_infantry_selected", 1), (assign, "$g_formation_archers_selected", 0), (assign, "$g_formation_cavalry_selected", 0), (overlay_animate_to_alpha, "$g_presentation_obj_1", 250, 0x44), (overlay_animate_to_alpha, "$g_presentation_obj_2", 250, 0), (overlay_animate_to_alpha, "$g_presentation_obj_3", 250, 0), (overlay_set_val, "$g_presentation_obj_4", 1), (overlay_set_val, "$g_presentation_obj_5", 0), (overlay_set_val, "$g_presentation_obj_6", 0), (else_try), (eq, ":object", "$g_presentation_obj_2"), (assign, ":update_listeners", 1), (assign, "$g_formation_infantry_selected", 0), (assign, "$g_formation_archers_selected", 1), (assign, "$g_formation_cavalry_selected", 0), (overlay_animate_to_alpha, "$g_presentation_obj_1", 250, 0), (overlay_animate_to_alpha, "$g_presentation_obj_2", 250, 0x44), (overlay_animate_to_alpha, "$g_presentation_obj_3", 250, 0), (overlay_set_val, "$g_presentation_obj_4", 0), (overlay_set_val, "$g_presentation_obj_5", 1), (overlay_set_val, "$g_presentation_obj_6", 0), (else_try), (eq, ":object", "$g_presentation_obj_3"), (assign, ":update_listeners", 1), (assign, "$g_formation_infantry_selected", 0), (assign, "$g_formation_archers_selected", 0), (assign, "$g_formation_cavalry_selected", 1), (overlay_animate_to_alpha, "$g_presentation_obj_1", 250, 0), (overlay_animate_to_alpha, "$g_presentation_obj_2", 250, 0), (overlay_animate_to_alpha, "$g_presentation_obj_3", 250, 0x44), (overlay_set_val, "$g_presentation_obj_4", 0), (overlay_set_val, "$g_presentation_obj_5", 0), (overlay_set_val, "$g_presentation_obj_6", 1), (else_try), (eq, ":object", "$g_presentation_obj_10"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_hold), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_11"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_follow), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_12"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_charge), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_13"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_advance), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_14"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_fall_back), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_15"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_stand_closer), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_16"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_spread_out), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_17"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_stand_ground), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_18"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_mount), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_19"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_dismount), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_20"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_use_any_weapon), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_21"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_use_blunt_weapons), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_28"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_hold_fire), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_presentation_obj_29"), (call_script, "script_team_give_order_from_order_panel", ":player_agent", mordr_fire_at_will), (call_script, "script_update_order_panel", ":player_team"), (else_try), (eq, ":object", "$g_battle_map_plane"), (get_scene_boundaries, pos2, pos3), (mouse_get_position, pos1), (set_fixed_point_multiplier, 1000), (position_get_x, ":mouse_x", pos1), (position_get_y, ":mouse_y", pos1), (store_sub, ":map_x", 980, "$g_battle_map_width"), (store_sub, ":map_y", 730, "$g_battle_map_height"), (val_sub, ":mouse_x", ":map_x"), (val_sub, ":mouse_y", ":map_y"), (val_clamp, ":mouse_x", 0, "$g_battle_map_width"), (val_clamp, ":mouse_y", 0, "$g_battle_map_height"), (val_mul, ":mouse_x", "$g_battle_map_scale"), (val_mul, ":mouse_y", "$g_battle_map_scale"), (set_fixed_point_multiplier, 1000), (position_set_x, pos1, ":mouse_x"), (position_set_y, pos1, ":mouse_y"), (position_transform_position_to_parent, pos3, pos2, pos1), (try_begin), (eq, "$g_formation_infantry_selected", 1), (team_give_order, ":player_team", grc_infantry, mordr_hold), (team_set_order_position, ":player_team", grc_infantry, pos3), (try_end), (try_begin), (eq, "$g_formation_archers_selected", 1), (team_give_order, ":player_team", grc_archers, mordr_hold), (team_set_order_position, ":player_team", grc_archers, pos3), (try_end), (try_begin), (eq, "$g_formation_cavalry_selected", 1), (team_give_order, ":player_team", grc_cavalry, mordr_hold), (team_set_order_position, ":player_team", grc_cavalry, pos3), (try_end), (call_script, "script_update_order_flags_on_map"), (call_script, "script_update_order_panel", ":player_team"), (try_end), (try_begin), (eq, ":update_listeners", 1), (try_begin), (eq, "$g_formation_infantry_selected", 1), (eq, "$g_formation_archers_selected", 1), (eq, "$g_formation_cavalry_selected", 1), (team_set_order_listener, ":player_team", grc_everyone), (else_try), (eq, "$g_formation_infantry_selected", 1), (team_set_order_listener, ":player_team", grc_infantry), (else_try), (eq, "$g_formation_archers_selected", 1), (team_set_order_listener, ":player_team", grc_archers), (else_try), (eq, "$g_formation_cavalry_selected", 1), (team_set_order_listener, ":player_team", grc_cavalry), (try_end), (try_end), ]), (ti_on_presentation_mouse_enter_leave, [(store_trigger_param_1, ":object"), (store_trigger_param_2, ":enter_leave"), (try_begin), (eq, ":object", "$g_presentation_obj_1"), (try_begin), (eq, ":enter_leave", 0), (overlay_animate_to_color, "$g_presentation_infantry_movement", 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_infantry_riding", 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_infantry_weapon_usage", 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_obj_7", 250, 0xFFFFFF), (else_try), (overlay_animate_to_color, "$g_presentation_infantry_movement", 250, 0), (overlay_animate_to_color, "$g_presentation_infantry_riding", 250, 0), (overlay_animate_to_color, "$g_presentation_infantry_weapon_usage", 250, 0), (overlay_animate_to_color, "$g_presentation_obj_7", 250, 0), (try_end), (else_try), (eq, ":object", "$g_presentation_obj_2"), (try_begin), (eq, ":enter_leave", 0), (overlay_animate_to_color, "$g_presentation_archers_movement", 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_archers_riding", 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_archers_weapon_usage", 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_obj_8", 250, 0xFFFFFF), (else_try), (overlay_animate_to_color, "$g_presentation_archers_movement", 250, 0), (overlay_animate_to_color, "$g_presentation_archers_riding", 250, 0), (overlay_animate_to_color, "$g_presentation_archers_weapon_usage", 250, 0), (overlay_animate_to_color, "$g_presentation_obj_8", 250, 0), (try_end), (else_try), (eq, ":object", "$g_presentation_obj_3"), (try_begin), (eq, ":enter_leave", 0), (overlay_animate_to_color, "$g_presentation_cavalry_movement", 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_cavalry_riding", 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_cavalry_weapon_usage", 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_obj_9", 250, 0xFFFFFF), (else_try), (overlay_animate_to_color, "$g_presentation_cavalry_movement", 250, 0), (overlay_animate_to_color, "$g_presentation_cavalry_riding", 250, 0), (overlay_animate_to_color, "$g_presentation_cavalry_weapon_usage", 250, 0), (overlay_animate_to_color, "$g_presentation_obj_9", 250, 0), (try_end), (try_end), ]), (ti_on_presentation_run, [(store_trigger_param_1, ":cur_time"), (try_begin), (this_or_next|game_key_clicked, gk_infantry_hear), (this_or_next|game_key_clicked, gk_archers_hear), (this_or_next|game_key_clicked, gk_cavalry_hear), (this_or_next|game_key_clicked, gk_everyone_hear), (game_key_clicked, gk_reverse_order_group), (call_script, "script_update_order_panel_checked_classes"), (try_end), (try_begin), (this_or_next|game_key_clicked, gk_order_halt), (this_or_next|game_key_clicked, gk_order_follow), (this_or_next|game_key_clicked, gk_order_charge), (this_or_next|game_key_clicked, gk_order_dismount), (this_or_next|game_key_clicked, gk_order_advance), (this_or_next|game_key_clicked, gk_order_fall_back), (this_or_next|game_key_clicked, gk_order_stand_closer), (this_or_next|game_key_clicked, gk_order_spread_out), (this_or_next|game_key_clicked, gk_order_hold_fire_toggle), (game_key_clicked, gk_order_blunt_weapons_toggle), (get_player_agent_no, ":player_agent"), (agent_get_team, ":player_team", ":player_agent"), (call_script, "script_update_order_panel", ":player_team"), (try_end), (try_begin), (gt, ":cur_time", 200), (game_key_clicked, gk_view_orders), (assign, "$g_presentation_battle_active", 0), (try_for_agents, ":cur_agent"), (agent_set_slot, ":cur_agent", slot_agent_map_overlay_id, 0), (try_end), (presentation_set_duration, 0), (try_end), ]), ]), ("sliders",0,0,[ (ti_on_presentation_load, [(set_fixed_point_multiplier, 1000), (create_slider_overlay, "$g_presentation_obj_1", 0, 100), (create_slider_overlay, "$g_presentation_obj_2", 0, 100), (create_slider_overlay, "$g_presentation_obj_3", 0, 100), (create_slider_overlay, "$g_presentation_obj_4", 0, 100), (assign, reg1, 25), (str_store_string, s1, "str_reg1"), (create_text_overlay, "$g_presentation_obj_5", s1), (create_text_overlay, "$g_presentation_obj_6", s1), (create_text_overlay, "$g_presentation_obj_7", s1), (create_text_overlay, "$g_presentation_obj_8", s1), (assign, "$g_presentation_obj_1_val", 25), (overlay_set_val, "$g_presentation_obj_1", 25), (assign, "$g_presentation_obj_2_val", 25), (overlay_set_val, "$g_presentation_obj_2", 25), (assign, "$g_presentation_obj_3_val", 25), (overlay_set_val, "$g_presentation_obj_3", 25), (assign, "$g_presentation_obj_4_val", 25), (overlay_set_val, "$g_presentation_obj_4", 25), (position_set_x, pos1, 600), (position_set_y, pos1, 200), (overlay_set_position, "$g_presentation_obj_1", pos1), (position_set_y, pos1, 300), (overlay_set_position, "$g_presentation_obj_2", pos1), (position_set_y, pos1, 400), (overlay_set_position, "$g_presentation_obj_3", pos1), (position_set_y, pos1, 500), (overlay_set_position, "$g_presentation_obj_4", pos1), (position_set_x, pos1, 800), (position_set_y, pos1, 200), (overlay_set_position, "$g_presentation_obj_5", pos1), (position_set_y, pos1, 300), (overlay_set_position, "$g_presentation_obj_6", pos1), (position_set_y, pos1, 400), (overlay_set_position, "$g_presentation_obj_7", pos1), (position_set_y, pos1, 500), (overlay_set_position, "$g_presentation_obj_8", pos1), (position_set_x, pos1, 500), (overlay_set_size, "$g_presentation_obj_3", pos1), ]), (ti_on_presentation_run, [ ]), (ti_on_presentation_event_state_change, [(store_trigger_param_1, ":object"), (store_trigger_param_2, ":value"), (assign, ":val_changed", 0), (try_begin), (eq, ":object", "$g_presentation_obj_1"), (try_begin), (neq, "$g_presentation_obj_1_val", ":value"), (assign, "$g_presentation_obj_1_val", ":value"), (assign, ":val_changed", 1), (try_end), (else_try), (eq, ":object", "$g_presentation_obj_2"), (try_begin), (neq, "$g_presentation_obj_2_val", ":value"), (assign, "$g_presentation_obj_2_val", ":value"), (assign, ":val_changed", 1), (try_end), (else_try), (eq, ":object", "$g_presentation_obj_3"), (try_begin), (neq, "$g_presentation_obj_3_val", ":value"), (assign, "$g_presentation_obj_3_val", ":value"), (assign, ":val_changed", 1), (try_end), (else_try), (eq, ":object", "$g_presentation_obj_4"), (try_begin), (neq, "$g_presentation_obj_4_val", ":value"), (assign, "$g_presentation_obj_4_val", ":value"), (assign, ":val_changed", 1), (try_end), (try_end), (try_begin), (eq, ":val_changed", 1), (assign, ":sum_values", 0), (val_add, ":sum_values", "$g_presentation_obj_1_val"), (val_add, ":sum_values", "$g_presentation_obj_2_val"), (val_add, ":sum_values", "$g_presentation_obj_3_val"), (val_add, ":sum_values", "$g_presentation_obj_4_val"), (store_sub, ":difference", 100, ":sum_values"), (assign, ":obj_1_new_val", "$g_presentation_obj_1_val"), (assign, ":obj_2_new_val", "$g_presentation_obj_2_val"), (assign, ":obj_3_new_val", "$g_presentation_obj_3_val"), (assign, ":obj_4_new_val", "$g_presentation_obj_4_val"), (assign, ":adder", 1), (assign, ":between_1", 0), (assign, ":between_2", 100), (try_begin), (lt, ":difference", 0), (val_mul, ":difference", -1), (assign, ":adder", -1), (assign, ":between_1", 1), (assign, ":between_2", 101), (try_end), (store_sub, ":sum_non_changed_values", ":sum_values", ":value"), (val_add, ":sum_non_changed_values", 30), (try_for_range, ":unused", 0, ":difference"), (store_random_in_range, ":random_no", 0, ":sum_non_changed_values"), (try_begin), (neq, ":object", "$g_presentation_obj_1"), (val_sub, ":random_no", "$g_presentation_obj_1_val"), (val_sub, ":random_no", 10), (lt, ":random_no", 0), (is_between, ":obj_1_new_val", ":between_1", ":between_2"), (val_add, ":obj_1_new_val", ":adder"), (else_try), (neq, ":object", "$g_presentation_obj_2"), (val_sub, ":random_no", "$g_presentation_obj_2_val"), (val_sub, ":random_no", 10), (lt, ":random_no", 0), (is_between, ":obj_2_new_val", ":between_1", ":between_2"), (val_add, ":obj_2_new_val", ":adder"), (else_try), (neq, ":object", "$g_presentation_obj_3"), (val_sub, ":random_no", "$g_presentation_obj_3_val"), (val_sub, ":random_no", 10), (lt, ":random_no", 0), (is_between, ":obj_3_new_val", ":between_1", ":between_2"), (val_add, ":obj_3_new_val", ":adder"), (else_try), (is_between, ":obj_4_new_val", ":between_1", ":between_2"), (val_add, ":obj_4_new_val", ":adder"), (else_try), (val_add, ":difference", 1), (try_end), (try_end), (assign, "$g_presentation_obj_1_val", ":obj_1_new_val"), (assign, "$g_presentation_obj_2_val", ":obj_2_new_val"), (assign, "$g_presentation_obj_3_val", ":obj_3_new_val"), (assign, "$g_presentation_obj_4_val", ":obj_4_new_val"), (try_end), (overlay_set_val, "$g_presentation_obj_1", "$g_presentation_obj_1_val"), (overlay_set_val, "$g_presentation_obj_2", "$g_presentation_obj_2_val"), (overlay_set_val, "$g_presentation_obj_3", "$g_presentation_obj_3_val"), (overlay_set_val, "$g_presentation_obj_4", "$g_presentation_obj_4_val"), (assign, reg1, "$g_presentation_obj_1_val"), (str_store_string, s1, "str_reg1"), (overlay_set_text, "$g_presentation_obj_5", s1), (assign, reg1, "$g_presentation_obj_2_val"), (str_store_string, s1, "str_reg1"), (overlay_set_text, "$g_presentation_obj_6", s1), (assign, reg1, "$g_presentation_obj_3_val"), (str_store_string, s1, "str_reg1"), (overlay_set_text, "$g_presentation_obj_7", s1), (assign, reg1, "$g_presentation_obj_4_val"), (str_store_string, s1, "str_reg1"), (overlay_set_text, "$g_presentation_obj_8", s1), ]), ]), ("arena_training", prsntf_read_only, 0, [ (ti_on_presentation_load, [(presentation_set_duration, 999999), (set_fixed_point_multiplier, 1000), (get_player_agent_no, ":player_agent"), (agent_get_kill_count, reg1, ":player_agent", 1), (str_store_string, s1, "@Number of men knocked down: {reg1}"), (create_text_overlay, "$g_presentation_obj_1", s1), (overlay_set_color, "$g_presentation_obj_1", 0xFFFFFF), (position_set_x, pos1, 10), (position_set_y, pos1, 700), (overlay_set_position, "$g_presentation_obj_1", pos1), (assign, reg1, 0), (str_store_string, s1, "@Number of men left: {reg1}"), (create_text_overlay, "$g_presentation_obj_2", s1), (overlay_set_color, "$g_presentation_obj_2", 0xFFFFFF), (position_set_x, pos1, 10), (position_set_y, pos1, 670), (overlay_set_position, "$g_presentation_obj_2", pos1), ]), (ti_on_presentation_run, [(get_player_agent_no, ":player_agent"), (agent_get_kill_count, reg1, ":player_agent", 1), (str_store_string, s1, "@Opponents Beaten: {reg1}"), (overlay_set_text, "$g_presentation_obj_1", s1), (assign, ":num_left", "$g_arena_training_max_opponents"), (try_for_agents, ":agent_no"), (agent_is_human, ":agent_no"), (neg|agent_is_alive, ":agent_no"), (neq, ":agent_no", ":player_agent"), (val_sub, ":num_left", 1), (try_end), (assign, reg1, ":num_left"), (str_store_string, s1, "@Opponents Remaining: {reg1}"), (overlay_set_text, "$g_presentation_obj_2", s1), ]), ]), ("retirement", 0, mesh_load_window, [ (ti_on_presentation_load, [ (presentation_set_duration, 999999), (set_fixed_point_multiplier, 1000), (create_button_overlay, "$g_presentation_obj_1", "@Remain in retirement.", tf_center_justify), (create_button_overlay, "$g_presentation_obj_2", "@Go back to the adventuring.", tf_center_justify), (position_set_x, pos1, 500), (position_set_y, pos1, 80), (overlay_set_position, "$g_presentation_obj_1", pos1), (position_set_y, pos1, 40), (overlay_set_position, "$g_presentation_obj_2", pos1), (assign, ":total_effect", 0), #wealth (store_troop_gold, ":wealth", "trp_player"), (store_div, ":wealth_effect", ":wealth", 200), (val_add, ":total_effect", ":wealth_effect"), #ruled centers and friendly/enemy centers (assign, ":num_towns", 0), (assign, ":num_castles", 0), (assign, ":num_villages", 0), (assign, ":num_friendly_towns", 0), (assign, ":num_friendly_villages", 0), (assign, ":num_enemy_towns", 0), (assign, ":num_enemy_villages", 0), (try_for_range, ":center_no", centers_begin, centers_end), (party_get_slot, ":type", ":center_no", slot_party_type), (try_begin), (party_slot_eq, ":center_no", slot_town_lord, "trp_player"), (try_begin), (eq, ":type", spt_town), (val_add, ":num_towns", 1), (else_try), (eq, ":type", spt_castle), (val_add, ":num_castles", 1), (else_try), (val_add, ":num_villages", 1), (try_end), (try_end), (party_get_slot, ":relation", ":center_no", slot_center_player_relation), (try_begin), (ge, ":relation", 40), (try_begin), (eq, ":type", spt_town), (val_add, ":num_friendly_towns", 1), (else_try), (eq, ":type", spt_village), (val_add, ":num_friendly_villages", 1), (try_end), (else_try), (le, ":relation", -40), (try_begin), (eq, ":type", spt_town), (val_add, ":num_enemy_towns", 1), (else_try), (eq, ":type", spt_village), (val_add, ":num_enemy_villages", 1), (try_end), (try_end), (try_end), (store_mul, ":num_towns_effect", ":num_towns", 100), (store_mul, ":num_castles_effect", ":num_castles", 50), (store_mul, ":num_villages_effect", ":num_villages", 20), (store_add, ":num_centers", ":num_towns", ":num_castles"), (val_add, ":num_centers", ":num_villages"), (store_add, ":ruled_centers_effect", ":num_towns_effect", ":num_castles_effect"), (val_add, ":ruled_centers_effect", ":num_villages_effect"), (val_add, ":total_effect", ":ruled_centers_effect"), (store_mul, ":num_friendly_towns_effect", ":num_friendly_towns", 20), (store_mul, ":num_friendly_villages_effect", ":num_friendly_villages", 4), (store_add, ":num_friendly_centers", ":num_friendly_towns", ":num_friendly_villages"), (store_add, ":friendly_centers_effect", ":num_friendly_towns_effect", ":num_friendly_villages_effect"), (val_add, ":total_effect", ":friendly_centers_effect"), (store_mul, ":num_enemy_towns_effect", ":num_enemy_towns", -40), (store_mul, ":num_enemy_villages_effect", ":num_enemy_villages", -8), (store_add, ":num_enemy_centers", ":num_enemy_towns", ":num_enemy_villages"), (store_add, ":enemy_centers_effect", ":num_enemy_towns_effect", ":num_enemy_villages_effect"), (val_add, ":total_effect", ":enemy_centers_effect"), #inventory (assign, ":total_item_value", 0), (troop_get_inventory_capacity, ":capacity", "trp_player"), (try_for_range, ":i_inv", 0, ":capacity"), (troop_get_inventory_slot, ":item", "trp_player", ":i_inv"), (ge, ":item", 0), (store_item_value, ":item_value", ":item"), (val_add, ":total_item_value", ":item_value"), (try_end), (store_div, ":total_item_value_effect", ":total_item_value", 200), (val_add, ":total_effect", ":total_item_value_effect"), #renown (troop_get_slot, ":renown", "trp_player", slot_troop_renown), (store_div, ":renown_effect", ":renown", 1), (val_add, ":total_effect", ":renown_effect"), #enemies and friends (assign, ":num_enemies", 0), (assign, ":num_friends", 0), (try_for_range, ":troop_no", heroes_begin, heroes_end), (this_or_next|troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero), (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_lady), (call_script, "script_troop_get_player_relation", ":troop_no"), (assign, ":relation", reg0), #(troop_get_slot, ":relation", ":troop_no", slot_troop_player_relation), (try_begin), (ge, ":relation", 40), (val_add, ":num_friends", 1), (else_try), (le, ":relation", -40), (val_add, ":num_enemies", 1), (try_end), (try_end), (store_mul, ":num_friends_effect", ":num_friends", 10), (val_add, ":total_effect", ":num_friends_effect"), (store_mul, ":num_enemies_effect", ":num_enemies", -10), (val_add, ":total_effect", ":num_enemies_effect"), #current day (store_current_day, ":cur_day"), (store_div, ":cur_day_effect", ":cur_day", -1), (val_add, ":total_effect", ":cur_day_effect"), #g_total_victories (store_mul, ":total_victories_effect", "$g_total_victories", 2), (val_add, ":total_effect", ":total_victories_effect"), #g_total_defeats (store_mul, ":total_defeats_effect", "$g_total_defeats", -3), (val_add, ":total_effect", ":total_defeats_effect"), #g_total_quests_completed (store_mul, ":total_quests_completed_effect", "$g_total_quests_completed", 4), (val_add, ":total_effect", ":total_quests_completed_effect"), #xp (troop_get_xp, ":xp", "trp_player"), (store_div, ":xp_effect", ":xp", 5000), (val_add, ":total_effect", ":xp_effect"), #companions joined / departed (assign, ":num_companions_joined", 0), (assign, ":num_companions_departed", 0), (try_for_range, ":troop_no", companions_begin, companions_end), (try_begin), (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_player_companion), (val_add, ":num_companions_joined", 1), (else_try), (troop_slot_ge, ":troop_no", slot_troop_playerparty_history, 1), (val_add, ":num_companions_departed", 1), (try_end), (try_end), (store_div, ":num_companions_joined_effect", ":num_companions_joined", 2), (val_add, ":total_effect", ":num_companions_joined_effect"), (store_div, ":num_companions_departed_effect", ":num_companions_departed", -4), (val_add, ":total_effect", ":num_companions_departed_effect"), #difficulty (get_average_game_difficulty, ":difficulty"), (assign, ":difficulty_effect", ":total_effect"), (val_mul, ":total_effect", ":difficulty"), (val_div, ":total_effect", 75), (val_mul, ":total_effect", ":difficulty"), (val_div, ":total_effect", 75), (store_sub, ":difficulty_effect", ":total_effect", ":difficulty_effect"), (assign, reg5, ":cur_day"), (store_character_level, reg4, "trp_player"), (create_text_overlay, reg1, "@You have retired at level {reg4} after {reg5} days of adventuring.", tf_center_justify), (position_set_x, pos1, 700), (position_set_y, pos1, 700), (overlay_set_position, reg1, pos1), (position_set_x, pos1, 950), (position_set_y, pos1, 950), (overlay_set_size, reg1, pos1), ## (overlay_set_color, reg1, 0), (create_text_overlay, reg2, "@Effect on Score", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg2, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 670), (overlay_set_position, reg2, pos1), (assign, reg0, ":num_centers"), (create_text_overlay, reg1, "@Settlements owned by you: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 650), (overlay_set_position, reg1, pos1), (assign, reg0, ":ruled_centers_effect"), (create_text_overlay, reg1, "@{reg0?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 650), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (try_end), (assign, reg0, ":num_friendly_centers"), (create_text_overlay, reg1, "@Friendly Settlements: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 630), (overlay_set_position, reg1, pos1), (assign, reg0, ":friendly_centers_effect"), (create_text_overlay, reg1, "@{reg0?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 630), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (try_end), (assign, reg0, ":num_enemy_centers"), (create_text_overlay, reg1, "@Hostile Settlements: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 610), (overlay_set_position, reg1, pos1), (assign, reg0, ":enemy_centers_effect"), (create_text_overlay, reg1, "@{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 610), (overlay_set_position, reg1, pos1), (try_begin), (lt, reg0, 0), (overlay_set_color, reg1, 0xFF0000), (try_end), (assign, reg0, ":num_friends"), (create_text_overlay, reg1, "@Friendly Lords: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 590), (overlay_set_position, reg1, pos1), (assign, reg0, ":num_friends_effect"), (create_text_overlay, reg1, "@{reg0?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 590), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (try_end), (assign, reg0, ":num_enemies"), (create_text_overlay, reg1, "@Enemy Lords: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 570), (overlay_set_position, reg1, pos1), (assign, reg0, ":num_enemies_effect"), (create_text_overlay, reg1, "@{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 570), (overlay_set_position, reg1, pos1), (try_begin), (lt, reg0, 0), (overlay_set_color, reg1, 0xFF0000), (try_end), (assign, reg0, "$g_total_victories"), (create_text_overlay, reg1, "@Victories: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 550), (overlay_set_position, reg1, pos1), (assign, reg0, ":total_victories_effect"), (create_text_overlay, reg1, "@{reg0?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 550), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (try_end), (assign, reg0, "$g_total_defeats"), (create_text_overlay, reg1, "@Defeats: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 530), (overlay_set_position, reg1, pos1), (assign, reg0, ":total_defeats_effect"), (create_text_overlay, reg1, "@{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 530), (overlay_set_position, reg1, pos1), (try_begin), (lt, reg0, 0), (overlay_set_color, reg1, 0xFF0000), (try_end), (assign, reg0, "$g_total_quests_completed"), (create_text_overlay, reg1, "@Quests Completed: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 510), (overlay_set_position, reg1, pos1), (assign, reg0, ":total_quests_completed_effect"), (create_text_overlay, reg1, "@{reg0?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 510), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (try_end), (assign, reg0, ":num_companions_joined"), (create_text_overlay, reg1, "@Companions Found: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 490), (overlay_set_position, reg1, pos1), (assign, reg0, ":num_companions_joined_effect"), (create_text_overlay, reg1, "@{reg0?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 490), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (try_end), (assign, reg0, ":num_companions_departed"), (create_text_overlay, reg1, "@Companions Lost/Departed: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 470), (overlay_set_position, reg1, pos1), (assign, reg0, ":num_companions_departed_effect"), (create_text_overlay, reg1, "@{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 470), (overlay_set_position, reg1, pos1), (try_begin), (lt, reg0, 0), (overlay_set_color, reg1, 0xFF0000), (try_end), (assign, reg0, ":wealth"), (create_text_overlay, reg1, "@Wealth: {reg0} denars", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 450), (overlay_set_position, reg1, pos1), (assign, reg0, ":wealth_effect"), (create_text_overlay, reg1, "@{reg0?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 450), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (try_end), (assign, reg0, ":total_item_value"), (create_text_overlay, reg1, "@Inventory: {reg0} denars", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 430), (overlay_set_position, reg1, pos1), (assign, reg0, ":total_item_value_effect"), (create_text_overlay, reg1, "@{reg0?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 430), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (try_end), (assign, reg0, ":renown"), (create_text_overlay, reg1, "@Renown: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 410), (overlay_set_position, reg1, pos1), (assign, reg0, ":renown_effect"), (create_text_overlay, reg1, "@{reg0?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 410), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (try_end), (assign, reg0, ":xp"), (create_text_overlay, reg1, "@Experience: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 390), (overlay_set_position, reg1, pos1), (assign, reg0, ":xp_effect"), (create_text_overlay, reg1, "@{reg0?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 390), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (try_end), (assign, reg0, ":cur_day"), (create_text_overlay, reg1, "@Days Passed: {reg0}", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 370), (overlay_set_position, reg1, pos1), (assign, reg0, ":cur_day_effect"), (create_text_overlay, reg1, "@{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 370), (overlay_set_position, reg1, pos1), (try_begin), (lt, reg0, 0), (overlay_set_color, reg1, 0xFF0000), (try_end), (assign, reg0, ":difficulty"), (create_text_overlay, reg1, "@Difficulty: {reg0}%", 0), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 600), (position_set_y, pos1, 350), (overlay_set_position, reg1, pos1), (assign, reg0, ":difficulty_effect"), (assign, reg3, reg0), (val_max, reg3, 0), (create_text_overlay, reg1, "@{reg3?+:}{reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 750), (overlay_set_size, reg1, pos1), (position_set_x, pos1, 850), (position_set_y, pos1, 350), (overlay_set_position, reg1, pos1), (try_begin), (gt, reg0, 0), (overlay_set_color, reg1, 0x00FF00), (else_try), (lt, reg0, 0), (overlay_set_color, reg1, 0xFF0000), (try_end), (assign, reg0, ":total_effect"), (create_text_overlay, reg1, "@TOTAL SCORE: {reg0}", tf_center_justify), (position_set_x, pos1, 750), (position_set_y, pos1, 320), (overlay_set_position, reg1, pos1), (assign, ":total_villages", 0), (assign, ":total_castles", 0), (assign, ":total_towns", 0), (assign, ":total_village_rels", 0), (assign, ":total_castle_rels", 0), (assign, ":total_town_rels", 0), (try_for_range, ":cur_center_no", centers_begin, centers_end), (try_begin), (party_slot_eq, ":cur_center_no", slot_town_lord, "trp_player"), (try_begin), (party_slot_eq, ":cur_center_no", slot_party_type, spt_town), (val_add, ":total_towns", 1), (else_try), (party_slot_eq, ":cur_center_no", slot_party_type, spt_castle), (val_add, ":total_castles", 1), (else_try), (val_add, ":total_villages", 1), (try_end), (else_try), (party_get_slot, ":center_relation", ":cur_center_no", slot_center_player_relation), (gt, ":center_relation", 0), (try_begin), (party_slot_eq, ":cur_center_no", slot_party_type, spt_town), (val_add, ":total_town_rels", ":center_relation"), (else_try), (party_slot_eq, ":cur_center_no", slot_party_type, spt_castle), (val_add, ":total_castle_rels", ":center_relation"), (else_try), (val_add, ":total_village_rels", ":center_relation"), (try_end), (try_end), (try_end), (try_begin), (gt, ":total_towns", 0), (store_random_in_range, ":random_town", 0, ":total_towns"), (try_for_range, ":cur_center_no", towns_begin, towns_end), (party_slot_eq, ":cur_center_no", slot_town_lord, "trp_player"), (val_sub, ":random_town", 1), (lt, ":random_town", 0), (str_store_party_name, s9, ":cur_center_no"), (try_end), (else_try), (gt, ":total_town_rels", 0), (store_random_in_range, ":random_town_rel", 0, ":total_town_rels"), (try_for_range, ":cur_center_no", towns_begin, towns_end), (party_get_slot, ":center_relation", ":cur_center_no", slot_center_player_relation), (gt, ":center_relation", 0), (val_sub, ":random_town_rel", ":center_relation"), (lt, ":random_town_rel", 0), (str_store_party_name, s9, ":cur_center_no"), (try_end), (else_try), (store_random_in_range, ":random_town", towns_begin, towns_end), (str_store_party_name, s9, ":random_town"), (try_end), (try_begin), (gt, ":total_castles", 0), (store_random_in_range, ":random_castle", 0, ":total_castles"), (try_for_range, ":cur_center_no", castles_begin, castles_end), (party_slot_eq, ":cur_center_no", slot_town_lord, "trp_player"), (val_sub, ":random_castle", 1), (lt, ":random_castle", 0), (str_store_party_name, s8, ":cur_center_no"), (try_end), (else_try), (gt, ":total_castle_rels", 0), (store_random_in_range, ":random_castle_rel", 0, ":total_castle_rels"), (try_for_range, ":cur_center_no", castles_begin, castles_end), (party_get_slot, ":center_relation", ":cur_center_no", slot_center_player_relation), (gt, ":center_relation", 0), (val_sub, ":random_castle_rel", ":center_relation"), (lt, ":random_castle_rel", 0), (str_store_party_name, s8, ":cur_center_no"), (try_end), (else_try), (store_random_in_range, ":random_castle", castles_begin, castles_end), (str_store_party_name, s8, ":random_castle"), (try_end), (try_begin), (gt, ":total_villages", 0), (store_random_in_range, ":random_village", 0, ":total_villages"), (try_for_range, ":cur_center_no", villages_begin, villages_end), (party_slot_eq, ":cur_center_no", slot_town_lord, "trp_player"), (val_sub, ":random_village", 1), (lt, ":random_village", 0), (str_store_party_name, s7, ":cur_center_no"), (try_end), (else_try), (gt, ":total_village_rels", 0), (store_random_in_range, ":random_village_rel", 0, ":total_village_rels"), (try_for_range, ":cur_center_no", villages_begin, villages_end), (party_get_slot, ":center_relation", ":cur_center_no", slot_center_player_relation), (gt, ":center_relation", 0), (val_sub, ":random_village_rel", ":center_relation"), (lt, ":random_village_rel", 0), (str_store_party_name, s7, ":cur_center_no"), (try_end), (else_try), (store_random_in_range, ":random_village", villages_begin, villages_end), (str_store_party_name, s7, ":random_village"), (try_end), (try_begin), (lt, ":total_effect", 100), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_retirement_troop", 0), (str_store_string, s0, "str_retirement_text_1"), (else_try), (lt, ":total_effect", 200), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_retirement_troop", 1), (str_store_string, s0, "str_retirement_text_2"), (else_try), (lt, ":total_effect", 400), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_retirement_troop", 2), (str_store_string, s0, "str_retirement_text_3"), (else_try), (lt, ":total_effect", 700), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_retirement_troop", 3), (str_store_string, s0, "str_retirement_text_4"), (else_try), (lt, ":total_effect", 1200), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_retirement_troop", 4), (str_store_string, s0, "str_retirement_text_5"), (else_try), (lt, ":total_effect", 1850), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_retirement_troop", 5), (str_store_string, s0, "str_retirement_text_6"), (else_try), (lt, ":total_effect", 2500), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_retirement_troop", 6), (str_store_string, s0, "str_retirement_text_7"), (else_try), (lt, ":total_effect", 3500), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_retirement_troop", 7), (str_store_string, s0, "str_retirement_text_8"), (else_try), (lt, ":total_effect", 5000), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_retirement_troop", 8), (str_store_string, s0, "str_retirement_text_9"), (else_try), (create_mesh_overlay_with_tableau_material, reg1, -1, "tableau_retirement_troop", 9), (str_store_string, s0, "str_retirement_text_10"), (try_end), (position_set_x, pos1, 0), (position_set_y, pos1, 120), (overlay_set_position, reg1, pos1), (create_text_overlay, reg1, s0, tf_double_space|tf_scrollable), (position_set_x, pos1, 600), (position_set_y, pos1, 120), (overlay_set_position, reg1, pos1), (position_set_x, pos1, 360), (position_set_y, pos1, 190), (overlay_set_area_size, reg1, pos1), (position_set_x, pos1, 800), (position_set_y, pos1, 800), (overlay_set_size, reg1, pos1), ]), (ti_on_presentation_event_state_change, [ (store_trigger_param_1, ":object"), (try_begin), (eq, ":object", "$g_presentation_obj_1"), (jump_to_menu, "mnu_end_game"), (start_presentation, "prsnt_game_credits"), (else_try), (eq, ":object", "$g_presentation_obj_2"), (presentation_set_duration, 0), (change_screen_return), (try_end), ]), ]), ########################### # Form Ranks Kit section # # Key configuration ("key_config", 0, mesh_load_window, [ (ti_on_presentation_load, [ (presentation_set_duration, 999999), (set_fixed_point_multiplier, 1000), ]+[ (assign, "$g_presentation_obj_"+str(x+1), -1) \ for x in range(0, 2*len(formation_keys_list)) ]+[ (assign, "$formation_key_config_back", -1), (assign, "$formation_key_config_reset", -1), (assign, "$formation_key_config_default", -1), (assign, "$formation_key_config_title", -1), (assign, "$key_config_button_down", 0), (set_spawn_radius, 5), (spawn_around_party, "p_main_party", "pt_none"), (assign, "$formation_key_config_vector", reg0), (disable_party, reg0), (spawn_around_party, "p_main_party", "pt_none"), (assign, "$formation_key_config_vector_back", reg0), (disable_party, reg0), (try_for_range, ":slot", 0, 0xff), (party_set_slot, "$formation_key_config_vector", ":slot", -1), (party_set_slot, "$formation_key_config_vector_back", ":slot", -1), (try_end), (try_for_range, ":key", 0, len(formation_keys_list)), (store_add, ":slot", slot_party_formation_keys_begin, ":key"), (party_get_slot, ":mapped_key", "p_main_party", ":slot"), (neq, ":mapped_key", 0xff), (party_set_slot, "$formation_key_config_vector", ":mapped_key", ":key"), (party_set_slot, "$formation_key_config_vector_back", ":mapped_key", ":key"), (try_end), (init_position, pos1), (position_set_y, pos1, 680), (position_set_x, pos1, 200), (create_text_overlay, "$formation_key_config_title", "@Formation Keys Configuration", tf_center_justify), (overlay_set_position, "$formation_key_config_title", pos1), (position_set_y, pos1, 150), (position_set_x, pos1, 600), (create_text_overlay, "$formation_key_config_notes", "@Press Esc to^^Disable a key", tf_left_align), (overlay_set_position, "$formation_key_config_notes", pos1), (overlay_set_color, "$formation_key_config_notes", 0x600000), (overlay_set_alpha, "$formation_key_config_notes", 0x00), (position_set_y, pos1, 600), (position_set_x, pos1, 25), (position_set_x, pos2, 1000), (position_set_y, pos2, 1000), (position_set_x, pos3, 120), (position_set_y, pos3, 40), ]+concatenate_scripts([ [(store_add, ":key_name", formation_key_names_begin, y), (create_text_overlay, "$g_presentation_obj_"+str(y*2+1), ":key_name", tf_left_align), (overlay_set_position, "$g_presentation_obj_"+str(y*2+1), pos1), (overlay_set_size, "$g_presentation_obj_"+str(y*2+1), pos2), (position_move_x, pos1, 25), (create_game_button_overlay, "$g_presentation_obj_"+str(y*2+2), "str_no_string", tf_center_justify), (overlay_set_position, "$g_presentation_obj_"+str(y*2+2), pos1), (overlay_set_size, "$g_presentation_obj_"+str(y*2+2), pos3), (position_move_x, pos1, -25), (position_move_y, pos1, -4), (try_begin), (eq, len(formation_keys_list)/3+4, y), (position_move_y, pos1, 4*(y+1)), (position_move_x, pos1, 32), (try_end), (try_begin), (eq, len(formation_keys_list)/3+4+(len(formation_keys_list)-len(formation_keys_list)/3-5)/2, y), (position_move_y, pos1, 4*(y-len(formation_keys_list)/3-4)), (position_move_x, pos1, 32), (try_end), (try_begin), ] for y in range(0, len(formation_keys_list)) ])+[ (position_set_y, pos1, 250), (position_set_x, pos1, 600), (create_text_overlay, "$formation_key_config_ai_switch_txt", "@Formation AI", tf_center_justify), (overlay_set_position, "$formation_key_config_ai_switch_txt", pos1), (position_move_x, pos1, 25), (assign, "$formation_key_config_ai_switch", 0), (create_game_button_overlay, "$formation_key_config_ai_switch", "str_no_string", tf_center_justify), (overlay_set_position, "$formation_key_config_ai_switch", pos1), (call_script, "script_update_formation_key_config_buttons"), (position_set_y, pos1, 25), (position_set_x, pos1, 900), (create_game_button_overlay, "$formation_key_config_back", "@Back", tf_center_justify), (overlay_set_position, "$formation_key_config_back", pos1), (position_move_x, pos1, -16), (create_game_button_overlay, "$formation_key_config_reset", "@Reset", tf_center_justify), (overlay_set_position, "$formation_key_config_reset", pos1), (position_move_x, pos1, -16), (create_game_button_overlay, "$formation_key_config_default", "@Default", tf_center_justify), (overlay_set_position, "$formation_key_config_default", pos1), ] ), (ti_on_presentation_event_state_change, [ (store_trigger_param_1, ":object"), #(store_trigger_param_2, ":value"), (try_begin), ]+concatenate_scripts([ [ (eq, ":object", "$g_presentation_obj_"+str(y*2+2)), (assign, "$key_config_button_down", 1), (assign, "$key_config_listener", "$g_presentation_obj_"+str(y*2+2)), (overlay_set_text, "$key_config_listener", "@Press a key", tf_center_justify), (overlay_set_color, "$key_config_listener", 0x0000FF), (overlay_set_hilight_color, "$key_config_listener", 0x0000FF), (assign, "$formation_key_no", y), (else_try),] for y in range(0, len(formation_keys_list)) ])+[ (eq, ":object", "$formation_key_config_back"), (eq, "$key_config_button_down", 0), (presentation_set_duration, 0), (jump_to_menu, "mnu_camp_action"), (else_try), (eq, ":object", "$formation_key_config_reset"), (try_for_range, ":slot", slot_party_formation_keys_begin, slot_party_formation_keys_begin+len(formation_keys_list)), (party_set_slot, "p_main_party", ":slot", 0xff), (try_end), (try_for_range, ":slot", 0, 0xff), (party_get_slot, ":key", "$formation_key_config_vector_back", ":slot"), (party_set_slot, "$formation_key_config_vector", ":slot", ":key"), (neq, ":key", -1), (val_add, ":key", slot_party_formation_keys_begin), (party_set_slot, "p_main_party", ":key", ":slot"), (try_end), (call_script, "script_update_formation_key_config_buttons"), (else_try), (eq, ":object", "$formation_key_config_default"), ]+[ (party_set_slot, "p_main_party", slot_party_formation_keys_begin+x, formation_default_key_list[x]) \ for x in range(0, len(formation_keys_list)) ]+[ (try_for_range, ":slot", 0, 0xff), (party_set_slot, "$formation_key_config_vector", ":slot", -1), (try_end), (try_for_range, ":key", 0, len(formation_keys_list)), (store_add, ":slot", ":key", slot_party_formation_keys_begin), (party_get_slot, ":mapped_key", "p_main_party", ":slot"), (neq, ":mapped_key", 0xff), (party_set_slot, "$formation_key_config_vector", ":mapped_key", ":key"), (try_end), (call_script, "script_update_formation_key_config_buttons"), (else_try), (eq, ":object", "$formation_key_config_ai_switch"), (party_get_slot, ":state", "p_main_party", slot_party_formation_ai_switch), (try_begin), (eq, ":state", 0), (party_set_slot, "p_main_party", slot_party_formation_ai_switch, 1), (else_try), (party_set_slot, "p_main_party", slot_party_formation_ai_switch, 0), (try_end), (call_script, "script_update_formation_key_config_buttons"), (try_end), (try_begin), (eq, "$key_config_button_down", 1), (overlay_set_alpha, "$formation_key_config_notes", 0xFF), (try_end), ] ), (ti_on_presentation_run, [ (eq, "$key_config_button_down", 1), (store_add, ":slot", "$formation_key_no", slot_party_formation_keys_begin), (assign, "$key_config_button_down", 0), (try_begin), ]+concatenate_scripts([ [ (key_clicked, all_keys_list[x][0]), #(overlay_set_text, "$key_config_listener", all_keys_list[x][1], tf_center_justify), #(overlay_set_color, "$key_config_listener", 0x0), (party_get_slot, ":prev_mapped_key", "p_main_party", ":slot"), (party_set_slot, "$formation_key_config_vector", ":prev_mapped_key", -1), (party_set_slot, "p_main_party", ":slot", all_keys_list[x][0]), (try_begin), (party_get_slot, ":prev_key", "$formation_key_config_vector", all_keys_list[x][0]), (party_set_slot, "$formation_key_config_vector", all_keys_list[x][0], "$formation_key_no"), (neq, ":prev_key", -1), (store_add, ":prev_slot", ":prev_key", slot_party_formation_keys_begin), (party_set_slot, "p_main_party", ":prev_slot", 0xff), (try_end), (else_try), ] for x in range(0, len(all_keys_list)) ])+[ (key_clicked, key_escape), #(overlay_set_text, "$key_config_listener", "@Undefined"), #(overlay_set_color, "$key_config_listener", 0xFF0000), (party_get_slot, ":prev_mapped_key", "p_main_party", ":slot"), (party_set_slot, "$formation_key_config_vector", ":prev_mapped_key", -1), (party_set_slot, "p_main_party", ":slot", 0xff), (else_try), (assign, "$key_config_button_down", 1), (try_end), (try_begin), (eq, "$key_config_button_down", 0), (overlay_set_hilight_color, "$key_config_listener", 0x00FF00), (overlay_set_alpha, "$formation_key_config_notes", 0x00), (call_script, "script_update_formation_key_config_buttons"), (try_end), ] ), ] ), ("battle_formations",0,0,[ (ti_on_presentation_load, [(set_fixed_point_multiplier, 1000), (assign, "$g_presentation_battle_formations_active", 1), (str_clear, s7), (try_for_agents, ":agent_no"), (agent_set_slot, ":agent_no", slot_agent_map_overlay_id, 0), (try_end), (set_fixed_point_multiplier, 1000), (position_set_x, pos1, 0), (position_set_y, pos1, 650), (position_set_x, pos2, 32550), (position_set_y, pos2, 2500), (position_set_x, pos3, 20), (position_set_y, pos3, 663), (position_set_x, pos4, 50), (position_set_y, pos4, 663), (position_set_y, pos5, 663), (position_set_x, pos6, 900), (position_set_y, pos6, 900), ]+concatenate_scripts([ [(create_image_button_overlay, "$g_presentation_obj_"+str(x+1), "mesh_white_plane", "mesh_white_plane"), (position_set_y, pos1, 650-50*x), (overlay_set_position, "$g_presentation_obj_"+str(x+1), pos1), (overlay_set_size, "$g_presentation_obj_"+str(x+1), pos2), (overlay_set_alpha, "$g_presentation_obj_"+str(x+1), 0), (overlay_set_color, "$g_presentation_obj_"+str(x+1), 0xFFFF00), (create_check_box_overlay, "$g_presentation_obj_"+str(x+1+formation_arrays), "mesh_checkbox_off", "mesh_checkbox_on"), (position_set_y, pos3, 663-50*x), (overlay_set_position, "$g_presentation_obj_"+str(x+1+formation_arrays), pos3), (create_text_overlay, "$g_presentation_obj_"+str(x+1+2*formation_arrays), s7, 0), (position_set_y, pos4, 663-50*x), (overlay_set_position, "$g_presentation_obj_"+str(x+1+2*formation_arrays), pos4), (position_set_y, pos5, 663-50*x), (position_set_x, pos5, 250), (create_text_overlay, "$g_presentation_array_formation_"+str(x+1), s7, tf_center_justify), (overlay_set_position, "$g_presentation_array_formation_"+str(x+1), pos5), (overlay_set_size, "$g_presentation_array_formation_"+str(x+1), pos6), (position_set_x, pos5, 350), (create_text_overlay, "$g_presentation_array_movement_"+str(x+1), s7, tf_center_justify), (overlay_set_position, "$g_presentation_array_movement_"+str(x+1), pos5), (overlay_set_size, "$g_presentation_array_movement_"+str(x+1), pos6), (position_set_x, pos5, 450), (create_text_overlay, "$g_presentation_array_density_"+str(x+1), s7, tf_center_justify), (overlay_set_position, "$g_presentation_array_density_"+str(x+1), pos5), (overlay_set_size, "$g_presentation_array_density_"+str(x+1), pos6), (position_set_x, pos5, 575), (create_text_overlay, "$g_presentation_array_facing_"+str(x+1), s7, tf_center_justify), (overlay_set_position, "$g_presentation_array_facing_"+str(x+1), pos5), (overlay_set_size, "$g_presentation_array_facing_"+str(x+1), pos6), ] for x in range(0, formation_arrays) ])+[ (get_player_agent_no, ":player_agent"), (agent_get_team, ":player_team", ":player_agent"), (position_set_y, pos1, 700), (create_text_overlay, reg1, "@Battles", tf_center_justify), (position_set_x, pos1, 100), (overlay_set_position, reg1, pos1), (create_text_overlay, reg1, "@Formation", tf_center_justify), (position_set_x, pos1, 250), (overlay_set_position, reg1, pos1), (create_text_overlay, reg1, "@Action", tf_center_justify), (position_set_x, pos1, 350), (overlay_set_position, reg1, pos1), (create_text_overlay, reg1, "@Density", tf_center_justify), (position_set_x, pos1, 450), (overlay_set_position, reg1, pos1), (create_text_overlay, reg1, "@Facing", tf_center_justify), (position_set_x, pos1, 575), (overlay_set_position, reg1, pos1), (call_script, "script_update_formation_order_panel", ":player_team"), ]+concatenate_scripts([[(store_add, ":formation_pl", formation_commands_pl_begin, x), (str_store_string, s1, ":formation_pl"), (create_button_overlay, "$g_presentation_obj_"+str(x+1+3*formation_arrays), "@Form {s1}", tf_center_justify)]\ for x in range(0, formation_types) ])+[ (create_button_overlay, "$g_presentation_obj_"+str(x+1+3*formation_arrays+formation_types), formation_order_functions[x][0], tf_center_justify)\ for x in range(0, len(formation_order_functions)) ]+[ (position_set_x, pos1, 750), (position_set_y, pos1, 750), ]+[ (overlay_set_size, "$g_presentation_obj_"+str(x+1+3*formation_arrays), pos1)\ for x in range(0, formation_types) ]+[ (overlay_set_size, "$g_presentation_obj_"+str(x+1+3*formation_arrays+formation_types), pos1)\ for x in range(0, len(formation_order_functions)) ]+[ (position_set_x, pos1, 250), (position_set_y, pos1, 250), ]+concatenate_scripts([ [ (position_set_y, pos1, 250-20*x), (overlay_set_position, "$g_presentation_obj_"+str(x+1+3*formation_arrays), pos1), ] for x in range(0, formation_types) ])+[ (position_set_y, pos1, 250-20*formation_types), (overlay_set_position, "$g_presentation_obj_"+str(1+formation_types+3*formation_arrays), pos1), (position_set_x, pos1, 350), (position_set_y, pos1, 250), ]+concatenate_scripts([ [ (position_set_y, pos1, 250-20*x), (overlay_set_position, "$g_presentation_obj_"+str(x+2+formation_types+3*formation_arrays), pos1), ] for x in range(0, 11) ])+[ (position_set_x, pos1, 450), (position_set_y, pos1, 250), (overlay_set_position, "$g_presentation_obj_"+str(13+formation_types+3*formation_arrays), pos1), (position_set_y, pos1, 230), (overlay_set_position, "$g_presentation_obj_"+str(14+formation_types+3*formation_arrays), pos1), (position_set_x, pos1, 575), (position_set_y, pos1, 250), (overlay_set_position, "$g_presentation_obj_"+str(15+formation_types+3*formation_arrays), pos1), (position_set_y, pos1, 230), (overlay_set_position, "$g_presentation_obj_"+str(16+formation_types+3*formation_arrays), pos1), (get_scene_boundaries, pos2, pos3), (position_transform_position_to_local, pos4, pos2, pos3), (set_fixed_point_multiplier, 1000), (position_get_x, ":map_width", pos4), (position_get_y, ":map_height", pos4), (set_fixed_point_multiplier, 1000), (store_div, ":map_ratio", ":map_height", 100), (store_div, ":map_ratio", ":map_width", ":map_ratio"), (try_begin), (gt, ":map_ratio", 100), (assign, "$g_battle_map_width", 300), (store_div, "$g_battle_map_scale", ":map_width", "$g_battle_map_width"), (store_div, "$g_battle_map_height", ":map_height", "$g_battle_map_scale"), (else_try), (assign, "$g_battle_map_height", 300), (store_div, "$g_battle_map_scale", ":map_height", "$g_battle_map_height"), (store_div, "$g_battle_map_width", ":map_width", "$g_battle_map_scale"), (try_end), (create_image_button_overlay, "$g_battle_map_plane", "mesh_white_plane", "mesh_white_plane"), (overlay_set_color, "$g_battle_map_plane", 0), (store_add, ":map_bordered_width", "$g_battle_map_width", 20), (store_add, ":map_bordered_height", "$g_battle_map_height", 20), (store_mul, ":map_scale_x", ":map_bordered_width", 50), (store_mul, ":map_scale_y", ":map_bordered_height", 50), (position_set_x, pos1, ":map_scale_x"), (position_set_y, pos1, ":map_scale_y"), (overlay_set_size, "$g_battle_map_plane", pos1), (store_sub, ":map_pos_x", 990, ":map_bordered_width"), (store_sub, ":map_pos_y", 740, ":map_bordered_height"), (position_set_x, pos1, ":map_pos_x"), (position_set_y, pos1, ":map_pos_y"), (overlay_set_position, "$g_battle_map_plane", pos1), (overlay_set_alpha, "$g_battle_map_plane", 0x44), (position_set_x, pos1, 750), (position_set_y, pos1, 750), ]+concatenate_scripts([ [ (create_text_overlay, "$g_battle_map_array_"+str(x+1)+"_flag", "@"+str(x+1), tf_center_justify), (overlay_set_alpha, "$g_battle_map_array_"+str(x+1)+"_flag", 0), (overlay_set_size, "$g_battle_map_array_"+str(x+1)+"_flag", pos1), (overlay_set_color, "$g_battle_map_array_"+str(x+1)+"_flag", 0xFFFFFF), ] for x in range(0, formation_arrays) ])+[ (call_script, "script_update_formation_order_panel_checked_arrays"), (call_script, "script_update_formation_order_panel_statistics_and_map"), (presentation_set_duration, 999999), ]), (ti_on_presentation_event_state_change, [(store_trigger_param_1, ":object"), (store_trigger_param_2, ":value"), (get_player_agent_no, ":player_agent"), (agent_get_team, ":player_team", ":player_agent"), (try_begin), ]+concatenate_scripts([ [ (eq, ":object", "$g_presentation_obj_"+str(x+1+formation_arrays)), #(assign, ":update_listeners", 1), (try_begin), (lt, x, "$formation_max_array_no"), (party_get_slot, ":mark", formation_vector, slot_formation_array_marks_begin+x), (val_mul, ":value", ":mark"), (val_or, "$formation_array_selected", ":mark"), (val_sub, "$formation_array_selected", ":mark"), (val_add, "$formation_array_selected", ":value"), (try_end), #(try_begin), # (eq, ":value", 1), # (overlay_animate_to_alpha, "$g_presentation_obj_"+str(x+1), 250, 0x44), #(else_try), # (overlay_animate_to_alpha, "$g_presentation_obj_"+str(x+1), 250, 0), #(try_end), (call_script, "script_update_formation_order_panel_checked_arrays"), (else_try), ] for x in range(0, formation_arrays) ])+concatenate_scripts([ [ (eq, ":object", "$g_presentation_obj_"+str(x+1)), (lt, x, "$formation_max_array_no"), (party_get_slot, ":mark", formation_vector, slot_formation_array_marks_begin+x), (assign, "$formation_array_selected", ":mark"), #]+[ #(overlay_animate_to_alpha, "$g_presentation_obj_"+str(y+1), 250, 0)\ # for y in range(0, formation_arrays) if x != y #]+[ #(overlay_animate_to_alpha, "$g_presentation_obj_"+str(x+1), 250, 0x44), #(overlay_set_val, "$g_presentation_obj_"+str(x+1+formation_arrays), 1), #]+[ #(overlay_set_val, "$g_presentation_obj_"+str(y+1+formation_arrays), 0)\ # for y in range(0, formation_arrays) if x != y #]+[ (call_script, "script_update_formation_order_panel_checked_arrays"), (else_try), ] for x in range(0, formation_arrays) ])+concatenate_scripts([ [ (eq, ":object", "$g_presentation_obj_"+str(x+1+formation_arrays*3)), (call_script, "script_apply_formation_key_reaction", x), (call_script, "script_update_formation_order_panel", ":player_team"), (else_try), ] for x in range(0, formation_types) ])+concatenate_scripts([ [ (eq, ":object", "$g_presentation_obj_"+str(x+1+formation_types+formation_arrays*3)), formation_order_functions[x][1], (call_script, "script_update_formation_order_panel", ":player_team"), (else_try), ] for x in range(0, len(formation_order_functions)) ])+[ (eq, ":object", "$g_battle_map_plane"), (get_scene_boundaries, pos2, pos3), (mouse_get_position, pos1), (set_fixed_point_multiplier, 1000), (position_get_x, ":mouse_x", pos1), (position_get_y, ":mouse_y", pos1), (store_sub, ":map_x", 980, "$g_battle_map_width"), (store_sub, ":map_y", 730, "$g_battle_map_height"), (val_sub, ":mouse_x", ":map_x"), (val_sub, ":mouse_y", ":map_y"), (val_clamp, ":mouse_x", 0, "$g_battle_map_width"), (val_clamp, ":mouse_y", 0, "$g_battle_map_height"), (val_mul, ":mouse_x", "$g_battle_map_scale"), (val_mul, ":mouse_y", "$g_battle_map_scale"), (set_fixed_point_multiplier, 1000), (position_set_x, pos1, ":mouse_x"), (position_set_y, pos1, ":mouse_y"), (position_transform_position_to_parent, pos3, pos2, pos1), (copy_position, pos1, pos3), (get_player_agent_no, ":player"), (agent_get_position, pos3, ":player"), (position_copy_rotation, pos1, pos3), (call_script, "script_formation_move_to_pos_key_reaction"), (call_script, "script_update_formation_order_flags_on_map"), (call_script, "script_update_formation_order_panel", ":player_team"), (try_end), ]), (ti_on_presentation_mouse_enter_leave, [(store_trigger_param_1, ":object"), (store_trigger_param_2, ":enter_leave"), (try_begin), ]+concatenate_scripts([ [ (eq, ":object", "$g_presentation_obj_"+str(x+1)), (try_begin), (eq, ":enter_leave", 0), (overlay_animate_to_color, "$g_presentation_array_formation_"+str(x+1), 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_array_movement_"+str(x+1), 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_array_density_"+str(x+1), 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_array_facing_"+str(x+1), 250, 0xFFFFFF), (overlay_animate_to_color, "$g_presentation_obj_"+str(x+1+formation_arrays*2), 250, 0xFFFFFF), (else_try), (overlay_animate_to_color, "$g_presentation_array_formation_"+str(x+1), 250, 0), (overlay_animate_to_color, "$g_presentation_array_movement_"+str(x+1), 250, 0), (overlay_animate_to_color, "$g_presentation_array_density_"+str(x+1), 250, 0), (overlay_animate_to_color, "$g_presentation_array_facing_"+str(x+1), 250, 0), (overlay_animate_to_color, "$g_presentation_obj_"+str(x+1+formation_arrays*2), 250, 0), (try_end), (else_try), ] for x in range(0, formation_arrays) ])+[ (try_end), ]), (ti_on_presentation_run, [(store_trigger_param_1, ":cur_time"), (try_begin), ]+[ (this_or_next|key_clicked, formation_keys_list[x]) \ for x in range(0, formation_arrays) ]+[ (key_clicked, "$key_array_select_all"), #(eq, 0, 1), (call_script, "script_update_formation_order_panel_checked_arrays"), (try_end), (try_begin), ]+[ (this_or_next|key_clicked, formation_keys_list[x]) \ for x in range(formation_arrays, len(formation_keys_list)-1) ]+[ (eq, 0, 1), (get_player_agent_no, ":player_agent"), (agent_get_team, ":player_team", ":player_agent"), (call_script, "script_update_formation_order_panel", ":player_team"), (try_end), (try_begin), (gt, ":cur_time", 200), (key_clicked, "$key_formation_view_orders"), (assign, "$g_presentation_battle_formations_active", 0), (try_for_agents, ":cur_agent"), (agent_set_slot, ":cur_agent", slot_agent_map_overlay_id, 0), (try_end), (presentation_set_duration, 0), (try_end), (try_begin), (eq, "$formation_vector_active", 0), (assign, "$g_presentation_battle_formations_active", 0), (try_for_agents, ":cur_agent"), (agent_set_slot, ":cur_agent", slot_agent_map_overlay_id, 0), (try_end), (presentation_set_duration, 0), (try_end), ]), ]), # # Form Ranks Kit section end ############################## ]
Python