AS.Scripts (23/04/2005 13:27)

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

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

Posts: 333
Joined: Sun, 9. May 04, 12:03

Post by adam00 » Thu, 16. Jun 05, 08:10

Sure, you can use and modify my scripts :)

Posts: 13
Joined: Tue, 3. Feb 04, 22:54


Post by Kraki » Mon, 20. Jun 05, 06:18

I've been having some trouble with the traveling trader script.. whenever i initialize it it get an error. i've tried reinstalling it but still no luck. any ideas?

Posts: 5
Joined: Sat, 24. Jul 04, 17:22

AS.Guard misbehaving

Post by SGWB » Thu, 25. Aug 05, 04:55

I'm having a lot of trouble with the AS.Guard scripts lately. Instead of sitting in their home sector, they are wandering. When I first set up AS.Guard it worked correctly, but suddenly they have started to wander. They travel 2 sectors away and then jump back to their home. They are only stopping to refuel when they need the energy to return home.

Has anyone else had this problem?
Last edited by SGWB on Tue, 6. Sep 05, 10:14, edited 1 time in total.

Posts: 5
Joined: Sat, 24. Jul 04, 17:22

AS.Guard misbehaving - solution found

Post by SGWB » Tue, 6. Sep 05, 10:13

So I think I found a solution to my problem.

WARNING - I am a true novice scripter - follow my example at your own risk!!

It appears to be a problem in the AS.Guard.find.fuel.seller.xml script. At the top of this script it says:

if $Emergency ...
$Range = 0 ...
$Range = 9 ...

I changed "$Range = 9 ..." to "$Range = 0 ..." It seems to have fixed the problem. Here is my reasoning.

In experimenting with this problem, I figured out that it was a probem with the fuel gathering behavior. If I used my transporter device to fill an AS.Guard enable ship to the gills with energy cells. it would stop moving and wait for an enemy to crop up, just as it should. But after using a few cells, it would start misbehaving again. I also found that by turning off the "Deliver fuel for Guard" command on an M6's supply ship, the M6 would start going from SPP to SPP, all in one sector, pausing for a few moments at each one untill the supply ship was reenabled.

Then I tried a "manual refuel of guard" command on the M6. It traveled half way across the galaxy to one of my SPP's and filled itself. More importantly, it took the same path as when it was using the automatic refuel behavior.

So, it seems that the guard was trying to fill up at the cheapest source, but that was my own SPP 9 sectors away! I have all my guards configured with a jump range of 2 sectors. The guard was seeing my SPP, travelling towards it, noticing that it had reached the maximum jump distance from it's home base, and jumping back. Repeat indefinately...

So by changing $Range to equal 0, the guard will never leave the current sector to find fuel. I'm sure the proper solution is to set $Range to the guard's jump range, but I don't know how to do that 'cause I'm a novice :)

User avatar
Posts: 52
Joined: Wed, 18. Feb 04, 08:34

Can these changes be implemented now?

Post by LifeMatrix » Mon, 9. Jul 07, 07:08

I realise that by now most members have either moved on to playing X3 or other games. And it seems the majority of X2 players remaining now are satisfied in sticking with the signed scripts in the Bonus Pack. But I'm sure quite a bit of effort and ingenuity went into these scripts. They could still be useful. And, to be fair, 2 years is really not that long ago.

Is there any chance that adam00 (or someone else) might implement some of the proposed changes and bug fixes that were talked about? Most of the changes and bug fixes were very specific. And in a couple cases the exact changes to code were specified.

From the dates of the last releases of files, it seems none of these plans were implemented:

adam00 wrote (4. Sep 04, 22:04):
happykoala wrote:
For complex buying according to the readme

"2) find supplier of ware in defined suppliers or factories of complex
3) if there is no "inside" supplier will search for outside supplier using parameters of gived factory (max price, jump range), searching algorithm with detection of collisions - players ships will not fly to same station for same purpose"

Will there be detection of collisions for inside factories or only outside suppliers?

Also I reduce all my factories $ to zero and my transports stop buying stuff. What am I doing wrong with the using personal $ instead of station $?
a) "Collisions detection" work for inside factories as well.
b) I fixed "buying algorithm" but main loop choosing what to buy still checks money of complex and of course decide not to buy anything, my mistake :oops: I will fix it soon.
adam00 wrote (6. Sep 04, 13:05 ):
Do you think that AS.BuyRareGoods shouldn't buy from players factories? I could make it this way, but I am not sure if it is best option.
I think it would have been neat if this could be made an optional choice. Something that could be configured? Or perhaps two different commands to choose from?

adam00 wrote (8. Sep 04, 08:37):
Found a few bugs in AS.Complex 1.03

1. TP ships will still try to transport/sell XL size goods (i saw it happen with silicon)... they go to the station, find out they cant move it, try again..etc. waste time.
2. [Balance Selling Depots] appears with just TradeCommandMK1
3. Still trying to hunt down a bug where the complex configuration gets corrupted (cut down to only a few fabs, like 5 out of 12)
1) Well, I will fix this.
2) Strange - you should need MK1 + MK2 + Jumpdrive - I have to check it.
3) I will try to find it too.
adam00 wrote (8. Sep 04, 23:19):
Ok i think i tracked the bug down: .....
I should (and I will) modify code of this "parallel" commands, they are self-modifing its configuration, they shouldn't...
It seems like, in it's day, AS.Complex was a leading choice for Trade/Station Management. Perhaps, if things had gone differently, we might have had AS.Complex as part of the Bonus Package? If it weren't for some of these nasty bugs, I'd be tempted to use it.

adam00 wrote (8. Sep 04, 08:37):
2) hrm... err... ok... like, maybe... you could... make the script think all sectors in patrolling area with stations are primary sectors?

As it is you have to split up your forces to cover a few bases properly... but if it considered all station-sectors to be primary, i could have all the ships stationed in Argon Prime and serving ALL my stations in the main Argon Quadrant.

At the moment i can't do it or i'll find my ship from Power Circle (my BPH training facility) fighting in Seizewell

Do you think this is a good idea?
I think I could change the way of scaning, split it to 3 stages: a) only sector with factories, b) sector with flying player ships, c) rest of sectors.
adam00 wrote (8. Sep 04, 23:19):
Perhaps then the threat assesment code should be able to call for 2 M6s if it detects a large threat and there are no M2s available?

... Is this doable from your side? it seems that you aim to make your scripts as flexible as possible (and its great) and this would certainly make it more flexible.
This kind of cooperation will be hard to do, but who knows, maybe I try to do it :)
Combined, I think these two changes and a few minor alterations might have made AS.Guard a viable alternative to "Basic Patrol Commands" (aka Marks fight software Mk3). It still would't be as sophisticated, of course. But sometimes simplicity is prefered - esp. if it gets the job done.
"I'm going to hang up this phone and then I'm going to show these people what you don't want them to see. I'm going to show them a world without you. A world without rules and controls, without borders or boundaries. A world where anything is possible." - Neo, The Matrix

User avatar
Posts: 52
Joined: Wed, 18. Feb 04, 08:34

All it needs is a little polish...

Post by LifeMatrix » Mon, 9. Jul 07, 07:10

adam00 wrote (17. May 05, 16:17):
This "command slot thing by Egosoft" is pice of cr..p :evil: It could work if the only new scripts was developed by Egosoft itself.

But we have now so many usefull independent scripts that it is not posiible to avoid conflicts :cry:

Well, if script editor does not scary you too much, you can try to modifiy my script to avoid conflicts with other scripts you use.
Red Spot wrote (17. May 05, 16:40):
"editing" ..

just combine scripts ( actually .. wares/upgrades ..)

I've got about 8 scripts all using FC MK III (but did make the ware about 1.5mil io about 800.000Cr)
This would have been neat... If all these scripts were combined into an AS.Script, perhaps it would be easier to avoid conflicts with other scripts and mods?

SGWB wrote (25. Aug 05, 04:55):
I'm having a lot of trouble with the AS.Guard scripts lately. Instead of sitting in their home sector, they are wandering...[snip]

SGWB wrote (6. Sep 05, 10:13):
So I think I found a solution to my problem.

WARNING - I am a true novice scripter - follow my example at your own risk!!

It appears to be a problem in the AS.Guard.find.fuel.seller.xml script. At the top of this script it says:

if $Emergency ...
$Range = 0 ...
$Range = 9 ...

I changed "$Range = 9 ..." to "$Range = 0 ..." It seems to have fixed the problem. Here is my reasoning...[snip]
Is this bug/problem encountered by others? :?:
Can anyone else confirm these changes? :|

X2 RULEZ! :x2:

Posts: 170
Joined: Wed, 10. Mar 04, 23:16

Post by xxx73 » Sat, 8. Dec 07, 02:24


I have a guestion about As.Complex.

I have a complex of 5 Solar plants in different sectors. What I want to to is to distribute crystals that is bougth by other ships (with Advance Trade Command Software MK1), so that no factory run out of crystals. How do I do that?


User avatar
Divine Shadow
Posts: 391
Joined: Sat, 30. Aug 03, 15:40

Post by Divine Shadow » Mon, 11. Mar 13, 11:06

Hey all the links are broken here...

Maybe X2 is obsolete to you but im still interested in it i want these scripts.

I want the "AS.JumpingTrading v1.05"

Is there somebody who can send it or give a working download link? Surely somebody must still have it....

Maybe somebody who mods X3 now might see this and have these scripts?

People shouldn't let scripts for X2 etc just *disappear* we should try harder to have good repositories so in future when people are looking for scripts such as Terran Conflict or X2 they wont be greeted by "Hey mate them games are old omg you will never find a X2 and TC script" then the person is like wtf?? do you remember TC rebalanced mod??? "Yea what 10 years ago? who cares go play X5".

We cant let that kind of thing happen... This X2 section is quite frankly appalling so many mods and scripts seem to be lost forever.....

I was also looking for X-Tension mods and tools and they are like the golden eggs impossible to find how did it come to that we must preserve this older stuff.

Just because the game is old doesn't make it shit i was playing X-Tension today egosoft even made a patch that makes the game run nicely on Windows 7 etc.

Anyway im looking for this guys scripts specifically the autotrader one if i remember correctly it was a pretty nice one (i liked it better than the MK3 back in the day) hopefully he will see this or somebody who has them will.

If you have the scripts e-mail at:
<Email address removed..

I will also accept other rare scripts hell you can zip up your entire X2 script collection and send me it i wil just stick it on my website for eternity.

You can send my X-Tension mods and tools too if you want lol.


{Email address removed from view, ask that respondents PM you. - Terre}
-Down with the Split !!!!!
-Rolk's asteroid :P :lol:

Posts: 1
Joined: Thu, 28. Mar 13, 04:46

Post by Scinfaxy » Thu, 28. Mar 13, 05:21

OMG I had damn bug, that didn't want open the answer window when I click on "Post Reply" but that redirect me to the main... wtf ? <FAQ here. Alan Phipps>

Anyway for people who looking for this scipt I found it on 4share, I didn't test them but it sounds good. It's free but the only thing it's you have to make a free register. Here the links:

AS.Antymissiles v1.01 (Combat) : ... s_v101.htm

AS.Complex v1.03 (Trading) :

AS.BuyRareGoods v1.02 (Trading) : ... s_v102.htm

AS.Guard v1.11 (Combat) :

AS.turret.Guard v1.10 (Combat) : ... d_v110.htm

AS.JumpingTrading v1.05 (Trading) : ... g_v105.htm

AS.Cashier v1.01 (Trading) :

AS.Maintain.Quantity v1.02 (Trading) : ... y_v102.htm

AS.TravelingTrader v1.01 (Trading) :
>> I'm quite sure it's on 4shared too cause the guy uploaded 9 files (like the 9 scripts) but cause of this messy title's name I wasn't able to found it. :shock: If you're more lucky please share here.

Greetings and regards to "smyth" who uploaded thes files it on this site. Hope it can help other guys who look for this scripts like me.

Posts: 15
Joined: Mon, 6. Nov 06, 12:12

Post by Hiroshi_Sakura » Tue, 1. Oct 13, 11:50

Does anyone knows where to download these scripts now?
I don't want to register on 4shared.

User avatar
Posts: 589
Joined: Fri, 27. Mar 09, 22:38

Post by SS_T » Wed, 16. Oct 13, 14:50

I just checked and I actually have these on XDownloads:
(other x2 files @ ... Itemid=116)

AS.Antymissiles v1.01 (Combat) :

AS.Complex v1.03 (Trading) :

AS.BuyRareGoods v1.02 (Trading) :

AS.Guard v1.11 (Combat) :

AS.turret.Guard v1.10 (Combat) :

AS.JumpingTrading v1.05 (Trading) :

AS.Cashier v1.01 (Trading) :

AS.Maintain.Quantity v1.02 (Trading) :

AS.TravelingTrader v1.01 (Trading) :
Last edited by SS_T on Thu, 26. Nov 15, 18:44, edited 3 times in total.
New XDownloads:

Posts: 1
Joined: Sat, 19. Sep 15, 07:02

Post by Womble13579 » Sat, 3. Oct 15, 14:03


Has anyone got working links to these mods?

Thank you! :)

User avatar
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 20865
Joined: Sun, 2. Apr 06, 16:38

Post by X2-Illuminatus » Mon, 5. Oct 15, 10:46

The links posted by Scinfaxy three posts above yours still seem to work. Alternatively SS_T mentioned the scripts would be on While his posted links don't work, you can get the files from the X2 The Threat Script Overview.
Besteht Interesse an einem Nopileos-Hörbuch?

Farnhams Legende und Nopileos als E-Books!

"People who think they know everything are a great annoyance to those of us who do." - Isaac Asimov

"If it's not impossible, there must be a way to do it." - Sir Nicholas Winton

User avatar
Posts: 589
Joined: Fri, 27. Mar 09, 22:38

Post by SS_T » Wed, 21. Oct 15, 14:32

updated previous post with working links
New XDownloads:

Post Reply

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