Page 1 of 1

Missile Options OXP

Posted: Mon Dec 31, 2007 6:55 pm
by LittleBear
Moderator: Split from here.

Nice Work! C&P it. they were there for sale in the ship yard. Bought a cheapo missile and fired it at the Nav Beachon, worked fine. I've zipped "MaegilsMissiles" here:- http://www.box.net/shared/rb3agzbksc.

Posted: Mon Dec 31, 2007 8:32 pm
by Cmdr. Maegil
Thanks, but I was petty certain that it would work - I just C&P'd, then fiddled with the values... it still has to be cleaned up of several redundant keys on the shipdata.plist, though

What I meant was to playtest them to see if they (especially the LdF models) are behaving normally, of if the parameters need some tweaking to improve/degrade the performance.

(I was going to give it the less pretentious name of "missile_options.OXP"... once it's OK!)

Posted: Tue Jan 01, 2008 12:43 am
by Cmdr. Maegil
@Ahruman: Would you move this last posts to a new thread on the Expansion Pack forum?

Posted: Tue Jan 01, 2008 1:14 pm
by another_commander
This is great! I wanted to make a small OXP to test some modifications I am making, but this looks just about the right tool for the job. However, these missiles should behave mostly like the normal ones, because missile accuracy is not used for anything other than setting ptich tolerance at the moment. If what I am trying to do here works, then maybe I can put up for download a vanilla 1.70 executable with just this change applied for you to test.

Posted: Tue Jan 01, 2008 2:38 pm
by Cmdr James
That would be great, I would be happy to run some test scenarios :)

Posted: Tue Jan 01, 2008 4:41 pm
by another_commander
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

Code: Select all

EQ_MISSILE
to

Code: Select all

EQ_FDLHM3_MISSILE
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.

Posted: Wed Jan 02, 2008 10:02 am
by TGHC
Sorry to be a pain, I'm confused. (and that's quite normal)

I've downloaded Maegilsmissiles OXP, can I just use that as it is for the time being, or should wait a bit.

Posted: Wed Jan 02, 2008 10:11 am
by another_commander
Yes, you can use it, but be aware that, as it is, the FdL HM3 missile is practically ignored by the game and although you see it in the equipment list, if you buy it you just get a normal missile instead. Other than that it will work. Just install it as you normally would.

If you run the OXP with the normal 1.70 oolite.exe, the different accuracies of different missiles are not taken into account and all of theses missiles behave pretty much the same. To see different missiles behaving differently, you will need to use the executable I linked to in my previous post.

Hope this helps.

Edit: Oh, and one more thing: It may be quite tricky noticing a difference between a missile with accuracy 4 and one with accuracy 6, but you can definitely see it if you compare a normal game missile with, say, the Taranis super-duper one.

Posted: Wed Jan 02, 2008 6:06 pm
by Cmdr. Maegil
another_commander wrote:
Yes, you can use it, but be aware that, as it is, the FdL HM3 missile is practically ignored by the game and although you see it in the equipment list, if you buy it you just get a normal missile instead.
The ideawas to have the same missile, just changing its name. The same should go for the FdL XHM5.
Edit: Oh, and one more thing: It may be quite tricky noticing a difference between a missile with accuracy 4 and one with accuracy 6, but you can definitely see it if you compare a normal game missile with, say, the Taranis super-duper one.
Again, that's the point - you can find several products of similar quality, but also top- and lower-end models.

Posted: Wed Jan 02, 2008 6:16 pm
by another_commander
Cmdr. Maegil wrote:
Edit: Oh, and one more thing: It may be quite tricky noticing a difference between a missile with accuracy 4 and one with accuracy 6, but you can definitely see it if you compare a normal game missile with, say, the Taranis super-duper one.
Again, that's the point - you can find several products of similar quality, but also top- and lower-end models.
I may have been misunderstood. All I meant to say was that, if anyone tries the test executable, it would be much easier to notice differences between missiles if they compare the performance of the high end versus the low end models. Otherwise, we might have people saying "I tried it but I don't see any difference between the missiles". I was speaking more from a technical point of view, rather than commenting on the OXP itself.

Re: Missile Options OXP

Posted: Sun Dec 05, 2021 11:01 am
by Cholmondely
Wiki page now up: Maegil's Missiles