RimWorld

RimWorld

670 ratings
Dynamic Trade Interface
4
3
2
2
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.4, 1.5, 1.6
File Size
Posted
Updated
870.438 KB
Aug 15, 2023 @ 10:12am
Jun 23 @ 4:17pm
56 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
231 Comments
Zeracronius  [author] Jul 3 @ 5:04pm 
Everything is resizable; column headers can be dragged to resize them, the window can be dragged to resize.
The window size and location is also remembered, and as is the column widths.
DubiousPhysics Jul 3 @ 3:31pm 
For what it's worth, I've found that making the window much wider with the resize handle in the bottom right helps a lot with item names.
Travioli Jul 1 @ 8:50pm 
I am aware of the ability to display durability, but at that point only the first word or two of a name is visible
Travioli Jul 1 @ 8:49pm 
Is there a way to reduce font/text size? Some items don't show their hp % because their names are too long
Zeracronius  [author] Jun 26 @ 1:47pm 
@chainlinc3
"colASTrade2RuleIconDef" is a column added by AutoSeller.
You probably have some stored configuration that includes a reference to this column in your mod options.
Opening and saving the mod's column settings should clear any leftover references to it.
chainlinc3 Jun 26 @ 8:46am 
I'm getting an error on startup with a minimal 1.6 list of just Harmony and this.

Could not load reference to DynamicTradeInterface.Defs.TradeColumnDef named colASTrade2RuleIconDef

I'd include a hugs log, but it's not updated, so I don't think there's anything I can do about that.
DubiousPhysics Jun 24 @ 6:08pm 
@Zeracronius
That's awesome! I really appreciate how well documented this is.

I completely missed that tooltip, thank you for pointing it out!
Zeracronius  [author] Jun 23 @ 4:05pm 
I have updated the modding documentation to explain all of the supported forms of integrations.

For Favourites, i imagine the easiest option would be for them to simply supply a MoreIconsDef, to add an additional icon in the icons column.

Can be found here: https://github.com/Zeracronius/DynamicTradeInterface/wiki

As for faction reputation in gifting mode, this is actually already shown as a tooltip on the accept button.
DubiousPhysics Jun 21 @ 10:07am 
Thanks for all your hard work on this mod! Hopefully this is a decent spot to leave some feature requests.

- The faction reputation display currently disappears when you enter the gift interface. It would be useful to be able to see this on the gift screen as well.
- A "gift affordable" style button that gifts as much of an item as possible without hitting 100 reputation would be really useful.
- This one is probably a long shot, and might be more on the other mod to use Dynamic Trade Interface's extendability, but I'd love to be able to see Favourites! icons in the trade interface (I linked to the updated version I use; alas, the original seems to be unmaintained, although it does have a source code link [github.com]).
Bogatir Jun 18 @ 2:36pm 
Thats fixed the issue, thank you