You are viewing a potentially older version of this package. View all versions.
ryuka_labs-Perfect_Oils-1.3.5 icon

Perfect Oils

Selectively removes configurable negative effects from SULFUR weapon oils while preserving positive effects and marking removed tooltip lines.

Date uploaded 2 days ago
Version 1.3.5
Download link ryuka_labs-Perfect_Oils-1.3.5.zip
Downloads 53
Dependency string ryuka_labs-Perfect_Oils-1.3.5

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2305 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2305

README

Perfect Oils 1.3.5

A BepInEx 5 mod for SULFUR that selectively removes undesirable weapon-oil traits while preserving positive effects and the original localized descriptions.

Removed traits

Every supported trait has its own config switch.

The default profile only removes effects that have relatively little impact on weapon balance:

  • Disable Aiming
  • Extra Ammo Consume Chance
  • Decrease Accuracy When Moving
  • Decrease Move Speed
  • Decrease Jump Power
  • Decrease Loot Chance Multiplier
  • Disable Money Drops
  • Disable Organ Drops

The following stronger stat-changing removals are available but default to disabled:

  • More Bullet Drop
  • More Drag
  • Negative Bullet Speed
  • Negative Damage
  • Negative Bullet Size
  • Negative RPM
  • Extra Oil Durability Cost

The signed-value rules only suppress modifiers that reduce the stat:

  • ProjectileTimeScale < 0: negative bullet speed;
  • Damage or DamageModifier < 0: negative damage, for both Flat and percentage modifier types;
  • ProjectileScale < 0: negative bullet size;
  • RPM < 0: negative fire rate.

Positive bullet-speed, damage, bullet-size, and RPM modifiers remain active.

More Bullet Drop also suppresses its same-oil reduced-speed or increased-mass companion modifiers. Because reduced projectile speed belongs to both categories, it is removed when either RemoveMoreBulletDrop or RemoveNegativeBulletSpeed is enabled.

Tooltip behavior

The game still shows the original oil effects. Lines for traits currently disabled by Perfect Oils are wrapped in TextMeshPro's strikethrough tag.

This works for:

  • hovering an oil item;
  • hovering an oil listed on an enchanted weapon;
  • randomly selected oil enchantments.

The tooltip and runtime suppression use the same trait classifier and the same config values, so their states remain consistent.

Implementation

Perfect Oils keeps EnchantmentDefinition.modifiersApplied intact. At database load it indexes exact modifier signatures by:

  • enchantment source ID;
  • ItemAttributes value;
  • StatModType;
  • modifier value;
  • classified negative-trait flags.

A targeted prefix on ItemStats.AddModifier(ItemAttributes, StatModifier) ignores only a matching oil modifier whose corresponding config option is enabled. No weapon, loot, movement, aiming, projectile, or damage consumer is replaced.

The index contains every known negative signature regardless of the current settings, so config changes do not require rebuilding the asset database. Existing weapon stats may need the game to rebuild/resync the item, or a restart, before a changed modifier setting is reflected. Tooltip changes are evaluated whenever the tooltip is rebuilt. The durability-cost setting updates the shared oil definitions immediately.

Requirements

  • SULFUR
  • BepInExPack 5.4.2305

Build

  1. Copy LocalPaths.props.example to LocalPaths.props.
  2. Set SulfurManagedDir and BepInExCoreDir.
  3. Build PerfectOils.csproj in Release mode.
  4. Copy PerfectOils.dll to BepInEx/plugins/PerfectOils/.

No game DLLs, Unity assemblies, or BepInEx binaries are included in this source package.

Config

Generated at:

BepInEx/config/com.ryuka.sulfur.perfectoils.cfg

General

  • Enabled = true
  • RemoveExtraDurabilityCost = false

Traits

Enabled by default:

  • RemoveDisableAiming = true
  • RemoveExtraAmmoConsumeChance = true
  • RemoveDecreaseAccuracyWhenMoving = true
  • RemoveDecreaseMoveSpeed = true
  • RemoveDecreaseJumpPower = true
  • RemoveDecreaseLootChanceMultiplier = true
  • RemoveDisableMoneyDrops = true
  • RemoveDisableOrganDrops = true

Disabled by default:

  • RemoveMoreBulletDrop = false
  • RemoveMoreDrag = false
  • RemoveNegativeBulletSpeed = false
  • RemoveNegativeDamage = false
  • RemoveNegativeBulletSize = false
  • RemoveNegativeRpm = false

Display / Debug

  • ShowRemovedTraitsWithStrikethrough = true
  • DetailedLogging = false

The existing General.RemoveExtraDurabilityCost key is retained for compatibility with v1.1.x configuration files.

Runtime verification

The initialization log reports separate counts for:

  • negative bullet speed;
  • flat negative damage;
  • percentage negative damage;
  • negative bullet size;
  • negative RPM.

This verifies the actual Addressables data loaded by the current game build, which is not stored in the managed DLLs.

Author

ryuka

CHANGELOG

Changelog

1.3.5

  • Fixed the More Bullet Drop option not working correctly.
  • Fixed missing strikethrough text for Bullet Drop effects.
  • Improved detection of Bullet Drop oil traits.
  • Removed the unfinished stat-reading workaround from previous test versions.
  • Fixed compilation errors from the diagnostic update.

1.3.0

  • Added configurable removal of negative RPM modifiers.
  • Added individual configuration options for all supported negative oil traits.
  • Enabled only lower-impact quality-of-life removals by default.
  • Disabled balance-sensitive ballistic, damage, bullet-size, RPM, and durability removals by default.
  • Added 14-language localization for the SULFUR Config interface.

1.2.1

  • Removed obsolete source-file references from the project.
  • Replaced the deprecated Unity object lookup API.

1.2.0

  • Added configurable removal of negative Bullet Speed.
  • Added configurable removal of negative flat and percentage Damage.
  • Added configurable removal of negative Bullet Size.
  • Unified runtime suppression and tooltip-strikethrough decisions.

1.1.1

  • Fixed oil detection for the current SULFUR item database.
  • Added database retry behavior and clearer diagnostic logging.

1.1.0

  • Preserved original oil descriptions.
  • Added strikethrough display for effects removed by the mod.
  • Applied suppression when oil modifiers are added to weapon stats.