[Script] Automated wares transfer universewide

The place to discuss scripting and game modifications for X³: Reunion.

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

What do you think of the Station Freight Transporter?

It's great
6
55%
Good
3
27%
Average
0
No votes
Not so good
0
No votes
It sucks
2
18%
 
Total votes: 11

Tomcat
Posts: 53
Joined: Mon, 22. Dec 03, 05:30
x3tc

[Script] Automated wares transfer universewide

Post by Tomcat »

Station Freight Transporter V1
----------------------------------

This script automatically 'beams' products from your stations to other stations which needs them as resource. The station which is most in need of the ware gets it first from the producing station that has the most units available.

Stations that are in need of a resource only get wares if the resource amount is under 20%.

It basically works like a complex, just without the pipes and the need of freighters. In the universewide version you can have a cahoona bakery in Argon Prime and a cattle ranch in Seizewell, the cahoona bakery will get its argnu beef from the ranch in Seizewell.

The script does not buy any resources and it doesn't take wares from npc factories. So you will need to have the production kicked on, like you need to provide energy cells for the cattle ranch and the cahoona bakery (unless you have a spp somewhere).

The script might affect your performance, depending on how many factories you have. The loop time is set to 60 seconds. If it runs well for you, you might want to adjust it by changing the number in line 3 of the script.

There's also a pause in the script when you start it, the first transfers will be made after about a minute.

You need to run the script manually from the script editor, it doesn't need any arguments. To disable the script, execute the mts.DisableStationFreightTsp script. It will shut off after a minute in worst case.

Please let me know what you think of it, and if there're any problems.

Download the universewide version here

Download the single sector version here

Please give me some feedback, even if you don't like, let me know and i will see if i can change it.

EDIT: I didn't test how it works with complexes yet. It works with factories that are not in a complex, but it might work with complexes (i knew i would forget something when testing :oops: ).
Last edited by Tomcat on Thu, 2. Feb 06, 21:55, edited 1 time in total.
User avatar
Birdman
Posts: 508
Joined: Sat, 10. Jan 04, 09:07
x3

Post by Birdman »

Had time for just a quick check, but it seems to work with complexes also. You may want to add that you need to select one of your stations or hubs when you run the script (null does NOT work). The game I checked has 1 station of each type (plus extra crystal and both types of food fabs, to have additional resources available) hooked together in one big complex for each race, each race in a different unknown sector.

I will check my other saved game, where I have destroyed the hubs, when I get a chance.
B-O'F
Posts: 724
Joined: Sat, 21. Feb 04, 02:15
x3tc

Post by B-O'F »

Hi Tomcat,

Have just tried this script, and it works - some may say it works too well, but I like it - beats the s**t out of my old X2 version.

Boron Ol Fh'art
Public Service announcement

Growing old is not a disease - it is a delayed symptom of birth trauma.
Tomcat
Posts: 53
Joined: Mon, 22. Dec 03, 05:30
x3tc

Post by Tomcat »

@Birdman: When i select null, it works for me, it shouldn't need any initialization by user since it takes the station info from the get station array for race function, but i will look into it.

@M N Lawrence: Yes, it's maybe too powerful. I mainly wrote it so i don't have to mess with complexes anymore and to save the micromanagement when not using complexes.

BTW, if anyone votes for that the script sucks, please let me know why, if people think that it sucks because it feels like cheating, or because it might have an impact on your games performance, please let me know, i can take it :lol:
User avatar
Birdman
Posts: 508
Joined: Sat, 10. Jan 04, 09:07
x3

Post by Birdman »

Did you run it from the ship you were in, or from a station?
I was in my Collosus, and just ran it from there. Maybe 2 minutes wasn't long enough for the script to catch up with the majaglit I removed form the station. But when I ran it from a complex hub, it took less than a minute to get the 6666 Massom powder I removed replaced. Hard to tell, I had just a few minutes to play with it. Still haven't had a chance to run it on the broken complexes ( so it's just the stations). Started a new job today, so had to get ready for it. :D

This IS a very powerful script, and I think that I would NOT use it for my regular games. For my scripting game, it's GREAT as it keeps me from having to keep checking my complexes, and also keeps me from having to buy LOTS of ships for the game I killed the complexes in.
B-O'F
Posts: 724
Joined: Sat, 21. Feb 04, 02:15
x3tc

Post by B-O'F »

Hi Tomcat,

I like the script for the same reasons that you do.

If you want to do some more development on the idea, and get more people to accept it:-

- how about making a 'single sector only' version and tying it to an expensive upgraded transporter device to be placed in a station.

- or making a version that will send goods to a player-owned Equipment Dock or Trading Station

This will be more work for you - if you choose to accept it. For me, I am happy with it as it is - it just works, and works very very well.

Boron - Ol Fh'art
Public Service announcement

Growing old is not a disease - it is a delayed symptom of birth trauma.
Harabec Weathers
Posts: 46
Joined: Fri, 2. Dec 05, 03:28
x3

Post by Harabec Weathers »

i really dislike the way complexes are handled at the moment in X3. Every time I try to link more than three stations together the game crashes. That being said...
M N Lawrence wrote:- how about making a 'single sector only' version and tying it to an expensive upgraded transporter device to be placed in a station.
I would download and use your script in a heartbeat if these two were implemented. The universe-wide one is a good idea, but it seems like it would make the game too easy. If you made it single-sector only, I would imagine it would improve performance because the "searching for needed resources" loop would only loop through stations in the sector and not every station you own. (I haven't installed your script yet, but that's what would happen logically.)

Also, if possible, a station upgrade somehow would be very nice. If it costed somewhere around 500,000 creds, it would prevent people from casually purchasing thousands of 'em at a time. Or, on a completely different note, how about making the person buy a complex hub (literally the hub, not a kit) and placing it in the sector. If you place it, theoretically it should have the hub without the pipes but would activate the script.

Either way, the single-sector-only would be motivation enough for me to install the script. The other suggestion(s) are just icing on the cake.
"I never think of the future. It comes soon enough." - Albert Einstein
Tomcat
Posts: 53
Joined: Mon, 22. Dec 03, 05:30
x3tc

Post by Tomcat »

i will make a single sector version in a few minute. About tying it to a ware or a station upgrade, i will have to look into it, since i didn't do that kind of stuff yet :).

Another idea would be to raise a fee when something is transfered. like 1 credit/unit transfered. Then transfering 25k energy cells would cost 25000 credits. Dunno what a good value would be, suggestions are welcome :)
Tomcat
Posts: 53
Joined: Mon, 22. Dec 03, 05:30
x3tc

Post by Tomcat »

A single sector version is available for download. I will take a closer look on the other features, but it can take up to next week since i'm moving.
Seven05
Posts: 148
Joined: Wed, 23. Nov 05, 19:53
x3

Post by Seven05 »

My "ideal vision" would be a trading station that would handle all of the transfers between the other factories/complexes while at the same time being configured to keep any excess wares at the trading station itself. This way I could not allow other races to dock at the individual factories but I could allow them to dock at the trading station. That would allow me to have ST's & UT's using my stations, NPC traders buying my excess wares and not having to worry about NPC traders buying or selling stuff I don't want them too.

Of course even if you only use the trading station as a requirement it'll keep the purists quiet if you care. I'd just like to see a reason for buying and using those things other than storage (and claiming sectors with another script).
random50
Posts: 283
Joined: Fri, 23. Dec 05, 14:43
x3

Post by random50 »

Excellent idea. Hopefully it eventually won't be needed as complexes will be sorted out from the current chaotic mess, but as a stopgap solution it's great! Downside is it gives complex functionality without the associated setup costs so yeah, some cost component would be good.
Part-Human
Posts: 10
Joined: Sun, 22. Jan 06, 23:47
x3

Post by Part-Human »

I was linked from another thread (Request : AutoPosition Station Placement Script) as this being an alternative to the requested script. (Thanks M N Lawrence for pointing it out!)

Is it still in development? Could it be made to be purchased on a Stations' Additional commands? Could it be more specific (i.e. export selected ware to selected station only)?

500000cr double a connection kit and 5 times a normal Goner transporter so I think it's a perfect cost for a Sector solution (and worth every credit!). How hard would programming a 25 km range be? (25 km is 5 times the range of Goner transporter)

EDIT: Perhaps a small Energy Cell cost per usage, extracted from the station's supply?
User avatar
Krim
Posts: 80
Joined: Tue, 6. Apr 04, 00:10
x4

Post by Krim »

Just DL it cant wait till i get my first stations (started all over)

The univers one sounds like a small kind of cheating, but the sector one sounds like a nce upgrade (should cost something to buy and use)
Part-Human
Posts: 10
Joined: Sun, 22. Jan 06, 23:47
x3

Post by Part-Human »

Upon further consider I retract my requests. If it were specific commands for each product transfer it would be too much overhead (a XL SPP alone might be transferring to a dozen or more stations).

Also my bad, 500000 cr is 5 times a Jumpdrive, not the Goner teleporter so a max range would be dumb too. And Energy Cell cost is a bad idea too.

The only good ideas I have is that it should be attached to a Station Command (to manage the purchase) and should be "Station Teleporter Network upgrade", running 1 script for each sector.

Is Tomcat even still around?

Return to “X³: Reunion - Scripts and Modding”