Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Diffrent weapons of certain class

  1. #1

    Default Diffrent weapons of certain class

    Hey , i have been working on a project for mohaa , but i had a difficulty at creating multiple weapons of 1 class for example class MG contains StG and BAR , i wanted to add more weapon subclass , i added one of its name to pk0/models/weapons , i can add sound to it , but when i just type the "give" command in console it opens the weapon but without textures how could i add textures to it,.. Thanks in Adv.

  2. #2
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    when you type give, I believe it pulls up the weapon classes. By default MOHAA has 6 weapon classes, and depending on which team you're on (allies or Axis), depends on which weapon in that class you get. The weapon menu would be part of the menu urc. It's been a while, but I believe the pak5.pk3 is where you want to look. I can't recall. Basically you have to find the weapon menu urc file. Still though, if you are adding multiple weapons to a class, how will you end up deciding which weapon to choose per team?
    Like let's say they choose mg class, then you would have to bring up a 2nd menu with all the mg options for Allies/axis.

    Does that make sense?

  3. #3

    Default

    when i type give command , i just type it particullary that forexample i created a weapon called Newwep class smg then i type give models/weapons/newwep.tik as i created tik file for it , and surely i need to make a new menu of weapon to choose but that's easy but , adding a texture as the weapon appears with its sound only and name , but like its a ghost weapon i cant see it either in 3rd/1st view i tried to search scripts in pak0 or pak6 that targets each weapon to its texture , so that it appears but couldnt figure out ..

  4. #4

    Default

    The game have a list of internal weapons and if you try to add a new weapon she dont appear on view because she is not on the list.

    The only work around to show up on the view you have to use a name from a internal weapon.

    For your example has to be Thompson because is a smg.
    Last edited by DoubleKill; September 12th, 2018 at 01:50 AM.

  5. #5
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    In the weapon tiki, the model has a shader associated with it, you then have to find that shader to backtrack and find the texture associated with the weapon.
    Both player and weapon models use shaders.

    So if a weapon shader is "gun_muzzle"

    You need to find the shader "gun_muzzle" and in that shader you will find the texture associated with the gun muzzle. textures are in pak5, shaders are in pak0 if I remember correctly. I think it's in a scripts folder. It's been a long time since I modded stuff with pk3's, but if you can upload your mod (or what you have of it), I should be able to get it working for you. Just include the textures for me, and I can create a shader and configure it for you.

    I forgot to add, gun_muzzle might not be the name of the script itself. For example there could be a "universal" weapon script called something like weapon_shaders.shader
    and then in that shader there will be a part that is associated with gun_muzzle

    gun_muzzle
    {
    //stuff
    }

    Sometimes it can be a trial and error process, but either way, just send me what you have and I can help you out when I get home.

  6. #6

    Default

    Pak0.pk3\scripts\ weapons_allied.shader & weapons_german.shader
    Pak2.pk3\textures\models\weapons\

  7. #7

    Default

    check out this post for the mod pk3 you can see howm they did it.

    https://www.x-null.net/forums/thread...t=flamethrower

    zzzzzzzzzzzzzzzzzz-Genosweapons(modified).pk3

  8. #8

    Default

    Quote Originally Posted by James View Post
    In the weapon tiki, the model has a shader associated with it, you then have to find that shader to backtrack and find the texture associated with the weapon.
    Both player and weapon models use shaders.

    So if a weapon shader is "gun_muzzle"

    You need to find the shader "gun_muzzle" and in that shader you will find the texture associated with the gun muzzle. textures are in pak5, shaders are in pak0 if I remember correctly. I think it's in a scripts folder. It's been a long time since I modded stuff with pk3's, but if you can upload your mod (or what you have of it), I should be able to get it working for you. Just include the textures for me, and I can create a shader and configure it for you.

    I forgot to add, gun_muzzle might not be the name of the script itself. For example there could be a "universal" weapon script called something like weapon_shaders.shader
    and then in that shader there will be a part that is associated with gun_muzzle

    gun_muzzle
    {
    //stuff
    }

    Sometimes it can be a trial and error process, but either way, just send me what you have and I can help you out when I get home.
    http://www.mediafire.com/file/5m8i25...ewwep.pk3/file here is link that contain textures and the tik files of the weapon

  9. #9

    Default

    Quote Originally Posted by easymeat View Post
    Pak0.pk3\scripts\ weapons_allied.shader & weapons_german.shader
    Pak2.pk3\textures\models\weapons\
    That shader is that what i was looking for , but i when i type the directory of the texture in it the game will still not recognize it , what files in total should i add the weapon to define it totally , Thanks
    Last edited by demonkirolos; September 12th, 2018 at 06:52 PM.

  10. #10

    Default

    I think if you give it a new name you need to make a new shader for it and add it to then shader file for the team.

    new_weapon
    {
    qer_editorimage textures/models/weapons/new_weapon/new_weapon.tga
    {
    map textures/models/weapons/new_weapon/new_weapon.tga
    rgbGen lightingSpherical
    }
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •