[WIP][Mod]TaterTrader v4- An Autotrade Alternative

The place to discuss scripting and game modifications for X4: Foundations.

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

DeadAirRT
Posts: 1022
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [WIP][Mod]TaterTrader v4- An Autotrade Alternative

Post by DeadAirRT » Tue, 28. Apr 20, 18:59

Phiolin wrote:
Tue, 28. Apr 20, 09:23
Submitted a pull request for the german translation.
Thank you!

DeadAirRT
Posts: 1022
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [WIP][Mod]TaterTrader v4- An Autotrade Alternative

Post by DeadAirRT » Tue, 28. Apr 20, 19:48

TaterTrader now has french, german, and russian translations.

User avatar
alexalsp
Posts: 1823
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [WIP][Mod]TaterTrader v4- An Autotrade Alternative

Post by alexalsp » Wed, 29. Apr 20, 04:56

Spelling correction. The rest of the text must be checked directly in the game. I suppose that the translation of the text will be adjusted after the tests of the mod.

Also in some places simplified translation. Too long product names may not fit in the form field.

I propose to the author of the Russian translation to check this moment.

Code: Select all


<?xml version="1.0" encoding="UTF-8" ?>
<language id="07">

<page id="3282837" title="DeadAir Tatertrader T Files" descr="names used in DeadAir Tatertrader mod" voice="no">
 <t id="100">Параметры</t>
 <t id="101">База торговца</t>
 <t id="102">Прописка</t>
 <t id="103">Проверить расстояние</t>
 <t id="104">Штраф за прыжок %</t>
 <t id="105">Владелец станции режим покупателя</t>
 <t id="106">Владелец станции режим продавца</t>
 <t id="107">Свободная торговля</t>
 <t id="108">Быстрая торговля</t>
 <t id="109">Торговая станция</t>
 <t id="110">Станция контрабандиста</t>
 <t id="111">Копировать пресеты</t>
 <t id="112">Все товары</t>
 <t id="113">Легальные</t>
 <t id="114">Нелегальные</t>
 <t id="115">Для строительства кораблей</t>
 <t id="116">Для строительства станции</t>
 <t id="117">Высокие Технологии</t>
 <t id="118">Переработанные ресурсы</t>
 <t id="119">Продукты питания</t>
 <t id="120">Исключенный сектор</t>
 <t id="121">Включенный сектор</t>
 <t id="122">Включить ограничение на торговлю</t>
 <t id="123">Скорость сканирования</t>
 <t id="200">Сообщения в журнале (полная строка в комментариях над записью)</t>
<!--'Selling '+$Gromount+' '+$GrofferBuy.ware+' from CargoHold at '+$GrofferBuy.unitprice/100+' I should earn '+$Gromount*$GrofferBuy.unitprice/100+' in profit.'-->
 <t id="201">Продажа %1 %2 от груза на %3. Я должен заработать %4 в прибыли.</t>
<!--'Queuing up Supply Run for '+$Gromount+' '+$GrofferSell.ware+' Buying at '+$itemcostsell+' to supply '+$GrofferBuy.buyer.knownname-->
 <t id="202">Очередь на поставку %1 %2. Покупать %4 по %3.</t>
<!--'Queuing up Station Ware Sale for '+$Gromount+' '+$GrofferSell.ware+' from '+$GrofferSell.seller.knownname+' to sell at '+$itemcostbuy+' I should earn '+$Gromount*$itemcostbuy+' in profit.'-->
 <t id="203">Очередь продажи товаров станции для %1 %2 из %3 для продажи по %4. Я должен заработать %5 прибыли.</t>
<!--'Queuing up Cargo Transport Run for '+$Gromount+' '+$GrofferSell.ware+' from '+$GrofferSell.seller.knownname+' to '+$GrofferBuy.buyer.knownname-->
 <t id="204">Очередь на грузовые перевозки для %1 %2 с %3 до %4.</t>
<!--'Queuing up Trade order for '+$Gromount+' '+$GrofferSell.ware+' Buying at '+$itemcostsell+' to sell at '+$itemcostbuy+' I should earn '+$Gromount*($itemcostbuy-$itemcostsell)+' in profit.'-->
 <t id="205">Очередь торгового ордера для %1 %2. Покупка по %3 для продажи по %4. Я должен заработать %5 прибыли.</t>
<!--'Station Trader: Supplying '+$Gromount+' '+$GrofferSell.ware+' from '+$GrofferSell.seller.knownname+' to '+$GrofferBuy.buyer.knownname-->
 <t id="207">Торговец станции: Поставка %1 %2 из %3 в %4.</t>
<!--'Station Trader: Selling '+$Gromount+' '+$GrofferSell.ware+' at the price of '+$itemcostbuy+' Expected Profit is '+$Gromount*$itemcostbuy-->
 <t id="208">Торговец станции: Продажа %1 %2 по цене %3. Ожидаемая прибыль %4.</t>
<!--'Station Trader: Buying '+$Gromount+' '+$GrofferSell.ware+' for '+$GrofferBuy.buyer.knownname+' at the price of '+$itemcostbuy+' Expected Cost is '+$Gromount*$itemcostbuy-->
 <t id="209">Торговец станции: Покупка %1 %2 для %3 по цене %4. Ожидаемая стоимость %5.</t>
<!--'Station Trader: Fetching '+$Gromount+' '+$GrofferSell.ware+' for '+$GrofferBuy.buyer.knownname+' from '+$GrofferSell.seller.knownname-->
 <t id="210">Торговец станции: Поиск %1 %2 для %3 из %4.</t>
</page>
</language>


Pichu0102
Posts: 31
Joined: Sun, 6. Jul 14, 10:10
x4

Re: [WIP][Mod]TaterTrader v4- An Autotrade Alternative

Post by Pichu0102 » Thu, 30. Apr 20, 02:41

I think I somehow broke it.

Image

MiFoludek
Posts: 64
Joined: Wed, 18. May 11, 21:06
x3tc

Re: [WIP][Mod]TaterTrader v4- An Autotrade Alternative

Post by MiFoludek » Sat, 2. May 20, 22:34

Hi,

Is there a way to assing TaterTrader to very early build storage?
I can not set station as the homebase for ship
(Very early -> The station without tier and dock bay.)

BR

User avatar
bbn
Posts: 88
Joined: Mon, 31. Jan 11, 18:30
x4

Re: [WIP][Mod]TaterTrader v4- An Autotrade Alternative

Post by bbn » Sun, 3. May 20, 17:27

MiFoludek wrote:
Sat, 2. May 20, 22:34
Hi,

Is there a way to assing TaterTrader to very early build storage?
I can not set station as the homebase for ship
(Very early -> The station without tier and dock bay.)

BR
Yes, it's not perfect but works automatically. I have a few fleets helping in station construction. Set home as a sector you are building in, player sell modifier to 200. Also set max distance to sell to minimum and to buy maximum (or whatever is reasonable). Plus limit wares to station building. I find the default list limited and I add a few things there like field coils, advanced electronics and turret components... Works very well with civilian fleets mod as you need to set up 1 TaterTrader and assign few other ships as a traders for it.

MiFoludek
Posts: 64
Joined: Wed, 18. May 11, 21:06
x3tc

Re: [WIP][Mod]TaterTrader v4- An Autotrade Alternative

Post by MiFoludek » Mon, 4. May 20, 11:17

bbn wrote:
Sun, 3. May 20, 17:27
MiFoludek wrote:
Sat, 2. May 20, 22:34
Hi,

Is there a way to assing TaterTrader to very early build storage?
I can not set station as the homebase for ship
(Very early -> The station without tier and dock bay.)

BR
Yes, it's not perfect but works automatically. I have a few fleets helping in station construction. Set home as a sector you are building in, player sell modifier to 200. Also set max distance to sell to minimum and to buy maximum (or whatever is reasonable). Plus limit wares to station building. I find the default list limited and I add a few things there like field coils, advanced electronics and turret components... Works very well with civilian fleets mod as you need to set up 1 TaterTrader and assign few other ships as a traders for it.
thank you
It is working very nice

Phiolin
Posts: 158
Joined: Wed, 26. May 04, 08:49
x4

Re: [WIP][Mod]TaterTrader v4- An Autotrade Alternative

Post by Phiolin » Wed, 6. May 20, 14:39

My TaterTraders often ignore Vanilla Blacklists, especially when there are individual sectors added to the Blacklist. Something like "Ignore all enemy sectors" seems to work, but if I for example add "Argon Prime" as an additional sector on top of it, I still see TaterTraders flying right through or doing business in that sector.

DeadAirRT
Posts: 1022
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [WIP][Mod]TaterTrader v4- An Autotrade Alternative

Post by DeadAirRT » Wed, 6. May 20, 17:22

Phiolin wrote:
Wed, 6. May 20, 14:39
My TaterTraders often ignore Vanilla Blacklists, especially when there are individual sectors added to the Blacklist. Something like "Ignore all enemy sectors" seems to work, but if I for example add "Argon Prime" as an additional sector on top of it, I still see TaterTraders flying right through or doing business in that sector.
Did you add argon prime in both activities and travel by chance?

Phiolin
Posts: 158
Joined: Wed, 26. May 04, 08:49
x4

Re: [WIP][Mod]TaterTrader v4- An Autotrade Alternative

Post by Phiolin » Wed, 6. May 20, 19:59

Yes, in both blacklists. That should work, shouldn’t it? :)

DeadAirRT
Posts: 1022
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [WIP][Mod]TaterTrader v4- An Autotrade Alternative

Post by DeadAirRT » Thu, 7. May 20, 06:44

Phiolin wrote:
Wed, 6. May 20, 19:59
Yes, in both blacklists. That should work, shouldn’t it? :)
It should but the caveat is that the vanilla blacklist functions are very complex and not the most reliable. L traders in particular love to take whatever random path they feel like that day.

Scoob
Posts: 10041
Joined: Thu, 27. Feb 03, 22:28
x4

Re: [WIP][Mod]TaterTrader v4- An Autotrade Alternative

Post by Scoob » Fri, 8. May 20, 00:00

DeadAirRT wrote:
Thu, 7. May 20, 06:44
Phiolin wrote:
Wed, 6. May 20, 19:59
Yes, in both blacklists. That should work, shouldn’t it? :)
It should but the caveat is that the vanilla blacklist functions are very complex and not the most reliable. L traders in particular love to take whatever random path they feel like that day.
There are also some weird issues in Vanilla in regards to routes picked by AI-Controlled ships. I've noticed my ships showing a perfectly acceptable route on the map when you view their orders. However, they DON'T always follow that route and take same very odd detours. The area where Teladi and Split space meet (Ianamus Zura / Thuruk's Demise) is particularly problematic. Ordering ships to fly from Ianamus Zura to Thuruk's Demise will see them try to go through the nearby Xenon sector. Very much a longer and much more dangerous route.

This, combined with less than reliable Black Lists, can cause various weirdness. I also wonder if Blacklists sometimes get corrupted somehow. I had my set a three Blacklists to protect my Civilian ships, but it simply stopped working, even though it looked fine. I then DELETED all of them, re-applied and they're working fairly reliably once more.

Basically, there are certainly some underlying vanilla issues that might make it look like other things aren't working properly.

Scoob.

Scoob
Posts: 10041
Joined: Thu, 27. Feb 03, 22:28
x4

Re: [WIP][Mod]TaterTrader v4- An Autotrade Alternative

Post by Scoob » Mon, 18. May 20, 23:35

Hi,

Tatertrader works well, however I have a slight issue that might just be me setting it up wrong.

I wanted to use Tater Trader to Sell Hull Parts from my Station in Argon Prime, so I set them up to just trade Hull Parts with a zero Sector range, so they only sell to the Shipyard, Wharf and any build sites. Works great, however the profit goes into my personal account, not the stations.

So, I set the Trader Home to my station - but it remains as Argon Prime - and I checked the Station Trader box. Initially, when I did this, the Ship in question moved to be listed as a Station subordinate, so I thought it'd worked, however, it quickly lost that assignment.

Basically, what I tried seemed to work in that the ship was showing as a subordinate to my Station, but then it went back to showing in the unassigned ship list. What am I missing here?

Edit: I think I've sorted it, though it can be a bit temperamental. I configured two TT the same, and this time the home Station assignment stuck and didn't revert to the Sector. One then proceeded to trade Hull parts as instructed, the other started BUYING refined metals for the station - it produces those. It appeared to have imported the full trade ware list, despite my leaving "Copy Presets" unchecked. Removing all assignments and re-configuring it seems to have worked.

Scoob.

DeadAirRT
Posts: 1022
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [WIP][Mod]TaterTrader v4- An Autotrade Alternative

Post by DeadAirRT » Tue, 19. May 20, 00:52

Scoob wrote:
Mon, 18. May 20, 23:35
Hi,

Tatertrader works well, however I have a slight issue that might just be me setting it up wrong.

I wanted to use Tater Trader to Sell Hull Parts from my Station in Argon Prime, so I set them up to just trade Hull Parts with a zero Sector range, so they only sell to the Shipyard, Wharf and any build sites. Works great, however the profit goes into my personal account, not the stations.

So, I set the Trader Home to my station - but it remains as Argon Prime - and I checked the Station Trader box. Initially, when I did this, the Ship in question moved to be listed as a Station subordinate, so I thought it'd worked, however, it quickly lost that assignment.

Basically, what I tried seemed to work in that the ship was showing as a subordinate to my Station, but then it went back to showing in the unassigned ship list. What am I missing here?

Edit: I think I've sorted it, though it can be a bit temperamental. I configured two TT the same, and this time the home Station assignment stuck and didn't revert to the Sector. One then proceeded to trade Hull parts as instructed, the other started BUYING refined metals for the station - it produces those. It appeared to have imported the full trade ware list, despite my leaving "Copy Presets" unchecked. Removing all assignments and re-configuring it seems to have worked.

Scoob.
Now you see why i don't like station trading :D

Scoob
Posts: 10041
Joined: Thu, 27. Feb 03, 22:28
x4

Re: [WIP][Mod]TaterTrader v4- An Autotrade Alternative

Post by Scoob » Tue, 19. May 20, 01:34

DeadAirRT wrote:
Tue, 19. May 20, 00:52
Now you see why i don't like station trading :D
Yeah, it was really troublesome to get working, perhaps I just screwed up. However, it's working great now.

Scoob.

DeadAirRT
Posts: 1022
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [WIP][Mod]TaterTrader v4- An Autotrade Alternative

Post by DeadAirRT » Fri, 22. May 20, 07:14

Spent about 8 hours working on blacklist stuff.

Annoyed at your precious TaterTraders entering sectors you've banned to reach that precious trade they can't safely reach? Testing my solution that should prevent that from ever happening again.

Cedric_FP
Posts: 189
Joined: Thu, 13. Apr 06, 17:56
x4

Re: [WIP][Mod]TaterTrader v4- An Autotrade Alternative

Post by Cedric_FP » Fri, 22. May 20, 09:17

DeadAirRT wrote:
Fri, 22. May 20, 07:14
Spent about 8 hours working on blacklist stuff.

Annoyed at your precious TaterTraders entering sectors you've banned to reach that precious trade they can't safely reach? Testing my solution that should prevent that from ever happening again.
Legend.

User avatar
bbn
Posts: 88
Joined: Mon, 31. Jan 11, 18:30
x4

Re: [WIP][Mod]TaterTrader v4- An Autotrade Alternative

Post by bbn » Sun, 24. May 20, 00:51

While checking other things I found that TaterTrader is spamming my logs with 2 kind of messages. It's 3.20 beta, so I am not sure if something change or not... or even if those errors are "real errors".

First one:

Code: Select all

[=ERROR=] 24549.48 Error in AI script tatertrade on entity 0x705ed1b: Property lookup failed: $foundselloffer.restriction.faction
* $foundselloffer == trade.{0x43bc4L} (ware=smartchips, buyer=[0x0], seller=[0x10e9c47], bundle=false, unbundle=false, available=true)
* Expression: not ($foundselloffer.restriction.faction == $stationbuyoffer.buyer.owner) and not ($stationbuyoffer.restriction.faction == $foundselloffer.seller.owner) and not ($stationbuyoffer.restriction.faction == $foundselloffer.restriction.faction)
* Action: <do_if>, line 916
Second one:

Code: Select all

[=ERROR=] 24549.18 Error in AI script tatertrade on entity 0x705ed1b: Warning: Loss of data while converting floating point number to a money value! 64.5062f + 15ct
* Expression: $offerpriority + $costdiff / 2

DeadAirRT
Posts: 1022
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [WIP][Mod]TaterTrader v4- An Autotrade Alternative

Post by DeadAirRT » Sun, 24. May 20, 04:13

bbn wrote:
Sun, 24. May 20, 00:51
While checking other things I found that TaterTrader is spamming my logs with 2 kind of messages. It's 3.20 beta, so I am not sure if something change or not... or even if those errors are "real errors".

First one:

Code: Select all

[=ERROR=] 24549.48 Error in AI script tatertrade on entity 0x705ed1b: Property lookup failed: $foundselloffer.restriction.faction
* $foundselloffer == trade.{0x43bc4L} (ware=smartchips, buyer=[0x0], seller=[0x10e9c47], bundle=false, unbundle=false, available=true)
* Expression: not ($foundselloffer.restriction.faction == $stationbuyoffer.buyer.owner) and not ($stationbuyoffer.restriction.faction == $foundselloffer.seller.owner) and not ($stationbuyoffer.restriction.faction == $foundselloffer.restriction.faction)
* Action: <do_if>, line 916
Second one:

Code: Select all

[=ERROR=] 24549.18 Error in AI script tatertrade on entity 0x705ed1b: Warning: Loss of data while converting floating point number to a money value! 64.5062f + 15ct
* Expression: $offerpriority + $costdiff / 2
I'm not supporting the beta because it would break 3.1 but thanks for the report.

I'll take a look into the second one, it's harmless usually. What settings are you using on trader?

User avatar
bbn
Posts: 88
Joined: Mon, 31. Jan 11, 18:30
x4

Re: [WIP][Mod]TaterTrader v4- An Autotrade Alternative

Post by bbn » Sun, 24. May 20, 11:04

DeadAirRT wrote:
Sun, 24. May 20, 04:13
I'm not supporting the beta because it would break 3.1 but thanks for the report.
Sure, it's seems like it's related to the new trade rules somehow...

I'm guessing that I cannot count on TaterTraders to obey restriction in this save ^^.
DeadAirRT wrote:
Sun, 24. May 20, 04:13
I'll take a look into the second one, it's harmless usually. What settings are you using on trader?
Fortunately, this was quite early in new save, so I have just 4 TaterTraders setup. Don't know exactly which one, but they are set up similar way. I set trader home for 2 of them to ARG Wharf and for the other 2 to ARG Shipyard. Max gate distance to buy set to 10, checked station trader and added all wares to the list.

(now I'm wondering if I should continue 3.2b with mods, go back to my vanilla save, or maybe go back to 3.1...)

Post Reply

Return to “X4: Foundations - Scripts and Modding”