[SCR] [v1.7.3] [04/27/2012] MK3 Improvement Reloaded

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

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

jlehtone
Posts: 21809
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Tue, 5. Sep 06, 12:42

euclid wrote:Agreed, but this gets really complicated. Have a look at the script(s) and just try to find the line where you can be sure he's docked after the emergency jump. Then try to cancel all tasks (current trade scripts).
Does the script wait until the "jump-and-dock" procedure completes, or does it loop, and check if "escape-routine" is still active?

Not that it matters, in both cases the ship has three states: "Escaping", "Escape complete", and "Normal". And if I understand correctly, the "Escape complete" has been skipped so far.

But selling the "surplus" freigth is "sell ware", which actually differs from the usual "deliver payload from A to B" operation, that the UT has always done. That should be able to do jump-deliveries as well.

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13293
Joined: Sun, 15. Feb 04, 20:12
x4

Post by euclid » Tue, 5. Sep 06, 15:29

jlehtone wrote:
.... Does the script wait until the "jump-and-dock" procedure completes, or does it loop, and check if "escape-routine" is still active?

Not that it matters, in both cases the ship has three states: "Escaping", "Escape complete", and "Normal". And if I understand correctly, the "Escape complete" has been skipped so far.......
IIRC then these 'actions' are done via subroutine (better: subscripts). So Iwould expect that there is no loop.

However, as soon as the subroutine has finished, the UT will continue his original trading task. I didn't manage to cancel that as well. Apparently it has to do with the script priority settings and maybe it cann be controlled via the subroutnie return values.
.....But selling the "surplus" freigth is "sell ware", which actually differs from the usual "deliver payload from A to B" operation, that the UT has always done. That should be able to do jump-deliveries as well.
The problem is to determine the 'surplus' freight. You don't want the UT to sell his shields or weapons. :grin:

Since the original trade task is still running it should be possible to use the data before cancelling the job and call a new one.

Cheers Euclid

gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator » Tue, 5. Sep 06, 16:29

The problem is to determine the 'surplus' freight. You don't want the UT to sell his shields or weapons.
-> get true amount of ware does that for you!


and btw:

I've just completed that part. :D

the galaxy traders now jump to the emergency station, wait there and then restart.
the sector traders check if the current sector is clean and then restart in that sector, too.

just tested it, works all fine :)

-> but keep in mind that only experienced traders are able to do rest ware selling! so newbies who have to jump might just cancel and wait.

hmm i have to add a message in that case .... *alt-tabs into x3*

my solution to that problem was just to start an restar script in the station the trader docked at after escaping. that station then resets the trader. works fine :)

edit:
hmm can someone explain to me how to script an AL script?
my plans are to implement statistics and statistic commands to the traders.

I want to have an AL script running in the background and checking the names of the trader ships. if the names are like e.g. '/set stats 1' it enables stats for that ship.

and every full hour this script will send the player a message containing the stats - cr/h, total credits of all traders and so on ...

edit2:
ok I just released that stuff as a new version. feel free to test it out! (page 1)

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13293
Joined: Sun, 15. Feb 04, 20:12
x4

Post by euclid » Tue, 5. Sep 06, 18:19

Excellent job, gnasirator!

Only problem is the download link. I always get 'invalid download'!?

Cheers Euclid


Edit: re-checked and Rapid Share says: the page you are looking for is currently unavailable. E

gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator » Tue, 5. Sep 06, 18:57

hmm strange, checked it, works for me!

but I know, rapidshare isn't the best host.

but I don't own webspace so I can't offer you alternatives.

And my mirror link - kindly offered by lt.ford - isn't updated yet.

does anyone know some other webspace/sharing page?


edit:
hmm try this one:
http://www.yourfilelink.com/get.php?fid=167748

does it work?

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13293
Joined: Sun, 15. Feb 04, 20:12
x4

Post by euclid » Tue, 5. Sep 06, 21:17

gnasirator wrote:.....hmm try this one:
http://www.yourfilelink.com/get.php?fid=167748

does it work?
Link works fine, thanks a lot!!!


Cheers Euclid

User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 » Tue, 5. Sep 06, 22:09

gnasirator wrote:...does anyone know some other webspace/sharing page?...
we do script project hosting at Xai Corporation.

some more info. on hosting at Xai Corporation

User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 » Wed, 6. Sep 06, 00:02

Version 1.27 has been posted to the [L3] script testing forum.

Can people please test this version for possible inclusion in future Bonus Pack releases.

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13293
Joined: Sun, 15. Feb 04, 20:12
x4

Post by euclid » Wed, 6. Sep 06, 04:07

Continued trading works but there is a major bug (see script testing forum).

Keep up the good work.

Cheers Euclid

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Wed, 6. Sep 06, 04:15

euclid wrote:Continued trading works but there is a major bug (see script testing forum).
Whats the link to the thread there ?

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13293
Joined: Sun, 15. Feb 04, 20:12
x4

Post by euclid » Wed, 6. Sep 06, 04:20

apricotslice wrote:
euclid wrote:Continued trading works but there is a major bug (see script testing forum).
Whats the link to the thread there ?
Sorry, I thought a link it would not be necessary.

Link


Cheers Euclid

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Wed, 6. Sep 06, 04:23

Ta.

I cant contribute, but am monitoring this process.

When its bug free, I'll do some advertising :)

gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator » Wed, 6. Sep 06, 09:42

Okay added an additional enemycheck into the detectenemy script that checks if the trader is friendly to the target sector owner race or not.

Well ... it should work in the original version, too as when you set i.e. Argons to foe the script finds a lot of enemy ships in the argon sectors.

But just to make sure, I added the new check.

if the trader's not friendly with that race he won't go there. just tested it, works fine (set all races to foe, he didn't trade at all anoymore ;) )

that's a really nice feature as you can now i.e. tell the ut to only trade with argons to increase rep there ... hmmm would only work as long as there aren't any 'enemy' fighters in the argon sectors.


-> that stuff comes with V. 1.29 as soon as I finished the statistics function!

apogee
Posts: 2115
Joined: Thu, 22. Jul 04, 13:35
x3tc

Post by apogee » Wed, 6. Sep 06, 09:53

After installing the bonus pack and finding that the initial version was unstable, and wanting not to have to arrange for my uts to re-fuel. I regressesed the autotrader files as per the link in this topic, however i have just noticed that the command "Start Sector Trader" and "Start Universe Trader" have now gone missing from the Trade command menu, if i re-install the bonus pack then they are still not there.

If i go back to an older save with the full bonus pack then the commands come back. As soon as i regress the scripts, the commands are gone.

Please can i get those commands back as most of my STs/UTs seem to have gone into standby!

If this is common to using this temporary fix, then anyone who has done this may find they can no longer get any more UTs to work, i dont really want to go back several days to an old save.

gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator » Wed, 6. Sep 06, 10:16

have you enabled the script editor?

every version except the BP one needs the script editor enabled (-> set your name to 'Thereshallbewings')!

apogee
Posts: 2115
Joined: Thu, 22. Jul 04, 13:35
x3tc

Post by apogee » Wed, 6. Sep 06, 10:20

moggy2 wrote:The official fix is this file which will replace the affected files with the last stable version.
This one is signed and does not require the script editor to be active.
I used this version to regress my file, and according to that the scripts are signed!

gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator » Wed, 6. Sep 06, 11:07

the official fix returns the mk3 to pre bp status (as delivered in 1.4.03). so if your traders worked before intalling the bp with that fix they should do after, too.

I can't tell you more about that fix because I didn't make it. ask moggy2 or lucike - think he built it.

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Wed, 6. Sep 06, 11:09

gnasirator, are your scripts in the same format as the Ego ones ? ie. same extension ?

gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator » Wed, 6. Sep 06, 11:19

yes they are.

unpacked scripts (like they have to be for editing) have the extension .xml.

egosoft delivers them in a packed version with the extension .pck.
x3 can read both of them. But if you have a .xml and a .pck version of a script x3 always loads the .pck one.

and if you edit a .pck version ingame via the SE it decompresses the .pck and creates a new .xml file which contains the edited stuff - but leaves the .pck file in the scripts folder. so after restarting x3 it would again load the older .pck file which is not intended.

so I deliver my scripts in the .pck format like egosoft does.
and in version 1.28 I forgot to pack my script files into that format what might cause the said errors.

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Wed, 6. Sep 06, 11:33

gnasirator wrote:so I deliver my scripts in the .pck format like egosoft does.and in version 1.28 I forgot to pack my script files into that format what might cause the said errors.
Thats what I thought.

How do you get them into .pck format ?

I have a version of the current UT script that allows M6 to be ST and UT. Having to get people to delete the .pck is a pain, I'd rather have it replace the existing file.

When yours is complete, will you allow a modification to allow M6 and M3 to be ST and UT ? Theres a small but growing group of people who like using M6's as a Heavy Transport, vanilla and modded. And theres been a few requests to allow M3's to as well. Personally, I find the Falcon is a good freighter and it would be nice to allow it to ST and UT. (I think M3 can ST, but not UT). Personally, I think all ships should be able to be used as a UT, if the player wants and they can load a jumpdrive. But then, if its a balance issue, everyone knows my psoition on that :)

Post Reply

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