TD Find Lib

Mod, 1.4


A framework for user-customizable, highly-detailed filters for things.

Library modThis is a Library mod which does nothing by itself! It does have some UI to hold the library of searches, which you can set up, peek at and save. But other mods are needed for real use:

Get yourself Ctrl-F and Custom Alerts to use it! Also, Everybody Gets One makes use of it. Also YOUR MOD should use th...

Розробник: Uuugggg

Дата створення: 29 Nov, 2022 @ 2:11pm

Оновлено: 31 Jan @ 4:18pm

Підписників: 101031


Розмір (розпакований) : 0.899 MB

A framework for user-customizable, highly-detailed filters for things.

Library mod
This is a Library mod which does nothing by itself! It does have some UI to hold the library of searches, which you can set up, peek at and save. But other mods are needed for real use:

Get yourself Ctrl-F and Custom Alerts to use it! Also, Everybody Gets One makes use of it. Also YOUR MOD should use this! It's a library mod! USE IT IN YOUR MOD!

Features
A very deep filtering framework. A long list of details to filter things on.

A library of saved searches. (Accessible through settings, but also mods that use TDFindLib should have an easier button to open the library) Whatever mod uses TD Find Lib has access to the library so it's easy to share across games.

An editor window to create and edit searches, openable from the library.

A viewer window to perform a search on a map, openable from the editor. (Rudimentary use here, use other mods for better UI) Click/drags items in the list to select them. Double-click to select all of the same type. Ctrl-click to add or remove from selection. Right-click them to go to them.

Easily import and export searches from mod to mod, or to the library, or even the clipboard!

For use in other mods
This mod is made for other modders to use. If your mod can make use of user-customizable searches, this mod makes it easy.

So what could you use it for? Well, I very quickly updated my mod Everybody Gets One to use it! That mod lets work bills set a limit based on the number of colonists instead of a set number. But ever since 1.1->1.4 added slaves, children, etc, you don't just want the number of colonists to set the limit - there's room for customization! But that's too many options and combinations for that mod to think about. But with the power of TDFindLib, it was easy! So instead of making "One Hat for each colonist", it can be "One Hat per prisoner/colonist" or "tribalwear for slaves and prisoners" or "pants for children only" or any of those, EXCEPT for people with the nudist trait! Whatever you can imagine, the user can set their own filters using TDFindLib. For example when making it, I remembered, hey, I can make swords for only people with melee skill! THANK YOU TDFINDLIB!

---

Search Details
A search has a few components:

Listing. What basic type of thing to list. Ctrl-click the listing to set multiple types.

Match any/all. Simply whether or not to match any or all filters.

Map. By default, searches are performed on the current map. But it can be set to use all maps, or specific maps in your game.

Filters. The bulk of this mod is a huge list of filters for nearly anything about an item. If you want a new one, ask - they're not hard to code up. (If you're making a mod yourself - it's also easy to add new ThingQuery subclasses in C#)

Each filter can be set to Include or Exclude items that match the filter. A filter can be temporarily turned off. The filters can be locked, I guess, to show a cleaner presentation... I dunno, it felt like a good idea.

When selecting a filter setting, it will often narrow down the options to things that are available on the map. Shift-click the setting to get a list of all possible things (which can be a very long list!)

Performance
When a mod performs a lot of of searches, you might worry about performance.

Well, don't set up a search that goes through 10,000 things and searches them by name! The 'all' filter literally searches all bushes, grass, dirt, etc.

First, if your search only concerns one type, be sure to set the Listing appropriately so the search is faster, like Listing: Items. Ctrl-click listing to select multiple types.

Second, order your filters to narrow down things quickly. The lower filters are only checked if the item passes the previous filters. For example, in the the Wild Plants filter: Don't put the "Not in a zone" filter first, since most things are not in a zone. First, narrow down quickly by filtering for the few plants that are "Harvestable Now".

Some filters are slower than others. Some are simply one-item checks whereas others like the name filter have a lot more work to do. Consider that.

Tedious detailed Notes

Corpses/"Minified Buildings" are weird. They are technically containers for the Person/Building. Since you probably want to match on the "contents", TDFindLib applies the filter to the "contents". But the location is from the "container", so filters pass if either the "container" or the "contents" pass. So that poses few conundrums. Some filters like 'Health %' are weird since a 0% Colonist is stored in a 100% corpse. So don't expect corpse searching to work perfect.

Selected items highlight what filters they match - but this doesn't work for Inventory items, since you're not selecting the things in the inventory.

Filters like area/zone are filtered by a single position, not accounting size of the thing.

Compatibility?

* RimThemes; all you have to do is enable dialog stacking in RimThemes dialog options.

---

This is an evolution of my old mod List Everything. This mod takes the searching functionality and makes it simple for other mods to use: So List Everything is now Ctrl-F and Custom Alerts, and hopefully more to come.

---

This mod has pushed vanilla UI to the limits, and a few bugfixes are needed for full UI functionality. The fixes are generally useful, so they went in another mod : TDS Bug Fixes, which will include other fixes at some point. Of course the game should auto-download that for you.

---

Github source and releases : https://github.com/alextd/RimWorld-TDFindLib/releases/latest
Hey, people seem to like donating, so: https://ko-fi.com/alextd

Як завантажити моди?

Натисніть на кнопку вище та завантажте обраний мод з файлового сховища.

Як встановити мод?

Див. секцію "Як встановити".

Чи безпечний завантажуваний файл?

Моди перезаливаються нами з оригінального джерела, без жодних змін. Ми лише запаковуємо їх в звичайний архів. Додатково можете перевірити архів на наявність загроз за допомогою будь-якого антивірусу або онлайн-сканеру на кшталт virustotal.com. Також рекомендуємо робити резервні копії ваших сейвів, про всяк випадок.

There is a folder in the .zip archive. To install the mod, move the entire folder (not just its contents) into 'Mods' folder located under your RimWorld root isntallation folder.
So, for steam version of the game, the path would look like this: C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods
For any other distribution, firstly locate your rimworld installation path and then unpack the archive into the 'Mods' folder.
Then enable the mod in the game mods menu by double clicking on its name and restart the game