Page 1 of 1

weapon mod

Posted: Fri Feb 22, 2008 10:39 pm
by Giuseppe
how can i increase the damage of the railgun in quake 3?i have yet downloaded the code of the game...somebody can explain me step by step what i have to do?thank you very much!!!

Re: weapon mod

Posted: Sun Feb 24, 2008 12:08 am
by bork[e]
grab quad...

but honestly, what little I know about creating worlds for this game, I don't know a way to increase any weapons powers through Radiant...

Might try the programing forum if you get no answers here. :up:

Re: weapon mod

Posted: Sun Feb 24, 2008 11:13 am
by ^misantropia^
Hack G_Damage() in game/g_combat.c and bump the damage when mod == MOD_RAILGUN.

Re: weapon mod

Posted: Sun Feb 24, 2008 12:21 pm
by AnthonyJ
Seems a strange way to do it, mis?

I'd just change the damge = 100 constant in weapon_railgun_fire (game/g_weapons.c)

Re: weapon mod

Posted: Sun Feb 24, 2008 12:26 pm
by ^misantropia^
I was anticipating future questions about the RL, BFG, etc. :)

Re: weapon mod

Posted: Fri Jul 25, 2008 8:42 pm
by nexus024
I have implemented the invisibility cheat into my mod in g_cmds.c What I would like to do is when its enabled to alter the damage for the gauntlet just for the person who has invisibility cheat.

//g_weapons.c in CheckGauntletAttack()

Code: Select all

damage = 50 * s_quadFactor;
Change the 50 to 1000 and when the cheat is disabled to change it back to 50. Any recommendations on how to do this?

Re: weapon mod

Posted: Sat Jul 26, 2008 11:16 am
by jkoder
nexus024 wrote:I have implemented the invisibility cheat into my mod in g_cmds.c What I would like to do is when its enabled to alter the damage for the gauntlet just for the person who has invisibility cheat.

//g_weapons.c in CheckGauntletAttack()

Code: Select all

damage = 50 * s_quadFactor;
Change the 50 to 1000 and when the cheat is disabled to change it back to 50. Any recommendations on how to do this?
Add a qboolean to the clientPersistant_t struct. Give it a meaningful name. When the user executes the command you specified for invisibilty mode set this booleans value to true, do this in the function you call in g_cmds to make the player invisible. In CheckGauntletAttack() make a check like so

Code: Select all

if(ent->client->pers.YOUR_BOOLEAN) {
damage = 1000;
} else {
damage = 50;
}
in ClientBegin you can also initialise this value to qfalse like so after the following

Code: Select all

client->pers.connected = CON_CONNECTED;
client->pers.enterTime = level.time;
client->pers.teamState.state = TEAM_BEGIN;
client->pers.YOUR_BOOLEAN = qfalse; // New line for feature