How to change the weapon names?


(system) #1

ok i done a little project on putting together a modern pack but one last prob :frowning:

my weapon names havnt changed and i cant find how to change them xD so heres and example:
my mp40 is a ak47, and i would like to know how to change then name in limbo of mp40 to ak47 ?
so it would show, AK47 for choosing weapon instead of MP 40 ?

im trying to make this as clear as i can lol xD


(Mateos) #2

Good evening,

Have you updated the related weapons/.weap files?


(Micha) #3

Isn’t it in pak0.pk3 (or your mod):
gfx/limbo/weaponcard01.tga
gfx/limbo/weaponcard02.tga

(could be .jpg too)

I looked it up from warfare mod.


(Dragonji) #4

Editing names thru .weap files is possible only in NQ and N!tmod as far as I know.


(system) #5

yeh i got the weap edited and that but, thats not the thing that puts the name in limbo and weapon cards only show the changed weapons but not the writing, so some how it must be in there because it cant be the human base script could it?


(Micha) #6

human_base.script is something different

Could it be the following code? I checked chaos mod and he put his own weapons in there too
cg_limbopanel.c

void CG_LimboPanel_GetWeaponCardIconData( weapon_t weap, qhandle_t* shader, float* w, float* h, float* s0, float* t0, float* s1, float* t1 ) {
// setup the shader
switch( weap ) {
case WP_MORTAR:
case WP_PANZERFAUST:
case WP_FLAMETHROWER:
case WP_FG42:
case WP_MOBILE_MG42:
case WP_MP40:
case WP_STEN:
case WP_THOMPSON:
*shader = cgs.media.limboWeaponCard1;
break;

  case WP_COLT:
  case WP_LUGER:
  case WP_AKIMBO_COLT:
  case WP_AKIMBO_LUGER:
  case WP_AKIMBO_SILENCEDCOLT:
  case WP_AKIMBO_SILENCEDLUGER:
  case WP_SILENCED_COLT:
  case WP_SILENCER:
  case WP_CARBINE:
  case WP_GARAND:
  case WP_KAR98:
  case WP_K43:
  	*shader = cgs.media.limboWeaponCard2;
  	break;
  
  default: // shouldn't happen
  	*shader = 0;

}

// setup s co-ords
switch( weap ) {
case WP_SILENCED_COLT:
case WP_SILENCER:
case WP_LUGER:
case WP_COLT:
*s0 = 0;
*s1 = 0.5f;
break;
default:
*s0 = 0;
*s1 = 1;
break;
}

// setup t co-ords
switch( weap ) {
case WP_AKIMBO_SILENCEDLUGER:
case WP_SILENCER:
case WP_MORTAR:
*t0 = 0/8.f;
*t1 = 1/8.f;
break;
case WP_AKIMBO_SILENCEDCOLT:
case WP_SILENCED_COLT:
case WP_PANZERFAUST:
*t0 = 1/8.f;
*t1 = 2/8.f;
break;
case WP_LUGER:
case WP_AKIMBO_LUGER:
case WP_FLAMETHROWER:
*t0 = 2/8.f;
*t1 = 3/8.f;
break;
case WP_AKIMBO_COLT:
case WP_COLT:
case WP_FG42:
*t0 = 3/8.f;
*t1 = 4/8.f;
break;
case WP_CARBINE:
case WP_MOBILE_MG42:
*t0 = 4/8.f;
*t1 = 5/8.f;
break;
case WP_KAR98:
case WP_MP40:
*t0 = 5/8.f;
*t1 = 6/8.f;
break;
case WP_K43:
case WP_STEN:
*t0 = 6/8.f;
*t1 = 7/8.f;
break;
case WP_GARAND:
case WP_THOMPSON:
*t0 = 7/8.f;
*t1 = 8/8.f;
break;
default: // shouldn’t happen
*t0 = 0.0;
*t1 = 1.0;
break;
}

*h = 1.f;
switch( weap ) {
case WP_SILENCED_COLT:
case WP_SILENCER:
case WP_COLT:
case WP_LUGER:
*w = 0.5f;
break;
default:
*w = 1.f;
break;
}
}


(Smurfer) #7

Unless you’ve already added the NQ code then it’s only possible to change the names with new dlls. If you also edit the pickup name then you need to change the human_base.script file accordingly as well, or else the 3rd person view will be …weird.