(corrected results)
I did a lot of tests in EV: Nova 1.1 on Mac OS X 10.6.5, made a lot of sprites, fired a lot of weapons at a lot of ships, and counted a lot of pixels. This has led me to determine how the proximity radius of a weapon is calculated in a variety of circumstances, to an accuracy within a pixel or two. First the results for square sprites:
Let W be the size of the weapon’s sprite in pixels, S be the size of the target ship’s sprite in pixels, P be the weapon’s ProxRadius, and D the distance at which the weapon will explode from ProxRad, measured in pixels between the centers of the ship and weapon sprites.
The weapon will explode (if it’s eligible to) when its mask physically collides with the ship’s mask, in which case it will not launch submunitions. If that does not happen, then the weapon will explode (if it’s eligible to) when it gets close enough to the ship for its proximity radius to be triggered, in which case it will launch its submunitions. Here is how close it must be:
Case 1: If S>32, then D = P+(S/3)-2
Case 2: If S≤32, then D = max(P+(S/3)-2, (S/2)+(W/2)-1)
For non-square sprites the results are rather strange. The game appears to go by the larger dimension, or perhaps the horizontal dimension as I did not test tall skinny sprites. Nor did I test when the larger dimension is less than 32 pixels. But in the cases I did test, the explosions were centered as above. However the non-square shots themselves did not terminate in the same location as the explosion appeared. The discrepancy was about half the difference between the width and height of the weapon sprite, but I did not check exactly.
It’s also worth noting that AltSprites do trigger weapons to explode, but running lights do not. Furthermore, weapon turning rates appear to use the same units as ships, namely that a value of 10 corresponds to 30º/s, although I did not test that extensively.
Edit: Fixed forumlæ. Not sure what I was thinking when I typed them up before, but probably being up all night had something to do with it. Anyway I’ve updated this post to reflect what is recorded in my tables of values in my notebook, and what I still see in-game today. Also, here is the plug-in I used for testing. Buy the weapons from any outfitter, accept the missions from any planet. The weapons are all secondary trigger, have graphics that show a circle of radius 20 at the center of a sprite of size given by the name of the weapon, and have ProxRadius shown in the weapon name. The range rings are every 10 pixels with highlights every 50 pixels. You might want to go to a sÿst where you won’t get attacked when you attack the mission ships.
ProxRadius.zip (5.94K)
Number of downloads: 2
This post has been edited by Qaanol : 16 February 2011 - 11:22 PM