[BONUS Plug-In] Basic Patrol Commands v1.03 [4-1-05]

The place to discuss scripting and game modifications for X²: The Threat.

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

Post Reply
ticaki
Posts: 4585
Joined: Wed, 6. Nov 02, 21:31
x3

[BONUS Plug-In] Basic Patrol Commands v1.03 [4-1-05]

Post by ticaki » Sun, 31. Oct 04, 22:01

Download: your personal downloadpage

update 4/1/05:
- New Enemy Detection Logic: fixed problem of friend/foe setting staying set to enemy after attack. Now, as soon as there are no eemies within 20 km of your patrol leader, settings will revert back to friend.

update 29/12/04:
- New Enemy Detection Logic: Ships attacking your in-sector bases or ships will be targeted by your patrol whether they are set as an enemy or not in the standard friend/foe settings. ('good' pirates vs. 'bad' pirates)

update 7/11/04:
- advanced target prioritization logic now selects the enemy which is the biggest threat to you, based on size and distance
- all player items (ships, satellites) in a sector can now transmit information to the patrol if they spot an enemy
- both Fight Command Software MK1 & MK2 are now required
- costs have been redone slightly, see readme for details (TS/TP now cost $)

Code: Select all

Two new commands are added to the Fight Command Menu: Patrol Single Sector and Patrol Multi Sector. These commands are only available on M6 and larger craft when both Fight Command Software Mk1 & Mk2 are installed. These commands patrol a defined area and engage enemy ships (not stations) when they are found. 

The following features are standard to both patrol commands: 

* The patrol will move at the speed of the slowest ship. It will wait upon reaching each waypoint to allow any stragglers to catch up. 

* The standard friend/foe settings of the lead patrol ship are used to determine if a ship is an enemy. Patrols will only engage ships that can be detected by one of your ships or satellites.

* If any ships are attacking your in-sector bases or ships, they will be targeted by your patrol whether they are set as an enemy or not in the standard friend/foe settings. Now your patrols will engage any 'bad' pirates that attack you, even if you have pirates set as friends so that you would normally leave them alone.

* Wingmen are controlled automatically, with no special input from the player. To assign a wingman to the lead patrol ship, simply order a ship to follow or protect it. The wingmen will be recognized and officially added to the formation upon reaching the next waypoint. 

* All ships in the patrol will engage the same enemy, focusing fire on a single target to ensure that your patrol is not split up, and that targets are killed as quickly as possible. Targets are prioritized based on their level of threat to you.

* When wingmen are substantially damaged, they will leave the patrol, fly to the nearest friendly / neutral shipyard, and contact you for orders.
For more informations look into the readme!

Scripter: Burianek
Last edited by ticaki on Tue, 4. Jan 05, 23:27, edited 2 times in total.

User avatar
Burianek
Posts: 2928
Joined: Mon, 29. Dec 03, 04:29
x3tc

Post by Burianek » Sun, 31. Oct 04, 23:03

Just wanted to start off by saying thank you to ticaki. Tickai helped out a great deal with this script, and it was a pleasure working with him to get this signed.

:thumb_up:
Last edited by Burianek on Tue, 2. Nov 04, 02:25, edited 2 times in total.
"Nature's first green is gold" . . . stay golden.

fchopin
Posts: 3460
Joined: Fri, 12. Mar 04, 14:38
x3

Post by fchopin » Mon, 1. Nov 04, 01:43

Nice script,

I have a question on the order the sectors are selected.

I have selected 4 sectors for my M6 and 3 wingmen, and the order the M6 is protecting the sectors is exactly the order I selected.
If I select the sectors in a different order will this change the order my M6 will follow?

Edit: I have changed the order of the sector selection and now the M6 is folowing the new order.
When there are no more games it is time for music.

Vaylon
Posts: 212
Joined: Sat, 28. Feb 04, 20:14
x3

Post by Vaylon » Mon, 1. Nov 04, 10:48

Well well, we have been a busy bunch over All Hallows!

I would like to try it out but I'm using Marks fight software Mk3. Will this script affect it in anyway?

-NJ
Live Life without Fear

strat
Posts: 96
Joined: Sat, 19. Jun 04, 13:54
x3

Post by strat » Mon, 1. Nov 04, 11:40

I think this is a reincarnation of marks script that will be fully compatable with all other signed scripts. I understand there was a bug in marks code that could cause your game to freeze if you picked another sector by accident while placing your way-points for patrol one sector.

I also understand that this is a work in progress and more features will be added in the future.
Oh, and marks script was not compatible with Xaicorps excellent AI either, which is a must have in my opinion.


Strat...
Einstein rules relativity,
Well in theory at least.

Read on a public loo wall.

User avatar
Reven
Posts: 1120
Joined: Thu, 10. Jul 03, 07:42
x4

Post by Reven » Mon, 1. Nov 04, 12:04

There were lots of issues with the old scripts. Burianek did an excellent job with this. Particularly good is the way sectors are patrolled. There is some info that the readme doesn't cover that is useful information.

The way the patrol works is intelligent. It will generally patrol sectors in the order that you specify them, but this isn't set in stone. For example, consider the following: There are 3 sectors in a corner formation like this:

Code: Select all

1 - 2
    |
    3
If you enter the sectors in that order as sectors to patrol, it will start out by patrolling sector 1, then 2, then 3. At that point it goes back to sector 1 to start the patrol again.

In Mark's old patrol scheme, if you set that up on a "patrol 3 sectors" command, the ship would bly back from sector 3 to sector 1, not patrolling any sectors on the way.

With Burianek's script, if the ship passes back through sector 2 on it's way from sector 3 to 1 to start the patrol over again, it will see that sector 2 is in the patrol list, and WILL patrol it.

As Burianek described it to me, when you enter in a sector as a sector to patrol, you are entering it in as a sector of interest. Any time your patrol ship passes through a sector, if that sector is in the patrol list anywhere, it will patrol it.

This means you can set up a linear forward and back patrol very easily. Say, you have 4 sectors in a row you want to patrol:

Code: Select all

1 - 2 - 3 - 4
You don't have to worry about the ship completing the patrol "forward" and then wasting time flying back to the first sector. It will patrol the sectors it passes through on it's way "back" as well.

It's a great system. Burianek did an excellent job with this script. On the surface it looks simple, which is why it's perfect. The best program in the world is the one that seems the simplest.

Good work.
You were warned... pirates will be hunted down like vermin.

Ex Turbo Modestum

Vaylon
Posts: 212
Joined: Sat, 28. Feb 04, 20:14
x3

Post by Vaylon » Mon, 1. Nov 04, 12:47

Well it looks quite good and I may install it on a new game but I'll stick with Marks for now as it has extra comands I use quite often.

Thanks for the hard work Burianek :D

-NJ
Live Life without Fear

GCU Grey Area
Posts: 5175
Joined: Sun, 15. Feb 04, 00:07
x4

Post by GCU Grey Area » Mon, 1. Nov 04, 13:12

Interesting script, just have one question:

In the costs section of the readme there's no entry for TP & TS ships
I've found Iguanas (equipped with Ion D's) & Demeters (with mining lasers) to be fairly effective OOS. If these ships are used as wingmen to an M6, will they either:
A. break the script :(
or:
B. cost nothing :)

ticaki
Posts: 4585
Joined: Wed, 6. Nov 02, 21:31
x3

Post by ticaki » Mon, 1. Nov 04, 13:33

B :roll:

Greets ticaki :D
Zur Zeit nicht aktiv

User avatar
Burianek
Posts: 2928
Joined: Mon, 29. Dec 03, 04:29
x3tc

Post by Burianek » Mon, 1. Nov 04, 13:35

GCU Grey Area wrote:Interesting script, just have one question:

In the costs section of the readme there's no entry for TP & TS ships
I've found Iguanas (equipped with Ion D's) & Demeters (with mining lasers) to be fairly effective OOS. If these ships are used as wingmen to an M6, will they either:
A. break the script :(
or:
B. cost nothing :)
Hmmm... good point. Right now they're free, as I didn't consider TS/TP ships to be worth charging for.
Perhaps I should consider this the first bug report and fix it right away? ;)
or are you happy with your free Iguanas? (for now :twisted: )
Last edited by Burianek on Mon, 1. Nov 04, 13:38, edited 1 time in total.
"Nature's first green is gold" . . . stay golden.

User avatar
Burianek
Posts: 2928
Joined: Mon, 29. Dec 03, 04:29
x3tc

Post by Burianek » Mon, 1. Nov 04, 13:38

Vaylon wrote:Well it looks quite good and I may install it on a new game but I'll stick with Marks for now as it has extra comands I use quite often.

Thanks for the hard work Burianek :D

-NJ
You can use both if you want. This won't conflict with Mark's script (or any other script for that matter)
So if you don't mind having all the extra commands, just install this right alongside Mark's and use my patrol commands with Mark's extra stuff (or any combination)
The only thing you'll miss is if Mark's extra stuff ties directly into his patrol commands, since you won't be running his patrol 3 / patrol 6 commands.
"Nature's first green is gold" . . . stay golden.

GCU Grey Area
Posts: 5175
Joined: Sun, 15. Feb 04, 00:07
x4

Post by GCU Grey Area » Mon, 1. Nov 04, 13:51

Burianek wrote: I didn't consider TS/TP ships to be worth charging for.
Perhaps I should consider this the first bug report and fix it right away?
Think you should.

[EDIT: ...eventually - there's a lot of interesting stuff on the 'hopefully' list on the index of signed scripts thread, wouldn't want the signing of any of those to be delayed by fixing this]

Iguanas in particular are very effective OOS, IMO more effective than M3's & possibly some M6's (higher OOS laser strength, though weaker shields).

martindemon
Posts: 252
Joined: Mon, 24. Nov 03, 19:16
x3

Post by martindemon » Mon, 1. Nov 04, 17:01

Just a question here, why the fees? These are our ships that are programmed, those are not hired pilot. Is it a balancing issue? What is the justification? Would it be easy to remove the fees from the script? I'm a programmer but I don't have so much time on my hands and I presently know nothing about scripting in X2...
Ok done, salary=0 because I don't see how it could be justified.

User avatar
JungleJim
Posts: 1048
Joined: Fri, 23. Jul 04, 23:41
x3

Post by JungleJim » Mon, 1. Nov 04, 17:32

I think the extra cost is very justified.

Look at it this way, for every other feature used in X2 you have to pay. This will be a very useful addition for OOSD, therefore, I'm willing to pay for it.

Eventually it'll save me a bunch by reducing the number of M6s required to keep my sectors safe.

Furthermore after playing for a while in X2 money isn't hard to come (& therefore not so valuable), however, your time is.
Be seeing you,


Image

User avatar
Reven
Posts: 1120
Joined: Thu, 10. Jul 03, 07:42
x4

Post by Reven » Mon, 1. Nov 04, 17:41

No script will get signed unless it charges some money. Don't ask why. I don't think even the developers know why. :p Even the script to add a traded wares to a player-owned equipment dock charges you 1000 credits to add it. I've stopped asking why. :p

And really, what this script charges in an hour is a drop in the pond compared to the revenue most of us receive from our factories. I know I've stopped counting the digits on my money.

Just wait till my script gets signed - then you'll have reason to complain about getting charged money. :) I happen to think mine's justified, but I'm sure everyone thinks that.
Last edited by Reven on Mon, 1. Nov 04, 17:52, edited 2 times in total.
You were warned... pirates will be hunted down like vermin.

Ex Turbo Modestum

Post Reply

Return to “X²: The Threat - Scripts and Modding”