Skip to content

Releases: LaVashikk/PCore-vscript

PCapture-Lib 4.0!

Choose a tag to compare

@LaVashikk LaVashikk released this 28 Dec 15:03

This major release focuses on standardizing the API, improving debugging capabilities through strict typing, and significantly optimizing the RayTracing module.

🚀 Optimization

Completely rewrote BboxTraceAnalyzer. It now uses an analytical Ray-AABB intersection (slab method) combined with aggressive entity caching. This drastically reduces the cost of traces in complex scenes.

🛠 Developer Experience (DX) & Stabilization

  • Strict Typing: Added explicit type validation across core modules (entLib, math, ScheduleEvent). Invalid arguments now throw clear, descriptive errors instead of silent failures.
  • Standardization: Unified method naming to PascalCase (e.g., GetHitPos) and standardized equality checks via IsEqual.
  • List Iteration: Enforced explicit iteration via .iter() to prevent runtime errors and ambiguity with standard Squirrel foreach.

✨ Key Changes

  • Renamed SetAbsOrigin → SetAbsOriginNative (engine call).
  • Renamed SetAbsOrigin2 → SetAbsOrigin (custom teleport logic).
  • Introduced UNSAFE_ClearWithGlobal() for the Scheduler.
  • Fixed ScheduleEvent error unwinding.

Important

This release includes breaking API changes. Please refer to the Migration Guide for details on upgrading from v3.8.

PCapture-Lib 3.8

Choose a tag to compare

@LaVashikk LaVashikk released this 25 Aug 12:22

V3.8 Changelog

This release focuses on hardening the library's core systems, improving API robustness, and fixing key bugs to ensure a more stable and predictable development experience.

Bug Fixes

  • TracePlus:
    • Corrected the Bbox trace behavior for scenarios where a trace originates from within an entity's bounding box. The trace will now correctly ignore the containing entity and detect subsequent collisions, preventing false positives with large trigger volumes.
  • ActionScheduler:
    • Improved the event cancellation logic to safely handle event removal, preventing potential script errors during list iteration.
  • Math:
    • Fixed a logical error in vector.isEqually2 that could cause incorrect comparisons between vectors.

Refactors and Improvements

  • API Hardening:
    • Strengthened the public API by adding strict argument validation to key functions across the library. If a function is called with incorrect argument types (e.g., passing a number instead of a TracePlus.Settings object), the library will now throw a descriptive error, making debugging significantly easier and preventing unexpected behavior.

Full Changelog: V3.7...V3.8

PCapture-Lib 3.7

Choose a tag to compare

@LaVashikk LaVashikk released this 04 Aug 11:32

V3.7 Changelog

This release introduces new features for advanced entity hierarchy management and includes several important fixes and refactors to improve robustness and precision across the library.

New Features

  • pcaptEnts:
    • Added SetAbsCenter and SetCenter methods for precise control over entity centering based on their origin.
    • Added GetLocalCoords to calculate an entity's position and angles relative to its parent, simplifying complex positioning tasks.
    • Added GetAllChildren and GetAllChildrenRecursively to enable straightforward traversal of the entity parent-child hierarchy.

Bug Fixes

  • pcaptEnts:
    • Corrected the logic in SetAbsOrigin2 to properly handle parented entities, ensuring accurate world position setting.
  • utils/portals:
    • Fixed a bug in InitPortalPair that could cause duplicate portal detectors to be created, preventing potential undefined behavior.
  • ArrayEx:
    • The clone method now correctly performs a deep copy.

Refactors and Improvements

  • utils/portals:
    • Refactored FindPartnerForPropPortal logic for more reliable and accurate portal pairing.
  • utils/macros:
    • Improved PointInBounds logic to better handle floating-point precision, avoiding potential engine errors.
  • Global Variables:
    • Converted constants MAX_PORTAL_CAST_DEPTH and ALWAYS_PRECACHED_MODEL to global variables to ensure accessibility across all script scopes and allow for runtime modifications.

PCapture-Lib 3.6 [Bug Fixes]

Choose a tag to compare

@LaVashikk LaVashikk released this 06 Apr 19:44

Fixed

  • Resolved an initialization issue where PCapture-Lib might not load correctly when initiated via a logic_script entity.
  • Enhanced ConnectOutputEx (IDT/entity) to correctly handle unnamed buffer scripts.
  • Fixed a save/load bug within PcapEntity by replacing the UserScope implementation.
  • Renamed PlayerHooks.OnDeath to PlayerHooks.OnPlayerDeath for better clarity and consistency.

Improved

  • Optimized the performance of an iterator function within IDT.
  • Updated collision group descriptions for better clarity and added definitions for new collision groups.

PCapture-Lib 3.5, More Stable [Bug Fixes]

Choose a tag to compare

@LaVashikk LaVashikk released this 01 Mar 10:16

V3.5 Changelog

This release focuses on bug fixes and improvements to enhance stability and developer experience.

Bug Fixes

  • PcapEntity:

    • Fixed an issue in EmitSoundEx that could cause circular references, leading to save/load glitches.
    • Fixed SetInputHook to correctly handle case-insensitive input hook names, ensuring all input hooks trigger reliably.
  • portal_casting:

    • Fixed a bug in TraceLine where traces could start inside walls, causing incorrect portal placement.
  • SetupLinkedPortals:

    • Corrected the logic for setting up InputHook callbacks, ensuring proper portal behavior.
  • ActionScheduler:

    • Fixed a critical bug in AddInterval where an incorrect scope was used, potentially causing events to be scheduled with the wrong context or not at all.

Refactors and Improvements

  • PcapEntity:

    • Improved ConnectOutputEx. Named functions are now used directly, reducing global namespace pollution.
  • list and arrayex:

    • Enabled method chaining for list and arrayex classes. Methods that modify the list/array now allow chaining.
      • map and filter callbacks now accept the element index as the second argument.
  • bbox_analyzer:

    • Renamed the ignoreMe variable to ignoreChecksCalc for improved code clarity.

Documentation

  • list: Added documentation for previously undocumented methods. All public methods of the List class are now properly documented.

PCapture-Lib 3.4 Stable🫰🏻

Choose a tag to compare

@LaVashikk LaVashikk released this 10 Feb 19:03

We're excited to announce the release of version 3.4 of PCapLib. This update focuses on improving overall stability and includes several minor enhancements:

  • Stability: Fixed a crash during save/load operations, addressing a critical issue.
  • ScriptEvents: Resolved two minor bugs.
  • Performance: Optimized the binary search in ScheduleEvent.Add for better speed.
  • Tests: Added new tests to improve coverage.

PCapture-Lib 3.3 Stable

Choose a tag to compare

@LaVashikk LaVashikk released this 29 Jan 18:28

Changes:

Critical bugs have been fixed

PCapture-Lib 3.2 Stable

Choose a tag to compare

@LaVashikk LaVashikk released this 21 Jan 16:40

Improvements:

  • Documentation Enhancements: Fixed broken anchors and improved overall documentation clarity. Added detailed explanations for all new features and changes.
  • Console Commands for Debugging: Added a suite of console commands to aid in debugging and managing the library at runtime. These commands allow you to control logging levels, list scheduled events, view registered script events, and more.
  • Collision Groups and Solid Types: Introduced constants for collision groups and solid types, providing better control over entity collisions.
  • New Macros: Added several new macro functions: CompileFromStr, CreateAlias, CreateCommand and DeepCopy.
  • A bunch of bugs were fixed

Get Started

Check out the full documentation and examples in the repository to learn more about what PCapture-Lib can do.

PCapture-Lib 3.1 Stable

Choose a tag to compare

@LaVashikk LaVashikk released this 31 Dec 17:34

PCapture-Lib is a powerful VScripts library that supercharges your Portal 2 modding capabilities. It provides advanced features like portal-aware ray tracing, optimized collision detection, enhanced data structures, and much more, simplifying complex scripting tasks and unlocking new gameplay possibilities.

Installation

  1. Download: Get the latest release of PCapture-Lib.nut.

  2. Place: Put the PCapture-Lib.nut file in your mod's portal2/scripts/vscripts directory. You can also place it in subdirectories within vscripts if you prefer (e.g., portal2/scripts/vscripts/MyMod/PCapture-Lib.nut).

  3. Import: Add the following line to your VScript file to import the library:

    IncludeScript("PCapture-Lib")

    Note: If you placed PCapture-Lib.nut in a subdirectory, adjust the import path accordingly. For example:

    IncludeScript("MyMod/PCapture-Lib")

That's it! You're now ready to use PCapture-Lib's features in your mod.

Get Started

Check out the full documentation and examples in the repository to learn more about what PCapture-Lib can do.

Happy modding!