Items in wrong itemslot

Users who are viewing this thread

Fallon

Regular
Hello,

Here I'm trying to make a Samurai themed multiplayer module, and please be patient with me I'm very new to modding.
Now I've followed some tutorials to figure out the basics and so far I've made a new faction and added some troops.
My problem right now is that only the ai are spawning and the new troop class isn't showing at all at the ''choose a troop'' screen.

I've tried to pinpoint the problem down by trying if switching an allready existing troop to the faction and by creating a new testing troop and adding it to the faction.
The existing troop worked, the testing troop didn't. I believe I maybe have to edit another file to make my troops actually work, now to figure out which or what the other problem might be.

Anyone able to help me with this?


Thanks in advance,

Natascha ''Fallon'' de Jong.
 
I assume you've only added the troop in module_troops?

If so, you also have to make them available in module_scripts. You can check this tutorial how to do that.

http://forums.taleworlds.com/index.php?topic=116286.0
 
I did make some items available for them in the module_scripts file.

I have it like so, so far:
#1c- Samurai
      (call_script, "script_multiplayer_set_item_available_for_troop", "itm_strange_helmet", "trp_samurai_multiplayer"),
      (call_script, "script_multiplayer_set_item_available_for_troop", "itm_strange_armor", "trp_samurai_multiplayer"),
      (call_script, "script_multiplayer_set_item_available_for_troop", "itm_strange_boots", "trp_samurai_multiplayer"),
      (call_script, "script_multiplayer_set_item_available_for_troop", "itm_strange_short_sword", "trp_samurai_multiplayer"),
      (call_script, "script_multiplayer_set_item_available_for_troop", "itm_strange_great_sword", "trp_samurai_multiplayer"),
 
Not sure what you mean, but I put it in module_troops like so:

#Multiplayer troops (they must have the base items only, nothing else)
  ["ashigaru_multiplayer","Ashigaru","Ashigaru",tf_guarantee_all,0,0,fac_kingdom_8,
  [itm_bolts,itm_crossbow,itm_sword_medieval_b_small,itm_tab_shield_heater_a,itm_red_shirt,itm_ankle_boots],
  str_14 | agi_15 |def_attrib_multiplayer|level(19),wpe(80,80,80,80),knows_common_multiplayer|knows_ironflesh_2|knows_athletics_4|knows_shield_2|knows_power_strike_1|knows_power_draw_5,khergit_face_middle_1, khergit_face_older_2],
  ["mounted_ashigaru_multiplayer","Mounted Ashigaru","Mounted Ashigaru",tf_mounted|tf_guarantee_all,0,0,fac_kingdom_8,
  [itm_lance,itm_sword_medieval_a,itm_tab_shield_heater_a,
    itm_red_tunic,itm_ankle_boots,itm_saddle_horse],
  str_14 | agi_15 |def_attrib_multiplayer|level(20),wp_melee(80),knows_common_multiplayer|knows_riding_5|knows_ironflesh_2|knows_shield_2|knows_power_strike_1|knows_athletics_4|knows_power_draw_5|knows_horse_archery_3,khergit_face_middle_1, khergit_face_older_2],
  ["samurai_multiplayer","Samurai","Samurai",tf_guarantee_all,0,0,fac_kingdom_8,
  [itm_strange_armor,itm_strange_boots,itm_strange_helmet,itm_strange_short_sword],
  str_17 | agi_17 |def_attrib_multiplayer|level(20),wpex(105,130,110,40,60,110),knows_common_multiplayer|knows_ironflesh_6|knows_shield_4|knows_power_strike_4|knows_athletics_2,khergit_face_middle_1, khergit_face_older_2],
  ["mounted_samurai_multiplayer","Mounted Samurai","Mounted Samurai",tf_mounted|tf_guarantee_all,0,0,fac_kingdom_8,
  [itm_strange_armor,itm_strange_boots,itm_strange_helmet,itm_saddle_horse],
  str_17 | agi_17 |def_attrib_multiplayer|level(20),wp_melee(110),knows_common_multiplayer|knows_riding_5|knows_ironflesh_6|knows_shield_4|knows_power_strike_4|knows_athletics_2,khergit_face_middle_1, khergit_face_older_2],
  ["shinobi_multiplayer","Shinobi","Shinobi",tf_guarantee_all,0,0,fac_kingdom_8,
  [itm_sword_medieval_a,itm_tab_shield_heater_a,itm_red_tunic,itm_ankle_boots],
  str_15 | agi_20 |def_attrib_multiplayer|level(20),wpex(105,130,110,40,60,110),knows_common_multiplayer|knows_ironflesh_3|knows_shield_4|knows_power_strike_3|knows_power_throw_5|knows_athletics_4,khergit_face_middle_1, khergit_face_older_2],


  ["swadian_crossbowman_multiplayer","Swadian Crossbowman","Swadian Crossbowmen",tf_guarantee_all,0,0,fac_kingdom_1,

with in the end thus the swadian troops following.
 
OK, troops are showing again.
Next problem:

I've been adding new and existing items to the MP store and as base items for characters but the new items I've added aren't showing at all and the existing armor items are showing in the weapon slots. I've put the .brf files in the Resources map and edited the module.ini to make that all work, it doesn't give me an error anymore at startup.

I've added the base items to the troops in the module_troop file and followed some tutorials to also add everything to the scripts file.

Code:
Module_scripts file:

      (store_sub, ":japan_price_slot", "fac_kingdom_8", npc_kingdoms_begin),
      (val_add, ":japan_price_slot", slot_item_multiplayer_faction_price_multipliers_begin),


      (item_set_slot, "itm_strange_sword", ":japan_price_slot", 80),
      (item_set_slot, "itm_strange_great_sword", ":japan_price_slot", 90),
      (item_set_slot, "itm_strange_helmet", ":japan_price_slot", 0),
      (item_set_slot, "itm_strange_short_sword", ":japan_price_slot", 70),
      (item_set_slot, "itm_tamahagane_katana", ":japan_price_slot", 80),
      (item_set_slot, "itm_hon_iyozane_dou", ":japan_price_slot", 80),
      (item_set_slot, "itm_hon_iyozane_suneate", ":japan_price_slot", 80),
      (item_set_slot, "itm_hon_iyozane_kote", ":japan_price_slot", 90),
      (item_set_slot, "itm_hon_iyozane_kabuto", ":japan_price_slot", 80),



      (item_set_slot, "itm_hon_iyozane_dou", slot_item_multiplayer_item_class, multi_item_class_type_light_armor),
      (item_set_slot, "itm_strange_armor", slot_item_multiplayer_item_class, multi_item_class_type_light_armor),
 (etc)
      


#1c- Samurai
      (call_script, "script_multiplayer_set_item_available_for_troop", "itm_strange_helmet", "trp_samurai_multiplayer"),
      (call_script, "script_multiplayer_set_item_available_for_troop", "itm_strange_armor", "trp_samurai_multiplayer"),
      (call_script, "script_multiplayer_set_item_available_for_troop", "itm_strange_boots", "trp_samurai_multiplayer"),
      (call_script, "script_multiplayer_set_item_available_for_troop", "itm_strange_short_sword", "trp_samurai_multiplayer"),
      (call_script, "script_multiplayer_set_item_available_for_troop", "itm_strange_great_sword", "trp_samurai_multiplayer"),
      (call_script, "script_multiplayer_set_item_available_for_troop", "itm_tamahagane_katana", "trp_samurai_multiplayer"),
      (call_script, "script_multiplayer_set_item_available_for_troop", "itm_hon_iyozane_dou", "trp_samurai_multiplayer"),
      (call_script, "script_multiplayer_set_item_available_for_troop", "itm_hon_iyozane_suneate", "trp_samurai_multiplayer"),
      (call_script, "script_multiplayer_set_item_available_for_troop", "itm_hon_iyozane_kote", "trp_samurai_multiplayer"),
      (call_script, "script_multiplayer_set_item_available_for_troop", "itm_hon_iyozane_kabuto", "trp_samurai_multiplayer"),


module_troops file:      

  ["samurai_multiplayer","Samurai","Samurai",tf_guarantee_all,0,0,fac_kingdom_8,
   [itm_strange_armor,itm_strange_boots,itm_strange_helmet,itm_strange_short_sword],
   str_17 | agi_17 |def_attrib_multiplayer|level(20),wpex(105,130,110,40,60,110),knows_common_multiplayer|knows_ironflesh_6|knows_shield_4|knows_power_strike_4|knows_athletics_2,khergit_face_middle_1, khergit_face_older_2],
  ["mounted_samurai_multiplayer","Mounted Samurai","Mounted Samurai",tf_mounted|tf_guarantee_all,0,0,fac_kingdom_8,
   [itm_strange_armor,itm_strange_boots,itm_strange_helmet,itm_saddle_horse],
   str_17 | agi_17 |def_attrib_multiplayer|level(20),wp_melee(110),knows_common_multiplayer|knows_riding_5|knows_ironflesh_6|knows_shield_4|knows_power_strike_4|knows_athletics_2,khergit_face_middle_1, khergit_face_older_2],

Put the relevant texts in code.
 
Back
Top Bottom