GunRangeNoLimit
【Host Only】Allows free extension or reduction of all gun ranges by scaling Raycast distance. ホストのみの導入で動作する全ての銃の射程距離を自由に変更可能なMOD
By REPO_JP
| Last updated | a day ago |
| Total downloads | 239 |
| Total rating | 1 |
| Categories | Mods Server-side |
| Dependency string | REPO_JP-GunRangeNoLimit-1.0.0 |
| Dependants | 0 other packages depend on this package |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2304README
GunRangeNoLimit
Overview
Allows you to freely extend or reduce the effective range of all guns in R.E.P.O. by modifying their Raycast distance. This mod removes practical range limitations by scaling the internal gun hit detection distance and extending laser visuals accordingly.
⚠ Cart laser weapons are NOT supported yet. Cart laser support will be added in a future update.
Features
- Modify range of every ItemGun via configurable multiplier
- Works with host-only installation (host authoritative hit detection)
- Optional visual laser extension for clients
- Runtime reapplication when config changes
- Safe restoration of original gun values when disabled
Technical Details
This mod modifies gun behavior at the program level rather than replacing weapon logic.
Core Mechanism
- Hooks
ItemGun.Start()using Harmony - Reads original
gunRangevalue from each gun instance - Stores original values using InstanceID mapping
- Multiplies Raycast distance using configurable multiplier
- Reapplies values dynamically when configuration changes
Range Processing Flow
- Gun spawns (
ItemGun.Start) - Original range cached per instance
gun.gunRangemultiplied byRangeMultiplier- Host authoritative hit detection applies extended range in gameplay
- Optional client-side visual extension applied
Restoration Safety
- Original ranges are preserved per gun
- Disabling the mod restores vanilla values
- Dictionary entries are cleaned during
OnDestroy
Networking Behavior
- Gameplay works host-only because damage validation occurs on host
- Clients optionally receive visual-only laser extension
- No RPC modification required
Configuration
Location: BepInEx/config/jp.repo.gunrangenolimit.cfg
EnableMod
Enable or disable the mod.
RangeMultiplier
Multiplier applied to all gun Raycast distances.
Examples:
- 1 = Vanilla
- 10 = 10x range
- 300 = Near unlimited range
ApplyVisualForClients
If enabled, laser visuals are extended for non-host clients.
Known Limitations
- Cart laser weapons are currently unsupported.
- Future updates will implement cart laser compatibility.
概要
全ての銃の射程距離を変更し、自由に伸ばしたり縮めたりできるMODです。 内部の命中判定距離を倍率で拡張することで、実質的な射程制限を解除します。 レーザー表示も同時に拡張されます。
⚠ カートレーザーには現在対応していません。 後日のアップデートで対応予定です。
機能
- 全ItemGunの射程を倍率で変更
- 命中判定がホスト権限のためホストのみ導入でもゲームに反映
- 参加者側へのレーザー表示延長を任意で適用可能
- Config変更時に自動再適用
- 無効化時は安全に元の値へ復元
技術的詳細
本MODは武器そのものを置き換えるのではなく、プログラム的に射程値のみを書き換えます。
動作仕組み
- Harmonyで
ItemGun.Start()をフック - 各銃インスタンスの
gunRangeを取得 - InstanceID単位で元の値を保存
- 設定倍率を掛けてRaycast距離を拡張
- Config変更時に全銃へ再適用
射程変更フロー
- 銃生成時に処理実行
- 元射程を保存
- RangeMultiplierを適用
- ホスト側命中判定へ反映
- 必要に応じて参加者側レーザー表示も延長
安全設計
- 元射程は常に保持
- MOD無効時は完全にバニラへ復元
- 銃破棄時にキャッシュを自動削除
ネットワーク動作
- 命中判定はホスト処理のためホスト導入のみで有効
- クライアント側は視覚表現のみ拡張可能
- RPC改変なし
設定項目
設定ファイル: BepInEx/config/jp.repo.gunrangenolimit.cfg
EnableMod
MODの有効/無効切替
RangeMultiplier
全銃のRaycast距離へ適用する倍率
例:
- 1 = バニラ
- 10 = 10倍
- 300 = 実質無制限
ApplyVisualForClients
ONの場合、参加者側にもレーザー延長表示を適用
既知の制限
- カートレーザーは未対応
- 今後のアップデートで対応予定