1. Theproga
    Theproga
    5/5,
    Version: 1.0
    Disclaimer: Static analysis of the code against BeamNG documentation, not in-game observation. Conclusions are evidence-based from the code; in-game testing is the final confirmation.

    What this mod is
    A vehicle-side extension adding a Quick Access radial menu with "god-mode" cheats: invulnerability, power multiplier (1×–100×), super grip, low gravity, plus a drivetrain heal. Mounted as lua/vehicle/extensions/auto/codexCheatMenu.lua (auto-loaded per vehicle).
    What's good

    Lua syntax is clean (parser-verified, 695 lines) and all JSON is valid — no trailing-comma issues.
    Genuinely well-written. This is above typical mod quality:

    math functions are localized at the top (abs, floor, max, min) — a real micro-optimization;
    cheats capture a base-data snapshot before modifying values (powerBaseData, wheelGripBaseData, transmissionBaseData, gravityBaseValue), so toggling off restores the original instead of guessing;
    state is applied event-driven via scheduleReapply / pendingReapplyFrames, not blindly every frame;
    heavy operations are nil-guarded throughout (powertrain.getDevicesByCategory and ..., v and v.data and v.data.beams).


    dependencies = {"core_quickAccess"} is declared correctly so the radial menu host loads first.

    CRITICAL findings
    None. The mod is structurally sound and should load and run without errors.
    MEDIUM findings
    None.
    MINOR findings
    1. Global guihooks.message is monkey-patched and never restored
    setupMessageHook() replaces the global guihooks.message with a wrapper that swallows damage/engine messages while cheats are active. Two small concerns:

    the original is only stored in a local (originalGuihooksMessage) and never restored on onExtensionUnloaded/reset — if the extension reloads, the wrapper can stack on itself or the patch persists after the mod is gone;
    the filter matches by lowercased substring in both English and Russian ("engine", "radiator", "двигател", "перегрев", …). Any unrelated message containing those substrings (e.g. a mission text mentioning "engine") gets suppressed globally while a cheat is on.

    Low impact, but a global hook with no teardown is the kind of thing that bites later. Suggestion: restore guihooks.message = originalGuihooksMessage in onExtensionUnloaded, and gate the filter to messages actually originating from this vehicle.
    OPTIMIZATION (no bug, but reduces per-frame cost)
    2. healDrivetrain() rebuilds device lists every frame — cache them
    This is the one real performance note. While a power multiplier or invulnerability is active, updateGFX calls healDrivetrain() every frame, and healDrivetrain() calls powertrain.getDevicesByCategory("engine") and powertrain.getDevicesByCategory("clutch") each time. Those calls allocate a fresh table per frame, and the powertrain device list does not change during a session.
    Recommendation: capture both device lists once in onVehicleLoaded / onReset into upvalues (e.g. cachedEngines, cachedClutches), and have healDrivetrain() iterate the cached lists. This removes two table allocations and two category scans per frame — small per car, but it matters with several god-mode vehicles in the scene or on weaker CPUs, and it eliminates per-frame GC churn.
    3. Throttle the heal to every N frames instead of every frame
    Engine damage doesn't accumulate meaningfully within a single frame. Running healDrivetrain() every 5–10 frames (or every ~0.1 s using accumulated dt) is visually identical to the player but cuts the work by ~5–10×. Combine with #2 and the per-frame footprint of an active cheat becomes negligible.
    4. applyInvulnerability() iterates all beams on every (re)apply
    When toggled, it loops over v.data.beams and calls setBeamStrength/setBeamDeform per beam. That's correct and only runs on toggle (not per frame), so it's fine — but on very high-beam-count vehicles (buses, trains, trailers) the toggle can cause a brief hitch. If that's ever reported, the fix is to spread the beam updates across a few frames rather than all at once. Not urgent — noted for completeness.

    Bottom line
    A clean, well-engineered mod — base-data snapshots, event-driven apply, localized math, nil-guards. No critical or medium issues found.
    The only thing worth changing for performance: cache the powertrain device lists instead of fetching them every frame in healDrivetrain(), and optionally throttle the heal to every ~10 frames. Together they remove the only meaningful per-frame cost while a cheat is active. The one housekeeping item is restoring the global guihooks.message hook on unload so the patch doesn't outlive the mod.
  2. MatrizxYoutube
    MatrizxYoutube
    1/5,
    Version: 1.0
    im sorry sir, but i dont really know if u are trying to copy someone elses mod
  3. わらこんぶ
    わらこんぶ
    5/5,
    Version: 1.0
    This is pretty cool. I hope they make it so it doesn’t break even if I boost the engine’s power. Also, if I make it invincible and reduce the number of JBEAMs, I think it’ll be even harder to break. Oh, and I’ll have to make sure BeamMP doesn’t catch on to my cheating XD
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice