Forum

Weapon in hand (vwep?) with DarkPlaces? How?

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Weapon in hand (vwep?) with DarkPlaces? How?

Postby Baker » Mon Nov 17, 2008 1:43 am

I saw a mod screenshot posted here a few months ago that showed a Quake guy wielding a key as a weapon.

I don't know the name of the mod or if it is open source or if there is source code somewhere in the bowels of this forum explaining the technique.

Does anyone either

1. know how this is done
2. know the url of a thread where info was posted on this in the past
3. Or know the source of a mod that does this.

It is my understanding that Deathmatch Essentials mod cheated and the weapons are part of the player model, so you couldn't have the player wield just anything as a weapon.

In particular, I think it would be cool to have different single player bad guys with different weapons.
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Postby MauveBib » Mon Nov 17, 2008 2:47 am

There are three ways it can be done:

Firstly, by modelling and animating the guns directly onto the player model, having one player model for each weapon. As you guessed, this is how it's usually done in most VWEP mods.

Secondly by having the guns in seperate model files, with matching animation frames to the player, and superimposing one on top of the other by having an entity that follows the player around and matches frames. This only works for a 3rd person view, or an engine that supports DP_SV_NODRAWTOCLIENT or similar, else the player will see the weapons floating around in front of him in 1st person view. This is how Prydon Gate does it.

Thirdly is via MD3 tagging, which is obviously only available for engines that support MD3 models. This is probably the best method if available, because the weapon models don't each need to be animated to match frames, the tagging takes care of it.
Apathy Now!
User avatar
MauveBib
 
Posts: 634
Joined: Thu Nov 04, 2004 1:22 am

Postby Baker » Mon Nov 17, 2008 3:47 am

MauveBib wrote:Secondly by having the guns in seperate model files, with matching animation frames to the player, and superimposing one on top of the other by having an entity that follows the player around and matches frames. This only works for a 3rd person view, or an engine that supports DP_SV_NODRAWTOCLIENT or similar, else the player will see the weapons floating around in front of him in 1st person view. This is how Prydon Gate does it.

Thirdly is via MD3 tagging, which is obviously only available for engines that support MD3 models. This is probably the best method if available, because the weapon models don't each need to be animated to match frames, the tagging takes care of it.


FrikaC released the Prydon source a while back so I should be able to take a look at that and see how it's done.

I knew MD3 supports tagging, sometime I'll need to dig through the Nexuiz source and learn how MD3 works in QuakeC.

Thanks for your help. If I achieve anything of this, I'll write up a tutorial from what I do.
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Weapon in hand (vwep?) with DarkPlaces? How?

Postby Spirit » Mon Nov 17, 2008 8:51 am

Baker wrote:2. know the url of a thread where info was posted on this in the past
I think it was at http://qexpo.tastyspleen.net/booth.php?id=49&page=268
Something at QExpo, that I remember for sure.
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
Spirit
 
Posts: 1031
Joined: Sat Nov 20, 2004 9:00 pm

Re: Weapon in hand (vwep?) with DarkPlaces? How?

Postby Baker » Mon Nov 17, 2008 8:59 am

Spirit wrote:
Baker wrote:2. know the url of a thread where info was posted on this in the past
I think it was at http://qexpo.tastyspleen.net/booth.php?id=49&page=268
Something at QExpo, that I remember for sure.


Yeah. That'd be it.
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Postby leileilol » Mon Nov 17, 2008 11:57 am

it's a mod i made in 2007 and never released it.

Also, I lost it.

Forever.


was a good qc exercise though
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby MauveBib » Mon Nov 17, 2008 1:00 pm

Just thought of a 4th way: the locations and angles for the model carried for each frame get hardcoded into the qc. Downside is that it's horribly time consuming, especially for models with lots of frames. On the upside, once it's coded it'll allow anything to be carried.
Apathy Now!
User avatar
MauveBib
 
Posts: 634
Joined: Thu Nov 04, 2004 1:22 am


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest