[SCR] [X3:TC/AP] [v1.8.9.8] [11/16/2019] MK3 Improvement Reloaded

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

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

Post by gnasirator »

alright, then I'll see what I can do about the vanilla bug - hoping to make my customers happy :)

And the ware blacklister .... well I COULD extract that one and put it into a separate addon, like the original blacklist. It would be the user's choice to use it then, if needed.
This way MK3's stay simple but if wanted, they can provide all the setup needed. Good plan? :)
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

gnasirator wrote:alright, then I'll see what I can do about the vanilla bug
Yes, that bug fix is moderately important. It would give every player with UT's a good reason to use your mod.

(Oh, BTW, you might point out that Mk3 Optimization is a mod rather than a standalone script. Some authors forget to do that even though their mods can cause seemingly unrelated conflicts.)
I COULD extract that one and put it into a separate addon
Creative idea! However, I am not sure that installation options are any simpler and easier than configuration options.

Also, you should consider the "maintenance cost". Where will you be in six months? Two years? Will you be like most of the well-known authors here, who do not even reply to threads that they started a year or two ago?

Bugs are inevitable. Some feature requests and compatibility issues are impossible to foresee. It is better to build simple but rugged code than it is to add new features. (Shrug)... that's just my philosophy, anyway.

If you are asking my opinion, then: "Less is more". :)

=========================================

If we change the conversation to "Galaxy Traders by gnasirator", then the criteria change dramatically. THEN you could add as many creative features as you like, and it would make sense. I have the "gut feeling" that it is possible to write something that is MUCH better than CAG, CLS, and EST. The key would be a fresh approach to the user interface.

While CAG, CLS, and EST are powerful, they are really painful for a newbie to absorb. As in weeks of gameplay at an hour or two a day. Even the names are cryptic.

You could, I think, do much better. (You could even auto-eject the pilots into space, which is a feature that I would endorse. Or retrain them into something useful, like Marines.) :)
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

why do you think this script is a mod?

I don't change anything about the game, only scripts. No new models, no core data files changed. it's just scripts.

and about the easy to use stuff you said:
right now the mk3 is still as easy to use as the vanilla one. Buy a trader + software and GO. The ware blacklist is only optional, if needed - so from that point of view, nothing changed. Only added possibilities.

Galaxy Traders ... hmm, I'm not very happy with that idea :)
Do you mean to completely rewrite a new trading script, the one-and-only-ever-needed trader that can do EVERYTHING?

in short: no thanks :) modifying the mk3 was more than enough work and I'm really pleased with the result. I don't see the need to build another trading script.

I'm using MK3s as universe traders for constant profit and CAGs to supply my fabs. All problems solved :)

Only thing disturbing me about the CAG is his attacked behaviour. They die too often. That could be improved, I'm sure of that. But on the other hand would it be a lot of work again. Sooner or later the result would be some kind of CAG Optimization by Gnasirator. And that would again take months if not years to achieve, like with mk3.

Nope, not motivated, sorry :)
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Haha!

OK, that sounds fine to me. :)

You're modifying vanilla code. That's the definition of "mod", isn't it?
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

is it?

I always understood a mod as something that changes anything else than scripts.
And a script adds/changes only scripts. :)

After your definition, this is definitely a mod, that's true.

btw: New version of mk3 should fix the vanilla bug. Just tested it successfully. Actually chances are that the bug was alrady fixed by implementing the new rest ware selling routine. I just added another check to it.

Easy test:
Start humble trader and explore 3-4 sectors. Set a new MK3 to lvl 25 and start it. Check auto sector blacklist for buy and sellstation, fill sellstation's cargo bay up to max, blacklist ALL sectors and see the result:
The MK3 trader flies to the buystation, buys the ware and then realizes that the sellstation is full already. So he tries to sell it somewhere else and fails because every sector is blacklisted.

Result: Trader hangs at the station searching for a new traderoute but can't find any. Just like we wanted him to :)
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Yes, the term "mod" is widely used although poorly defined. The Plugin Manager has its own definition, which is "anything that is in a .cat that has a string name rather than a number name." THAT definition is clearly twisted and causes some quirky behavior, but it does have some history. By that definition, XRM is not a mod. :roll:

However, the knowledge that "mods can cause conflicts; scripts do not" is based on my definition: A mod modifies one or more vanilla files.

There are some well-known script writers who feel free to modify vanilla game files without bothering to call their scripts "mods", which *does* lead to conflicts which *are* frustrating for newbies. I speak from personal experience. ;)

So I suppose that you can call it whatever you want. :)
chances are that the bug was alrady fixed by implementing the new rest ware selling routine.
Coincidentally, one of my UT's was attacked yesterday in Xenon Sector 472. It escaped, but what was it doing in X 472??! I assume that was the bug in action.

I think that a valid test requires an enemy sector. However, I am not sure how we test that a UT will *never* enter a blacklisted sector. It may take a while to accumulate enough data.
Last edited by DrBullwinkle on Wed, 15. Feb 12, 21:29, edited 1 time in total.
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

well ... when being attacked and fleeing, there is no check, as far as I know. The highest prio there is to escape as fast as possible, no matter where to.

At least the one bug cycrow described in his post is definitely fixed. If there are other loopholes the traders use I will gladly fix them too :)



Maybe I'll call this a mod later. Or maybe I don't have to bother - when I'm lucky and Egosoft implenents this into a new patch ...
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

gnasirator wrote:when being attacked and fleeing, there is no check, as far as I know. The highest prio there is to escape as fast as possible, no matter where to.
Oh! That could explain it. Attacked in a normal sector, then "escaped" to a Xenon sector? Just an unlucky jump!
maybe I don't have to bother - when I'm lucky and Egosoft implenents this into a new patch ...
That would be the best. Mk3 Optimization does exactly what the name implies: it makes Mk3 better in several ways, without otherwise changing the way that it works (except for adding the ware balcklister). It would, indeed, be best to simply merge your changes into the vanilla code.
Last edited by DrBullwinkle on Wed, 15. Feb 12, 20:53, edited 1 time in total.
nap_rz
Posts: 1383
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by nap_rz »

so can I use this on already existing ST/LT/UT? do I need to restart them or they simply carry on with the new features?
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

nap_rz wrote:so can I use this on already existing ST/LT/UT? do I need to restart them...?
Yes, just install Mk3 Optimization then go about life. :)

(When you re-start X3 after installation, you will probably reload a saved game. It is the loading of a game that refreshes the script cache from disk. That, in turn, replaces the trader's script with the optimized script.)
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

"do I need to restart them or they simply carry on with the new features?"

You don't. The script has an integrated update routine. The traders restart themselves. They always check when they are docked at a station buying or selling.
But you have to replace the scripts without X3 running. Then load your save.
and if you want to make sure, of course you can just stop and restart them. doesn't matter if cargo space is messed up. the new ones will tidy up ;)

You can easily see if a trader is using the new version if you check them for flight destinations. The vanilla traders don't show them (under the sector), mine do.
nap_rz
Posts: 1383
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by nap_rz »

one more question, are the files new or will overwrite vanilla files?
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Mk3 Optimization overwrites the vanilla Mk3 scripts.

You can save a backup if you like. However, it appears to be a safe script. And gnasirator is quick to address any bug reports (all of which have been minor, so far).

If you install with the Plugin Manager, the PM will automatically back up the original files (although the PM backup mechanism is not 100% reliable).

=====================================================

@gnasirator: Thinking more about rest ware selling, I have often wanted a "Junk Truck". A ship that I could load with wares that I collect, that would then go and sell everything in its cargo hold at best market price.

But I just realized that your Mk3's do that! I all I have to do is to load an Mk3 with junk and start it up!

Wow, you created an awesome new kind of trader without having to do any work! :)

Also, Mk3 Optimization just became a very important script in my library!
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

hahaa funny idea! :D

I'm thinking about Galaxy Junk Trucks here. Flying autonomously through the galaxy, collecting junk and selling it (Supporting MARS drones or collecting manually).

They could have three modes:
1. Wait docked at mothership until cargo bay fuller than 80%, then sell and return -> for use at player ship

2. They could follow a certain ship in safe distance and collect the leftovers -> for use with sector patrols
They could also wait docked and undock to collect automatically.

3. Full auto mode
-> Fly through the universe (Could even explore^^) and collect junk and sell

This could even be combined:
Start an M7 oder M2 as Junk truck, fully armed with MARS and set it to 'aggressive junk collection'. It's now exploring the universe and attacking everything hostile.
Then dock a TS and start the junk truck on it, too. The mothership will notice and do the fighting while the TS takes care of the collecting and selling.

Advantage: I could recycle lots of code from Galaxy Explorers AND even more from MK3 Optimization ;)
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

haha! Yep!

You could do all that stuff. And it would be funny. :)

But my use case was more simple. I accumulate stuff that I pick up as I go about life in the X-verse. Sometimes my goblins pick up stuff after a fight, or I just beam in some stuff, or run over some stuff. Soon, my ship is full of stuff.

I keep the best things, then sell the rest. But selling is a pain! In the past, I have unloaded at the Hub or HQ and set the prices low so that UT's and NPC's will buy it. But some things never sell, no matter how low the price.

That is where the Junk Truck comes in. And the beauty of it is that your UT's do it automatically. I just have to fill one up, then start Universal Trader.

Then I can forget about it until I need to get rid of more junk.

It's perfect. And it is already done. :)

=================================================================
EDIT: However, I have to say that I *love* your "Aggressive Junk Collector" idea! Muahahaha! :twisted:
=================================================================
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

haha japp me too .... I love the idea :D

can't decide between 'aggressive junk collection' and 'active junk collection' yet - opposed to passive, the regular one.

I'd love to hear betty say "Command accepted. Switching to active junk collection."

next thing you hear: *BADABOOM* *MARS Laserfire and rocketblasts* and everything around you goes up in smoke :D
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Oooh, I like that! "Active Junk Collection" is so funny because it is sooo understated! "Active junk collection mode... boom!" I love it. :)

Some X3 scripter must have a wife or girlfriend with a good voice. We should get more sound clips into the game. (And music clips, such as Cowboy Bebop, would be great as well. It is like an animé version of Freelancer.). Somebody posted a Freelancer music clip recently that is a nice addition.

Even if it is not exactly Betty, women's voices are classic for communications. There is a real historical reason that dispatchers are often women -- their voices are more in the middle of the frequency spectrum and they cut through static better than male voices.
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

interesting. didn't know about the frequency stuff but sounds reasonable!

I think there is a mod somewhere which enables betty to custom speak everything. We would just have to enter the text. It uses text to speech features from other software.

or maybe we can cut the sentence together from other betty lines?
nap_rz
Posts: 1383
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by nap_rz »

how do I configure my LT behavior for/after being attacked? I mean I do not want them automatically black listed sectors because they were attacked by pirates...

and do they (LT) use jumpdrive immediately if attacked?
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

in short: you can't, except by scripting.
Edit the lib.ship.sh.attack.trader.flee and the lib.ship.signal.attacked.trader scripts.

They do auto blacklist the sector, that's true. But auto bl is only active for a short time thus keeping the trader from returning to exactly that sector after restarting their trading.
If you skip the blacklisting, they might fly right back to their aggressors ... if you want that, feel free to change the scripts ;þ

And yes, they do it immediately.

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”