Python Code Not Working...

正在查看此主题的用户

状态
不接受进一步回复。

SwadianGrunt

Veteran
Basically I edited my Games_menu.py file and all was going smooth until i hit build_module the code went fine until Games_menu when it says this 3 times:$g_presentation_marshall_selection_max_renown_3_troop What's this about? I didn't edit this part of the code i only edited out something along the lines of "Add_item" "Sumpter_horse".
HERP DERP!
Help please.

EDIT:grin:ONT WORRY ABOUT THIS
 
Slawomir of Aaarrghh 说:
http://forums.taleworlds.com/index.php/topic,136715.0.html
Sorry my bad i forgot to point out my problem, the problem is that the changes I made don't work even though i followed the instructions i was told to do, I Deleted The Horse Merchant from the goods menu when you enter a town and it's still there and i deleted the ability to get a horse when the game starts but you still get a horse did i edit the wrong one or?

I edited Module_game_menu's lines like this
插入代码块:
        (troop_add_item, "trp_player","itm_tabard",imod_sturdy),
        (troop_add_item, "trp_player","itm_leather_boots",imod_ragged),
        (troop_add_item, "trp_player","itm_sword_medieval_a", imod_rusty),
        (troop_add_item, "trp_player","itm_hunting_crossbow", 0),
        (troop_add_item, "trp_player","itm_bolts", 0),
They did have a horse in there but i deleted it but it's still there...
I did this for each one.
 
Open module_info.py - there should be two lines in it, one commented out below another one. The commented out line is an example. You need to change the other line to point to your Warband Mod directory - mine is "C:\Program Files\Warband\Modules\ShinobiKinzokuHasu" for instance.

Do that, save and compile, via the module.bat file. Hope this helps! :mrgreen:
 
插入代码块:
# Point export_dir to the folder you will be keeping your module
# Make sure you use forward slashes (/) and NOT backward slashes (\)

#export_dir = "I:/Program Files/Mount&Blade/Modules/Age Of Infantry"
export_dir = "I:/Program Files/Mount&Blade/Modules/Age Of Infantry/"
It's this it always has been, i've followed every tutorial i have found down to the very letter except the directory as i run mine through I:\ not C:\.
 
SwadianGrunt 说:
插入代码块:
# Point export_dir to the folder you will be keeping your module
# Make sure you use forward slashes (/) and NOT backward slashes (\)

#export_dir = "I:/Program Files/Mount&Blade/Modules/Age Of Infantry[color=red]/[/color]"
export_dir = "I:/Program Files/Mount&Blade/Modules/Age Of Infantry/"
It's this it always has been, i've followed every tutorial i have found down to the very letter except the directory as i run mine through I:\ not C:\.

Gotta put the last slash on the end.
if you look in your modules folder, you'll see it saved in there.
 
Grrr still not working I don't know what i did wrong.... Thanks for the help so far guys, if i ever actually get this mod released i will be sure to thank you guys in it.

build_module.bat current code it just changed for some reason? I didn't do anything.

插入代码块:
Initializing...
variables.txt not found. Creating new variables.txt file
Compiling all global variables...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
Exporting scene data...
Exporting troops data
Exporting particle data...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
Exporting party_template data...
Exporting parties
Exporting quest data...
Exporting info_page data...
Exporting scripts...
Exporting mission_template data...
Exporting game menus data...
WARNING: Usage of unassigned global variable: $g_presentation_marshall_selection
_max_renown_3
WARNING: Usage of unassigned global variable: $g_presentation_marshall_selection
_max_renown_3_troop
WARNING: Usage of unassigned global variable: $g_presentation_marshall_selection
_max_renown_3
WARNING: Usage of unassigned global variable: $g_presentation_marshall_selection
_max_renown_3_troop
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
WARNING: Global variable never used: tutorial_1_finished
WARNING: Global variable never used: tutorial_2_finished
WARNING: Global variable never used: tutorial_3_finished
WARNING: Global variable never used: tutorial_4_finished
WARNING: Global variable never used: tutorial_5_finished
WARNING: Global variable never used: g_election_date
WARNING: Global variable never used: g_presentation_lines_to_display_begin
WARNING: Global variable never used: g_presentation_lines_to_display_end
WARNING: Global variable never used: $g_presentation_marshall_selection_max_reno
wn_3
WARNING: Global variable never used: $g_presentation_marshall_selection_max_reno
wn_3_troop
WARNING: Global variable never used: $g_presentation_marshall_selection_max_reno
wn_3
WARNING: Global variable never used: $g_presentation_marshall_selection_max_reno
wn_3_troop
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .
 
I get those warnings as well, there's nothing wrong. It's just the compiler saying "TALEWORLDS, YOUR CODE IS UGLY! FIX IT!"
 
That's a perfect compile for Warband 1.131 - all of those "errors" are part of the native module system - there are small tutorials to teach you how to make them go away, but it's really unnecessary.

However, if this is a Mount & Blade mod you are working on, you are using the wrong module system.
 
N0ught 说:
That's a perfect compile for Warband 1.131 - all of those "errors" are part of the native module system - there are small tutorials to teach you how to make them go away, but it's really unnecessary.

However, if this is a Mount & Blade mod you are working on, you are using the wrong module system.
Nope i'm doing Warband, Despite what my stupid forum badges say i'm both Vanilla And Warband registered.
 
Lumos 说:
You don't need any help! It's fine. Get used to it.
No it's not, the code isn't the problem, the problem is that after I run the build_module.bat nothing goes wrong everything cool but when i enter the game the changes i made are not there. So clearly i do need help. If you'd read the thread you would realize that.

SwadianGrunt 说:
Sorry my bad i forgot to point out my problem, the problem is that the changes I made don't work even though i followed the instructions i was told to do, I Deleted The Horse Merchant from the goods menu when you enter a town and it's still there and i deleted the ability to get a horse when the game starts but you still get a horse did i edit the wrong one or?

They did have a horse in there but i deleted it but it's still there...
I did this for each one.
What i said here points it out.
 
are you clicking save after everything you do?


trust me this system is not hard if your following the tutorials, i am new as well and have learned alot by just searching and searching and searching and reading tutorials, some seem kinda out of date  but the right info is there
 
Jai 说:
are you clicking save after everything you do?


trust me this system is not hard if your following the tutorials, i am new as well and have learned alot by just searching and searching and searching and reading tutorials, some seem kinda out of date  but the right info is there
I saved, also when you go into the text files, the code i commented out is gone so, yer. But it's still there in game. I specifically commented out the part where it says something like "trp_player add_item "++++++"_horse" (++++++=Horse name) on all the starting options was deleting it from module_game_menus enough or do i need to get rid of it elsewhere?
 
OK... Just so you guys know, I completely follow this Then I hit Build_module, everything goes fine exactly like it is in this Except when I enter the game the changes aren't there? It's like they disappear? Oh my god I really need help on this, I know i keep saying this but :/ The python code I pretty much all I have to go and then I can Release my mod.
 
Did you read the first post I made?
In module_info.py you need to put a slash on the end of your path. The text files are saving in your modules folder, NOT the folder your module is in.
 
Yer yer...  :mad: I really want to fix this  :neutral: I have no idea whats wrong... Ok this is wierd even though i'm 110% ceratin its 1.131 module system for Warband, the rar is right and all that, anyway. When i hit readme it says module system for 1.011 I thought i grabbed the wrong version so i downloade again but still the same, is this just a spelling mistake?
 
状态
不接受进一步回复。
后退
顶部 底部