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

More cops for your money?

General discussion for players of Oolite.

Moderators: winston, another_commander

User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6884
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

More cops for your money?

Post by Disembodied »

Are there more police around these days? I ask because I've been seeing them now in pretty much every system... I've just been to an Anarchy and witnessed a whole wing of six Vipers on patrol. Used to be, in an Anarchy you'd be lucky to see a single Viper buzzing around inside the station aegis. Now, I'm a law-abiding kinda guy, so I have no complaints! Just curious: is this a tweak in 1.71.X to make life a bit harder for those who may be ... er ... "morally challenged"?
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Not a deliberate one. :-)
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:

Post by Commander McLane »

Could be an unwanted side-effect (or actually a wanted effect) of installing Realistic Shipyards. If I understand Lestradae's release-notes correctly he has messed with some of the roles, in order to make non-police ships appear as police, and police ships appear as traders or escorts. I am reasonably sure that he didn't change the scan_classes accordingly.

One result could be that you meet six police vessels and think they are police, and your scanner tells you so, but the game treats them as escorts of a seventh ship, and not as police at all.

But, as he uses to say: So-and-so many people have downloaded it, and I got no bug-reports, so everything must be perfect...
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

One result could be that you meet six police vessels and think they are police, and your scanner tells you so, but the game treats them as escorts of a seventh ship, and not as police at all.
Is that so? As far as I understand it, if the game chooses a ship for the role police, a certain AI is used for that ship ... and the only effect for that ship not having the scan_class "POLICE" is that it doesn`t appear as violet dot on your scanner, meaning that you will only find out that it`s police when you are closer ...

Again, I thought the scan_class had no effect on a ship`s AI?

Please clarify this someone who knows, because the scan_class thing was actually deliberate ... have you never seen cops in a civilian car who only put out the blue light when they found you speeding? :)

If Commander McLane is right, I have to change this. But I don`t think he is.
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

Code: Select all

- (BOOL)isPolice
{
#if 0
	return [self hasPrimaryRole:@"police"] || [self hasPrimaryRole:@"interceptor"] || [self hasPrimaryRole:@"wingman"];
#else
	return [self scanClass] == CLASS_POLICE;
#endif
}
If you dont have scan class of police, then you probably are not treated as police.

Edit: it is probably possible to add police behavior in an oxp, by manually setting legal status etc. but if you want to really really be police, you need the scan class (or change the if 0 to an if 1 recompile, and see what else changes).
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:

Post by Commander McLane »

Remember, we only have Disembodied's observation that he met six police vipers. We don't know which primary role they had, so we don't know whether they were meant to be police in the first place.

There are two issues here: One is giving other ships the role police, which could have strange side effects if they don't get scan_class CLASS_POLICE as well. (E.g. you probably could kill them like any trader without becoming offender, which would be strange for a "civilian" police-vessel.) But this is not the issue with Disembodied's post.

The second issue - and this could be the one reported by Disembodied - is using police ship models like the viper for something else than being police. They would look like police ships, they would have scan_class CLASS_POLICE and they would have purple blips on the scanner, but they would not have a role police, and no route1patrolAI. So they would not act like police ships, although they would look like police. (Which is strange as well. At least in Germany it is prohibited by law to make a non-police private car look like a police car.)

But in order to determine whether this is the case (or the system populator just came up with some odd random result in that Anarchy) we would have to know more about these ships, especially their actual primary roles and the AI they were using.

However, if things like this happen more often than just the odd once-in-a-million, this would be an indication that not the system populator, but an OXP is to blame. And in that case Realistic Shipyards would be one of my primary suspects.
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

Maybe I should add some detail to my post.

If you have scan class police, then oolite thinks you are police, and aside from the AI everything about you is police. Attacking a scan class police will always make you a criminal.

If you are not police, then it does not matter what the ai is, you are not police.

So scan class POLICE is the same thing as being police.

If I understand Lestradae correctly, he is making "police" with the wrong scan class, and this will certainly not work properly.

I dont know about Disembodied's issue, but I do know that if I have understood Lestradae correctly then there is a bug in "Realistic Shipyards".

A side note, is it time for Realistic shipyards to either get a new name, or to be broken into smaller parts? Changing police behaviour doesnt seem very related to shipyard cost balancing to be :p
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

...

Post by Lestradae »

OK,

if I understand this then ...

... any ship with scan_class police will always be treated as police ...

- no problem there, I did not give any ship that scan class that could be anything else but something like police (i.e. military), I think -

... any ship with the role police will NOT nescessarily act as police, Commander McLane says ...
you probably could kill them like any trader without becoming offender
... how so?

- if this is the case, then there could be a problem with that -

... using police ship models like the viper for something else than being police ...

- I didn`t do that at all, so no problem there.

So, there could be a problem with ships that have "police" as one of diverse roles, but don`t have scan_class police to avoid having the same ship popping up in a non-police role but with scan_class police. Right?

If this is the case, this might grow into a scripting request on my part. It`s not a good idea to confuse the role of a script and its scan_class the way it is indicated here that the core game treats this information.

This means that any police ship entry always has to be a seperate entry from all other ship entries. It also means that writing an OXP in which, for example, someone pretends to be police or in which police pretends to be a civilian vessel is impossible, or, at least, very work-around-difficult.

As soon as I understand this here completely, I`ll have a look into the matter.

By the way: Let`s not go into the whole "why is it called this and that" or "It`s not perfect, as there is a bug" business again. If something doesn`t work as intended (aka is buggy) I`ll repair it as soon as I`m notified. I never claimed it to be perfect, that would be absurd.

So thanks for the possible bug-lead.
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:

Post by Commander McLane »

Cmdr James wrote:
If I understand Lestradae correctly, he is making "police" with the wrong scan class, and this will certainly not work properly.

I dont know about Disembodied's issue, but I do know that if I have understood Lestradae correctly then there is a bug in "Realistic Shipyards".

A side note, is it time for Realistic shipyards to either get a new name, or to be broken into smaller parts? Changing police behaviour doesnt seem very related to shipyard cost balancing to be :p
Well, I have understood Lestradae's intention from the very beginning as to basically create a new game, and leaving those who don't like that with the so-called (by him) "core game", although I haven't yet understood what this term is actually supposed to mean.

And breaking the OXP into smaller parts is surely the last thing he would want, after all it is meant to be a one-OXP-covers-everything solution.

*****

Anyway, thinking again about the original issue, there is actually a third possibility, completely unrelated to the two issues mentioned in my last post: It could be that the ships Disembodied saw actually weren't police vipers, but renegade vipers, which would be perfectly normal in an anarchy (at least with at least one of two responsible OXPs installed). But that's of course all speculation, as I haven't seen what he saw.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

...

Post by Lestradae »

Well, I have understood Lestradae's intention from the very beginning as to basically create a new game, and leaving those who don't like that with the so-called (by him) "core game", although I haven't yet understood what this term is actually supposed to mean.
No, you have misunderstood me there. My idea was never to create a new game, and I don`t think I have. With "core game" I mean the version of the game you get when you use the 1.71.1 installer from Berlios and don`t put in anything else - the core of the game, which then uses and interprets the stuff that`s in the AddOns folder.

Hope I could clarify those two points for you.
Anyway, thinking again about the original issue, there is actually a third possibility, completely unrelated to the two issues mentioned in my last post: It could be that the ships Disembodied saw actually weren't police vipers, but renegade vipers, which would be perfectly normal in an anarchy (at least with at least one of two responsible OXPs installed). But that's of course all speculation, as I haven't seen what he saw.
Exactly. We don`t know:

1. We don`t know if whatever Disembodied saw indicates a bug at all.

2. We have no idea if, should there be a bug, it was in any way related to the Realistic Shipyards OXP.

3. If both of the above should turn out to be <true/>, it could be suspected having to do with the way the ... core game (TM) <-- defined above ... treats ships with the role but not the scan_class of police.

So, while I`m very happy to make my oxp better, we as yet don`t know anything.

The bug would have to be replicated and traced to my oxp or someone who knows the internal workings of ship roles and scan_class very well can at least confirm that a serious problem with point 3. could occur anyways.
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

Commander McLane, if Lestradae wants to create a new game, then fine. Its not a problem to the rest of us. If he doesnt, then its still fine.

I am a little unsure about some of the things Realistic Shipyards is trying to do, but it will always remain an optional add-on, so its still only of interest (concern, benefit, whatever based on personal views) to those who chose to instal it.

Lestradae, you are right, we dont know if its a bug, and, if it is, we dont know if its with your oxp, or with something else. However, although Commander McLane is less than the perfect diplomat when discussing your oxp, I do think its worth listening to him. He has some excellent knowledge and insight.

As everyone is now saying, we dont know what happened, and until someone replicates the situation, we will not be able to take this any further.

I will look into roles and scan classes, but it isnt actually clear what the correct behaviour should be. Oolite is elite, and some of these things, like stealth-police are new concepts which dont fit cleanly, so it isnt always clear how they should work.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

Hi Cmdr James,

thanks for your well-chosen words (imo).
I will look into roles and scan classes, but it isnt actually clear what the correct behaviour should be.
My question would be, why (if it is so at all) the role police isn`t the only thing that defines the AI of police vessels, and why the scan_class doesn`t exclusively what it says either, which is to define the scanner appearance of the ship in question on the scanner, but the two are muddled into each other.

As far as I understood the explanations given above, it sounds like this is the case. If role stays role and scan_class stays scan class, the potential source for bugs like that would be removed and the whole system much better understandable intuitively.

Perhaps, if the two are not differentiated in function as yet, they could be made so for 1.72?
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

Well the reason is simple. Oolite is elite, remember that in elite, police and viper are the same, there is no concept of a ship divorced from its nature.

The way we decide if someone is police was added by ahruman in revision 1166 in September 2007.

There is a role based check which is compiled out with an #if 0 test, but even this is not as simple as you might expect, if the role is police, or interceptor, or wingman, then it is considered to be a police ship.

I guess he intended to change from scanClass to role based checking. It seems to be only police and thargoids that are checked this way.

The AI can be set in a number of ways, it should not be fixed for the role.
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:

Post by Commander McLane »

First, because it isn't the job of role to define a ship's AI in the first place.

The job of role is to populate the Ooniverse.

Second, the documentation says very clearly, and has always done so, what the effect of scan_class is:
Wiki - Shipdata.plist, scan_class [url=http://wiki.alioth.net/index.php/Shipdata.plist#Developer_Note]Developer Note[/url] wrote:
Oolite uses scanClass internally to determine the behaviour of some ships (particularly with regard to who may shoot whom without incurring legal penatlties). Bear this in mind and don't allocate CLASS_POLICE or CLASS_THARGOID to ships lightly!
So there should be no unclarity whatsoever.

Provided OXPers don't just ignore the documentation.
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6884
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Post by Disembodied »

Just to clarify -- I don't have Realistic Shipyards installed! I'll try stripping out the OXPs I do have and see what happens.
Post Reply