[MOD] Trader Menu Fix

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

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

Post Reply
User avatar
eliseeff
Posts: 255
Joined: Wed, 26. Jan 05, 18:17
x4

[MOD] Trader Menu Fix

Post by eliseeff » Wed, 12. Sep 18, 19:04

Name: Trader Menu Fix
Version: 1.01
Autor: eliseeff
Requirements:
game version 4.0 or higher + Mods Options Menu
Install: Subscribe to the mod on the Steam Workshop page
Uninstall: Unsubscribe from the mod and delete the mod folder
Savegame compatible: YES

XR VR-edition Steam Workshop page

Changelog:

1.00 - Release
1.01 - Added buttons "sell all" (<<) and "buy all" (>>) in the quantity selection menu.

Description:

After buying/selling the goods (or viewing the encyclopedia), the line with this product remains selected, instead resetting the selected line to the top of the list every time in the original game. Also, added the green highlighting of prices for profitable offers relative to the average price (can be disabled in the settings menu of the mod). And also a couple of minor vanilla bugs fixed.

Image

Also in v1.01 added buttons "sell all" (<<) and "buy all" (>>) in the quantity selection menu. They correspond to hot keys 5 and 6 on the keyboard or LB and RB on the gamepad (see the picture below).

Image

Options

Select the Main Menu -> Options -> Extensions -- Options.
(Enter - 9 - 3 by default or Enter - 6 - 2 for legacy menu)

Image Image

Select "Trader Menu Fix | Options" and press Enter.

Image

Now you can enable or disable the highlighting of profitable offers by pressing 'Enter' or 'Change' button.
Last edited by eliseeff on Wed, 31. Oct 18, 12:32, edited 3 times in total.

User avatar
eliseeff
Posts: 255
Joined: Wed, 26. Jan 05, 18:17
x4

Re: [MOD] Trader Menu Fix

Post by eliseeff » Wed, 31. Oct 18, 05:53

Updated to v1.01

Added buttons "sell all" (<<) and "buy all" (>>) in the quantity selection menu. They correspond to hot keys 5 and 6 on the keyboard or LB and RB on the gamepad (see the picture below).

Image

FunkDooBiesT
Posts: 11
Joined: Thu, 3. May 12, 14:01
x4

Re: [MOD] Trader Menu Fix

Post by FunkDooBiesT » Sat, 17. Nov 18, 23:07

This mod is great thank you for it!

I would like it if we could control the average amount used for the green indication.
I imagine a simple percentage setting 0-25% applied to the base value to get a new average level. Trick is to get the best value for sell and buy. Sell would be base plus the percentage and buy would be base minus the percentage.
I spend allot of time looking for the best price I can find so anything that can make that faster and less cumbersome would be greatly appreciated!

For the longest time I wished that you could put a station manager onto the skunk to buy and sell inventory items, like you can set for the main commodities it would be the best feature ever for me. This mod is the best thing in that direction so far and I thank you for it!

User avatar
eliseeff
Posts: 255
Joined: Wed, 26. Jan 05, 18:17
x4

Re: [MOD] Trader Menu Fix

Post by eliseeff » Sun, 18. Nov 18, 00:26

Thanks for the kind words!

Implementing your request is pretty easy, but unfortunately I have absolutely no time at the moment to make a variable setting through the settings menu. But you can make a fixed setting yourself.

Unpack the mod and open this file: \ui\addon\mtf\menu_trader_fix.lua

Then find this line:

Code: Select all

 local g_buy, g_sell = traderamount > 0 and buyprice < avgprice, playeramount > 0 and sellprice > avgprice
For convenience, it can be replaced by two equivalent lines:

Code: Select all

 local g_buy = traderamount > 0 and buyprice < avgprice
 local g_sell = playeramount > 0 and sellprice > avgprice
By making changes to these lines, you can get what you want.

For example:

Code: Select all

 local g_buy = traderamount > 0 and buyprice < (avgprice * 90 / 100)
 local g_sell = playeramount > 0 and sellprice > (avgprice * 105 / 100)
Whith this changes only buyprices < 90% of averageprice and sellprices > 105% of averageprice will marked green.

FunkDooBiesT
Posts: 11
Joined: Thu, 3. May 12, 14:01
x4

Re: [MOD] Trader Menu Fix

Post by FunkDooBiesT » Sun, 18. Nov 18, 13:20

Ah sweet man, thanks for the pointers!

I changed the line of code to the following for a start and it works perfectly!

Code: Select all

 local g_buy, g_sell = traderamount > 0 and buyprice < (avgprice*0.86), playeramount > 0 and sellprice > (avgprice*1.14)
That would be a setting of 14%

Thanks again!

AR_Starfighter
Posts: 64
Joined: Thu, 6. Jun 19, 06:02

Re: [MOD] Trader Menu Fix

Post by AR_Starfighter » Fri, 28. Jun 19, 06:36

Can you make this available for a direct download? I posted a request for a mod like this.

GOG version compatible.

Also, the mods options menu.

Post Reply

Return to “X Rebirth - Scripts and Modding”