[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

Cormic
Posts: 8
Joined: Mon, 5. Dec 05, 21:40
x3

Post by Cormic » Sun, 8. Jan 06, 15:56

Hrm.. I am still getting some kind of hang up and I have no idea what is causing it. I am fairly sure it is the script because when I was getting one hang up I reloaded and turned off the manager and made it past that point. Odd thing is that I parked myself at one of my stations and let things run for 3 hours while I took a nap and it all ran fine. Then I checked around for a good deal on something, jumped out, hit SETA and after a few seconds hung up again. I like this script, but I don't want to have to be turning it on and off all the time.

Also, when you go to add ships to the auto manager can you get it to call the owned ships thingie from the base? If you have a ship docked somewhere or your fleet is spread out all over the place it makes it a pain to launch to a point or track down your ship in sector G to add it to the auto manager.

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

Post by danprivatus » Sun, 8. Jan 06, 19:51

gengis_cohen wrote: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.
Yep, I ran into the same thing! My trader had a load of BoFu from my BoFu Chem Lab and he flew to a Royal Boron Trading station but couldn't sell it all. So he just sat there and waited -- apparently for the station to need more.

Meanwhile, My BoFu Chem Lab started BLINKING for lack of Energy Cells (only had this trader assigned to the Fact) , but Trader-Boy just sat in the RBTS sipping martinis and flirting with the barmaid and waiting to sell more BoFu. Finally, I ordered him to return and unload his BoFu. Then I restarted Station Manager and voila! Off he flew to get some Energy Cells.

Gonna' have a little "chat" with him about that at "performance review time"! :twisted:

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

Post by Burianek » Sun, 8. Jan 06, 23:55

Yeah, I know why it's doing that.
I'll fix it in the next version.

If you are selling to trade stations only, anytime your ship is holding more wares to sell than the station can take, it's going to sit there and wait to try to sell them.

In the meantime, you'll need to do what you did to get them going again, manually fly him back to the homebase and offload the wares, then start him up again.

Sorry about that. It's being sorted.



As far as the interface goes, I'm not sure why you'd want to call up a list of owned ships for the add/remove ship command. Do you mean all the ships that have this station set as homebase? Because if that's what you mean, you're still going to have to find the ship to set the homebase to the station. I appreciate and consider all suggestions for the inteface, I'm just not sure what you're suggesting.

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

User avatar
Rakeris
Posts: 407
Joined: Wed, 31. Dec 03, 04:25
x4

Post by Rakeris » Mon, 9. Jan 06, 00:23

Been using your script for a while now and all been good except that freeze problem. But as soon as it started happening it was already fixed in a newer version, so all was good.

I really like your script, for one it's pretty simple (compared to some of the other station managers) it doesn't work like a UT. Imo it's a bit much as UT make a killing already.


I was wondering if it's possible to automatically add ships to the station manager when you enable it, if they have their home base set to that factory?


Thanks for the great script! ^^



EDIT: Typos....always something.

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

Post by Burianek » Mon, 9. Jan 06, 00:55

I didn't want to autmotically take over ships that have their homebase set, because you might want to have other ships assigned to a station that aren't traders. For example, if you have fighters docked at a station (which is their homebase), and something attacks that station, the fighters will launch and defend that station.

So it was a design decision not to simply grab everything that has its homebase set.
"Nature's first green is gold" . . . stay golden.

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

Post by AalaarDB » Mon, 9. Jan 06, 01:14

Maybe it could only add TSs and TPs?

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

Post by Burianek » Mon, 9. Jan 06, 04:59

I really don't think that saves you any keypresses.

Manually setting a ship's homebase takes the same amount of time as running the add/remove ships command. I see them both as exactly the same. The only difference is that if you force the automation to run on any ship that has its homebase set to the station, you lose the ability to have other ships running buy ware for best price or anything else like that.

Not really that you'd want to, but I don't see what is better about having it automatically grab ships that have their homebase set, even if it is just TS/TP. You still need to keep the add/remove ships command, unless you want to make it so fighters can't be used as traders.

Why do you think it'd be easier that way Dragonslayer?
"Nature's first green is gold" . . . stay golden.

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

Post by Burianek » Mon, 9. Jan 06, 05:09

Cormic wrote:Hrm.. I am still getting some kind of hang up and I have no idea what is causing it. I am fairly sure it is the script because when I was getting one hang up I reloaded and turned off the manager and made it past that point. Odd thing is that I parked myself at one of my stations and let things run for 3 hours while I took a nap and it all ran fine. Then I checked around for a good deal on something, jumped out, hit SETA and after a few seconds hung up again. I like this script, but I don't want to have to be turning it on and off all the time.

I found the freeze. You have a rare one ;)

The script will currently freeze if:
1. you have more than one trader assigned to the station.
2. There are no stations where you can sell the product ware for the price that you want (or your station has no product ware)
3. Your station is currently almost completely full of all resources AND
4. you have other ships inbound with enough resources to put all of your stocks at over 100%

So for the simplest example, let's say you have a wheat farm that already has 9,500 / 10,000 energy in storage. You have a freighter inbound that is going to try to deliver 2,000 energy to the station. You have another frieghter that is currently trying to decide what to do. In this specific situation, the game will hang. Sorry it took me a bit to find, that is a very rare situation.

(hopefully this will be the last freeze)

I apologize for the bugs, but you have to realize you're using an unsigned script. There's nothing guaranteeing that it isn't going to have a few small bugs every now and then. If you want something perfectly reliable, don't use any unsigned scripts. I'm doing the best I can to try to fix them.

I'll release a fix soon, this isn't a hard one to fix.
"Nature's first green is gold" . . . stay golden.

Cormic
Posts: 8
Joined: Mon, 5. Dec 05, 21:40
x3

Post by Cormic » Mon, 9. Jan 06, 05:36

Burianek wrote:
I found the freeze. You have a rare one ;)

The script will currently freeze if:
1. you have more than one trader assigned to the station.
2. There are no stations where you can sell the product ware for the price that you want (or your station has no product ware)
3. Your station is currently almost completely full of all resources AND
4. you have other ships inbound with enough resources to put all of your stocks at over 100%

So for the simplest example, let's say you have a wheat farm that already has 9,500 / 10,000 energy in storage. You have a freighter inbound that is going to try to deliver 2,000 energy to the station. You have another frieghter that is currently trying to decide what to do. In this specific situation, the game will hang. Sorry it took me a bit to find, that is a very rare situation.

(hopefully this will be the last freeze)

I apologize for the bugs, but you have to realize you're using an unsigned script. There's nothing guaranteeing that it isn't going to have a few small bugs every now and then. If you want something perfectly reliable, don't use any unsigned scripts. I'm doing the best I can to try to fix them.

I'll release a fix soon, this isn't a hard one to fix.
Awesome. Can't wait!

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

Post by Burianek » Mon, 9. Jan 06, 05:55

New version 1.04 uploaded.
In addition to fixing the freeze issue, I've now made it so that traders will only buy resources if your station is less than 90% full and will only sell products if your station is more than 10% full. This kind of helps tame them a bit when you're station is pretty close to running at optimal (full resources, empty of products). They used to go fly out and just buy a tiny bit of energy or some such. Now, they'll sit at home and wait until there's something meaningful for them to do.

*NOTE* as always, versions get automatically updated for all of your traders every 5 to 8 minutes. If you're getting a freeze upon loading your save game before the trader can be updated, you'll need to manually stop the offending trader, wait until the continue command appears in his trade menu, and then tell him to continue. That manually updates him to the new version.

Cheers.

1.04 -
fixed a very rarely occurring bug that would cause the game to freeze.
traders will now only buy resources if the station is less than 90% full, and will only sell products if the station is more than 10% full
"Nature's first green is gold" . . . stay golden.

User avatar
Rakeris
Posts: 407
Joined: Wed, 31. Dec 03, 04:25
x4

Post by Rakeris » Mon, 9. Jan 06, 06:23

Hmm, I'm not sure it would be easier. The obvious problem with fighters and such. So that is probably not a good idea at all, easier the way it is.

What I was looking at was at times I've had....annoyances with trying to select the ships I wanted the mod to use for that station. The problem I was having was the ship can't be docked, and me being forgetful I always forgot so I buy the TS/TSs and tell them to dock usually at the station. So they fly there and dock just so I have to undock them. It's trivial and doesn't matter anyway, I'll get over it :P

Also if the ships are named the same, there isn't a way to tell if they are selected for station use or not. But that is trivial as well.

So, no I don't have anything constructive to add, so you can just ignore me :P

But great job Burianek, keep up the good work ^^

Shanjaq
Posts: 353
Joined: Sat, 3. Apr 04, 09:47
x3

Post by Shanjaq » Mon, 9. Jan 06, 06:37

No matter how many times I return or refresh the download page, it shows up "This page cannot be displayed", could you put it on ihud, rapidshare or any other reliable host?

Sounds like a great script, wish I could check it out!
[ external image ]
SPACE HAS A TERRIBLE POWER

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

Post by Burianek » Tue, 10. Jan 06, 01:58

Seriously, I always get in after 10 tries or so, it's annoying, but a have a system for updating that's very easy for me, so I don't want to switch hosts. Just keep hitting refresh, I promise you'll get in, it won't take more than 30 annoying seconds.

Eventually, I bet aalaardb will also host the script as he's now co-authoring it with me (and to be honest has probably done more work on a new version you'll see soon that blows the old version away)

If someone else wants to mirror, you have my permission.
"Nature's first green is gold" . . . stay golden.

User avatar
Rakeris
Posts: 407
Joined: Wed, 31. Dec 03, 04:25
x4

Post by Rakeris » Tue, 10. Jan 06, 02:07

I'll just throw it up somewhere. Odly enough I never had any problems downloading it. I only had to refresh like once every time I went to download it.

Here is the link, I uploaded it to rapidshare.
http://rapidshare.de/files/10752726/sta ... 4.zip.html

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

Post by AalaarDB » Tue, 10. Jan 06, 03:19

Version 1.05 has been released.
(Until Burianek updates the main post, look 2 posts down from the main post)

Fixes:
Possible fix for trade station bug.
Pathfinding is now better so traders are very less likely to go through enemy sectors.
Optimized the speed of the code.

A lot of code was rewritten. If you experience any bugs please let us know asap.

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

Post by BlackRain » Tue, 10. Jan 06, 04:10

My game was getting a freeze after i upgraded to 1.04, I downloaded 1.05, still getting a freeze. I can reproduce it everytime, I tell my TL to attack a station, and I use redspots QFLS command Defense launch and the game freezes. It wasn't doing this until after I upgraded to these versions of this script, it may not have anything to do with QFLS but it seems to happen everytime I tell the TL to attack the station and then use the Defense Launch command, or if I use the defense launch command then attack the station, same thing happens. Also, if I just launch the defense launch fighters without having the TL attack the station it doesnt seem to freeze. I am going to let the game run for a while and see if it freezes with doing nothing.

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

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

Did the freeze happen with 1.03, not happen, or was it never tested?
It freezes when you tell the TL to attack the station, or when you use the Defense command, or are they one and the same?

You can send me your savegame to [my login name] at yahoo.com

To be honest, if the TL isn't connected with the Station manager then there's a good chance it's RS's bug.

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

Post by BlackRain » Tue, 10. Jan 06, 04:35

I never had the problem before, although I can't remember if I ever tried the command with a TL, I know I tested it extensively with a carrier and never had a freeze, I also had been using this particular script when it was version 1.03 at the time. I was just playing and the game seemed to be running fine, I tested it for a bit without using the TL. It seems I dont even need to attack the station. The strange thing is, when I load up my save my tl is in argon prime, I used the defense launch, worked perfectly fine, attacked some khaak in the sector with my tl, no freeze. I jumped over to split fire with my M3 and was shooting down some pirates including the station there with no freeze. I then told my TL to jump in, did not attack with it, just used the Defense launch command and it froze. It might be a problem with the TL, as I said I can't remember if I had tried it before. Although I know for sure I didnt have this problem with a carrier and I never noticed this problem before the new version of this script, but it might in fact be a bug with RS.

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

Post by Burianek » Tue, 10. Jan 06, 04:40

Yeah, there's no way something you're doing with a TL is causing these scripts to freeze, since TLs can't use or be associated with the station manager commands.

Unless perhaps it's a timing issue, that the game freezes precisely 5 minutes after load (when one of your traders hangs unbeknownst to you) That time might be exactly how long it takes you to jump your TL to the new sector and issue the command, and you just think they're related? Grasping at straws here. If it's a timing issue, it should still freeze even if you load the game and sit and do nothing but SETA for x minutes.
"Nature's first green is gold" . . . stay golden.

akechi00
Posts: 1
Joined: Mon, 26. Dec 05, 20:14
x3

Post by akechi00 » Tue, 10. Jan 06, 19:43

Hey guys,

I downloaded and updated Station Manager to 1.05, and I'm receiving a weird pathfinding bug for one station. I have a Silicon Mine in Ore Belt with a jumprange of 2. I have Station Manager installed controlling two ships that deliver the silicon using the standard jumprange, one of the places being Argon Prime.

The pathfinding issue is that my freighters go by Argon Prime and head toward Kingdom End even though their destination was for Argon Prime. I didn't notice until they were all the way up there and I had to manually bring them back down and then reactivate their normal movement. The pathfinding was working pre-1.05. If you guys need more information, let me know.

Oh yeah, this is the only station with the pathfinding issue. All my other stations are running fine, but their jumpranges are set to 1.

Post Reply

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