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

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

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

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

Post by Burianek » Wed, 5. Jan 05, 20:18

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.

note: this only applies to situations where your patrol engages 'friends' that are attacking you (usually pirates)
"Nature's first green is gold" . . . stay golden.

KarlHemmings
Posts: 1940
Joined: Sun, 8. Feb 04, 19:04
x4

Post by KarlHemmings » Thu, 6. Jan 05, 00:06

:thumb_up: Thank you

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

Post by Burianek » Thu, 6. Jan 05, 01:08

keep me posted on how well it works.
It's kind of tricky to strike a balance here, it's hard to know when to switch the friend/foe back to normal.
The standard behavior of the game is that, if a ship from a race you consider to be friendly attacks you, your friend/foe makes it an enemy.
So if a pirate attacks your patrol leader, it will switch pirates to foes forever. This is standard behavior and can't be changed.
My override works, as you know, when pirates (or other races) are attacking one of your other ships/stations besides the patrol. The patrol will override the friend/foe and then attack them.
So here's the issue, when do you switch back to friend? If you switch in the middle of combat (let's say after the first of three pirates is killed) you run the risk of one of the other pirates attacking your ship and switching your friend/foe forever. I thought a 20 km safe zone was enough. Occasionally perhaps the odd pirate freighter will be targetd, but as soon as there are no bad guys within 20 km, the friend/foe settings revert to what they were previously.
I hope this works well.
Make sure to let me know how it goes so I can further tweak it.
Cheers.
"Nature's first green is gold" . . . stay golden.

KarlHemmings
Posts: 1940
Joined: Sun, 8. Feb 04, 19:04
x4

Post by KarlHemmings » Sat, 8. Jan 05, 08:51

If upgrading check the friend foe setting of your patrol leader (s); just to ensure they are back to what you want them to be.
This works like a charm - really - I have substantial factory build in pirate areas and so often have stray pirates come over to play.
M6 flys in B.Triumph... couple of M4s, an M5 and a couple of IS (sorry PS, TS - whatever) attacking my factory. (I was OOS) M6 flys in - scans - engages the pirates - went to the next rally point and flew off. Thing is BT still has its Pirate Base intact and so this had been a problem hot spot for me previously.
From what I've seen I think the range is just fine.
:thumb_up: Karl

stella
Posts: 1004
Joined: Tue, 17. Feb 04, 18:41
x2

Post by stella » Sat, 8. Jan 05, 11:54

I'd suggest setting them back to what they were.

Why keep an entire race as enemies, just cos one rogue decided he didn't like one of your factories.

Checking for enemies within 20k. Hmmmm..... Why do I feel my "attack enemies in radius" script becoming obsolete before it even gets signed :wink:
Attack enemies in radius -here

KarlHemmings
Posts: 1940
Joined: Sun, 8. Feb 04, 19:04
x4

Post by KarlHemmings » Sat, 8. Jan 05, 12:50

I'm not sure what you are saying stella.

The Patrol Leader uses the friend foe setting to target enemies.
The player friend/foe setting can be over-ridden at ship level - for example player "Pirates = Foe"; Ship "Pirates = Friend - then show as enemy if enemy to me = no"
With this the player can be "at war" with the Pirates but the Patrol will ignore them.

However - with the update to the Patrol script - if a Pirate is found by the patrol to be attacking one of your ships / factories it will over-ride the friend foe setting and attack the Pirate. This causes the friend / foe setting to be changed at ship level to foe. Not good if there are "friendly" Pirates in sector.

What Burianek has done is to have the Pirate friend/foe setting change back to friend once the Patrol has taken care of the "baddy" pirate and moved away from the area of attack. Obviously this can not occur too soon - but can not be left too long.

This is not an attack in radius but a control over the length of time the Patrol will remain hostile when it is not needed.

stella
Posts: 1004
Joined: Tue, 17. Feb 04, 18:41
x2

Post by stella » Sat, 8. Jan 05, 14:04

I was kidding :) hence the :wink: at the end.
Attack enemies in radius -here

KarlHemmings
Posts: 1940
Joined: Sun, 8. Feb 04, 19:04
x4

Post by KarlHemmings » Sat, 8. Jan 05, 20:30

:roll: Oops I did it again - sounds like a good title for a song.

Sorry about that - I'm a bit stressed at the mo.

I'll go and hide in RoT for a while.....

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

Post by Burianek » Sun, 9. Jan 05, 00:09

Thx for the update Karl,
keep me posted.

Stella: yeah, the way the patrols used to work, once they attacked a pirate that was harrassing you, they'd be so angry they'd attack every pirate from that point on. :) This update lets them switch back to generally friendly terms with them.

(and we keep saying pirates since they're the most common, but it works the same way for every race)
"Nature's first green is gold" . . . stay golden.

KarlHemmings
Posts: 1940
Joined: Sun, 8. Feb 04, 19:04
x4

Post by KarlHemmings » Sun, 9. Jan 05, 09:41

With the introduction of AGEIS and this script i've started again, currently in a Argon TP with a chap in the rear turret - we have had a chat and decided to get an APSG before picking up any passengers..... :)

frymaster
Posts: 3008
Joined: Wed, 6. Nov 02, 20:31
x4

Post by frymaster » Sun, 9. Jan 05, 16:37

great minds think alike, my problem is catching up with the bloody supercharged crew transports!
Math problems? Call 0800-[(10x)(13i)^2]-[sin(xy)/2.362x]

stella
Posts: 1004
Joined: Tue, 17. Feb 04, 18:41
x2

Post by stella » Sun, 9. Jan 05, 17:24

just as an aside, I like the gunnery crew script idea, whereby if there's more than one enemy, they don't all go for the same target.

I mean, if you have 5 M3's on patrol, and they see 2 pirate mandalays, wouldn't it make sense to split your forces?
Attack enemies in radius -here

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

Post by Burianek » Sun, 9. Jan 05, 20:10

In sector yes. OOS maybe not. Multiple ships can successfully attack a single target OOS with no penalties since it's purely mathematical and you don't have to worry about your 20 ships performing evasive maneuvers and wasting time to prevent running into eachother :). It's much harder for multiple ships to maintain a lock on a single ship In Sector.
Having them all attack the same target kills the target much more quickly OOS. (and most patrol battles will occur OOS)
Gunnery crew battles always occur in sector, hence the optimization. Patrol battles, OOS, hence my optimization. ;)
Just my opinion.
Cheers.
"Nature's first green is gold" . . . stay golden.

stella
Posts: 1004
Joined: Tue, 17. Feb 04, 18:41
x2

Post by stella » Sun, 9. Jan 05, 22:23

It's much harder for multiple ships to maintain a lock on a single ship In Sector
How come?
Because of collision detect?
Attack enemies in radius -here

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

Post by Burianek » Sun, 9. Jan 05, 22:26

yep, they spend all their time avoiding each other and no time firing at the target.
at least, more time proportionally.
"Nature's first green is gold" . . . stay golden.

User avatar
Pirate Hunter
Posts: 715
Joined: Wed, 22. Sep 04, 20:44
x2

Post by Pirate Hunter » Mon, 10. Jan 05, 15:26

Does this script work on all Combat Ships or just Capital ships.

Because I cant find the command in the menu
[ external image ][/url]
http://www.egosoft.com/x2/forum/viewtopic.php?t=73689 The New and Improved Ultimate Guide to Everything

D_Zorro
Posts: 2027
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by D_Zorro » Mon, 10. Jan 05, 15:47

Pirate Hunter wrote:Does this script work on all Combat Ships or just Capital ships.

Because I cant find the command in the menu
To activiate this script you need an M6 or higher, but you can assign lower class ships like M3 to become it's wingmen.



DZorro,
System spec: Pentium (R) D 2.66 Ghz, Ram : 2048 DDR, HD : 250 GIG 7200 RPM intern 8 MB cash
Videocard : Nvidia Geforce 8800 GTS 320mb : Realtek
Laptop : AMD athlon 64 3200 + 1024 DDR 80 gig HD Conexant AMC Audio, Ati mobility Radeon Express 200

Greyhawk1
Posts: 5331
Joined: Mon, 22. Mar 04, 20:21
x3tc

Post by Greyhawk1 » Mon, 10. Jan 05, 16:10

*sigh* unfortunately this makes your own OOSD miles better than the standard ones that came with the game. Another example of fans outcoding the developers :)

What I would like to see is this software used on all AI patrols as well - this would make the new patrol script fit in with the X universe.

As it stands, the normal AI patrols are somewhat lacking.

User avatar
Pirate Hunter
Posts: 715
Joined: Wed, 22. Sep 04, 20:44
x2

Post by Pirate Hunter » Mon, 10. Jan 05, 16:14

As it stands, the normal AI patrols are somewhat lacking.
Id just be happy if the colossus in Ore belt actualy shot at Khaak ships or even just launched novas.
[ external image ][/url]
http://www.egosoft.com/x2/forum/viewtopic.php?t=73689 The New and Improved Ultimate Guide to Everything

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

Post by Burianek » Tue, 11. Jan 05, 00:41

Greyhawk1 wrote:*sigh* unfortunately this makes your own OOSD miles better than the standard ones that came with the game. Another example of fans outcoding the developers :)

What I would like to see is this software used on all AI patrols as well - this would make the new patrol script fit in with the X universe.

As it stands, the normal AI patrols are somewhat lacking.
They're government employees. Give them a break. :D
If it were me designing the game, I actually might be able to justify them not being very attentive to all risks. Can't make the game too easy for you. ;)
Why should a teladi pilot risk his neck to save one of your ships/stations? There's no profit in that. :)
That being said, we may see patrols reworked in the expansion, anything is possible. Of course, we may see some new threats that the patrols aren't equipped to deal with as well ....
We'll all have to wait and see :D
"Nature's first green is gold" . . . stay golden.

Post Reply

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