[SCRIPT] Invasion warnings v1.1 [2008-11-28]

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

[SCRIPT] Invasion warnings v1.1 [2008-11-28]

Post by ThisIsHarsh » Mon, 24. Nov 08, 04:38

Invasion warnings


:arrow: X3TC has built-in race skirmishes. This plugin gives options to potentially notify you of both pending and active invasions.

:arrow: Requires: Cycrow's Community Configuration Menu


This plugin is available in spk format:

[ external image ]

:arrow: You can use Cycrow's Plugin Manager 'Package Updates' feature to keep this plugin up to date automatically. A big thanks to Maeyanie for graciously offering up the file hosting.


[ external image ]

[ external image ]

[ external image ]


:arrow: Pending invasions - by default you require: (a) Police License with the invader race; (b) property in the Military Base sector that is calling the invasion; and (c) property in the responding carrier group's current sector.

:arrow: Active invasions - by default you simply require property in the sector being invaded.

:arrow: These requirements as well as other options can be enabled/disabled from the Community Configuration Menu, as shown above.

:arrow: One of the stock scripts is modified (namely !fight.defend.sector) to provide these warnings. However, the AI is unchanged, it is only to flag impending/active invasions.
Last edited by ThisIsHarsh on Fri, 28. Nov 08, 07:54, edited 1 time in total.

Thrandisher
Posts: 357
Joined: Sun, 1. Jul 07, 03:33
x4

Post by Thrandisher » Mon, 24. Nov 08, 04:48

Very nice!

User avatar
Graxster
Posts: 817
Joined: Sat, 14. Oct 06, 01:01
x3tc

Post by Graxster » Mon, 24. Nov 08, 05:41

OMG, this looks like it really works! I mean, I guess it does, from the screenshot. :D It's been driving me crazy trying to keep an eye out for these skirmishes. Damn NPC's are destroying stations! Does this work all the time? I mean, I saw Argon's destroying a Paranid station in some Paranid sector, and there were no Paranid defenders at all. Does !fight.defend.sector only go out to NPC's in the current sector, or will they migrate? Thanks!

-Grax

ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh » Mon, 24. Nov 08, 06:10

Graxster wrote:OMG, this looks like it really works! I mean, I guess it does, from the screenshot. :D It's been driving me crazy trying to keep an eye out for these skirmishes. Damn NPC's are destroying stations! Does this work all the time? I mean, I saw Argon's destroying a Paranid station in some Paranid sector, and there were no Paranid defenders at all. Does !fight.defend.sector only go out to NPC's in the current sector, or will they migrate? Thanks!

-Grax
LOL, yeah it really works, actually been running this for some time now. Takes a while to test as you may imagine.

They indeed migrate from wherever they are. The Military Bases own a set of carrier ships (each with their own fighter groups), which they interrupt from whatever they are doing and send to invade sectors.

Both invasions and defending/protecting tasks are handled by !fight.defend.sector and are generally flagged by the Recon ships. Also, if a station is attacked it should call the nearest Military Base for any aid that it can spare (i.e. any carriers not currently running !fight.defend.sector).

So for defenders to appear there needs to be either a Recon ship visit, or a station to be attacked - *then* there is the question of if any ships are available to send. The carriers also don't seem to use jumpdrive, so if the sector is far away it could take a while for them to get there.

This plugin only flags ships that are sent specifically to invade. Ships that are sent to protect are not flagged.

Generally it takes several mins on SETA x10 for an invasion warning - and that is without the need for police license/property.

Kilrathi Avenger
Posts: 275
Joined: Fri, 6. Feb 04, 20:16
x3tc

Post by Kilrathi Avenger » Mon, 24. Nov 08, 07:58

Very cool 8)
Appears to work a treat :twisted:
"As I slide down the banister of life;
my job is just another splinter in the bum"

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7406
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain » Mon, 24. Nov 08, 12:07

Wow, this has implications beyond just your script. If we understand how invasions and stuff work, that means we can most likely edit them to work better or different. For instance, larger invasion fleets, or perhaps some kind of military economy where a race has fleets depending on how many military bases and sectors it has, etc. Also possibly adding jump drive capability to these fleets.

Chroniss
Posts: 155
Joined: Mon, 10. Nov 03, 21:15
x3tc

Post by Chroniss » Mon, 24. Nov 08, 12:12

BlackRain wrote: larger invasion fleets
Larger, and more of them in the short term would be nice. They are usually a single M7 with a few fighters and it happens like once every half hour at most in my game.

User avatar
TSM
Not a Moderator
Posts: 2947
Joined: Thu, 1. Jul 04, 12:31
x4

Post by TSM » Mon, 24. Nov 08, 14:07

Nice one :) keep them coming ThisisHarsh :) between you.Grax,LV,Cycrow and Lucike/Wyvern11 my game is brimming with scripts :D
FAQ's Egosoft Interactive FAQ
Egosoft Wiki

User avatar
Graxster
Posts: 817
Joined: Sat, 14. Oct 06, 01:01
x3tc

Post by Graxster » Mon, 24. Nov 08, 16:52

Chroniss wrote:They are usually a single M7 with a few fighters and it happens like once every half hour at most in my game.
Not in my game. Usually I see a Capital Ship with 20-40 followers. Last night the Paranid invaded Ore Belt with a Zeus, a bunch of M8, M7, M6, and assorted other craft. I "sent" in (read: teleported from a different sector) an Argon Titan, Colossus, and a few Centaurs. The Zeus and Colossus both bit the dust fairly early. The Titan was the winner in the end... I think some Otas may have helped out as well, since there's an HQ in Ore Belt.

It also seems like these events all happen at the same time, or nearly so. When I see a huge Paranid force assembling, for example, if I look around at other sectors, I'll see all the other races doing the same thing.

-Grax

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22201
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Mon, 24. Nov 08, 17:48

BlackRain wrote:Wow, this has implications beyond just your script. If we understand how invasions and stuff work, that means we can most likely edit them to work better or different. For instance, larger invasion fleets, or perhaps some kind of military economy where a race has fleets depending on how many military bases and sectors it has, etc. Also possibly adding jump drive capability to these fleets.
i've already posted mostly how the invasion/defence fleets actually work.

adding more numbers if a simple edit of the jobs file, or you can script in more if you want, you just have to homebase them and run the correct script and they will be used.

althou the ships *should* jump, and im not sure y they are not, which is partly the reason ppl dont see the defence reponse as often as they have to wait for them to fly

Chroniss
Posts: 155
Joined: Mon, 10. Nov 03, 21:15
x3tc

Post by Chroniss » Mon, 24. Nov 08, 23:13

I can't open the new !fight.defend.sector.pck file that your repacked for this script. The original works fine, but the new one you included says its an unrecognized format in both winrar & 7zip.

ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh » Mon, 24. Nov 08, 23:34

Chroniss wrote:I can't open the new !fight.defend.sector.pck file that your repacked for this script. The original works fine, but the new one you included says its an unrecognized format in both winrar & 7zip.
Just tried myself and same problem. I think it's caused by me using Exscripter to save the file. Modmanager can extract it fine, though.

Chroniss
Posts: 155
Joined: Mon, 10. Nov 03, 21:15
x3tc

Post by Chroniss » Tue, 25. Nov 08, 00:11

Ok, I will get those programs then. I'm not very good at scripting but I'm still gonna try to make those fights larger and more frequent. Are there specific areas of the script that pertain to that?

OK nm on the #'s, I see Cycrow's post about the Jobs file, but what about frequency?
Last edited by Chroniss on Tue, 25. Nov 08, 00:16, edited 1 time in total.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22201
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Tue, 25. Nov 08, 00:12

ThisIsHarsh wrote:
Chroniss wrote:I can't open the new !fight.defend.sector.pck file that your repacked for this script. The original works fine, but the new one you included says its an unrecognized format in both winrar & 7zip.
Just tried myself and same problem. I think it's caused by me using Exscripter to save the file. Modmanager can extract it fine, though.
this is most likly because exscripter is using the X3 format, where it both encycrpts and compresses the file, something that winrar/7zip etc wont be able to recognise.

however, most of the specific mod tools for X, mod manager, my catpck tool, etc should all work fine with them.

the game can also handle both formats without a problem.

there is an easier way to unpack them thou, just load the game edit the file and save it, it'll be saved as the unpacked xml file

ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh » Tue, 25. Nov 08, 00:56

Chroniss wrote:Ok, I will get those programs then. I'm not very good at scripting but I'm still gonna try to make those fights larger and more frequent. Are there specific areas of the script that pertain to that?

OK nm on the #'s, I see Cycrow's post about the Jobs file, but what about frequency?
I would look into the Recon ship scripts (start at !job.patrol.scout). If you follow the logic in there it will lead you to how the invasions and military base stuff in general works.

Personally I've been experimenting with one small alteration to the Recon ship script to make them scout more sectors belonging to other races, in the hopes it will retask more military base ships with invading rather than defending, giving larger invasion fleets (then use ttl's Race Patrols for the defense part).

The scripts have numbers in there for controlling the frequency of invasions. But bear in mind that there is a limited number of ships for invasions, so higher frequency = smaller invasions.

angrysquirrel
Posts: 267
Joined: Tue, 18. Nov 03, 00:46
x3

Post by angrysquirrel » Tue, 25. Nov 08, 01:51

very cool script dude! I'm adding it to my game!

kipstafoo
Posts: 86
Joined: Fri, 7. Nov 08, 00:08
x3tc

Post by kipstafoo » Tue, 25. Nov 08, 04:32

Awesome man... this has allowed me to confirm a theory: the invasions do very little. :P I've watched 8 so far... the highlighted ship gets into the middle of the target sector and then goes back to unhighlighted, the rest of the ships just hang out for a while and then disappear. I wonder if these invasions can be made to be more meaningful. :)

Kilrathi Avenger
Posts: 275
Joined: Fri, 6. Feb 04, 20:16
x3tc

Post by Kilrathi Avenger » Tue, 25. Nov 08, 05:35

kipstafoo wrote:Awesome man... this has allowed me to confirm a theory: the invasions do very little. :P I've watched 8 so far... the highlighted ship gets into the middle of the target sector and then goes back to unhighlighted, the rest of the ships just hang out for a while and then disappear. I wonder if these invasions can be made to be more meaningful. :)
In my game the action progresses in a similar way but sometimes all hell breaks loose and you end up with M8, M7, M6 and the occasional M1 or M2 kicking the hell out of each other.

My last occured in Elena's Fortune and comprised of

Paranid Argon

3 x M8 2 x M8
2 x M7 0 x M7
3 x M6 4 x M6
0 x M2 1 x M2
0 x M1 0 x M1

Joy :twisted: :twisted:
"As I slide down the banister of life;
my job is just another splinter in the bum"

ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh » Tue, 25. Nov 08, 05:47

Cycrow wrote:
ThisIsHarsh wrote:
Chroniss wrote:I can't open the new !fight.defend.sector.pck file that your repacked for this script. The original works fine, but the new one you included says its an unrecognized format in both winrar & 7zip.
Just tried myself and same problem. I think it's caused by me using Exscripter to save the file. Modmanager can extract it fine, though.
this is most likly because exscripter is using the X3 format, where it both encycrpts and compresses the file, something that winrar/7zip etc wont be able to recognise.

however, most of the specific mod tools for X, mod manager, my catpck tool, etc should all work fine with them.

the game can also handle both formats without a problem.

there is an easier way to unpack them thou, just load the game edit the file and save it, it'll be saved as the unpacked xml file
Actually, just did some testing: as you say, opened up ingame and saved, then repacked with modmanager and extracted... Same issue of not being recognized by 7zip. Appears modmanager is saving as the encrypted format.

Is there another (easier...) way of compressing xml to pck? Assumedly winrar/7zip can do it, but don't know what setting to use.

ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh » Tue, 25. Nov 08, 05:48

Oh and yeah it is weird how sometimes no attack takes place. Some freind-foe issue perhaps, I'll have to investigate...

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”