You are viewing a potentially older version of this package. View all versions.
TeamSpyraxi-Guns-0.2.1 icon

Guns

Implements player-shootable guns into the game.

Date uploaded 5 months ago
Version 0.2.1
Download link TeamSpyraxi-Guns-0.2.1.zip
Downloads 8864
Dependency string TeamSpyraxi-Guns-0.2.1

This mod requires the following mods to function

Venomaus-SODCommon-2.0.2 icon
Venomaus-SODCommon

A common library for SOD mods.

Preferred version: 2.0.2

README

Guns - Implements player-shootable guns into the game

A BepInEx Bleeding Edge (v667) plugin for Shadows of Doubt (IL2CPP).

What is it?

This plugin implements player-shootable guns into the game.

Installation

r2modman or Thunderstore Mod Manager installation

If you are using r2modman or Thunderstore Mod Manager for installation, simply download the mod from the Online tab.

Manual installation

Follow these steps:

  1. Download BepInEx (build artifact 667 or higher) from the official repository.
  2. Extract the downloaded files into the same folder as the "Shadows of Doubt.exe" executable.
  3. Launch the game, load the main menu, and then exit the game.
  4. Download the latest version of the plugin from the Releases page. Unzip the files and place them in corresponding directories within "Shadows of Doubt\BepInEx...". Also, download the SOD.Common dependency.
  5. Start the game.

Usage and features

This mod changes the guns that are already in game so that they can be fired while the player is using them. The way that citizens use guns is not changed.

  • You must hold down the Secondary Action button to aim and then press the Primary Action button to fire, otherwise you will bash with the gun (like normal except for the direction that the gun is pointing).
  • In general, you will need to be careful when you use your gun if you don't want to end up being chased and shot at by an angry crowd. Firing guns makes a lot of noise, which causes citizens to either investigate or flee (and sometimes sound the alarm).
  • Includes recoil and a cooldown period between shots for all guns.
  • Shotguns are adjusted to have a multiple bullet holes and a greater spread than other weapons.
  • Includes "hold to fire" for automatic weapons (just the Faucon Rifle for now).

Note: I interpreted the Prop Gun as being fake, so it is unchanged from the base game.

Configuration

Config settings include:

Name Description
EjectBrass If true, eject bullet casings.
RecoilAmplitudeFactor The factor applied on top of recoil amplitude. Set to 0 to disable recoil completely.
GunDrawBarkChance The chance (from 0.0 to 1.0 = 100%) that citizens will warn you to put a gun away while you have one drawn.
IllegalStatusDurationOnHit The number of seconds after a citizen is hit by the player's gunfire that the player has illegal status.
CitizenNerveLostPerSecondAimedAt How much of a citizen's nerve is lost per second that the player is aiming directly at them with a gun within the citizen's sight range. Citizen's tend to have maximum nerve values of around 0.4 to 0.5, and start running away around 0.1 (and may attempt to sound the alarm).
CitizenNerveLossAccountsForAwareness Account for citizen alertness and blindness when calculating the actual nerve lost per second while being aimed at. The amount of nerve lost will be reduced by some factor depending on the citizen's traits while this setting is enabled.
GunTestingMode If true, add all guns and ammo to your inventory. Works immediately. Save the setting as false prior to setting it back to true to repeat the command.

You can use r2modman or Thunderstore Mod Manager to easily change the plugin's config settings (via the Config Editor tab). You can also manually edit the config file in the BepInEx directory (I believe that changes you make will take effect while the game is running, but I'm not 100% positive about that).

If you have BepInExConfigManager installed, you can use the in-game menu to edit the config settings.

Known Issues

Report any other issues in the "Spyraxi's Mods & Utilities" thread on the official game Discord ("mod-releases" channel).

Future Plans

Roughly in order of highest to lowest priority. Lower items on the list are more ambitious ideas that might be implemented in separate plugins.

  • Add a configuration option where ammo must be in the player's inventory for the gun to fire.
  • Add temporarily shooting out lights, disabling cameras, breaking TVs, etc.
  • Add a configuration option that causes ammo in the inventory to be used up while firing.
  • Add a configuration option that adds clip sizes and makes reloading required (that works with or without the ammo setting).
  • Add the ability for bullets to pierce through objects.
  • Allow the Pistol Silencer to be attached to a pistol as a contextual action, or detached by putting it down.
  • Add new guns.

License

All code in this repo is distributed under the MIT License. Feel free to use, modify, and distribute as needed.

CHANGELOG

CHANGELOG

0.2.2

  • Add configuration option that controls the type of ammo used by the shotgun.
  • Add damage factor configuration options for each gun.
  • Add shotgun accuracy configuration option (for the default buckshot ammo type).
  • Do not add ammo to the player's inventory when using the test switch.

0.2.1

  • Adjustment to LifeAndLiving integration to be compatible with the newest version.

0.2.0

  • Added behavior where citizens will lose nerve and run away if you point a gun at them for a long enough period of time. If indoors, citizens will attempt to sound the alarm. The rate at which this happens varies depending on your distance from the citizen, their alertness level, and your visibility. Added configuration settings related to this behavior.
  • Added damage adjustment factors, and did a first pass to balance weapon damage.
  • Increased number of shotgun projectiles per shot to 8 in total.
  • Added weapon buy price adjustments, and did a first pass to balance weapon prices.
    • If Venomaus' Life and Living mod is installed, this mod will take its item price configuration settings into account.
  • Fixed console errors popping up while barging through a door while aiming a gun (and other events that forcefully unequip items).
  • Fixed bug where melee weapons could get stuck showing "Fire" instead of "Attack" as their primary action, disabling the melee attack (caused by unequipping a gun while aiming it).

0.1.3

  • Removed SOD.Common and Castle assemblies that could become outdated.

0.1.2

  • The GunTestingMode config setting has been changed to work as soon as it is set (no need to load a game or start a new game).
  • Cleaned up the code, refactored in various places to simplify the logic.
  • Fixed bug where the player would sometimes get stuck in a state where "throw" is their secondary action (during the first game started with the mod enabled).
  • Fixed bug where citizens would warn the player ("bark" at them) about the weapon they are holding using the bark chance config value, even when the weapon was not a gun.
  • Updated IL2CPP game dependencies

0.1.1

  • Fixed issue where certain non-gun weapons would show an "Aim" action and disable throwing.
  • Fixed issue where swapping items while zoomed in with the "Aim" action would cause you to get stuck in "zoomed-in mode".