Police, buggy or not?

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Kregoth
Posts: 156
Joined: Sat, 9. Dec 06, 02:09
xr

Police, buggy or not?

Post by Kregoth » Sun, 24. Nov 13, 00:21

So as I am sure everyone is aware, police don't do anything but blare sirens and scan your cargo. Even if you have Illegal wares in your cargo, they don't do anything... or if they do, the game just doesn't tell you.

I was hoping a modder could look into the Police ships, and see what it is they are supposed to be doing (bugged, or unfinished?). I don't want to fix them (That Egosoft's job) I just want to know what their purpose is. I even see jails on some stations, are they connected in some way? or just another piece of interior to look at?

User avatar
MegaJohnny
Posts: 2195
Joined: Wed, 4. Jun 08, 22:30
x4

Post by MegaJohnny » Sun, 24. Nov 13, 00:40

Interesting point - I just had a skim of masstrafic.police.xml and it does indeed look like they're supposed to fire on ships with illegal cargo.

We have this snippet, which sets a value $illegalcargo if a target has been seen for 10 seconds and the pilot has some illegal cargo in his inventory:

Code: Select all

<do_if value="$cargoscan">
  <do_if value="@($target.pilot.inventory.illegalto.{this.zone.owner}) or @($target.cargo.illegalto.{this.zone.owner})">
    <set_value name="$illegalcargo" exact="true" />
    <set_value name="$attackreason" exact="'ILLEGAL_CARGO'" />
  </do_if>
</do_if>
Shortly afterwards, we have some code that has the ship return to its masstraffic lane if there was no scanned. If there was some illegal cargo, the <resume> will not be fired, so we fall down to the attack motion below.

Code: Select all

<do_if value="not $illegalcargo?">
  <resume label="returntomasstraffic" />
</do_if>
<remove_value name="$illegalcargo" />

...

<start_attack object="this.ship" target="$target" />
<add_to_group groupname="$targets" object="$target" />
<run_script name="'fight.attack.object.fighter'">
  <param name="primarytargets" value="$targets" />
  <param name="allowothertargets" value="false" />
</run_script>
<stop_attack object="this.ship" target="$target" />
No idea why they don't actually fire of course. :P

I think the police script does explain why some masstraffic ships are randomly red, though. It seems they hide their true faction until the police scan them.

wwdragon
Posts: 3746
Joined: Mon, 1. Oct 07, 02:18
x4

Post by wwdragon » Sun, 24. Nov 13, 00:41

I think it makes you lose a little rep with their faction when you get caught.
I have been fired on by police a couple times... just not often.
Editing posts since long before I remember.

Kregoth
Posts: 156
Joined: Sat, 9. Dec 06, 02:09
xr

Post by Kregoth » Sun, 24. Nov 13, 01:00

MegaJohnny wrote:Interesting point - I just had a skim of masstrafic.police.xml and it does indeed look like they're supposed to fire on ships with illegal cargo.

I think the police script does explain why some masstraffic ships are randomly red, though. It seems they hide their true faction until the police scan them.
Awesome thanks, I knew that it was all centered around Illegal Cargo. hopefully Egosoft see's this and can fix them... though I doubt they are a priority.

Is there anything on ships being scanned from the NPC side of things? I have seen Police engage and destroy transit ships, but I want to know if there is a chance that the AI will turn tail and run, causing a chase perhaps? Be nice to find out more of what this game is trying to do :)

Post Reply

Return to “X Rebirth - Scripts and Modding”