ConsistentShots

版本 v0.0.2·更新於 2025-10-27

Make your shots controllably deterministic

模組介紹 作者原文

Consistent Shots

In short, using the scroll wheel to aim will make your shot consistent. This fundamentally changes how the game is

played since you can memorize the positions of shots on certain boards and reproduce them consistently, but I believe

it's for the better.

With this mod you can set up the general position for a shot such as at the edge of a peg, snap it into place with the

scroll wheel, then every time you fire that shot it will follow the same bounce.

How it works

For a confusing video

see this message on the Peglin

discord server.

Essentially, in the vanilla game, when you're aiming to the right and scroll up to adjust the shot the following might

happen in the code:

| Player Action | Aim Direction (degrees) | Notes |

|---------------------------------|-------------------------|--------------------------------------------------------------------|

| Start the battle | 270 | this is why, even in vanilla, firing straight down is consistent |

| Aim to the right with the mouse | 330.023016 | Aiming with the mouse will almost always have some decimal places |

| Scroll Up | 330.056123 | Add ~0.05 degrees to the aimer but not exactly |

| Scroll Down | 330.010012 | Subtracts ~0.05 degrees, again accumulating floating point errors |

| Scroll Up | 330.051297 | These last 2 just showcase that the aimer continues to be "random" |

| Scroll Down | 330.001154 | |

These numbers are fabricated for this example, but it's essentially what happens in the game. Even though the

prediction indicator in the game might appear to be in the exact same position you can see that the angle the game

uses to fire the shots changes every so slightly even if you only move the aimer back and forth.

Now we can compare with this mod enabled:

| Player Action | Aim Direction (degrees) | Notes |

|---------------------------------|-------------------------|-------------------------------------------------|

| Start the battle | 270 | same initial rotation as in vanilla |

| Aim to the right with the mouse | 330.023016 | Aiming with the mouse doesn't snap to any angle |

| Scroll Up | 330.050000 | Snap up to the next increment of 0.05 |

| Scroll Down | 330.000000 | Snap down to the previous increment of 0.05. |

| Scroll Up | 330.050000 | Snap up to the same value from before |

| Scroll Down | 330.000000 | And snap back down again |

The rounding of the aimer rotation is the primary factor in the outcome of the shot. If you fire a shot while aiming

at 330.050000 it will behave exactly the same every time as long as it hits the same pegs. So you can see

Primary features

  • Angle Snapping
  • Using the slow aim (scroll wheel by default) will snap in a configurable increment (0.05 degrees by default)

rather than the default behavior which can accumulate floating point errors and vary depending on your input

device.

  • Quantize Aim Vector
  • rounds vector components to 0. This should only happen when incrementing the aimer to point in one of the four

cardinal directions which is generally only noticeable when moving back to the starting aim direction

(270 degrees, straight down).

  • Deterministic long peg removal
  • The timer for removing a long peg (the rectangular slide ones like the horns in the minotaur fight) is tied to the

physics step instead of the framerate to avoid variations due to framerate and timescale.

Note

Astute players will notice that this behaviour was an optional experimental feature in

the TestingFloor mod. I've moved

that code into a standalone mod and allowed you to configure the exact snapping angle.

安裝與使用 安裝:按包內說明操作

  1. 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
  2. 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
  3. 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
  4. 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。

不同模組的安裝位置差異較大,包內說明是最可靠的依據。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

Hamunii-AutoHookGenPatcherdiscohatesme-HideManager

檔案與校驗

檔案名稱
ConsistentShots-0.0.2.zip
檔案大小
11.1 KiB
SHA-256
a86685b4a1943a0ffdbf46e59404db00200b8f5e7b389bf37a0883d1d89db2e2
入庫時間
2026-10-10 18:34