How to remove light and make player glow. (Text file here)

***************************************
Filename(s) : Frogbotlight.txt
Version : 0.2b
Coder : Brian 'EraZoR' Mathiasen
Betatester : Neophyte
E-mail :
erazor@get2net.dk
homepage : <NONE>

***************************************

***** Introduction *****
Hello class, today I'll show you how to change the FrogBot :)
We'll make some commands that removes the light, and makes the Bot and the Client glow ! It's best if you use the 'StaticQuad' mod made by Khol, at the same time. It's COOL ! :-)

***** Requirements *****
-A compiler: eg. qcc.exe
-A PREcompiler: eg. PreQCC
-Quake
-The FrogBot source files (the newest version should do it)
-A Computer ! :-)
-Some interrests in modifying the FrogBot.

***** Getting Started ******

Files to be changed:

-defs.qc
-misc.qc
-client.qc
-botimp.qc

Step 1:

Open defs.qc
Find the lines that read:
float IMP_END4 = 77; // If you have added the QUADED, the MISCBAN the line should read: float IMP_END4 =79;

Now, change the number to 78, if you have added the quad, and the miscban, it should be changed to 80.

Above that line you just changed add this line:
float IMP_NO_lIGHT = 80; // EraZoR

Find the line
'float game_show_rules;'

Under that line add this:
float game_enable_light;

Hit PGDN one down, and you should find the lines
float GAME_SKINFIX = 16384;
#endif // QUAKE
float GAME_ENABLE_QUADED = 32768

Under the line 'float GAME_ENABLE_QUADED = 32768'
add this:
float GAME_ENABLE_LIGHT = 65536

Step 2:
Open MISC.QC

In the function 'void() light' add these lines below the first bracet:

if (game_enable_light)
{
lightstyle(self.style, "a"); // This sets the lightstyle to A, which is NONE
return;
}

Do exactly the same with the functions:
void() light_fluoro;
void() light_fluorospark;
void() light_globe;
void() light_torch_small_wall_walltorch;
void() light_flame_large_yellow;
void() light_flame_small_yellow;
void() light_flame_small_white;

Step 3:
Open CLIENT.QC
In the function 'PutClientInServer'
Just before the last bracet with the semicolon, add these lines:

#ifdef QUAKE
if (game_enable_light)

self.effects = EF_DIMLIGHT;
#endif // QUAKE
#ifdef QUAKEWORLD // EraZoR
if (game_enable_light)
self.effects = EF_DIMLIGHT_BLUE;
#endif // QUAKEWORLD

Step 4:
Open BOTIMP.QC
In the 'SetGame' function add this line:

game_enable_light = gamemode & GAME_ENABLE_LIGHT;

In the 'ADDBOT' function, right before the last bracet with the semicolon, add this:

#ifdef QUAKE
if (game_enable_light)

self.effects = EF_DIMLIGHT;
#endif // QUAKE
#ifdef QUAKEWORLD // EraZoR
if (game_enable_light)
self.effects = EF_DIMLIGHT_BLUE;
#endif // QUAKEWORLD

Goto the 'PrintRules' function, and look for the lines:
print_boolean(GAME_SKINFIX, "skinfix ");
#endif // QUAKE


Right under the #endif // QUAKE, add this:
print_boolean(GAME_ENABLE_LIGHT, "nolight "); // EraZoR


In the 'SetImpulses2' function, under the line 'alias("qwphysics", IMP_QWPHYSICS);' add this:
alias("nolight", IMP_NO_lIGHT); // EraZoR

Look for these lines in the 'ImpulseCommands' function:
else if (impulse_ == IMP_HOOK)
ToggleGameMode(GAME_ENABLE_HOOK, "hook");

Under the line 'ToggleGameMode(GAME_ENABLE_HOOK, "hook"); add these lines:

else if (impulse_ == IMP_NO_LIGHT)
ToggleGameMode(GAME_ENABLE_LIGHT, "nolight"); // EraZoR

Step 5:
You're done !
Now, Compile, run, and start your favorite map.type 'nolight' in the console, and maybe 'quaded' (If available), and the restart the map. Add some bots, and GIB in the darkness ! :-)
If you are using GLquake, it is recommended to use 'gl_flashblend 0'.

***** Author info *****
I'm 16 years old. And I like the FrogBot :)

***** Special thanks to: *****

- ID Software for QUAKE, and QUAKE-C
- Robert 'Frog' Field for creating the FrogBot
- Neophyte for ideas and Betatesting !
- Khol for the 'Miscbanning' and 'Quaded' mods.

***** Copyrights *****
QUAKEŽ is a Trademark by ID software.
The FrogBot is owned, and created by Robert 'Frog' Field.

You may alter this text file in ANY ways, as long as you keep this Copyright thing intact. :-)

***** Where to get this file *****
Right here :)

Please note:
This file WILL be updated later on.
This file is just a 'only to release' version. :-)
Therefor, watch this space for updates

Troubleshooting:

Q: The light is turned off when I start a server, WHY !?
A: The answer is simple...
Open the file called: botimp.qc
And find the line that reads: 'gamemode = cvar("samelevel")'
Change that line to read: 'gamemode = cvar("samelevel") - GAME_ENABLE_LIGHT;'
That should do it.
Otherwise, mail me at: erazor@get2net.dk, and I'll help you from there.

Q: I've allready installed the great 'Nosound', and 'Quaded' created by Khol.
Should I change the line: 'float GAME_ENABLE_LIGHT = 65536;' to read:
'float GAME_ENABLE_LIGHT = 131072;' ???
A: Yes.

If you have problems/suggestion/comments, about this tutorial, you're welcome to mail me at: erazor@get2net.dk

Stuff made by my best friend, the betatester: Neophyte...

===========================================================
Change the armor,weapon and ammo stuff so they are glowing in PINK

#ifdef QUAKE
if (game_enable_light)
self.effects = EF_DIMLIGHT;
#endif // QUAKE
#ifdef QUAKEWORLD // EraZoR
if (game_enable_light)
self.effects = EF_DIMLIGHT_BLUE + EF_DIMLIGHT_RED
#endif // QUAKEWORLD
-------------------------------------------------------------------------
and DONT TURN OFF this, small torches on is very nice:
void() light_torch_small_wall_walltorch;
-------------------------------------------------------------------------
and I changed this to have in the dark Red glowing players, and if quaded on and its dark they are blue

#ifdef QUAKE
if (game_enable_light)
self.effects = EF_DIMLIGHT;
#endif // QUAKE

#ifdef QUAKEWORLD // EraZoR
if (game_enable_light)
self.effects = EF_DIMLIGHT_RED;

if ( (game_enable_light) && (game_enable_quaded))
self.effects = EF_DIMLIGHT_BLUE;
#endif // QUAKEWORLD
---------------------------------------------------------------------------
===========================================================

That was, what my betatester though should be added to the Nolight thing. And I must agree with him... It looks cool when the items glow pink in QW

***** Special thanks to: *****
-
ID Software for QUAKE
-
Robert 'Frog' Field for creating the FrogBot
- Neophyte for ideas and Betatesting !
- Khol for the 'Miscbanning' and 'Quaded' mods.

***** Copyrights *****
QUAKEŽ is a Trademark by ID software.
The FrogBot is owned, and created by Robert 'Frog' Field.

You may alter this text file in ANY ways, as long as you keep this Copyright thing intact. :-)

***** Where to get this file *****
Right here :)

If you have suggestion/comments, you're welcome to mail me.

Erazor

The author of this page is Andrius 'Wrecker' Jovaisa. Page is made using Frontpage Express by Microsoft, and some .html code added with Notepad. Best viewed in 800x600 resolution with small fonts or 1024x768 with small fonts. Site was created in 26th of October, 1998. Page is hosted by Botepidemic, which is hosted by Telefragged - the best Quake/II/IIIarena news site on the net!