Welcome, Guest! Login | Register

Weapon Names [Print this Article]
Posted by: IoN_PuLse
Date posted: May 05 2003
User Rating: N/A
Number of views: 2736
Number of comments: 0
Description: Changing weapon names
Luckily for me, weapon defining in Quake3 is a lot like Quake2. You first need to open bg_misc.c in the game code, and find where you see this:

 CODE  

/*QUAKED weapon_shotgun (.3 .3 1) (-16 -16 -16) (16 16 16) suspended
*/
    {
  "weapon_shotgun",
  "sound/misc/w_pkup.wav",
        { "models/weapons2/shotgun/shotgun.md3",
  0, 0, 0},
/* icon */  "icons/iconw_shotgun",
/* pickup */    "Shotgun",
  10,
  IT_WEAPON,
  WP_SHOTGUN,
/* precache */ "",
/* sounds */ ""
    },


Ok, here is where the shotgun is defined. Now I will explain what each big means.

 CODE  

/*QUAKED weapon_shotgun (.3 .3 1) (-16 -16 -16) (16 16 16) suspended  // Just the name of the weapon, commented out.
*/
    {
  "weapon_shotgun",  // What the map editors call the weapon when you place it in a map
  "sound/misc/w_pkup.wav", // Sound used when you pick up the weapon
        { "models/weapons2/shotgun/shotgun.md3",   // Model used for the pickup state of the weapon
  0, 0, 0},
/* icon */  "icons/iconw_shotgun",  // The icon on the screen that shows up when you have this weapon selected
/* pickup */    "Shotgun",  // Pickup name! Very important, this is what the gun is called in the game,
                                     // when you switch to it or pick it up. This is what you want to change
  10,  // How much ammo you get when you pick it up
  IT_WEAPON,  // Just stuff about what it is
  WP_SHOTGUN,  // What weapon code is actually used for the weapon
/* precache */ "",
/* sounds */ ""
    },


Now, to change the Shotgun into the “Superdedewper Shotgun” we change the following:
 CODE  

/* pickup */    "Shotgun",

to
 CODE  

/* pickup */    "Superdedewper Shotgun",


Now compile the code, and it should say “Superdedewper Shotgun” every time you pick up the weapon! (Note: On weapons like the gauntlet and the MachineGun, you may want to search the code for “FindItem”’s finding those names and change them to the new ones.)

Rate This Article
This article has not yet been rated.

You have to register to rate this article.
User Comments

No User Comments

You must register to post a comment. If you have already registered, you must login.

Latest Articles
3rd person View in Multiplayer
Half-Life 2 | Coding | Client Side Tutorials
How to enable it in HL2DM

By: cct | Nov 13 2006

Making a Camera
Half-Life 2 | Level Design
This camera is good for when you join a map, it gives you a view of the map before you join a team

By: slackiller | Mar 04 2006

Making a camera , Part 2
Half-Life 2 | Level Design
these cameras are working monitors that turn on when a button is pushed.

By: slackiller | Mar 04 2006

Storing weapons on ladder
Half-Life 2 | Coding | Snippets
like Raven Sheild or BF2

By: British_Bomber | Dec 24 2005

Implementation of a string lookup table
Half-Life 2 | Coding | Snippets
A string lookup table is a set of functions that is used to convert strings to pre-defined values

By: deathz0rz | Nov 13 2005


Latest Comments
Spinning Corpses Simple Fix
Half-Life | Coding | Snippets
By: darkPhoenix | Sep 05 2008
 
Where do we go from here
General | News
By: MIFUNE | Jun 09 2008
 
The Input/Output system
Half-Life 2 | Level Design
By: nazitaco | Dec 23 2007
 
Where do we go from here
General | News
By: Rob_F | Nov 22 2007
 
Rescaling Half-Life
Half-Life | Coding | Shared Tutorials
By: christoph | Nov 12 2007
 
GameUI
Half-Life 2 | Coding | Client Side Tutorials
By: Evil_j | Oct 29 2007
 
3 State Zoom For Any Weapon
Half-Life 2 | Coding | Server Side Tutorials
By: Ennuified | Oct 18 2007
 
Storing weapons on ladder
Half-Life 2 | Coding | Snippets
By: cct | Sep 07 2007
 
CTF Gameplay Part 1
Half-Life | Coding | Shared Tutorials
By: DarkNight | Aug 28 2007
 
CTF Gameplay Part 1
Half-Life | Coding | Shared Tutorials
By: deedok | Aug 20 2007
 

Site Info
296 Approved Articless
5 Pending Articles
3940 Registered Members
0 People Online (15 guests)
About - Credits - Contact Us

Wavelength version: 3.0.0.9
Valid XHTML 1.0! Valid CSS!