免费插件

Better Attachments

更好的附件

允许修改附件属性

游戏机制attachmentsweaponsmodifierammo

原作者:VisEntities · 查看 uMod 官方页面 ↗

插件介绍

允许修改附件属性

Better Attachments overrides default attachment attributes and allows to customize penalties/bonuses for each attachment. Additionally, you can define "failure" conditions for attachments that are damaged.

Configuration elements are derived from the built-in Rust attachment attributes, and stored in a map based on the attachment short prefab name:flashlight.entity, holosight.entity, lasersight.entity, muzzleboost.entity, muzzlebrake.entity, silencer.entity, smallscope.entity

The attributes themselves can be created for any attachment, but I can't guarantee certain attributes will be taken into account for any particular attachment... Additionally, some monkeying around with values might be necessary to determine what effect each attribute has for various attachments. (If you have any corrections please let me know)

Additionally, each attribute except conditionLoss can contain 3 fields:

主要用途

主要用于游戏机制、attachments、weapons、modifier等服务端功能。 本插件由 VisEntities 发布,当前目录记录版本为 v0.0.3,uMod 累计下载 12,198 次。

适用场景

  • PVP、战斗或攻防玩法服务器

功能分类

游戏机制attachmentsweaponsmodifierammo
查看 uMod 官方英文简介

Allows modifying attachments attributes

配置说明

Configuration elements are derived from the built-in Rust attachment attributes, and stored in a map based on the attachment short prefab name:flashlight.entity, holosight.entity, lasersight.entity, muzzleboost.entity, muzzlebrake.entity, silencer.entity, smallscope.entity

The attributes themselves can be created for any attachment, but I can't guarantee certain attributes will be taken into account for any particular attachment... Additionally, some monkeying around with values might be necessary to determine what effect each attribute has for various attachments. (If you have any corrections please let me know)

repeatDelay: Weapon fire rate delay (time between shots)

projectileVelocity: Projectile velocity

projectileDamage: Projectile damage

projectileDistance: Max projectile distance

aimsway: Amount of weapon sway (vertical/horizontal movement)

aimswaySpeed: Speed of weapon sway

recoil: Recoil amount

sightAimCone: Projectile spread while aiming down sights

hipAimCone: Projectile spread while shooting from the hip

conditionLoss: Wear damage from use (1.0 = 100%, 0.0 = 0%, etc)

Additionally, each attribute except conditionLoss can contain 3 fields:

enabled: Flag indicating whether the configuration attribute will override the Rust defaults

scalar: Represents a percentage of attribute to apply - 1.0 = 100%, 0.0 = 0%, etc.

offset: Additional modifier added after scalar is applied

I believe a simplified formula for how these values are applied is: ([baseAttribute] * scalar) offset, where [baseAttribute] is derived from the weapon and ammo type. However, I'm not yet familiar on how scalar and offset are applied regarding aimsway, aimswaySpeed, recoil, sightAimCone, and hipAimCone. I will update this description as I figure these out.

The default configuration has a simple setup for silencers, which eliminates damage and bullet speed penalties (scalar set to 1.0), and also prevents them from taking wear damage (conditionLoss set to 0.0).

For an extra challenge, you can now add a failure behavior to attachments that wear beyond a certain point - a few examples are created in the default configuration, so it is recommended you delete the old json and let a new one be generated to see this in effect.

"failures": { // new "failures" section "muzzleboost.entity": { // attachment name (short prefab name) "enabled": true, // enabled/disabled flag "start": 0.15, // starting point for failure (in % of max attachment HP) "target": 0.02, // guaranteed failure point (in % of max attachment HP) "weaponDamage": 0.2, // damage to weapon on failure (% of max weapon HP) "playerDamage": 0.2 // damage to player on failure (% of max player HP) } ...

This behavior allows a "failure" to occur if your attachments reach a certain point of wear. The chance of failure is calculated using a logarithmic scale from the start HP percentage, to the target HP percentage, where there is a 0% chance of failure above start HP, and a 100% chance of failure at/below target HP.

In the event that a failure occurs on firing the weapon, the weapon will take damage and/or the player will take damage as a percentage of their max possible HP. Additionally, effects will be run on the weapon (currently sparks metal impact noises) to indicate there was a failure.

Because the chance of failure is logarithmic, letting your attachment wear closer to the target HP greatly increases your chances of failure. For example, using the 15% and 2% chances in the configuration snippet above:

% HP % Chance of Failure 0 100.00 1 100.00 2 100.00 3 79.88 4 65.60 5 54.52 6 45.48 7 37.83 8 31.20 9 25.35 10 20.12 11 15.39 12 11.07 13 7.10 14 3.42 15 0.00

Flashlight: 5% better aim accuracy, slightly reduced recoil, slightly reduced aim sway speed

官方配置示例

"failures": { // new "failures" section
    "muzzleboost.entity": { // attachment name (short prefab name)
      "enabled": true, // enabled/disabled flag
      "start": 0.15, // starting point for failure (in % of max attachment HP)
      "target": 0.02, // guaranteed failure point (in % of max attachment HP)
      "weaponDamage": 0.2, // damage to weapon on failure (% of max weapon HP)
      "playerDamage": 0.2 // damage to player on failure (% of max player HP)
    }
...
% HP    % Chance of Failure
0        100.00
1        100.00
2        100.00
3         79.88
4         65.60
5         54.52
6         45.48
7         37.83
8         31.20
9         25.35
10        20.12
11        15.39
12        11.07
13         7.10
14         3.42
15         0.00

更新日志

最新版本: v0.0.3
最后版本发布: 2018-08-06
最后更新(条目): 2026-08-27

本站记录 uMod 官方插件信息。完整的历史更新日志请参阅 uMod 官方页面

安装方法

  1. 确认服务器已安装 Oxide / uMod 或兼容的 Carbon 框架。
  2. 登录本站后点击"下载",由本站已校验的本地缓存提供作者发布的文件。
  3. 将 .cs 文件放入服务器的 oxide/plugins 目录。
  4. 观察服务端控制台,确认插件编译并成功加载。
  5. 具体配置、权限、指令和依赖请查看原作者的 uMod 页面。

使用前注意

  • Rust 更新后,请先确认插件是否仍兼容当前服务端版本。
  • 修改配置前建议备份原配置文件,并在测试服验证后再部署到正式服。
  • 若插件依赖其他扩展或库,以 uMod 原作者页面的最新说明为准。
  • 本站中文内容用于辅助理解,遇到版本差异时以官方英文文档和源码为准。
来源说明

中文介绍由 uMod 官方简介翻译整理。插件著作权、许可证、完整文档和最新发布状态均以原作者及 uMod 官方页面为准。