[MOD]Yet Another Trader AI "improved" version (Update 28.Dec.2014)

The place to discuss scripting and game modifications for X Rebirth.

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

wanglewis
Posts: 37
Joined: Thu, 24. Sep 09, 09:59
x4

[MOD]Yet Another Trader AI "improved" version (Update 28.Dec.2014)

Post by wanglewis »

With the permission of YorrickVander i'm giving an Ai improved version based at Yet Another Trader v1.1.

This version is also a bug fix version for Yet Another Trader v1.1, but excuse my bad coding skill it will have new bugs obviously which i dont know yet.

EDIT: I make this version only for a temporary solution to the v1.1 original version and add some thoughts of my own. This wont be updated for a long time again unless there is some big bugs in it.

I will be verry happy if YorrickVander take the new ideas to his new version

Thanks again to YorrickVander's great mod

YAT AI Improved Version
=========================
V 1.03:
1. Fix the bug that Miners will sell the products, but receive no money.
2. If your L/XL ships have more than 5 mining URVs(one type) in its dronebay, it can be choose as miner, but not Trader. M ships with more than 2 mining URVs can be set as miner. This is on the purpose to prevent a bug which will cause some problem in miner selecting menu. So if you found that your ship can only be choose as miner, but you want it to be a trader, plz sell the mining URVs it has in its dronebays



V1.02
Bug fix for some language problem and trading stuck problem

AI change
1. Trader will run traderuns with profit higher than 10%
2. Trader will sell there wares which not bought for traderuns for highst income
3. Trader will transfer their money back to player on emergency situation with hullpercentage under 20% (no insurance for suddenly destroyed above 20% hullpercentage)
EDIT: 4. Miner will consider player's need as priority (when needed volume bigger than 2.5% it's cargo capacity)
Minor change:
1.transfer log will be wrote in subtitle squad when it's a profit
2.transfer log will be wrote in subtitle upkeep when it's an emergency transfer
3.transfer log will be wrote in general as before when it's a normal transfer after changing the maxbudget or you transferred more money to pilot as his maxbudget


Hot Fix V1.01 new

Correct the missing language there. Sorry for my missdelete on the language code . Sorry for the bad starting of this "improved" version


First release V1
----------------

Attentions:

Restarting Traders is required for this update for the new AI improvement.

This MOD CANT BE USED WITH YET ANOTHER MOD ORIGINAL VERSION TOGETHER! YOU NEED TO TURN OFF THE ORIGINAL VERSION.

AI change:(all the change only effect ships in the YAT list)

1.Change the prefer list of buyoffer, to supply the buyoffer of player buildership first.(vanilla is random from all builderships)

2.Change prefer list for buying goods for buildership, they will concern your buildership first, then others.

3.Change the restriction of relativeprice for buyoffer. your trader will sell the goods with an unitprice above 90% of averageprice(relativeprice) ,they will create a list which contained the buyoffer with highest income with unitprice above 90% averageprice(relativeprice) and all other

buyoffers with unit price above 120% averageprice. then choose random from the list.

(if i restrict to the highest profit, there will be a problem that they go always too far for a hight profit, and make it too risky, because you will loose all your money in the manager account if your ship is destroyed)

4.Experimental:disarmed the restrict to not allowed reserveable goods
list: bofu, energycells, foodrations, water
These goods cant be reserved by npc ships as vanilla

Other change:
New functions:
1.Your ships will execute the trading order once you orderd to do(sell/buy). They will return to free trade after complete all the trading orders.

2.Your ships will snap new offers from the station they trade with.

3.Your ships will make the zone known to you after trade with the station. Miner will make the zone known to you after reach the mining destination

4.The trade will improve a little relation with the faction you trade with(a very good idea from autotrader mod)

Bug fixed:

1.you can not add null null null ships to your list anymore.

2.destroyed traders/miners will not be shown as null null null ships in the overviewlist, which will cause a problem that you cant remove/config the

ships if they listed after the null null null ships.

3.money transfer after selecting the range should not freeze the menus any more.

4.remove ships menu is ready to use now.

5.After remove the ship from the list, they will confirm your new trading orders correctly.

Known Issue:




downloadlinks:

Steam Version

http://steamcommunity.com/sharedfiles/f ... =361785516
Last edited by wanglewis on Mon, 29. Dec 14, 17:59, edited 16 times in total.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Hi wanglewis,

It might be taken badly if you call it an improved version of someone else's mod. Might be better to call it something else entirely, then give credit in the notes. WangLewisAutoTrader maybe? The acronym thing could maybe work too, then. Couldn't think of anything that WLAT might stand for though.

Anyway, I'd like to give it a try, but couldn't find a download link.

edit: Ah, there's the download link! Sorry, must have missed it.
wanglewis
Posts: 37
Joined: Thu, 24. Sep 09, 09:59
x4

Post by wanglewis »

@w.evans

sorry to call it an improved version because i dont know what name it can be. I dont want to change it to other names because it's totally based on the work of YorrickVander and I might only upload this version this time for a temporary solution to some bugs in the original version.

the small improvement it's nothing compare to the great work of YorrickVander

But it also cant be a name called bug solution version :cry:

I will ask YorrickVander if he can give some suggestions, because i'm not really good at this.

edit: nope, you didnt miss it because i just upload the file a minute ago
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Found a guide here:

http://forum.egosoft.com/viewtopic.php?t=364814

for dealing with the steam workshop.

And I'm pretty sure you didn't mean anything by the name. Just thought that there's lots of potential for misunderstanding there.

The name, hm, "PHAT" would be fun. Profitsss ___ AutoTrader? Can't think of what the "H" might stand for. "Wot, Another Trader?" could be abbreviated WAT for WanglewisAutoTrader. Just throwing out ideas. Or something simple and descriptive? "Automated Trading Script"?
wanglewis
Posts: 37
Joined: Thu, 24. Sep 09, 09:59
x4

Post by wanglewis »

ok, i will upload a steam version later after i figure out what name i should choose :)

thank you for your guide links
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

No problem. I'll try to sneak in some playing time when my wife isn't looking.
Zippe
Posts: 195
Joined: Sat, 31. Jan 04, 16:25
x4

Post by Zippe »

The YAT Overview is showing only ReadTextErrors on my german Version.

In the normal YAT it says something like Sektor Trader Rahanas (Budget 1000000 Cr) or so. In this version it's =ReadTextError98981-317=

Every other YAT Text shows fine though.
User avatar
YorrickVander
Posts: 2767
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

What wanglewis wants to call his fork of the mod is entierly up to him, although I would perhaps prefer a completely changed name. I do however fully endorse his changing of the mod as I have very little time to bug fix let alone improve the original. If I like this version I might switch to using it myself on those odd times I have to play XR :D 1200+hrs logged in game and the vast majority was beta testing the vanilla version as well as my own stuff. It might be nice to step back and just be a mod consumer ;)
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
wanglewis
Posts: 37
Joined: Thu, 24. Sep 09, 09:59
x4

Post by wanglewis »

sorry for that, i just delete a little code in the language files when i change it , and my home language is not english. So i didnt know that since my home language file is fine
User avatar
YorrickVander
Posts: 2767
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

From current version on nexus :

[=ERROR=] LIBXML2: file:///extensions%2FYAT%20AI%20improved%20version%2Ft%2F0001?ext=pck%20xml line 82, error 77: Premature end of data in tag diff line 2

diff

[General] ======================================
[General] ======================================
[=ERROR=] Error loading from XML merge/patch file 't/0001'. Check the log for further information. Skipping file.
[General] ======================================

and many more t file errors. I suggest returning to the diff file method :) English client btw. YAT unusable like this because no menus etc display correctly.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
wanglewis
Posts: 37
Joined: Thu, 24. Sep 09, 09:59
x4

Post by wanglewis »

i just found the problem that
i delete <language> code in almost all the language files after adding a new line 317.

just correct it in the new version 1.01

EDIT: the diff code should all be delete after cleaning the code again. it should work now.
Iosevus
Posts: 18
Joined: Wed, 20. Nov 13, 09:14
x4

Post by Iosevus »

So I have a Fedhelm miner set to galaxy wide mining, and when it auto-sells ores/materials to a station the credits vanish. Not in my wallet or the captains. Though there is a log entery of the transaction. I've tried it with the wallet being set to 100k and 0. Bug? Or perhaps a limitation?
Otherwise good job, the miner does unload onto my station before attempting to sell elsewhere which is very nice.
wanglewis
Posts: 37
Joined: Thu, 24. Sep 09, 09:59
x4

Post by wanglewis »

it's a bug, i got the reports and will solve it asap
wanglewis
Posts: 37
Joined: Thu, 24. Sep 09, 09:59
x4

Post by wanglewis »

@Iosevus

I also got a report that XL or L miner cant dock at the player's station, but i cant confirm it. Did you use your XL or L miner to supply your own stations and success dockt?
Iosevus
Posts: 18
Joined: Wed, 20. Nov 13, 09:14
x4

Post by Iosevus »

My Fedhelm didn't have any problems docking and unloading at my URV Forge, a couple of times.
insanityy1
Posts: 2
Joined: Tue, 9. Dec 14, 08:08

Post by insanityy1 »

will this increase rep with faction?
Pimpace
Posts: 268
Joined: Tue, 1. Jan 13, 15:48
x4

Post by Pimpace »

Hello!

What is the true meaning of this mod, can you explain it me, please?
It will better to use this instead do it manually? This is like Universal Traders in X3: Albion Prelude or something? How significant the profit with this mod? If I decide to buy an "armada" of trading ships instead building stations, it will do all the trade job for me? Can I change the profit margin the mod will use? Is there any setup ingame for this mod?

thanks for answers, sorry if were noob questions
Exavier724
Posts: 118
Joined: Fri, 12. Dec 03, 02:13
x2

Post by Exavier724 »

Pimpace wrote:Hello!

What is the true meaning of this mod, can you explain it me, please?
It will better to use this instead do it manually? This is like Universal Traders in X3: Albion Prelude or something? How significant the profit with this mod? If I decide to buy an "armada" of trading ships instead building stations, it will do all the trade job for me? Can I change the profit margin the mod will use? Is there any setup ingame for this mod?

thanks for answers, sorry if were noob questions
It allows you to set up autonomous Miners/Traders using any ship capable of the job. Biggest focus is for automated "Galaxy" traders which can cross jump gates for profits. Since by default the NPCs only have a very small handful of ships that do this.

Profit depends on the trades that it manages to find and will often very depending on the current state of the economy, where the traders are operating, and what they manage to find for orders. There isn't currently a "profit margin" setting you can toggle but i think there is an internal one to try and keep things profitable.

As to the the trade armada vs station management... couldn't really tell you. I will say that an Armada of M sized traders is alot more maintenance due to them being unarmed targets for raiders while an L/XL Armada would make nice galaxy traders but probably rival a station in upfront costs.

Your probably best mixing the two. I use autonomous sector restricted traders to move wares between my stations. Using YAT lets me get away with a handful of freighters rather than assigning 2-3 cargo specific freighters/miners to each station.

Setup ingame is simply going opening the trade menu (same one you use to select trade offers) and using the YAT menus to add a ship, designate its type/range/funds and letting it run. You can reconfigure the Home System, Range, & Funds of an active ship if you need to. Miners have the extra option to tell them to mine a specific material exclusively.
wanglewis
Posts: 37
Joined: Thu, 24. Sep 09, 09:59
x4

Post by wanglewis »

@insanityy1

yes it will, but not much.
wanglewis
Posts: 37
Joined: Thu, 24. Sep 09, 09:59
x4

Post by wanglewis »

@Exavier724

Thx for your explain!

Return to “X Rebirth - Scripts and Modding”