Author Topic: Adding Effects to Weapons.  (Read 7907 times)

Jalaco

  • Posts: 58
  • Turrets: +4/-1
Adding Effects to Weapons.
« 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 \\^//

UniqPhoeniX

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: Adding Effects to Weapons.
« Reply #1 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.

Jalaco

  • Posts: 58
  • Turrets: +4/-1
Re: Adding Effects to Weapons.
« Reply #2 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 \\^//

Odin

  • Spam Killer
  • *
  • Posts: 1767
  • Turrets: +113/-204
    • My Website
Re: Adding Effects to Weapons.
« Reply #3 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.

reaper122

  • Posts: 16
  • Turrets: +0/-6
Re: Adding Effects to Weapons.
« Reply #4 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   

       when copy url remove the spaces that are not going to put me with spaces



« Last Edit: May 17, 2009, 09:56:30 pm by reaper122 »

Jalaco

  • Posts: 58
  • Turrets: +4/-1
Re: Adding Effects to Weapons.
« Reply #5 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 \\^//
« Last Edit: May 09, 2009, 11:15:36 pm by Jalaco »

reaper122

  • Posts: 16
  • Turrets: +0/-6
Re: Adding Effects to Weapons.
« Reply #6 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
« Last Edit: May 10, 2009, 06:56:58 am by reaper122 »

Jalaco

  • Posts: 58
  • Turrets: +4/-1
Re: Adding Effects to Weapons.
« Reply #7 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 \\^//

reaper122

  • Posts: 16
  • Turrets: +0/-6
Re: Adding Effects to Weapons.
« Reply #8 on: May 11, 2009, 11:41:16 pm »
I tried to put humans glow in the head but was without any effect

wolfbr

  • Posts: 222
  • Turrets: +5/-25
Re: Adding Effects to Weapons.
« Reply #9 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