Beta!

Mods / Ranged Weapons

Category: #Crafting #Technology
Author: Zarkonnen
Side: Both
Created: May 13th
Last modified: May 25th
Downloads: 455

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.

This is the first release of the mod, and I would love your feedback. I've also released the code on GitHub, so long-term, others can make their own ranged weapons based on it.

It currently adds two new weapons: a crossbow and an arquebus.

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.

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

Version For Game version Downloads Release date Changelog Download
v0.1.1 193 May 25th Show RangedWeapons-0.1.1.zip
v0.1.0 262 May 13th Show RangedWeapons-0.1.0.zip

8 Comments

ThyNightmares, Jun 8th

@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

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

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

@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

@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

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

Zarkonnen, May 14th

You need to use crossbow bolts, not arrows.

Jaryos, May 14th

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