Okay, I tried working from a blank slate. So I tried modding from native again, and I just added a small amount of code.
The error message that came up was:
Exporting troops data
Traceback (most recent call last):
File "process_troops.py", line 107, in <module>
save_troops()
File "process_troops.py", line 34, in save_troops
file.write("\ntrp_%s %s %s %s %d %d %d %d %d %d\n "%(convert_to_identifier(troop[0]),replace_spaces(troop[1]),replace_spaces(troop[2]), replace_spaces(str(troop[13])), troop[3],troop[4],troop[5], troop[6], troop[14], troop[15]))
File "C:\Users\Adam K L\Downloads\mb_warband_module_system_117133\Module_system 1.171\process_common.py", line 30, in replace_spaces
return string.replace(string.replace(s0,"\t","_")," ","_")
File "C:\Python27\lib\string.py", line 521, in replace
return s.replace(old, new, maxreplace)
AttributeError: 'int' object has no attribute 'replace'
I added the code below to module-troops.py
插入代码块:
["imperial_elite_knight","Imperial Praefect",tf_guarantee_armor|tf_guarantee_boots|tf_guarantee_shield|tf_guarantee_helmet|tf_mounted|tf_guarantee_horse|tf_guarantee_gloves,0,0,fac_kingdom_5,
[itm_plate_armor,itm_coat_of_plates,itm_coat_of_plates,itm_heavy_lance,itm_bascinet_3,itm_bascinet_2,itm_nordic_warlord_helmet,itm_steel_shield,itm_arabian_sword_d,itm_sword_medieval_d_long,itm_morningstar,itm_hunter],
str_17|agi_20|int_10|cha_15|level(31),wp(180),knows_riding_8|knows_shield_8|knows_power_strike_6|knows_ironflesh_5|knows_tactics_6,swadian_face_young_1,swadian_face_old_2],
Does anyone know what exactly is the problem with the code?