[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

Post Reply
Mad Hatter
Posts: 246
Joined: Fri, 5. Dec 03, 16:08
x3

Post by Mad Hatter » Sun, 3. Sep 06, 17:19

In an earlier thread, it was suggested that UT's have a threat level that the player can choose. So perhaps you tell it to avoid enemy M3's, and it will avoid any sector that meets the threat level.

Or perhaps they could use their scanner range, and jump out whenever an enemy enters range, and either pick a new product to buy, or sell wares somewhere else. (Though I don't know what event triggers there are or how performance intensive that would be.)

Something needs to be done though. UT's are painfully stupid at the present.

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

Post by gnasirator » Mon, 4. Sep 06, 00:37

well it actually IS built in. the universe trader checks every sector it flies to/through for enemy activities. and as far as I have noticed it the trader does indeed not fly into these sectors. but if enemies jump into the target sector AFTER that check was done, the trader won't notice anymore ...
well maybe I'll add more frequent enemy checks in the future.
but np for that reason the new uts have the emergency EZ reserves so that in case of an attack they ALWAYS have at least 60EZ for emergency jumps (up to 5 sectors away).

actually the only way to permanently prevent the trader from flying into a sector is to set it to status unknown.

hmm but it would be easy to change the checksector script a little bit to prevent the ut from trading with stations in pirate/xenon/khaak sectors at all ... pirates do always hate players? or is there a way to get them friendly? if it is i have to implement a check ...


btw i've released a new major upgrade. it's worth the download.
Are you a ..........*gasp* .........dev ?
hehe no i'm not. i'm just a fan who was unsatisfied with the ut's behavior, dared to look into the scripts and learned scripting by that way:)

yep lucike put my script into the BP. but it really was too early. so in the next bp versions this stuff will no longer be in. testing first.
if only I had known all the bugs by that time... :)

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

Post by apricotslice » Mon, 4. Sep 06, 02:01

What is the download url ?

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

Post by moggy2 » Mon, 4. Sep 06, 02:09

send it to scripts@egosoft.com when it's ready for testing.

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

Post by gnasirator » Mon, 4. Sep 06, 12:19

@moggy2:
ah okay thanks i'll do that!
just one more day of personal testing by myself. just to make sure ...
btw:
A ranged UT would also allow some limited control on keeping the UT away from dangerous sectors. I've played with this idea in my own game, it's actually a very simple mod, and liked it a lot.
There IS such a script in the german forum made by lucike.
http://forum2.egosoft.com/viewtopic.php ... t=#1528703

and for the non-german speakings the direct download links:
Script
Libraries
both are necessary. enjoy !

@apricotslice:
you can find the url at page 1.
Last edited by gnasirator on Tue, 5. Sep 06, 17:59, edited 1 time in total.

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

Post by apogee » Tue, 5. Sep 06, 10:36

There is definately something strange happening with the new UT scripts.

With the bonus script verions installed i kept getting system slow downs that manifested themselves as slow framerates, this happend every 5-10-15 seconds, i also found the computer less responsive at most times, this occured even in relativly empty sectors so it's not load on the graphics card. Last evening i re-instated the original scripts (as indicated in this thread), and these slow dows/frame rate drops have gone, and the game is more responsive.

I dont know if this is being addressed in the updated versions but there is definitely something happening that is associated with the new scripts that is putting extra load on.

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

Post by euclid » Tue, 5. Sep 06, 11:35

That UT's get destroyed has one particular reason (has been discussed before but I can't find the thread):

If a UT is attacked and emergency-jumps to a station, he then starts to resume his original task. So he flies (yes, not jumps) back to his original target station without checking for enemies. If an enemy sector is enroute or if there are enemies in the target sector........babooom.

I've suggested already (see script forum) to change the script such that after he made the emergency jump and docks all current tasks are cancelled. The player just to restart the UT.

Cheers Euclid

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

Post by apricotslice » Tue, 5. Sep 06, 11:40

euclid wrote:I've suggested already (see script forum) to change the script such that after he made the emergency jump and docks all current tasks are cancelled. The player just to restart the UT.
I'd prefer that the script recognise whats in the cargo hold, and find a local buyer, then resume.

Having to start a UT again after every emergency jump would be very tedius. Better it just restarts itself.

You in the middle of battle with 100 Xenon and your UT makes an emergency jump and wants a manual restart. Are you going to take your eye off the ball long enough to restart it ? No way ! It will stay dormant until thebattle is over. And quite unnecessarily.

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

Post by euclid » Tue, 5. Sep 06, 12:00

I'd prefer that the script recognise whats in the cargo hold, and find a local buyer, then resume.
Yes, that would even be better but it's not that easy. Amongst many addition things the UT would need to run the enemy check again.

Having to start a UT again after every emergency jump would be very tedius. Better it just restarts itself.
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). That's already difficult.

And more important: it does not happen so frequently and hence it's not that tedious.

You in the middle of battle with 100 Xenon and your UT makes an emergency jump and wants a manual restart. Are you going to take your eye off the ball long enough to restart it ? No way ! It will stay dormant until thebattle is over. And quite unnecessarily.
If this is fixed to the minimum extend as I've suggested then you don't need to 'take your eye off the ball' because your UT is safe. Just restart it later.

Cheers Euclid

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

Post by apricotslice » Tue, 5. Sep 06, 12:02

euclid wrote:If this is fixed to the minimum extend as I've suggested then you don't need to 'take your eye off the ball' because your UT is safe. Just restart it later.
Theres just the small matter of lost earnings :)

especially if it takes you several hours play to end the battle.

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

Post by gnasirator » Tue, 5. Sep 06, 12:05

I've suggested already (see script forum) to change the script such that after he made the emergency jump and docks all current tasks are cancelled. The player just to restart the UT.
this would not be a problem at all. as the uts now support rest ware selling I can just set them to cancel everything after emergency jumps and make them look for a new traderoute.
thanks for pointing that out I'll check it out.
With the bonus script verions installed i kept getting system slow downs
Phew that is on the other hand something I can't explain. On my system I don't have slow downs ... already tried version 1.27?
If it keeps slowing could you send me your current save, scripts- and t-folder? Ah and the currently used mods, too.
maybe I can find the reason.
Last edited by gnasirator on Tue, 5. Sep 06, 12:18, edited 1 time in total.

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

Post by apogee » Tue, 5. Sep 06, 12:17

Phew that is on the other hand something I can't explain. On my system I don't have slow downs ... already tried version 1.27?
If it keeps slow could you send me your current save, scripts- and t-folder? Ah and the currently used mods, too.
maybe I can find the reason.
I'll try it out, and do some more testing, cheers!

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

Post by gnasirator » Tue, 5. Sep 06, 12:23

I wish you good luck :)

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

Post by euclid » Tue, 5. Sep 06, 12:24

gnasirator wrote:
I've suggested already (see script forum) to change the script such that after he made the emergency jump and docks all current tasks are cancelled. The player just to restart the UT.
this would not be a problem at all. as the uts now support rest ware selling I can just set them to cancel everything after emergency jumps and make them look for a new traderoute.....
If you manage to fix that, please let me know. I've tried it myself several times but failed.

Cheers Euclid

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

Post by gnasirator » Tue, 5. Sep 06, 12:25

yes, with the original version - without automatic rest ware selling - it's hard to realise.

I have to admit that I haven't looked into the emergency jump script yet ;)

But think it's easy work.

jlehtone
Posts: 21811
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: 13298
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: 13298
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?

Post Reply

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