The Oolite NPC ecosystem (and other questions)

General discussion for players of Oolite.

Moderators: winston, another_commander

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 »

Disembodied wrote:
Maybe it would be worth making pirates a bit more shy of the zone around the station?
That certainly makes sense. Though, it's not just the main station they should stay clear of - there are several OXP stations you'd expect pirates to avoid (e.g. Seedy Space Bars). So I think we need a way for stations to signal their likely reactions to ships.

What do you think of this classification for stations?

Hunting: pirates and offenders will actively avoid this station. Default for any clean station with turrets, and any CLASS_POLICE or CLASS_MILITARY station. OXP examples: Sentinel Stations, Space Bars, Behemoths, Astromines.
Galcop: pirates will actively avoid, offenders will mostly try to dock elsewhere. The main station is the only one which gets this by default.
Neutral: pirates won't dock at this station, but won't actively avoid it. Other offenders might dock here. Default for unarmed clean stations with CLASS_STATION or CLASS_ROCK. OXP examples: Constores, Salvage Gangs, RRS stations, Superhubs, etc.
Pirate: pirates will dock and launch from here, other offenders may dock here, clean traders will actively avoid. Default for any (non-Thargoid) station with a bounty. OXP examples: Pirate Coves, Renegade Stations
Thargoid: pirates and traders actively avoid, only Thargoids try to dock. Default for any CLASS_THARGOID station. OXP examples: Thargoid Carrier

All of the default guesses could be overruled by shipdata, of course - but I think this gets most of the OXP ones to have similar behaviour to now. (A few will get put into "hunting" by default that should probably just be "neutral" or "galcop" - Kiotas, for instance - but that's better than the other way round, I think)

I'd rather not encourage OXPs to define their own station classes, because then other OXPs (or core ships!) won't know how to respond to them, but I can add more built-in types if there are cases I've missed
User avatar
Mauiby de Fug
---- E L I T E ----
---- E L I T E ----
Posts: 847
Joined: Tue Sep 07, 2010 2:23 pm

Re: The Oolite NPC ecosystem (and other questions)

Post by Mauiby de Fug »

Smivs wrote:
Cody wrote:
Diziet Sma wrote:
All in all, I'm really starting to look forward to the release of 1.79!
<nods>
Agreed.
These developments sound really exciting, and I'm glad that rather than the 'wish-fest' that we had a while ago with 'Oolite2' this is taking the current game and without major changes to the feel and gameplay, is adding flesh to the bones. These improvements sound like they are filling in the gaps and adding the fine details which are currently absent.
Excellent stuff :)
*Joins the chorus of nodding dogs...*
User avatar
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: The Oolite NPC ecosystem (and other questions)

Post by Tricky »

cim wrote:
Disembodied wrote:
Maybe it would be worth making pirates a bit more shy of the zone around the station?
That certainly makes sense. Though, it's not just the main station they should stay clear of - there are several OXP stations you'd expect pirates to avoid (e.g. Seedy Space Bars). So I think we need a way for stations to signal their likely reactions to ships.

What do you think of this classification for stations?

Hunting: pirates and offenders will actively avoid this station. Default for any clean station with turrets, and any CLASS_POLICE or CLASS_MILITARY station. OXP examples: Sentinel Stations, Space Bars, Behemoths, Astromines.
Galcop: pirates will actively avoid, offenders will mostly try to dock elsewhere. The main station is the only one which gets this by default.
Neutral: pirates won't dock at this station, but won't actively avoid it. Other offenders might dock here. Default for unarmed clean stations with CLASS_STATION or CLASS_ROCK. OXP examples: Constores, Salvage Gangs, RRS stations, Superhubs, etc.
Pirate: pirates will dock and launch from here, other offenders may dock here, clean traders will actively avoid. Default for any (non-Thargoid) station with a bounty. OXP examples: Pirate Coves, Renegade Stations
Thargoid: pirates and traders actively avoid, only Thargoids try to dock. Default for any CLASS_THARGOID station. OXP examples: Thargoid Carrier

All of the default guesses could be overruled by shipdata, of course - but I think this gets most of the OXP ones to have similar behaviour to now. (A few will get put into "hunting" by default that should probably just be "neutral" or "galcop" - Kiotas, for instance - but that's better than the other way round, I think)

I'd rather not encourage OXPs to define their own station classes, because then other OXPs (or core ships!) won't know how to respond to them, but I can add more built-in types if there are cases I've missed
Chaotic: Any one can dock and launch but fighting is not tolerated.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: The Oolite NPC ecosystem (and other questions)

Post by Diziet Sma »

Smivs wrote:
I'm glad that rather than the 'wish-fest' that we had a while ago with 'Oolite2' this is taking the current game and without major changes to the feel and gameplay, is adding flesh to the bones. These improvements sound like they are filling in the gaps and adding the fine details which are currently absent.
Looking back at Jens' OP in the original thread formally announcing Oolite2, it's interesting to see how many of Jens' original ideas have been or are in the process of being implemented, in some form, into Oolite..
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6885
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Re: The Oolite NPC ecosystem (and other questions)

Post by Disembodied »

cim wrote:
What do you think of this classification for stations?

Hunting: pirates and offenders will actively avoid this station. Default for any clean station with turrets, and any CLASS_POLICE or CLASS_MILITARY station. OXP examples: Sentinel Stations, Space Bars, Behemoths, Astromines.
Galcop: pirates will actively avoid, offenders will mostly try to dock elsewhere. The main station is the only one which gets this by default.
Neutral: pirates won't dock at this station, but won't actively avoid it. Other offenders might dock here. Default for unarmed clean stations with CLASS_STATION or CLASS_ROCK. OXP examples: Constores, Salvage Gangs, RRS stations, Superhubs, etc.
Pirate: pirates will dock and launch from here, other offenders may dock here, clean traders will actively avoid. Default for any (non-Thargoid) station with a bounty. OXP examples: Pirate Coves, Renegade Stations
Thargoid: pirates and traders actively avoid, only Thargoids try to dock. Default for any CLASS_THARGOID station. OXP examples: Thargoid Carrier
How about something like Restricted-<type>, where only ships of a certain defined class go to? That might let OXP makers create e.g. an isolated research station, that's closed to non-affiliated shipping.
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 »

Tricky wrote:
Chaotic: Any one can dock and launch but fighting is not tolerated.
Definitely on the "anyone can dock and launch" one.

Fighting not being tolerated is difficult to implement in this stage of the assessment, but anyone being attacked by a station or its defense ship group will get a ridiculously unfavourable odds assessment - especially if the station is armed - so "fighting is not tolerated" can be simulated by making the station AI have a sensible response.
Disembodied wrote:
How about something like Restricted-<type>, where only ships of a certain defined class go to?
Yes. It might be sufficient to have simply "Restricted", which by default all ships actively avoid, and "Private" which they won't avoid but won't dock with either. Then the ship AI (and probably station AI) can make exceptions to that by not using the default "friendlyStation" and "hostileStation" tests.
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 »

cim wrote:
Disembodied wrote:
How about something like Restricted-<type>, where only ships of a certain defined class go to?
Yes. It might be sufficient to have simply "Restricted", which by default all ships actively avoid
Ooh! I would then have a Restricted station plonked down in the middle of the main space lane, and sit back and watch the chaos! :twisted:
User avatar
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: The Oolite NPC ecosystem (and other questions)

Post by Tricky »

JazHaz wrote:
cim wrote:
Disembodied wrote:
How about something like Restricted-<type>, where only ships of a certain defined class go to?
Yes. It might be sufficient to have simply "Restricted", which by default all ships actively avoid
Ooh! I would then have a Restricted station plonked down in the middle of the main space lane, and sit back and watch the chaos! :twisted:
What, like a Death Star? Been meaning to texture that weapon (emmission maps).
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:
Towing them back as salvage is a possibility
Now it is possible with the Towbar OXP, thank you for the idea!
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 »

cim wrote:
What do you think of this classification for stations?
This is now in with the suggested amendments. One further change: "Neutral" stations positioned within the main station aegis default to "Galcop" instead, to stop smugglers who've too much bounty to feel safe going to the main station picking something like a Superhub or Casino station right next door.

Some more questions that are coming up from trying to get the whole thing to work, to do with allowing the AI to assess the player's behaviour in a way that it can do very easily for other AIs.

First one: detecting fleeing. For AI vs AI this is easy: the AI can just check if its target is in a fleeing AI state. For the player it's a lot trickier. For easy testing purposes I'm using "weapons online" as the test: if the player takes their weapons offline, they're considered to be fleeing. It won't work as it is for release, though. Options so far considered.

1) Weapons offline. Too easy to exploit by setting weapons offline, then turning it back on to attack.
1a) That, but add a 15-second warmup before you can bring weapons back online. Still a bit exploitable if you were just going to use those seconds to let your lasers cool anyway, and any longer a reactivation time is going to get seriously irritating.
1b) That, but have the game track if the player exploits it, and stop believing the player signalling surrender this way if they do. We'd have to be quite careful with the expiry time: how long before it stops being dishonourable behaviour in one encounter, and is just a separate fight? Another problem: we don't want the player to get one "free" fake-surrender against every ship/group they meet, which implies some sort of magic global honour tracking for them.

2) Explicit sending of an "I surrender" message (which they may or may not trust, of course!). Major drawback I can see is the need to implement player-to-NPC comms in the core game, find keys for it, etc. which we've not needed up to now.

3) Some sort of heuristic based on time since last shot, relative speed, facing, etc. Disadvantages: could be inefficient to calculate, and once the player has military lasers, injecting away from a fight while not firing might be surrendering or might be backing off to shoot from outside of the AI's range.

4) Cargo dumping as means of surrender. The problem is that quite a few ships which will accept a surrender (e.g. traders) don't have any interest in collecting more cargo, so it only really works for surrendering to pirates. Also, the Asp is a playable ship.
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 »

cim wrote:
First one: detecting fleeing. For AI vs AI this is easy: the AI can just check if its target is in a fleeing AI state. For the player it's a lot trickier. For easy testing purposes I'm using "weapons online" as the test: if the player takes their weapons offline, they're considered to be fleeing.
Hmmm. Not sure about this. I've never used the weapons toggle. What does it do, does it make recharges happen quicker whilst weapons are off?
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 »

JazHaz wrote:
I've never used the weapons toggle. What does it do, does it make recharges happen quicker whilst weapons are off?
All it does is disable your weapon systems. The only current benefit to it is that you won't accidentally fire them at the wrong time, e.g. while docking.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
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:
... but add a 15-second warmup before you can bring weapons back online.
I rather like that idea, but as you say, it'd probably need to be longer, which would become irksome.
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: 16081
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 »

Could the warm-up be made suitably longer, but get instantly reset if the player takes a hit?
Just seen your next post - a good idea, is that.
Last edited by Cody on Wed Aug 21, 2013 8:02 pm, edited 1 time in total.
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
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 »

Cody wrote:
cim wrote:
... but add a 15-second warmup before you can bring weapons back online.
I rather like that idea, but as you say, it'd probably need to be longer, which would become irksome.
It's just occurred to me that it wouldn't need to be longer if the period in which your weapons were warming back up was counted as "not fleeing" by the AIs (with perhaps a playerIsArmingWeapons event to warn them). Then you'd potentially get 15 seconds of incoming fire to handle and they'd know not to believe your surrender next time.

There are probably still some other disadvantages to managing it this way.
Post Reply