Skip to content

tsuza/TF2CA-weaponmodel_override

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TF2 Weaponmodel Override

A custom attribute that lets you change a weapon's worldmodel and viewmodel; the arms model and its animations.

229254968-78f51103-9edd-46b9-8ccf-3e724dd5fb18 (1)

Team_Fortress_2_2023.04.19-15.24_-_Trim.mp4

I didn't make any of these models you're seeing. Credits go to: the sentry pistol original creator, the wolverine claws original creator and VSH Rewrite for the merasmus wand and arms models

Information

Attributes explanation

Name Class Description
set weapon model set_weapon_model It changes both the viewmodel and worldmodel of the weapon to the specified model.
set weapon viewmodel set_weapon_viewmodel It changes the viewmodel of the weapon to the specified model. It overrides set weapon model.
set weapon worldmodel set_weapon_worldmodel It changes both the worldmodel of the weapon to the specified model. It overrides set weapon model.
set viewmodel arms set_viewmodel_arms It changes the arms model ( including arms ) to the specified model.
set viewmodel bonemerged arms set_viewmodel_animations It changes the visible arms to the specified model. Useful if you want to set animations with set viewmodel arms but want to use a different model.

How to apply

You can apply these attributes via config with whatever plugin you're using ( if there is enough demand I can create one ).

Since this attribute acts like a TF2 attribute, you can utilize TF2Attribute's TF2Attrib_SetFromStringValue or any other native to set it. You can also retrieve the value with the given API.

Example:

  1. "set weapon model" "models/weapons/custommodels/wolverine/c_machete.mdl" <-- It sets the weapon model to this
  2. "set viewmodel arms" "models/weapons/custommodels/wolverine/c_sniper_arms.mdl" <--- It sets the arms ( including animations ) to this
  3. "set viewmodel bonemerged arms" "models/weapons/c_models/c_pyro_arms.mdl"<-- It sets the visible arms model to this but it keeps the animations of set viewmodel arms ( or the original arms model if it's absent )

Known Issues

  • You can't change the demoshield model.
  • Mediguns and flamethrowers don't work properly.
    • Mediguns: The beam won't appear ( that's because it's client-side ). [ This can get fixed by making a beam ourselves and parenting it ]
    • Flamethrowers: The hands won't appear. [ This can get fixed by spawning the arms ourselves ]

Requirements

Supported

About

[TF2] Sourcemod plugin that lets you change your viewmodel ( weapon model, arms model, arms animations )

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published