Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
[quote author=kalarhan]Well, I checked the "permission to write" part and ran the .bat, but still doesn't give me the txt's.[/quote]

I think that posting your module_info alongside with compiler output would help much. Without it its more like fortune telling from stars.
 
Module_info: export_dir = "C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Native And More/"

Compiler Output:
Initializing...
Compiling all global variables...
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...
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .
 
maater66241 said:
Module_info: export_dir = "C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Native And More/"

Compiler Output:
Initializing...
Compiling all global variables...
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...
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
Exporting postfx_params...

______________________________

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

Looks suspiciously fine... Maybe try to set output folder to module system subfolder for example. Just something simple. To test it.
 
EmielRegis said:
maater66241 said:
Module_info: export_dir = "C:/Program Files (x86)/Steam/steamapps/common/MountBlade Warband/Modules/Native And More/"

Compiler Output:
Initializing...
Compiling all global variables...
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...
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
Exporting postfx_params...

______________________________

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

Looks suspiciously fine... Maybe try to set output folder to module system subfolder for example. Just something simple. To test it.

...Sorry, but what's the module system subfolder?
 
...Sorry, but what's the module system subfolder?

What I was saying is to create folder like "output" inside folder where you extracted your module system files, and try compile mod here. To check if it can compile at all in diferent directory.
 
EmielRegis said:
...Sorry, but what's the module system subfolder?

What I was saying is to create folder like "output" inside folder where you extracted your module system files, and try compile mod here. To check if it can compile at all in diferent directory.
Sorry, my English skills aren't with me today, but here's what I did (don't murder me if I did it wrong):

1. Made an empty folder of place I extracted modsys
2. Directed the module_info to that folder.
3. Ran .bat (which had errors)
4. Checked, nothing there.

I was wondering...does adding "This PC" to the path for the module_info affect anything?
Another thing was when I was using the 1.165 module system with a 1.172 version of Warband, it still gave me the txt's. So, even if I compiled with incompatible versions, it still gives me the txt's.
 
maater66241 said:
Here it is (is this even the correct way of uploading?): https://drive.google.com/open?id=0Bw85eJtArTbCYXo3cXVyQWE4RzQ

It compiled for me perfectly. So problem is indeed in your pc setup. Launch it as Administrator maybe?
 
EmielRegis said:
maater66241 said:
Here it is (is this even the correct way of uploading?): https://drive.google.com/open?id=0Bw85eJtArTbCYXo3cXVyQWE4RzQ

It compiled for me perfectly. So problem is indeed in your pc setup. Launch it as Administrator maybe?

Running as admin gives me this:
python: can't open file 'process_meshes.py': [Errno 2] No such file or directory
python: can't open file 'process_sounds.py': [Errno 2] No such file or directory
python: can't open file 'process_skins.py': [Errno 2] No such file or directory
python: can't open file 'process_map_icons.py': [Errno 2] No such file or directory
python: can't open file 'process_factions.py': [Errno 2] No such file or directory
python: can't open file 'process_items.py': [Errno 2] No such file or directory
python: can't open file 'process_scenes.py': [Errno 2] No such file or directory
python: can't open file 'process_troops.py': [Errno 2] No such file or directory
python: can't open file 'process_particle_sys.py': [Errno 2] No such file or directory
python: can't open file 'process_scene_props.py': [Errno 2] No such file or directory
python: can't open file 'process_tableau_materials.py': [Errno 2] No such file or directory
python: can't open file 'process_presentations.py': [Errno 2] No such file or directory
python: can't open file 'process_party_tmps.py': [Errno 2] No such file or directory
python: can't open file 'process_parties.py': [Errno 2] No such file or directory
python: can't open file 'process_quests.py': [Errno 2] No such file or directory
python: can't open file 'process_info_pages.py': [Errno 2] No such file or directory
python: can't open file 'process_scripts.py': [Errno 2] No such file or directory
python: can't open file 'process_mission_tmps.py': [Errno 2] No such file or directory
python: can't open file 'process_game_menus.py': [Errno 2] No such file or directory
python: can't open file 'process_simple_triggers.py': [Errno 2] No such file or directory
python: can't open file 'process_dialogs.py': [Errno 2] No such file or directory
python: can't open file 'process_global_variables_unused.py': [Errno 2] No such file or directory
python: can't open file 'process_postfx.py': [Errno 2] No such file or directory
Could Not Find C:\WINDOWS\system32\*.pyc

______________________________

Script processing has ended.
Press any key to exit. . .
 
maater66241 said:
EmielRegis said:
maater66241 said:
Here it is (is this even the correct way of uploading?): https://drive.google.com/open?id=0Bw85eJtArTbCYXo3cXVyQWE4RzQ

It compiled for me perfectly. So problem is indeed in your pc setup. Launch it as Administrator maybe?

Running as admin gives me this:
python: can't open file 'process_meshes.py': [Errno 2] No such file or directory
python: can't open file 'process_sounds.py': [Errno 2] No such file or directory
python: can't open file 'process_skins.py': [Errno 2] No such file or directory
python: can't open file 'process_map_icons.py': [Errno 2] No such file or directory
python: can't open file 'process_factions.py': [Errno 2] No such file or directory
python: can't open file 'process_items.py': [Errno 2] No such file or directory
python: can't open file 'process_scenes.py': [Errno 2] No such file or directory
python: can't open file 'process_troops.py': [Errno 2] No such file or directory
python: can't open file 'process_particle_sys.py': [Errno 2] No such file or directory
python: can't open file 'process_scene_props.py': [Errno 2] No such file or directory
python: can't open file 'process_tableau_materials.py': [Errno 2] No such file or directory
python: can't open file 'process_presentations.py': [Errno 2] No such file or directory
python: can't open file 'process_party_tmps.py': [Errno 2] No such file or directory
python: can't open file 'process_parties.py': [Errno 2] No such file or directory
python: can't open file 'process_quests.py': [Errno 2] No such file or directory
python: can't open file 'process_info_pages.py': [Errno 2] No such file or directory
python: can't open file 'process_scripts.py': [Errno 2] No such file or directory
python: can't open file 'process_mission_tmps.py': [Errno 2] No such file or directory
python: can't open file 'process_game_menus.py': [Errno 2] No such file or directory
python: can't open file 'process_simple_triggers.py': [Errno 2] No such file or directory
python: can't open file 'process_dialogs.py': [Errno 2] No such file or directory
python: can't open file 'process_global_variables_unused.py': [Errno 2] No such file or directory
python: can't open file 'process_postfx.py': [Errno 2] No such file or directory
Could Not Find C:\WINDOWS\system32\*.pyc

______________________________

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

This looks like you ****ed up setting extract directory tho...
 
maater66241 said:
Here it is (is this even the correct way of uploading?): https://drive.google.com/open?id=0Bw85eJtArTbCYXo3cXVyQWE4RzQ

do the following:

1) create folder "compiled" inside your modsys

...\Native and More's ModSys\Module_System 1.171\compiled

2) edit your module_info.py to this
Code:
export_dir = "compiled/"

3) run the process

4) if it works fix your module_info.py, you have the wrong directory there. You may be missing a letter, etc.
 
I have an issue making my classlimits work for a multiplayer server. I run the code when the player chooses a new class in the presentation menu (which is triggered everytime you go; ECS - Choose Factions - <faction> - <troop class> in multiplayer). I'm getting the multiplayer class-type like this:
Code:
("oliveran_get_troop_class",
[
	(store_script_param_1, ":troop_no"),
	(assign, ":troop_class", -1),
	(try_begin),
		(this_or_next|eq, ":troop_no", "trp_vaegir_archer_multiplayer"),
		(this_or_next|eq, ":troop_no", "trp_nord_archer_multiplayer"),
		(this_or_next|eq, ":troop_no", "trp_swadian_crossbowman_multiplayer"),
		(this_or_next|eq, ":troop_no", "trp_rhodok_veteran_crossbowman_multiplayer"),
		(this_or_next|eq, ":troop_no", "trp_khergit_veteran_horse_archer_multiplayer"),
		(eq, ":troop_no", "trp_sarranid_archer_multiplayer"),
		(assign, ":troop_class", multi_troop_class_archer),
	(else_try),
		(this_or_next|eq, ":troop_no", "trp_swadian_man_at_arms_multiplayer"),
		(this_or_next|eq, ":troop_no", "trp_nord_scout_multiplayer"),
		(this_or_next|eq, ":troop_no", "trp_rhodok_horseman_multiplayer"),
		(this_or_next|eq, ":troop_no", "trp_sarranid_mamluke_multiplayer"),
		(this_or_next|eq, ":troop_no", "trp_khergit_lancer_multiplayer"),
		(eq, ":troop_no", "trp_vaegir_horseman_multiplayer"),
		(assign, ":troop_class", multi_troop_class_cavalry),
	(else_try),
		(this_or_next|eq, ":troop_no", "trp_swadian_infantry_multiplayer"),
		(this_or_next|eq, ":troop_no", "trp_sarranid_footman_multiplayer"),
		(this_or_next|eq, ":troop_no", "trp_khergit_infantry_multiplayer"),
		(this_or_next|eq, ":troop_no", "trp_rhodok_sergeant_multiplayer"),
		(this_or_next|eq, ":troop_no", "trp_vaegir_spearman_multiplayer"),
		(eq, ":troop_no", "trp_nord_veteran_multiplayer"),
		(assign, ":troop_class", multi_troop_class_infantry),
	(try_end),
	(assign, reg1, ":troop_class"),
   ]),
Which always succeeds to return the troopclass as of yet. Used it when having 10 players on, printing, and it worked every time. Then I do:
Code:
("oliveran_class_limits",
	[
		(store_script_param_1, ":player_team"),
		(store_script_param_2, ":troop_no"),
		(assign, ":allowed", 0),
		
		(assign, ":infantries", 0),
		(assign, ":archers", 0),
		(assign, ":cavalries", 0),
		(assign, ":total_players", 0),
		
		(try_for_players, ":player"),#Get total amount of players in each class
			(player_is_active, ":player"),#Is active!
			(player_get_agent_id, ":agent", ":player"),
			(agent_is_human, ":agent"),
			(player_get_team_no, ":player_same_team", ":player"),
			(eq, ":player_team", ":player_same_team"),#Is in the same team
			(call_script, "script_oliveran_get_troop_class", ":troop_no"),
			(assign, ":troop_class", reg1),
			(try_begin),
				(try_begin),
					(eq, ":troop_class", multi_troop_class_infantry),
					(val_add, ":infantries", 1),
				(else_try),
					(eq, ":troop_class", multi_troop_class_archer),
					(val_add, ":archers", 1),
				(else_try),
					(eq, ":troop_class", multi_troop_class_cavalry),
					(val_add, ":cavalries", 1),
				(try_end),
				(val_add, ":total_players", 1),
			(try_end),
		(try_end),
		
		(try_begin),
			(lt, ":total_players", 6),#No classlimits for max 10 players
			(assign, ":allowed", 1),
		(else_try),#At least 6 players on the same team, 1 player in each class
			(ge, ":total_players", 6),
			(call_script, "script_oliveran_get_troop_class", ":troop_no"),#Get player's troop class
			(try_begin),
				(eq, reg1, multi_troop_class_infantry),
				(try_begin),
					(eq, ":infantries", 0),
					(assign, ":allowed", 1),
				(else_try),
					(val_div, ":infantries", ":total_players"),
					(val_mul, ":infantries", 100),#For %
					(le, ":infantries", "$g_infantry_limit"),
					(assign, ":allowed", 1),
				(try_end),
			(else_try),
				(eq, reg1, multi_troop_class_archer),
				(try_begin),
					(eq, ":archers", 0),
					(assign, ":allowed", 1),
				(else_try),
					(val_div, ":archers", ":total_players"),
					(val_mul, ":archers", 100),#For %
					(le, ":archers", "$g_archer_limit"),
					(assign, ":allowed", 1),
				(try_end),
			(else_try),
				(eq, reg1, multi_troop_class_cavalry),
				(try_begin),
					(eq, ":cavalries", 0),
					(assign, ":allowed", 1),
				(else_try),
					(val_div, ":cavalries", ":total_players"),
					(val_mul, ":cavalries", 100),#For %
					(le, ":cavalries", "$g_cavalry_limit"),
					(assign, ":allowed", 1),
				(try_end),
			(try_end),
		(try_end),
		(assign, reg0, ":allowed"),
	]),
Assume I correctly get the value of the player's class, so the issue is in the "oliveran_class_limit".

I think it might be that Warband doesn't support the decimals, but it should round it up or down in that case, which shouldn't cause too many issues (other than 3.9 being 3, allowing 1 more in the class than planned).

Somewhere along the code in the second spoiler, it fails to properly allow players the right class. Am I doing something wrong?
 
Status
Not open for further replies.
Back
Top Bottom