RimWorld

RimWorld

Life Lessons
Arcimbaldo 8 Mar, 2023 @ 2:11am
Patching Utility feedback/questions
Decided to do this as a separate thread, rather than spamming the comments section:


The Patching Utility is fantastic - thanks so much for including it and with copious documentation. A couple of questions/points of feedback tho:

1. clicking the grey circle to the left of the items in the building/recipes/items/etc often seems to crash the game

2. the copy/paste functionality is fantastic, but could do with being mentioned more prominently in the documentation

3. don't know how feasible it is technically, but it would be really helpful if it was possible to call up the in-game proficiency tree diagram while you're in the Patching Utility, so you can compare to vanilla items and recipes or remind yourself how the proficiency prerequisite tree is structured

4. the documentation for Rewards says "By default, per tick generation is at 0.1XP per tick" - does that mean that leaving the progressGain field unchanged (i.e. displaying as "0" in the Utility) it will default to 0.1?

5. related to the above - some other fields, like progressGain for Deconstruction Rewards, display as "0" by default, but don't mention having a default in the documentation - does that mean that those always need to be set to a value manually?

6. what does the "E" button mean? I'm guessing it's to Export the patch, but I couldn't see that mentioned in the documentation

7. do you have any plans on how to do integration with fantasy/magic mods? i've been making some compatibility patches for the MorrowRim mods, and I'm not sure how to approach some of the more supernatural items/recipes/etc. So far have been assigning chemistry as a reward & soft requirement for the alchemical recipes, but I'm not sure how to approach the other magical/enchanted items

8. would it be helpful for me to send you any compatibility patches I make?
< >
Showing 1-6 of 6 comments
Wumpi  [developer] 8 Mar, 2023 @ 4:56am 
4. It's a hard-coded value at the moment, with progress Gain being an override. It's important to note that some actions generate xp per tick - recipes, for example - while others only generate it on completion. This is why we default the progressGain field to 0, so the user needs to consciously decide whether to override it or not.

5. Deconstruction is one of those few where xp is only generated once the action is completed rather than per tick. As such the 0.1xp default doesn't apply and a value should be provided.

6. E is export. I believe the docs explain what is exported and where. Note that if you dont export and move the generated files into your mod folder, they will be lost when you restart. All we are really doing is modifying the defs in memory and then generating xml based on that.

7. Magic was always out of scope, so there aren't any proficiency that accurately represent magic. Applying them to magic items at all risks making the magic more of a scientific process, which isn't ideal.
That said, exotic physics is more or less the stand in for "space magic" like energy shields and the like.
Future extensions may make this easier if psycast proficiency ever become a thing.

8. Maybe, but likely not. Most likely I'd still need to go through them for validation, so it probsbly wouldn't save a lot of time and might take more trying to understand the reasoning behind certain applications.
Not saying I won't look through what's sent in, but it's not going to be a high priority.

Thanks for the feedback, I'll consider it in the next release cycle.
Last edited by Wumpi; 8 Mar, 2023 @ 7:10am
jtseyman 21 Apr, 2023 @ 2:54pm 
Can you patch with simple learning mod so that pawns can self- teach proficients?
Arcimbaldo 2 Jan, 2024 @ 2:32pm 
Coming back to this for the first time in ages. Love all the new content, but I've forgotten exactly how the patcher works.

The Help menu says:

"All generated content is stored in ....%appdata%LocalLow/...etc,etc,etc..../DevOutput/LifeLessons
Patches are generated in the Content folder and should be placed in the LifeLessons/Content/Mods folder, or the corresponding loaded folder of your own mod"

This is perhaps a stupid question, but I don't find the wording very clear: does that mean use the LifeLessons/Content/Mods folder within DevOutput in the appdata, or does it mean put it in the Content/Mods folder within the main LifeLessons mod folder in your Steam Workshop rimworld mods folder (or obviously your local mod directory if installed manually)

And do either of those risk the files getting deleted when the mod's updated or reinstalled? So it would be safer to put them in a personal mod folder?
Last edited by Arcimbaldo; 2 Jan, 2024 @ 2:33pm
Arcimbaldo 2 Jan, 2024 @ 5:13pm 
EDIT: okay, i've just seen that there's a big update on its way that will change all the proficiencies up anyway, so I guess I may as well stop trying to patch things until then
----------------------------------------

Tried patching some backstories, and it seems like the Template function and/or the conditionals are kind of buggy, and in particular something seems very broken with how the mod saves the templates.

For one thing, I did notice that if I used a conditional inside a template, then applied it to a background, then edited the conditional within the background, those changes would affect the template and every background using the template. Changing the non-conditional proficiencies or adding new conditionals didn't affect the template, which seems inconsistent, so I'm assuming part of this is bugged. It seems like the template SHOULD just paste a copy of itself into the backstory and then subsequently the two should be independent,

I've also noticed sometimes if you add non-conditional proficiencies BEFORE adding conditional ones, sometimes some of the non-conditional ones disappear when you add a conditional proficiency. I think this is only when the non-conditional proficiencies are prerequisites for the conditional ones, but I'm not completely certain. My guess is that it's the same mechanism that's supposed to prune redundant proficiencies when a higher tier one is added to the list, but that it's not supposed to fire when those proficiencies are added to a conditional.

Those are relatively minor issues though - setting up and saving the backstories seems to still work. The bigger problem is that the templates always seem to get corrupted after saving them. They work fine within one session, but if I quit and then launch the game again, I get a whole load of errors in the log, and all the proficiencies have disappeared from inside the templates (although the conditionals with their rolls & percentages are still there - but empty of any actual proficiencies). And sometimes when I click on the template I get a spam of errors that break the GUI.

If I quit and then relaunch a second time, all the errors usually disappear and the GUI works fine, but the templates are still empty of proficiencies.

Full log here tested with no additional mods: https://pastebin.com/BBgjMB0X

Errors on start-up:
Could not load reference to LifeLessons.ProficiencyDef named AdvancedConstruction (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Could not load reference to LifeLessons.ProficiencyDef named Construction (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Could not load reference to LifeLessons.ProficiencyDef named Electronics (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Could not load reference to LifeLessons.ProficiencyDef named AdvancedScience (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Could not load reference to LifeLessons.ProficiencyDef named AdvancedMathematics (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Could not load reference to LifeLessons.ProficiencyDef named BasicMathematics (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Could not load reference to LifeLessons.ProficiencyDef named ReadingWriting (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Could not load reference to LifeLessons.ProficiencyDef named BasicScience (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Could not load reference to LifeLessons.ProficiencyDef named ShipBuilding (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Could not load reference to LifeLessons.ProficiencyDef named Engineering (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Could not load reference to LifeLessons.ProficiencyDef named Physics (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Could not load reference to LifeLessons.ProficiencyDef named Mechanics (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Could not load reference to LifeLessons.ProficiencyDef named BasicFabrication (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Could not load reference to LifeLessons.ProficiencyDef named Bionics (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Could not load reference to LifeLessons.ProficiencyDef named Medical (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Could not load reference to LifeLessons.ProficiencyDef named FirstAid (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Could not load reference to LifeLessons.ProficiencyDef named ReadingWriting (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Null key while loading dictionary of LifeLessons.ProficiencyDef and System.Int32. label=weightedOptions (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Null key while loading dictionary of LifeLessons.ProficiencyDef and System.Int32. label=weightedOptions (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Null key while loading dictionary of LifeLessons.ProficiencyDef and System.Int32. label=weightedOptions (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Null key while loading dictionary of LifeLessons.ProficiencyDef and System.Int32. label=weightedOptions (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Key binding conflict: MainTab_LLLearning and TakeScreenshot are both bound to F10. (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) Key binding conflict: TakeScreenshot and MainTab_LLLearning are both bound to F10. (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)


Errors when the GUI breaks (this one spams constantly):
[LL]Reloading patchables Exception filling window for LifeLessons.PatchUtilityWindow: System.NullReferenceException: Object reference not set to an instance of an object at LifeLessons.BackstoryRenderer.DrawTemplate (UnityEngine.Rect rect, LifeLessons.BackstoryTemplate template) [0x000a0] in <22aa84cda989447a92629f924f17008d>:0 at LifeLessons.BackstoryRenderer.DrawWorkspace (UnityEngine.Rect rect) [0x0010c] in <22aa84cda989447a92629f924f17008d>:0 at LifeLessons.PatchUtilityWindow.DoWindowContents (UnityEngine.Rect inRect) [0x00115] in <22aa84cda989447a92629f924f17008d>:0 at Verse.Window.InnerWindowOnGUI (System.Int32 x) [0x001d3] in <cd7169108ea74757aa50c5b33d275c15>:0 (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39) GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced. (Filename: Line: 580)
Last edited by Arcimbaldo; 2 Jan, 2024 @ 5:16pm
Wumpi  [developer] 2 Jan, 2024 @ 6:59pm 
In no particular order:
When you export patches from the UI, they will be saved to the dev output folder. In order for those patches to reflect in-game, you need to add them to a mod. Preferably, you will create your own mod for patches as this will prevent them from being overridden and allow for distribution if you like. If you do put them in the LL folder, bear in mind that steam may overwrite them.
I wrote the documentation from my own perspective, so naturally where you install the patches is different.

I believe I later found the save-load issue you mention above and fixed it in the 2.0 branch, but haven't (and most likely won't) cherry pick the fix into the main-line. Mostly because I don't remember when or what the issue was. Since the 1.1 release, the template system has been refined further to include templates as Defs, so the existing system is fixed but doesn't really exist in a form that I Can easily backport to 1.1. Sorry! Just count on the whole system being more useful in the next release.

The template application issue is definitely something I haven't caught. Most likely I'm not creating a new list of conditionals when applying the template, so each background is getting a copy of the address rather than a copy of the contents. It's an easy fix I'll make for the 2.0 branch.
Wumpi  [developer] 19 Apr, 2024 @ 7:59pm 
Following up on this with some random notes:
- In-patcher templates were removed due to being an inferior implementation of the template def and causing a lot of headaches with saving and loading.
- Per your original request 3, the proficiency tree can be opened from any panel in the patcher to reference the hierarchy.
- The research tree can also be opened from the research panel (if in-map) but has limited usefulness

If you want to experiment with the new patcher, a prerelease is available on Discord. We're moving towards release sometime in the next 2 weeks if all goes well in testing.
< >
Showing 1-6 of 6 comments
Per page: 1530 50