• Please note that we've updated the Mount & Blade II: Bannerlord save file system which requires you to take certain steps in order for your save files to be compatible with e1.7.1 and any later updates. You can find the instructions here.

Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.

FrisianDude

Archduke
M&BWB
cdvader said:
[quote author= FrisianDude]Can anyone explain how to do this? I've tried, but I can't seem to get it.
C'mon man, look in the header files. Fisheye even made it easy for you and told you the command and yet you still ask. Look around & do some research. :/

Code:
troop_add_item                         = 1530	# (troop_add_item,<troop_id>,<item_id>,[modifier]),
troop_add_items                        = 1535	# (troop_add_items,<troop_id>,<item_id>,<number>),
[/quote]

****, headers. I hardly ever go there, sorry. And thanks. I've got it now (after multiple dumb tries and then finding an ancient post by Winter.)
 

cdvader

No problem. :wink: I didn't look at headers when I was starting M&B modding, too, but now I've found them to be a invaluable source of informations.
 

kt0

Knight
Hader said:
I encountered a bug while testing my mod where all AI parties seem to not notice I am there...basically, whenever I encounter any party that should care about my presence (so any hostile parties basically), they never acknowledge my presence. Bandits do not run from me or try to attack me, they patrol constantly and do not confront me for anything. I believe this has to to with parties.txt , though I do not know where the problem lies after my hours of searching.
Check the trigger that calls party_set_bandit_attraction in module_simple_triggers.py.  Put some print statements in there to see what's going on.
 

Deyshawn

Squire
M&BWB
This may have been answered before, but...

I was following the module documentation, but had quit when I got to the triggers section because the current module system is much more complicated.  I now want to make a basic, native expansion mod, to teach myself the rest.  I copied and renamed the Native folder and changed the module_info to target it, but when i went to build, it became a copy of the other mod.  Will I have to delete all of my stuff about Geoffrey to make a new mod and is it impossible to work on two mods at the same time?
 

mfberg

Sergeant Knight at Arms
WBWF&S
1. Make a folder in your mount&blade\modules folderfor your new mod, name it whatever you want your new mod to be named.
(mine are in c:\program files\mount&blade\modules)

2. Move the source folder (native source, or whatever you're going to work from) to this folder.
3. Take and change the module_info.py file to -

Code:
# Point export_dir to the folder you will be keeping your module
# Make sure you use forward slashes (/) and NOT backward slashes (\)


export_dir = "../"

And there you are. A working module and source file.

mfberg
 

Deyshawn

Squire
M&BWB
What exactly do you mean by the source folder?  The python module files?  Because I think skipping step 2 is what caused this.
 

mfberg

Sergeant Knight at Arms
WBWF&S
Deyshawn said:
What exactly do you mean by the source folder?  The python module files?  Because I think skipping step 2 is what caused this.

Correct.
You can make as many different modules as you want with this.
 

HokieBT

Grandmaster Knight
M&BWB
RATMdude92 said:
I'm trying to work with muskets, but the troops carry them in one hand when they are one the move.  Is there any way to adjust the musket item so that troops carry it in both hands when they are not firing?  I've tried adding itp_polearm and itcf_carry_spear to the item flags, but neither of these have worked.  Unless I'm doing it wrong or there is another way to achieve this.

Thanks
I had the same problem and muskets look to be hardcoded to be carried in one hand.  The only way to make them carried with two hands is to turn them into crossbows and have them use bolts as the ammo.  Thats what I did in my mod, so muskets (ie. crossbows) and pistols end up using different ammo now.
 

Maxim Suvorov

Sergeant at Arms
Strange problems.

While adding a new faction to the module_faction.py I've figured out a very strange proglem that id_faction.py file DO NOT rebuilds. I mean that a new line with faction_name = int_nuber doesn't appear. :sad:

Is there any way how to fix this bug? Since it is a not a good idea to add faction by hands to the id_ file
 

Jubal

Knight
WBM&B
Dumb question, but does anyone know if there's a limit on entries in module_troops, and if so what it might be?
 

HokieBT

Grandmaster Knight
M&BWB
RATMdude92 said:
Thanks HokieBT, that worked like a charm.  I hope you (or anyone else knowledgeable) don't mind a couple more questions:

1. Now that I've switched my muskets to crossbows, when the troops fire, the musket-crossbows make both firing sounds.  I have the type as itp_crossbow, but I also have an itcf_shoot_musket to trigger the musket sound and smoke particle.  Can I isolate the crossbow sound and disable it for the muskets, so that only the musket fire is heard, even though the item is technically a crossbow?

2. Also because of this switch, the "muskets" now fire the "flying_missile" mesh of bows and crossbows with my new "musket bolt" ammo.  I can tell it's only the flying missile part of the process that looks like a bolt, because the targets don't end up with bolts sticking out of them.  Is there a way to disable the flying_missile mesh from being called by my new ammo?  Or will I have to come up with some kind of invisible flying_missile texture?

3. And finally, now that my muskets are crossbows, I assume that troops will need crossbow proficiencies in order to use them effectively.  Is there a way for me to reroute these musket-crossbows back to using firearms skill?  Or will firearms skill now only apply to pistols?

Thanks for all the help.

1) I had to switch release_crossbow to blank in module_sounds.py
Code:
("release_crossbow",sf_vol_1, []),

2) not sure why that would happen, have you defined an ixmesh_flying_ammo on your "musket bolt" ammo ?
Code:
["laser_bolts_green_rifle","Plasma Gas Cartridges", [("transparent",0),("laser_bolt_green",ixmesh_flying_ammo),("laser_bolt_green_cartridges",ixmesh_inventory)], itp_type_bolts|itp_merchandise|itp_bonus_against_shield, 0, 100,weight(0.1)|abundance(100)|weapon_length(60)|thrust_damage(1,pierce)|max_ammo(125),imodbits_ammo],

3) yeah, you have to give them crossbow proficiencies, and the firearm skill will now only apply to pistols.  You may know this, but make sure you rename the proficiencies by creating a ui.csv in the en languages folder of your mod.
Code:
ui_crossbows|Rifles
ui_explanation_crossbow|Covers usage of blaster rifles.
ui_firearms|Pistols
ui_explanation_firearms|Covers usage of blaster pistols.
 
FrisianDude said:
I think you can select everything and then delete it all, but then you'd have to replace spawn points and stuff.:???:

That's fine, I'm completely redoing all the castle scenes so it'd probably be easier to do that anyway. How do I select everything, though?
 

FrisianDude

Archduke
M&BWB
Hmm, actually, you can just select everything but the spawn points. Either by right clicking the objects themselves and keeping ctrl down, or by clicking everything in the topmost box at the left. There are two big boxes, one of them to select what you're gonna place and the other to select what's around already. The one at the bottom is the one with the things you can place. Does take a while to remove everything this way, though.
 
FrisianDude said:
Hmm, actually, you can just select everything but the spawn points. Either by right clicking the objects themselves and keeping ctrl down, or by clicking everything in the topmost box at the left. There are two big boxes, one of them to select what you're gonna place and the other to select what's around already. The one at the bottom is the one with the things you can place. Does take a while to remove everything this way, though.

Yeah I know that way. That takes about 5 minutes, though.

I think, I'll just make fresh scenes.
 

Amman d Stazia

Master Knight
CTRL-A

selects everything.  We find that normally you have to then deliberately deslect at least one item, or else you rnext command (be it move, delete whatever) doesn't register.
 
Status
Not open for further replies.
Top Bottom