performAttack and Missiles
Moderators: winston, another_commander
-
- Competent
- Posts: 63
- Joined: Fri Dec 14, 2012 9:42 am
performAttack and Missiles
Not sure if this should be in Expansion Packs, it's really more of a general script question.
I was playing around with scripting, and I created an object that would shoot ships and beacons.
When I set the target of the object to a missile, it would track the missile but wouldn't attack, no laser fire at all.
Is this behaviour by design?
I was playing around with scripting, and I created an object that would shoot ships and beacons.
When I set the target of the object to a missile, it would track the missile but wouldn't attack, no laser fire at all.
Is this behaviour by design?
- submersible
- Commodore
- Posts: 264
- Joined: Thu Nov 10, 2011 7:49 am
Re: performAttack and Missiles
Interesting - I cannot really tell you, however i noticed something earlier today playing 1.77 - enemies targeting my missiles with their missiles. Which is odd - or at least unusual and not something I had seen before.metatheurgist wrote:Not sure if this should be in Expansion Packs, it's really more of a general script question.
I was playing around with scripting, and I created an object that would shoot ships and beacons.
When I set the target of the object to a missile, it would track the missile but wouldn't attack, no laser fire at all.
Is this behaviour by design?
Povray Planets - Planet textures for your galaxy
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: performAttack and Missiles
No, I've not seen that before either - interesting!submersible wrote:... however i noticed something earlier today playing 1.77 - enemies targeting my missiles with their missiles. Which is odd - or at least unusual and not something I had seen before.
Welcome aboard, metatheurgist.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
Re: performAttack and Missiles
No, they shouldn't have anything against firing at a missile, and I've seen it happen before. (Though, it's a small fast-moving target, so they may well not be tracking it well enough to actually get a hit, so not opening fire)metatheurgist wrote:Is this behaviour by design?
- Mad Dan Eccles
- Deadly
- Posts: 196
- Joined: Tue Sep 07, 2004 8:54 pm
- Location: The Greatest City in the Ooniverse
- Contact:
Re: performAttack and Missiles
Woah. That changes things. Probably not worth having a pylon for a soft missile just in case, but when you're out of fuel and low on shields and somebody chucks a hard head at you…El Viejo wrote:No, I've not seen that before either - interesting!submersible wrote:... however i noticed something earlier today playing 1.77 - enemies targeting my missiles with their missiles. Which is odd - or at least unusual and not something I had seen before.
Master of Mayhem
"The name's derived from Object Oriented eLite so you could say "Oh! Oh! Leet!", but that might sound too much like g33k sex."
"The name's derived from Object Oriented eLite so you could say "Oh! Oh! Leet!", but that might sound too much like g33k sex."
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: performAttack and Missiles
Laser it!Mad Dan Eccles wrote:... but when you're out of fuel and low on shields and somebody chucks a hard head at you…
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
- Mad Dan Eccles
- Deadly
- Posts: 196
- Joined: Tue Sep 07, 2004 8:54 pm
- Location: The Greatest City in the Ooniverse
- Contact:
Re: performAttack and Missiles
I've managed that exactly once!
Master of Mayhem
"The name's derived from Object Oriented eLite so you could say "Oh! Oh! Leet!", but that might sound too much like g33k sex."
"The name's derived from Object Oriented eLite so you could say "Oh! Oh! Leet!", but that might sound too much like g33k sex."
- submersible
- Commodore
- Posts: 264
- Joined: Thu Nov 10, 2011 7:49 am
Re: performAttack and Missiles
Might the AI launch a missile at another missile ? Particularly if unable to laser it?cim wrote:No, they shouldn't have anything against firing at a missile, and I've seen it happen before. (Though, it's a small fast-moving target, so they may well not be tracking it well enough to actually get a hit, so not opening fire)metatheurgist wrote:Is this behaviour by design?
Povray Planets - Planet textures for your galaxy
Re: performAttack and Missiles
AIs low on health will often launch a missile at their current target. If a missile has been launched at them recently, they could certainly try to counter-missile it.
Doing it deliberately because it's a good idea? No, not yet.
Doing it deliberately because it's a good idea? No, not yet.
- Rorschachhamster
- ---- E L I T E ----
- Posts: 274
- Joined: Sun Aug 05, 2012 11:46 pm
- Contact:
Re: performAttack and Missiles
Depends. What if your missile misses the other missile and follows it...cim wrote:Doing it deliberately because it's a good idea? No, not yet.
-
- Competent
- Posts: 63
- Joined: Fri Dec 14, 2012 9:42 am
Re: performAttack and Missiles
This may be the answer. I reconfigured the object to target cargo containers and, erm, "opened" a couple of Pythons. When I flew the object into the mass of cargo it didn't start shooting until it was well into point blank range (<1 km). If it's having that much trouble locking onto stationery cargo it's probably not going to successfully target missiles. *sigh*cim wrote:No, they shouldn't have anything against firing at a missile, and I've seen it happen before. (Though, it's a small fast-moving target, so they may well not be tracking it well enough to actually get a hit, so not opening fire)
Re: performAttack and Missiles
Hmm... they should generally be getting a lock - or at least a "worth a try" - before that sort of range. I wouldn't expect them to necessarily hit the missile/cargo very often, but I'm surprised they aren't even trying. A few questions:metatheurgist wrote:This may be the answer. I reconfigured the object to target cargo containers and, erm, "opened" a couple of Pythons. When I flew the object into the mass of cargo it didn't start shooting until it was well into point blank range (<1 km). If it's having that much trouble locking onto stationery cargo it's probably not going to successfully target missiles. *sigh*
- what Oolite version?
- what is your typical frame rate? (Shift-F to display)
- have you set "accuracy" in shipdata.plist, and if so, what to?
- what are the max pitch/roll rates of the ship?
-
- Competent
- Posts: 63
- Joined: Fri Dec 14, 2012 9:42 am
Re: performAttack and Missiles
Oolite version 1.76.1
FPS 74-75
Accuracy for the object is set to 10
Max Pitch and Roll are set to 25
It does track the target object, I can see it changing orientation to face it, it just doesn't seem to shoot until it's close. I repeated the test with cargo containers today and got a better result. It started shooting cargo between 2-3 kms. I may have changed the laser setting between tests.
I have the object tethered to the top of my Cobra (via some ugly code to force its position). It's pretending to be a CIWS (close in weapons system). It's free to choose it's orientation, just not to move away. Don't know if that would affect it's aim.
FPS 74-75
Accuracy for the object is set to 10
Max Pitch and Roll are set to 25
It does track the target object, I can see it changing orientation to face it, it just doesn't seem to shoot until it's close. I repeated the test with cargo containers today and got a better result. It started shooting cargo between 2-3 kms. I may have changed the laser setting between tests.
I have the object tethered to the top of my Cobra (via some ugly code to force its position). It's pretending to be a CIWS (close in weapons system). It's free to choose it's orientation, just not to move away. Don't know if that would affect it's aim.
Re: performAttack and Missiles
This is probably the problem. Spins a full circle in a quarter of a second, but terrible for precision aim. Start at around 2 roll and 1 pitch (which is typical for a ship, so what the AI is optimised for) and then slowly increase them.metatheurgist wrote:Max Pitch and Roll are set to 25
It would probably work a bit better in 1.77, since the accuracy of 10 would then enable some additional precision aiming routines that didn't exist in 1.76, but this is probably not the main problem.metatheurgist wrote:Oolite version 1.76.1
-
- Competent
- Posts: 63
- Joined: Fri Dec 14, 2012 9:42 am
Re: performAttack and Missiles
OK. Tried pitch and roll at 1,2 and went to 5,6 increasing both by 1 each time. The range for shooting cargo is still within the 2-3 kms range, though at pitch 2 roll 3 it did take a shot at 5kms and hit. I'm waiting for a stable release before comitting to an update.