Garry's Mod

Garry's Mod

69 ratings
[Expression2/E2] PoseCore Extension
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Comic, Realism
File Size
Posted
2.714 KB
5 Nov, 2017 @ 11:26am
1 Change Note ( view )

Subscribe to download
[Expression2/E2] PoseCore Extension

In 5 collections by mlevesque95
Garry's Mod Premium Content Collection
143 items
Ultimate Sandbox
533 items
Sandbox Light Load
83 items
No-Cost Create & Assassinate
184 items
Freebuild & Kill
134 items
Description
This is the PoseCore extension for Expression2; a part of the Wiremod addon.

This extension will allow the use of flexes to be controlled and/or automated with E2! If you don't know what flexes are, they're what the Faceposer tool controls.

There are also added bone functions to set/get manipulated; position, angle, scale, and jiggle. These functions are expensive on the server so use them carefully.

Using this addon is like any other E2 function addon; simply subscribe / add to your server's collection; and the functions will be available next time you play.

Major thanks goes to bigdogmat for validating and optimising the code!

Added Functions
Flexes e:setFlexWeight(s,n) Sets a flex on an entity using the flexes name; much like the Finger and Face Poser tools. (Use holoEntity(N):setFlex to set flexes to holograms.) (Use e:getFlexName(n) to get it's name.) e:setFlexWeight(n,n) Sets a flex on an entity using the flexes ID; much like the Finger and Face Poser tools. (Use holoEntity(N):setFlex to set flexes to holograms.) (Use e:getFlexID(s) to get it's ID.) e:getFlexID(s) Gives the ID of the flex by provided name. e:getFlexName(n) Gives the name of the flex by provided ID. e:getFlexScale() Gives the overall flex scale for the provided entitys' model. e:getFlexWeight(n) Gives the weight of the specified flex (By ID) of the provided entity. e:getFlexCount() Gives the amount of flexes the provided entity has. e:setFlexScale(n) Sets the overall weight modifier for flexes. e:setEyePos(v) Sets the aim position for a ragdoll/hologram. (Much like the Eye Poser tool.) Bones e:setBonePos(n,v) Sets the position of the bone with the specified ID; belonging to the entity provided. e:setBoneAng(n,a) Sets the angle of the bone with the specified ID; belonging to the entity provided. e:setBoneScale(n,v) Sets the scale (From 0 to 10) of the bone with the specified ID; belonging to the entity provided. e:setBoneJiggle(n,n) Sets the amount of jiggle (From 0 to 255) for the bone with the specified ID; belonging to the entity provided. e:getBoneScale(n) Gives the manipulated scale of the bone with the specified ID; belonging to the entity provided. (Non-modified bones will return vec(1,1,1)) e:getBoneAng(n) Gives the manipulated angle of the bone with the specified ID; belonging to the entity provided. (Works unlike B:angles() as this returns the manipulated angle from the original.) e:getBonePos(n) Gives the manipulated position of the bone with the specified ID; belonging to the entity provided. (Works unlike B:pos() as this returns the manipulated position from the original.) e:getBoneJiggle(n) Gives the jiggle amount of the bone with the specified ID; belonging to the entity provided. Anim e:getAnimTime() Gives the time (Relative to curtime(), between 0 and 1) the animation has been playing for.


For Server owners
This addon should be enabled by default. If for whatever reason it isn't, enable it with
wire_expression2_extension_enable posecore wire_expression2_reload

The addon checks with default E2Lib permissions, and has worked with Nadmod prop protection, and should work with others, as well as common prop protection interface (CPPI).

Values are clamped to avoid crazy sizes / results.

Support and Help
This addon has a github page; GitHub/mlevesque95/posecore[github.com]

Please comment on here or mark an issue on github for support.

Any comments about "How do I use this?" Will be ignored. This addon is for people who have knowledge with the Wiremod addon, particularly Expression2, and works like most other function extensions on the workshop :D

Enjoy!
14 Comments
Denneisk 30 Jun, 2023 @ 7:08pm 
loool didn't even notice i deprecated half of this without knowing.
-BIKTΩR- 25 Aug, 2021 @ 10:52pm 
WOW IT SO COOL I CAN MAKE A PARTY DANCE WHIT THIS MOD
Jacbo 14 Jun, 2020 @ 11:49am 
I tested and it didn't work and I came back here and noticed that e:getBonePos(n) and e:getBoneAng(n) are only the values you yourself have changed the bones by
mlevesque95  [author] 13 Jun, 2020 @ 11:51am 
Yes it does, you would need to use the holoEntity() with the functions; An example code will make a breen holo with a random smile/frown;
holoCreate(1)
holoModel(1,"models/player/breen.mdl")
holoEntity(1):setFlexWeight("smile",random(-5,5))
Jacbo 8 Jun, 2020 @ 3:36pm 
Does this work on holos? Looking for a way to track bone angles during an animation.
fx 23 Jun, 2019 @ 8:46am 
sick
Jobi 24 Apr, 2019 @ 3:04pm 
thonkong
ACTION MAN 12 Apr, 2019 @ 6:13pm 
hit or miss......KILL ME
itisluiz 17 Feb, 2019 @ 6:15pm 
cool addon mate, got my revolver working with it. Don't mind the retards that don't even know that this is for.
Tixe 12 May, 2018 @ 5:40pm 
You’re terrible lil’ Kermit that’s why people tell you to kermit suicide!!!!1 Don’t mess with my friend Mlevesque because he is the G.O.A.T. and he’s not scared to stick his horns in ur face!!!!