Skip to content

v3.0.0 - #6

Merged
FrostSource merged 148 commits into
mainfrom
latest
Mar 26, 2026
Merged

FrostSource merged 148 commits into
mainfrom
latest

Conversation

@FrostSource

Copy link
Copy Markdown
Owner

AlyxLib Changelog - v3.0.0

📦 Download Installer - New installer app for easy installation and updates (initial release - may contain bugs)
📚 Documentation - Full API reference (initial release - may contain errors)


⚠️ BREAKING CHANGES

You may need to update your code if you use these features:

Class System (class.lua)

  • Variable prefix change: Variables that should not be automatically saved now use _ prefix instead of __
    • Old: self.__myUnsavedVar
    • New: self._myUnsavedVar
    • Note: __ is now reserved for meta-members only
    • This also fixes unsaved variables not being cloned into instances

Debug Menu (debug/debug_menu.lua)

  • Parameter reordering: Callback parameter moved to near the end of parameter list for all menu items
    • This allows you to omit the callback instead of passing nil
  • Convar names changed: Removed alyxlib_ prefix from debug menu convars
    • Old: alyxlib_debug_menu_show
    • New: debug_menu_show
  • Cycle items: Added title property - make sure to update your cycle items
  • Convar/callback decoupling: Menu items can now have both convar and callback properties

String Extensions (extensions/string.lua)

  • Split functions now escape special characters automatically
    • You no longer need to manually escape patterns
    • May behave differently if you were already escaping
  • Trim function renames:
    • string.trimleft → string.sliceleft (behavior unchanged)
    • string.trimright → string.sliceright (behavior unchanged)
    • New string.trimleft, string.trimright, string.trim now behave like traditional trim functions

Input System (controls/input.lua)

  • Renamed INPUT_CALLBACK to InputGenericCallback
    • This doesn't affect logic, but you lose code completion until you've renamed it in your code
    • This brings it in line with InputPressCallback and InputReleaseCallback

✨ NEW FEATURES & CHANGES

Class System

  • BindClass(): Binds a class to an already spawned entity persistently
  • ResumeThink() now checks if Think function exists before calling
  • Think function removed from existing by default
  • Fixed: Dead entities no longer cause errors on save and think
  • Fixed: All members being saved each time self:Save() is called with name

Storage System

  • All save types accept nil: Passing nil allows you to essentially delete the saved value

Input System

  • New: kind and hand callback parameters for Input:ListenToAnalog()
  • Analog callback gets hand and kind parameters
  • Fixed: Input:ListenToAnalog() now properly handles hand kind and InputHandBoth
  • Fixed: Input:StopListening(id) now properly stops listeners
    • This was a significant bug preventing input cleanup

Player Data Management

  • New module: player.data - More control over internal player data
    • Use with local data = require("alyxlib.player.data")
    • Functions for weapon equipping and save/load
    • See documentation for full API reference

Player Events

  • weapon_switch event enhanced:
    • Now tracks left hand switches
    • Includes which hand equipped the weapon
    • Includes weapon entity reference
    • Slightly delayed to gather complete data

Player Movement

  • GetPlayerMoveType() / SetPlayerMoveType() - Access player move type without player entity existing

EasyConvars

  • EasyConvars:Exists() - Check if convar exists
  • EasyConvars:AddPostInitializer() - Per-addon post initializers
  • Deprecated: EasyConvars:SetPostInitializer() (now calls AddPostInitializer)
    • This does not break existing addons - it simply reroutes to the new function

Debug Menu Configuration

  • New: Custom debug menu configuration (debug.debug_menu_cfg)
    • Users can now add their own debug menu categories and buttons via convars
    • Enables menu extension without code changes
    • Automatically loaded (no require needed)
    • See documentation for configuration syntax

Debug Menu Enhancements

  • Available to all: -dev mode is no longer required
  • Floating menu mode: New debug_menu_floating convar makes menu float in world instead of attaching to hand
  • Menu dragging: Grab and reposition the menu in 3D space
  • Menu resizing: Change the width and height of the menu in-game or in config using debug_menu_width/debug_menu_height
  • Lock mode: debug_menu_lock convar prevents accidental dragging
  • Extras tab: debug_menu_extras convar enables extras tab by default
  • Cheats tab: debug_menu_cheats convar enables cheats tab by default
  • Category indicators: Numbers on cycle buttons show hidden categories on each side
  • Dynamic visibility: DebugMenu:SetItemVisibilityCondition() to show/hide items conditionally
  • Anchor tracking: Menu now moves with player anchor (trains, elevators)
  • Menu closing: Activation button can now also close the menu
  • DebugMenu:ShowDialog: Shows a pop-up message box in the menu
  • Automatically hides "NoClip VR" buttons when not in VR mode
  • New "Give Grabbity Glove" button in VR mode
  • New "Cubemap Colors" button in extras (toggles r_cubemap_debug_colors)
  • Increased scroll speed
  • Cycle values no longer sent to menu panel (reduces overhead)
  • Improved hot-reloading for testing
  • Every callback now receives the menu item as second argument

Precaching

Panorama

  • Fixed: Nested table data not flattening correctly before sending

Math Utilities

  • New: OBB/AABB intersection utilities (math.obb)
    • Check oriented and axis-aligned bounding box intersections
    • Debug visualization support
    • Functions automatically available (no require needed)
    • See documentation for available functions
  • Improved: math.trunc() now handles negative numbers correctly

Entity Extensions

  • CBaseEntity:SetAbsVelocity() - Set absolute velocity
  • SetPhysVelocity() - Convenience wrapper for above
  • CBaseEntity:TrackProperty() now returns think name for stopping with CBaseEntity:SetContextThink()

Global Functions

  • IsAddonEnabled(workshopID) - Check if workshop addon is enabled
  • RandomChance(value1, value2, percentage) - Returns one of two values based on percentage
  • TableFindKey(tbl, predicate) - Find table key matching predicate
  • Fixed: ifrequire() not always returning module result

Common Debugging

  • ent_print_children - Console command prints entity's children
  • hlvr_give_grabbity_gloves - Console command gives player grabbity gloves
  • print_ent_by_index - Console command prints entity by index
  • RegisterAlyxLibEasyConvar() - Registers AlyxLib EasyConvars with callbacks and persistence

Debug Utilities

  • Debug.TableStr() - String representation of tables
  • Debug.SimpleVector() now accepts QAngles and tables
  • vecstr - Global alias for Debug.SimpleVector
  • entfind - Global alias for Debug.FindEntityByPattern
  • entspawn() - Quick entity spawning for prototyping

VR Debug

  • Fixed: NoClip VR using wrong move type
  • Fixed: NoClip VR inconsistently using secondary hand
  • noclip_vr_enabled hidden convar moved out of debug/vr.lua for universal access
  • VR debug now loads in fake VR mode

NoVR Mode

  • Improved entity activation detection
  • New console commands: alyxlib_start_print_novr_button_presses and alyxlib_stop_print_novr_button_presses

GENERAL

  • VR debug now loads in fake VR mode
  • Various nil guards added throughout

This aims to provide more granular control over how and when weapon
switching is updated, specifically for addons that manipulate player
inventory
to show the number of hidden categories
Add SetPhysVelocity
Alias for Debug.SimpleVector
Allows for callback and persistence while listed under alyxlib
Player event now includes which hand equipped. The event is delayed to
let the weapon entity move into the hand.
Functions for testing and drawing OBB and AABB intersections
Allows the inputs to update whenever the hand changes
debug_menu_width pairs with debug_menu_height for full customization.
Menu is now updating when convars are changed (except offsets).
Stops warning appearing when variable is initialized as nil
Moving towards making the debug menu a self contained feature, decoupled
from AlyxLib. This also brings a cheats menu.
Game clamps or fails above certain lengths (404 and 462). Will need to
implement queued SendToConsole.
Added links to the new docs site and installer app.
Updated Quick Setup guide for the new app-based workflow.
Migrated project previews to local /assets folder.
@FrostSource
FrostSource merged commit c9a901a into main Mar 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants