Where is the damage done by weapons defined?

Menome
Warrior Recruit
Warrior Recruit
 
Posts: 2
Joined: 14th Aug 2016

Where is the damage done by weapons defined?

Postby Menome » Sun Aug 14, 2016 5:18 pm

Wanting to get some weapon stats to use as a base for a mod. I checked the tutorial and faq thread but couldn't find anything. In the SHP files it says the Damage stat doesn't do anything and it's defined by the output bank, but I can't anything about that. How would I calculate the damage done by, say, the phasers of the Connie refit. Assuming it changes depending on the power allocated.

edit: a follow-up question, movement is measured in "Meters per frame", but PC games have variable framerates don't they? If I times it by my monitor's refresh rate will I get the m/s?

teeth_03
Order of Kahless
Order of Kahless
 
Posts: 3127
Joined: 2nd Jul 2003
Location: Somewhere in the Matrix

Re: Where is the damage done by weapons defined?

Postby teeth_03 » Mon Aug 15, 2016 5:09 am

ResourceOutputFunctionParams:Fwd Bank:NODEONLY: 4: 1.440: 8: 2.880: 1.200: 1.0: 0.75: 0.25

Look for the NODEONLY line, the 4 and the 8 indicate power used at 100 and 200 percent. The 1.440 and 2.880 indicate damage at those power levels, not sure about the other values.

The recharge rates and rate of fire for the stock weapons are defined elsewhere. The game defines all "Phasers" the same, only texture and sound effect changes, but otherwise has the same stats unless Damage output is different. Of course, I think the Old Akuka/Connie and Shakurians use something like OPhaser or RPhaser so they are treated differently.

Menome
Warrior Recruit
Warrior Recruit
 
Posts: 2
Joined: 14th Aug 2016

Re: Where is the damage done by weapons defined?

Postby Menome » Mon Aug 15, 2016 2:41 pm

Thanks. Is there anything that defines how likely a shot is to miss when fired?

Darth Raven
Order of Kahless
Order of Kahless
 
Posts: 16536
Joined: 11th Sep 2001
Location: Hawai'i

Re: Where is the damage done by weapons defined?

Postby Darth Raven » Thu Aug 25, 2016 6:22 am

Toward the bottom of the SHP file you'll see something like:
Code: Select all
######################## WEAPONS DEFINITIONS ###########################################
#
# set the primary and secondary weapons parameters.
# The names are the names of the resources that are the primary or secondary weapons
# Damage is the amount of damage done by these.
#
#   23Mar99, 11:26:  new weapons parameters format, old stuff commented out.
# New format:
#   WeaponInfo:Primary/Secondary/Heavy/Heavy2/Special:name:prefix:damage:initialVelocity:
#   linearVelocity:linearAcceleration:angularVelocity:angularAcceleration:range:coneAngle:
#    inaccuracy:red:green:blue:numAvailable:soundName:Beam/Projectile/Tractor:Any number
#   of ShieldWeapon/BrownOut/Radiation/BreakdownStress/NotBolt/Seeking/Dissipating/Bleedthrough
# Note:  the damage done by a weapon is actually the output of the bank, not the damage
# specified here.
#
# DISRUPTOR
WeaponInfo:Primary:Light Disruptors:disrupty:1.8:20000:20000:0:0:0:15000: 50:0.0:1.0:1.0:0.0:0:WEAPONS_DISRUPTOR_RAPID:beam
#
# PHOTON TORPEDOES
WeaponInfo:Secondary:Photon Torps:photon:5:4300:15000:4300:0.045:0.013:15000: 20:0.0:1.0:0.0:0.0:0:WEAPONS_PHOTON_NORMAL:Projectile:Bleedthrough:Seeking
#


The top part there has the instructions for most of the modifications you can do to your weapons. You're looking for Inaccuracy, which is set to 0. You can also add the Seeking tag to the end of it (like the photons have above) to make it seek to the target.

Under offensive systems you should have lines much like these:
Code: Select all
#+--------------------------------- Offensive Systems ---------------------------------+
#
ResourceOutputFunctionParams:Gun Turrets:LEAVESONLY:     0:   0:   0:   0:    1.0:   1.0:    0.75:    0.25
ResourceChargeRateFunctionParams:Gun Turrets:LEAVESONLY: 0:   1:   0:   1:    1.0:   0.6:    0.75:    0.25
ResourceMaxChargeFunctionParams:Gun Turrets:LEAVESONLY:  0:   1.5:   0:   1.5:    1.0:   1.0:     1.0:     1.0
#


The LEAVESONLY lines control your recharge rate for the weapons. The smaller the value in the 2nd spot there the quicker they recharge.. On this example their at 1 and 1.5

The weapon spacing are done with the following:\
Code: Select all
ResourceOutputFunctionParams:Fwd Bank:NODEONLY:40:14.200:80:18.400:1.200:1.0:0.75:0.25
ResourceChargeRateFunctionParams:Fwd Bank:NODEONLY:     0:  40:   0:  40:    1.0:   0.6:    0.75:    0.25
ResourceMaxChargeFunctionParams:Fwd Bank:NODEONLY:      0:  10:   0:  10:    1.0:   1.0:     1.0:     1.0
#


NODEONLY controls the spacing, The only reason to change these (the 40s and 10s) are if the weapons are all firing at exactly the same time, and you want a slight delay between banks firing.

Basically just backup the .shp and .atk files and have fun modifying the numbers around until you're happy. The best way to get comfortable with it is just to play with it.

I hope what I posted makes some sense lol.
( [email="raven808" [@] gmail [.] com] | My Klingon Academy Mods )

Image


Return to Modding (Ships, Sound, Systems & UI)

cron