Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Caba`drin said:
Harpic said:
Im trying to learn how to make a mod and I followed the tutorials but it does not seem to save properly  :cry:
I'm guessing you mean you aren't getting the module system to compile correctly? What exactly goes wrong. We're going to need much more detail than "followed tutorials and it doesn't work" to be able to help at all.
*Sigh* Caba`drin,how many times must you and I and our fellow experenced modders tell these helpless idiots to give us detailed info on their problem,not just the usual crap???

P.S.@Harpic:razz:lease don't take offence at this,i'm not just saying this to you,
[size=12pt]I'M SAYING THIS TO EVERYONE WHO ASKS FOR HELP,AND EXPECTS A DAMN ANSWER,BUT DOESN'T GIVE US A GOOD DESCRPTION OF THEIR PROBLEM!
 
is anyone coming up with this when trying to open the build_module file and if so, does anyone know what i can do to fix it?

'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
Could Not Find C:\Program Files\mb_warband_module_system_1153\Module_system 1.15
3\*.pyc

______________________________

Script processing has ended.
Press any key to exit. . .
 
xXTribalXx said:
is anyone coming up with this when trying to open the build_module file and if so, does anyone know what i can do to fix it?

'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
Could Not Find C:\Program Files\mb_warband_module_system_1153\Module_system 1.15
3\*.pyc

______________________________

Script processing has ended.
Press any key to exit. . .

first of all did you read the part 1:getting started?
did you installed python?if no install it and then do the folowing:
right click on my computer>properties,then go to advance tab and click on enviroment variables
and now if you have xp or vista,select the variable "Path" from System Variables,you can double click on it or just highlight it and then hit edit.
now you nee to modifie the variable value and change it with teh adress of were python is installed.for ex if python is installed in C:\Python , you will put ;C:\Python.
then select ok and the problem should disappear

if you have win7 you will need to search the path at user variables.
 
The_dragon said:
xXTribalXx said:
is anyone coming up with this when trying to open the build_module file and if so, does anyone know what i can do to fix it?

'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
'python' is not recognized as an internal or external command,
operable program or batch file.
Could Not Find C:\Program Files\mb_warband_module_system_1153\Module_system 1.15
3\*.pyc

______________________________

Script processing has ended.
Press any key to exit. . .

first of all did you read the part 1:getting started?
did you installed python?if no install it and then do the folowing:
right click on my computer>properties,then go to advance tab and click on enviroment variables
and now if you have xp or vista,select the variable "Path" from System Variables,you can double click on it or just highlight it and then hit edit.
now you nee to modifie the variable value and change it with teh adress of were python is installed.for ex if python is installed in C:\Python , you will put ;C:\Python.
then select ok and the problem should disappear

if you have win7 you will need to search the path at user variables.

I've downloaded python, tried every possible path for the PATH variable forward and backward slashes both, downloaded the module thing from TW's downloads for Warband, changed the module_info file in that download to where it's connected to my new module, deleted the conversation file in my new module and everything, it just keeps coming up with what i posted before
 
I remember someone saying that buildings don't need lods but can they even use them, I remember setting out the large flat I did and I did an lod moved far away from it but the lod didn't appear. Maybe I didn't move far away enough but if so is there any way to change the distance that lods appear like if I wanted lods to appear in my face could I do it.
 
xPearse said:
I remember someone saying that buildings don't need lods but can they even use them, I remember setting out the large flat I did and I did an lod moved far away from it but the lod didn't appear. Maybe I didn't move far away enough but if so is there any way to change the distance that lods appear like if I wanted lods to appear in my face could I do it.
I think scene prop lods were introduced in Warband, so you may try that there.
Because they are static, they shouldn't influence performance as much, however you CAN make overly complex models that would crash low-end PCs - simplify your models if that happens, and especially don't let battles happen in complex, high-poly scenes.
 
Quick one regarding Pythonic syntax.
Say I wanted to append a bunch of triggers to every mision template. I think I've seen something long ago that did it, in a loop, at the end of the file. As I'm completely illiterate when it comes down to Python, could someone tell me if the following is correct?
If my triggers were listed in a
Code:
new_triggers = [ <stuff> ]
, then would...
Code:
for i in len(mission_templates)
   mission_templates[i] += new_triggers
... this do the trick?
I'm treating the mission_templates as an array, but I have no idea what it is. And while you're here, can you shed some light on indentation used by this language? Three or four or how many? spaces used instead of brackets that encircle loops... Hm.
 
Lumos said:
Quick one regarding Pythonic syntax.
Say I wanted to append a bunch of triggers to every mision template. I think I've seen something long ago that did it, in a loop, at the end of the file. As I'm completely illiterate when it comes down to Python, could someone tell me if the following is correct?
If my triggers were listed in a
Code:
new_triggers = [ <stuff> ]
, then would...
Code:
for i in len(mission_templates)
   mission_templates[i] += new_triggers
... this do the trick?
I'm treating the mission_templates as an array, but I have no idea what it is. And while you're here, can you shed some light on indentation used by this language? Three or four or how many? spaces used instead of brackets that encircle loops... Hm.

That would append the triggers to the list of mission templates...which wouldn't do what you want to to. (mission_templates is a list, of which the elements are tuples)

You want to append the new triggers to each mission template's specific list of triggers, correct? In order to do that, you need to interact with the list of triggers in the mission template, which is the 5th element of the mission template tuple:
Code:
for i in len(mission_templates)
   mission_templates[i][5] += new_triggers
I'm not sure if the concatenation operation will work in this case, but I've defnitely used
Code:
for i in len(mission_templates)
   mission_templates[i][5].extend(new_triggers)

successfully (as least in the context of my pbod_mission_templates file, within the modmerger framework...which might be turning the mission_template tuple to a list for editing behind the scenes. I can't recall)
 
So using my proposed solution would add the new triggers as a whole new field of triggers? I see. :smile:
I thought about using concatenation, because I've used it sometimes, mostly to append my own scripts to the normal ones,
Code:
from tbs_scripts import *

scripts = [

...

]

scripts += tbs_scripts
, where tbs_scripts is a list in the file called tbs_scripts.py.
but I'll use extend instead, thanks.

Oh, by the way, would a concatenation in the middle of the file work? Like this:
Code:
from tbs_scripts import *

scripts = [
...
] + tbs_scripts + [
...
]
 
Caba`drin said:
You want to append the new triggers to each mission template's specific list of triggers, correct? In order to do that, you need to interact with the list of triggers in the mission template, which is the 5th element of the mission template tuple:
Code:
for i in len(mission_templates)
   mission_templates[i][5] += new_triggers
I'm not sure if the concatenation operation will work in this case, but I've defnitely used
Code:
for i in len(mission_templates)
   mission_templates[i][5].extend(new_triggers)

successfully (as least in the context of my pbod_mission_templates file, within the modmerger framework...which might be turning the mission_template tuple to a list for editing behind the scenes. I can't recall)
Correct, this would work (the first version with += won't because it's an assignment within a tuple):
Code:
for i in range(len(mission_templates)):
   mission_templates[i][5].extend(new_triggers)

However, it's not a very safe idea, better do it through explicitly adding common trigger lists to each template.

@Lumos: correct, that's used a lot in some mods.
 
Lumos said:
Thanks a lot. Will you please elaborate on why extending everything is not safe?
That style of implicitly adding things is generally unsafe, because it's implicit.
Everything will be fine, until you forget about it and make a mission that doesn't work well with those programmatically added triggers, and you get mysterious bugs - until you remember again what you did months ago.
You may never encounter problems, and your triggers may be very safe, it's a question of style.
 
Hey guys, got a bit of a problem with introducing a new faction.
I declared it at the end of the "factions" list in module_factions:

...
  ("kingdom_6",  "Sarranid Sultanate",  0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xDDDD33),
  ("fremen",  "Fremen",  0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xbf643c),
...

and assigned it a king in module_troops, declared at the end of the kings' list):

...
["kingdom_6_lord",  "Sultan Hakim",  "Hakim",  tf_hero, 0,reserved,  fac_kingdom_6,[itm_warhorse_sarranid,    itm_mamluke_mail,          itm_sarranid_boots_c,      itm_sarranid_mail_coif,  itm_mail_mittens,      itm_sarranid_cavalry_sword,    itm_tab_shield_small_round_c],        knight_attrib_4,wp(220),knight_skills_5|knows_trainer_5, 0x0000000a4b103354189c71d6d386e8ac00000000001e24eb0000000000000000, rhodok_face_old_2],
                                                                                                                                                                                                                                                                                                               
["stilgar","Naib Stilgar","Stilgar",tf_hero,scn_sietch_tabr_castle|entry(1),reserved,fac_fremen,[itm_krysknife,itm_still_heavy,itm_still_heavy_boots,itm_still_gloves,itm_still_black_hood],wp(300),knight_skills_5|knows_trainer_4,0x0000000a1d0031c704037237c541b6db00000000001c38a80000000000000000,rhodok_face_old_2],
...

The problem is I start as the king of the faction and the guy I assigned as king does not appear as a hero. Meaning the new town I created for the faction is not his but mine, and while scouting the town he dosen't appear to be there.

The town itself is declared at the end of the town list, just underneath the Sarranid towns:

...
("town_22","Bariyye", icon_town_desert|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(165, -106.7),[], 225),

("sietch_tabr","Sietch Tabr",  icon_new_icon|pf_sietch, no_menu, pt_none, fac_fremen,0,ai_bhvr_hold,0,(61,-104),[(trp_fremen_youngster,50,0)], 330),
#  Aztaq_Castle     
#  Malabadi_Castle
  ("castle_1","Culmarr_Castle",icon_castle_a|pf_castle, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-101.3, -21),[],50),
...

I am trying to make the guy stand in his castle, patrol his land and have his own army, but won't work. Do I have to declare additional stuff in order to make a king... a king?
 
Dawiduh, have you set up the slots like slot_faction_leader, have you called script_give_center_to_lord for the new town? Look around game_start, there's actually quite a few things more that you need to do for a new faction - giving fiefs, setting up citizens, reinforcements, etc...

MadVader said:
That style of implicitly adding things is generally unsafe, because it's implicit.
Everything will be fine, until you forget about it and make a mission that doesn't work well with those programmatically added triggers, and you get mysterious bugs - until you remember again what you did months ago.
You may never encounter problems, and your triggers may be very safe, it's a question of style.
Heh. I'm thinking that there will be some missions that won't work well with my triggers too, but I could add only the sprinting stuff to everything.
Oh well, lazy way won't work too well this time. :smile:
 
Thanks guys. It worked. I can recruit my custom troops in the nearby villages, the town is well defended and there is also a banner for the faction. The one thing that is still missing is the faction leader himself. He now owns everything in his domain but I cannot find him.

I'll give it another look tomorrow.

 
Wibbler said:
Hi Tribal,

Which version of python did you install? I believe the module system requires 2.6/2.7.

i downloaded 2.7 and have been trying to use it

MadVader said:
Your PATH environment variable isn't set properly. If you can't figure out why, post a screenshot of its value.

okay, well ive never done any screen shots so how do i go about doing a screenshot out-of-game?
 
Status
Not open for further replies.
Back
Top Bottom