RimWorld

RimWorld

Resource Alert
87 Comments
Deep  [author] 4 Sep @ 1:36pm 
Updated! It should work with toggleable readouts too!
Deep  [author] 3 Sep @ 1:57pm 
code change is done, im just testing it with toggleable readouts :) I will release the update tomorrow!
ziplock9000 3 Sep @ 12:02pm 
I disabled toggleable readouts and your mod started to work just fine! When you make the updated version I will test that with toggleable readouts.
Deep  [author] 3 Sep @ 8:33am 
@ziplock9000:
eureka! I think i know the answer! I have to make a compatibility patch. just give me few hours.
Deep  [author] 3 Sep @ 8:22am 
can you please give me the link to the version youre using in 1.6?
Deep  [author] 3 Sep @ 8:20am 
oh, toggleable readouts. this also caused issues for @横冲直撞小影子. If this fix doesnt fix it, i cannot do much more.
ziplock9000 3 Sep @ 8:16am 
@Deep I replaced the DLL and it's still not working. I tried different load orders too. :(

Here's a mod list, just in case there's one that conflicts. https://ctxt.io/2/AAD4xFzjFQ
Deep  [author] 3 Sep @ 6:30am 
@ziplock @arl85:
i have pushed a new change to the github.
Link to the github: https://github.com/lkulwick/DeepsResourceAlert/tree/master/1.6/Assemblies

can you please manually replace the binary and check if it works for you? The change ive made to make the mod robust and fix the click issue ziplock requested is a risky one and i want to be sure it works before i push it to the steam. Ive also fixed the enter.
arl85 31 Aug @ 2:55am 
just a very small suggestion: if possible, when setting limits, could you make that pressing ENTER automatically accept and close the windows?
ziplock9000 28 Aug @ 5:57pm 
No. I have no other mods that I know of that interact or change the resource list.

I am running in 4K with 2x scaling if you're not taking that into account for absolute position clicks?
Deep  [author] 28 Aug @ 2:57pm 
do you have other mods related to the resource enabled? I have one thing in my mind that could improve compatibility. Ill try to twork on it on the weekend.
ziplock9000 28 Aug @ 2:22pm 
I still can't get this to work even though the mod settings page seems to work.
ziplock9000 15 Aug @ 2:33pm 
Yes I shift-clicked and I tried categorized loadout enabled.. Still not working.
Deep  [author] 14 Aug @ 3:00pm 
have you did shift+click?
You also need t ohave categorized loadout enabled
ziplock9000 14 Aug @ 3:42am 
Clicking on the resources does not bring up a dialog to enter a number.
Deep  [author] 4 Aug @ 4:06am 
@Stealth:
Thank you for your help. Im really sorry you had this kind of issues. I will also doublecheck why you still have this bool value visible. But for me it seems is a steam issue.

@横冲直撞小影子 :

your bug is really weird. Can i reach you in private to help you? If yes, please send me a friend request.
横冲直撞小影子 4 Aug @ 2:34am 
that's the whole message.thanks,I really want to use this mod normally.
横冲直撞小影子 4 Aug @ 2:33am 
System.Activator:CreateInstance (System.Type,object[])
Verse.LoadedModManager:CreateModClasses ()
Verse.LoadedModManager:LoadAllActiveMods (bool)
Verse.PlayDataLoader:DoPlayLoad ()
Verse.PlayDataLoader:LoadAllPlayData (bool)
Verse.Root/<>c:<Start>b__10_1 ()
Verse.LongEventHandler:RunEventFromAnotherThread (System.Action)
Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__28_0 ()
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart ()
横冲直撞小影子 4 Aug @ 2:33am 
(ResourceAlert.DefaultAlertSettings&,string,object[])
Verse.LoadedModManager:ReadModSettings<ResourceAlert.DefaultAlertSettings> (string,string)
Verse.Mod:GetSettings<ResourceAlert.DefaultAlertSettings> ()
ResourceAlert.ResourceAlertMod:.ctor (Verse.ModContentPack)
System.Reflection.RuntimeConstructorInfo:InternalInvoke (object,object[],bool)
System.Reflection.RuntimeConstructorInfo:DoInvoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)System.Reflection.RuntimeConstructorInfo:Invoke (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
System.RuntimeType:CreateInstanceImpl (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Threading.StackCrawlMark&)
System.Activator:CreateInstance (System.Type,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[])
横冲直撞小影子 4 Aug @ 2:32am 
yes,I use 1.6 version.It seems that the mod has not been loaded correctly.
Class="ResourceAlert.ResourceAlertModSettings"><Deep_ResourceAlert_alertableResources><keys /><values /></Deep_ResourceAlert_alertableResources><Deep_ResourceAlert_alertableCategories><keys /><values /></Deep_ResourceAlert_alertableCategories></ModSettings>
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch3 (string)
Verse.ScribeExtractor:SaveableFromNode<ResourceAlert.DefaultAlertSettings> (System.Xml.XmlNode,object[])
Verse.Scribe_Deep:Look<ResourceAlert.DefaultAlertSettings> (ResourceAlert.DefaultAlertSettings&,bool,string,object[])
Verse.Scribe_Deep:Look<ResourceAlert.DefaultAlertSettings>
Stealth Rabbi 2 Aug @ 3:15pm 
@Deep OK i unsubbed and resubbed. No errors now and it restored my threshold settings. Steam does not do a good job at refreshing mod updates, and what's more, it only shows "Workshop content" and associated game in the downloads page. I can't tell what mod it's updating for. All good now! Thanks for all your hard work and support.

I still see the exampleBoolean on the mod's settings page though. So that's weird. I'll see if I get an update again later?
Deep  [author] 2 Aug @ 5:39am 
if you wish, you could try to unsub mode and sub it again ;) maybe this will help.
Deep  [author] 2 Aug @ 5:38am 
@Stealth:
this is weird, it works on my side. Maybe steam need some more time to deliver the update for you.
It already has an option to set it as default, and ive removed this debug boolean too.
Stealth Rabbi 2 Aug @ 5:29am 
Also my saved resource thresholds on my map were lost. I can recover -- I only had a few.
Stealth Rabbi 2 Aug @ 5:26am 
Also, the mod settings page is showing in this state.

https://imgur.com/a/lgI6toq
Stealth Rabbi 2 Aug @ 5:23am 
@Depp no problem. Thanks for your hardwork. Most of the errors have been cleared on startup, but I'm still seeing this one. If you'd rather I move this discussion to your github, I can do that.

Could not find class ResourceAlert.ResourceAlertModSettings while resolving node ModSettings. Trying to use ResourceAlert.DefaultAlertSettings instead. Full node: <ModSettings Class="ResourceAlert.ResourceAlertModSettings"><Deep_ResourceAlert_alertableResources><keys><li>MealSimple</li><li>MealFine</li><li>MedicineHerbal</li><li>WoodLog</li></keys><values><li>5</li><li>8</li><li>6</li><li>35</li></values></Deep_ResourceAlert_alertableResources><Deep_ResourceAlert_alertableCategories><keys><li>MeatRaw</li></keys><values><li>20</li></values></Deep_ResourceAlert_alertableCategories></ModSettings>
UnityEngine.StackTraceUtility:ExtractStackTrace ()

...
Deep  [author] 2 Aug @ 4:26am 
Thanks for eltting me know. What is your rimworld version? Do you use 1.6?
横冲直撞小影子 2 Aug @ 4:20am 
I have already enabled categorized resource loadout mode. the log says could not find class ResourceAlert.ResourceAlertModSettings while resolving node ModSettings.It still remains the same even after multiple re-installations.
Deep  [author] 1 Aug @ 5:03pm 
@Stealth: thanks for your support! I believe ive fixed this issue. You can update the mod now.
you can expect some one-time errors after the update, but after this everything should work properly.
Mod updated, few new features added, like multimap support and default resource list for new maps (this is crucial in Odyssey when you navigate more than one map more often)
Deep  [author] 31 Jul @ 1:40am 
Thanks! I will check this out today.
Stealth Rabbi 30 Jul @ 7:26pm 
Also confirmed the alert itself still works, too. No problems during gameplay.
Stealth Rabbi 30 Jul @ 7:24pm 
@Deep the mod still works as expected, or at lesat the config menu still appears. However, I am still seeing the errors on regarding Verse.ThingDef.
Deep  [author] 30 Jul @ 2:49am 
@Stealth:
i think ive found the issue. It was about hugslib update feature. updating mod now.
Deep  [author] 30 Jul @ 1:57am 
thanks, i wil lcheck this. Can you confirm, the mod works correctly nevertheless?
Stealth Rabbi 29 Jul @ 6:24pm 
@Depp the error happens when I laod the main menu of RimWorld. It's not happenign when I load my save file. Nonetheless, I just resaved my file after a Workshop update (not sure what mods were updated in Steam), and I see the same error.
Deep  [author] 29 Jul @ 5:04am 
@Stealth:
Just checked how mod works on my side, it works flawlessly, but it calls some dev errors between versions, but after save and load i see this was one-time error that has no impact on the gameplay. Can you confirm the same?
Deep  [author] 29 Jul @ 5:03am 
@横冲直撞小影子 :

update: you need to have enabled categorized resource loadout mode to be able to use the mod. I will try to make it work even when its disabled, but for the time being you need to have it enabled.
Deep  [author] 29 Jul @ 4:46am 
@Stealth:
Does it work afterwards? Does the error persists after save and load? Ive changed the logic behind some values, so it may be one-time error.
If it is not, i will investigate.
横冲直撞小影子 28 Jul @ 9:30pm 
@Deep Clicking on any key has no response, including Shift. I have enabled the display of resource categories. Is this related to this?
Stealth Rabbi 28 Jul @ 6:00pm 
Thank you fo ryour updates. It was working fine earlier today, but I just updated to RimWorld 1.6.4535. I'm getting this error. I got something similar in another mod about. Not sure if it's HugsLib or... something else?


```
Adding duplicate HugsLib.UpdateFeatureDef name: DeepsResourceAlert_1_503
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch1 (string)
Verse.DefDatabase`1<HugsLib.UpdateFeatureDef>:Add (HugsLib.UpdateFeatureDef)
```


and variuos other errors

```
Null key while loading dictionary of Verse.ThingDef and System.Int32. label=Deep_ResourceAlert_alertableResources
UnityEngine.StackTraceUtility:ExtractStackTrace ()
....

```

The mod is still acttve, or at least, I can set up alerts for things. Not sure if it is actually alerting though.
Deep  [author] 28 Jul @ 10:50am 
Changing the bind is not possible now.
can you show copy the log to the pastebin?
Do you shift+click on the resource in the list?
can you tell me more?
横冲直撞小影子 28 Jul @ 10:14am 
not working.I can't figure out which mod is causing the conflict.Can I set my own shortcut keys?
Deep  [author] 28 Jul @ 9:35am 
additional changes planned for this week:
raid-like toast notification when critical stock of the resource has been reach


Alse i want to find a way to prepare different lists for different maps, like spaceship in the space and multiple colonies.
Deep  [author] 28 Jul @ 9:33am 
Mod has been updated.
Changelog:
Improved UI: cleaner design, consistent styling.
New Tracked Resources summary window: edit or remove tracked items, even if not present on the map.
Set value window now pre-fills current threshold.
Mod settings window added: Click to edit tracked values.
Deep  [author] 28 Jul @ 5:21am 
had the same idea! I have to think through how to implement it to be simple and useful.
Stealth Rabbi 27 Jul @ 7:11pm 
@Deep thank you. Liking the mod so far!

Would it be possible to configure a severity level, either overall, or have warn/severe thresholds for each item? e.g. if I'm low on Cotton, I'd like to know, but it's much less severe than, say, running out of meat. Or, have a warn/severe threshold for meat levels.
Deep  [author] 27 Jul @ 11:55am 
@Stealth: roger that, will work on this today
Stealth Rabbi 26 Jul @ 7:12pm 
@Deep, regarding @Lord Asriel's request, could you add a "Unset Alert" button on the dialog where you enter the amount?
Deep  [author] 28 Jun @ 9:57am 
Mod updated to 1.6

Asriel, sorry i havent yet fixed your issue.
Lord Asriel 27 Oct, 2024 @ 8:44pm 
Wow that was fast, thanks! Yeah, I agree - seeing as how the first thing I tried when I didnt know it was impossible, was go in the mod settings.
An alternative - and maybe even better - is to be able to open a menu like thing when clicking on an item category. I guess this interferes with your current implementation of catergories(though I haven't used it yet), so 2 possible solutions are 1) use another click (like Ctrl-click) or 2) have the subcategory list underneath the master category resource threshold.