module build error

Users who are viewing this thread

Estepki

Recruit
Ive just changed every troop class in the module file and when I try to build it I get a very long error message... this is a sample from it
Code:
Initializing...
Error with upgrade2 def: Unable to find troop3-id: grp1_crossbowman
Error with upgrade def: Unable to find troop1-id: grp1_longbowman
Error with upgrade def: Unable to find troop1-id: grp1_crossbowman
Error with upgrade def: Unable to find troop1-id: grp1_heavy_crossbowman
Traceback (most recent call last):
  File "process_global_variables.py", line 11, in <module>
    from process_operations import *
  File "D:\Taleworlds\mymod\ModuleSystem mymod\process_operations.py", line 17, in <module>
    from module_party_templates import *
  File "D:\Taleworlds\mymod\ModuleSystem mymod\module_party_templates.py", line 108, in <module>
    ("kingdom_2_reinforcements_b", "kingdom_2_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_grp2_javelineer,2,6),(trp_grp2_pikeman,3,5),(trp_grp2_guard,1,3)]),
NameError: name 'trp_grp2_pikeman' is not defined
Exporting strings...

I have also added troop upgrades
3 of these upgrades are

Code:
upgrade(troops,"grp1_townsman","grp1_militia")
upgrade(troops,"grp1_militia","grp1_recruit")
upgrade2(troops,"grp1_recruit","grp1_infantry","grp1_bowman")


whats going on? any ideas?
 
Can you paste the modifications you did in troops (or if you did a very long part, just a sample) so we can see if you did anything wrong.

And did you modify party templates?

Did you delete  grp2_pikeman
 
I fixed the pikeman problem... but still havnt fxed the ID problem... and I found another one :S

I havnt edited equpment yet.
here is some of the troops I added (note: I removed almost all the factions native troops)

Code:
["grp1_townsman","Townsman","Townsmen",tf_guarantee_armor,0,0,fac_neutral,
   [itm_scythe,itm_hatchet,itm_pickaxe,itm_club,itm_stones,itm_tab_shield_heater_a,itm_leather_cap,itm_felt_hat,itm_felt_hat,
    itm_shirt,itm_coarse_tunic,itm_leather_apron,itm_nomad_boots,itm_wrapping_boots],
   def_attrib|level(4),wp(60),knows_common,swadian_face_younger_1, swadian_face_middle_2],

  ["grp1_militia","Militia","Militia",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_shield,0,0,fac_neutral,
   [itm_bolts,itm_spiked_club,itm_fighting_pick,itm_boar_spear,itm_hunting_crossbow,itm_tab_shield_heater_a,
    itm_padded_cloth,itm_leather_armor,itm_leather_cap,itm_arming_cap,itm_padded_coif,itm_ankle_boots,itm_wrapping_boots],
   def_attrib|level(9),wp(75),knows_common,swadian_face_young_1, swadian_face_old_2],

also. all the city factions have been switched....
untitled-1.jpg

all I have done is changed the factions displayed name(module_factions), troops(module_troops), troop upgrades(module_troops), party faction reenforcement units(module_party_templates)
But Im not sure what part of the code controls the city assignment..... so... heh...

I need to change the units in Module_scripts correct?

 
make sure you try running build_module.bat multiple times, sometimes it takes a few attempts until all errors go away.  If you are still having problems try a program like Notepad++ which can 'search all files' for those specific troop id's that are causing problems.
 
Ive fiddled around with the files and have now narrowed it down to two errors :grin:

and How does the tier code work? its erroring because the units no longer exist but Im not sure what to replace them with...
# Cultures:
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_1_troop, "trp_swadian_recruit"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_2_troop, "trp_swadian_militia"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_3_troop, "trp_swadian_footman"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_4_troop, "trp_swadian_infantry"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_5_troop, "trp_swadian_knight"),


      (faction_set_slot, "fac_culture_2", slot_faction_tier_1_troop, "trp_vaegir_recruit"),
      (faction_set_slot, "fac_culture_2", slot_faction_tier_2_troop, "trp_vaegir_footman"),
      (faction_set_slot, "fac_culture_2", slot_faction_tier_3_troop, "trp_vaegir_veteran"),
      (faction_set_slot, "fac_culture_2", slot_faction_tier_4_troop, "trp_vaegir_infantry"),
      (faction_set_slot, "fac_culture_2", slot_faction_tier_5_troop, "trp_vaegir_knight"),

      (faction_set_slot, "fac_culture_3", slot_faction_tier_1_troop, "trp_khergit_tribesman"),
      (faction_set_slot, "fac_culture_3", slot_faction_tier_2_troop, "trp_khergit_skirmisher"),
      (faction_set_slot, "fac_culture_3", slot_faction_tier_3_troop, "trp_khergit_horseman"),
      (faction_set_slot, "fac_culture_3", slot_faction_tier_4_troop, "trp_khergit_horse_archer"),
      (faction_set_slot, "fac_culture_3", slot_faction_tier_5_troop, "trp_khergit_veteran_horse_archer"),

      (faction_set_slot, "fac_culture_4", slot_faction_tier_1_troop, "trp_nord_recruit"),
      (faction_set_slot, "fac_culture_4", slot_faction_tier_2_troop, "trp_nord_footman"),
      (faction_set_slot, "fac_culture_4", slot_faction_tier_3_troop, "trp_nord_trained_footman"),
      (faction_set_slot, "fac_culture_4", slot_faction_tier_4_troop, "trp_nord_warrior"),
      (faction_set_slot, "fac_culture_4", slot_faction_tier_5_troop, "trp_nord_veteran"),

      (faction_set_slot, "fac_culture_5", slot_faction_tier_1_troop, "trp_rhodok_tribesman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_2_troop, "trp_rhodok_spearman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_3_troop, "trp_rhodok_trained_spearman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_4_troop, "trp_rhodok_veteran_spearman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_5_troop, "trp_rhodok_sergeant"),


there are another 3 errors whining about troop id being -1

there is this...
untitled2.jpg
ive had a look through some of the module files and cant find where this is...

and this:
script setup_party_meeting
Game menu menu_simple_encounter

and this:
script process_hero_ai
script process_kingdom_party_ai

I havnt touched the script files and dont know what else it calls on.

also, I can't recruit anyone from villages anymore O_O


EDIT: the map problem has been fixed without me doing anything..... i think o_O
 
Back
Top Bottom