Ammo Help

Ammo.Def Discussion Here

Moderators: Q-dad~TAG, EXP STAFF, Moderator

Ammo Help

Postby ShadowZ » 05-06-2009 01:07 PM

Here's a help file for the BHD ammo.def

JO and later have extra goodies, notably the randomizable impact damage and body-armor feature.
Code: Select all
//
///////////////////////////////////////////////////////////////////////////////
//
//   allocate      #      // Number of ammo slots to allocate in memory. Recommend Maximum of 5 (Secondary, Primary, Primary's special, Grenades, Accessory).
//
//ammo AMMO_NAME         // Maximum 15 characters.
//   bullet_mass      #      // [magic] Is always 1 or 3. 1 for bullets, 3 for mostly everything else.
//   velocity      #      // In meters per second.
//   max_age         #      // Time in seconds until this round disappears.
//   arm_age         #      // Time in seconds until this round is armed for kill zone production. (Mainly used for gun-launched grenades)
//   drag         #      // 1 = no drag, 0 = instant stop (affects velocity).
//   error         #      // Variance from direct center in degrees when fired. Can be overridden by values in weapon.def.
//   recoil         #      // Amount of recoil for ammo type (affects all players and emplaced weapons)
//   spread_count      #      // From 1 to 32. Used with the shotgun and claymore flags to determine number of projectiles launched when fired.
//   penetration      #      // Seen on the SAW, M60, and M240. Beleaved to ignore certain types of objects or pass clean through organics and AI.
//
//   bullet_radius      #      // Controls the radius of the bullet [meters x2]
//
//   impact_damage      #      // Number of hp to subtract for a direct hit.
//   impact_AI_damage   #      // Number of hp to subtract for a direct hit when fired by an AI.
//
//   kztype            #      // Generate killzone # at impact, or when fired if "flag instantkillzone" is set (See below).
//   kz_pieslice         #      // For the shotgun, knife and claymore ammos: shot/killzone spread in degrees from side to side.
//   kz_damage         #      // Basic damage for killzones.
//   kz_AI_damage      #            // Basic damage for killzones when fired by an AI.
//   kz_sound       SOUNDSET_NAME      // Sound killzone makes when it hits a person
//   kz_physics         #            // 1 = blow up and back away from killzone, 2 = blow back away from killzone, 3 = flash bang, 4 = small shove up and back.
//
//   kz_minradius      #      // Min radius for full damage.
//   kz_maxradius      #      // Damage falls off evenly between min and max. Is 0 outside max.
//
//   ai_launch          SOUNDSET_NAME    // Firing sound when fired by AIs.
//   ai_launcheffect      EFFECT_NAME      // Muzzle flash when fired by AIs.
//
//   turnrate_maxpit      #      // [degrees/sec] Maximum pitch turn rate for guidance.                     (Commanche 4)
//   turnrate_maxyaw      #      // [degrees/sec] Maximum yaw turn rate for guidance.                     (Commanche 4)
//   boresight_maxang   #      // [degrees] Max angle off boresight field of view for missile seeker.         (Commanche 4)
//   climb_angle         #      // For hellfire, angle of initial climb phase                           (Commanche 4)
//   climb_time         #      // Time to climb before searching for target                           (Commanche 4)
//   heat_det_range      #      // [meters] For stinger, heat detection range.                           (Commanche 4)
//   radar_det_range      #      // [meters] Radar detection range.                                    (Commanche 4)
//
//   frndlyTrcrID      #      // Number in items.def, use for graphic (minus 100000) The move/ai functions defined in items.def are used to guide the round.
//   foeTrcrID         #      // Number in items.def, use for graphic (minus 100000) The move/ai functions defined in items.def are used to guide the round.
//   tracerRate         #      // Tracer launched every so many TOTAL rounds fired. Can be overridden by the flag ForceTracer.
//
//   scorch_id      #      // Kind of scorch to make on terrain.(Explosives only, # 2 seems to be only one that works)
//   scar_type      #      // Kind of scar to make on objects: 0 =   none, 1 = small, 2 = large.
//
//   light_move         # # # #      // [RADIUS(m)] [r][g][b] Light source that follows round.
//   light_impact      # # # # #   // [RADIUS(m)] [r][g][b] [DURATION(sec)] Light source created on impact.
//
//   Mf_Light            ALERTRADIUS      // Adding this will cause a light source to occur with the particle effect for the Fire action. Supposedly alerts AI when they "see" this effect for a certain range.
//   secondary_effect   PARTICLE_EFFECT      // This effect that is handed off to the object hit by the round. secondary effect is in addition to the effects listed in the effects table
//   secondary_anim      #               // 1 = anim_burn, 2 = anim_burn_2. Puts organics into this mode when damaged but not killed (with a flashbang or explosion).
//
//      ============================================================================
//      flag      FLAG_NAME      // One line per flag, case sensitive. Allowed flags:
//      ============================================================================
//
//      flag      Muzzle1         // Set DCB muzzle1 flag when fired.
//      flag      Muzzle2         // Set DCB muzzle2 flag when fired.
//      flag      Silenced      // AI's can't hear weapon when firing. (Must also be in weapons.def!!!)
//      flag      NoTracers      // Won't generate tracers.
//      flag      InstantKillZone      // Generates a killzone on fire.
//      flag      LAWR         // Legacy flag. Don't use, it might go away!
//      flag      NoGravity      // Makes bullets into laser beams.
//      flag      TGrendade      // Legacy flag.
//      flag      ForceTracer      // Force tracers always on for this round (grenades, rockets and rocks MUST have this flag or they will be invisible!).
//      flag      Shotgun            // Used with the kz_pieslice and spread_count.
//      flag      Detonatesatchels   // Detonates the satchel charges the owner has placed
//      flag      NoOItems         // Do not check the killzone against the oitems list (organics)
//      flag      NoMItems      // Do not check the killzone against the mitems list (vehicles, emplaced weapons)
//      flag      NoDItems      // Do not check the killzone against the ditems list (buildings, trees, parked vehicles)
//      flag      UseOwnMove      // Ignores the regular round move function
//      flag      NoAge         // Ignore the age, never die until you detonate use with ownmove function!!!
//
//   ===============
//   Kill Zone Types
//   ===============
//
//   kztype         rounds_kz_null
//   kztype         rounds_kz_Knife
//   kztype         rounds_kz_Bite
//   kztype         rounds_kz_Standard
//   kztype         rounds_kz_Medic
//   kztype         rounds_kz_C4         // same as bullet, but hits tree this is a killzone radius not hard coded system
//   kztype         rounds_kz_Bullets      // bullets that pass through foliage.
//   kztype         rounds_kz_Slash         // damages only target if availble, damage only infront of owner.
//   kztype         rounds_kz_RadiusBlast      // same as a standard killzone, but the killzone radius will expand to the radius of the owner (lets a building blow up big).
//
//   effects_table
//      =============================================================================
//      EFFECT_ID   PARTICLE_ID         SOUNDSET         AUDIBLERADIUS
//      =============================================================================
//      move      none            none            0   // particle effect during movement
//      obj         none            IMP_BULLET_DIRT      15
//      dirt      Effect_PistolDirt   IMP_BULLET_DIRT      15
//      grass      Effect_PistolGrass   imp_bullet_grass   15
//      snow      Effect_PistolSnow   IMP_BULLET_DIRT      1
//      cement      Effect_PistolDirt   IMP_BULLET_DIRT      15
//      packeddirt   Effect_PistolDirt   IMP_BULLET_DIRT      15
//      water      Effect_PistolWater   imp_bullet_water   5
//      railroad   Effect_PistolMetal   imp_bullet_metal   15
//      mud         Effect_PistolDirt   imp_bullet_mud      15
//      ice         Effect_PistolSnow   imp_bullet_mud      15
//      sand      Effect_PistolSand   IMP_BULLET_SAND      15
//      quicksand   Effect_PistolSand   IMP_BULLET_SAND      15
//      stone      Effect_PistolStone   imp_bullet_rock      15
//      wood      Effect_PistolDirt   IMP_BULLET_WOOD      5
//      metal      Effect_PistolMetal   imp_bullet_metal   15
//      glass      Effect_PistolGlass   imp_glass         5
//      cloth      Effect_PistolDirt   IMP_BULLET_CLOTH   3
//      foliage      Effect_PistolGrass   IMP_BULLET_FOLIAGE   3
//      hmetal      Effect_PistolMetal   imp_bullet_armor   15
//      flesh      Effect_PistolBody   imp_bullet_flesh   3
//      player      none            imp_bullet_flesh   10   // "internal" player impact sounds
//      zip         none            WSH_BULLET_BY      10   // "close" calls w/ rounds
//   end
//end
///////////////////////////////////////////////////////////////////////////////

Some JO goodies:
Code: Select all
///////////////////////////////////////////////////////////////////////////////
/////JO and Later Ammo Properties//////
///////////////////////////////////////
//   Min_stable_velocity   #   //When the projectile drops below this velocity, it will apply tumble error and make the round go in a random direction controled by the tumble error

//   tumble_error      #   //Maximum Error factor to which the bullet is pushed down once it is below the min_stable_velocity, Note that this value should be low,below .1 otherwise the projectile will go in all directions

//   drag            #   //Drag Coefficient, 1 for No drag, 0 for instant stop, 1 > drag > 0.

//   min_damage         #   //Minimum Impact Damage to be given

//   max_damage         #   //Maximum Impact Damage to be given, Actual damage given is in between Min and Max values

//   recoil   P C S      //Recoil values for Prone, Crouched, and Standing

//   penetration_impact   #   //Unknown

//   penetration_kz      #   //Unknown

//   weight_in_grains   #   //Weight of the projectile, use real-world data

//   armor_density   FMJ AP SP   //Determines armor impact reduction values (Will Reduce the impact damage by ## specified), FMJ AP SP pertain to bullet types that can be selected in the armory (JO Only, DFx and DFx2 use FMJ only)

//   tracer_type      Friendly   Foe      //Tracer item's ID to be used

//   Flag   ClipWaterFX      //Special effects (Such as smoke) will not be activated once underwater

//   Flag   NoGravity      //Ignores Gravity, Flag is overrided when Round falls below Min_Stable_Velocity

//   Flag   ClipWater      //Round will not go below water

//   Flag   Priority      //Unkown, Assumed to prevent tracer effect from being clipped per performace optimization (Used on Hange grenades, Mortors)

//   Flag   DesignateTarget      //Used by the Artillery Designator, Friendly artillery and mortors will home to the lased target
///////////////////////////////////////////////////////////////////////////////
Last edited by ShadowZ on 10-11-2009 02:25 PM, edited 4 times in total.
ShadowZ
Member
 
Posts: 63
Joined: 05-05-2009 08:26 PM
Location: Texas, USA

Re: Ammo Help

Postby luke_nadewalker » 05-06-2009 10:38 PM

ShadowZ wrote:drag # Value subtracted from initial velocity every meter (Linear equation)


not quite
drag is the drag coefficient of the round

all values should be less then 1 , as 1 reperesents perfect aerodynamics

so the lower the value the faster it will slow down and drop at distance
Image
luke_nadewalker
Senior Member
 
Posts: 166
Joined: 04-20-2006 01:53 PM

Postby ShadowZ » 05-07-2009 12:14 AM

Ahhh! thanks! That makes more sense now. :D
ShadowZ
Member
 
Posts: 63
Joined: 05-05-2009 08:26 PM
Location: Texas, USA

Postby ShadowZ » 12-08-2010 06:31 PM

Some important updates to the Ammo.Def concerning the JO ballistics:

weight has nothing to do with the flight dynamics, it instead determines the impact damage in relation to velocity. Lower velocity = less damage.

To achieve the same velocity and ranges in-game as it would be in the real-world, the drag coefficient should typically be set a bit higher than the real-world ballistics.

For you die-hard "get-it-100%-real" coders, you have to understand that ballistics is not yet an exact science. Many ballistic calculators that are available to the public have different meanings behind the term "ballistic coefficient."

Best advice: Just pick a calculator and stick with it. Try to match the muzzle velocity of your weapon to its real-world counterpart that is using the same ammo you have.
ShadowZ
Member
 
Posts: 63
Joined: 05-05-2009 08:26 PM
Location: Texas, USA


Return to Ammo.def

Who is online

Users browsing this forum: No registered users and 1 guest

cron