NPC flight routines upgrades?

An area for discussing new ideas and additions to Oolite.

Moderators: another_commander, winston

User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: NPC flight routines upgrades?

Post by cim »

Cody wrote: Sun Jul 17, 2022 8:14 pm
<nods> Do Thargoids have an "accuracy" thingy? I took an Adder into interstellar space once, and I seem to recall even they had trouble hitting me.
Yes. It works slightly differently for their turret laser to a conventional one. At accuracy 10 they should hit dead-centre of their target every single time even at maximum range; below that they get progressively more inaccurate.

The presence of the turret laser also changes their dogfighting priority to strictly try to stay out of the weapon arcs of their target, as they don't need to worry about lining up their own shots.
User avatar
szaumix
Deadly
Deadly
Posts: 171
Joined: Sun Apr 24, 2022 4:23 am

Re: NPC flight routines upgrades?

Post by szaumix »

I was hoping cim would show up.
Redspear wrote: Sat Jul 16, 2022 4:59 pm
And this is true in any small ship (is that what you mean by non-hauler)?
cim wrote: Sun Jul 17, 2022 7:53 pm
But in an Adder the balance may be off; try flying an Adder but 50% bigger and see what happens.
My annoyance with being unkillable began in a barebones Cobra1 -- which was, incidentally, modified to be far more boatlike (unmaneuverable). By "hauler" I did indeed mean anything bigger than the Mk3, in which I was also unkillable (and, until I heavily reduced its maneuverability, untouchable). Modifications to NPCs began in earnest in my Mk1 save not my Mk3 save though, nothing I did got me even close to danger of being killed. Vimana beam was even set to be randomly available to NPCs and I see it around, laser strength just isn't the problem. The last time I had to focus to stay alive in a non-hauler was fighting a RandomHits boss with drone missiles and a crapload of heavy escorts and I just happened to be out of injector fuel and the first couple of minutes I was attacking the wrong targets and allowing the drones to just swarm me instead of going for the mother.
cim wrote: Sun Jul 17, 2022 7:53 pm
NPCs who you aren't attacking deliberately slow down and hang back a little so that they've got an easier shot at you, rather than trying to joust with a rapidly turning target.

They may well be getting the balance of "too close so your angular velocity is too high" / "too far back to be able to land a shot precisely enough" wrong, of course - especially for a small ship like an Adder. The Adder is fast, agile, and very small: flown with the aim of avoiding fire it's a hard target!

What should happen is you focus on one which is mainly dodging, and the other six are using you as a pincushion.
Interesting. So in my quest to figure out ways to improve NPC dangerousness, I spent a lot of time watching hunter v pirate battles. To be clear on what is actually happening: group dogfights are like a pub carpark fight where a circle of onlookers gather to watch two or three weaving combatants -- and unfortunately, even the engaged dogfighters appear to be half-hearted. The motion of those that are engaged appear to be individual weaving "flicks": a quick flick after a potshot (due I think to distance) and slow to crawl and stop to re-aim again. Approaching most hunter v pirate fights is like approaching a car show: 10 still vehicles gathered around, the 'flicks' so few and far between they are almost unnoticeable when they occur, occasional beam light. The result is that attackers are most dangerous when a ship is fleeing or approaching them because no dogfighting is required, for a veteran dogfights are just a shooting gallery.

Anyway when I made this thread I was not expecting to be the only one considering NPC dogfighting skillz to be a problem :shock: which means the subroutines will stay as they are unless I solve it myself. Since I have no time to improve my wildly insufficient knowledge of the Oolite js, I'm more likely to just completely rebalance the Ooniverse so ships fly 3x as fast and lasers are 5x base strength or something *chuckle*
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6547
Joined: Wed Feb 28, 2007 7:54 am

Re: NPC flight routines upgrades?

Post by another_commander »

szaumix wrote: Mon Jul 18, 2022 1:09 am
[...] I'm more likely to just completely rebalance the Ooniverse so ships fly 3x as fast and lasers are 5x base strength or something *chuckle*
Have you already tried removing player shields altogether? Doing so would achieve two goals:
  • It would even out the play field. Currently shields are player-only, which puts NPCs at a disadvantage against the player. So, less player-centricity in your game.
  • It would introduce a very serious element of danger: any shot landing on your hull will now have the potential to damage equipment, right off the bat. If you know that the first shot might straight away take out your injectors, the second might take down the ECM and the third might scorch the naval energy unit, I am quite sure it will require some second (or third or even more) thoughts before committing to combat.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: NPC flight routines upgrades?

Post by Redspear »

another_commander wrote: Mon Jul 18, 2022 5:51 am
Have you already tried removing player shields altogether?
Or (along similar lines), NERF the recharge...

This depends upon how much you're getting hit of course: if not at all then it hardly matters, but if you're taking some fire then nerfing the base recharge rate of your ship could make quite a difference.

The pro here is that you still get shields working as intended but recovery from each hit means that (potentially) if and when you get hit a second time, you likely still haven't fully recovered from the first.

That would all be in the settings of course and an adder already has a pretty crummy recharge rate of 2.0 but I might be inclined to give 1.0 a try if I was in such a position.
User avatar
Cholmondely
Archivist
Archivist
Posts: 4977
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: NPC flight routines upgrades?

Post by Cholmondely »

another_commander wrote: Mon Jul 18, 2022 5:51 am
szaumix wrote: Mon Jul 18, 2022 1:09 am
[...] I'm more likely to just completely rebalance the Ooniverse so ships fly 3x as fast and lasers are 5x base strength or something *chuckle*
Have you already tried removing player shields altogether? Doing so would achieve two goals:
  • It would even out the play field. Currently shields are player-only, which puts NPCs at a disadvantage against the player. So, less player-centricity in your game.
  • It would introduce a very serious element of danger: any shot landing on your hull will now have the potential to damage equipment, right off the bat. If you know that the first shot might straight away take out your injectors, the second might take down the ECM and the third might scorch the naval energy unit, I am quite sure it will require some second (or third or even more) thoughts before committing to combat.
Would giving the NPC's shields also work? (N-Shields & Military Shields Ships)

Reference: Anti-Cheating OXP's - on "Cheating" wiki page
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2412
Joined: Mon May 31, 2010 11:11 pm

Re: NPC flight routines upgrades?

Post by Switeck »

cim wrote: Sun Jul 17, 2022 7:53 pm
NPCs who you aren't attacking deliberately slow down and hang back a little so that they've got an easier shot at you, rather than trying to joust with a rapidly turning target.

They may well be getting the balance of "too close so your angular velocity is too high" / "too far back to be able to land a shot precisely enough" wrong, of course - especially for a small ship like an Adder. The Adder is fast, agile, and very small: flown with the aim of avoiding fire it's a hard target!

What should happen is you focus on one which is mainly dodging, and the other six are using you as a pincushion.
I think we need to test earlier versions of Oolite, because I tested again with larger groups of ships (5+ a side in groups rather than singletons) and indeed they performed pretty poorly.

If I recall, even Oolite v1.77 was better than this...and around v1.82 was murderous by comparison.
User avatar
szaumix
Deadly
Deadly
Posts: 171
Joined: Sun Apr 24, 2022 4:23 am

Re: NPC flight routines upgrades?

Post by szaumix »

Cholmondely wrote: Mon Jul 18, 2022 11:14 am
Would giving the NPC's shields also work?
szaumix wrote: Sat Jul 16, 2022 6:42 am
this just makes them more slippery in a dogfight (harder to shoot), not more dangerous (deadly, by aim-and-fire subroutines, to my ship).
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2412
Joined: Mon May 31, 2010 11:11 pm

Re: NPC flight routines upgrades?

Post by Switeck »

Might be worth getting other opinions here, so I'm pointing to this one...

viewtopic.php?p=285183#p285183
Even escorted ships aren't that tough to take out and once the ship being escorted is destroyed the escorts break off and go looking for another ship to escort. I've done this and let the escorts go and still maintained a clean status.
The lead freighter/fighter that the escorts were supposed to guard often just putters around often not even shooting back, using very short bursts on injectors if it has them even while not being hit and/or being shot at.
User avatar
szaumix
Deadly
Deadly
Posts: 171
Joined: Sun Apr 24, 2022 4:23 am

Re: NPC flight routines upgrades?

Post by szaumix »

(Revisiting this topic because I fired up my main jameson last night and remembered why it's been months since I've touched Oolite: the AI's chase, aim-and-fire, and dogfight subroutines. To clarify, this is about the movement and aim-and-fire programming, and the fact that AI groups observably just "sit around" in a dogfight unless engaged -- and they are easily dodged even in a straight line chase -- and this can not be solved by weapon strength or ship armor/energy or speed)

Idea:
is there any reason it would it be prohibitively difficult to program a selection of AI difficulties? Like an options menu, where you select Easy Medium Hard. The current AI would could as "easy", and I'm sure there's a previous version that could count as Hard? I just (vaguely) remember years ago, the AI was a lot different. Granted I only started pulling the game apart this year, and playing by strict give-a-damn honor code for the last few. I suppose when you don't care that much you don't notice that much, so I missed a lot of things for a lot of years!

This probably would be my main suggestion for the next iteration of Oolite. If too difficult drives away new players, and too easy bores the veterans, then one size does not fit all.
User avatar
Cholmondely
Archivist
Archivist
Posts: 4977
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: NPC flight routines upgrades?

Post by Cholmondely »

szaumix wrote: Tue Nov 22, 2022 11:05 pm
(Revisiting this topic because I fired up my main jameson last night and remembered why it's been months since I've touched Oolite: the AI's chase, aim-and-fire, and dogfight subroutines. To clarify, this is about the movement and aim-and-fire programming, and the fact that AI groups observably just "sit around" in a dogfight unless engaged -- and they are easily dodged even in a straight line chase -- and this can not be solved by weapon strength or ship armor/energy or speed)

Idea:
is there any reason it would it be prohibitively difficult to program a selection of AI difficulties? Like an options menu, where you select Easy Medium Hard. The current AI would could as "easy", and I'm sure there's a previous version that could count as Hard? I just (vaguely) remember years ago, the AI was a lot different. Granted I only started pulling the game apart this year, and playing by strict give-a-damn honor code for the last few. I suppose when you don't care that much you don't notice that much, so I missed a lot of things for a lot of years!

This probably would be my main suggestion for the next iteration of Oolite. If too difficult drives away new players, and too easy bores the veterans, then one size does not fit all.
I understand your critique of the AI, but fear that our AI experts (primarily Eric Walch & cim, no?) have all been gobbled up by the Witchspace Lobster. I wonder if there might not be pressure to have an even more weakened pirate AI for the easy start?

But I'm not sure that getting the various bystanders to plunge into the fray would be all that hard.

Perhaps Factions managed it? Or perhaps the OXPs which create allies on your side do (Resistance Commander, Escort Deck, Fighters, Imperial Star Destroyer)?

There are also notes in our wiki:
Oolite PriorityAI Tutorial (for v.1.80 and later)
AI methods: scanning, targeting and attacking (for pre v.1.79, but may well still apply)

Did you try cim's Oolite v.1.80 (2013 - renowned for its nasty combat, and ameliorated for v.1.82)? It still uses the older version of the trading programmes - much less sophisticated than our current version introduced in v.1.82 - but since nobody ever truly mastered the new-fangled approach, it is probably irrelevant. Smugglers won't work, but there should be flawless versions of New Cargoes.

Did you try any of the nastier oxp ships?




And, apropos of your comments here, is there any chance of your lending a hand with our revival of the Life in the Frontier oxp?

We're adding to the oxp - we've started with bookshops and churches but now need to move on to bars (not my area of expertise). Any ideas? Any flavour text? (And this applies to anybody else who might be interested...). I've been working on it providing flavour text (Massively Locked has been doing the real work - his current version is here)
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: NPC flight routines upgrades?

Post by Redspear »

szaumix wrote: Tue Nov 22, 2022 11:05 pm
Idea:
is there any reason it would it be prohibitively difficult to program a selection of AI difficulties? Like an options menu, where you select Easy Medium Hard.
Relatively easy to do similar with non-player accuracy I believe (not quite the same I know).

An issue with the harder start is that the ship of choice is often an adder or (less frequently) a transporter, both of which are the wafer-thin mints of the default ship models.

Make them twice as thick and some of the time (most of the time?) you might not even notice but then on approach or fleeing a somewhat less elusive target the player would represent...

Or I could be wrong/irrelevant...
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2412
Joined: Mon May 31, 2010 11:11 pm

Re: NPC flight routines upgrades?

Post by Switeck »

The AI currently suffers some bugs.
It's not supposed to be this bad!

From my half-hearted tests, the problem may be groups with a 'master' ship and a bunch of escorts...not passing around attack/defend/flee commands correctly.
User avatar
szaumix
Deadly
Deadly
Posts: 171
Joined: Sun Apr 24, 2022 4:23 am

Re: NPC flight routines upgrades?

Post by szaumix »

Cholmondely wrote: Wed Nov 23, 2022 10:25 am
I understand your critique of the AI, but fear that our AI experts (primarily Eric Walch & cim, no?) have all been gobbled up by the Witchspace Lobster.
I suspect this as well, hence I figured I would propose the least labor intensive suggestion I could muster, in case there were some lurking but less than motivated developers about who could whip together some already existing legacy AI that was meaner than the present iteration. I figure we're all old men keeping alive something old and vanishingly unpopular for nostalgia's sake, and picking at it and improving it as we all have the time and inclination -- there's little space to ask anything of anyone! And our resident tireless hero pkhb always has enough projects to tinker at on his massive plate :D
Redspear wrote: Wed Nov 23, 2022 2:45 pm
Relatively easy to do similar with non-player accuracy I believe (not quite the same I know).

...

Or I could be wrong/irrelevant...
Next game, approach and watch a dogfight from a distance. Being in the dogfight, chasing and being chased (by one at a time) and dodging fire is one thing -- but observe the same scene from a distance and you'll see what I mean. The evasive maneuvers of a ship that knows you're chasing it are fine. The sitting duck model of everyone else in the "dogfight" (in name only) is not fine.
User avatar
Cholmondely
Archivist
Archivist
Posts: 4977
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: NPC flight routines upgrades?

Post by Cholmondely »

szaumix wrote: Fri Nov 25, 2022 8:46 am
I suspect this as well, hence I figured I would propose the least labor intensive suggestion I could muster, in case there were some lurking but less than motivated developers about who could whip together some already existing legacy AI that was meaner than the present iteration.
Is this relevant? (From Swarm OXP: A new variant on the Thargoid mothership and Thargons, introducing a swarming mentality. Somewhat more of a challenge than the vanilla versions)
Thargoid wrote: Wed Jan 11, 2012 7:28 pm
Galcop Military Intelligence wrote:
Urgent Notification to Civilian Commanders

Recent military intelligence and combat encounters have identified a new and potentially worrying evolution in Thargoid technology It appears that the recent appearance of space-borne "wasp-like" creatures within Galcop space (see the report by K. Wolf et al - Galcop Science Network #359-1701) has not gone unnoticed by our alien adversaries, who have also seemingly encountered them and their hive "stations".

As a result of this, a new type of Thargoid combat craft has now been sighted which has been nicknamed the Swarmer. Similar in design to their familiar octagonal motherships, these new vessels are distinguished byexternal protrusions used to carry small drone craft. These secondary vehicles seem to have replaced the conventional "Thargon" robot fighters, but if anything are more of a threat. Whilst they appear slightly weaker in individual weapon power, they are far more numerous with reports of up to 16 being released by a single mother vessel. But the most worrying aspect is that the craft appear to have taken the wasp swarming mentality, with co-ordinated attacks on individual vessels within a target fleet being reported.

One notable encounter with three of the mother vessels took all of the skill, bravery and cutting edge military technology of an entire wing of specialised Raptor anti-Thargoid destroyers to counter and repulse. Sadly this was not without losses of several of our brave heroes, leading to the decision to issue this wideband warning to civilian ships.

The increased numbers of the drone craft combined with their small size and faster speed has led to this new type of mother vessel being classification as an extreme threat to civilian and all but the most powerful of Galcop craft. We strongly suggest that discretion is the better part of valour in case of an encounter, and a wise Commander should consider using his fuel injectors rather than his weaponry to survive. However if combat is undertaken, notification to the local Galcop Intelligence directorate at the system main station should be made to assist in countering this terrible new threat.

Fleet Major J deLance.
Galcop Intelligence.

Edited to add: I also stumbled across these
*[https://bb.oolite.space/viewtopic.php?f=2&t=2619 Combat] Read the first post & Littlebear's 3rd post - another "wacky" combat scenario (2006)
*[https://bb.oolite.space/viewtopic.php?p=43123#p43123 Making aggressors more aggressive] (2007)

The one question which springs to my mind is distance. Perhaps the other combat ships were outside the scanner distance when fighting started - and that made them ignore what was going on? Could that happen - and could that be the reason? And what would happen if you then entered within their scanner distance while fighting their supposed chum?
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 466
Joined: Mon Sep 17, 2018 5:01 pm

Re: NPC flight routines upgrades?

Post by Milo »

szaumix wrote: Tue Nov 22, 2022 11:05 pm
(Revisiting this topic because I fired up my main jameson last night and remembered why it's been months since I've touched Oolite: the AI's chase, aim-and-fire, and dogfight subroutines. To clarify, this is about the movement and aim-and-fire programming, and the fact that AI groups observably just "sit around" in a dogfight unless engaged -- and they are easily dodged even in a straight line chase -- and this can not be solved by weapon strength or ship armor/energy or speed)
I have not noticed ships just sitting around in my Ooniverse, but I have a lot of OXPs that affect NPC ships' equipment, accuracy and combat AI, so I think the first thing to do here is identify a repeatable scenario that exhibits the undesirable situation. Do you observe ships "sitting around" in every dogfight, or only if it's a trader with escorts, or only if it's a fugitive or pirate convoy, or...?

Are you using any OXPs that add new ship types or affect ship spawning, equipment or AI?

For configurable difficulty, have you tried the Skilled NPCs OXP?
Post Reply