[MOD] Yet Another Trader v2.03c (updated 11th March '16)

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

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

User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

Update to (hopefully) fix the localisation issues. new /t file version with added strings for better grammar in non english when the translations are done :)

@spizio never seen that issue, can you provide more info? debug log? save game?
Last edited by YorrickVander on Mon, 22. Dec 14, 00:05, edited 1 time in total.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
User avatar
NZ-Wanderer
Posts: 1627
Joined: Thu, 5. Aug 04, 01:57
x4

Post by NZ-Wanderer »

Thanks for that Yorrick, your hard work is much appreciated :thumb_up:
Link to the list of Mods working in X4-Foundations and also Link to the list of Mods working in X-Rebirth

NOTE: I play with a modded game, so any reports I make outlining suggestions/problems/bugs/annoyances, are made with mods installed and running.
Exavier724
Posts: 118
Joined: Fri, 12. Dec 03, 02:13
x2

Post by Exavier724 »

YorrickVander wrote:@spizio never seen that issue, can you provide more info? debug log? save game?
I think he might be referring to the trader's effectiveness. I have also had trouble with the Trader aspect, miners work fine for me.

Basically I started mine out with a 2.5mil seed amount to get them started on 3 Rahannas. About 2 or 3hrs later I figured I would check up on their accounts and opened the captains menu and fine they are "Search For Trades" with a balance of about 100k. They had basically spent the 2-3hrs losing money on trades until they couldn't find anymore trade orders and were left with empty holds.

Doesn't seem like they are properly looking for profitable trades and just running trades based on volume/quantity needed.

I will probably run more tests later but I have pulled all my traders off trade routes atm to fill them up with wares before I trigger the enter Devres part of the campaign. Figure I would take a small fleet (and about 20 construction vessels) with me this playthrough... I feel sorry for ANYONE who happens to be near the spawn point when that fleet gets returned to me :P

@Spizio: Normally you will not see any money transferred to you until the captains personal wallet (seen in the Captains details) passes the set threshold. For traders the default is 10mil, miners 100k. As long as they have less money then that they won't give you any unless you give them a smaller budget window to work with.
User avatar
NZ-Wanderer
Posts: 1627
Joined: Thu, 5. Aug 04, 01:57
x4

Post by NZ-Wanderer »

Exavier724 wrote:I have also had trouble with the Trader aspect, miners work fine for me.
Interesting, I have 3 traders and they all earning me a nice little profit :)
Link to the list of Mods working in X4-Foundations and also Link to the list of Mods working in X-Rebirth

NOTE: I play with a modded game, so any reports I make outlining suggestions/problems/bugs/annoyances, are made with mods installed and running.
Exavier724
Posts: 118
Joined: Fri, 12. Dec 03, 02:13
x2

Post by Exavier724 »

NZ-Wanderer wrote:Interesting, I have 3 traders and they all earning me a nice little profit :)
Galaxy Traders or local?
Mine have been restricted purely to Albion since I haven't triggered the campaign to open up more of the universe yet.

Now that I think about it, I do have 3 stations in Albion. Could they be losing money from buying from NPC stations and then delivering the goods (which doesn't seem to trigger a cost transfer since both are owned) to my owned stations? I would think the manager would pay the captain for the delivery but maybe not...
User avatar
NZ-Wanderer
Posts: 1627
Joined: Thu, 5. Aug 04, 01:57
x4

Post by NZ-Wanderer »

Exavier724 wrote:Galaxy Traders or local?
Mine have been restricted purely to Albion since I haven't triggered the campaign to open up more of the universe yet.
Mine are on Galaxy trading..
From memory (and Yorrick can correct me if I am wrong) - If you set your ships to Galaxy it does not matter whether you have opened up the galaxy or not, the ships just go off and trade all over the place :)

EDIT: I was wrong :) - see next post from Yorrick.
Last edited by NZ-Wanderer on Mon, 22. Dec 14, 09:26, edited 1 time in total.
Link to the list of Mods working in X4-Foundations and also Link to the list of Mods working in X-Rebirth

NOTE: I play with a modded game, so any reports I make outlining suggestions/problems/bugs/annoyances, are made with mods installed and running.
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

@exavier - yes that is entierly possible. I'll look into that for feedback to the player so they know where the money is going.

@nz-wanderer - quite the opposite. ships allowed galaxy range will ignore systems when gates leading there are locked prior to 3.0 Since then it seems there might be issues with teladi space regarding a bug that opens the gate too soon in campaign (from beta forum)
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
User avatar
NZ-Wanderer
Posts: 1627
Joined: Thu, 5. Aug 04, 01:57
x4

Post by NZ-Wanderer »

YorrickVander wrote:@nz-wanderer - quite the opposite. ships allowed galaxy range will ignore systems when gates leading there are locked prior to 3.0 Since then it seems there might be issues with teladi space regarding a bug that opens the gate too soon in campaign (from beta forum)
Ahh thanks for clearing that up for me Yorrick, Having never actually done the whole campaign I was only basing my assumption from freeplay :)
Link to the list of Mods working in X4-Foundations and also Link to the list of Mods working in X-Rebirth

NOTE: I play with a modded game, so any reports I make outlining suggestions/problems/bugs/annoyances, are made with mods installed and running.
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

To clarify - they trade anywhere whether you have been there or not; they wont cross gates locked by story mode, or try to.
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 »

Hi bro, thx for your perfect mod. I just have found some problems and want to give some suggest.
1. The YAT.mining.collect ai sript is a little old, i checkt that and find out that you can switch that direct to the vanilla one, since you didnt change the params there.
ps: just find out that you have a experimental file there,sorry
2. there's a bug happens when you manulle trade one of your ships to another. the shoppinglist will stuck after you give that order, and they will never do that. I shink thats because you delete the jobship checking code,
you can add the following code to your aiscripts(YAT.trade.ship and YAT.mining.ship.free)

This is for begingning of you code (before label "start"):

Code: Select all

<label name="check shoppinglist" />
<get_trade_from_shoppinglist object="this.ship" result="$shoppinglist" multiple="true" /> 
<do_if value="$shoppinglist.count !=0">
<run_script name="'trade.performplayertraderun'"/>
</do_if>
<remove_value name="$shoppinglist"/>
This is for check point(you can put it at begining of label "find trade run"):

Code: Select all

<!-- check for shoppinglist -->
<get_trade_from_shoppinglist object="this.ship" result="$shoppinglist" multiple="true" />
<do_if value="$shoppinglist.count !=0"> 
<resume label="check shoppinglist" />
</do_if>
Spizio
Posts: 3
Joined: Fri, 5. Sep 14, 18:00

Post by Spizio »

Hi all,

thanks for your help!! It was indeed a budget problem, if I give a lower budget to the captain (i.e. 500k) then profits start to flow in regularly :)

Thank you again, again great mod!!

Best regards,
Spizio
User avatar
BLDoom
Posts: 20
Joined: Thu, 12. Sep 13, 20:05
x4

Post by BLDoom »

Exavier724, I would like to know what exactly you would build with so many CVs. I've never been good at building stations (or trading, since I rely on YAT).

I mean, what is profitable? The extent of my baby empire was water processing and ice mining...


Awesome mod by the way; Keep up the good work!

Edit: Minor spelling.
Exavier724
Posts: 118
Joined: Fri, 12. Dec 03, 02:13
x2

Post by Exavier724 »

BLDoom wrote:Exavier724, I would like to know what exactly you would build with so many CVs. I've never been good at building stations (or trading, since I rely on YAT).

I mean, what is profitable? The extent of my baby empire was water processing and ice mining...


Awesome mod by the way; Keep up the good work!

Edit: Minor spelling.
As to whats profitable, that really depends I guess. I actually took the time to set up a Construction Shop,Tech Lab, & Ship Tech in Lookout Alpha (Albion) so I didn't have to run deep into albion space (And get shot by the wreaksville refueling station everytime) for the basics... especially since the only construction shop is PMC. No ships assigned atm since i triggered the campaign but the neutrals sporadically keep the stations running & with maxed tracer turrets the roaming PMC wardens arn't a threat.

As to what I am building with all the construction ships... Devries. I plan to enable WWX mod after i finish the campaign so I am building myself a full "secure" supply chain for the player shipyards. Using YAT to manage my free miners & traders. :P

Basically I am building an empire lol

EDIT: Personally just the Construction Shop in Albion (and also heard one in Omicron would do the same) will generate a decent income due to repair work from the 3.0 enhanced pirate raids on stations causing damage & needing plates. I had to tell it to stop trading when I need supplys because the NPCs ALWAYS empties it :P
User avatar
BLDoom
Posts: 20
Joined: Thu, 12. Sep 13, 20:05
x4

Post by BLDoom »

Oh, that sounds like a plan. Especially the construction shop. I've seen the increased pirate raids do some damage. I also plan to use WWX sometime in the near future, since I can't continue my campaign at the moment due to the Captain and Defence Officer mod.

I presume you build the prerequisite stations to supply the shipyards. Are all the materials to do so in Devries? I guess everything like plasma and gas would be easily accessible in Lookout Alpha.
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

I found that building up 30-40 mill and placing a construction shop in cuspid splint was a sure fire money maker as the small shipyard eats the produce like candy. Should work just as well for any shipyard zone with mass traffic assisting with the haulage :) Ship tech and drone facs should see similar high output results - once you have a good list of station agents you can easily identify the gaps in the market - rmp is the crucial one though since you cant build without them....
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
Exavier724
Posts: 118
Joined: Fri, 12. Dec 03, 02:13
x2

Post by Exavier724 »

@BLDoom: Technically Devries does have every resource but alot of them are in the same location as the jumpgate so PMC destroyers will blow up your miners easily.

I actually pulled 3 files out of the defunct "Real War" mod to fix that problem... Delete everything but the following. Zones moves the jump beacon to Crimson Rocks, Region Defs shuffles the resorces a little to move the critical ones to Molton Archon :)
RealWar/content.xml
RealWar/maps/XU_ep1_universe/zones.xml
RealWar/libraries/region_definitions.xml

@YorrickVander: Sorry for the slight derail.

Problem with putting it in cuspid splint is if you have negative with PMC it will eventually be wore down by patrols jumping through. I threw mine up in Even Temper. No PMC stations there the patrol destroyers are much less often... though the only resource i get irregularly is nividium cubes. NPCs will keep the rest full pretty easily.
wanglewis
Posts: 37
Joined: Thu, 24. Sep 09, 09:59
x4

Post by wanglewis »

the vanilla findfreetraderun script is restrict for not being too smart (devs write in the script), so that they may buy a ware with 800cr and sell it at 400cr. I think maybe you can copy it out and optimise it to a better profit
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

@wanglewis - indeed. the ai can always be better :)
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 »

bug report:

1. Shoppinglist stuck and will never be done. you cant even delete it. After removing the ship from auto it always happens. Sometimes you can solve it throught in squard and out, but sometimes it wont work at all.
(It seems that i report it earlier)


2. By adding ship to autotrader or miner, if you cancel the moneytransfer or press the enter with no money, the menu will return to range selection, and if you want to continue again , it will add null null null ship to the overview list. This problem can be solved by recode the YAT_moneytransfer.lua in ego_detailmoniter

you need to change all the code bellow

Code: Select all

Helper.closeMenuAndReturn(menu)
to

Code: Select all

Helper.closeMenuAndCancel(menu)
and replace the local function buttonOK() like following

Code: Select all

local function buttonOK()
	local managerMoney, managerMinMoney, managerMaxMoney, isDummy = GetAccountData(menu.entity, "money", "minmoney", "maxmoney", "isdummy")
	local value1, value2, value3, value4 = GetSliderValue(menu.slider)

	if 0 < value1 then
		TransferPlayerMoneyTo(value1, menu.entity)
	elseif value1 - managerMoney < 0 then
		TransferMoneyToPlayer(-value1, menu.entity)
	else		
	Helper.closeMenuAndCancel(menu)
	menu.cleanup()
	end

	local money = GetAccountData(menu.entity, "money")

	SetMinBudget(menu.entity, money/10)
	SetMaxBudget(menu.entity, money)
	Helper.closeMenuAndCancel(menu)
	menu.cleanup()

	return
end
It seems that you add the ships to the autogroup after selecting range, then you go to moneytransfer menu, and cleared the data, but if you returned to the range selecting menu again, it will be a problem for no data and duplicate selection
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

for bug 1 - will have to look into it.

for bug 2 - thanks for the tip, I did miss a Helper.closeMenuAndReturn(menu) entry. The change to buttonOK appears to be superfluous however.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.

Return to “X Rebirth - Scripts and Modding”