Combat And Attack Tweaks on Kiln's action speed
For the Combat And Attack Tweaks author: which of the 20 sites in the beta.6 native notes each Kiln API replaces, and
what is still yours. Kiln 0.2.0-dev.31.30 (mod API 0.2.28); the melee sampler since 0.2.0-dev.31.31 (no API change). Speed: Kiln.ActionSpeed
(action-speed.md, ../services/combat.md). Input:
Kiln.Client.GameInput, documented with Kiln.Client. Evidence for every site on both exes:
../../re/action-speed.md.
The port in short
// in OnLoad, on the host or the dedicated server (Client.IsRemote is false there)
if (ActionSpeed.Available && !Client.IsRemote)
{
if (cfg.MeleeSpeed.Enabled) ActionSpeed.SetDefault(ActionKind.Melee, cfg.MeleeSpeed.Multiplier);
if (cfg.BowSpeed.Enabled) ActionSpeed.SetDefault(ActionKind.Bow, cfg.BowSpeed.Multiplier);
if (cfg.ToolSpeed.Enabled) ActionSpeed.SetDefault(ActionKind.Tool, cfg.ToolSpeed.Multiplier);
}
// "Apply" in your config menu: SetDefault again (or ClearDefault for a switched-off category)
- The three speed fields no longer need
[Synced]. Kiln sends the effective rates to every Kiln client itself (channelkiln:speed), and a guest applies them to its own player's prediction and presentation. Keep[Synced]only if your menu should show the host's values on a guest;ActionSpeed.Get(player, kind)reads them there too. - Your range (0.5 to 10) is Kiln's:
ActionSpeed.MinandActionSpeed.Max. Values from several mods multiply. - Remove:
NativeCode.csandAttackSpeedHooks.cs's byte patterns, the return-address filters, the prediction wraps aroundactor_simulation_start,server_update_animation_graph_2andserver_player_ranged_weapon, the route table (AttackSequences.cs), the bow timing hook, andMultiplayer.cs's speed sync. - Manifest:
"kiln": ">=0.2.0-dev.31.30", built against MDK 0.2.0-dev.31.30.
Site by site
| # | Your site | Kiln now | What you do |
|---|---|---|---|
| 01 | ClientSequenceClockCode | speed/SeqClock (client): Kiln scales the elapsed time of a classified action |
ActionSpeed.SetDefault / Set |
| 02 | DedicatedSequenceClockCode | speed/SeqClock (server exe, rsi contract) |
the same call |
| 03 | ServerSequenceCallCode | a resolve-time anchor in sigdb; Kiln tells authority from prediction with its own kiln.world wraps | nothing |
| 04 | ClientSequenceCallCode | the same, for actor_client_play (presentation, the local player only) | nothing |
| 05 | CurrentEntityCode | Kiln's own world/CurrentEntityId |
nothing |
| 06 | BindGraphCode | speed/GraphBind: binds the player's graph instance to the rate of the action the clock site saw |
nothing |
| 07 | ServerGraphCallCode | anchor; the actor's frame slot [rbp-0x7C] is a fixed sigdb constant |
nothing |
| 08 | ClientGraphCallCode | anchor; [rbp+0x14] |
nothing |
| 09 | EvaluateGraphCode | speed/GraphEval: scales xmm3 on the first pass for a bound instance |
nothing |
| 10 | BowTimingCode | speed/BowTiming: divides charge and fire durations when weaponType is Bow (0) |
ActionKind.Bow |
| 11 | HandSlotsCode | since 0.2.0-dev.31.31: speed/HandSlots, Kiln keeps both hands' world poses per player |
drop it on 31.31 |
| 12 | SlotToWorldCode | Kiln calls speed/SlotToWorld |
drop it |
| 13 | ColliderCreateCode | speed/ColliderCreate: Kiln samples the impact's window (also a late collider's, from the hand history) |
drop it |
| 14 | ColliderMoveCode | speed/ColliderMove: the rest of the window, step by step |
drop it |
| 15 | CastShapeCode | Kiln calls speed/CastShape with equal endpoints (overlaps), box shapes only |
drop it |
| 16 | CollisionBufferCode | speed/ContactWriter: only Kiln's own cast on that thread goes to a 32-record thread-local list |
drop it |
| 17 | ImpactContactCode | speed/ImpactContacts: merge after the stream was rebuilt. Your bit-0 condition is right: block A (bit 0 of +0x1F3 set, of +0x1F4 clear) rebuilds the stream just before; the stock instruction at the site (bit 1) is block B's |
drop it |
| 18 | CollisionFlagCode | Kiln calls the getter (speed/CollisionBackend); your +7 reading is right (0x283F334 / 0x14DB314) |
drop it |
| 19 | InputWriterCode | Kiln.Client GameInput (OnSample, Repeat, Press/Release, BowFullyDrawn) |
port Hold to Light Attack to GameInput |
| 20 | InputMessageCode | Kiln clears stale synthetic presses itself (GameInput) | nothing |
What is different from beta.6
- Classification. Kiln does not use SequenceRuntimeIds, graph states or overlays. It reads the running action's
trigger and its used item's equipment slot type from the game's reflection and item data. Melee weapon with
Primary, Primary_Tap, Primary_Hold or Heavy is Melee. Tool is Tool, with SpecialAbility too (your
0x1751FA18and0xFF31A3F7), and the pickaxes are tools (slot BuildTool; from 0.2.0-dev.31.32, before which your0x38C582A0and0x6BC5D8B1on a pickaxe kept the game's timing). Bow is a ranged weapon's Primary trigger (the draw) or, from 31.32, the shot that server_player_ranged_weapon starts with trigger 24 (your0xAC0ABF5Droute), while the player's ranged weapon type is Bow. If one of your routes is missing (an attack Kiln leaves at the game's timing), kiln.log'sspeed:line from 31.32 names its trigger and item: tell us, and we add it to Kiln's table. The audit behind 31.32: ../../re/actionspeed-audit.md. - Graph. While the classified action runs, Kiln scales the player's whole graph instance, not just the matched state or overlay. Legs move at the rate while a player attacks on the move.
- Melee sampling above 2x is Kiln's from 0.2.0-dev.31.31 (
ActionSpeed.Status.MeleeSamplingtrue where it works): you can drop sites 11-18 andMeleeSweepHooks.cs/MeleeContactSampling.cswhen your mod asks for"kiln": ">=0.2.0-dev.31.31". Kiln follows your approach (the step interval against the SpawnImpact window, the stock box shape, up to ten overlaps, a thread-local contact list, a merge before damage with your dedupe rules), with three differences: the collider is posed through the hand (the interpolated hand pose composed with the collider's offset from the hand, so the blade follows its arc instead of the chord between two box poses); a new action's hand history starts with the previous step's pose; and a cast that faults switches the sampler off for the process. It has not been seen in a real game yet: keep your build as a fallback until a test confirms it. A server admin can switch it off withkiln/config/combat.json{"meleeSampling": false}; thenStatus.MeleeSamplingis false and your own sampling (read the rate withActionSpeed.Get(player, ActionKind.Melee)) can take over. - Untested above about 3-5x on busy dedicated servers. Your lab numbers (beta.6, bots) are in ../services/combat.md.
- Who applies what. The host or dedicated server has authority. A guest applies the server's rates only to its own player. Guests on an older Kiln see server-timed results.
Kiln's sampler (0.2.0-dev.31.31)
Sites 11-18 are bound in native/services/combat/sampler_bind.h and action_speed.cpp, with every frame and layout
value pinned in sigdb on both exes and re-verified statically (../../re/action-speed.md).
Host tests over fakes of the hook contexts: capture to sweep to merge, sub-tick swings, a late collider, a full stream,
the dedupe with the native stream (reversed pairs too), the kill switch, a non-Jolt backend, nothing at 2x, threads.
What is left: a test in a real game.