Mount & Blade II: Bannerlord

File information

Last updated

Original upload

Created by

Yohan Yu

Uploaded by

yhyu13

Virus scan

Safe to use

About this mod

MB2Shotgun enables you to shoot arrows and crossbows like a shotgun.

Requirements
Permissions and credits


(Video made by @yhyu13)



(Video made by @MB2Lord)

I am also contributing to BenjiG91's
Calradia Awakens mod where you are empowered by a whole magical arsenal! Check it out, guys!

https://www.nexusmods.com/mountandblade2bannerlord/mods/1169



Brief:

MB2Shotgun enables you to shoot arrows and crossbows like a shotgun. 

Several unique weapons are added to Companions' dialog that can be equipped by both the player and companions.


WARNING:
Because the method AddCustomMissile() creates arrows with no weapon damage taken into account. If you are using the default bow and crossbow ammo which have damage 0, Taleworld has programmed it to be ignored as the net damage output is 0. Please use special ammo with >0 damage. If you don't have that ammunition, then set "ShotgunBounusDamage" to values like 50 in the .\MB2Shotgun\settings\CheatLogicSettings.xml.

Key:
[ - Openbrace: toggle the shotgun feature in battle.
You should be able to see a message displayed in the battle console that says it is enabled. You will need to toggle it every time a battle start. By default, the feature is disabled. You can change the value "ShotgunFeature" to "true" to enable this feature by default each time entering a battle.

Setting file:
./MB2Shotgun/settings/CheatLogicSettings.xml
./MB2Shotgun/settings/EquipmentList.xml

Feel free to modify the setting in that .xml file.

Feel free to disassemble my code and check how it is implemented. It could be useful in implementing the demon archer from the popular mod "潘德的预言 (Prophesy of Pendor)" in MB1.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

v1.1.0 Changelog (May 1st 2020)
(1) There is a new dialog added to companions or spouses for acquiring unique items that do shotgun automatically. Players can modify their settings at .\MB2Shotgun\settings\EquipmentList.xml.
(2) The shotgun effect has been extended to throwing weapons as well, you can throw a cluster of knives at once.

v1.1.2 Changelog (May 2nd 2020)
(1) Add two unique throwing weapons to the game. Gain those weapons by talking to companions or spouses.

v1.1.3 Changelog (May 3rd 2020)
(1) Correctly orient all shotgun elements to their velocities.
(2) Fix bug : Disable shogun feature while equipping unique weapons that do automatic shotgun to avoid a spooky bug. 

To change the default toggle key which is "[" by default, you can go to CheatLogicSettings.xml in "./settings" folder and change <ShotgunKey>???</ShotgunKey> to any of these values that are on the left side of the equal sign:
Escape = 1,
D1 = 2,
D2 = 3,
D3 = 4,
D4 = 5,
D5 = 6,
D6 = 7,
D7 = 8,
D8 = 9,
D9 = 10,
D0 = 11,
Minus = 12,
Equals = 13,
BackSpace = 14,
Tab = 15,
Q = 16,
W = 17,
E = 18,
R = 19,
T = 20,
Y = 21,
U = 22,
I = 23,
O = 24,
P = 25,
OpenBraces = 26,
CloseBraces = 27,
Enter = 28,
LeftControl = 29,
A = 30,
S = 31,
D = 32,
F = 33,
G = 34,
H = 35,
J = 36,
K = 37,
L = 38,
SemiColon = 39,
Apostrophe = 40,
Tilde = 41,
LeftShift = 42,
BackSlash = 43,
Z = 44,
X = 45,
C = 46,
V = 47,
B = 48,
N = 49,
M = 50,
Comma = 51,
Period = 52,
Slash = 53,
RightShift = 54,
NumpadMultiply = 55,
LeftAlt = 56,
Space = 57,
CapsLock = 58,
F1 = 59,
F2 = 60,
F3 = 61,
F4 = 62,
F5 = 63,
F6 = 64,
F7 = 65,
F8 = 66,
F9 = 67,
F10 = 68,
Numpad7 = 71,
Numpad8 = 72,
Numpad9 = 73,
NumpadMinus = 74,
Numpad4 = 75,
Numpad5 = 76,
Numpad6 = 77,
NumpadPlus = 78,
Numpad1 = 79,
Numpad2 = 80,
Numpad3 = 81,
Numpad0 = 82,
NumpadPeriod = 83,
Extended = 86,
F11 = 87,
F12 = 88,
NumpadEnter = 156,
RightControl = 157,
NumpadSlash = 181,
RightAlt = 184,
NumLock = 197,
Home = 199,
Up = 200,
PageUp = 201,
Left = 203,
Right = 205,
End = 207,
Down = 208,
PageDown = 209,
Insert = 210,
Delete = 211,
ControllerLStick = 222,
ControllerRStick = 223,
LeftMouseButton = 224,
RightMouseButton = 225,
MiddleMouseButton = 226,
X1MouseButton = 227,
X2MouseButton = 228,
MouseScrollUp = 229,
MouseScrollDown = 230,
ControllerLStickUp = 232,
ControllerLStickDown = 233,
ControllerLStickLeft = 234,
ControllerLStickRight = 235,
ControllerRStickUp = 236,
ControllerRStickDown = 237,
ControllerRStickLeft = 238,
ControllerRStickRight = 239,
ControllerLUp = 240,
ControllerLDown = 241,
ControllerLLeft = 242,
ControllerLRight = 243,
ControllerRUp = 244,
ControllerRDown = 245,
ControllerRLeft = 246,
ControllerRRight = 247,
ControllerLBumper = 248,
ControllerRBumper = 249,
ControllerLOption = 250,
ControllerROption = 251,
ControllerLThumb = 252,
ControllerRThumb = 253,
ControllerLTrigger = 254,
ControllerRTrigger = 255