You are viewing a potentially older version of this package. View all versions.
Searica-ProjectileTweaks-1.4.0 icon

ProjectileTweaks

A lightweight gameplay mod that lets you customize how firing projectiles works. Allows customization of bows, crossbows, spears, bombs, and staffs. Uses Jotunn to sync configurations if the mod is installed on the server.

Date uploaded 6 months ago
Version 1.4.0
Download link Searica-ProjectileTweaks-1.4.0.zip
Downloads 3614
Dependency string Searica-ProjectileTweaks-1.4.0

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2202 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.

Preferred version: 5.4.2202
ValheimModding-Jotunn-2.21.3 icon
ValheimModding-Jotunn

Jötunn (/ˈjɔːtʊn/, 'giant'), the Valheim Library was created with the goal of making the lives of mod developers easier. It enables you to create mods for Valheim using an abstracted API so you can focus on the actual content creation.

Preferred version: 2.21.3

README

ProjectileTweaks

A lightweight gameplay mod that lets you customize how firing projectiles works. Allows customization of bows, crossbows, and staffs. Uses Jotunn to sync configurations if the mod is installed on the server.

Server-Side Info: This mod works as a purely client side mod but can optionally be installed on the server to enforce custom configuration settings.

Description

ProjectileTweaks is intended to be a lightweight and open-source mod that provides an alternative to BetterArchery and BowPlugin. Some of ProjectileTweaks features also overlap with MagicPlugin but the two are fully compatible so you can still enjoy the extra features from MagicPlugin.

Tweaks are applied separately for bows, crossbows, spears, and staffs.

Bows, Crossbows, & Spears

For bows, crossbows, and Spears you can customize:

  • Spread of the projectiles (this is referred to as accuracy in BowPlugin)
  • Velocity of projectiles
  • Launch angle of arrows and bolts
  • Position that projectiles spawn relative to the player when they are fired by changing the horizontal and vertical offsets

The default configuration adjusts bows and spears to launch projectiles at the same angle as crossbows. The spawn locations of arrows and spears are also tweaked to improve the alignment of arrow trajectory with the aiming crosshairs, so that arrows and spears fired with zero spread launch in alignment with the crosshair rather than being slightly offset towards the players left side.

Staffs

For staffs you can customize:

  • Spread of projectiles
  • Velocity of projectiles
  • Position that projectiles spawn relative to the player when they are fired by changing the horizontal and vertical offsets

The default configuration adjusts the spawn position of projectiles fired from staffs so that if spread is set to zero the projectile is aligned with the aiming crosshair.

Configuration

A config file BepInEx/config/Searica.Valheim.ProjectileTweaks.cfg is created after running the game once with this mod. You can adjust the config values by editing this file using a text editor or in-game using the Configuration Manager. The mod has a built-in file watcher so either method will work and changes will be reflected in-game as you change the settings.

Bow Section

These settings control features relating to bows.
Setting Server Sync Description
Draw Speed Multiplier Yes Multiplier for draw speed of bows. Set to 2 to draw twice as fast. Does not affect Vanilla scaling with skill level.
  • Acceptable values: (0.5, 2)
  • Default value: 1
Spread Multiplier Yes Multiplies the min and max projectile spread, so if you set it to zero your arrows will have zero spread.
  • Acceptable values: (0, 2)
  • Default value: 1
Velocity Multiplier Yes Multiplies velocity of arrows.
  • Acceptable values: (0.1, 2)
  • Default value: 1
Launch Angle Yes Changes the launch angle for arrows. Vanilla default for bows is 0. Negative values angle upwards, and positive values angle downwards.
  • Acceptable values: (-5, 5)
  • Default value: -1
Horizontal Offset Yes Offsets the location that arrows are launched from when firing them. Positive shifts it to your characters right. Negative shifts it to your characters left.
  • Acceptable values: (-0.75, 0.75)
  • Default value: 0.2
Vertical Offset Yes Offsets the location that arrows are launched from when firing them. Positive shifts it upwards. Negative shifts it downwards.
  • Acceptable values: (-0.75, 0.75)
  • Default value: 0.2

Bomb Section

These settings control features relating to bows.
Setting Server Sync Description
Spread Multiplier Yes Multiplies the min and max projectile spread, so if you set it to zero your arrows will have zero spread.
  • Acceptable values: (0, 2)
  • Default value: 1
Velocity Multiplier Yes Multiplies velocity of bombs.
  • Acceptable values: (0.1, 2)
  • Default value: 1
Launch Angle Yes Changes the launch angle for bombs. Vanilla default for bombs is 0. Negative values angle upwards, and positive values angle downwards.
  • Acceptable values: (-5, 5)
  • Default value: -1
Horizontal Offset Yes Offsets the location that bombs are launched from when throwing them. Positive shifts it to your characters right. Negative shifts it to your characters left.
  • Acceptable values: (-0.75, 0.75)
  • Default value: 0.0
Vertical Offset Yes Offsets the location that bombs are launched from when throwing them. Positive shifts it upwards. Negative shifts it downwards.
  • Acceptable values: (-0.75, 0.75)
  • Default value: 0.5

Crossbow Section

These settings control features relating to crossbows.
Setting Server Sync Description
Reload Speed Multiplier Yes Multiplier for reload speed of crossbows. Set to 2 to reload twice as fast. Does not affect Vanilla scaling with skill level.
  • Acceptable values: (0.5, 2)
  • Default value: 1
Spread Multiplier Yes Multiplies the min and max projectile spread, so if you set it to zero your bolts will have zero spread.
  • Acceptable values: (0, 2)
  • Default value: 1
Velocity Multiplier Yes Multiplies velocity of bolts.
  • Acceptable values: (0.1, 2)
  • Default value: 1
Launch Angle Yes Changes the launch angle for bolts. Vanilla default for crossbows is -1. Negative values angle upwards, and positive values angle downwards.
  • Acceptable values: (-5, 5)
  • Default value: -1
Horizontal Offset Yes Offsets the location that bolts are launched from when firing them. Positive shifts it to your characters right. Negative shifts it to your characters left.
  • Acceptable values: (-0.75, 0.75)
  • Default value: 0.0
Vertical Offset Yes Offsets the location that bolts are launched from when firing them. Positive shifts it upwards. Negative shifts it downwards.
  • Acceptable values: (-0.75, 0.75)
  • Default value: 0.0

Spears Section

These settings control features relating to spears.
Setting Server Sync Description
Spread Multiplier Yes Multiplies the min and max projectile spread, so if you set it to zero your spear throws will have zero spread.
  • Acceptable values: (0, 2)
  • Default value: 1
Velocity Multiplier Yes Multiplies velocity of thrown spears.
  • Acceptable values: (0.1, 2)
  • Default value: 1
Launch Angle Yes Changes the launch angle for thrown spears. Vanilla default for spears is 0. Negative values angle upwards, and positive values angle downwards.
  • Acceptable values: (-5, 5)
  • Default value: -1
Horizontal Offset Yes Offsets the location that thrown spears are launched from when throwing them. Positive shifts it to your characters right. Negative shifts it to your characters left.
  • Acceptable values: (-0.75, 0.75)
  • Default value: 0.1
Vertical Offset Yes Offsets the location that thrown spears are launched from when throwing them. Positive shifts it upwards. Negative shifts it downwards.
  • Acceptable values: (-0.75, 0.75)
  • Default value: 0.5

Staffs Section

These settings control features relating to staffs.
Setting Server Sync Description
Spread Multiplier Yes Multiplies the min and max projectile spread, so if you set it to zero there will be zero spread.
  • Acceptable values: (0, 2)
  • Default value: 1
Velocity Multiplier Yes Multiplies velocity of projectiles.
  • Acceptable values: (0.1, 2)
  • Default value: 1
Launch Angle Yes Changes the launch angle for thrown spears. Vanilla default for spears is 0. Negative values angle upwards, and positive values angle downwards.
  • Acceptable values: (-5, 5)
  • Default value: -1
Horizontal Offset Yes Offsets the location that projectiles are launched from when firing them. Positive shifts it to your characters right. Negative shifts it to your characters left.
  • Acceptable values: (-0.75, 0.75)
  • Default value: 0.0
Vertical Offset Yes Offsets the location that projectiles are launched from when firing them. Positive shifts it upwards. Negative shifts it downwards.
  • Acceptable values: (-0.75, 0.75)
  • Default value: 0.3

Zoom Section

These settings control features relating to zooming in while aiming.
Setting Server Sync Description
Bow Zoom Yes Set to true/enabled to allow zooming while using a bow.
  • Acceptable values: false, true
  • Default value: true
Crossbow Zoom Yes Set to true/enabled to allow zooming while using a crossbow.
  • Acceptable values: false, true
  • Default value: true
Zoom Key No Set the key used to zoom in while using a bow or crossbow.
  • Acceptable values: KeyCode
  • Default value: RightClick
Cancel Draw Key No Set the key used to cancel drawing your bow.
  • Acceptable values: KeyCode
  • Default value: E
Auto Bow Zoom No Set to true/enabled to make bows automatically zoom in as they are drawn.
  • Acceptable values: false, true
  • Default value: false
Time to Zoom in No Time that it takes to zoom in all the way. '1' is default and recommended.
  • Acceptable values: (0.2, 2)
  • Default value: 1
Stay In-Zoom Time No Set the maximum time the camera will stay zoomed in while holding the zoom key after firing a projectile.
  • Acceptable values: (0.5, 4)
  • Default value: 2
Zoom Factor No Set how much to zoom in relative to current camera view.
  • Acceptable values: (1, 4)
  • Default value: 2

Compatibility

These are non-exhaustive lists, feel free to let me know if you want a mod added to any of the lists.

Incompatible Mods

BetterArchery (by ishid4): BetterArchery touches a lot of the same game code and the features it provides can be replaced using a combination of ProjectileTweaks and BowsBeforeHoes so I won't be supporting any incompatibly or unexpected behavior that occurs if you use ProjectileTweaks alongside BetterArchery.

Compatible Mods

BowsBeforeHoes (by Azumatt): Fully compatible and BowsBeforeHoes is recommended if you want a quiver for your arrows, and the option to recover arrows after firing them. As both mods offer zoom features it is recommended you only enable the zoom feature from one mod.

MagicPlugin (by Blacks7ar): ProjectileTweaks and MagicPlugin can be used together without issue but both mods allow adjusting how projectiles launched from staffs work. If you use these two mods together then leave SpreadMultiplier and VelocityMultiper set to 1 in the configuration for ProjectileTweaks.

BowPlugin (by Blacks7ar): ProjectileTweaks and BowPlugin can be used together without issue but both mods allow adjusting how projectiles fired from bows and crossbows work. If you use these two mods together then leave SpreadMultiplier and VelocityMultipier set to 1 in the configuration for both Bows and Crossbows. I have also set up ProjectileTweaks so that the settings for LaunchAngle should be overridden by the settings in BowPlugin, so LaunchAngle settings in ProjectileTweaks will have no effect if BowPlugin is installed.

Donations/Tips

My mods will always be free to use but if you feel like saying thanks you can tip/donate.

My Ko-fi: ko-fi

Source Code

Source code is available on Github.

Github Repository: ProjectileTweaks

Contributions

If you would like to provide suggestions, make feature requests, or reports bugs and compatibility issues you can either open an issue on the Github repository or tag me (@searica) with a message on my discord Searica's Mods.

I'm a grad student and have a lot of personal responsibilities on top of that so I can't promise I will always respond quickly, but I do intend to maintain the mod in my free time.

Credits

This mod was inspired by BetterArchery and BowPlugin. Also a huge shout-out and thanks to the developers of Jotunn for all their work making and maintaining Jotunn.

Shameless Self Plug (Other Mods By Me)

If you like this mod you might like some of my other ones.

Building Mods

Gameplay Mods

CHANGELOG

Version Notes
1.5.0
  • Updated for Bog Witch release.
1.4.0
  • Updated for Ashlands release.
  • Note: I have not tested all of the new projectiles in Ashlands yet but can confirm that all projectiles that existed pre-Ashlands still work as intended.
1.3.0
  • Changed speed multiplier configs to make things faster if value is larger.
  • Updated Jotunn version.
1.2.0/1.2.1
  • Added config options for bombs.
  • Updated README.
  • Updated Jotunn dependency string.
1.1.1
  • Fixed README
1.1.0
    Features
  • Added a zoom feature when using bows and crossbows. (works with CameraTweaks changing the FoV.
  • Added option to modify bow draw speed.
  • Added option to modify crossbow reload speed.
  • Backend
  • Performance optimizations.
  • Configuration changes immediately save to disk when in-game configuration manager is closed.
1.0.3
  • Updated manifest website link
  • New icon
1.0.1/1.0.2
  • Update for current game patch.
  • Adds configuration option for spears.
  • Fix README
1.0.0
  • Initial release.