No announcement yet.

Changing Decals / Weapon "scorch" marks

  • Filter
  • Time
  • Show
Clear All
new posts

    Changing Decals / Weapon "scorch" marks

    (Ok, so I got my CavernTan working again)

    Basically, I'm trying to create a mod that will allow the player to spray paint (textures) of varying colors onto surfaces. I think using modified weapons with different colored decals would do the trick. However, if there is a way I can directly just hit a key without a weapon and spray a certain texture/decal/scorch (like in Half-Life or Counter-Strike), then I'd be even happier.

    I'm thinking that an easy way of doing it would be to create a mutator that will replace a weapon and change the decal, but I'm not sure how to go about that.

    I successfully created this demo mutator: (link fixed)

    ..but I don't know how to change the decals / "bullet marks"

    ChaosUT seems to have a spray paint gun:
    If anyone can shed light on how to do it, that'd be very much appreciated.

    UDN articles I've been looking at, but don't really help me:

    Any help would be greatly appreciated, thanks!

    P.S. I'm using GibLife to make decals stay forever.

    The "We...tator_Tutorial" link is messed up...

    Your plan sounds feasible, but I'm missing a few details to understand it fully. Do you want people to be able to spray a single picture only (like ChaosUT)? A selection of pre-existing pictures? Or paint anything they like in a "freeform" manner?


      I plan to create something that is a cross between the ChaosUT spray paint and the freeform painting. Basically, I want to fire off paint splotches at a rapid rate as to simulate freeform painting. ChaosUT's method only allows a few to be painted at a time - there is a long delay between each spray.

      This is something that will be solely client side, so I don't have to worry about it working on multiplayer or other people's computers. This is just for my own project.

      Ideally, I want to be able to change the color of the paint splotches on the fly (maybe with the mouse wheel). In other words, the paint splotch texture will just be a greyscale image with alpha transparancy and will take in a variable value that can be controlled by the mouse wheel. Thus, you'll be able to simulate some simple painting this way.

      Right now, all I want to do is to get a gun to change its decals. I've been working with the Bio Rifle, but I don't know how to change the splotch color or decal (note, I think the Bio Rifle decals operate on the same principle I want to achieve - it uses a grayscale alpha-trans image and has the green assigned to it, just not sure how).

      Thanks for the reply, by the way.


        From what I see in BioDecal, it isn't doing anything special to change the color - the texture's just green from the outset.

        As to changing the decal itself:
        BioGlob.uc, line 110
        spawn(class'BioDecal',,,, rotator(-HitNormal));
        Change the class and there you go.

        By the way, if you're going to make a spray-can thing, it should (IMO) probably be hitscan... the number of projectiles you'd have to spawn to get a decent level of detail in the paintingness would be ridiculous.


          Note that giblife uses a "dirty" way, to disable it again I had to exit ut2004 and restart it. Configuring it is weird too since it updates on map-change only...

          I tested things around this topic and found the LinkGun secondary as ideal for painting, btw.



            Ah, plenty of good suggestions.

            After thinking about it again, I want to go back to the idea of picking up a "paint weapon" and using it to shoot projectiles or a beam (like Link Gun 2ndary) to make marks on the walls and surfaces.

            I played a bit more with ChaosUT's spray decal thing, and I don't think that's what I'm looking for. I kinda want to see that paint come out, or even have a "brush" take a swing and shoot out some paint that will hit the wall and make a mark.

            I'll see if I can implement that color change thing too.


              Emitter particles can be made to leave a splash when they hit. This feature is documented on UDN. Perhaps you can leave projectors this way.


                every decal (xScorch) is a subclass of projector already


                  Ok, so here's class BioDecal. I'm just not sure how to change what texture it refers to. Can I just tell it to use some other texture like one in my own custom package? Also, where is the default texture located? i.e. what package? - it says TEXTURES\DECALS\BioDecala.tga but I looked there and did not find it, so it must be in a package or something, right?

                  class BioDecal extends xScorch;
                  simulated function BeginPlay()
                  	if ( !Level.bDropDetail && (FRand() < 0.5) )
                  		ProjTexture = texture'xbiosplat2';


                    I think some resources are packaged into the .u files...


                      Yeah, I found the biosplat and biosplat2 are stored in XEffects, but it doesn't appear in the textures folder. It does show up in the System folder as XEffects.u, but editing that doesn't seem to help (i.e. I changed a texture in XEffects inside UnrealEd and saved over XEffects.u). The textures remain the same when I load up the game. What is even stranger is that I tried deleting the XEffects.u file altogether and the game still runs fine with regular textures. So I think I'm looking in the wrong area to change the actual texture.


                        Ok, so I got a mutator working (replacing the LinkGun with a "PaintGun"). I was able to mess with a few of the settings so I feel like a have an ok grasp of mut's.

                        The problem is that I want to change the Link Gun Alt's scorch marks to something I pick. I found the code that references the LinkBoltScorch (primary fire, the link bolt), but not the reference to LinkScorch (secondary, the link beam).


                        LinkProjectile references LinkBoltScorch, so that's good.

                        The problem is that I don't know where LinkScorch is referenced, thus I'm having a hard time creating a mutator class for it.

                        I'll try messing with the Link Bolt to see if I can change its decals, but ideally, I'd like to use the Link Beam to paint with since it is hitscan and more rapid than the bolt like one of the previous posters suggested.


                          The alt scorch is probably spawned in LinkBeamEffect. If you download(ed) the source somewhere (wiki, for example), you can use Windows Search Find in Files to dig up files where LinkScorch is referenced.