Error with compiling files

Users who are viewing this thread

Someone please help me. Basically, I'm working on a mod, and I compiled my files but there's this error coming from some relation between process-troops and process-common. I haven't touched either process files, having only edited module-troops, module-parties, and module-scripts. Can someone help? I attached my module folder in a mega link. Also, when I try to run the game, it shows up having some error in troops.txt, and when I check troops.txt its oddly short, cutting off a large amount of other troops which were added by rhe game.

This has not happened before, when I was editing my previous mod. Could someone please check my code for errors and maybe find out the root of the problem?

 
You need to give more informations: What is the base for your mod (Native, VC, Diplomacy, etc.) and what did you do before the error appeared? 'I have only edited module_troops, module_parties and module_scripts' is not helping since misstakes already at one can cause errors.

So the way to go is:
- Remove the latest edits which you have done (Good practise at modding is, to make save copies: You have a fine compiled version in which all changes work? Make a copy of it to have a base to start from when things get messed up)
- Post the error messages which are appearing.

Nobody will just pick up your code and look at it for errors. You started to mod, you have to find and solve the problems. All we can do is giving advise at which places to look for the errors.
 
Upvote 0
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

Code:
  ["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?
 
Last edited by a moderator:
Upvote 0
Back
Top Bottom