RimWorld

RimWorld

Local Growing First (Continued)
58 kommentarer
ZzZombo 30. aug. kl. 8:13 
@Mlie: thinking about it more, it's more appropriate to suggest to the VPE:MP developer(s) to fix the `ExtraRequirements()` not to blindly cast things. They already have similar logic to handle other unsuccessful cases when they just return `false`, so if the `settable` is not a thing, just return `false` too. Will you do it?
ZzZombo 26. aug. kl. 1:45 
I'm afraid I can't. I do not know the code that well to suggest a fix; I think, however, ignoring the problematic VFE work giver could be a viable solution. All I know is that your work giver wrapper attempts to call the wrapped work giver's method with parameters the latter doesn't expect. As for the DLR stuff, you may ignore it. I took a second look and it is not helpful here because some of the things are not public so can't be accessed using it. However, you still can and should cache all stuff like `type.GetMethod()` where possible; in this case it can be done within `createWrappedScanner()`.
Mlie  [ophavsmand] 26. aug. kl. 1:01 
@ZzZombo Perhaps you can do a PR with these changes? I am not familiar with some of these terms you mention
ZzZombo 26. aug. kl. 0:57 
Also I'd suggest to abolish using of Reflection API here and instead use DLR capabilities thanks to the `dynamic` object type which should be much faster. Or at least cache all result values of Reflection (like method info).
ZzZombo 26. aug. kl. 0:54 
@Mlie, but the cause of error is really clear: you call `VanillaPlantsExpandedMorePlants.WorkGiver_GrowerSowAquatic.ExtraRequirements()` via Reflection with the arguments of (`zone_Growing`, `pawn`), but it expects the first argument to be either a `VanillaPlantsExpandedMorePlants.Zone_GrowingAquatic` or a thing. It is neither and so it ends up invoking `intVec = ((Thing)settable).Position` which, because it is NOT a thing, leads to the invalid cast exception.
moo 4. juli kl. 22:28 
Sorry, I had a mod remembering bills with old ingredients... and the other red errors I'm very aware of where they come from

New log, minimal mod load order. Conflict with VPE-MP

Log - https://pastebin.com/GZBc1YFL
LO - https://www.dropbox.com/t/bCbI5C2YZwPabAla
Mlie  [ophavsmand] 4. juli kl. 22:16 
@moo That log is full of errors, please see the steps described above regarding reporting issues.
moo 4. juli kl. 22:12 
Oh I just glanced at the log, looks like VPE-More Plants again, just like the other mod
moo 4. juli kl. 22:11 
Mlie  [ophavsmand] 4. juli kl. 22:07 
@moo Please share the link to the full log
moo 4. juli kl. 22:05 
Hi @mlie

These kinds of logs are showing up fairly routinely. The right-click menu for growing zones is also not functional.

<pawnname> threw exception in WorkGiver LGF_LocalVCE_SowAquatic : System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Specified cast is not valid.

I see a set of three logs one after the other, one each for LGF_LocalVCE_SowAquatic / LGF_LocalVCE_SowSandy / LGF_LocalVCE_SowFlowerGarden




I checked against Smarter Construction, Common Sense and While You're Up. I think the only variable left is Smart Farming but I don't have time this weekend to confirm
Xavier 26. maj 2024 kl. 8:49 
Thank you @Mile - I will work on getting all that to you.
And thank you for keeping all these mods alive! I am subscribed to quite a few of your updates.:schappy:
Mlie  [ophavsmand] 26. maj 2024 kl. 4:27 
@Xavier Please see the Reporting Issues section described above
Xavier 26. maj 2024 kl. 0:05 
Anyone else having an error with this mod? I have narrowed it down to this mod. Log shows error of "error trying to make float menu for..." Basically what happens is I'm harvesting a field, then if I right click anywhere to either haul or harvest, all work types lock to 3 (unchangeable) and log will show the error above. Right click menu will no longer show up. I remove this mod (out of about 160 total) and problem goes away.
Mathissous 22. okt. 2022 kl. 15:12 
Problem fixed :manskull:
My bad :mansmile:
Mathissous 22. okt. 2022 kl. 15:06 
Problem fixed ;)
Mlie  [ophavsmand] 22. okt. 2022 kl. 4:35 
@Mathissous What?
Mathissous 22. okt. 2022 kl. 4:09 
In log content this mod is not update to 1.4 version...
piercebuster 16. mar. 2022 kl. 19:09 
WHERE HAS THIS MOD BEEN MY WHOLE LIFE
InertFurry 2. aug. 2021 kl. 23:00 
It was Works Controller? I removed that and people are very eager to pant things again!
InertFurry 2. aug. 2021 kl. 14:26 
I'll have to check; will keep you posted.
Mlie  [ophavsmand] 2. aug. 2021 kl. 11:44 
@InertFurry The separate treechopping got updated recently, is the issue still happening?
Mlie  [ophavsmand] 28. juli 2021 kl. 8:46 
@InertFurry I see, ill take a look at it
InertFurry 28. juli 2021 kl. 7:13 
If it's a conflict, it's Separate Tree Chopping, which pulls trees out of the plant cutting works field. One or the other might mess with the redirection Local Growing does to ensure pawns work in one zone at a time.
Mlie  [ophavsmand] 28. juli 2021 kl. 4:19 
@InertFurry In my tests they plant on their own. Can you try with only this mod loaded to rule out conflicts?
InertFurry 28. juli 2021 kl. 3:56 
This seems to be preventing pawns from seeking plants work unless they're forced to.
Dawnmist 30. apr. 2021 kl. 10:13 
Yes! This update has fixed it, thank you!
Mlie  [ophavsmand] 30. apr. 2021 kl. 1:49 
@Dawnmist Thank you, that made it a lot easier. I think I have fixed it now, I am unable to trigger the error anyway but if you could verify it it would be great!
Dawnmist 30. apr. 2021 kl. 1:08 
For me:
* Load game
* Select a Pawn - I've been selecting Cergola standing in the door
* Right-click any item they they should be able to interact with, like the tree just below to the right of the door
=> Error thrown instead of a right-click menu showing

Happens on all pawns, and for all interactables. I'm running on linux, but I wouldn't have thought that would make a difference in this instance.
Mlie  [ophavsmand] 30. apr. 2021 kl. 0:51 
@Dawnmist How do the error trigger? I loaded up your save and rightclicked around with no errors.
Dawnmist 29. apr. 2021 kl. 18:18 
I made sure that steam downloaded the new version (1.0.3.0), but the error is still occurring (same stacktrace).

I've got a copy of the save game where it is happening with the mod list trimmed down to Hugs Lib + Jecs Tools + LGF uploaded to dropbox at https://www.dropbox.com/s/z4px9h4ckrqksrg/Rimworld_LocalGrowingFirst.rws?dl=1 if you want to grab it for testing with at your end.
Mlie  [ophavsmand] 29. apr. 2021 kl. 12:38 
@Dawnmist Thank you for that detailed report. I have hopefully found the issue and have published an update. Since I cannot trigger the error myself I hope you can verify it for me?
Dawnmist 29. apr. 2021 kl. 8:33 
Harmony (git version, not yet released) has additional analysis of errors to help identify what function/patch in which mod the various lines are.

Using that and removing Achtung (so it didn't catch the error, letting it go through to Harmony instead) results in the following error reported:
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2471306622
Dawnmist 29. apr. 2021 kl. 7:57 
Update on the issue with Achtung - there were 2 errors, one that LGF is throwing, and then one in the menu error handler in Achtung that tried to catch the LGF error.

Achtung 3.1.7 has fixed the menu error handler, so now I can get:

System.NullReferenceException: Object reference not set to an instance of an object
at LocalGrowingFirst.WorkGiver_LocalZoneWrapper.get_PotentialWorkThingRequest () [0x00000] in <6bb7558d293f4cef8154ee2ee59ee969>:0
at (wrapper dynamic-method) RimWorld.FloatMenuMakerMap.RimWorld.FloatMenuMakerMap.AddJobGiverWorkOrders_NewTmp_Patch2(UnityEngine.Vector3,Verse.Pawn,System.Collections.Generic.List`1<Verse.FloatMenuOption>,bool)
at RimWorld.FloatMenuMakerMap.AddUndraftedOrders (UnityEngine.Vector3 clickPos, Verse.Pawn pawn, System.Collections.Generic.List`1[T] opts) [0x00084] in <64e18a81024640d8bdfb3f18f6a770bf>:0
at (wrapper dynamic-method) RimWorld.FloatMenuMakerMap.RimWorld.FloatMenuMakerMap.ChoicesAtFor_Patch2(UnityEngine.Vector3,Verse.Pawn)
Elderwood 26. apr. 2021 kl. 23:46 
I too have just spent over an hour trying to find out what was causing my loss of right click option. Can confirm that this was the culprit (and yes I'm using Achtung!).

Big fan of your work usually Mlie, hope you work out what the issue is. :steamthumbsup:
Dawnmist 18. apr. 2021 kl. 9:50 
I found that removing this mod - and only this mod - fixes the issue I was seeing (right click menu doesn't appear, message in the debug log with an object that was a null pointer), but the fact that it would happen on the save with only Achtung & Local Growing First but not on a newly created game with the same mods active makes me think that there is something in the save game data that contributes to the problem.

Since it was a newish save game, I decided to start over with a fresh game instead of continuing with a save that was...questionable as to whether it was partly corrupted. It was when I came over here to reinstall this mod to test whether I could get better logging detail using a newer version of Harmony and saw several reports about right-click issues and needing to test which mod combination was causing it, that I thought that I'd pass on the info that I'd been having issues and had traced it back to the pair of this and Achtung. :)
Mlie  [ophavsmand] 18. apr. 2021 kl. 9:42 
@Dawnmist Ive had that issue with achtung without this mod in my save. Removed it by disabling some of achtungs settings if I remember correctly. Hope you find the issue!
Dawnmist 18. apr. 2021 kl. 9:33 
Achtung! + Local Growing First will cause the right-click menu issue (but only on one of my existing saves, it didn't happen on a fresh save). I've currently been trying to trace the issue with the help of Brrainz.
Mlie  [ophavsmand] 2. jan. 2021 kl. 23:30 
If anyone wants to help me find the issue, please load just this mod and verify that it works. Then add your other mods and test until you find what other mod is causing it
MagnusGames 2. jan. 2021 kl. 22:20 
yeah, this mod is bugged
Dave 24. dec. 2020 kl. 9:10 
The right clicking issue is still happening (to me at least). Took me an hour to work out it was this mod. Hope you're able to fix is. Can send you my mod list if you think it is a conflict issue and you have the time/want to find out.
DrBubba 15. nov. 2020 kl. 15:13 
Same as @pinbuck. I posted in the Discord.
pinbuck 2. nov. 2020 kl. 18:09 
@ me if you want me to drop info
pinbuck 2. nov. 2020 kl. 18:08 
sticking with growing priority mod for now as im getting a bug when rightclicking
TheDanishJonas 21. okt. 2020 kl. 3:42 
Thank you for updating this mod. Pawns leaving half-finished growing zones are my biggest gripe with the game, and this fixes it! Thanks!
whatchagonnado'boutthatson? 15. okt. 2020 kl. 11:48 
that is the odd thing about it. there is no error :D
Mlie  [ophavsmand] 15. okt. 2020 kl. 11:04 
@whatchagonnado'boutthatson? Not sure why you are having the issue. I tested it now and have no problems with it. If you can find an error message or something it might help.
whatchagonnado'boutthatson? 15. okt. 2020 kl. 8:03 
yes it does. as soon as i load this mod i can't do right click related actions with undrafted pawns
Mlie  [ophavsmand] 14. okt. 2020 kl. 14:20 
@whatchagonnado'boutthatson? Does this happen with only this mod loaded?
whatchagonnado'boutthatson? 14. okt. 2020 kl. 14:05 
I don't know how much effort and interest there is still for this mod. however i encountered an issue where i cannot make undrafted pawns do anything by right clicking.