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.
There you go:
https://github.com/VeItaris/AV_ColonistBar
No, but the source code is in the mod files, if you wanna take a look.
Currently it is filtering through every clothing of a colonist and checking if it is an utility item or not. This accours every FRAME and for each colonist. So the more colonists, clothings and frames you have, the more performance it will eat.
I could defininatly reduce the performance impact by doing the search every couple of seconds and saving the results so they can be drawn.
I love this mod and literally cant play without it... I would have sacrificed VE - Pirates for the enormous luxurity of having an easy way to check utility items haha
Also everthing works perfect now.
Thanks a lot
Thanks for the info. It should be fixed now.
@OganessonG
Sorry for the late reply. This is really just a mini mod done in not even an hour (excluding the testruns). I'll not expand this thing into a real colonist bar overall. But should you or anybody else want to put this feature into another mod, feel free to copy/change my code.
Sorry, unfortunately both mods change how the colonist bar is displayed.
Sadly this mod needs to redraw the colony bar, even though it just adds pictures under it.
Thats just how rimworlds colony bar works, not much I can do there.
Maybe a modder with more harmony experience can, but I don't have the skill for that.
Got it, thanks for clarifying.
I've thought about that too, but discarded the idea.
It would mean that the icons would have to be made even smaller or that the spacing between the rows would have to be changed if there were enough colonists for a second row, leaving less space for the actual game at small resolutions.
That seemed like too much work just to see how it looks.
Thanks a lot bro