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

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

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

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

Post by gnasirator »

don't worry.

stats feature is still under heavy development. saving arrays in global vars doesn't want to work the way I want it to ;)
Neofit
Posts: 121
Joined: Sat, 14. Feb 04, 00:00
x4

Post by Neofit »

Thanks for all the work gnasirator.

Since I installed this script I've had 5 TS attacks, they all jumped out, resumed automatically, and never once did return into the same sector for more punishment. Nice work.

BTW, I noticed that sometimes the STs/UTs do return some stats on their work. For instance when their cargo is full or they don't know where to sell the wares I get a message saying something like "I need help, cargo full, accomplishment so far 1.234.567cr". Can't you just take this amount and make it displayable at will like for the CAGs, or are you trying to do some more detailed stats?
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

Neofit wrote:Can't you just take this amount and make it displayable at will like for the CAGs, or are you trying to do some more detailed stats?
I want to do that, yes.

plans for now are:
Global stats (earned total, earned / playtime)

and then stats per trader (total - per time - maybe profit per flight, too. don't know if I can realize that)


any more ideas?

pls don't come with stuff like average EC per jump. that would be too pedestrian (<- does that expression fit into this context? ... ;) )
User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13485
Joined: Sun, 15. Feb 04, 20:12
x4

Post by euclid »

Mind you, I wrote a little test script

Code: Select all

Script UTperformance
Version: 0
for Script Engine Version: 32

Description
returns gain for a selected UT
Arguments
1: UT , Var/Ship owned by Player , 'Select Universe Trader' 
Source Text

001   $gain = $UT -> get local variable: name='Gain'
002   $time = playing time
003   $days = $time / 86400
004   $hours = ( $time - $days * 86400 ) / 3600
005   $min = ( $time - $days * 86400 - $hours * 3600 ) / 60
006   $mes = '%s : %s : %s : %s profit %s'
007   write to player logbook: printf: fmt=$mes, $days, $hours, $min, $UT, $gain
008   return null
and my very first UT made more than 80M. All my UT's would make more than 2^(31)-1 credits :o


Cheers Euclid
Slaine650
Posts: 70
Joined: Sat, 7. Jan 06, 05:17
x3

Post by Slaine650 »

Does the player HQ block stop the UTs from trading with other player owned stations? I have a trading dock full of goodies at lowest cost and no UTs sniffing around it (other races set to no).

Twice I have found UTs sitting at stations with the order "collect ware, e-cells"
but these are secondary items and they stay put till I jump them out. Both times they had more than 100 e-cell onboard and there were bad guys in the sector.

I've got a metric dozen UTs fanging about the place and since installing the script none have been dusted, cheers :)
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

Slaine650 wrote:Does the player HQ block stop the UTs from trading with other player owned stations? I have a trading dock full of goodies at lowest cost and no UTs sniffing around it (other races set to no).

Twice I have found UTs sitting at stations with the order "collect ware, e-cells"
but these are secondary items and they stay put till I jump them out. Both times they had more than 100 e-cell onboard and there were bad guys in the sector.

I've got a metric dozen UTs fanging about the place and since installing the script none have been dusted, cheers :)
ar I forgot to put my new versions into this thread :)

check out http://www.yourfilelink.com/get.php?fid=229339 <- this new version.

now you can switch mk3 trading in player owned docks on and off - but only the selling process of the mk3 is blocked. it still comes to your docks and buys wares - even if trading with other races is set to no.

"collect ware, e-cells" just means that they're waiting for the delivery service to bring them the needed fuel. 100 e-cells is quite few for an experienced trader.
User avatar
arcana75
Posts: 2165
Joined: Tue, 2. Dec 03, 09:28
x3tc

Post by arcana75 »

Is the UT trading at PHQ automatic as long as the PHQ is not set as homebase? I can't find a command to toggle it.
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

it used to be only enabled if the hq is the homebase of the mk3.

with v. 1.29.5 it was changed. now the mk3's will only trade with the hq if it is trading with other races enabled.
Neofit
Posts: 121
Joined: Sat, 14. Feb 04, 00:00
x4

Post by Neofit »

gnasirator wrote: plans for now are:
Global stats (earned total, earned / playtime)

and then stats per trader (total - per time - maybe profit per flight, too. don't know if I can realize that)


any more ideas?
Besides Total and total per hour and/or day (if that is what you meant) I don't see anything else I could ask from my UTs. Maybe the option to reset the stats? I wouldn't mind a total/ware for the CAGs, but that's for another thread.

Maybe write their actions in an ASCII log file like the CAGs do? What was bought and sold for how much, maybe the profit, promotions, attack/defense actions, etc. I don't know if a silent destruction, one where the UT got killed without even sending a message could be logged into a file.
Slaine650
Posts: 70
Joined: Sat, 7. Jan 06, 05:17
x3

Post by Slaine650 »

could you please tell me how to remove the HQ/player dock block, if its to messy its no problem to carry on as is, thanks.
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

remove the block?
look into the checksector.xml

Code: Select all

050   * Gnasirator-Edit
051   * Handel mit dieser Station erlaubt?
052   * Handel mit Spielerdocks verbieten,die Handel mit fremden rassen deaktiviert habn
053    if $Targetstation -> is of class Dock
054     if $Targetstation -> only player own ships can trade with
055      $bReturn = [FALSE]
056     end
057    end
delete those lines and your mk3's will trade with every palyer dock as before.

alternatively you can just set the docks to trading with foreign races enabled.

well have fun :)
jlehtone
Posts: 22503
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone »

gnasirator wrote:with v. 1.29.5 it was changed. now the mk3's will only trade with the hq if it is trading with other races enabled.
That is logical. "When in doubt, do as the ints do." :wink:

AFAIK, HQ is not a Dock nor a Factory, but a type of its own.

Btw, what are the default actions of vanilla UT in regards of:
1. Factory
2. Complex
3. Dock
4. HQ
depending on setting of:
A. Trade with others Yes/No
B. Intermediates None/Buy/Sell/Both

My uneducated guess is:
1-A, and 2-A: like NPC trader
2-B: ignore
3-A: ????
4-A: ignore
Slaine650
Posts: 70
Joined: Sat, 7. Jan 06, 05:17
x3

Post by Slaine650 »

kia ora Gnasirator, thanks for the help. I'm off to edit code for the first time
since the ZX81 (10 goto 20).
User avatar
arcana75
Posts: 2165
Joined: Tue, 2. Dec 03, 09:28
x3tc

Post by arcana75 »

Can I ask if the english translation went over smoothly? I managed to catch a glimpse of "Lieferservice" in my game (1.29.5) :)
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

jlehtone wrote:
AFAIK, HQ is not a Dock nor a Factory, but a type of its own.

Btw, what are the default actions of vanilla UT in regards of:
1. Factory
2. Complex
3. Dock
4. HQ
depending on setting of:
A. Trade with others Yes/No
B. Intermediates None/Buy/Sell/Both

My uneducated guess is:
1-A, and 2-A: like NPC trader
2-B: ignore
3-A: ????
4-A: ignore
hm do you mean the HQ trading block doesn't work? I actually don't know wether it's a dock or not. I'll check that as soon as I'm back home again.

and what do you mean with the rest. vanilla ut? you mean the standard mk3 traders? not my improved ones?

afaik they just trade with every station they can regardless of the settings you mentioned.

@arcana: I'm sorry - you are right. I fixed that name in the code itself. and you are the first one complaining - so I haven't noticed that fact :)

I'll see what I can do for you.


but - german is a nice language, too ;p
jlehtone
Posts: 22503
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone »

gnasirator wrote:hm do you mean the HQ trading block doesn't work? I actually don't know wether it's a dock or not. I'll check that as soon as I'm back home again.

and what do you mean with the rest. vanilla ut? you mean the standard mk3 traders? not my improved ones?

afaik they just trade with every station they can regardless of the settings you mentioned.
The type of HQ is not a Dock. Ask from Lucike.

I do mean standard UT with "vanilla". I had the impression that they would not trade with Factories, if "Trade with others" is set to "No". I do not know about Docks. That is the way they were in X2. To protect closed loops. That they ignore "Intermediates" setting is no wonder, but IMO they should look at it if they do trade intermediates.
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

alright. i believe you. i'll change that.


and i'll take a look into the rest, too.

but not now. have to be home first ;)
rafi23
Posts: 57
Joined: Sun, 18. Jul 04, 20:42
x4

Post by rafi23 »

Hi

a bug, after UT sells some goods, a temporary Xenon SPP station is not removed.

if you want my savegame,i'll mail it to you
dostillevi
Posts: 184
Joined: Thu, 9. Mar 06, 02:32
x3

Post by dostillevi »

I've got an idea... how difficult would it be to have the UT resupply any ships set to protect it after each jump? I say this because currently its really not possible to set escorts for UTs.

I recently started using a script that should do most of the work. Its called Fleet Support Ship Software by Xai Corp. One of the commands it adds has the target ship resupply another ship (or a group of ships) using the transporter device. All you do is give it the command and sit back and watch while it picks up the ware, flies to the target ship, and automatically transfers the ware(s) to the target. If you borrowed the bit about transferring wares and had the UT give energy cells to its wingmen after it jumped, then it would be possible for there to be autonomous escorts to UTs. Since the UT monitors its energy cell reserves anyway, it will simply be making a few more trips to solar power plants.

A second idea involves a different script I'm trying to use called Summon Assisting Ships by Klyith. It allows the player to summon 3 different groups of ships that automatically either protect, follow, or perform carrier roles. The ships will interrupt whatever command they were doing to respond to the call, jump to the location the player is at, and do their job. When the player docks or jumps out of sector, the support ships will jump back to the sector they were previously in and resume the task they were performing. If you adapted this script to instead summon protecting ships to a UT when it signals that it is under attack, It would be possible to have sector patrols automatically jump to protect UTs when they are in danger and then return to their previous jobs once the UT jumps out.
User avatar
Arleonenis
Posts: 38
Joined: Thu, 5. May 05, 18:38
x3tc

Post by Arleonenis »

link to download english version dont work anymore... unfortunetly... and i cant find even vanilla mk3 to download... :cry: :cry: :cry:

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