Garry's Mod

Garry's Mod

307 평점
CalcView Priority System
   
어워드
즐겨찾기
즐겨찾기됨
즐겨찾기 해제
Content Type: Addon
Addon Type: Tool
Addon Tags: Fun, Scenic
파일 크기
게시일
업데이트일
6.282 KB
2023년 1월 23일 오전 8시 38분
2023년 1월 23일 오후 12시 01분
변경 사항 2개 ( 보기 )

다운로드 위해 구독하기
CalcView Priority System

Mercury, 80Hg님의 1 모음집
Mods that use CalcView Priority System
아이템 3개
설명
C.V.P.S.
CVPS is a library/system that allows you to create CalcView hook camera manipulation mods without every camera mod breaking the other one,
while also allowing you to have Layered CalcViews on top of the highest priority "Base" CalcView. (Useful for viewbob, breathing, etc.)



This is achieved by running only the highest priority CalcView hook and then adding to it the returned data from all the "Layered" ones.

The point of this library is to allow devs to create camera mods that do not interfere with each other in jarring ways.

For Developers
The library is contained inside a global table named "CalcViewPS" and runs a hook called "CalcViewPS_Initialized" when it has loaded.

ENUMs CalcViewPS.PerspectiveENUM = { FIRSTPERSON = 1, THIRDPERSON = 2, TOPDOWN = 3, ISOMETRIC = 4, OTHER = 5 } Argument Explanations name - Unique string ID for the hook func - The function to be ran if the hook is of the highest priority, or is a layered hook. Works like normal CalcView, function must return a table like a normal CalcView hook would. In the case of the hook being layered, the hook should not be layering the returned values on top of the provided base position, angles and FOV. The library already takes care of the layering. priority - The priority number the hook should have. The higher it is, the bigger the chance it will be the "camera" that is running. Value is clamped to be between -100000 and 100000 perspective - The perspective ENUM for the hook. Layered hooks will only be applied if they have the same perspective ENUM as the current running Base hook. This can be one of the ENUMs above or a number. Functions CalcViewPS.Add(name, func, priority, perspective) - Adds a "Base" hook to the queue with the specified priority. CalcViewPS.AddToTop(name, func, perspective) - Adds a "Base" hook to the queue above the current highest priority hook. (Priority 9000 if one does not exist.) CalcViewPS.AddToBottom(name, func, perspective) - Adds a "Base" hook to the queue below the current lowest priority hook. (Priority -9000 if one does not exist.) CalcViewPS.AddLayered(name, func, perspective) - Adds a "Layered" hook to the table, which will be layered on top of the current running "Base" hook. CalcViewPS.Remove(name) - Removes "Base" hook with the specified id from the queue CalcViewPS.RemoveLayered(name) - Removes "Layered" hook with the specified id from the layered hooks table. CalcViewPS.GetLowestPriority() - Returns the lowest priority number that is present in the current "Base" hook queue. CalcViewPS.GetLowestPriorityHook() - Returns the table of the lowest priority "Base" hook in the queue. Returns nil if no hooks exist. CalcViewPS.GetHighestPriority() - Returns the highest priority number that is present in the current "Base" hook queue. CalcViewPS.GetLowestPriority() - Returns the table of the highest priority "Base" hook in the queue. Returns nil if no hooks exist.

Support Links
[ko-fi.com]
[ko-fi.com]
댓글 26
чинчопа 2024년 9월 12일 오전 10시 42분 
What commands and codes can I use to simulate aiming on a weapon? And how i do that? help please!!!
captain gurt 2024년 6월 17일 오후 3시 58분 
thanks for the quick response. after a little bit of fiddling with possible culprit mods, it seems to have been "Shmovment" that was causing the issue. very unfortunate
Mercury, 80Hg  [작성자] 2024년 6월 17일 오후 2시 43분 
I would consider any camera mod that changes "drawviewer" functionality to be an incompatibility.
General rule is this: If it's a camera mod and it's not using this, then it has a 99.9% chance of being incompatible.
captain gurt 2024년 6월 17일 오후 2시 37분 
are there any known compatibility errors? for me, any mods that use this system do work but don't actually have a visible player model during the animations (examples: Animated Ladder Climbing and Hard Landing / Safety Roll). the animations do play in third person, it's just that the player's body is not rendered during animations in first person
えTeyora Lacisaト 2024년 4월 14일 오후 8시 17분 
add settings in menu pls. I want to set up priority of view for addons
RatOrder 2024년 1월 28일 오후 12시 20분 
Yeah, can you enable headbob from this? Also, I have no idea, just asking in case y'all have this issue too, this mod seems to conflict with first person view mods, causing the screen to go black. No idea if this is the cause, so ignore it if it isn't, but just saying. Kind of annoying, as I want to be able to use first person body.
Nuclear Swag 2023년 9월 29일 오전 2시 12분 
how do i enable head bob
Nuclear Swag 2023년 9월 28일 오후 11시 37분 
do you got a tutorial on youtube for this mod
oil 2023년 8월 8일 오전 11시 50분 
are you going to continue making the parkour mod?
Mercury, 80Hg  [작성자] 2023년 6월 12일 오전 9시 05분 
Not really. Vacations, work, and a new GPU have been taking up all my time.