[Script] Cargo Delivery Service V1.04 07/01/06 (July 1)

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

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

What do you think?

Excellent
90
71%
Good
24
19%
OK
5
4%
Poor
2
2%
Terrible
0
No votes
Not really my thing
5
4%
 
Total votes: 126

ITM
Posts: 94
Joined: Wed, 7. Dec 05, 19:39
x3

Post by ITM » Thu, 2. Feb 06, 16:18

it Freezed my game...

And the bad thing that it always freezes at the same in game time :/
Since this is the only script installed...

I have two stations :

A complex

A silicon mine

I set a Demeter to transport silicon to complex and Enrgy to silicon mine..
I set the same thing for a second ship, coz both stations are far from each other...

:/

User avatar
klaatu
Posts: 316
Joined: Fri, 21. Nov 03, 17:23
x4

Post by klaatu » Thu, 2. Feb 06, 16:32

It looks like I'll get jumping in too before the next version release.

On that note, I wanted to hear from you (yes, you!) your thoughts on how (or, more precisely, when) jumping should occur. Mainly I'm debating the minimum jump distance. If the stations are in the same sector, of course, no jumping. And, if greater than one sector between (like Argon Prime and Ore Belt), then they should jump.

But how about neighboring sectors? Should they use their jumpdrives then? It looks to me like maybe so, as it can speed up the transfer of goods quite a bit, since it jumps to the nearest gate (or sector center), which could be fairly close to the other station. The energy cost is quite low for a jump of 1 sector as well, generally 20 EC, so a cost of max 380 credits.

The freighter would take the energy from the station it's leaving from.

User avatar
klaatu
Posts: 316
Joined: Fri, 21. Nov 03, 17:23
x4

Post by klaatu » Thu, 2. Feb 06, 16:48

ITM wrote:it Freezed my game...

And the bad thing that it always freezes at the same in game time :/
Since this is the only script installed...
I have no idea how it could cause any game to freeze. As anyone can see by looking at the code, I use only standard techniques in the script, with liberal use of interrupt points (waits and so forth). Many people use this plugin for the same purpose as well, from a silicon mine to a complex, but regardless of the types of stations chosen or the distance between them, no freeze should occur.

If you would, please upload your saved game to http://klaatu.dyndns.org/Uploads/ and I'll see if I can identify the problem. Please indicate (in a PM would be fine) if there's something I need to do to cause the freeze, and when the freeze occurs (game time).

ITM
Posts: 94
Joined: Wed, 7. Dec 05, 19:39
x3

Post by ITM » Thu, 2. Feb 06, 18:08

Ok, no prob.
I gave you my save. There is nothing to be done, just undock and wait (SETA will make you wait a shorter time)
(X11.sav)

User avatar
klaatu
Posts: 316
Joined: Fri, 21. Nov 03, 17:23
x4

Post by klaatu » Fri, 3. Feb 06, 05:01

I ran your save for over four hours game time and it didn't lock up on me. The CDS freighters kept performing as designed the entire time. Not sure what else to say about it.

I'll try it a few more times to see if I can get it to freeze.

User avatar
klaatu
Posts: 316
Joined: Fri, 21. Nov 03, 17:23
x4

Post by klaatu » Fri, 3. Feb 06, 06:32

New version released!

New features:
  • 10% of a station's stock of any ware is off-limits to the CDS freighter
  • [1Way] Freighter waits for 10% of its cargo bay to be full before heading to the other station
  • [2Way] Freighter waits for the same 10% to be in stock, unless the other station has (10% of its max stock + 10% of the freighter's max stock) of the other ware (and the current station can take the 10% of the freighter's max stock), in which case the freighter simply loads what's available (if any) and heads for the other station.
  • Freighters use jumpdrives if present. They will take the needed Energy Cells from the station they are departing from. They do not jump within a single sector.
As always, please let me know of any problems you may be having. Though I don't know of any bugs, it's always possible something slipped through testing.

Right now, I can't think of anything to add or change. How about you?

User avatar
Mobuj
Posts: 293
Joined: Wed, 23. Nov 05, 00:30
x3tc

Post by Mobuj » Fri, 3. Feb 06, 07:53

klaatu wrote:

Right now, I can't think of anything to add or change. How about you?
free beer?

BTW, you got one gnarly powerwul script there dude! :)
---------------------------
I am Popeye of Borg
You will be askimilated!

User avatar
Jimmy Jazz
Posts: 794
Joined: Wed, 4. Jun 03, 17:20
x3

Post by Jimmy Jazz » Fri, 3. Feb 06, 12:14

@Klaatu, I havent looked at the script yet. Maybe you are already doing this. Since resources are limited I suggest you use the same command slots and t-file number I did. Would make sense, since your script is doing the same mine did, only better.
Pinky : "Gee, Brain what do you want to do tonight?"
Brain : "The same thing we do every night Pinky. Try to take over the world!"

User avatar
klaatu
Posts: 316
Joined: Fri, 21. Nov 03, 17:23
x4

Post by klaatu » Fri, 3. Feb 06, 17:20

I thought about doing that, but given my limited knowledge of X3 scripting I wasn't sure how changing that kind of low level data would affect things.

For instance, would Cycrow's installer see that V1.04 now uses a different t file number and automatically remove the one from the previous version? If not, would having the other one there but not used by the plugin have a detrimental affect on people's games? From my understanding, no, but I'm not sure. And, if someone still were using your version and later added mine; would the two conflict in some way if mine is now using resources once used by yours? What if they add yours to their game while still using mine? I don't know why someone would be using both, and maybe they wouldn't, but people do strange things sometimes.

Anyway, good idea, and I wouldn't mind at all, if it's not going to be a problem. Can someone more knowledgeable than I assure me it wouldn't?
"It's so simple. No, wait--it's needlessly complex!"
- Homer Simpson
You need this!: Cargo Delivery Service

User avatar
Khaakbuster
Posts: 393
Joined: Sun, 8. Jan 06, 18:43
x3tc

Post by Khaakbuster » Fri, 3. Feb 06, 17:37

Although I didn't have much time, I tested the script and must say that it simply works great. :)

I closely watched a complex, its silizium mine and the freighter making runs between them. At first there was just about 8000/225000 energy cells onboard the complex and 900/1040 units of silizium in the mine.

1. The freighter took no cells from the complex since nothing above 10% was available - correct

2. The freighter flew over to the mine without waiting for cells in the complex - correct

3. The freighter took about 20 to 30 units of silizium from the mine because more did not fit into the complex - correct

4. After the complex reached a level of 22500 energy cells the freighter took all cells that where above this level to the mine - correct


I played for several hours of game time and the script works wonderful. It even helps me keeping a good balance between the complex and the mine since the mine would normally eat way to much energy (its a mine type L on a 64er asteroid).

Nice work. :)
Thank you both very much.

User avatar
Jimmy Jazz
Posts: 794
Joined: Wed, 4. Jun 03, 17:20
x3

Post by Jimmy Jazz » Sun, 5. Feb 06, 18:14

@Klaatu: I don't think Cycrows installer will remove unused t-files. Have to admit though, I have never tinkered with the program apart from installing scripts.

Anyway, I am 99.9% sure that an existing unused t-filed that isn't referd to by any running script does not have any effect at all on the game. I just don't see how it possibly could.

When using diferent t-files/command slots, running those two scripts parallel should be no problem. But why would anyone would like to do this??
I wrote the FLS because I needed it for my complexes, I have restarted since then, but as soon as I have a use again for this software, I will definitely download your version. Especially this nifty 10% function I find very apealing.
Pinky : "Gee, Brain what do you want to do tonight?"
Brain : "The same thing we do every night Pinky. Try to take over the world!"

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Sun, 5. Feb 06, 18:57

klaatu wrote:I thought about doing that, but given my limited knowledge of X3 scripting I wasn't sure how changing that kind of low level data would affect things.

For instance, would Cycrow's installer see that V1.04 now uses a different t file number and automatically remove the one from the previous version? If not, would having the other one there but not used by the plugin have a detrimental affect on people's games? From my understanding, no, but I'm not sure. And, if someone still were using your version and later added mine; would the two conflict in some way if mine is now using resources once used by yours? What if they add yours to their game while still using mine? I don't know why someone would be using both, and maybe they wouldn't, but people do strange things sometimes.

Anyway, good idea, and I wouldn't mind at all, if it's not going to be a problem. Can someone more knowledgeable than I assure me it wouldn't?
the simple answer is yes.
if a previous script was using a differnet t file, then when you install the new version, the installer will remove the old one, as long as its not shared with other scripts.

the same is true for any files that u have removed from your script, the will laos be removed when installing the newest version

Edit: also, if you set the priority of you command higher, than if both scripts are installed, then it will be urs that uses the command, so it shouldn't have too much of an effect

eladan
Posts: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

Post by eladan » Sat, 11. Feb 06, 16:40

Don't know how easy this is, but would it be possible as an option to get your freighters to transfer money for the goods they take? It would help with my bookkeeping... :)

User avatar
Mobuj
Posts: 293
Joined: Wed, 23. Nov 05, 00:30
x3tc

Post by Mobuj » Sat, 11. Feb 06, 20:43

Request for addition.

Have an option for multiple pick places and items to be deliverd to a single destination. The reverse may be also be good. Reason, I would like to have one super freighter to pick up ore and silicon to be delivered to a complex.

The use of jumpdrives makes this an uber script!

Thanks
---------------------------
I am Popeye of Borg
You will be askimilated!

Alche
Posts: 416
Joined: Wed, 18. Jan 06, 12:30
x3

Post by Alche » Tue, 14. Feb 06, 11:31

Works fine but the 10% is rather low, I’m finding my transports oscillating back and forth far too often with too little freight.

Basically we need to keep the facilities topped up with resources shared between the factories, even a resource level of 50% is fine, hardly critical, I would have thought an absolute minimum requirement would be 25% restock before the transport takes action.

User avatar
klaatu
Posts: 316
Joined: Fri, 21. Nov 03, 17:23
x4

Post by klaatu » Wed, 15. Feb 06, 00:10

I agree with you: I think 10% is too low. I'll probably get around soon to releasing a new version with a change to 25%, but until that happens, if you're so inclined, the code itself is fairly easy to modify. Look in the code on lines 50 and 56 for some / 10's and change the 10 to a 4. That should do it.

Oh, the script to modify would be the plugin.CDS.lib.work.

If you do change the code yourself, remember to manually reissue orders to your freighters again, as the game won't do the auto-restart without other modifications.

b-falcon
Posts: 2
Joined: Wed, 18. Jan 06, 11:23
x3tc

Cargo Delivery Service - Klaatu

Post by b-falcon » Thu, 23. Feb 06, 13:32

Have been using the CDS 1.03 and its good. Is there any way to adjust the percentage left at a station as, for example I am producing crystals in teladi space solely for the purpose of powering an Solar power station in Argon space and use CDS in 2 way mode?

User avatar
klaatu
Posts: 316
Joined: Fri, 21. Nov 03, 17:23
x4

Post by klaatu » Thu, 23. Feb 06, 17:23

Yes, of course. Similar to the change to the minimum amount to haul, the station reserve can be set by changing the 10's in lines 43 and 59. Line 43 changes it for the station you're at, and 59 changes it for the reserve at the other station. Keep in mind this is a divisor, so 10 leaves 10%, 4 leaves 25%, 25 would leave 4%, and 100 would leave 1%.

Also, after making the change and before reissuing orders to your freighters to do a "Reinit script caches" or whatever it's called. Forgot to mention that in the previous post.

HTH

GRANDADDYGRIND
Posts: 31
Joined: Wed, 8. Mar 06, 14:44
x3

Post by GRANDADDYGRIND » Sun, 12. Mar 06, 15:48

Hi can anybody help.......

Have today downloaded the script installer and installed.

Then downloaded 'Cargo delivery script1.03' by Klaatu.

Followed the instructions and selected where my x3 install is
...C/prog files/deepsilver/x3reunionetc

Then installed the script and it has appeared in the installed script section saying that it is enabled (Green).

Now i have assumed that this is all i do (probably wrong) and loaded the game.... first off i tried a save game in which i have transports assigned to a station (BTW i do not know if scripts can be used with a save game so can sum1 confirm or deny) i checked their trade command section and nothing different(they have T Com Softwae 2)

After this i attempted to start a new game and bought t Com soft 2 for my Mercury and still nothing.

Is there somthing that i have missed completely or do i have a major problem ( not personally :lol: )

I am running X3 - 1.3
All help welcome thanks.
Entering System --- Autopilot off.

User avatar
klaatu
Posts: 316
Joined: Fri, 21. Nov 03, 17:23
x4

Post by klaatu » Mon, 13. Mar 06, 22:07

Have you enabled the script editor? Does 'Thereshallbewings' ring a bell?

Just asking, because that's a common reason some people can't get scripts to work in game. If you don't know what I'm talking about, see some of the sticky posts in this forum.

If you have enabled the script editor, then I'm not sure what to tell you. Try another script by someone else and see if theirs has the same problem, or if it's just the CDS script. If it's all scripts that don't work, then it's something general with your game or something. But if it's just the CDS software you can't get working but others do, reply back and we'll look into it some more.

Post Reply

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