Disclaimer: This information is based on build 49186 and may change in future builds. Weapons, Construction arms(collectively, tools) and ammo in PA are defined in .json files. Each has it's own folder, which are located in the following areas: /PA/media/pa/ammo /PA/media/pa/tools Viewing the .json files can be difficult due to the formatting, but using a josn parser can help, such as http://jsonlint.com/, or see this thread on a tool to re-format all .json files: http://forums.uberent.com/forums/viewtopic.php?f=72&t=47529. For Unit Blueprints, see http://forums.uberent.com/forums/viewtopic.php?f=72&t=47378&p=738070. Tools Tools can be either weapons or construction definitions, and each have their own set of properties. Unit specific tool files can be found in the same folder as the unit, or there are more generic ones that are found in "PA/media/pa/tools". All tools have a tool_type value (usually in the base inherited .json files). The possible values for this are: Code: "TOOL_BuildArm" "TOOL_Weapon" Weapons Weapon files describe the characteristics of a units' weapons. Weapons also have a corresponding ammo file with projectile characteristics. The weapon tool file for the ant is shown below. Code: { "base_spec": "/pa/tools/base_shell_turret/base_shell_turret.json", "ammo_id": "/pa/units/land/tank_light_laser/tank_light_laser_ammo.json", "rate_of_fire": 1, "max_range": 100, "yaw_rate": 90, "pitch_rate": 90, "yaw_range": 180, "pitch_range": 15, "auto_attack": true } "base_spec": The filename of the inherited tool .json file. "ammo_id": The filename of the weapon's ammo file. "rate_of_fire": Shots per second "max_range": Maximum range of the weapon "yaw_rate": Rate of horizontal aiming (degrees per second?) "pitch_rate": Rate of vertical aiming (degrees per second?) "yaw_range": Range of horizontal motion, in either direction from the direction the unit is facing. "pitch_range": Range of horizontal motion, in either direction from the direction the unit is facing. "auto_attack": true/false, whether the unit attacks without an explicit command or not. "target_layers": Which layers the weapon can target: Code: "WL_Land" "WL_Water" "WL_Air" "ammo_source": Accepted values: Code: "energy" "ammo_capacity": Maximum ammo capacity. "ammo_demand": Unknown. Energy per ammo? "ammo_per_shot": How much ammunition is used per shot. "firing_arc_yaw": Unknown "firing_arc_pitch": Unknown "manual_fire": true/false. Fired by script rather than by unit? (Seen on death weapon) "arc_type": Accepted values: Code: "Both" Construction The build arm tool file is shown below. Code: { "base_spec": "/pa/tools/engineer_build_arm/engineer_build_arm.json", "construction_demand": { "energy": 1000, "metal": 10 }, "yaw_rate": 90, "pitch_rate": 90 } "base_spec": The filename of the inherited tool .json file. "construction_demand": Lists how much metal and energy is used while building "yaw_rate": Rate of horizontal aiming (degrees per second?) "pitch_rate": Rate of vertical aiming (degrees per second?)
Ammo Ammo files define the properties of weapon projectiles. They can be found inside the folder of specific units, or the generic base ammo files are in "PA/media/pa/ammo" The ammo tool file for the ant is shown below. Code: { "base_spec": "/pa/ammo/base_shell/base_shell.json", "damage": 33, "splash_damage": 0, "splash_radius": 0, "lifetime": 2, "initial_velocity": 150, "max_velocity": 150 } "ammo_type": Accepted values: Code: "AMMO_Projectile" "PBAOE" "base_spec": The filename of the inherited tool .json file. "damage": Damage per hit. "flight_type": Accepted values: Code: "Ballistic" "Seeking" "splash_damage": Outer radius splash damage, interpolated? "splash_radius": Splash Radius "lifetime": How many seconds the projectile lasts for before disappearing. "initial_velocity": Starting speed "max_velocity": Maximum speed "max_range": Maximum build range "splash_damages_allies": true/false. "turn_rate": How fast the projectile can turn. Model TODO Physics The physics field contains the following properties: "layer": TODO "radius": TODO "push_class": TODO "gravity_scalar": TODO "air_friction": TODO
Guess I can help here too. yaw_range: range of yaw motion in degrees from the weapon's default facing direction. pitch_range: same as above for pitch. firing_arc_yaw: how far off target the weapon can be. (ie a fighter does not aim a turret to fire a missile, it has a firing arc) firing_arc_pitch: same as above for pitch. arc_type: accepted values: Low, High, Both. Hope this helps.
So there is a starting velocity and a max velocity. I don't see a way to control the acceleration, though? I assume this gets controlled by "air_friction" and ??? The unit blueprints have a separate acceleration value.
None of the current Ammo files have an acceleration value, but it would almost certainly be present. Can't test though because it's not a client-side value :/
Is there a documentation of the "types" on numbers? I get it there are arc values that should be 180 or 360 maximum and non negative. Since I try to develop a validation library for all the mod files, it would be nice to add those as well. Thanks for consideration
I think setting a weapon's yaw range to 0 and the pitch range to 0 prevents the weapon from firing at all, can someone confirm this?
Is there a way to make orbital-fired aa misiles homing? Because none of my attempts at fixing the issue seem to have worked...
I am not sure how you want to implement your missile, but you can make a missile do pretty much anything with the staging system. What exactly do you want this missile to do? What problem are you running into?
I have two units, one is an orbital unit that is supposed to fire homing missiles at avengers, but the missiles aren't homing. The other is an orbital anti-air sat. that is supposed to fire homing missiles at air units, but the missiles aren't homing either. Neither of these are tactical missiles, and neither of these use the staging system at the moment.
I am pretty sure the homing missiles in this game can only hit air units when they are turning. If you look closely at fighter dogfights, the missiles can't hit aircraft going full speed.