Mods / Ranged Weapons

Category: #Crafting #Technology
Author: Zarkonnen
Side: Both
Created: May 13th 2021 at 12:29 PM
Last modified: Jan 24th at 11:17 AM
Downloads: 5643
Follow Unfollow 26

This mod adds additional ranged weapons to the game. It does this by more flexible ranged weapon code based on the original bow code of the game, which can be configured by item attributes.

I've also released the code on GitHub, so long-term, others can make their own ranged weapons based on it.

It currently adds four new weapons: a crossbow, an arquebus, a hand cannon, and a blowpipe.

Blowpipe

An easier to construct and weaker version of the bow.

However, it is possible to poison the blowpipe darts. Poison can be crafted from fly agaric or lily of the valley. Creatures struck by poison will slowly lose health over time. Note that drifters and locusts are immune to poison. Seraphs are not, though.

You can also poison crossbow bolts and normal arrows.

Crossbow

Unlike bows, crossbows stay loaded without you having to hold down the right mouse button, but they take much longer to load. Once loaded, hold down the right mouse button again to aim and fire.

They're crafted from a crossbow lath (the bow part), a trigger, twine, and a plank, and available in four levels of quality: composite, iron, meteoric iron, and steel.

They require crossbow bolts as ammunition, which are crafted much in the same way as arrows, but don't need feathers.

Arquebus

Like crossbows, arquebuses stay loaded, but only for a while before the match burns out. The match will also burn out if the arquebus is submerged or rained on too much.

They're crafted from a steel barrel, a trigger, and a plank for the stock.

And yes, they do a lot of damage! They require ammunition made from blasting powder, twine, and bullets. Bullets are made by casting, and are available in copper, bismuth, lead, silver, and gold - soft, heavy metals.

 

Hand Cannon

Much like an arquebus, but available much earlier, hand cannons can be made from a variety of materials from bronze to steel, with damage output depending on the material.

You can also cast them!

So yes, please try it out and let me know what you think. I also plan to add slings and other weapons in a future update.

Version For Game version Downloads Release date Changelog Download
v0.4.5 2457 Jan 24th at 11:17 AM Show RangedWeapons-0.4.5.zip
v0.4.4 255 Jan 3rd at 5:24 PM Show RangedWeapons-0.4.4.zip
v0.4.3 183 Dec 24th 2021 at 7:21 PM Show RangedWeapons-0.4.3.zip
v0.4.2 86 Dec 24th 2021 at 6:24 PM Show RangedWeapons-0.4.2.zip
v0.4.1 286 Dec 7th 2021 at 4:06 PM Show RangedWeapons-0.4.1.zip
v0.4.0 145 Dec 5th 2021 at 4:36 PM Show RangedWeapons-0.4.0.zip
v0.3.1 136 Dec 4th 2021 at 11:45 AM Show RangedWeapons-0.3.1.zip
v0.3.0 230 Nov 29th 2021 at 8:01 PM Show RangedWeapons-0.3.0.zip
v0.2.1 244 Nov 24th 2021 at 2:09 PM Show RangedWeapons-0.2.1.zip
v0.2.0 754 Jun 20th 2021 at 5:01 PM Show RangedWeapons-0.2.0.zip
v0.1.1 412 May 25th 2021 at 12:37 PM Show RangedWeapons-0.1.1.zip
v0.1.0 455 May 13th 2021 at 12:41 PM Show RangedWeapons-0.1.0.zip

29 Comments (oldest first | newest first)

actuallyasriel, 5 days ago

Crash on 1.16.5 when equipping a simple bow. Occurs with the mod but not without it.

System.NullReferenceException: Object reference not set to an instance of an object.
at AnimatableCollectibleSimple.CollectibleBehaviorAnimatableSimple.OnBeforeRender(ICoreClientAPI capi, ItemStack itemstack, EnumItemRenderTarget target, ItemRenderInfo& renderinfo)
at Vintagestory.API.Common.CollectibleObject.OnBeforeRender(ICoreClientAPI capi, ItemStack itemstack, EnumItemRenderTarget target, ItemRenderInfo& renderinfo)
at Vintagestory.Client.NoObf.InventoryItemRenderer.GetItemStackRenderInfo(ClientMain game, ItemSlot inSlot, EnumItemRenderTarget target, Single dt)
at Vintagestory.Client.NoObf.SystemRenderHeldItem.RenderFpHandItem(ItemSlot inSlot, Boolean left, Single dt)
at Vintagestory.Client.NoObf.SystemRenderHeldItem.OnRender3dOpaque(Single deltaTime)
at Vintagestory.Client.NoObf.ClientEventManager.TriggerRenderStage(EnumRenderStage stage, Single dt)
at Vintagestory.Client.NoObf.ClientMain.TriggerRenderStage(EnumRenderStage stage, Single dt)
at Vintagestory.Client.NoObf.ClientMain.MainGameLoop(Single deltaTime)
at _esGsESICkihAc8ShXuIoQwZFwP4._lPY9uZeagiMGC6tvSE11dF7naaz(Single )
at _8UC8FAMhwKY89IbtSRDjsNSApPJ._KbwUAfxjCHyIG0aK445AAA9FHl5(Single )
at _8UC8FAMhwKY89IbtSRDjsNSApPJ._R0wAt2N0TpONMxGD0HJG3bDrRcI(Single )
at Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(Object sender, FrameEventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at OpenTK.GameWindow.RaiseRenderFrame(Double elapsed, Double& timestamp) in C:\Users\Nexrem\Desktop\transfer\opentk\src\OpenTK\GameWindow.cs:line 476
at OpenTK.GameWindow.DispatchRenderFrame() in C:\Users\Nexrem\Desktop\transfer\opentk\src\OpenTK\GameWindow.cs:line 452
at OpenTK.GameWindow.Run(Double updates_per_second, Double frames_per_second) in C:\Users\Nexrem\Desktop\transfer\opentk\src\OpenTK\GameWindow.cs:line 375
at _7zNxEbLnuy6Bq08TdMSIu9ZbrKf._vvUTh6X5xLRNnjtX2xSE7z8yMeh(_SUsdg1ytavxaRcNNkhfDrODGhGP , String[] )
at _yA4PJazdKq1OMm8H6js6v5AhQB._vvUTh6X5xLRNnjtX2xSE7z8yMeh(ThreadStart )

Loaded Mods: advancedsmithing@1.2.0, weaponpackapatch@2.0.0, ancienttools@1.4.4, tonwexp@1.0.9, backpackpack@1.0.3, betterdrifters@2.1.3, BuggisRandomChanges@2.1.0, buildingplus@1.1.2, cralutweaks@1.0.1, expandedfoods@1.5.3, hideandfabric@1.2.2, instruments@1.1.2, juicyores@1.0.0, knappingmastery@1.0.1, aaamakeitcompatible@0.0.2, Mastercull@0.1.0, moredungeons@0.1.0, moremetals@1.0.9, moreroads@1.4.3, nightwatcher@1.2.0, primitivesurvival@2.9.4, qptech@1.9.0, quarryworks@1.4.8, RangedWeapons@0.4.5, nvscaffolding@1.0.1, survivalcats@1.2.3-rc.2, TheShovelerRises@1.0.0, game@1.16.5, vshud@2.0.27, vsmovemod@1.0.9, zeekea@1.6.1, alchemy@1.6.3, carrycapacity@0.6.5, extraoverlays@1.1.0, fixbadrecipes@1.0.2, fixhandbookclutter@1.0.4, fofbalance@1.1.0, fromgoldencombs@1.3.13, hudclock@2.7.0, immersivecrafting@1.0.0, lichen@1.6.1, medievalexpansion@3.7.1, morepiles@1.2.2, pei@1.2.4, peifm@1.0.2, prospectorinfo@3.1.2, ruinvariants@1.0.0, sandsoftime@1.0.1, ssppvv@1.0.3, techmolds@1.0.0, usefulstuff@2.3.2, vanvar@1.1.3, creative@1.16.5, survival@1.16.5, woodbarrels@1.0.2, woodchests@1.0.3, xrowboat@0.0.3, metalrecovery@0.1.17, accessibilitytweaks@2.3.1, campaigncartographer@2.0.2, bullseye@2.3.2, glassmaking@1.3.1, stonepiles@1.0.4, wattleworld@1.0.1, wildcraft@1.2.3, yeet@2.0.0

HersheysWaffles, May 7th at 6:43 PM

Crashes the game when I equip the longbow, removing this mod fixes the issue.

FireFrost, Apr 11th at 6:16 PM

System.InvalidCastException: Unable to cast object of type 'RangedWeapons.EntityPoisonProjectile' to type 'Vintagestory.GameContent.EntityProjectile'.
at Vintagestory.GameContent.ItemBow.OnHeldInteractStop(Single secondsUsed, ItemSlot slot, EntityAgent byEntity, BlockSelection blockSel, EntitySelection entitySel)
at Vintagestory.Client.NoObf.SystemMouseInWorldInteractions.HandleHandInteraction(Single dt)
at Vintagestory.Client.NoObf.SystemMouseInWorldInteractions.OnGameTick(Single dt)
at Vintagestory.Common.EventManager.TriggerGameTick(Int64 ellapsedMilliseconds, IWorldAccessor world)
at Vintagestory.Client.NoObf.ClientMain.MainRenderLoop(Single dt)
at Vintagestory.Client.NoObf.ClientMain.MainGameLoop(Single deltaTime)
at _4Bi1AGVssrIO0El8b8ygdS9FIfm._o5h005s1ovnxSPPqKWgI4tZUoCh(Single )
at _lAuHsYOBOAjBMdATFXwLUtH7N00._JvY4M2412YZu1OS3Ull8wgZBu1j(Single )
at _lAuHsYOBOAjBMdATFXwLUtH7N00._KmBeEx15nyyLrVqNDW6geSArpNr(Single )
at Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(Object sender, FrameEventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at OpenTK.GameWindow.RaiseRenderFrame(Double elapsed, Double& timestamp) in C:\Users\Nexrem\Desktop\transfer\opentk\src\OpenTK\GameWindow.cs:line 479
at OpenTK.GameWindow.DispatchRenderFrame() in C:\Users\Nexrem\Desktop\transfer\opentk\src\OpenTK\GameWindow.cs:line 454
at OpenTK.GameWindow.Run(Double updates_per_second, Double frames_per_second) in C:\Users\Nexrem\Desktop\transfer\opentk\src\OpenTK\GameWindow.cs:line 375
at _TRhArnJABwZoV9Vt7Ld2l65Xzgg._mhlr8s7wtMvxaJGpVy2Ag90jUBK(_3HJA5NvAIx31LXjscc3HGjXaR6q , String[] )
at _q0zAVOrWbMX04rMA9G3HIFVuGjA._mhlr8s7wtMvxaJGpVy2Ag90jUBK(ThreadStart )

 

not sure , its saying relates to poison but i didnt make poison or use it - also have the weapon packs installed + this alpha beta gama 

SilverBird, Feb 4th at 4:24 AM

 

Love the mod! Would there happen to be more weapon types and variations in the future? such as:

Early:

Boomerang/Valari (cheap, easy to use, but poor damage)

 

Bows:

Longbow: (everybody knows about these, long range and damage for a bow, but very cumbersome and slow to draw)

 

Crossbows:

Repeating Crossbow (substantially lower damage and accuracy, but fires more shots and reloads faster)

Arbalest (expensive and very slow to reload, requiring the player to stop completely, but deals incredible damage at high velocity)


Early Gunpowder:

Land Mine (based on 1400s landmines from india): (can be layed down as a trap, deals decent damage to whatever triggers it, cheap)

Rocket Launcher (based on 1400s rocket launchers from china): (can launch rockets for significant damage, very unwieldy, expensive, and dangerous)



Late Gunpowder: (Require more complicated and expensive components than early gunpowder weapons)

Blunderbuss (fires in a spread, dealing massive close range damage, very slow to reload)

Flintlock Pistol (quick to switch to and fire, decent reload speed)

Musket (reliable and relatively long-ranged, decent damage, but very slow to reload)

Puckle gun (expensive, slow to reload, and you must stay still while firing or reloading, but boasts impressive rate of fire for a gunpowder weapon, albeit with poor accuracy and low durability)

fiji, Jan 26th at 11:28 PM

Hello! Are there any plans to adapt the mod to the Bullseye mod. I think this will give a more precision weapon with a smaller share of randomness, in exchange for, say, its power and durability

Zarkonnen, Jan 25th at 12:09 PM

Now compatible with 1.16. Note the guidebook on the new way to make poisons.

actuallyasriel, Jan 9th at 2:03 AM

Mod has unfortunately not survived the 1.16 transition; crashing with Method Not Found:

Version: v1.16.0-rc.8 (Unstable)1/8/2022 8:58:13 PM: Critical error occurred
System.MissingMethodException: Method not found: 'System.String[] Vintagestory.API.Datastructures.JsonObject.AsStringArray(System.String[])'.
at RangedWeapons.ItemRangedWeapon.OnLoaded(ICoreAPI api)
at Vintagestory.Client.NoObf.ClientMain.OnServerBlocksItemsReceivedStep5(Action onCompleted)
at Vintagestory.Client.NoObf.ClientMain.ExecuteMainThreadTasks(Single deltaTime)
at _479NBUPeUzleZ2c3ovFC98kUNcO._HYF1BohwDce3bxOfDTvaM3RD0QQ(Single )
at _jcH3FSJ7ohiDyiUVjeI57gTMlzF._9wzjmUmSdoSvs71TINZbez3uGKf(Single )
at _jcH3FSJ7ohiDyiUVjeI57gTMlzF._MPtQhjNuhWgAbVd6NjS5dCFTc5M(Single )
at Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(Object sender, FrameEventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at OpenTK.GameWindow.RaiseRenderFrame(Double elapsed, Double& timestamp) in C:\Users\Nexrem\Desktop\transfer\opentk\src\OpenTK\GameWindow.cs:line 479
at OpenTK.GameWindow.DispatchRenderFrame() in C:\Users\Nexrem\Desktop\transfer\opentk\src\OpenTK\GameWindow.cs:line 454
at OpenTK.GameWindow.Run(Double updates_per_second, Double frames_per_second) in C:\Users\Nexrem\Desktop\transfer\opentk\src\OpenTK\GameWindow.cs:line 375
at _ZqUQ7pOQY5Qg73UAepClsoZVWgk._aC3ylqMdqishY21wVe5qXxrZ5ob(_EE6B13xM9ADbX1bGtFaOKrVoXro , String[] )
at _mWFXvJdRjYXBzuYdW6hiXK5Fb5p._aC3ylqMdqishY21wVe5qXxrZ5ob(ThreadStart )

Zarkonnen, Jan 3rd at 6:59 PM

Rico Should be fixed now!

Stejer, Dec 28th 2021 at 7:21 PM

Hey this last update doesn't let me enter o create a new world crashing the game, is there someone having the same problem and/or is it fixable?

Zarkonnen, Dec 24th 2021 at 7:21 PM

Snekans Fixed now!

Snekans, Dec 12th 2021 at 3:57 PM

Awesome mod, love the addition of the ornate versions of the guns. Speaking of which, I cant figure out why the damage values wont show up on the ornate versions of the handcannons. 

Everything else works fine, they shoot as well. They just dont do any damage. 

Dragoon_103, Dec 8th 2021 at 5:29 AM

Thats awesome, thanks for such a quick fix

Zarkonnen, Dec 7th 2021 at 4:07 PM

Dragoon_103 This is now fixed in v0.4.1.

Zarkonnen, Dec 7th 2021 at 9:42 AM

Dragoon_103 I agree it's messy. I will see what I can do to get the normal arrows back to the normal IDs.

Dragoon_103, Dec 6th 2021 at 9:05 AM

Seems there has been a big dirty edit with the mod. When you added your poison arrow system you also forcefully renamed the vanilla arrows from arrow-* to arrow-*-clean for the generic version, this is causing a bunch of errors with other mods that try to use anything involving vanilla arrows. would there be a way you can get the poison arrow system working without having the two -clean and -poison sections and just use -poison and have the vanilla arrow take the place of the clean arrow?

If not it sucks but it would look like I would have to disable the poison arrow system itself for myself. Hope it can be worked out.

Zarkonnen, Nov 25th 2021 at 11:57 AM

Thank you @Amon_De_Shir for jumping in and fixing this. To make it explicit: I released this mod under CC0 (public domain, basically) exactly so that if I wander off / get eaten by a wolf, people can update it, or fork it and do their own thing with it, or whatever.

RevolverOcelot, Oct 4th 2021 at 3:38 AM

@Amon_De_Shir You are a blessing sir

Amon_De_Shir, Oct 3rd 2021 at 10:52 PM

@RevolverOcelot I updated ranged weapons to work with vs 1.15.5, but my pull request needs to be merged by the mod author. Because I have been waiting for two weeks, I packed a fixed version of the mod and created a GitHub release. You can download it here https://github.com/AmonDeShir/VSRangedWeapons/releases/tag/0.2.1

RevolverOcelot, Oct 2nd 2021 at 11:25 AM

When I add the mod it will crash upon loading into a new world. Any fixes to this? And is this mod still being updated?

Lyte, Jul 24th 2021 at 9:11 AM

I'm running the latest Version - 1.15  and the mod crashes the game upon loading up a world.

Zarkonnen, Jun 20th 2021 at 6:19 PM

@ThyNightmares

I'm pretty sure I fixed those bugs in version 0.1.1. I can't reproduce them now. Can you upgrade to 0.2.0 and check if the problem is still there?

ThyNightmares, Jun 8th 2021 at 4:47 AM

@Zarkonnen After loading an iron crossbow if you drop it it crashes the game. Not sure if other crossbows do too but id assume so.

I'm also having an issue where my friend I'm playing with cant load the crossbow. He holds right click and it pulls back and clicks but then isnt loaded no matter how long he holds it. Not sure if this is even meant for multiplayer so my bad if it isn't.

Log for the crash:
Running on 64 bit Windows with 16 GB RAM
Version: v1.14.10 (Stable)6/8/2021 12:38:36 AM: Critical error occurred
System.NullReferenceException: Object reference not set to an instance of an object.
at RangedWeapons.ItemRangedWeapon.checkStillLoaded(ItemSlot slot, EntityAgent interactingEntity)
at RangedWeapons.ItemRangedWeapon.<>c__DisplayClass13_0.b__0(Single dt)
at Vintagestory.Common.EventManager.TriggerGameTick(Int64 ellapsedMilliseconds, IWorldAccessor world)
at Vintagestory.Client.NoObf.ClientMain.MainRenderLoop(Single dt)
at Vintagestory.Client.NoObf.ClientMain.MainGameLoop(Single deltaTime)
at _vKnDSS3ZW5fZhqcIJSzL9xbAUttA._mhcyOBzdAWALla9FVcjc15WACGi(Single )
at _w1hCRzQiukKlSxBw6hggDUXQ0jC._3HP2xkrryy8Ktr1q1yqHHv9s1kb(Single )
at _w1hCRzQiukKlSxBw6hggDUXQ0jC._JbXJA0SA6LQOS6diuqtXAjMb8Fo(Single )
at Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(Object sender, FrameEventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at OpenTK.GameWindow.RaiseRenderFrame(Double elapsed, Double& timestamp)
at OpenTK.GameWindow.DispatchRenderFrame()
at OpenTK.GameWindow.Run(Double updates_per_second, Double frames_per_second)
at _ISiSTzGmXXpAqo3PzdxdVD1bClZ._ofvn0Tr1zNGCbNV3SxvKs2MXNP(_C7CLMRbe3BejVtaARYCgl7Bg1vl , String[] )
at _0Y0SN1uu1V65pRLxvnN2xsIjXAg._ofvn0Tr1zNGCbNV3SxvKs2MXNP(ThreadStart )
-------------------------------

SironaGold, May 26th 2021 at 11:30 AM

I'm having a bug where crossbows and Arquebuses sometimes fail to load. I suspect it's because I scroll onto a different item while loading, but once I've done this, they will not load until I restart the game, or all nearby entities are dead. When I put them in an inventory, they have the loaded icon, and appear loaded once I re-equip them, but then they go back into the loading animation and refuse to load again. 

Lisabet, May 17th 2021 at 8:24 AM

since I wouldn't have even considered loading my toolbar with loaded crossbows (not to mention the material cost of that many...mine's steel lol) I'll just say "this is why we can't have nice things" lol; it does make sense from that perspective tho :)

Zarkonnen, May 17th 2021 at 8:07 AM

@Lisabet It unloading when you switch to another item is intentional. Being able to load a whole toolbar full of crossbows and fire them one after the other would be OP IMO.

Lisabet, May 16th 2021 at 11:57 PM

@Tora I just made the crossbow; once you have it in your active hand/toolbar, and bolts in your inventory, hold right click to load it (takes a few seconds to load) and you'll see the bolt on the crossbow.  then if you hold right click, you 'aim' and when you let go it'll fire

@author it didn't stay loaded when I switched to another item on my toolbar though; isn't it supposed to?

Tora, May 16th 2021 at 12:04 PM

It's only me or others also can't shoot weapons, btw i use corect ammo.

Zarkonnen, May 14th 2021 at 10:46 AM

You need to use crossbow bolts, not arrows.

Jaryos, May 14th 2021 at 10:20 AM

All in All, the Mod is phenomenal, but i loaded it on 1.14.10 and the crossbow didnt load, i dont know, if this was my fault or sth, but i also tried it with all types of arrows.

delete edit