EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
AS.Scripts (23/04/2005 13:27)
Post new topic Reply to topic Goto page Previous  1, 2, 3, 4, 5  Next
View previous topic :: View next topic
Author Message
adam00





Joined: 09 May 2004
Posts: 333 on topic
Location: Torun/Poland
Thank you for registering your game
PostPosted: Tue, 7. Sep 04, 11:52    Post subject: Reply with quote Print

Well done Very Happy

I think that you do not realy need as much as 8 TS for inside transport, if factories are close, 4-5 should do the job.

Using commands from AS.Complex (but moustly parallel transport/supply) I have created Mega-Complexes in "Ore Belt" (using moust of asteroid resources) and "Roncor's Clouds" (using all risonable (yield >25) asteroids).

In different sectors I have small loops producing Crystals (without SPP - energy for outside), and many different products too (weapons for example).

Thanks to this scripts I have much less ships than factories Very Happy Well, and I don't realy lose them to Khaaks (AS.Guard Smile ).

Back to top
View user's profile Send private message
creidiki





Joined: 15 Apr 2004
Posts: 472 on topic
Location: Milan, Italy
Thank you for registering your game
PostPosted: Tue, 7. Sep 04, 19:48    Post subject: Reply with quote Print

Just passing through, a couple of quick notes on AS.Guard:

1) Perhaps a bit of fine-tuning on the threat-detection? I have 2 Centaurs and a Ray serving the Ore Belt area (one of the Centaurs is centered on Ore Belt).

Yesterday I saw a lone Centaur (stationed in Argon Prime) go up against a Large Khaak Cluster - with predictable results. it died - while the other Centaur and the Ray hung around my SPPs filling up. Confused

... Either the code didnt value an LKC as dangerous enough, or you should make the code wait for the ships to assemble before sending them into battle, i've already lost 2 Centaurs this way Crying or Very sad

----------

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 Laughing

Do you think this is a good idea?

----------

Anyhoo, as always, great script, and keep up the good work! Very Happy

leo

PS: AS.Complex .03 just ran through a 12hr 10xSETA session... and I halved my ship count from my SDS setups! Very Happy However i'd still kill for an 'inside transport only mode'... Crying or Very sad maybe i'm just wierd Rolling Eyes


_________________
I am not as think as you drunk I am.
Back to top
View user's profile Send private message
creidiki





Joined: 15 Apr 2004
Posts: 472 on topic
Location: Milan, Italy
Thank you for registering your game
PostPosted: Wed, 8. Sep 04, 04:19    Post subject: Reply with quote Print

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. Mad
  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)


now to do what ive been meaning to do all along...sleep

leo


_________________
I am not as think as you drunk I am.
Back to top
View user's profile Send private message
adam00





Joined: 09 May 2004
Posts: 333 on topic
Location: Torun/Poland
Thank you for registering your game
PostPosted: Wed, 8. Sep 04, 08:37    Post subject: Reply with quote Print

Quote:
Just passing through, a couple of quick notes on AS.Guard:

1) Perhaps a bit of fine-tuning on the threat-detection? I have 2 Centaurs and a Ray serving the Ore Belt area (one of the Centaurs is centered on Ore Belt).

Yesterday I saw a lone Centaur (stationed in Argon Prime) go up against a Large Khaak Cluster - with predictable results. it died - while the other Centaur and the Ray hung around my SPPs filling up.

... Either the code didnt value an LKC as dangerous enough, or you should make the code wait for the ships to assemble before sending them into battle, i've already lost 2 Centaurs this way


Well, the Guards especialy don't fight in same sector, unless it is homesector or 5 min passed. If your Centaurs get killed, well maybe they should fly in pairs, the problem is that the one set to protect the Guard will not refuell automaticly, solving this in "AS.Guard" code is big thing to do. But I think there is a way, on this forum was described some "delivery" script for TS, this script can deliver to your ships flying in space things like energy or missiles.

Quote:
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.

Quote:
PS: AS.Complex .03 just ran through a 12hr 10xSETA session... and I halved my ship count from my SDS setups! However i'd still kill for an 'inside transport only mode'... maybe i'm just wierd


There is some kind of "inside only transport": the transport and supply commands for parallel factories, check it out.

Quote:
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 Smile - you should need MK1 + MK2 + Jumpdrive - I have to check it.
3) I will try to find it too.

Back to top
View user's profile Send private message
creidiki





Joined: 15 Apr 2004
Posts: 472 on topic
Location: Milan, Italy
Thank you for registering your game
PostPosted: Wed, 8. Sep 04, 21:33    Post subject: Reply with quote Print

Ok i think i tracked the bug down:

I set up AS.Complex ships to service a 2-3 power loop (150% sun so you need 3 crystal fabs for 2 SPPs for full output)

Factories:
SPP Alpha, Beta
Cattle Alpha, Beta, Gamma
Cahoona Alpha, Beta, Gamma
Silicon Mine Alpha, Beta, Gamma
Crystal Fab Alpha, Beta, Gamma

Supplyers
SPP Alpha, Beta

Once i set it to (transport and supply for parallel factories)

Once the ships reach the homebase (SPP Alpha) the configuration for all of them (there's 9) becomes:

Factories:
SPP Alpha, Beta

Supplyers:
Crystall Fab Alpha, Beta, Gamma

... the ships transfer the crystals, let the rest of the complex go to the rats and the whole thing grinds to a halt.

Am I doing something wrong? (if so add it to the readme).

----------

1.03 and already it's quite impressive as far as functions and stability.. i'm very impressed Very Happy ... bugs like this are to be expected considering the complexity and the flexibility of the script... i hope you werent expecting to get a "stable" version anytime soon tho Razz

*bows to king adam00*

----------

adam00 wrote:
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.


That would do the trick perfectly.

----------

adam00 wrote:
Well, the Guards especialy don't fight in same sector, unless it is homesector or 5 min passed.


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.

----------

If you tell me how to identify when a Guard is not in combat, i'll make this companion script that's been rolling around my head all night (so much i couldnt sleep enough Surprised )

It's based on the combat-drone delivery for Transport script i use, but it will deliver wasp (or dragonfly) missiles to guards.

Of course knowing when the guard is not in combat isnt necessary, but since it would have to get within 5km to beam the missiles over if it did it during combat it would a have a very low ship-half-life Sad

----------

Can i use your array sorting code in that satellite RePlaceNET script i was musing about before? It'd certainly make my life simpler - once i figure out how it works.

leo - wondering how much time he can spend scripting when he gets back home.


_________________
I am not as think as you drunk I am.
Back to top
View user's profile Send private message
adam00





Joined: 09 May 2004
Posts: 333 on topic
Location: Torun/Poland
Thank you for registering your game
PostPosted: Wed, 8. Sep 04, 23:19    Post subject: Reply with quote Print

Quote:
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. However it is consequence of how this commands work.

Parallel supply/transport command can work only for "parallel" factories, such factories have to be same kind (and race), main factory of Complex is very important, factories of its kind will be handled, other can be only suppliers (even if added as normal factory), if factory can't supply main factory then will be removed.

How you should configure your complex:

Ship 1:
F: Crystal Fab Alpha, Beta, Gamma
S: Silicon Mine Alpha, Cahoona Alpha, SPP Alpha

Ship 2:
F: Cahoona Alpha, Beta, Gamma
S: Cattle Alpha, SPP Alpha

Ship 3:
F: Cattle Alpha, Beta, Gamma
S: SPP Alpha

Ship 4:
F: Silicon Mine Alpha, Beta, Gamma
S: SPP Alpha

Ship 5:
F: SPP Alpha, Beta

Products of each level will be concentrated in "Alfa" factories. Concentration of Energy in SPPs is not necessary, but then you have to specify both SPPs as suppliers for each level.
The command for each ship should be "Transport and supply for parallel factories...". The "Crystal Fab" level may need second ship, but then with command: "Supply and transport for parallel factories...". You may need second ships to some other levels (Silicon maybe) if distances to travel are long.
For SPPs you will need one "Outside only supply of complex..." ship to buy Crystals. For selling: enable selling only in "Crystal Fab Alpha".

This way you can run 14 factories with only 6 ship Very Happy (Well, maybe 7-8 with bad winds).

Quote:
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 Smile

Quote:
If you tell me how to identify when a Guard is not in combat.....

There is special global variable named: "ASGuardBusySectors", if Guard is in fight it is in this array, for details you can look in "AS.Guard.BS...." scripts. But after 5 minutes the ship can be removed from this array, as second check you can check if "$Guard -> get attack target" return null, if it is null ship probably is not fighting. Well, of course I can add to script "AS.Guard.clean.sector" setting some local variable to [TRUE], for example "FighintNow", of course this variable will be valid only if "$Guard -> get command" returns COMMAND_AS_GUARD.

Quote:
Can i use your array sorting code in that satellite RePlaceNET script i was musing about before? It'd certainly make my life simpler - once i figure out how it works.


Yes you can Very Happy

How it works (part of "AS.find.buyers" script):

building array which will be sorted - "row" is made of 4 "fields"
Code:

99    loop ....
....
103      append $Station to array $FoundArray
104      append $Price to array $FoundArray
105      append $enough to array $FoundArray
106      append $jumps to array $FoundArray
.....
112   end


building comparing description array - size have to be size of "row"
Code:

116   $CmpArray =  array alloc: size=4
117   $CmpArray[0] = 0
118   $CmpArray[1] = -1
119   $CmpArray[2] = -1
120   $CmpArray[3] = 1
121 @ = [THIS] -> call script 'AS.ArrayQSort' :  Array=$FoundArray  CmpArray=$CmpArray


mining of parameters:
0 - no sorted: just some data
1 - sort order ascending
-1 - sort order descending

sorting order of "field" in row is defined by its "position": 0 - first, 1 - second, etc.

Back to top
View user's profile Send private message
creidiki





Joined: 15 Apr 2004
Posts: 472 on topic
Location: Milan, Italy
Thank you for registering your game
PostPosted: Thu, 9. Sep 04, 00:27    Post subject: Reply with quote Print

adam00 wrote:
I should (and I will) modify code of this "parallel" commands, they are self-modifing its configuration, they shouldn't. However it is consequence of how this commands work.

[...]

This way you can run 14 factories with only 6 ship (Well, maybe 7-8 with bad winds).


Aaaahhh.... ok, now i get it! *smacks forehead* so its kind of like.. an SDS on steroids.

Add it to the readme, cause it ain't clear @ all.
Laughing

----------

adam00 wrote:
This kind of cooperation will be hard to do, but who knows, maybe I try to do it. Smile


That's all i can ask. I'm certainly not confortable enough with the scripting language to even understand the problem from a programming side. maybe in a while.

----------

adam00 wrote:
[...]Well, of course I can add to script "AS.Guard.clean.sector" setting some local variable to [TRUE], for example "FighintNow", of course this variable will be valid only if "$Guard -> get command" returns COMMAND_AS_GUARD.


Yeah... that would make it a LOT easier. in fact, it would make it straightforward:

[LOOP]
01 Find Guards low on missiles
02 If no guards low on missilies, fill bay of supplyer with missiles, keep scanning guards (1nce every 30 seconds)
03 ELSE
04 If the Guard is NOT Fighting, jump/move TO Guard
05 -> WHILE Moving check (every 30 seconds a good delay you think?) if guard starts fighting, IF so break
06 IF Supplyer is low on missiles refill
07 wait (30 seconds again?)
[/LOOP]

6 steps. shouldnt really be more complicated than that structurally. Cool

explain to me how you use your collision detection thingummys, that way if you have more than 1 supplier they wont all go for the same guard.

----------

[lots of blah blah blah about the array code]

..errr... damn. it late and i have a long flight tomorrow. but ill take a look @ it when im back in edinburgh and ive got my whole setup in front of me, playing on a laptop sitting on a bed aint the most confortable way to play X2, or script. Crying or Very sad

think ill get the missile supplier out of the way first so my centaurs will get killed less. Wink

leo - being eaten alive by venice's mosquitoes Shocked


_________________
I am not as think as you drunk I am.
Back to top
View user's profile Send private message
hst





Joined: 26 Apr 2004
Posts: 178 on topic
Location: South Africa
Thank you for registering your game
PostPosted: Thu, 9. Sep 04, 11:56    Post subject: Reply with quote Print

AS.BuyRareGoods is just what I was looking for.

Thanks and great job. Very Happy

Back to top
View user's profile Send private message MSN Messenger
adam00





Joined: 09 May 2004
Posts: 333 on topic
Location: Torun/Poland
Thank you for registering your game
PostPosted: Fri, 15. Apr 05, 01:01    Post subject: Reply with quote Print

New script: AS.Antymissiles v1.00

Details and link do download in first post.

Back to top
View user's profile Send private message
Galaxy613





Joined: 28 Dec 2004
Posts: 2517 on topic
Location: USA, VA
Thank you for registering your game
PostPosted: Fri, 15. Apr 05, 02:10    Post subject: Reply with quote Print

Surprised This is a old topic... like old old. So old I don't know you, old. What brings you back to X2? Or do you really reside in a different langage forum?


_________________
10,000 Lightyears of awesomeness
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
adam00





Joined: 09 May 2004
Posts: 333 on topic
Location: Torun/Poland
Thank you for registering your game
PostPosted: Fri, 15. Apr 05, 07:59    Post subject: Reply with quote Print

Well, sentiment and need for fun Smile

Back to top
View user's profile Send private message
AdmiralTigerclaw





Joined: 27 Dec 2004
Posts: 2068 on topic
Location: Subspace Office
Thank you for registering your game
PostPosted: Fri, 15. Apr 05, 08:35    Post subject: Reply with quote Print

Well, I can say you came to the right place. Some of my favorite station managing scripts are the AS complex commands. Although I think it would be good if they could support more than one kind of downstream factory. (You can have multiple SPPs, or multiple ORE mines, or multiple fabs on the down stream, but only ONE of those types... Not multiple SPPs and maybe a mine over here...)

Ah... a day in universe building.


_________________
Fleet Command
Galaxy Command Fleet Authority

"Escalating a war was NOT how I envisioned this vacation..."
Back to top
View user's profile Send private message Visit poster's website AIM Address
adam00





Joined: 09 May 2004
Posts: 333 on topic
Location: Torun/Poland
Thank you for registering your game
PostPosted: Fri, 15. Apr 05, 08:49    Post subject: Reply with quote Print

AdmiralTigerclaw wrote:
Although I think it would be good if they could support more than one kind of downstream factory. (You can have multiple SPPs, or multiple ORE mines, or multiple fabs on the down stream, but only ONE of those types... Not multiple SPPs and maybe a mine over here...)


I am not soure exactly which command from AS.Complex do you mean? You can now organise transport in many diffrent ways.

I should rework this script soon, it may not work properly with moded fabs. And it really nead "auto-restart after update" feature.

Back to top
View user's profile Send private message
AdmiralTigerclaw





Joined: 27 Dec 2004
Posts: 2068 on topic
Location: Subspace Office
Thank you for registering your game
PostPosted: Fri, 15. Apr 05, 09:03    Post subject: Reply with quote Print

Add factory to Complex command. I can only add one 'type' of fab to the complex. If I attempt to add say, a Cahoona bakery to a 'complex' running with argnue cattle ranch as the 'product' side... it will ignore it... where as I can add as many cattle ranches as I so desire.

Add supplier works just fine.

I remember what I was doing now.

Trying to assign one ship to ferry E-Cells from a SPP to all the fabs in the sector. Since I had ORE mines and Silicon Mines, I had to set up two express ships for each set. *Since power was easily ferried, I wanted to use as few ships as possible to keep the fabs up and running. And just use a few power runners to ferry power to any factory in the sector that needed it.*


_________________
Fleet Command
Galaxy Command Fleet Authority

"Escalating a war was NOT how I envisioned this vacation..."
Back to top
View user's profile Send private message Visit poster's website AIM Address
adam00





Joined: 09 May 2004
Posts: 333 on topic
Location: Torun/Poland
Thank you for registering your game
PostPosted: Fri, 15. Apr 05, 13:15    Post subject: Reply with quote Print

>>AdmiralTigerclaw

After adding factories using "Complex - add factory" command and supplier SPP using "Complex - add supplier" you should start "Outside supply of complex and transport..." if you set "Supply and transport for parallel factories..." or "Transport and supply for parallel factories..." it is for different purposes, it will supplay set of same factories and cumulate production in main factory.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic Goto page Previous  1, 2, 3, 4, 5  Next
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Control Panel
Login Data
The time now is Mon, 23. Apr 18, 05:52

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2018
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.13766 seconds, sql queries = 29