vako
Sergeant at Arms

Ok. I've spent two weeks setting up new troops, worked out all the crap save this one last glitch. If anyone knows how I might fix it, I'll be forever grateful. If it's unfixable I'll scream, cry, swear profusely in several languages, throw sharp, jagged objects at the computer and seriously consider giving up this whole modding thing 'cause losing a month of work gives a body a serious pain in the butt.
The error looks like this: (typed out, because I have lost my screenshots file)
File "process_troops.py", line 19, in save_troops
file.write("\ntrp_%s %s %s %d %d %d %d\n "%(convert_to_identifier(troop[0]),replace_spaces(troop[1]),replace_spaces(troop[2]),troop[3],troop[4],troop[5], troop[6]))
TypeError: int argument required
I've: checked other source codes process_troops.py, the line looks exactly the same to me
recompiled several times, left it over night then recompiled several more times
tried replacing with native process_troops.py
tried replacing the line with one copied from native
in a last ditch effort, made a new mod file and copied over all the new coding, not only did that not fix the problem, but I can't figure out how to export/import maps in Thorgrim's map editor so I get the same map as in the original mod.
searched the forums and came up with squat.
checked the Q&A thread and came up with this:
Error:
TypeError: int argument required
Meaning:
Missing an integer such as a mission-template flag. You can find out which calls are integers by looking at Armagan's documentation at the beginning of each module file, (int) calls being integers.
so I opened up process_ troops and module_troops and checked the documentation which only makes a tiny bit of sense to me.
from header_common import *
from header_items import *
from header_troops import *
from header_skills import *
from ID_factions import *
from ID_items import *
from ID_scenes import *
this I understand, but this:
def wp(x):
n = 0
r = 10 + int(x / 10)
n |= wp_one_handed(x + random.randrange(r))
n |= wp_two_handed(x + random.randrange(r))
n |= wp_polearm(x + random.randrange(r))
n |= wp_archery(x + random.randrange(r))
n |= wp_crossbow(x + random.randrange(r))
n |= wp_throwing(x + random.randrange(r))
return n
I assume has to do with the division of wps.
Checked my codingwith regards to wps. I can't see anything wrong, and wouldn't it have picked it up before if there had been? Mind you, I'm coming to the conclusion that I've been looking at this to long.
My only, not particularly hopeful, wild guess is that it might have something to do with adding riding to a troop that already knows common? But I find this highly unlikely.
Sorry for this rather long post, but I thought I might as well be as thorough as possible without actually including the whole of the new stuff in module_troops.
Please, gods of modding M&B, help me, your most humble and unworthy servant.
Giving up for the day and going to get some lunch and maybe do some Homer, Vako.
The error looks like this: (typed out, because I have lost my screenshots file)
File "process_troops.py", line 19, in save_troops
file.write("\ntrp_%s %s %s %d %d %d %d\n "%(convert_to_identifier(troop[0]),replace_spaces(troop[1]),replace_spaces(troop[2]),troop[3],troop[4],troop[5], troop[6]))
TypeError: int argument required
I've: checked other source codes process_troops.py, the line looks exactly the same to me
recompiled several times, left it over night then recompiled several more times
tried replacing with native process_troops.py
tried replacing the line with one copied from native
in a last ditch effort, made a new mod file and copied over all the new coding, not only did that not fix the problem, but I can't figure out how to export/import maps in Thorgrim's map editor so I get the same map as in the original mod.
searched the forums and came up with squat.
checked the Q&A thread and came up with this:
Error:
TypeError: int argument required
Meaning:
Missing an integer such as a mission-template flag. You can find out which calls are integers by looking at Armagan's documentation at the beginning of each module file, (int) calls being integers.
so I opened up process_ troops and module_troops and checked the documentation which only makes a tiny bit of sense to me.
from header_common import *
from header_items import *
from header_troops import *
from header_skills import *
from ID_factions import *
from ID_items import *
from ID_scenes import *
this I understand, but this:
def wp(x):
n = 0
r = 10 + int(x / 10)
n |= wp_one_handed(x + random.randrange(r))
n |= wp_two_handed(x + random.randrange(r))
n |= wp_polearm(x + random.randrange(r))
n |= wp_archery(x + random.randrange(r))
n |= wp_crossbow(x + random.randrange(r))
n |= wp_throwing(x + random.randrange(r))
return n
I assume has to do with the division of wps.
Checked my codingwith regards to wps. I can't see anything wrong, and wouldn't it have picked it up before if there had been? Mind you, I'm coming to the conclusion that I've been looking at this to long.
My only, not particularly hopeful, wild guess is that it might have something to do with adding riding to a troop that already knows common? But I find this highly unlikely.
Sorry for this rather long post, but I thought I might as well be as thorough as possible without actually including the whole of the new stuff in module_troops.
Please, gods of modding M&B, help me, your most humble and unworthy servant.
Giving up for the day and going to get some lunch and maybe do some Homer, Vako.

