You are viewing our Forum Archives. To view or take place in current topics click here.

Helpful?

No, this is easy
0.00% (0 votes)
Yes, Thank you
100.00% (3 votes)

Total Votes: 3

How to Add/change shaders for ModMenu's
Posted:

How to Add/change shaders for ModMenu'sPosted:

XKLUTCHIN_OUTX
  • Resident Elite
Status: Offline
Joined: Feb 10, 201113Year Member
Posts: 282
Reputation Power: 13
Status: Offline
Joined: Feb 10, 201113Year Member
Posts: 282
Reputation Power: 13
First off, if you're going to flame this topic, then leave.

First off, most of you are probably using Pheonix v2 leaked version. If you have fixed version copy and paste the debug.gsc here [ Register or Signin to view external links. ]
There, it will uncompress the code.

Next you'll want to locate the code

setShader( "white", width , height );

Now, if you want to change that you're going to edit the "white" part. Here is a list of them:::Credit to AriZonaa and CoolBunny for testing

*********************
*******Shaders*******
*********************

        precacheshader( "damage_feedback" ); //works but small
        precacheshader( "gradient" ); //works, no color changes work
        precacheshader( "gradient_bottom" ); //works no color change (black only)
        precacheshader( "gradient_center" ); //works faded center allows color
        precacheshader( "gradient_fadein" ); //works fades from left allows color, SICK
        precacheshader( "gradient_top" ); //works no color change works tho (black only)
        precacheshader( "gradient_left" );  //works
        precacheshader( "hudstopwatchneedle" ); //works
        precacheshader( "hudstopwatch" ); //works
        precacheshader( "lagometer" ); //works color change in boxes in the center of the shader,rest is black, Decent
        precacheshader( "poison" ); // ends game (try to kick player by setting this shader for them? hmmm ;) )
        precacheshader( "scorebar_zom_1" );//all scorebars work, ALL SICK
        precacheshader( "scorebar_zom_2" );
        precacheshader( "scorebar_zom_3" );
        precacheshader( "scorebar_zom_4" );
        precacheshader( "scorebar_zom_long_1" );
        precacheshader( "scorebar_zom_long_2" );
        precacheshader( "scorebar_zom_long_3" );
        precacheshader( "scorebar_zom_long_4" );
        precacheshader( "shadowoverlay" ); //ends game (try to kick player by setting this shader for them? hmmm ;) )
        precacheshader( "dof_downsample" );//ends game (try to kick player by setting this shader for them? hmmm ;) )
        precacheshader( "epd_watermark" ); //works, says cod5 beta, kinda stupid
        precacheshader( "floatz_display" ); //idk how to explain, looks cool tho (only shows as orange), SICK
        precacheshader( "frame_alpha_debug" ); //solid
        precacheshader( "hud_chalk_1" ); //works
        precacheshader( "hud_chalk_5" ); //works
        precacheshader( "hud_compass_face" );//works
        precacheshader( "hud_compass_highlight" ); //solid with texture effects, SICK
        precacheshader( "hud_compass_rim" ); //works
        precacheshader( "hud_icon_colt" ); //works
        PrecacheShader( "white" );//normal solid shader
        precacheshader( "zombie_intro" ); //black with Nazi Zombies Text (first 2 maps only)
        precacheshader( "zombie_stopwatchneedle" );//works
        precacheshader( "zombie_stopwatch_glass" );//works
        precacheshader( "zombie_stopwatch" );//works
        precacheshader( "hud_icon_monkey" );//works
        precacheshader( "menu_bio_american" );//works
        precacheshader( "logo_juggernog_1k" );//works
        precacheshader( "menu_bio_japan" );//works
        precacheshader( "menu_bio_russian" );//works
        precacheshader( "menu_map_nazi_zombie_factory" );//works
        precacheshader( "white_line_faded_center" );//works, fades out from center
        precacheshader( "rank_prestige10" );//any number 1 - 10
        precacheshader( "rank_prestige9" );


gradient //faded black
gradient_center //fades into the center
white_line_faded_center //fades from the center
lagometer //wierd, black shader with boxes in the middle which u can edit the color
scorebar_zom_1// most people know this one, its the scoreboard derp
floatz_display// has a cool effect, kinda glassy look, stays orange tho :(
white// basic solid shader
menu_bio_russian// russian dudes bio page (works on all maps i think)
menu_bio_american //dempsey's bio
menu_map_nazi_zombie_factory// picture of the map in the pause menu
hud_compass_highlight// basic shader shape but with texture in the colors
rank_prestige10// not really good for menus(except like a extra shader placed on it maybe)
zombie_intro// black shader with nazi zombies written on it (first 2 maps only :( )


---------------------------------------------------
Now before you test/burn your mods, you're going to have to precache it, so you take your shader it put it in the init() located in cheat.gsc like this
PrecacheShader( "white" ); // or this
PrecacheShader( "scorebar_zom_long_1" );
---------------------------------------------------
There you're done!
---------------------------------------------------
Now, this next part i'm not sure about
If you want to change it in game locate this again

createRectangle(align,relative,x,y,width,height,color)

and add an arguement to it so like this

createRectangle(align,relative,x,y,width,height,color,shader)

Then find this

createRectangle("LEFT", "CENTER", -20, self.MenuDisp[0].y, 300, 30, (1,(188/255)(33/255)));

and make an if statement like this

   if(!IsDefined(self.shader) || (!IsDefined(self.ColorScroll)) {
             self.MenuCur = self createRectangle("LEFT", "CENTER", -20, self.MenuDisp[0].y, 300, 30, (1,(188/255),(33/255)), "white");
   } else {
      self.MenuCur = self createRectangle("LEFT", "CENTER", -20, self.MenuDisp[0].y, 300, 30, self.ColorScroll, self.shader );
   }

Then Make the createRectangle is like this

createRectangle(align,relative,x,y,width,height,color,shader) {
   barElemBG = newClientHudElem( self );
        barElemBG.elemType = "bar";
        if ( !level.splitScreen )
        {
                barElemBG.x = -2;
                barElemBG.y = -2;
        }
        barElemBG.width = width;
        barElemBG.height = height;
   barElemBG.align = align;
   barElemBG.relative = relative;
        barElemBG.xOffset = 0;
        barElemBG.yOffset = 0;
        barElemBG.children = [];
        barElemBG.sort = 3;
        barElemBG.color = color;
        barElemBG.alpha = .5;
        barElemBG setParent( level.uiParent );
        barElemBG setShader( shader, width , height );
        barElemBG.hidden = false;
   barElemBG setPoint(align,relative,x,y);
        return barElemBG;
}

After that make a new submenu like this

ShaderMenu()

{

   menu = spawnstruct();
   menu.opts = [];
   menu.funcs = [];
   menu.input = [];


   menu.opts[menu.opts.size] = "CustomShader";
   menu.opts[menu.opts.size] = "CustomShader";

   menu.funcs[menu.funcs.size] = ::Shader1;
   menu.funcs[menu.funcs.size] = ::Shader2;

   menu.input[menu.input.size] = "";
   menu.input[menu.input.size] = "";

   menu.opts[menu.opts.size] = "[Main Menu]";
   menu.funcs[menu.funcs.size] = ::NewMenu;
   menu.input[menu.input.size] = ::MainMenu;
   return menu;
}
Shader1(){self thread Shader( "scorebar_zom_long_4" );}
Shader2(){self thread Shader( "gradient_bottom" );}


----------------------------------------------------------
Please thank the Topic, and remember the changable shader in game TuT is something i THINK that will work. Someone like CoolBunny skim through it and see if it's fine.

Thanks, And Remember any shader in the menu HAS to be Precached or else it wont work.


Last edited by XKLUTCHIN_OUTX ; edited 1 time in total
#2. Posted:
Resistance
  • TTG Natural
Status: Offline
Joined: Aug 15, 201014Year Member
Posts: 949
Reputation Power: 46
Status: Offline
Joined: Aug 15, 201014Year Member
Posts: 949
Reputation Power: 46
Thanks Alot Bro Something i Have Been Waiting For

Thanks And +Rep
#3. Posted:
coolbunny1234
  • Spooky Poster
Status: Offline
Joined: Aug 09, 200915Year Member
Posts: 6,493
Reputation Power: 8063
Motto: The Original Bunny
Motto: The Original Bunny
Status: Offline
Joined: Aug 09, 200915Year Member
Posts: 6,493
Reputation Power: 8063
Motto: The Original Bunny
The list you posted has alot of shaders that doesnt work, use this list, i have tested them all and they all work.


*********************
*******Shaders*******
*********************

        precacheshader( "damage_feedback" ); //works but small
        precacheshader( "gradient" ); //works, no color changes work
        precacheshader( "gradient_bottom" ); //works no color change (black only)
        precacheshader( "gradient_center" ); //works faded center allows color
        precacheshader( "gradient_fadein" ); //works fades from left allows color, SICK
        precacheshader( "gradient_top" ); //works no color change works tho (black only)
        precacheshader( "gradient_left" );  //works
        precacheshader( "hudstopwatchneedle" ); //works
        precacheshader( "hudstopwatch" ); //works
        precacheshader( "lagometer" ); //works color change in boxes in the center of the shader,rest is black, Decent
        precacheshader( "poison" ); // ends game (try to kick player by setting this shader for them? hmmm ;) )
        precacheshader( "scorebar_zom_1" );//all scorebars work, ALL SICK
        precacheshader( "scorebar_zom_2" );
        precacheshader( "scorebar_zom_3" );
        precacheshader( "scorebar_zom_4" );
        precacheshader( "scorebar_zom_long_1" );
        precacheshader( "scorebar_zom_long_2" );
        precacheshader( "scorebar_zom_long_3" );
        precacheshader( "scorebar_zom_long_4" );
        precacheshader( "shadowoverlay" ); //ends game (try to kick player by setting this shader for them? hmmm ;) )
        precacheshader( "dof_downsample" );//ends game (try to kick player by setting this shader for them? hmmm ;) )
        precacheshader( "epd_watermark" ); //works, says cod5 beta, kinda stupid
        precacheshader( "floatz_display" ); //idk how to explain, looks cool tho (only shows as orange), SICK
        precacheshader( "frame_alpha_debug" ); //solid
        precacheshader( "hud_chalk_1" ); //works
        precacheshader( "hud_chalk_5" ); //works
        precacheshader( "hud_compass_face" );//works
        precacheshader( "hud_compass_highlight" ); //solid with texture effects, SICK
        precacheshader( "hud_compass_rim" ); //works
        precacheshader( "hud_icon_colt" ); //works
        PrecacheShader( "white" );//normal solid shader
        precacheshader( "zombie_intro" ); //black with Nazi Zombies Text (first 2 maps only)
        precacheshader( "zombie_stopwatchneedle" );//works
        precacheshader( "zombie_stopwatch_glass" );//works
        precacheshader( "zombie_stopwatch" );//works
        precacheshader( "hud_icon_monkey" );//works
        precacheshader( "menu_bio_american" );//works
        precacheshader( "logo_juggernog_1k" );//works
        precacheshader( "menu_bio_japan" );//works
        precacheshader( "menu_bio_russian" );//works
        precacheshader( "menu_map_nazi_zombie_factory" );//works
        precacheshader( "white_line_faded_center" );//works, fades out from center
        precacheshader( "rank_prestige10" );//any number 1 - 10
        precacheshader( "rank_prestige9" );


gradient //faded black
gradient_center //fades into the center
white_line_faded_center //fades from the center
lagometer //wierd, black shader with boxes in the middle which u can edit the color
scorebar_zom_1// most people know this one, its the scoreboard derp
floatz_display// has a cool effect, kinda glassy look, stays orange tho :(
white// basic solid shader
menu_bio_russian// russian dudes bio page (works on all maps i think)
menu_bio_american //dempsey's bio
menu_map_nazi_zombie_factory// picture of the map in the pause menu
hud_compass_highlight// basic shader shape but with texture in the colors
rank_prestige10// not really good for menus(except like a extra shader placed on it maybe)
zombie_intro// black shader with nazi zombies written on it (first 2 maps only :( )

#4. Posted:
I_Rage_Hard
  • Challenger
Status: Offline
Joined: Aug 15, 201014Year Member
Posts: 161
Reputation Power: 6
Status: Offline
Joined: Aug 15, 201014Year Member
Posts: 161
Reputation Power: 6
Just looking at

ShaderMenu()

{

   menu = spawnstruct();
   menu.opts = [];
   menu.funcs = [];
   menu.input = [];


   menu.opts[menu.opts.size] = "CustomShader";
   menu.opts[menu.opts.size] = "CustomShader";

   menu.funcs[menu.funcs.size] = ::Shader1;
   menu.funcs[menu.funcs.size] = ::Shader2;

   menu.input[menu.input.size] = "";
   menu.input[menu.input.size] = "";

   menu.opts[menu.opts.size] = "[Main Menu]";
   menu.funcs[menu.funcs.size] = ::NewMenu;
   menu.input[menu.input.size] = ::MainMenu;
   return menu;
}
Shader1(){self thread Shader( "scorebar_zom_long_4" );}
Shader2(){self thread Shader( "gradient_bottom" );}

You call the thread shader but never created it, plus I don't think that's all because when I created a function like this to change shader in game when you changed that shader to many time's it would disappear altogether.
#5. Posted:
XKLUTCHIN_OUTX
  • Resident Elite
Status: Offline
Joined: Feb 10, 201113Year Member
Posts: 282
Reputation Power: 13
Status: Offline
Joined: Feb 10, 201113Year Member
Posts: 282
Reputation Power: 13
I_Rage_Hard wrote Just looking at

ShaderMenu()

{

   menu = spawnstruct();
   menu.opts = [];
   menu.funcs = [];
   menu.input = [];


   menu.opts[menu.opts.size] = "CustomShader";
   menu.opts[menu.opts.size] = "CustomShader";

   menu.funcs[menu.funcs.size] = ::Shader1;
   menu.funcs[menu.funcs.size] = ::Shader2;

   menu.input[menu.input.size] = "";
   menu.input[menu.input.size] = "";

   menu.opts[menu.opts.size] = "[Main Menu]";
   menu.funcs[menu.funcs.size] = ::NewMenu;
   menu.input[menu.input.size] = ::MainMenu;
   return menu;
}
Shader1(){self thread Shader( "scorebar_zom_long_4" );}
Shader2(){self thread Shader( "gradient_bottom" );}

You call the thread shader but never created it, plus I don't think that's all because when I created a function like this to change shader in game when you changed that shader to many time's it would disappear altogether.

Well, this tutorial was made on how to change the shader, not adding submenues. And like I said, that tut on how to change in game was not tested.
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.