[Request] Police Area Default Behaviour

The place to discuss scripting and game modifications for X4: Foundations.

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

IXmus
Posts: 26
Joined: Tue, 30. May 06, 11:39
x4

Re: [Request] Police Area Default Behaviour

Post by IXmus » Tue, 1. Dec 20, 09:36

I think I found a solution, I just reduced patrol area to 2-4km and my ships stopped flying away from the station.

Thanks.

julian_stargazer
Posts: 12
Joined: Tue, 17. Nov 20, 16:47
x4

Re: [Request] Police Area Default Behaviour

Post by julian_stargazer » Sun, 21. Mar 21, 20:28

IXmus wrote:
Tue, 1. Dec 20, 09:36
I think I found a solution, I just reduced patrol area to 2-4km and my ships stopped flying away from the station.

Thanks.
Hello IXmus,

how did you achieve this?

did you edit the "min" and "max" values from the file "aiscripts/order.move.recon.police.xml" :

Code: Select all

		<param name="radius" type="length" default="if this.ship.isplayerowned then 20km else null" text="{1041, 10093}" comment="Radius">
			<input_param name="min" value="0m"/>
			<input_param name="max" value="350km"/>
			<input_param name="step" value="1km"/>
		</param>
Thanks for clarifying

Polofix
Posts: 179
Joined: Thu, 6. Dec 18, 18:05

Re: [Request] Police Area Default Behaviour

Post by Polofix » Wed, 24. May 23, 12:55

Sorry to bring up this old thread.
I have been using j.harshaw's script for quite some time. But now I have the following situation. I wanted to set the scan radius of the police ship around a station. Only stupidly this station is below the ecliptic. Unfortunately I can't move the scanner area with the mouse, so it is not possible to set a scanner area whose center is below or above the ecliptic.

@j.harshaw could you maybe look at this again? Otherwise the script is really good.
It should only be possible to move the scanner area with the mouse, so that you can also adjust the Y-axis.

Scoob
Posts: 9921
Joined: Thu, 27. Feb 03, 22:28
x4

Re: [Request] Police Area Default Behaviour

Post by Scoob » Wed, 24. May 23, 15:14

I confess, I forgot about this after reverting to vanilla to test v6.0, for some reason it's not made it back into my mod list.

I don't think I ever previously thought about the lack of vertical movement, as I always place my stations at the default "0" position vertically.

I know J.Harshaw was kind enough to do this as a favour, but perhaps it warrants releasing as a full mod, if not able to become a standard game feature.

Edit: I just read through this thread again and it looks like I went radio silence after my post above saying I hoped to have time to test it later. I guess I didn't get time to test for a while, and then neglected to post again. Sorry about that J.Harshaw, I do really appreciate you creating this.

j.harshaw
EGOSOFT
EGOSOFT
Posts: 1847
Joined: Mon, 23. Nov 15, 18:02

Re: [Request] Police Area Default Behaviour

Post by j.harshaw » Wed, 24. May 23, 18:12

Tracked it down. Making the order icon draggable would require modding the UI which I'll have to call out of scope for this mod. Sorry.

Polofix
Posts: 179
Joined: Thu, 6. Dec 18, 18:05

Re: [Request] Police Area Default Behaviour

Post by Polofix » Thu, 25. May 23, 05:43

Too bad, there's probably nothing you can do. Seems to be more complicated.
Thanks anyway. Maybe there is another modder who could implement this function. Because the way the police behavior is in Vanilla at the moment, it makes no sense to use this default command.

User avatar
Dj_FRedy
Posts: 229
Joined: Mon, 27. Jun 11, 05:58
x4

Re: [Request] Police Area Default Behaviour

Post by Dj_FRedy » Thu, 25. May 23, 22:41

Please try if this works for you, 'SirNukes Mod Support APIs' is required as a dependency. Of course, any extension that also handles the functions I've patched will have to be adapted via callbacks or just adopting the code.
https://github.com/DjFRedy/X4-Extension ... ag_support
https://github.com/DjFRedy/X4-Extensions/releases

EDIT: link update
Last edited by Dj_FRedy on Sun, 28. May 23, 13:30, edited 1 time in total.
"All my contributions to the Technical Support and Public Beta Feedback sections will be concise and to the point, no diatribes, that's what the other sections are for".
Thank you for your efforts.

Polofix
Posts: 179
Joined: Thu, 6. Dec 18, 18:05

Re: [Request] Police Area Default Behaviour

Post by Polofix » Sat, 27. May 23, 13:29

Cool, thank you very much. I just read your post. I'll try it out and let you know.

Polofix
Posts: 179
Joined: Thu, 6. Dec 18, 18:05

Re: [Request] Police Area Default Behaviour

Post by Polofix » Sat, 27. May 23, 16:34

Works perfect, just drag and drop the radius with the mouse, as with the other commands. That's how I imagined it. Now I can finally put a stop to the illegal activity in my sectors.

The police also adheres nicely to the set radius, have tried it with different radii.

Maybe the two mods could be packaged together and released as Enhanced Police Behavior on Steam and / or Nexus, if j.harshaw also agrees? It would be a real shame if there are others who don't benefit from reading the thread here and so the mods don't get lost at some point.

Many many thanks to both of you for the mods.

User avatar
Dj_FRedy
Posts: 229
Joined: Mon, 27. Jun 11, 05:58
x4

Re: [Request] Police Area Default Behaviour

Post by Dj_FRedy » Sat, 27. May 23, 17:24

Not for nothing, but I'd really rather not, I simply responded to your request because I knew how to deal with your problem on paper, but from there to uploading it as a combined mod to various sites I think I'll pass. Still, I'm glad to have been of help.
"All my contributions to the Technical Support and Public Beta Feedback sections will be concise and to the point, no diatribes, that's what the other sections are for".
Thank you for your efforts.

Polofix
Posts: 179
Joined: Thu, 6. Dec 18, 18:05

Re: [Request] Police Area Default Behaviour

Post by Polofix » Sat, 27. May 23, 18:57

Ok, I see. Thanks again anyway.

Eagle_Four
Posts: 231
Joined: Wed, 6. Nov 02, 20:31
x3

Re: [Request] Police Area Default Behaviour

Post by Eagle_Four » Sun, 28. May 23, 08:21

Hi, thank you from my side as well. Now the police works as hoped. Would be nice if Egosoft could make this permanent.

Has anyone actually experienced the ship captains throwing out illegal wares and cooperating?
With me, the ships that were caught so far always became hostile.

Post Reply

Return to “X4: Foundations - Scripts and Modding”