[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

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

Post by Buck_Rogers »

Ok. I've installed the .spk into the PM and am ready to try this out. I've loaded up my game, twice, because I can't find any command for creating a sector blacklist?

Obviously, the commands for Sector Trader and Universe Trader are Present. :D

Am I missing something?
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 »

The commands are in the ship command menu.

There are three of them:
- Add/Remove Sector
- Add/Remove Station
- List Blacklist

(Or similar)

If you are unsure, check if there is a plugin.autotrade.main.pck file in the scripts folder.

If so, it should have installed correctly.
Buck_Rogers
Posts: 1521
Joined: Mon, 20. Dec 04, 23:23
x3

Post by Buck_Rogers »

Which menu? The Trade menu?, Additional command slots?, or somewhere else?
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 »

additional command slots. there they are.
Buck_Rogers
Posts: 1521
Joined: Mon, 20. Dec 04, 23:23
x3

Post by Buck_Rogers »

The file you mentioned is present, but the commands are not :(

could it be because none of the files you created are recognised? When I examine the properties of each file, the 'file type' section has nothing listed. Yet, when I do a search through the scripts folder, they are ALL listed as .pck files??

Plus. I had to make my own .spk file, as you are using a different version of the PM to me. As a result, I cannot install your .spk file

EDIT: Ok, I think I know what's going on. I forgot to check for command conflicts in the PM. Upon investigating, I found conflicts with Xone's TCS script. 1258, 1259 and 1260 were the culprits. So I moved the TCS commands.

However. I still get read-text errors in the additional command slot, relating to the above commands. Looks like the relevant text file is not being read.

How can I fix this?

EDIT 2: Feedback. I've left my 10 or so UT's trading for a little while and have just noticed some strange bahaviour. the only thing they are doing is buying and selling their own stock of Fighter Drone. Constantly They are not looking at anything else.

They simply buy 4 Fighter Drones from a local factory, then sell them at the nearest Trading Station. Then they repeat the run. Again and again. Maybe jumping to another sector in the process, but still only to find Fighter Drones.

Something not right there.
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 »

Okaaaaay .... would you try to manually install the script, please?
So I can make sure, it isn't the PM messing it up?

And yes, the conflicts are there, I know, but those slots were some of the few, which were signalled as 'almost' free.
Are you currently using Xone's TCS script? What does it do? I don't know it.

If you have a suggestion for other command slots, please let me know.
Unfortunately, I need 3, as custom menus aren't supported in Reunion :/


edit: sorry, I can't create a .spk file. I tried v2.12 Plugin Manager now and it crashed when saving the spk.
So I won't support spks for reunion, only for TC/AP. v1.40 XPM works smoothly there.

And I changed the command slots to the trade menu, overwriting HALO's sector lock commands as they're not compatible to this MK3 script anyway. So there shouldn't be any conflicts any more.
Would you try again and report to me if the strange behavior still occurs.
Because I cannot reproduce it on my computer ... All fine here.



edit2: trade menu commands SUCK. As soon as I want to change the blacklist of a running trader, he stops.
-> Returned commands to the additional commands menu, slots 53,54,57. Therefore breaking compatability to:
Ships Renaming Management by StarTrekMarc
and
AI combat division config by 3ddz
But now it works as intended again. Sadly, I can't do anything about the (very) limited amount of command slots available.
Buck_Rogers
Posts: 1521
Joined: Mon, 20. Dec 04, 23:23
x3

Post by Buck_Rogers »

gnasirator wrote:Okaaaaay .... would you try to manually install the script, please?
So I can make sure, it isn't the PM messing it up?
Tried that still no joy.
gnasirator wrote:And yes, the conflicts are there, I know, but those slots were some of the few, which were signalled as 'almost' free.
Are you currently using Xone's TCS script? What does it do? I don't know it.
Xone TCS is an excellent turrent script, which I use. I would'nt be too bothered about command slot conflicts, as they are easy to move anywayz. Plus I have a script list as long as my arm! :D So conflicts are bound to arise

gnasirator wrote:edit: sorry, I can't create a .spk file. I tried v2.12 Plugin Manager now and it crashed when saving the spk.
So I won't support spks for reunion, only for TC/AP. v1.40 XPM works smoothly there.
Again. Do not worry my friend. I can make .spk files with PM v2.12 myself ;)
gnasirator wrote:And I changed the command slots to the trade menu, overwriting HALO's sector lock commands as they're not compatible to this MK3 script anyway. So there shouldn't be any conflicts any more.
That's fine. As I've removed Halo's script anywayz.

gnasirator wrote:Would you try again and report to me if the strange behavior still occurs.
Because I cannot reproduce it on my computer ... All fine here.
Certainly my friend. Just as soon as I fix these damn read-text errors! lol
gnasirator wrote:edit2: trade menu commands SUCK. As soon as I want to change the blacklist of a running trader, he stops.
-> Returned commands to the additional commands menu, slots 53,54,57. Therefore breaking compatability to:

Ships Renaming Management by StarTrekMarc

and

AI combat division config by 3ddz

But now it works as intended again. Sadly, I can't do anything about the (very) limited amount of command slots available.
Ok. I did see the commands move from the Additional Command slots to the Trade menu. But, they are still in the Trade menu. They have not moved back. Also, they are listed as Read-Text errors. The commands themselves do appear to work. With the exception of the 'Display Sector Blacklist' command, or whatever it was called. When I ask it to bring up the list, it also appears as a Read-Text error.

However. I THINK I may know what's wrong. I converted the .pck file 440003 to a .xml file and then opened it in Notepad. I then noticed the language I.D field was set to 49 and not 44. I did try and change this myself, but it still did not remove the errors. I'll keep looking at it though, as I'm sure that's the problem.

EDIT: YYAAHHOOOOOOOOOOOOOOOOOO!!!!! I've fixed it! :lol:

I was indeed correct. The language ID was the problem. Had a feeling it would be, as I've had this happen before with the 'Gonar Map Updating Service' script. The 't' file language ID was set to 49 not 44. even though the name of the file in question started '44'

Meh

Ok. I noticed the same problem you had also, with the Trade Menu slots. I.E When you use one of your commands the Trader ship it's being used on stops dead in it's tracks with no orders. Very dodgy!

So. Now I need to move the commands back to the Additional Command slots. Shall I leave this to you? :D
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 »

jeah great find! I'll fix this immediately. There you can see that I only can test in lang id 49 (german) :)

the command slots already ARE back in ship commands (additional commands).

So please re-download the package and test it now. Should work. I'm using command slots 1253, 1254 and 1257 (plus 359 but this one only for signalling that the trader retreats).
Buck_Rogers
Posts: 1521
Joined: Mon, 20. Dec 04, 23:23
x3

Post by Buck_Rogers »

Ok. I have downloaded and installed the fixed version. All of the commands are now in the right place and working correctly.

However. My UT's are still displaying the strange behaviour I mentioned earlier. Only trading in Fighter Drones. I decided to fix this by destroying every bloody one of them! lol Then spawning UT's using LV's cheat. :D

And this seems to have fixed the problem. :D
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 »

Aha! I'm relieved, that it does work now, finally :)

And I'll check that issue on my computer. maybe I can reproduce it. It could be a problem with some local variables.
Buck_Rogers
Posts: 1521
Joined: Mon, 20. Dec 04, 23:23
x3

Post by Buck_Rogers »

I also had to load, then save every file manually using the Exscriptor program, because my system was listing them all as .pck files?? NOT xml files.

Weird!

How did you write these files by the way?
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 »

yes, that is intended. I wrote them as xml and then packed them to .pck.

That has one reason: X3 prefers loading .pck files over the .xml one with the same name.
And to make sure, that MY files, overwriting some of the old MK3 files, are loaded, I pack them to .pck first.


So you could instead just have extracted them into your scripts folder.
Buck_Rogers
Posts: 1521
Joined: Mon, 20. Dec 04, 23:23
x3

Post by Buck_Rogers »

I've changed all the script files to .xml files, and everything seems fine. 1 quick question though:

What's the 'Automatic Station Lock' section of the display?

In game feedback:

Ok. I've left the game running overnight, just to see how my UT's got on. To my surprise, they seemed to do better than they previously did! When I've left the game running overnight in the past, I only seemed to make about 10-15 million credits. I woke up this morning to find they had made me 30 million! lol Despite the fact that I lost one of them to a Pirate ambush. :(

One thing I did notice though. Whenever I watched their actions through the property menu, they seem to get 'stuck' trying to decide what to buy. I.E When they are sitting in a station after doing a run, their orders read 'Buy product for best price'. Then they start flicking through items to buy. They then get 'stuck' on one product for 2 or 3 minutes, sometimes longer, before flicking through the list again.

Perhaps a minor problem? Or is this supposed to happen?

Oh and my Sector Trader seems to be permanently stuck on Standby in Empire's Edge. His range is set to zero, and he seemed to be working fine for a while, but has now stopped. Even restarting the ST command does nothing. Except make him browse the product list for a few seconds, before going back into standby.

Problem? Or is Empire's Edge just empty of good deals? lol
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 »

The getting stuck during the choosing cycle is normal behaviour. Unfortunately, I can't avoid it. It has to do with the sector lock system.

This occurs if the trader finds a route where one of the stations (buy- or sellstation) is locked. THEN the trader has to find another one, excluding the locked station. And this is done in script language, therefore takes a while.
In fact, I only mimic the behaviour of the find station with best price ... exclude array <arg> from the TC/AP script engine. There, this works very fast, as it is a hard coded command (*cough* EGOSOFT! Please implement this command to script engine v33!)

The 'Automatic Station Lock' section lists all the automatically locked stations. Traders lock their trade destinations to prevent others from using the same destinations for their own routes. And this overview lets you know, which stations are currently 'active' by the traders.

And the increased profit might be due to the improved trade search routines, where I made sure that only REALLY profitable traders are executed. Before, this wasn't always guaranteed and traders could even make losses by trading, due to their salary.

And I guess that Empire's Edge is just empty. If it hadn't worked before, I would say you don't have enough reputation with the Split but that seems not to be the case :)
Local traders with a trade range of up to 1 jumps use an advanced search algorithm which always delivers only the one best trade in the area. Hence if nothing is found once, there won't be anything found after a reset. Just increase the trade range to 1. That should do the trick.

And I'm glad it works! I'll wait some more weeks and then apply to get this script signed :)
rafezetter
Posts: 131
Joined: Wed, 25. Jul 07, 22:00
x3

Post by rafezetter »

Buck_Rogers wrote:
However. My UT's are still displaying the strange behaviour I mentioned earlier. Only trading in Fighter Drones. I decided to fix this by destroying every bloody one of them! lol Then spawning UT's using LV's cheat. :D
ooh you big cheater! *cough* pot / kettle....

i've cleaned out the old new version and will try the new new version now, hopefully it'll solve my readtext issues and stop my UT's from bleeding me dry! - left it running last night and had lost 100mill from the PHQ to them ... (locked to other races), argnu beef anyone?
rafezetter
Posts: 131
Joined: Wed, 25. Jul 07, 22:00
x3

Post by rafezetter »

ok new 1.7 version seems good as far as readtext fix goes but.... I was in omicron Lyre in a big fight with lots of xenon fighters and 3 xenon k's and... 2 of my UT's jumped in, the fight had already been going for 5+ minutes before 1 then another a couple minutes later jumped in.

They both jumped out after dropping drones but...why the hell did they jump IN in the first place?

Something must be wrong with the enemy activity checks...

Can't comment on the other improvements yet as I was already in Omicron when I added the new version and the fight broke out..

I know this reads badly but I do appreciate the work you're doing :)
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

Actually, I removed the enemy activity checks. Simply because they denied access to a whole system if there was only one enemy in it.
Come on, this is way too careful, traders usually flee very successfully, as you could observe in this event. So I didn't see the necessity for this check anymore.

And I didn't observe any traders getting killed nor heard from other complaining. If this evolves to a problem, I could still add a check, thogh.
Maybe lock a system if there are more than x hostiles.

But this would result in more laggy trade route searching, as those sectors would be blacklisted in the procedure and the soft-coded find best station comand then has to find another suitable buy-/sellstation which takes a while, as it is only scripted.

So .... I'd rather leave it the way it is :)
Maybe for TC/AP, I could implement that. But I haven't heard any complains from that thread yet.
rafezetter
Posts: 131
Joined: Wed, 25. Jul 07, 22:00
x3

Post by rafezetter »

ok, yes I can see your point, they dropped and ran..

however I've just observed another possible problem, as I was having issues with my PHB being filled with stuff from the ut's before the new version installed (I was waiting for a fix) I had docked them all - so I went through them one by one and selected additional commands; station lock, PHB and my EQ, and checked with report, (although HQ was only under autolock not permanent..??) and then going through them re-issuing them with start UT..and several all did the same thing:

Destination: Headquaters, Sell: even more weapons... (or in one case argnu beef as I already had some salvaged at the HQ)

I'm down to less than 30 million now, and I don't want to script in more cash just to fund their habit...

suggestions ?? (without having to destroy them all and go through the refit preferably)
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

HQ was under auto-lock? that is a bug, I'll check it out. Should be permanently blocked!

And you only need to lock a destination ONCE, it counts for all traders. If you lock a destination twice, you unlock it again.
Maybe you just happen to have an even amount of traders which would result in your station just being unlocked at the end again :)

edit: i just coded a check enemies feature. this works great and traders will now ignore sectors with too many enemies in it. But it only works with TC/AP, because it makes heavy use of exclude arrays. And that's really slow in reunion.
Buck_Rogers
Posts: 1521
Joined: Mon, 20. Dec 04, 23:23
x3

Post by Buck_Rogers »

gnasirator wrote:The getting stuck during the choosing cycle is normal behaviour. Unfortunately, I can't avoid it. It has to do with the sector lock system.

This occurs if the trader finds a route where one of the stations (buy- or sellstation) is locked. THEN the trader has to find another one, excluding the locked station. And this is done in script language, therefore takes a while.
Thanks for clearing that up.
gnasirator wrote:The 'Automatic Station Lock' section lists all the automatically locked stations. Traders lock their trade destinations to prevent others from using the same destinations for their own routes. And this overview lets you know, which stations are currently 'active' by the traders.
Good idea that. Would also probably explain why my traders made me more money then they predecessors. :D
gnasirator wrote:And I guess that Empire's Edge is just empty. If it hadn't worked before, I would say you don't have enough reputation with the Split but that seems not to be the case :)
Thats in Paranid Space actually! :P
gnasirator wrote:Local traders with a trade range of up to 1 jumps use an advanced search algorithm which always delivers only the one best trade in the area. Hence if nothing is found once, there won't be anything found after a reset. Just increase the trade range to 1. That should do the trick.
Tried that and had a kinda 'strange' result with it. After choosing Empire's Edge as the start point and setting the trade range to 1, I noticed, looking at the property list, his orders were set to 'Get Ware' Or something to that effect. Also listed in the location field was a Read-Text error. Can't remember the exact details now, coz I hav'nt been able to repeat the error.

And I'm glad it works! I'll wait some more weeks and then apply to get this script signed :)[/quote] :D
rafezetter wrote:ooh you big cheater! *cough* pot / kettle....
cheeky bugger!

I've told you before, I'm not against cheating. Especially in I were in the same position as you. Where your game is faulty and needs to be restarted.
rafezetter wrote:i've cleaned out the old new version and will try the new new version now, hopefully it'll solve my readtext issues and stop my UT's from bleeding me dry! - left it running last night and had lost 100mill from the PHQ to them ... (locked to other races), argnu beef anyone?
Why not just lock the whole sector? Instead of the indiviadula stations? That's what I did.

More Feedback:

Just woke up after leaving my game running over night, and noticed this time I had only made 4 million profit! :( Upon checking the UT's activity I noticed the problem we had before has returned for some reason.

I.E Constantly buying and selling Fighter Drones! :(
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!

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