边缘世界 RimWorld

边缘世界 RimWorld

Custom Alerts
CrazyBlot 2024 年 7 月 23 日 下午 11:56
Check Stored Resource
Need to make checkers that check some of critical resources stored. The numbers can be more than 1000. Example logic: If [Hay_Stored < 2000] then AlertMe.
Can anybody show me the way to do this? I hace checked almost any of available presets and cant find something suitable.
< >
正在显示第 1 - 5 条,共 5 条留言
Uuugggg  [开发者] 2024 年 7 月 25 日 上午 1:04 
Custom Alerts only looks at individual things on the map, it won't check the resource bar count

<TD_Find_Lib.QuerySearch> <saveable Class="TD_Find_Lib.QuerySearch"> <name>HAY</name> <active>True</active> <listType>Items</listType> <mapType>AllMaps</mapType> <searchMaps /> <queries> <li Class="TD_Find_Lib.ThingQueryThingDef"> <def>Query_Def</def> <refName>Hay</refName> <stackRange>1~200</stackRange> </li> <li Class="TD_Find_Lib.ThingQueryZone"> <def>Query_Zone</def> <ex>1</ex> </li> </queries> <matchAllQueries>True</matchAllQueries> </saveable> </TD_Find_Lib.QuerySearch>

That being said this filter finds hay in stockpiles (not shelves)
Uuugggg  [开发者] 2024 年 7 月 25 日 上午 1:13 
ALTERNATIVELY

<TD_Find_Lib.QuerySearch> <saveable Class="TD_Find_Lib.QuerySearch"> <name>HAY</name> <active>True</active> <listType>Items</listType> <mapType>AllMaps</mapType> <searchMaps /> <queries> <li Class="TD_Find_Lib.ThingQueryThingDef"> <def>Query_Def</def> <refName>Hay</refName> <stackRange>1~200</stackRange> </li> <li Class="TD_Find_Lib.ThingQueryCustom"> <def>Query_Custom</def> <memberChain>GetSlotGroup().is not null</memberChain> </li> </queries> <matchAllQueries>True</matchAllQueries> </saveable> </TD_Find_Lib.QuerySearch>

Should find hay in storage of any type... (Called SlotGroups in code)
CrazyBlot 2024 年 7 月 25 日 上午 3:09 
Thank for advice!

But unfortunately we r limited to small numbers (slider 0-200). Perhaps is any way to make condition like "2000<=[count of ITEM returned by search]" via advanced condition?
Uuugggg  [开发者] 2024 年 7 月 25 日 上午 11:53 
CrazyBlot 2024 年 7 月 25 日 下午 1:24 
**!!!** O_o i missed that function outside search setup ) Cool. Will try it but at first glance its work well. Thank you!
I began to understand logic and possibility of this cool mod closer.
最后由 CrazyBlot 编辑于; 2024 年 7 月 25 日 下午 1:25
< >
正在显示第 1 - 5 条,共 5 条留言
每页显示数: 1530 50