diff --git a/.github/workflows/test-ultimate-tuning.yml b/.github/workflows/test-ultimate-tuning.yml new file mode 100644 index 0000000..2016001 --- /dev/null +++ b/.github/workflows/test-ultimate-tuning.yml @@ -0,0 +1,22 @@ +name: Test Ultimate 350 Tuning + +on: + push: + branches: [ultimate-350-tuning] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 24 + cache: npm + - run: npm ci + - run: npm test diff --git a/README.md b/README.md index fb3a0ff..de3e61b 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,7 @@ nfsu2-web pairs `GARAGE.DAT` with its profile through a fingerprint of the caree - **MAX OUT** (in the tuning dialog header) enables the 54 active performance bytes, including mutually exclusive parts, and sets the nine unique flags; the game's own apply routine does not do this. It does not change the visual-related flags, purchase bookkeeping or inactive IDs. Only the muffler (15) and cold air intake (16) edits are confirmed by in-game save diffs. - **Unique** controls edit separate per-car category flags without a confirmation prompt. They do not emulate the unique shop's event-status update or full reward process. See [technical.md](technical.md) for the code trace and evidence limits. - **Unlock all** sets the 420 bytes that NFSU2-ProfileCreator writes as `0xFF` in each car slot (ranges in [src/data/unlock-table.ts](src/data/unlock-table.ts), offsets `+0x462` to `+0x7E1`). It only writes those bytes. The byte-to-part mapping and the in-game effect are not verified yet. +- **Ultimate Top Speed — All Cars** (experimental, on the DYNO tab) creates a top-speed optimization for every filled, unlocked, supported garage car across all five dyno setups. It uses the installed parts, each car's traced gear ranges and the game's dyno simulator; it does not install upgrades or bypass the game's speed limiter/gear clamps. Unsupported, locked, empty and experimental traffic slots are skipped. This is a top-speed optimization, **not a guarantee of 350 km/h**: actual speed depends on each car's physics, installed transmission and game limits. The edited setups are applied to the in-browser save; download a separate save and keep the original backup. In-game verification is required. - **Dyno** (in the tuning dialog) reads car data from `GLOBAL\GLOBALB.BUN` in your NFSU2 folder; the file is read locally and not shipped with the editor. A car needs at least one tunable performance or body package installed. The **ECU** and **Turbo** tabs show the game's 9-point torque graph (idle to redline) with each point's min–max range, stock value and current setting. Click or drag a column, or focus the graph and use the arrow keys (Shift = 10 steps). By default edits follow the game's tuning screen: raising a point also lifts its direct neighbours and lowers the points further away, so the curve's total torque stays the same. **Cheat limits (save-only)** sets each point on its own instead, which only a save edit can do. When the save loads, the game spreads the change in total torque evenly over all nine points, so lowering some points pushes the others past their maximum; dashed **In game** marks show those values, and the result table includes them. The **Drivetrain** tab is the game's Gear Ratios screen: each gear's speed at the rev limiter on a 0–420 km/h bar (green up to the current setting, red for the rest of its range) and the final drive from Top speed to Acceleration. Click or drag a bar, or use −/+ or the arrow keys; like the game, moving a gear pushes its neighbours to keep a 0.05 ratio gap. The ranges come from the installed transmission parts and cannot be unlocked through the save, because the game clamps out-of-range values when it loads. **Auto-tune ECU & turbo** starts from the graph and loads its result into it for manual adjustment; it always sets points independently, so its curves use the cheat limits whether or not the box is checked. Edits are drafts per slot and setup (a **Saved / Edited** comparison) until you **Apply** them; **Discard changes** drops them. Apply writes the selected setup's 18 curve bytes, plus its gearing and scalar bytes when you changed them. Times come from the game's own dyno simulation and are not yet checked against the in-game screen. See [technical.md](technical.md). - **Optimize gearing & shift spacing** is unchecked by default. Enable it to include unlocked final-drive and forward-gear settings in event tuning. The search checks every shift, including gears outside the timed run, and balances usable power and event performance with average/worst-shift power-band coverage and more even percentage RPM drops. Excessive RPM drops are capped against the neutral transmission and its geometric spacing. This tunes ratios, not the game's shift-RPM thresholds. Apply saves those settings alongside the curves, leaving other setups and unrelated bytes unchanged. Locked and unused gears are preserved. Gearing is frozen during the initial and final usable-power passes. The game's adjacent-gear constraints and byte normalization are included; see [technical.md](technical.md#gearing-trace). - **Event-specific auto-tuning** replaces the goal slider. Selecting Circuit or URL targets broad usable power through shift recovery, Drag targets sustained high-RPM power and top-speed-biased gearing, and Drift/Street X target low–mid RPM response and acceleration. The [wiki's tuning guidance](https://nfs.fandom.com/wiki/Need_for_Speed:_Underground_2/Performance_Tuning) recommends acceleration for short tracks/drift and top speed for drag; the exact RPM targets are editor heuristics, not prescriptions from the wiki or a lap/drift simulation. The displayed target band is split into three equal RPM regions and their average powers are combined geometrically, so a lone peak cannot substitute for usable power across the band. Auto-tune builds that power, runs two event/performance passes with optional gearing, then refines it with gearing fixed. Final refinement cannot worsen any resulting acceleration time or top/trap speed. diff --git a/index.html b/index.html index c8c66b6..79fda30 100644 --- a/index.html +++ b/index.html @@ -274,6 +274,12 @@
{{ tuning.dyno.blocked }}
+