Page 12 of 20

Re: The Oolite NPC ecosystem (and other questions)

Posted: Thu Aug 15, 2013 5:35 pm
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

Re: The Oolite NPC ecosystem (and other questions)

Posted: Thu Aug 15, 2013 11:37 pm
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...*

Re: The Oolite NPC ecosystem (and other questions)

Posted: Fri Aug 16, 2013 12:00 am
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.

Re: The Oolite NPC ecosystem (and other questions)

Posted: Fri Aug 16, 2013 4:57 am
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..

Re: The Oolite NPC ecosystem (and other questions)

Posted: Fri Aug 16, 2013 8:24 am
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.

Re: The Oolite NPC ecosystem (and other questions)

Posted: Fri Aug 16, 2013 6:06 pm
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.

Re: The Oolite NPC ecosystem (and other questions)

Posted: Fri Aug 16, 2013 10:08 pm
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:

Re: The Oolite NPC ecosystem (and other questions)

Posted: Sat Aug 17, 2013 6:11 pm
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).

Re: The Oolite NPC ecosystem (and other questions)

Posted: Sat Aug 17, 2013 6:29 pm
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!

Re: The Oolite NPC ecosystem (and other questions)

Posted: Wed Aug 21, 2013 6:48 pm
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.

Re: The Oolite NPC ecosystem (and other questions)

Posted: Wed Aug 21, 2013 7:04 pm
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?

Re: The Oolite NPC ecosystem (and other questions)

Posted: Wed Aug 21, 2013 7:14 pm
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.

Re: The Oolite NPC ecosystem (and other questions)

Posted: Wed Aug 21, 2013 7:39 pm
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.

Re: The Oolite NPC ecosystem (and other questions)

Posted: Wed Aug 21, 2013 7:57 pm
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.

Re: The Oolite NPC ecosystem (and other questions)

Posted: Wed Aug 21, 2013 7:58 pm
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.