[MOD] Yet Another Trader v2.03c (updated 11th March '16)
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
- YorrickVander
- Posts: 2725
- Joined: Tue, 29. Oct 13, 21:59
-
- Moderator (English)
- Posts: 8074
- Joined: Tue, 30. Mar 04, 12:28
Hi Yorrick (and others ),
I'm a new guy working my way through the campaign, and I'm just trying to get your mod working, I've got the free Rahanas in DeVries, and have set him to operate within the system. He's got cargolifter URV's on board, but when I set him to free trade, he just sits still and is apparently searching for trades. What am I doing wrong?
p.s. I've got a bunch of trade update dudes throughout the system. Thanks for any help.
edit: Disregard, changing it to galaxy-wide (when I found out pmc won't attack my freighters) got him moving.
I'm a new guy working my way through the campaign, and I'm just trying to get your mod working, I've got the free Rahanas in DeVries, and have set him to operate within the system. He's got cargolifter URV's on board, but when I set him to free trade, he just sits still and is apparently searching for trades. What am I doing wrong?
p.s. I've got a bunch of trade update dudes throughout the system. Thanks for any help.
edit: Disregard, changing it to galaxy-wide (when I found out pmc won't attack my freighters) got him moving.
- YorrickVander
- Posts: 2725
- Joined: Tue, 29. Oct 13, 21:59
Sorry for slow relpy - There's not much trading to be done in devries until you make it yourself. I haven't had time for mod testing with the current game version, are you seeing any issues?
X Rebirth - A Sirius Cybernetics Corporation Product
Split irritate visiting pilot with strange vocal patterns.
Split irritate visiting pilot with strange vocal patterns.
Hi Yorrick, great mod but I'm wondering if it's possible to add options for done replacement like you can for the stations. I ask this because I must have at least 15 YAT traders that I have setup with at least 40 attack drones for defence. After a while the traders start loosing them as well as the construction drones due to attacks. A buy replacement drone option would be very helpful.
Anyway thanks for this mod.
Anyway thanks for this mod.
mainmenu.xml
Text
Not in a text file.
Please fix
for 007 lng file
for file
content.xml
Text
Code: Select all
Cancel trade updates please.
Please fix
Code: Select all
<?xml version="1.0" encoding="iso-8859-1" ?>
<diff>
<!-- add remove trade sub from trade manager of station to allow changes to trading whitelist -->
<add sel="//cue[@name='SectionHandler']//do_if[@value='$object.tradenpc']" pos="before">
<do_if value="(not $object.tradenpc.isplayerowned) and ($object.hastradesubscription)">
<add_player_choice text="{98981,500}" comment="Remove offer updates" section="gYAT_RemoveTradeUpdates" choiceparam="$object" selectable="true" />
</do_if>
</add>
</diff>
for 007 lng file
Code: Select all
<!-- gYAT_RemoveTradeUpdates -->
<t id="500">Отменить обновления торговых предложений.</t>
for file
content.xml
Code: Select all
UTF-8
<text language="07" name="Yet Another Trader" description="Система автоматической торговли и добычи" author="Yorrick Vander" />
Tired just that, but ships that are assigned to other ships don't have option to assign it to trade manager... Am I doing something wrong?YorrickVander wrote:Probably the best way would be to setup a ship, say a large well defended one, next to a station. Assign YAT ships to that, send them on their way
- YorrickVander
- Posts: 2725
- Joined: Tue, 29. Oct 13, 21:59
For those that would like to have also data on how much profit the miners made you can add
Just above in yat.mining.ship.free.xml.
The above is a hack, will give you profit reduced by 1. I noticed that there is a code for profit calculation that checks both buy and selling price:
One could remove the first condition, but I'm not sure if it will not mess up with other parts of the script (it shouldn't but I didn't look that hard in the scripts yet).
Code: Select all
<set_value name="this.$YAT_buyprice" exact="1" />
Code: Select all
<run_script name="'YAT.trade.performplayertraderun'"/>
The above is a hack, will give you profit reduced by 1. I noticed that there is a code for profit calculation that checks both buy and selling price:
Code: Select all
<do_if value="(this.$YAT_buyprice > 0) and (this.$YAT_sellprice > 0)">
<set_value name="this.$YAT_ProfitsMade" exact="this.$YAT_ProfitsMade + (this.$YAT_sellprice - this.$YAT_buyprice)"/>
</do_if>
- YorrickVander
- Posts: 2725
- Joined: Tue, 29. Oct 13, 21:59
Ok, so I've cleaned the miner update a little bit. I've introduced new var in yat.mining.ship.free.xml called YAT_miner_selling and changed the conditions on profits calculation to:
You can get updated scripts in https://drive.google.com/open?id=0ByfVb ... lFaaFB6TkE
(Still, not the most elegant solution... but I'm just getting started with X:R modding )
Code: Select all
<do_if value="((this.$YAT_sellprice > 0) and ((this.$YAT_buyprice > 0) or (this.$YAT_miner_selling > 0) ))">
<set_value name="this.$YAT_ProfitsMade" exact="this.$YAT_ProfitsMade + (this.$YAT_sellprice - this.$YAT_buyprice)"/>
</do_if>
(Still, not the most elegant solution... but I'm just getting started with X:R modding )
- YorrickVander
- Posts: 2725
- Joined: Tue, 29. Oct 13, 21:59
For visibility you might want to fork the mod and make your own thread for it. I'm fine with you doing that but I can't and won't try to support or debug it. Consider it a sane sort of GPL - if/when I return to YAT if you add stuff I like I may want to use it
As for the exclusive to miners vars, not that I recall no, except for the obvious ones added to the pilot entity to track what the ships doing.
As for the exclusive to miners vars, not that I recall no, except for the obvious ones added to the pilot entity to track what the ships doing.
Last edited by YorrickVander on Mon, 9. Oct 17, 12:22, edited 1 time in total.
X Rebirth - A Sirius Cybernetics Corporation Product
Split irritate visiting pilot with strange vocal patterns.
Split irritate visiting pilot with strange vocal patterns.
- YorrickVander
- Posts: 2725
- Joined: Tue, 29. Oct 13, 21:59
Not really The pathing will just try to find the fastest route, not the safest. And even then only fastest by means of jumps, not fastest by means of in sector travelantoniut wrote:I'm using Transcend and TAF mods (maybe relevant) and this mod. In Transcend, there is a gate directly to Albion. I've retired the trade agent correctly from TU Overwatch in Verdant Profit (plenty marauders there...) but ships still going there to pass from Transcend to Albion.
Some idea?
Thanks
X Rebirth - A Sirius Cybernetics Corporation Product
Split irritate visiting pilot with strange vocal patterns.
Split irritate visiting pilot with strange vocal patterns.
-
- Posts: 118
- Joined: Fri, 12. Dec 03, 02:13
Yorrick,
I am not sure if you are still working on improvements for this based on some of your comments but I had a suggestion.
Would it be possible to get a toggle-able limiter for "Buy From" & "Sell To"? Specifically with the options for:
- All (Any valid location)
- NPC (Any NPC Station or Player Station set to sell to NPCs)
- Player (Only Player stations flagged to Restrict Trade)
One I hit about 20 stations in my personal empire it became obnoxious to manage all the freighters so I tried to set up a group of your traders to handle it universally. When I switched all the stations to Restrict to Player trading only it caused alot of strange behavior. Half the time the traders couldn't find any trades but periodically I would see them selling off resources I was trying to keep within the network.
I am not sure if you are still working on improvements for this based on some of your comments but I had a suggestion.
Would it be possible to get a toggle-able limiter for "Buy From" & "Sell To"? Specifically with the options for:
- All (Any valid location)
- NPC (Any NPC Station or Player Station set to sell to NPCs)
- Player (Only Player stations flagged to Restrict Trade)
One I hit about 20 stations in my personal empire it became obnoxious to manage all the freighters so I tried to set up a group of your traders to handle it universally. When I switched all the stations to Restrict to Player trading only it caused alot of strange behavior. Half the time the traders couldn't find any trades but periodically I would see them selling off resources I was trying to keep within the network.
YorrickVander wrote:Not really The pathing will just try to find the fastest route, not the safest. And even then only fastest by means of jumps, not fastest by means of in sector travelantoniut wrote:I'm using Transcend and TAF mods (maybe relevant) and this mod. In Transcend, there is a gate directly to Albion. I've retired the trade agent correctly from TU Overwatch in Verdant Profit (plenty marauders there...) but ships still going there to pass from Transcend to Albion.
Some idea?
Thanks
- YorrickVander
- Posts: 2725
- Joined: Tue, 29. Oct 13, 21:59