Page 2 of 3

Posted: Tue Dec 01, 2009 11:10 am
by DaddyHoggy
wildstar wrote:
DaddyHoggy wrote:
But by limiting the number of missiles is just a code fix - as Kaks explained, big capitol ships can be silently or obviously re-equipped with additional missiles on the fly (a continuous resupply from the armoury or a missile supply ship - both would make excellent oxps)
right i agree. and while i do not know how much realism can be added and how accommodating the existing game code is it would be a nice AI based OXP to have larger ships have to send out for more supplies when needed after expending their larger supply of missiles or even fuel chaff and drones etc. while on (and i dont know if it even exists yet) a say SUPER STAR CRUISER could even be self sufficient while making and salvaging and scooping for some of these supplies. it would be cool to see a super mega ship launch smaller ships to go around scooping and salvaging. and it is easy for me to imagine little green dudes and dudettes cranking out missiles on an assembly line somewhere in one of the numerous areas of the mega ship.
This scenario is effectively what happens in Battlestar Galactica - or at least it's alluded to.

It could lead to interesting ways to damage/blunt the attacks of big capitol ships - they initially fire of a steady stream of missiles - then as local supplies are expended - there's a reduction in fire rate and/or no firing at all for a set period as new missiles are brought up from the armoury, and if the battle continues, rates go down or there's more down time as missiles are brought from deep storage and/or have to assembled from key components and all of these processes should be interruptible/capable of sustaining damage...

Posted: Tue Dec 01, 2009 11:30 am
by Kaks
Yep, what the crow said! :)

The code fix only potentially affect older oxps, the ones stuck using legacy scripting, which cannot resupply their missiles. All the uber ships are a quite recent addition.

Oolite already caps the player's ship at 16 missiles, mainly because it would be terribly difficult to squeeze any more missiles on any head up display, and still leave space for any panel instrument.

All capital ships are quite a recent development, and they don't quite fit with the way Oolite's engine works. And Oolite's AIs don't really know what to do when given too many missiles all at once.
With this code change, we can handle NPC missiles via javascript - which we couldn't before - and we've got a way of getting a workable solution for those uber ships.

Up to now, it would be possible to create an NPC ship with 100 missiles. However, that ship would be likely to fire 80 at the first target, then 18 at the second (the AI notices when there's only 2 missiles left, and tries to keep them in reserve), then essentially be a sitting duck.

In any case, the Oolite engine cannot handle more than 200 separate flying entities at once.(that includes ships, missiles, pods & asteroids)
We might be able increase that physical limt in the future, but that can potentially slow the game down to an unacceptable degree.

Ideally, I would have wanted to cap missiles at 16 - like originally intended & what is already the case for player ships - but I know it would have 'broken' at least 1 oxp. My thinking was that putting a cap at 32 would allow older OXPs - ones with a lot of NPC missiles - to still work as intended by the author, while allowing for the new scripting goodness.

Which makes me think I should really have asked this question to begin with:

does a 32 missile limit for NPCs break any OXP?

Posted: Tue Dec 01, 2009 11:43 am
by ClymAngus
DaddyHoggy wrote:
right i agree. and while i do not know how much realism can be added and how accommodating the existing game code is it would be a nice AI based OXP to have larger ships have to send out for more supplies when needed after expending their larger supply of missiles or even fuel chaff and drones etc. while on (and i dont know if it even exists yet) a say SUPER STAR CRUISER could even be self sufficient while making and salvaging and scooping for some of these supplies. it would be cool to see a super mega ship launch smaller ships to go around scooping and salvaging. and it is easy for me to imagine little green dudes and dudettes cranking out missiles on an assembly line somewhere in one of the numerous areas of the mega ship.

This scenario is effectively what happens in Battlestar Galactica - or at least it's alluded to.

It could lead to interesting ways to damage/blunt the attacks of big capitol ships - they initially fire of a steady stream of missiles - then as local supplies are expended - there's a reduction in fire rate and/or no firing at all for a set period as new missiles are brought up from the armoury, and if the battle continues, rates go down or there's more down time as missiles are brought from deep storage and/or have to assembled from key components and all of these processes should be interruptible/capable of sustaining damage...
That's no moon.......

Posted: Tue Dec 01, 2009 1:41 pm
by Frame
I gave the polaris destroyers 1000 missiles and it fired a stream of missiles after any hostile targets, as in there where no pause it looked like one beam being bend because these missiles where glowing :-)

While the missiles behave this way, a cap really is not necessary IMHO as it is already pretty useless by default... :-)

Posted: Tue Dec 01, 2009 6:30 pm
by Killer Wolf
" it fired a stream of missiles after any hostile targets, as in there where no pause it looked like one beam being bend because these missiles where glowing"

screengrab!!

Posted: Tue Dec 01, 2009 11:07 pm
by wildstar
Killer Wolf wrote:
" screengrab!!
i 2nd that request :D

Posted: Tue Dec 01, 2009 11:15 pm
by wildstar
DaddyHoggy wrote:
This scenario is effectively what happens in Battlestar Galactica - or at least it's alluded to.

It could lead to interesting ways to damage/blunt the attacks of big capitol ships - they initially fire of a steady stream of missiles - then as local supplies are expended - there's a reduction in fire rate and/or no firing at all for a set period as new missiles are brought up from the armoury, and if the battle continues, rates go down or there's more down time as missiles are brought from deep storage and/or have to assembled from key components and all of these processes should be interruptible/capable of sustaining damage...
:o HEY! r u like reading my mind?? i want the "readpplsmind.oxp" tooo!!!
u described it even better than i could have and even tried to... THANKS!

so is the capping which has or will be done going to prevent such a scenario from unfolding?

Posted: Tue Dec 01, 2009 11:22 pm
by DaddyHoggy
wildstar wrote:
DaddyHoggy wrote:
This scenario is effectively what happens in Battlestar Galactica - or at least it's alluded to.

It could lead to interesting ways to damage/blunt the attacks of big capitol ships - they initially fire of a steady stream of missiles - then as local supplies are expended - there's a reduction in fire rate and/or no firing at all for a set period as new missiles are brought up from the armoury, and if the battle continues, rates go down or there's more down time as missiles are brought from deep storage and/or have to assembled from key components and all of these processes should be interruptible/capable of sustaining damage...
:o HEY! r u like reading my mind?? i want the "readpplsmind.oxp" tooo!!!
u described it even better than i could have and even tried to... THANKS!

so is the capping which has or will be done going to prevent such a scenario from unfolding?
Mind reading? No - I'd be much wealthier or influential if I had that talent :wink:

And no, the new coding cap, does the exact opposite, it effectively makes all of this possible, since the oxp writer can now script when and what type of missiles the NPC ships (or indeed Player ship :shock: ) fire, rather than the "quantum randomness" that the code in 1.73.4 currently uses.

Posted: Fri Dec 04, 2009 3:38 pm
by Eric Walch
Frame wrote:
I gave the polaris destroyers 1000 missiles and it fired a stream of missiles after any hostile targets, as in there where no pause it looked like one beam being bend because these missiles where glowing :-)

While the missiles behave this way, a cap really is not necessary IMHO as it is already pretty useless by default... :-)
I agree, so I just added in rev. 2839 a new shipkey: missile_load_time. This sets the time to load a new missile in the launchtube after firing one. Default is no load time, but when defining a value for this key it effectively prevents those massive missile launches when creating a npc with many missiles.

Posted: Fri Dec 04, 2009 4:55 pm
by Frame
Killer Wolf wrote:
" it fired a stream of missiles after any hostile targets, as in there where no pause it looked like one beam being bend because these missiles where glowing"

screengrab!!
Apparently this is not default behaviour I have a faint memory of maybe having entered fireMissile into its AI behaviour.. it or maybe some tweaks to the Internal AI since then stopped it from working

tried to reproduce , but all i get is burst of something like 30 missiles... then it stops launching.. so i stopped trying to reproduce it as it takes to much time with no other goal than providing a screenie.

Posted: Fri Dec 04, 2009 6:13 pm
by Killer Wolf
tch, what a gyp :-(

Posted: Fri Dec 04, 2009 9:42 pm
by Frame
yes found it

Code: Select all

if (max_missiles > SHIPENTITY_MAX_MISSILES) max_missiles = SHIPENTITY_MAX_MISSILES;
and

Code: Select all

#define SHIPENTITY_MAX_MISSILES			32
has been introduced since then by someone
so the maximum number of missiles are 32

EDIT
Kaks wrote:

does a 32 missile limit for NPCs break any OXP?
there... :-)

Posted: Sat Dec 05, 2009 3:24 am
by Kaks
Yep, I've sneakily added that to trunk in the past couple of days as we were discussing things....

if you comment out the line that checks max_missiles

Code: Select all

//if (max_missiles > SHIPENTITY_MAX_MISSILES) max_missiles = SHIPENTITY_MAX_MISSILES;
you should see the million missiles as before...

I'm still playing around with / testing the new NPC missile stuff, that's why I haven't mentioned it yet...

Posted: Sat Dec 05, 2009 6:25 am
by Screet
Kaks wrote:
I'm still playing around with / testing the new NPC missile stuff, that's why I haven't mentioned it yet...
If it would make your tests easier, I could supply you with a defense system against those missiles aimed at you ;)

Screet

Posted: Sat Dec 05, 2009 9:46 am
by wildstar
Screet wrote:
Kaks wrote:
I'm still playing around with / testing the new NPC missile stuff, that's why I haven't mentioned it yet...
If it would make your tests easier, I could supply you with a defense system against those missiles aimed at you ;)

Screet
id love to help test them out tooo plzzz perdy plzzz hehe :D