unique items

正在查看此主题的用户

Tooff

Squire
Hi , i want to give a unique item (horse,sword,mail,..) to the lord in his inventory,so he don`t use it ,just keep in inventory,and player can loot his unique item.
 
The player cannot loot unique items.  Im not sure how you would go about doing this.  Maybe have a script equip the troop and then add the items after the script has equipped the troop, but this doesnt guarantee a drop of the item.
 
You can have "unique" items, meaning items that aren't sold in shops, which can be looted. Just don't use either itp_merchandise or itp_unique, actually. The item won't be sold by merchants, and can be looted.

If you don't want the Lord to use it, you could possibly put a high strength requirement on the item and give the Lord less strength. Alternatively, you could modify the unique item as loot script from Band of Warriors and adapt it to have a Lord trigger the adding of an item to the loot pool.
 
HardCode 说:
You can have "unique" items, meaning items that aren't sold in shops, which can be looted. Just don't use either itp_merchandise or itp_unique, actually. The item won't be sold by merchants, and can be looted.

If you don't want the Lord to use it, you could possibly put a high strength requirement on the item and give the Lord less strength. Alternatively, you could modify the unique item as loot script from Band of Warriors and adapt it to have a Lord trigger the adding of an item to the loot pool.

Hmm, I've never seen one of these drop, is it because the abundance is 0?

["skeleton_armort", "skeleton_armor", [("skeleton_transparent",0)], itp_unique|itp_type_body_armor|itp_covers_legs ,0, 1 ,  weight(-25)|abundance(0)|head_armor(0)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_none],
 
i found in BOW module_scripts:
插入代码块:
("give_special_loot", [
    (store_script_param_1, ":party"), #Party_id

    (assign, ":total_gain", 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"),
      (store_character_level, ":level", ":stack_troop"),
      (store_mul, ":gain", ":level", ":level"),
	  (try_begin),
	      (neg|troop_is_hero, ":stack_troop"),
	      (party_stack_get_size, ":stack_size",":party",":i_stack"),
	      (store_mul, ":stack_gain", ":gain", ":stack_size"),
	  (else_try),
		  (store_mul, ":stack_gain", ":gain", 2), # heroes count twice
	  (try_end), 
      (val_add, ":total_gain", ":stack_gain"),
    (try_end),
	
	(val_div, ":total_gain", 100),
	
	(val_max, ":total_gain", 20),
	(val_sub, ":total_gain", 20),
	(assign, ":special_item_in_loot", 0),
	(store_mul, ":upper_range", "$num_unique_items_given", 250),
	(val_add, ":upper_range", 3000),
	(store_random_in_range, ":r", 0, ":upper_range"),
	(try_begin),
		(lt, ":r", ":total_gain"),
		(store_random_in_range, ":r", 0, 14),

		# First special item is always the one you can use the best
		(try_begin),
			(eq, "$num_unique_items_given", 0),
			(store_proficiency_level, ":one_handed_skill", "trp_player", wpt_one_handed_weapon),
	  		(store_proficiency_level, ":two_handed_skill", "trp_player", wpt_two_handed_weapon),
	  		(store_proficiency_level, ":polearm_skill", "trp_player", wpt_polearm),
	  		(store_proficiency_level, ":archery_skill", "trp_player", wpt_archery),
	###################################################################################
	# Modified Unique Item Drops for Band of Warriors Expanded by NCrawler
	###################################################################################
		  		(store_proficiency_level, ":firearm_skill", "trp_player", wpt_firearm),
		  		(try_begin),
		  			(ge, ":firearm_skill", ":one_handed_skill"),
		  			(ge, ":firearm_skill", ":two_handed_skill"),
		  			(ge, ":firearm_skill", ":polearm_skill"),
		  			(ge, ":firearm_skill", ":archery_skill"),
		  			(assign, ":r", 16), #rifled musket
		  		(else_try),
	###################################################################################
	# End Modified Unique Item Drops for Band of Warriors Expanded by NCrawler
	###################################################################################
			  (ge, ":archery_skill", ":one_handed_skill"),
			  (ge, ":archery_skill", ":two_handed_skill"),
			  (ge, ":archery_skill", ":polearm_skill"),
			  (assign, ":r", 15), #silver bow
			(else_try),
			  (ge, ":polearm_skill", ":one_handed_skill"),
			  (ge, ":polearm_skill", ":two_handed_skill"),
			  (assign, ":r", 7), #kushana
			(else_try),
			  (ge, ":two_handed_skill", ":one_handed_skill"),
			  (assign, ":r", 2), #durendal
			(else_try),
			  (assign, ":r", 4), #caliburn
			(try_end),
		(try_end),...
looks like you can loot if you reach some skills.
maybe it`s not all code what needs for unique items.
 
后退
顶部 底部