Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

The Oolite NPC ecosystem (and other questions)

General discussion for players of Oolite.

Moderators: another_commander, winston

User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: The Oolite NPC ecosystem (and other questions)

Post by Thargoid »

Suddenly I feel so victimised :twisted: :D
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: The Oolite NPC ecosystem (and other questions)

Post by cim »

Right, back with more questions...

I've been putting the finishing touches on the ecosystem changes: all the roles appear to be working well. In the course of this, while I was testing the "witchpoint patrol" AI used by Viper Interceptor wings in rich systems targeted by pirate raiders from nearby systems, an Adder smuggler jumped in. Ten Viper Interceptors immediately went for it ... its meager remaining fuel from the jump ran out ... it kept running ... and the entire police fleet managed to consistently miss it for several minutes.

A bit more testing revealed two reasons. The first was a bug in the pursuit speed selector, but even with that fixed: ships running away, with the traditional non-freighter profile (i.e. very flat Y-axis compared to their size) are really difficult for the AI to hit. No longer quite so much that a single decoy Adder can draw two whole patrol wings hundreds of kilometres off station, but still quite tricky.

Image

Here's a picture of an NPC Cobra III, approximately 5km ahead. That's a pretty easy shot for a player - since it's running, not dodging - even without fancy stuff like Scanner Targeting Enhancement or Target Reticle Sensitive. The NPC AI will probably miss every single time: in 1.77, potentially even at maximised accuracy, due to a bug I'm working on fixing, but even with that fix it will need accuracy >= 7.5 (i.e. nonexistent without OXPs) to hit a fleeing target semi-reliably at that distance. (And the Cobra III is fairly big!). This is because, by default, the NPCs consider their aim "perfect" if it's within 4m per km - and the centre to edge distance of a Cobra III is not large at that orientation, so they'll miss but think they're on target at any range greater than about 4km...

As a result of this, NPC vs NPC fights often take absolutely ages to resolve, because even with overwhelming numeric superiority, they are rarely able to finish a damaged enemy cleanly. Then the player can join in and wipe out one entire side of the fight within a couple of minutes.

What I would like to do is improve the combat aim tracking, to perhaps 2m per km for an accuracy 0 ship, keeping the current 4m per km for accuracy -5, and improving it a little more for accuracy +4.9. This obviously makes attackers much less likely to miss, so some compensation is needed to keep the difficulty balanced. I think there are two areas this can be done in:
1) Downgrade a lot of the lighter ships to pulse lasers. The beam laser is a really big step up in damage output (5x, compared with the ~2x in the original Elite), and a whole pack of them can mean instant death even for a tough ship if they have good aim ... but most pirate ships currently have beam lasers.
2) Pirates now accept dropping goods and surrendering more easily. This means that dying to pirate attacks is easier to avoid in the early game (well, and once you have your ship equipped, too). Similarly there are more ways to avoid a fight with them - follow a bounty hunter in, and most pirate groups will be too busy avoiding the hunter to pay attention to you, for example.

There's an issue here with OXP ships being very likely to have beam lasers, and perhaps using the old "not much quarter" pirate AI, of course: the core game would be possible to balance by playtesting, but many ship OXPs would probably have another jump in power as they did between 1.76 and 1.77.

Thoughts?
User avatar
JazHaz
---- E L I T E ----
---- E L I T E ----
Posts: 2991
Joined: Tue Sep 22, 2009 11:07 am
Location: Enfield, Middlesex
Contact:

Re: The Oolite NPC ecosystem (and other questions)

Post by JazHaz »

One thought is that if you improve the AI aim, you could make the game a lot harder than it is already for the noob player. The difficulty already went up a notch with the release of 1.77...
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: The Oolite NPC ecosystem (and other questions)

Post by cim »

Difficulty for new players is my major concern too, and I'd certainly want Corporate and Democracy systems to be (at worst, on an unlucky day) no more dangerous than they are now.

That said, in most other space games the early game difficulty curve survives "the NPCs can kill hit you if you fly straight and level when they're close on your six". Having the NPCs not only be worse shots than a skilled human player (fair enough!) but probably worse shots than most beginners seems the wrong solution to game balance, because it means there's nowhere up to go to make the more dangerous systems actually be more dangerous (other than adding ridiculous numbers of ships, which kills the frame rate more than the player)
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: The Oolite NPC ecosystem (and other questions)

Post by Commander McLane »

cim wrote:
This is because, by default, the NPCs consider their aim "perfect" if it's within 4m per km - and the centre to edge distance of a Cobra III is not large at that orientation, so they'll miss but think they're on target at any range greater than about 4km...

As a result of this, NPC vs NPC fights often take absolutely ages to resolve, because even with overwhelming numeric superiority, they are rarely able to finish a damaged enemy cleanly. Then the player can join in and wipe out one entire side of the fight within a couple of minutes.
I've witnessed many NPC vs NPC fights which took forever because of this. Thanks for revealing the reason. :D
cim wrote:
Thoughts?
Perhaps there's another way to deal with this. The player gets feedback (for instance through the laser sound) whether they hit or missed. So, if I think that I'm on target but actually am not, I'm notified of this with my shot, and can adjust my aim for my second shot.

Isn't the same possible for NPCs? The AI should evaluate whether it actually hit or not for each shot (in fact the engine already does, because we have the shipAttackedOther event handler), and re-aim if it missed, even if the shot arrived inside the 4m-per-km-radius. Thus it would by trial and error finally aim for a point inside the profile of its target.

That wouldn't be as radical a change as the ones you were pondering, with less impact for the player, because the whole trial-and-error process would need to start all over again after each evasive movement of the player. Only when fleeing in a straight line without rolling the chances to be hit would approach 1 after time.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: The Oolite NPC ecosystem (and other questions)

Post by cim »

Commander McLane wrote:
That wouldn't be as radical a change as the ones you were pondering, with less impact for the player, because the whole trial-and-error process would need to start all over again after each evasive movement of the player. Only when fleeing in a straight line without rolling the chances to be hit would approach 1 after time.
Definitely worth trying. The whole infrastructure is already there to do it, in fact: misses over hits is already tracked by the AI and used (accuracy >= 0) to tighten the aim circle. It just very quickly runs into the limit here on how small a turning move can be, so doesn't help.
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: The Oolite NPC ecosystem (and other questions)

Post by Norby »

I think to fix the aim of the AI is important. There are two case which should be investigate separatedly: playing with OXPs and with almost strict mode.

With OXPs I do not fear from the installed strong ships due to the player can install offsetting OXPs also (similar with my [wiki]HardShips[/wiki]) or change some settings by hand to balance it, or ask in the forum if changes needed.

To balance the core game is harder but it is possible and worth to get the fixed aim.
I do not support the laser downgrade, pirates with pulse laser is not so realistic.

Goods dropping are good due to pointless and risky to try to kill a clean ship without cargo, I do not know why pirates do it at all. A pirate should send a message to clarify if you drop it then can leave anytime. An OXP equipment can do auto drop if the last energy bank touched - the auto eject saved me many times so this will be useful also. Pirates should be ignore clean ships with zero or small cargo capacity.

Injectors are cheap and defend the cautious trader if do not make long jumps or go to the sun for refuel. NPCs should use it a bit more and earlier to escape if the aim fixed.

Defending the early game also good. If the best governments are enough safe then a weak clean trader can not disturbed by the better aim and others should be disturbed. ;)

By the way: why must destroy the derelict ship to get the bounty and not get right when the pilot ejected?
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8501
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Re: The Oolite NPC ecosystem (and other questions)

Post by DaddyHoggy »

Norby wrote:
I think to fix the aim of the AI is important. There are two case which should be investigate separatedly: playing with OXPs and with almost strict mode.

With OXPs I do not fear from the installed strong ships due to the player can install offsetting OXPs also (similar with my [wiki]HardShips[/wiki]) or change some settings by hand to balance it, or ask in the forum if changes needed.

To balance the core game is harder but it is possible and worth to get the fixed aim.
I do not support the laser downgrade, pirates with pulse laser is not so realistic.

Goods dropping are good due to pointless and risky to try to kill a clean ship without cargo, I do not know why pirates do it at all. A pirate should send a message to clarify if you drop it then can leave anytime. An OXP equipment can do auto drop if the last energy bank touched - the auto eject saved me many times so this will be useful also. Pirates should be ignore clean ships with zero or small cargo capacity.

Injectors are cheap and defend the cautious trader if do not make long jumps or go to the sun for refuel. NPCs should use it a bit more and earlier to escape if the aim fixed.

Defending the early game also good. If the best governments are enough safe then a weak clean trader can not disturbed by the better aim and others should be disturbed. ;)

By the way: why must destroy the derelict ship to get the bounty and not get right when the pilot ejected?
As somebody who worked on tracking helicopters to see how easy they are to shoot down with small and medium calibre weaponry and can confirm that even good gunners will have trouble getting a bead on a good helo pilot who is "jinking" lots - straight and flat-out level flight is, as you'd expect, less of a problem for a good gunner - so I don't think it's so bad that ships are actually difficult to hit, especially low profile ones, if the pilot is ducking and weaving, the AI is not so far off reality!

Yes dropping cargo and getting a pirate to break off is a good behaviour to have - but pirates don't know if you're carrying cargo or not - so they can't not attack an empty ship - in RL(tm) - vans that carry the "no tools are left in this vehicle overnight" - still get broken into, overnight.

There are so very good trade routes in "safe" systems within a 7ly jump of Lave, I think they should be heavily protected by Police - perhaps artificially so, so newbies can trade in relative safety - but leaving those safe systems should come as a noticeable step change - a shock to the pre-emptively cocky and over confident pilot.

The bounty is attached to the ship not the pilot, bounties are paid on destroyed ships - simple, but effective.
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Tichy
---- E L I T E ----
---- E L I T E ----
Posts: 345
Joined: Wed Jul 11, 2012 5:48 pm

Re: The Oolite NPC ecosystem (and other questions)

Post by Tichy »

Norby wrote:
Goods dropping are good due to pointless and risky to try to kill a clean ship without cargo, I do not know why pirates do it at all. A pirate should send a message to clarify if you drop it then can leave anytime.
I think that a pirate could think that a small fighter ship like the asp, or other similar ships with very small or no cargo space, is a bounty huter and see it as a threat. If the pirate is alone, he might prefer to run away, but if it's in a group, he could decide to attack the bounty hunter. A hunter is a danger to the pirate gangs, so the attack could be seen as a form of defense.
(Or, maybe, a single pirate could call the others to do a group attack.)

Otherwise, I fear that a player with a ship like the asp, or fer-de-lance, could find the game boring... because all the pirates tries to avoid him.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: The Oolite NPC ecosystem (and other questions)

Post by Smivs »

DaddyHoggy wrote:
There are so very good trade routes in "safe" systems within a 7ly jump of Lave, I think they should be heavily protected by Police - perhaps artificially so, so newbies can trade in relative safety - but leaving those safe systems should come as a noticeable step change - a shock to the pre-emptively cocky and over confident pilot.
This sounds very sensible to me.
On a general note, I think the NPC aim probably should be improved - I too wondered about those interminable NPC dogfights.
As for causing ship OXPs to need updating, well, I'm getting used to doing that :wink: :lol:
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: The Oolite NPC ecosystem (and other questions)

Post by cim »

Norby wrote:
I do not support the laser downgrade, pirates with pulse laser is not so realistic.
Realism ... needs to be careful. A typical pirate pack of 4 lightly armed ships could at current prices become a pirate pack of 3 ships fully loaded with shield boosters, military lasers, hardened missiles, and so on, and still have plenty of money to spare. Similarly a trader group could do the same by selling one escort ship.

I tend to view the situation as ships actually being very cheap - a few hundred to a few thousand credits - so equipment upgrades cost a significant fraction of the ship price, and are not obtained lightly. The ship prices actually being what they are to the player (who is the only pilot who needs to directly care about them) is a necessary evil for game balance.

An upgrade from pulse to beam laser then costs possibly more than the ship did for a light fighter like a Sidewinder or a Mamba - perhaps better to buy another ship instead. Similarly for injectors, or ECM (ECM especially: you don't need that on every ship so long as the ones that have it cover the ones which don't).
Norby wrote:
Goods dropping are good due to pointless and risky to try to kill a clean ship without cargo, I do not know why pirates do it at all. A pirate should send a message to clarify if you drop it then can leave anytime. [...] Pirates should be ignore clean ships with zero or small cargo capacity.
All of these are already in the new pirate AI: ships without cargo are ignored, cargo demands are made explicit and work, pirates won't attack a group they don't outnumber. NPC traders will surrender without a fight if they're badly outnumbered.
Norby wrote:
By the way: why must destroy the derelict ship to get the bounty and not get right when the pilot ejected?
For an in-universe explanation, try capturing the pilot but not destroying the ship in the Constrictor mission. (Here's a save file just before mission start)

Out of universe, I think it's only worth making that change if there are things to do with derelict ships other than blow them up. Towing them back as salvage is a possibility, as is capturing them and bringing them back online, but those involve quite substantial changes (especially if the player can capture ships!)
DaddyHoggy wrote:
As somebody who worked on tracking helicopters to see how easy they are to shoot down with small and medium calibre weaponry and can confirm that even good gunners will have trouble getting a bead on a good helo pilot who is "jinking" lots - straight and flat-out level flight is, as you'd expect, less of a problem for a good gunner - so I don't think it's so bad that ships are actually difficult to hit, especially low profile ones, if the pilot is ducking and weaving, the AI is not so far off reality!
Oh, certainly, if you try to dodge it'd be nice if it worked - but dodging only comes in for NPCs at accuracy >= 5 (i.e. out of core game bounds) and for the player at the moment dodging is actually a good way to get shot! In a Cobra III (or most of the smaller wedge-fighters) if you pitch up you're actually increasing your target cross-section relative to a pursuer, and furthermore you're moving your angular position outside the 40/10000 zone so they will then adjust their aim and might hit you.

I don't think this change will make them much better against dodging targets - anything making serious attempts to dodge should either have an angular speed much greater than 40/10000 anyway, or be at sufficient range that 10/10000 isn't likely to get a hit either.
DaddyHoggy wrote:
There are so very good trade routes in "safe" systems within a 7ly jump of Lave, I think they should be heavily protected by Police - perhaps artificially so, so newbies can trade in relative safety - but leaving those safe systems should come as a noticeable step change - a shock to the pre-emptively cocky and over confident pilot.
In the current experimental setup, Leesti is naturally very safe: as a high-tech corporate state it doesn't have many pilots, and it can afford Interceptors for anti-piracy measures. It's (just!) too far from Riedquat for raiders, and it doesn't get many from Orerve.

Diso is a little less safe - raiders from Riedquat do occasionally attack its shipping lanes - but it's used as a base for bounty hunters heading into Riedquat, and it has plenty of police patrols even without Interceptors, so it's still pretty clear.
Tichy wrote:
If the pirate is alone, he might prefer to run away, but if it's in a group, he could decide to attack the bounty hunter.
At the moment I have three types of pirates:
- independents (who always flee from bounty hunters if it's practical, though they'll defend themselves if attacked)
- gangs (who will avoid bounty hunters unless they have an overwhelming force advantage, and then preemptively attack)
- thugs (who actively seek out bounty hunters and destroy them)

I haven't yet got as far as determining whether the player should be treated as a trader or a bounty hunter at a particular moment.
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6881
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Re: The Oolite NPC ecosystem (and other questions)

Post by Disembodied »

A couple of ideas for consideration:

1) New equipment (or at least a refinement of existing equipment): the in-game explanation is that it's a tweak to the scanner which measures, or at least estimates, a ship's mass and can make a good guess, for common ship-types anyway, of how much cargo there is on board. This is of primary use for pirates, so it's not something that's on offer in main stations. Perhaps there could be a mission where a player could get it, though. Anyway, the main function of this is to allow pirates to ignore ships with little or no cargo in them - so they won't (or will be much less likely to) harass a player who's running empty.

Now, as this stands, there is an obvious exploit for bounty hunters, who usually fill their holds from what they take from pirates. So an additional check would be, is the ship (principally the player, here) Harmless or Mostly Harmless? If so, they are unlikely to be a bounty hunter, and can be ignored by the pirates as probably not worth the bother.

Basically, this is a way to allow a player to survive a pirate attack by dropping cargo if they have to, even if it means losing nearly all their money. They can then take a few parcel deliveries more-or-less safely to get enough cash to start trading again.


2) Give hostile ships the option to give up a pursuit. The example of two patrol wings chasing an Adder half-way across the system is a good one; similarly, a flock of pirates shouldn't really want to get drawn too far from their hunting grounds for the sake of a single (and possibly lightly loaded) Cobra III who's refusing to co-operate. Maybe every so often (60 seconds? Some other number?) the pirate/police/hunter could make a check and decide whether the pursuit was worthwhile (a pack or wing would need to make a single decision). This could be based on how long the pursuit has gone on for, how hungry the pursuer is (how much cargo the pirate has on board/how much bounty the target is carrying), and how much damage the pursued ship has taken (increasing the hunger) or has dealt out (reducing it).


These changes might allow pirates, and hostile ships in general (Thargoids excepted), to behave a bit more intelligently, while making life a little easier for new players.
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: The Oolite NPC ecosystem (and other questions)

Post by Norby »

cim wrote:
Realism ... needs to be careful.
I agree and I suggest to avoid making independent pirates with pulse laser. In a large gang the small escorts maybe imaginable with weak lasers, in this case please make separated definition to the escort variants and leave the original ships with beam laser also in the game.
cim wrote:
All of these are already in the new pirate AI: ships without cargo are ignored, cargo demands are made explicit and work, pirates won't attack a group they don't outnumber. NPC traders will surrender without a fight if they're badly outnumbered.
Well done, you are pretty fast! :)
cim wrote:
Towing them back as salvage is a possibility, as is capturing them
Capturing a nearly destroyed ship is not a good idea: based on the vehicles of the planet Earth the fixing cost will be more than a working second-hand one, and any light security (ignition key) can prevent the instant usage. But gain salvage is a very good idea, similar with the asteroid mining: ship-mining should be a well payed work!
cim wrote:
40/10000
Reducing this constant sounds like a quick and good fix.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16063
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: The Oolite NPC ecosystem (and other questions)

Post by Cody »

cim wrote:
... thugs (who actively seek out bounty hunters and destroy them)...
Oi! Who are you calling a thug? Moi?
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!
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16063
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: The Oolite NPC ecosystem (and other questions)

Post by Cody »

cim wrote:
... determining whether the player should be treated as a trader or a bounty hunter at a particular moment.
If the player instigates an attack (lands the first hit?) on a pirate, then the player should be treated as a bounty-hunter.
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!
Post Reply