Marks_Patrol_And_Wingman_Commands_V3 now available

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

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

marklaverty
Posts: 270
Joined: Mon, 23. Feb 04, 15:03
x2

Post by marklaverty »

That's the main idea, here's the add-on. Each M5 should be able to be given the command to launch when they decide to attack an enemy as an extra fire support to the M6, especially as missile carriers. Each M5 would be a wingman to its parent M6. This, i think, would need a specific command like "Launch if enemy within X kilometers" or perhaps "When target is decided, launch and attack"

Is this possible? This would give the opportunity to create fighter wings that deploy when the course of action is decided instead of tagging along outside.
ohhh I like that! :D

It would be possible to do by creating a modified version of the the 'assign as wingman command'. it would have to test to see if where it is docked has targeted anything, then undock if it has, behave as a normal wingman on missile defence, then dock when nothing has been targeted.

gonna be tricky to get right but i'll have a go :D
Never used a script, never even downloaded one, but if Wingman Missile Defence works like I think/hope/expect it will, then I may be playing a modded game from now on. Just might save my a$$ from time to time. (and if the time between checking to see if the target ship has been captured could be reduced a tad, so much the better, two seconds is a long time in the combat zone! )
Gonna tweak it a bit more in version 4 as theres still a few small niggles eg, occasionaly the wingman flies to close and breaks 'SETA'. But as it is it works pretty well.
Point taken about the capture, but it's hard to alter because I think I'll have to alter the timings of the attack runs etc. Will have a try and see what happens. :?


Made really good progress last night, have the 'resupply fighter wing' and 'fighter wing bombing' run commands working (buggy but working).

MY GOD THIS IS FUN!! :lol:

Spent ages just dispatching a 10 nova formation loaded with missiles from an m1 on 'bombing runs' against anything I took a dislike to. When they returned, was able to resupply all of them in seconds from the leaders command menu.... sweet...
For everything you ever wanted to know about X2,
and more......

[ external image ]
Brent Rivienne
Posts: 162
Joined: Thu, 18. Mar 04, 19:52
x3fl

Post by Brent Rivienne »

Sounds interesting... but what happens if the leader is killed? Do they just sit there and wait to be attacked etc?
The Jopp
Posts: 67
Joined: Tue, 3. Feb 04, 16:19
x3tc

Post by The Jopp »

Odd, I've put the files in the correct folders but I get no choice in the menu to pick a mod packade? The new script files are in XML format but the ones in the original game are PCK, is that correct or is there something more i have to do?
"Boundless Human Stupidity" - CUBE
User avatar
JustHere4Coffee
Posts: 1075
Joined: Wed, 6. Nov 02, 20:31
x2

Post by JustHere4Coffee »

you don't need to choose a mod package, because this isn't one - it's just a set of scripts

if they don't appear in your ship's command menus, then you probably need to activate the script editor - there's instructions in the stickied topics at the top of the forum
Last edited by JustHere4Coffee on Fri, 7. May 04, 13:30, edited 1 time in total.
marklaverty
Posts: 270
Joined: Mon, 23. Feb 04, 15:03
x2

Post by marklaverty »

Sounds interesting... but what happens if the leader is killed? Do they just sit there and wait to be attacked etc?
good question!! I was waiting for someone to ask that :D

At the moment they finnish of what they are attacking, then just stop....

I am trying to include some code that will make the wingmen send a message to the player if a formation leader is destroyed, and then revert to "attack all enemies and land at homebase'. Version 4 won't be out untill this works as I accept it is a big point.

The bombing run command is different. Each ship in the formation will fly to just within the max missile range of what ever missile they have installed of the target. Then do combinations of defensive moves and attack runs on the target, firing of a missile roughly every two seconds at the target.

If you have a formation of even 5 ships, thats still alot of missiles!!!

even 5 m5's working together can be deadly :D

Each ship will return to where it was launched from when either, a ) the target is destroyed, or b) it runs out of missiles.

I haven't included a "stop if the ship is captured" criteria as even when I did the target ends up getting destroyed anyway!!
For everything you ever wanted to know about X2,
and more......

[ external image ]
The Jopp
Posts: 67
Joined: Tue, 3. Feb 04, 16:19
x3tc

Post by The Jopp »

Why not make a list of rank so that when ship no 1 bites the dust ship no 2 takes over as wing leader, sounds like a natural decision to me (In my mind you actually hire pilots for the ships, I have a feeling that the X2 universe would have a high unemplyment rate if all ships were automatic all the time.

Imagine every megacorporation that owns 200+ factories and a few thousand ships is all owned and controlled by *1* person.
"Boundless Human Stupidity" - CUBE
Brent Rivienne
Posts: 162
Joined: Thu, 18. Mar 04, 19:52
x3fl

Post by Brent Rivienne »

Regarding bombing run, would it be possible to have the ships automatically resupply their missiles from the cargo of a carrier they have their home set to? I can just imagine a horde of maxed pegasus' setting off, launching a couple and returning at max speed for more... sure you can use larger ships and make it more useful but I like the idea of 80 pegasus' flying off at max speed launching a load of missiles and then docking again for more ammo :)
marklaverty
Posts: 270
Joined: Mon, 23. Feb 04, 15:03
x2

Post by marklaverty »

Why not make a list of rank so that when ship no 1 bites the dust ship no 2 takes over as wing leader, sounds like a natural decision to me (In my mind you actually hire pilots for the ships, I have a feeling that the X2 universe would have a high unemplyment rate if all ships were automatic all the time.

Imagine every megacorporation that owns 200+ factories and a few thousand ships is all owned and controlled by *1* person.
It's a good point and one I have looked into. There are relevent commands in the script editor that should make this kind of thing possible, but the whole structure of the scripts would change and get very complicated. That, and I haven't figured it out how those comands work yet !!


[/quote]Regarding bombing run, would it be possible to have the ships automatically resupply their missiles from the cargo of a carrier they have their home set to? I can just imagine a horde of maxed pegasus' setting off, launching a couple and returning at max speed for more... sure you can use larger ships and make it more useful but I like the idea of 80 pegasus' flying off at max speed launching a load of missiles and then docking again for more ammo

Hehehheheheh... your evil...... I like it ...Muhahahahahhaha :D

80 pegasus coming at you, unloading a cargo hold full of missiles each, then going back for more..... I'd ******* myself if I was on the reciveving end of that!!!!

To be honest I think this would be pushing the limits of what would be considered fair. What you can do already goes beyond anything any of the other races can do........
For everything you ever wanted to know about X2,
and more......

[ external image ]
marklaverty
Posts: 270
Joined: Mon, 23. Feb 04, 15:03
x2

Post by marklaverty »

marklaverty wrote:
Why not make a list of rank so that when ship no 1 bites the dust ship no 2 takes over as wing leader, sounds like a natural decision to me (In my mind you actually hire pilots for the ships, I have a feeling that the X2 universe would have a high unemplyment rate if all ships were automatic all the time.

Imagine every megacorporation that owns 200+ factories and a few thousand ships is all owned and controlled by *1* person.
It's a good point and one I have looked into. There are relevent commands in the script editor that should make this kind of thing possible, but the whole structure of the scripts would change and get very complicated. That, and I haven't figured it out how those comands work yet !!

Regarding bombing run, would it be possible to have the ships automatically resupply their missiles from the cargo of a carrier they have their home set to? I can just imagine a horde of maxed pegasus' setting off, launching a couple and returning at max speed for more... sure you can use larger ships and make it more useful but I like the idea of 80 pegasus' flying off at max speed launching a load of missiles and then docking again for more ammo
Hehehheheheh... your evil...... I like it ...Muhahahahahhaha :D

80 pegasus coming at you, unloading a cargo hold full of missiles each, then going back for more..... I'd ******* myself if I was on the reciveving end of that!!!!

To be honest I think this would be pushing the limits of what would be considered fair. What you can do already goes beyond anything any of the other races can do........
For everything you ever wanted to know about X2,
and more......

[ external image ]
Shanjaq
Posts: 353
Joined: Sat, 3. Apr 04, 09:47
x3

chain of command

Post by Shanjaq »

In response to a question about how to keep a wing of ships together if the leader is destroyed, would it not be possible for a wing leader to be wingman to another ship?

would this hypothetical situation work with these scripts as they are now?: 6 Argon Discoverers are wingmen to an Argon Buster. The Buster is wingman to an Argon Nova. The Nova leads the Buster, which leads the Discos. If the Nova is destroyed, the wing of Discos remains around the Buster while it... meanders off somewhere?

hmm... What could be a good default command for wingmen when their leader is destroyed? Return Home?
User avatar
JustHere4Coffee
Posts: 1075
Joined: Wed, 6. Nov 02, 20:31
x2

Post by JustHere4Coffee »

Avenge Leader...

:lol:
Shanjaq
Posts: 353
Joined: Sat, 3. Apr 04, 09:47
x3

what to do next?

Post by Shanjaq »

Hey yeah! that's a great option!

Assign Wingman **Leader Postmortem**
1) Return to Home Base (RHB)
2) Avenge Leader (AL)


Though once they have exacted their revenge, what then? Perhaps the default command would be Return to Home Base when there's nothing to do after the leader is dead. I certainly wouldn't want my wingmen to stay idle in dangerous territory while i'm off doing something else unaware that their formation has broken. =p

At least this way you have an option of salvaging the fleet when they're up against a truly formidable opponent(if it could destroy the leader, it could likely destroy every last wingman!)
User avatar
JustHere4Coffee
Posts: 1075
Joined: Wed, 6. Nov 02, 20:31
x2

Post by JustHere4Coffee »

first and most important, I'd say that in addition to the AI-generated "one of your ships has been destroyed" log entry, you should get a proper "Incoming Message" with details of the dead ship and any wingmen assigned to it, so you know exactly who needs babysitting/reassigning
marklaverty
Posts: 270
Joined: Mon, 23. Feb 04, 15:03
x2

Post by marklaverty »

Was thinking along the same lines.

I've added in the code so that.

1) wingmen set the same homebase as the formation leader (in line with trying to make it so you only have to set things on the lead ship)

2) If the lead ship is destroyed the wingmen will finnnish of doing what they are doing (eg attacking a ship ), then write to the players logbook telling them that the formation leader has been destroyed before returning to thier homebase.

Writing to the logbook isn't ideal so anyone know how to add two values together and then send them in a 'propper' incoming message?

Eg if $leader was the lead ship...

Add $leader and the string "has been destroyed' together so for example you'd get....

"red leader has been destryoyed"

in an incoming message?
For everything you ever wanted to know about X2,
and more......

[ external image ]
User avatar
JustHere4Coffee
Posts: 1075
Joined: Wed, 6. Nov 02, 20:31
x2

Post by JustHere4Coffee »

don't you just put %s in the body of the message you're writing to the screen, then pus the variable that'll replace %s in the list of variables that follow the text?

I'm not in a position to look, but something like:

write incoming message: "%s has been destroyed in sector %s, its %n wingmen are returning to base at %s", $squadron, [SECTOR], $wingcount, $homebase, null

assuming that the script's being run from a ship in the sector where the leader died... there's always 5 values, hence the null
Shanjaq
Posts: 353
Joined: Sat, 3. Apr 04, 09:47
x3

chain of command?

Post by Shanjaq »

So does this script make ships behave like "linked lists"?

I hope "Chains of Command" are possible with this script, since I really like doing stuff like that. For example, an M1 has 6 M3s as wingmen, and each M3 has 12 M5s as wingmen, so from a distance I've got one massive ship surrounded by concentrated balls of fighters led by their M3 nucleus. Heck, maybe the M1 also has two M2 wingmen, each having 4 clusters of M4s around their respective M3 nuclei? My fleet would look like a huge molecule in space! 8)
User avatar
JustHere4Coffee
Posts: 1075
Joined: Wed, 6. Nov 02, 20:31
x2

Post by JustHere4Coffee »

that sounds fantastic!

*loads ships with GPSGs, targets Shanjaq's molecules* :lol:
marklaverty
Posts: 270
Joined: Mon, 23. Feb 04, 15:03
x2

Post by marklaverty »

I haven't tested chaining formations together, but in theory it should work.

You should be able to create a huge battle fleet without to much trouble.

I'll try it tonight.. :)
For everything you ever wanted to know about X2,
and more......

[ external image ]
KarlHemmings
Posts: 1940
Joined: Sun, 8. Feb 04, 19:04
x4

Post by KarlHemmings »

I downloaded the script today v3.1 and installed whilst eating lunch then set up 4 or 5 of my M6s on OOS on 3 sector patrol.
Love it. Just love it.
I will need to spend a couple of hours tonight sorting out my OOS into more logical patrol areas with double up in some sectors;
cloudbase south west - ore belt - cloudbase south east
ore belt - home of light - presidents end
home of light - preidents end - e' thingy
and so forth - but this is going to be beautiful.
(I am heavy on industry in these areas.... so Home of Light and PE have M2s as well as M6 back up).

Many, many thanks.
Karl
marklaverty
Posts: 270
Joined: Mon, 23. Feb 04, 15:03
x2

Post by marklaverty »

So does this script make ships behave like "linked lists"?
Forgot to test last night, :roll:

But I have almost finnished the 'Resupply fighter wing' and 'Fighter wing bombing run' commands.

Will be going to 'beta' tonight and should be out properly in a few days :D
For everything you ever wanted to know about X2,
and more......

[ external image ]

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