Replacing stock Q3 weapons with custom ones

Locked
vinny
Posts: 57
Joined: Sun Feb 20, 2011 12:25 pm

Replacing stock Q3 weapons with custom ones

Post by vinny »

I have modeled a few weapons and i'm looking into replacing the stock Q3 ones with mine. However, i noticed that the code responsible for loading weapons is really "coupled" with the stock weapons: there's a lot of switch's and if's depending on the weapon, for loading some parts of the model, or rotating other parts... a real mess.

Does anyone with a better experience with the Q3 codebase could guide me (or point me some tuts/docs) into the job of replacing the weapon models? Which files have weapon-specific loading/switching? For example: to replace the machine gun, i have to alter a few files with MD3 loading of separate parts, and other files to make the weapon rotate (i have to disable that for my model), etc.
Takkie
Posts: 101
Joined: Sat Nov 25, 2006 3:06 pm

Re: Replacing stock Q3 weapons with custom ones

Post by Takkie »

Here's a tutorial about adding a new weapon.
http://www.quake3hut.co.uk/q3coding/mor ... eapons.htm
It might be a starting point for what you are looking for.
Perhaps somebody else here can help you better detail...
[url=http://slugrock.tumblr.com]slugs and rockets[/url]
vinny
Posts: 57
Joined: Sun Feb 20, 2011 12:25 pm

Re: Replacing stock Q3 weapons with custom ones

Post by vinny »

I have noticed that this tut does not cover adding first-person weapon model. How is this done?
UglyFoot
Posts: 139
Joined: Fri Jul 22, 2011 12:35 pm

Re: Replacing stock Q3 weapons with custom ones

Post by UglyFoot »

Do you really need to alter the code to do this? What's exactly what you want to do? You can take a look at other custom models, it might help.
vinny
Posts: 57
Joined: Sun Feb 20, 2011 12:25 pm

Re: Replacing stock Q3 weapons with custom ones

Post by vinny »

I just find the whole thing difficult because the code is so tightly coupled. Adding a new weapon is a nightmare.
Locked