RimWorld

RimWorld

382 ratings
Caravan Item Selection Enhanced
3
3
2
3
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.3, 1.4, 1.5, 1.6
File Size
Posted
Updated
1.715 MB
26 Aug, 2022 @ 9:47am
11 Jul @ 3:48pm
20 Change Notes ( view )

Subscribe to download
Caravan Item Selection Enhanced

Description
Description:
Personally I think one of the most user-unfriendly parts of the game is managing caravans.
This mods aim is to improve one aspect of it: The selection of the items/pawns when forming a caravan (or splitting a caravan or loading transport pods).

You will be able to add new tabs (vanilla has three tabs: Pawns, Travel Supplies, Items), rename tabs, change their position and so on.
Additionally you can add subcategories to tabs (in vanilla only the pawns tab has subcategories: Colonists, Prisoners, Animals, ...).
For each tab/subcategory you can select which items should be shown.

The mod comes with a default tabs configuration (config) which contains some additional tabs and subcategories.
All items that can be stored will be assigned to a tab and a subcategory, even those added by mods.
You can easily add new configs, load configs and change configs.

Configs are saved in the mods config file in the config folder of the game, so they are not per-savegame but global.
The mod should be completely save to add and remove from exisiting savegames. Nonetheless make a backup!

Update 1.0.7: Loading List
All three affected guis display now what pawns/items are selected (can be turned off in the mod settings)

Update 1.0.9: Presets
Save currently selected pawns/items as a preset to be able to form a caravan (or load a transporter) with just a few clicks later on.
There is a mod setting to set the difference in hitpoints that is allowed. Hitpoints are only taken into account for things with quality and buildings.
New "sort by" option: Sort by "colonist bar". This will order your colonists in the pawns tab according to their order in the colonist bar

Update 1.0.12:
Mod setting to show the button 'select everything' in the caravan forming dialogue, regardless whether dev mode is activated.
Mod setting to show a dropdown menu when clicking 'reform caravan' to define if items and pawns should be preseleced.

How to use:
The caravan form/split and load transporters gui have a new button called "tab settings" at the top right corner which will open the gui.
On the top right corner of the new gui there is a button called "help me" which will display additional infos and explanations.
This should solve all questions how things are working.


Limitations:
Right now it is not possible to remove/change the pawns tab or add colonists to a custom tab.
The number of tabs and the subcategories per tab are limited to 15.
The vanilla feature to "auto select travel supplies" is removed.
Items that are not assigned to any tab will be automatically assigned to a new tab called "unassigned".


Performance:
As the code only runs when the caravan/transport pod gui is opened (and a little bit on RW startup) performance should be not a problem.


Compatibility:
Not compatible with mods that rely on CaravanUIUtility.CreateCaravanTransferableWidgets(...).
Tell me if you stumble across mods that are incompatible so I can add them to the list of incompatible mods.

Vehicle Framework:
You can use both mods without issues, but my mod only patches the "Form Caravan" screen.
!!! Since 1.6 both mods are just incompatible and will not work together. !!!


Known Issues:
It might happen that you can not choose items for a subcategory. The list is empty when it should not.
This is a issue caused by the "extra options (e.g. apparel -> allow smeltable)" which some item categories have, even though you did not allow these categories in the parent tab.
E.g. if you make a new parent tab, select only plants, then make a subcategory, you will find a list of plants to assign to that subcategory.
Now if you go back to the parents tab, open the register "apparel" and deselect "allow non-burnable", then go back to the subcategory, there is no list of plants anymore.


"Could not load reference" error when opening one of the relevant guis:
This happens when there is a reference to a thingDef in the config file which can not be found. Should only happen if mods that added new thingDefs got removed. The error is harmless and easy to fix: Just open/close the tab settings once and the configs get saved without the missing thingDef.


It does not work:
Either a bug, your config got smashed somehow or a mod conflict.
If it is the config you should delete the config of the mod in the games config folder. The default config will then get recreated at the next startup.
Otherwise it would be nice to post a report with at least a hugslib log, but way better would be steps to recreate the problem.


Else:
Source of the mod is included. Please note that I began learning a programming language not long ago by myself, so dont hit me if you see stuff that could/should be done differently.

Credits and Thanks to:
Ratzinger for beta testing and giving feedback.
Brrainz for Harmony.
Timmy for the idea and hook for the loading lists.
Marnador for the RimWorld font, used in the preview pictures.
Tynan and Ludeon for RimWorld.
Dubs for an example how to save stuff to the config file.

License [creativecommons.org]
Popular Discussions View All (3)
11
18 Mar @ 10:41am
Feature requests
crow1
1
3 Mar @ 10:36am
Resolve conflict with "Caravan Adventures"...?
DatBoi302
2
28 Jul, 2024 @ 2:35am
PINNED: Rework of the mod
Kopp
202 Comments
Nicoman 12 Jul @ 9:51am 
@Kopp of course. Please excuse me.
Kopp  [author] 12 Jul @ 4:18am 
@Nicoman
I guess the comment was meant for another mod?
Kopp  [author] 11 Jul @ 5:26pm 
@NuanKi
Yeah, I already added the incompatibility to the 'About' file.
Glad the mod was useful for you :)
NuanKi 11 Jul @ 5:07pm 
Yeah i just checked and they are modifying and using vanilla isntead of the custom they had

That's sad, i really love this mod :c
NuanKi 11 Jul @ 3:32pm 
I remember they indeed had their own gizmo with dialog instead of using vanilla one, but since I'm just creating my 1.6 mod pack I haven't seen if they changed that
Kopp  [author] 11 Jul @ 3:05pm 
@NuanKi
I never used Vehicle Framework, but didnt they had their own "from vehicle caravan" dialoge?
Seems like they are using the vanilla one now and patching it...
As my mod does the same, seems like from now on (Rw1.6) the two mods are just incompatible.
NuanKi 11 Jul @ 2:38pm 
Thanks
Kopp  [author] 11 Jul @ 2:37pm 
@NuanKi
Happens if loaded together with Vehicle Framework.
I will see what I can do.
NuanKi 11 Jul @ 2:00pm 
Removed this mod and the error is gone
NuanKi 11 Jul @ 1:57pm 
https://gist.github.com/HugsLibRecordKeeper/f423188b0bf9d08a7c28ac7d3e923a9c

Error in static constructor of CaravanItemSelectionEnhanced.Harmony: System.TypeInitializationException: The type initializer for 'CaravanItemSelectionEnhanced.Harmony' threw an exception. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
[Ref EDFD71CB]