RimWorld

RimWorld

850 ratings
Dynamic Trade Interface
4
3
2
2
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.4, 1.5, 1.6
File Size
Posted
Updated
872.782 KB
Aug 15, 2023 @ 10:12am
Sep 22 @ 4:50am
61 Change Notes ( view )

Subscribe to download
Dynamic Trade Interface

Description
A high-performance and customizable trade interface originally inspired by Trade UI Revised.
Written from scratch to not only avoid the biggest performance hits of the vanilla UI but to also allow for other mods to easily extend it with additional columns.

Can be safely added and removed at any time during a playthrough, since it doesn't add any game content.
Does not replace the vanilla trade window. Instead you can choose in the mod options whether to open this or vanilla one by default, the other one can be accessed by holding down ctrl as the window opens.

The changelog can be found under the Change Notes tab.

Features:
  • Performance friendly.
  • Move and resize trade window.
  • Toggle, hide and resize columns.
  • Search and filter with RegEx, then save them.
  • Enable saved filters for notifications.
  • Click each columns to sort by it, and multiple with shift.
  • Buy and Sell max affordable using double arrow buttons.
  • Open original trade window by holding ctrl when it opens.
  • Option to hide everything trader is unwilling to buy.
  • Option to only show trade buttons near the cursor for better performance.
  • Out of the box xenotype support and other extra icons.
  • Togglable and resizable summary section based on TradeHelper.

Added columns:
  • Durability.
  • Price per weight.
  • Label variant of counter column.
  • Category.

Integrations & Compatibilities:

Limitations:
  • Due to how Rimworld's UI system works, controls will lose focus if any other control is made visible or invisible ahead of it. Generally to the left and up.
    This means that for example, putting the buttons to the left of the input counter boxes will cause them to unfocus when buttons change.
    There is now an option that can be enabled in the mod settings that attempts to compensate for this, by automatically refocusing the control whenever the focus is lost from changing interface. Often the escape button can be used to close windows that appear unreponsive.

Extendability (For modders):
XSD files are bundled with the mod describing how to define a TradeColumnDef.
Based on a number of method handlers, column behaviour can be easily referenced in C#.
Because it doesn't use any custom typings, it can all be defined without any need for assembly references or otherwise.

The documentation can be found https://github.com/Zeracronius/DynamicTradeInterface/wiki.

All source code can be found on Github[github.com]


Troubleshooting
Experiencing an issue?
  1. First check that it is actually caused by this mod; Either remove it temporarily, (can be added or removed any time!) or hold ctrl while trade opens to open the original vanilla trade window and check if isssue is also present there.
  2. If the issue is still there, then it isn't related to this mod and should be reported somewhere else.
  3. If you don't experience the issue with or in vanilla, then do provide a description of what you are trying to do, and what the problem you are experiencing is. The more details the better!
  4. If the issue causes an error in the log, then use Hugslib log publisher to provide the log in your report.


Previous versions[github.com]

Credits
Joseasoler for helping sanity checking code and ideas.
Ryan for the initial implementation of DragSelect and Gene Assistant support
Madman666 for the preview and icons.
Timmy for permission to implement features of TradeHelper
Spanish translation by Ferchu
Popular Discussions View All (3)
10
Mar 17, 2024 @ 11:48am
Error offering gifts to hostile settlement
Tom Jackal
4
Mar 14, 2024 @ 5:23pm
Error when trying to trade.
Tandy1000Synth
0
May 31 @ 9:37pm
Price unpredictability when paired with Everything has Quality Silver
Scarlet
282 Comments
Daemonjax 1 hour ago 
In 1.4 this is somewhat broken -- it doesn't display the quantity for items that your colony or the trader has in the Available column. Perhaps it's an incompatibility with one of these other trade related mods I have installed: Show known techprints, or Social experience from trade.
Zeracronius  [author] Sep 24 @ 3:13pm 
Both of those textures were added in 1.5. It is a mistake that the version for 1.4 is trying to load them. It will cause no other issues aside from the 2 errors of 'not found' in the log.
It will not try to actually use them.
Daemonjax Sep 24 @ 2:44pm 
In 1.4, two red log errors when the game starts for what _seems_ to me like texture references to stuff from Vanilla Books Expanded... https://gist.github.com/HugsLibRecordKeeper/439341871f2ff0d7b5611f61cf9c430c
Instead of modifying the source, I just created two fake textures and that made the red errors go away.
Zeracronius  [author] Sep 22 @ 4:53am 
Sorry for the delay, i've been struggling to think of how to best implement it, combined with life going on.
The solution i settled on for now is having all shared as a second tab in the same UI, which behaves exactly the same and seamlessly with the existing ones, but are saved to the mod config file, and so shared across all saves.
月空 Aug 30 @ 1:28pm 
Thank you so much for considering it!Your ideas for import/export or mod config options sound absolutely perfect.
Zeracronius  [author] Aug 30 @ 12:53pm 
No problem! This is something i considered, and deliberately designed to be per-game because i thought you were unlikely to be looking for the same things.
I can try mess around with some options for importing and exporting them.
Maybe an option for saving/loading from mod config
月空 Aug 30 @ 12:30pm 
I apologize. I used a translation tool, so it might have been difficult to understand 。I meant to say 'keep the saved filters between games'.
Zeracronius  [author] Aug 30 @ 12:08pm 
What do you mean by "round"?
Do you mean keep the saved filters between games? Or just keep the current filter between opening the window?
月空 Aug 30 @ 11:42am 
Could the item filtering list from the previous round be saved, please? This way, we wouldn't have to re-enter it every round.
BigFatSMOrc Aug 27 @ 12:33pm 
@Zeracronius
Thank you, no rush!