Module_troops question

正在查看此主题的用户

Ok so this is probably daft but I have a troop with it's items

[itm_grey_britches,itm_grey_britchesG,itm_line_tunic_private,itm_brit_line_shako,itm_cartridges2,itm_britmusketmelee,itm_britmusketai1],

but whenever I compile I get the error that itm_grey_britchesG is not defined..

Any ideas why?
 
Dain Ironfoot 说:
Ok so this is probably daft but I have a troop with it's items

[itm_grey_britches,itm_grey_britchesG,itm_line_tunic_private,itm_brit_line_shako,itm_cartridges2,itm_britmusketmelee,itm_britmusketai1],

but whenever I compile I get the error that itm_grey_britchesG is not defined..

Any ideas why?

An open door, but you didn't forget to define grey_britchesG in module_items right?
That's about as far as my knowledge of the module system goes  :oops:
 
No to both. It's definitely defined in module_items. I copied and pasted the name and have used it ingame before with the unofficial troop editor. observe

["grey_britcheG", "Grey Britches with gaiters", [("greybritchesg",0)], itp_merchandise| itp_type_foot_armor |itp_civilian | itp_attach_armature ,0, 15 , weight(1)|abundance(100)|head_armor(0)|body_armor(0)|leg_armor(2)|difficulty(0) ,imodbits_cloth ],


 
They are different =D
You have itm_grey_britchesG in the troop file and ,itm_grey_britcheG in the items file
 
Dain Ironfoot 说:
No to both. It's definitely defined in module_items. I copied and pasted the name and have used it ingame before with the unofficial troop editor. observe

["grey_britcheG", "Grey Britches with gaiters", [("greybritchesg",0)], itp_merchandise| itp_type_foot_armor |itp_civilian | itp_attach_armature ,0, 15 , weight(1)|abundance(100)|head_armor(0)|body_armor(0)|leg_armor(2)|difficulty(0) ,imodbits_cloth ],

Well, look at the first term of that line: "grey_britcheG".
If you turn that into "grey_brithesG" you might have more luck.

Edit @red.murder1: ****, you beat me to it
 
Ah sorry, no thats not is as well, that was because I was experimenting with renaming the item, my module troops currently had that name as well. I thought that perhaps the name was too long or something.
 
Dain Ironfoot 说:
Ah sorry, no thats not is as well, that was because I was experimenting with renaming the item and obviously mispelled it when I reverted it. I thought that perhaps the name was too long or something.

Damn! And I thought I was so smart. I'd take out all references to that item and add them back in afterwards. You're bound to have made some spelling error somewhere.
 
Yeah, it was a last straw. A very last an improbable one, but I couldn't, and can't, come up with anything better.
 
I think I know why.

It's because you used a capital letter.

Instead of "grey_britchesG," try "grey_britches_g" in both module_items.py & module_troops.py.

There's a similar problem with the Military Scythe in Native - you can't give it to any troop without having to rename the item in module_items.py - it's because it has a dash in it (spear_e_2-5m). Appears you can't use capital letters either.
 
yeah..

itm_grey_britchesG and what you posted for the module_items is completely different. Of course you mentioned you were testing renaming the term, i'd look over it again though.

1. Also what you need to consider is if you have a duplicate entry of the item in module_items.
2. As mentioned the item reference in module_items cannot be caps or it will fail to compile. That could explain which it's not recognized in troops.
3. Is the equipment on any other troops? maybe a hero and you are just forgetting a comma?

Run a search for the entries in both troops and items and see what you come up with.

Failing that sometimes it's just the simple things - "codding" into a backup python file (done it a few), not saving the changes, etc..
 
oh **** there was two pages to this thing..

guess I should have read the other one which contains mention where you fixed it before posting suggestions haha  :lol:

Anyways maybe some noob will come along and find it useful.
 
后退
顶部 底部