Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
That's strange. Reinstalling after a verify seems to have made the error go away. Steam mod updates have been giving me issues at times recently. Its mostly strange because I had tried that before. Oh well, at least its working now eh? Thank you, and sorry for the inconvenience.
Seems like the transpiler is running for you properly, but somehow fails to find all instructions inside the colonist bar.
So either, you have a corrupt file of my mod or rimworld or another mod has already changed the colonybar to an extend that it breaks my mod.
So, let steam verify your rimworld files, redownload this mod and check if it works without any other mod (besides harmony ofc).
If it still does not work, I'm out of ideas.
If it does work try to load your other mods with it and see if you can find the one thats not compatible.
I've been learning how to code myself, but use AI for a lot of things, and I was just trying to identify what might be causing the error. I've attached below a link the player.log. Its one of the first errors you encounter there. I appreciate you taking the time to explain the reasoning behind it!
https://drive.google.com/file/d/11GtTjC7O_m5kl6N_-Lh435cFtCGt-Dwr/view?usp=sharing
Can you upload your whole player.log ?
Please, do not ask AI for why errors happen, otherwise you get lies like "Widgets.ThingIcon only has 3 parameters". It might look competent at first, but It will just waste your time and mine...
Widgets.ThingIcon (on 1.6) either has up to 7 or up to 8 (up to because some are optional) -
https://i.imgur.com/bAM3t8u.png
Your example also calls the 7 parameter: You are giving it 3: 2 are required, 1 is optional and the rest are taken from the default vaules...
I've switched over to a transpiler, since this mod used to override the whole colony bar UI.
A transpiler allows me to only edit how the weapon below is shown (meaning in this case changing its position and adding the utility apparel).
The commented out postfix would be incompatible with other UI mods, but should also work for 1.6.
Well anyway, without a proper log I can not really help you beyond this, as it does work fine for me:
https://i.imgur.com/Tcs3K0r.png
I'm guessing this is something to do with the changes made related to 1.6, or updates to the mod? I saw there was a commented out prefix patch code that would work just fine, so I'm guessing there's a reason you switched to a transpiler. But at least on my end the transpiler is breaking it lol.
Thanks for your work on this mod!
Error Details:
[AV] Show Utility Apparel - Failed to patch ColonistBar.ColonistBarOnGUI()
System.ArgumentException: Label #3 is not marked in method `RimWorld.ColonistBar.ColonistBarOnGUI_Patch0'
Root Cause:
The transpiler is looking for a Widgets.ThingIcon call with 7 parameters, but the actual method in RimWorld 1.6 only has 3 parameters. The transpiler never finds the expected call, continues skipping instructions, and breaks the IL control flow.
Specific Issue:
In HarmonyPatch.cs line 67-75, the transpiler expects:
"Void ThingIcon(UnityEngine.Rect, Verse.Thing, Single, System.Nullable`1[Verse.Rot4], Boolean, Single, Boolean)"
But the actual call in RimWorld 1.6 is:
Widgets.ThingIcon(rect, thing, stackOfOne: true)
@OganessonG
It's been a while, so I don't know if you still care, but you can now use [NL] Custom Portraits with this mod :)
Still, I've pushed a PR with some improvements, if you're interested. The code's commented, so I believe it should be clear, but feel free to ask in the PR if something is not.