Quake New Items for Frogbot (get text file here):

NOTE: This is a MODIFICATION of the FrogBot by Robert "Frog" Field!!!
Go to
http://www.telefragged.com/metro for the current version!

Title : Quake New Items
Filename : qni.zip, qni.txt
Version : 0.5b
Date : 9th of December 1998 15.30 CET
Author : Brian 'EraZoR' Mathiasen
Email : erazor@get2net.dk
Credit :

  • Robert 'Frog' Field for the FrogBot.
  • ID software for Quake !
  • MaNiAc for text file template :)
    Mr. Elusive for the MeQcc compiler.
  • The guy that suggested this modification, can't remember who.. :-)

Webpage : http://www.botepedemic.com/fmods

Type of QC Mod
--------------
Bot : Kindof
Compilation : No
Deathmatch : YEAH !
Teamplay : YEAH !
Monster : No
Model : No
Sound : No
Weapon : No
Utilities : No
Waypoints : Ohh YEAH !!
Other : I don't think so... :-)


Format of QuakeC
----------------
unified diff : No
context diff : No
.qc files : No
progs.dat : You can make your own. (If you don't know how to compile, mail me, and I'll do it for you)
Tutorial : Oh yeah !

Construction
----------------

Base : ModPack1v6 (modified FrogBot v0.12) by NeoPhyte.
Build Time : ~1Ѕ hour
Editor(s) used : wordpad, meqcc.
Known Bugs : None yet.


Description of the Modification
-------------------------------
This is a request I found on Wreckers homepage, www.botepedemic.com/fmods, and It's a Powerup manager like in Quake2.
You can pick up to 9 powerups (eg. 9 quads, 9 rings, 5 pentas etc..) and use them whenever you like.
Thouhg the bots just use them right away.

Usage
-----
qni - enables the modification.
usequad - Use one quad.
usering - Use one ring.
usepent - Use one penta.
usesuit - Use one Environment suit.


How to Install the Modification
-------------------------------
1. Open Defs.qc

Find the line:
'float IMP_END4 = 85;'
Above this, add this:

// EraZoR (Quake New Items) ->
float IMP_QNI = 86;
float IMP_USEQUAD = 87;
float IMP_USERING = 88;
float IMP_USEPENT = 89;
float IMP_USESUIT = 90;
// EraZoR (Quake New Items) <

Change the IMP_END4 value to 90.


Find the line 'float game_enable_runes;'
Above that line, add this:
'float game_disable_qni; // EraZoR (Quake New Items)'

Now, find this:
float GAME_MAPS = 2097152; // Neophyte (Maps)
Below that line, add this line:
float GAME_ENABLE_QNI = 41p5304; // EraZoR (Quake New Items)

Save and close.


2. Open items.qc
Find teh function, powerup_touch.
Under the lines that reads:

print ("You got the ");
sprint (self.netname);
sprint ("\n");

sound (CHAN_VOICE, self.noise, 1, ATTN_NORM);

bf();

self.model = "";

items_ = self.items;

// do the apropriate action

Add this:

if ( (!(game_disable_qni)) && (other.classname != "frogbot") ) {

if (self.classname == "item_artifact_envirosuit")
{
other.ammo_item_radsuit = other.ammo_item_radsuit + 1;
return;
}

if (self.classname == "item_artifact_invulnerability")
{
other.ammo_item_invincible = other.ammo_item_invincible + 1;
return;
}

if (self.classname == "item_artifact_invisibility")
{
other.ammo_item_invisible = other.ammo_item_invisible + 1;
return;
}

if (self.classname == "item_artifact_super_damage")
{
other.ammo_item_super_damage = other.ammo_item_super_damage + 1;
return;
}

// Checks to see if you have more then 9 power ups.
bound_ammo ();
activator = other;
SUB_UseTargets(); // fire all targets / killtargets
}
else
{

Now, in the end of the powerup_touch function.
After the line 'UpdateGoalEntity();'
Add this single bracet:

'}'

Change the function 'item_artifact_invulnerability'
So it looks like:

void() item_artifact_invulnerability =
{
if (game_disable_powerups)
self.flags = self.flags | FL_REMOVE;

self.touch = powerup_touch;
precache_model ("progs/invulner.mdl");

// EraZoR (Quake New Items) ->
if ( (!(game_disable_qni)) && (other.classname != "frogbot") )
{
precache_sound ("r_items2.wav");
self.noise = "items/r_items2.wav";
}
else
{
self.noise = "items/protect.wav";
}
// EraZoR (Quake New Items) <-

setmodel (self, "progs/invulner.mdl");
self.netname = "Pentagram of Protection";
#ifdef QUAKE
self.effects = self.effects | EF_DIMLIGHT;
#endif // QUAKE
#ifdef QUAKEWORLD
self.effects = self.effects | EF_RED;
#endif // QUAKEWORLD
self.items = IT_INVULNERABILITY;
setsize (self, '-16 -16 -24', '16 16 32');
self.aflag = 300;
self.desire = goal_artifact_invulnerability;
StartItem ();
};

Change the function, 'item_artifact_envirosuit'.
So it looks like:

void() item_artifact_envirosuit =
{
self.touch = powerup_touch;

precache_model ("progs/suit.mdl");

// EraZoR (Quake New Items) ->
if ( (!(game_disable_qni)) && (other.classname != "frogbot") )
{
precache_sound("items/r_item2.wav");
self.noise = "items/r_item2.wav";
}
else
{
precache_sound ("items/suit.wav");
precache_sound ("items/suit2.wav");
self.noise = "items/suit.wav";
}
// EraZoR (Quake New Items) <-

setmodel (self, "progs/suit.mdl");
self.netname = "Biosuit";
self.items = IT_SUIT;
setsize (self, '-16 -16 -24', '16 16 32');
self.aflag = 60;
self.desire = goal_NULL;
StartItem ();
};

Change the function, 'item_artifact_invisibility'.
So it looks like:
void() item_artifact_invisibility =
{
if (game_disable_powerups)
self.flags = self.flags | FL_REMOVE;

self.touch = powerup_touch;
precache_model ("progs/invisibl.mdl");

// EraZoR (Quake New Items) ->
if ( (!(game_disable_qni)) && (other.classname != "frogbot") )
{
precache_sound("items/r_item2.wav");
self.noise = "items/r_item2.wav";
}
else
{
precache_sound ("items/inv1.wav");
precache_sound ("items/inv2.wav");
precache_sound ("items/inv3.wav");
self.noise = "items/inv1.wav";
}
// EraZoR (Quake New Items) <-

setmodel (self, "progs/invisibl.mdl");
self.netname = "Ring of Shadows";
self.effects = self.effects | EF_DIMLIGHT;
self.items = IT_INVISIBILITY;
setsize (self, '-16 -16 -24', '16 16 32');
self.aflag = 300;
self.desire = goal_artifact_invisibility;
StartItem ();
};

And finally, change the function, 'item_artifact_super_damage' so it looks like:
void() item_artifact_super_damage =
{
if (game_disable_powerups)
self.flags = self.flags | FL_REMOVE;

if (game_enable_quaded) // REMOVE THESE TWO LINES
self.flags = self.flags | FL_REMOVE; // IF YOU HAVEN'T INSTALLED THE STATICQUAD BY KHOL.

self.touch = powerup_touch;
precache_model ("progs/quaddama.mdl");

// EraZoR (Quake New Items) ->
if ( (!(game_disable_qni)) && (other.classname != "frogbot") )
{
precache_sound("items/r_item2.wav");
self.noise = "items/r_item2.wav";
}
else
{
precache_sound ("items/damage.wav");
precache_sound ("items/damage2.wav");
precache_sound ("items/damage3.wav");
self.noise = "items/damage.wav";
}
setmodel (self, "progs/quaddama.mdl");
if (quad_factor == 4)
self.netname = "Quad Damage";
else
self.netname = "OctaPower";
#ifdef QUAKE
self.effects = self.effects | EF_DIMLIGHT;
#endif // QUAKE
#ifdef QUAKEWORLD
self.effects = self.effects | EF_BLUE;
#endif // QUAKEWORLD
self.items = IT_QUAD;
setsize (self, '-16 -16 -24', '16 16 32');
self.aflag = 60;
self.desire = goal_artifact_super_damage;
StartItem ();
};


Find the function, BackPackTouch.
Below the lines:

// change weapons
other.ammo_shells = other.ammo_shells + self.ammo_shells;
other.ammo_nails = other.ammo_nails + self.ammo_nails;
other.ammo_rockets = other.ammo_rockets + self.ammo_rockets;
other.ammo_cells = other.ammo_cells + self.ammo_cells;

Add this:

// EraZoR (Quake New Items) ->
if (!(game_disable_qni) )
{
other.ammo_item_super_damage = other.ammo_item_super_damage + self.ammo_item_super_damage;
other.ammo_item_invincible = other.ammo_item_invincible + self.ammo_item_invincible;
other.ammo_item_invisible = other.ammo_item_invisible + self.ammo_item_invisible;
other.ammo_item_radsuit = other.ammo_item_radsuit + self.ammo_item_radsuit;
}
// EraZoR (Quake New Items) <-


In the function, 'DropBackPack'.
Under the lines:
item.ammo_shells = self.ammo_shells;
item.ammo_nails = self.ammo_nails;
item.ammo_rockets = self.ammo_rockets;
item.ammo_cells = self.ammo_cells;

Add this:

// EraZoR (Quake New Items) ->
if (!(game_disable_qni))
{
if (self.ammo_item_super_damage > 0)
item.ammo_item_super_damage = 1;
if (self.ammo_item_invincible > 0)
item.ammo_item_invincible = 1;
if (self.ammo_item_invisible > 0)
item.ammo_item_invisible = 1;
if (self.ammo_item_radsuit > 0)
item.ammo_item_radsuit = 1;
}
// EraZoR (Quake New Items) <-


Save and close.

3. Open weapons.qc
Under the lines:
precache_sound ("weapons/bounce.wav"); // grenade bounce
precache_sound ("weapons/shotgn2.wav"); // super shotgun
Add this:
// EraZoR (Quake New Items) ->
precache_sound ("items/damage.wav"); // Quad Damage
precache_sound ("items/damage2.wav"); // Quad Damage
precache_sound ("items/damage3.wav"); // Quad Damage
precache_sound ("items/protect.wav"); // Invulnerability
precache_sound ("items/protect2.wav"); // Invulnerability
precache_sound ("items/protect3.wav"); // Invulnerability
precache_sound ("items/inv1.wav"); // Invisibility
precache_sound ("items/inv2.wav"); // Invisibility
precache_sound ("items/inv3.wav"); // Invisibility
precache_sound ("items/suit.wav"); // Suit
precache_sound ("items/suit2.wav"); // Suit
// EraZoR (Quake New Items) <-

Above the function, 'CycleWeaponReverseCommand'.
Insert these functions:

/ EraZoR (Quake New Items) ->

void() I_UseSuperDamage =
{
if (self.ammo_item_super_damage == 0)
return; // If player has no super damages, quit.
self.super_time = 1; // activate super_damage
self.super_damage_finished = time + 30; // give 30 seconds of super damage
self.items = self.items | IT_QUAD; // flash up the quad damage symbol.
self.ammo_item_super_damage = self.ammo_item_super_damage - 1; // decrease super_damage by 1
sound (CHAN_BODY, "items/damage.wav", 1, ATTN_NORM); // play the sound
sprint ("quad damage used\n"); // inform player that a quad damage was used
};

void() I_UseInvincible =
{
if (self.ammo_item_invincible == 0)
return;
self.invincible_time = 1;
self.invincible_finished = time + 30;
self.items = self.items | IT_INVULNERABILITY;
self.ammo_item_invincible = self.ammo_item_invincible - 1;
sound (CHAN_BODY, "items/protect.wav", 1, ATTN_NORM);
sprint ("Pentagram of Protection used\n");
};

void() I_UseInvisible =
{
if (self.ammo_item_invisible == 0)
return;
self.invisible_time = 1;
self.invisible_finished = time + 30;
self.items = self.items | IT_INVISIBILITY;
self.ammo_item_invisible = self.ammo_item_invisible - 1;
sound (CHAN_BODY, "items/inv1.wav", 1, ATTN_NORM);
sprint ("Ring of Shadows used\n");
};

void() I_UseEnvirosuit =
{
if (self.ammo_item_radsuit == 0)
return;
self.rad_time = 1;
self.radsuit_finished = time + 30;
self.items = self.items | IT_SUIT;
self.ammo_item_radsuit = self.ammo_item_radsuit - 1;
sound (CHAN_BODY, "items/suit.wav", 1, ATTN_NORM);
sprint ("Envirosuit used\n");
};

// EraZoR (Quake New Items) <-


Save and close.

4. Open client.qc
In the function 'SetChangeParms'
Below the line:
parm12 = self.preferences;

Add this:

// EraZoR (Quake New Items) ->
if (!(game_disable_qni))
{
parm13 = self.ammo_item_super_damage;
parm14 = self.ammo_item_invincible;
parm15 = self.ammo_item_invisible;
parm16 = self.ammo_item_radsuit;
}
// EraZoR (Quake New Items) <-

In the function 'SetNewParms'.
Below the line:
parm12 = PREF_FLASH; // default preferences PREF_FLASH
Add this:

// EraZoR (Quake New Items) ->
if (!(game_disable_qni))
{
parm13 = 0;
parm14 = 0;
parm15 = 0;
parm16 = 0;
}
// EraZoR (Quake New Items) <-


Save and close.

5. Open botimp.qc
Above the line:
game_enable_hook = gamemode & GAME_ENABLE_HOOK;
Add this:
game_disable_qni = (!(gamemode & GAME_ENABLE_QNI)); // EraZoR (Quake New Items)

In the 'PrintRules' function, after the line 'msg_level = PRINT_HIGH;'
Add this line:
print_boolean(GAME_ENABLE_QNI, "сой........."); // QNI, EraZoR (Quake New Items)

In the function 'SetImpulses2' below the line: 'alias("framerate", IMP_FRAMERATE);'
Insert these lines:

// EraZoR (Quake New Items) ->
alias("qni", IMP_QNI);
alias("usequad", IMP_USEQUAD);
alias("usering", IMP_USERING);
alias("usepent", IMP_USEPENT);
alias("usesuit", IMP_USESUIT);
// EraZoR (Quake New Items) <-


In the 'ImpulseCommands' function.
After the lines:
else if (impulse_ == IMP_HOOK)
ToggleGameMode(GAME_ENABLE_HOOK, "hook");

Add this:
// EraZoR (Quake New Items) ->
else if (impulse_ == IMP_QNI)
ToggleGameMode(GAME_ENABLE_QNI, "qni");
else if (impulse_ == IMP_USEQUAD)
I_UseSuperDamage();
else if (impulse_ == IMP_USERING)
I_UseInvisible();
else if (impulse_ == IMP_USEPENT)
I_UseInvincible();
else if (impulse_ == IMP_USESUIT)
I_UseEnvirosuit();
// EraZoR (Quake New Items) <-


Save and close.

6. Compile, run, hit powerups and qni in the console.
And play...


Author Information
------------------
I'm a 16 year old boy who live in Denmark, and I love FrogBots and Quake-C.

Comments & suggestions
----------------------
You are welcome to report any bug, comment or suggestion to me.

Copyrights and permissions
--------------------------

The FrogBot is a copyright 1998, Robert Field.
The original QuakeC source is Copyright 1996, ID software.
This modification of the FrogBot is a copyright 1998, Brian Mathiasen.

You may distribute this Quake modification in any electronic format as
long as all the files in this archive remain intact and unmodified and
are distributed together.

You may change the files in this archive, as long as you keep this
Copyright section intact and unmodified and they are distributed together.

Disclaimer
----------
The author is NOT responsible of any damage this modification might cause.
Use this software at your own risk.

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!