LSP Animations Tavern Animation Pack

Users who are viewing this thread

Somebody said:
I'm assuming itp_glove is just itp_type_hand_armor?
Code:
script_cf_chance_depending_on_hour
is referenced from the menu option but doesn't exist.
When talking to townsman/woman the dialog defaults to hiring mercenaries.

Thanks for pointing that out. itp_glove is itp_type_hand_armor, and the script call can be deleted. I fixed those in the pack and added simple dialog replacements. Link updated.
 
ive just finished a 12 hour night shift and should have been in bed over an hour ago, so its very likely. One last check before i fall asleep :smile:


edit. still not working, heres my code

Code:
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,af_override_horse,0,1,[]), #chief cambia para que quastuosa huya cuando hay problemas con borracho
     (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,[]),
     #dedal begin
	 (1,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#32
	 (2,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#33
	 (3,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#34
	 (4,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#35
	 (5,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#36
	 (6,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#37
	 (7,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#38
	 (8,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#39
	 (10,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#40
	 ],[
		dedal_tavern_animations,
		#dedal end
     ],     
     [
      (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_town),
        (try_end),
      ]),
	  		  	        
      (ti_before_mission_start, 0, 0, [], 
      [
        (call_script, "script_change_banners_and_chest"),
        (call_script, "script_initialize_tavern_variables"),
	  ]),

      (ti_inventory_key_pressed, 0, 0, 
      [
        (set_trigger_result,1)
      ], []),
      
      #tavern - belligerent drunk leaving/fading out
      (1, 0, 0, 
      [
        (gt, "$g_belligerent_drunk_leaving", 0),
        (entry_point_get_position, pos0, 0),
        (agent_get_position, pos1, "$g_belligerent_drunk_leaving"),
        (get_distance_between_positions, ":dist", pos0, pos1),
        (le, ":dist", 150),
      ],
      [
        (agent_fade_out, "$g_belligerent_drunk_leaving"),
        (assign, "$g_belligerent_drunk_leaving", 0),
      ]),
      
      (ti_tab_pressed, 0, 0, 
      [
        (try_begin),
          (eq, "$g_main_attacker_agent", 0),
          (set_trigger_result, 1),
        (try_end),  
      ], []),

	  #tavern brawl triggers - drunk
      (2, 0, 0, 
      [
	    (neg|conversation_screen_is_active),

		(eq, "$talk_context", tc_tavern_talk),
		
		(neg|troop_slot_eq, "trp_hired_assassin", slot_troop_cur_center, "$g_encountered_party"),		
		(troop_slot_eq, "trp_belligerent_drunk", slot_troop_cur_center, "$g_encountered_party"),		
		(eq, "$drunks_dont_pick_fights", 0),		
	  ], 
	  [	  
	    (try_begin),
	      (eq, "$g_start_belligerent_drunk_fight", 0),
	      (assign, "$g_start_belligerent_drunk_fight", 1),
	      
	      (try_for_agents, ":cur_agent"),
	        (agent_get_troop_id, ":cur_agent_troop", ":cur_agent"),
	        (eq, ":cur_agent_troop", "trp_belligerent_drunk"),
	        (assign, "$g_belligerent_drunk", ":cur_agent"),
	      (try_end),
	    (else_try),
	      (eq, "$g_start_belligerent_drunk_fight", 1),	 
	           
	      (agent_is_active, "$g_belligerent_drunk"),
	      (agent_is_alive, "$g_belligerent_drunk"),
	      (get_player_agent_no, ":player_agent"),
	      (agent_get_position, pos0, ":player_agent"),
	      (agent_get_position, pos1, "$g_belligerent_drunk"),
	      (get_distance_between_positions, ":dist", pos0, pos1),
	      (position_get_z, ":pos0_z", pos0),
	      (position_get_z, ":pos1_z", pos1),
	      (store_sub, ":z_difference", ":pos1_z", ":pos0_z"),
	      (try_begin),
	        (le, ":z_difference", 0),
	        (val_mul, ":z_difference", -1),
	      (try_end),
	      (store_mul, ":z_difference_mul_3", ":z_difference", 3),
	      (val_add, ":dist", ":z_difference_mul_3"),
	      (store_random_in_range, ":random_value", 0, 200),
	      (store_add, ":400_plus_random_200", 400, ":random_value"),
	      (le, ":dist", ":400_plus_random_200"),
	      
 		  (call_script, "script_activate_tavern_attackers"),
  		  (start_mission_conversation, "trp_belligerent_drunk"),
  		  (assign, "$g_start_belligerent_drunk_fight", 2),
	    (try_end),  
	  ]),
	  	  
	  #tavern brawl triggers - assassin
      (2, 0, 0, [
	    (neg|conversation_screen_is_active),
		(eq, "$talk_context", tc_tavern_talk),
		(troop_slot_eq, "trp_hired_assassin", slot_troop_cur_center, "$g_encountered_party"),		
	  ], 
	  [
	    (try_begin),
	      (eq, "$g_start_hired_assassin_fight", 0),
	      (assign, "$g_start_hired_assassin_fight", 1),
	      
	      (try_for_agents, ":cur_agent"),
	        (agent_get_troop_id, ":cur_agent_troop", ":cur_agent"),
	        (eq, ":cur_agent_troop", "trp_hired_assassin"),
	        (assign, "$g_hired_assassin", ":cur_agent"),
	      (try_end),	      
	    (else_try),  
	      (eq, "$g_start_hired_assassin_fight", 1),

	      (agent_is_active, "$g_hired_assassin"),
	      (agent_is_alive, "$g_hired_assassin"),
	      (get_player_agent_no, ":player_agent"),
	      (agent_get_position, pos0, ":player_agent"),
	      (agent_get_position, pos1, "$g_hired_assassin"),
	      (get_distance_between_positions, ":dist", pos0, pos1),
	      (position_get_z, ":pos0_z", pos0),
	      (position_get_z, ":pos1_z", pos1),
	      (store_sub, ":z_difference", ":pos1_z", ":pos0_z"),
	      (try_begin),
	        (le, ":z_difference", 0),
	        (val_mul, ":z_difference", -1),
	      (try_end),
	      (store_mul, ":z_difference_mul_3", ":z_difference", 3),
	      (val_add, ":dist", ":z_difference_mul_3"),
	      (store_random_in_range, ":random_value", 0, 200),
	      (store_add, ":400_plus_random_200", 400, ":random_value"),
	      (le, ":dist", ":400_plus_random_200"),

		  (call_script, "script_activate_tavern_attackers"),
		  (assign, "$g_start_hired_assassin_fight", 2),
		(try_end),  
	  ]),
	  	  
	  #Aftermath talks
      (3, 0, ti_once, 
      [
	    (neg|conversation_screen_is_active),
		(eq, "$talk_context", tc_tavern_talk),
		(gt, "$g_main_attacker_agent", 0),
				
		(this_or_next|neg|agent_is_alive, "$g_main_attacker_agent"),
		(agent_is_wounded, "$g_main_attacker_agent"),
      ],
      [
        (mission_enable_talk),
      
		(try_for_agents, ":agent"),
		  (agent_is_alive, ":agent"),
		  (agent_get_position, pos4, ":agent"),
		  (agent_set_scripted_destination, ":agent", pos4),
		(try_end),
		
		(party_get_slot, ":tavernkeeper", "$g_encountered_party", slot_town_tavernkeeper),
		(start_mission_conversation, ":tavernkeeper"),	 
	  ]),

	  
	  #Aftermath talks
      (3, 0, ti_once, 
      [
	    (neg|conversation_screen_is_active),
		(eq, "$talk_context", tc_tavern_talk),
		(gt, "$g_main_attacker_agent", 0),
		(main_hero_fallen),		
      ],
      [
	  (jump_to_menu, "mnu_lost_tavern_duel"),
	  (finish_mission,0)
	  
	  ]),	  
	  
	  
	  #No shooting in the tavern
      (1, 0, 0, 
      [
	    (neg|conversation_screen_is_active),
		(eq, "$talk_context", tc_tavern_talk),
		(gt, "$g_main_attacker_agent", 0),
		
		(get_player_agent_no, ":player_agent"),
		(agent_is_alive, ":player_agent"),
		
		(agent_get_wielded_item, ":wielded_item", ":player_agent", 0),
		(is_between, ":wielded_item", "itm_darts", "itm_torch"),
		(neq, ":wielded_item", "itm_javelin_melee"),
		(neq, ":wielded_item", "itm_throwing_spear_melee"),
		(neq, ":wielded_item", "itm_throwing_spear_melee"),
		(neq, ":wielded_item", "itm_gae_bolga"),
		(neq, ":wielded_item", "itm_gae_bolga_melee"),
		(neq, ":wielded_item", "itm_light_throwing_axes_melee"),
		(neq, ":wielded_item", "itm_throwing_axes_melee"),
		(neq, ":wielded_item", "itm_angon_a_melee"),
      ], 
      [
		(party_get_slot, ":tavernkeeper", "$g_encountered_party", slot_town_tavernkeeper),
		(start_mission_conversation, ":tavernkeeper"),	 
	  ]),
	  	  	  
	  #Check for weapon in hand of attacker, also, everyone gets out of the way
      (1, 0, 0, 
      [
		(gt, "$g_main_attacker_agent", 0),	
 		(agent_is_active,"$g_main_attacker_agent"),	#MOTO chief avoid invalid agent messages from script_neutral_behavior_in_fight
     ],
      [
        (agent_get_wielded_item, ":wielded_item", "$g_main_attacker_agent", 0),
        (val_max, "$g_attacker_drawn_weapon", ":wielded_item"),               
        
        (call_script, "script_neutral_behavior_in_fight"),
      ]),	  			
    ] + bodyguard_triggers, #chief bodyboard caba'drin 
  ),
 
Change this...

Code:
	 (10,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#40
	 ],[
		dedal_tavern_animations,
		#dedal end
     ],     
     [
      (1, 0, ti_once, [],

... to this:

Code:
	 (10,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#40
	 ],[
		dedal_tavern_animations,
		#dedal end
      (1, 0, ti_once, [],
 
this is fantastic :grin: :grin: :grin: :grin: :grin:! I've downloaded to my mod introduce "hispania 1200". I have observed that in the youtube video background noise heard in the tavern with many voices of people, but I have not found the files as posted. can you upload it please?  :wink:

 
Noticed that towns were getting walkers from other cultures a bit too often - here's some revised code that changes the probability of them spawning.
Code:
      (try_for_range,":entry",32,41),
          #(call_script,"script_cf_chance_depending_on_hour"),
          (party_get_slot, ":prosperity", "$current_town", slot_town_prosperity),
          (val_div, ":prosperity", 20),
          (store_random_in_range,":r",":prosperity",100),
          (gt,":r",50),#random chance of spawning
          (try_begin),
            (val_mod, ":r", 10),
            (try_begin), #1 in 10 chance, random traveller
              (eq, ":r", 0),
              (store_random_in_range,":town_walker",town_walkers_begin,town_walkers_end),
            (else_try),
              (store_random_in_range, ":r", slot_faction_town_walker_male_troop, slot_faction_village_walker_male_troop),
              (faction_get_slot, ":slot_no", "$g_encountered_party_faction", slot_faction_culture),
              (faction_get_slot, ":town_walker", ":slot_no", ":r"),
            (try_end),
            (store_random_in_range,":dna",0,1000),
            (mission_tpl_entry_clear_override_items,"mt_town_default",":entry"),
            (store_random_in_range,":r",0,10),
            (try_begin),
              (party_slot_ge, "$current_town", slot_town_has_tournament, 1),
              (val_add, ":r", 1),
            (try_end),
            (try_begin),
              (gt,":r",3),
              (mission_tpl_entry_add_override_item,"mt_town_default",":entry","itm_dedal_kufel"),
            (try_end),
            (set_visitor,":entry",":town_walker",":dna"),
          (try_end),
      (try_end),
 
Slawomir of Aaarrghh said:
Change this...

Code:
	 (10,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#40
	 ],[
		dedal_tavern_animations,
		#dedal end
     ],     
     [
      (1, 0, ti_once, [],

... to this:

Code:
	 (10,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#40
	 ],[
		dedal_tavern_animations,
		#dedal end
      (1, 0, ti_once, [],

Thanks man. I did say i was tired :smile:.
 
Very nice. It's a huge step in making the world seem a bit more interactive and alive. Especially taverns, since they're frequently visited.
Thumbs up mate. :grin:

This makes me think. Perhaps the same could be done for farmers in villagers in order to make them work in the fields instead of just wandering around aimlessly?
 
Back
Top Bottom