The example scripts in examples, with their hotkeys and what each one shows. The BSX Lua guide explains the functions they use.
Every example has its own default chord. Plain F10 opens the BSX Overlay when it is enabled; no example uses F10, F12 (Steam's screenshot key) or a chord without Ctrl. Chords match modifiers exactly, so Ctrl+F6 and Ctrl+Shift+F6 are different keys. Pick a free chord from this table for your own scripts.
| Example | Default chord | What it does |
|---|---|---|
| gear_report | Ctrl+Shift+F1 | Logs equipped items and a distinct inventory-row count |
| travel_journal | Ctrl+Shift+F2 | Appends a position, time and weather journal entry |
| first_mod | Ctrl+F6 ([FirstMod] Hotkey) |
Logs the player |
| clock_log | Ctrl+F7 ([ClockLog] Hotkey) |
Logs game time and weather |
| quick_potion | Ctrl+Shift+F6 | Uses one configured item (approved scripts) |
| heal_hotkey | Ctrl+F8 | Change-approval refusal probe |
| where_am_i | Ctrl+F9 | Scope-read diagnostic |
| outfits | Ctrl+Shift+F7 save, Ctrl+Shift+F8 restore | Session-only equipped set; restore requires Changes approval |
| inventory_dump | Ctrl+Shift+F9 | Logs at most 50 copied inventory records |
| waypoints | Ctrl+F11 save, Ctrl+Shift+F11 distance | Saves a position and measures to it |
| weather_dial | Ctrl+Shift+F5 | Cycles rain/snow scaling (approved scripts, [Policies] precipitation=1) |
| instant_interact | Ctrl+Shift+F3 | Hold prompts finish at once (native hook rules) |
| gather_rates | Ctrl+Shift+F4 ([Catch] Hotkey) |
More bugs and fish per catch (native hook rules) |
| stack_limits | Ctrl+F1 ([StackLimits] Hotkey) |
Pauses raising item stack limits (native) |
| infinite_items | Ctrl+F2 ([InfiniteItems] Hotkey) |
Cycles infinite-item modes (native hook rule) |
| stat_factors | Ctrl+F4 ([StatFactors] Hotkey) |
Stamina and HP cost/recovery factors (native hook rules) |
| durability_wear | Ctrl+Numpad1 ([Durability] Hotkey) |
Less or no durability wear (native hook rule) |
| ammo_saving | Ctrl+Numpad2 ([Ammo] Hotkey) |
Ammunition is not used up (native hook rules) |
| flight_freedom | Ctrl+Numpad3 ([FlightFreedom] Hotkey) |
No-fly zone and town-flight rules (native) |
| flight_cooldown_preview | Ctrl+F5 | Globally clears a configured matching status using an earlier row capture; inert until both values are supplied (native preview) |
| slow_motion | Ctrl+Numpad0 ([SlowMotion] Hotkey) |
Switches world slow motion (native hook rule) |
| menu_pause | Ctrl+Numpad5 ([MenuPause] Hotkey) |
Slow menus pause the game (native hook rule) |
| skill_gain | Ctrl+Numpad6 ([SkillGain] Hotkey) |
Faster skill experience (native hook rule) |
| bounty_carry | Ctrl+Numpad8 ([BountyCarry] Hotkey) |
Opens a carry window for teleporting with a bounty (native hook rules) |
| blackstar_stays | Ctrl+Shift+Numpad1 ([BlackstarStays] Hotkey) |
Blackstar stays after landing (native hook rule) |
| wind_tuning | Ctrl+Alt+Numpad2 ([WindTuning] Hotkey) |
Calmer dust wind (native hook rules) |
| wind_result | Ctrl+Alt+Numpad6 | Calmer dust wind, scaled after the getter returns (native after rule) |
| gear_transition | Ctrl+Alt+Numpad3 ([GearTransition] Hotkey) |
Hides one known gear part key (native memory write) |
| marker_observer | Ctrl+Alt+Numpad7 ([MarkerObserver] Hotkey) |
Logs changed map markers (native, observation only) |
| marker_guard_window | Ctrl+Alt+Numpad9 | Short damage guard window, armed by hand (native hook rule) |
| menu_instant_smoothing | Ctrl+Shift+Numpad4 | Menu speed changes at once (native memory write) |
| menu_first_descriptor | Ctrl+Alt+Shift+Numpad1 | Pause only when the first open menu asks for one configured speed, as Instant Menu Pause's full-pause filter does (native each list walk) |
| combat_hold_probe | Ctrl+Alt+Shift+Numpad5 | Counts combat condition checks while a key is held (default Space, 400 ms), stamped with cdal.tick; changes nothing (native observation rule) |
| mobility_jitter_guard | Ctrl+Alt+Shift+Numpad6 | Global horizontal multiplier with a 16-row per-position direction/time guard; see its eviction and input limits (native hook rules) |
| onfoot_reload_predicate | Ctrl+Alt+Shift+Numpad7 | On-foot reload predicate and formula preview with a checked state-link offset; name identity remains inferred (native hook rule) |
| mounted_reload_predicate | Ctrl+Alt+Shift+Numpad2 ([MountedReloadPredicate] Hotkey) |
Dispatch-table reload preview; name and indirect callers remain unestablished (native hook rule) |
| motion_smooth_history | Ctrl+Alt+Shift+Numpad8 | Global per-position smooth direction preview; player, input and lock selection are unmapped (native hook rules) |
| slow_motion_ramp | Ctrl+Shift+Numpad5 | Eases world slow motion in and out (native hook rule) |
| legacy_motion_compensation | Ctrl+Shift+Numpad6 | Fixed horizontal speed-up for slow motion (native hook rule) |
| skill_cap_rule | Ctrl+Shift+Numpad8 ([SkillCap] Hotkey) |
Raises the skill level cap (native memory write) |
| catch_types | Ctrl+Alt+F4 ([Catch] Hotkey) |
Bug and fish catch quantities by type (native hook rules) |
| pet_loose_toggle | Ctrl+Alt+F5 ([PetLooseLoot] Hotkey) |
Pets stop picking up loose items (native hook rule) |
| pet_body_toggle | Ctrl+Alt+F8 ([PetBodyLoot] Hotkey) |
Pets stop looting bodies (native hook rule) |
| item_gain_factor | Ctrl+Alt+F11 ([ItemGainFactor] Hotkey) |
Scales item amounts gained (native hook rule) |
| palm_boost | Ctrl+Shift+Numpad3 | Timed upward boost (native rules with clocks and cells) |
| infinite_items_exact | Ctrl+Alt+F6 | Cycles infinite-item modes at the exact store (native hook rule) |
| clock_fast_forward | Ctrl+Alt+F1 | Runs the game's clocks faster for a short hold (native clock rate) |
| clock_slow_preview | Ctrl+Alt+F2 | Switches the game's clocks to half speed (native clock rate) |
| motion_direction_step | Ctrl+Alt+Numpad8 | Fixed horizontal step along the movement direction (native hook rule) |
| horse_display_limit | Ctrl+Numpad9 | Older horse stamina display record edit (native hook rule) |
| key_echo | none (logs every key for 30 seconds) | Finds key codes |
Some of these examples arrive in separate pull requests; the table lists the chords they reserve. UI panel examples (combat_overhaul_kit, api4_panel, api7_showcase, multi_file_kit, world_explorer_api6, world_inspector, world_controller, player_toolkit, gameplay_tweaks, photo_studio, appearance_studio, hud_overlay, wardrobe_presets, smart_town_sprint, spellcraft_recipes, vfx_playback_controls, vfx_beam_tether, vfx_socket_layers, raycast_projectiles, reactive_combat_vfx) use BSX Overlay controls (F10 / StartOpen=1) and optional configurable hotkeys instead of reserving global Ctrl chords.
Complete scripts are in examples; first_mod is the script built in Write your first Lua mod. To try one, copy its folder into BSX/scripts/ (for example BSX/scripts/hello/), start the game, and read its lines in BSX/bsx.log. Lua messages share that BSX log; there is no separate Lua log file.
-
combat_overhaul_kit (setup guide,
lua_api8,changes: true, uses"uses": ["combat", "player", "snapshots", "server_commands", "world", "ui"]) demonstrates an interactive combat overhaul overlay panel scaling attack/action/move speed, damage dealt/taken (coexisting with God Modedamage_taken = 0.0), knockback, life steal, groggy/stagger, and HP/Stamina/MP regeneration alongside reactiveattack_hithitstop triggers,just_action/kill/groggy_changed/buff_applied/buff_removedtelemetry,game.stats.find_by_name, optional Wwise cues, debouncedsettings.inipersistence, andon_unload()auto-revert. -
spellcraft_recipes (
lua_api7,changes: true, Experimental Test, uses"uses": ["ui", "player", "snapshots", "positions", "definitions", "world", "server_commands"]) demonstrates the composable multi-stage native.effectrecipe engine (lib.catalog_resolver+lib.spellcraft_recipe) and shareabledata/presets/*.jsonrecipes across all 9 motion modes (straight,arc,homing,bounce,spiral,orbit,ring,follow,beam), surface-clamped ground zones, triggers (weapon_draw,combat_damage,battle_state,weapon_swap,hit,death), and elemental combos. -
vfx_playback_controls (
lua_api7,changes: true, Experimental Test, uses"uses": ["ui", "snapshots", "positions"]) demonstrates native.effectplayback and time controls (:set_speed(),:pause(),:resume(),:restart(),:set_looping(),:info()), short-duration looping wrap checks, and fail-closed pure-GPU detection. -
vfx_beam_tether (
lua_api7,changes: true, Experimental Test, uses"uses": ["ui", "player", "snapshots", "positions"]) demonstrates spawn-time point-to-point native.effectbeam/tether linking (attach_actor,socket,target_actor,target_bone) viagame.vfx.spawn(...)and:info(). -
vfx_socket_layers (
lua_api7,changes: true, Experimental Test, uses"uses": ["ui", "player", "snapshots", "positions"]) demonstrates enumeratinggame.vfx.sockets(actor)and attaching multiple simultaneous native.effectlayers with localoffset, Eulerrot, quaternionquat, non-uniformscale, and continuous:set_transform(...)updates. -
raycast_projectiles (
lua_api7,changes: true, Experimental Test, uses"uses": ["ui", "player", "snapshots", "positions"]) demonstrates 3D Havok raycasting (game.world.raycast_segment,game.world.raycast_dir) driving native.effectgravity arcs, wall-normal bounces, piercing homing shots, spiral trajectories, and surface-clamped ground hazards. -
reactive_combat_vfx (
lua_api7,changes: true, Experimental Test, uses"uses": ["ui", "player", "snapshots", "positions"]) demonstratesbsx.on("weapon_draw", ...)equipping/removing a weapon-socket native.effectaura on draw/sheathe alongsidecombat_damage,battle_state,weapon_swap,hit,death, and low-HP reactive bursts. -
api7_showcase (setup guide,
lua_api7,changes: true, UI/4 tabs/tables/colored text/tooltips,bsx.tween.to,bsx.audio.master_volume,tweaks.jsonv4 recipe overrides,game.recipes/wind_scale/dye_palettes/on_wind, and passive events) -
world_explorer_api6 (setup guide,
lua_api6,changes: true, tabbed UI v3 browser for all 7 definition tables,buffs.active/quests.active/factions.agreement/skills.sublevels/equipped_dyes/visual_items, andon_item_cooldown/on_loot_drophooks) -
multi_file_kit (setup guide,
lua_api4, safe tier, modularrequire(),bsx.json+ sandboxedbsx.fsmkdir/exists/list, UI v3 tabs & color picker, and Draw v2font_scale) -
zero_code_balance_pack (setup guide,
lua_api5,data_only: true, usestweaks.jsonschema v2 with item-stat scaling and preset multipliers without writing Lua) -
wardrobe_presets (setup guide,
lua_api6, usesgame.appearancepresets/equipped_dyes/visual_items,bsx.json,bsx.fs, andzone_changedto save and auto-swap wardrobe presets) -
smart_town_sprint (setup guide, flow graph,
lua_api5, generated with Studio's Visual Flow Builder usingbsx.events,game.player,game.input, andbsx.mcm) -
hud_overlay (setup guide,
lua_api4, safe tier, uses"uses": ["ui", "player", "snapshots", "positions"]) builds a schema-drivenbsx.ui.mcmsettings menu synced withsettings.ini, projects nearby actor positions viagame.camera.world_to_screen, and draws reticle, compass header, and 3D world labels onto BSX Overlay's foreground draw list (bsx.draw.*). -
photo_studio (setup guide,
lua_api4,changes: true, uses"uses": ["ui", "snapshots", "positions", "world", "server_commands"]) creates two overlay panels (Photo Studio and Photo Studio: DOF & Lighting) with Free Cam (game.camera.set_free_cam+panel:hotkey), slow-motion / freeze speed controls (game.world.set_game_speed), FOV & roll sliders, Depth of Field presets/sliders (game.camera.set_dof), TP Player to Cam / TP to Crosshair (game.world.raycast), time/weather framing presets, and 3 persistent JSON camera bookmarks underdata/bookmarks.json. -
appearance_studio (setup guide,
lua_api4,changes: true, uses"uses": ["ui", "player", "snapshots", "inventory", "definitions", "server_commands"]) lists currently equipped visual gear, observed controlled-player appearance parts with resolvedIndexedStringAnames (game.appearance.parts()), per-part Hide / Show / Native / Clear All overrides (game.appearance.set_part_visibility), 3 persistent JSON visibility presets (data/preset_1.json..preset_3.json), and an active Character Customization observer (game.appearance.customization()). -
travel_journal (
lua_api3, read-only) uses Ctrl+Shift+F2 to append a UTC date/time and Unix timestamp, client day/time, rounded player XYZ, raw rain/snow and optional[TravelJournal] Notetodata/journal.txt. It logs the entry and straight-line distance from the previous rounded position in game units, including after reload; neither metre scale nor compass directions are established. The first entry createsdata/journal.txt; keep it when updating the script. Any other failed read refuses to write; at most 500 lines and 64 KiB are retained, dropping oldest lines as needed. The file is shared across saves and writes are not transactional on disk failure. -
world_inspector (setup guide,
lua_api4, safe tier, uses"uses": ["ui", "player", "snapshots", "positions", "world", "bus"]) creates a collapsiblebsx.ui.paneloverlay window (section/end_section,progress,combo,input_text,checkbox,same_line,button,set_items) showing resolvedcharacter_name, live player position, HP bar, zone/time/weather summary, sortable/filterable captured actors with Alive only and Hide Objects, a paginated Target Actor combo (< Prev/Next >, 8 targets/page) + live HP/faction/distance readout, and a TP to Selectedbsx.busemitter (world_controller.teleport_request) when[Lua] SnapshotProvider=1is enabled, persists sort/filter/alive/hide-objects/auto preferences viabsx.savewhen[BSX] CoSave=1is active, and publishesworld_inspector.summary/world_inspector.snapshotonbsx.bus. -
world_controller (setup guide,
lua_api4,changes: true, uses"uses": ["ui", "snapshots", "positions", "world", "server_commands", "bus"]) creates World Controller and World Tools overlay panels with time-of-day presets, hour slider, Freeze Time, World Speed presets, volumetric weather presets/reset plus collapsible Weather Fine-Tuning sliders (cloud cover, fog/haze, rain, snow, wind speed, cloud speed, sun brightness, dust), 4 named per-save teleport waypoints (bsx.save), Map Pin teleport (Up +10m), TP to Crosshair (game.world.raycast), Map Zoom Scale (game.world.set_map_zoom_scale), a safe Quick Menu panel opener (game.ui.open_panel), and toggleableworld_controller.teleport_requestbus handling (on by default). Requires player Changes approval and[Lua] ServerCommands=1. -
player_toolkit (setup guide,
lua_api4,changes: true, uses"uses": ["ui", "player", "snapshots", "inventory", "definitions", "server_commands", "bus"]+ItemInfo::*&Localization::sTextPoolManagerneeds_ids) creates a themedBSX.Lua.UI/5bsx.ui.panel(Player Toolkit) with Items & Currency and Stats tabs: live HP (0), Stamina (25), and MP (26) readouts ([id:N]labels) with stat delta / Full Heal buttons (game.stats.add), Money (2075, localizedCopper,100 copper = 1 silver) silver+copper readout + +100 Silver (10k) / +10k Silver (1M) buttons (game.inventory.add), full-catalog indexed Item Catalog with live multi-word Search Item, full-catalog Browse Categories, 200-item pagination, 4096-slot My Bag,Refresh Catalog, item-rowgame.item_infolookup, quantity slider + Grant Item, and Remove 1 / Remove Stack (infinite HP/Stamina/MP toggles live ingodmode_sandbox). Requires player Changes approval,[Lua] SnapshotProvider=1,[Lua] ServerCommands=1, and BSX OverlayEnabled=1. -
gameplay_tweaks (setup guide,
lua_api4,changes: true, uses"uses": ["ui", "player", "snapshots", "inventory", "definitions", "server_commands"]+ItemInfo::*&Localization::sTextPoolManagerneeds_ids) creates a 3-panel overlay control suite (Gameplay Tweaks, Combat & Exploration, Movement & World) plus optional Gameplay HUD with Instant Interact, Unbreakable Gear, Gather Multiplier, God Mode, Craft Cost Scale (0=Free) (game.gameplay.set_craft_cost_scale), Map Zoom Scale (game.world.set_map_zoom_scale), Free Fly + hotkey picker, stealth/bounty/shop toggles, named presets & JSON profiles, Save Defaults to INI, and Bag Manager/Diff. Requires player Changes approval,[Lua] ServerCommands=1,[Lua] SnapshotProvider=1,[BSX] CoSave=1, and BSX OverlayEnabled=1. -
api4_panel (
lua_api4, read-only, uses"uses": ["player", "snapshots", "bus", "ui"]) creates a livebsx.ui.panelstatus window showing controlled player HP/actor snapshot data when[Lua] SnapshotProvider=1is enabled, a refresh button emitting absx.busevent, an auto-refresh checkbox, a poll-interval slider, and absx.bus.providestate endpoint. Requires BSX Overlay (Enabled=1) to display the panel interactively in game. -
supply_check (
lua_api3, read-only) checks up to eight exact row ordinals in[SupplyCheck] Rowsagainst the sharedMinaftersave_loadedand everyIntervalMinutesof real time. Rows defaults to empty; configure known rows first. It logs onelow on:line when any successful count is below the minimum, and reports unavailable reads. Cached internal item names are not localized; counts cover the controlled character's own holder and may differ from the HUD. Checks are spread across frames and are not an atomic inventory snapshot. -
gear_report (
lua_api3, read-only) uses Ctrl+Shift+F1 to log slot tags, cached internal item names and exact decimal ItemNo values, plus the count of distinct inventory rows. It emits at most 20 lines, spaced 250 ms apart, and reports omitted gear, unassigned ItemNo, unavailable reads and a truncated inventory. The equipment and inventory copies are separate observations, not an atomic snapshot. -
outfits (
lua_api3,changes: true) saves the equipped set with Ctrl+Shift+F7 and restores it with Ctrl+Shift+F8 using equip/unequip requests. It keeps no files or storage references. -
inventory_dump (
lua_api3, read-only) logs at most 50 inventory lines per Ctrl+Shift+F9, one every 250 ms to stay below the host log quota. The last line marks truncation. Another press during the dump is ignored; reload cancels queued lines. -
equip_toggle (
lua_api3,changes: true) queues unequip/re-equip of a chosen slot a few seconds afterSAVE_LOADED, correlates APPLIED events and state, and cancels on replacement, refusal or timeout; see equipment requests. -
quick_potion (
lua_api3,changes: true) uses Ctrl+Shift+F6 to request one default use of the first matching configured item row via item-use requests; default row-1keeps it idle. -
heal_on_load (
lua_api3,changes: true) attempts a five-HP change after each distinctsave_loadedand logs whether Changes approval and[Lua] ServerCommands=1allowed it; without approval it logs read-only HP values (Changing the game). -
hello (
lua_api1) logs the first frame and then every 600th (change it with[Hello] FrameEvery=in asettings.ininext to the script), every save load (marked(replayed)when BSX replays a load that happened before the script started),save_loadedwhen this game build offers it, and a 5-second timer. It shows howpcall(bsx.on, ...)keeps a script running when an event is unavailable. -
item_tracker (
lua_api3) checks the exact inventory row in[ItemTracker] ItemRowafter save/equipment completion events and everyIntervalMs, logging only changed counts. The default-1tracks nothing; set the row you want. Its internal name comes from the cached definition and can be unavailable. Counts cover the controlled character's own holder and may differ from the HUD. -
clock_log (
lua_api3) logs the client day/time and raw rain/snow base values on[ClockLog] Hotkey(defaultctrl+f7). If hotkey registration fails, it logs why once and checks everyIntervalMinutesof real time instead. Values are not a named weather forecast. -
key_echo (
lua_api3) logs non-repeat key-down virtual keys and modifier masks for 30 seconds and reports reset markers. The timer runs on a later FRAME; afterward the callback ignores keys, and becauselua_api: 1-3bsx.onreturns no handle it stays registered until the script stops or reloads (lua_api: 4+scripts receive a handle withhandle:off()). Log and queue limits can drop observations. -
weapon_watch (
lua_api2, read-only) reads the player's current weapon or tool selection every 10th frame from the equipment component (offset IDs 3047 and 3048) and logs each switch, such asswitch 1: nothing selected -> main weapon #0. This is the player's own switch, whichweapon_swapdoes not see. -
player_status (
lua_api2) lists the eight IDs thegamehelpers walk inneeds_ids, then logs the controlled character's actor, equipment component and stat container at start and after eachsave_loaded. On a build withoutsave_loadedit checks once a second until a player exists. It only reads. -
smoke (
lua_api3) logs API versions, FRAME counts about every ten seconds, save events, and the first controlled equip/unequip completion after a save. The firstsave_loadedstarts deferred helper checks for player/stored HP, equipment, inventory, item definitions, stat names and time/weather; see guarded reads and the time limit.[Smoke] ItemId=-1(the default) searches already cached definitions forMoney_Copperviagame.item_info; an explicitItemIdselects any known row. Missing/unloaded names fail the check cleanly, and missing completion-event support stops before declaring a pass.
Focused starter scripts live in cookbook:
- auto_potion_lifesaver (
lua_api7,changes: true): searchable bag food/consumable picker with auto-fallback, low-HP auto-use, and debounced INI saves. - dps_meter (
lua_api8, safe): combat DPS meter, floating damage text, and actor nameplates with Combat/Aggro default filtering, non-hostile wildlife & prop/chest exclusion, persistent manual nameplate exclusions (Exclusionstab, pre-seeded withShadow Harpy), internal buff filtering, and menu suppression. - fast_travel_bookmarks (
lua_api7,changes: true): saved world coordinate bookmarks with live search, teleport, and clipboard sharing. - fastload_qol (
lua_api7,changes: true): skip-to-world quality-of-life helper usingworld,positions, andui. - fishing_gathering_qol (
lua_api7,changes: true): life-skill catch/gather sliders, instant interact, and Dragon Anywhere toggles. - godmode_sandbox (
lua_api8,changes: true): standalone sandbox & invulnerability panel (God Mode, Infinite Stamina/MP, No Fall Damage, Unbreakable Gear, Free Fly, Stealth, No Wanted). - load_profiler (
lua_api7, safe): load-time timing breakdown and history panel usingbsx.ui.panel. - perf_hud (
lua_api7, safe): lightweight viewport/FPS/1%-low performance HUD. - resume_anywhere (
lua_api7,changes: true): save-slot & JSON position bookmark withgame.world.raycast_segmentrock/prop surface probing, post-resume anti-clip check, andServerCommands=1teleport resume panel. - smart_memory_trim (
lua_api7, safe): periodic/hotkey working-set trim helper usingbsx.memory. - spellcraft_enchants (
lua_api8,changes: true, Experimental Test): native.effectweapon VFX enchantments and 3D blade socket gizmo usinggame.vfxv2.