Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
i need help with this http://forums.taleworlds.com/index.php/topic,240255.0.html

this is what i have so far is this correct?
export_dir = "C:/Program Files(x86)/Steam/SteamApps/common/MountBlade Warband/Modules/Blue Stone"
#export_dir = "C:/Program Files/Mount&Blade/Modules/Native/"

i have 2 warbands i is version 1.011 from taleworlds which i dont use the other is 1.158 from steam the steam version i dont see any python files but the taleworlds version i see all of the python files
 
nothing is working i dont know whats wrong i know the read write permissions of the folder wont change if that matters like everytime i update the permissions they reset themselves...i dont know if this is correct i have mbw on steam so that's the path i use

export_dir = "C:/Program Files(x86)/Steam/SteamApps/common/Mount&Blade Warband/Modules/Blue Stone/"
#export_dir = "C:/Program Files/Mount&Blade/Modules/Native/"

everytime i run the module build it errors on i think everything saying this file cant be found or doent exist or somethin like that

http://imgur.com/a/N4fIt#8nM4d8w
the first image is of the errors/the second picture is on a warband that i dont use with all the python files/the third picture is of the warband i use with no python files
 
put a '#' in front of the other export_dir (the one that contains WOTS)
Also move all module system files (those files that have .py extension + the build_module.bat file) in one folder (doesn't need to be in the game directory, it can be placed on desktop too).
 
what do you mean the python files? all those warband files do i copy them and paste them right into the module 1.158 file?
okay well when i put the # in front of the other export dir i got this http://imgur.com/mQjA6Z3 at least it's not the file cant be found error?
 
So...
Step 1: delete all those files that you copy pasted from idk where
Step 2: download latest module system files (or what source code you want to modifie) (Note 1)
Step 3: make a folder on desktop called "my awesome coolest best mod ever known by human species"
Step 4: copy all module system files (Note 2) into that folder that you just created on desktop
Step 5: right click on module_info (wich is located in that folder that you created at step 3) and open it with notepad
Step 6: delete everything that is inside module_info, then paste this
Code:
export_dir = "C:/Program Files(x86)/Steam/SteamApps/common/Mount&Blade Warband/Modules/Blue Stone/"
Step 7: close the file and save it; now you can build your module



Note 1: google it or look at the sticky topic from this board
Note 2: module system's files are found in the downloaded file and they are: build_module, header_animation, header_common, header_dialogs, ....(all files starting with header_), ID_animations, ID_factions,....(all files starting with ID_), module_animations, module_constants, ...(all files starting with module_), process_animations, process_common, ...(all files starting with process_)
 
Hey, I'm trying to set up music to trigger only when you fight as a certain faction or fight against a certain faction. The thing is that it keeps triggering regardless of factions.

What I'm I doing wrong here?

  ("ambushed_by_sarranid_1", "x.ogg", mtf_culture_6|mtf_sit_ambushed|mtf_sit_siege, mtf_sit_fight|mtf_sit_multiplayer_fight|mtf_culture_all),

("fight_as_sarranid_1", "xx.ogg", mtf_culture_6|mtf_sit_fight|mtf_sit_multiplayer_fight|mtf_sit_ambushed, mtf_culture_all),

Also, how do I make it work for other factions I created, like romans? This doesnt seem to work:

  ("ambushed_by_romans",  "xxx.ogg", mtf_rome|mtf_sit_ambushed|mtf_sit_siege, mtf_sit_fight|mtf_sit_multiplayer_fight|mtf_culture_all),
 
i keep getting that name not defined error also i got all my instructions from this http://forums.taleworlds.com/index.php/topic,240255.0.html
i think the error has to do with something with the #export thing

okay i deleted everything and started over from your instructions and i keep getting that name not defined error
 
Modder223 said:
i keep getting that name not defined error also i got all my instructions from this http://forums.taleworlds.com/index.php/topic,240255.0.html
i think the error has to do with something with the #export thing

The_dragon said:
Step 6: delete everything that is inside module_info, then paste this
Code:
export_dir = "C:/Program Files(x86)/Steam/SteamApps/common/Mount&Blade Warband/Modules/Blue Stone/"
 
yes i did but i keep getting name error

this is what i have in it
#export_dir = "C:/Program Files(x86)/Steam/SteamApps/common/MountBlade Warband/Modules/Blue Stone/"

the error says global name export dir is not defined
 
Here:

xenoargh said:
It's fairly easy to script this.

First part:  getting more people into the towns.  This part's easy- a one line change.  Find script_init_town_walkers in module_scripts.

Remove the line that reads:  (set_visitor, ":entry_no", ":walker_troop_id"), and replace it with this:  (set_visitors,":entry_no", ":walker_troop_id",5),

Here's an example, if you're confused.

Code:
          # script_init_town_walkers
          # Input: none
          # Output: none
          ("init_town_walkers",
            [
              (try_begin),
                (eq, "$town_nighttime", 0),
                (try_for_range, ":walker_no", 0, num_town_walkers),
                  (store_add, ":troop_slot", slot_center_walker_0_troop, ":walker_no"),
                  (party_get_slot, ":walker_troop_id", "$current_town", ":troop_slot"),
                  (gt, ":walker_troop_id", 0),
                  (store_add, ":entry_no", town_walker_entries_start, ":walker_no"),
		   (set_visitors,":entry_no", ":walker_troop_id",5),
                (try_end),
              (try_end),
          ]),

Now for the "hard" part:  getting those additional people to move around and look vaguely like a crowd.  Replace the entire script_set_town_walker_destination with this code.  That's it.  Now you have a lot more people, and they'll wander around randomly.

Code:
          # script_set_town_walker_destination
          # Input: arg1 = agent_no
          # Output: none
          ("set_town_walker_destination",
            [(store_script_param_1, ":agent_no"),	  
			(store_random_in_range, ":rand_dest", 1 ,12),
			
            (try_begin),
				(eq, ":rand_dest", 1),
				(assign, ":target_entry_point", 9),
			(else_try),	
				(eq, ":rand_dest", 2),
				(assign, ":target_entry_point", 10),
			(else_try),	
				(eq, ":rand_dest", 3),
				(assign, ":target_entry_point", 12),	
			(else_try),	
				(eq, ":rand_dest", 4),
				(assign, ":target_entry_point", 32),	
			(else_try),	
				(eq, ":rand_dest", 2),
				(assign, ":target_entry_point", 33),	
			(else_try),	
				(eq, ":rand_dest", 5),
				(assign, ":target_entry_point", 34),	
			(else_try),	
				(eq, ":rand_dest", 6),
				(assign, ":target_entry_point", 35),	
			(else_try),	
				(eq, ":rand_dest", 7),
				(assign, ":target_entry_point", 36),	
			(else_try),	
				(eq, ":rand_dest", 8),
				(assign, ":target_entry_point", 37),	
			(else_try),	
				(eq, ":rand_dest", 9),
				(assign, ":target_entry_point", 38),	
			(else_try),	
				(eq, ":rand_dest", 10),
				(assign, ":target_entry_point", 39),	
			(else_try),	
				(assign, ":target_entry_point", 10),					
			(try_end),
			  
              (try_begin),
                (agent_set_slot, ":agent_no", 0, ":target_entry_point"),
                (entry_point_get_position, pos1, ":target_entry_point"),
                (try_begin),
                  (init_position, pos2),
                  (position_set_y, pos2, 250),
                  (position_transform_position_to_parent, pos1, pos1, pos2),
                (try_end),
                (agent_set_scripted_destination, ":agent_no", pos1, 0),
                (agent_set_speed_limit, ":agent_no", 5),
              (try_end),
          ]),
 
jacobhinds said:
Here:

xenoargh said:
It's fairly easy to script this.

First part:  getting more people into the towns.  This part's easy- a one line change.  Find script_init_town_walkers in module_scripts.

Remove the line that reads:  (set_visitor, ":entry_no", ":walker_troop_id"), and replace it with this:  (set_visitors,":entry_no", ":walker_troop_id",5),

Here's an example, if you're confused.

Code:
          # script_init_town_walkers
          # Input: none
          # Output: none
          ("init_town_walkers",
            [
              (try_begin),
                (eq, "$town_nighttime", 0),
                (try_for_range, ":walker_no", 0, num_town_walkers),
                  (store_add, ":troop_slot", slot_center_walker_0_troop, ":walker_no"),
                  (party_get_slot, ":walker_troop_id", "$current_town", ":troop_slot"),
                  (gt, ":walker_troop_id", 0),
                  (store_add, ":entry_no", town_walker_entries_start, ":walker_no"),
		   (set_visitors,":entry_no", ":walker_troop_id",5),
                (try_end),
              (try_end),
          ]),

Now for the "hard" part:  getting those additional people to move around and look vaguely like a crowd.  Replace the entire script_set_town_walker_destination with this code.  That's it.  Now you have a lot more people, and they'll wander around randomly.

Code:
          # script_set_town_walker_destination
          # Input: arg1 = agent_no
          # Output: none
          ("set_town_walker_destination",
            [(store_script_param_1, ":agent_no"),	  
			(store_random_in_range, ":rand_dest", 1 ,12),
			
            (try_begin),
				(eq, ":rand_dest", 1),
				(assign, ":target_entry_point", 9),
			(else_try),	
				(eq, ":rand_dest", 2),
				(assign, ":target_entry_point", 10),
			(else_try),	
				(eq, ":rand_dest", 3),
				(assign, ":target_entry_point", 12),	
			(else_try),	
				(eq, ":rand_dest", 4),
				(assign, ":target_entry_point", 32),	
			(else_try),	
				(eq, ":rand_dest", 2),
				(assign, ":target_entry_point", 33),	
			(else_try),	
				(eq, ":rand_dest", 5),
				(assign, ":target_entry_point", 34),	
			(else_try),	
				(eq, ":rand_dest", 6),
				(assign, ":target_entry_point", 35),	
			(else_try),	
				(eq, ":rand_dest", 7),
				(assign, ":target_entry_point", 36),	
			(else_try),	
				(eq, ":rand_dest", 8),
				(assign, ":target_entry_point", 37),	
			(else_try),	
				(eq, ":rand_dest", 9),
				(assign, ":target_entry_point", 38),	
			(else_try),	
				(eq, ":rand_dest", 10),
				(assign, ":target_entry_point", 39),	
			(else_try),	
				(assign, ":target_entry_point", 10),					
			(try_end),
			  
              (try_begin),
                (agent_set_slot, ":agent_no", 0, ":target_entry_point"),
                (entry_point_get_position, pos1, ":target_entry_point"),
                (try_begin),
                  (init_position, pos2),
                  (position_set_y, pos2, 250),
                  (position_transform_position_to_parent, pos1, pos1, pos2),
                (try_end),
                (agent_set_scripted_destination, ":agent_no", pos1, 0),
                (agent_set_speed_limit, ":agent_no", 5),
              (try_end),
          ]),

thank you very much
 
Please ask me to elaborate and provide screenshots/code if needs be, but I've been bugged by this issue with banners for a long while. I've added a bunch of banners and manually assigned them to lords, as well as assigning map icon banners and commenting out the old code. All the banners and map icons are in the same order in module_meshes/scene_props/map_icons.py.

But after an invasion script fires (from the native expansion module system), the game decides to give half the banners to bandits. that's when the weirdness starts happening, and I get dozens of bandit hideouts (with horse icons) appearing right around where I am. Lords swap banners and some troops start using the hideouts as banners, causing lag that lasts about a day ingame.

This has me stumped because the banners shouldn't affect bandits; there's no code anywhere to suggest otherwise. Same with the hideouts. If anyone could even point me in the right direction, I'd be very grateful.
 
Status
Not open for further replies.
Back
Top Bottom