Repository navigation
Releases: LaVashikk/PCore-vscript
Release list
PCapture-Lib 4.0!
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 viaIsEqual.- List Iteration: Enforced explicit iteration via
.iter()to prevent runtime errors and ambiguity with standard Squirrelforeach.✨ Key Changes
- Renamed
SetAbsOrigin→SetAbsOriginNative(engine call).- Renamed
SetAbsOrigin2→SetAbsOrigin(custom teleport logic).- Introduced
UNSAFE_ClearWithGlobal()for the Scheduler.- Fixed
ScheduleEventerror 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
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.isEqually2that could cause incorrect comparisons between vectors.
- Fixed a logical error in
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.Settingsobject), the library will now throw a descriptive error, making debugging significantly easier and preventing unexpected behavior.
- 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
Full Changelog: V3.7...V3.8
PCapture-Lib 3.7
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
SetAbsCenterandSetCentermethods for precise control over entity centering based on their origin. - Added
GetLocalCoordsto calculate an entity's position and angles relative to its parent, simplifying complex positioning tasks. - Added
GetAllChildrenandGetAllChildrenRecursivelyto enable straightforward traversal of the entity parent-child hierarchy.
- Added
Bug Fixes
pcaptEnts:- Corrected the logic in
SetAbsOrigin2to properly handle parented entities, ensuring accurate world position setting.
- Corrected the logic in
utils/portals:- Fixed a bug in
InitPortalPairthat could cause duplicate portal detectors to be created, preventing potential undefined behavior.
- Fixed a bug in
ArrayEx:- The
clonemethod now correctly performs a deep copy.
- The
Refactors and Improvements
utils/portals:- Refactored
FindPartnerForPropPortallogic for more reliable and accurate portal pairing.
- Refactored
utils/macros:- Improved
PointInBoundslogic to better handle floating-point precision, avoiding potential engine errors.
- Improved
- Global Variables:
- Converted constants
MAX_PORTAL_CAST_DEPTHandALWAYS_PRECACHED_MODELto global variables to ensure accessibility across all script scopes and allow for runtime modifications.
- Converted constants
PCapture-Lib 3.6 [Bug Fixes]
Fixed
- Resolved an initialization issue where
PCapture-Libmight not load correctly when initiated via alogic_scriptentity. - Enhanced
ConnectOutputEx(IDT/entity) to correctly handle unnamed buffer scripts. - Fixed a save/load bug within
PcapEntityby replacing theUserScopeimplementation. - Renamed
PlayerHooks.OnDeathtoPlayerHooks.OnPlayerDeathfor 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]
V3.5 Changelog
This release focuses on bug fixes and improvements to enhance stability and developer experience.
Bug Fixes
-
PcapEntity:- Fixed an issue in
EmitSoundExthat could cause circular references, leading to save/load glitches. - Fixed
SetInputHookto correctly handle case-insensitive input hook names, ensuring all input hooks trigger reliably.
- Fixed an issue in
-
portal_casting:- Fixed a bug in
TraceLinewhere traces could start inside walls, causing incorrect portal placement.
- Fixed a bug in
-
SetupLinkedPortals:- Corrected the logic for setting up
InputHookcallbacks, ensuring proper portal behavior.
- Corrected the logic for setting up
-
ActionScheduler:- Fixed a critical bug in
AddIntervalwhere an incorrect scope was used, potentially causing events to be scheduled with the wrong context or not at all.
- Fixed a critical bug in
Refactors and Improvements
-
PcapEntity:- Improved
ConnectOutputEx. Named functions are now used directly, reducing global namespace pollution.
- Improved
-
listandarrayex:- Enabled method chaining for
listandarrayexclasses. Methods that modify the list/array now allow chaining.mapandfiltercallbacks now accept the element index as the second argument.
- Enabled method chaining for
-
bbox_analyzer:- Renamed the
ignoreMevariable toignoreChecksCalcfor improved code clarity.
- Renamed the
Documentation
list: Added documentation for previously undocumented methods. All public methods of theListclass are now properly documented.
PCapture-Lib 3.4 Stable🫰🏻
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.Addfor better speed. - Tests: Added new tests to improve coverage.
PCapture-Lib 3.3 Stable
Changes:
Critical bugs have been fixed
PCapture-Lib 3.2 Stable
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,CreateCommandandDeepCopy. - 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
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
-
Download: Get the latest release of
PCapture-Lib.nut. -
Place: Put the
PCapture-Lib.nutfile in your mod'sportal2/scripts/vscriptsdirectory. You can also place it in subdirectories withinvscriptsif you prefer (e.g.,portal2/scripts/vscripts/MyMod/PCapture-Lib.nut). -
Import: Add the following line to your VScript file to import the library:
IncludeScript("PCapture-Lib")
Note: If you placed
PCapture-Lib.nutin 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!