Garry's Mod

Garry's Mod

Mechassault 2: Mech Pack [PUBLIC BETA]
 This topic has been pinned, so it's probably important
Dopey  [developer] 23 Jun, 2021 @ 4:22am
Adding Custom Mechs and Vehicles
Hello fellow modders and add-on enthusiasts!

If you wish to create a mech of your own, make sure first of all that they have the appropriate animation and sequence names and others as specified in the list below:

You may use the source models from Github to make your life easier! Link is in the main description of the add-on! All .smd animations, meshes and .qc's are available for your modding pleasure.


Model specifications

Animation
Activity Name
Sequence Name
Idling
ACT_IDLE
idle
Damaged Idling
ACT_IDLE_ON_FIRE
idle_limp
Walking
ACT_WALK
walk
Limping (Damaged Walk)
ACT_WALK_ON_FIRE
walk_limp
Running
ACT_RUN
run
Knocked down (Also used for death animations)
ACT_DIESIMPLE
fall_back
fall_left
fall_right
fall_forward
Getting up
ACT_GET_UP_STAND
getup
getup_right
Flinching (Getting hit)
ACT_FLINCH_CHEST
hit_front
hit_back
Jumping (Midair Falling-type of animation)
ACT_JUMP
jump
Landing
ACT_LAND
land
Power Up
ACT_OBJ_STARTUP
power_up
Power Down
ACT_OBJ_DISMANTLING
power_down
Powered Down
ACT_OBJ_IDLE
power_down_pose

Pose Parameters
Values
aim_pitch
-1 1 or -45 45 (depends on your animations)
aim_yaw
-180 180 (for aiming 360 degrees) or -45 45 (for aiming only in front)
move_x
-1 1
move_y
-1 1

Code Specifications

Variable Name
Variable Type
Description
ENT.PrintName
String
Displays the name of the mech
ENT.Category
String
The category under which your mech will be found in the Entities tab
ENT.Radius
Int (Give values above 0)
Determines the collision around the mech's hull when being piloted (So you can't walk through tiny doorways, etc.)
ENT.Height
Int (Give values above 0)
Determines the collision height of the mech
ENT.Model
String (Give the full model path + file extension)
Change the model of your mech
ENT.ViewOffset
Vector(x,y,z)
Change the camera position to suit your mech best: X to move the camera forwards/backwards, Y to move the camera left/right and Z to move the camera up/down
ENT.MaxHealth
Int
Set the mech's max health
ENT.JumpJets
Boolean
If the mech can use fly or not.
ENT.MainJets
Table
A table of attachments for the main jets.
ENT.AuxJets
Table
A table of attachments for the auxiliary jets.
ENT.GetAnimationSpeeds
Int
A function that returns the speed of your animations. The first value is for walking animation speed, second is for running animation speed. It is dependent on your actual speed as well, so keep that in mind!.
Example:

function ENT:GetAnimationSpeeds()
return 90, 175
end
ENT.GetSpeeds
Int
A function that returns the speed of your mech. The first value is for walking speed, second is for running speed. Example:

function ENT:GetAnimationSpeeds()
return 90, 175
end
Last edited by Dopey; 5 Aug, 2021 @ 11:39am
< >
Showing 1-7 of 7 comments
berry 23 Jun, 2021 @ 4:32am 
useful for test
Last edited by berry; 23 Jun, 2021 @ 12:21pm
Gabe 23 Jun, 2021 @ 11:59am 
this is very cool, thanks for sharing ;)
TankNut  [developer] 5 Aug, 2021 @ 11:05am 
A lot of this is incorrect.

  • Activities (ACT_) aren't used at all, it's all done through sequence names
  • We only use 'fall_forward' for death animations, 'getup', 'hit_*' and the limp animations aren't used at all
  • The aim_pitch pose parameter isn't used
  • ENT.Height and ENT.Radius don't 'prefer' values above 0, it's the only way they're gonna work
  • ENT.JumpJets is using an old format
  • It's missing a lot of other important values

If you want to make a custom mech, just go on github and look at how the original ones are set up, you'll get a lot more out of that than whatever this is.
Dopey  [developer] 5 Aug, 2021 @ 11:09am 
Originally posted by TankNut:
A lot of this is incorrect.

  • Activities (ACT_) aren't used at all, it's all done through sequence names
  • We only use 'fall_forward' for death animations, 'getup', 'hit_*' and the limp animations aren't used at all
  • The aim_pitch pose parameter isn't used
  • ENT.Height and ENT.Radius don't 'prefer' values above 0, it's the only way they're gonna work
  • ENT.JumpJets is using an old format
  • It's missing a lot of other important values

If you want to make a custom mech, just go on github and look at how the original ones are set up, you'll get a lot more out of that than whatever this is.

These are just for general knowledge and the unused activities/sequences have been specified in case they ever get used in the future. What you said in the last bit of your comment was basically what I stated initially but okay. I'll modify this with the updated data.
Big_Nick 29 Aug, 2021 @ 1:42pm 
man i wish i knew how to do any sort of modding, id love to use this to make metal gear rex
Richard 18 Dec, 2021 @ 8:10pm 
how could i go about porting a different model onto one of the mechs? Because these animations would fit PERFECTLY with an imperial knight from warhammer 40k
Augustus 4 Apr, 2022 @ 3:30pm 
anyone remember what happened to the giant spider mech if anyone dose remember it?
< >
Showing 1-7 of 7 comments
Per page: 1530 50