Tremulous Forum

Mods => Modding Center => Topic started by: Jalaco on May 09, 2009, 03:17:28 am

Title: Adding Effects to Weapons.
Post by: Jalaco on May 09, 2009, 03:17:28 am
Alright, before I begin yes I did read the other ''shader topic'' but it didn't answer my questions. I was wondering a few things; how did superpie add the glow to the Luci, did it require epic coding I'll just have to copy? Also, does that mod require a cgame mod? I was told that it does. Thanks.

\\^// Jalaco \\^//
Title: Re: Adding Effects to Weapons.
Post by: UniqPhoeniX on May 09, 2009, 03:59:56 am
You have to make a new shader file that overwrites the shaders you want to modify in data-1.1.0.pk3, and put it in a (filename after data-1.1.0 alphabetically).pk3 in same subfolder. You can add new skins/textures the same way. No cgame change / coding skills are needed, just being able to make/edit shaders and image files. You should take a look at superpie's mod .pk3. The mods only work on unpure servers, or servers that have the same mod.
Title: Re: Adding Effects to Weapons.
Post by: Jalaco on May 09, 2009, 04:23:55 am
I understand all that, and have made a few mods myself, even released a couple. But what I'm wondering is, superpie added totally new scripts, is that necessary for making glows? if so how do I make one myself, would that require the coding complexities of making one of those from scratch?

\\^// Jalaco \\^//
Title: Re: Adding Effects to Weapons.
Post by: Odin on May 09, 2009, 05:21:02 am
No, it's mostly just an extra shader stage with a texture that has a color on the spot where the glow is desired, and the rest is black. Then it's GL blended with GL_ONE GL_ONE(add). Optionally a rgbGen wave keyword is used to make it pulsate.
Title: Re: Adding Effects to Weapons.
Post by: reaper122 on May 09, 2009, 06:32:03 pm
You Need This. . . . :

Lcannon. shader

models/weapons/lcannon/lcannon
{
   cull disable
   {
      map models/weapons/lcannon/lcannon. jpg
      rgbGen lightingDiffuse
   }
   {
      map $whiteimage
      rgbGen lightingDiffuse
      blendFunc GL_DST_COLOR GL_SRC_ALPHA
      detail
      alphaGen lightingSpecular
   }
   {
      map models/buildables/mgturret/ref_map. jpg
      blendFunc GL_DST_COLOR GL_ONE
      detail
      tcGen environment
   }
   {
      map models/weapons/lcannon/lcannon_glow. jpg               
      blendFunc add
      rgbGen wave sin . 98 . 02 0 5
      detail
   }
}
Quote
This is For what glow On

      map models/weapons/lcannon/lcannon_glow. jpg               
      blendFunc add
      rgbGen wave sin . 98 . 02 0 5
      detail

And One Photo What Got The Glow  In Parts what you want
Lcannon_glow. jpg   

(http://img14.imageshack.us/img14/3935/lcannonglow.jpg)       when copy url remove the spaces that are not going to put me with spaces



(http://hosting02.imagecross.com/image-hosting-09/3790firma-reaper.gif)
Title: Re: Adding Effects to Weapons.
Post by: Jalaco on May 09, 2009, 10:58:12 pm
Thanks for the script! If I was to change that for other weapons, aliens and buildings, would I just change the path? As well as, of course the glow picture.

\\^// Jalaco \\^//
Title: Re: Adding Effects to Weapons.
Post by: reaper122 on May 10, 2009, 06:54:58 am
No Problem Man

that helped me help me. help is the best :)

Emm Who Know How put glow in builds in aliens i no know that only weapons and humans loololololollololol
Title: Re: Adding Effects to Weapons.
Post by: Jalaco on May 11, 2009, 01:08:48 am
Well I'd guess if changing the path with that can make hummies glow, it would be the same for aliens. Thanks a million!

\\^// Jalaco \\^//
Title: Re: Adding Effects to Weapons.
Post by: reaper122 on May 11, 2009, 11:41:16 pm
I tried to put humans glow in the head but was without any effect
Title: Re: Adding Effects to Weapons.
Post by: wolfbr on June 18, 2009, 05:18:15 am
I tried to put humans glow in the others weapons but was without any effect(Prifle and flamer) others guns is ok =/.
please, help me, who to place glow in prifle and flamer?
i can place glow in others weapons off superpie mod?
thanks