For anyone interested in testing the OXP to its fullest, please download this executable and place it in the oolite.app folder (back up your original file before doing so):
http://terrastorage.ath.cx/Marmagka/QGi ... oolite.exe
Before anything else, just a few things to note:
1. This is NOT a development (current SVN) build. This is just vanilla 1.70 with a bit of extra code to specifically test missile behavior with variable accuracy. Do not expect any bug fixes or additions to the original 1.70 and please do not report any bugs related to this particular build, other than ones related to missile behavior, of course.
2. The above link is valid for 15 days only.
3. There is a small mistake in the original shipdata.plist and equipment.plist with regards to the FdL HM3 entry. In shipdata.plist, the roles key must be defined. Add the following below the name key:
Code: Select all
<key>roles</key>
<string>missile EQ_FDLHM3_MISSILE</string>
Also, in equipment.plist, change the line that reads
to
4. The above binary is for Windows. Mac/Linux users will have to build from the trunk source.
So , this is how it works: The valid accuracy values are from
higher than 1.0 0.0 up to and including 10.0. The accuracy is divided by 10 and the result is passed to the code that adjusts missile course.
Any values out of this range will result in course adjustment calculations being skipped and the missile will behave like the bog standard one. Any value higher than 10.0 will be clamped to 10.0 and any value lower than 0.0 will be clamped to 0.0. A value of 0.0 makes the missile behave like the standard type.
The reason accuracy has to be higher than 1.0 is that the game will set it by default to 1.0, if no accuracy value is specified in shipdata.plist or if the value is invalid for whatever reason. So, the default game missiles have an accuracy of 1.0. To keep the original behavior for the original missiles, I had to explicitly exclude the case of accuracy=1.0 from the course adjustment evaluation. It seems to be the best way to keep things simple. Nah, I think it's better the way it is now and it was not such a major change clamping missile accuracy in the range of 0.0-10.0 during entity initialization.
And finally, be aware that you can use decimal numbers for accuracy. If you want, you can specify an accuracy of 6.3, by using the key like this:
Code: Select all
<key>accuracy</key>
<real>6.3</real>
Although the OXP is using integer keys, in reality the game defines accuracy as floating point, so the above
is perfectly valid.
Which leaves us with the biggest challenge of all: Who will take on the herculean task of making icons in descriptions.plist for all these types of missiles?
Edit: I did not like the fact that an accuracy value of 0.0 would be the same as a value of 1.0 (i.e. both ignored), so I changed a few things to make the valid accuracy range 0.0 to 10.0, as one would normally expect, at the same time not affecting default missile behavior. So, if for any strange reason one would like to use a missile accuracy of 0.5, it can now be done. However,
this change is not reflected in the above linked binary. But the exe should still be good enough for testing.