• Please note that we've updated the Mount & Blade II: Bannerlord save file system which requires you to take certain steps in order for your save files to be compatible with e1.7.1 and any later updates. You can find the instructions here.

[DERS]Kendi Krallığın Askerlerini Oluşturma

Users who are viewing this thread

RoadWarriror

Master Knight
WBNWWF&S
Merhaba arkadaşlar bu benim ilk dersim :grin: ben bu kodu kendi moduma eklemeyi çok istiyordum ama bir türlü bulamıyordum forumun her yerine baktım ingilizcemde zayıf olduğu için pek anlayamıyordum ama tesadüf eseri yabancı forumda gezinirken Bu bölümü gördüm biraz araştırınca sonunda buldum ve moduma ekledim biraz düşününce bu kodu arayıp da bulmayanlar bulsalar bile ekleyemeyenler vardır diye bu dersi oluşturdum umarım yararlı olur size :grin:

Hadi başlayalım
İlk olarak module_constant.py de item slots un üstüne şu kodu yapıştırın
Code:
## ZZ Custom Kingdom Troops begin
slot_item_difficulty                = 101
slot_item_weight                    = 102
slot_item_price                     = 103
slot_custom_troop_wage              = 313
slot_custom_troop_weight            = 314
slot_custom_troop_ap                = 315
slot_custom_troop_sp                = 316
slot_custom_troop_wp                = 317
custom_troop_begin = "trp_kingdom_recruit"
custom_troop_end = "trp_array_a"
## ZZ Custom Kingdom Troops end

Sonrada module_factions.py de culture_6 nın altına şu kodu ekleyin
Code:
## ZZ Custom Kingdom Troops begin
  ("culture_player",  "{!}culture_7", 0, 0.9, [], []),
## ZZ Custom Kingdom Troops end

Ardından en alta şu kodu ekleyin
Code:
## ZZ Custom Kingdom Troops begin
  ("troop_name_temp_1",  "{!}", 0, 0.9, [], []),
  ("troop_name_temp_2",  "{!}", 0, 0.9, [], []),
  ("troop_name_temp_3",  "{!}", 0, 0.9, [], []),
  ("troop_name_temp_4",  "{!}", 0, 0.9, [], []),
  ("troop_name_temp_5",  "{!}", 0, 0.9, [], []),
  ("troop_name_temp_6",  "{!}", 0, 0.9, [], []),
  ("troop_name_temp_7",  "{!}", 0, 0.9, [], []),
  ("troop_name_temp_8",  "{!}", 0, 0.9, [], []),
  ("troop_name_temp_9",  "{!}", 0, 0.9, [], []),
  ("troop_name_temp_10",  "{!}", 0, 0.9, [], []),
## ZZ Custom Kingdom Troops end

Şimdi module_meshes in en altına şu kodu ekleyin
Code:
  ## ZZ Custom Kingdom Troops begin
  ("troop_info_win_1", 0, "troop_info_win_1", 0, 0, 0, 0, 0, 0, 1, 1, 1),
  ("troop_info_win_2", 0, "troop_info_win_2", 0, 0, 0, 0, 0, 0, 1, 1, 1),
  ("button1_up", 0, "button1_up", 0, 0, 0, 0, 0, 0, 1, 1, 1),
  ("button1_down", 0, "button1_down", 0, 0, 0, 0, 0, 0, 1, 1, 1),  
  ## ZZ Custom Kingdom Troops end

Sıra geldi module_game_menus e ("action_rename_kingdom diye aratın ve altına bunu ekleyin
Code:
## ZZ Custom Kingdom Troops begin
      ("action_promote_kingdom_custom_troop",
       [
         (faction_slot_eq, "fac_player_supporters_faction", slot_faction_state, sfs_active),
         (faction_slot_eq, "fac_player_supporters_faction", slot_faction_leader, "trp_player"),
         ],"Promote your kingdom custom troop.",
       [(start_presentation, "prsnt_custom_kingdom_troop"), 
        ]
       ),	   
## ZZ Custom Kingdom Troops end

böyle gözükmeli :smile:
Code:
      ("action_rename_kingdom",
       [
         (eq, "$players_kingdom_name_set", 1),
         (faction_slot_eq, "fac_player_supporters_faction", slot_faction_state, sfs_active),
         (faction_slot_eq, "fac_player_supporters_faction", slot_faction_leader, "trp_player"),
         ],"Rename your kingdom.",
       [(start_presentation, "prsnt_name_kingdom"),
        ]
       ),

## ZZ Custom Kingdom Troops begin
      ("action_promote_kingdom_custom_troop",
       [
         (faction_slot_eq, "fac_player_supporters_faction", slot_faction_state, sfs_active),
         (faction_slot_eq, "fac_player_supporters_faction", slot_faction_leader, "trp_player"),
         ],"Promote your kingdom custom troop.",
       [(start_presentation, "prsnt_custom_kingdom_troop"), 
        ]
       ),	   
## ZZ Custom Kingdom Troops end

Şimdi module_troops u açın ["relative_of_merchants_end diye aratın ve altındaki ] den önce bunu ekleyin
Code:
## ZZ Custom Kingdom Troops begin
  ["kingdom_temp","Kingdom Temp","Kingdom Temps",tf_guarantee_all,0,0,fac_neutral,[],str_10|agi_10|int_10|cha_10|level(4),wp(0),0,swadian_face_younger_1, swadian_face_middle_2],#420 #2
  ["kingdom_recruit","Kingdom Recruit","Kingdom Recruits",tf_guarantee_all,0,0,fac_neutral,[],str_10|agi_10|int_10|cha_10|level(4),wp(0),0,swadian_face_younger_1, swadian_face_middle_2],#420 #2
  ["kingdom_militia","Kingdom Militia","Kingdom Militia",tf_guarantee_all,0,0,fac_neutral,[],str_10|agi_10|int_10|cha_10|level(9),wp(0),0,swadian_face_young_1, swadian_face_old_2],#525 #3
  ["kingdom_footman","Kingdom Footman","Kingdom Footmen",tf_guarantee_all,0,0,fac_neutral,[],str_10|agi_10|int_10|cha_10|level(14),wp(0),0,swadian_face_young_1, swadian_face_old_2],#600 #10
  ["kingdom_infantry","Kingdom Infantry","Kingdom Infantries",tf_guarantee_all,0,0,fac_neutral,[],str_10|agi_10|int_10|cha_10|level(20),wp(0),0,swadian_face_middle_1, swadian_face_old_2],#740 #14
  ["kingdom_sergeant","Kingdom Sergeant","Kingdom Sergeants",tf_guarantee_all,0,0,fac_neutral,[],str_10|agi_10|int_10|cha_10|level(25),wp(0),0,swadian_face_middle_1, swadian_face_older_2],#900 #20
  ["kingdom_skirmisher","Kingdom Skirmisher","Kingdom Skirmishers",tf_guarantee_all,0,0,fac_neutral,[],str_10|agi_10|int_10|cha_10|level(14),wp(0),0,swadian_face_young_1, swadian_face_middle_2],#600 #10
  ["kingdom_crossbowman","Kingdom Crossbowman","Kingdom Crossbowmen",tf_guarantee_all,0,0,fac_neutral,[],str_10|agi_10|int_10|cha_10|level(20),wp(0),0,swadian_face_young_1, swadian_face_old_2],#740 #14
  ["kingdom_sharpshooter","Kingdom Sharpshooter","Kingdom Sharpshooters",tf_guarantee_all,0,0,fac_neutral,[],str_10|agi_10|int_10|cha_10|level(25),wp(0),0,swadian_face_middle_1, swadian_face_older_2],#900 #20
  ["kingdom_man_at_arms","Kingdom Man at Arms","Kingdom Men at Arms",tf_guarantee_all,0,0,fac_neutral,[],str_10|agi_10|int_10|cha_10|level(20),wp(0),0,swadian_face_middle_1, swadian_face_old_2],#740 #14
  ["kingdom_knight","Kingdom Knight","Kingdom Knights",tf_guarantee_all,0,0,fac_neutral,[],str_10|agi_10|int_10|cha_10|level(25),wp(0),0,swadian_face_middle_1, swadian_face_older_2], #900 #20  

  ["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],
  ["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],
  ["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],
  ["array_d","{!}temp_array_d","{!}temp_array_d",tf_hero|tf_inactive, 0,reserved,  fac_neutral,[],def_attrib|level(18),wp(60),knows_common, 0],

  ["kingdom_inventory","{!}na","{!}na",0,0,0,fac_neutral,[itm_velvet],def_attrib|level(1),wp(60),knows_common|knows_inventory_management_10,swadian_face_middle_1, swadian_face_older_2],
  ["copy_inventory","{!}copy_inventory","{!}copy_inventory",tf_hero|tf_inactive, 0,reserved,  fac_neutral,[],def_attrib|level(18),wp(60),knows_common|knows_inventory_management_10, 0],
## ZZ Custom Kingdom Troops end

Sonra module troopsun en altına bunu ekleyin
Code:
## ZZ Custom Kingdom Troops begin
upgrade(troops,"kingdom_recruit","kingdom_militia")
upgrade2(troops,"kingdom_militia","kingdom_footman","kingdom_skirmisher")
upgrade2(troops,"kingdom_footman","kingdom_man_at_arms","kingdom_infantry")
upgrade(troops,"kingdom_infantry","kingdom_sergeant")
upgrade(troops,"kingdom_skirmisher","kingdom_crossbowman")
upgrade(troops,"kingdom_crossbowman","kingdom_sharpshooter")
upgrade(troops,"kingdom_man_at_arms","kingdom_knight")
## ZZ Custom Kingdom Troops end

Şimdi ise module_simple_triggers in en altındaki ] den önce bunu ekleyin
Code:
## ZZ Custom Kingdom Troops begin
    (0,
    [
      (map_free),
      (troop_get_inventory_slot, ":item", "trp_kingdom_inventory", 10),
      (eq,":item","itm_velvet"), 
      (try_for_range, ":troop", custom_troop_begin,  custom_troop_end),
		(store_sub,":slot_offset",":troop",custom_troop_begin),	
		(val_mul,":slot_offset",10),	
		(try_for_range, ":i_slot", 0, 9),
			(store_add,":slot_no",":i_slot",":slot_offset"),		
			(troop_get_slot,":item", "trp_kingdom_inventory", ":slot_no"),
			(gt,":item",0),
			(troop_set_inventory_slot,":troop", ":i_slot",":item"),
		(try_end),
	  (try_end),
      (try_for_range, ":troop", custom_troop_begin,  custom_troop_end),
          (store_sub,":offset",":troop","trp_kingdom_recruit"),
          (store_add,":faction_troop_name","fac_troop_name_temp_1",":offset"),
          (str_store_faction_name,s2,":faction_troop_name"),
	  (troop_set_name, ":troop", s2),
	  (troop_set_plural_name, ":troop", s2),
	  (try_end),      
      (troop_clear_inventory, "trp_kingdom_inventory"),
    ]
  ),
  
(24,[
      (try_for_range, ":center_no", centers_begin, centers_end),
        (store_faction_of_party, ":now_faction", ":center_no"),
        (faction_get_slot, ":culture", ":now_faction", slot_faction_culture),
        (party_set_slot, ":center_no", slot_center_culture,  ":culture"),
      (try_end),
]),  
## ZZ Custom Kingdom Troops end

Sıkın dişinizi az kaldı :grin: :grin: şimdi ise module_strings.py i açın ve en atta ] önce şu kodu yapıştırın
Code:
## ZZ Custom Kingdom Troops begin
("firearm", "Firearm: {reg35}"),  
("throwing", "Throwing: {reg34}"),
("crossbow", "Crossbow: {reg33}"),  
("archery", "Archery: {reg32}"),
("polearm", "Polearm: {reg31}"),
("two_handed_weapon", "Two Handed Weapon: {reg30}"),  
("one_handed_weapon", "One Handed Weapon: {reg29}"),
("trade", "Trade"),
("leadership", "Leadership"),
("prisoner_management", "Prisoner Management"),
("persuasion", "Persuasion"),
("engineer", "Engineer"),
("first_aid", "First Aid"),
("surgery", "Surgery"),
("wound_treatment", "Wound Treatment"),
("inventory_management", "Inventory Management"),
("spotting", "Spotting"),
("pathfinding", "Pathfinding"),
("tactics", "Tactics"),
("tracking", "Tracking"),
("trainer", "Trainer"),
("looting", "Looting"),
("horse_archery", "Horse Archery"),
("riding", "Riding"),
("athletics", "Athletics"),
("shield", "Shield"),
("weapon_master", "Weapon Master"),
("power_draw", "Power Draw"),
("power_throw", "Power Throw"),
("power_strike", "Power Strike"),
("ironflesh", "Ironflesh"),
("cha", "CHA: {reg4}"), 
("int", "INT: {reg3}"),
("agi", "AGI: {reg2}"),
("str", "STR: {reg1}"),

("reg5", "{reg5}"),
("reg6", "{reg6}"),
("reg7", "{reg7}"),
("reg8", "{reg8}"),
("reg9", "{reg9}"),
("reg10", "{reg10}"),
("reg11", "{reg11}"),
("reg12", "{reg12}"),
("reg13", "{reg13}"),
("reg14", "{reg14}"),
("reg15", "{reg15}"),
("reg16", "{reg16}"),
("reg17", "{reg17}"),
("reg18", "{reg18}"),
("reg19", "{reg19}"),
("reg20", "{reg20}"),
("reg21", "{reg21}"),
("reg22", "{reg22}"),
("reg23", "{reg23}"),
("reg24", "{reg24}"),
("reg25", "{reg25}"),
("reg26", "{reg26}"),
("reg27", "{reg27}"),
("reg28", "{reg28}"),
 
("explanation_strength", "Strength: Every point adds +1 ^to hit points.The following ^skills can not be developed beyond ^1/3 of Strength: ironflesh, ^Power-strike, Power-throw, ^Power-draw."), 
("explanation_agility", "Agility: Each point gives five ^weapon points and slightly ^increases movement speed. ^The following skills can not be ^developed beyond 1/3 of Agility: ^weapon-master, Shield, ^Athletics, Riding, Horse ^archery, Looting."),
("explanation_intelligence", "Intelligence: Every point to ^intelligence immediately gives one ^extra skill point. The following ^skills can not be developed beyond ^1/3 of Intelligence: Trainer, Tracking, ^Tactics, Path finding, Spotting, ^Inventory Management, Wound treatment, ^Surgery, First-aid, Engineer, Persuasion."),
("explanation_charisma", "Charisma: Each point increases ^your party size limit by +1. ^The following skills can not be ^developed beyond 1/3 of Charisma: ^Prisoner Management, Leadership, Trade."),
("explanation_ironflesh", "Each point to this skill increases ^hit points by +2. ^(Personal skill)"),
("explanation_power_strike", "Each point to this skill increases ^melee damage by 8%%. ^(Personal skill)"),
("explanation_power_throw", "Each point to this skill increases ^throwing damage by 10%%. ^(Personal skill)"),
("explanation_power_draw", "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)"),
("explanation_weapon_master", "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)"),
("explanation_shield", "Reduces damage to shields ^(by 8%% per skill level) and ^improves shield speed and coverage. ^(Personal skill)"),
("explanation_athletics", "Improves your running speed. ^(Personal skill)"),
("explanation_riding", "Enables you to ride horses of ^higher difficulty levels and increases ^your riding speed and manuever. ^(Personal skill)"),
("explanation_horse_archery", "Reduces damage and accuracy penalties ^for archery and throwing from horseback. ^(Personal skill)"),
("explanation_looting", "This skill increases the amount of ^loot obtained by 10%% per skill level. ^(Party skill)"),
("explanation_trainer", "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)"),
("explanation_tracking", "Tracks become more informative. ^(Party skill)"),
("explanation_tactics", "Every two levels of this skill ^increases starting battle advantage by 1. ^(Party skill)"),
("explanation_pathfinding", "Party map speed is increased ^by 3%% per skill level. ^(Party skill)"),
("explanation_spotting", "Party seeing range is increased ^by 10%% per skill level. ^(Party skill)"),
("explanation_inventory_management", "Increases inventory capacity ^by +6 per skill level. ^(Leader skill)"),
("explanation_wound_treatment", "Party healing speed is increased ^by 20%% per level of this skill. ^(Party skill)"),
("explanation_surgery", "Each point to this skill ^gives a 4%% chance that ^a mortally struck party member ^will be wounded rather than killed. ^(Party skill)"),
("explanation_first_aid", "Heroes regain 5%% per skill level ^of hit-points lost during mission. ^(Party skill)"),
("explanation_engineer", "This skill allows you to ^construct siege equipment and ^fief improvements more efficiently. ^(Party skill)"),
("explanation_persuasion", "This skill helps you ^make other people accept your point of view. ^It also lowers the minimum level of relationship ^needed to get NPCs to do what you want. ^(Personal skill)"),
("explanation_prisoner_management", "Every level of this skill ^increases maximum number of prisoners by %d. ^(Leader skill)"),
("explanation_leadership", "Every point increases maximum number ^of troops you can command by 5, ^increases your party morale and ^reduces troop wages by 5%%. ^(Leader skill)"),
("explanation_trade", "Every level of this skill ^reduces your trade penalty by 5%%. ^(Party skill)"),
("explanation_one_handed_weapon", "Covers usage of one handed swords, ^axes and blunt weapons."),
("explanation_two_handed_weapon", "Covers usage of two handed swords, ^great axes and mauls."),
("explanation_polearm", "Covers usage of pole weapons like ^spears, lances, staffs, etc."),
("explanation_archery", "Covers usage of bows."),
("explanation_crossbow", "Covers usage of crossbows."),
("explanation_throwing", "Covers usage of thrown weapons like ^javelins, darts, stones etc."),
("explanation_firearms", "Covers usage of pistols and muskets."),

("skills_info", "Current: {reg36}^Base Attribute: {s10}"),
("troop_basic_info", "Level: {reg45}^Health: {reg46}^Experience: {reg47}^Next Level at:e{reg48}"),
("end", "End"),
## ZZ Custom Kingdom Troops end

Sıra module_scripts.py de from ID_animations import * altına bunu ekleyin
Code:
## ZZ Custom Kingdom Troops begin
from header_presentations import *
from module_items import *
def set_item_detial():
  set_item_detial = []
  for i_item in xrange(len(items)):
    set_item_detial.append((item_set_slot, i_item, slot_item_difficulty, get_difficulty(items[i_item][6])))
    set_item_detial.append((item_set_slot, i_item, slot_item_weight, get_weight(items[i_item][6])))	
    set_item_detial.append((item_set_slot, i_item, slot_item_price, items[i_item][5]))		
  return set_item_detial[:]
## ZZ Custom Kingdom Troops end
tabi boşluk bırakarak :grin:

Ardından game_starts ın altına bunu ekleyin
Code:
	  ## ZZ Custom Kingdom Troops begin
	  (call_script,"script_item_detial"),
	  (call_script,"script_set_custom_troop_pionts_initialization"), 
	  ## ZZ Custom Kingdom Troops end
böyle gözükmeli
Code:
  ("game_start",
   [
	  
	  ## ZZ Custom Kingdom Troops begin
	  (call_script,"script_item_detial"),
	  (call_script,"script_set_custom_troop_pionts_initialization"), 
	  ## ZZ Custom Kingdom Troops end

      (faction_set_slot, "fac_player_supporters_faction", slot_faction_state, sfs_inactive),

Sonra (faction_set_slot, "fac_culture_6", slot_faction_tier_5_troop, "trp_sarranid_mamluke"), aratın ve altına bunu ekleyin
Code:
## ZZ Custom Kingdom Troops begin
      (faction_set_slot, "fac_culture_player",  slot_faction_tier_1_troop, "trp_kingdom_recruit"),
      (faction_set_slot, "fac_culture_player",  slot_faction_tier_2_troop, "trp_kingdom_militia"),
      (faction_set_slot, "fac_culture_player",  slot_faction_tier_3_troop, "trp_kingdom_footman"),
      (faction_set_slot, "fac_culture_player",  slot_faction_tier_4_troop, "trp_kingdom_infantry"),
      (faction_set_slot, "fac_culture_player",  slot_faction_tier_5_troop, "trp_kingdom_knight"),
## ZZ Custom Kingdom Troops end

Şimdi bu grubun altına
Code:
      (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),
bunu ekleyin
Code:
## ZZ Custom Kingdom Troops begin
      (try_begin), 
        (is_between, ":troop_id", custom_troop_begin, custom_troop_end),
	(troop_get_slot, ":total_price", ":troop_id", slot_custom_troop_wage),
        (val_mul, ":total_price", 5),
        (val_div, ":total_price", 5000),
	(val_add,":wage",":total_price"),
      (try_end),
## ZZ Custom Kingdom Troops end 

Daha işimiz bitmedi :grin: (assign, reg0, 200), diye aratın ve try_end din altına bunu ekleyin
Code:
## ZZ Custom Kingdom Troops begin
      (try_begin),		
		(is_between, ":troop_id", custom_troop_begin, custom_troop_end),
		(troop_get_slot, ":total_price",":troop_id", slot_custom_troop_wage),	
		(store_div,":upgrade_cost_modify",":total_price",100),
		(val_add,reg0,":upgrade_cost_modify"),
      (try_end),      
## ZZ Custom Kingdom Troops end

Şimdi ise (faction_set_slot, "fac_player_supporters_faction", slot_faction_leader, ":liege"), aratın eve altına boşluk bırakmadan
bunu yapıştırın
Code:
## ZZ Custom Kingdom Troops begin
    (faction_set_slot, "fac_player_supporters_faction", slot_faction_culture, "fac_culture_player"),	
## ZZ Custom Kingdom Troops end

Devamını yorum olarak yazıcam :grin: :grin:

build modulede ilk build ettiğinizde bir hata vericek tekrar build edin hata vermeyecektir

buradaki dosyaları ise modunuzda gerekli yerlere atın :grin:
 

RoadWarriror

Master Knight
WBNWWF&S
Şimdi module scriptsin en altındaki ] den bir öncekine bunu ekleyin uzun diye spoiler içine aldım :grin: :grin:
Code:
## ZZ Custom Kingdom Troops begin
("prsnt_upgrade_tree_troop_and_name",
 [(store_script_param, ":troop_no", 1),
  (store_script_param, ":pos_x", 2),
  (store_script_param, ":pos_y", 3),
  (store_script_param, ":slot_no", 4),
  
  (str_store_troop_name, s1, ":troop_no"),
  (create_text_overlay, reg1, "@{s1}", tf_center_justify|tf_vertical_align_center),
  (position_set_x, pos1, 600),
  (position_set_y, pos1, 600),
  (overlay_set_size, reg1, pos1),
  (position_set_x, pos1, ":pos_x"),
  (position_set_y, pos1, ":pos_y"),
  (overlay_set_position, reg1, pos1),
  (val_sub, ":pos_x", 52), # adjusted from 65
  #(val_add, ":pos_y", 5), # adjusted from 10
  (store_mul, ":cur_troop", ":troop_no", 2), #with weapons
  (create_image_button_overlay_with_tableau_material, reg1, -1, "tableau_game_party_window", ":cur_troop"),
  (position_set_x, pos1, 375),
  (position_set_y, pos1, 500),
  (overlay_set_size, reg1, pos1),
  (position_set_x, pos1, ":pos_x"),
  (position_set_y, pos1, ":pos_y"),
  (overlay_set_position, reg1, pos1),
  (troop_set_slot, "trp_temp_array_a", ":slot_no", reg1),
  (troop_set_slot, "trp_temp_array_b", ":slot_no", ":troop_no"),  
  ]),
  
("prsnt_upgrade_tree_troop_cost",
 [(store_script_param, ":troop_no", 1),
  (store_script_param, ":pos_x", 2),
  (store_script_param, ":pos_y", 3),
  (call_script, "script_game_get_upgrade_cost", ":troop_no"),
  (create_text_overlay, reg1, "@{reg0}", tf_left_align|tf_vertical_align_center),
  (position_set_x, pos1, ":pos_x"),
  (position_set_y, pos1, ":pos_y"),
  (overlay_set_position, reg1, pos1),
  (position_set_x, pos1, 600),
  (position_set_y, pos1, 600),
  (overlay_set_size, reg1, pos1), ]),  
    
("prsnt_lines",
 [(store_script_param, ":size_x", 1),
  (store_script_param, ":size_y", 2),
  (store_script_param, ":pos_x", 3),
  (store_script_param, ":pos_y", 4),
  (store_script_param, ":color", 5),
  (create_mesh_overlay, reg1, "mesh_white_plane"),
  (val_mul, ":size_x", 50),
  (val_mul, ":size_y", 50),
  (position_set_x, pos0, ":size_x"),
  (position_set_y, pos0, ":size_y"),
  (overlay_set_size, reg1, pos0),
  (position_set_x, pos0, ":pos_x"),
  (position_set_y, pos0, ":pos_y"),
  (overlay_set_position, reg1, pos0),
  (overlay_set_color, reg1, ":color"), ]),

("get_custom_troop_info", 
[
	(store_script_param_1, ":troop_no"),

        (str_store_troop_name,s2,":troop_no"),
		(store_attribute_level,reg1,":troop_no",ca_strength),
		(store_attribute_level,reg2,":troop_no",ca_agility),
		(store_attribute_level,reg3,":troop_no",ca_intelligence),
		(store_attribute_level,reg4,":troop_no",ca_charisma),
		(store_skill_level ,reg5,skl_ironflesh,":troop_no"),
		(store_skill_level ,reg6,skl_power_strike,":troop_no"),
		(store_skill_level ,reg7,skl_power_throw,":troop_no"),
		(store_skill_level ,reg8,skl_power_draw,":troop_no"),
		(store_skill_level ,reg9,skl_weapon_master,":troop_no"),
		(store_skill_level ,reg10,skl_shield,":troop_no"),
		(store_skill_level ,reg11,skl_athletics,":troop_no"),
		(store_skill_level ,reg12,skl_riding,":troop_no"),
		(store_skill_level ,reg13,skl_horse_archery,":troop_no"),
		(store_skill_level ,reg14,skl_looting,":troop_no"),
		(store_skill_level ,reg15,skl_trainer,":troop_no"),
		(store_skill_level ,reg16,skl_tracking,":troop_no"),
		(store_skill_level ,reg17,skl_tactics,":troop_no"),
		(store_skill_level ,reg18,skl_pathfinding,":troop_no"),
		(store_skill_level ,reg19,skl_spotting,":troop_no"),
		(store_skill_level ,reg20,skl_inventory_management,":troop_no"),
		(store_skill_level ,reg21,skl_wound_treatment,":troop_no"),
		(store_skill_level ,reg22,skl_surgery,":troop_no"),
		(store_skill_level ,reg23,skl_first_aid,":troop_no"),
		(store_skill_level ,reg24,skl_engineer,":troop_no"),
		(store_skill_level ,reg25,skl_persuasion,":troop_no"),
		(store_skill_level ,reg26,skl_prisoner_management,":troop_no"),
		(store_skill_level ,reg27,skl_leadership,":troop_no"),
		(store_skill_level ,reg28,skl_trade,":troop_no"),
        (store_proficiency_level, reg29, ":troop_no", wpt_one_handed_weapon),
        (store_proficiency_level, reg30, ":troop_no", wpt_two_handed_weapon),
        (store_proficiency_level, reg31, ":troop_no", wpt_polearm),
        (store_proficiency_level, reg32, ":troop_no", wpt_archery),
        (store_proficiency_level, reg33, ":troop_no", wpt_crossbow),
        (store_proficiency_level, reg34, ":troop_no", wpt_throwing),
        (store_proficiency_level, reg35, ":troop_no", wpt_firearm),
		(store_character_level,reg45,":troop_no"),
		(store_mul,":hp_part1",reg5,2),
		(store_add,":hp_part2",reg1,35),
		(store_add,":hp",reg1,":hp_part2",":hp_part1"),
		(assign,reg46,":hp"),
		(troop_get_xp,reg47,":troop_no"),	
]),

("store_custom_troop_info_to_slot", 
[
	(store_script_param_1, ":arrays_no"),
	
		(troop_set_slot,":arrays_no",0,reg1),
		(troop_set_slot,":arrays_no",1,reg2),
		(troop_set_slot,":arrays_no",2,reg3),
		(troop_set_slot,":arrays_no",3,reg4),
		(troop_set_slot,":arrays_no",4,reg5),
		(troop_set_slot,":arrays_no",5,reg6),
		(troop_set_slot,":arrays_no",6,reg7),
		(troop_set_slot,":arrays_no",7,reg8),
		(troop_set_slot,":arrays_no",8,reg9),
		(troop_set_slot,":arrays_no",9,reg10),
		(troop_set_slot,":arrays_no",10,reg11),	
		(troop_set_slot,":arrays_no",11,reg12),
		(troop_set_slot,":arrays_no",12,reg13),
		(troop_set_slot,":arrays_no",13,reg14),
		(troop_set_slot,":arrays_no",14,reg15),
		(troop_set_slot,":arrays_no",15,reg16),
		(troop_set_slot,":arrays_no",16,reg17),
		(troop_set_slot,":arrays_no",17,reg18),
		(troop_set_slot,":arrays_no",18,reg19),
		(troop_set_slot,":arrays_no",19,reg20),
		(troop_set_slot,":arrays_no",20,reg21),
		(troop_set_slot,":arrays_no",21,reg22),
		(troop_set_slot,":arrays_no",22,reg23),
		(troop_set_slot,":arrays_no",23,reg24),
		(troop_set_slot,":arrays_no",24,reg25),
		(troop_set_slot,":arrays_no",25,reg26),
		(troop_set_slot,":arrays_no",26,reg27),
		(troop_set_slot,":arrays_no",27,reg28),
		(troop_set_slot,":arrays_no",28,reg29),
		(troop_set_slot,":arrays_no",29,reg30),
		(troop_set_slot,":arrays_no",30,reg31),
		(troop_set_slot,":arrays_no",31,reg32),
		(troop_set_slot,":arrays_no",32,reg33),
		(troop_set_slot,":arrays_no",33,reg34),
		(troop_set_slot,":arrays_no",34,reg35),
]),

("clear_array", 
[
	(try_for_range,":slot_no",0,1000),
		(troop_set_slot,"trp_array_a",":slot_no",0),
		(troop_set_slot,"trp_array_b",":slot_no",0),
		(troop_set_slot,"trp_array_c",":slot_no",0),		
		(troop_set_slot,"trp_array_d",":slot_no",0),
	(try_end),	
]),

("custom_troop_button_action", 
[
	(store_script_param, ":no",1),
	(store_script_param, ":state",2),#0 add,1 save,2 show or not
	(store_script_param, ":increment",3),
	
	(try_begin),
		(eq,":no",0),
		(try_begin),
			(eq,":state",0),		
			(val_add,reg1,1),
			(val_sub,"$attribute_points",1),
		(else_try),
			(eq,":state",1),		
			(troop_raise_attribute, "$temp_troop",ca_strength,":increment"),
		(else_try),
			(eq,":state",2),
			(try_begin),
				(this_or_next|ge,reg1,63),
				(le,"$attribute_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),					
		(try_end),			
	(else_try),
		(eq,":no",1),
		(try_begin),
			(eq,":state",0),		
			(val_add,reg2,1),
			(val_sub,"$attribute_points",1),		
		(else_try),
			(eq,":state",1),		
			(troop_raise_attribute, "$temp_troop",ca_agility,":increment"),
		(else_try),
			(eq,":state",2),
			(try_begin),
				(this_or_next|ge,reg2,63),
				(le,"$attribute_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),			
	(else_try),
		(eq,":no",2),
		(try_begin),
			(eq,":state",0),
			(val_add,reg3,1),
			(val_sub,"$attribute_points",1),	
		(else_try),
			(eq,":state",1),		
			(troop_raise_attribute, "$temp_troop",ca_intelligence,":increment"),
		(else_try),
			(eq,":state",2),
			(try_begin),
				(this_or_next|ge,reg3,63),
				(le,"$attribute_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),			
	(else_try),
		(eq,":no",3),
		(try_begin),
			(eq,":state",0),		
			(val_add,reg4,1),
			(val_sub,"$attribute_points",1),		
		(else_try),
			(eq,":state",1),		
			(troop_raise_attribute, "$temp_troop",ca_charisma,":increment"),
		(else_try),
			(eq,":state",2),
			(try_begin),
				(this_or_next|ge,reg4,63),
				(le,"$attribute_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),				
	(else_try),
		(eq,":no",4),
		(try_begin),
			(eq,":state",0),		
			(val_add,reg5,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_ironflesh,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg1,3),		
			(try_begin),
				(this_or_next|ge,reg5,10),
				(this_or_next|ge,reg5,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),				
	(else_try),
		(eq,":no",5),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg6,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_power_strike,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg1,3),		
			(try_begin),
				(this_or_next|ge,reg6,10),
				(this_or_next|ge,reg6,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),	
	(else_try),
		(eq,":no",6),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg7,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_power_throw,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg1,3),		
			(try_begin),
				(this_or_next|ge,reg7,10),
				(this_or_next|ge,reg7,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),	
	(else_try),
		(eq,":no",7),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg8,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_power_draw,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg1,3),		
			(try_begin),
				(this_or_next|ge,reg8,10),
				(this_or_next|ge,reg8,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),	
	(else_try),
		(eq,":no",8),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg9,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_weapon_master,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg2,3),		
			(try_begin),
				(this_or_next|ge,reg9,10),
				(this_or_next|ge,reg9,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),	
	(else_try),
		(eq,":no",9),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg10,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_shield,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg2,3),		
			(try_begin),
				(this_or_next|ge,reg10,10),
				(this_or_next|ge,reg10,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),	
	(else_try),
		(eq,":no",10),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg11,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_athletics,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg2,3),		
			(try_begin),
				(this_or_next|ge,reg11,10),
				(this_or_next|ge,reg11,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),				
		(try_end),	
	(else_try),
		(eq,":no",11),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg12,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_riding,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg2,3),		
			(try_begin),
				(this_or_next|ge,reg12,10),
				(this_or_next|ge,reg12,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),
	(else_try),
		(eq,":no",12),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg13,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_horse_archery,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg2,3),		
			(try_begin),
				(this_or_next|ge,reg13,10),
				(this_or_next|ge,reg13,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),
	(else_try),
		(eq,":no",13),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg14,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_looting,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg2,3),		
			(try_begin),
				(this_or_next|ge,reg14,10),
				(this_or_next|ge,reg14,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),
	(else_try),
		(eq,":no",14),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg15,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_trainer,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg3,3),		
			(try_begin),
				(this_or_next|ge,reg15,10),
				(this_or_next|ge,reg15,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),
	(else_try),
		(eq,":no",15),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg16,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_tracking,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg3,3),		
			(try_begin),
				(this_or_next|ge,reg16,10),
				(this_or_next|ge,reg16,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),
	(else_try),
		(eq,":no",16),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg17,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_tactics,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg3,3),		
			(try_begin),
				(this_or_next|ge,reg17,10),
				(this_or_next|ge,reg17,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),
	(else_try),
		(eq,":no",17),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg18,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_pathfinding,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg3,3),		
			(try_begin),
				(this_or_next|ge,reg18,10),
				(this_or_next|ge,reg18,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),
	(else_try),
		(eq,":no",18),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg19,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_spotting,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg3,3),		
			(try_begin),
				(this_or_next|ge,reg19,10),
				(this_or_next|ge,reg19,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),
	(else_try),
		(eq,":no",19),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg20,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_inventory_management,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg3,3),		
			(try_begin),
				(this_or_next|ge,reg20,10),
				(this_or_next|ge,reg20,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),
	(else_try),
		(eq,":no",20),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg21,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_wound_treatment,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg3,3),		
			(try_begin),
				(this_or_next|ge,reg21,10),
				(this_or_next|ge,reg21,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),		
	(else_try),
		(eq,":no",21),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg22,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_surgery,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg3,3),		
			(try_begin),
				(this_or_next|ge,reg22,10),
				(this_or_next|ge,reg22,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),	
	(else_try),
		(eq,":no",22),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg23,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_first_aid,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg3,3),		
			(try_begin),
				(this_or_next|ge,reg23,10),
				(this_or_next|ge,reg23,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),	
	(else_try),
		(eq,":no",23),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg24,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_engineer,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg3,3),		
			(try_begin),
				(this_or_next|ge,reg24,10),
				(this_or_next|ge,reg24,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),	
	(else_try),
		(eq,":no",24),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg25,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_persuasion,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg3,3),		
			(try_begin),
				(this_or_next|ge,reg25,10),
				(this_or_next|ge,reg25,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),	
	(else_try),
		(eq,":no",25),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg26,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_prisoner_management,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg4,3),		
			(try_begin),
				(this_or_next|ge,reg26,10),
				(this_or_next|ge,reg26,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),		
	(else_try),
		(eq,":no",26),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg27,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_leadership,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg4,3),		
			(try_begin),
				(this_or_next|ge,reg27,10),
				(this_or_next|ge,reg27,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),				
		(try_end),
	(else_try),
		(eq,":no",27),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg28,1),
			(val_sub,"$skill_points",1),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_skill, "$temp_troop",skl_trade,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_div,":limits",reg4,3),		
			(try_begin),
				(this_or_next|ge,reg28,10),
				(this_or_next|ge,reg28,":limits"),				
				(le,"$skill_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),				
		(try_end),
	(else_try),
		(eq,":no",28),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg29,10),
			(val_sub,"$weapon_points",10),			
		(else_try),
			(eq,":state",1),		
			(troop_raise_proficiency_linear, "$temp_troop",wpt_one_handed_weapon,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_mul,":add",reg9,40),
			(store_add,":limits",60,":add"),
			(try_begin),
				(le,"$weapon_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(else_try),					
				(lt,reg9,10),
				(ge,reg29,":limits"),				
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),				
		(try_end),
	(else_try),
		(eq,":no",29),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg30,10),
			(val_sub,"$weapon_points",10),				
		(else_try),
			(eq,":state",1),		
			(troop_raise_proficiency_linear, "$temp_troop",wpt_two_handed_weapon,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_mul,":add",reg9,40),
			(store_add,":limits",60,":add"),
			(try_begin),
				(le,"$weapon_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(else_try),					
				(lt,reg9,10),
				(ge,reg30,":limits"),				
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),		
		(try_end),
	(else_try),
		(eq,":no",30),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg31,10),
			(val_sub,"$weapon_points",10),				
		(else_try),
			(eq,":state",1),		
			(troop_raise_proficiency_linear, "$temp_troop",wpt_polearm,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_mul,":add",reg9,40),
			(store_add,":limits",60,":add"),
			(try_begin),
				(le,"$weapon_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(else_try),					
				(lt,reg9,10),
				(ge,reg31,":limits"),				
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),
	(else_try),
		(eq,":no",31),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg32,10),
			(val_sub,"$weapon_points",10),				
		(else_try),
			(eq,":state",1),		
			(troop_raise_proficiency_linear, "$temp_troop",wpt_archery,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_mul,":add",reg9,40),
			(store_add,":limits",60,":add"),
			(try_begin),
				(le,"$weapon_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(else_try),					
				(lt,reg9,10),
				(ge,reg32,":limits"),				
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),			
		(try_end),
	(else_try),
		(eq,":no",32),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg33,10),
			(val_sub,"$weapon_points",10),				
		(else_try),
			(eq,":state",1),		
			(troop_raise_proficiency_linear, "$temp_troop",wpt_crossbow,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_mul,":add",reg9,40),
			(store_add,":limits",60,":add"),
			(try_begin),
				(le,"$weapon_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(else_try),					
				(lt,reg9,10),
				(ge,reg33,":limits"),				
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),				
		(try_end),
	(else_try),
		(eq,":no",33),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg34,10),
			(val_sub,"$weapon_points",10),				
		(else_try),
			(eq,":state",1),		
			(troop_raise_proficiency_linear, "$temp_troop",wpt_throwing,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_mul,":add",reg9,40),
			(store_add,":limits",60,":add"),
			(try_begin),
				(le,"$weapon_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(else_try),					
				(lt,reg9,10),
				(ge,reg34,":limits"),				
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),				
		(try_end),
	(else_try),
		(eq,":no",34),
		(try_begin),
			(eq,":state",0),			
			(val_add,reg35,10),
			(val_sub,"$weapon_points",10),				
		(else_try),
			(eq,":state",1),		
			(troop_raise_proficiency_linear, "$temp_troop",wpt_firearm,":increment"),
		(else_try),			
			(eq,":state",2),
			(store_mul,":add",reg9,40),
			(store_add,":limits",60,":add"),
			(try_begin),
				(le,"$weapon_points",0),
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(else_try),					
				(lt,reg9,10),
				(ge,reg35,":limits"),				
				(store_add,":slot_no",":no",300),
				(troop_set_slot,"trp_array_a",":slot_no",1),
			(try_end),				
		(try_end),
	(try_end),		
]),

  ("custom_troop_inventory_initialization", [ 
    (store_script_param_1, ":troop"),
	
    (try_for_range, ":i_slot", 0, 100),
	  (troop_set_slot, "trp_array_d", ":i_slot", 0),
    (try_end),	
    (try_for_range, ":i_slot", 0, 10),	
      (troop_get_inventory_slot, ":item",":troop", ":i_slot"),	  
      (gt, ":item", 0),
	  (troop_set_slot, "trp_array_d", ":i_slot", ":item"),
	  (store_add,":slot_offset",":i_slot",50),
	  (troop_set_slot, "trp_array_d", ":slot_offset", ":item"),	  
    (try_end),
  ]),
  
  ("custom_troop_inventory_reset", [ 
    (store_script_param_1, ":troop"),

    (try_for_range, ":i_slot", 0, 10),
	  (troop_set_slot, "trp_array_d", ":i_slot", 0),
      (troop_set_inventory_slot,":troop", ":i_slot",-1), 	  
    (try_end),
	
    (try_for_range, ":i_slot", 0, 10),
	  (store_add,":slot_offset",":i_slot",50),	
	  (troop_get_slot, ":item", "trp_array_d", ":slot_offset"),
      (gt, ":item", 0),	  
      (troop_set_inventory_slot,":troop", ":i_slot",":item"), 
	  (troop_set_slot, "trp_array_d", ":i_slot", ":item"),	  
    (try_end),
  ]),  
  
  ("custom_troop_inventory_change", [ 
    (store_script_param_1, ":troop"),
	
	(store_sub,":slot_offset",":troop","trp_kingdom_recruit"),
	(val_mul,":slot_offset",10),
    (try_for_range, ":i_slot", 0, 10),
      (troop_set_inventory_slot,":troop", ":i_slot",-1),
    (try_end),	  
    (try_for_range, ":i_slot", 0, 10),
	  (troop_get_slot, ":item", "trp_array_d", ":i_slot"),
      (gt, ":item", 0),	  
      (troop_set_inventory_slot,":troop", ":i_slot",":item"),

	  ## change for save data
	  (store_add,":slot_no",":i_slot",":slot_offset"),
	  (troop_set_slot, "trp_kingdom_inventory", ":slot_no",":item"),	  
	  ## change for save data	  
    (try_end),	
  ]),
  
  ("custom_troop_inventory_total_price", [ 
    (store_script_param_1, ":troop"),
	
	(assign,":total_price",0),
    (try_for_range, ":i_slot", 0, 10),	
      (troop_get_inventory_slot, ":item",":troop", ":i_slot"),	  
      (gt, ":item", 0),
	  (item_get_slot, ":price", ":item", slot_item_price),
	  (val_add,":total_price",":price"),  
    (try_end),
	
    (assign,reg42,":total_price"),
	(troop_set_slot, ":troop", slot_custom_troop_wage, ":total_price"),	
  ]),  
  
  ("custom_troop_inventory_total_weight", [ 
    (store_script_param_1, ":troop"),
	
	(assign,":total_weight",0),	
    (try_for_range, ":i_slot", 0, 10),	
      (troop_get_inventory_slot, ":item",":troop", ":i_slot"),	  
      (gt, ":item", 0),
	  (item_get_slot, ":weight", ":item", slot_item_weight),
	  (val_add,":total_weight",":weight"),  
    (try_end),
	
    (assign,reg43,":total_weight"),
	(troop_set_slot, ":troop", slot_custom_troop_weight, ":total_weight"),	
  ]),

  ("custom_troop_item_judge", [ 
    (store_script_param_1, ":item_no"),
    (store_script_param_2, ":item_slot"),

	(assign, ":right_place", 0),	
	(item_get_type,":item_type",":item_no"),
	(try_begin),
		(is_between,":item_slot",0,4),
        (this_or_next|eq, ":item_type", itp_type_one_handed_wpn),
		(this_or_next|eq, ":item_type", itp_type_two_handed_wpn),
		(this_or_next|eq, ":item_type", itp_type_polearm),
        (this_or_next|eq, ":item_type", itp_type_arrows),
        (this_or_next|eq, ":item_type", itp_type_bolts),
		(this_or_next|eq, ":item_type", itp_type_shield),
		(this_or_next|eq, ":item_type", itp_type_bow),
		(this_or_next|eq, ":item_type", itp_type_crossbow),
        (this_or_next|eq, ":item_type", itp_type_thrown),
		(this_or_next|eq, ":item_type", itp_type_pistol),
		(this_or_next|eq, ":item_type", itp_type_musket),
		(eq, ":item_type", itp_type_bullets),
		(assign, ":right_place", 1),
    (else_try),
        (eq, ":item_slot", 4), 
        (eq, ":item_type", itp_type_head_armor),
		(assign, ":right_place", 1),
    (else_try),
        (eq, ":item_slot", 5),
        (eq, ":item_type", itp_type_body_armor),
		(assign, ":right_place", 1),
    (else_try),
        (eq, ":item_slot", 6),
        (eq, ":item_type", itp_type_foot_armor),
		(assign, ":right_place", 1),
    (else_try),
        (eq, ":item_slot", 7),
        (eq, ":item_type", itp_type_hand_armor),
		(assign, ":right_place", 1),
    (else_try),
        (eq, ":item_slot", 8), 
        (eq, ":item_type", itp_type_horse),
		(assign, ":right_place", 1),
    (try_end),
	
	(call_script,"script_custom_troop_inventory_total_weight","$temp_troop"),
	(item_get_slot, ":weight", "$current_item", slot_item_weight),
	(val_add,reg43,":weight"),
	(store_attribute_level,":strength_level","$temp_troop",ca_strength),
	(store_character_level,":character_level","$temp_troop"),
	(val_mul,":strength_level",2),
	(store_add,":weight_limits",":strength_level",":character_level"),
	(try_begin),
		(le,reg43,":weight_limits"),
		(assign, ":can_carry", 1),
    (else_try),	
		(assign, ":can_carry", 0),	
    (try_end),
	
	(store_and,reg0,":right_place",":can_carry"),	
  ]),  

("set_custom_troop_pionts_initialization",[	  
	    (try_for_range, ":troop_no", custom_troop_begin, custom_troop_end),
			(store_character_level,":skill_point",":troop_no"),
			(troop_set_slot,  ":troop_no", slot_custom_troop_sp, ":skill_point"),			
		    (store_mul,":weapon_point",":skill_point",40),
			(troop_set_slot,  ":troop_no", slot_custom_troop_wp, ":weapon_point"),				
			(store_div,":attribute_point",":skill_point",3),
			(troop_set_slot,  ":troop_no", slot_custom_troop_ap, ":attribute_point"),	
		(try_end),				
]),

("player_faction_troops",[
	(try_begin),
	  (eq,"$g_player_culture",0),
      (faction_set_slot, "fac_culture_player",  slot_faction_tier_1_troop, "trp_kingdom_recruit"),
      (faction_set_slot, "fac_culture_player",  slot_faction_tier_2_troop, "trp_kingdom_militia"),
      (faction_set_slot, "fac_culture_player",  slot_faction_tier_3_troop, "trp_kingdom_footman"),
      (faction_set_slot, "fac_culture_player",  slot_faction_tier_4_troop, "trp_kingdom_infantry"),
      (faction_set_slot, "fac_culture_player",  slot_faction_tier_5_troop, "trp_kingdom_knight"),
	(else_try),
	  (eq,"$g_player_culture",1),
      (faction_set_slot, "fac_culture_player",  slot_faction_tier_1_troop, "trp_swadian_recruit"),
      (faction_set_slot, "fac_culture_player",  slot_faction_tier_2_troop, "trp_swadian_militia"),
      (faction_set_slot, "fac_culture_player",  slot_faction_tier_3_troop, "trp_swadian_footman"),
      (faction_set_slot, "fac_culture_player",  slot_faction_tier_4_troop, "trp_swadian_infantry"),
      (faction_set_slot, "fac_culture_player",  slot_faction_tier_5_troop, "trp_swadian_knight"),
	(else_try),
	  (eq,"$g_player_culture",2),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_1_troop, "trp_vaegir_recruit"),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_2_troop, "trp_vaegir_footman"),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_3_troop, "trp_vaegir_veteran"),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_4_troop, "trp_vaegir_horseman"),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_5_troop, "trp_vaegir_knight"),
	(else_try),
	  (eq,"$g_player_culture",3),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_1_troop, "trp_khergit_tribesman"),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_2_troop, "trp_khergit_skirmisher"),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_3_troop, "trp_khergit_horseman"),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_4_troop, "trp_khergit_horse_archer"),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_5_troop, "trp_khergit_veteran_horse_archer"),
	(else_try),
	  (eq,"$g_player_culture",4),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_1_troop, "trp_nord_recruit"),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_2_troop, "trp_nord_footman"),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_3_troop, "trp_nord_trained_footman"),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_4_troop, "trp_nord_warrior"),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_5_troop, "trp_nord_veteran"),
	(else_try),
	  (eq,"$g_player_culture",5),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_1_troop, "trp_rhodok_tribesman"),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_2_troop, "trp_rhodok_spearman"),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_3_troop, "trp_rhodok_trained_spearman"),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_4_troop, "trp_rhodok_veteran_spearman"),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_5_troop, "trp_rhodok_sergeant"),
	(else_try),
	  (eq,"$g_player_culture",6),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_1_troop, "trp_sarranid_recruit"),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_2_troop, "trp_sarranid_footman"),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_3_troop, "trp_sarranid_archer"),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_4_troop, "trp_sarranid_horseman"),
      (faction_set_slot, "fac_culture_player", slot_faction_tier_5_troop, "trp_sarranid_mamluke"),  
	  (try_end),]),
	  
  ("item_detial",set_item_detial()),

  
## ZZ Custom Kingdom Troops end
 

RoadWarriror

Master Knight
WBNWWF&S
Şimdide module_presentations.pyi açıyoruz şöyle bir grup olacak
Code:
      (ti_on_presentation_run,
       [(try_begin),
          (this_or_next|neq, "$g_tutorial_displayed_mouse_dir", "$g_tutorial_mouse_dir"),
          (neq, "$g_tutorial_displayed_mouse_click", "$g_tutorial_mouse_click"),
          (presentation_set_duration, 0),
          (try_begin),
            (ge, "$g_tutorial_mouse_dir", 0),
            (ge, "$g_tutorial_mouse_click", 0),
            (start_presentation, "prsnt_tutorial_show_mouse_movement"),
          (try_end),
        (try_end),
        ]),
      ]),
o grubun altında"name_kingdom",0,mesh_load_window,[ diye bir satır var ("banner_selection",0,mesh_load_window,[ sa kadar olan her yeri bununla değiştirin

Code:
## ZZ Custom Kingdom Troops begin	  
  ("name_kingdom",0,mesh_load_window,[
      (ti_on_presentation_load,
       [(set_fixed_point_multiplier, 1000),
	   
	    #(call_script, "script_presentation_load"),
	   
        (str_store_string, s1, "str_name_kingdom_text"),
        (create_text_overlay, reg1, s1, tf_center_justify),
        (position_set_x, pos1, 200),
        (position_set_y, pos1, 500),
        (overlay_set_position, reg1, pos1),
        (overlay_set_text, reg1, s1),
        (create_simple_text_box_overlay, "$g_presentation_obj_name_kingdom_1"),
        (position_set_x, pos1, 100),
        (position_set_y, pos1, 400),
        (overlay_set_position, "$g_presentation_obj_name_kingdom_1", pos1),
        (try_begin),
          (eq, "$players_kingdom_name_set", 1),
          (str_store_faction_name, s7, "fac_player_supporters_faction"),
          (overlay_set_text, "$g_presentation_obj_name_kingdom_1", s7),
        (else_try),
          (str_store_troop_name, s0, "trp_player"),
          (overlay_set_text, "$g_presentation_obj_name_kingdom_1", "str_default_kingdom_name"),
          (str_store_string, s7, "str_default_kingdom_name"),
        (try_end),
				
		(assign,reg20,0),
		(assign,reg19,0),
		(assign,reg21,0),
		
		(create_check_box_overlay, "$g_presentation_obj_1", "mesh_checkbox_off", "mesh_checkbox_on"),
		(position_set_x, pos1, 400),
        (position_set_y, pos1, 400),
		(overlay_set_position, "$g_presentation_obj_1", pos1),
		(overlay_set_val, "$g_presentation_obj_1",0),
        (create_text_overlay, "$g_presentation_obj_2", "@Create your own kindom troops!", tf_center_justify),
        (position_set_x, pos1, 620),
        (position_set_y, pos1, 395),
        (overlay_set_position, "$g_presentation_obj_2", pos1),
		
		(create_check_box_overlay, "$g_presentation_obj_3", "mesh_checkbox_off", "mesh_checkbox_on"),
		(position_set_x, pos1, 400),
        (position_set_y, pos1, 510),
		(overlay_set_position, "$g_presentation_obj_3", pos1),
		(overlay_set_val, "$g_presentation_obj_3",0),		
        (create_text_overlay, "$g_presentation_obj_5", "@Use the Existed kindoms' troops!", tf_center_justify),
        (position_set_x, pos1, 630),
        (position_set_y, pos1, 505),
        (overlay_set_position, "$g_presentation_obj_5", pos1),		
		
		(create_combo_label_overlay, "$g_presentation_obj_4"),
        (position_set_x, pos1, 600),
        (position_set_y, pos1, 450),
        (overlay_set_position, "$g_presentation_obj_4", pos1),
        (try_for_range, ":cur_faction", npc_kingdoms_begin, npc_kingdoms_end),
          (str_store_faction_name, s0, ":cur_faction"),
          (overlay_add_item, "$g_presentation_obj_4", s0),
        (try_end),
        (overlay_set_val, "$g_presentation_obj_4", npc_kingdoms_begin),
		(overlay_set_display, "$g_presentation_obj_4", 0),

		
        (create_button_overlay, "$g_presentation_obj_name_kingdom_2", "@Continue...", tf_center_justify),
        (position_set_x, pos1, 500),
        (position_set_y, pos1, 300),
        (overlay_set_position, "$g_presentation_obj_name_kingdom_2", pos1),
        (presentation_set_duration, 999999),
        ]),
      (ti_on_presentation_event_state_change,
       [(store_trigger_param_1, ":object"),
	    (store_trigger_param_2, ":value"),
	   
        (try_begin),
          (eq, ":object", "$g_presentation_obj_name_kingdom_1"),
          (str_store_string, s7, s0),
		(else_try),
		  (eq, ":object", "$g_presentation_obj_1"),
		  (neq,reg19,1),
		  (overlay_set_val, "$g_presentation_obj_1",":value"),
		  (assign,reg20,":value"),
		(else_try),
		  (eq, ":object", "$g_presentation_obj_3"),
		  (neq,reg20,1),
		  (overlay_set_val, "$g_presentation_obj_3",":value"),
		  (overlay_set_display, "$g_presentation_obj_4", ":value"),
		  (assign,reg19,":value"),
		(else_try),
		  (eq, ":object", "$g_presentation_obj_4"),
		  (overlay_set_val, "$g_presentation_obj_4",":value"),
		  (assign,reg21,":value"),	  
        (else_try),
          (eq, ":object", "$g_presentation_obj_name_kingdom_2"),
          (faction_set_name, "fac_player_supporters_faction", s7),
          (faction_set_color, "fac_player_supporters_faction", 0xFF0000),
          (assign, "$players_kingdom_name_set", 1),
		  (try_begin),
			(eq,reg20,1),
			(assign,"$g_player_culture",0),
			(call_script, "script_player_faction_troops"),
			(start_presentation, "prsnt_custom_kingdom_troop"), 
		  (else_try),
		  	(eq,reg19,1),
			(val_add,reg21,1),
		  	(assign,"$g_player_culture",reg21),
			(call_script, "script_player_faction_troops"),
			(presentation_set_duration, 0),
		  (try_end),
        (try_end),
        ]),
		
		
    (ti_on_presentation_run,
     [
      (set_fixed_point_multiplier, 1000),
	  
		#(call_script, "script_presentation_run"),	
	  
	  ]),

      ]),
	  ## ZZ Custom Kingdom Troops end

Sonuç olarak böyle gözükecek
Code:
      (ti_on_presentation_run,
       [(try_begin),
          (this_or_next|neq, "$g_tutorial_displayed_mouse_dir", "$g_tutorial_mouse_dir"),
          (neq, "$g_tutorial_displayed_mouse_click", "$g_tutorial_mouse_click"),
          (presentation_set_duration, 0),
          (try_begin),
            (ge, "$g_tutorial_mouse_dir", 0),
            (ge, "$g_tutorial_mouse_click", 0),
            (start_presentation, "prsnt_tutorial_show_mouse_movement"),
          (try_end),
        (try_end),
        ]),
      ]),

## ZZ Custom Kingdom Troops begin	  
  ("name_kingdom",0,mesh_load_window,[
      (ti_on_presentation_load,
       [(set_fixed_point_multiplier, 1000),
	   
	    #(call_script, "script_presentation_load"),
	   
        (str_store_string, s1, "str_name_kingdom_text"),
        (create_text_overlay, reg1, s1, tf_center_justify),
        (position_set_x, pos1, 200),
        (position_set_y, pos1, 500),
        (overlay_set_position, reg1, pos1),
        (overlay_set_text, reg1, s1),
        (create_simple_text_box_overlay, "$g_presentation_obj_name_kingdom_1"),
        (position_set_x, pos1, 100),
        (position_set_y, pos1, 400),
        (overlay_set_position, "$g_presentation_obj_name_kingdom_1", pos1),
        (try_begin),
          (eq, "$players_kingdom_name_set", 1),
          (str_store_faction_name, s7, "fac_player_supporters_faction"),
          (overlay_set_text, "$g_presentation_obj_name_kingdom_1", s7),
        (else_try),
          (str_store_troop_name, s0, "trp_player"),
          (overlay_set_text, "$g_presentation_obj_name_kingdom_1", "str_default_kingdom_name"),
          (str_store_string, s7, "str_default_kingdom_name"),
        (try_end),
				
		(assign,reg20,0),
		(assign,reg19,0),
		(assign,reg21,0),
		
		(create_check_box_overlay, "$g_presentation_obj_1", "mesh_checkbox_off", "mesh_checkbox_on"),
		(position_set_x, pos1, 400),
        (position_set_y, pos1, 400),
		(overlay_set_position, "$g_presentation_obj_1", pos1),
		(overlay_set_val, "$g_presentation_obj_1",0),
        (create_text_overlay, "$g_presentation_obj_2", "@Create your own kindom troops!", tf_center_justify),
        (position_set_x, pos1, 620),
        (position_set_y, pos1, 395),
        (overlay_set_position, "$g_presentation_obj_2", pos1),
		
		(create_check_box_overlay, "$g_presentation_obj_3", "mesh_checkbox_off", "mesh_checkbox_on"),
		(position_set_x, pos1, 400),
        (position_set_y, pos1, 510),
		(overlay_set_position, "$g_presentation_obj_3", pos1),
		(overlay_set_val, "$g_presentation_obj_3",0),		
        (create_text_overlay, "$g_presentation_obj_5", "@Use the Existed kindoms' troops!", tf_center_justify),
        (position_set_x, pos1, 630),
        (position_set_y, pos1, 505),
        (overlay_set_position, "$g_presentation_obj_5", pos1),		
		
		(create_combo_label_overlay, "$g_presentation_obj_4"),
        (position_set_x, pos1, 600),
        (position_set_y, pos1, 450),
        (overlay_set_position, "$g_presentation_obj_4", pos1),
        (try_for_range, ":cur_faction", npc_kingdoms_begin, npc_kingdoms_end),
          (str_store_faction_name, s0, ":cur_faction"),
          (overlay_add_item, "$g_presentation_obj_4", s0),
        (try_end),
        (overlay_set_val, "$g_presentation_obj_4", npc_kingdoms_begin),
		(overlay_set_display, "$g_presentation_obj_4", 0),

		
        (create_button_overlay, "$g_presentation_obj_name_kingdom_2", "@Continue...", tf_center_justify),
        (position_set_x, pos1, 500),
        (position_set_y, pos1, 300),
        (overlay_set_position, "$g_presentation_obj_name_kingdom_2", pos1),
        (presentation_set_duration, 999999),
        ]),
      (ti_on_presentation_event_state_change,
       [(store_trigger_param_1, ":object"),
	    (store_trigger_param_2, ":value"),
	   
        (try_begin),
          (eq, ":object", "$g_presentation_obj_name_kingdom_1"),
          (str_store_string, s7, s0),
		(else_try),
		  (eq, ":object", "$g_presentation_obj_1"),
		  (neq,reg19,1),
		  (overlay_set_val, "$g_presentation_obj_1",":value"),
		  (assign,reg20,":value"),
		(else_try),
		  (eq, ":object", "$g_presentation_obj_3"),
		  (neq,reg20,1),
		  (overlay_set_val, "$g_presentation_obj_3",":value"),
		  (overlay_set_display, "$g_presentation_obj_4", ":value"),
		  (assign,reg19,":value"),
		(else_try),
		  (eq, ":object", "$g_presentation_obj_4"),
		  (overlay_set_val, "$g_presentation_obj_4",":value"),
		  (assign,reg21,":value"),	  
        (else_try),
          (eq, ":object", "$g_presentation_obj_name_kingdom_2"),
          (faction_set_name, "fac_player_supporters_faction", s7),
          (faction_set_color, "fac_player_supporters_faction", 0xFF0000),
          (assign, "$players_kingdom_name_set", 1),
		  (try_begin),
			(eq,reg20,1),
			(assign,"$g_player_culture",0),
			(call_script, "script_player_faction_troops"),
			(start_presentation, "prsnt_custom_kingdom_troop"), 
		  (else_try),
		  	(eq,reg19,1),
			(val_add,reg21,1),
		  	(assign,"$g_player_culture",reg21),
			(call_script, "script_player_faction_troops"),
			(presentation_set_duration, 0),
		  (try_end),
        (try_end),
        ]),
		
		
    (ti_on_presentation_run,
     [
      (set_fixed_point_multiplier, 1000),
	  
		#(call_script, "script_presentation_run"),	
	  
	  ]),

      ]),
	  ## ZZ Custom Kingdom Troops end	  
  
  ("banner_selection",0,mesh_load_window,[
 

RoadWarriror

Master Knight
WBNWWF&S
Son olarak presentationsun en altındaki ] den önce bunu ekleyin
Code:
## ZZ Custom Kingdom Troops begin
  ("custom_kingdom_troop", 0, mesh_load_window, [
    (ti_on_presentation_load,
      [
        (presentation_set_duration, 999999),
        (set_fixed_point_multiplier, 1000),
	
        (str_store_faction_name, s7, "fac_player_supporters_faction"),
	    (create_text_overlay,"$g_presentation_obj_13","@ {s7} 's troop^ Design your own kingdom troop",tf_double_space|tf_with_outline),		
		(position_set_x, pos1, 110),
        (position_set_y, pos1, 600),
		(overlay_set_position, "$g_presentation_obj_13", pos1),
        (position_set_x, pos1, 1500),
        (position_set_y, pos1, 1500),
        (overlay_set_size, "$g_presentation_obj_13", pos1),
		(overlay_set_color, "$g_presentation_obj_13", 0x000033),

		
        (call_script, "script_prsnt_upgrade_tree_troop_and_name","trp_kingdom_recruit", 115, 250,0),
        (call_script, "script_prsnt_upgrade_tree_troop_and_name","trp_kingdom_militia", 265, 250,1),
        (call_script, "script_prsnt_upgrade_tree_troop_and_name","trp_kingdom_footman", 415, 400,2),
        (call_script, "script_prsnt_upgrade_tree_troop_and_name","trp_kingdom_man_at_arms", 565, 500,3),
        (call_script, "script_prsnt_upgrade_tree_troop_and_name","trp_kingdom_knight", 715, 500,4),
        (call_script, "script_prsnt_upgrade_tree_troop_and_name","trp_kingdom_infantry", 565, 300,5),
        (call_script, "script_prsnt_upgrade_tree_troop_and_name","trp_kingdom_sergeant", 715, 300,6),
        (call_script, "script_prsnt_upgrade_tree_troop_and_name","trp_kingdom_skirmisher", 415, 100,7),
        (call_script, "script_prsnt_upgrade_tree_troop_and_name","trp_kingdom_crossbowman", 565, 100,8),
        (call_script, "script_prsnt_upgrade_tree_troop_and_name","trp_kingdom_sharpshooter", 715, 100,9),

        ## cost
        (call_script, "script_prsnt_upgrade_tree_troop_cost", "trp_kingdom_recruit", 195, 360),
        (call_script, "script_prsnt_upgrade_tree_troop_cost", "trp_kingdom_militia", 320, 360),
        (call_script, "script_prsnt_upgrade_tree_troop_cost", "trp_kingdom_footman", 470, 510),
        (call_script, "script_prsnt_upgrade_tree_troop_cost", "trp_kingdom_man_at_arms", 645, 610),
        (call_script, "script_prsnt_upgrade_tree_troop_cost", "trp_kingdom_infantry", 645, 410),
        (call_script, "script_prsnt_upgrade_tree_troop_cost", "trp_kingdom_skirmisher", 495, 210),
        (call_script, "script_prsnt_upgrade_tree_troop_cost", "trp_kingdom_crossbowman", 645, 210),
        ## cost

        ##### - lines
        (call_script, "script_prsnt_lines", 50, 4, 170, 340, 0),
        (call_script, "script_prsnt_lines", 25, 4, 320, 340, 0),
        (call_script, "script_prsnt_lines", 25, 4, 345, 490, 0),
        (call_script, "script_prsnt_lines", 25, 4, 345, 190, 0),
        (call_script, "script_prsnt_lines", 50, 4, 470, 190, 0),
        (call_script, "script_prsnt_lines", 25, 4, 470, 490, 0),
        (call_script, "script_prsnt_lines", 25, 4, 495, 590, 0),
        (call_script, "script_prsnt_lines", 25, 4, 495, 390, 0),
        ##### - lines

        ##### | lines
        (call_script, "script_prsnt_lines", 4, 304, 343, 190, 0),
        (call_script, "script_prsnt_lines", 4, 204, 493, 390, 0),
        ##### | lines

        (call_script, "script_prsnt_lines", 50, 4, 620, 190, 0),
        (call_script, "script_prsnt_lines", 50, 4, 620, 390, 0),
        (call_script, "script_prsnt_lines", 50, 4, 620, 590, 0),
      ]),
		
    (ti_on_presentation_event_state_change,
      [
        (store_trigger_param_1, ":object"),

        (try_for_range, ":slot_no", 0, 10),
          (troop_slot_eq, "trp_temp_array_a", ":slot_no", ":object"),
          (troop_get_slot, "$temp_troop", "trp_temp_array_b", ":slot_no"),
	      (call_script,"script_get_custom_troop_info","$temp_troop"),
	      (call_script,"script_store_custom_troop_info_to_slot","trp_array_b"),

		  (troop_get_slot, ":skill_point", "$temp_troop", slot_custom_troop_sp),
	      (troop_get_slot, ":weapon_point",  "$temp_troop", slot_custom_troop_wp),
		  (troop_get_slot, ":attribute_point",  "$temp_troop", slot_custom_troop_ap),
		  (assign,"$skill_points",":skill_point"),
		  (assign,"$weapon_points",":weapon_point"),
		  (assign,"$attribute_points",":attribute_point"),
		  
          (start_presentation, "prsnt_custom_troop"),
        (try_end),
      ]),
	  
    (ti_on_presentation_run,
     [
      (set_fixed_point_multiplier, 1000),

	  #(call_script, "script_presentation_run"),	  

     (try_begin),
        (this_or_next|key_clicked, key_escape),
        (key_clicked, key_right_mouse_button),
        (presentation_set_duration, 0),
        (jump_to_menu, "mnu_camp_action"), 
      (try_end),]),	  
  ]),
## ZZ Custom Kingdom Troops end

## ZZ Custom Kingdom Troops begin
("custom_troop", prsntf_manual_end_only, mesh_troop_info_win_1, [
    (ti_on_presentation_load,
     [
      (set_fixed_point_multiplier, 1000),

	  #(call_script, "script_presentation_load"),
	  
        (store_mul, ":cur_troop", "$temp_troop", 2), #with weapons
		(create_image_button_overlay_with_tableau_material, "$g_presentation_credits_obj_1", -1, "tableau_game_party_window", ":cur_troop"),	
        (position_set_x, pos1, 1000),
        (position_set_y, pos1, 1000),
        (overlay_set_size, "$g_presentation_credits_obj_1", pos1),		
		(position_set_x, pos1, 0),
		(position_set_y, pos1, 355),
		(overlay_set_position, "$g_presentation_credits_obj_1", pos1),
		
		(str_store_string,s1,"@Attributes"),	
	    (create_text_overlay,"$g_presentation_credits_obj_2",s1,tf_left_align),
		(overlay_set_color, "$g_presentation_credits_obj_2", 0x000033),			
		(position_set_x, pos1, 80),
        (position_set_y, pos1, 240),
		(overlay_set_position, "$g_presentation_credits_obj_2", pos1),
        (position_set_x, pos1, 1000),
        (position_set_y, pos1, 1000),
        (overlay_set_size, "$g_presentation_credits_obj_2", pos1),
		
		(str_store_string,s1,"@Skills"),	
	    (create_text_overlay,"$g_presentation_credits_obj_3",s1,tf_left_align),
		(overlay_set_color, "$g_presentation_credits_obj_3", 0x003300),			
		(position_set_x, pos1, 400),
        (position_set_y, pos1, 510),
		(overlay_set_position, "$g_presentation_credits_obj_3", pos1),
        (position_set_x, pos1, 1000),
        (position_set_y, pos1, 1000),
        (overlay_set_size, "$g_presentation_credits_obj_3", pos1),

		(str_store_string,s1,"@Proficiencies"),	
	    (create_text_overlay,"$g_presentation_credits_obj_4",s1,tf_left_align),
		(overlay_set_color, "$g_presentation_credits_obj_4", 0x330000),			
		(position_set_x, pos1, 755),
        (position_set_y, pos1, 410),
		(overlay_set_position, "$g_presentation_credits_obj_4", pos1),
        (position_set_x, pos1, 1000),
        (position_set_y, pos1, 1000),
        (overlay_set_size, "$g_presentation_credits_obj_4", pos1),		

		(assign,reg40,"$attribute_points"),
		(assign,reg41,"$skill_points"),
		(assign,reg42,"$weapon_points"),
		
		(str_store_string,s1,"@Attribute points {reg40}"),	
	    (create_text_overlay,"$g_presentation_credits_obj_5",s1,tf_left_align),
		(overlay_set_color, "$g_presentation_credits_obj_5", 0x000033),			
		(position_set_x, pos1, 90),
        (position_set_y, pos1, 50),
		(overlay_set_position, "$g_presentation_credits_obj_5", pos1),
        (position_set_x, pos1, 1000),
        (position_set_y, pos1, 1000),
        (overlay_set_size, "$g_presentation_credits_obj_5", pos1),

		(str_store_string,s1,"@Skill points {reg41}"),	
	    (create_text_overlay,"$g_presentation_credits_obj_6",s1,tf_left_align),
		(overlay_set_color, "$g_presentation_credits_obj_6", 0x003300),			
		(position_set_x, pos1, 400),
        (position_set_y, pos1, 50),
		(overlay_set_position, "$g_presentation_credits_obj_6", pos1),
        (position_set_x, pos1, 1000),
        (position_set_y, pos1, 1000),
        (overlay_set_size, "$g_presentation_credits_obj_6", pos1),

		(str_store_string,s1,"@Weapon points {reg42}"),	
	    (create_text_overlay,"$g_presentation_credits_obj_7",s1,tf_left_align),
		(overlay_set_color, "$g_presentation_credits_obj_7", 0x330000),			
		(position_set_x, pos1, 750),
        (position_set_y, pos1, 100),
		(overlay_set_position, "$g_presentation_credits_obj_7", pos1),
        (position_set_x, pos1, 1000),
        (position_set_y, pos1, 1000),
        (overlay_set_size, "$g_presentation_credits_obj_7", pos1),

	    (create_text_overlay,"$g_presentation_credits_obj_8","str_troop_basic_info",tf_left_align),
		(overlay_set_color, "$g_presentation_credits_obj_8", 0x330000),			
		(position_set_x, pos1, 355),
        (position_set_y, pos1, 565),
		(overlay_set_position, "$g_presentation_credits_obj_8", pos1),
        (position_set_x, pos1, 1300),
        (position_set_y, pos1, 1300),
        (overlay_set_size, "$g_presentation_credits_obj_8", pos1),	

	    (create_text_box_overlay,"$g_presentation_credits_obj_9"),		
		(position_set_x, pos1, 462),
        (position_set_y, pos1, 700),
		(overlay_set_position, "$g_presentation_credits_obj_9", pos1),
        (position_set_x, pos1, 1300),
        (position_set_y, pos1, 1000),
        (overlay_set_size, "$g_presentation_credits_obj_9", pos1),		
		(str_store_troop_name_plural,s2,"$temp_troop"),
		(overlay_set_text,"$g_presentation_credits_obj_9",s2),
		
        (create_game_button_overlay, "$g_presentation_credits_obj_10", "@Save", 0),
        (position_set_x, pos1, 920),
        (position_set_y, pos1, 10),
        (overlay_set_position, "$g_presentation_credits_obj_10", pos1),
		
        (create_game_button_overlay, "$g_presentation_credits_obj_11", "@Reset", 0),
        (position_set_x, pos1, 760),
        (position_set_y, pos1, 10),
        (overlay_set_position, "$g_presentation_credits_obj_11", pos1),		
		
		(assign,":offset",0),
		(assign,":offset_2",0),		
		(assign,":pos_1_y",210),
		(assign,":pos_2_y",480),
		(assign,":pos_2_2_y",485),		
		(assign,":pos_3_y",370),		
		(position_set_x, pos1, 40),
		(position_set_x, pos2, 350),
		(position_set_x, pos3, 710),
		(position_set_x, pos4, 600),
		(position_set_x, pos5, 230),
		(position_set_x, pos6, 640),
		(position_set_x, pos7, 950),		
		(position_set_x, pos10, 850),
        (position_set_y, pos10, 850),
		(position_set_x, pos11, 1100),
        (position_set_y, pos11, 1100),
		(position_set_x, pos12, 300),
        (position_set_y, pos12, 300),
		(position_set_x, pos13, 200),
        (position_set_y, pos13, 200),		
		(try_for_range,":num",0,35),
			(store_sub, ":str_id", "str_str",  ":offset"),
			(str_store_string,s1,":str_id"),
			(val_add,":offset",1),
			(try_begin),
				(lt,":num",4),
				(position_set_y, pos1, ":pos_1_y"),
				(position_set_y, pos5, ":pos_1_y"),							
				(create_text_overlay,"$g_presentation_obj_20",s1,tf_left_align),
				(overlay_set_position, "$g_presentation_obj_20", pos1),
				(overlay_set_size, "$g_presentation_obj_20", pos11),				
				(overlay_set_color, "$g_presentation_obj_20", 0x000033),
				(store_add, ":num_2", ":num",  50),				
				(troop_set_slot,"trp_array_a",":num_2","$g_presentation_obj_20"),
				(create_image_button_overlay, "$g_presentation_obj_20","mesh_button1_up", "mesh_button1_down"),
				(overlay_set_position, "$g_presentation_obj_20", pos5),
				(overlay_set_size, "$g_presentation_obj_20", pos12),				
				(troop_set_slot,"trp_array_a",":num","$g_presentation_obj_20"),					
				(val_sub, ":pos_1_y",30),
			(else_try),
				(ge,":num",4),
				(lt,":num",28),				
				(store_add, ":str_id_2", "str_reg5",  ":offset_2"),
				(str_store_string,s2,":str_id_2"),
				(val_add,":offset_2",1),				
				(position_set_y, pos2,":pos_2_y"),
				(position_set_y, pos4,":pos_2_y"),
				(position_set_y, pos6,":pos_2_2_y"),				
				(create_text_overlay,"$g_presentation_obj_20",s1,tf_left_align),
				(overlay_set_position, "$g_presentation_obj_20", pos2),
				(overlay_set_size, "$g_presentation_obj_20", pos10),				
				(overlay_set_color, "$g_presentation_obj_20", 0x003300),
				(store_add, ":num_2", ":num",  50),					
				(troop_set_slot,"trp_array_a",":num_2","$g_presentation_obj_20"),
				(create_text_overlay,"$g_presentation_obj_20",s2,tf_left_align),	
				(overlay_set_position, "$g_presentation_obj_20", pos4),
				(overlay_set_size, "$g_presentation_obj_20", pos10),	
				(overlay_set_color, "$g_presentation_obj_20", 0x003300),
				(store_add, ":num_2", ":num",  100),				
				(troop_set_slot,"trp_array_a",":num_2","$g_presentation_obj_20"),
				(create_image_button_overlay, "$g_presentation_obj_20","mesh_button1_up", "mesh_button1_down"),
				(overlay_set_position, "$g_presentation_obj_20", pos6),
				(overlay_set_size, "$g_presentation_obj_20", pos13),			
				(troop_set_slot,"trp_array_a",":num","$g_presentation_obj_20"),				
				(val_sub, ":pos_2_y",17),	
				(val_sub, ":pos_2_2_y",17),					
			(else_try),
				(position_set_y, pos3,":pos_3_y"),
				(position_set_y, pos7,":pos_3_y"),				
				(create_text_overlay,"$g_presentation_obj_20",s1,tf_left_align),
				(overlay_set_position, "$g_presentation_obj_20", pos3),
				(overlay_set_size, "$g_presentation_obj_20", pos11),				
				(overlay_set_color, "$g_presentation_obj_20", 0x330000),
				(store_add, ":num_2", ":num",  50),				
				(troop_set_slot,"trp_array_a",":num_2","$g_presentation_obj_20"),
				(create_image_button_overlay, "$g_presentation_obj_20","mesh_button1_up", "mesh_button1_down"),
				(overlay_set_position, "$g_presentation_obj_20", pos7),
				(overlay_set_size, "$g_presentation_obj_20", pos12),			
				(troop_set_slot,"trp_array_a",":num","$g_presentation_obj_20"),				
				(val_sub, ":pos_3_y",30),				
			(try_end),
		(try_end),

		(try_for_range, ":num", 0,35),
			(store_add,":slot_no",":num",300),			
			(troop_set_slot,"trp_array_a",":slot_no",0),		
			(call_script,"script_custom_troop_button_action",":num",2,0),			
			(troop_get_slot,":show_or_hide","trp_array_a", ":slot_no"),
			(troop_get_slot,"$g_presentation_obj_20","trp_array_a", ":num"),			
			(try_begin),
				(eq,":show_or_hide",1),
				(overlay_set_display,"$g_presentation_obj_20",0),
			(try_end),
			(troop_set_slot,"trp_array_a",":num","$g_presentation_obj_20"),
			(troop_set_slot,"trp_array_a",":slot_no",0),				
		(try_end),
		
		(assign,":offset",0),
		(position_set_x, pos1, 960),
        (position_set_y, pos1, 565),
		(position_set_x, pos2, 800),
        (position_set_y, pos2, 800),		
		(try_for_range, ":num", 0,35),
			(store_add, ":str_id", "str_explanation_strength",  ":offset"),
			(str_store_string,s1,":str_id"),
			(val_add,":offset",1),
			(create_text_overlay,"$g_presentation_obj_20",s1,tf_right_align),
			(overlay_set_position, "$g_presentation_obj_20", pos1),
			(overlay_set_size, "$g_presentation_obj_20", pos2),
			(overlay_set_color, "$g_presentation_obj_20", 0x330000),			
			(overlay_set_display,"$g_presentation_obj_20",0),			
			(store_add, ":num_3", ":num",  150),				
			(troop_set_slot,"trp_array_a",":num_3","$g_presentation_obj_20"),
		(try_end),
		
		(assign,":offset",0),
		(position_set_x, pos1, 710),
        (position_set_y, pos1, 460),
		(position_set_x, pos2, 1000),
        (position_set_y, pos2, 1000),		
		(try_for_range, ":num", 4,28),
			(store_add, ":str_id", "str_reg5",  ":offset"),
			(str_store_string,s1,":str_id"),
			(val_add,":offset",1),
			(str_store_string,s2,"@Current:{s1}"),
			(try_begin),
				(gt,":num",24),
				(str_store_string,s3,"@{s2}^Base Attribute:CHA"),
			(else_try),
				(gt,":num",13),
				(str_store_string,s3,"@{s2}^Base Attribute:INT"),
			(else_try),
				(gt,":num",7),
				(str_store_string,s3,"@{s2}^Base Attribute:AGI"),
			(else_try),
				(str_store_string,s3,"@{s2}^Base Attribute:STR"),
			(try_end),				
			(create_text_overlay,"$g_presentation_obj_20",s3,tf_left_align),
			(overlay_set_position, "$g_presentation_obj_20", pos1),
			(overlay_set_size, "$g_presentation_obj_20", pos2),
			(overlay_set_color, "$g_presentation_obj_20", 0x330000),			
			(overlay_set_display,"$g_presentation_obj_20",0),			
			(store_add, ":num_4", ":num",  200),				
			(troop_set_slot,"trp_array_a",":num_4","$g_presentation_obj_20"),
		(try_end),		
		
      (presentation_set_duration, 999999),
     ]),
	 
      (ti_on_presentation_mouse_enter_leave,
       [(store_trigger_param_1, ":object"),
        (store_trigger_param_2, ":enter_leave"),

        (mouse_get_position, pos1),
        (position_get_x, ":pos_m_x", pos1),
		
		(try_begin),
			(eq, ":enter_leave", 0),
			(try_begin),
				(gt,":pos_m_x",700),
				(lt,":pos_m_x",950),			
				(try_for_range, ":num", 78,85),
					(troop_slot_eq, "trp_array_a", ":num", ":object"),
					(overlay_animate_to_color, ":object", 10, 0xFF0000),
					(store_add, ":num_3", ":num",  100),					
					(troop_get_slot,":str_obj","trp_array_a",":num_3"),
					(overlay_set_display,":str_obj",1),					
				(try_end),				
			(else_try),
				(gt,":pos_m_x",345),
				(lt,":pos_m_x",600),		
				(try_for_range, ":num", 54,78),
					(troop_slot_eq, "trp_array_a", ":num", ":object"),
					(overlay_animate_to_color, ":object", 10, 0x00FF00),
					(store_add, ":num_3", ":num",  100),					
					(troop_get_slot,":str_obj","trp_array_a",":num_3"),
					(overlay_set_display,":str_obj",1),	
					(store_add, ":num_4", ":num",  150),					
					(troop_get_slot,":str_obj","trp_array_a",":num_4"),
					(overlay_set_display,":str_obj",1),						
				(try_end),					
			(else_try),
				(gt,":pos_m_x",40),
				(lt,":pos_m_x",230),
				(eq, ":enter_leave", 0),			
				(try_for_range, ":num", 50,54),
					(troop_slot_eq, "trp_array_a", ":num", ":object"),
					(overlay_animate_to_color, ":object", 10, 0x0000FF),
					(store_add, ":num_3", ":num",  100),					
					(troop_get_slot,":str_obj","trp_array_a",":num_3"),
					(overlay_set_display,":str_obj",1),				
				(try_end),			
			(try_end),	
		(else_try),		
			(try_for_range, ":num", 78,85),
				(troop_slot_eq, "trp_array_a", ":num", ":object"),
				(overlay_animate_to_color, ":object", 10, 0x330000),
				(store_add, ":num_3", ":num",  100),					
				(troop_get_slot,":str_obj","trp_array_a",":num_3"),
				(overlay_set_display,":str_obj",0),				
			(try_end),
			(try_for_range, ":num", 54,78),
				(troop_slot_eq, "trp_array_a", ":num", ":object"),
				(overlay_animate_to_color, ":object", 10, 0x003300),
				(store_add, ":num_3", ":num",  100),					
				(troop_get_slot,":str_obj","trp_array_a",":num_3"),
				(overlay_set_display,":str_obj",0),
				(store_add, ":num_4", ":num",  150),					
				(troop_get_slot,":str_obj","trp_array_a",":num_4"),
				(overlay_set_display,":str_obj",0),					
			(try_end),
			(try_for_range, ":num", 50,54),
				(troop_slot_eq, "trp_array_a", ":num", ":object"),
				(overlay_animate_to_color, ":object", 10, 0x000033),
				(store_add, ":num_3", ":num",  100),					
				(troop_get_slot,":str_obj","trp_array_a",":num_3"),
				(overlay_set_display,":str_obj",0),				
			(try_end),			
        (try_end),
        ]),	

    (ti_on_presentation_event_state_change,
      [
        (store_trigger_param_1, ":object"),

				(assign,reg50,0),
				(assign,reg51,0),
		
		(try_for_range, ":num", 0,35),
			(troop_slot_eq, "trp_array_a", ":num", ":object"),
			(call_script,"script_custom_troop_button_action",":num",0,0),
            (start_presentation, "prsnt_custom_troop"),			
		(try_end),
		
		(try_begin),
			(eq,":object","$g_presentation_credits_obj_10"),
			(call_script,"script_store_custom_troop_info_to_slot","trp_array_c"),
			(try_for_range,":num",0,35),
				(troop_get_slot,":original_num","trp_array_b",":num"),
				(troop_get_slot,":current_num","trp_array_c",":num"),
				#(assign,reg50,":original_num"),
				#(assign,reg51,":current_num"),
				#(display_message,"@original_num:{reg50},current_num:{reg51}"),
				(try_begin),
					(gt,":current_num",":original_num"),
					(store_sub,":increment",":current_num",":original_num"),
					(call_script,"script_custom_troop_button_action",":num",1,":increment"),
				(try_end),
			(try_end),
			(call_script,"script_store_custom_troop_info_to_slot","trp_array_b"),
 

RoadWarriror

Master Knight
WBNWWF&S
buda devamı  :grin:
Code:
		    (troop_set_slot,"$temp_troop", slot_custom_troop_sp,"$skill_points"),
	        (troop_set_slot,"$temp_troop", slot_custom_troop_wp,"$weapon_points"),
		    (troop_set_slot,"$temp_troop", slot_custom_troop_ap,"$attribute_points"),
			
		(else_try),	
			(eq,":object","$g_presentation_credits_obj_9"),	
			(str_store_string,s2,s0),
			(troop_set_name, "$temp_troop", s2),
			(troop_set_plural_name, "$temp_troop", s2),
                        (store_sub,":offset","$temp_troop","trp_kingdom_recruit"),
                        (store_add,":faction_troop_name","fac_troop_name_temp_1",":offset"),
                        (faction_set_name,":faction_troop_name",s2),
		(else_try),	
			(eq,":object","$g_presentation_credits_obj_11"),

	      (call_script,"script_get_custom_troop_info","trp_kingdom_temp"),
			(call_script,"script_store_custom_troop_info_to_slot","trp_array_c"),

			(try_for_range,":num",0,35),
				(troop_get_slot,":original_num","trp_array_b",":num"),
				(troop_get_slot,":current_num","trp_array_c",":num"),
				(try_begin),
					(gt,":original_num",":current_num"),
					(store_sub,":temp_num",":current_num",":original_num"),
					(call_script,"script_custom_troop_button_action",":num",1,":temp_num"),
				(try_end),
			(try_end),
			(call_script,"script_get_custom_troop_info","$temp_troop"),
			(call_script,"script_store_custom_troop_info_to_slot","trp_array_b"),
			
			(store_character_level,":skill_point","$temp_troop"),
			(troop_set_slot,  "$temp_troop", slot_custom_troop_sp, ":skill_point"),			
		    (store_mul,":weapon_point",":skill_point",40),
			(troop_set_slot,  "$temp_troop", slot_custom_troop_wp, ":weapon_point"),				
			(store_div,":attribute_point",":skill_point",3),
			(troop_set_slot,  "$temp_troop", slot_custom_troop_ap, ":attribute_point"),			
			
		    (troop_get_slot, ":skill_point", "$temp_troop", slot_custom_troop_sp),
	        (troop_get_slot, ":weapon_point",  "$temp_troop", slot_custom_troop_wp),
		    (troop_get_slot, ":attribute_point",  "$temp_troop", slot_custom_troop_ap),
		    (assign,"$skill_points",":skill_point"),
		    (assign,"$weapon_points",":weapon_point"),
		    (assign,"$attribute_points",":attribute_point"),
			
			(store_character_level,reg45,"$temp_troop"),
			(troop_get_xp,reg47,"$temp_troop"),
			
			#(call_script,"script_store_custom_troop_info_to_slot","trp_array_c"),
			#(try_for_range,":num",0,35),
			#	(troop_get_slot,":original_num","trp_array_b",":num"),
			#	(troop_get_slot,":current_num","trp_array_c",":num"),
			#	(try_begin),
			#		(gt,":current_num",":original_num"),
			#		(store_sub,":increment",":current_num",":original_num"),
			#		(call_script,"script_custom_troop_button_action",":num",1,":increment"),
			#	(try_end),
			#(try_end),
			#(call_script,"script_store_custom_troop_info_to_slot","trp_array_b"),

		    #(troop_set_slot,"$temp_troop", slot_custom_troop_sp,"$skill_points"),
	        #(troop_set_slot,"$temp_troop", slot_custom_troop_wp,"$weapon_points"),
		    #(troop_set_slot,"$temp_troop", slot_custom_troop_ap,"$attribute_points"),			
			
            (start_presentation, "prsnt_custom_troop"),		
		(else_try),	
			(eq,":object","$g_presentation_credits_obj_1"),
			(assign,"$current_item",-1),		
			(call_script,"script_custom_troop_inventory_initialization","$temp_troop"),			
			(start_presentation, "prsnt_custom_troop_item"),			
		(try_end),
    ]),		
	 
    (ti_on_presentation_run,
     [
      (set_fixed_point_multiplier, 1000),

	  #(call_script, "script_presentation_run"),	  

     (try_begin),
        (this_or_next|key_clicked, key_escape),
        (key_clicked, key_right_mouse_button),
		(start_presentation, "prsnt_custom_kingdom_troop"), 
      (try_end),]),
  ]),
 
("custom_troop_item", 0, mesh_troop_info_win_2, [
    (ti_on_presentation_load,
     [
      (set_fixed_point_multiplier, 1000),

        (store_mul, ":cur_troop", "$temp_troop", 2), #with weapons
		(create_mesh_overlay_with_tableau_material, "$g_presentation_obj_5", -1, "tableau_game_party_window", ":cur_troop"),## tableau_game_character_sheet
        (position_set_x, pos1, 1000),
        (position_set_y, pos1, 1000),
        (overlay_set_size, "$g_presentation_obj_5", pos1),		
		(position_set_x, pos1, 300),
		(position_set_y, pos1, 20),
		(overlay_set_position, "$g_presentation_obj_5", pos1),	  
	  
        (create_button_overlay, "$g_presentation_obj_3", "@Next"),
        (position_set_x, pos1, 115),
        (position_set_y, pos1, 35),
        (overlay_set_position, "$g_presentation_obj_3", pos1),
        (position_set_x, pos1, 1000),
        (position_set_y, pos1, 1000),
        (overlay_set_area_size, "$g_presentation_obj_3", pos1),

		(call_script,"script_custom_troop_inventory_total_price","$temp_troop"),	
		(call_script,"script_custom_troop_inventory_total_weight","$temp_troop"),			
	    (create_text_overlay,"$g_presentation_obj_6","@Price {reg42}^Weight {reg43}",tf_left_align),		
		(position_set_x, pos1, 530),
        (position_set_y, pos1, 240),
		(overlay_set_position, "$g_presentation_obj_6", pos1),
        (position_set_x, pos1, 1000),
        (position_set_y, pos1, 1000),
        (overlay_set_size, "$g_presentation_obj_6", pos1),
		
        (assign, reg5, "$cheat_find_item_range_begin"),
        (store_add, reg6, "$cheat_find_item_range_begin", 96),
	    (val_min, reg6, "itm_items_end"),
	    (val_sub, reg6, 1),
				
	    (create_text_overlay,"$g_presentation_obj_4","@{reg5} to {reg6}",0),		
		(position_set_x, pos1, 110),
        (position_set_y, pos1, 700),
		(overlay_set_position, "$g_presentation_obj_4", pos1),
        (position_set_x, pos1, 1200),
        (position_set_y, pos1, 1000),
        (overlay_set_size, "$g_presentation_obj_4", pos1),	
		
        (assign, ":pos_y_0_0", 605),
        (assign, ":pos_y_0_1", 650),		
        (assign, ":pos_y_1_0", 605),
        (assign, ":pos_y_1_1", 650),
		(position_set_x, pos10, 890),
		(position_set_y, pos10, 830),		
        (assign, ":slot_no", 0),		
        (try_for_range, ":unused_width", 0, 3),
		  (try_for_range, ":unused_height", 0, 4),	  
			(try_begin),
				(is_between,":slot_no",0,4),
				(troop_get_slot, ":slot_item", "trp_array_d",":slot_no"),				
				(create_mesh_overlay_with_item_id, "$g_presentation_obj_1", ":slot_item"),
				(position_set_x, pos1, 598),
				(position_set_y, pos1,  ":pos_y_0_1"),
				(overlay_set_position, "$g_presentation_obj_1", pos1),
				(overlay_set_size, "$g_presentation_obj_1", pos10),				
				(troop_set_slot, "trp_array_c", ":slot_no", "$g_presentation_obj_1"),				
				(create_mesh_overlay, "$g_presentation_obj_1", "mesh_inv_slot"),				
				(position_set_x, pos1, 890),
				(position_set_y, pos1, 890),
				(overlay_set_size, "$g_presentation_obj_1", pos1),
				(position_set_x, pos1, 553),
				(position_set_y, pos1,  ":pos_y_0_0"),
				(overlay_set_position, "$g_presentation_obj_1", pos1),
				(try_begin),
					(eq,":slot_item",0),
					(overlay_set_alpha, "$g_presentation_obj_1", 100),
				(try_end),
				(store_add,":slot_offset",":slot_no",50),				
				(troop_set_slot, "trp_array_c",":slot_offset", "$g_presentation_obj_1"),				
				(val_sub,  ":pos_y_0_0", 89),
				(val_sub,  ":pos_y_0_1", 89),				
			(else_try),
				(is_between,":slot_no",4,7),
				(troop_get_slot, ":slot_item", "trp_array_d",":slot_no"),				
				(create_mesh_overlay_with_item_id, "$g_presentation_obj_1", ":slot_item"),
				(position_set_x, pos1, 495),
				(position_set_y, pos1,  ":pos_y_1_1"),
				(overlay_set_position, "$g_presentation_obj_1", pos1),
				(overlay_set_size, "$g_presentation_obj_1", pos10),					
				(troop_set_slot, "trp_array_c", ":slot_no", "$g_presentation_obj_1"),				
				(create_mesh_overlay, "$g_presentation_obj_1", "mesh_inv_slot"),					
				(position_set_x, pos1, 890),
				(position_set_y, pos1, 890),
				(overlay_set_size, "$g_presentation_obj_1", pos1),			
				(position_set_x, pos1, 450),
				(position_set_y, pos1,  ":pos_y_1_0"),
				(overlay_set_position, "$g_presentation_obj_1", pos1),
				(try_begin),
					(eq,":slot_item",0),
					(overlay_set_alpha, "$g_presentation_obj_1", 100),
				(try_end),			
				(store_add,":slot_offset",":slot_no",50),				
				(troop_set_slot, "trp_array_c", ":slot_offset", "$g_presentation_obj_1"),				
				(val_sub,  ":pos_y_1_0", 89),
				(val_sub,  ":pos_y_1_1", 89),
			(else_try),
				(eq,":slot_no",7),
				(troop_get_slot, ":slot_item", "trp_array_d",":slot_no"),				
				(create_mesh_overlay_with_item_id, "$g_presentation_obj_1", ":slot_item"),
				(position_set_x, pos1, 405),
				(position_set_y, pos1,  565),
				(overlay_set_position, "$g_presentation_obj_1", pos1),
				(overlay_set_size, "$g_presentation_obj_1", pos10),					
				(troop_set_slot, "trp_array_c", ":slot_no", "$g_presentation_obj_1"),				
				(create_mesh_overlay, "$g_presentation_obj_1", "mesh_inv_slot"),				
				(position_set_x, pos1, 890),
				(position_set_y, pos1, 830),
				(overlay_set_size, "$g_presentation_obj_1", pos1),			
				(position_set_x, pos1, 360),
				(position_set_y, pos1,  520),
				(overlay_set_position, "$g_presentation_obj_1", pos1),
				(try_begin),
					(eq,":slot_item",0),
					(overlay_set_alpha, "$g_presentation_obj_1", 100),
				(try_end),		
				(store_add,":slot_offset",":slot_no",50),					
				(troop_set_slot, "trp_array_c", ":slot_offset", "$g_presentation_obj_1"),				
			(else_try),
				(eq,":slot_no",8),
				(troop_get_slot, ":slot_item", "trp_array_d",":slot_no"),				
				(create_mesh_overlay_with_item_id, "$g_presentation_obj_1", ":slot_item"),
				(position_set_x, pos1, 405),
				(position_set_y, pos1,  365),
				(overlay_set_position, "$g_presentation_obj_1", pos1),
				(overlay_set_size, "$g_presentation_obj_1", pos10),					
				(troop_set_slot, "trp_array_c", ":slot_no", "$g_presentation_obj_1"),				
				(create_mesh_overlay, "$g_presentation_obj_1", "mesh_inv_slot"),				
				(position_set_x, pos1, 890),
				(position_set_y, pos1, 830),
				(overlay_set_size, "$g_presentation_obj_1", pos1),			
				(position_set_x, pos1, 360),
				(position_set_y, pos1,  320),
				(overlay_set_position, "$g_presentation_obj_1", pos1),
				(try_begin),
					(eq,":slot_item",0),
					(overlay_set_alpha, "$g_presentation_obj_1", 100),
				(try_end),
				(store_add,":slot_offset",":slot_no",50),				
				(troop_set_slot, "trp_array_c", ":slot_offset", "$g_presentation_obj_1"),			
			(try_end),
            (val_add, ":slot_no", 1),
			(assign,reg30,":slot_no"),
			#(display_message,"@{reg30}"),
          (try_end),			
        (try_end),		
		
        (str_clear, s0),
        (create_text_overlay, "$g_presentation_obj_1", s0, tf_scrollable),
        (position_set_x, pos1, 15),
        (position_set_y, pos1, 100),
        (overlay_set_position, "$g_presentation_obj_1", pos1),
        (position_set_x, pos1, 270),
        (position_set_y, pos1, 600),
        (overlay_set_area_size, "$g_presentation_obj_1", pos1),
        (set_container_overlay, "$g_presentation_obj_1"),
	  
        (assign, ":pos_x", 0),
        (assign, ":pos_y", 2575),
        (assign, ":slot_no", 0),
        (try_for_range, ":unused_height", 0, 32),
          (try_for_range, ":unused_width", 0, 3),
            (create_mesh_overlay, "$g_presentation_obj_1", "mesh_inv_slot"),
            (position_set_x, pos1, 890),
            (position_set_y, pos1, 830),
            (overlay_set_size, "$g_presentation_obj_1", pos1),
            (position_set_x, pos1, ":pos_x"),
            (position_set_y, pos1, ":pos_y"),
            (overlay_set_position, "$g_presentation_obj_1", pos1),
            (create_mesh_overlay, "$g_presentation_obj_1", "mesh_mp_inventory_choose"),
			(overlay_set_alpha, "$g_presentation_obj_1", 0),
            (position_set_x, pos1, 712),
            (position_set_y, pos1, 650),
            (overlay_set_size, "$g_presentation_obj_1", pos1),
            (position_set_x, pos1, ":pos_x"),
            (position_set_y, pos1, ":pos_y"),
            (overlay_set_position, "$g_presentation_obj_1", pos1),			
            (troop_set_slot, "trp_array_a", ":slot_no", "$g_presentation_obj_1"),
		    (store_add,":num_temp",":slot_no","$cheat_find_item_range_begin"),
			(store_add,":item_no",":num_temp","itm_no_item"),
			(try_begin),
				(lt, ":item_no", "itm_items_end"),
				(create_mesh_overlay_with_item_id, "$g_presentation_obj_1", ":item_no"),
				(position_set_x, pos1, 890),
				(position_set_y, pos1, 830),				
				(overlay_set_size, "$g_presentation_obj_1", pos1),
				(store_add, ":item_x", ":pos_x", 44),
				(store_add, ":item_y", ":pos_y", 41),
				(position_set_x, pos1, ":item_x"),
				(position_set_y, pos1, ":item_y"),
				(overlay_set_position, "$g_presentation_obj_1", pos1),	
				(troop_set_slot, "trp_array_b", ":num_temp", "$g_presentation_obj_1"),	
            (try_end),				
            (val_add, ":slot_no", 1),
			(val_add, ":pos_x", 89),
          (try_end),			
          (assign, ":pos_x", 0),
          (val_sub, ":pos_y", 83),
        (try_end),
		
        (set_container_overlay, -1),

        (position_set_x, pos2, 50),
        (position_set_y, pos2, 50),		
        (create_game_button_overlay, "$g_presentation_obj_11", "@Save", 0),	
        (position_set_x, pos1, 590),
        (position_set_y, pos1, 190),
        (overlay_set_position, "$g_presentation_obj_11", pos1),
        (overlay_set_area_size, "$g_presentation_obj_11", pos2),		
        (create_game_button_overlay, "$g_presentation_obj_12", "@Reset", 0),	
        (position_set_x, pos1, 590),
        (position_set_y, pos1, 130),
        (overlay_set_position, "$g_presentation_obj_12", pos1),
        (overlay_set_area_size, "$g_presentation_obj_12", pos2),
        (create_game_button_overlay, "$g_presentation_obj_13", "@Back", 0),	
        (position_set_x, pos1, 590),
        (position_set_y, pos1, 70),
        (overlay_set_position, "$g_presentation_obj_13", pos1),
        (overlay_set_area_size, "$g_presentation_obj_13", pos2),		
				
	  #(call_script, "script_presentation_load"),		
      (presentation_set_duration, 999999),
     ]),
	 
    (ti_on_presentation_event_state_change,
      [
        (store_trigger_param_1, ":object"),	
		
		(try_begin),
			(eq,":object","$g_presentation_obj_3"),
			(val_add, "$cheat_find_item_range_begin", 96),
			(try_begin),
				(ge, "$cheat_find_item_range_begin", "itm_items_end"),
				(assign, "$cheat_find_item_range_begin", 0),
			(try_end),
			(start_presentation, "prsnt_custom_troop_item"),
        (else_try),
			(eq,":object","$g_presentation_obj_11"),
			(call_script,"script_custom_troop_inventory_change","$temp_troop"),
			(call_script,"script_custom_troop_inventory_initialization","$temp_troop"),			
			(start_presentation, "prsnt_custom_troop_item"),
        (else_try),
			(eq,":object","$g_presentation_obj_12"),
			(assign,"$current_item",-1),			
			(call_script,"script_custom_troop_inventory_reset","$temp_troop"),			
			(start_presentation, "prsnt_custom_troop_item"),
        (else_try),
			(eq,":object","$g_presentation_obj_13"),
			(call_script,"script_custom_troop_inventory_reset","$temp_troop"),			
			(call_script,"script_get_custom_troop_info","$temp_troop"),
			(call_script,"script_store_custom_troop_info_to_slot","trp_array_b"),		
			(start_presentation, "prsnt_custom_troop"),			
        (try_end),		

	  ]),

    (ti_on_presentation_mouse_enter_leave,
      [
      (store_trigger_param_1, ":object"),
      (store_trigger_param_2, ":enter_leave"),

      (try_begin),
        (eq, ":enter_leave", 0),
        (try_for_range, ":slot_no", 0, 96),
          (troop_slot_eq, "trp_array_a", ":slot_no", ":object"),
		  (store_add,":num_temp",":slot_no","$cheat_find_item_range_begin"),
		  (store_add,":item_no",":num_temp","itm_no_item"),
          (try_begin),
			(lt, ":item_no", "itm_items_end"),
            (troop_get_slot, ":target_obj", "trp_array_b", ":num_temp"),
            (overlay_get_position, pos0, ":target_obj"),
            (show_item_details, ":item_no", pos0, 100),
            (assign, "$g_current_opened_item_details", ":num_temp"),
          (try_end),
        (try_end),
      (else_try),
        (try_for_range, ":slot_no", 0, 96),
          (troop_slot_eq, "trp_array_a", ":slot_no", ":object"),
          (try_begin),
            (eq, "$g_current_opened_item_details", ":num_temp"),
            (close_item_details),
          (try_end),
        (try_end),
      (try_end),
    ]),

    (ti_on_presentation_mouse_press,
     [
	  (store_trigger_param_1, ":object"),
      (store_trigger_param_2, ":mouse_state"),

      (try_begin),
        (eq, ":mouse_state", 0),	  
        (try_for_range, ":slot_no", 0, 96),
          (troop_slot_eq, "trp_array_a", ":slot_no", ":object"),		
		  (store_add,":num_temp",":slot_no","$cheat_find_item_range_begin"),
		  (store_add,":item_no",":num_temp","itm_no_item"),		
          (try_begin),
			(eq, "$current_item", -1),
			(lt, ":item_no", "itm_items_end"),
            (troop_get_slot, ":target_obj", "trp_array_b", ":num_temp"),
			(assign,"$current_item",":num_temp"),
			(overlay_set_display, ":target_obj", 0),			
			(create_mesh_overlay_with_item_id, "$g_presentation_credits_obj_1", "$current_item"),
			(position_set_x, pos1, 1000),
			(position_set_y, pos1, 1000),				
			(overlay_set_size, "$g_presentation_credits_obj_1", pos1),				
		  (else_try),
			(eq, "$current_item", ":num_temp"),
            (troop_get_slot, ":target_obj", "trp_array_b", ":num_temp"),			
			(overlay_set_display,":target_obj", 1),	
			(assign,"$g_presentation_credits_obj_1",-1),
			(assign,"$current_item",-1),
			(start_presentation, "prsnt_custom_troop_item"),			
          (try_end),
        (try_end),		  
        (try_for_range, ":slot_no", 0, 9),
		  (store_add,":slot_offset",":slot_no",50),
          (troop_slot_eq, "trp_array_c", ":slot_offset", ":object"),
		  (troop_get_slot, ":slot_item","trp_array_d", ":slot_no"),
		  (troop_get_slot, ":target_obj","trp_array_c", ":slot_no"),			  
          (try_begin),		  
			(gt,"$current_item",-1),
			(call_script,"script_custom_troop_item_judge","$current_item",":slot_no"),			
			(try_begin),
				(eq,reg0,1),
				(overlay_get_position, pos0, ":target_obj"),		  		  
				(overlay_set_position, "$g_presentation_credits_obj_1", pos0),
				(troop_set_slot, "trp_array_d", ":slot_no", "$current_item"),	
				(assign,"$current_item",-1),
				(call_script,"script_custom_troop_inventory_change","$temp_troop"),			
				(start_presentation, "prsnt_custom_troop_item"),
		  (else_try),
				(display_message,"@You can't equip this item. Wrong Place or too heavy!!"),
          (try_end),				
		  (else_try),
			(eq, "$current_item", -1),
			(overlay_set_display,":target_obj", 0),
			(assign,"$g_presentation_credits_obj_1",-1),
			(neq, ":slot_item", 0),
			(create_mesh_overlay_with_item_id, "$g_presentation_credits_obj_1", ":slot_item"),		
			(position_set_x, pos1, 1000),
			(position_set_y, pos1, 1000),				
			(overlay_set_size, "$g_presentation_credits_obj_1", pos1),
			(assign,"$current_item",":slot_item"),
			(troop_set_slot, "trp_array_d", ":slot_no", 0),	
			(overlay_set_alpha, ":object", 100),
          (try_end),		  
        (try_end),
	  (else_try),
        (eq, ":mouse_state", 1),
		(gt,"$current_item",-1),
		(assign,"$current_item",-1),
		(call_script,"script_custom_troop_inventory_change","$temp_troop"),
		(start_presentation, "prsnt_custom_troop_item"),		
      (try_end),
	  
	  ]),	  
			
    (ti_on_presentation_run,
     [
      (set_fixed_point_multiplier, 1000),
 
     #(try_begin),
     #   (this_or_next|key_clicked, key_escape),
     #   (key_clicked, key_right_mouse_button),
	 # 	(call_script,"script_custom_troop_inventory_reset","$temp_troop"),			
        #(presentation_set_duration, 0),
	   # (call_script,"script_get_custom_troop_info"),
	   # (call_script,"script_store_custom_troop_info_to_slot","trp_array_b"),		
       # (start_presentation, "prsnt_custom_troop"),
      #(try_end),

     (gt,"$current_item",-1),
     (mouse_get_position, pos1),
	 (overlay_set_position, "$g_presentation_credits_obj_1", pos1),
	  
	  #(call_script, "script_presentation_run"),	
	  
	  ]),
  ]),  
 
## ZZ Custom Kingdom Troops end
ve bu kadar bana ve mskimizd`e teşekkür etmeyi unutmayın iyi kodlamalar :grin: :grin:
 

RoadWarriror

Master Knight
WBNWWF&S
Azura34 said:
herseyi eksiksiz yaptım fkat oyuna girdiğimde krallıklar karışmış ve şehir kale kuşatması yok düşman olduğum halde hatayı nerde yaptım ?
Kodları tam olarak doğru bir şekilde yerleştirdin mi? Ayrıca build module de bir hata aldın mı?
 

Azuraa

Banned
Diplomasi modul sistem kullanıyorum bu hatayı alıyorum nasıl çözerim ?


kMvBRJ.png


 

RoadWarriror

Master Knight
WBNWWF&S
Azura34 said:
Diplomasi modul sistem kullanıyorum bu hatayı alıyorum nasıl çözerim ?


kMvBRJ.png


Diplomasi module systeminde kod çakışması olabilir. Normal bir module system ile dene bakalım, belki yanlış yapıyorsundur.
 
Top Bottom