[Script] Station Manager v1.11 (March 27)

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

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

danprivatus
Posts: 31
Joined: Tue, 26. Jul 05, 19:53
x3

Post by danprivatus » Tue, 3. Jan 06, 09:18

Frantic Fish wrote:Seems like a great script, but when ever I try to assign a ship to the ore mine in priest rings (the one from the plot) the game crashes. i have finished the plot and installed version 1.3.

I have a similar problem. In my case, it occurs with one of my own facts. Here's what happens: I activate Station Manager on a few of my facts, add a trader to each, and they happily fly off on "Station Manager: Automate" and I have no problems. Then I do the same for this _one_particular_fact_ I have and the game hangs within a few minutes. I've repeated this experiment and my game always hangs within a few minutes of activating SM and adding a trader on that fact.

Weird, eh? So I load a save game as of the point just before I activate Station Manager and assign the trader for _this_fact_ -- and no hang! Mind you, I'm still running Station Manager on a few other facts of mine (with traders added), but not on _this_fact_ .

As a precaution, I've now deactivated SM on _all_ my facts -- and no hang.

Since most of you seem quite happy with the script and aren't experiencing hangs (other than the sporadic ones we're all used to already), my best guess is that Station Manager is in conflict with another script I'm already running. Currently I'm running: Escort, Treasure Hunt, Race Response Fleets and BBS Plugins, all by LV. (Great work there, LV!)

Burianek -- not "complaining"! I think you've written a very fine script which is more than a worthy successor for X2's BPH. It's exactly the kind of script X3 desperately needed and I was so looking forward to it. Would you like to take a closer look at my issue? If so, I'm prepared to send you two save files. One of them is about a minute after activating SM and adding a trader on my "problem fact" -- the game hangs every time within 30 sec. The other is just prior to activating SM and adding a trader on that same fact; activate SM and add that trader and it hangs within a few minutes. If you're interested, please let me know, thanks!

And keep up the great work on this fine game. :-)

AalaarDB
Posts: 2282
Joined: Thu, 29. Jan 04, 08:19
x3tc

Post by AalaarDB » Tue, 3. Jan 06, 10:04

Please send me the 2 saev games at [my login name] at yahoo.com

danprivatus
Posts: 31
Joined: Tue, 26. Jul 05, 19:53
x3

Post by danprivatus » Tue, 3. Jan 06, 13:53

AalaarDB wrote:Please send me the 2 saev games at [my login name] at yahoo.com
Done. Good luck and thanks!

User avatar
Trevelvis
Posts: 1042
Joined: Sun, 4. Apr 04, 15:20
xr

Post by Trevelvis » Tue, 3. Jan 06, 18:45

I have found out something I have a factory and a complex so I decided to join them into a bigger complex but when I go to assign the ship that belonged to the factory it comes up with cannot add as it still belongs to my factory that doesnt exist anymore. I have even got into ship to get rid of homebase but it still wont add this ship . Any Ideas

User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek » Wed, 4. Jan 06, 02:00

I've experienced a hang in my game as well. For me it happened when one of my ships flew into sector xyz to buy energy and landed at the spp. The prices were too high, so it didn't buy anything.

The script is supposed to look in the current sector to see if it can find energy elsewhere, and if not, widen the scan to the jumprange from the station. For some reason it's getting stuck in an endless loop. So there's a logic flaw in there.

I'll take a look and see if I can nail it down and release a fix as soon as possible. In the meantime, if you're getting a regular hang in your game that's why, up your prices that you're willing to buy stuff for temporarily deactivate the script until I sort it out.

Sorry.
"Nature's first green is gold" . . . stay golden.

User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek » Wed, 4. Jan 06, 05:00

Version 1.03 uploaded. Fixes the game freeze errors. The game was freezing any time the trader couldn't find any acceptable station to trade at. Pretty nasty bug actually. It's fixed now, and there shouldn't be any more like it. *crosses fingers*
I also added automatic fly to repair dock support when a trader drops below 80% hull:

"Traders that have been damaged to have less than 80% hull value will not continue trading for your factory. Instead, they will automatically fly to the nearest safe repair dock and contact you for help. Safe means that they will not cross any sectors owned by races defined as enemies in the ship's friend/foe settings."

So no crossing Xenon sectors or anything like that.

1.03 -
fixed an issue with the script locking up the game when it couldn't find any stations to trade at
fixed a small error with local variables not being removed correctly from ships when shutdown
when a trader gets below 80% hull, it will now fly to the nearest repair dock (but will not cross enemy sectors) and contact you to make repairs
began to add the needed code to support complexes (complexes are still not supported as of this version)
"Nature's first green is gold" . . . stay golden.

Frantic Fish
Posts: 12
Joined: Fri, 17. Sep 04, 10:40
x3

Post by Frantic Fish » Fri, 6. Jan 06, 02:01

Fantastic, the crash is gone. Keep up the good work. :)

Elwood J Blues
Posts: 192
Joined: Sat, 14. Aug 04, 13:08
x3tc

Post by Elwood J Blues » Fri, 6. Jan 06, 11:01

Is it possible to make this one anything like the script of the same name for X2? Here's hoping I don't have to explain it.

Elwood J Blues.
It's 106 miles to Chicago, we've got a full tank of gas, half a pack of cigarettes, it's dark, and we're wearing sunglasses.

danprivatus
Posts: 31
Joined: Tue, 26. Jul 05, 19:53
x3

Post by danprivatus » Fri, 6. Jan 06, 17:01

Frantic Fish wrote:Fantastic, the crash is gone. Keep up the good work. :)
I enthusiastically 2nd that! My "strange crash with just one station" disappeared after installing 1.03. Thanks, Burianek! Great script!

User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek » Sat, 7. Jan 06, 01:09

I received the following question in a pm, and figured it would be better to answer it here so everyone can read it:
Hello,

Been having trouble witht he script, and need to know what I can do to make this work better, cause its not the script, it is Im not understanding how to use this effectively.
I have 3 TS ships for my Silicon mine right next to Power Circle. I have the price to buy ECells for 16CR per, but my stupid ships keep going all over the place like Ores belt, when Power Circle has 4 SolarPower places their. even thou I limited the Space to 3 jumps.
Im curious about 2 things, one can I just have my ships go to 2 sectors for the ECells while my biger ship can go to lets say 3-4 jumps to sell the Silicon waffers, and if yes how Do i do this. I read your readme file and I was very confused?

And another thing, if I placed Jumpdives on the ships will the Manager use them or no?

ohh and one more thing, when I place the automanager, and it asks to add/remove ships, when they are added, the spaces below the command shows none, like their are no ships attached to this station?
I put the ships as the Homebase to the factory, should I have done this, and the Manager have done this or did I have to do this mannually anyhow?

Please be very descriptive for this seems nice but its confussing the hell out of me. I feel like Im doing this all wrong.
Ok, let's run down the list.

It seems the first question you have is how to set jumpranges and tradeable wares for each ship.

The answer is that any ship belonging to your station can be configured with its own individual jumprange and wares to trade. If you have a silicon mine, that means that any one of your ships can either buy energy, sell silicon, or both, and they can do it over any range.

When you initially add a ship to a station, it is set up with default parameters. This means it will initially try to trade every ware for the station, and use whatever jumprange is set in the station parameters screen. To customize how a ship works, go into your ship, after it belongs to a station, and go to the additional commands section. There are two commands: set jumprange, and prohibit ware.
Set jumprange: just select this and set a number for the jumprange
prohibit ware: select this and then select a ware. Your ship will no longer try to trade this ware. If you want to 'turn it back on', just pick it again.
To see how you have your ships currently set up, run the add ship command and then select the station itself. You'll get a report sent that shows how each of your traders is configured.

So to set up one ship to buy energy with a jumprange of 2, you'd go to the ship command menu, select the jumprange command and pick 2. Then you'd go to the prohibit ware command and prohibit silicon.

To set a trader to only sell silicon with a range of 4, you'd go to the ship command menu and set the jumprange to 4. Then you'd prohibit energy.

Piece of cake.

To answer your next question, you will not see the list of ships that your station is controlling when you go to the station command menu. Once the add ship command runs, it disappears, it doesn't stay in that list. That's because you can add as many ships as you want to a station. They don't each take up a slot. To see which ships belong to a station, as mentioned above, run the add ship command and then select the station itself.

Hopefully that will sort you out. If not, feel free to ask more.
Cheers.
"Nature's first green is gold" . . . stay golden.

User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek » Sat, 7. Jan 06, 01:11

Elwood J Blues wrote:Is it possible to make this one anything like the script of the same name for X2? Here's hoping I don't have to explain it.

Elwood J Blues.
It's possible, but since this is my script, and isn't BPH, I don't really want to make it like BPH.

If you're asking me if I'm ever going to put experience levels in and such, I might. Since I'm probably going to try to get this one signed, I might need to. But I consider this script better than BPH in a few different ways, so trying to make it more like BPH is a step backwards in my humble opinion. (It's easier to write these types of scripts in X3 than it used to be in X2)

Cheers.
"Nature's first green is gold" . . . stay golden.

AalaarDB
Posts: 2282
Joined: Thu, 29. Jan 04, 08:19
x3tc

Post by AalaarDB » Sat, 7. Jan 06, 01:24

Adding AStar Pathfinding will probably hurt your chances of getting it signed.

User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek » Sat, 7. Jan 06, 02:14

If it improves the script, it won't.
Unless you think it'll be too complicated. We'll work thru that when we get there. The important thing is to make a good script. Signing it is desireable, but not required.
Cheers.
"Nature's first green is gold" . . . stay golden.

AalaarDB
Posts: 2282
Joined: Thu, 29. Jan 04, 08:19
x3tc

Post by AalaarDB » Sat, 7. Jan 06, 02:23

I would think it's too complicated, but if it is we can always take it out.

DarthVain
Posts: 845
Joined: Mon, 2. Jun 03, 11:53
x3tc

Post by DarthVain » Sat, 7. Jan 06, 03:13

Unfortunately, I can't see the Station Manager in any of my Stations commands. I have script editor enabled and it doesn't appear to have any conflicts with other scripts either.
Another one bites the dust!!

DarthVain

User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek » Sat, 7. Jan 06, 07:44

You know you have to select one of the slots in the station command screen to see the list of available scripts you can run in that slot. They all initially show up with none in them since no scripts are running in them. The slots show currently running scripts.

It's just like using the additional commands section of your ship command menu.

Cheers.
"Nature's first green is gold" . . . stay golden.

Elwood J Blues
Posts: 192
Joined: Sat, 14. Aug 04, 13:08
x3tc

Post by Elwood J Blues » Sat, 7. Jan 06, 13:03

Elwood J Blues wrote:
Is it possible to make this one anything like the script of the same name for X2? Here's hoping I don't have to explain it.

Elwood J Blues.


It's possible, but since this is my script, and isn't BPH, I don't really want to make it like BPH.

If you're asking me if I'm ever going to put experience levels in and such, I might. Since I'm probably going to try to get this one signed, I might need to. But I consider this script better than BPH in a few different ways, so trying to make it more like BPH is a step backwards in my humble opinion. (It's easier to write these types of scripts in X3 than it used to be in X2)

Cheers.
No the original Station Manager script for X2 was not anything to do with BPH, I hated that, never used it. The station manager in X2 was exactly the same as what you are doing now but with a few extra litttle bit and pieces.

1. It cost 2 mil to HIRE you station manager and then he flew his M5 to your station and started to work for you.

2. He also bought two bare bones TS ships to be used as a warehouse and a warehouse supplier. These ships supply all the ammo, weapons and shilds etc. for his fighter compliment.

3. All the fighters that he was given were used as station deffence. M5's did patrol, and scanned the sector if any enemies were detected he sent out a small detachment of ships to deal with the threat.

I think that's it.

Elwood J Blues.
It's 106 miles to Chicago, we've got a full tank of gas, half a pack of cigarettes, it's dark, and we're wearing sunglasses.

User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek » Sat, 7. Jan 06, 20:39

This script merely automates the trading aspects of the station. It doesn't handle sector or station defense. I have no plans to build that type of functionality into this script.
Sorry.
"Nature's first green is gold" . . . stay golden.

gengis_cohen
Posts: 42
Joined: Thu, 17. Jun 04, 08:21
x3ap

Post by gengis_cohen » Sun, 8. Jan 06, 02:16

Think I've run accross a bug.... Maybe...

I've got your station manager looking after a Space Fuel Distilary with one tanker doing the buying/selliing. Waste of a tanker I know but I captured it in good nick and had not much else to do with it at the time.

Problem is when it grabs a big load of Space Fuel to sell and heads to the nearest pirate base it sells 128 to the pirate base and then sits there waiting for the base to use them up so it can sell the rest of it's load.

Does the script test to see if where it's trying to sell to is already 'full' ?
Would help me a great deal if the tanker could fill up and then go sell to every pirate base with-in jump-range but at the moment it gets as far as it's first sale and then sits there.

User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek » Sun, 8. Jan 06, 03:08

Interesting, thx for the report. I'll look into that.
"Nature's first green is gold" . . . stay golden.

Post Reply

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