Editing Arena Weapons

正在查看此主题的用户

状态
不接受进一步回复。

Nordmann

Sergeant Knight
As the thread title says, is it possible to remove a weapon or weapons from an arena?

Thanks in advance.
 
like tournaments or arenas? though i think both are similar but for tournaments i personally know you need to edit the module mission templates.py. in fear of leading you astray as my knowledge of the module system is still novice level, ill wait till wiser heads reply.
 
No, those tournament templates are overriden by script_set_items_for_tournament. Those are vestigial equipment from the days when you talked to the tournament master to start/bet/watch fights. Same with the slots slot_town_arena_melee_mission_tpl through slot_town_arena_melee_cur_tier.

插入代码块:
      (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_script_param, ":shield_item", 11),
      (store_script_param, ":horse_item", 12),
      (store_add, ":total_chance", ":sword_chance", ":axe_chance"),
      (val_add, ":total_chance", ":crossbow_sword_chance"),
	  
	  #we pull some items out of a hat.
	  (party_get_slot, ":town_original_faction", "$current_town", slot_center_original_faction),
	  (item_get_slot, ":sword_item", itp_type_one_handed_wpn, ":town_original_faction"),
	  (item_get_slot, ":twohand_item", itp_type_two_handed_wpn, ":town_original_faction"),
	  # (try_begin),
	    # (eq, ":two_handed_item", -1),
		# (assign, ":two_handed_item", "itm_arena_sword_two_handed"),
	  # (try_end),
	  (item_get_slot, ":polearm_item", itp_type_polearm, ":town_original_faction"),
	  (try_begin),
		(item_get_slot, ":polearm_alt", ":polearm_item", slot_item_positions_begin),
		(try_begin),
			(gt, ":polearm_alt", 0),
			(assign, ":polearm_item", ":polearm_alt"),
		(try_end),
	  (try_end),
	  (assign, "$g_attacker_drawn_weapon", ":polearm_item"),
	  
	  (item_get_slot, ":bow_item", itp_type_bow, ":town_original_faction"),#no crossbow
	  (try_begin),
		(eq, ":bow_item", -1),
		(assign, ":bow_item", "itm_practice_bow"),
	  (try_end),	  
	  (item_get_slot, ":thrown_item", itp_type_thrown, ":town_original_faction"),
	  (try_begin),
		(eq, ":thrown_item", -1),
		(assign, ":thrown_item", "itm_practice_javelin"),
	  (try_end),	  
	  (item_get_slot, ":gun_item", itp_type_musket, ":town_original_faction"),
	  (try_begin),
		(eq, ":gun_item", -1),
		(assign, ":gun_item", "itm_practice_firearm"),
	  (try_end),
	  #got all items
      (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", ":horse_item"),		  
        (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"),
	  #(mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_mail_mittens"),
        (else_try),
          (store_add, ":cur_total_chance", ":total_chance", ":bow_chance"),
	  #(mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_leather_gloves"),
        (try_end),
	 #arbitrary gloves are no longer necessary since they are no longer overriden
        (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", ":sword_item"),
            (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", ":shield_item"),
          (else_try),
            (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", ":twohand_item"),
          (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_arena_axe"),
          (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", ":shield_item"),
        (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", ":sword_item"),
          (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", ":gun_item"),
          (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_cartridges"),
        (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", ":bow_item"),
          (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_practice_arrows"),
          (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_dagger"),
        (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", ":polearm_item"),
          (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_practice_mace"),
          (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", ":shield_item"),
        (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", ":thrown_item"),
          (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", ":thrown_item"),		  
          (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", ":shield_item"),
          (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_arena_sword"),
        (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", ":bow_item"),
          (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", "itm_practice_arrows"),
          (mission_tpl_entry_add_override_item, "mt_arena_melee_fight", ":i_ep", ":sword_item"),
        (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),
     ]),

The stuff between comments about pulling items out of a hat are some items which I've set up for each faction. They also double as tournament awards and a bunch of other useful stuff, such as custom troop equipment and duel items. You can assign your own items here, or add them as parameters.

The armor and helmet items are set up so that the entry point for each team gets the same equipment, and then the items are incremented by one for the next team. By default they are color-coded red, green, blue, yellow.

Also, I've changed/added a few parameters. Crossbow chances for example are now used as guns. In addition, the same horse and shields are used as extra parameters. However, you then run into the problems of proper identification, since most shields will display heraldics. As you may have noticed, they are always set to those of the town owner. We solve this problem by doing the following:

插入代码块:
..........
  (eq, "$g_mt_mode", abm_tournament),
  (neg|troop_is_hero, ":troop_no"),#not a hero				
  (agent_get_team, ":team", ":agent_no"),				
  (store_add, ":banner_mesh", ":team", "mesh_banners_default_b"),
(else_try), #can't find party, this can be a town guard
  (neq, ":troop_no", "trp_player"),

Next you'll want to get the corresponding coloured meshes. Fortunately the default banners suffice, but their order must be changed.
插入代码块:
  #get arena team (rgby) = default_banner_(bdca)  
  ("banners_default_b", 0, "banners_default_b", 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_c", 0, "banners_default_c", 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_e", 0, "banners_default_e", 0, 0, 0, -90, 0, 0, 1, 1, 1),

And you'll want to change the following in mno_tournament_join_next_fight:
Move (assign, "$g_mt_mode", abm_tournament),
        (set_jump_mission, "mt_arena_melee_fight"),
Above (assign, ":cur_slot", 0), otherwise the troops will be set before the banners are.

Next you should probably change the script calls, since you probably altered the parameters.
(call_script, "script_set_items_for_tournament", 0, 0, 50, 0, 0, 0, 0, 30, "itm_swadian_cloth1", "itm_hat1", "itm_tab_shield_heater_a", -1),
Note that the horse item (our last parameter) is 0 since the chance of horses (our first parameter after the script) is 0.

Finally, you might want to modify the mission_template itself. It is under arena_melee_fight, whereas its triggers are part of tournament_triggers at the top. Comment out (call_script, "script_change_banners_and_chest"), just to be safe, and change the equipment override for the next 32 slots here (1,mtef_visitor_source|mtef_team_0,af_override_all,aif_start_alarmed,1,[itm_heavy_practice_sword, itm_arena_tunic_red]), so that it doesn't override gloves. Open up header_mission_templates, and either remove af_override_gloves from af_override_all_but_horse, or make a separate one (call it af_override_tournament) after that equal to  af_override_all - af_override_gloves.

As for the arena fights, those are the few entry points in the same mission template from 32 to 40. As you can see, they only come with weapons and no armor, so that's why you spawn naked. You can arbitrarily change the setup here. Alternatively, you can modify af_override_all so that all the troops equipment are used or something. Note however that the arena_training_fighter_1 through 10 that are spawned don't have any weapon or armor at all. Look for triggers with abm_training to change the troops, etc.
 
状态
不接受进一步回复。
后退
顶部 底部