Unarmed Troop error?

Users who are viewing this thread

PotatoKat

Knight at Arms
I think I broke module_troop so I get this, am I correct? Is there are way to fix this?


Initializing...
Traceback (most recent call last):
  File "process_global_variables.py", line 11, in <module>
    from process_operations import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\process_o
perations.py", line 14, in <module>
    from module_troops import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\module_tr
oops.py", line 209, in <module>
    ["unarmed_troop","Unarmed Troop","Unarmed Troops",tf_hero,no_scene,reserved,
fac_commoners,[itm_arrows,itm_short_bow],def_attrib|str_14,0,knows_common|knows_
power_draw_2,0],
NameError: name 'itm_arrows' is not defined
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Traceback (most recent call last):
  File "process_map_icons.py", line 6, in <module>
    from process_operations import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\process_o
perations.py", line 14, in <module>
    from module_troops import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\module_tr
oops.py", line 209, in <module>
    ["unarmed_troop","Unarmed Troop","Unarmed Troops",tf_hero,no_scene,reserved,
fac_commoners,[itm_arrows,itm_short_bow],def_attrib|str_14,0,knows_common|knows_
power_draw_2,0],
NameError: name 'itm_arrows' is not defined
Exporting faction data...
Exporting item data...
Traceback (most recent call last):
  File "process_items.py", line 54, in <module>
    save_python_header()
  File "process_items.py", line 14, in save_python_header
    file.write("itm_%s = %d\n"%(convert_to_identifier(items[i_item][0]),i_item))

  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\process_c
ommon.py", line 5, in convert_to_identifier
    s1 = string.replace(s0," ","_")
  File "C:\Python26\lib\string.py", line 517, in replace
    return s.replace(old, new, maxsplit)
AttributeError: 'list' object has no attribute 'replace'
Exporting scene data...
Traceback (most recent call last):
  File "process_scenes.py", line 15, in <module>
    from process_operations import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\process_o
perations.py", line 14, in <module>
    from module_troops import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\module_tr
oops.py", line 209, in <module>
    ["unarmed_troop","Unarmed Troop","Unarmed Troops",tf_hero,no_scene,reserved,
fac_commoners,[itm_arrows,itm_short_bow],def_attrib|str_14,0,knows_common|knows_
power_draw_2,0],
NameError: name 'itm_arrows' is not defined
Traceback (most recent call last):
  File "process_troops.py", line 4, in <module>
    from module_troops import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\module_tr
oops.py", line 209, in <module>
    ["unarmed_troop","Unarmed Troop","Unarmed Troops",tf_hero,no_scene,reserved,
fac_commoners,[itm_arrows,itm_short_bow],def_attrib|str_14,0,knows_common|knows_
power_draw_2,0],
NameError: name 'itm_arrows' is not defined
Exporting particle data...
Traceback (most recent call last):
  File "process_scene_props.py", line 7, in <module>
    from process_operations import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\process_o
perations.py", line 14, in <module>
    from module_troops import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\module_tr
oops.py", line 209, in <module>
    ["unarmed_troop","Unarmed Troop","Unarmed Troops",tf_hero,no_scene,reserved,
fac_commoners,[itm_arrows,itm_short_bow],def_attrib|str_14,0,knows_common|knows_
power_draw_2,0],
NameError: name 'itm_arrows' is not defined
Traceback (most recent call last):
  File "process_tableau_materials.py", line 8, in <module>
    from process_operations import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\process_o
perations.py", line 14, in <module>
    from module_troops import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\module_tr
oops.py", line 209, in <module>
    ["unarmed_troop","Unarmed Troop","Unarmed Troops",tf_hero,no_scene,reserved,
fac_commoners,[itm_arrows,itm_short_bow],def_attrib|str_14,0,knows_common|knows_
power_draw_2,0],
NameError: name 'itm_arrows' is not defined
Traceback (most recent call last):
  File "process_presentations.py", line 8, in <module>
    from process_operations import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\process_o
perations.py", line 14, in <module>
    from module_troops import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\module_tr
oops.py", line 209, in <module>
    ["unarmed_troop","Unarmed Troop","Unarmed Troops",tf_hero,no_scene,reserved,
fac_commoners,[itm_arrows,itm_short_bow],def_attrib|str_14,0,knows_common|knows_
power_draw_2,0],
NameError: name 'itm_arrows' is not defined
Traceback (most recent call last):
  File "process_party_tmps.py", line 2, in <module>
    from module_party_templates import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\module_pa
rty_templates.py", line 103, in <module>
    ("kingdom_1_reinforcements_a", "kingdom_1_reinforcements_a", 0, 0, fac_commo
ners, 0, [(trp_royal_archer,2,6),(trp_royal_spearman,4,7)]),
NameError: name 'trp_royal_archer' is not defined
Traceback (most recent call last):
  File "process_parties.py", line 6, in <module>
    from process_operations import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\process_o
perations.py", line 14, in <module>
    from module_troops import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\module_tr
oops.py", line 209, in <module>
    ["unarmed_troop","Unarmed Troop","Unarmed Troops",tf_hero,no_scene,reserved,
fac_commoners,[itm_arrows,itm_short_bow],def_attrib|str_14,0,knows_common|knows_
power_draw_2,0],
NameError: name 'itm_arrows' is not defined
Exporting quest data...
Traceback (most recent call last):
  File "process_scripts.py", line 7, in <module>
    from process_operations import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\process_o
perations.py", line 14, in <module>
    from module_troops import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\module_tr
oops.py", line 209, in <module>
    ["unarmed_troop","Unarmed Troop","Unarmed Troops",tf_hero,no_scene,reserved,
fac_commoners,[itm_arrows,itm_short_bow],def_attrib|str_14,0,knows_common|knows_
power_draw_2,0],
NameError: name 'itm_arrows' is not defined
Traceback (most recent call last):
  File "process_mission_tmps.py", line 5, in <module>
    from module_mission_templates import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\module_mi
ssion_templates.py", line 34, in <module>
    pilgrim_disguise = [itm_pilgrim_hood,itm_pilgrim_disguise,itm_practice_staff
, itm_throwing_daggers]
NameError: name 'itm_pilgrim_hood' is not defined
Traceback (most recent call last):
  File "process_game_menus.py", line 8, in <module>
    from process_operations import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\process_o
perations.py", line 14, in <module>
    from module_troops import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\module_tr
oops.py", line 209, in <module>
    ["unarmed_troop","Unarmed Troop","Unarmed Troops",tf_hero,no_scene,reserved,
fac_commoners,[itm_arrows,itm_short_bow],def_attrib|str_14,0,knows_common|knows_
power_draw_2,0],
NameError: name 'itm_arrows' is not defined
Traceback (most recent call last):
  File "process_simple_triggers.py", line 5, in <module>
    from process_operations import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\process_o
perations.py", line 14, in <module>
    from module_troops import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\module_tr
oops.py", line 209, in <module>
    ["unarmed_troop","Unarmed Troop","Unarmed Troops",tf_hero,no_scene,reserved,
fac_commoners,[itm_arrows,itm_short_bow],def_attrib|str_14,0,knows_common|knows_
power_draw_2,0],
NameError: name 'itm_arrows' is not defined
Traceback (most recent call last):
  File "process_dialogs.py", line 9, in <module>
    from process_operations import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\process_o
perations.py", line 14, in <module>
    from module_troops import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\module_tr
oops.py", line 209, in <module>
    ["unarmed_troop","Unarmed Troop","Unarmed Troops",tf_hero,no_scene,reserved,
fac_commoners,[itm_arrows,itm_short_bow],def_attrib|str_14,0,knows_common|knows_
power_draw_2,0],
NameError: name 'itm_arrows' is not defined
Traceback (most recent call last):
  File "process_global_variables_unused.py", line 3, in <module>
    from process_operations import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\process_o
perations.py", line 14, in <module>
    from module_troops import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\module_tr
oops.py", line 209, in <module>
    ["unarmed_troop","Unarmed Troop","Unarmed Troops",tf_hero,no_scene,reserved,
fac_commoners,[itm_arrows,itm_short_bow],def_attrib|str_14,0,knows_common|knows_
power_draw_2,0],
NameError: name 'itm_arrows' is not defined
Traceback (most recent call last):
  File "process_tags_unused.py", line 3, in <module>
    from process_operations import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\process_o
perations.py", line 14, in <module>
    from module_troops import *
  File "D:\Program Files (x86)\Mount&Blade\Modules\Castle\ModuleSystem\module_tr
oops.py", line 209, in <module>
    ["unarmed_troop","Unarmed Troop","Unarmed Troops",tf_hero,no_scene,reserved,
fac_commoners,[itm_arrows,itm_short_bow],def_attrib|str_14,0,knows_common|knows_
power_draw_2,0],
NameError: name 'itm_arrows' is not defined

______________________________

Script processing has ended.
Press any key to exit. . .
 
Sir William the Brave said:
I don't get it, there is item called arrows but it still says itm_arrows is not defined.

Can you send the item's code please?
 
Sir William the Brave said:
Dragos said:
Sir William the Brave said:
I don't get it, there is item called arrows but it still says itm_arrows is not defined.

Can you send the item's code please?
How do I give you the code?

Open module_items.py, search for "itm_arrows" and if it exists, copy paste here.
 
add a new item on your module_items.py

compile the game

it will add a new entry on ID_items.py

now add that item to your troop on module_troops.py

compile the game
 
Or... if there are a lot of troops that uses itm_arrows, open up ID_items.py, scroll to the bottom, add a new empty line and paste this:
Code:
itm_arrows = 99999
Then recompile twice and it should work.

NOTE: if item "arrows" is missing from module_items, add it then do the above thing.
 
Dragos said:
Sir William the Brave said:
Dragos said:
Sir William the Brave said:
I don't get it, there is item called arrows but it still says itm_arrows is not defined.

Can you send the item's code please?
How do I give you the code?

Open module_items.py, search for "itm_arrows" and if it exists, copy paste here.

["arrows","Arrows", [("arrow",0),("flying_missile",ixmesh_flying_ammo),("quiver", ixmesh_carry)], itp_type_arrows|itp_merchandise, itcf_carry_quiver_back, 72,weight(3)|abundance(160)|weapon_length(95)|thrust_damage(1,pierce)|max_ammo(30),imodbits_missile],
 
It seems okay. Can you delete itm_arrows from the troop's items, build module and then add it back to the troop?
 
Back
Top Bottom