Page 1 of 3
Player reputations and AI
Posted: Wed Jun 30, 2010 12:36 pm
by Disembodied
I've been thinking about AI behaviour and I was wondering if the following suggestion might be useful/practicable for a future release:
There are essentially three "factions" in the game: the Co-operative, the Offenders/Fugitives and the Thargoids. The Thargoids we can ignore for just now as they're not a faction which the player can join. However, the player can be either Clean, and therefore at least technically speaking a member of the Co-operative, or the player can have a criminal rating, which puts them among the Offenders.
At the moment, though, even if a player has a whopping great bounty on their head, they'll still be attacked by any pirate ships they run in to. There is no reason why this shouldn't happen sometimes: low types often fall to fighting among themselves.
But I think it could be more interesting, and would make NPC behaviour seem more intelligent, as well as making a life of crime more practical (especially if combined with the ability to save the game anywhere) if there was a chance that Offender NPCs would – if unprovoked – leave Offender players alone.
If players were assigned a reputation, which for convenience I'll call "BAD REP", based on a combination of their level of bounty and their kill count, this could be used to calculate the chances of being attacked by pirates (and by bounty hunters and police, too). A Poor player with a bounty of, say, 15, would be more likely to be attacked by pirates than a Dangerous player with a bounty of 5. This could be modified by a variable based on the number of kills made in a particular system, with the variable being dropped substantially whenever the player makes a witchjump. The more kills made in one system, the higher the Bad Rep gets and the less chance of being attacked by pirates. Jump out, though, and your Bad Rep will quickly sink back to its "true" level. So if there was a pirate base in a system, a player with a decent criminal reputation could fly up to it and probably not get attacked by any of the pirates hanging about round there. If some pirates did attack, the player would only have to shoot a few of them – boosting the in-system kill variable, and boosting their Bad Rep in that system – before the rest got the message and left the player alone. Even a Clean player, if they've spent a lot of time slaughtering pirates in one system, might start to acquire enough of a Bad Rep for some pirates to think twice before attacking them.
If the game can treat players and NPCs as members of factions, then it might make things like friendly-fire incidents easier to cope with. This could be done by using the player's Bad Rep. A Clean player hitting a Clean NPC wouldn't immediately trigger a hostile response: it would just increase the player's Bad Rep by a point or two (or several – I haven't worked out what sizes these variables need to be) and maybe trigger some abuse on the comms. A hostile response wouldn't be triggered until the Bad Rep reached a critical threshold. This should happen fairly quickly, of course: it shouldn't take long for a merchant to realise that a Clean player is attacking them and hasn't just hit them by accident. But if should be OK for the player to scorch someone's paintwork, once, by accident, without everyone getting hot and heavy on them. Other factions, particularly the Thargoids, could be told to ignore incoming fire from members of the same faction, avoiding any green-on-green unpleasantness.
Thinking about it, one way to calculate the player's Bad Rep might be something like
(Bounty x Ranking + (in-system kills x10))/2
"Ranking" would be something like
<16 kills: 0 (i.e. Harmless and Mostly Harmless)
>15 and <32 kills: 1 (Poor and Average)
>31 and <128 kills: 2 (Above Average and Competent)
>127 and <6400 kills: 3 (Dangerous and Deadly)
>6400: 4 (Elite)
The result would be a % chance of pirate NPCs leaving you alone: so a Dangerous player, with a 40-cred bounty and no in-system kills, would have a 60% chance of being left alone. For every ship they killed in the system, it would increase their chances of being left alone by 5%.
I have no idea how easy or hard this might be to implement, or indeed what unintended complications might arise. Opinions (is this sort of behavioural change desirable, for instance?), refinements, scorn etc. would be welcome.
Posted: Wed Jun 30, 2010 1:02 pm
by maik
Very welcome change of the gameplay mechanics! Thanks for taking up my earlier criticism of becoming a fugitive just for scorching one police vessel's paintwork
Posted: Wed Jun 30, 2010 2:40 pm
by Disembodied
Further thought: if a career in piracy, via save-anywhere and pirate bases etc. did become viable, it's possible that some further tweaks might be required. For a start, I'd suspect that it might get harder to become an Offender: players could hang out in an Anarchy system and mug any passing merchants, with little or no risk of increasing their bounty, because they'd almost never have to venture near the main stations. One possible way around that could be to make the selling prices for merchandise very low in pirate bases (it's not like they've paid any money to get it, and there's not a huge demand for their stock from traders), so if players want to make more money they'll have to risk selling their ill-gotten loot in a more legitimate marketplace. Also, equipment, fuel and ships could be made very expensive in a pirate base, due to high demand and low levels of industrial capacity.
Posted: Wed Jun 30, 2010 3:27 pm
by maik
I'd agree that ships and spare parts should be quite expensive. After all, hardly any salesman would dare to visit the pirate base and thus would demand a certain risk premium. Also, some manufacturers, at least those who also deal with legitimate governments, would probably have some no-trade clauses in their contracts that simply forbid them to deal with pirates. So they need middlemen who also demand their share.
Fuel prices could fluctuate quite a bit, e.g. if a WOMA fuel transport has just been hijacked prices go down.
That gives me the idea of a pirate version of the salvage missile. If you're in a system with a pirate base you could use this after successfully crippling a ship to take it "home" and claim the bounty.
Merchandise would depend on which item we're talking about. Food and drink could be in higher demand than e.g. machinery or alien items. Illicit items would be cheaper than in normal stations because here pirate bases don't need to cover their risks--no pirate base boss would forbid trade in anything.
Posted: Wed Jun 30, 2010 4:08 pm
by Thargoid
Aside from the "in-system kills", most of that should already be possible I think. Certainly if the AI is twinned with a JS then it could be done already...
Posted: Wed Jun 30, 2010 5:23 pm
by Switeck
There is already something similar to this...that could use more work possibly and come closer to what you want:
Pirate Coves OXP
http://wiki.alioth.net/index.php/Pirate_Coves_OXP
...They look like a Rock Hermit, but instead are a pirate station. They send out attackers if you get near them.
Unless you instantly get a big bounty put on your head for just visiting one, their prices cannot be greatly different from the main stations. Currently, you get no bounty for visiting one. Fuel and missiles bought there cost a lot more though. From its files:
equipment_price_factor = 4.5
equivalent_tech_level = 1
So Tech Level 1 and you pay 4.5 times normal!
Free Trade Zone OXP
http://wiki.alioth.net/index.php/Free_Trade_Zone
...Is also similar, appearing only in multi-government systems and causing your bounty to increase (slightly?) if you visit one.
I'm hacking OXPs now, and trying to slightly couple Pirate Coves with Deep Space Pirates -- if a Pirate Cove is semi-nearby (I'm using 500E3 for distance), Deep Space Pirates are more likely to appear. They already say something about "die or join us!", so I guess possibly with some major work on Deep Space Pirates AI...they could be made to NOT attack you if you're either Dangerous-Elite and/or offender/fugitive.
Posted: Wed Jun 30, 2010 9:10 pm
by Poro
Switeck wrote:Is also similar, appearing only in multi-government systems and causing your bounty to increase (slightly?) if you visit one.
So
that's where that mysterious "Offender" status was coming from. I remembers going over previous kills trying to figure out who I had hit to give myself a criminal status. I really should read those OXP readme files more closely.
Posted: Wed Jun 30, 2010 10:48 pm
by Switeck
Another "offender" status gotcha that's gotten me is busting pirates and scooping up their escape pods...then I visit a main station and forget to drop them off before leaving. (Not all of them give you an instant reward and get auto-removed.)
Posted: Thu Jul 01, 2010 6:38 am
by Commander McLane
It seems that the issue of making piracy a viable career path is coming back to us again and again, which shows that there is yet something missing in Oolite. I've got a few thoughts on that as well.
I remember the EV series, especially EV:Nova, was giving it a try, too. In EV:Nova there were different factions of pirates who were attacking each other while staying loyal within the faction. In one of the mission lines the player could join one of the factions and become a "good guy" at least with this one faction. It was the attempt to create a scenario where the player could be a pirate, outlawed in law-abiding systems and hunted by the police, but still having a home-system with a safe haven to return to. It kind of worked, but still not fully satisfactorily.
I think in general we have to ask ourselves the question of how we imagine pirates to be organized. Is every pirate an independent privateer, so they would also go after each other for the loot? Or is there some kind of brotherhood of pirates who respect each other's claims and have a certain amount of loyalty to each other, perhaps even some kind of secret leadership and/or government? Are the pirates citizens of a pirate world which is as well-organized as GalCop, just that the citizens have a distinct way of making their living? And still, there could be some who don't abide the pirate code of conduct. Personally, on the sliding scale of individualism versus collectivism, I would place pirates more on the former side. I am not a firm believer in pirate nation. But this is only my personal point of view.
The other aspect we have to look at is practibility, and how Oolite's game mechanics actually handles pirates. And interestingly, this is different from what the absence of safe-havens and an organized pirate-society would suggest. Basically pirates in Oolite are loyal to each other, although they are lacking a super-structure (with the one big caveat that the player cannot join the "brotherhood", they will always be hostile to him). This is because of the way their AI works, and it can be changed.
Currently pirates select their victims through their primary roles. We have pirate-victim-roles.plist, where the roles are collected that potential victims of piracy may have. "player" and "trader" are in there by default, but you can also add the custom role of a ship you create, and pirates will attack the ship in the game. However, they will ignore any ship whose primary role is not on the list, most prominently ships with a primary role of "pirate". So pirates never attack each other. Through their AI-mechanism of victim selection they possess a secret bond, they form a secret brotherhood the player cannot join, because his primary role will always be on the list. So if he chooses the life of a pirate he will automatically be the only pirate in the Ooniverse who is not welcome to the club. And this is somewhat contradictory and unsatisfying.
It would be less on an issue if different gangs of pirates would also attack and fight with each other sometimes. Then it wouldn't be everybody only against the player. And I think this kind of behaviour (which would more suit my interpretation of pirates in Oolite) could very well be achieved if we only change the basic victim selection system in Oolite.
Pirates already come in ship groups, so called wolf packs. There we obviously have members of a gang, working together. And we should keep it that way. But why shouldn't different gangs also be able to go after each others' throats (which they currently don't)? We could drop the pirate-victim-roles-approach, or at least amend it, and use the already existing ship groups as the basis of the victim selection process. The basic idea is pirates can attack everybody who is not a member of their own wolf pack. This would still include all the possible victims they are having now. But it would also include other pirates. So, while the player could still not join the brotherhood of pirates, there would also be less of a visible brotherhood, because he would see other pirates fighting with each other, too. There would be rivalling gangs of pirates everywhere, and the pirating player wouldn't feel so alone in the Ooniverse.
As a second step we could even try to devise a mechanism for the player to join a certain ship group, which can already be simulated in JS, so it is already possible to do in a mission setting, although not as a vanilla behaviour.
So, my approach is basically the opposite of making it easier for the player to choose piracy as a career path: instead making it visibly harder for the NPC-pirates as well, thereby creating a more consistent feeling about what piracy looks like in the Ooniverse.
What do you think?
Posted: Thu Jul 01, 2010 7:44 am
by maik
Currently, leading a decent, law-abiding live is basically the choice to play Oolite on "easy". You can choose to stay away from anarchies in the beginning, you have GalCop as your friend and you can progress quite nicely by trading and shooting the occasional offender/fugitive.
Choosing to lead a pirate life means you play the game on "hard": GalCop is your active enemy, you are being attacked by traders, bounty hunters, and other pirates alike, you have a much harder time getting into a space station because if you don't zip past the queue you are dead meat, when you leave a station bounty hunters go after you while you wait for your witch space engine to engage and so on.
Making other pirates go after each other is making the "hard" level a bit easier (whether that's good or bad is another discussion) by tying them up in fights instead of going after you. The contribution to Oolite's richness is rather small though.
On the other hand, extending Oolite to offer pirate facilities, have missions like from Thargon Threat (just in this case the galactic navy attacking your pirate base and you having to defend it), or from Galactic Navy (let's form a pirate fleet and raid a small agricultural world or a fuel transport etc.), or capture a Navy frigate (thereby explaining how rogue frigates exist) could offer a richer way to play Oolite on "hard" (while also making it a bit easier, but that can be countered by OXPs).
Plus, I still like the suggestion about adding reputation better because it also solves the problem of friendly fire making you an immediate enemy of the state
Posted: Thu Jul 01, 2010 8:29 am
by Thargoid
Or perhaps rather than the player automatically being on the pirates list, there's a percentage chance based on their bounty that they are included.
For example if the base chance is 100%, with a 1% decrease for every point of bounty on their heads. So a player who is just fugitive (50 bounty points) has a 50:50 chance of getting attacked, and a "real" fugitive (100 points+) has almost no chance at all. I would limit the minimum chance to say 10% to then always give some risk of encountering a trigger-happy idiot who will attack anything...
That would also perhaps lend itself towards a slower way of recovering bounty points back to clean status, as per the Anarchies OXP.
Posted: Thu Jul 01, 2010 8:52 am
by Smivs
Just a thought but one easy way to address at least one of these points is to make Pirates scan for status like the Police and Bounty Hunters do.
This way they could attack Clean ships and perhaps Offenders, but leave Fugitives alone. This way you could work with a Pirate Band if you are Fugitive. You wouldn't really be one of them, but at least they would appear to tolerate your presence.
All this would require is a simple change to the AI.
Having said that I do like the idea of actively becoming a Pirate...there are some really good ideas above, and I think they should be explored where practical.
Posted: Thu Jul 01, 2010 9:15 am
by Disembodied
Commander McLane wrote:So, my approach is basically the opposite of making it easier for the player to choose piracy as a career path: instead making it visibly harder for the NPC-pirates as well, thereby creating a more consistent feeling about what piracy looks like in the Ooniverse.
What do you think?
I think you're right, that the concept of a "pirate nation" isn't worth pursuing – but in a universe where ships are immediately and obviously tagged as either law-abiding or law-breaking, it does tend towards putting people into two different "sides".
A pirate is more likely to be armed and aggressive, and less likely to be carrying lots of worthwhile cargo, than a merchant – therefore a pirate would be a lot less appealing as a potential target to another pirate. If they don't know you, there's a chance they'll attack you, regardless, but this was why I suggested the in-system reputation variable: a player could spend a long time in one system (if there was a pirate base there), not jumping out, building up a local rep that would, in effect, let them join a local "brotherhood". If they're just passing through, though, trailing destruction in their wake, then some of the local pirates might feel like having a go at them (especially if their bounty is small and their kill-count is low).
Posted: Thu Jul 01, 2010 9:24 am
by DaddyHoggy
Disembodied wrote:Commander McLane wrote:So, my approach is basically the opposite of making it easier for the player to choose piracy as a career path: instead making it visibly harder for the NPC-pirates as well, thereby creating a more consistent feeling about what piracy looks like in the Ooniverse.
What do you think?
I think you're right, that the concept of a "pirate nation" isn't worth pursuing – but in a universe where ships are immediately and obviously tagged as either law-abiding or law-breaking, it does tend towards putting people into two different "sides".
A pirate is more likely to be armed and aggressive, and less likely to be carrying lots of worthwhile cargo, than a merchant – therefore a pirate would be a lot less appealing as a potential target to another pirate. If they don't know you, there's a chance they'll attack you, regardless, but this was why I suggested the in-system reputation variable: a player could spend a long time in one system (if there was a pirate base there), not jumping out, building up a local rep that would, in effect, let them join a local "brotherhood". If they're just passing through, though, trailing destruction in their wake, then some of the local pirates might feel like having a go at them (especially if their bounty is small and their kill-count is low).
And it gets high enough in one system - then perhaps through word-of-mouth it spreads to systems a singles jump away - good if these connecting systems are anarchy - because you'll have less trouble from the locals while you continue your pirate business in this new fresh-meat system
[in fact - if you're too good in one anarchy system perhaps either:
1) the supply of traders willing to come to the system dries up - it's just not worth the risk
2) traders start coming through in convoys with heavy escort or naval support (humanitarian aid runs because nothing is reaching the main system stations and therefore the planet below)
3) Galcop and/or the navy make a show-of force raid on the system and you're the Ace of Spades on their deck of cards.]
However, if you have to jump through a non-anarchist system to get to your next hunting pool then your reputation has everybody on the hunt for you - traders - police - bounty hunters - that's going to be one hell of a run to the sun to skim and jump back out!
Posted: Thu Jul 01, 2010 9:29 am
by maik
Disembodied wrote:I think you're right, that the concept of a "pirate nation" isn't worth pursuing – but in a universe where ships are immediately and obviously tagged as either law-abiding or law-breaking, it does tend towards putting people into two different "sides".
On the other hand, that would allow systems with a strong pirate base, comparable to today's situation in Somalia. And having anarchy systems to start with this seems like a logical scenario to me. The Galactic Navy OXP already creates these situations where you do have a strong pirate base in a system and you are sent on a sortie to take it out together with your fellow reservists. To me it would seem right if a player could choose to join the pirates instead and help them defend against the Navy.
Disembodied wrote:If they're just passing through, though, trailing destruction in their wake, then some of the local pirates might feel like having a go at them (especially if their bounty is small and their kill-count is low).
Or they might feel that you're intruding on their territory. Kind of like what various mafia clans around the world have been showcasing, e.g. in NYC in last century's 30s. Or look at the gang wars that are going on in northern Mexico at the moment.