DeTRiTiC-iQ Posted January 20, 2003 Share Posted January 20, 2003 I'm trying to get started with this modding lark, i've hard a browse through the source code. There's one thing I want to try implementing to get me started: I want to increase the explosive "force" of the explosive projectiles, such as rockets, flechette and repeater alts etc. But I don't want to increase the damage caused by the explosions. How would I go about doing this? (which files to edit, which lines etc) Thanks. Link to comment Share on other sites More sharing options...
razorace Posted January 21, 2003 Share Posted January 21, 2003 Define explosive "force". Do you mean the damage it causes or the knockback? The Damage levels for most of the weapons are defined at near the top of g_weapon.c Link to comment Share on other sites More sharing options...
DeTRiTiC-iQ Posted January 21, 2003 Author Share Posted January 21, 2003 I want to make rocket and flechette jumping more useful. Ie, you get thrown further, but receive the same amount of damage. Link to comment Share on other sites More sharing options...
razorace Posted January 21, 2003 Share Posted January 21, 2003 in g_combat.c after..... if (targ && targ->client && targ->client->ps.usingATST) { knockback = 0; } add in... if ( meansOfDeath == MOD_FLECHETTE_ALT_SPLASH || meansOfDeath == MOD_FLECHETTE_ALT_SPLASH || meansOfDeath == MOD_ROCKET_SPLASH || meansOfDeath == MOD_ROCKET_HOMING_SPLASH ) { knockback *= KNOCKBACKFORSPLASHWEAPONS; } Just replace KNOCKBACKFORSPLASHWEAPONS with your desired increase of knockback ratio. Link to comment Share on other sites More sharing options...
DeTRiTiC-iQ Posted January 21, 2003 Author Share Posted January 21, 2003 great, thanks Link to comment Share on other sites More sharing options...
razorace Posted January 21, 2003 Share Posted January 21, 2003 np. I suggest you learn so C/C++ before you attempt to mod the game very much. The code is far too complicated IF you know C/C++. Link to comment Share on other sites More sharing options...
DeTRiTiC-iQ Posted January 21, 2003 Author Share Posted January 21, 2003 nah programming is easy, its learning your way around this damn game that's hard. Link to comment Share on other sites More sharing options...
DeTRiTiC-iQ Posted January 21, 2003 Author Share Posted January 21, 2003 now for my next question, probably slightly trickier to answer: When a player kills another player, I want to have the following information for use in a logic calculation: 1) Was the attacker in mid-air when he/she fired the shot? 2) Was the enemy in mid-air when he/she was killed? By mid air, I mean more than 2 map units above the ground. I'm guessing that (2) will be easier to find out, since (1) would require a new value to be passed with every shot fired... Link to comment Share on other sites More sharing options...
DeTRiTiC-iQ Posted January 21, 2003 Author Share Posted January 21, 2003 oh, meansOfDeath is an undeclared identifier since its not actually passed to the method in the first place. So any suggestions? Link to comment Share on other sites More sharing options...
AJL Posted January 21, 2003 Share Posted January 21, 2003 Originally posted by DeTRiTiC-iQ now for my next question, probably slightly trickier to answer: When a player kills another player, I want to have the following information for use in a logic calculation: 1) Was the attacker in mid-air when he/she fired the shot? 2) Was the enemy in mid-air when he/she was killed? By mid air, I mean more than 2 map units above the ground. I'm guessing that (2) will be easier to find out, since (1) would require a new value to be passed with every shot fired... I don't know what you want... but ground entity num is none when not on the ground.... soo: (XXXX...->client->ps.groundEntityNum == ENTITYNUM_NONE) Link to comment Share on other sites More sharing options...
razorace Posted January 21, 2003 Share Posted January 21, 2003 Originally posted by DeTRiTiC-iQ oh, meansOfDeath is an undeclared identifier since its not actually passed to the method in the first place. So any suggestions? what? meansOfDeath does pass to g_damage. It's just an int called "mod". Link to comment Share on other sites More sharing options...
DeTRiTiC-iQ Posted January 21, 2003 Author Share Posted January 21, 2003 you see, how was I supposed to know that? the solution you gave me didn't work... I managed to figure out a rudimentary alternative in the meantime though. Link to comment Share on other sites More sharing options...
razorace Posted January 22, 2003 Share Posted January 22, 2003 Sorry, I was tired when I wrote that. I must have pulled the meansOfDeath from another function by accident. I'm not used to working with the standard code anymore. G_Damage is heavily modified in MotF. Link to comment Share on other sites More sharing options...
DeTRiTiC-iQ Posted January 22, 2003 Author Share Posted January 22, 2003 anywho... there are a few things I now need to figure out... 1) Check if the player is more than 3 units off the ground when they fire the shot, and pass the result all the way to G_Damage in the event of actually hitting an enemy 2) Check if the target is more than 2 units off the ground when they are hit, with the exception of homing rockets, and return the value (this will be done inside G_Damage) 3) Check if the target is more than 2 units from both walls AND the ground, with the exception of homing rockets, and return the value. Link to comment Share on other sites More sharing options...
razorace Posted January 22, 2003 Share Posted January 22, 2003 Why do you need that sort of information? Getting anything other than if you're touching the ground is complicated. Link to comment Share on other sites More sharing options...
DeTRiTiC-iQ Posted January 22, 2003 Author Share Posted January 22, 2003 for the main feature of my mod. skill bonuses. Link to comment Share on other sites More sharing options...
razorace Posted January 22, 2003 Share Posted January 22, 2003 Skill bonuses for being in midair while shooting / hitting a target? What's wrong with a simple midair check? Link to comment Share on other sites More sharing options...
DeTRiTiC-iQ Posted January 22, 2003 Author Share Posted January 22, 2003 because its harder to snipe someone if you are in mid-air along with the enemy, and its also easy to kill someone even if they are in midair if they are against a wall. - so I want a small bonus if they just shoot someone in mid-air close to a wall - a bigger bonus if they shoot someone close to a wall whilst in mid-air themselves - an even bigger bonus for shooting someone who is literally in open-space in all dimensions - a huge bonus for winning air-to-air combat - no bonus if its done with the homing missile Link to comment Share on other sites More sharing options...
razorace Posted January 22, 2003 Share Posted January 22, 2003 Well, that's doable but it would be compilicated to pull off. I suggest you check out Code3Arena to get an idea of how JK2 works. Q3 is based on the JK2 engine. http://www.planetquake.com/code3arena/ Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.