Skip to content

Commit

Permalink
Randomize town walker types per spawn entry, randomize initial destin…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
In-Vain committed Sep 26, 2022
1 parent 8696813 commit b76d711
Show file tree
Hide file tree
Showing 4 changed files with 603 additions and 598 deletions.
77 changes: 41 additions & 36 deletions ModuleSystem/module_scripts.py
Expand Up @@ -14138,37 +14138,46 @@ def set_item_score():
(this_or_next|eq, "$current_town", "p_town_east_osgiliath"), # walkers there in osgiliaths
(this_or_next|eq, "$current_town", "p_town_cair_andros"), # walkers there in osgiliaths
(neq, "$g_defending_against_siege", 0), # walkers there when siege
(try_for_range, ":walker_no", 0, num_town_walkers),
(store_add, ":troop_slot", slot_center_walker_0_troop, ":walker_no"),
(try_begin),
(eq, "$g_defending_against_siege", 0),
(party_get_slot, ":walker_troop_id", "$current_town", ":troop_slot"),
(else_try),
# TODO: put military walkers when siege
(party_get_slot, ":walker_troop_id", "$current_town", ":troop_slot"),
(try_end),
(gt, ":walker_troop_id", 0),
(store_add, ":entry_no", town_walker_entries_start, ":walker_no"),
(try_begin), ## Kham Edit for more town walkers!
(this_or_next|is_between, "$current_town", isengard_mordor_centers_begin, isengard_mordor_centers_end),
(this_or_next|is_between, "$current_town", moria_centers_begin, moria_centers_end),
( is_between, "$current_town", gundabad_centers_begin, gundabad_centers_end),
(set_visitors, ":entry_no", ":walker_troop_id",6), #entry points 32-39
(else_try),
(this_or_next|eq, "$current_town", "p_town_woodelf_camp"),
(this_or_next|eq, "$current_town", "p_town_thranduils_halls"),
(this_or_next|eq, "$current_town", "p_town_woodelf_west_camp"),
(this_or_next|eq, "$current_town", "p_town_caras_galadhon"),
(this_or_next|eq, "$current_town", "p_town_cerin_dolen"),
(this_or_next|eq, "$current_town", "p_town_cerin_amroth"),
(this_or_next|eq, "$current_town", "p_town_thranduils_halls"),
( eq, "$current_town", "p_town_henneth_annun"),
#( eq, "$current_town", "p_town_imladris_camp"), #Enough space for lots of walkers
(set_visitors, ":entry_no", ":walker_troop_id",1),
(else_try),
(set_visitors, ":entry_no", ":walker_troop_id",4),
(try_end), ## Kham Edit for more town walkers! - END

(try_begin), ## Kham Edit for more town walkers!
(this_or_next|is_between, "$current_town", isengard_mordor_centers_begin, isengard_mordor_centers_end),
(this_or_next|is_between, "$current_town", moria_centers_begin, moria_centers_end),
( is_between, "$current_town", gundabad_centers_begin, gundabad_centers_end),
#(set_visitors, ":entry_no", ":walker_troop_id",6), #entry points 32-39
(assign, ":num_walkers", 7),
(else_try),
(this_or_next|eq, "$current_town", "p_town_woodelf_camp"),
(this_or_next|eq, "$current_town", "p_town_thranduils_halls"),
(this_or_next|eq, "$current_town", "p_town_woodelf_west_camp"),
(this_or_next|eq, "$current_town", "p_town_caras_galadhon"),
(this_or_next|eq, "$current_town", "p_town_cerin_dolen"),
(this_or_next|eq, "$current_town", "p_town_cerin_amroth"),
(this_or_next|eq, "$current_town", "p_town_thranduils_halls"),
( eq, "$current_town", "p_town_henneth_annun"),
#( eq, "$current_town", "p_town_imladris_camp"), #Enough space for lots of walkers
#(set_visitors, ":entry_no", ":walker_troop_id",1),
(assign, ":num_walkers", 2),
(else_try),
#(set_visitors, ":entry_no", ":walker_troop_id",4),
(assign, ":num_walkers", 5),
(try_end), ## Kham Edit for more town walkers! - END

(try_for_range, ":entry_no", town_walker_entries_start, 40),
(try_for_range, ":unused", 0, ":num_walkers"),
(store_random_in_range, ":walker_no", 0, num_town_walkers),
(store_add, ":troop_slot", slot_center_walker_0_troop, ":walker_no"),
(try_begin),
(eq, "$g_defending_against_siege", 0),
(party_get_slot, ":walker_troop_id", "$current_town", ":troop_slot"),
(else_try),
# TODO: put military walkers when siege
(party_get_slot, ":walker_troop_id", "$current_town", ":troop_slot"),
(try_end),
(gt, ":walker_troop_id", 0),
(set_visitor, ":entry_no", ":walker_troop_id"),
(try_end),
(try_end),

(try_end),
]),

Expand Down Expand Up @@ -14284,12 +14293,8 @@ def set_item_score():
(is_between, ":entry",town_walker_entries_start,40),
(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),
(store_random_in_range, ":i_e_p", town_walker_entries_start, 40),#Entry points
(agent_set_slot, ":cur_agent", 0, ":i_e_p"),
(call_script, "script_set_town_walker_destination", ":cur_agent"),
(try_end),
]),
Expand Down
4 changes: 2 additions & 2 deletions _wb/scripts.txt
Expand Up @@ -453,13 +453,13 @@ cf_center_get_free_walker -1
center_remove_walker_type_from_walkers -1
7 23 2 1224979098644774912 1 23 2 1224979098644774913 2 6 3 1224979098644774914 0 8 2120 3 1224979098644774915 180 1224979098644774914 541 3 1224979098644774912 1224979098644774915 1224979098644774913 1 4 223 1224979098644774912 1224979098644774914 0 3 0
init_town_walkers -1
36 4 0 1073741855 2 144115188075856050 0 1073741855 2 144115188075856029 27 1073741855 2 144115188075856029 41 1073741855 2 144115188075856029 29 2147483679 2 144115188075856048 0 6 3 1224979098644774912 0 8 2120 3 1224979098644774913 160 1224979098644774912 4 0 31 2 144115188075856048 0 521 3 1224979098644774914 144115188075856029 1224979098644774913 5 0 521 3 1224979098644774914 144115188075856029 1224979098644774913 3 0 32 2 1224979098644774914 0 2120 3 1224979098644774915 32 1224979098644774912 4 0 1073741857 3 144115188075856029 38 47 1073741857 3 144115188075856029 56 58 33 3 144115188075856029 70 76 1264 3 1224979098644774915 1224979098644774914 6 5 0 1073741855 2 144115188075856029 51 1073741855 2 144115188075856029 50 1073741855 2 144115188075856029 52 1073741855 2 144115188075856029 47 1073741855 2 144115188075856029 48 1073741855 2 144115188075856029 49 1073741855 2 144115188075856029 50 31 2 144115188075856029 28 1264 3 1224979098644774915 1224979098644774914 1 5 0 1264 3 1224979098644774915 1224979098644774914 4 3 0 3 0 3 0
39 4 0 1073741855 2 144115188075856050 0 1073741855 2 144115188075856029 27 1073741855 2 144115188075856029 41 1073741855 2 144115188075856029 29 2147483679 2 144115188075856048 0 4 0 1073741857 3 144115188075856029 38 47 1073741857 3 144115188075856029 56 58 33 3 144115188075856029 70 76 2133 2 1224979098644774912 7 5 0 1073741855 2 144115188075856029 51 1073741855 2 144115188075856029 50 1073741855 2 144115188075856029 52 1073741855 2 144115188075856029 47 1073741855 2 144115188075856029 48 1073741855 2 144115188075856029 49 1073741855 2 144115188075856029 50 31 2 144115188075856029 28 2133 2 1224979098644774912 2 5 0 2133 2 1224979098644774912 5 3 0 6 3 1224979098644774913 32 40 6 3 1224979098644774914 0 1224979098644774912 2136 3 1224979098644774915 0 8 2120 3 1224979098644774916 160 1224979098644774915 4 0 31 2 144115188075856048 0 521 3 1224979098644774917 144115188075856029 1224979098644774916 5 0 521 3 1224979098644774917 144115188075856029 1224979098644774916 3 0 32 2 1224979098644774917 0 1263 2 1224979098644774913 1224979098644774917 3 0 3 0 3 0
cf_enter_center_location_bandit_check -1
47 2147483679 2 144115188075856050 0 561 3 144115188075856029 149 1 31 2 144115188075856048 0 31 2 144115188075856031 0 521 3 1224979098644774912 144115188075856029 10 1911 1 6 1261 1 1224979098644774912 1262 0 521 3 1224979098644774913 144115188075856029 149 1561 3 1224979098644774914 1224979098644774913 0 2171 2 1224979098644774915 0 2133 2 1224979098644774916 1 2133 2 144115188075856335 0 4 0 32 2 1224979098644774915 12 2136 3 1224979098644774917 0 100 2147483678 2 1224979098644774917 1224979098644774915 2133 2 1224979098644774916 3 5 0 32 2 1224979098644774915 6 2136 3 1224979098644774917 0 100 2147483678 2 1224979098644774917 1224979098644774915 2133 2 1224979098644774916 2 3 0 2105 2 144115188075856335 1224979098644774916 1264 3 30 1224979098644774913 1224979098644774916 4 0 32 2 1224979098644774915 3 2133 2 1224979098644774916 1 4 0 32 2 1224979098644774915 15 2136 3 1224979098644774917 0 100 2147483678 2 1224979098644774917 1224979098644774915 2133 2 1224979098644774916 3 5 0 32 2 1224979098644774915 9 2136 3 1224979098644774917 0 100 2147483678 2 1224979098644774917 1224979098644774915 2133 2 1224979098644774916 2 3 0 1264 3 31 1224979098644774914 1224979098644774916 2105 2 144115188075856335 1224979098644774916 3 0 2133 2 144115188075856028 1 1106 2 1585267068834415039 4294910498 1910 1 1224979098644774912 2048 0
init_town_agent -1
39 23 2 1224979098644774912 1 1718 2 1224979098644774913 1224979098644774912 2124 1 100 2133 2 1224979098644774914 -1 4 0 33 3 1224979098644774913 614 693 4 0 1506 2 1224979098644774915 1224979098644774913 31 2 1224979098644774915 0 1740 2 1224979098644774912 444 5 0 1740 2 1224979098644774912 444 3 0 5 0 1073741855 2 1224979098644774913 530 31 2 1224979098644774913 532 2133 2 1224979098644774914 497 5 0 31 2 1224979098644774913 540 31 2 144115188075856029 50 2133 2 1224979098644774914 497 5 0 31 2 1224979098644774913 543 31 2 144115188075856029 70 2133 2 1224979098644774914 497 5 0 33 3 1224979098644774913 529 614 2133 2 1224979098644774914 446 5 0 33 3 1224979098644774913 25 454 2133 2 1224979098644774914 444 3 0 4 0 30 2 1224979098644774914 0 1741 2 1224979098644774912 1224979098644774914 1740 2 1224979098644774912 1224979098644774914 2136 3 1224979098644774916 0 100 1743 2 1224979098644774912 1224979098644774916 3 0
init_town_walker_agents -1
14 2133 2 1224979098644774912 0 12 1 1224979098644774913 1717 2 1224979098644774914 1224979098644774913 33 3 1224979098644774914 32 40 2105 2 1224979098644774912 1 1710 2 1 1224979098644774913 6 3 1224979098644774915 9 40 1780 2 2 1224979098644774915 710 3 1224979098644774916 1 2 2147483678 2 1224979098644774916 200 505 3 1224979098644774913 0 1224979098644774915 3 0 1 2 232 1224979098644774913 3 0
10 2133 2 1224979098644774912 0 12 1 1224979098644774913 1717 2 1224979098644774914 1224979098644774913 33 3 1224979098644774914 32 40 2105 2 1224979098644774912 1 1710 2 1 1224979098644774913 2136 3 1224979098644774915 32 40 505 3 1224979098644774913 0 1224979098644774915 1 2 232 1224979098644774913 3 0
agent_get_town_walker_details -1
10 23 2 1224979098644774912 1 1717 2 1224979098644774913 1224979098644774912 2121 3 1224979098644774914 1224979098644774913 32 2120 3 1224979098644774915 180 1224979098644774914 521 3 1224979098644774916 144115188075856029 1224979098644774915 2120 3 1224979098644774917 170 1224979098644774914 521 3 1224979098644774918 144115188075856029 1224979098644774917 2133 2 72057594037927936 1224979098644774916 2133 2 72057594037927937 1224979098644774918 2133 2 72057594037927938 1224979098644774914
tick_town_walkers -1
Expand Down

0 comments on commit b76d711

Please sign in to comment.