EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
[MOD] Trade Menu Cargo Hold Filter (v1.05 compatible with patch 3.5x, 3.6x and 4.x)
Post new topic Reply to topic Goto page 1, 2, 3  Next
View previous topic :: View next topic
Author Message
blackmilan



MEDALMEDAL

Joined: 22 Jan 2011
Posts: 123 on topic

Thank you for registering your game
modified
PostPosted: Sun, 9. Nov 14, 14:46    Post subject: [MOD] Trade Menu Cargo Hold Filter (v1.05 compatible with patch 3.5x, 3.6x and 4.x) Reply with quote Print

This is a little UI mod. It adds a new filter to the trade menu which filters the trade list by the cargo type of the selected ship. If you click the button a second time it will only show wares in the trade list which are on board of the selected ship (or on its shopping list). Clicking it again will switch back to the cargo type filter.

If you have any questions or feedback please let me know.

  1. The new filter is set as default when you open the trade menu. You do not have to select the appropriate filter for each of your ships manually any more.
  2. If you have a ship like the Rahanas which can transport multiple cargo types (e.g. energy and container) you can see all corresponding wares in one list.
  3. Filtering by the cargo on board of the selected ship allows you to easily find the trade requests you can serve with your current cargo or to find further offers if you are collecting a certain ware.
  4. The ship details are now displaying the full system/sector/zone name instead of the abbreviation and I have made the cargo list a bit more readable. (Only in version v1.01, might be added again later)

Steam Workshop

Alternative Download and Installation

  1. Follow the link below and select the file
  2. Click on the download button at the top of the window
  3. Unpack the ZIP archive and copy the folder "TradeMenuCargoHoldFilter" to the X-Rebirth "extensions" directory

Trade Menu Cargo Hold Filter (v1.01, v1.04 and v1.05)

(Click to enlarge image)


Version History


19-Dec-2015 v1.05 (compatible with patch 4.30 and newer) (published on Steam Workshop 29-Feb-2016)

  • Update to be compatible with the UI changes in patch 4.00 beta 4.

18-Apr-2015 v1.04 (compatible with patch 3.5x until patch 3.6x)

  • Added a new filter option to only show wares in the trade list which are on board of the selected ship (or on its shopping list).

10-Mar-2015 v1.03 (compatible with patch 3.5x until patch 3.6x)

  • Update to be compatible with the UI modding features changed in patch 3.5 RC 1.

08-Mar-2015 v1.02 (compatible with patch 3.50 beta 3)

  • Updated the mod to be compatible with the new UI modding features in patch 3.5 beta 3. This version will not work with any patch prior to 3.5 beta 3.

11-Nov-2014 v1.01 (compatible with patch 2.51)

  • Fixed a freeze which occured if there was no ship in the squad. In this case all available trades will be displayed now.

09-Nov-2014 v1.00 (compatible with patch 2.51)

  • Initial Release




Last edited by blackmilan on Thu, 21. Dec 17, 13:47; edited 27 times in total
Back to top
View user's profile Send private message
Vim Razz





Joined: 02 Nov 2010
Posts: 1797 on topic

Thank you for registering your game
PostPosted: Mon, 10. Nov 14, 05:37    Post subject: Reply with quote Print

I've been using this all evening and it's a great addition.

It works fine with 3.00 b2, though it does overwrite the changes in the new menu. I haven't fully explored what the new 3.00 b2 colors and stuff actually indicate yet, but, you know... there's some new stuff in there that exists to look at at some point.

The only problem I could find so far is that it currently causes the game to freeze if the trade menu is opened when there are no ships in your squad.

From the error log:

[General] ======================================
[=ERROR=] Error while executing onEvent script for event: showTradingOffersMenu.
Errormessage: [string "ui/addons/detailmonitor/menu_trading_offers.lua"]:423: attempt to index a nil value
[General] ======================================


If you can get that straightened out, then that'd be awesome.

Back to top
View user's profile Send private message
Sparky Sparkycorp
Moderator (English)
Moderator (English)



Joined: 30 Mar 2004
Posts: 6731 on topic
Location: UK
Thank you for registering your game
PostPosted: Mon, 10. Nov 14, 09:13    Post subject: Reply with quote Print

Look's great, thanks!

Beta-testing the new beta so will wait a bit to try. Colour - wise in 3.00b2, there's a colour for wares that are illegal. I don't think it is responsive to license or system context but I've not full tested that.


_________________
X:R mod list. X:R Wiki.
Updated TC/AP Bonus Pack. AP TS efficiency.
Back to top
View user's profile Send private message
swatti





Joined: 07 Dec 2003
Posts: 1188 on topic

Thank you for registering your game
PostPosted: Mon, 10. Nov 14, 12:37    Post subject: Reply with quote Print

Can you make a mod that filters OUT ships that can only carry "fuel" AKA: combat-ships? And fighters / ships with no cargo-hold.

Back to top
View user's profile Send private message
blackmilan



MEDALMEDAL

Joined: 22 Jan 2011
Posts: 123 on topic

Thank you for registering your game
PostPosted: Mon, 10. Nov 14, 19:49    Post subject: Reply with quote Print

Vim Razz wrote:
The only problem I could find so far is that it currently causes the game to freeze if the trade menu is opened when there are no ships in your squad.

Who is doing trade without ships? Very Happy Actually I never thought of this scenario Embarassed Thanks a lot for pointing that out. I will check that and provide an updated version.

Sparky Sparkycorp wrote:
Look's great, thanks!

Thanks. I am hearing a lot of nice stuff about v3.0. I guess I will have to give it a try myself at some point in time and check out the new ui code.

swatti wrote:
Can you make a mod that filters OUT ships that can only carry "fuel" AKA: combat-ships? And fighters / ships with no cargo-hold.

This is a nice idea. Though I am not sure, if it can be done with the current functionality in the trade menu.

Back to top
View user's profile Send private message
blackmilan



MEDALMEDAL

Joined: 22 Jan 2011
Posts: 123 on topic

Thank you for registering your game
PostPosted: Tue, 11. Nov 14, 19:52    Post subject: Reply with quote Print

I have fixed the freeze which occured if there was no ship in the squad and uploaded the new version v1.01.

Trade Menu Cargo Hold Filter (v1.01)

Have fun!

PS: Updated the original post with the new version and a version history.

Back to top
View user's profile Send private message
Earth Ultimatum IV.



MEDALMEDALMEDAL

Joined: 03 May 2010
Posts: 5129 on topic
Location: Slovakia
Thank you for registering your game
PostPosted: Tue, 11. Nov 14, 20:01    Post subject: Reply with quote Print

Could be added to original game. Wouldn't be a bad addition Smile


_________________
Steam profile
Back to top
View user's profile Send private message Send e-mail
blackmilan



MEDALMEDAL

Joined: 22 Jan 2011
Posts: 123 on topic

Thank you for registering your game
PostPosted: Wed, 12. Nov 14, 20:25    Post subject: Reply with quote Print

Thanks!

Feel free to suggest it to Bernd for the next update Smile

Back to top
View user's profile Send private message
Vim Razz





Joined: 02 Nov 2010
Posts: 1797 on topic

Thank you for registering your game
PostPosted: Wed, 12. Nov 14, 20:33    Post subject: Reply with quote Print

blackmilan wrote:
Who is doing trade without ships? Very Happy

I break what I can. Wink

The new version is working nicely so far.

Back to top
View user's profile Send private message
HailedGorion





Joined: 02 Jan 2011
Posts: 36 on topic

Thank you for registering your game
PostPosted: Thu, 13. Nov 14, 19:01    Post subject: Reply with quote Print

Would it be able to add filters for wares being offered/bought in a sector/system/galaxy?

I know we can check the distance to that trade to occur, but if I could see the offers coming from a sector/system/galaxy only, it would be much easier to visualize and make my plannings regarding building up the economy.

Back to top
View user's profile Send private message
blackmilan



MEDALMEDAL

Joined: 22 Jan 2011
Posts: 123 on topic

Thank you for registering your game
PostPosted: Thu, 13. Nov 14, 20:31    Post subject: Reply with quote Print

Resolving the location of a trade is rather simple, in fact the code is already there to show the system, sector and zone at the bottom of the trade menu.

Code:
local cluster, sector, zone = GetComponentData(trade.station, "cluster", "sector", "zone")


The thing that is more difficult (at least for me) is how one would tell the menu which system/sector/zone is of interest? There would either have to be some kind of list to select from or a textbox to enter the desired value (like the textbox on top).

Back to top
View user's profile Send private message
Sparky Sparkycorp
Moderator (English)
Moderator (English)



Joined: 30 Mar 2004
Posts: 6731 on topic
Location: UK
Thank you for registering your game
PostPosted: Thu, 13. Nov 14, 20:40    Post subject: Reply with quote Print

Maybe colour-coding would be OK? Seems fine for NPC lists in the sidebar.


_________________
X:R mod list. X:R Wiki.
Updated TC/AP Bonus Pack. AP TS efficiency.
Back to top
View user's profile Send private message
blackmilan



MEDALMEDAL

Joined: 22 Jan 2011
Posts: 123 on topic

Thank you for registering your game
PostPosted: Sat, 15. Nov 14, 13:15    Post subject: Reply with quote Print

I like the idea to filter by system/sector/zone and I think I have an idea how to make it work. I will try to add a new row below the current filters and put a text field there where the name can be entered (like the search box at the top) and put buttons next to it to tell it what to filter for (system/sector/zone or galaxy in case one wants to see everything).

Back to top
View user's profile Send private message
HailedGorion





Joined: 02 Jan 2011
Posts: 36 on topic

Thank you for registering your game
PostPosted: Sat, 15. Nov 14, 21:21    Post subject: Reply with quote Print

That would be great. It would make my life so much easier when looking for the wares needed to supply a specific station.

Back to top
View user's profile Send private message
blackmilan



MEDALMEDAL

Joined: 22 Jan 2011
Posts: 123 on topic

Thank you for registering your game
PostPosted: Thu, 20. Nov 14, 19:30    Post subject: Reply with quote Print

HailedGorion wrote:
Would it be able to add filters for wares being offered/bought in a sector/system/galaxy?


I had a look into the trade menu code to see how we could make it work and there is actually good news.

No need to mod anything, it is already built-in. Laughing

Did you ever use the textbox at the top of the menu? I thought it could only search for wares.

Guess what, beside wares it allows searching for zones, sectors, systems and even station and faction names can be used. Very Happy



Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic Goto page 1, 2, 3  Next
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Control Panel
Login Data
The time now is Wed, 18. Jul 18, 10:41

All times are GMT + 2 Hours

[ Disclaimer / Impressum ] | [ Privacy Policy / Datenschutz ]

Board Security

Copyright © EGOSOFT 1989-2018
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.10532 seconds, sql queries = 29