[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 »

alright alright ... I see, that drone thing might be a bug somewhere in the code.
It would help me a LOT if you can describe me in detail, how to reproduce that error.
That would make fixing it a lot faster. If you can't I'll have to find out myself and that would mean I can't fix it before next week ;)

And yeah ... paranid. that's what I meant :D
rafezetter
Posts: 131
Joined: Wed, 25. Jul 07, 22:00
x3

Post by rafezetter »

ok I've just loaded up x3 (after checking forum for answers - and reading this post) and...guess what? I've got 10 yes TEN of my UT's all sitting in Profit Centre Alpha 5 docked 5 in space..vulnerable... all trying to buy dones.

10 is half my ut fleet ..sitting there idling...


fk's sake - 2 in PTNI..take a wild guess where...

1 in wastelands..... yup you guessed it... ok news just in 1 trying to buy drones and 1 SELLING drones

and 1 in Treasure chest trying to sell drones.

what the hell did you do? :lol:

and now a 3rd has just jumped into wastelands - destination drone factory ..no I'm really not making this up...

Edit: ok I'm going to re-start the UT script on each of them, it's 22.19 GMT and i'll see how long it takes before they revert...
Last edited by rafezetter on Thu, 19. Apr 12, 23:19, edited 1 time in total.
Buck_Rogers
Posts: 1521
Joined: Mon, 20. Dec 04, 23:23
x3

Post by Buck_Rogers »

Ok. I have some VERY interesting news.

I've noticed my UT's have just started displaying the behaviour mentioned. They were trading normally earlier. BUT, they have all very recently been promoted to level 25. Non of my traders which are lower then level 25, are displaying such behaviour.

It's the same for my Sector Trader. Except he is level 25 and has simply just gone into permanent standby. That is untill I increase his range to include a factory that can sell him Fighter Drones!

So the problem does'nt occur unless the traders are level 25. At least, not in my case anywayz.

NOTE: LV's cheat spawns level 24 UT's.
Buck Rogers

Vice Admiral of Shadows Haven Alliance (SHA) visit us at:
SHA Forum
Feel free to join my DID
Too often we lose sight of life's simple pleasures. Remember, when someone annoys you, it takes 42 muscles in your face to frown. But only 4 to extend your arm and slap the bugger!
rafezetter
Posts: 131
Joined: Wed, 25. Jul 07, 22:00
x3

Post by rafezetter »

I've just seen a green TS ship undock from my PHB (whilst I'm eating my tea) and lo and behold it's a ...UT, so I go into additional commands and report blacklisted... MY PHB is listed as is my EQ.... so why was he docked and leave on his own? I didn't tell him to do either.

It's 23.02 so the reset has been going for 40+ minutes.

I also spawned UT's via the cheat after having to re-start everything, and all of mine are 25..checking...

*grumbles* UT trader destination :headquaters sell: Gamma Pulse Cannon - he's got 5 in his hold on his way to sell to my headquaters (that is listed under permanently locked)

I'd wondered why a save of 69 mill went down to 53 when I left it on this
afternoon whilst I was doing stuff outside...

Edit: ok 6 UT's have reverted back to profit centre drone fac - 2 have gone to PTNI - 1 in Rhonkars fire....

you get the idea - less than an hour they have reverted

Edit 2: I've been reduced to playing ping pong (I tell them to piss off - they come back again..) having to reset my UT's when they show up at the PHB

I'm going to try locking the entire sector...but that seems like a workaround rather than a fix, as here are many bases here they could trade with - reducing potential profitsssss
Last edited by rafezetter on Fri, 20. Apr 12, 00:32, edited 1 time in total.
Buck_Rogers
Posts: 1521
Joined: Mon, 20. Dec 04, 23:23
x3

Post by Buck_Rogers »

Have you tried the Sector Locking option rather than the Station Lock? See what happens if you lock the whole sector
Buck Rogers

Vice Admiral of Shadows Haven Alliance (SHA) visit us at:
SHA Forum
Feel free to join my DID
Too often we lose sight of life's simple pleasures. Remember, when someone annoys you, it takes 42 muscles in your face to frown. But only 4 to extend your arm and slap the bugger!
rafezetter
Posts: 131
Joined: Wed, 25. Jul 07, 22:00
x3

Post by rafezetter »

just tried that edit 2 in above post... just tried resetting a trader with PHB as destination 3 times, no change - this guy REALLY wants to sell me his Gamma thingamijigs...

wonder if I better check the pilots name...if it looks even vaguely dodgy (think bin laden) i'm popping that tard!

Edit: ok thats odd - he docked, mooched for a while then undocked and is going to the Argon EQ - maybe he needed the toilet, maybe I'll rename him shitbreak (american pie) :lol:

EDIT: ok it's 05.14 am GMT I'm about to set it going for the night normal speed, currently 16 UT's are trying to buy drones (from the same bloody fac) 1 is selling drones (just 4 - so that run will be a loss after wages) and the other 2 I own seem to be working normally - both of which have drones in the cargo hold.

I really don't want to have to buy and construct a half dozen or more drone facs just to feed them, and then some support facs as well..

there must be some way around this..is it possible to add some sort of IF/THEN timer? IF drone fac supply <=5 (or however many it's trying to buy in 1 go) THEN restart UT script.

OR... Can the UT be set so that even if it has just 1 drone (or whatever minimum) it will continue normally ?

That's an idea... can the UT be set so that it won't try to buy all it wants in one hit but 1 by 1 - and ONLY 1 by 1 (like the way it buys shield upgrades), that way even if several (or 16) ships turn up wanting to buy drones at least some of them can be serviced and continue trading.

I had considered adding the MARS script to all of them as they would drop less drones that way, (dunno if you can look at that script and see which bit has been modified) but is it possible just to do that anyway? If all the drones are doing is providing a distraction, then 4 might be enough? From what I can see they tend to drop around 8 at a time, far more than is possibly necessary and means they have to restock each time, placing even more pressure on the few drone fabs already available. (i've decided I'll buy a couple more and try to place them equidistant from the others) If they only drop 4 then their drone habit will only need feeding 1/2 as often.

Again I really appreciate the work you've put into this, and more time to convert from TC, but it seems right now things are needing a bit more attention.

Oh and regarding the UT's and my HQ - I've set all prices on stuff I've stored there to minimum, so either that will work and stop them selling to me, OR I'll come back to find it stripped clean.. :)
rafezetter
Posts: 131
Joined: Wed, 25. Jul 07, 22:00
x3

Post by rafezetter »

ok.... *humpf*... it's 6.11 GMT and I've just reset all the UT's (I thought they at least might trade a little whilst I was in bed before reverting) and watched as one of them which had 4 in cargo sell them elsewhere.

so...he was waiting to buy more (I assume so he had 8 like the 2 UT's that are happily trading) but when he was re-issued with the UT command he went ahead and sold what he had.

And that's where I think the problem lies... from what I can tell the UT's if they have a surplus of stock of something, they go and sell it elsewhere, problem is... if the only thing they have in their hold is drones, (as they go and collect more after completing a trade run) BUT CRUCIALLY less than 8 (which seems to be the magic number) they then default to sell surplus, and the only "surplus" they have is their drones, so they are stuck in a feedback loop.

As drone fabs cycles are very slow it seems at any one time there are very few drones available, so the chances of a UT coming to "collect ware" to stock up on drones and getting all 8 they need at once is slim to none as they are already competing with NPC's as well as each other, so they get a couple... go on standby..reset, and PRESTO, the first thing they do is sell whatever surplus they have in their hold..

The drones.

After a re-read of what I just wrote something struck me *OW!* - now I've put the cat out an idea comes to mind... Am I right in thinking that the UT's keep an amount of ECells set aside for jumping even when trading ECells? Can drones be set aside too; say 12 or 16 (but preferably a multiple of 4 - if you manage to change the drop amount to 4, or 6 instead of 8 ) - 2x or 3x the drop amount anyway - that might sound like a lot, but if they keep more, then the times they need to go and buy more will have a much smaller chance of overlap as it's unlikely that more than a few UT's will encounter enemies per hour, and by both DECREASING the drop amount and INCREASING the stored amount should ease that problem even more.

Just my 2 isk...

OK now I'm definately going to bed :)
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

phew, what an amunt of text :)

okay to make it short: Actually traders ARE supposed to keep a drone supl of max 15 drones aside in their cargo bay. There must be something wrong with the script calculating the sellamount of a ware (get.sellamount). Because if that script returns a value, it means there is a ware surplus in cargo bay (after subtracting the amounts to keep).
Seems, the drone part of it is bugged.

Strange, that this only happens at lvl 25 but that's a great hint. So I can check it myself.

Unfortunately, I'm not at home right now. But tonight I'll be for a short while before leaving again.
I hope, I can fix it in that time. Keeping my fingers crossed!

So next update scheduled: tonight!

edit: fixed. It was indeed just a small condition problem in the get.sellamount and get.buyamount scripts.
All is working fine now.

have fun :)
rafezetter
Posts: 131
Joined: Wed, 25. Jul 07, 22:00
x3

Post by rafezetter »

Hi - thanks for checking and fixing..so.. the same dance as before? - uninstall everything and re-install? or will a simple re-install overright whatever bit was not working?
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

yeah just overwrite everything.

the traders will restart and update automatically.

cheers!
rafezetter
Posts: 131
Joined: Wed, 25. Jul 07, 22:00
x3

Post by rafezetter »

ERRM...

I Just noticed that 4 UT's are all flying to the same destination fac - squash mine fac - to sell the same thing.. and checking their cargo they all have 525 of ore

and 3 more are all going to the same silicon mine to buy the same thing..

I thought you added some sort of autolock so traders didnt do this?

Edit: ok 1 of the 4 going to squashmine fac has unloaded..the other 3 are still on thier way even though he's full now...
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

yes, they do have that. But it isn't 100% guaranteed to be used.

For example, if ALL traders start simultaneously, they ALL start with an empty blacklist. And therefore they could ALL find the same trade route. The blacklist is only checked at the beginning of the search cycle!

Usually, this works fine, because traders never start searching simultaneously AND happen to be in the same sector AND happen to find the same trade route.
BUT it can happen if you manually start a bunch of them from one sector, all at the same time and with a trade range of <= 1, for example.

Just let them work for some more hours and they won't do this anymore.
And no worries, the other traders will notice that they couldn't sell at the filled fab and will sell elsewhere.

cheers ....
Buck_Rogers
Posts: 1521
Joined: Mon, 20. Dec 04, 23:23
x3

Post by Buck_Rogers »

Ok. I've also updated and am glad to say, my level 25 traders seem to be back to normal. They are currently trading weapons at the moment, but all looks good.

Well done my friend. I will keep an eye on things just now, just to make sure nothing else goes wrong.
Buck Rogers

Vice Admiral of Shadows Haven Alliance (SHA) visit us at:
SHA Forum
Feel free to join my DID
Too often we lose sight of life's simple pleasures. Remember, when someone annoys you, it takes 42 muscles in your face to frown. But only 4 to extend your arm and slap the bugger!
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

Great! That relieves me :)

So have fun with it, then!
Sanjor
Posts: 67
Joined: Sun, 18. Sep 11, 14:59
x4

Post by Sanjor »

I think you forgot include/read text files for the MK3 blacklist manager.
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

Did I? Are you having read text errors? In what language are you playing?

I'll check that issue on sunday evening, when I'm back home.
Sanjor
Posts: 67
Joined: Sun, 18. Sep 11, 14:59
x4

Post by Sanjor »

Err... I posted in the wrong version's thread. :oops:
Elfy
Posts: 3
Joined: Fri, 14. Dec 12, 19:56
xr

Post by Elfy »

I had a feeling that my UT was jumping all over the universe now despite being only level 13.
After checking plugin.autotrade.getroute.long I noticed that startsector is assigned outside of the loop, but then it gets reassigned inside the loop to potential sector for buying ware. So with every iteration of search algorithm UT may start search farther and farther from sector where it resides at the moment.
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

Okay and this is the Reunion version you're talking about?
I should update this, I know. The official AP build is much more advanced.

I'll look into the code to see what you mean.

In short: sector traders loose their start sectors and roam around the universe?
Elfy
Posts: 3
Joined: Fri, 14. Dec 12, 19:56
xr

Post by Elfy »

It's X3:Reunion with version 1.7.3 of this script.
Universal Trader with pilot of level 13 sometimes finds wares to buy a LONG way from where it stays at the moment.

Example: (I had to add some logging back to make sure of this bug)

Code: Select all

ranges: buy=4, sell=4, startsector=Thuruk's Beard
<row><gametime days="4" hours="16" minutes="12" seconds="55" />
<route from="Space Fuel Distillery M alpha(Herron's Nebula)" to="Pirate Base(Ore Belt)" ware="Space Fuel" amount="166" profit="43750"/></row>

<row><gametime days="4" hours="16" minutes="18" seconds="41" />
<expense ship="Your Express" type="fuel" number="90" ware="Energycells" station="Solar Power Plant L delta(Akeela's Beacon)" unitprice="12" price="-1080" />
</row>

<row><gametime days="4" hours="16" minutes="22" seconds="58" />
<expense ship="Your Express" type="fuel" number="160" ware="Energycells" station="Solar Power Plant XL delta(Ore Belt)" unitprice="14" price="-2240" />
</row>

<row><gametime days="4" hours="16" minutes="27" seconds="38" />
<transaction ship="Your Express">
<buy number="166" ware="Space Fuel" station="Space Fuel Distillery M alpha(Herron's Nebula)" unitprice="955" />
<sell number="166" station="Pirate Base(Ore Belt)" unitprice="1252" />
<profit traderun="49302" total="1077614" />
</transaction>
</row>
So it's Thuruk's Beard -> 4 gates in opposite direction for ecells -> 11 gates to Herron Nebula to buy product -> 3 gates to Ore belt to sell

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