Garry's Mod

Garry's Mod

Mechassault 2: Mech Pack [PUBLIC BETA]
 此主题已被置顶,因此可能具有重要性
Dopey  [开发者] 2021 年 6 月 23 日 上午 4:22
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
最后由 Dopey 编辑于; 2021 年 8 月 5 日 上午 11:39
< >
正在显示第 1 - 7 条,共 7 条留言
berry 2021 年 6 月 23 日 上午 4:32 
useful for test
最后由 berry 编辑于; 2021 年 6 月 23 日 下午 12:21
Gabe 2021 年 6 月 23 日 上午 11:59 
this is very cool, thanks for sharing ;)
TankNut  [开发者] 2021 年 8 月 5 日 上午 11:05 
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  [开发者] 2021 年 8 月 5 日 上午 11:09 
引用自 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 2021 年 8 月 29 日 下午 1:42 
man i wish i knew how to do any sort of modding, id love to use this to make metal gear rex
Richard 2021 年 12 月 18 日 下午 8:10 
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 2022 年 4 月 4 日 下午 3:30 
anyone remember what happened to the giant spider mech if anyone dose remember it?
< >
正在显示第 1 - 7 条,共 7 条留言
每页显示数: 1530 50