Jump to content

Changing Projectile Speed


Recommended Posts

So this would all have to deal with the source code and stuff?

 

I was just curious to see what a 10% or 20% speed increase with the blaster and pistol would do with some of the firefights I have scripted. If I have to go through source code stuff I'll have to pass on the idea.

Asgarath83 likes this
Link to comment

So this would all have to deal with the source code and stuff?

 

I was just curious to see what a 10% or 20% speed increase with the blaster and pistol would do with some of the firefights I have scripted. If I have to go through source code stuff I'll have to pass on the idea.

Yup.  I'd recommend starting with openjk's source since it'll make it easier.  This tutorial might help you out if you want to give it a try: http://jkhub.org/tutorials/article/131-how-to-create-a-new-weapon-mp/

JKG Developer

Link to comment

So this would all have to deal with the source code and stuff?

 

I was just curious to see what a 10% or 20% speed increase with the blaster and pistol would do with some of the firefights I have scripted. If I have to go through source code stuff I'll have to pass on the idea.

 

1 Download openjk,

2 install cmake and visual studio, follow the eezstreet guide for the installing and configuring of cmake

3 generate your project with cmake

4 open project with visual studio

5 the weapons projectile speed can be easily edited in weapons.h of the code ;) i change the rocket speed in my mod for make a lot more fast and the other shoot for make a lot more slow.  you can also customize the dmg of projectiles, the radius etc. also, you can customize the dmg by class. follow my spoilers on my topic when i ask help with my little code project. :)

IrocJeff and katanamaru like this
Link to comment

 

// Bryar Pistol
//--------
#define BRYAR_PISTOL_VEL 2000
#define BRYAR_PISTOL_DAMAGE 15
#define BRYAR_CHARGE_UNIT 200.0f // bryar charging gives us one more unit every 200ms--if you change this, you'll have to do the same in bg_pmove

// E11 Blaster
//---------
#define BLASTER_MAIN_SPREAD 0.5f
#define BLASTER_ALT_SPREAD 1.5f
#define BLASTER_NPC_SPREAD 0.5f
#define BLASTER_VELOCITY 2300
#define BLASTER_NPC_VEL_CUT 0.5f
#define BLASTER_NPC_HARD_VEL_CUT 0.7f
#define BLASTER_DAMAGE 20
#define BLASTER_NPC_DAMAGE_EASY 10
#define BLASTER_NPC_DAMAGE_NORMAL 15 // 14
#define BLASTER_NPC_DAMAGE_HARD 20 // 18

// Tenloss Disruptor
//----------
#define DISRUPTOR_MAIN_DAMAGE 100
#define DISRUPTOR_NPC_MAIN_DAMAGE_EASY 50
#define DISRUPTOR_NPC_MAIN_DAMAGE_MEDIUM 75
#define DISRUPTOR_NPC_MAIN_DAMAGE_HARD 100

#define DISRUPTOR_ALT_DAMAGE 200
#define DISRUPTOR_NPC_ALT_DAMAGE_EASY 100
#define DISRUPTOR_NPC_ALT_DAMAGE_MEDIUM 150
#define DISRUPTOR_NPC_ALT_DAMAGE_HARD 200
#define DISRUPTOR_ALT_TRACES 3 // can go through a max of 3 entities
#define DISRUPTOR_CHARGE_UNIT 150.0f // distruptor charging gives us one more unit every 150ms--if you change this, you'll have to do the same in bg_pmove

// Wookie Bowcaster
//----------
#define BOWCASTER_DAMAGE 15
#define BOWCASTER_VELOCITY 2000
#define BOWCASTER_NPC_DAMAGE_EASY 10
#define BOWCASTER_NPC_DAMAGE_NORMAL 15
#define BOWCASTER_NPC_DAMAGE_HARD 20
#define BOWCASTER_SPLASH_DAMAGE 0
#define BOWCASTER_SPLASH_RADIUS 0
#define BOWCASTER_SIZE 2

#define BOWCASTER_ALT_SPREAD 5.0f
#define BOWCASTER_VEL_RANGE 0.3f
#define BOWCASTER_CHARGE_UNIT 200.0f // bowcaster charging gives us one more unit every 200ms--if you change this, you'll have to do the same in bg_pmove

// Heavy Repeater
//----------
#define REPEATER_SPREAD 0.7f
#define REPEATER_NPC_SPREAD 0.7f
#define REPEATER_DAMAGE 20
#define REPEATER_VELOCITY 1600
#define REPEATER_NPC_DAMAGE_EASY 10
#define REPEATER_NPC_DAMAGE_NORMAL 15
#define REPEATER_NPC_DAMAGE_HARD 20

#define REPEATER_ALT_SIZE 3 // half of bbox size
#define REPEATER_ALT_DAMAGE 50
#define REPEATER_ALT_SPLASH_DAMAGE 50
#define REPEATER_ALT_SPLASH_RADIUS 128
#define REPEATER_ALT_VELOCITY 1100
#define REPEATER_ALT_NPC_DAMAGE_EASY 25
#define REPEATER_ALT_NPC_DAMAGE_NORMAL 37
#define REPEATER_ALT_NPC_DAMAGE_HARD 50

// DEMP2
//----------
#define DEMP2_DAMAGE 50
#define DEMP2_VELOCITY 1800
#define DEMP2_NPC_DAMAGE_EASY 30
#define DEMP2_NPC_DAMAGE_NORMAL 40
#define DEMP2_NPC_DAMAGE_HARD 50
#define DEMP2_SIZE 2 // half of bbox size

#define DEMP2_ALT_DAMAGE 25
#define DEMP2_CHARGE_UNIT 500.0f // demp2 charging gives us one more unit every 500ms--if you change this, you'll have to do the same in bg_pmove
#define DEMP2_ALT_RANGE 4096
#define DEMP2_ALT_SPLASHRADIUS 150

// Golan Arms Flechette
//---------
#define FLECHETTE_SHOTS 1
#define FLECHETTE_SPREAD 0.5f
#define FLECHETTE_DAMAGE 20
#define FLECHETTE_VEL 1500
#define FLECHETTE_SIZE 3

#define FLECHETTE_ALT_DAMAGE 25
#define FLECHETTE_ALT_SPLASH_DAM 30
#define FLECHETTE_ALT_SPLASH_RAD 128

// NOT CURRENTLY USED
#define FLECHETTE_MINE_RADIUS_CHECK 200
#define FLECHETTE_MINE_VEL 1000
#define FLECHETTE_MINE_DAMAGE 25
#define FLECHETTE_MINE_SPLASH_DAMAGE 150
#define FLECHETTE_MINE_SPLASH_RADIUS 200

// Personal Rocket Launcher
//---------
#define ROCKET_VELOCITY 2000
#define ROCKET_DAMAGE 60
#define ROCKET_SPLASH_DAMAGE 100
#define ROCKET_SPLASH_RADIUS 160
#define ROCKET_NPC_DAMAGE_EASY 20
#define ROCKET_NPC_DAMAGE_NORMAL 40
#define ROCKET_NPC_DAMAGE_HARD 60
#define ROCKET_SIZE 3

#define ROCKET_ALT_VELOCITY (ROCKET_VELOCITY*0.5)
#define ROCKET_ALT_THINK_TIME 100

// Concussion Rifle
//---------
//primary
#define CONC_VELOCITY 3000
#define CONC_DAMAGE 20
#define CONC_NPC_SPREAD 0.7f
#define CONC_NPC_DAMAGE_EASY 10
#define CONC_NPC_DAMAGE_NORMAL 15
#define CONC_NPC_DAMAGE_HARD 20
#define CONC_SPLASH_DAMAGE 0
#define CONC_SPLASH_RADIUS 0
//alt
#define CONC_ALT_DAMAGE 5//100
#define CONC_ALT_NPC_DAMAGE_EASY 5
#define CONC_ALT_NPC_DAMAGE_MEDIUM 10
#define CONC_ALT_NPC_DAMAGE_HARD 15

// Emplaced Gun
//--------------
#define EMPLACED_VEL 5000 // very fast
#define EMPLACED_DAMAGE 50 // and very damaging
#define EMPLACED_SIZE 5 // make it easier to hit things

// ATST Main Gun
//--------------
#define ATST_MAIN_VEL 5000 //
#define ATST_MAIN_DAMAGE 40 //
#define ATST_MAIN_SIZE 3 // make it easier to hit things

// ATST Side Gun
//---------------
#define ATST_SIDE_MAIN_DAMAGE 40
#define ATST_SIDE_MAIN_VELOCITY 1500
#define ATST_SIDE_MAIN_NPC_DAMAGE_EASY 20
#define ATST_SIDE_MAIN_NPC_DAMAGE_NORMAL 30
#define ATST_SIDE_MAIN_NPC_DAMAGE_HARD 40
#define ATST_SIDE_MAIN_SIZE 4
#define ATST_SIDE_MAIN_SPLASH_DAMAGE 20 // yeah, pretty small, either zero out or make it worth having?
#define ATST_SIDE_MAIN_SPLASH_RADIUS 25 // yeah, pretty small, either zero out or make it worth having?

#define ATST_SIDE_ALT_VELOCITY 1500
#define ATST_SIDE_ALT_NPC_VELOCITY 500
#define ATST_SIDE_ALT_DAMAGE 50

#define ATST_SIDE_ROCKET_NPC_DAMAGE_EASY 50
#define ATST_SIDE_ROCKET_NPC_DAMAGE_NORMAL 75
#define ATST_SIDE_ROCKET_NPC_DAMAGE_HARD 100

#define ATST_SIDE_ALT_SPLASH_DAMAGE 25
#define ATST_SIDE_ALT_SPLASH_RADIUS 100
#define ATST_SIDE_ALT_ROCKET_SIZE 5
#define ATST_SIDE_ALT_ROCKET_SPLASH_SCALE 1.0f // scales splash for NPC's

// Stun Baton
//--------------
#define STUN_BATON_DAMAGE 20
#define STUN_BATON_ALT_DAMAGE 25
#define STUN_BATON_RANGE 25

// Laser Trip Mine
//--------------
#define LT_DAMAGE 30
#define LT_SPLASH_RAD 256.0f
#define LT_SPLASH_DAM 30

#define LT_VELOCITY 250.0f
#define LT_ALT_VELOCITY 1000.0f

#define PROX_MINE_RADIUS_CHECK 190

#define LT_SIZE 3.0f
#define LT_ALT_TIME 2000
#define LT_ACTIVATION_DELAY 1000
#define LT_DELAY_TIME 50

// Thermal Detonator
//--------------
#define TD_DAMAGE 100
#define TD_NPC_DAMAGE_CUT 0.5f // NPC thrown dets deliver only 60% of the damage that a player thrown one does
#define TD_SPLASH_RAD 200
#define TD_SPLASH_DAM 50
#define TD_VELOCITY 900
#define TD_MIN_CHARGE 0.15f
#define TD_TIME 5000
#define TD_THINK_TIME 300 // don't think too often?
#define TD_TEST_RAD (TD_SPLASH_RAD * 0.8f) // no sense in auto-blowing up if exactly on the radius edge--it would hardly do any damage
#define TD_ALT_TIME 5000

#define TD_ALT_DAMAGE 100
#define TD_ALT_SPLASH_RAD 200
#define TD_ALT_SPLASH_DAM 50
#define TD_ALT_VELOCITY 700
#define TD_ALT_MIN_CHARGE 0.15f
#define TD_ALT_TIME 5000

// Tusken Rifle Shot
//--------------
#define TUSKEN_RIFLE_VEL 3000 // fast
#define TUSKEN_RIFLE_DAMAGE_EASY 20 // damaging
#define TUSKEN_RIFLE_DAMAGE_MEDIUM 25 // very damaging
#define TUSKEN_RIFLE_DAMAGE_HARD 30 // extremely damaging
here the part you need to edit. :)
IrocJeff likes this
Link to comment

Thanks for the step by step instructions! I'm going to give this a whirl when I'm done with all my construction in Radiant.

 

While testing out my firefights and ambushes I've set up I've noticed that at close distances they are fun, but, some of the longer ones you can easily avoid the shots. I'll see if this makes it more interesting. Scripting can only do so much with the NPC's.

Link to comment

If your mod it's only a FPS shoot mod without use of saber and force, it's better you make the projectiles a lot slower, so player can have little more chances of survive. but not so slow by be unreal XD

fight only with shooting weapons it's nasty, if you get a dozen of shooting enemies around you.

Link to comment

I'm saberless/forceless along with limited weapons and items as well. I'm also not sending wave after wave of imperials at the player. Honestly, I don't have very many large, open spaces in my project to actually do that. Its mostly tighter spaces, smaller rooms, twisty hallways and so on. Since my encounters are usually less than  5 I figured it may help balance stuff out more. 

Asgarath83 likes this
Link to comment

mmm, Try to play the Deception mod, is the kind of gameplay that you desire. :) specially the level of the mines.

also, you can decompile the decemption map FOR STUDYING FINALITY about script etc.

this mod has not the SP code hack and is for JKA, but it's a FPS mod. only the final boss use  asaber and is a shooting vs saber combat. the last fight is little nasty, but youi can defeat the boss using explosive weapons. he has not the force push. :)

Link to comment
  • 9 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...