Adding custom weapons?

Adding custom weapons?

Postby bentito » 31 May 2013, 15:38

So are there only so many slots for weapons? I want to put in some custom weapons, but I can't find any docs on a full procedure for doing so...

I see all the weapons in data/models/weapons
I tried adding a new one cp -r shotgun newshotgun of one of those directories but it didn't show up...

Is there a cfg file that refers to them and then makes them show up in the editor?
bentito
 
Posts: 5
Joined: 30 May 2013, 19:25

Re: Adding custom weapons?

Postby unixfreak » 31 May 2013, 17:45

As far as i know, you can only "replace" the existing models without modifying any code. You can always customize what the weapon does through the in-game vars if it's able to suit your needs.

If you really wanted to add an extra weapon slot, you'd probably have to look at modifying these files (and possibly more);
http://redeclipse.svn.sourceforge.net/v ... /weapons.h
http://redeclipse.svn.sourceforge.net/v ... /weapdef.h
http://redeclipse.svn.sourceforge.net/v ... eapons.cpp

...also changing some of the cfg files for the weapon loadout gui would be needed.
User avatar
unixfreak
 
Posts: 82
Joined: 02 Feb 2012, 11:54
Location: Bristol, England

Re: Adding custom weapons?

Postby bentito » 31 May 2013, 21:09

Thanks very much for the reply.

OK, I would really like to add some more weapons, I'd like to created copies of all the basic ones, my copies will be the same, but they won't spin when they're sitting there. So for instance, trying to have the normal shotgun that spins and also a "no-spin" version. Want to walk around my map and see spinning and non-spinning versions of all the weapon models. So I tried copying all the shotgun lines in weapons.h and weapdef.h, wouldn't even build after that, possibly because I never found out how to change W_MAX.

Maybe I am going about this wrong. How about this? I don't care if the things I am adding act as weapons. Could I take the definition files for say, the shotgun, and add it as some other entity type (bot, player, etc) that would just sit there in the map not spinning and not acting as a weapon? How would I go about that? I see plants for instance in one of the maps, I am assuming those are models just like the weapons.
bentito
 
Posts: 5
Joined: 30 May 2013, 19:25

Re: Adding custom weapons?

Postby Sniper-Goth » 31 May 2013, 22:07

If you want to add static weapons, as static map models, just do this:
/mmodel weapons/pistol
/mmodel weapons/flamer
/mmodel weapons/plasma
/mmodel weapons/rifle
/mmodel weapons/grenade
/mmodel weapons/mine
/mmodel weapons/rocket
/mmodel weapons/shotgun
/mmodel weapons/smg
/mmodel weapons/sword

Then they will appear after /newent mapmodel 40
Red Eclipse in game name: Sniper-Goth/Sniper-quake3. Maps in the making: DOTA style map, ringed, train, ladder race,.
User avatar
Sniper-Goth
 
Posts: 221
Joined: 27 Aug 2012, 20:10

Re: Adding custom weapons?

Postby bentito » 04 Jun 2013, 16:49

Excellent. Thanks for the mmodel tips! They're almost perfect when added this way. One thing is they seem to have no Z height, like maybe mapmodels and weapons assume a different starting point off the ground? Is there a way to adjust if I make a copy of the weapon for use as a model, maybe a setting in the md5.cfg?
bentito
 
Posts: 5
Joined: 30 May 2013, 19:25

Who is online

Users browsing this forum: No registered users and 1 guest