tsuza / TF2CA-weaponmodel_override

[TF2] Sourcemod plugin that lets you change your viewmodel ( weapon model, arms model, arms animations )
11 stars 5 forks source link
sourcemod tf2

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)

https://user-images.githubusercontent.com/73082112/233108481-6b5d4986-651b-40d5-bd06-1ab812869415.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

Requirements

Supported