[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

Post Reply
gnasirator
Posts: 1112
Joined: Mon, 13. Dec 04, 17:15
x3tc

Post by gnasirator » Mon, 3. Feb 14, 22:10

squshy7 wrote: It APPEARS that they will sit on standby if they can't fill up most of their cargo bay, though I haven't monitored the sectors closely enough to say for sure; I suggest this because I experimented with using a couple low cargo bay ships as ST's and they almost never stopped trading (this doesnt help the problem though as the amount of wares/money appears to affect leveling; these low cargo bay traders take forever to gain levels).
That's true. Pilots do level up based upon their total earnings accumulated over their lifetime. So a bigger ship levels pilots faster as they earn way more money.

And therefore pilots won't trade in routes where they won't make any profits at all which is of course more likely in a smaller ship.
This is just like in reality where I wouldn't start a banana transportation business with a porsche ;)
µChips are a different story though. And there small, fast ships have their play. But skilled pilots are better here and jump drives pay off.

My suggestion for you: Get your traders a bigger ship. TS big.

And for the installation: if you don't use the exe, that should be fine but to make sure, delete all *.autotrade scripts first. This is actually what the .exe does for you. It's just a self expanding winrar archive with an included delete script.
you can open and check it with winrar.

squshy7
Posts: 6
Joined: Sun, 29. Jul 12, 15:54
x3ap

Post by squshy7 » Wed, 5. Feb 14, 01:00

gnasirator wrote:
squshy7 wrote: It APPEARS that they will sit on standby if they can't fill up most of their cargo bay, though I haven't monitored the sectors closely enough to say for sure; I suggest this because I experimented with using a couple low cargo bay ships as ST's and they almost never stopped trading (this doesnt help the problem though as the amount of wares/money appears to affect leveling; these low cargo bay traders take forever to gain levels).
That's true. Pilots do level up based upon their total earnings accumulated over their lifetime. So a bigger ship levels pilots faster as they earn way more money.

And therefore pilots won't trade in routes where they won't make any profits at all which is of course more likely in a smaller ship.
This is just like in reality where I wouldn't start a banana transportation business with a porsche ;)
µChips are a different story though. And there small, fast ships have their play. But skilled pilots are better here and jump drives pay off.

My suggestion for you: Get your traders a bigger ship. TS big.

And for the installation: if you don't use the exe, that should be fine but to make sure, delete all *.autotrade scripts first. This is actually what the .exe does for you. It's just a self expanding winrar archive with an included delete script.
you can open and check it with winrar.
I figured out as much, thanks for the reply.

Here's a question: is mk3 traders interacting with your own stations broken? Because I'm pulling my hair out after two attempts at bullwinkles suggestion of building my own stations to get them to trade more. The first time I built a complete energy loop that wasnt connected with complex hubs, figuring that the mk3 traders would be more than happy to ferry the goods between them. Nope.

But I figured that didnt work because the traders arent actually making any money, since it's all my own goods. That's fine and makes sense, we're not levelling CAGs here. So I built the same energy loop, but this time complexed it all, making an excess of 350 ecells every minute and built it in a paranid sector with 5 factories that were all starving for energy cells. No dice. The STs (which are novas with full cargo upgrade btw, so they can more than fill up their bays) just sit there on stand by. I tried all different ways of fanagling it; making ecells an intermediate and letting the station sell intermediates, making them products, allowing other races to trade and not, adjusting the prices low or high or even exactly matching what others in the sector are willing to pay for them, homebasing the STs to the complex and not....

There was only ONE instance in which a trader actually started to go to the hub to grab a good to sell, but it was soja husks...which isnt desirable at all, since my complex is only on a 1:1 soja husk ratio. I cancelled that action...though to my dismay I decided to run a test and immediately tell him to trade again and this time he apparently forgot he was willing to do soja husks before.

So...if it isn't broken (which it sure seems it is), is it just a function of gross money gained? That's the only explanation that makes sense: that you coded this so that the higher level a trader is, he will not do trades that don't result in some net amount of money; and this net amount of money that must be made per trade at a given level must have been predefined by you, or else the trader would adapt to his storage bay.

(PS, And if that is true, then I implore you to rethink that. The trader should adapt to his storage bay. Why shouldn't I be able to run a fleet of goner rangers? they're XL, they have 1/3 the capacity of a fully upgraded mistral but are 3 times as fast. which means they could run volume in the same amounts over the same period of time, but also have a higher chance of beating another trader due to speed.)

gnasirator
Posts: 1112
Joined: Mon, 13. Dec 04, 17:15
x3tc

Post by gnasirator » Wed, 5. Feb 14, 19:15

This is the levelling system:

Code: Select all

019   $Gained = [THIS] -> get local variable: name='Gain'
020   
021   * This is the learning trader system. I use Local Variables as EXP Levels.
022   * Level experience by sum formula with a steep curve
023   while $Gained >= ( 20000 + 1000 * $experience ) * ( $experience * ( $experience + 1 ) / 2 )
024   * sector traders only may level up to lvl 10, galaxy to 25, local to 20
025 @ |= wait 5 ms
026   |if $experience < 10 OR ( $traderange AND $experience < 20 + $b.is.ut )
027   ||inc $experience = 
028   ||$level.gained = [TRUE]
029   |else
030   ||break
031   |end
032   end
033   
034   if $level.gained
035   |[THIS] ->set local variable: name='experience' value=$experience
036 @ |$Pilot = [THIS] -> call script 'lib.ship.var.setpilotname' :  ship=[THIS]  experience=$experience  rank=$experience  ranktype=1
037   end
So yes, the level simply depends on the total earnings of the trader over his lifetime with the lower levels' difficulty decreased and the higher levels increased.

For player owned stations: There's only a check included to avoid bankrupt sellstations:

Code: Select all

118   * Extra check: If sellstation is player-owned and bankrupt, blacklist it
119   * and search again for a sellstation
120   * - - - - - - - - - - - - - - - - - - - - - - - - - -
121   |$sellstation.owner = $sellstation -> get owner race
122   |if $sellstation.owner == Player
123   *gosub breakpoint
124   ||$sellstation.money = $sellstation -> get money
125   ||if ( $price.sell * $amount ) > $sellstation.money
126   |||append $sellstation to array $blacklist
127   |||inc $i = 
128   |||continue
129   * retry the same ware with another sellstation
130   ||end
131   |end
132   * - - - - - - - - - - - - - - - - - - - - - - - - - -
Otherwise they're treated like regular stations -> they have to offer the best buy/sell prices. So if you want the MK3 traders to buy from your stations or sell to them, set their resource buy prices to max and product sell prices to min and then forbid trading with other races.
But actually it's easier to simply use Lucike's Commercial Agent.

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 7637
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Wed, 12. Feb 14, 16:52

gnasirator, loving this fix - thanks!

Feedback on usability of the blacklist manager:
First of all, this isn’t game-breaking, it may not even be adjustable and I don't think it's directly related to your work. That said, it would be nice if the “add sector” option was at the top of the blacklist manager or if the selector defaulted to being back over the “add sector” option after one had just been added. Once we’ve added a few hostile sectors to the blacklist, adding new ones could be easier it we didn’t have to scroll down the list in order to get to the options at the bottom. As mentioned, it’s not game breaking and the blacklist manager is well worth doing. Just mentioning in case it was something tweakable in a future update to this fix.

gnasirator
Posts: 1112
Joined: Mon, 13. Dec 04, 17:15
x3tc

Post by gnasirator » Wed, 12. Feb 14, 19:29

Sounds reasonable. As the backlist manager ist mostly not from me, I'd have to look into its code.

But I'll see what I can do!

I don't even know if menu items can be preselected at all ...

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 7637
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Wed, 12. Feb 14, 20:49

That's kind of you to think about it - thank you!

gnasirator
Posts: 1112
Joined: Mon, 13. Dec 04, 17:15
x3tc

Post by gnasirator » Thu, 13. Feb 14, 15:50

I just checked but I found no way to preselect a menu entry.
I fear I must disappoint you. This doesn't seem to be possible - at least I don't know how to do it.

Sorry :(

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 7637
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Thu, 13. Feb 14, 15:59

It may be unfortunate but you tried - I can't be disappointed overall :)

Thank you.

Having made a backlist once, any idea if it would be possible for me to import the blacklist into a future new game without it breaking? Perhaps by editing a file?

gnasirator
Posts: 1112
Joined: Mon, 13. Dec 04, 17:15
x3tc

Post by gnasirator » Thu, 13. Feb 14, 17:43

Phew, I think not as the blacklist itself is stored in global variable. And that is proprietary code of x3.

You could try to dump the contents into a file or look in the save game if it is stored in there somewhere (has to be).
But I have no idea how to do both neither do I know if it works at all.

I'm mostly learning by doing. That's how this script evolved btw.
So I'd suggest you should do the same ;)

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 7637
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Thu, 13. Feb 14, 18:31

hehe, fair enough :goner:

Barleyman
Posts: 127
Joined: Sun, 16. Apr 06, 00:52
x3

Post by Barleyman » Mon, 24. Feb 14, 02:19

I have noticed a glitch with the script. Perhaps it's already been brought up but..

At least with "signal targeted" script active, you get looping behavior. Your UT runs into a bad guy and promptly jumps away, so far so good. However, now it looks for the best deal and often selects that same sector again.. You can see where this is going..

As there's so little margin between being targeted and emergency jump kicking in, 2nd round usually results in major damage already. You were talking about the blacklist just now. I think this would require a temporary blacklist entry to be handled properly.

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Mon, 24. Feb 14, 02:43

On a side note, you do not need to use Signal_Targeted on Improved Mk3's. They have their own version of Signal_Targeted built in. It is one of the reasons that Improved Mk3's have much better survivability than vanilla traders.

gnasirator
Posts: 1112
Joined: Mon, 13. Dec 04, 17:15
x3tc

Post by gnasirator » Mon, 24. Feb 14, 20:31

I guess, this is the reason.

Usually, traders do blacklist a sector temporarily and don't return there.

Barleyman
Posts: 127
Joined: Sun, 16. Apr 06, 00:52
x3

Post by Barleyman » Tue, 25. Feb 14, 23:05

DrBullwinkle wrote:On a side note, you do not need to use Signal_Targeted on Improved Mk3's. They have their own version of Signal_Targeted built in. It is one of the reasons that Improved Mk3's have much better survivability than vanilla traders.
I thought the signal mod is for giving heads up in advance when red ships pick yours as a target and start closing in. "target" apparently means when the target computer starts tracking selected ship just out of range. Or similar function for OOS.

So just to clarify, signal targeted should be used with CAG, CLS but not with OK traders or improved UT?

What about sector traders, they do not have enough XP to use jump drive yet?

Barleyman
Posts: 127
Joined: Sun, 16. Apr 06, 00:52
x3

Post by Barleyman » Wed, 26. Feb 14, 13:41

Does sector trader / universe trader do emergency jump from level 1 or is there a minimum level?

Post Reply

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