weapon mod

Locked
Giuseppe
Posts: 6
Joined: Tue Feb 19, 2008 3:02 pm

weapon mod

Post 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!!!
bork[e]
Posts: 4357
Joined: Tue Mar 23, 2004 8:00 am

Re: weapon mod

Post 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:
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: weapon mod

Post by ^misantropia^ »

Hack G_Damage() in game/g_combat.c and bump the damage when mod == MOD_RAILGUN.
AnthonyJ
Posts: 130
Joined: Wed Nov 15, 2006 7:51 pm

Re: weapon mod

Post 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)
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: weapon mod

Post by ^misantropia^ »

I was anticipating future questions about the RL, BFG, etc. :)
nexus024
Posts: 148
Joined: Fri Oct 06, 2006 7:26 pm

Re: weapon mod

Post 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?
jkoder
Posts: 59
Joined: Tue Jun 17, 2008 9:10 pm

Re: weapon mod

Post 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
Locked