I remember in the past I asked about the ability to switch between view models without changing the weapon, and the conclusion was that I would need more than one weapon to do it.
Here's my new idea
There are 9 ACT_VM_DEPLOY animations (DEPLOY, DEPLOY(1-8)
There are 9 ACT_VM_PRIMARYATTACK animations (same m.o.)
The same with ACT_VM_IDLE
There are quite a few other weapon 'acts' that could be used...
So the question is this, and... it would require the view_model hands to be forced (I know, that sucks)
Could I make a view model with all custom animations like that, a model that had ALL weapons within it, and switches between them by enumerating by version (model 1 version 1, model 2 version 2, 3-3, 4-4, etc)
[highlight][U]All custom animations, DEPLOY = Weapon 1, DEPLOY2 = Weapon 2, etc, and the same with primary attack and idle... reload would use other weapon animations for each model[/U][/highlight]
[B]Could that be done?[/B]
I cite [URL="http://wiki.garrysmod.com/page/Enums/ACT"]this[/URL] link
This would be per weapon type (all pistols, all smg's, all assault rifles, each would have its own model)
With lua I would choose what animation based on a table:
[code]vNum = 2
SWEP.VTab.vNum.PriAtk
SWEP.VTab.vNum.Reload
SWEP.VTab.vNum.SecAtk
SWEP.VTab.vNum.Idle[/code]
Of course, this code is just a very rough example...
[editline]15th October 2013[/editline]
The only problem I see is that I'd need a different model for each stage of the player model (regular, soldier, w/e I use... but it would be limited to the player stages in my gamemode)
[editline]15th October 2013[/editline]
I don't know... a man can dream
Why would you do this?
For anyone in the know, I have a project I'm working on. In this project, there are a few 'sets' of weapons (pistol, smg, assault rifle, shotgun, snipers, etc)
I would desire each weapon set to be one weapon entity. Why? Well, the weapons upgrade model under a currently undecided situation; when they upgrade model, they will KEEP every Upgrade!
Because of this, I would prefer that I would not need to switch the player to a new weapon entity!
[editline]16th October 2013[/editline]
For example, Pistol:
v1: USP Match
v2: H&K Colt .357 Python
v3: Desert Eagle
Upgrade 1: Reload Speed
Upgrade 2: Draw Time
Upgrade 3: Burst Fire
It could be any model (v1, v2, v3) but no matter when it was upgraded, it would apply the same category and level of upgrade to the new pistol type.
This is just a fake example for the purpose of explaining
[editline]16th October 2013[/editline]
The reason is fairly simple... I don't want the player to waste money on upgrades, only to lose them when they get a better version of the weapon
[editline]16th October 2013[/editline]
As easily as I could likely do that with net vars, I don't want to overload the network buffer all over again!
[editline]16th October 2013[/editline]
[highlight][u]IN THE CASE THAT YOU STILL DON'T UNDERSTAND, CLICK [URL="http://facepunch.com/showthread.php?t=1300020"]THIS LINK[/URL]![/u][/highlight]
You can do this much simplier if you have to source files for the models: Bodygroups. Each bodygroup should replace the reference model to a new one. Less fucking around, less hacking, less shitty workarounds and less overthinking.
So, what I am saying is, you set up a model, so it's compiling all nice with ONE set of anims, just like a normal view model. Then you add another .smds and make them bodygroups.
I can help you with .qc files, just don't add me on steam.
[editline]16th October 2013[/editline]
Also, this way you can have unlimited weapon upgrades/skins. ( You still have 32 .vmt limit per model with valves studiomdl. )
[QUOTE=Robotboy655;42545319]You can do this much simplier if you have to source files for the models: Bodygroups. Each bodygroup should replace the reference model to a new one. Less fucking around, less hacking, less shitty workarounds and less overthinking.
So, what I am saying is, you set up a model, so it's compiling all nice with ONE set of anims, just like a normal view model. Then you add another .smds and make them bodygroups.
I can help you with .qc files, just don't add me on steam.
[editline]16th October 2013[/editline]
Also, this way you can have unlimited weapon upgrades/skins. ( You still have 32 .vmt limit per model with valves studiomdl. )[/QUOTE]
Don't add you to friends? GREAT! I already have 160 fucking friends! I don't need another...
32 texture limit, understood... I do believe I can keep the base models to a few simple textures, based solely on if the weapon model uses more than one or not by default. [B]4096x4096[/B], with the UV Map scaled to fit 512x512 segments (48 total on one image, to fix texture smoothing problems)
For each class, that would be MORE than enough to cover every texture, every upgrade (if visible), and so fourth. [B]Here's what I mean:[/B]
vPistols.vtf ; vPistols.vmt
vSMGs.vtf ; vSMGs.vmt
vASS.vtf ; vASS.vmt
vShot.vtf ; vShot.vmt
vSnip.vtf ; vSnip.vmt
Also, for the world models, I could have the same idea, right? Using the body groups? In which case... replace all of the texture name's first letter "v" with "w"
[editline]16th October 2013[/editline]
brandonj4's rating actually made me look back over the idea... and I evaluated, and found one issue... then I considered just how large of a limit that really is, at least... for my plans.
The only problem I see is the fact that textures do a wrap-around stretch... on most weapons, texel 1 blends with texel 512
Well, then again... at the same time, 32 textures should be more than enough for 3 weapon models to begin with (3 to 9 textures, leaves 29-23 available)
(3 textures if 1 texture each, 9 textures if 3 textures each)
Each of those 23 to 29 remaining could be weapon attachments, allowing more than enough texture space for that!
I need to use the c_model/hands feature, though, as I will need different hands and I doubt I'll be able to fit those all in one model, too many body groups?
[editline]16th October 2013[/editline]
I still would need more than one animation set, though, as each weapon would reload differently! (a Colt .357 Python does not reload with a clip)
[editline]16th October 2013[/editline]
As for the over thinking... yeah, it's a problem I have in everything I do right now... even with medication, I just... have to cover every road I see.
I'll bring that up to my therapists, then
Why not just keep the upgrade data on the player instead?
[QUOTE=Ericson666;42555886]Why not just keep the upgrade data on the player instead?[/QUOTE]
what? I don't think that would change how the model looks...
btw, is there a way to put more models in the view model frame?
Sorry, you need to Log In to post a reply to this thread.